UNPKG

plotly.js

Version:

The open source javascript graphing library that powers plotly

18 lines 1.94 MB
/** * plotly.js (mapbox - minified) v3.2.0 * 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 rj=Object.defineProperty,aj=Object.defineProperties;var ij=Object.getOwnPropertyDescriptors;var y7=Object.getOwnPropertySymbols;var nj=Object.prototype.hasOwnProperty,oj=Object.prototype.propertyIsEnumerable;var g7=(e,t,r)=>t in e?rj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$v=(e,t)=>{for(var r in t||(t={}))nj.call(t,r)&&g7(e,r,t[r]);if(y7)for(var r of y7(t))oj.call(t,r)&&g7(e,r,t[r]);return e},Y1=(e,t)=>aj(e,ij(t));var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var W1=pe(_7=>{"use strict";_7.version="3.2.0"});var b7=pe((x7,X1)=>{(function(t,r,i){r[t]=r[t]||i(),typeof X1!="undefined"&&X1.exports&&(X1.exports=r[t])})("Promise",typeof window!="undefined"?window:x7,function(){"use strict";var t,r,i,a=Object.prototype.toString,s=typeof setImmediate!="undefined"?function(B){return setImmediate(B)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(B,q,I,O){return Object.defineProperty(B,q,{value:I,writable:!0,configurable:O!==!1})}}catch(z){t=function(q,I,O){return q[I]=O,q}}i=function(){var B,q,I;function O(H,V){this.fn=H,this.self=V,this.next=void 0}return{add:function(V,W){I=new O(V,W),q?q.next=I:B=I,q=I,I=void 0},drain:function(){var V=B;for(B=q=r=void 0;V;)V.fn.call(V.self),V=V.next}}}();function l(z,B){i.add(z,B),r||(r=s(i.drain))}function f(z){var B,q=typeof z;return z!=null&&(q=="object"||q=="function")&&(B=z.then),typeof B=="function"?B:!1}function h(){for(var z=0;z<this.chain.length;z++)v(this,this.state===1?this.chain[z].success:this.chain[z].failure,this.chain[z]);this.chain.length=0}function v(z,B,q){var I,O;try{B===!1?q.reject(z.msg):(B===!0?I=z.msg:I=B.call(void 0,z.msg),I===q.promise?q.reject(TypeError("Promise-chain cycle")):(O=f(I))?O.call(I,q.resolve,q.reject):q.resolve(I))}catch(H){q.reject(H)}}function m(z){var B,q=this;if(!q.triggered){q.triggered=!0,q.def&&(q=q.def);try{(B=f(z))?l(function(){var I=new S(q);try{B.call(z,function(){m.apply(I,arguments)},function(){_.apply(I,arguments)})}catch(O){_.call(I,O)}}):(q.msg=z,q.state=1,q.chain.length>0&&l(h,q))}catch(I){_.call(new S(q),I)}}}function _(z){var B=this;B.triggered||(B.triggered=!0,B.def&&(B=B.def),B.msg=z,B.state=2,B.chain.length>0&&l(h,B))}function T(z,B,q,I){for(var O=0;O<B.length;O++)(function(V){z.resolve(B[V]).then(function(J){q(V,J)},I)})(O)}function S(z){this.def=z,this.triggered=!1}function C(z){this.promise=z,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function E(z){if(typeof z!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var B=new C(this);this.then=function(I,O){var H={success:typeof I=="function"?I:!0,failure:typeof O=="function"?O:!1};return H.promise=new this.constructor(function(W,J){if(typeof W!="function"||typeof J!="function")throw TypeError("Not a function");H.resolve=W,H.reject=J}),B.chain.push(H),B.state!==0&&l(h,B),H.promise},this.catch=function(I){return this.then(void 0,I)};try{z.call(void 0,function(I){m.call(B,I)},function(I){_.call(B,I)})}catch(q){_.call(B,q)}}var D=t({},"constructor",E,!1);return E.prototype=D,t(D,"__NPO__",0,!1),t(E,"resolve",function(B){var q=this;return B&&typeof B=="object"&&B.__NPO__===1?B:new q(function(O,H){if(typeof O!="function"||typeof H!="function")throw TypeError("Not a function");O(B)})}),t(E,"reject",function(B){return new this(function(I,O){if(typeof I!="function"||typeof O!="function")throw TypeError("Not a function");O(B)})}),t(E,"all",function(B){var q=this;return a.call(B)!="[object Array]"?q.reject(TypeError("Not an array")):B.length===0?q.resolve([]):new q(function(O,H){if(typeof O!="function"||typeof H!="function")throw TypeError("Not a function");var V=B.length,W=Array(V),J=0;T(q,B,function(ne,oe){W[ne]=oe,++J===V&&O(W)},H)})}),t(E,"race",function(B){var q=this;return a.call(B)!="[object Array]"?q.reject(TypeError("Not an array")):new q(function(O,H){if(typeof O!="function"||typeof H!="function")throw TypeError("Not a function");T(q,B,function(W,J){O(J)},H)})}),E})});var ja=pe((Fme,j1)=>{(function(){var e={version:"3.8.2"},t=[].slice,r=function(y){return t.call(y)},i=self.document;function a(y){return y&&(y.ownerDocument||y.document||y).documentElement}function s(y){return y&&(y.ownerDocument&&y.ownerDocument.defaultView||y.document&&y||y.defaultView)}if(i)try{r(i.documentElement.childNodes)[0].nodeType}catch(y){r=function(M){for(var P=M.length,N=new Array(P);P--;)N[P]=M[P];return N}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(y){var l=this.Element.prototype,f=l.setAttribute,h=l.setAttributeNS,v=this.CSSStyleDeclaration.prototype,m=v.setProperty;l.setAttribute=function(M,P){f.call(this,M,P+"")},l.setAttributeNS=function(M,P,N){h.call(this,M,P,N+"")},v.setProperty=function(M,P,N){m.call(this,M,P+"",N)}}e.ascending=_;function _(y,M){return y<M?-1:y>M?1:y>=M?0:NaN}e.descending=function(y,M){return M<y?-1:M>y?1:M>=y?0:NaN},e.min=function(y,M){var P=-1,N=y.length,U,Z;if(arguments.length===1){for(;++P<N;)if((Z=y[P])!=null&&Z>=Z){U=Z;break}for(;++P<N;)(Z=y[P])!=null&&U>Z&&(U=Z)}else{for(;++P<N;)if((Z=M.call(y,y[P],P))!=null&&Z>=Z){U=Z;break}for(;++P<N;)(Z=M.call(y,y[P],P))!=null&&U>Z&&(U=Z)}return U},e.max=function(y,M){var P=-1,N=y.length,U,Z;if(arguments.length===1){for(;++P<N;)if((Z=y[P])!=null&&Z>=Z){U=Z;break}for(;++P<N;)(Z=y[P])!=null&&Z>U&&(U=Z)}else{for(;++P<N;)if((Z=M.call(y,y[P],P))!=null&&Z>=Z){U=Z;break}for(;++P<N;)(Z=M.call(y,y[P],P))!=null&&Z>U&&(U=Z)}return U},e.extent=function(y,M){var P=-1,N=y.length,U,Z,$;if(arguments.length===1){for(;++P<N;)if((Z=y[P])!=null&&Z>=Z){U=$=Z;break}for(;++P<N;)(Z=y[P])!=null&&(U>Z&&(U=Z),$<Z&&($=Z))}else{for(;++P<N;)if((Z=M.call(y,y[P],P))!=null&&Z>=Z){U=$=Z;break}for(;++P<N;)(Z=M.call(y,y[P],P))!=null&&(U>Z&&(U=Z),$<Z&&($=Z))}return[U,$]};function T(y){return y===null?NaN:+y}function S(y){return!isNaN(y)}e.sum=function(y,M){var P=0,N=y.length,U,Z=-1;if(arguments.length===1)for(;++Z<N;)S(U=+y[Z])&&(P+=U);else for(;++Z<N;)S(U=+M.call(y,y[Z],Z))&&(P+=U);return P},e.mean=function(y,M){var P=0,N=y.length,U,Z=-1,$=N;if(arguments.length===1)for(;++Z<N;)S(U=T(y[Z]))?P+=U:--$;else for(;++Z<N;)S(U=T(M.call(y,y[Z],Z)))?P+=U:--$;if($)return P/$},e.quantile=function(y,M){var P=(y.length-1)*M+1,N=Math.floor(P),U=+y[N-1],Z=P-N;return Z?U+Z*(y[N]-U):U},e.median=function(y,M){var P=[],N=y.length,U,Z=-1;if(arguments.length===1)for(;++Z<N;)S(U=T(y[Z]))&&P.push(U);else for(;++Z<N;)S(U=T(M.call(y,y[Z],Z)))&&P.push(U);if(P.length)return e.quantile(P.sort(_),.5)},e.variance=function(y,M){var P=y.length,N=0,U,Z,$=0,X=-1,ae=0;if(arguments.length===1)for(;++X<P;)S(U=T(y[X]))&&(Z=U-N,N+=Z/++ae,$+=Z*(U-N));else for(;++X<P;)S(U=T(M.call(y,y[X],X)))&&(Z=U-N,N+=Z/++ae,$+=Z*(U-N));if(ae>1)return $/(ae-1)},e.deviation=function(){var y=e.variance.apply(this,arguments);return y&&Math.sqrt(y)};function C(y){return{left:function(M,P,N,U){for(arguments.length<3&&(N=0),arguments.length<4&&(U=M.length);N<U;){var Z=N+U>>>1;y(M[Z],P)<0?N=Z+1:U=Z}return N},right:function(M,P,N,U){for(arguments.length<3&&(N=0),arguments.length<4&&(U=M.length);N<U;){var Z=N+U>>>1;y(M[Z],P)>0?U=Z:N=Z+1}return N}}}var E=C(_);e.bisectLeft=E.left,e.bisect=e.bisectRight=E.right,e.bisector=function(y){return C(y.length===1?function(M,P){return _(y(M),P)}:y)},e.shuffle=function(y,M,P){(N=arguments.length)<3&&(P=y.length,N<2&&(M=0));for(var N=P-M,U,Z;N;)Z=Math.random()*N--|0,U=y[N+M],y[N+M]=y[Z+M],y[Z+M]=U;return y},e.permute=function(y,M){for(var P=M.length,N=new Array(P);P--;)N[P]=y[M[P]];return N},e.pairs=function(y){for(var M=0,P=y.length-1,N,U=y[0],Z=new Array(P<0?0:P);M<P;)Z[M]=[N=U,U=y[++M]];return Z},e.transpose=function(y){if(!(Z=y.length))return[];for(var M=-1,P=e.min(y,D),N=new Array(P);++M<P;)for(var U=-1,Z,$=N[M]=new Array(Z);++U<Z;)$[U]=y[U][M];return N};function D(y){return y.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(y){var M=[];for(var P in y)M.push(P);return M},e.values=function(y){var M=[];for(var P in y)M.push(y[P]);return M},e.entries=function(y){var M=[];for(var P in y)M.push({key:P,value:y[P]});return M},e.merge=function(y){for(var M=y.length,P,N=-1,U=0,Z,$;++N<M;)U+=y[N].length;for(Z=new Array(U);--M>=0;)for($=y[M],P=$.length;--P>=0;)Z[--U]=$[P];return Z};var z=Math.abs;e.range=function(y,M,P){if(arguments.length<3&&(P=1,arguments.length<2&&(M=y,y=0)),(M-y)/P===1/0)throw new Error("infinite range");var N=[],U=B(z(P)),Z=-1,$;if(y*=U,M*=U,P*=U,P<0)for(;($=y+P*++Z)>M;)N.push($/U);else for(;($=y+P*++Z)<M;)N.push($/U);return N};function B(y){for(var M=1;y*M%1;)M*=10;return M}function q(y,M){for(var P in M)Object.defineProperty(y.prototype,P,{value:M[P],enumerable:!1})}e.map=function(y,M){var P=new I;if(y instanceof I)y.forEach(function(X,ae){P.set(X,ae)});else if(Array.isArray(y)){var N=-1,U=y.length,Z;if(arguments.length===1)for(;++N<U;)P.set(N,y[N]);else for(;++N<U;)P.set(M.call(y,Z=y[N],N),Z)}else for(var $ in y)P.set($,y[$]);return P};function I(){this._=Object.create(null)}var O="__proto__",H="\0";q(I,{has:J,get:function(y){return this._[V(y)]},set:function(y,M){return this._[V(y)]=M},remove:te,keys:ne,values:function(){var y=[];for(var M in this._)y.push(this._[M]);return y},entries:function(){var y=[];for(var M in this._)y.push({key:W(M),value:this._[M]});return y},size:oe,empty:fe,forEach:function(y){for(var M in this._)y.call(this,W(M),this._[M])}});function V(y){return(y+="")===O||y[0]===H?H+y:y}function W(y){return(y+="")[0]===H?y.slice(1):y}function J(y){return V(y)in this._}function te(y){return(y=V(y))in this._&&delete this._[y]}function ne(){var y=[];for(var M in this._)y.push(W(M));return y}function oe(){var y=0;for(var M in this._)++y;return y}function fe(){for(var y in this._)return!1;return!0}e.nest=function(){var y={},M=[],P=[],N,U;function Z(X,ae,me){if(me>=M.length)return U?U.call(y,ae):N?ae.sort(N):ae;for(var _e=-1,ze=ae.length,Pe=M[me++],Qe,ot,Ie,Ve=new I,Je;++_e<ze;)(Je=Ve.get(Qe=Pe(ot=ae[_e])))?Je.push(ot):Ve.set(Qe,[ot]);return X?(ot=X(),Ie=function(ft,nt){ot.set(ft,Z(X,nt,me))}):(ot={},Ie=function(ft,nt){ot[ft]=Z(X,nt,me)}),Ve.forEach(Ie),ot}function $(X,ae){if(ae>=M.length)return X;var me=[],_e=P[ae++];return X.forEach(function(ze,Pe){me.push({key:ze,values:$(Pe,ae)})}),_e?me.sort(function(ze,Pe){return _e(ze.key,Pe.key)}):me}return y.map=function(X,ae){return Z(ae,X,0)},y.entries=function(X){return $(Z(e.map,X,0),0)},y.key=function(X){return M.push(X),y},y.sortKeys=function(X){return P[M.length-1]=X,y},y.sortValues=function(X){return N=X,y},y.rollup=function(X){return U=X,y},y},e.set=function(y){var M=new ve;if(y)for(var P=0,N=y.length;P<N;++P)M.add(y[P]);return M};function ve(){this._=Object.create(null)}q(ve,{has:J,add:function(y){return this._[V(y+="")]=!0,y},remove:te,values:ne,size:oe,empty:fe,forEach:function(y){for(var M in this._)y.call(this,W(M))}}),e.behavior={};function Se(y){return y}e.rebind=function(y,M){for(var P=1,N=arguments.length,U;++P<N;)y[U=arguments[P]]=Me(y,M,M[U]);return y};function Me(y,M,P){return function(){var N=P.apply(M,arguments);return N===M?y:N}}function Ae(y,M){if(M in y)return M;M=M.charAt(0).toUpperCase()+M.slice(1);for(var P=0,N=we.length;P<N;++P){var U=we[P]+M;if(U in y)return U}}var we=["webkit","ms","moz","Moz","o","O"];function Te(){}e.dispatch=function(){for(var y=new Ce,M=-1,P=arguments.length;++M<P;)y[arguments[M]]=Le(y);return y};function Ce(){}Ce.prototype.on=function(y,M){var P=y.indexOf("."),N="";if(P>=0&&(N=y.slice(P+1),y=y.slice(0,P)),y)return arguments.length<2?this[y].on(N):this[y].on(N,M);if(arguments.length===2){if(M==null)for(y in this)this.hasOwnProperty(y)&&this[y].on(N,null);return this}};function Le(y){var M=[],P=new I;function N(){for(var U=M,Z=-1,$=U.length,X;++Z<$;)(X=U[Z].on)&&X.apply(this,arguments);return y}return N.on=function(U,Z){var $=P.get(U),X;return arguments.length<2?$&&$.on:($&&($.on=null,M=M.slice(0,X=M.indexOf($)).concat(M.slice(X+1)),P.remove(U)),Z&&M.push(P.set(U,{on:Z})),y)},N}e.event=null;function Ke(){e.event.preventDefault()}function lt(){for(var y=e.event,M;M=y.sourceEvent;)y=M;return y}function at(y){for(var M=new Ce,P=0,N=arguments.length;++P<N;)M[arguments[P]]=Le(M);return M.of=function(U,Z){return function($){try{var X=$.sourceEvent=e.event;$.target=y,e.event=$,M[$.type].apply(U,Z)}finally{e.event=X}}},M}e.requote=function(y){return y.replace(gt,"\\$&")};var gt=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ye={}.__proto__?function(y,M){y.__proto__=M}:function(y,M){for(var P in M)y[P]=M[P]};function St(y){return Ye(y,vt),y}var it=function(y,M){return M.querySelector(y)},mt=function(y,M){return M.querySelectorAll(y)},bt=function(y,M){var P=y.matches||y[Ae(y,"matchesSelector")];return bt=function(N,U){return P.call(N,U)},bt(y,M)};typeof Sizzle=="function"&&(it=function(y,M){return Sizzle(y,M)[0]||null},mt=Sizzle,bt=Sizzle.matchesSelector),e.selection=function(){return e.select(i.documentElement)};var vt=e.selection.prototype=[];vt.select=function(y){var M=[],P,N,U,Z;y=de(y);for(var $=-1,X=this.length;++$<X;){M.push(P=[]),P.parentNode=(U=this[$]).parentNode;for(var ae=-1,me=U.length;++ae<me;)(Z=U[ae])?(P.push(N=y.call(Z,Z.__data__,ae,$)),N&&"__data__"in Z&&(N.__data__=Z.__data__)):P.push(null)}return St(M)};function de(y){return typeof y=="function"?y:function(){return it(y,this)}}vt.selectAll=function(y){var M=[],P,N;y=De(y);for(var U=-1,Z=this.length;++U<Z;)for(var $=this[U],X=-1,ae=$.length;++X<ae;)(N=$[X])&&(M.push(P=r(y.call(N,N.__data__,X,U))),P.parentNode=N);return St(M)};function De(y){return typeof y=="function"?y:function(){return mt(y,this)}}var ge="http://www.w3.org/1999/xhtml",rt={svg:"http://www.w3.org/2000/svg",xhtml:ge,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:rt,qualify:function(y){var M=y.indexOf(":"),P=y;return M>=0&&(P=y.slice(0,M))!=="xmlns"&&(y=y.slice(M+1)),rt.hasOwnProperty(P)?{space:rt[P],local:y}:y}},vt.attr=function(y,M){if(arguments.length<2){if(typeof y=="string"){var P=this.node();return y=e.ns.qualify(y),y.local?P.getAttributeNS(y.space,y.local):P.getAttribute(y)}for(M in y)this.each(dt(M,y[M]));return this}return this.each(dt(y,M))};function dt(y,M){y=e.ns.qualify(y);function P(){this.removeAttribute(y)}function N(){this.removeAttributeNS(y.space,y.local)}function U(){this.setAttribute(y,M)}function Z(){this.setAttributeNS(y.space,y.local,M)}function $(){var ae=M.apply(this,arguments);ae==null?this.removeAttribute(y):this.setAttribute(y,ae)}function X(){var ae=M.apply(this,arguments);ae==null?this.removeAttributeNS(y.space,y.local):this.setAttributeNS(y.space,y.local,ae)}return M==null?y.local?N:P:typeof M=="function"?y.local?X:$:y.local?Z:U}function We(y){return y.trim().replace(/\s+/g," ")}vt.classed=function(y,M){if(arguments.length<2){if(typeof y=="string"){var P=this.node(),N=(y=Dt(y)).length,U=-1;if(M=P.classList){for(;++U<N;)if(!M.contains(y[U]))return!1}else for(M=P.getAttribute("class");++U<N;)if(!qt(y[U]).test(M))return!1;return!0}for(M in y)this.each(Tt(M,y[M]));return this}return this.each(Tt(y,M))};function qt(y){return new RegExp("(?:^|\\s+)"+e.requote(y)+"(?:\\s+|$)","g")}function Dt(y){return(y+"").trim().split(/^|\s+/)}function Tt(y,M){y=Dt(y).map(Rt);var P=y.length;function N(){for(var Z=-1;++Z<P;)y[Z](this,M)}function U(){for(var Z=-1,$=M.apply(this,arguments);++Z<P;)y[Z](this,$)}return typeof M=="function"?U:N}function Rt(y){var M=qt(y);return function(P,N){if(U=P.classList)return N?U.add(y):U.remove(y);var U=P.getAttribute("class")||"";N?(M.lastIndex=0,M.test(U)||P.setAttribute("class",We(U+" "+y))):P.setAttribute("class",We(U.replace(M," ")))}}vt.style=function(y,M,P){var N=arguments.length;if(N<3){if(typeof y!="string"){N<2&&(M="");for(P in y)this.each(Ut(P,y[P],M));return this}if(N<2){var U=this.node();return s(U).getComputedStyle(U,null).getPropertyValue(y)}P=""}return this.each(Ut(y,M,P))};function Ut(y,M,P){function N(){this.style.removeProperty(y)}function U(){this.style.setProperty(y,M,P)}function Z(){var $=M.apply(this,arguments);$==null?this.style.removeProperty(y):this.style.setProperty(y,$,P)}return M==null?N:typeof M=="function"?Z:U}vt.property=function(y,M){if(arguments.length<2){if(typeof y=="string")return this.node()[y];for(M in y)this.each(Ct(M,y[M]));return this}return this.each(Ct(y,M))};function Ct(y,M){function P(){delete this[y]}function N(){this[y]=M}function U(){var Z=M.apply(this,arguments);Z==null?delete this[y]:this[y]=Z}return M==null?P:typeof M=="function"?U:N}vt.text=function(y){return arguments.length?this.each(typeof y=="function"?function(){var M=y.apply(this,arguments);this.textContent=M==null?"":M}:y==null?function(){this.textContent=""}:function(){this.textContent=y}):this.node().textContent},vt.html=function(y){return arguments.length?this.each(typeof y=="function"?function(){var M=y.apply(this,arguments);this.innerHTML=M==null?"":M}:y==null?function(){this.innerHTML=""}:function(){this.innerHTML=y}):this.node().innerHTML},vt.append=function(y){return y=At(y),this.select(function(){return this.appendChild(y.apply(this,arguments))})};function At(y){function M(){var N=this.ownerDocument,U=this.namespaceURI;return U===ge&&N.documentElement.namespaceURI===ge?N.createElement(y):N.createElementNS(U,y)}function P(){return this.ownerDocument.createElementNS(y.space,y.local)}return typeof y=="function"?y:(y=e.ns.qualify(y)).local?P:M}vt.insert=function(y,M){return y=At(y),M=de(M),this.select(function(){return this.insertBefore(y.apply(this,arguments),M.apply(this,arguments)||null)})},vt.remove=function(){return this.each(Vt)};function Vt(){var y=this.parentNode;y&&y.removeChild(this)}vt.data=function(y,M){var P=-1,N=this.length,U,Z;if(!arguments.length){for(y=new Array(N=(U=this[0]).length);++P<N;)(Z=U[P])&&(y[P]=Z.__data__);return y}function $(_e,ze){var Pe,Qe=_e.length,ot=ze.length,Ie=Math.min(Qe,ot),Ve=new Array(ot),Je=new Array(ot),ft=new Array(Qe),nt,Xe;if(M){var Gt=new I,or=new Array(Qe),hr;for(Pe=-1;++Pe<Qe;)(nt=_e[Pe])&&(Gt.has(hr=M.call(nt,nt.__data__,Pe))?ft[Pe]=nt:Gt.set(hr,nt),or[Pe]=hr);for(Pe=-1;++Pe<ot;)(nt=Gt.get(hr=M.call(ze,Xe=ze[Pe],Pe)))?nt!==!0&&(Ve[Pe]=nt,nt.__data__=Xe):Je[Pe]=Ht(Xe),Gt.set(hr,!0);for(Pe=-1;++Pe<Qe;)Pe in or&&Gt.get(or[Pe])!==!0&&(ft[Pe]=_e[Pe])}else{for(Pe=-1;++Pe<Ie;)nt=_e[Pe],Xe=ze[Pe],nt?(nt.__data__=Xe,Ve[Pe]=nt):Je[Pe]=Ht(Xe);for(;Pe<ot;++Pe)Je[Pe]=Ht(ze[Pe]);for(;Pe<Qe;++Pe)ft[Pe]=_e[Pe]}Je.update=Ve,Je.parentNode=Ve.parentNode=ft.parentNode=_e.parentNode,X.push(Je),ae.push(Ve),me.push(ft)}var X=Dr([]),ae=St([]),me=St([]);if(typeof y=="function")for(;++P<N;)$(U=this[P],y.call(U,U.parentNode.__data__,P));else for(;++P<N;)$(U=this[P],y);return ae.enter=function(){return X},ae.exit=function(){return me},ae};function Ht(y){return{__data__:y}}vt.datum=function(y){return arguments.length?this.property("__data__",y):this.property("__data__")},vt.filter=function(y){var M=[],P,N,U;typeof y!="function"&&(y=Be(y));for(var Z=0,$=this.length;Z<$;Z++){M.push(P=[]),P.parentNode=(N=this[Z]).parentNode;for(var X=0,ae=N.length;X<ae;X++)(U=N[X])&&y.call(U,U.__data__,X,Z)&&P.push(U)}return St(M)};function Be(y){return function(){return bt(this,y)}}vt.order=function(){for(var y=-1,M=this.length;++y<M;)for(var P=this[y],N=P.length-1,U=P[N],Z;--N>=0;)(Z=P[N])&&(U&&U!==Z.nextSibling&&U.parentNode.insertBefore(Z,U),U=Z);return this},vt.sort=function(y){y=st.apply(this,arguments);for(var M=-1,P=this.length;++M<P;)this[M].sort(y);return this.order()};function st(y){return arguments.length||(y=_),function(M,P){return M&&P?y(M.__data__,P.__data__):!M-!P}}vt.each=function(y){return sr(this,function(M,P,N){y.call(M,M.__data__,P,N)})};function sr(y,M){for(var P=0,N=y.length;P<N;P++)for(var U=y[P],Z=0,$=U.length,X;Z<$;Z++)(X=U[Z])&&M(X,Z,P);return y}vt.call=function(y){var M=r(arguments);return y.apply(M[0]=this,M),this},vt.empty=function(){return!this.node()},vt.node=function(){for(var y=0,M=this.length;y<M;y++)for(var P=this[y],N=0,U=P.length;N<U;N++){var Z=P[N];if(Z)return Z}return null},vt.size=function(){var y=0;return sr(this,function(){++y}),y};function Dr(y){return Ye(y,Et),y}var Et=[];e.selection.enter=Dr,e.selection.enter.prototype=Et,Et.append=vt.append,Et.empty=vt.empty,Et.node=vt.node,Et.call=vt.call,Et.size=vt.size,Et.select=function(y){for(var M=[],P,N,U,Z,$,X=-1,ae=this.length;++X<ae;){U=(Z=this[X]).update,M.push(P=[]),P.parentNode=Z.parentNode;for(var me=-1,_e=Z.length;++me<_e;)($=Z[me])?(P.push(U[me]=N=y.call(Z.parentNode,$.__data__,me,X)),N.__data__=$.__data__):P.push(null)}return St(M)},Et.insert=function(y,M){return arguments.length<2&&(M=ct(this)),vt.insert.call(this,y,M)};function ct(y){var M,P;return function(N,U,Z){var $=y[Z].update,X=$.length,ae;for(Z!=P&&(P=Z,M=0),U>=M&&(M=U+1);!(ae=$[M])&&++M<X;);return ae}}e.select=function(y){var M;return typeof y=="string"?(M=[it(y,i)],M.parentNode=i.documentElement):(M=[y],M.parentNode=a(y)),St([M])},e.selectAll=function(y){var M;return typeof y=="string"?(M=r(mt(y,i)),M.parentNode=i.documentElement):(M=r(y),M.parentNode=null),St([M])},vt.on=function(y,M,P){var N=arguments.length;if(N<3){if(typeof y!="string"){N<2&&(M=!1);for(P in y)this.each(pt(P,y[P],M));return this}if(N<2)return(N=this.node()["__on"+y])&&N._;P=!1}return this.each(pt(y,M,P))};function pt(y,M,P){var N="__on"+y,U=y.indexOf("."),Z=er;U>0&&(y=y.slice(0,U));var $=Ot.get(y);$&&(y=$,Z=Zt);function X(){var _e=this[N];_e&&(this.removeEventListener(y,_e,_e.$),delete this[N])}function ae(){var _e=Z(M,r(arguments));X.call(this),this.addEventListener(y,this[N]=_e,_e.$=P),_e._=M}function me(){var _e=new RegExp("^__on([^.]+)"+e.requote(y)+"$"),ze;for(var Pe in this)if(ze=Pe.match(_e)){var Qe=this[Pe];this.removeEventListener(ze[1],Qe,Qe.$),delete this[Pe]}}return U?M?ae:X:M?Te:me}var Ot=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});i&&Ot.forEach(function(y){"on"+y in i&&Ot.remove(y)});function er(y,M){return function(P){var N=e.event;e.event=P,M[0]=this.__data__;try{y.apply(this,M)}finally{e.event=N}}}function Zt(y,M){var P=er(y,M);return function(N){var U=this,Z=N.relatedTarget;(!Z||Z!==U&&!(Z.compareDocumentPosition(U)&8))&&P.call(U,N)}}var Kt,pr=0;function yr(y){var M=".dragsuppress-"+ ++pr,P="click"+M,N=e.select(s(y)).on("touchmove"+M,Ke).on("dragstart"+M,Ke).on("selectstart"+M,Ke);if(Kt==null&&(Kt="onselectstart"in y?!1:Ae(y.style,"userSelect")),Kt){var U=a(y).style,Z=U[Kt];U[Kt]="none"}return function($){if(N.on(M,null),Kt&&(U[Kt]=Z),$){var X=function(){N.on(P,null)};N.on(P,function(){Ke(),X()},!0),setTimeout(X,0)}}}e.mouse=function(y){return Lt(y,lt())};var ur=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Lt(y,M){M.changedTouches&&(M=M.changedTouches[0]);var P=y.ownerSVGElement||y;if(P.createSVGPoint){var N=P.createSVGPoint();if(ur<0){var U=s(y);if(U.scrollX||U.scrollY){P=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Z=P[0][0].getScreenCTM();ur=!(Z.f||Z.e),P.remove()}}return ur?(N.x=M.pageX,N.y=M.pageY):(N.x=M.clientX,N.y=M.clientY),N=N.matrixTransform(y.getScreenCTM().inverse()),[N.x,N.y]}var $=y.getBoundingClientRect();return[M.clientX-$.left-y.clientLeft,M.clientY-$.top-y.clientTop]}e.touch=function(y,M,P){if(arguments.length<3&&(P=M,M=lt().changedTouches),M){for(var N=0,U=M.length,Z;N<U;++N)if((Z=M[N]).identifier===P)return Lt(y,Z)}},e.behavior.drag=function(){var y=at(U,"drag","dragstart","dragend"),M=null,P=Z(Te,e.mouse,s,"mousemove","mouseup"),N=Z(Fe,e.touch,Se,"touchmove","touchend");function U(){this.on("mousedown.drag",P).on("touchstart.drag",N)}function Z($,X,ae,me,_e){return function(){var ze=this,Pe=e.event.target.correspondingElement||e.event.target,Qe=ze.parentNode,ot=y.of(ze,arguments),Ie=0,Ve=$(),Je=".drag"+(Ve==null?"":"-"+Ve),ft,nt=e.select(ae(Pe)).on(me+Je,or).on(_e+Je,hr),Xe=yr(Pe),Gt=X(Qe,Ve);M?(ft=M.apply(ze,arguments),ft=[ft.x-Gt[0],ft.y-Gt[1]]):ft=[0,0],ot({type:"dragstart"});function or(){var fr=X(Qe,Ve),zr,Rr;fr&&(zr=fr[0]-Gt[0],Rr=fr[1]-Gt[1],Ie|=zr|Rr,Gt=fr,ot({type:"drag",x:fr[0]+ft[0],y:fr[1]+ft[1],dx:zr,dy:Rr}))}function hr(){X(Qe,Ve)&&(nt.on(me+Je,null).on(_e+Je,null),Xe(Ie),ot({type:"dragend"}))}}}return U.origin=function($){return arguments.length?(M=$,U):M},e.rebind(U,y,"on")};function Fe(){return e.event.changedTouches[0].identifier}e.touches=function(y,M){return arguments.length<2&&(M=lt().touches),M?r(M).map(function(P){var N=Lt(y,P);return N.identifier=P.identifier,N}):[]};var Ue=1e-6,xt=Ue*Ue,wt=Math.PI,mr=2*wt,Ar=mr-Ue,Mr=wt/2,Gr=wt/180,pa=180/wt;function Ca(y){return y>0?1:y<0?-1:0}function ii(y,M,P){return(M[0]-y[0])*(P[1]-y[1])-(M[1]-y[1])*(P[0]-y[0])}function wi(y){return y>1?0:y<-1?wt:Math.acos(y)}function vi(y){return y>1?Mr:y<-1?-Mr:Math.asin(y)}function Fi(y){return((y=Math.exp(y))-1/y)/2}function Gi(y){return((y=Math.exp(y))+1/y)/2}function hn(y){return((y=Math.exp(2*y))-1)/(y+1)}function nn(y){return(y=Math.sin(y/2))*y}var Ki=Math.SQRT2,ir=2,oi=4;e.interpolateZoom=function(y,M){var P=y[0],N=y[1],U=y[2],Z=M[0],$=M[1],X=M[2],ae=Z-P,me=$-N,_e=ae*ae+me*me,ze,Pe;if(_e<xt)Pe=Math.log(X/U)/Ki,ze=function(ft){return[P+ft*ae,N+ft*me,U*Math.exp(Ki*ft*Pe)]};else{var Qe=Math.sqrt(_e),ot=(X*X-U*U+oi*_e)/(2*U*ir*Qe),Ie=(X*X-U*U-oi*_e)/(2*X*ir*Qe),Ve=Math.log(Math.sqrt(ot*ot+1)-ot),Je=Math.log(Math.sqrt(Ie*Ie+1)-Ie);Pe=(Je-Ve)/Ki,ze=function(ft){var nt=ft*Pe,Xe=Gi(Ve),Gt=U/(ir*Qe)*(Xe*hn(Ki*nt+Ve)-Fi(Ve));return[P+Gt*ae,N+Gt*me,U*Xe/Gi(Ki*nt+Ve)]}}return ze.duration=Pe*1e3,ze},e.behavior.zoom=function(){var y={x:0,y:0,k:1},M,P,N,U=[960,500],Z=Sa,$=250,X=0,ae="mousedown.zoom",me="mousemove.zoom",_e="mouseup.zoom",ze,Pe="touchstart.zoom",Qe,ot=at(nt,"zoomstart","zoom","zoomend"),Ie,Ve,Je,ft;Ci||(Ci="onwheel"in i?(la=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in i?(la=function(){return e.event.wheelDelta},"mousewheel"):(la=function(){return-e.event.detail},"MozMousePixelScroll"));function nt(jt){jt.on(ae,Jr).on(Ci+".zoom",ei).on("dblclick.zoom",Qa).on(Pe,Na)}nt.event=function(jt){jt.each(function(){var jr=ot.of(this,arguments),na=y;so?e.select(this).transition().each("start.zoom",function(){y=this.__chart__||{x:0,y:0,k:1},Rr(jr)}).tween("zoom:zoom",function(){var oa=U[0],Di=U[1],Vi=P?P[0]:oa/2,en=P?P[1]:Di/2,bi=e.interpolateZoom([(Vi-y.x)/y.k,(en-y.y)/y.k,oa/y.k],[(Vi-na.x)/na.k,(en-na.y)/na.k,oa/na.k]);return function(wn){var Tr=bi(wn),Hr=oa/Tr[2];this.__chart__=y={x:Vi-Tr[0]*Hr,y:en-Tr[1]*Hr,k:Hr},ea(jr)}}).each("interrupt.zoom",function(){Vr(jr)}).each("end.zoom",function(){Vr(jr)}):(this.__chart__=y,Rr(jr),ea(jr),Vr(jr))})},nt.translate=function(jt){return arguments.length?(y={x:+jt[0],y:+jt[1],k:y.k},zr(),nt):[y.x,y.y]},nt.scale=function(jt){return arguments.length?(y={x:y.x,y:y.y,k:null},or(+jt),zr(),nt):y.k},nt.scaleExtent=function(jt){return arguments.length?(Z=jt==null?Sa:[+jt[0],+jt[1]],nt):Z},nt.center=function(jt){return arguments.length?(N=jt&&[+jt[0],+jt[1]],nt):N},nt.size=function(jt){return arguments.length?(U=jt&&[+jt[0],+jt[1]],nt):U},nt.duration=function(jt){return arguments.length?($=+jt,nt):$},nt.x=function(jt){return arguments.length?(Ve=jt,Ie=jt.copy(),y={x:0,y:0,k:1},nt):Ve},nt.y=function(jt){return arguments.length?(ft=jt,Je=jt.copy(),y={x:0,y:0,k:1},nt):ft};function Xe(jt){return[(jt[0]-y.x)/y.k,(jt[1]-y.y)/y.k]}function Gt(jt){return[jt[0]*y.k+y.x,jt[1]*y.k+y.y]}function or(jt){y.k=Math.max(Z[0],Math.min(Z[1],jt))}function hr(jt,jr){jr=Gt(jr),y.x+=jt[0]-jr[0],y.y+=jt[1]-jr[1]}function fr(jt,jr,na,oa){jt.__chart__={x:y.x,y:y.y,k:y.k},or(Math.pow(2,oa)),hr(P=jr,na),jt=e.select(jt),$>0&&(jt=jt.transition().duration($)),jt.call(nt.event)}function zr(){Ve&&Ve.domain(Ie.range().map(function(jt){return(jt-y.x)/y.k}).map(Ie.invert)),ft&&ft.domain(Je.range().map(function(jt){return(jt-y.y)/y.k}).map(Je.invert))}function Rr(jt){X++||jt({type:"zoomstart"})}function ea(jt){zr(),jt({type:"zoom",scale:y.k,translate:[y.x,y.y]})}function Vr(jt){--X||(jt({type:"zoomend"}),P=null)}function Jr(){var jt=this,jr=ot.of(jt,arguments),na=0,oa=e.select(s(jt)).on(me,en).on(_e,bi),Di=Xe(e.mouse(jt)),Vi=yr(jt);ah.call(jt),Rr(jr);function en(){na=1,hr(e.mouse(jt),Di),ea(jr)}function bi(){oa.on(me,null).on(_e,null),Vi(na),Vr(jr)}}function Na(){var jt=this,jr=ot.of(jt,arguments),na={},oa=0,Di,Vi=".zoom-"+e.event.changedTouches[0].identifier,en="touchmove"+Vi,bi="touchend"+Vi,wn=[],Tr=e.select(jt),Hr=yr(jt);Ai(),Rr(jr),Tr.on(ae,null).on(Pe,Ai);function Ni(){var pn=e.touches(jt);return Di=y.k,pn.forEach(function(pi){pi.identifier in na&&(na[pi.identifier]=Xe(pi))}),pn}function Ai(){var pn=e.event.target;e.select(pn).on(en,lo).on(bi,Rn),wn.push(pn);for(var pi=e.event.changedTouches,jo=0,uo=pi.length;jo<uo;++jo)na[pi[jo].identifier]=null;var ci=Ni(),yf=Date.now();if(ci.length===1){if(yf-Qe<500){var Ta=ci[0];fr(jt,Ta,na[Ta.identifier],Math.floor(Math.log(y.k)/Math.LN2)+1),Ke()}Qe=yf}else if(ci.length>1){var Ta=ci[0],ui=ci[1],Nl=Ta[0]-ui[0],Hv=Ta[1]-ui[1];oa=Nl*Nl+Hv*Hv}}function lo(){var pn=e.touches(jt),pi,jo,uo,ci;ah.call(jt);for(var yf=0,Ta=pn.length;yf<Ta;++yf,ci=null)if(uo=pn[yf],ci=na[uo.identifier]){if(jo)break;pi=uo,jo=ci}if(ci){var ui=(ui=uo[0]-pi[0])*ui+(ui=uo[1]-pi[1])*ui,Nl=oa&&Math.sqrt(ui/oa);pi=[(pi[0]+uo[0])/2,(pi[1]+uo[1])/2],jo=[(jo[0]+ci[0])/2,(jo[1]+ci[1])/2],or(Nl*Di)}Qe=null,hr(pi,jo),ea(jr)}function Rn(){if(e.event.touches.length){for(var pn=e.event.changedTouches,pi=0,jo=pn.length;pi<jo;++pi)delete na[pn[pi].identifier];for(var uo in na)return void Ni()}e.selectAll(wn).on(Vi,null),Tr.on(ae,Jr).on(Pe,Na),Hr(),Vr(jr)}}function ei(){var jt=ot.of(this,arguments);ze?clearTimeout(ze):(ah.call(this),M=Xe(P=N||e.mouse(this)),Rr(jt)),ze=setTimeout(function(){ze=null,Vr(jt)},50),Ke(),or(Math.pow(2,la()*.002)*y.k),hr(P,M),ea(jt)}function Qa(){var jt=e.mouse(this),jr=Math.log(y.k)/Math.LN2;fr(this,jt,Xe(jt),e.event.shiftKey?Math.ceil(jr)-1:Math.floor(jr)+1)}return e.rebind(nt,ot,"on")};var Sa=[0,1/0],la,Ci;e.color=ma;function ma(){}ma.prototype.toString=function(){return this.rgb()+""},e.hsl=se;function se(y,M,P){return this instanceof se?(this.h=+y,this.s=+M,void(this.l=+P)):arguments.length<2?y instanceof se?new se(y.h,y.s,y.l):$r(""+y,ga,se):new se(y,M,P)}var ee=se.prototype=new ma;ee.brighter=function(y){return y=Math.pow(.7,arguments.length?y:1),new se(this.h,this.s,this.l/y)},ee.darker=function(y){return y=Math.pow(.7,arguments.length?y:1),new se(this.h,this.s,y*this.l)},ee.rgb=function(){return le(this.h,this.s,this.l)};function le(y,M,P){var N,U;y=isNaN(y)?0:(y%=360)<0?y+360:y,M=isNaN(M)||M<0?0:M>1?1:M,P=P<0?0:P>1?1:P,U=P<=.5?P*(1+M):P+M-P*M,N=2*P-U;function Z(X){return X>360?X-=360:X<0&&(X+=360),X<60?N+(U-N)*X/60:X<180?U:X<240?N+(U-N)*(240-X)/60:N}function $(X){return Math.round(Z(X)*255)}return new ua($(y+120),$(y),$(y-120))}e.hcl=ce;function ce(y,M,P){return this instanceof ce?(this.h=+y,this.c=+M,void(this.l=+P)):arguments.length<2?y instanceof ce?new ce(y.h,y.c,y.l):y instanceof $e?Sr(y.l,y.a,y.b):Sr((y=nr((y=e.rgb(y)).r,y.g,y.b)).l,y.a,y.b):new ce(y,M,P)}var Ee=ce.prototype=new ma;Ee.brighter=function(y){return new ce(this.h,this.c,Math.min(100,this.l+Ze*(arguments.length?y:1)))},Ee.darker=function(y){return new ce(this.h,this.c,Math.max(0,this.l-Ze*(arguments.length?y:1)))},Ee.rgb=function(){return Ne(this.h,this.c,this.l).rgb()};function Ne(y,M,P){return isNaN(y)&&(y=0),isNaN(M)&&(M=0),new $e(P,Math.cos(y*=Gr)*M,Math.sin(y)*M)}e.lab=$e;function $e(y,M,P){return this instanceof $e?(this.l=+y,this.a=+M,void(this.b=+P)):arguments.length<2?y instanceof $e?new $e(y.l,y.a,y.b):y instanceof ce?Ne(y.h,y.c,y.l):nr((y=ua(y)).r,y.g,y.b):new $e(y,M,P)}var Ze=18,yt=.95047,Pt=1,Ft=1.08883,tr=$e.prototype=new ma;tr.brighter=function(y){return new $e(Math.min(100,this.l+Ze*(arguments.length?y:1)),this.a,this.b)},tr.darker=function(y){return new $e(Math.max(0,this.l-Ze*(arguments.length?y:1)),this.a,this.b)},tr.rgb=function(){return Wt(this.l,this.a,this.b)};function Wt(y,M,P){var N=(y+16)/116,U=N+M/500,Z=N-P/200;return U=Zr(U)*yt,N=Zr(N)*Pt,Z=Zr(Z)*Ft,new ua(ca(3.2404542*U-1.5371385*N-.4985314*Z),ca(-.969266*U+1.8760108*N+.041556*Z),ca(.0556434*U-.2040259*N+1.0572252*Z))}function Sr(y,M,P){return y>0?new ce(Math.atan2(P,M)*pa,Math.sqrt(M*M+P*P),y):new ce(NaN,NaN,y)}function Zr(y){return y>.206893034?y*y*y:(y-4/29)/7.787037}function Or(y){return y>.008856?Math.pow(y,1/3):7.787037*y+4/29}function ca(y){return Math.round(255*(y<=.00304?12.92*y:1.055*Math.pow(y,1/2.4)-.055))}e.rgb=ua;function ua(y,M,P){return this instanceof ua?(this.r=~~y,this.g=~~M,void(this.b=~~P)):arguments.length<2?y instanceof ua?new ua(y.r,y.g,y.b):$r(""+y,ua,le):new ua(y,M,P)}function qa(y){return new ua(y>>16,y>>8&255,y&255)}function ri(y){return qa(y)+""}var Yr=ua.prototype=new ma;Yr.brighter=function(y){y=Math.pow(.7,arguments.length?y:1);var M=this.r,P=this.g,N=this.b,U=30;return!M&&!P&&!N?new ua(U,U,U):(M&&M<U&&(M=U),P&&P<U&&(P=U),N&&N<U&&(N=U),new ua(Math.min(255,M/y),Math.min(255,P/y),Math.min(255,N/y)))},Yr.darker=function(y){return y=Math.pow(.7,arguments.length?y:1),new ua(y*this.r,y*this.g,y*this.b)},Yr.hsl=function(){return ga(this.r,this.g,this.b)},Yr.toString=function(){return"#"+gr(this.r)+gr(this.g)+gr(this.b)};function gr(y){return y<16?"0"+Math.max(0,y).toString(16):Math.min(255,y).toString(16)}function $r(y,M,P){var N=0,U=0,Z=0,$,X,ae;if($=/([a-z]+)\((.*)\)/.exec(y=y.toLowerCase()),$)switch(X=$[2].split(","),$[1]){case"hsl":return P(parseFloat(X[0]),parseFloat(X[1])/100,parseFloat(X[2])/100);case"rgb":return M(Ea(X[0]),Ea(X[1]),Ea(X[2]))}return(ae=si.get(y))?M(ae.r,ae.g,ae.b):(y!=null&&y.charAt(0)==="#"&&!isNaN(ae=parseInt(y.slice(1),16))&&(y.length===4?(N=(ae&3840)>>4,N=N>>4|N,U=ae&240,U=U>>4|U,Z=ae&15,Z=Z<<4|Z):y.length===7&&(N=(ae&16711680)>>16,U=(ae&65280)>>8,Z=ae&255)),M(N,U,Z))}function ga(y,M,P){var N=Math.min(y/=255,M/=255,P/=255),U=Math.max(y,M,P),Z=U-N,$,X,ae=(U+N)/2;return Z?(X=ae<.5?Z/(U+N):Z/(2-U-N),y==U?$=(M-P)/Z+(M<P?6:0):M==U?$=(P-y)/Z+2:$=(y-M)/Z+4,$*=60):($=NaN,X=ae>0&&ae<1?0:$),new se($,X,ae)}function nr(y,M,P){y=Ti(y),M=Ti(M),P=Ti(P);var N=Or((.4124564*y+.3575761*M+.1804375*P)/yt),U=Or((.2126729*y+.7151522*M+.072175*P)/Pt),Z=Or((.0193339*y+.119192*M+.9503041*P)/Ft);return $e(116*U-16,500*(N-U),200*(U-Z))}function Ti(y){return(y/=255)<=.04045?y/12.92:Math.pow((y+.055)/1.055,2.4)}function Ea(y){var M=parseFloat(y);return y.charAt(y.length-1)==="%"?Math.round(M*2.55):M}var si=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});si.forEach(function(y,M){si.set(y,qa(M))});function fa(y){return typeof y=="function"?y:function(){return y}}e.functor=fa,e.xhr=Pn(Se);function Pn(y){return function(M,P,N){return arguments.length===2&&typeof P=="function"&&(N=P,P=null),Co(M,P,y,N)}}function Co(y,M,P,N){var U={},Z=e.dispatch("beforesend","progress","load","error"),$={},X=new XMLHttpRequest,ae=null;self.XDomainRequest&&!("withCredentials"in X)&&/^(http(s)?:)?\/\//.test(y)&&(X=new XDomainRequest),"onload"in X?X.onload=X.onerror=me:X.onreadystatechange=function(){X.readyState>3&&me()};function me(){var _e=X.status,ze;if(!_e&&Ga(X)||_e>=200&&_e<300||_e===304){try{ze=P.call(U,X)}catch(Pe){Z.error.call(U,Pe);return}Z.load.call(U,ze)}else Z.error.call(U,X)}return X.onprogress=function(_e){var ze=e.event;e.event=_e;try{Z.progress.call(U,X)}finally{e.event=ze}},U.header=function(_e,ze){return _e=(_e+"").toLowerCase(),arguments.length<2?$[_e]:(ze==null?delete $[_e]:$[_e]=ze+"",U)},U.mimeType=function(_e){return arguments.length?(M=_e==null?null:_e+"",U):M},U.responseType=function(_e){return arguments.length?(ae=_e,U):ae},U.response=function(_e){return P=_e,U},["get","post"].forEach(function(_e){U[_e]=function(){return U.send.apply(U,[_e].concat(r(arguments)))}}),U.send=function(_e,ze,Pe){if(arguments.length===2&&typeof ze=="function"&&(Pe=ze,ze=null),X.open(_e,y,!0),M!=null&&!("accept"in $)&&($.accept=M+",*/*"),X.setRequestHeader)for(var Qe in $)X.setRequestHeader(Qe,$[Qe]);return M!=null&&X.overrideMimeType&&X.overrideMimeType(M),ae!=null&&(X.responseType=ae),Pe!=null&&U.on("error",Pe).on("load",function(ot){Pe(null,ot)}),Z.beforesend.call(U,X),X.send(ze==null?null:ze),U},U.abort=function(){return X.abort(),U},e.rebind(U,Z,"on"),N==null?U:U.get(xs(N))}function xs(y){return y.length===1?function(M,P){y(M==null?P:null)}:y}function Ga(y){var M=y.responseType;return M&&M!=="text"?y.response:y.responseText}e.dsv=function(y,M){var P=new RegExp('["'+y+` ]`),N=y.charCodeAt(0);function U(me,_e,ze){arguments.length<3&&(ze=_e,_e=null);var Pe=Co(me,M,_e==null?Z:$(_e),ze);return Pe.row=function(Qe){return arguments.length?Pe.response((_e=Qe)==null?Z:$(Qe)):_e},Pe}function Z(me){return U.parse(me.responseText)}function $(me){return function(_e){return U.parse(_e.responseText,me)}}U.parse=function(me,_e){var ze;return U.parseRows(me,function(Pe,Qe){if(ze)return ze(Pe,Qe-1);var ot=function(Ie){for(var Ve={},Je=Pe.length,ft=0;ft<Je;++ft)Ve[Pe[ft]]=Ie[ft];return Ve};ze=_e?function(Ie,Ve){return _e(ot(Ie),Ve)}:ot})},U.parseRows=function(me,_e){var ze={},Pe={},Qe=[],ot=me.length,Ie=0,Ve=0,Je,ft;function nt(){if(Ie>=ot)return Pe;if(ft)return ft=!1,ze;var Gt=Ie;if(me.charCodeAt(Gt)===34){for(var or=Gt;or++<ot;)if(me.charCodeAt(or)===34){if(me.charCodeAt(or+1)!==34)break;++or}Ie=or+2;var hr=me.charCodeAt(or+1);return hr===13?(ft=!0,me.charCodeAt(or+2)===10&&++Ie):hr===10&&(ft=!0),me.slice(Gt+1,or).replace(/""/g,'"')}for(;Ie<ot;){var hr=me.charCodeAt(Ie++),fr=1;if(hr===10)ft=!0;else if(hr===13)ft=!0,me.charCodeAt(Ie)===10&&(++Ie,++fr);else if(hr!==N)continue;return me.slice(Gt,Ie-fr)}return me.slice(Gt)}for(;(Je=nt())!==Pe;){for(var Xe=[];Je!==ze&&Je!==Pe;)Xe.push(Je),Je=nt();_e&&(Xe=_e(Xe,Ve++))==null||Qe.push(Xe)}return Qe},U.format=function(me){if(Array.isArray(me[0]))return U.formatRows(me);var _e=new ve,ze=[];return me.forEach(function(Pe){for(var Qe in Pe)_e.has(Qe)||ze.push(_e.add(Qe))}),[ze.map(ae).join(y)].concat(me.map(function(Pe){return ze.map(function(Qe){return ae(Pe[Qe])}).join(y)})).join(` `)},U.formatRows=function(me){return me.map(X).join(` `)};function X(me){return me.map(ae).join(y)}function ae(me){return P.test(me)?'"'+me.replace(/\"/g,'""')+'"':me}return U},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Kn,hu,Ui,dl,$d=this[Ae(this,"requestAnimationFrame")]||function(y){setTimeout(y,17)};e.timer=function(){qc.apply(this,arguments)};function qc(y,M,P){var N=arguments.length;N<2&&(M=0),N<3&&(P=Date.now());var U=P+M,Z={c:y,t:U,n:null};return hu?hu.n=Z:Kn=Z,hu=Z,Ui||(dl=clearTimeout(dl),Ui=1,$d(Nc)),Z}function Nc(){var y=hv(),M=vv()-y;M>24?(isFinite(M)&&(clearTimeout(dl),dl=setTimeout(Nc,M)),Ui=0):(Ui=1,$d(Nc))}e.timer.flush=function(){hv(),vv()};function hv(){for(var y=Date.now(),M=Kn;M;)y>=M.t&&M.c(y-M.t)&&(M.c=null),M=M.n;return y}function vv(){for(var y,M=Kn,P=1/0;M;)M.c?(M.t<P&&(P=M.t),M=(y=M).n):M=y?y.n=M.n:Kn=M.n;return hu=y,P}e.round=function(y,M){return M?Math.round(y*(M=Math.pow(10,M)))/M:Math.round(y)},e.geom={};function vu(y){return y[0]}function pl(y){return y[1]}e.geom.hull=function(y){var M=vu,P=pl;if(arguments.length)return N(y);function N(U){if(U.length<3)return[];var Z=fa(M),$=fa(P),X,ae=U.length,me=[],_e=[];for(X=0;X<ae;X++)me.push([+Z.call(this,U[X],X),+$.call(this,U[X],X),X]);for(me.sort(Ju),X=0;X<ae;X++)_e.push([me[X][0],-me[X][1]]);var ze=ep(me),Pe=ep(_e),Qe=Pe[0]===ze[0],ot=Pe[Pe.length-1]===ze[ze.length-1],Ie=[];for(X=ze.length-1;X>=0;--X)Ie.push(U[me[ze[X]][2]]);for(X=+Qe;X<Pe.length-ot;++X)Ie.push(U[me[Pe[X]][2]]);return Ie}return N.x=function(U){return arguments.length?(M=U,N):M},N.y=function(U){return arguments.length?(P=U,N):P},N};function ep(y){for(var M=y.length,P=[0,1],N=2,U=2;U<M;U++){for(;N>1&&ii(y[P[N-2]],y[P[N-1]],y[U])<=0;)--N;P[N++]=U}return P.slice(0,N)}function Ju(y,M){return y[0]-M[0]||y[1]-M[1]}e.geom.polygon=function(y){return Ye(y,Zf),y};var Zf=e.geom.polygon.prototype=[];Zf.area=function(){for(var y=-1,M=this.length,P,N=this[M-1],U=0;++y<M;)P=N,N=this[y],U+=P[1]*N[0]-P[0]*N[1];return U*.5},Zf.centroid=function(y){var M=-1,P=this.length,N=0,U=0,Z,$=this[P-1],X;for(arguments.length||(y=-1/(6*this.area()));++M<P;)Z=$,$=this[M],X=Z[0]*$[1]-$[0]*Z[1],N+=(Z[0]+$[0])*X,U+=(Z[1]+$[1])*X;return[N*y,U*y]},Zf.clip=function(y){for(var M,P=mo(y),N=-1,U=this.length-mo(this),Z,$,X=this[U-1],ae,me,_e;++N<U;){for(M=y.slice(),y.length=0,ae=this[N],me=M[($=M.length-P)-1],Z=-1;++Z<$;)_e=M[Z],$i(_e,X,ae)?($i(me,X,ae)||y.push(Ho(me,_e,X,ae)),y.push(_e)):$i(me,X,ae)&&y.push(Ho(me,_e,X,ae)),me=_e;P&&y.push(y[0]),X=ae}return y};function $i(y,M,P){return(P[0]-M[0])*(y[1]-M[1])<(P[1]-M[1])*(y[0]-M[0])}function Ho(y,M,P,N){var U=y[0],Z=P[0],$=M[0]-U,X=N[0]-Z,ae=y[1],me=P[1],_e=M[1]-ae,ze=N[1]-me,Pe=(X*(ae-me)-ze*(U-Z))/(ze*$-X*_e);return[U+Pe*$,ae+Pe*_e]}function mo(y){var M=y[0],P=y[y.length-1];return!(M[0]-P[0]||M[1]-P[1])}var ml,Go,du,tp=[],dv,Ku,pv=[];function mv(){Ei(this),this.edge=this.site=this.circle=null}function oo(y){var M=tp.pop()||new mv;return M.site=y,M}function Xt(y){ba(y),du.remove(y),tp.push(y),Ei(y)}function Ur(y){var M=y.circle,P=M.x,N=M.cy,U={x:P,y:N},Z=y.P,$=y.N,X=[y];Xt(y);for(var ae=Z;ae.circle&&z(P-ae.circle.x)<Ue&&z(N-ae.circle.cy)<Ue;)Z=ae.P,X.unshift(ae),Xt(ae),ae=Z;X.unshift(ae),ba(ae);for(var me=$;me.circle&&z(P-me.circle.x)<Ue&&z(N-me.circle.cy)<Ue;)$=me.N,X.push(me),Xt(me),me=$;X.push(me),ba(me);var _e=X.length,ze;for(ze=1;ze<_e;++ze)me=X[ze],ae=X[ze-1],fs(me.edge,ae.site,me.site,U);ae=X[0],me=X[_e-1],me.edge=Ws(ae.site,me.site,null,U),Er(ae),Er(me)}function rp(y){for(var M=y.x,P=y.y,N,U,Z,$,X=du._;X;)if(Z=pu(X,P)-M,Z>Ue)X=X.L;else if($=M-on(X,P),$>Ue){if(!X.R){N=X;break}X=X.R}else{Z>-Ue?(N=X.P,U=X):$>-Ue?(N=X,U=X.N):N=U=X;break}var ae=oo(y);if(du.insert(N,ae),!(!N&&!U)){if(N===U){ba(N),U=oo(N.site),du.insert(ae,U),ae.edge=U.edge=Ws(N.site,ae.site),Er(N),Er(U);return}if(!U){ae.edge=Ws(N.site,ae.site);return}ba(N),ba(U);var me=N.site,_e=me.x,ze=me.y,Pe=y.x-_e,Qe=y.y-ze,ot=U.site,Ie=ot.x-_e,Ve=ot.y-ze,Je=2*(Pe*Ve-Qe*Ie),ft=Pe*Pe+Qe*Qe,nt=Ie*Ie+Ve*Ve,Xe={x:(Ve*ft-Qe*nt)/Je+_e,y:(Pe*nt-Ie*ft)/Je+ze};fs(U.edge,me,ot,Xe),ae.edge=Ws(me,y,null,Xe),U.edge=Ws(y,ot,null,Xe),Er(N),Er(U)}}function pu(y,M){var P=y.site,N=P.x,U=P.y,Z=U-M;if(!Z)return N;var $=y.P;if(!$)return-1/0;P=$.site;var X=P.x,ae=P.y,me=ae-M;if(!me)return X;var _e=X-N,ze=1/Z-1/me,Pe=_e/me;return ze?(-Pe+Math.sqrt(Pe*Pe-2*ze*(_e*_e/(-2*me)-ae+me/2+U-Z/2)))/ze+N:(N+X)/2}function on(y,M){var P=y.N;if(P)return pu(P,M);var N=y.site;return N.y===M?N.x:1/0}function yl(y){this.site=y,this.edges=[]}yl.prototype.prepare=function(){for(var y=this.edges,M=y.length,P;M--;)P=y[M].edge,(!P.b||!P.a)&&y.splice(M,1);return y.sort(Qu),y.length};function bs(y){for(var M=y[0][0],P=y[1][0],N=y[0][1],U=y[1][1],Z,$,X,ae,me=Go,_e=me.length,ze,Pe,Qe,ot,Ie,Ve;_e--;)if(ze=me[_e],!(!ze||!ze.prepare()))for(Qe=ze.edges,ot=Qe.length,Pe=0;Pe<ot;)Ve=Qe[Pe].end(),X=Ve.x,ae=Ve.y,Ie=Qe[++Pe%ot].start(),Z=Ie.x,$=Ie.y,(z(X-Z)>Ue||z(ae-$)>Ue)&&(Qe.splice(Pe,0,new _l(mu(ze.site,Ve,z(X-M)<Ue&&U-ae>Ue?{x:M,y:z(Z-M)<Ue?$:U}:z(ae-U)<Ue&&P-X>Ue?{x:z($-U)<Ue?Z:P,y:U}:z(X-P)<Ue&&ae-N>Ue?{x:P,y:z(Z-P)<Ue?$:N}:z(ae-N)<Ue&&X-M>Ue?{x:z($-N)<Ue?Z:M,y:N}:null),ze.site,null)),++ot)}function Qu(y,M){return M.angle-y.angle}function $u(){Ei(this),this.x=this.y=this.arc=this.site=this.cy=null}function Er(y){var M=y.P,P=y.N;if(!(!M||!P)){var N=M.site,U=y.site,Z=P.site;if(N!==Z){var $=U.x,X=U.y,ae=N.x-$,me=N.y-X,_e=Z.x-$,Ve=Z.y-X,ze=2*(ae*Ve-me*_e);if(!(ze>=-xt)){var Pe=ae*ae+me*me,Qe=_e*_e+Ve*Ve,ot=(Ve*Pe-me*Qe)/ze,Ie=(ae*Qe-_e*Pe)/ze,Ve=Ie+X,Je=pv.pop()||new $u;Je.arc=y,Je.site=U,Je.x=ot+$,Je.y=Ve+Math.sqrt(ot*ot+Ie*Ie),Je.cy=Ve,y.circle=Je;for(var ft=null,nt=Ku._;nt;)if(Je.y<nt.y||Je.y===nt.y&&Je.x<=nt.x)if(nt.L)nt=nt.L;else{ft=nt.P;break}else if(nt.R)nt=nt.R;else{ft=nt;break}Ku.insert(ft,Je),ft||(dv=Je)}}}}function ba(y){var M=y.circle;M&&(M.P||(dv=M.N),Ku.remove(M),pv.push(M),Ei(M),y.circle=null)}function wa(y,M,P,N){return function(U){var Z=U.a,$=U.b,X=Z.x,ae=Z.y,me=$.x,_e=$.y,ze=0,Pe=1,Qe=me-X,ot=_e-ae,Ie;if(Ie=y-X,!(!Qe&&Ie>0)){if(Ie/=Qe,Qe<0){if(Ie<ze)return;Ie<Pe&&(Pe=Ie)}else if(Qe>0){if(Ie>Pe)return;Ie>ze&&(ze=Ie)}if(Ie=P-X,!(!Qe&&Ie<0)){if(Ie/=Qe,Qe<0){if(Ie>Pe)return;Ie>ze&&(ze=Ie)}else if(Qe>0){if(Ie<ze)return;Ie<Pe&&(Pe=Ie)}if(Ie=M-ae,!(!ot&&Ie>0)){if(Ie/=ot,ot<0){if(Ie<ze)return;Ie<Pe&&(Pe=Ie)}else if(ot>0){if(Ie>Pe)return;Ie>ze&&(ze=Ie)}if(Ie=N-ae,!(!ot&&Ie<0)){if(Ie/=ot,ot<0){if(Ie>Pe)return;Ie>ze&&(ze=Ie)}else if(ot>0){if(Ie<ze)return;Ie<Pe&&(Pe=Ie)}return ze>0&&(U.a={x:X+ze*Qe,y:ae+ze*ot}),Pe<1&&(U.b={x:X+Pe*Qe,y:ae+Pe*ot}),U}}}}}}function ws(y){for(var M=ml,P=wa(y[0][0],y[0][1],y[1][0],y[1][1]),N=M.length,U;N--;)U=M[N],(!gl(U,y)||!P(U)||z(U.a.x-U.b.x)<Ue&&z(U.a.y-U.b.y)<Ue)&&(U.a=U.b=null,M.splice(N,1))}function gl(y,M){var P=y.b;if(P)return!0;var N=y.a,U=M[0][0],Z=M[1][0],$=M[0][1],X=M[1][1],ae=y.l,me=y.r,_e=ae.x,ze=ae.y,Pe=me.x,Qe=me.y,ot=(_e+Pe)/2,Ie=(ze+Qe)/2,Ve,Je;if(Qe===ze){if(ot<U||ot>=Z)return;if(_e>Pe){if(!N)N={x:ot,y:$};else if(N.y>=X)return;P={x:ot,y:X}}else{if(!N)N={x:ot,y:X};else if(N.y<$)return;P={x:ot,y:$}}}else if(Ve=(_e-Pe)/(Qe-ze),Je=Ie-Ve*ot,Ve<-1||Ve>1)if(_e>Pe){if(!N)N={x:($-Je)/Ve,y:$};else if(N.y>=X)return;P={x:(X-Je)/Ve,y:X}}else{if(!N)N={x:(X-Je)/Ve,y:X};else if(N.y<$)return;P={x:($-Je)/Ve,y:$}}else if(ze<Qe){if(!N)N={x:U,y:Ve*U+Je};else if(N.x>=Z)return;P={x:Z,y:Ve*Z+Je}}else{if(!N)N={x:Z,y:Ve*Z+Je};else if(N.x<U)return;P={x:U,y:Ve*U+Je}}return y.a=N,y.b=P,!0}function Aa(y,M){this.l=y,this.r=M,this.a=this.b=null}function Ws(y,M,P,N){var U=new Aa(y,M);return ml.push(U),P&&fs(U,y,M,P),N&&fs(U,M,y,N),Go[y.i].edges.push(new _l(U,y,M)),Go[M.i].edges.push(new _l(U,M,y)),U}function mu(y,M,P){var N=new Aa(y,null);return N.a=M,N.b=P,ml.push(N),N}function fs(y,M,P,N){!y.a&&!y.b?(y.a=N,y.l=M,y.r=P):y.l===P?y.b=N:y.a=N}function _l(y,M,P){var N=y.a,U=y.b;this.edge=y,this.site=M,this.angle=P?Math.atan2(P.y-M.y,P.x-M.x):y.l===M?Math.atan2(U.x-N.x,N.y-U.y):Math.atan2(N.x-U.x,U.y-N.y)}_l.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 yo(){this._=null}function Ei(y){y.U=y.C=y.L=y.R=y.P=y.N=null}yo.prototype={insert:function(y,M){var P,N,U;if(y){if(M.P=y,M.N=y.N,y.N&&(y.N.P=M),y.N=M,y.R){for(y=y.R;y.L;)y=y.L;y.L=M}else y.R=M;P=y}else this._?(y=Bc(this._),M.P=null,M.N=y,y.P=y.L=M,P=y):(M.P=M.N=null,this._=M,P=null);for(M.L=M.R=null,M.U=P,M.C=!0,y=M;P&&P.C;)N=P.U,P===N.L?(U=N.R,U&&U.C?(P.C=U.C=!1,N.C=!0,y=N):(y===P.R&&(Ts(this,P),y=P,P=y.U),P.C=!1,N.C=!0,cs(this,N))):(U=N.L,U&&U.C?(P.C=U.C=!1,N.C=!0,y=N):(y===P.L&&(cs(this,P),y=P,P=y.U),P.C=!1,N.C=!0,Ts(this,N))),P=y.U;this._.C=!1},remove:function(y){y.N&&(y.N.P=y.P),y.P&&(y.P.N=y.N),y.N=y.P=null;var M=y.U,P,N=y.L,U=y.R,Z,$;if(N?U?Z=Bc(U):Z=N:Z=U,M?M.L===y?M.L=Z:M.R=Z:this._=Z,N&&U?($=Z.C,Z.C=y.C,Z.L=N,N.U=Z,Z!==U?(M=Z.U,Z.U=y.U,y=Z.R,M.L=y,Z.R=U,U.U=Z):(Z.U=M,M=Z,y=Z.R)):($=y.C,y=Z),y&&(y.U=M),!$){if(y&&y.C){y.C=!1;return}do{if(y===this._)break;i