Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-flame-graph

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-flame-graph - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

274

dist/d3-flamegraph-colorMapper.js

@@ -1,205 +0,109 @@

(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["colorMapper"] = factory();
else
root["colorMapper"] = factory();
})(d3.flamegraph, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory((global.d3 = global.d3 || {}, global.d3.flamegraph = global.d3.flamegraph || {}, global.d3.flamegraph.colorMapper = {})));
}(this, (function (exports) { 'use strict';
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "allocationColorMapper", function() { return allocationColorMapper; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offCpuColorMapper", function() { return offCpuColorMapper; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nodeJsColorMapper", function() { return nodeJsColorMapper; });
function pickHex (color1, color2, weight) {
const w1 = weight
const w2 = 1 - w1
const rgb = [Math.round(color1[0] * w1 + color2[0] * w2),
Math.round(color1[1] * w1 + color2[1] * w2),
Math.round(color1[2] * w1 + color2[2] * w2)]
return rgb
}
function pickHex (color1, color2, weight) {
const w1 = weight;
const w2 = 1 - w1;
const rgb = [Math.round(color1[0] * w1 + color2[0] * w2),
Math.round(color1[1] * w1 + color2[1] * w2),
Math.round(color1[2] * w1 + color2[2] * w2)];
return rgb
}
function generateHash (name) {
// Return a vector (0.0->1.0) that is a hash of the input string.
// The hash is computed to favor early characters over later ones, so
// that strings with similar starts have similar vectors. Only the first
// 6 characters are considered.
const MAX_CHAR = 6
function generateHash (name) {
// Return a vector (0.0->1.0) that is a hash of the input string.
// The hash is computed to favor early characters over later ones, so
// that strings with similar starts have similar vectors. Only the first
// 6 characters are considered.
const MAX_CHAR = 6;
var hash = 0
var maxHash = 0
var weight = 1
var mod = 10
var hash = 0;
var maxHash = 0;
var weight = 1;
var mod = 10;
if (name) {
for (var i = 0; i < name.length; i++) {
if (i > MAX_CHAR) { break }
hash += weight * (name.charCodeAt(i) % mod)
maxHash += weight * (mod - 1)
weight *= 0.70
if (name) {
for (var i = 0; i < name.length; i++) {
if (i > MAX_CHAR) { break }
hash += weight * (name.charCodeAt(i) % mod);
maxHash += weight * (mod - 1);
weight *= 0.70;
}
if (maxHash > 0) { hash = hash / maxHash; }
}
if (maxHash > 0) { hash = hash / maxHash }
return hash
}
return hash
}
function allocationColorMapper (d) {
if (d.highlight) return 'rgb(230, 0, 230)'
function allocationColorMapper (d) {
if (d.highlight) return 'rgb(230, 0, 230)'
const self = d.data.value
const total = d.value
const color = pickHex([0, 255, 40], [196, 245, 233], self / total)
const self = d.data.value;
const total = d.value;
const color = pickHex([0, 255, 40], [196, 245, 233], self / total);
return `rgb(${color.join()})`
}
return `rgb(${color.join()})`
}
function offCpuColorMapper (d) {
if (d.highlight) return '#E600E6'
function offCpuColorMapper (d) {
if (d.highlight) return '#E600E6'
let name = d.data.n || d.data.name
let vector = 0
const nameArr = name.split('`')
let name = d.data.n || d.data.name;
let vector = 0;
const nameArr = name.split('`');
if (nameArr.length > 1) {
name = nameArr[nameArr.length - 1] // drop module name if present
}
name = name.split('(')[0] // drop extra info
vector = generateHash(name)
if (nameArr.length > 1) {
name = nameArr[nameArr.length - 1]; // drop module name if present
}
name = name.split('(')[0]; // drop extra info
vector = generateHash(name);
const r = 0 + Math.round(55 * (1 - vector))
const g = 0 + Math.round(230 * (1 - vector))
const b = 200 + Math.round(55 * vector)
const r = 0 + Math.round(55 * (1 - vector));
const g = 0 + Math.round(230 * (1 - vector));
const b = 200 + Math.round(55 * vector);
return 'rgb(' + r + ',' + g + ',' + b + ')'
}
return 'rgb(' + r + ',' + g + ',' + b + ')'
}
function nodeJsColorMapper (d, originalColor) {
let color = originalColor
function nodeJsColorMapper (d, originalColor) {
let color = originalColor;
const { v8_jit: v8JIT, javascript, optimized } = d.data.extras || {}
// Non-JS JIT frames (V8 builtins) are greyed out.
if (v8JIT && !javascript) {
color = '#dadada'
}
// JavaScript frames are colored based on optimization level
if (javascript) {
let opt = (optimized || 0) / d.value
let r = 255
let g = 0
let b = 0
if (opt < 0.4) {
opt = opt * 2.5
r = 240 - opt * 200
} else if (opt < 0.9) {
opt = (opt - 0.4) * 2
r = 0
b = 200 - (200 * opt)
g = 100 * opt
} else {
opt = (opt - 0.9) * 10
r = 0
b = 0
g = 100 + (150 * opt)
const { v8_jit: v8JIT, javascript, optimized } = d.data.extras || {};
// Non-JS JIT frames (V8 builtins) are greyed out.
if (v8JIT && !javascript) {
color = '#dadada';
}
color = `rgb(${r} , ${g}, ${b})`
// JavaScript frames are colored based on optimization level
if (javascript) {
let opt = (optimized || 0) / d.value;
let r = 255;
let g = 0;
let b = 0;
if (opt < 0.4) {
opt = opt * 2.5;
r = 240 - opt * 200;
} else if (opt < 0.9) {
opt = (opt - 0.4) * 2;
r = 0;
b = 200 - (200 * opt);
g = 100 * opt;
} else {
opt = (opt - 0.9) * 10;
r = 0;
b = 0;
g = 100 + (150 * opt);
}
color = `rgb(${r} , ${g}, ${b})`;
}
return color
}
return color
}
exports.allocationColorMapper = allocationColorMapper;
exports.nodeJsColorMapper = nodeJsColorMapper;
exports.offCpuColorMapper = offCpuColorMapper;
/***/ })
/******/ ]);
});
Object.defineProperty(exports, '__esModule', { value: true });
})));

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.colorMapper=e():t.colorMapper=e()}(d3.flamegraph,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";function n(t){if(t.highlight)return"rgb(230, 0, 230)";return`rgb(${function(t,e,r){const n=r,o=1-n;return[Math.round(t[0]*n+e[0]*o),Math.round(t[1]*n+e[1]*o),Math.round(t[2]*n+e[2]*o)]}([0,255,40],[196,245,233],t.data.value/t.value).join()})`}function o(t){if(t.highlight)return"#E600E6";let e=t.data.n||t.data.name,r=0;const n=e.split("`");return n.length>1&&(e=n[n.length-1]),e=e.split("(")[0],r=function(t){var e=0,r=0,n=1;if(t){for(var o=0;o<t.length&&!(o>6);o++)e+=n*(t.charCodeAt(o)%10),r+=9*n,n*=.7;r>0&&(e/=r)}return e}(e),"rgb("+(0+Math.round(55*(1-r)))+","+(0+Math.round(230*(1-r)))+","+(200+Math.round(55*r))+")"}function u(t,e){let r=e;const{v8_jit:n,javascript:o,optimized:u}=t.data.extras||{};if(n&&!o&&(r="#dadada"),o){let e=(u||0)/t.value,n=255,o=0,i=0;e<.4?(e*=2.5,n=240-200*e):e<.9?(e=2*(e-.4),n=0,i=200-200*e,o=100*e):(e=10*(e-.9),n=0,i=0,o=100+150*e),r=`rgb(${n} , ${o}, ${i})`}return r}r.r(e),r.d(e,"allocationColorMapper",(function(){return n})),r.d(e,"offCpuColorMapper",(function(){return o})),r.d(e,"nodeJsColorMapper",(function(){return u}))}])}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t=t||self).d3=t.d3||{},t.d3.flamegraph=t.d3.flamegraph||{},t.d3.flamegraph.colorMapper={}))}(this,(function(t){"use strict";t.allocationColorMapper=function(t){return t.highlight?"rgb(230, 0, 230)":`rgb(${function(t,e,n){const r=n,o=1-r;return[Math.round(t[0]*r+e[0]*o),Math.round(t[1]*r+e[1]*o),Math.round(t[2]*r+e[2]*o)]}([0,255,40],[196,245,233],t.data.value/t.value).join()})`},t.nodeJsColorMapper=function(t,e){let n=e;const{v8_jit:r,javascript:o,optimized:a}=t.data.extras||{};if(r&&!o&&(n="#dadada"),o){let e=(a||0)/t.value,r=255,o=0,d=0;e<.4?r=240-200*(e*=2.5):e<.9?(r=0,d=200-200*(e=2*(e-.4)),o=100*e):(r=0,d=0,o=100+150*(e=10*(e-.9))),n=`rgb(${r} , ${o}, ${d})`}return n},t.offCpuColorMapper=function(t){if(t.highlight)return"#E600E6";let e=t.data.n||t.data.name,n=0;const r=e.split("`");return r.length>1&&(e=r[r.length-1]),n=function(t){var e=0,n=0,r=1;if(t){for(var o=0;o<t.length&&!(o>6);o++)e+=r*(t.charCodeAt(o)%10),n+=9*r,r*=.7;n>0&&(e/=n)}return e}(e=e.split("(")[0]),"rgb("+(0+Math.round(55*(1-n)))+","+(0+Math.round(230*(1-n)))+","+(200+Math.round(55*n))+")"},Object.defineProperty(t,"__esModule",{value:!0})}));

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.tooltip=n():t.tooltip=n()}(d3.flamegraph,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=6)}({6:function(t,n,e){"use strict";function r(){}e.r(n),e.d(n,"defaultFlamegraphTooltip",(function(){return we}));var i=function(t){return null==t?r:function(){return this.querySelector(t)}};function o(){return[]}var u=function(t){return null==t?o:function(){return this.querySelectorAll(t)}},a=function(t){return function(){return this.matches(t)}},s=function(t){return new Array(t.length)};function l(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}l.prototype={constructor:l,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function c(t,n,e,r,i,o){for(var u,a=0,s=n.length,c=o.length;a<c;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new l(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function f(t,n,e,r,i,o,u){var a,s,c,f={},h=n.length,p=o.length,d=new Array(h);for(a=0;a<h;++a)(s=n[a])&&(d[a]=c="$"+u.call(s,s.__data__,a,n),c in f?i[a]=s:f[c]=s);for(a=0;a<p;++a)(s=f[c="$"+u.call(t,o[a],a,o)])?(r[a]=s,s.__data__=o[a],f[c]=null):e[a]=new l(t,o[a]);for(a=0;a<h;++a)(s=n[a])&&f[d[a]]===s&&(i[a]=s)}function h(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var p="http://www.w3.org/1999/xhtml",d={svg:"http://www.w3.org/2000/svg",xhtml:p,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},v=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),d.hasOwnProperty(n)?{space:d[n],local:t}:t};function y(t){return function(){this.removeAttribute(t)}}function g(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _(t,n){return function(){this.setAttribute(t,n)}}function m(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function w(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function b(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}var x=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function A(t){return function(){this.style.removeProperty(t)}}function N(t,n,e){return function(){this.style.setProperty(t,n,e)}}function k(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function E(t,n){return t.style.getPropertyValue(n)||x(t).getComputedStyle(t,null).getPropertyValue(n)}function M(t){return function(){delete this[t]}}function S(t,n){return function(){this[t]=n}}function P(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function O(t){return t.trim().split(/^|\s+/)}function j(t){return t.classList||new q(t)}function q(t){this._node=t,this._names=O(t.getAttribute("class")||"")}function C(t,n){for(var e=j(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function T(t,n){for(var e=j(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function X(t){return function(){C(this,t)}}function R(t){return function(){T(this,t)}}function I(t,n){return function(){(n.apply(this,arguments)?C:T)(this,t)}}q.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function L(){this.textContent=""}function D(t){return function(){this.textContent=t}}function H(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Y(){this.innerHTML=""}function $(t){return function(){this.innerHTML=t}}function B(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function V(){this.nextSibling&&this.parentNode.appendChild(this)}function z(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function U(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===p&&n.documentElement.namespaceURI===p?n.createElement(t):n.createElementNS(e,t)}}function F(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var G=function(t){var n=v(t);return(n.local?F:U)(n)};function J(){return null}function K(){var t=this.parentNode;t&&t.removeChild(this)}function Q(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function W(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var Z={},tt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Z={mouseenter:"mouseover",mouseleave:"mouseout"}));function nt(t,n,e){return t=et(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function et(t,n,e){return function(r){var i=tt;tt=r;try{t.call(this,this.__data__,n,e)}finally{tt=i}}}function rt(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function it(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function ot(t,n,e){var r=Z.hasOwnProperty(t.type)?nt:et;return function(i,o,u){var a,s=this.__on,l=r(n,o,u);if(s)for(var c=0,f=s.length;c<f;++c)if((a=s[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=l,a.capture=e),void(a.value=n);this.addEventListener(t.type,l,e),a={type:t.type,name:t.name,value:n,listener:l,capture:e},s?s.push(a):this.__on=[a]}}function ut(t,n,e){var r=x(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function at(t,n){return function(){return ut(this,t,n)}}function st(t,n){return function(){return ut(this,t,n.apply(this,arguments))}}var lt=[null];function ct(t,n){this._groups=t,this._parents=n}function ft(){return new ct([[document.documentElement]],lt)}ct.prototype=ft.prototype={constructor:ct,select:function(t){"function"!=typeof t&&(t=i(t));for(var n=this._groups,e=n.length,r=new Array(e),o=0;o<e;++o)for(var u,a,s=n[o],l=s.length,c=r[o]=new Array(l),f=0;f<l;++f)(u=s[f])&&(a=t.call(u,u.__data__,f,s))&&("__data__"in u&&(a.__data__=u.__data__),c[f]=a);return new ct(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,s=n[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new ct(r,i)},filter:function(t){"function"!=typeof t&&(t=a(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],s=u.length,l=r[i]=[],c=0;c<s;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&l.push(o);return new ct(r,this._parents)},data:function(t,n){if(!t)return y=new Array(this.size()),h=-1,this.each((function(t){y[++h]=t})),y;var e,r=n?f:c,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),s=new Array(u),l=new Array(u),h=0;h<u;++h){var p=i[h],d=o[h],v=d.length,y=t.call(p,p&&p.__data__,h,i),g=y.length,_=s[h]=new Array(g),m=a[h]=new Array(g);r(p,d,_,m,l[h]=new Array(v),y,n);for(var w,b,x=0,A=0;x<g;++x)if(w=_[x]){for(x>=A&&(A=x+1);!(b=m[A])&&++A<g;);w._next=b||null}}return(a=new ct(a,i))._enter=s,a._exit=l,a},enter:function(){return new ct(this._enter||this._groups.map(s),this._parents)},exit:function(){return new ct(this._exit||this._groups.map(s),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new ct(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=h);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,l=i[o]=new Array(s),c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(n)}return new ct(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=v(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?g:y:"function"==typeof n?e.local?b:w:e.local?m:_)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?A:"function"==typeof n?k:N)(t,n,null==e?"":e)):E(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?M:"function"==typeof n?P:S)(t,n)):this.node()[t]},classed:function(t,n){var e=O(t+"");if(arguments.length<2){for(var r=j(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?I:n?X:R)(e,n))},text:function(t){return arguments.length?this.each(null==t?L:("function"==typeof t?H:D)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Y:("function"==typeof t?B:$)(t)):this.node().innerHTML},raise:function(){return this.each(V)},lower:function(){return this.each(z)},append:function(t){var n="function"==typeof t?t:G(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:G(t),r=null==n?J:"function"==typeof n?n:i(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(K)},clone:function(t){return this.select(t?W:Q)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=rt(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?ot:it,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var s,l=0,c=a.length;l<c;++l)for(r=0,s=a[l];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?st:at)(t,n))}};var ht=ft,pt={value:function(){}};function dt(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new vt(r)}function vt(t){this._=t}function yt(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function gt(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function _t(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=pt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}vt.prototype=dt.prototype={constructor:vt,on:function(t,n){var e,r=this._,i=yt(t+"",r),o=-1,u=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=_t(r[e],t.name,n);else if(null==n)for(e in r)r[e]=_t(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=gt(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new vt(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var mt,wt,bt=dt,xt=0,At=0,Nt=0,kt=0,Et=0,Mt=0,St="object"==typeof performance&&performance.now?performance:Date,Pt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ot(){return Et||(Pt(jt),Et=St.now()+Mt)}function jt(){Et=0}function qt(){this._call=this._time=this._next=null}function Ct(t,n,e){var r=new qt;return r.restart(t,n,e),r}function Tt(){Et=(kt=St.now())+Mt,xt=At=0;try{!function(){Ot(),++xt;for(var t,n=mt;n;)(t=Et-n._time)>=0&&n._call.call(null,t),n=n._next;--xt}()}finally{xt=0,function(){var t,n,e=mt,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:mt=n);wt=t,Rt(r)}(),Et=0}}function Xt(){var t=St.now(),n=t-kt;n>1e3&&(Mt-=n,kt=t)}function Rt(t){xt||(At&&(At=clearTimeout(At)),t-Et>24?(t<1/0&&(At=setTimeout(Tt,t-St.now()-Mt)),Nt&&(Nt=clearInterval(Nt))):(Nt||(kt=St.now(),Nt=setInterval(Xt,1e3)),xt=1,Pt(Tt)))}qt.prototype=Ct.prototype={constructor:qt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Ot():+e)+(null==n?0:+n),this._next||wt===this||(wt?wt._next=this:mt=this,wt=this),this._call=t,this._time=e,Rt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rt())}};var It=function(t,n,e){var r=new qt;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Lt=bt("start","end","cancel","interrupt"),Dt=[],Ht=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var l,c,f,h;if(1!==e.state)return a();for(l in i)if((h=i[l]).name===e.name){if(3===h.state)return It(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[l]):+l<n&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[l])}if(It((function(){3===e.state&&(e.state=4,e.timer.restart(u,e.delay,e.time),u(s))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(f=e.tween.length),l=0,c=-1;l<f;++l)(h=e.tween[l].value.call(t,t.__data__,e.index,e.group))&&(r[++c]=h);r.length=c+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=5,1),o=-1,u=r.length;++o<u;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Ct((function(t){e.state=1,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:Lt,tween:Dt,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function Yt(t,n){var e=Bt(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function $t(t,n){var e=Bt(t,n);if(e.state>3)throw new Error("too late; already running");return e}function Bt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var Vt,zt,Ut,Ft,Gt=function(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}},Jt=180/Math.PI,Kt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Qt=function(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Jt,skewX:Math.atan(s)*Jt,scaleX:u,scaleY:a}};function Wt(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a=[],s=[];return o=t(o),u=t(u),function(t,r,i,o,u,a){if(t!==i||r!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:Gt(t,i)},{i:s-2,x:Gt(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}(o.translateX,o.translateY,u.translateX,u.translateY,a,s),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Gt(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Gt(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,s),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:Gt(t,e)},{i:a-2,x:Gt(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++e<r;)a[(n=s[e]).i]=n.x(t);return a.join("")}}}var Zt=Wt((function(t){return"none"===t?Kt:(Vt||(Vt=document.createElement("DIV"),zt=document.documentElement,Ut=document.defaultView),Vt.style.transform=t,t=Ut.getComputedStyle(zt.appendChild(Vt),null).getPropertyValue("transform"),zt.removeChild(Vt),t=t.slice(7,-1).split(","),Qt(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),tn=Wt((function(t){return null==t?Kt:(Ft||(Ft=document.createElementNS("http://www.w3.org/2000/svg","g")),Ft.setAttribute("transform",t),(t=Ft.transform.baseVal.consolidate())?(t=t.matrix,Qt(t.a,t.b,t.c,t.d,t.e,t.f)):Kt)}),", ",")",")");function nn(t,n){var e,r;return function(){var i=$t(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}function en(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=$t(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}}function rn(t,n,e){var r=t._id;return t.each((function(){var t=$t(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Bt(t,r).value[n]}}var on=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function un(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function an(){}var sn="\\s*([+-]?\\d+)\\s*",ln="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fn=/^#([0-9a-f]{3,8})$/,hn=new RegExp("^rgb\\("+[sn,sn,sn]+"\\)$"),pn=new RegExp("^rgb\\("+[cn,cn,cn]+"\\)$"),dn=new RegExp("^rgba\\("+[sn,sn,sn,ln]+"\\)$"),vn=new RegExp("^rgba\\("+[cn,cn,cn,ln]+"\\)$"),yn=new RegExp("^hsl\\("+[ln,cn,cn]+"\\)$"),gn=new RegExp("^hsla\\("+[ln,cn,cn,ln]+"\\)$"),_n={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function mn(){return this.rgb().formatHex()}function wn(){return this.rgb().formatRgb()}function bn(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=fn.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?xn(n):3===e?new En(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new En(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new En(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=hn.exec(t))?new En(n[1],n[2],n[3],1):(n=pn.exec(t))?new En(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=dn.exec(t))?An(n[1],n[2],n[3],n[4]):(n=vn.exec(t))?An(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=yn.exec(t))?On(n[1],n[2]/100,n[3]/100,1):(n=gn.exec(t))?On(n[1],n[2]/100,n[3]/100,n[4]):_n.hasOwnProperty(t)?xn(_n[t]):"transparent"===t?new En(NaN,NaN,NaN,0):null}function xn(t){return new En(t>>16&255,t>>8&255,255&t,1)}function An(t,n,e,r){return r<=0&&(t=n=e=NaN),new En(t,n,e,r)}function Nn(t){return t instanceof an||(t=bn(t)),t?new En((t=t.rgb()).r,t.g,t.b,t.opacity):new En}function kn(t,n,e,r){return 1===arguments.length?Nn(t):new En(t,n,e,null==r?1:r)}function En(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Mn(){return"#"+Pn(this.r)+Pn(this.g)+Pn(this.b)}function Sn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Pn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function On(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new qn(t,n,e,r)}function jn(t){if(t instanceof qn)return new qn(t.h,t.s,t.l,t.opacity);if(t instanceof an||(t=bn(t)),!t)return new qn;if(t instanceof qn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=s<.5?o+i:2-o-i,u*=60):a=s>0&&s<1?0:u,new qn(u,a,s,t.opacity)}function qn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Cn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Tn(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}on(an,bn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:mn,formatHex:mn,formatHsl:function(){return jn(this).formatHsl()},formatRgb:wn,toString:wn}),on(En,kn,un(an,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new En(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new En(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Mn,formatHex:Mn,formatRgb:Sn,toString:Sn})),on(qn,(function(t,n,e,r){return 1===arguments.length?jn(t):new qn(t,n,e,null==r?1:r)}),un(an,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new qn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new qn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new En(Cn(t>=240?t-240:t+120,i,r),Cn(t,i,r),Cn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Xn=function(t){return function(){return t}};function Rn(t,n){return function(e){return t+e*n}}function In(t){return 1==(t=+t)?Ln:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Xn(isNaN(n)?e:n)}}function Ln(t,n){var e=n-t;return e?Rn(t,e):Xn(isNaN(t)?n:t)}var Dn=function t(n){var e=In(n);function r(t,n){var r=e((t=kn(t)).r,(n=kn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=Ln(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function Hn(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;e<i;++e)r=kn(n[e]),o[e]=r.r||0,u[e]=r.g||0,a[e]=r.b||0;return o=t(o),u=t(u),a=t(a),r.opacity=1,function(t){return r.r=o(t),r.g=u(t),r.b=a(t),r+""}}}Hn((function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r<n-1?t[r+2]:2*o-i;return Tn((e-r/n)*n,u,i,o,a)}})),Hn((function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],u=t[(r+1)%n],a=t[(r+2)%n];return Tn((e-r/n)*n,i,o,u,a)}}));var Yn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$n=new RegExp(Yn.source,"g");var Bn=function(t,n){var e,r,i,o=Yn.lastIndex=$n.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=Yn.exec(t))&&(r=$n.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,s.push({i:u,x:Gt(e,r)})),o=$n.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)a[(e=s[r]).i]=e.x(t);return a.join("")})},Vn=function(t,n){var e;return("number"==typeof n?Gt:n instanceof bn?Dn:(e=bn(n))?(n=e,Dn):Bn)(t,n)};function zn(t){return function(){this.removeAttribute(t)}}function Un(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fn(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}}function Gn(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}function Jn(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}}function Kn(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}function Qn(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Wn(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function Zn(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Wn(t,i)),e}return i._value=n,i}function te(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Qn(t,i)),e}return i._value=n,i}function ne(t,n){return function(){Yt(this,t).delay=+n.apply(this,arguments)}}function ee(t,n){return n=+n,function(){Yt(this,t).delay=n}}function re(t,n){return function(){$t(this,t).duration=+n.apply(this,arguments)}}function ie(t,n){return n=+n,function(){$t(this,t).duration=n}}function oe(t,n){if("function"!=typeof n)throw new Error;return function(){$t(this,t).ease=n}}function ue(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Yt:$t;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var ae=ht.prototype.constructor;function se(t){return function(){this.style.removeProperty(t)}}function le(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function ce(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&le(t,o,e)),r}return o._value=n,o}function fe(t){return function(n){this.textContent=t.call(this,n)}}function he(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&fe(r)),n}return r._value=t,r}var pe=0;function de(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function ve(){return++pe}var ye=ht.prototype;de.prototype=function(t){return ht().transition(t)}.prototype={constructor:de,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=i(t));for(var r=this._groups,o=r.length,u=new Array(o),a=0;a<o;++a)for(var s,l,c=r[a],f=c.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=c[p])&&(l=t.call(s,s.__data__,p,c))&&("__data__"in s&&(l.__data__=s.__data__),h[p]=l,Ht(h[p],n,e,p,h,Bt(s,e)));return new de(u,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,c=r[s],f=c.length,h=0;h<f;++h)if(l=c[h]){for(var p,d=t.call(l,l.__data__,h,c),v=Bt(l,e),y=0,g=d.length;y<g;++y)(p=d[y])&&Ht(p,n,e,y,d,v);o.push(d),a.push(l)}return new de(o,a,n,e)},filter:function(t){"function"!=typeof t&&(t=a(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],s=u.length,l=r[i]=[],c=0;c<s;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&l.push(o);return new de(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new de(u,this._parents,this._name,this._id)},selection:function(){return new ae(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=ve(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)if(u=a[l]){var c=Bt(u,n);Ht(u,t,e,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new de(r,this._parents,t,e)},call:ye.call,nodes:ye.nodes,node:ye.node,size:ye.size,empty:ye.empty,each:ye.each,on:function(t,n){var e=this._id;return arguments.length<2?Bt(this.node(),e).on.on(t):this.each(ue(e,t,n))},attr:function(t,n){var e=v(t),r="transform"===e?tn:Vn;return this.attrTween(t,"function"==typeof n?(e.local?Kn:Jn)(e,r,rn(this,"attr."+t,n)):null==n?(e.local?Un:zn)(e):(e.local?Gn:Fn)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=v(t);return this.tween(e,(r.local?Zn:te)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Zt:Vn;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=E(this,t),u=(this.style.removeProperty(t),E(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,se(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var u=E(this,t),a=e(this),s=a+"";return null==a&&(this.style.removeProperty(t),s=a=E(this,t)),u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a))}}(t,r,rn(this,"style."+t,n))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=$t(this,t),l=s.on,c=null==s.value[u]?o||(o=se(n)):void 0;l===e&&i===c||(r=(e=l).copy()).on(a,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var u=E(this,t);return u===o?null:u===r?i:i=n(r=u,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,ce(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(rn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,he(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Bt(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?nn:en)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?ne:ee)(n,t)):Bt(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?re:ie)(n,t)):Bt(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(oe(n,t)):Bt(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,u){var a={value:u},s={value:function(){0==--i&&o()}};e.each((function(){var e=$t(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),e.on=n}))}))}};var ge={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function _e(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return ge.time=Ot(),ge;return e}ht.prototype.interrupt=function(t){return this.each((function(){!function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}}(this,t)}))},ht.prototype.transition=function(t){var n,e;t instanceof de?(n=t._id,t=t._name):(n=ve(),(e=ge).time=Ot(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)(u=a[l])&&Ht(u,t,n,l,a,e||_e(u,n));return new de(r,this._parents,t,n)};function me(t){return t.data.name}function we(){var t,n="string"==typeof(t="body")?new ct([[document.querySelector(t)]],[document.documentElement]):new ct([[t]],lt),e=null,r=me;function i(){e=n.append("div").style("display","none").style("position","absolute").style("opacity",0).style("pointer-events","none").attr("class","d3-flame-graph-tip")}return i.show=function(t){return e.style("display","block").transition().duration(200).style("opacity",1).style("pointer-events","all"),e.html(r(t)).style("left",event.pageX+"px").style("top",event.pageY+"px"),i},i.hide=function(){return e.style("display","none").transition().duration(200).style("opacity",0).style("pointer-events","none"),i},i.html=function(t){return arguments.length?(r=t,i):r},i}}})}));
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((t=t||self).d3=t.d3||{},t.d3.flamegraph=t.d3.flamegraph||{},t.d3.flamegraph.tooltip={}))}(this,(function(t){"use strict";var n="http://www.w3.org/1999/xhtml",e={svg:"http://www.w3.org/2000/svg",xhtml:n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function r(t){var n=t+="",r=n.indexOf(":");return r>=0&&"xmlns"!==(n=t.slice(0,r))&&(t=t.slice(r+1)),e.hasOwnProperty(n)?{space:e[n],local:t}:t}function i(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===n&&e.documentElement.namespaceURI===n?e.createElement(t):e.createElementNS(r,t)}}function o(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function u(t){var n=r(t);return(n.local?o:i)(n)}function a(){}function s(t){return null==t?a:function(){return this.querySelector(t)}}function l(){return[]}function c(t){return null==t?l:function(){return this.querySelectorAll(t)}}function h(t){return function(){return this.matches(t)}}function f(t){return new Array(t.length)}function p(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}p.prototype={constructor:p,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var d="$";function y(t,n,e,r,i,o){for(var u,a=0,s=n.length,l=o.length;a<l;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new p(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function v(t,n,e,r,i,o,u){var a,s,l,c={},h=n.length,f=o.length,y=new Array(h);for(a=0;a<h;++a)(s=n[a])&&(y[a]=l=d+u.call(s,s.__data__,a,n),l in c?i[a]=s:c[l]=s);for(a=0;a<f;++a)(s=c[l=d+u.call(t,o[a],a,o)])?(r[a]=s,s.__data__=o[a],c[l]=null):e[a]=new p(t,o[a]);for(a=0;a<h;++a)(s=n[a])&&c[y[a]]===s&&(i[a]=s)}function _(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function g(t){return function(){this.removeAttribute(t)}}function m(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w(t,n){return function(){this.setAttribute(t,n)}}function b(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function x(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function N(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function A(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function k(t){return function(){this.style.removeProperty(t)}}function E(t,n,e){return function(){this.style.setProperty(t,n,e)}}function M(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function S(t,n){return t.style.getPropertyValue(n)||A(t).getComputedStyle(t,null).getPropertyValue(n)}function P(t){return function(){delete this[t]}}function q(t,n){return function(){this[t]=n}}function C(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function O(t){return t.trim().split(/^|\s+/)}function T(t){return t.classList||new X(t)}function X(t){this._node=t,this._names=O(t.getAttribute("class")||"")}function R(t,n){for(var e=T(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function j(t,n){for(var e=T(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function I(t){return function(){R(this,t)}}function L(t){return function(){j(this,t)}}function D(t,n){return function(){(n.apply(this,arguments)?R:j)(this,t)}}function H(){this.textContent=""}function Y(t){return function(){this.textContent=t}}function B(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function V(){this.innerHTML=""}function $(t){return function(){this.innerHTML=t}}function z(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function U(){this.nextSibling&&this.parentNode.appendChild(this)}function F(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function G(){return null}function J(){var t=this.parentNode;t&&t.removeChild(this)}function K(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function Q(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}X.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var W={};"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(W={mouseenter:"mouseover",mouseleave:"mouseout"}));function Z(t,n,e){return t=tt(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function tt(t,n,e){return function(r){try{t.call(this,this.__data__,n,e)}finally{}}}function nt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function et(t,n,e){var r=W.hasOwnProperty(t.type)?Z:tt;return function(i,o,u){var a,s=this.__on,l=r(n,o,u);if(s)for(var c=0,h=s.length;c<h;++c)if((a=s[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=l,a.capture=e),void(a.value=n);this.addEventListener(t.type,l,e),a={type:t.type,name:t.name,value:n,listener:l,capture:e},s?s.push(a):this.__on=[a]}}function rt(t,n,e){var r=A(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function it(t,n){return function(){return rt(this,t,n)}}function ot(t,n){return function(){return rt(this,t,n.apply(this,arguments))}}var ut=[null];function at(t,n){this._groups=t,this._parents=n}function st(){return new at([[document.documentElement]],ut)}at.prototype=st.prototype={constructor:at,select:function(t){"function"!=typeof t&&(t=s(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],l=a.length,c=r[i]=new Array(l),h=0;h<l;++h)(o=a[h])&&(u=t.call(o,o.__data__,h,a))&&("__data__"in o&&(u.__data__=o.__data__),c[h]=u);return new at(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new at(r,i)},filter:function(t){"function"!=typeof t&&(t=h(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new at(r,this._parents)},data:function(t,n){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var e,r=n?v:y,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),s=new Array(u),l=new Array(u),c=0;c<u;++c){var h=i[c],f=o[c],p=f.length,d=t.call(h,h&&h.__data__,c,i),_=d.length,g=s[c]=new Array(_),m=a[c]=new Array(_);r(h,f,g,m,l[c]=new Array(p),d,n);for(var w,b,x=0,N=0;x<_;++x)if(w=g[x]){for(x>=N&&(N=x+1);!(b=m[N])&&++N<_;);w._next=b||null}}return(a=new at(a,i))._enter=s,a._exit=l,a},enter:function(){return new at(this._enter||this._groups.map(f),this._parents)},exit:function(){return new at(this._exit||this._groups.map(f),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],h=l.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=l[p]||c[p])&&(f[p]=s);for(;a<r;++a)u[a]=n[a];return new at(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=_);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,l=i[o]=new Array(s),c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(n)}return new at(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=r(t);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((null==n?e.local?m:g:"function"==typeof n?e.local?N:x:e.local?b:w)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?k:"function"==typeof n?M:E)(t,n,null==e?"":e)):S(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?P:"function"==typeof n?C:q)(t,n)):this.node()[t]},classed:function(t,n){var e=O(t+"");if(arguments.length<2){for(var r=T(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?D:n?I:L)(e,n))},text:function(t){return arguments.length?this.each(null==t?H:("function"==typeof t?B:Y)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?V:("function"==typeof t?z:$)(t)):this.node().innerHTML},raise:function(){return this.each(U)},lower:function(){return this.each(F)},append:function(t){var n="function"==typeof t?t:u(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:u(t),r=null==n?G:"function"==typeof n?n:s(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(J)},clone:function(t){return this.select(t?Q:K)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?et:nt,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var s,l=0,c=a.length;l<c;++l)for(r=0,s=a[l];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?ot:it)(t,n))}};var lt={value:function(){}};function ct(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ht(r)}function ht(t){this._=t}function ft(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function pt(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function dt(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=lt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}ht.prototype=ct.prototype={constructor:ht,on:function(t,n){var e,r=this._,i=ft(t+"",r),o=-1,u=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=dt(r[e],t.name,n);else if(null==n)for(e in r)r[e]=dt(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=pt(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new ht(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var yt,vt,_t=0,gt=0,mt=0,wt=1e3,bt=0,xt=0,Nt=0,At="object"==typeof performance&&performance.now?performance:Date,kt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Et(){return xt||(kt(Mt),xt=At.now()+Nt)}function Mt(){xt=0}function St(){this._call=this._time=this._next=null}function Pt(t,n,e){var r=new St;return r.restart(t,n,e),r}function qt(){xt=(bt=At.now())+Nt,_t=gt=0;try{!function(){Et(),++_t;for(var t,n=yt;n;)(t=xt-n._time)>=0&&n._call.call(null,t),n=n._next;--_t}()}finally{_t=0,function(){var t,n,e=yt,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:yt=n);vt=t,Ot(r)}(),xt=0}}function Ct(){var t=At.now(),n=t-bt;n>wt&&(Nt-=n,bt=t)}function Ot(t){_t||(gt&&(gt=clearTimeout(gt)),t-xt>24?(t<1/0&&(gt=setTimeout(qt,t-At.now()-Nt)),mt&&(mt=clearInterval(mt))):(mt||(bt=At.now(),mt=setInterval(Ct,wt)),_t=1,kt(qt)))}function Tt(t,n,e){var r=new St;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r}St.prototype=Pt.prototype={constructor:St,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Et():+e)+(null==n?0:+n),this._next||vt===this||(vt?vt._next=this:yt=this,vt=this),this._call=t,this._time=e,Ot()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ot())}};var Xt=ct("start","end","cancel","interrupt"),Rt=[],jt=0,It=1,Lt=2,Dt=3,Ht=4,Yt=5,Bt=6;function Vt(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var l,c,h,f;if(e.state!==It)return a();for(l in i)if((f=i[l]).name===e.name){if(f.state===Dt)return Tt(o);f.state===Ht?(f.state=Bt,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<n&&(f.state=Bt,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(Tt((function(){e.state===Dt&&(e.state=Ht,e.timer.restart(u,e.delay,e.time),u(s))})),e.state=Lt,e.on.call("start",t,t.__data__,e.index,e.group),e.state===Lt){for(e.state=Dt,r=new Array(h=e.tween.length),l=0,c=-1;l<h;++l)(f=e.tween[l].value.call(t,t.__data__,e.index,e.group))&&(r[++c]=f);r.length=c+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=Yt,1),o=-1,u=r.length;++o<u;)r[o].call(t,i);e.state===Yt&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=Bt,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Pt((function(t){e.state=It,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:Xt,tween:Rt,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:jt})}function $t(t,n){var e=Ut(t,n);if(e.state>jt)throw new Error("too late; already scheduled");return e}function zt(t,n){var e=Ut(t,n);if(e.state>Dt)throw new Error("too late; already running");return e}function Ut(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Ft(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Gt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Jt(){}var Kt="\\s*([+-]?\\d+)\\s*",Qt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zt=/^#([0-9a-f]{3,8})$/,tn=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),nn=new RegExp("^rgb\\("+[Wt,Wt,Wt]+"\\)$"),en=new RegExp("^rgba\\("+[Kt,Kt,Kt,Qt]+"\\)$"),rn=new RegExp("^rgba\\("+[Wt,Wt,Wt,Qt]+"\\)$"),on=new RegExp("^hsl\\("+[Qt,Wt,Wt]+"\\)$"),un=new RegExp("^hsla\\("+[Qt,Wt,Wt,Qt]+"\\)$"),an={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function sn(){return this.rgb().formatHex()}function ln(){return this.rgb().formatRgb()}function cn(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Zt.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?hn(n):3===e?new dn(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new dn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new dn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=tn.exec(t))?new dn(n[1],n[2],n[3],1):(n=nn.exec(t))?new dn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=en.exec(t))?fn(n[1],n[2],n[3],n[4]):(n=rn.exec(t))?fn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=on.exec(t))?gn(n[1],n[2]/100,n[3]/100,1):(n=un.exec(t))?gn(n[1],n[2]/100,n[3]/100,n[4]):an.hasOwnProperty(t)?hn(an[t]):"transparent"===t?new dn(NaN,NaN,NaN,0):null}function hn(t){return new dn(t>>16&255,t>>8&255,255&t,1)}function fn(t,n,e,r){return r<=0&&(t=n=e=NaN),new dn(t,n,e,r)}function pn(t,n,e,r){return 1===arguments.length?((i=t)instanceof Jt||(i=cn(i)),i?new dn((i=i.rgb()).r,i.g,i.b,i.opacity):new dn):new dn(t,n,e,null==r?1:r);var i}function dn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function yn(){return"#"+_n(this.r)+_n(this.g)+_n(this.b)}function vn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function _n(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function gn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new wn(t,n,e,r)}function mn(t){if(t instanceof wn)return new wn(t.h,t.s,t.l,t.opacity);if(t instanceof Jt||(t=cn(t)),!t)return new wn;if(t instanceof wn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=s<.5?o+i:2-o-i,u*=60):a=s>0&&s<1?0:u,new wn(u,a,s,t.opacity)}function wn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function bn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function xn(t){return function(){return t}}function Nn(t){return 1==(t=+t)?An:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):xn(isNaN(n)?e:n)}}function An(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):xn(isNaN(t)?n:t)}Ft(Jt,cn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:sn,formatHex:sn,formatHsl:function(){return mn(this).formatHsl()},formatRgb:ln,toString:ln}),Ft(dn,pn,Gt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new dn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new dn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:yn,formatHex:yn,formatRgb:vn,toString:vn})),Ft(wn,(function(t,n,e,r){return 1===arguments.length?mn(t):new wn(t,n,e,null==r?1:r)}),Gt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new wn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new dn(bn(t>=240?t-240:t+120,i,r),bn(t,i,r),bn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var kn=function t(n){var e=Nn(n);function r(t,n){var r=e((t=pn(t)).r,(n=pn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=An(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function En(t,n){return n-=t=+t,function(e){return t+n*e}}var Mn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sn=new RegExp(Mn.source,"g");function Pn(t,n){var e,r,i,o=Mn.lastIndex=Sn.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=Mn.exec(t))&&(r=Sn.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,s.push({i:u,x:En(e,r)})),o=Sn.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)a[(e=s[r]).i]=e.x(t);return a.join("")})}var qn,Cn,On,Tn,Xn=180/Math.PI,Rn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jn(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Xn,skewX:Math.atan(s)*Xn,scaleX:u,scaleY:a}}function In(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a=[],s=[];return o=t(o),u=t(u),function(t,r,i,o,u,a){if(t!==i||r!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:En(t,i)},{i:s-2,x:En(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}(o.translateX,o.translateY,u.translateX,u.translateY,a,s),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:En(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:En(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,s),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:En(t,e)},{i:a-2,x:En(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++e<r;)a[(n=s[e]).i]=n.x(t);return a.join("")}}}var Ln=In((function(t){return"none"===t?Rn:(qn||(qn=document.createElement("DIV"),Cn=document.documentElement,On=document.defaultView),qn.style.transform=t,t=On.getComputedStyle(Cn.appendChild(qn),null).getPropertyValue("transform"),Cn.removeChild(qn),jn(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Dn=In((function(t){return null==t?Rn:(Tn||(Tn=document.createElementNS("http://www.w3.org/2000/svg","g")),Tn.setAttribute("transform",t),(t=Tn.transform.baseVal.consolidate())?jn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Rn)}),", ",")",")");function Hn(t,n){var e,r;return function(){var i=zt(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}function Yn(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=zt(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}}function Bn(t,n,e){var r=t._id;return t.each((function(){var t=zt(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Ut(t,r).value[n]}}function Vn(t,n){var e;return("number"==typeof n?En:n instanceof cn?kn:(e=cn(n))?(n=e,kn):Pn)(t,n)}function $n(t){return function(){this.removeAttribute(t)}}function zn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Un(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}}function Fn(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}function Gn(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}}function Jn(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}function Kn(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n(e))}}(t,i)),e}return i._value=n,i}function Qn(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n(e))}}(t,i)),e}return i._value=n,i}function Wn(t,n){return function(){$t(this,t).delay=+n.apply(this,arguments)}}function Zn(t,n){return n=+n,function(){$t(this,t).delay=n}}function te(t,n){return function(){zt(this,t).duration=+n.apply(this,arguments)}}function ne(t,n){return n=+n,function(){zt(this,t).duration=n}}var ee=st.prototype.constructor;function re(t){return function(){this.style.removeProperty(t)}}var ie=0;function oe(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function ue(){return++ie}var ae=st.prototype;oe.prototype=function(t){return st().transition(t)}.prototype={constructor:oe,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=s(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a,l,c=r[u],h=c.length,f=o[u]=new Array(h),p=0;p<h;++p)(a=c[p])&&(l=t.call(a,a.__data__,p,c))&&("__data__"in a&&(l.__data__=a.__data__),f[p]=l,Vt(f[p],n,e,p,f,Ut(a,e)));return new oe(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=c(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var s,l=r[a],h=l.length,f=0;f<h;++f)if(s=l[f]){for(var p,d=t.call(s,s.__data__,f,l),y=Ut(s,e),v=0,_=d.length;v<_;++v)(p=d[v])&&Vt(p,n,e,v,d,y);o.push(d),u.push(s)}return new oe(o,u,n,e)},filter:function(t){"function"!=typeof t&&(t=h(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new oe(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],h=l.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=l[p]||c[p])&&(f[p]=s);for(;a<r;++a)u[a]=n[a];return new oe(u,this._parents,this._name,this._id)},selection:function(){return new ee(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=ue(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)if(u=a[l]){var c=Ut(u,n);Vt(u,t,e,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new oe(r,this._parents,t,e)},call:ae.call,nodes:ae.nodes,node:ae.node,size:ae.size,empty:ae.empty,each:ae.each,on:function(t,n){var e=this._id;return arguments.length<2?Ut(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?$t:zt;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,n){var e=r(t),i="transform"===e?Dn:Vn;return this.attrTween(t,"function"==typeof n?(e.local?Jn:Gn)(e,i,Bn(this,"attr."+t,n)):null==n?(e.local?zn:$n)(e):(e.local?Fn:Un)(e,i,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=r(t);return this.tween(e,(i.local?Kn:Qn)(i,n))},style:function(t,n,e){var r="transform"==(t+="")?Ln:Vn;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=S(this,t),u=(this.style.removeProperty(t),S(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,re(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var u=S(this,t),a=e(this),s=a+"";return null==a&&(this.style.removeProperty(t),s=a=S(this,t)),u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a))}}(t,r,Bn(this,"style."+t,n))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=zt(this,t),l=s.on,c=null==s.value[u]?o||(o=re(n)):void 0;l===e&&i===c||(r=(e=l).copy()).on(a,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var u=S(this,t);return u===o?null:u===r?i:i=n(r=u,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n(r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Bn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Ut(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?Hn:Yn)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Wn:Zn)(n,t)):Ut(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?te:ne)(n,t)):Ut(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){zt(this,t).ease=n}}(n,t)):Ut(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,u){var a={value:u},s={value:function(){0==--i&&o()}};e.each((function(){var e=zt(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),e.on=n}))}))}};var se={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function le(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return se.time=Et(),se;return e}function ce(t){return t.data.name}st.prototype.interrupt=function(t){return this.each((function(){!function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>Lt&&e.state<Yt,e.state=Bt,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}}(this,t)}))},st.prototype.transition=function(t){var n,e;t instanceof oe?(n=t._id,t=t._name):(n=ue(),(e=se).time=Et(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)(u=a[l])&&Vt(u,t,n,l,a,e||le(u,n));return new oe(r,this._parents,t,n)},t.defaultFlamegraphTooltip=function(){var t=function(t){return"string"==typeof t?new at([[document.querySelector(t)]],[document.documentElement]):new at([[t]],ut)}("body"),n=null,e=ce;function r(){n=t.append("div").style("display","none").style("position","absolute").style("opacity",0).style("pointer-events","none").attr("class","d3-flame-graph-tip")}return r.show=function(t){return n.style("display","block").transition().duration(200).style("opacity",1).style("pointer-events","all"),n.html(e(t)).style("left",event.pageX+"px").style("top",event.pageY+"px"),r},r.hide=function(){return n.style("display","none").transition().duration(200).style("opacity",0).style("pointer-events","none"),r},r.html=function(t){return arguments.length?(e=t,r):e},r},Object.defineProperty(t,"__esModule",{value:!0})}));

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.flamegraph=n():t.flamegraph=n()}(d3,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=8)}({8:function(t,n,e){"use strict";function r(){}e.r(n);var i=function(t){return null==t?r:function(){return this.querySelector(t)}};function o(){return[]}var a=function(t){return null==t?o:function(){return this.querySelectorAll(t)}},u=function(t){return function(){return this.matches(t)}},l=function(t){return new Array(t.length)};function c(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}c.prototype={constructor:c,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function s(t,n,e,r,i,o){for(var a,u=0,l=n.length,s=o.length;u<s;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new c(t,o[u]);for(;u<l;++u)(a=n[u])&&(i[u]=a)}function h(t,n,e,r,i,o,a){var u,l,s,h={},f=n.length,p=o.length,d=new Array(f);for(u=0;u<f;++u)(l=n[u])&&(d[u]=s="$"+a.call(l,l.__data__,u,n),s in h?i[u]=l:h[s]=l);for(u=0;u<p;++u)(l=h[s="$"+a.call(t,o[u],u,o)])?(r[u]=l,l.__data__=o[u],h[s]=null):e[u]=new c(t,o[u]);for(u=0;u<f;++u)(l=n[u])&&h[d[u]]===l&&(i[u]=l)}function f(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var p="http://www.w3.org/1999/xhtml",d={svg:"http://www.w3.org/2000/svg",xhtml:p,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},v=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),d.hasOwnProperty(n)?{space:d[n],local:t}:t};function g(t){return function(){this.removeAttribute(t)}}function m(t){return function(){this.removeAttributeNS(t.space,t.local)}}function y(t,n){return function(){this.setAttribute(t,n)}}function w(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function _(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function b(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}var x=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function M(t){return function(){this.style.removeProperty(t)}}function A(t,n,e){return function(){this.style.setProperty(t,n,e)}}function N(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function k(t,n){return t.style.getPropertyValue(n)||x(t).getComputedStyle(t,null).getPropertyValue(n)}function E(t){return function(){delete this[t]}}function S(t,n){return function(){this[t]=n}}function j(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function P(t){return t.trim().split(/^|\s+/)}function O(t){return t.classList||new C(t)}function C(t){this._node=t,this._names=P(t.getAttribute("class")||"")}function T(t,n){for(var e=O(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function q(t,n){for(var e=O(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function H(t){return function(){T(this,t)}}function L(t){return function(){q(this,t)}}function D(t,n){return function(){(n.apply(this,arguments)?T:q)(this,t)}}C.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function X(){this.textContent=""}function z(t){return function(){this.textContent=t}}function B(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function R(){this.innerHTML=""}function $(t){return function(){this.innerHTML=t}}function I(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function V(){this.nextSibling&&this.parentNode.appendChild(this)}function Y(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function F(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===p&&n.documentElement.namespaceURI===p?n.createElement(t):n.createElementNS(e,t)}}function U(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var Z=function(t){var n=v(t);return(n.local?U:F)(n)};function G(){return null}function J(){var t=this.parentNode;t&&t.removeChild(this)}function K(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Q(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var W={},tt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(W={mouseenter:"mouseover",mouseleave:"mouseout"}));function nt(t,n,e){return t=et(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function et(t,n,e){return function(r){var i=tt;tt=r;try{t.call(this,this.__data__,n,e)}finally{tt=i}}}function rt(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function it(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function ot(t,n,e){var r=W.hasOwnProperty(t.type)?nt:et;return function(i,o,a){var u,l=this.__on,c=r(n,o,a);if(l)for(var s=0,h=l.length;s<h;++s)if((u=l[s]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=e),void(u.value=n);this.addEventListener(t.type,c,e),u={type:t.type,name:t.name,value:n,listener:c,capture:e},l?l.push(u):this.__on=[u]}}function at(t,n,e){var r=x(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function ut(t,n){return function(){return at(this,t,n)}}function lt(t,n){return function(){return at(this,t,n.apply(this,arguments))}}var ct=[null];function st(t,n){this._groups=t,this._parents=n}function ht(){return new st([[document.documentElement]],ct)}st.prototype=ht.prototype={constructor:st,select:function(t){"function"!=typeof t&&(t=i(t));for(var n=this._groups,e=n.length,r=new Array(e),o=0;o<e;++o)for(var a,u,l=n[o],c=l.length,s=r[o]=new Array(c),h=0;h<c;++h)(a=l[h])&&(u=t.call(a,a.__data__,h,l))&&("__data__"in a&&(u.__data__=a.__data__),s[h]=u);return new st(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=a(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,l=n[o],c=l.length,s=0;s<c;++s)(u=l[s])&&(r.push(t.call(u,u.__data__,s,l)),i.push(u));return new st(r,i)},filter:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],l=a.length,c=r[i]=[],s=0;s<l;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&c.push(o);return new st(r,this._parents)},data:function(t,n){if(!t)return g=new Array(this.size()),f=-1,this.each((function(t){g[++f]=t})),g;var e,r=n?h:s,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var a=o.length,u=new Array(a),l=new Array(a),c=new Array(a),f=0;f<a;++f){var p=i[f],d=o[f],v=d.length,g=t.call(p,p&&p.__data__,f,i),m=g.length,y=l[f]=new Array(m),w=u[f]=new Array(m);r(p,d,y,w,c[f]=new Array(v),g,n);for(var _,b,x=0,M=0;x<m;++x)if(_=y[x]){for(x>=M&&(M=x+1);!(b=w[M])&&++M<m;);_._next=b||null}}return(u=new st(u,i))._enter=l,u._exit=c,u},enter:function(){return new st(this._enter||this._groups.map(l),this._parents)},exit:function(){return new st(this._exit||this._groups.map(l),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var l,c=n[u],s=e[u],h=c.length,f=a[u]=new Array(h),p=0;p<h;++p)(l=c[p]||s[p])&&(f[p]=l);for(;u<r;++u)a[u]=n[u];return new st(a,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=f);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],l=u.length,c=i[o]=new Array(l),s=0;s<l;++s)(a=u[s])&&(c[s]=a);c.sort(n)}return new st(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=v(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?m:g:"function"==typeof n?e.local?b:_:e.local?w:y)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?M:"function"==typeof n?N:A)(t,n,null==e?"":e)):k(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?E:"function"==typeof n?j:S)(t,n)):this.node()[t]},classed:function(t,n){var e=P(t+"");if(arguments.length<2){for(var r=O(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?D:n?H:L)(e,n))},text:function(t){return arguments.length?this.each(null==t?X:("function"==typeof t?B:z)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?R:("function"==typeof t?I:$)(t)):this.node().innerHTML},raise:function(){return this.each(V)},lower:function(){return this.each(Y)},append:function(t){var n="function"==typeof t?t:Z(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:Z(t),r=null==n?G:"function"==typeof n?n:i(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(J)},clone:function(t){return this.select(t?Q:K)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=rt(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?ot:it,null==e&&(e=!1),r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var l,c=0,s=u.length;c<s;++c)for(r=0,l=u[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?lt:ut)(t,n))}};var ft=ht,pt=function(t){return"string"==typeof t?new st([[document.querySelector(t)]],[document.documentElement]):new st([[t]],ct)},dt=function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]},vt=function(t){return(t=dt(Math.abs(t)))?t[1]:NaN},gt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mt(t){if(!(n=gt.exec(t)))throw new Error("invalid format: "+t);var n;return new yt({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function yt(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}mt.prototype=yt.prototype,yt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var wt,_t,bt,xt,Mt=function(t,n){var e=dt(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},At={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Mt(100*t,n)},r:Mt,s:function(t,n){var e=dt(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(wt=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+dt(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Nt=function(t){return t},kt=Array.prototype.map,Et=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];_t=function(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Nt:(n=kt.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],l=0;i>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),o.push(t.substring(i-=u,i+u)),!((l+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?Nt:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(kt.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function h(t){var n=(t=mt(t)).fill,e=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,v=t.comma,g=t.precision,m=t.trim,y=t.type;"n"===y?(v=!0,y="g"):At[y]||(void 0===g&&(g=12),m=!0,y="g"),(p||"0"===n&&"="===e)&&(p=!0,n="0",e="=");var w="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===f?o:/[%p]/.test(y)?l:"",b=At[y],x=/[defgprs%]/.test(y);function M(t){var i,o,l,f=w,M=_;if("c"===y)M=b(t)+M,t="";else{var A=(t=+t)<0;if(t=isNaN(t)?s:b(Math.abs(t),g),m&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),A&&0==+t&&(A=!1),f=(A?"("===h?h:c:"-"===h||"("===h?"":h)+f,M=("s"===y?Et[8+wt/3]:"")+M+(A&&"("===h?")":""),x)for(i=-1,o=t.length;++i<o;)if(48>(l=t.charCodeAt(i))||l>57){M=(46===l?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}v&&!p&&(t=r(t,1/0));var N=f.length+t.length+M.length,k=N<d?new Array(d-N+1).join(n):"";switch(v&&p&&(t=r(k+t,k.length?d-M.length:1/0),k=""),e){case"<":t=f+t+M+k;break;case"=":t=f+k+t+M;break;case"^":t=k.slice(0,N=k.length>>1)+f+t+M+k.slice(N);break;default:t=k+f+t+M}return u(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return t+""},M}return{format:h,formatPrefix:function(t,n){var e=h(((t=mt(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(vt(n)/3))),i=Math.pow(10,-r),o=Et[8+r/3];return function(t){return e(i*t)+o}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),bt=_t.format,xt=_t.formatPrefix;var St=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},jt=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Pt=function(){var t=1,n=1,e=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=e,i.x1=t,i.y1=n/o,i.eachBefore(function(t,n){return function(r){r.children&&function(t,n,e,r,i){for(var o,a=t.children,u=-1,l=a.length,c=t.value&&(r-n)/t.value;++u<l;)(o=a[u]).y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*c}(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n);var i=r.x0,o=r.y0,a=r.x1-e,u=r.y1-e;a<i&&(i=a=(i+a)/2),u<o&&(o=u=(o+u)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=u}}(n,o)),r&&i.eachBefore(jt),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(t){return arguments.length?(e=+t,i):e},i};function Ot(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function Ct(t,n){var e,r,i,o,a,u=new Lt(t),l=+t.value&&(u.value=t.value),c=[u];for(null==n&&(n=Tt);e=c.pop();)if(l&&(e.value=+e.data.value),(i=n(e.data))&&(a=i.length))for(e.children=new Array(a),o=a-1;o>=0;--o)c.push(r=e.children[o]=new Lt(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(Ht)}function Tt(t){return t.children}function qt(t){t.data=t.data.data}function Ht(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function Lt(t){this.data=t,this.depth=this.height=0,this.parent=null}Lt.prototype=Ct.prototype={constructor:Lt,count:function(){return this.eachAfter(Ot)},each:function(t){var n,e,r,i,o=this,a=[o];do{for(n=a.reverse(),a=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r<i;++r)a.push(e[r])}while(a.length);return this},eachAfter:function(t){for(var n,e,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return Ct(this).eachBefore(qt)}};var Dt=Math.sqrt(50),Xt=Math.sqrt(10),zt=Math.sqrt(2);function Bt(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Dt?10:o>=Xt?5:o>=zt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Dt?10:o>=Xt?5:o>=zt?2:1)}var Rt,$t,It=(1===(Rt=St).length&&($t=Rt,Rt=function(t,n){return St($t(t),n)}),{left:function(t,n,e,r){for(null==e&&(e=0),null==r&&(r=t.length);e<r;){var i=e+r>>>1;Rt(t[i],n)<0?e=i+1:r=i}return e},right:function(t,n,e,r){for(null==e&&(e=0),null==r&&(r=t.length);e<r;){var i=e+r>>>1;Rt(t[i],n)>0?r=i:e=i+1}return e}}),Vt=It.right,Yt=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function Ft(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Ut(){}var Zt="\\s*([+-]?\\d+)\\s*",Gt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kt=/^#([0-9a-f]{3,8})$/,Qt=new RegExp("^rgb\\("+[Zt,Zt,Zt]+"\\)$"),Wt=new RegExp("^rgb\\("+[Jt,Jt,Jt]+"\\)$"),tn=new RegExp("^rgba\\("+[Zt,Zt,Zt,Gt]+"\\)$"),nn=new RegExp("^rgba\\("+[Jt,Jt,Jt,Gt]+"\\)$"),en=new RegExp("^hsl\\("+[Gt,Jt,Jt]+"\\)$"),rn=new RegExp("^hsla\\("+[Gt,Jt,Jt,Gt]+"\\)$"),on={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function an(){return this.rgb().formatHex()}function un(){return this.rgb().formatRgb()}function ln(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Kt.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?cn(n):3===e?new pn(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new pn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new pn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Qt.exec(t))?new pn(n[1],n[2],n[3],1):(n=Wt.exec(t))?new pn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=tn.exec(t))?sn(n[1],n[2],n[3],n[4]):(n=nn.exec(t))?sn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=en.exec(t))?mn(n[1],n[2]/100,n[3]/100,1):(n=rn.exec(t))?mn(n[1],n[2]/100,n[3]/100,n[4]):on.hasOwnProperty(t)?cn(on[t]):"transparent"===t?new pn(NaN,NaN,NaN,0):null}function cn(t){return new pn(t>>16&255,t>>8&255,255&t,1)}function sn(t,n,e,r){return r<=0&&(t=n=e=NaN),new pn(t,n,e,r)}function hn(t){return t instanceof Ut||(t=ln(t)),t?new pn((t=t.rgb()).r,t.g,t.b,t.opacity):new pn}function fn(t,n,e,r){return 1===arguments.length?hn(t):new pn(t,n,e,null==r?1:r)}function pn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function dn(){return"#"+gn(this.r)+gn(this.g)+gn(this.b)}function vn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function gn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function mn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new wn(t,n,e,r)}function yn(t){if(t instanceof wn)return new wn(t.h,t.s,t.l,t.opacity);if(t instanceof Ut||(t=ln(t)),!t)return new wn;if(t instanceof wn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new wn(a,u,l,t.opacity)}function wn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function _n(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function bn(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}Yt(Ut,ln,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:an,formatHex:an,formatHsl:function(){return yn(this).formatHsl()},formatRgb:un,toString:un}),Yt(pn,fn,Ft(Ut,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new pn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new pn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:dn,formatHex:dn,formatRgb:vn,toString:vn})),Yt(wn,(function(t,n,e,r){return 1===arguments.length?yn(t):new wn(t,n,e,null==r?1:r)}),Ft(Ut,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new wn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new pn(_n(t>=240?t-240:t+120,i,r),_n(t,i,r),_n(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var xn=function(t){return function(){return t}};function Mn(t,n){return function(e){return t+e*n}}function An(t){return 1==(t=+t)?Nn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):xn(isNaN(n)?e:n)}}function Nn(t,n){var e=n-t;return e?Mn(t,e):xn(isNaN(t)?n:t)}var kn=function t(n){var e=An(n);function r(t,n){var r=e((t=fn(t)).r,(n=fn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=Nn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function En(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=fn(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}En((function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return bn((e-r/n)*n,a,i,o,u)}})),En((function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return bn((e-r/n)*n,i,o,a,u)}}));var Sn=function(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e<r;++e)i[e]=t[e]*(1-o)+n[e]*o;return i}};function jn(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Pn(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=Dn(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}var On=function(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}},Cn=function(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}},Tn=function(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=Dn(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}},qn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hn=new RegExp(qn.source,"g");var Ln=function(t,n){var e,r,i,o=qn.lastIndex=Hn.lastIndex=0,a=-1,u=[],l=[];for(t+="",n+="";(e=qn.exec(t))&&(r=Hn.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:Cn(e,r)})),o=Hn.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var e,r=0;r<n;++r)u[(e=l[r]).i]=e.x(t);return u.join("")})},Dn=function(t,n){var e,r=typeof n;return null==n||"boolean"===r?xn(n):("number"===r?Cn:"string"===r?(e=ln(n))?(n=e,kn):Ln:n instanceof ln?kn:n instanceof Date?On:jn(n)?Sn:Array.isArray(n)?Pn:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?Tn:Cn)(t,n)},Xn=function(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}},zn=function(t){return+t},Bn=[0,1];function Rn(t){return t}function $n(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function In(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=$n(i,r),o=e(a,o)):(r=$n(r,i),o=e(o,a)),function(t){return o(r(t))}}function Vn(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)i[a]=$n(t[a],t[a+1]),o[a]=e(n[a],n[a+1]);return function(n){var e=Vt(t,n,1,r)-1;return o[e](i[e](n))}}function Yn(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Fn(){var t,n,e,r,i,o,a=Bn,u=Bn,l=Dn,c=Rn;function s(){var t,n,e,l=Math.min(a.length,u.length);return c!==Rn&&(t=a[0],n=a[l-1],t>n&&(e=t,t=n,n=e),c=function(e){return Math.max(t,Math.min(n,e))}),r=l>2?Vn:In,i=o=null,h}function h(n){return isNaN(n=+n)?e:(i||(i=r(a.map(t),u,l)))(t(c(n)))}return h.invert=function(e){return c(n((o||(o=r(u,a.map(t),Cn)))(e)))},h.domain=function(t){return arguments.length?(a=Array.from(t,zn),s()):a.slice()},h.range=function(t){return arguments.length?(u=Array.from(t),s()):u.slice()},h.rangeRound=function(t){return u=Array.from(t),l=Xn,s()},h.clamp=function(t){return arguments.length?(c=!!t||Rn,s()):c!==Rn},h.interpolate=function(t){return arguments.length?(l=t,s()):l},h.unknown=function(t){return arguments.length?(e=t,h):e},function(e,r){return t=e,n=r,s()}}function Un(){return Fn()(Rn,Rn)}function Zn(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}var Gn=function(t,n,e,r){var i,o=function(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Dt?i*=10:o>=Xt?i*=5:o>=zt&&(i*=2),n<t?-i:i}(t,n,e);switch((r=mt(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vt(n)/3)))-vt(Math.abs(t)))}(o,a))||(r.precision=i),xt(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,vt(n)-vt(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-vt(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return bt(r)};function Jn(t){var n=t.domain;return t.ticks=function(t){var e=n();return function(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=Bt(t,n,e))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),n=Math.floor(n/a),o=new Array(i=Math.ceil(n-t+1));++u<i;)o[u]=(t+u)*a;else for(t=Math.floor(t*a),n=Math.ceil(n*a),o=new Array(i=Math.ceil(t-n+1));++u<i;)o[u]=(t-u)/a;return r&&o.reverse(),o}(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return Gn(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,a=i.length-1,u=i[o],l=i[a];return l<u&&(r=u,u=l,l=r,r=o,o=a,a=r),(r=Bt(u,l,e))>0?r=Bt(u=Math.floor(u/r)*r,l=Math.ceil(l/r)*r,e):r<0&&(r=Bt(u=Math.ceil(u*r)/r,l=Math.floor(l*r)/r,e)),r>0?(i[o]=Math.floor(u/r)*r,i[a]=Math.ceil(l/r)*r,n(i)):r<0&&(i[o]=Math.ceil(u*r)/r,i[a]=Math.floor(l*r)/r,n(i)),t},t}function Kn(){var t=Un();return t.copy=function(){return Yn(t,Kn())},Zn.apply(t,arguments),Jn(t)}function Qn(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Wn={value:function(){}};function te(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ne(r)}function ne(t){this._=t}function ee(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function re(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function ie(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Wn,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}ne.prototype=te.prototype={constructor:ne,on:function(t,n){var e,r=this._,i=ee(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=ie(r[e],t.name,n);else if(null==n)for(e in r)r[e]=ie(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=re(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new ne(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var oe,ae,ue=te,le=0,ce=0,se=0,he=0,fe=0,pe=0,de="object"==typeof performance&&performance.now?performance:Date,ve="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ge(){return fe||(ve(me),fe=de.now()+pe)}function me(){fe=0}function ye(){this._call=this._time=this._next=null}function we(t,n,e){var r=new ye;return r.restart(t,n,e),r}function _e(){fe=(he=de.now())+pe,le=ce=0;try{!function(){ge(),++le;for(var t,n=oe;n;)(t=fe-n._time)>=0&&n._call.call(null,t),n=n._next;--le}()}finally{le=0,function(){var t,n,e=oe,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:oe=n);ae=t,xe(r)}(),fe=0}}function be(){var t=de.now(),n=t-he;n>1e3&&(pe-=n,he=t)}function xe(t){le||(ce&&(ce=clearTimeout(ce)),t-fe>24?(t<1/0&&(ce=setTimeout(_e,t-de.now()-pe)),se&&(se=clearInterval(se))):(se||(he=de.now(),se=setInterval(be,1e3)),le=1,ve(_e)))}ye.prototype=we.prototype={constructor:ye,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?ge():+e)+(null==n?0:+n),this._next||ae===this||(ae?ae._next=this:oe=this,ae=this),this._call=t,this._time=e,xe()},stop:function(){this._call&&(this._call=null,this._time=1/0,xe())}};var Me=function(t,n,e){var r=new ye;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Ae=ue("start","end","cancel","interrupt"),Ne=[],ke=function(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(l){var c,s,h,f;if(1!==e.state)return u();for(c in i)if((f=i[c]).name===e.name){if(3===f.state)return Me(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<n&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(Me((function(){3===e.state&&(e.state=4,e.timer.restart(a,e.delay,e.time),a(l))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(h=e.tween.length),c=0,s=-1;c<h;++c)(f=e.tween[c].value.call(t,t.__data__,e.index,e.group))&&(r[++s]=f);r.length=s+1}}function a(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=we((function(t){e.state=1,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:Ae,tween:Ne,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function Ee(t,n){var e=je(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function Se(t,n){var e=je(t,n);if(e.state>3)throw new Error("too late; already running");return e}function je(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var Pe,Oe,Ce,Te,qe=180/Math.PI,He={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Le=function(t,n,e,r,i,o){var a,u,l;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(l=t*e+n*r)&&(e-=t*l,r-=n*l),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,l/=u),t*r<n*e&&(t=-t,n=-n,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*qe,skewX:Math.atan(l)*qe,scaleX:a,scaleY:u}};function De(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],l=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var l=a.push("translate(",null,n,null,e);u.push({i:l-4,x:Cn(t,i)},{i:l-2,x:Cn(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,u,l),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Cn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,l),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Cn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,l),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Cn(t,e)},{i:u-2,x:Cn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,l),o=a=null,function(t){for(var n,e=-1,r=l.length;++e<r;)u[(n=l[e]).i]=n.x(t);return u.join("")}}}var Xe=De((function(t){return"none"===t?He:(Pe||(Pe=document.createElement("DIV"),Oe=document.documentElement,Ce=document.defaultView),Pe.style.transform=t,t=Ce.getComputedStyle(Oe.appendChild(Pe),null).getPropertyValue("transform"),Oe.removeChild(Pe),t=t.slice(7,-1).split(","),Le(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),ze=De((function(t){return null==t?He:(Te||(Te=document.createElementNS("http://www.w3.org/2000/svg","g")),Te.setAttribute("transform",t),(t=Te.transform.baseVal.consolidate())?(t=t.matrix,Le(t.a,t.b,t.c,t.d,t.e,t.f)):He)}),", ",")",")");function Be(t,n){var e,r;return function(){var i=Se(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}i.tween=r}}function Re(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=Se(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},l=0,c=i.length;l<c;++l)if(i[l].name===n){i[l]=u;break}l===c&&i.push(u)}o.tween=i}}function $e(t,n,e){var r=t._id;return t.each((function(){var t=Se(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return je(t,r).value[n]}}var Ie=function(t,n){var e;return("number"==typeof n?Cn:n instanceof ln?kn:(e=ln(n))?(n=e,kn):Ln)(t,n)};function Ve(t){return function(){this.removeAttribute(t)}}function Ye(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fe(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}}function Ue(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}function Ze(t,n,e){var r,i,o;return function(){var a,u,l=e(this);if(null!=l)return(a=this.getAttribute(t))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,l));this.removeAttribute(t)}}function Ge(t,n,e){var r,i,o;return function(){var a,u,l=e(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,l));this.removeAttributeNS(t.space,t.local)}}function Je(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Ke(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function Qe(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Ke(t,i)),e}return i._value=n,i}function We(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Je(t,i)),e}return i._value=n,i}function tr(t,n){return function(){Ee(this,t).delay=+n.apply(this,arguments)}}function nr(t,n){return n=+n,function(){Ee(this,t).delay=n}}function er(t,n){return function(){Se(this,t).duration=+n.apply(this,arguments)}}function rr(t,n){return n=+n,function(){Se(this,t).duration=n}}function ir(t,n){if("function"!=typeof n)throw new Error;return function(){Se(this,t).ease=n}}function or(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Ee:Se;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}var ar=ft.prototype.constructor;function ur(t){return function(){this.style.removeProperty(t)}}function lr(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function cr(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&lr(t,o,e)),r}return o._value=n,o}function sr(t){return function(n){this.textContent=t.call(this,n)}}function hr(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&sr(r)),n}return r._value=t,r}var fr=0;function pr(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function dr(){return++fr}var vr=ft.prototype;pr.prototype=function(t){return ft().transition(t)}.prototype={constructor:pr,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=i(t));for(var r=this._groups,o=r.length,a=new Array(o),u=0;u<o;++u)for(var l,c,s=r[u],h=s.length,f=a[u]=new Array(h),p=0;p<h;++p)(l=s[p])&&(c=t.call(l,l.__data__,p,s))&&("__data__"in l&&(c.__data__=l.__data__),f[p]=c,ke(f[p],n,e,p,f,je(l,e)));return new pr(a,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=a(t));for(var r=this._groups,i=r.length,o=[],u=[],l=0;l<i;++l)for(var c,s=r[l],h=s.length,f=0;f<h;++f)if(c=s[f]){for(var p,d=t.call(c,c.__data__,f,s),v=je(c,e),g=0,m=d.length;g<m;++g)(p=d[g])&&ke(p,n,e,g,d,v);o.push(d),u.push(c)}return new pr(o,u,n,e)},filter:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],l=a.length,c=r[i]=[],s=0;s<l;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&c.push(o);return new pr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var l,c=n[u],s=e[u],h=c.length,f=a[u]=new Array(h),p=0;p<h;++p)(l=c[p]||s[p])&&(f[p]=l);for(;u<r;++u)a[u]=n[u];return new pr(a,this._parents,this._name,this._id)},selection:function(){return new ar(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=dr(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],l=u.length,c=0;c<l;++c)if(a=u[c]){var s=je(a,n);ke(a,t,e,c,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new pr(r,this._parents,t,e)},call:vr.call,nodes:vr.nodes,node:vr.node,size:vr.size,empty:vr.empty,each:vr.each,on:function(t,n){var e=this._id;return arguments.length<2?je(this.node(),e).on.on(t):this.each(or(e,t,n))},attr:function(t,n){var e=v(t),r="transform"===e?ze:Ie;return this.attrTween(t,"function"==typeof n?(e.local?Ge:Ze)(e,r,$e(this,"attr."+t,n)):null==n?(e.local?Ye:Ve)(e):(e.local?Ue:Fe)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=v(t);return this.tween(e,(r.local?Qe:We)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Xe:Ie;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=k(this,t),a=(this.style.removeProperty(t),k(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,ur(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=k(this,t),u=e(this),l=u+"";return null==u&&(this.style.removeProperty(t),l=u=k(this,t)),a===l?null:a===r&&l===i?o:(i=l,o=n(r=a,u))}}(t,r,$e(this,"style."+t,n))).each(function(t,n){var e,r,i,o,a="style."+n,u="end."+a;return function(){var l=Se(this,t),c=l.on,s=null==l.value[a]?o||(o=ur(n)):void 0;c===e&&i===s||(r=(e=c).copy()).on(u,i=s),l.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var a=k(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,cr(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}($e(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,hr(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=je(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?Be:Re)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?tr:nr)(n,t)):je(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?er:rr)(n,t)):je(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(ir(n,t)):je(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,a){var u={value:a},l={value:function(){0==--i&&o()}};e.each((function(){var e=Se(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(l)),e.on=n}))}))}};var gr={time:null,delay:0,duration:250,ease:Qn};function mr(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return gr.time=ge(),gr;return e}ft.prototype.interrupt=function(t){return this.each((function(){!function(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},ft.prototype.transition=function(t){var n,e;t instanceof pr?(n=t._id,t=t._name):(n=dr(),(e=gr).time=ge(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],l=u.length,c=0;c<l;++c)(a=u[c])&&ke(a,t,n,c,u,e||mr(a,n));return new pr(r,this._parents,t,n)};function yr(t){return t.data.name}n.default=function(){var t=960,n=null,e=18,r=null,i=!0,o="",a=750,u=Qn,l=!1,c=!1,s=null,h=0,f=null,p=!1,d=!1,v=!1,g=0,m=0,y=0,w=!1,_=!1,b=null,x=function(t){return t.data.n||t.data.name},M=function(t){return"v"in t?t.v:t.value},A=function(t){return t.c||t.children},N=function(t){return t.data.l||t.data.libtype},k=function(t){return"d"in t.data?t.data.d:t.data.delta},E=function(){f&&L()},S=E;let j=(t,n)=>{if(!n)return!1;const e=new RegExp(n),r=x(t);return void 0!==r&&r&&r.match(e)};const P=j;var O,C=function(t){f&&(t?f.innerHTML=t:g?L():f.innerHTML="")},T=C,q=function(t){return x(t)+" ("+bt(".3f")(100*(t.x1-t.x0),3)+"%, "+M(t)+" samples)"},H=function(){var t=pt("body"),n=null,e=yr;function r(){n=t.append("div").style("display","none").style("position","absolute").style("opacity",0).style("pointer-events","none").attr("class","d3-flame-graph-tip")}return r.show=function(t){return n.style("display","block").transition().duration(200).style("opacity",1).style("pointer-events","all"),n.html(e(t)).style("left",event.pageX+"px").style("top",event.pageY+"px"),r},r.hide=function(){return n.style("display","none").transition().duration(200).style("opacity",0).style("pointer-events","none"),r},r.html=function(t){return arguments.length?(e=t,r):e},r}().html((function(t){return q(t)}));function L(){f.innerHTML=g+" of "+m+" samples ( "+bt(".3f")(g/m*100,3)+"%)"}var D=function(t){return t.highlight?"#E600E6":function(t,n,e){var r,i,o;if(d)r=220,i=220,o=220,e||(e=0),e>0?(o=Math.round(210*(y-e)/y),i=o):e<0&&(r=Math.round(210*(y+e)/y),i=r);else{var a=v?"cold":"warm";v||void 0===n||""===n||(a="red",void 0!==t&&t&&t.match(/::/)&&(a="yellow"),"kernel"===n?a="orange":"jit"===n?a="green":"inlined"===n&&(a="aqua"));var u=0;if(t){var l=t.split("`");l.length>1&&(t=l[l.length-1]),t=t.split("(")[0],u=function(t){var n=0,e=0,r=1;if(t){for(var i=0;i<t.length&&!(i>6);i++)n+=r*(t.charCodeAt(i)%10),e+=9*r,r*=.7;e>0&&(n/=e)}return n}(t)}"red"===a?(r=200+Math.round(55*u),i=50+Math.round(80*u),o=i):"orange"===a?(r=190+Math.round(65*u),i=90+Math.round(65*u),o=0):"yellow"===a?(r=175+Math.round(55*u),i=r,o=50+Math.round(20*u)):"green"===a?(r=50+Math.round(60*u),i=200+Math.round(55*u),o=r):"aqua"===a?(r=50+Math.round(60*u),i=165+Math.round(55*u),o=i):"cold"===a?(r=0+Math.round(55*(1-u)),i=0+Math.round(230*(1-u)),o=200+Math.round(55*u)):(r=200+Math.round(55*u),i=0+Math.round(230*(1-u)),o=0+Math.round(55*(1-u)))}return"rgb("+r+","+i+","+o+")"}(x(t),N(t),k(t))},X=D;function z(t){t.data.fade=!1,t.data.hide=!1,t.children&&t.children.forEach(z)}function B(t){if(H.hide(),function(t){let n,e,r,i=t,o=i.parent;for(;o;){for(n=o.children,e=n.length;e--;)r=n[e],r!==i&&(r.data.hide=!0);i=o,o=i.parent}}(t),z(t),function t(n){n.parent&&(n.parent.data.fade=!0,t(n.parent))}(t),I(),_){const n=O._groups[0][0].parentNode.offsetTop,r=(window.innerHeight-n)/e,i=(t.height-r+10)*e;window.scrollTo({top:n+i,left:0,behavior:"smooth"})}"function"==typeof s&&s(t)}function R(t,n){return"function"==typeof l?l(t,n):l?St(x(t),x(n)):void 0}var $=Pt();function I(){r.each((function(r){var o=Kn().range([0,t]),s=Kn().range([0,e]);!function(t){let n,e,r,i,o,a,u,l;const c=[],s=[],h=[],f=!p;let d=t.data;d.hide?(t.value=0,e=t.children,e&&h.push(e)):(t.value=d.fade?0:M(d),c.push(t));for(;n=c.pop();)if(e=n.children,e&&(o=e.length)){for(i=0;o--;)u=e[o],d=u.data,d.hide?(u.value=0,r=u.children,r&&h.push(r)):(d.fade?u.value=0:(l=M(d),u.value=l,i+=l),c.push(u));f&&n.value&&(n.value-=i),s.push(e)}o=s.length;for(;o--;){for(e=s[o],i=0,a=e.length;a--;)i+=e[a].value;e[0].parent.value+=i}for(;h.length;)for(e=h.pop(),a=e.length;a--;)u=e[a],u.value=0,r=u.children,r&&h.push(r)}(r),m=r.value,l&&r.sort(R),$(r);var f=t/(r.x1-r.x0);function d(t){return(t.x1-t.x0)*f}var v=function(n){var e=n.descendants();if(h>0){var r=t/(n.x1-n.x0);e=e.filter((function(t){return(t.x1-t.x0)*r>h}))}return e}(r),g=pt(this).select("svg").selectAll("g").data(v,(function(t){return t.id}));if(!n||w){var y=Math.max.apply(null,v.map((function(t){return t.depth})));(n=(y+3)*e)<b&&(n=b),pt(this).select("svg").attr("height",n)}g.transition().duration(a).ease(u).attr("transform",(function(t){return"translate("+o(t.x0)+","+(c?s(t.depth):n-s(t.depth)-e)+")"})),g.select("rect").transition().duration(a).ease(u).attr("width",d);var _=g.enter().append("svg:g").attr("transform",(function(t){return"translate("+o(t.x0)+","+(c?s(t.depth):n-s(t.depth)-e)+")"}));_.append("svg:rect").transition().delay(a/2).attr("width",d),i||_.append("svg:title"),_.append("foreignObject").append("xhtml:div"),(g=pt(this).select("svg").selectAll("g").data(v,(function(t){return t.id}))).attr("width",d).attr("height",(function(t){return e})).attr("name",(function(t){return x(t)})).attr("class",(function(t){return t.data.fade?"frame fade":"frame"})),g.select("rect").attr("height",(function(t){return e})).attr("fill",(function(t){return D(t)})),i||g.select("title").text(q),g.select("foreignObject").attr("width",d).attr("height",(function(t){return e})).select("div").attr("class","d3-flame-graph-label").style("display",(function(t){return d(t)<35?"none":"block"})).transition().delay(a).text(x),g.on("click",B),g.exit().remove(),g.on("mouseover",(function(t){i&&H.show(t),C(q(t))})).on("mouseout",(function(){i&&H.hide(),C(null)}))}))}function V(t){y=0;let n=0,e=0;const r=d;!function(t,n){n(t);let e=t.children;if(e){const t=[e];let r,i,o;for(;t.length;)for(e=t.pop(),r=e.length;r--;)i=e[r],n(i),o=i.children,o&&t.push(o)}}(t,(function(t){t.id=n++,r&&(e=Math.abs(k(t)),y<e&&(y=e))}))}function Y(e){const i=Ct(e.datum(),A);if(V(i),r=e.datum(i),!arguments.length)return Y;r.each((function(e){O||(O=pt(this).append("svg:svg").attr("width",t).attr("class","partition d3-flame-graph").call(H),n&&(n<b&&(n=b),O.attr("height",n)),O.append("svg:text").attr("class","title").attr("text-anchor","middle").attr("y","25").attr("x",t/2).attr("fill","#808080").text(o))})),I()}return Y.height=function(t){return arguments.length?(n=t,Y):n},Y.minHeight=function(t){return arguments.length?(b=t,Y):b},Y.width=function(n){return arguments.length?(t=n,Y):t},Y.cellHeight=function(t){return arguments.length?(e=t,Y):e},Y.tooltip=function(t){return arguments.length?("function"==typeof t&&(H=t),i=!!t,Y):i},Y.title=function(t){return arguments.length?(o=t,Y):o},Y.transitionDuration=function(t){return arguments.length?(a=t,Y):a},Y.transitionEase=function(t){return arguments.length?(u=t,Y):u},Y.sort=function(t){return arguments.length?(l=t,Y):l},Y.inverted=function(t){return arguments.length?(c=t,Y):c},Y.differential=function(t){return arguments.length?(d=t,Y):d},Y.elided=function(t){return arguments.length?(v=t,Y):v},Y.setLabelHandler=function(t){return arguments.length?(q=t,Y):q},Y.label=Y.setLabelHandler,Y.search=function(t){r.each((function(n){!function(t,n){var e=[],r=0;!function t(i,o){var a=!1;j(i,n)?(i.highlight=!0,a=!0,o||(r+=M(i)),e.push(i)):i.highlight=!1,A(i)&&A(i).forEach((function(n){t(n,o||a)}))}(t,!1),g=r,E(e,r,m)}(n,t),I()}))},Y.findById=function(t){if(null==t)return null;let n=null;return r.each((function(e){null===n&&(n=function t(n,e){if(n.id===e)return n;var r=A(n);if(r)for(var i=0;i<r.length;i++){var o=t(r[i],e);if(o)return o}}(e,t))})),n},Y.clear=function(){g=0,C(null),r.each((function(t){!function t(n){n.highlight=!1,A(n)&&A(n).forEach((function(n){t(n)}))}(t),I()}))},Y.zoomTo=function(t){B(t)},Y.resetZoom=function(){r.each((function(t){B(t)}))},Y.onClick=function(t){return arguments.length?(s=t,Y):s},Y.merge=function(t){return r?(r.each((function(e){!function t(n,e){e.forEach((function(e){var r=n.find((function(t){return t.name===e.name}));r?(r.original?r.original+=e.value:r.value+=e.value,e.children&&(r.children||(r.children=[]),t(r.children,e.children))):n.push(e)}))}([e.data],[t]),V(n=Ct(e.data,A))})),r=r.datum(n),I(),Y):Y;var n},Y.update=function(t){return r?(r.each((function(e){e.data=t,V(n=Ct(e.data,A))})),r=r.datum(n),I(),Y):Y;var n},Y.destroy=function(){return r?(i&&H.hide(),r.selectAll("svg").remove(),Y):Y},Y.setColorMapper=function(t){return arguments.length?(D=n=>{const e=X(n);return t(n,e)},Y):(D=X,Y)},Y.color=Y.setColorMapper,Y.minFrameSize=function(t){return arguments.length?(h=t,Y):h},Y.setDetailsElement=function(t){return arguments.length?(f=t,Y):f},Y.details=Y.setDetailsElement,Y.selfValue=function(t){return arguments.length?(p=t,Y):p},Y.resetHeightOnZoom=function(t){return arguments.length?(w=t,Y):w},Y.scrollOnZoom=function(t){return arguments.length?(_=t,Y):_},Y.getName=function(t){return arguments.length?(x=t,Y):x},Y.getValue=function(t){return arguments.length?(M=t,Y):M},Y.getChildren=function(t){return arguments.length?(A=t,Y):A},Y.getLibtype=function(t){return arguments.length?(N=t,Y):N},Y.getDelta=function(t){return arguments.length?(k=t,Y):k},Y.setSearchHandler=function(t){return arguments.length?(E=t,Y):(E=S,Y)},Y.setDetailsHandler=function(t){return arguments.length?(C=t,Y):(C=T,Y)},Y.setSearchMatch=function(t){return arguments.length?(j=t,Y):(j=P,Y)},Y}}}).default}));
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):((t=t||self).d3=t.d3||{},t.d3.flamegraph=n())}(this,(function(){"use strict";var t="http://www.w3.org/1999/xhtml",n={svg:"http://www.w3.org/2000/svg",xhtml:t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function e(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),n.hasOwnProperty(e)?{space:n[e],local:t}:t}function r(n){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===t&&e.documentElement.namespaceURI===t?e.createElement(n):e.createElementNS(r,n)}}function i(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function o(t){var n=e(t);return(n.local?i:r)(n)}function a(){}function u(t){return null==t?a:function(){return this.querySelector(t)}}function l(){return[]}function s(t){return null==t?l:function(){return this.querySelectorAll(t)}}function c(t){return function(){return this.matches(t)}}function h(t){return new Array(t.length)}function f(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}f.prototype={constructor:f,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var p="$";function d(t,n,e,r,i,o){for(var a,u=0,l=n.length,s=o.length;u<s;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new f(t,o[u]);for(;u<l;++u)(a=n[u])&&(i[u]=a)}function v(t,n,e,r,i,o,a){var u,l,s,c={},h=n.length,d=o.length,v=new Array(h);for(u=0;u<h;++u)(l=n[u])&&(v[u]=s=p+a.call(l,l.__data__,u,n),s in c?i[u]=l:c[s]=l);for(u=0;u<d;++u)(l=c[s=p+a.call(t,o[u],u,o)])?(r[u]=l,l.__data__=o[u],c[s]=null):e[u]=new f(t,o[u]);for(u=0;u<h;++u)(l=n[u])&&c[v[u]]===l&&(i[u]=l)}function g(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function m(t){return function(){this.removeAttribute(t)}}function y(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w(t,n){return function(){this.setAttribute(t,n)}}function _(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function b(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function x(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function M(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function N(t){return function(){this.style.removeProperty(t)}}function A(t,n,e){return function(){this.style.setProperty(t,n,e)}}function k(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function E(t,n){return t.style.getPropertyValue(n)||M(t).getComputedStyle(t,null).getPropertyValue(n)}function S(t){return function(){delete this[t]}}function C(t,n){return function(){this[t]=n}}function q(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function P(t){return t.trim().split(/^|\s+/)}function $(t){return t.classList||new T(t)}function T(t){this._node=t,this._names=P(t.getAttribute("class")||"")}function j(t,n){for(var e=$(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function H(t,n){for(var e=$(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function O(t){return function(){j(this,t)}}function z(t){return function(){H(this,t)}}function L(t,n){return function(){(n.apply(this,arguments)?j:H)(this,t)}}function X(){this.textContent=""}function D(t){return function(){this.textContent=t}}function B(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function R(){this.innerHTML=""}function I(t){return function(){this.innerHTML=t}}function V(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Y(){this.nextSibling&&this.parentNode.appendChild(this)}function F(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function U(){return null}function Z(){var t=this.parentNode;t&&t.removeChild(this)}function G(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function J(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}T.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var K={};"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(K={mouseenter:"mouseover",mouseleave:"mouseout"}));function Q(t,n,e){return t=W(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function W(t,n,e){return function(r){try{t.call(this,this.__data__,n,e)}finally{}}}function tt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function nt(t,n,e){var r=K.hasOwnProperty(t.type)?Q:W;return function(i,o,a){var u,l=this.__on,s=r(n,o,a);if(l)for(var c=0,h=l.length;c<h;++c)if((u=l[c]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=s,u.capture=e),void(u.value=n);this.addEventListener(t.type,s,e),u={type:t.type,name:t.name,value:n,listener:s,capture:e},l?l.push(u):this.__on=[u]}}function et(t,n,e){var r=M(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function rt(t,n){return function(){return et(this,t,n)}}function it(t,n){return function(){return et(this,t,n.apply(this,arguments))}}var ot=[null];function at(t,n){this._groups=t,this._parents=n}function ut(){return new at([[document.documentElement]],ot)}function lt(t){return"string"==typeof t?new at([[document.querySelector(t)]],[document.documentElement]):new at([[t]],ot)}function st(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function ct(t){return(t=st(Math.abs(t)))?t[1]:NaN}at.prototype=ut.prototype={constructor:at,select:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,l=n[i],s=l.length,c=r[i]=new Array(s),h=0;h<s;++h)(o=l[h])&&(a=t.call(o,o.__data__,h,l))&&("__data__"in o&&(a.__data__=o.__data__),c[h]=a);return new at(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=s(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],l=u.length,c=0;c<l;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),i.push(a));return new at(r,i)},filter:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,l=r[i]=[],s=0;s<u;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&l.push(o);return new at(r,this._parents)},data:function(t,n){if(!t)return g=new Array(this.size()),c=-1,this.each((function(t){g[++c]=t})),g;var e,r=n?v:d,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var a=o.length,u=new Array(a),l=new Array(a),s=new Array(a),c=0;c<a;++c){var h=i[c],f=o[c],p=f.length,g=t.call(h,h&&h.__data__,c,i),m=g.length,y=l[c]=new Array(m),w=u[c]=new Array(m);r(h,f,y,w,s[c]=new Array(p),g,n);for(var _,b,x=0,M=0;x<m;++x)if(_=y[x]){for(x>=M&&(M=x+1);!(b=w[M])&&++M<m;);_._next=b||null}}return(u=new at(u,i))._enter=l,u._exit=s,u},enter:function(){return new at(this._enter||this._groups.map(h),this._parents)},exit:function(){return new at(this._exit||this._groups.map(h),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var l,s=n[u],c=e[u],h=s.length,f=a[u]=new Array(h),p=0;p<h;++p)(l=s[p]||c[p])&&(f[p]=l);for(;u<r;++u)a[u]=n[u];return new at(a,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=g);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],l=u.length,s=i[o]=new Array(l),c=0;c<l;++c)(a=u[c])&&(s[c]=a);s.sort(n)}return new at(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var r=e(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==n?r.local?y:m:"function"==typeof n?r.local?x:b:r.local?_:w)(r,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?N:"function"==typeof n?k:A)(t,n,null==e?"":e)):E(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?S:"function"==typeof n?q:C)(t,n)):this.node()[t]},classed:function(t,n){var e=P(t+"");if(arguments.length<2){for(var r=$(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?L:n?O:z)(e,n))},text:function(t){return arguments.length?this.each(null==t?X:("function"==typeof t?B:D)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?R:("function"==typeof t?V:I)(t)):this.node().innerHTML},raise:function(){return this.each(Y)},lower:function(){return this.each(F)},append:function(t){var n="function"==typeof t?t:o(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:o(t),r=null==n?U:"function"==typeof n?n:u(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Z)},clone:function(t){return this.select(t?J:G)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?nt:tt,null==e&&(e=!1),r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var l,s=0,c=u.length;s<c;++s)for(r=0,l=u[s];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?it:rt)(t,n))}};var ht,ft=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pt(t){if(!(n=ft.exec(t)))throw new Error("invalid format: "+t);var n;return new dt({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function dt(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function vt(t,n){var e=st(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}pt.prototype=dt.prototype,dt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var gt={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return vt(100*t,n)},r:vt,s:function(t,n){var e=st(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(ht=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+st(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function mt(t){return t}var yt,wt,_t,bt=Array.prototype.map,xt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Mt(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?mt:(n=bt.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],l=0;i>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),o.push(t.substring(i-=u,i+u)),!((l+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?mt:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(bt.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var n=(t=pt(t)).fill,e=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,v=t.comma,g=t.precision,m=t.trim,y=t.type;"n"===y?(v=!0,y="g"):gt[y]||(void 0===g&&(g=12),m=!0,y="g"),(p||"0"===n&&"="===e)&&(p=!0,n="0",e="=");var w="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===f?o:/[%p]/.test(y)?l:"",b=gt[y],x=/[defgprs%]/.test(y);function M(t){var i,o,l,f=w,M=_;if("c"===y)M=b(t)+M,t="";else{var N=(t=+t)<0;if(t=isNaN(t)?c:b(Math.abs(t),g),m&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),N&&0==+t&&(N=!1),f=(N?"("===h?h:s:"-"===h||"("===h?"":h)+f,M=("s"===y?xt[8+ht/3]:"")+M+(N&&"("===h?")":""),x)for(i=-1,o=t.length;++i<o;)if(48>(l=t.charCodeAt(i))||l>57){M=(46===l?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}v&&!p&&(t=r(t,1/0));var A=f.length+t.length+M.length,k=A<d?new Array(d-A+1).join(n):"";switch(v&&p&&(t=r(k+t,k.length?d-M.length:1/0),k=""),e){case"<":t=f+t+M+k;break;case"=":t=f+k+t+M;break;case"^":t=k.slice(0,A=k.length>>1)+f+t+M+k.slice(A);break;default:t=k+f+t+M}return u(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return t+""},M}return{format:h,formatPrefix:function(t,n){var e=h(((t=pt(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ct(n)/3))),i=Math.pow(10,-r),o=xt[8+r/3];return function(t){return e(i*t)+o}}}}function Nt(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}yt=Mt({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),wt=yt.format,_t=yt.formatPrefix;var At,kt,Et=(1===(At=Nt).length&&(kt=At,At=function(t,n){return Nt(kt(t),n)}),{left:function(t,n,e,r){for(null==e&&(e=0),null==r&&(r=t.length);e<r;){var i=e+r>>>1;At(t[i],n)<0?e=i+1:r=i}return e},right:function(t,n,e,r){for(null==e&&(e=0),null==r&&(r=t.length);e<r;){var i=e+r>>>1;At(t[i],n)>0?r=i:e=i+1}return e}}).right,St=Math.sqrt(50),Ct=Math.sqrt(10),qt=Math.sqrt(2);function Pt(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=St?10:o>=Ct?5:o>=qt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=St?10:o>=Ct?5:o>=qt?2:1)}function $t(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function Tt(t,n){var e,r,i,o,a,u=new zt(t),l=+t.value&&(u.value=t.value),s=[u];for(null==n&&(n=jt);e=s.pop();)if(l&&(e.value=+e.data.value),(i=n(e.data))&&(a=i.length))for(e.children=new Array(a),o=a-1;o>=0;--o)s.push(r=e.children[o]=new zt(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(Ot)}function jt(t){return t.children}function Ht(t){t.data=t.data.data}function Ot(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function zt(t){this.data=t,this.depth=this.height=0,this.parent=null}function Lt(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Xt(){var t=1,n=1,e=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=e,i.x1=t,i.y1=n/o,i.eachBefore(function(t,n){return function(r){r.children&&function(t,n,e,r,i){for(var o,a=t.children,u=-1,l=a.length,s=t.value&&(r-n)/t.value;++u<l;)(o=a[u]).y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*s}(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n);var i=r.x0,o=r.y0,a=r.x1-e,u=r.y1-e;a<i&&(i=a=(i+a)/2),u<o&&(o=u=(o+u)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=u}}(n,o)),r&&i.eachBefore(Lt),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(t){return arguments.length?(e=+t,i):e},i}function Dt(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}zt.prototype=Tt.prototype={constructor:zt,count:function(){return this.eachAfter($t)},each:function(t){var n,e,r,i,o=this,a=[o];do{for(n=a.reverse(),a=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r<i;++r)a.push(e[r])}while(a.length);return this},eachAfter:function(t){for(var n,e,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return Tt(this).eachBefore(Ht)}};function Bt(){}function Rt(t,n){var e=new Bt;if(t instanceof Bt)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var a in t)e.set(a,t[a]);return e}function It(){}Bt.prototype=Rt.prototype={constructor:Bt,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var Vt=Rt.prototype;It.prototype=function(t,n){var e=new It;if(t instanceof It)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}.prototype={constructor:It,has:Vt.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Vt.remove,clear:Vt.clear,values:Vt.keys,size:Vt.size,empty:Vt.empty,each:Vt.each};var Yt=Array.prototype,Ft=Yt.map,Ut=Yt.slice;function Zt(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Gt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Jt(){}var Kt="\\s*([+-]?\\d+)\\s*",Qt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tn=/^#([0-9a-f]{3,8})$/,nn=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),en=new RegExp("^rgb\\("+[Wt,Wt,Wt]+"\\)$"),rn=new RegExp("^rgba\\("+[Kt,Kt,Kt,Qt]+"\\)$"),on=new RegExp("^rgba\\("+[Wt,Wt,Wt,Qt]+"\\)$"),an=new RegExp("^hsl\\("+[Qt,Wt,Wt]+"\\)$"),un=new RegExp("^hsla\\("+[Qt,Wt,Wt,Qt]+"\\)$"),ln={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function sn(){return this.rgb().formatHex()}function cn(){return this.rgb().formatRgb()}function hn(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=tn.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?fn(n):3===e?new vn(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new vn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new vn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=nn.exec(t))?new vn(n[1],n[2],n[3],1):(n=en.exec(t))?new vn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=rn.exec(t))?pn(n[1],n[2],n[3],n[4]):(n=on.exec(t))?pn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=an.exec(t))?wn(n[1],n[2]/100,n[3]/100,1):(n=un.exec(t))?wn(n[1],n[2]/100,n[3]/100,n[4]):ln.hasOwnProperty(t)?fn(ln[t]):"transparent"===t?new vn(NaN,NaN,NaN,0):null}function fn(t){return new vn(t>>16&255,t>>8&255,255&t,1)}function pn(t,n,e,r){return r<=0&&(t=n=e=NaN),new vn(t,n,e,r)}function dn(t,n,e,r){return 1===arguments.length?((i=t)instanceof Jt||(i=hn(i)),i?new vn((i=i.rgb()).r,i.g,i.b,i.opacity):new vn):new vn(t,n,e,null==r?1:r);var i}function vn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function gn(){return"#"+yn(this.r)+yn(this.g)+yn(this.b)}function mn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function yn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function wn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new bn(t,n,e,r)}function _n(t){if(t instanceof bn)return new bn(t.h,t.s,t.l,t.opacity);if(t instanceof Jt||(t=hn(t)),!t)return new bn;if(t instanceof bn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new bn(a,u,l,t.opacity)}function bn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function xn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Mn(t){return function(){return t}}function Nn(t){return 1==(t=+t)?An:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Mn(isNaN(n)?e:n)}}function An(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):Mn(isNaN(t)?n:t)}Zt(Jt,hn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:sn,formatHex:sn,formatHsl:function(){return _n(this).formatHsl()},formatRgb:cn,toString:cn}),Zt(vn,dn,Gt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:gn,formatHex:gn,formatRgb:mn,toString:mn})),Zt(bn,(function(t,n,e,r){return 1===arguments.length?_n(t):new bn(t,n,e,null==r?1:r)}),Gt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new bn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new bn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new vn(xn(t>=240?t-240:t+120,i,r),xn(t,i,r),xn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var kn=function t(n){var e=Nn(n);function r(t,n){var r=e((t=dn(t)).r,(n=dn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=An(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function En(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=jn(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}function Sn(t,n){var e=new Date;return n-=t=+t,function(r){return e.setTime(t+n*r),e}}function Cn(t,n){return n-=t=+t,function(e){return t+n*e}}function qn(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=jn(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}var Pn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$n=new RegExp(Pn.source,"g");function Tn(t,n){var e,r,i,o=Pn.lastIndex=$n.lastIndex=0,a=-1,u=[],l=[];for(t+="",n+="";(e=Pn.exec(t))&&(r=$n.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:Cn(e,r)})),o=$n.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var e,r=0;r<n;++r)u[(e=l[r]).i]=e.x(t);return u.join("")})}function jn(t,n){var e,r=typeof n;return null==n||"boolean"===r?Mn(n):("number"===r?Cn:"string"===r?(e=hn(n))?(n=e,kn):Tn:n instanceof hn?kn:n instanceof Date?Sn:Array.isArray(n)?En:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?qn:Cn)(t,n)}function Hn(t,n){return n-=t=+t,function(e){return Math.round(t+n*e)}}var On,zn,Ln,Xn,Dn=180/Math.PI,Bn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rn(t,n,e,r,i,o){var a,u,l;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(l=t*e+n*r)&&(e-=t*l,r-=n*l),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,l/=u),t*r<n*e&&(t=-t,n=-n,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Dn,skewX:Math.atan(l)*Dn,scaleX:a,scaleY:u}}function In(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],l=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var l=a.push("translate(",null,n,null,e);u.push({i:l-4,x:Cn(t,i)},{i:l-2,x:Cn(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,u,l),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Cn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,l),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Cn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,l),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Cn(t,e)},{i:u-2,x:Cn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,l),o=a=null,function(t){for(var n,e=-1,r=l.length;++e<r;)u[(n=l[e]).i]=n.x(t);return u.join("")}}}var Vn=In((function(t){return"none"===t?Bn:(On||(On=document.createElement("DIV"),zn=document.documentElement,Ln=document.defaultView),On.style.transform=t,t=Ln.getComputedStyle(zn.appendChild(On),null).getPropertyValue("transform"),zn.removeChild(On),Rn(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Yn=In((function(t){return null==t?Bn:(Xn||(Xn=document.createElementNS("http://www.w3.org/2000/svg","g")),Xn.setAttribute("transform",t),(t=Xn.transform.baseVal.consolidate())?Rn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Bn)}),", ",")",")");function Fn(t){return+t}var Un=[0,1];function Zn(t){return t}function Gn(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function Jn(t){var n,e=t[0],r=t[t.length-1];return e>r&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function Kn(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=Gn(i,r),o=e(a,o)):(r=Gn(r,i),o=e(o,a)),function(t){return o(r(t))}}function Qn(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)i[a]=Gn(t[a],t[a+1]),o[a]=e(n[a],n[a+1]);return function(n){var e=Et(t,n,1,r)-1;return o[e](i[e](n))}}function Wn(t,n){return function(){var t,n,e,r,i,o,a=Un,u=Un,l=jn,s=Zn;function c(){return r=Math.min(a.length,u.length)>2?Qn:Kn,i=o=null,h}function h(n){return isNaN(n=+n)?e:(i||(i=r(a.map(t),u,l)))(t(s(n)))}return h.invert=function(e){return s(n((o||(o=r(u,a.map(t),Cn)))(e)))},h.domain=function(t){return arguments.length?(a=Ft.call(t,Fn),s===Zn||(s=Jn(a)),c()):a.slice()},h.range=function(t){return arguments.length?(u=Ut.call(t),c()):u.slice()},h.rangeRound=function(t){return u=Ut.call(t),l=Hn,c()},h.clamp=function(t){return arguments.length?(s=t?Jn(a):Zn,h):s!==Zn},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(e=t,h):e},function(e,r){return t=e,n=r,c()}}()(t,n)}function te(t,n,e,r){var i,o=function(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=St?i*=10:o>=Ct?i*=5:o>=qt&&(i*=2),n<t?-i:i}(t,n,e);switch((r=pt(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ct(n)/3)))-ct(Math.abs(t)))}(o,a))||(r.precision=i),_t(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,ct(n)-ct(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-ct(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return wt(r)}function ne(t){var n=t.domain;return t.ticks=function(t){var e=n();return function(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=Pt(t,n,e))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),n=Math.floor(n/a),o=new Array(i=Math.ceil(n-t+1));++u<i;)o[u]=(t+u)*a;else for(t=Math.floor(t*a),n=Math.ceil(n*a),o=new Array(i=Math.ceil(t-n+1));++u<i;)o[u]=(t-u)/a;return r&&o.reverse(),o}(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return te(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,a=i.length-1,u=i[o],l=i[a];return l<u&&(r=u,u=l,l=r,r=o,o=a,a=r),(r=Pt(u,l,e))>0?r=Pt(u=Math.floor(u/r)*r,l=Math.ceil(l/r)*r,e):r<0&&(r=Pt(u=Math.ceil(u*r)/r,l=Math.floor(l*r)/r,e)),r>0?(i[o]=Math.floor(u/r)*r,i[a]=Math.ceil(l/r)*r,n(i)):r<0&&(i[o]=Math.ceil(u*r)/r,i[a]=Math.floor(l*r)/r,n(i)),t},t}function ee(){var t=Wn(Zn,Zn);return t.copy=function(){return n=t,ee().domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());var n},Dt.apply(t,arguments),ne(t)}function re(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ie={value:function(){}};function oe(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ae(r)}function ae(t){this._=t}function ue(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function le(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function se(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=ie,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}ae.prototype=oe.prototype={constructor:ae,on:function(t,n){var e,r=this._,i=ue(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=se(r[e],t.name,n);else if(null==n)for(e in r)r[e]=se(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=le(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new ae(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var ce,he,fe=0,pe=0,de=0,ve=1e3,ge=0,me=0,ye=0,we="object"==typeof performance&&performance.now?performance:Date,_e="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function be(){return me||(_e(xe),me=we.now()+ye)}function xe(){me=0}function Me(){this._call=this._time=this._next=null}function Ne(t,n,e){var r=new Me;return r.restart(t,n,e),r}function Ae(){me=(ge=we.now())+ye,fe=pe=0;try{!function(){be(),++fe;for(var t,n=ce;n;)(t=me-n._time)>=0&&n._call.call(null,t),n=n._next;--fe}()}finally{fe=0,function(){var t,n,e=ce,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ce=n);he=t,Ee(r)}(),me=0}}function ke(){var t=we.now(),n=t-ge;n>ve&&(ye-=n,ge=t)}function Ee(t){fe||(pe&&(pe=clearTimeout(pe)),t-me>24?(t<1/0&&(pe=setTimeout(Ae,t-we.now()-ye)),de&&(de=clearInterval(de))):(de||(ge=we.now(),de=setInterval(ke,ve)),fe=1,_e(Ae)))}function Se(t,n,e){var r=new Me;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r}Me.prototype=Ne.prototype={constructor:Me,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?be():+e)+(null==n?0:+n),this._next||he===this||(he?he._next=this:ce=this,he=this),this._call=t,this._time=e,Ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ee())}};var Ce=oe("start","end","cancel","interrupt"),qe=[],Pe=0,$e=1,Te=2,je=3,He=4,Oe=5,ze=6;function Le(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(l){var s,c,h,f;if(e.state!==$e)return u();for(s in i)if((f=i[s]).name===e.name){if(f.state===je)return Se(o);f.state===He?(f.state=ze,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[s]):+s<n&&(f.state=ze,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[s])}if(Se((function(){e.state===je&&(e.state=He,e.timer.restart(a,e.delay,e.time),a(l))})),e.state=Te,e.on.call("start",t,t.__data__,e.index,e.group),e.state===Te){for(e.state=je,r=new Array(h=e.tween.length),s=0,c=-1;s<h;++s)(f=e.tween[s].value.call(t,t.__data__,e.index,e.group))&&(r[++c]=f);r.length=c+1}}function a(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=Oe,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);e.state===Oe&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){for(var r in e.state=ze,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Ne((function(t){e.state=$e,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:Ce,tween:qe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Pe})}function Xe(t,n){var e=Be(t,n);if(e.state>Pe)throw new Error("too late; already scheduled");return e}function De(t,n){var e=Be(t,n);if(e.state>je)throw new Error("too late; already running");return e}function Be(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Re(t,n){var e,r;return function(){var i=De(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}i.tween=r}}function Ie(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=De(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},l=0,s=i.length;l<s;++l)if(i[l].name===n){i[l]=u;break}l===s&&i.push(u)}o.tween=i}}function Ve(t,n,e){var r=t._id;return t.each((function(){var t=De(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Be(t,r).value[n]}}function Ye(t,n){var e;return("number"==typeof n?Cn:n instanceof hn?kn:(e=hn(n))?(n=e,kn):Tn)(t,n)}function Fe(t){return function(){this.removeAttribute(t)}}function Ue(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ze(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}}function Ge(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}function Je(t,n,e){var r,i,o;return function(){var a,u,l=e(this);if(null!=l)return(a=this.getAttribute(t))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,l));this.removeAttribute(t)}}function Ke(t,n,e){var r,i,o;return function(){var a,u,l=e(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,l));this.removeAttributeNS(t.space,t.local)}}function Qe(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n(e))}}(t,i)),e}return i._value=n,i}function We(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n(e))}}(t,i)),e}return i._value=n,i}function tr(t,n){return function(){Xe(this,t).delay=+n.apply(this,arguments)}}function nr(t,n){return n=+n,function(){Xe(this,t).delay=n}}function er(t,n){return function(){De(this,t).duration=+n.apply(this,arguments)}}function rr(t,n){return n=+n,function(){De(this,t).duration=n}}var ir=ut.prototype.constructor;function or(t){return function(){this.style.removeProperty(t)}}var ar=0;function ur(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function lr(){return++ar}var sr=ut.prototype;ur.prototype=function(t){return ut().transition(t)}.prototype={constructor:ur,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var l,s,c=r[a],h=c.length,f=o[a]=new Array(h),p=0;p<h;++p)(l=c[p])&&(s=t.call(l,l.__data__,p,c))&&("__data__"in l&&(s.__data__=l.__data__),f[p]=s,Le(f[p],n,e,p,f,Be(l,e)));return new ur(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=s(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var l,c=r[u],h=c.length,f=0;f<h;++f)if(l=c[f]){for(var p,d=t.call(l,l.__data__,f,c),v=Be(l,e),g=0,m=d.length;g<m;++g)(p=d[g])&&Le(p,n,e,g,d,v);o.push(d),a.push(l)}return new ur(o,a,n,e)},filter:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,l=r[i]=[],s=0;s<u;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&l.push(o);return new ur(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var l,s=n[u],c=e[u],h=s.length,f=a[u]=new Array(h),p=0;p<h;++p)(l=s[p]||c[p])&&(f[p]=l);for(;u<r;++u)a[u]=n[u];return new ur(a,this._parents,this._name,this._id)},selection:function(){return new ir(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=lr(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],l=u.length,s=0;s<l;++s)if(a=u[s]){var c=Be(a,n);Le(a,t,e,s,u,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ur(r,this._parents,t,e)},call:sr.call,nodes:sr.nodes,node:sr.node,size:sr.size,empty:sr.empty,each:sr.each,on:function(t,n){var e=this._id;return arguments.length<2?Be(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Xe:De;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}(e,t,n))},attr:function(t,n){var r=e(t),i="transform"===r?Yn:Ye;return this.attrTween(t,"function"==typeof n?(r.local?Ke:Je)(r,i,Ve(this,"attr."+t,n)):null==n?(r.local?Ue:Fe)(r):(r.local?Ge:Ze)(r,i,n))},attrTween:function(t,n){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;var i=e(t);return this.tween(r,(i.local?Qe:We)(i,n))},style:function(t,n,e){var r="transform"==(t+="")?Vn:Ye;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=E(this,t),a=(this.style.removeProperty(t),E(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,or(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=E(this,t),u=e(this),l=u+"";return null==u&&(this.style.removeProperty(t),l=u=E(this,t)),a===l?null:a===r&&l===i?o:(i=l,o=n(r=a,u))}}(t,r,Ve(this,"style."+t,n))).each(function(t,n){var e,r,i,o,a="style."+n,u="end."+a;return function(){var l=De(this,t),s=l.on,c=null==l.value[a]?o||(o=or(n)):void 0;s===e&&i===c||(r=(e=s).copy()).on(u,i=c),l.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var a=E(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n(r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Ve(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Be(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?Re:Ie)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?tr:nr)(n,t)):Be(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?er:rr)(n,t)):Be(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){De(this,t).ease=n}}(n,t)):Be(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,a){var u={value:a},l={value:function(){0==--i&&o()}};e.each((function(){var e=De(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(l)),e.on=n}))}))}};var cr={time:null,delay:0,duration:250,ease:re};function hr(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return cr.time=be(),cr;return e}function fr(t){return t.data.name}return ut.prototype.interrupt=function(t){return this.each((function(){!function(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>Te&&e.state<Oe,e.state=ze,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},ut.prototype.transition=function(t){var n,e;t instanceof ur?(n=t._id,t=t._name):(n=lr(),(e=cr).time=be(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],l=u.length,s=0;s<l;++s)(a=u[s])&&Le(a,t,n,s,u,e||hr(a,n));return new ur(r,this._parents,t,n)},function(){var t=960,n=null,e=18,r=null,i=!0,o="",a=750,u=re,l=!1,s=!1,c=null,h=0,f=null,p=!1,d=!1,v=!1,g=0,m=0,y=0,w=!1,_=!1,b=null,x=function(t){return t.data.n||t.data.name},M=function(t){return"v"in t?t.v:t.value},N=function(t){return t.c||t.children},A=function(t){return t.data.l||t.data.libtype},k=function(t){return"d"in t.data?t.data.d:t.data.delta},E=function(){f&&O()},S=E;let C=(t,n)=>{if(!n)return!1;const e=new RegExp(n),r=x(t);return void 0!==r&&r&&r.match(e)};const q=C;var P,$=function(t){f&&(t?f.innerHTML=t:g?O():f.innerHTML="")},T=$,j=function(t){return x(t)+" ("+wt(".3f")(100*(t.x1-t.x0),3)+"%, "+M(t)+" samples)"},H=function(){var t=lt("body"),n=null,e=fr;function r(){n=t.append("div").style("display","none").style("position","absolute").style("opacity",0).style("pointer-events","none").attr("class","d3-flame-graph-tip")}return r.show=function(t){return n.style("display","block").transition().duration(200).style("opacity",1).style("pointer-events","all"),n.html(e(t)).style("left",event.pageX+"px").style("top",event.pageY+"px"),r},r.hide=function(){return n.style("display","none").transition().duration(200).style("opacity",0).style("pointer-events","none"),r},r.html=function(t){return arguments.length?(e=t,r):e},r}().html((function(t){return j(t)}));function O(){f.innerHTML=g+" of "+m+" samples ( "+wt(".3f")(g/m*100,3)+"%)"}var z=function(t){return t.highlight?"#E600E6":function(t,n,e){var r,i,o;if(d)r=220,i=220,o=220,e||(e=0),e>0?(o=Math.round(210*(y-e)/y),i=o):e<0&&(r=Math.round(210*(y+e)/y),i=r);else{var a=v?"cold":"warm";v||void 0===n||""===n||(a="red",void 0!==t&&t&&t.match(/::/)&&(a="yellow"),"kernel"===n?a="orange":"jit"===n?a="green":"inlined"===n&&(a="aqua"));var u=0;if(t){var l=t.split("`");l.length>1&&(t=l[l.length-1]),t=t.split("(")[0],u=function(t){var n=0,e=0,r=1;if(t){for(var i=0;i<t.length&&!(i>6);i++)n+=r*(t.charCodeAt(i)%10),e+=9*r,r*=.7;e>0&&(n/=e)}return n}(t)}"red"===a?(r=200+Math.round(55*u),i=50+Math.round(80*u),o=i):"orange"===a?(r=190+Math.round(65*u),i=90+Math.round(65*u),o=0):"yellow"===a?(r=175+Math.round(55*u),i=r,o=50+Math.round(20*u)):"green"===a?(r=50+Math.round(60*u),i=200+Math.round(55*u),o=r):"aqua"===a?(r=50+Math.round(60*u),i=165+Math.round(55*u),o=i):"cold"===a?(r=0+Math.round(55*(1-u)),i=0+Math.round(230*(1-u)),o=200+Math.round(55*u)):(r=200+Math.round(55*u),i=0+Math.round(230*(1-u)),o=0+Math.round(55*(1-u)))}return"rgb("+r+","+i+","+o+")"}(x(t),A(t),k(t))},L=z;function X(t){t.data.fade=!1,t.data.hide=!1,t.children&&t.children.forEach(X)}function D(t){if(H.hide(),function(t){let n,e,r,i=t,o=i.parent;for(;o;){for(e=(n=o.children).length;e--;)(r=n[e])!==i&&(r.data.hide=!0);o=(i=o).parent}}(t),X(t),function t(n){n.parent&&(n.parent.data.fade=!0,t(n.parent))}(t),I(),_){const n=P._groups[0][0].parentNode.offsetTop,r=(window.innerHeight-n)/e,i=(t.height-r+10)*e;window.scrollTo({top:n+i,left:0,behavior:"smooth"})}"function"==typeof c&&c(t)}function B(t,n){return"function"==typeof l?l(t,n):l?Nt(x(t),x(n)):void 0}var R=Xt();function I(){r.each((function(r){var o=ee().range([0,t]),c=ee().range([0,e]);!function(t){let n,e,r,i,o,a,u,l;const s=[],c=[],h=[],f=!p;let d=t.data;d.hide?(t.value=0,(e=t.children)&&h.push(e)):(t.value=d.fade?0:M(d),s.push(t));for(;n=s.pop();)if((e=n.children)&&(o=e.length)){for(i=0;o--;)u=e[o],(d=u.data).hide?(u.value=0,(r=u.children)&&h.push(r)):(d.fade?u.value=0:(l=M(d),u.value=l,i+=l),s.push(u));f&&n.value&&(n.value-=i),c.push(e)}o=c.length;for(;o--;){for(e=c[o],i=0,a=e.length;a--;)i+=e[a].value;e[0].parent.value+=i}for(;h.length;)for(e=h.pop(),a=e.length;a--;)(u=e[a]).value=0,(r=u.children)&&h.push(r)}(r),m=r.value,l&&r.sort(B),R(r);var f=t/(r.x1-r.x0);function d(t){return(t.x1-t.x0)*f}var v=function(n){var e=n.descendants();if(h>0){var r=t/(n.x1-n.x0);e=e.filter((function(t){return(t.x1-t.x0)*r>h}))}return e}(r),g=lt(this).select("svg").selectAll("g").data(v,(function(t){return t.id}));if(!n||w){var y=Math.max.apply(null,v.map((function(t){return t.depth})));(n=(y+3)*e)<b&&(n=b),lt(this).select("svg").attr("height",n)}g.transition().duration(a).ease(u).attr("transform",(function(t){return"translate("+o(t.x0)+","+(s?c(t.depth):n-c(t.depth)-e)+")"})),g.select("rect").transition().duration(a).ease(u).attr("width",d);var _=g.enter().append("svg:g").attr("transform",(function(t){return"translate("+o(t.x0)+","+(s?c(t.depth):n-c(t.depth)-e)+")"}));_.append("svg:rect").transition().delay(a/2).attr("width",d),i||_.append("svg:title"),_.append("foreignObject").append("xhtml:div"),(g=lt(this).select("svg").selectAll("g").data(v,(function(t){return t.id}))).attr("width",d).attr("height",(function(t){return e})).attr("name",(function(t){return x(t)})).attr("class",(function(t){return t.data.fade?"frame fade":"frame"})),g.select("rect").attr("height",(function(t){return e})).attr("fill",(function(t){return z(t)})),i||g.select("title").text(j),g.select("foreignObject").attr("width",d).attr("height",(function(t){return e})).select("div").attr("class","d3-flame-graph-label").style("display",(function(t){return d(t)<35?"none":"block"})).transition().delay(a).text(x),g.on("click",D),g.exit().remove(),g.on("mouseover",(function(t){i&&H.show(t),$(j(t))})).on("mouseout",(function(){i&&H.hide(),$(null)}))}))}function V(t){y=0;let n=0,e=0;const r=d;!function(t,n){n(t);let e=t.children;if(e){const t=[e];let r,i,o;for(;t.length;)for(r=(e=t.pop()).length;r--;)n(i=e[r]),(o=i.children)&&t.push(o)}}(t,(function(t){t.id=n++,r&&(e=Math.abs(k(t)),y<e&&(y=e))}))}function Y(e){const i=Tt(e.datum(),N);if(V(i),r=e.datum(i),!arguments.length)return Y;r.each((function(e){P||(P=lt(this).append("svg:svg").attr("width",t).attr("class","partition d3-flame-graph").call(H),n&&(n<b&&(n=b),P.attr("height",n)),P.append("svg:text").attr("class","title").attr("text-anchor","middle").attr("y","25").attr("x",t/2).attr("fill","#808080").text(o))})),I()}return Y.height=function(t){return arguments.length?(n=t,Y):n},Y.minHeight=function(t){return arguments.length?(b=t,Y):b},Y.width=function(n){return arguments.length?(t=n,Y):t},Y.cellHeight=function(t){return arguments.length?(e=t,Y):e},Y.tooltip=function(t){return arguments.length?("function"==typeof t&&(H=t),i=!!t,Y):i},Y.title=function(t){return arguments.length?(o=t,Y):o},Y.transitionDuration=function(t){return arguments.length?(a=t,Y):a},Y.transitionEase=function(t){return arguments.length?(u=t,Y):u},Y.sort=function(t){return arguments.length?(l=t,Y):l},Y.inverted=function(t){return arguments.length?(s=t,Y):s},Y.differential=function(t){return arguments.length?(d=t,Y):d},Y.elided=function(t){return arguments.length?(v=t,Y):v},Y.setLabelHandler=function(t){return arguments.length?(j=t,Y):j},Y.label=Y.setLabelHandler,Y.search=function(t){r.each((function(n){!function(t,n){var e=[],r=0;!function t(i,o){var a=!1;C(i,n)?(i.highlight=!0,a=!0,o||(r+=M(i)),e.push(i)):i.highlight=!1,N(i)&&N(i).forEach((function(n){t(n,o||a)}))}(t,!1),g=r,E(e,r,m)}(n,t),I()}))},Y.findById=function(t){if(null==t)return null;let n=null;return r.each((function(e){null===n&&(n=function t(n,e){if(n.id===e)return n;var r=N(n);if(r)for(var i=0;i<r.length;i++){var o=t(r[i],e);if(o)return o}}(e,t))})),n},Y.clear=function(){g=0,$(null),r.each((function(t){!function t(n){n.highlight=!1,N(n)&&N(n).forEach((function(n){t(n)}))}(t),I()}))},Y.zoomTo=function(t){D(t)},Y.resetZoom=function(){r.each((function(t){D(t)}))},Y.onClick=function(t){return arguments.length?(c=t,Y):c},Y.merge=function(t){return r?(r.each((function(e){!function t(n,e){e.forEach((function(e){var r=n.find((function(t){return t.name===e.name}));r?(r.original?r.original+=e.value:r.value+=e.value,e.children&&(r.children||(r.children=[]),t(r.children,e.children))):n.push(e)}))}([e.data],[t]),V(n=Tt(e.data,N))})),r=r.datum(n),I(),Y):Y;var n},Y.update=function(t){return r?(r.each((function(e){e.data=t,V(n=Tt(e.data,N))})),r=r.datum(n),I(),Y):Y;var n},Y.destroy=function(){return r?(i&&H.hide(),r.selectAll("svg").remove(),Y):Y},Y.setColorMapper=function(t){return arguments.length?(z=n=>{const e=L(n);return t(n,e)},Y):(z=L,Y)},Y.color=Y.setColorMapper,Y.minFrameSize=function(t){return arguments.length?(h=t,Y):h},Y.setDetailsElement=function(t){return arguments.length?(f=t,Y):f},Y.details=Y.setDetailsElement,Y.selfValue=function(t){return arguments.length?(p=t,Y):p},Y.resetHeightOnZoom=function(t){return arguments.length?(w=t,Y):w},Y.scrollOnZoom=function(t){return arguments.length?(_=t,Y):_},Y.getName=function(t){return arguments.length?(x=t,Y):x},Y.getValue=function(t){return arguments.length?(M=t,Y):M},Y.getChildren=function(t){return arguments.length?(N=t,Y):N},Y.getLibtype=function(t){return arguments.length?(A=t,Y):A},Y.getDelta=function(t){return arguments.length?(k=t,Y):k},Y.setSearchHandler=function(t){return arguments.length?(E=t,Y):(E=S,Y)},Y.setDetailsHandler=function(t){return arguments.length?($=t,Y):($=T,Y)},Y.setSearchMatch=function(t){return arguments.length?(C=t,Y):(C=q,Y)},Y}}));
{
"name": "d3-flame-graph",
"version": "2.2.1",
"version": "2.2.2",
"description": "A d3.js library to produce flame graphs.",

@@ -10,8 +10,7 @@ "main": "index.js",

"scripts": {
"build": "webpack --mode production",
"serve": "webpack-dev-server --mode development",
"pretest": "webpack --mode production",
"build": "gulp build",
"pretest": "gulp build",
"test": "tape 'test/**/*-test.js'",
"prepare": "npm run test",
"postpublish": "zip -j dist/d3-flamegraph.zip -- LICENSE README.md dist/d3-flamegraph.js dist/d3-flamegraph.min.js dist/d3-flamegraph-colorMapper.js dist/d3-flamegraph-colorMapper.min.js dist/d3-flamegraph-tooltip.js dist/d3-flamegraph-tooltip.min.js dist/d3-flamegraph.css"
"postpublish": "zip -j dist/d3-flamegraph.zip -- LICENSE README.md dist/d3-flamegraph.js dist/d3-flamegraph.min.js dist/d3-flamegraph-colorMapper.js dist/d3-flamegraph-colorMapper.min.js dist/d3-flamegraph.css"
},

@@ -37,31 +36,29 @@ "repository": {

"devDependencies": {
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^3.4.2",
"eslint": "^6.8.0",
"browser-sync": "^2.26.7",
"del": "^5.0.0",
"eslint-config-standard": "^14.0.0",
"eslint-loader": "^3.0.3",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-standard": "^4.0.1",
"html-webpack-plugin": "^3.2.0",
"script-ext-html-webpack-plugin": "^2.1.4",
"style-loader": "^1.1.3",
"tape": "^4.13.2",
"terser-webpack-plugin": "^2.3.5",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
"gulp": "^4.0.2",
"gulp-eslint": "^6.0.0",
"gulp-rename": "^1.4.0",
"gulp-uglify-es": "^2.0.0",
"rollup": "^1.25.2",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-node-resolve": "^5.0.0",
"tape": "^4.11.0",
"uglify-es": "^3.3.9"
},
"dependencies": {
"d3-array": "^2.4.0",
"d3-ease": "^1.0.6",
"d3-format": "^1.4.3",
"d3-hierarchy": "^1.1.9",
"d3-scale": "^3.2.1",
"d3-selection": "^1.4.1",
"d3-transition": "^1.3.2",
"d3-array": "^1.2.4",
"d3-ease": "^1.0.5",
"d3-format": "^1.4.1",
"d3-hierarchy": "^1.1.8",
"d3-scale": "^2.2.2",
"d3-selection": "^1.4.0",
"d3-transition": "^1.2.0",
"d3-dispatch": "^1.0.6"
}
}

@@ -337,5 +337,5 @@ # d3-flame-graph

### Build
### Gulp.js
This plugin uses Webpack as build system. It includes a development server with live refresh on any changes. To start it, just execute the `serve` npm script.
This plugin uses Gulp.js as build system. A few tasks are already defined, including browser-sync that can be used for development. To start it, just execute the `serve` task.

@@ -346,10 +346,5 @@ ```

$ npm install
$ npm run serve
$ gulp serve
```
### Template
A standalone template with all JavaScript and CSS inlined gets built at `dist/templates/d3-flamegraph-base.html`.
It contains a placeholder `/** @flamegraph_params **/` which needs to be replaced with the stacks in the format described in [Input Format](#input-format).
## License

@@ -356,0 +351,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc