plotly.js
Version:
The open source javascript graphing library that powers plotly
18 lines • 1.4 MB
JavaScript
/**
* plotly.js (gl2d - minified) v3.0.1
* Copyright 2012-2025, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
(
function(root, factory) {
if (typeof module === "object" && module.exports) {
module.exports = factory();
} else {
root.moduleName = factory();
}
} (typeof self !== "undefined" ? self : this, () => {
"use strict";var Plotly=(()=>{var Uae=Object.create;var Ny=Object.defineProperty;var Gae=Object.getOwnPropertyDescriptor;var Hae=Object.getOwnPropertyNames;var Vae=Object.getPrototypeOf,Yae=Object.prototype.hasOwnProperty;var Qv=(e,r)=>()=>(e&&(r=e(e=0)),r);var R=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Wae=(e,r)=>{for(var t in r)Ny(e,t,{get:r[t],enumerable:!0})},oM=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Hae(r))!Yae.call(e,n)&&n!==t&&Ny(e,n,{get:()=>r[n],enumerable:!(a=Gae(r,n))||a.enumerable});return e};var jae=(e,r,t)=>(t=e!=null?Uae(Vae(e)):{},oM(r||!e||!e.__esModule?Ny(t,"default",{value:e,enumerable:!0}):t,e)),lM=e=>oM(Ny({},"__esModule",{value:!0}),e);var Iy=R(sM=>{"use strict";sM.version="3.0.1"});var fM=R((uM,Oy)=>{(function(r,t,a){t[r]=t[r]||a(),typeof Oy!="undefined"&&Oy.exports&&(Oy.exports=t[r])})("Promise",typeof window!="undefined"?window:uM,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(_,A,x,T){return Object.defineProperty(_,A,{value:x,writable:!0,configurable:T!==!1})}}catch(b){r=function(A,x,T){return A[x]=T,A}}a=function(){var _,A,x;function T(S,M){this.fn=S,this.self=M,this.next=void 0}return{add:function(M,k){x=new T(M,k),A?A.next=x:_=x,A=x,x=void 0},drain:function(){var M=_;for(_=A=t=void 0;M;)M.fn.call(M.self),M=M.next}}}();function o(b,_){a.add(b,_),t||(t=i(a.drain))}function l(b){var _,A=typeof b;return b!=null&&(A=="object"||A=="function")&&(_=b.then),typeof _=="function"?_:!1}function s(){for(var b=0;b<this.chain.length;b++)u(this,this.state===1?this.chain[b].success:this.chain[b].failure,this.chain[b]);this.chain.length=0}function u(b,_,A){var x,T;try{_===!1?A.reject(b.msg):(_===!0?x=b.msg:x=_.call(void 0,b.msg),x===A.promise?A.reject(TypeError("Promise-chain cycle")):(T=l(x))?T.call(x,A.resolve,A.reject):A.resolve(x))}catch(S){A.reject(S)}}function f(b){var _,A=this;if(!A.triggered){A.triggered=!0,A.def&&(A=A.def);try{(_=l(b))?o(function(){var x=new d(A);try{_.call(b,function(){f.apply(x,arguments)},function(){c.apply(x,arguments)})}catch(T){c.call(x,T)}}):(A.msg=b,A.state=1,A.chain.length>0&&o(s,A))}catch(x){c.call(new d(A),x)}}}function c(b){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=b,_.state=2,_.chain.length>0&&o(s,_))}function v(b,_,A,x){for(var T=0;T<_.length;T++)(function(M){b.resolve(_[M]).then(function(D){A(M,D)},x)})(T)}function d(b){this.def=b,this.triggered=!1}function p(b){this.promise=b,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(b){if(typeof b!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new p(this);this.then=function(x,T){var S={success:typeof x=="function"?x:!0,failure:typeof T=="function"?T:!1};return S.promise=new this.constructor(function(k,D){if(typeof k!="function"||typeof D!="function")throw TypeError("Not a function");S.resolve=k,S.reject=D}),_.chain.push(S),_.state!==0&&o(s,_),S.promise},this.catch=function(x){return this.then(void 0,x)};try{b.call(void 0,function(x){f.call(_,x)},function(x){c.call(_,x)})}catch(A){c.call(_,A)}}var m=r({},"constructor",g,!1);return g.prototype=m,r(m,"__NPO__",0,!1),r(g,"resolve",function(_){var A=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new A(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");T(_)})}),r(g,"reject",function(_){return new this(function(x,T){if(typeof x!="function"||typeof T!="function")throw TypeError("Not a function");T(_)})}),r(g,"all",function(_){var A=this;return n.call(_)!="[object Array]"?A.reject(TypeError("Not an array")):_.length===0?A.resolve([]):new A(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");var M=_.length,k=Array(M),D=0;v(A,_,function(N,q){k[N]=q,++D===M&&T(k)},S)})}),r(g,"race",function(_){var A=this;return n.call(_)!="[object Array]"?A.reject(TypeError("Not an array")):new A(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");v(A,_,function(k,D){T(D)},S)})}),g})});var ta=R((OMe,zy)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(h){return r.call(h)},a=self.document;function n(h){return h&&(h.ownerDocument||h.document||h).documentElement}function i(h){return h&&(h.ownerDocument&&h.ownerDocument.defaultView||h.document&&h||h.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(h){t=function(y){for(var w=y.length,C=new Array(w);w--;)C[w]=y[w];return C}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(h){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;o.setAttribute=function(y,w){l.call(this,y,w+"")},o.setAttributeNS=function(y,w,C){s.call(this,y,w,C+"")},u.setProperty=function(y,w,C){f.call(this,y,w+"",C)}}e.ascending=c;function c(h,y){return h<y?-1:h>y?1:h>=y?0:NaN}e.descending=function(h,y){return y<h?-1:y>h?1:y>=h?0:NaN},e.min=function(h,y){var w=-1,C=h.length,E,L;if(arguments.length===1){for(;++w<C;)if((L=h[w])!=null&&L>=L){E=L;break}for(;++w<C;)(L=h[w])!=null&&E>L&&(E=L)}else{for(;++w<C;)if((L=y.call(h,h[w],w))!=null&&L>=L){E=L;break}for(;++w<C;)(L=y.call(h,h[w],w))!=null&&E>L&&(E=L)}return E},e.max=function(h,y){var w=-1,C=h.length,E,L;if(arguments.length===1){for(;++w<C;)if((L=h[w])!=null&&L>=L){E=L;break}for(;++w<C;)(L=h[w])!=null&&L>E&&(E=L)}else{for(;++w<C;)if((L=y.call(h,h[w],w))!=null&&L>=L){E=L;break}for(;++w<C;)(L=y.call(h,h[w],w))!=null&&L>E&&(E=L)}return E},e.extent=function(h,y){var w=-1,C=h.length,E,L,I;if(arguments.length===1){for(;++w<C;)if((L=h[w])!=null&&L>=L){E=I=L;break}for(;++w<C;)(L=h[w])!=null&&(E>L&&(E=L),I<L&&(I=L))}else{for(;++w<C;)if((L=y.call(h,h[w],w))!=null&&L>=L){E=I=L;break}for(;++w<C;)(L=y.call(h,h[w],w))!=null&&(E>L&&(E=L),I<L&&(I=L))}return[E,I]};function v(h){return h===null?NaN:+h}function d(h){return!isNaN(h)}e.sum=function(h,y){var w=0,C=h.length,E,L=-1;if(arguments.length===1)for(;++L<C;)d(E=+h[L])&&(w+=E);else for(;++L<C;)d(E=+y.call(h,h[L],L))&&(w+=E);return w},e.mean=function(h,y){var w=0,C=h.length,E,L=-1,I=C;if(arguments.length===1)for(;++L<C;)d(E=v(h[L]))?w+=E:--I;else for(;++L<C;)d(E=v(y.call(h,h[L],L)))?w+=E:--I;if(I)return w/I},e.quantile=function(h,y){var w=(h.length-1)*y+1,C=Math.floor(w),E=+h[C-1],L=w-C;return L?E+L*(h[C]-E):E},e.median=function(h,y){var w=[],C=h.length,E,L=-1;if(arguments.length===1)for(;++L<C;)d(E=v(h[L]))&&w.push(E);else for(;++L<C;)d(E=v(y.call(h,h[L],L)))&&w.push(E);if(w.length)return e.quantile(w.sort(c),.5)},e.variance=function(h,y){var w=h.length,C=0,E,L,I=0,F=-1,z=0;if(arguments.length===1)for(;++F<w;)d(E=v(h[F]))&&(L=E-C,C+=L/++z,I+=L*(E-C));else for(;++F<w;)d(E=v(y.call(h,h[F],F)))&&(L=E-C,C+=L/++z,I+=L*(E-C));if(z>1)return I/(z-1)},e.deviation=function(){var h=e.variance.apply(this,arguments);return h&&Math.sqrt(h)};function p(h){return{left:function(y,w,C,E){for(arguments.length<3&&(C=0),arguments.length<4&&(E=y.length);C<E;){var L=C+E>>>1;h(y[L],w)<0?C=L+1:E=L}return C},right:function(y,w,C,E){for(arguments.length<3&&(C=0),arguments.length<4&&(E=y.length);C<E;){var L=C+E>>>1;h(y[L],w)>0?E=L:C=L+1}return C}}}var g=p(c);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(h){return p(h.length===1?function(y,w){return c(h(y),w)}:h)},e.shuffle=function(h,y,w){(C=arguments.length)<3&&(w=h.length,C<2&&(y=0));for(var C=w-y,E,L;C;)L=Math.random()*C--|0,E=h[C+y],h[C+y]=h[L+y],h[L+y]=E;return h},e.permute=function(h,y){for(var w=y.length,C=new Array(w);w--;)C[w]=h[y[w]];return C},e.pairs=function(h){for(var y=0,w=h.length-1,C,E=h[0],L=new Array(w<0?0:w);y<w;)L[y]=[C=E,E=h[++y]];return L},e.transpose=function(h){if(!(L=h.length))return[];for(var y=-1,w=e.min(h,m),C=new Array(w);++y<w;)for(var E=-1,L,I=C[y]=new Array(L);++E<L;)I[E]=h[E][y];return C};function m(h){return h.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(h){var y=[];for(var w in h)y.push(w);return y},e.values=function(h){var y=[];for(var w in h)y.push(h[w]);return y},e.entries=function(h){var y=[];for(var w in h)y.push({key:w,value:h[w]});return y},e.merge=function(h){for(var y=h.length,w,C=-1,E=0,L,I;++C<y;)E+=h[C].length;for(L=new Array(E);--y>=0;)for(I=h[y],w=I.length;--w>=0;)L[--E]=I[w];return L};var b=Math.abs;e.range=function(h,y,w){if(arguments.length<3&&(w=1,arguments.length<2&&(y=h,h=0)),(y-h)/w===1/0)throw new Error("infinite range");var C=[],E=_(b(w)),L=-1,I;if(h*=E,y*=E,w*=E,w<0)for(;(I=h+w*++L)>y;)C.push(I/E);else for(;(I=h+w*++L)<y;)C.push(I/E);return C};function _(h){for(var y=1;h*y%1;)y*=10;return y}function A(h,y){for(var w in y)Object.defineProperty(h.prototype,w,{value:y[w],enumerable:!1})}e.map=function(h,y){var w=new x;if(h instanceof x)h.forEach(function(F,z){w.set(F,z)});else if(Array.isArray(h)){var C=-1,E=h.length,L;if(arguments.length===1)for(;++C<E;)w.set(C,h[C]);else for(;++C<E;)w.set(y.call(h,L=h[C],C),L)}else for(var I in h)w.set(I,h[I]);return w};function x(){this._=Object.create(null)}var T="__proto__",S="\0";A(x,{has:D,get:function(h){return this._[M(h)]},set:function(h,y){return this._[M(h)]=y},remove:P,keys:N,values:function(){var h=[];for(var y in this._)h.push(this._[y]);return h},entries:function(){var h=[];for(var y in this._)h.push({key:k(y),value:this._[y]});return h},size:q,empty:O,forEach:function(h){for(var y in this._)h.call(this,k(y),this._[y])}});function M(h){return(h+="")===T||h[0]===S?S+h:h}function k(h){return(h+="")[0]===S?h.slice(1):h}function D(h){return M(h)in this._}function P(h){return(h=M(h))in this._&&delete this._[h]}function N(){var h=[];for(var y in this._)h.push(k(y));return h}function q(){var h=0;for(var y in this._)++h;return h}function O(){for(var h in this._)return!1;return!0}e.nest=function(){var h={},y=[],w=[],C,E;function L(F,z,X){if(X>=y.length)return E?E.call(h,z):C?z.sort(C):z;for(var J=-1,K=z.length,ee=y[X++],Me,qe,ne,he=new x,we;++J<K;)(we=he.get(Me=ee(qe=z[J])))?we.push(qe):he.set(Me,[qe]);return F?(qe=F(),ne=function(Fe,Re){qe.set(Fe,L(F,Re,X))}):(qe={},ne=function(Fe,Re){qe[Fe]=L(F,Re,X)}),he.forEach(ne),qe}function I(F,z){if(z>=y.length)return F;var X=[],J=w[z++];return F.forEach(function(K,ee){X.push({key:K,values:I(ee,z)})}),J?X.sort(function(K,ee){return J(K.key,ee.key)}):X}return h.map=function(F,z){return L(z,F,0)},h.entries=function(F){return I(L(e.map,F,0),0)},h.key=function(F){return y.push(F),h},h.sortKeys=function(F){return w[y.length-1]=F,h},h.sortValues=function(F){return C=F,h},h.rollup=function(F){return E=F,h},h},e.set=function(h){var y=new U;if(h)for(var w=0,C=h.length;w<C;++w)y.add(h[w]);return y};function U(){this._=Object.create(null)}A(U,{has:D,add:function(h){return this._[M(h+="")]=!0,h},remove:P,values:N,size:q,empty:O,forEach:function(h){for(var y in this._)h.call(this,k(y))}}),e.behavior={};function $(h){return h}e.rebind=function(h,y){for(var w=1,C=arguments.length,E;++w<C;)h[E=arguments[w]]=W(h,y,y[E]);return h};function W(h,y,w){return function(){var C=w.apply(y,arguments);return C===y?h:C}}function H(h,y){if(y in h)return y;y=y.charAt(0).toUpperCase()+y.slice(1);for(var w=0,C=B.length;w<C;++w){var E=B[w]+y;if(E in h)return E}}var B=["webkit","ms","moz","Moz","o","O"];function V(){}e.dispatch=function(){for(var h=new j,y=-1,w=arguments.length;++y<w;)h[arguments[y]]=Q(h);return h};function j(){}j.prototype.on=function(h,y){var w=h.indexOf("."),C="";if(w>=0&&(C=h.slice(w+1),h=h.slice(0,w)),h)return arguments.length<2?this[h].on(C):this[h].on(C,y);if(arguments.length===2){if(y==null)for(h in this)this.hasOwnProperty(h)&&this[h].on(C,null);return this}};function Q(h){var y=[],w=new x;function C(){for(var E=y,L=-1,I=E.length,F;++L<I;)(F=E[L].on)&&F.apply(this,arguments);return h}return C.on=function(E,L){var I=w.get(E),F;return arguments.length<2?I&&I.on:(I&&(I.on=null,y=y.slice(0,F=y.indexOf(I)).concat(y.slice(F+1)),w.remove(E)),L&&y.push(w.set(E,{on:L})),h)},C}e.event=null;function ve(){e.event.preventDefault()}function xe(){for(var h=e.event,y;y=h.sourceEvent;)h=y;return h}function se(h){for(var y=new j,w=0,C=arguments.length;++w<C;)y[arguments[w]]=Q(y);return y.of=function(E,L){return function(I){try{var F=I.sourceEvent=e.event;I.target=h,e.event=I,y[I.type].apply(E,L)}finally{e.event=F}}},y}e.requote=function(h){return h.replace(be,"\\$&")};var be=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,re={}.__proto__?function(h,y){h.__proto__=y}:function(h,y){for(var w in y)h[w]=y[w]};function ke(h){return re(h,Ce),h}var ge=function(h,y){return y.querySelector(h)},Ee=function(h,y){return y.querySelectorAll(h)},De=function(h,y){var w=h.matches||h[H(h,"matchesSelector")];return De=function(C,E){return w.call(C,E)},De(h,y)};typeof Sizzle=="function"&&(ge=function(h,y){return Sizzle(h,y)[0]||null},Ee=Sizzle,De=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var Ce=e.selection.prototype=[];Ce.select=function(h){var y=[],w,C,E,L;h=Y(h);for(var I=-1,F=this.length;++I<F;){y.push(w=[]),w.parentNode=(E=this[I]).parentNode;for(var z=-1,X=E.length;++z<X;)(L=E[z])?(w.push(C=h.call(L,L.__data__,z,I)),C&&"__data__"in L&&(C.__data__=L.__data__)):w.push(null)}return ke(y)};function Y(h){return typeof h=="function"?h:function(){return ge(h,this)}}Ce.selectAll=function(h){var y=[],w,C;h=ae(h);for(var E=-1,L=this.length;++E<L;)for(var I=this[E],F=-1,z=I.length;++F<z;)(C=I[F])&&(y.push(w=t(h.call(C,C.__data__,F,E))),w.parentNode=C);return ke(y)};function ae(h){return typeof h=="function"?h:function(){return Ee(h,this)}}var Z="http://www.w3.org/1999/xhtml",Ae={svg:"http://www.w3.org/2000/svg",xhtml:Z,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:Ae,qualify:function(h){var y=h.indexOf(":"),w=h;return y>=0&&(w=h.slice(0,y))!=="xmlns"&&(h=h.slice(y+1)),Ae.hasOwnProperty(w)?{space:Ae[w],local:h}:h}},Ce.attr=function(h,y){if(arguments.length<2){if(typeof h=="string"){var w=this.node();return h=e.ns.qualify(h),h.local?w.getAttributeNS(h.space,h.local):w.getAttribute(h)}for(y in h)this.each(Pe(y,h[y]));return this}return this.each(Pe(h,y))};function Pe(h,y){h=e.ns.qualify(h);function w(){this.removeAttribute(h)}function C(){this.removeAttributeNS(h.space,h.local)}function E(){this.setAttribute(h,y)}function L(){this.setAttributeNS(h.space,h.local,y)}function I(){var z=y.apply(this,arguments);z==null?this.removeAttribute(h):this.setAttribute(h,z)}function F(){var z=y.apply(this,arguments);z==null?this.removeAttributeNS(h.space,h.local):this.setAttributeNS(h.space,h.local,z)}return y==null?h.local?C:w:typeof y=="function"?h.local?F:I:h.local?L:E}function Ne(h){return h.trim().replace(/\s+/g," ")}Ce.classed=function(h,y){if(arguments.length<2){if(typeof h=="string"){var w=this.node(),C=(h=Qe(h)).length,E=-1;if(y=w.classList){for(;++E<C;)if(!y.contains(h[E]))return!1}else for(y=w.getAttribute("class");++E<C;)if(!lr(h[E]).test(y))return!1;return!0}for(y in h)this.each(Je(y,h[y]));return this}return this.each(Je(h,y))};function lr(h){return new RegExp("(?:^|\\s+)"+e.requote(h)+"(?:\\s+|$)","g")}function Qe(h){return(h+"").trim().split(/^|\s+/)}function Je(h,y){h=Qe(h).map(or);var w=h.length;function C(){for(var L=-1;++L<w;)h[L](this,y)}function E(){for(var L=-1,I=y.apply(this,arguments);++L<w;)h[L](this,I)}return typeof y=="function"?E:C}function or(h){var y=lr(h);return function(w,C){if(E=w.classList)return C?E.add(h):E.remove(h);var E=w.getAttribute("class")||"";C?(y.lastIndex=0,y.test(E)||w.setAttribute("class",Ne(E+" "+h))):w.setAttribute("class",Ne(E.replace(y," ")))}}Ce.style=function(h,y,w){var C=arguments.length;if(C<3){if(typeof h!="string"){C<2&&(y="");for(w in h)this.each(yr(w,h[w],y));return this}if(C<2){var E=this.node();return i(E).getComputedStyle(E,null).getPropertyValue(h)}w=""}return this.each(yr(h,y,w))};function yr(h,y,w){function C(){this.style.removeProperty(h)}function E(){this.style.setProperty(h,y,w)}function L(){var I=y.apply(this,arguments);I==null?this.style.removeProperty(h):this.style.setProperty(h,I,w)}return y==null?C:typeof y=="function"?L:E}Ce.property=function(h,y){if(arguments.length<2){if(typeof h=="string")return this.node()[h];for(y in h)this.each(ir(y,h[y]));return this}return this.each(ir(h,y))};function ir(h,y){function w(){delete this[h]}function C(){this[h]=y}function E(){var L=y.apply(this,arguments);L==null?delete this[h]:this[h]=L}return y==null?w:typeof y=="function"?E:C}Ce.text=function(h){return arguments.length?this.each(typeof h=="function"?function(){var y=h.apply(this,arguments);this.textContent=y==null?"":y}:h==null?function(){this.textContent=""}:function(){this.textContent=h}):this.node().textContent},Ce.html=function(h){return arguments.length?this.each(typeof h=="function"?function(){var y=h.apply(this,arguments);this.innerHTML=y==null?"":y}:h==null?function(){this.innerHTML=""}:function(){this.innerHTML=h}):this.node().innerHTML},Ce.append=function(h){return h=Xe(h),this.select(function(){return this.appendChild(h.apply(this,arguments))})};function Xe(h){function y(){var C=this.ownerDocument,E=this.namespaceURI;return E===Z&&C.documentElement.namespaceURI===Z?C.createElement(h):C.createElementNS(E,h)}function w(){return this.ownerDocument.createElementNS(h.space,h.local)}return typeof h=="function"?h:(h=e.ns.qualify(h)).local?w:y}Ce.insert=function(h,y){return h=Xe(h),y=Y(y),this.select(function(){return this.insertBefore(h.apply(this,arguments),y.apply(this,arguments)||null)})},Ce.remove=function(){return this.each(Lr)};function Lr(){var h=this.parentNode;h&&h.removeChild(this)}Ce.data=function(h,y){var w=-1,C=this.length,E,L;if(!arguments.length){for(h=new Array(C=(E=this[0]).length);++w<C;)(L=E[w])&&(h[w]=L.__data__);return h}function I(J,K){var ee,Me=J.length,qe=K.length,ne=Math.min(Me,qe),he=new Array(qe),we=new Array(qe),Fe=new Array(Me),Re,me;if(y){var cr=new x,Mr=new Array(Me),Pr;for(ee=-1;++ee<Me;)(Re=J[ee])&&(cr.has(Pr=y.call(Re,Re.__data__,ee))?Fe[ee]=Re:cr.set(Pr,Re),Mr[ee]=Pr);for(ee=-1;++ee<qe;)(Re=cr.get(Pr=y.call(K,me=K[ee],ee)))?Re!==!0&&(he[ee]=Re,Re.__data__=me):we[ee]=Ar(me),cr.set(Pr,!0);for(ee=-1;++ee<Me;)ee in Mr&&cr.get(Mr[ee])!==!0&&(Fe[ee]=J[ee])}else{for(ee=-1;++ee<ne;)Re=J[ee],me=K[ee],Re?(Re.__data__=me,he[ee]=Re):we[ee]=Ar(me);for(;ee<qe;++ee)we[ee]=Ar(K[ee]);for(;ee<Me;++ee)Fe[ee]=J[ee]}we.update=he,we.parentNode=he.parentNode=Fe.parentNode=J.parentNode,F.push(we),z.push(he),X.push(Fe)}var F=rt([]),z=ke([]),X=ke([]);if(typeof h=="function")for(;++w<C;)I(E=this[w],h.call(E,E.parentNode.__data__,w));else for(;++w<C;)I(E=this[w],h);return z.enter=function(){return F},z.exit=function(){return X},z};function Ar(h){return{__data__:h}}Ce.datum=function(h){return arguments.length?this.property("__data__",h):this.property("__data__")},Ce.filter=function(h){var y=[],w,C,E;typeof h!="function"&&(h=de(h));for(var L=0,I=this.length;L<I;L++){y.push(w=[]),w.parentNode=(C=this[L]).parentNode;for(var F=0,z=C.length;F<z;F++)(E=C[F])&&h.call(E,E.__data__,F,L)&&w.push(E)}return ke(y)};function de(h){return function(){return De(this,h)}}Ce.order=function(){for(var h=-1,y=this.length;++h<y;)for(var w=this[h],C=w.length-1,E=w[C],L;--C>=0;)(L=w[C])&&(E&&E!==L.nextSibling&&E.parentNode.insertBefore(L,E),E=L);return this},Ce.sort=function(h){h=Oe.apply(this,arguments);for(var y=-1,w=this.length;++y<w;)this[y].sort(h);return this.order()};function Oe(h){return arguments.length||(h=c),function(y,w){return y&&w?h(y.__data__,w.__data__):!y-!w}}Ce.each=function(h){return Ue(this,function(y,w,C){h.call(y,y.__data__,w,C)})};function Ue(h,y){for(var w=0,C=h.length;w<C;w++)for(var E=h[w],L=0,I=E.length,F;L<I;L++)(F=E[L])&&y(F,L,w);return h}Ce.call=function(h){var y=t(arguments);return h.apply(y[0]=this,y),this},Ce.empty=function(){return!this.node()},Ce.node=function(){for(var h=0,y=this.length;h<y;h++)for(var w=this[h],C=0,E=w.length;C<E;C++){var L=w[C];if(L)return L}return null},Ce.size=function(){var h=0;return Ue(this,function(){++h}),h};function rt(h){return re(h,Ur),h}var Ur=[];e.selection.enter=rt,e.selection.enter.prototype=Ur,Ur.append=Ce.append,Ur.empty=Ce.empty,Ur.node=Ce.node,Ur.call=Ce.call,Ur.size=Ce.size,Ur.select=function(h){for(var y=[],w,C,E,L,I,F=-1,z=this.length;++F<z;){E=(L=this[F]).update,y.push(w=[]),w.parentNode=L.parentNode;for(var X=-1,J=L.length;++X<J;)(I=L[X])?(w.push(E[X]=C=h.call(L.parentNode,I.__data__,X,F)),C.__data__=I.__data__):w.push(null)}return ke(y)},Ur.insert=function(h,y){return arguments.length<2&&(y=Ye(this)),Ce.insert.call(this,h,y)};function Ye(h){var y,w;return function(C,E,L){var I=h[L].update,F=I.length,z;for(L!=w&&(w=L,y=0),E>=y&&(y=E+1);!(z=I[y])&&++y<F;);return z}}e.select=function(h){var y;return typeof h=="string"?(y=[ge(h,a)],y.parentNode=a.documentElement):(y=[h],y.parentNode=n(h)),ke([y])},e.selectAll=function(h){var y;return typeof h=="string"?(y=t(Ee(h,a)),y.parentNode=a.documentElement):(y=t(h),y.parentNode=null),ke([y])},Ce.on=function(h,y,w){var C=arguments.length;if(C<3){if(typeof h!="string"){C<2&&(y=!1);for(w in h)this.each(Ve(w,h[w],y));return this}if(C<2)return(C=this.node()["__on"+h])&&C._;w=!1}return this.each(Ve(h,y,w))};function Ve(h,y,w){var C="__on"+h,E=h.indexOf("."),L=Tr;E>0&&(h=h.slice(0,E));var I=pr.get(h);I&&(h=I,L=mr);function F(){var J=this[C];J&&(this.removeEventListener(h,J,J.$),delete this[C])}function z(){var J=L(y,t(arguments));F.call(this),this.addEventListener(h,this[C]=J,J.$=w),J._=y}function X(){var J=new RegExp("^__on([^.]+)"+e.requote(h)+"$"),K;for(var ee in this)if(K=ee.match(J)){var Me=this[ee];this.removeEventListener(K[1],Me,Me.$),delete this[ee]}}return E?y?z:F:y?V:X}var pr=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&pr.forEach(function(h){"on"+h in a&&pr.remove(h)});function Tr(h,y){return function(w){var C=e.event;e.event=w,y[0]=this.__data__;try{h.apply(this,y)}finally{e.event=C}}}function mr(h,y){var w=Tr(h,y);return function(C){var E=this,L=C.relatedTarget;(!L||L!==E&&!(L.compareDocumentPosition(E)&8))&&w.call(E,C)}}var vr,Cr=0;function Ir(h){var y=".dragsuppress-"+ ++Cr,w="click"+y,C=e.select(i(h)).on("touchmove"+y,ve).on("dragstart"+y,ve).on("selectstart"+y,ve);if(vr==null&&(vr="onselectstart"in h?!1:H(h.style,"userSelect")),vr){var E=n(h).style,L=E[vr];E[vr]="none"}return function(I){if(C.on(y,null),vr&&(E[vr]=L),I){var F=function(){C.on(w,null)};C.on(w,function(){ve(),F()},!0),setTimeout(F,0)}}}e.mouse=function(h){return Ze(h,xe())};var Gr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ze(h,y){y.changedTouches&&(y=y.changedTouches[0]);var w=h.ownerSVGElement||h;if(w.createSVGPoint){var C=w.createSVGPoint();if(Gr<0){var E=i(h);if(E.scrollX||E.scrollY){w=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var L=w[0][0].getScreenCTM();Gr=!(L.f||L.e),w.remove()}}return Gr?(C.x=y.pageX,C.y=y.pageY):(C.x=y.clientX,C.y=y.clientY),C=C.matrixTransform(h.getScreenCTM().inverse()),[C.x,C.y]}var I=h.getBoundingClientRect();return[y.clientX-I.left-h.clientLeft,y.clientY-I.top-h.clientTop]}e.touch=function(h,y,w){if(arguments.length<3&&(w=y,y=xe().changedTouches),y){for(var C=0,E=y.length,L;C<E;++C)if((L=y[C]).identifier===w)return Ze(h,L)}},e.behavior.drag=function(){var h=se(E,"drag","dragstart","dragend"),y=null,w=L(V,e.mouse,i,"mousemove","mouseup"),C=L(oe,e.touch,$,"touchmove","touchend");function E(){this.on("mousedown.drag",w).on("touchstart.drag",C)}function L(I,F,z,X,J){return function(){var K=this,ee=e.event.target.correspondingElement||e.event.target,Me=K.parentNode,qe=h.of(K,arguments),ne=0,he=I(),we=".drag"+(he==null?"":"-"+he),Fe,Re=e.select(z(ee)).on(X+we,Mr).on(J+we,Pr),me=Ir(ee),cr=F(Me,he);y?(Fe=y.apply(K,arguments),Fe=[Fe.x-cr[0],Fe.y-cr[1]]):Fe=[0,0],qe({type:"dragstart"});function Mr(){var Yr=F(Me,he),it,ot;Yr&&(it=Yr[0]-cr[0],ot=Yr[1]-cr[1],ne|=it|ot,cr=Yr,qe({type:"drag",x:Yr[0]+Fe[0],y:Yr[1]+Fe[1],dx:it,dy:ot}))}function Pr(){F(Me,he)&&(Re.on(X+we,null).on(J+we,null),me(ne),qe({type:"dragend"}))}}}return E.origin=function(I){return arguments.length?(y=I,E):y},e.rebind(E,h,"on")};function oe(){return e.event.changedTouches[0].identifier}e.touches=function(h,y){return arguments.length<2&&(y=xe().touches),y?t(y).map(function(w){var C=Ze(h,w);return C.identifier=w.identifier,C}):[]};var ye=1e-6,Ge=ye*ye,Ie=Math.PI,Wr=2*Ie,tt=Wr-ye,$r=Ie/2,St=Ie/180,ea=180/Ie;function ma(h){return h>0?1:h<0?-1:0}function aa(h,y,w){return(y[0]-h[0])*(w[1]-h[1])-(y[1]-h[1])*(w[0]-h[0])}function Ka(h){return h>1?0:h<-1?Ie:Math.acos(h)}function Ln(h){return h>1?$r:h<-1?-$r:Math.asin(h)}function si(h){return((h=Math.exp(h))-1/h)/2}function Dn(h){return((h=Math.exp(h))+1/h)/2}function Vi(h){return((h=Math.exp(2*h))-1)/(h+1)}function Bn(h){return(h=Math.sin(h/2))*h}var qn=Math.SQRT2,yi=2,_t=4;e.interpolateZoom=function(h,y){var w=h[0],C=h[1],E=h[2],L=y[0],I=y[1],F=y[2],z=L-w,X=I-C,J=z*z+X*X,K,ee;if(J<Ge)ee=Math.log(F/E)/qn,K=function(Fe){return[w+Fe*z,C+Fe*X,E*Math.exp(qn*Fe*ee)]};else{var Me=Math.sqrt(J),qe=(F*F-E*E+_t*J)/(2*E*yi*Me),ne=(F*F-E*E-_t*J)/(2*F*yi*Me),he=Math.log(Math.sqrt(qe*qe+1)-qe),we=Math.log(Math.sqrt(ne*ne+1)-ne);ee=(we-he)/qn,K=function(Fe){var Re=Fe*ee,me=Dn(he),cr=E/(yi*Me)*(me*Vi(qn*Re+he)-si(he));return[w+cr*z,C+cr*X,E*me/Dn(qn*Re+he)]}}return K.duration=ee*1e3,K},e.behavior.zoom=function(){var h={x:0,y:0,k:1},y,w,C,E=[960,500],L=Ma,I=250,F=0,z="mousedown.zoom",X="mousemove.zoom",J="mouseup.zoom",K,ee="touchstart.zoom",Me,qe=se(Re,"zoomstart","zoom","zoomend"),ne,he,we,Fe;Ra||(Ra="onwheel"in a?(ra=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in a?(ra=function(){return e.event.wheelDelta},"mousewheel"):(ra=function(){return-e.event.detail},"MozMousePixelScroll"));function Re(zr){zr.on(z,kt).on(Ra+".zoom",tn).on("dblclick.zoom",xa).on(ee,ha)}Re.event=function(zr){zr.each(function(){var Ft=qe.of(this,arguments),Ut=h;$l?e.select(this).transition().each("start.zoom",function(){h=this.__chart__||{x:0,y:0,k:1},ot(Ft)}).tween("zoom:zoom",function(){var ua=E[0],Ba=E[1],cn=w?w[0]:ua/2,Hn=w?w[1]:Ba/2,Kn=e.interpolateZoom([(cn-h.x)/h.k,(Hn-h.y)/h.k,ua/h.k],[(cn-Ut.x)/Ut.k,(Hn-Ut.y)/Ut.k,ua/Ut.k]);return function(gi){var G=Kn(gi),ie=ua/G[2];this.__chart__=h={x:cn-G[0]*ie,y:Hn-G[1]*ie,k:ie},qt(Ft)}}).each("interrupt.zoom",function(){ct(Ft)}).each("end.zoom",function(){ct(Ft)}):(this.__chart__=h,ot(Ft),qt(Ft),ct(Ft))})},Re.translate=function(zr){return arguments.length?(h={x:+zr[0],y:+zr[1],k:h.k},it(),Re):[h.x,h.y]},Re.scale=function(zr){return arguments.length?(h={x:h.x,y:h.y,k:null},Mr(+zr),it(),Re):h.k},Re.scaleExtent=function(zr){return arguments.length?(L=zr==null?Ma:[+zr[0],+zr[1]],Re):L},Re.center=function(zr){return arguments.length?(C=zr&&[+zr[0],+zr[1]],Re):C},Re.size=function(zr){return arguments.length?(E=zr&&[+zr[0],+zr[1]],Re):E},Re.duration=function(zr){return arguments.length?(I=+zr,Re):I},Re.x=function(zr){return arguments.length?(he=zr,ne=zr.copy(),h={x:0,y:0,k:1},Re):he},Re.y=function(zr){return arguments.length?(Fe=zr,we=zr.copy(),h={x:0,y:0,k:1},Re):Fe};function me(zr){return[(zr[0]-h.x)/h.k,(zr[1]-h.y)/h.k]}function cr(zr){return[zr[0]*h.k+h.x,zr[1]*h.k+h.y]}function Mr(zr){h.k=Math.max(L[0],Math.min(L[1],zr))}function Pr(zr,Ft){Ft=cr(Ft),h.x+=zr[0]-Ft[0],h.y+=zr[1]-Ft[1]}function Yr(zr,Ft,Ut,ua){zr.__chart__={x:h.x,y:h.y,k:h.k},Mr(Math.pow(2,ua)),Pr(w=Ft,Ut),zr=e.select(zr),I>0&&(zr=zr.transition().duration(I)),zr.call(Re.event)}function it(){he&&he.domain(ne.range().map(function(zr){return(zr-h.x)/h.k}).map(ne.invert)),Fe&&Fe.domain(we.range().map(function(zr){return(zr-h.y)/h.k}).map(we.invert))}function ot(zr){F++||zr({type:"zoomstart"})}function qt(zr){it(),zr({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function ct(zr){--F||(zr({type:"zoomend"}),w=null)}function kt(){var zr=this,Ft=qe.of(zr,arguments),Ut=0,ua=e.select(i(zr)).on(X,Hn).on(J,Kn),Ba=me(e.mouse(zr)),cn=Ir(zr);Xv.call(zr),ot(Ft);function Hn(){Ut=1,Pr(e.mouse(zr),Ba),qt(Ft)}function Kn(){ua.on(X,null).on(J,null),cn(Ut),ct(Ft)}}function ha(){var zr=this,Ft=qe.of(zr,arguments),Ut={},ua=0,Ba,cn=".zoom-"+e.event.changedTouches[0].identifier,Hn="touchmove"+cn,Kn="touchend"+cn,gi=[],G=e.select(zr),ie=Ir(zr);We(),ot(Ft),G.on(z,null).on(ee,We);function ue(){var $e=e.touches(zr);return Ba=h.k,$e.forEach(function(br){br.identifier in Ut&&(Ut[br.identifier]=me(br))}),$e}function We(){var $e=e.event.target;e.select($e).on(Hn,Ke).on(Kn,ar),gi.push($e);for(var br=e.event.changedTouches,Dr=0,qr=br.length;Dr<qr;++Dr)Ut[br[Dr].identifier]=null;var Fr=ue(),xt=Date.now();if(Fr.length===1){if(xt-Me<500){var ft=Fr[0];Yr(zr,ft,Ut[ft.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),ve()}Me=xt}else if(Fr.length>1){var ft=Fr[0],Zr=Fr[1],hr=ft[0]-Zr[0],ze=ft[1]-Zr[1];ua=hr*hr+ze*ze}}function Ke(){var $e=e.touches(zr),br,Dr,qr,Fr;Xv.call(zr);for(var xt=0,ft=$e.length;xt<ft;++xt,Fr=null)if(qr=$e[xt],Fr=Ut[qr.identifier]){if(Dr)break;br=qr,Dr=Fr}if(Fr){var Zr=(Zr=qr[0]-br[0])*Zr+(Zr=qr[1]-br[1])*Zr,hr=ua&&Math.sqrt(Zr/ua);br=[(br[0]+qr[0])/2,(br[1]+qr[1])/2],Dr=[(Dr[0]+Fr[0])/2,(Dr[1]+Fr[1])/2],Mr(hr*Ba)}Me=null,Pr(br,Dr),qt(Ft)}function ar(){if(e.event.touches.length){for(var $e=e.event.changedTouches,br=0,Dr=$e.length;br<Dr;++br)delete Ut[$e[br].identifier];for(var qr in Ut)return void ue()}e.selectAll(gi).on(cn,null),G.on(z,kt).on(ee,ha),ie(),ct(Ft)}}function tn(){var zr=qe.of(this,arguments);K?clearTimeout(K):(Xv.call(this),y=me(w=C||e.mouse(this)),ot(zr)),K=setTimeout(function(){K=null,ct(zr)},50),ve(),Mr(Math.pow(2,ra()*.002)*h.k),Pr(w,y),qt(zr)}function xa(){var zr=e.mouse(this),Ft=Math.log(h.k)/Math.LN2;Yr(this,zr,me(zr),e.event.shiftKey?Math.ceil(Ft)-1:Math.floor(Ft)+1)}return e.rebind(Re,qe,"on")};var Ma=[0,1/0],ra,Ra;e.color=Xa;function Xa(){}Xa.prototype.toString=function(){return this.rgb()+""},e.hsl=Sa;function Sa(h,y,w){return this instanceof Sa?(this.h=+h,this.s=+y,void(this.l=+w)):arguments.length<2?h instanceof Sa?new Sa(h.h,h.s,h.l):jt(""+h,va,Sa):new Sa(h,y,w)}var La=Sa.prototype=new Xa;La.brighter=function(h){return h=Math.pow(.7,arguments.length?h:1),new Sa(this.h,this.s,this.l/h)},La.darker=function(h){return h=Math.pow(.7,arguments.length?h:1),new Sa(this.h,this.s,h*this.l)},La.rgb=function(){return en(this.h,this.s,this.l)};function en(h,y,w){var C,E;h=isNaN(h)?0:(h%=360)<0?h+360:h,y=isNaN(y)||y<0?0:y>1?1:y,w=w<0?0:w>1?1:w,E=w<=.5?w*(1+y):w+y-w*y,C=2*w-E;function L(F){return F>360?F-=360:F<0&&(F+=360),F<60?C+(E-C)*F/60:F<180?E:F<240?C+(E-C)*(240-F)/60:C}function I(F){return Math.round(L(F)*255)}return new ui(I(h+120),I(h),I(h-120))}e.hcl=on;function on(h,y,w){return this instanceof on?(this.h=+h,this.c=+y,void(this.l=+w)):arguments.length<2?h instanceof on?new on(h.h,h.c,h.l):h instanceof xn?As(h.l,h.a,h.b):As((h=jr((h=e.rgb(h)).r,h.g,h.b)).l,h.a,h.b):new on(h,y,w)}var Yi=on.prototype=new Xa;Yi.brighter=function(h){return new on(this.h,this.c,Math.min(100,this.l+Aa*(arguments.length?h:1)))},Yi.darker=function(h){return new on(this.h,this.c,Math.max(0,this.l-Aa*(arguments.length?h:1)))},Yi.rgb=function(){return Wi(this.h,this.c,this.l).rgb()};function Wi(h,y,w){return isNaN(h)&&(h=0),isNaN(y)&&(y=0),new xn(w,Math.cos(h*=St)*y,Math.sin(h)*y)}e.lab=xn;function xn(h,y,w){return this instanceof xn?(this.l=+h,this.a=+y,void(this.b=+w)):arguments.length<2?h instanceof xn?new xn(h.l,h.a,h.b):h instanceof on?Wi(h.h,h.c,h.l):jr((h=ui(h)).r,h.g,h.b):new xn(h,y,w)}var Aa=18,Un=.95047,_s=1,ws=1.08883,Bl=xn.prototype=new Xa;Bl.brighter=function(h){return new xn(Math.min(100,this.l+Aa*(arguments.length?h:1)),this.a,this.b)},Bl.darker=function(h){return new xn(Math.max(0,this.l-Aa*(arguments.length?h:1)),this.a,this.b)},Bl.rgb=function(){return _v(this.l,this.a,this.b)};function _v(h,y,w){var C=(h+16)/116,E=C+y/500,L=C-w/200;return E=Bf(E)*Un,C=Bf(C)*_s,L=Bf(L)*ws,new ui(ol(3.2404542*E-1.5371385*C-.4985314*L),ol(-.969266*E+1.8760108*C+.041556*L),ol(.0556434*E-.2040259*C+1.0572252*L))}function As(h,y,w){return h>0?new on(Math.atan2(w,y)*ea,Math.sqrt(y*y+w*w),h):new on(NaN,NaN,h)}function Bf(h){return h>.206893034?h*h*h:(h-4/29)/7.787037}function Uf(h){return h>.008856?Math.pow(h,1/3):7.787037*h+4/29}function ol(h){return Math.round(255*(h<=.00304?12.92*h:1.055*Math.pow(h,1/2.4)-.055))}e.rgb=ui;function ui(h,y,w){return this instanceof ui?(this.r=~~h,this.g=~~y,void(this.b=~~w)):arguments.length<2?h instanceof ui?new ui(h.r,h.g,h.b):jt(""+h,ui,en):new ui(h,y,w)}function ll(h){return new ui(h>>16,h>>8&255,h&255)}function Ts(h){return ll(h)+""}var go=ui.prototype=new Xa;go.brighter=function(h){h=Math.pow(.7,arguments.length?h:1);var y=this.r,w=this.g,C=this.b,E=30;return!y&&!w&&!C?new ui(E,E,E):(y&&y<E&&(y=E),w&&w<E&&(w=E),C&&C<E&&(C=E),new ui(Math.min(255,y/h),Math.min(255,w/h),Math.min(255,C/h)))},go.darker=function(h){return h=Math.pow(.7,arguments.length?h:1),new ui(h*this.r,h*this.g,h*this.b)},go.hsl=function(){return va(this.r,this.g,this.b)},go.toString=function(){return"#"+yt(this.r)+yt(this.g)+yt(this.b)};function yt(h){return h<16?"0"+Math.max(0,h).toString(16):Math.min(255,h).toString(16)}function jt(h,y,w){var C=0,E=0,L=0,I,F,z;if(I=/([a-z]+)\((.*)\)/.exec(h=h.toLowerCase()),I)switch(F=I[2].split(","),I[1]){case"hsl":return w(parseFloat(F[0]),parseFloat(F[1])/100,parseFloat(F[2])/100);case"rgb":return y(Ea(F[0]),Ea(F[1]),Ea(F[2]))}return(z=Fn.get(h))?y(z.r,z.g,z.b):(h!=null&&h.charAt(0)==="#"&&!isNaN(z=parseInt(h.slice(1),16))&&(h.length===4?(C=(z&3840)>>4,C=C>>4|C,E=z&240,E=E>>4|E,L=z&15,L=L<<4|L):h.length===7&&(C=(z&16711680)>>16,E=(z&65280)>>8,L=z&255)),y(C,E,L))}function va(h,y,w){var C=Math.min(h/=255,y/=255,w/=255),E=Math.max(h,y,w),L=E-C,I,F,z=(E+C)/2;return L?(F=z<.5?L/(E+C):L/(2-E-C),h==E?I=(y-w)/L+(y<w?6:0):y==E?I=(w-h)/L+2:I=(h-y)/L+4,I*=60):(I=NaN,F=z>0&&z<1?0:I),new Sa(I,F,z)}function jr(h,y,w){h=Gn(h),y=Gn(y),w=Gn(w);var C=Uf((.4124564*h+.3575761*y+.1804375*w)/Un),E=Uf((.2126729*h+.7151522*y+.072175*w)/_s),L=Uf((.0193339*h+.119192*y+.9503041*w)/ws);return xn(116*E-16,500*(C-E),200*(E-L))}function Gn(h){return(h/=255)<=.04045?h/12.92:Math.pow((h+.055)/1.055,2.4)}function Ea(h){var y=parseFloat(h);return h.charAt(h.length-1)==="%"?Math.round(y*2.55):y}var Fn=e.map({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});Fn.forEach(function(h,y){Fn.set(h,ll(y))});function Vt(h){return typeof h=="function"?h:function(){return h}}e.functor=Vt,e.xhr=bo($);function bo(h){return function(y,w,C){return arguments.length===2&&typeof w=="function"&&(C=w,w=null),Ul(y,w,h,C)}}function Ul(h,y,w,C){var E={},L=e.dispatch("beforesend","progress","load","error"),I={},F=new XMLHttpRequest,z=null;self.XDomainRequest&&!("withCredentials"in F)&&/^(http(s)?:)?\/\//.test(h)&&(F=new XDomainRequest),"onload"in F?F.onload=F.onerror=X:F.onreadystatechange=function(){F.readyState>3&&X()};function X(){var J=F.status,K;if(!J&&q5(F)||J>=200&&J<300||J===304){try{K=w.call(E,F)}catch(ee){L.error.call(E,ee);return}L.load.call(E,K)}else L.error.call(E,F)}return F.onprogress=function(J){var K=e.event;e.event=J;try{L.progress.call(E,F)}finally{e.event=K}},E.header=function(J,K){return J=(J+"").toLowerCase(),arguments.length<2?I[J]:(K==null?delete I[J]:I[J]=K+"",E)},E.mimeType=function(J){return arguments.length?(y=J==null?null:J+"",E):y},E.responseType=function(J){return arguments.length?(z=J,E):z},E.response=function(J){return w=J,E},["get","post"].forEach(function(J){E[J]=function(){return E.send.apply(E,[J].concat(t(arguments)))}}),E.send=function(J,K,ee){if(arguments.length===2&&typeof K=="function"&&(ee=K,K=null),F.open(J,h,!0),y!=null&&!("accept"in I)&&(I.accept=y+",*/*"),F.setRequestHeader)for(var Me in I)F.setRequestHeader(Me,I[Me]);return y!=null&&F.overrideMimeType&&F.overrideMimeType(y),z!=null&&(F.responseType=z),ee!=null&&E.on("error",ee).on("load",function(qe){ee(null,qe)}),L.beforesend.call(E,F),F.send(K==null?null:K),E},E.abort=function(){return F.abort(),E},e.rebind(E,L,"on"),C==null?E:E.get(Gl(C))}function Gl(h){return h.length===1?function(y,w){h(y==null?w:null)}:h}function q5(h){var y=h.responseType;return y&&y!=="text"?h.response:h.responseText}e.dsv=function(h,y){var w=new RegExp('["'+h+`
]`),C=h.charCodeAt(0);function E(X,J,K){arguments.length<3&&(K=J,J=null);var ee=Ul(X,y,J==null?L:I(J),K);return ee.row=function(Me){return arguments.length?ee.response((J=Me)==null?L:I(Me)):J},ee}function L(X){return E.parse(X.responseText)}function I(X){return function(J){return E.parse(J.responseText,X)}}E.parse=function(X,J){var K;return E.parseRows(X,function(ee,Me){if(K)return K(ee,Me-1);var qe=function(ne){for(var he={},we=ee.length,Fe=0;Fe<we;++Fe)he[ee[Fe]]=ne[Fe];return he};K=J?function(ne,he){return J(qe(ne),he)}:qe})},E.parseRows=function(X,J){var K={},ee={},Me=[],qe=X.length,ne=0,he=0,we,Fe;function Re(){if(ne>=qe)return ee;if(Fe)return Fe=!1,K;var cr=ne;if(X.charCodeAt(cr)===34){for(var Mr=cr;Mr++<qe;)if(X.charCodeAt(Mr)===34){if(X.charCodeAt(Mr+1)!==34)break;++Mr}ne=Mr+2;var Pr=X.charCodeAt(Mr+1);return Pr===13?(Fe=!0,X.charCodeAt(Mr+2)===10&&++ne):Pr===10&&(Fe=!0),X.slice(cr+1,Mr).replace(/""/g,'"')}for(;ne<qe;){var Pr=X.charCodeAt(ne++),Yr=1;if(Pr===10)Fe=!0;else if(Pr===13)Fe=!0,X.charCodeAt(ne)===10&&(++ne,++Yr);else if(Pr!==C)continue;return X.slice(cr,ne-Yr)}return X.slice(cr)}for(;(we=Re())!==ee;){for(var me=[];we!==K&&we!==ee;)me.push(we),we=Re();J&&(me=J(me,he++))==null||Me.push(me)}return Me},E.format=function(X){if(Array.isArray(X[0]))return E.formatRows(X);var J=new U,K=[];return X.forEach(function(ee){for(var Me in ee)J.has(Me)||K.push(J.add(Me))}),[K.map(z).join(h)].concat(X.map(function(ee){return K.map(function(Me){return z(ee[Me])}).join(h)})).join(`
`)},E.formatRows=function(X){return X.map(F).join(`
`)};function F(X){return X.map(z).join(h)}function z(X){return w.test(X)?'"'+X.replace(/\"/g,'""')+'"':X}return E},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Pi,hu,Ms,Do,wv=this[H(this,"requestAnimationFrame")]||function(h){setTimeout(h,17)};e.timer=function(){Ss.apply(this,arguments)};function Ss(h,y,w){var C=arguments.length;C<2&&(y=0),C<3&&(w=Date.now());var E=w+y,L={c:h,t:E,n:null};return hu?hu.n=L:Pi=L,hu=L,Ms||(Do=clearTimeout(Do),Ms=1,wv(ks)),L}function ks(){var h=Gf(),y=td()-h;y>24?(isFinite(y)&&(clearTimeout(Do),Do=setTimeout(ks,y)),Ms=0):(Ms=1,wv(ks))}e.timer.flush=function(){Gf(),td()};function Gf(){for(var h=Date.now(),y=Pi;y;)h>=y.t&&y.c(h-y.t)&&(y.c=null),y=y.n;return h}function td(){for(var h,y=Pi,w=1/0;y;)y.c?(y.t<w&&(w=y.t),y=(h=y).n):y=h?h.n=y.n:Pi=y.n;return hu=h,w}e.round=function(h,y){return y?Math.round(h*(y=Math.pow(10,y)))/y:Math.round(h)},e.geom={};function Hl(h){return h[0]}function du(h){return h[1]}e.geom.hull=function(h){var y=Hl,w=du;if(arguments.length)return C(h);function C(E){if(E.length<3)return[];var L=Vt(y),I=Vt(w),F,z=E.length,X=[],J=[];for(F=0;F<z;F++)X.push([+L.call(this,E[F],F),+I.call(this,E[F],F),F]);for(X.sort(F5),F=0;F<z;F++)J.push([X[F][0],-X[F][1]]);var K=Rm(X),ee=Rm(J),Me=ee[0]===K[0],qe=ee[ee.length-1]===K[K.length-1],ne=[];for(F=K.length-1;F>=0;--F)ne.push(E[X[K[F]][2]]);for(F=+Me;F<ee.length-qe;++F)ne.push(E[X[ee[F]][2]]);return ne}return C.x=function(E){return arguments.length?(y=E,C):y},C.y=function(E){return arguments.length?(w=E,C):w},C};function Rm(h){for(var y=h.length,w=[0,1],C=2,E=2;E<y;E++){for(;C>1&&aa(h[w[C-2]],h[w[C-1]],h[E])<=0;)--C;w[C++]=E}return w.slice(0,C)}function F5(h,y){return h[0]-y[0]||h[1]-y[1]}e.geom.polygon=function(h){return re(h,Av),h};var Av=e.geom.polygon.prototype=[];Av.area=function(){for(var h=-1,y=this.length,w,C=this[y-1],E=0;++h<y;)w=C,C=this[h],E+=w[1]*C[0]-w[0]*C[1];return E*.5},Av.centroid=function(h){var y=-1,w=this.length,C=0,E=0,L,I=this[w-1],F;for(arguments.length||(h=-1/(6*this.area()));++y<w;)L=I,I=this[y],F=L[0]*I[1]-I[0]*L[1],C+=(L[0]+I[0])*F,E+=(L[1]+I[1])*F;return[C*h,E*h]},Av.clip=function(h){for(var y,w=Vf(h),C=-1,E=this.length-Vf(this),L,I,F=this[E-1],z,X,J;++C<E;){for(y=h.slice(),h.length=0,z=this[C],X=y[(I=y.length-w)-1],L=-1;++L<I;)J=y[L],ad(J,F,z)?(ad(X,F,z)||h.push(Hf(X,J,F,z)),h.push(J)):ad(X,F,z)&&h.push(Hf(X,J,F,z)),X=J;w&&h.push(h[0]),F=z}return h};function ad(h,y,w){return(w[0]-y[0])*(h[1]-y[1])<(w[1]-y[1])*(h[0]-y[0])}function Hf(h,y,w,C){var E=h[0],L=w[0],I=y[0]-E,F=C[0]-L,z=h[1],X=w[1],J=y[1]-z,K=C[1]-X,ee=(F*(z-X)-K*(E-L))/(K*I-F*J);return[E+ee*I,z+ee*J]}function Vf(h){var y=h[0],w=h[h.length-1];return!(y[0]-w[0]||y[1]-w[1])}var Vl,sl,xo,Tv=[],Yf,Cs,Mv=[];function Pm(){Xf(this),this.edge=this.site=this.circle=null}function nd(h){var y=Tv.pop()||new Pm;return y.site=h,y}function Sv(h){mu(h),xo.remove(h),Tv.push(h),Xf(h)}function Nm(h){var y=h.circle,w=y.x,C=y.cy,E={x:w,y:C},L=h.P,I=h.N,F=[h];Sv(h);for(var z=L;z.circle&&b(w-z.circle.x)<ye&&b(C-z.circle.cy)<ye;)L=z.P,F.unshift(z),Sv(z),z=L;F.unshift(z),mu(z);for(var X=I;X.circle&&b(w-X.circle.x)<ye&&b(C-X.circle.cy)<ye;)I=X.N,F.push(X),Sv(X),X=I;F.push(X),mu(X);var J=F.length,K;for(K=1;K<J;++K)X=F[K],z=F[K-1],yu(X.edge,z.site,X.site,E);z=F[0],X=F[J-1],X.edge=Wf(z.site,X.site,null,E),qo(z),qo(X)}function Im(h){for(var y=h.x,w=h.y,C,E,L,I,F=xo._;F;)if(L=id(F,w)-y,L>ye)F=F.L;else if(I=y-Om(F,w),I>ye){if(!F.R){C=F;break}F=F.R}else{L>-ye?(C=F.P,E=F):I>-ye?(C=F,E=F.N):C=E=F;break}var z=nd(h);if(xo.insert(C,z),!(!C&&!E)){if(C===E){mu(C),E=nd(C.site),xo.insert(z,E),z.edge=E.edge=Wf(C.site,z.site),qo(C),qo(E);return}if(!E){z.edge=Wf(C.site,z.site);return}mu(C),mu(E);var X=C.site,J=X.x,K=X.y,ee=h.x-J,Me=h.y-K,qe=E.site,ne=qe.x-J,he=qe.y-K,we=2*(ee*he-Me*ne),Fe=ee*ee+Me*Me,Re=ne*ne+he*he,me={x:(he*Fe-Me*Re)/we+J,y:(ee*Re-ne*Fe)/we+K};yu(E.edge,X,qe,me),z.edge=Wf(X,h,null,me),E.edge=Wf(h,qe,null,me),qo(C),qo(E)}}function id(h,y){var w=h.site,C=w.x,E=w.y,L=E-y;if(!L)return C;var I=h.P;if(!I)return-1/0;w=I.site;var F=w.x,z=w.y,X=z-y;if(!X)return F;var J=F-C,K=1/L-1/X,ee=J/X;return K?(-ee+Math.sqrt(ee*ee-2*K*(J*J/(-2*X)-z+X/2+E-L/2)))/K+C:(C+F)/2}function Om(h,y){var w=h.N;if(w)return id(w,y);var C=h.site;return C.y===y?C.x:1/0}function od(h){this.site=h,this.edges=[]}od.prototype.prepare=function(){for(var h=this.edges,y=h.length,w;y--;)w=h[y].edge,(!w.b||!w.a)&&h.splice(y,1);return h.sort(kv),h.length};function pu(h){for(var y=h[0][0],w=h[1][0],C=h[0][1],E=h[1][1],L,I,F,z,X=sl,J=X.length,K,ee,Me,qe,ne,he;J--;)if(K=X[J],!(!K||!K.prepare()))for(Me=K.edges,qe=Me.length,ee=0;ee<qe;)he=Me[ee].end(),F=he.x,z=he.y,ne=Me[++ee%qe].start(),L=ne.x,I=ne.y,(b(F-L)>ye||b(z-I)>ye)&&(Me.splice(ee,0,new Cv(N5(K.site,he,b(F-y)<ye&&E-z>ye?{x:y,y:b(L-y)<ye?I:E}:b(z-E)<ye&&w-F>ye?{x:b(I-E)<ye?L:w,y:E}:b(F-w)<ye&&z-C>ye?{x:w,y:b(L-w)<ye?I:C}:b(z-C)<ye&&F-y>ye?{x:b(I-C)<ye?L:y,y:C}:null),K.site,null)),++qe)}function kv(h,y){return y.angle-h.angle}function ld(){Xf(this),this.x=this.y=this.arc=this.site=this.cy=null}function qo(h){var y=h.P,w=h.N;if(!(!y||!w)){var C=y.site,E=h.site,L=w.site;if(C!==L){var I=E.x,F=E.y,z=C.x-I,X=C.y-F,J=L.x-I,he=L.y-F,K=2*(z*he-X*J);if(!(K>=-Ge)){var ee=z*z+X*X,Me=J*J+he*he,qe=(he*ee-X*Me)/K,ne=(z*Me-J*ee)/K,he=ne+F,we=Mv.pop()||new ld;we.arc=h,we.site=E,we.x=qe+I,we.y=he+Math.sqrt(qe*qe+ne*ne),we.cy=he,h.circle=we;for(var Fe=null,Re=Cs._;Re;)if(we.y<Re.y||we.y===Re.y&&we.x<=Re.x)if(Re.L)Re=Re.L;else{Fe=Re.P;break}else if(Re.R)Re=Re.R;else{Fe=Re;break}Cs.insert(Fe,we),Fe||(Yf=we)}}}}function mu(h){var y=h.circle;y&&(y.P||(Yf=y.N),Cs.remove(y),Mv.push(y),Xf(y),h.circle=null)}function R5(h,y,w,C){return function(E){var L=E.a,I=E.b,F=L.x,z=L.y,X=I.x,J=I.y,K=0,ee=1,Me=X-F,qe=J-z,ne;if(ne=h-F,!(!Me&&ne>0)){if(ne/=Me,Me<0){if(ne<K)return;ne<ee&&(ee=ne)}else if(Me>0){if(ne>ee)return;ne>K&&(K=ne)}if(ne=w-F,!(!Me&&ne<0)){if(ne/=Me,Me<0){if(ne>ee)return;ne>K&&(K=ne)}else if(Me>0){if(ne<K)return;ne<ee&&(ee=ne)}if(ne=y-z,!(!qe&&ne>0)){if(ne/=qe,qe<0){if(ne<K)return;ne<ee&&(ee=ne)}else if(qe>0){if(ne>ee)return;ne>K&&(K=ne)}if(ne=C-z,!(!qe&&ne<0)){if(ne/=qe,qe<0){if(ne>ee)return;ne>K&&(K=ne)}else if(qe>0){if(ne<K)return;ne<ee&&(ee=ne)}return K>0&&(E.a={x:F+K*Me,y:z+K*qe}),ee<1&&(E.b={x:F+ee*Me,y:z+ee*qe}),E}}}}}}function P5(h){for(var y=Vl,w=R5(h[0][0],h[0][1],h[1][0],h[1][1]),C=y.length,E;C--;)E=y[C],(!sd(E,h)||!w(E)||b(E.a.x-E.b.x)<ye&&b(E.a.y-E.b.y)<ye)&&(E.a=E.b=null,y.splice(C,1))}function sd(h,y){var w=h.b;if(w)return!0;var C=h.a,E=y[0][0],L=y[1][0],I=y[0][1],F=y[1][1],z=h.l,X=h.r,J=z.x,K=z.y,ee=X.x,Me=X.y,qe=(J+ee)/2,ne=(K+Me)/2,he,we;if(Me===K){if(qe<E||qe>=L)return;if(J>ee){if(!C)C={x:qe,y:I};else if(C.y>=F)return;w={x:qe,y:F}}else{if(!C)C={x:qe,y:F};else if(C.y<I)return;w={x:qe,y:I}}}else if(he=(J-ee)/(Me-K),we=ne-he*qe,he<-1||he>1)if(J>ee){if(!C)C={x:(I-we)/he,y:I};else if(C.y>=F)return;w={x:(F-we)/he,y:F}}else{if(!C)C={x:(F-we)/he,y:F};else if(C.y<I)return;w={x:(I-we)/he,y:I}}else if(K<Me){if(!C)C={x:E,y:he*E+we};else if(C.x>=L)return;w={x:L,y:he*L+we}}else{if(!C)C={x:L,y:he*L+we};else if(C.x<E)return;w={x:E,y:he*E+we}}return h.a=C,h.b=w,!0}function zm(h,y){this.l=h,this.r=y,this.a=this.b=null}function Wf(h,y,w,C){var E=new zm(h,y);return Vl.push(E),w&&yu(E,h,y,w),C&&yu(E,y,h,C),sl[h.i].edges.push(new Cv(E,h,y)),sl[y.i].edges.push(new Cv(E,y,h)),E}function N5(h,y,w){var C=new zm(h,null);return C.a=y,C.b=w,Vl.push(C),C}function yu(h,y,w,C){!h.a&&!h.b?(h.a=C,h.l=y,h.r=w):h.l===w?h.b=C:h.a=C}function Cv(h,y,w){var C=h.a,E=h.b;this.edge=h,this.site=y,this.angle=w?Math.atan2(w.y-y.y,w.x-y.x):h.l===y?Math.atan2(E.x-C.x,C.y-E.y):Math.atan2(C.x-E.x,E.y-C.y)}Cv.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function jf(){this._=null}function Xf(h){h.U=h.C=h.L=h.R=h.P=h.N=null}jf.prototype={insert:function(h,y){var w,C,E;if(h){if(y.P=h,y.N=h.N,h.N&&(h.N.P=y),h.N=y,h.R){for(h=h.R;h.L;)h=h.L;h.L=y}else h.R=y;w=h}else this._?(h=Bm(this._),y.P=null,y.N=h,h.P=h.L=y,w=h):(y.P=y.N=null,this._=y,w=null);for(y.L=y.R=null,y.U=w,y.C=!0,h=y;w&&w.C;)C=w.U,w===C.L?(E=C.R,E&&E.C?(w.C=E.C=!1,C.C=!0,h=C):(h===w.R&&(gu(this,w),h=w,w=h.U),w.C=!1,C.C=!0,Es(this,C))):(E=C.L,E&&E.C?(w.C=E.C=!1,C.C=!0,h=C):(h===w.L&&(Es(this,w),h=w,w=h.U),w.C=!1,C.C=!0,gu(this,C))),w=h.U;this._.C=!1},remove:function(h){h.N&&(h.N.P=h.P),h.P&&(h.P.N=h.N),h.N=h.P=null;var y=h.U,w,C=h.L,E=h.R,L,I;if(C?E?L=Bm(E):L=C:L=E,y?y.L===h?y.L=L:y.R=L:this._=L,C&&E?(I=L.C,L.C=h.C,L.L=C,C.U=L,L!==E?(y=L.U,L.U=h.U,h=L.R,y.L=h,L.R=E,E.U=L):(L.U=y,y=L,h=L.R)):(I=h.C,h=L),h&&(h.U=y),!I){if(h&&h.C){h.C=!1;return}do{if(h===this._)break;if(h===y.L){if(w=y.R,w.C&&(w.C=!1,y.C=!0,gu(this,y),w=y.R),w.L&&w.L.C||w.R&&w.R.C){(!w.R||!w.R.C)&&(w.L.C=!1,w.C=!0,Es(this,w),w=y.R),w.C=y.C,y.C=w.R.C=!1,gu(this,y),h=this._;break}}else if(w=y.L,w.C&&(w.C=!1,y.C=!0,Es(this,y),w=y.L),w.L&&w.L.C||w.R&&w.R.C){(!w.L||!w.L.C)&&(w.R.C=!1,w.C=!0,gu(this,w),w=y.L),w.C=y.C,y.C=w.L.C=!1,Es(this,y),h=this._;break}w.C=!0,h=y,y=y.U}while(!h.C);h&&(