plotly.js
Version:
The open source javascript graphing library that powers plotly
18 lines • 1.17 MB
JavaScript
/**
* plotly.js (geo - 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 B_=Object.defineProperty;var OI=Object.getOwnPropertyDescriptor;var UI=Object.getOwnPropertyNames;var YI=Object.prototype.hasOwnProperty;var O_=(e,r)=>()=>(e&&(r=e(e=0)),r);var ne=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var GI=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of UI(r))!YI.call(e,a)&&a!==t&&B_(e,a,{get:()=>r[a],enumerable:!(n=OI(r,a))||n.enumerable});return e};var VI=e=>GI(B_({},"__esModule",{value:!0}),e);var Jh=ne(U_=>{"use strict";U_.version="3.0.1"});var G_=ne((Y_,$h)=>{(function(r,t,n){t[r]=t[r]||n(),typeof $h!="undefined"&&$h.exports&&($h.exports=t[r])})("Promise",typeof window!="undefined"?window:Y_,function(){"use strict";var r,t,n,a=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(S){return setImmediate(S)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(S,x,b,A){return Object.defineProperty(S,x,{value:b,writable:!0,configurable:A!==!1})}}catch(_){r=function(x,b,A){return x[b]=A,x}}n=function(){var S,x,b;function A(k,M){this.fn=k,this.self=M,this.next=void 0}return{add:function(M,D){b=new A(M,D),x?x.next=b:S=b,x=b,b=void 0},drain:function(){var M=S;for(S=x=t=void 0;M;)M.fn.call(M.self),M=M.next}}}();function o(_,S){n.add(_,S),t||(t=i(n.drain))}function l(_){var S,x=typeof _;return _!=null&&(x=="object"||x=="function")&&(S=_.then),typeof S=="function"?S:!1}function s(){for(var _=0;_<this.chain.length;_++)u(this,this.state===1?this.chain[_].success:this.chain[_].failure,this.chain[_]);this.chain.length=0}function u(_,S,x){var b,A;try{S===!1?x.reject(_.msg):(S===!0?b=_.msg:b=S.call(void 0,_.msg),b===x.promise?x.reject(TypeError("Promise-chain cycle")):(A=l(b))?A.call(b,x.resolve,x.reject):x.resolve(b))}catch(k){x.reject(k)}}function f(_){var S,x=this;if(!x.triggered){x.triggered=!0,x.def&&(x=x.def);try{(S=l(_))?o(function(){var b=new d(x);try{S.call(_,function(){f.apply(b,arguments)},function(){v.apply(b,arguments)})}catch(A){v.call(b,A)}}):(x.msg=_,x.state=1,x.chain.length>0&&o(s,x))}catch(b){v.call(new d(x),b)}}}function v(_){var S=this;S.triggered||(S.triggered=!0,S.def&&(S=S.def),S.msg=_,S.state=2,S.chain.length>0&&o(s,S))}function h(_,S,x,b){for(var A=0;A<S.length;A++)(function(M){_.resolve(S[M]).then(function(z){x(M,z)},b)})(A)}function d(_){this.def=_,this.triggered=!1}function m(_){this.promise=_,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(_){if(typeof _!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var S=new m(this);this.then=function(b,A){var k={success:typeof b=="function"?b:!0,failure:typeof A=="function"?A:!1};return k.promise=new this.constructor(function(D,z){if(typeof D!="function"||typeof z!="function")throw TypeError("Not a function");k.resolve=D,k.reject=z}),S.chain.push(k),S.state!==0&&o(s,S),k.promise},this.catch=function(b){return this.then(void 0,b)};try{_.call(void 0,function(b){f.call(S,b)},function(b){v.call(S,b)})}catch(x){v.call(S,x)}}var y=r({},"constructor",g,!1);return g.prototype=y,r(y,"__NPO__",0,!1),r(g,"resolve",function(S){var x=this;return S&&typeof S=="object"&&S.__NPO__===1?S:new x(function(A,k){if(typeof A!="function"||typeof k!="function")throw TypeError("Not a function");A(S)})}),r(g,"reject",function(S){return new this(function(b,A){if(typeof b!="function"||typeof A!="function")throw TypeError("Not a function");A(S)})}),r(g,"all",function(S){var x=this;return a.call(S)!="[object Array]"?x.reject(TypeError("Not an array")):S.length===0?x.resolve([]):new x(function(A,k){if(typeof A!="function"||typeof k!="function")throw TypeError("Not a function");var M=S.length,D=Array(M),z=0;h(x,S,function(H,Y){D[H]=Y,++z===M&&A(D)},k)})}),r(g,"race",function(S){var x=this;return a.call(S)!="[object Array]"?x.reject(TypeError("Not an array")):new x(function(A,k){if(typeof A!="function"||typeof k!="function")throw TypeError("Not a function");h(x,S,function(D,z){A(z)},k)})}),g})});var kt=ne((Uoe,Kh)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(c){return r.call(c)},n=self.document;function a(c){return c&&(c.ownerDocument||c.document||c).documentElement}function i(c){return c&&(c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView)}if(n)try{t(n.documentElement.childNodes)[0].nodeType}catch(c){t=function(p){for(var w=p.length,C=new Array(w);w--;)C[w]=p[w];return C}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(c){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;o.setAttribute=function(p,w){l.call(this,p,w+"")},o.setAttributeNS=function(p,w,C){s.call(this,p,w,C+"")},u.setProperty=function(p,w,C){f.call(this,p,w+"",C)}}e.ascending=v;function v(c,p){return c<p?-1:c>p?1:c>=p?0:NaN}e.descending=function(c,p){return p<c?-1:p>c?1:p>=c?0:NaN},e.min=function(c,p){var w=-1,C=c.length,q,E;if(arguments.length===1){for(;++w<C;)if((E=c[w])!=null&&E>=E){q=E;break}for(;++w<C;)(E=c[w])!=null&&q>E&&(q=E)}else{for(;++w<C;)if((E=p.call(c,c[w],w))!=null&&E>=E){q=E;break}for(;++w<C;)(E=p.call(c,c[w],w))!=null&&q>E&&(q=E)}return q},e.max=function(c,p){var w=-1,C=c.length,q,E;if(arguments.length===1){for(;++w<C;)if((E=c[w])!=null&&E>=E){q=E;break}for(;++w<C;)(E=c[w])!=null&&E>q&&(q=E)}else{for(;++w<C;)if((E=p.call(c,c[w],w))!=null&&E>=E){q=E;break}for(;++w<C;)(E=p.call(c,c[w],w))!=null&&E>q&&(q=E)}return q},e.extent=function(c,p){var w=-1,C=c.length,q,E,G;if(arguments.length===1){for(;++w<C;)if((E=c[w])!=null&&E>=E){q=G=E;break}for(;++w<C;)(E=c[w])!=null&&(q>E&&(q=E),G<E&&(G=E))}else{for(;++w<C;)if((E=p.call(c,c[w],w))!=null&&E>=E){q=G=E;break}for(;++w<C;)(E=p.call(c,c[w],w))!=null&&(q>E&&(q=E),G<E&&(G=E))}return[q,G]};function h(c){return c===null?NaN:+c}function d(c){return!isNaN(c)}e.sum=function(c,p){var w=0,C=c.length,q,E=-1;if(arguments.length===1)for(;++E<C;)d(q=+c[E])&&(w+=q);else for(;++E<C;)d(q=+p.call(c,c[E],E))&&(w+=q);return w},e.mean=function(c,p){var w=0,C=c.length,q,E=-1,G=C;if(arguments.length===1)for(;++E<C;)d(q=h(c[E]))?w+=q:--G;else for(;++E<C;)d(q=h(p.call(c,c[E],E)))?w+=q:--G;if(G)return w/G},e.quantile=function(c,p){var w=(c.length-1)*p+1,C=Math.floor(w),q=+c[C-1],E=w-C;return E?q+E*(c[C]-q):q},e.median=function(c,p){var w=[],C=c.length,q,E=-1;if(arguments.length===1)for(;++E<C;)d(q=h(c[E]))&&w.push(q);else for(;++E<C;)d(q=h(p.call(c,c[E],E)))&&w.push(q);if(w.length)return e.quantile(w.sort(v),.5)},e.variance=function(c,p){var w=c.length,C=0,q,E,G=0,N=-1,j=0;if(arguments.length===1)for(;++N<w;)d(q=h(c[N]))&&(E=q-C,C+=E/++j,G+=E*(q-C));else for(;++N<w;)d(q=h(p.call(c,c[N],N)))&&(E=q-C,C+=E/++j,G+=E*(q-C));if(j>1)return G/(j-1)},e.deviation=function(){var c=e.variance.apply(this,arguments);return c&&Math.sqrt(c)};function m(c){return{left:function(p,w,C,q){for(arguments.length<3&&(C=0),arguments.length<4&&(q=p.length);C<q;){var E=C+q>>>1;c(p[E],w)<0?C=E+1:q=E}return C},right:function(p,w,C,q){for(arguments.length<3&&(C=0),arguments.length<4&&(q=p.length);C<q;){var E=C+q>>>1;c(p[E],w)>0?q=E:C=E+1}return C}}}var g=m(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(c){return m(c.length===1?function(p,w){return v(c(p),w)}:c)},e.shuffle=function(c,p,w){(C=arguments.length)<3&&(w=c.length,C<2&&(p=0));for(var C=w-p,q,E;C;)E=Math.random()*C--|0,q=c[C+p],c[C+p]=c[E+p],c[E+p]=q;return c},e.permute=function(c,p){for(var w=p.length,C=new Array(w);w--;)C[w]=c[p[w]];return C},e.pairs=function(c){for(var p=0,w=c.length-1,C,q=c[0],E=new Array(w<0?0:w);p<w;)E[p]=[C=q,q=c[++p]];return E},e.transpose=function(c){if(!(E=c.length))return[];for(var p=-1,w=e.min(c,y),C=new Array(w);++p<w;)for(var q=-1,E,G=C[p]=new Array(E);++q<E;)G[q]=c[q][p];return C};function y(c){return c.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(c){var p=[];for(var w in c)p.push(w);return p},e.values=function(c){var p=[];for(var w in c)p.push(c[w]);return p},e.entries=function(c){var p=[];for(var w in c)p.push({key:w,value:c[w]});return p},e.merge=function(c){for(var p=c.length,w,C=-1,q=0,E,G;++C<p;)q+=c[C].length;for(E=new Array(q);--p>=0;)for(G=c[p],w=G.length;--w>=0;)E[--q]=G[w];return E};var _=Math.abs;e.range=function(c,p,w){if(arguments.length<3&&(w=1,arguments.length<2&&(p=c,c=0)),(p-c)/w===1/0)throw new Error("infinite range");var C=[],q=S(_(w)),E=-1,G;if(c*=q,p*=q,w*=q,w<0)for(;(G=c+w*++E)>p;)C.push(G/q);else for(;(G=c+w*++E)<p;)C.push(G/q);return C};function S(c){for(var p=1;c*p%1;)p*=10;return p}function x(c,p){for(var w in p)Object.defineProperty(c.prototype,w,{value:p[w],enumerable:!1})}e.map=function(c,p){var w=new b;if(c instanceof b)c.forEach(function(N,j){w.set(N,j)});else if(Array.isArray(c)){var C=-1,q=c.length,E;if(arguments.length===1)for(;++C<q;)w.set(C,c[C]);else for(;++C<q;)w.set(p.call(c,E=c[C],C),E)}else for(var G in c)w.set(G,c[G]);return w};function b(){this._=Object.create(null)}var A="__proto__",k="\0";x(b,{has:z,get:function(c){return this._[M(c)]},set:function(c,p){return this._[M(c)]=p},remove:F,keys:H,values:function(){var c=[];for(var p in this._)c.push(this._[p]);return c},entries:function(){var c=[];for(var p in this._)c.push({key:D(p),value:this._[p]});return c},size:Y,empty:O,forEach:function(c){for(var p in this._)c.call(this,D(p),this._[p])}});function M(c){return(c+="")===A||c[0]===k?k+c:c}function D(c){return(c+="")[0]===k?c.slice(1):c}function z(c){return M(c)in this._}function F(c){return(c=M(c))in this._&&delete this._[c]}function H(){var c=[];for(var p in this._)c.push(D(p));return c}function Y(){var c=0;for(var p in this._)++c;return c}function O(){for(var c in this._)return!1;return!0}e.nest=function(){var c={},p=[],w=[],C,q;function E(N,j,ae){if(ae>=p.length)return q?q.call(c,j):C?j.sort(C):j;for(var ie=-1,ge=j.length,me=p[ae++],Re,Ye,ye,Ce=new b,De;++ie<ge;)(De=Ce.get(Re=me(Ye=j[ie])))?De.push(Ye):Ce.set(Re,[Ye]);return N?(Ye=N(),ye=function(Ue,Ge){Ye.set(Ue,E(N,Ge,ae))}):(Ye={},ye=function(Ue,Ge){Ye[Ue]=E(N,Ge,ae)}),Ce.forEach(ye),Ye}function G(N,j){if(j>=p.length)return N;var ae=[],ie=w[j++];return N.forEach(function(ge,me){ae.push({key:ge,values:G(me,j)})}),ie?ae.sort(function(ge,me){return ie(ge.key,me.key)}):ae}return c.map=function(N,j){return E(j,N,0)},c.entries=function(N){return G(E(e.map,N,0),0)},c.key=function(N){return p.push(N),c},c.sortKeys=function(N){return w[p.length-1]=N,c},c.sortValues=function(N){return C=N,c},c.rollup=function(N){return q=N,c},c},e.set=function(c){var p=new X;if(c)for(var w=0,C=c.length;w<C;++w)p.add(c[w]);return p};function X(){this._=Object.create(null)}x(X,{has:z,add:function(c){return this._[M(c+="")]=!0,c},remove:F,values:H,size:Y,empty:O,forEach:function(c){for(var p in this._)c.call(this,D(p))}}),e.behavior={};function V(c){return c}e.rebind=function(c,p){for(var w=1,C=arguments.length,q;++w<C;)c[q=arguments[w]]=ee(c,p,p[q]);return c};function ee(c,p,w){return function(){var C=w.apply(p,arguments);return C===p?c:C}}function te(c,p){if(p in c)return p;p=p.charAt(0).toUpperCase()+p.slice(1);for(var w=0,C=K.length;w<C;++w){var q=K[w]+p;if(q in c)return q}}var K=["webkit","ms","moz","Moz","o","O"];function re(){}e.dispatch=function(){for(var c=new fe,p=-1,w=arguments.length;++p<w;)c[arguments[p]]=de(c);return c};function fe(){}fe.prototype.on=function(c,p){var w=c.indexOf("."),C="";if(w>=0&&(C=c.slice(w+1),c=c.slice(0,w)),c)return arguments.length<2?this[c].on(C):this[c].on(C,p);if(arguments.length===2){if(p==null)for(c in this)this.hasOwnProperty(c)&&this[c].on(C,null);return this}};function de(c){var p=[],w=new b;function C(){for(var q=p,E=-1,G=q.length,N;++E<G;)(N=q[E].on)&&N.apply(this,arguments);return c}return C.on=function(q,E){var G=w.get(q),N;return arguments.length<2?G&&G.on:(G&&(G.on=null,p=p.slice(0,N=p.indexOf(G)).concat(p.slice(N+1)),w.remove(q)),E&&p.push(w.set(q,{on:E})),c)},C}e.event=null;function qe(){e.event.preventDefault()}function Be(){for(var c=e.event,p;p=c.sourceEvent;)c=p;return c}function Ne(c){for(var p=new fe,w=0,C=arguments.length;++w<C;)p[arguments[w]]=de(p);return p.of=function(q,E){return function(G){try{var N=G.sourceEvent=e.event;G.target=c,e.event=G,p[G.type].apply(q,E)}finally{e.event=N}}},p}e.requote=function(c){return c.replace(Ie,"\\$&")};var Ie=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Se={}.__proto__?function(c,p){c.__proto__=p}:function(c,p){for(var w in p)c[w]=p[w]};function Xe(c){return Se(c,pe),c}var se=function(c,p){return p.querySelector(c)},be=function(c,p){return p.querySelectorAll(c)},Te=function(c,p){var w=c.matches||c[te(c,"matchesSelector")];return Te=function(C,q){return w.call(C,q)},Te(c,p)};typeof Sizzle=="function"&&(se=function(c,p){return Sizzle(c,p)[0]||null},be=Sizzle,Te=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var pe=e.selection.prototype=[];pe.select=function(c){var p=[],w,C,q,E;c=W(c);for(var G=-1,N=this.length;++G<N;){p.push(w=[]),w.parentNode=(q=this[G]).parentNode;for(var j=-1,ae=q.length;++j<ae;)(E=q[j])?(w.push(C=c.call(E,E.__data__,j,G)),C&&"__data__"in E&&(C.__data__=E.__data__)):w.push(null)}return Xe(p)};function W(c){return typeof c=="function"?c:function(){return se(c,this)}}pe.selectAll=function(c){var p=[],w,C;c=Q(c);for(var q=-1,E=this.length;++q<E;)for(var G=this[q],N=-1,j=G.length;++N<j;)(C=G[N])&&(p.push(w=t(c.call(C,C.__data__,N,q))),w.parentNode=C);return Xe(p)};function Q(c){return typeof c=="function"?c:function(){return be(c,this)}}var $="http://www.w3.org/1999/xhtml",Me={svg:"http://www.w3.org/2000/svg",xhtml:$,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:Me,qualify:function(c){var p=c.indexOf(":"),w=c;return p>=0&&(w=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),Me.hasOwnProperty(w)?{space:Me[w],local:c}:c}},pe.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var w=this.node();return c=e.ns.qualify(c),c.local?w.getAttributeNS(c.space,c.local):w.getAttribute(c)}for(p in c)this.each(Fe(p,c[p]));return this}return this.each(Fe(c,p))};function Fe(c,p){c=e.ns.qualify(c);function w(){this.removeAttribute(c)}function C(){this.removeAttributeNS(c.space,c.local)}function q(){this.setAttribute(c,p)}function E(){this.setAttributeNS(c.space,c.local,p)}function G(){var j=p.apply(this,arguments);j==null?this.removeAttribute(c):this.setAttribute(c,j)}function N(){var j=p.apply(this,arguments);j==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,j)}return p==null?c.local?C:w:typeof p=="function"?c.local?N:G:c.local?E:q}function Oe(c){return c.trim().replace(/\s+/g," ")}pe.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var w=this.node(),C=(c=nr(c)).length,q=-1;if(p=w.classList){for(;++q<C;)if(!p.contains(c[q]))return!1}else for(p=w.getAttribute("class");++q<C;)if(!fr(c[q]).test(p))return!1;return!0}for(p in c)this.each(Ze(p,c[p]));return this}return this.each(Ze(c,p))};function fr(c){return new RegExp("(?:^|\\s+)"+e.requote(c)+"(?:\\s+|$)","g")}function nr(c){return(c+"").trim().split(/^|\s+/)}function Ze(c,p){c=nr(c).map(ar);var w=c.length;function C(){for(var E=-1;++E<w;)c[E](this,p)}function q(){for(var E=-1,G=p.apply(this,arguments);++E<w;)c[E](this,G)}return typeof p=="function"?q:C}function ar(c){var p=fr(c);return function(w,C){if(q=w.classList)return C?q.add(c):q.remove(c);var q=w.getAttribute("class")||"";C?(p.lastIndex=0,p.test(q)||w.setAttribute("class",Oe(q+" "+c))):w.setAttribute("class",Oe(q.replace(p," ")))}}pe.style=function(c,p,w){var C=arguments.length;if(C<3){if(typeof c!="string"){C<2&&(p="");for(w in c)this.each(lr(w,c[w],p));return this}if(C<2){var q=this.node();return i(q).getComputedStyle(q,null).getPropertyValue(c)}w=""}return this.each(lr(c,p,w))};function lr(c,p,w){function C(){this.style.removeProperty(c)}function q(){this.style.setProperty(c,p,w)}function E(){var G=p.apply(this,arguments);G==null?this.style.removeProperty(c):this.style.setProperty(c,G,w)}return p==null?C:typeof p=="function"?E:q}pe.property=function(c,p){if(arguments.length<2){if(typeof c=="string")return this.node()[c];for(p in c)this.each(ir(p,c[p]));return this}return this.each(ir(c,p))};function ir(c,p){function w(){delete this[c]}function C(){this[c]=p}function q(){var E=p.apply(this,arguments);E==null?delete this[c]:this[c]=E}return p==null?w:typeof p=="function"?q:C}pe.text=function(c){return arguments.length?this.each(typeof c=="function"?function(){var p=c.apply(this,arguments);this.textContent=p==null?"":p}:c==null?function(){this.textContent=""}:function(){this.textContent=c}):this.node().textContent},pe.html=function(c){return arguments.length?this.each(typeof c=="function"?function(){var p=c.apply(this,arguments);this.innerHTML=p==null?"":p}:c==null?function(){this.innerHTML=""}:function(){this.innerHTML=c}):this.node().innerHTML},pe.append=function(c){return c=rr(c),this.select(function(){return this.appendChild(c.apply(this,arguments))})};function rr(c){function p(){var C=this.ownerDocument,q=this.namespaceURI;return q===$&&C.documentElement.namespaceURI===$?C.createElement(c):C.createElementNS(q,c)}function w(){return this.ownerDocument.createElementNS(c.space,c.local)}return typeof c=="function"?c:(c=e.ns.qualify(c)).local?w:p}pe.insert=function(c,p){return c=rr(c),p=W(p),this.select(function(){return this.insertBefore(c.apply(this,arguments),p.apply(this,arguments)||null)})},pe.remove=function(){return this.each(Cr)};function Cr(){var c=this.parentNode;c&&c.removeChild(this)}pe.data=function(c,p){var w=-1,C=this.length,q,E;if(!arguments.length){for(c=new Array(C=(q=this[0]).length);++w<C;)(E=q[w])&&(c[w]=E.__data__);return c}function G(ie,ge){var me,Re=ie.length,Ye=ge.length,ye=Math.min(Re,Ye),Ce=new Array(Ye),De=new Array(Ye),Ue=new Array(Re),Ge,Pe;if(p){var _r=new b,Or=new Array(Re),Wr;for(me=-1;++me<Re;)(Ge=ie[me])&&(_r.has(Wr=p.call(Ge,Ge.__data__,me))?Ue[me]=Ge:_r.set(Wr,Ge),Or[me]=Wr);for(me=-1;++me<Ye;)(Ge=_r.get(Wr=p.call(ge,Pe=ge[me],me)))?Ge!==!0&&(Ce[me]=Ge,Ge.__data__=Pe):De[me]=yr(Pe),_r.set(Wr,!0);for(me=-1;++me<Re;)me in Or&&_r.get(Or[me])!==!0&&(Ue[me]=ie[me])}else{for(me=-1;++me<ye;)Ge=ie[me],Pe=ge[me],Ge?(Ge.__data__=Pe,Ce[me]=Ge):De[me]=yr(Pe);for(;me<Ye;++me)De[me]=yr(ge[me]);for(;me<Re;++me)Ue[me]=ie[me]}De.update=Ce,De.parentNode=Ce.parentNode=Ue.parentNode=ie.parentNode,N.push(De),j.push(Ce),ae.push(Ue)}var N=zr([]),j=Xe([]),ae=Xe([]);if(typeof c=="function")for(;++w<C;)G(q=this[w],c.call(q,q.parentNode.__data__,w));else for(;++w<C;)G(q=this[w],c);return j.enter=function(){return N},j.exit=function(){return ae},j};function yr(c){return{__data__:c}}pe.datum=function(c){return arguments.length?this.property("__data__",c):this.property("__data__")},pe.filter=function(c){var p=[],w,C,q;typeof c!="function"&&(c=Ae(c));for(var E=0,G=this.length;E<G;E++){p.push(w=[]),w.parentNode=(C=this[E]).parentNode;for(var N=0,j=C.length;N<j;N++)(q=C[N])&&c.call(q,q.__data__,N,E)&&w.push(q)}return Xe(p)};function Ae(c){return function(){return Te(this,c)}}pe.order=function(){for(var c=-1,p=this.length;++c<p;)for(var w=this[c],C=w.length-1,q=w[C],E;--C>=0;)(E=w[C])&&(q&&q!==E.nextSibling&&q.parentNode.insertBefore(E,q),q=E);return this},pe.sort=function(c){c=Ve.apply(this,arguments);for(var p=-1,w=this.length;++p<w;)this[p].sort(c);return this.order()};function Ve(c){return arguments.length||(c=v),function(p,w){return p&&w?c(p.__data__,w.__data__):!p-!w}}pe.each=function(c){return je(this,function(p,w,C){c.call(p,p.__data__,w,C)})};function je(c,p){for(var w=0,C=c.length;w<C;w++)for(var q=c[w],E=0,G=q.length,N;E<G;E++)(N=q[E])&&p(N,E,w);return c}pe.call=function(c){var p=t(arguments);return c.apply(p[0]=this,p),this},pe.empty=function(){return!this.node()},pe.node=function(){for(var c=0,p=this.length;c<p;c++)for(var w=this[c],C=0,q=w.length;C<q;C++){var E=w[C];if(E)return E}return null},pe.size=function(){var c=0;return je(this,function(){++c}),c};function zr(c){return Se(c,kr),c}var kr=[];e.selection.enter=zr,e.selection.enter.prototype=kr,kr.append=pe.append,kr.empty=pe.empty,kr.node=pe.node,kr.call=pe.call,kr.size=pe.size,kr.select=function(c){for(var p=[],w,C,q,E,G,N=-1,j=this.length;++N<j;){q=(E=this[N]).update,p.push(w=[]),w.parentNode=E.parentNode;for(var ae=-1,ie=E.length;++ae<ie;)(G=E[ae])?(w.push(q[ae]=C=c.call(E.parentNode,G.__data__,ae,N)),C.__data__=G.__data__):w.push(null)}return Xe(p)},kr.insert=function(c,p){return arguments.length<2&&(p=er(this)),pe.insert.call(this,c,p)};function er(c){var p,w;return function(C,q,E){var G=c[E].update,N=G.length,j;for(E!=w&&(w=E,p=0),q>=p&&(p=q+1);!(j=G[p])&&++p<N;);return j}}e.select=function(c){var p;return typeof c=="string"?(p=[se(c,n)],p.parentNode=n.documentElement):(p=[c],p.parentNode=a(c)),Xe([p])},e.selectAll=function(c){var p;return typeof c=="string"?(p=t(be(c,n)),p.parentNode=n.documentElement):(p=t(c),p.parentNode=null),Xe([p])},pe.on=function(c,p,w){var C=arguments.length;if(C<3){if(typeof c!="string"){C<2&&(p=!1);for(w in c)this.each(Ke(w,c[w],p));return this}if(C<2)return(C=this.node()["__on"+c])&&C._;w=!1}return this.each(Ke(c,p,w))};function Ke(c,p,w){var C="__on"+c,q=c.indexOf("."),E=Mr;q>0&&(c=c.slice(0,q));var G=mr.get(c);G&&(c=G,E=gr);function N(){var ie=this[C];ie&&(this.removeEventListener(c,ie,ie.$),delete this[C])}function j(){var ie=E(p,t(arguments));N.call(this),this.addEventListener(c,this[C]=ie,ie.$=w),ie._=p}function ae(){var ie=new RegExp("^__on([^.]+)"+e.requote(c)+"$"),ge;for(var me in this)if(ge=me.match(ie)){var Re=this[me];this.removeEventListener(ge[1],Re,Re.$),delete this[me]}}return q?p?j:N:p?re:ae}var mr=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&mr.forEach(function(c){"on"+c in n&&mr.remove(c)});function Mr(c,p){return function(w){var C=e.event;e.event=w,p[0]=this.__data__;try{c.apply(this,p)}finally{e.event=C}}}function gr(c,p){var w=Mr(c,p);return function(C){var q=this,E=C.relatedTarget;(!E||E!==q&&!(E.compareDocumentPosition(q)&8))&&w.call(q,C)}}var dr,Tr=0;function Pr(c){var p=".dragsuppress-"+ ++Tr,w="click"+p,C=e.select(i(c)).on("touchmove"+p,qe).on("dragstart"+p,qe).on("selectstart"+p,qe);if(dr==null&&(dr="onselectstart"in c?!1:te(c.style,"userSelect")),dr){var q=a(c).style,E=q[dr];q[dr]="none"}return function(G){if(C.on(p,null),dr&&(q[dr]=E),G){var N=function(){C.on(w,null)};C.on(w,function(){qe(),N()},!0),setTimeout(N,0)}}}e.mouse=function(c){return sr(c,Be())};var Ur=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function sr(c,p){p.changedTouches&&(p=p.changedTouches[0]);var w=c.ownerSVGElement||c;if(w.createSVGPoint){var C=w.createSVGPoint();if(Ur<0){var q=i(c);if(q.scrollX||q.scrollY){w=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var E=w[0][0].getScreenCTM();Ur=!(E.f||E.e),w.remove()}}return Ur?(C.x=p.pageX,C.y=p.pageY):(C.x=p.clientX,C.y=p.clientY),C=C.matrixTransform(c.getScreenCTM().inverse()),[C.x,C.y]}var G=c.getBoundingClientRect();return[p.clientX-G.left-c.clientLeft,p.clientY-G.top-c.clientTop]}e.touch=function(c,p,w){if(arguments.length<3&&(w=p,p=Be().changedTouches),p){for(var C=0,q=p.length,E;C<q;++C)if((E=p[C]).identifier===w)return sr(c,E)}},e.behavior.drag=function(){var c=Ne(q,"drag","dragstart","dragend"),p=null,w=E(re,e.mouse,i,"mousemove","mouseup"),C=E(_e,e.touch,V,"touchmove","touchend");function q(){this.on("mousedown.drag",w).on("touchstart.drag",C)}function E(G,N,j,ae,ie){return function(){var ge=this,me=e.event.target.correspondingElement||e.event.target,Re=ge.parentNode,Ye=c.of(ge,arguments),ye=0,Ce=G(),De=".drag"+(Ce==null?"":"-"+Ce),Ue,Ge=e.select(j(me)).on(ae+De,Or).on(ie+De,Wr),Pe=Pr(me),_r=N(Re,Ce);p?(Ue=p.apply(ge,arguments),Ue=[Ue.x-_r[0],Ue.y-_r[1]]):Ue=[0,0],Ye({type:"dragstart"});function Or(){var Gr=N(Re,Ce),Jr,$r;Gr&&(Jr=Gr[0]-_r[0],$r=Gr[1]-_r[1],ye|=Jr|$r,_r=Gr,Ye({type:"drag",x:Gr[0]+Ue[0],y:Gr[1]+Ue[1],dx:Jr,dy:$r}))}function Wr(){N(Re,Ce)&&(Ge.on(ae+De,null).on(ie+De,null),Pe(ye),Ye({type:"dragend"}))}}}return q.origin=function(G){return arguments.length?(p=G,q):p},e.rebind(q,c,"on")};function _e(){return e.event.changedTouches[0].identifier}e.touches=function(c,p){return arguments.length<2&&(p=Be().touches),p?t(p).map(function(w){var C=sr(c,w);return C.identifier=w.identifier,C}):[]};var ke=1e-6,$e=ke*ke,We=Math.PI,qr=2*We,Vr=qr-ke,Hr=We/2,lt=We/180,xt=180/We;function Rt(c){return c>0?1:c<0?-1:0}function St(c,p,w){return(p[0]-c[0])*(w[1]-c[1])-(p[1]-c[1])*(w[0]-c[0])}function hn(c){return c>1?0:c<-1?We:Math.acos(c)}function Fn(c){return c>1?Hr:c<-1?-Hr:Math.asin(c)}function $n(c){return((c=Math.exp(c))-1/c)/2}function Xt(c){return((c=Math.exp(c))+1/c)/2}function cn(c){return((c=Math.exp(2*c))-1)/(c+1)}function sn(c){return(c=Math.sin(c/2))*c}var Kt=Math.SQRT2,aa=2,rt=4;e.interpolateZoom=function(c,p){var w=c[0],C=c[1],q=c[2],E=p[0],G=p[1],N=p[2],j=E-w,ae=G-C,ie=j*j+ae*ae,ge,me;if(ie<$e)me=Math.log(N/q)/Kt,ge=function(Ue){return[w+Ue*j,C+Ue*ae,q*Math.exp(Kt*Ue*me)]};else{var Re=Math.sqrt(ie),Ye=(N*N-q*q+rt*ie)/(2*q*aa*Re),ye=(N*N-q*q-rt*ie)/(2*N*aa*Re),Ce=Math.log(Math.sqrt(Ye*Ye+1)-Ye),De=Math.log(Math.sqrt(ye*ye+1)-ye);me=(De-Ce)/Kt,ge=function(Ue){var Ge=Ue*me,Pe=Xt(Ce),_r=q/(aa*Re)*(Pe*cn(Kt*Ge+Ce)-$n(Ce));return[w+_r*j,C+_r*ae,q*Pe/Xt(Kt*Ge+Ce)]}}return ge.duration=me*1e3,ge},e.behavior.zoom=function(){var c={x:0,y:0,k:1},p,w,C,q=[960,500],E=Qt,G=250,N=0,j="mousedown.zoom",ae="mousemove.zoom",ie="mouseup.zoom",ge,me="touchstart.zoom",Re,Ye=Ne(Ge,"zoomstart","zoom","zoomend"),ye,Ce,De,Ue;dn||(dn="onwheel"in n?(Ct=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in n?(Ct=function(){return e.event.wheelDelta},"mousewheel"):(Ct=function(){return-e.event.detail},"MozMousePixelScroll"));function Ge(Fr){Fr.on(j,ht).on(dn+".zoom",Zn).on("dblclick.zoom",on).on(me,jt)}Ge.event=function(Fr){Fr.each(function(){var _t=Ye.of(this,arguments),wt=c;ga?e.select(this).transition().each("start.zoom",function(){c=this.__chart__||{x:0,y:0,k:1},$r(_t)}).tween("zoom:zoom",function(){var Jt=q[0],Nn=q[1],oa=w?w[0]:Jt/2,Da=w?w[1]:Nn/2,ja=e.interpolateZoom([(oa-c.x)/c.k,(Da-c.y)/c.k,Jt/c.k],[(oa-wt.x)/wt.k,(Da-wt.y)/wt.k,Jt/wt.k]);return function(fi){var Ja=ja(fi),Si=Jt/Ja[2];this.__chart__=c={x:oa-Ja[0]*Si,y:Da-Ja[1]*Si,k:Si},bt(_t)}}).each("interrupt.zoom",function(){Qr(_t)}).each("end.zoom",function(){Qr(_t)}):(this.__chart__=c,$r(_t),bt(_t),Qr(_t))})},Ge.translate=function(Fr){return arguments.length?(c={x:+Fr[0],y:+Fr[1],k:c.k},Jr(),Ge):[c.x,c.y]},Ge.scale=function(Fr){return arguments.length?(c={x:c.x,y:c.y,k:null},Or(+Fr),Jr(),Ge):c.k},Ge.scaleExtent=function(Fr){return arguments.length?(E=Fr==null?Qt:[+Fr[0],+Fr[1]],Ge):E},Ge.center=function(Fr){return arguments.length?(C=Fr&&[+Fr[0],+Fr[1]],Ge):C},Ge.size=function(Fr){return arguments.length?(q=Fr&&[+Fr[0],+Fr[1]],Ge):q},Ge.duration=function(Fr){return arguments.length?(G=+Fr,Ge):G},Ge.x=function(Fr){return arguments.length?(Ce=Fr,ye=Fr.copy(),c={x:0,y:0,k:1},Ge):Ce},Ge.y=function(Fr){return arguments.length?(Ue=Fr,De=Fr.copy(),c={x:0,y:0,k:1},Ge):Ue};function Pe(Fr){return[(Fr[0]-c.x)/c.k,(Fr[1]-c.y)/c.k]}function _r(Fr){return[Fr[0]*c.k+c.x,Fr[1]*c.k+c.y]}function Or(Fr){c.k=Math.max(E[0],Math.min(E[1],Fr))}function Wr(Fr,_t){_t=_r(_t),c.x+=Fr[0]-_t[0],c.y+=Fr[1]-_t[1]}function Gr(Fr,_t,wt,Jt){Fr.__chart__={x:c.x,y:c.y,k:c.k},Or(Math.pow(2,Jt)),Wr(w=_t,wt),Fr=e.select(Fr),G>0&&(Fr=Fr.transition().duration(G)),Fr.call(Ge.event)}function Jr(){Ce&&Ce.domain(ye.range().map(function(Fr){return(Fr-c.x)/c.k}).map(ye.invert)),Ue&&Ue.domain(De.range().map(function(Fr){return(Fr-c.y)/c.k}).map(De.invert))}function $r(Fr){N++||Fr({type:"zoomstart"})}function bt(Fr){Jr(),Fr({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function Qr(Fr){--N||(Fr({type:"zoomend"}),w=null)}function ht(){var Fr=this,_t=Ye.of(Fr,arguments),wt=0,Jt=e.select(i(Fr)).on(ae,Da).on(ie,ja),Nn=Pe(e.mouse(Fr)),oa=Pr(Fr);vt.call(Fr),$r(_t);function Da(){wt=1,Wr(e.mouse(Fr),Nn),bt(_t)}function ja(){Jt.on(ae,null).on(ie,null),oa(wt),Qr(_t)}}function jt(){var Fr=this,_t=Ye.of(Fr,arguments),wt={},Jt=0,Nn,oa=".zoom-"+e.event.changedTouches[0].identifier,Da="touchmove"+oa,ja="touchend"+oa,fi=[],Ja=e.select(Fr),Si=Pr(Fr);Ci(),$r(_t),Ja.on(j,null).on(me,Ci);function Ha(){var ul=e.touches(Fr);return Nn=c.k,ul.forEach(function(Ea){Ea.identifier in wt&&(wt[Ea.identifier]=Pe(Ea))}),ul}function Ci(){var ul=e.event.target;e.select(ul).on(Da,Zf).on(ja,BI),fi.push(ul);for(var Ea=e.event.changedTouches,mo=0,jl=Ea.length;mo<jl;++mo)wt[Ea[mo].identifier]=null;var yo=Ha(),g0=Date.now();if(yo.length===1){if(g0-Re<500){var Xf=yo[0];Gr(Fr,Xf,wt[Xf.identifier],Math.floor(Math.log(c.k)/Math.LN2)+1),qe()}Re=g0}else if(yo.length>1){var Xf=yo[0],qu=yo[1],jh=Xf[0]-qu[0],H_=Xf[1]-qu[1];Jt=jh*jh+H_*H_}}function Zf(){var ul=e.touches(Fr),Ea,mo,jl,yo;vt.call(Fr);for(var g0=0,Xf=ul.length;g0<Xf;++g0,yo=null)if(jl=ul[g0],yo=wt[jl.identifier]){if(mo)break;Ea=jl,mo=yo}if(yo){var qu=(qu=jl[0]-Ea[0])*qu+(qu=jl[1]-Ea[1])*qu,jh=Jt&&Math.sqrt(qu/Jt);Ea=[(Ea[0]+jl[0])/2,(Ea[1]+jl[1])/2],mo=[(mo[0]+yo[0])/2,(mo[1]+yo[1])/2],Or(jh*Nn)}Re=null,Wr(Ea,mo),bt(_t)}function BI(){if(e.event.touches.length){for(var ul=e.event.changedTouches,Ea=0,mo=ul.length;Ea<mo;++Ea)delete wt[ul[Ea].identifier];for(var jl in wt)return void Ha()}e.selectAll(fi).on(oa,null),Ja.on(j,ht).on(me,jt),Si(),Qr(_t)}}function Zn(){var Fr=Ye.of(this,arguments);ge?clearTimeout(ge):(vt.call(this),p=Pe(w=C||e.mouse(this)),$r(Fr)),ge=setTimeout(function(){ge=null,Qr(Fr)},50),qe(),Or(Math.pow(2,Ct()*.002)*c.k),Wr(w,p),bt(Fr)}function on(){var Fr=e.mouse(this),_t=Math.log(c.k)/Math.LN2;Gr(this,Fr,Pe(Fr),e.event.shiftKey?Math.ceil(_t)-1:Math.floor(_t)+1)}return e.rebind(Ge,Ye,"on")};var Qt=[0,1/0],Ct,dn;e.color=pn;function pn(){}pn.prototype.toString=function(){return this.rgb()+""},e.hsl=tn;function tn(c,p,w){return this instanceof tn?(this.h=+c,this.s=+p,void(this.l=+w)):arguments.length<2?c instanceof tn?new tn(c.h,c.s,c.l):Lt(""+c,Ht,tn):new tn(c,p,w)}var un=tn.prototype=new pn;un.brighter=function(c){return c=Math.pow(.7,arguments.length?c:1),new tn(this.h,this.s,this.l/c)},un.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new tn(this.h,this.s,c*this.l)},un.rgb=function(){return ha(this.h,this.s,this.l)};function ha(c,p,w){var C,q;c=isNaN(c)?0:(c%=360)<0?c+360:c,p=isNaN(p)||p<0?0:p>1?1:p,w=w<0?0:w>1?1:w,q=w<=.5?w*(1+p):w+p-w*p,C=2*w-q;function E(N){return N>360?N-=360:N<0&&(N+=360),N<60?C+(q-C)*N/60:N<180?q:N<240?C+(q-C)*(240-N)/60:C}function G(N){return Math.round(E(N)*255)}return new Hn(G(c+120),G(c),G(c-120))}e.hcl=Sn;function Sn(c,p,w){return this instanceof Sn?(this.h=+c,this.c=+p,void(this.l=+w)):arguments.length<2?c instanceof Sn?new Sn(c.h,c.c,c.l):c instanceof wn?El(c.l,c.a,c.b):El((c=Br((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new Sn(c,p,w)}var Na=Sn.prototype=new pn;Na.brighter=function(c){return new Sn(this.h,this.c,Math.min(100,this.l+It*(arguments.length?c:1)))},Na.darker=function(c){return new Sn(this.h,this.c,Math.max(0,this.l-It*(arguments.length?c:1)))},Na.rgb=function(){return da(this.h,this.c,this.l).rgb()};function da(c,p,w){return isNaN(c)&&(c=0),isNaN(p)&&(p=0),new wn(w,Math.cos(c*=lt)*p,Math.sin(c)*p)}e.lab=wn;function wn(c,p,w){return this instanceof wn?(this.l=+c,this.a=+p,void(this.b=+w)):arguments.length<2?c instanceof wn?new wn(c.l,c.a,c.b):c instanceof Sn?da(c.h,c.c,c.l):Br((c=Hn(c)).r,c.g,c.b):new wn(c,p,w)}var It=18,In=.95047,gi=1,io=1.08883,mi=wn.prototype=new pn;mi.brighter=function(c){return new wn(Math.min(100,this.l+It*(arguments.length?c:1)),this.a,this.b)},mi.darker=function(c){return new wn(Math.max(0,this.l-It*(arguments.length?c:1)),this.a,this.b)},mi.rgb=function(){return ms(this.l,this.a,this.b)};function ms(c,p,w){var C=(c+16)/116,q=C+p/500,E=C-w/200;return q=Bo(q)*In,C=Bo(C)*gi,E=Bo(E)*io,new Hn(Oo(3.2404542*q-1.5371385*C-.4985314*E),Oo(-.969266*q+1.8760108*C+.041556*E),Oo(.0556434*q-.2040259*C+1.0572252*E))}function El(c,p,w){return c>0?new Sn(Math.atan2(w,p)*xt,Math.sqrt(p*p+w*w),c):new Sn(NaN,NaN,c)}function Bo(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function ys(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Oo(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=Hn;function Hn(c,p,w){return this instanceof Hn?(this.r=~~c,this.g=~~p,void(this.b=~~w)):arguments.length<2?c instanceof Hn?new Hn(c.r,c.g,c.b):Lt(""+c,Hn,ha):new Hn(c,p,w)}function yi(c){return new Hn(c>>16,c>>8&255,c&255)}function Uo(c){return yi(c)+""}var bi=Hn.prototype=new pn;bi.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var p=this.r,w=this.g,C=this.b,q=30;return!p&&!w&&!C?new Hn(q,q,q):(p&&p<q&&(p=q),w&&w<q&&(w=q),C&&C<q&&(C=q),new Hn(Math.min(255,p/c),Math.min(255,w/c),Math.min(255,C/c)))},bi.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new Hn(c*this.r,c*this.g,c*this.b)},bi.hsl=function(){return Ht(this.r,this.g,this.b)},bi.toString=function(){return"#"+Kr(this.r)+Kr(this.g)+Kr(this.b)};function Kr(c){return c<16?"0"+Math.max(0,c).toString(16):Math.min(255,c).toString(16)}function Lt(c,p,w){var C=0,q=0,E=0,G,N,j;if(G=/([a-z]+)\((.*)\)/.exec(c=c.toLowerCase()),G)switch(N=G[2].split(","),G[1]){case"hsl":return w(parseFloat(N[0]),parseFloat(N[1])/100,parseFloat(N[2])/100);case"rgb":return p(nn(N[0]),nn(N[1]),nn(N[2]))}return(j=Dn.get(c))?p(j.r,j.g,j.b):(c!=null&&c.charAt(0)==="#"&&!isNaN(j=parseInt(c.slice(1),16))&&(c.length===4?(C=(j&3840)>>4,C=C>>4|C,q=j&240,q=q>>4|q,E=j&15,E=E<<4|E):c.length===7&&(C=(j&16711680)>>16,q=(j&65280)>>8,E=j&255)),p(C,q,E))}function Ht(c,p,w){var C=Math.min(c/=255,p/=255,w/=255),q=Math.max(c,p,w),E=q-C,G,N,j=(q+C)/2;return E?(N=j<.5?E/(q+C):E/(2-q-C),c==q?G=(p-w)/E+(p<w?6:0):p==q?G=(w-c)/E+2:G=(c-p)/E+4,G*=60):(G=NaN,N=j>0&&j<1?0:G),new tn(G,N,j)}function Br(c,p,w){c=Vn(c),p=Vn(p),w=Vn(w);var C=ys((.4124564*c+.3575761*p+.1804375*w)/In),q=ys((.2126729*c+.7151522*p+.072175*w)/gi),E=ys((.0193339*c+.119192*p+.9503041*w)/io);return wn(116*q-16,500*(C-q),200*(q-E))}function Vn(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function nn(c){var p=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(p*2.55):p}var Dn=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});Dn.forEach(function(c,p){Dn.set(c,yi(p))});function At(c){return typeof c=="function"?c:function(){return c}}e.functor=At,e.xhr=Wa(V);function Wa(c){return function(p,w,C){return arguments.length===2&&typeof w=="function"&&(C=w,w=null),Yo(p,w,c,C)}}function Yo(c,p,w,C){var q={},E=e.dispatch("beforesend","progress","load","error"),G={},N=new XMLHttpRequest,j=null;self.XDomainRequest&&!("withCredentials"in N)&&/^(http(s)?:)?\/\//.test(c)&&(N=new XDomainRequest),"onload"in N?N.onload=N.onerror=ae:N.onreadystatechange=function(){N.readyState>3&&ae()};function ae(){var ie=N.status,ge;if(!ie&&cu(N)||ie>=200&&ie<300||ie===304){try{ge=w.call(q,N)}catch(me){E.error.call(q,me);return}E.load.call(q,ge)}else E.error.call(q,N)}return N.onprogress=function(ie){var ge=e.event;e.event=ie;try{E.progress.call(q,N)}finally{e.event=ge}},q.header=function(ie,ge){return ie=(ie+"").toLowerCase(),arguments.length<2?G[ie]:(ge==null?delete G[ie]:G[ie]=ge+"",q)},q.mimeType=function(ie){return arguments.length?(p=ie==null?null:ie+"",q):p},q.responseType=function(ie){return arguments.length?(j=ie,q):j},q.response=function(ie){return w=ie,q},["get","post"].forEach(function(ie){q[ie]=function(){return q.send.apply(q,[ie].concat(t(arguments)))}}),q.send=function(ie,ge,me){if(arguments.length===2&&typeof ge=="function"&&(me=ge,ge=null),N.open(ie,c,!0),p!=null&&!("accept"in G)&&(G.accept=p+",*/*"),N.setRequestHeader)for(var Re in G)N.setRequestHeader(Re,G[Re]);return p!=null&&N.overrideMimeType&&N.overrideMimeType(p),j!=null&&(N.responseType=j),me!=null&&q.on("error",me).on("load",function(Ye){me(null,Ye)}),E.beforesend.call(q,N),N.send(ge==null?null:ge),q},q.abort=function(){return N.abort(),q},e.rebind(q,E,"on"),C==null?q:q.get(wf(C))}function wf(c){return c.length===1?function(p,w){c(p==null?w:null)}:c}function cu(c){var p=c.responseType;return p&&p!=="text"?c.response:c.responseText}e.dsv=function(c,p){var w=new RegExp('["'+c+`
]`),C=c.charCodeAt(0);function q(ae,ie,ge){arguments.length<3&&(ge=ie,ie=null);var me=Yo(ae,p,ie==null?E:G(ie),ge);return me.row=function(Re){return arguments.length?me.response((ie=Re)==null?E:G(Re)):ie},me}function E(ae){return q.parse(ae.responseText)}function G(ae){return function(ie){return q.parse(ie.responseText,ae)}}q.parse=function(ae,ie){var ge;return q.parseRows(ae,function(me,Re){if(ge)return ge(me,Re-1);var Ye=function(ye){for(var Ce={},De=me.length,Ue=0;Ue<De;++Ue)Ce[me[Ue]]=ye[Ue];return Ce};ge=ie?function(ye,Ce){return ie(Ye(ye),Ce)}:Ye})},q.parseRows=function(ae,ie){var ge={},me={},Re=[],Ye=ae.length,ye=0,Ce=0,De,Ue;function Ge(){if(ye>=Ye)return me;if(Ue)return Ue=!1,ge;var _r=ye;if(ae.charCodeAt(_r)===34){for(var Or=_r;Or++<Ye;)if(ae.charCodeAt(Or)===34){if(ae.charCodeAt(Or+1)!==34)break;++Or}ye=Or+2;var Wr=ae.charCodeAt(Or+1);return Wr===13?(Ue=!0,ae.charCodeAt(Or+2)===10&&++ye):Wr===10&&(Ue=!0),ae.slice(_r+1,Or).replace(/""/g,'"')}for(;ye<Ye;){var Wr=ae.charCodeAt(ye++),Gr=1;if(Wr===10)Ue=!0;else if(Wr===13)Ue=!0,ae.charCodeAt(ye)===10&&(++ye,++Gr);else if(Wr!==C)continue;return ae.slice(_r,ye-Gr)}return ae.slice(_r)}for(;(De=Ge())!==me;){for(var Pe=[];De!==ge&&De!==me;)Pe.push(De),De=Ge();ie&&(Pe=ie(Pe,Ce++))==null||Re.push(Pe)}return Re},q.format=function(ae){if(Array.isArray(ae[0]))return q.formatRows(ae);var ie=new X,ge=[];return ae.forEach(function(me){for(var Re in me)ie.has(Re)||ge.push(ie.add(Re))}),[ge.map(j).join(c)].concat(ae.map(function(me){return ge.map(function(Re){return j(me[Re])}).join(c)})).join(`
`)},q.formatRows=function(ae){return ae.map(N).join(`
`)};function N(ae){return ae.map(j).join(c)}function j(ae){return w.test(ae)?'"'+ae.replace(/\"/g,'""')+'"':ae}return q},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var oo,Go,Vo,vu,Pl=this[te(this,"requestAnimationFrame")]||function(c){setTimeout(c,17)};e.timer=function(){Rl.apply(this,arguments)};function Rl(c,p,w){var C=arguments.length;C<2&&(p=0),C<3&&(w=Date.now());var q=w+p,E={c,t:q,n:null};return Go?Go.n=E:oo=E,Go=E,Vo||(vu=clearTimeout(vu),Vo=1,Pl(_i)),E}function _i(){var c=lo(),p=Wo()-c;p>24?(isFinite(p)&&(clearTimeout(vu),vu=setTimeout(_i,p)),Vo=0):(Vo=1,Pl(_i))}e.timer.flush=function(){lo(),Wo()};function lo(){for(var c=Date.now(),p=oo;p;)c>=p.t&&p.c(c-p.t)&&(p.c=null),p=p.n;return c}function Wo(){for(var c,p=oo,w=1/0;p;)p.c?(p.t<w&&(w=p.t),p=(c=p).n):p=c?c.n=p.n:oo=p.n;return Go=c,w}e.round=function(c,p){return p?Math.round(c*(p=Math.pow(10,p)))/p:Math.round(c)},e.geom={};function zl(c){return c[0]}function bs(c){return c[1]}e.geom.hull=function(c){var p=zl,w=bs;if(arguments.length)return C(c);function C(q){if(q.length<3)return[];var E=At(p),G=At(w),N,j=q.length,ae=[],ie=[];for(N=0;N<j;N++)ae.push([+E.call(this,q[N],N),+G.call(this,q[N],N),N]);for(ae.sort(Zc),N=0;N<j;N++)ie.push([ae[N][0],-ae[N][1]]);var ge=Mf(ae),me=Mf(ie),Re=me[0]===ge[0],Ye=me[me.length-1]===ge[ge.length-1],ye=[];for(N=ge.length-1;N>=0;--N)ye.push(q[ae[ge[N]][2]]);for(N=+Re;N<me.length-Ye;++N)ye.push(q[ae[me[N]][2]]);return ye}return C.x=function(q){return arguments.length?(p=q,C):p},C.y=function(q){return arguments.length?(w=q,C):w},C};function Mf(c){for(var p=c.length,w=[0,1],C=2,q=2;q<p;q++){for(;C>1&&St(c[w[C-2]],c[w[C-1]],c[q])<=0;)--C;w[C++]=q}return w.slice(0,C)}function Zc(c,p){return c[0]-p[0]||c[1]-p[1]}e.geom.polygon=function(c){return Se(c,_s),c};var _s=e.geom.polygon.prototype=[];_s.area=function(){for(var c=-1,p=this.length,w,C=this[p-1],q=0;++c<p;)w=C,C=this[c],q+=w[1]*C[0]-w[0]*C[1];return q*.5},_s.centroid=function(c){var p=-1,w=this.length,C=0,q=0,E,G=this[w-1],N;for(arguments.length||(c=-1/(6*this.area()));++p<w;)E=G,G=this[p],N=E[0]*G[1]-G[0]*E[1],C+=(E[0]+G[0])*N,q+=(E[1]+G[1])*N;return[C*c,q*c]},_s.clip=function(c){for(var p,w=Zo(c),C=-1,q=this.length-Zo(this),E,G,N=this[q-1],j,ae,ie;++C<q;){for(p=c.slice(),c.length=0,j=this[C],ae=p[(G=p.length-w)-1],E=-1;++E<G;)ie=p[E],xs(ie,N,j)?(xs(ae,N,j)||c.push(ws(ae,ie,N,j)),c.push(ie)):xs(ae,N,j)&&c.push(ws(ae,ie,N,j)),ae=ie;w&&c.push(c[0]),N=j}return c};function xs(c,p,w){return(w[0]-p[0])*(c[1]-p[1])<(w[1]-p[1])*(c[0]-p[0])}function ws(c,p,w,C){var q=c[0],E=w[0],G=p[0]-q,N=C[0]-E,j=c[1],ae=w[1],ie=p[1]-j,ge=C[1]-ae,me=(N*(j-ae)-ge*(q-E))/(ge*G-N*ie);return[q+me*G,j+me*ie]}function Zo(c){var p=c[0],w=c[c.length-1];return!(p[0]-w[0]||p[1]-w[1])}var so,uo,Oi,Af=[],hu,Nl,Tf=[];function Xc(){$o(this),this.edge=this.site=this.circle=null}function Ms(c){var p=Af.pop()||new Xc;return p.site=c,p}function Ui(c){co(c),Oi.remove(c),Af.push(c),$o(c)}function As(c){var p=c.circle,w=p.x,C=p.cy,q={x:w,y:C},E=c.P,G=c.N,N=[c];Ui(c);for(var j=E;j.circle&&_(w-j.circle.x)<ke&&_(C-j.circle.cy)<ke;)E=j.P,N.unshift(j),Ui(j),j=E;N.unshift(j),co(j);for(var ae=G;ae.circle&&_(w-ae.circle.x)<ke&&_(C-ae.circle.cy)<ke;)G=ae.N,N.push(ae),Ui(ae),ae=G;N.push(ae),co(ae);var ie=N.length,ge;for(ge=1;ge<ie;++ge)ae=N[ge],j=N[ge-1],Gi(ae.edge,j.site,ae.site,q);j=N[0],ae=N[ie-1],ae.edge=Il(j.site,ae.site,null,q),fo(j),fo(ae)}function jc(c){for(var p=c.x,w=c.y,C,q,E,G,N=Oi._;N;)if(E=Ts(N,w)-p,E>ke)N=N.L;else if(G=p-Fv(N,w),G>ke){if(!N.R){C=N;break}N=N.R}else{E>-ke?(C=N.P,q=N):G>-ke?(C=N,q=N.N):C=q=N;break}var j=Ms(c);if(Oi.insert(C,j),!(!C&&!q)){if(C===q){co(C),q=Ms(C.site),Oi.insert(j,q),j.edge=q.edge=Il(C.site,j.site),fo(C),fo(q);return}if(!q){j.edge=Il(C.site,j.site);return}co(C),co(q);var ae=C.site,ie=ae.x,ge=ae.y,me=c.x-ie,Re=c.y-ge,Ye=q.site,ye=Ye.x-ie,Ce=Ye.y-ge,De=2*(me*Ce-Re*ye),Ue=me*me+Re*Re,Ge=ye*ye+Ce*Ce,Pe={x:(Ce*Ue-Re*Ge)/De+ie,y:(me*Ge-ye*Ue)/De+ge};Gi(q.edge,ae,Ye,Pe),j.edge=Il(ae,c,null,Pe),q.edge=Il(c,Ye,null,Pe),fo(C),fo(q)}}function Ts(c,p){var w=c.site,C=w.x,q=w.y,E=q-p;if(!E)return C;var G=c.P;if(!G)return-1/0;w=G.site;var N=w.x,j=w.y,ae=j-p;if(!ae)return N;var ie=N-C,ge=1/E-1/ae,me=ie/ae;return ge?(-me+Math.sqrt(me*me-2*ge*(ie*ie/(-2*ae)-j+ae/2+q-E/2)))/ge+C:(C+N)/2}function Fv(c,p){var w=c.N;if(w)return Ts(w,p);var C=c.site;return C.y===p?C.x:1/0}function Xo(c){this.site=c,this.edges=[]}Xo.prototype.prepare=function(){for(var c=this.edges,p=c.length,w;p--;)w=c[p].edge,(!w.b||!w.a)&&c.splice(p,1);return c.sort(Fl),c.length};function kf(c){for(var p=c[0][0],w=c[1][0],C=c[0][1],q=c[1][1],E,G,N,j,ae=uo,ie=ae.length,ge,me,Re,Ye,ye,Ce;ie--;)if(ge=ae[ie],!(!ge||!ge.prepare()))for(Re=ge.edges,Ye=Re.length,me=0;me<Ye;)Ce=Re[me].end(),N=Ce.x,j=Ce.y,ye=Re[++me%Ye].start(),E=ye.x,G=ye.y,(_(N-E)>ke||_(j-G)>ke)&&(Re.splice(me,0,new jo(Hv(ge.site,Ce,_(N-p)<ke&&q-j>ke?{x:p,y:_(E-p)<ke?G:q}:_(j-q)<ke&&w-N>ke?{x:_(G-q)<ke?E:w,y:q}:_(N-w)<ke&&j-C>ke?{x:w,y:_(E-w)<ke?G:C}:_(j-C)<ke&&N-p>ke?{x:_(G-C)<ke?E:p,y:C}:null),ge.site,null)),++Ye)}function Fl(c,p){return p.angle-c.angle}function Jc(){$o(this),this.x=this.y=this.arc=this.site=this.cy=null}function fo(c){var p=c.P,w=c.N;if(!(!p||!w)){var C=p.site,q=c.site,E=w.site;if(C!==E){var G=q.x,N=q.y,j=C.x-G,ae=C.y-N,ie=E.x-G,Ce=E.y-N,ge=2*(j*Ce-ae*ie);if(!(ge>=-$e)){var me=j*j+ae*ae,Re=ie*ie+Ce*Ce,Ye=(Ce*me-ae*Re)/ge,ye=(j*Re-ie*me)/ge,Ce=ye+N,De=Tf.pop()||new Jc;De.arc=c,De.site=q,De.x=Ye+G,De.y=Ce+Math.sqrt(Ye*Ye+ye*ye),De.cy=Ce,c.circle=De;for(var Ue=null,Ge=Nl._;Ge;)if(De.y<Ge.y||De.y===Ge.y&&De.x<=Ge.x)if(Ge.L)Ge=Ge.L;else{Ue=Ge.P;break}else if(Ge.R)Ge=Ge.R;else{Ue=Ge;break}Nl.insert(Ue,De),Ue||(hu=De)}}}}function co(c){var p=c.circle;p&&(p.P||(hu=p.N),Nl.remove(p),Tf.push(p),$o(p),c.circle=null)}function Sf(c,p,w,C){return function(q){var E=q.a,G=q.b,N=E.x,j=E.y,ae=G.x,ie=G.y,ge=0,me=1,Re=ae-N,Ye=ie-j,ye;if(ye=c-N,!(!Re&&ye>0)){if(ye/=Re,Re<0){if(ye<ge)return;ye<me&&(me=ye)}else if(Re>0){if(ye>me)return;ye>ge&&(ge=ye)}if(ye=w-N,!(!Re&&ye<0)){if(ye/=Re,Re<0){if(ye>me)return;ye>ge&&(ge=ye)}else if(Re>0){if(ye<ge)return;ye<me&&(me=ye)}if(ye=p-j,!(!Ye&&ye>0)){if(ye/=Ye,Ye<0){if(ye<ge)return;ye<me&&(me=ye)}else if(Ye>0){if(ye>me)return;ye>ge&&(ge=ye)}if(ye=C-j,!(!Ye&&ye<0)){if(ye/=Ye,Ye<0){if(ye>me)return;ye>ge&&(ge=ye)}else if(Ye>0){if(ye<ge)return;ye<me&&(me=ye)}return ge>0&&(q.a={x:N+ge*Re,y:j+ge*Ye}),me<1&&(q.b={x:N+me*Re,y:j+me*Ye}),q}}}}}}function xi(c){for(var p=so,w=Sf(c[0][0],c[0][1],c[1][0],c[1][1]),C=p.length,q;C--;)q=p[C],(!Iv(q,c)||!w(q)||_(q.a.x-q.b.x)<ke&&_(q.a.y-q.b.y)<ke)&&(q.a=q.b=null,p.splice(C,1))}function Iv(c,p){var w=c.b;if(w)return!0;var C=c.a,q=p[0][0],E=p[1][0],G=p[0][1],N=p[1][1],j=c.l,ae=c.r,ie=j.x,ge=j.y,me=ae.x,Re=ae.y,Ye=(ie+me)/2,ye=(ge+Re)/2,Ce,De;if(Re===ge){if(Ye<q||Ye>=E)return;if(ie>me){if(!C)C={x:Ye,y:G};else if(C.y>=N)return;w={x:Ye,y:N}}else{if(!C)C={x:Ye,y:N};else if(C.y<G)return;w={x:Ye,y:G}}}else if(Ce=(ie-me)/(Re-ge),De=ye-Ce*Ye,Ce<-1||Ce>1)if(ie>me){if(!C)C={x:(G-De)/Ce,y:G};else if(C.y>=N)return;w={x:(N-De)/Ce,y:N}}else{if(!C)C={x:(N-De)/Ce,y:N};else if(C.y<G)return;w={x:(G-De)/Ce,y:G}}else if(ge<Re){if(!C)C={x:q,y:Ce*q+De};else if(C.x>=E)return;w={x:E,y:Ce*E+De}}else{if(!C)C={x:E,y:Ce*E+De};else if(C.x<q)return;w={x:q,y:Ce*q+De}}return c.a=C,c.b=w,!0}function Yi(c,p){this.l=c,this.r=p,this.a=this.b=null}function Il(c,p,w,C){var q=new Yi(c,p);return so.push(q),w&&Gi(q,c,p,w),C&&Gi(q,p,c,C),uo[c.i].edges.push(new jo(q,c,p)),uo[p.i].edges.push(new jo(q,p,c)),q}function Hv(c,p,w){var C=new Yi(c,null);return C.a=p,C.b=w,so.push(C),C}function Gi(c,p,w,C){!c.a&&!c.b?(c.a=C,c.l=p,c.r=w):c.l===w?c.b=C:c.a=C}function jo(c,p,w){var C=c.a,q=c.b;this.edge=c,this.site=p,this.angle=w?Math.atan2(w.y-p.y,w.x-p.x):c.l===p?Math.atan2(q.x-C.x,C.y-q.y):Math.atan2(C.x-q.x,q.y-C.y)}jo.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 Jo(){this._=null}function $o(c){c.U=c.C=c.L=c.R=c.P=c.N=null}Jo.prototype={insert:function(c,p){var w,C,q;if(c){if(p.P=c,p.N=c.N,c.N&&(c.N.P=p),c.N=p,c.R){for(c=c.R;c.L;)c=c.L;c.L=p}else c.R=p;w=c}else this._?(c=du(this._),p.P=null,p.N=c,c.P=c.L=p,w=c):(p.P=p.N=null,this._=p,w=null);for(p.L=p.R=null,p.U=w,p.C=!0,c=p;w&&w.C;)C=w.U,w===C.L?(q=C.R,q&&q.C?(w.C=q.C=!1,C.C=!0,c=C):(c===w.R&&(vo(this,w),c=w,w=c.U),w.C=!1,C.C=!0,ks(this,C))):(q=C.L,q&&q.C?(w.C=q.C=!1,C.C=!0,c=C):(c===w.L&&(ks(this,w),c=w,w=c.U),w.C=!1,C.C=!0,vo(this,C))),w=c.U;this._.C=!1},remove:function(c){c.N&&(c.N.P=c.P),c.P&&(c.P.N=c.N),c.N=c.P=null;var p=c.U,w,C=c.L,q=c.R,E,G;if(C?q?E=du(q):E=C:E=q,p?p.L===c?p.L=E:p.R=E:this._=E,C&&q?(G=E.C,E.C=c.C,E.L=C,C.U=E,E!==q?(p=E.U,E.U=c.U,c=E.R,p.L=c,E.R=q,q.U=E):(E.U=p,p=E,c=E.R)):(G=c.C,c=E),c&&(c.U=p),!G){if(c&&c.C){c.C=!1;return}do{if(c===this._)break;if(c===p.L){if(w=p.R,w.C&&(w.C=!1,p.C=!0,vo(this,p),w=p.R),w.L&&w.L.C||w.R&&w.R.C){(!w.R||!w.R.C)&&(w.L.C=!1,w.C=!0,ks(this,w),w=p.R),w.C=p.C,p.C=w.R.C=!1,vo(this,p),c=this._;break}}else if(w=p.L,w.C&&(w.C=!1,p.C=!0,ks(this,p),w=p