UNPKG

@iqmo/browser

Version:
1 lines 4.8 MB
import{h as JC,m as KC,g as WC,l as QC,bJ as tO,F as XT,bK as eO,bL as rO,bg as nO,bj as Up,bi as pf,bM as GT,bh as iO,ap as Hh,G as $T,bN as aO,bO as Xg,r as Vp,bc as JT,j as ab,ao as oO}from"./index-0xtYjrTa.js";import{w as sO,E as KT}from"./withFullScreenWrapper-tZtkO1Wh.js";import{F as lO}from"./FormClearHelper-DpOGb8He.js";var WT={},QT={},tA;function cO(){return tA||(tA=1,function(ti){function Da(as){"@babel/helpers - typeof";return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nl){return typeof nl}:function(nl){return nl&&typeof Symbol=="function"&&nl.constructor===Symbol&&nl!==Symbol.prototype?"symbol":typeof nl},Da(as)}Object.defineProperty(ti,"__esModule",{value:!0}),ti.default=Hf;var Ls=tu(JC()),Vo=Ks(KC());function Ks(as){return as&&as.__esModule?as:{default:as}}function fu(as){if(typeof WeakMap!="function")return null;var nl=new WeakMap,pa=new WeakMap;return(fu=function(os){return os?pa:nl})(as)}function tu(as,nl){if(as&&as.__esModule)return as;if(as===null||Da(as)!=="object"&&typeof as!="function")return{default:as};var pa=fu(nl);if(pa&&pa.has(as))return pa.get(as);var os={},Pc=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ss in as)if(ss!=="default"&&Object.prototype.hasOwnProperty.call(as,ss)){var ls=Pc?Object.getOwnPropertyDescriptor(as,ss):null;ls&&(ls.get||ls.set)?Object.defineProperty(os,ss,ls):os[ss]=as[ss]}return os.default=as,pa&&pa.set(as,os),os}function Ch(as,nl){if(!(as instanceof nl))throw new TypeError("Cannot call a class as a function")}function qh(as,nl){for(var pa=0;pa<nl.length;pa++){var os=nl[pa];os.enumerable=os.enumerable||!1,os.configurable=!0,"value"in os&&(os.writable=!0),Object.defineProperty(as,os.key,os)}}function Oh(as,nl,pa){return nl&&qh(as.prototype,nl),Object.defineProperty(as,"prototype",{writable:!1}),as}function _h(as,nl){if(typeof nl!="function"&&nl!==null)throw new TypeError("Super expression must either be null or a function");as.prototype=Object.create(nl&&nl.prototype,{constructor:{value:as,writable:!0,configurable:!0}}),Object.defineProperty(as,"prototype",{writable:!1}),nl&&uh(as,nl)}function uh(as,nl){return uh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(pa,os){return pa.__proto__=os,pa},uh(as,nl)}function Au(as){var nl=xs();return function(){var pa=Vt(as),os;if(nl){var Pc=Vt(this).constructor;os=Reflect.construct(pa,arguments,Pc)}else os=pa.apply(this,arguments);return ms(this,os)}}function ms(as,nl){if(nl&&(Da(nl)==="object"||typeof nl=="function"))return nl;if(nl!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hl(as)}function Hl(as){if(as===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return as}function xs(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vt(as){return Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nl){return nl.__proto__||Object.getPrototypeOf(nl)},Vt(as)}var _p=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],bp=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],Vd=typeof window<"u";function Hf(as){var nl=function(pa){_h(Pc,pa);var os=Au(Pc);function Pc(ss){var ls;return Ch(this,Pc),ls=os.call(this,ss),ls.p=Promise.resolve(),ls.resizeHandler=null,ls.handlers={},ls.syncWindowResize=ls.syncWindowResize.bind(Hl(ls)),ls.syncEventHandlers=ls.syncEventHandlers.bind(Hl(ls)),ls.attachUpdateEvents=ls.attachUpdateEvents.bind(Hl(ls)),ls.getRef=ls.getRef.bind(Hl(ls)),ls.handleUpdate=ls.handleUpdate.bind(Hl(ls)),ls.figureCallback=ls.figureCallback.bind(Hl(ls)),ls.updatePlotly=ls.updatePlotly.bind(Hl(ls)),ls}return Oh(Pc,[{key:"updatePlotly",value:function(ss,ls,oo){var So=this;this.p=this.p.then(function(){if(!So.unmounting){if(!So.el)throw new Error("Missing element reference");return as.react(So.el,{data:So.props.data,layout:So.props.layout,config:So.props.config,frames:So.props.frames})}}).then(function(){So.unmounting||(So.syncWindowResize(ss),So.syncEventHandlers(),So.figureCallback(ls),oo&&So.attachUpdateEvents())}).catch(function(qf){So.props.onError&&So.props.onError(qf)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(ss){this.unmounting=!1;var ls=ss.frames&&ss.frames.length?ss.frames.length:0,oo=this.props.frames&&this.props.frames.length?this.props.frames.length:0,So=!(ss.layout===this.props.layout&&ss.data===this.props.data&&ss.config===this.props.config&&oo===ls),qf=ss.revision!==void 0,Wf=ss.revision!==this.props.revision;!So&&(!qf||qf&&!Wf)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&Vd&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),as.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var ss=this;!this.el||!this.el.removeListener||bp.forEach(function(ls){ss.el.on(ls,ss.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var ss=this;!this.el||!this.el.removeListener||bp.forEach(function(ls){ss.el.removeListener(ls,ss.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(ss){if(typeof ss=="function"){var ls=this.el,oo=ls.data,So=ls.layout,qf=this.el._transitionData?this.el._transitionData._frames:null,Wf={data:oo,layout:So,frames:qf};ss(Wf,this.el)}}},{key:"syncWindowResize",value:function(ss){var ls=this;Vd&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return as.Plots.resize(ls.el)},window.addEventListener("resize",this.resizeHandler),ss&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(ss){this.el=ss,this.props.debug&&Vd&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var ss=this;_p.forEach(function(ls){var oo=ss.props["on"+ls],So=ss.handlers[ls],qf=!!So;oo&&!qf?ss.addEventHandler(ls,oo):!oo&&qf?ss.removeEventHandler(ls):oo&&qf&&oo!==So&&(ss.removeEventHandler(ls),ss.addEventHandler(ls,oo))})}},{key:"addEventHandler",value:function(ss,ls){this.handlers[ss]=ls,this.el.on(this.getPlotlyEventName(ss),this.handlers[ss])}},{key:"removeEventHandler",value:function(ss){this.el.removeListener(this.getPlotlyEventName(ss),this.handlers[ss]),delete this.handlers[ss]}},{key:"getPlotlyEventName",value:function(ss){return"plotly_"+ss.toLowerCase()}},{key:"render",value:function(){return Ls.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),Pc}(Ls.Component);return nl.propTypes={data:Vo.default.arrayOf(Vo.default.object),config:Vo.default.object,layout:Vo.default.object,frames:Vo.default.arrayOf(Vo.default.object),revision:Vo.default.number,onInitialized:Vo.default.func,onPurge:Vo.default.func,onError:Vo.default.func,onUpdate:Vo.default.func,debug:Vo.default.bool,style:Vo.default.object,className:Vo.default.string,useResizeHandler:Vo.default.bool,divId:Vo.default.string},_p.forEach(function(pa){nl.propTypes["on"+pa]=Vo.default.func}),nl.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},nl}}(QT)),QT}var ob={exports:{}},uO=ob.exports,eA;function hO(){return eA||(eA=1,function(ti){(function(Da,Ls){ti.exports?ti.exports=Ls():Da.moduleName=Ls()})(typeof self<"u"?self:uO,()=>{var Da=(()=>{var Ls=Object.create,Vo=Object.defineProperty,Ks=Object.defineProperties,fu=Object.getOwnPropertyDescriptor,tu=Object.getOwnPropertyDescriptors,Ch=Object.getOwnPropertyNames,qh=Object.getOwnPropertySymbols,Oh=Object.getPrototypeOf,_h=Object.prototype.hasOwnProperty,uh=Object.prototype.propertyIsEnumerable,Au=(X,U,c)=>U in X?Vo(X,U,{enumerable:!0,configurable:!0,writable:!0,value:c}):X[U]=c,ms=(X,U)=>{for(var c in U||(U={}))_h.call(U,c)&&Au(X,c,U[c]);if(qh)for(var c of qh(U))uh.call(U,c)&&Au(X,c,U[c]);return X},Hl=(X,U)=>Ks(X,tu(U)),xs=(X,U)=>function(){return X&&(U=(0,X[Ch(X)[0]])(X=0)),U},Vt=(X,U)=>function(){return U||(0,X[Ch(X)[0]])((U={exports:{}}).exports,U),U.exports},_p=(X,U)=>{for(var c in U)Vo(X,c,{get:U[c],enumerable:!0})},bp=(X,U,c,m)=>{if(U&&typeof U=="object"||typeof U=="function")for(let M of Ch(U))!_h.call(X,M)&&M!==c&&Vo(X,M,{get:()=>U[M],enumerable:!(m=fu(U,M))||m.enumerable});return X},Vd=(X,U,c)=>(c=X!=null?Ls(Oh(X)):{},bp(Vo(c,"default",{value:X,enumerable:!0}),X)),Hf=X=>bp(Vo({},"__esModule",{value:!0}),X),as=Vt({"src/version.js"(X){X.version="3.1.0"}}),nl=Vt({"node_modules/native-promise-only/lib/npo.src.js"(X,U){(function(c,m,M){m[c]=m[c]||M(),typeof U<"u"&&U.exports&&(U.exports=m[c])})("Promise",typeof window<"u"?window:X,function(){var c,m,M,k=Object.prototype.toString,t=typeof setImmediate<"u"?function(y){return setImmediate(y)}:setTimeout;try{Object.defineProperty({},"x",{}),c=function(y,l,x,b){return Object.defineProperty(y,l,{value:x,writable:!0,configurable:b!==!1})}}catch{c=function(y,l,x){return y[l]=x,y}}M=function(){var y,l,x;function b(E,T){this.fn=E,this.self=T,this.next=void 0}return{add:function(E,T){x=new b(E,T),l?l.next=x:y=x,l=x,x=void 0},drain:function(){var E=y;for(y=l=m=void 0;E;)E.fn.call(E.self),E=E.next}}}();function e(y,l){M.add(y,l),m||(m=t(M.drain))}function r(y){var l,x=typeof y;return y!=null&&(x=="object"||x=="function")&&(l=y.then),typeof l=="function"?l:!1}function a(){for(var y=0;y<this.chain.length;y++)n(this,this.state===1?this.chain[y].success:this.chain[y].failure,this.chain[y]);this.chain.length=0}function n(y,l,x){var b,E;try{l===!1?x.reject(y.msg):(l===!0?b=y.msg:b=l.call(void 0,y.msg),b===x.promise?x.reject(TypeError("Promise-chain cycle")):(E=r(b))?E.call(b,x.resolve,x.reject):x.resolve(b))}catch(T){x.reject(T)}}function o(y){var l,x=this;if(!x.triggered){x.triggered=!0,x.def&&(x=x.def);try{(l=r(y))?e(function(){var b=new h(x);try{l.call(y,function(){o.apply(b,arguments)},function(){i.apply(b,arguments)})}catch(E){i.call(b,E)}}):(x.msg=y,x.state=1,x.chain.length>0&&e(a,x))}catch(b){i.call(new h(x),b)}}}function i(y){var l=this;l.triggered||(l.triggered=!0,l.def&&(l=l.def),l.msg=y,l.state=2,l.chain.length>0&&e(a,l))}function s(y,l,x,b){for(var E=0;E<l.length;E++)(function(T){y.resolve(l[T]).then(function(S){x(T,S)},b)})(E)}function h(y){this.def=y,this.triggered=!1}function v(y){this.promise=y,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(y){if(typeof y!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var l=new v(this);this.then=function(x,b){var E={success:typeof x=="function"?x:!0,failure:typeof b=="function"?b:!1};return E.promise=new this.constructor(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");E.resolve=T,E.reject=S}),l.chain.push(E),l.state!==0&&e(a,l),E.promise},this.catch=function(x){return this.then(void 0,x)};try{y.call(void 0,function(x){o.call(l,x)},function(x){i.call(l,x)})}catch(x){i.call(l,x)}}var d=c({},"constructor",g,!1);return g.prototype=d,c(d,"__NPO__",0,!1),c(g,"resolve",function(y){var l=this;return y&&typeof y=="object"&&y.__NPO__===1?y:new l(function(x,b){if(typeof x!="function"||typeof b!="function")throw TypeError("Not a function");x(y)})}),c(g,"reject",function(y){return new this(function(l,x){if(typeof l!="function"||typeof x!="function")throw TypeError("Not a function");x(y)})}),c(g,"all",function(y){var l=this;return k.call(y)!="[object Array]"?l.reject(TypeError("Not an array")):y.length===0?l.resolve([]):new l(function(x,b){if(typeof x!="function"||typeof b!="function")throw TypeError("Not a function");var E=y.length,T=Array(E),S=0;s(l,y,function(w,u){T[w]=u,++S===E&&x(T)},b)})}),c(g,"race",function(y){var l=this;return k.call(y)!="[object Array]"?l.reject(TypeError("Not an array")):new l(function(x,b){if(typeof x!="function"||typeof b!="function")throw TypeError("Not a function");s(l,y,function(E,T){x(T)},b)})}),g})}}),pa=Vt({"node_modules/@plotly/d3/d3.js"(X,U){(function(){var c={version:"3.8.2"},m=[].slice,M=function(gt){return m.call(gt)},k=self.document;function t(gt){return gt&&(gt.ownerDocument||gt.document||gt).documentElement}function e(gt){return gt&&(gt.ownerDocument&&gt.ownerDocument.defaultView||gt.document&&gt||gt.defaultView)}if(k)try{M(k.documentElement.childNodes)[0].nodeType}catch{M=function(gt){for(var Et=gt.length,Xt=new Array(Et);Et--;)Xt[Et]=gt[Et];return Xt}}if(Date.now||(Date.now=function(){return+new Date}),k)try{k.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,a=r.setAttribute,n=r.setAttributeNS,o=this.CSSStyleDeclaration.prototype,i=o.setProperty;r.setAttribute=function(gt,Et){a.call(this,gt,Et+"")},r.setAttributeNS=function(gt,Et,Xt){n.call(this,gt,Et,Xt+"")},o.setProperty=function(gt,Et,Xt){i.call(this,gt,Et+"",Xt)}}c.ascending=s;function s(gt,Et){return gt<Et?-1:gt>Et?1:gt>=Et?0:NaN}c.descending=function(gt,Et){return Et<gt?-1:Et>gt?1:Et>=gt?0:NaN},c.min=function(gt,Et){var Xt=-1,he=gt.length,pe,we;if(arguments.length===1){for(;++Xt<he;)if((we=gt[Xt])!=null&&we>=we){pe=we;break}for(;++Xt<he;)(we=gt[Xt])!=null&&pe>we&&(pe=we)}else{for(;++Xt<he;)if((we=Et.call(gt,gt[Xt],Xt))!=null&&we>=we){pe=we;break}for(;++Xt<he;)(we=Et.call(gt,gt[Xt],Xt))!=null&&pe>we&&(pe=we)}return pe},c.max=function(gt,Et){var Xt=-1,he=gt.length,pe,we;if(arguments.length===1){for(;++Xt<he;)if((we=gt[Xt])!=null&&we>=we){pe=we;break}for(;++Xt<he;)(we=gt[Xt])!=null&&we>pe&&(pe=we)}else{for(;++Xt<he;)if((we=Et.call(gt,gt[Xt],Xt))!=null&&we>=we){pe=we;break}for(;++Xt<he;)(we=Et.call(gt,gt[Xt],Xt))!=null&&we>pe&&(pe=we)}return pe},c.extent=function(gt,Et){var Xt=-1,he=gt.length,pe,we,Ne;if(arguments.length===1){for(;++Xt<he;)if((we=gt[Xt])!=null&&we>=we){pe=Ne=we;break}for(;++Xt<he;)(we=gt[Xt])!=null&&(pe>we&&(pe=we),Ne<we&&(Ne=we))}else{for(;++Xt<he;)if((we=Et.call(gt,gt[Xt],Xt))!=null&&we>=we){pe=Ne=we;break}for(;++Xt<he;)(we=Et.call(gt,gt[Xt],Xt))!=null&&(pe>we&&(pe=we),Ne<we&&(Ne=we))}return[pe,Ne]};function h(gt){return gt===null?NaN:+gt}function v(gt){return!isNaN(gt)}c.sum=function(gt,Et){var Xt=0,he=gt.length,pe,we=-1;if(arguments.length===1)for(;++we<he;)v(pe=+gt[we])&&(Xt+=pe);else for(;++we<he;)v(pe=+Et.call(gt,gt[we],we))&&(Xt+=pe);return Xt},c.mean=function(gt,Et){var Xt=0,he=gt.length,pe,we=-1,Ne=he;if(arguments.length===1)for(;++we<he;)v(pe=h(gt[we]))?Xt+=pe:--Ne;else for(;++we<he;)v(pe=h(Et.call(gt,gt[we],we)))?Xt+=pe:--Ne;if(Ne)return Xt/Ne},c.quantile=function(gt,Et){var Xt=(gt.length-1)*Et+1,he=Math.floor(Xt),pe=+gt[he-1],we=Xt-he;return we?pe+we*(gt[he]-pe):pe},c.median=function(gt,Et){var Xt=[],he=gt.length,pe,we=-1;if(arguments.length===1)for(;++we<he;)v(pe=h(gt[we]))&&Xt.push(pe);else for(;++we<he;)v(pe=h(Et.call(gt,gt[we],we)))&&Xt.push(pe);if(Xt.length)return c.quantile(Xt.sort(s),.5)},c.variance=function(gt,Et){var Xt=gt.length,he=0,pe,we,Ne=0,Ue=-1,sr=0;if(arguments.length===1)for(;++Ue<Xt;)v(pe=h(gt[Ue]))&&(we=pe-he,he+=we/++sr,Ne+=we*(pe-he));else for(;++Ue<Xt;)v(pe=h(Et.call(gt,gt[Ue],Ue)))&&(we=pe-he,he+=we/++sr,Ne+=we*(pe-he));if(sr>1)return Ne/(sr-1)},c.deviation=function(){var gt=c.variance.apply(this,arguments);return gt&&Math.sqrt(gt)};function g(gt){return{left:function(Et,Xt,he,pe){for(arguments.length<3&&(he=0),arguments.length<4&&(pe=Et.length);he<pe;){var we=he+pe>>>1;gt(Et[we],Xt)<0?he=we+1:pe=we}return he},right:function(Et,Xt,he,pe){for(arguments.length<3&&(he=0),arguments.length<4&&(pe=Et.length);he<pe;){var we=he+pe>>>1;gt(Et[we],Xt)>0?pe=we:he=we+1}return he}}}var d=g(s);c.bisectLeft=d.left,c.bisect=c.bisectRight=d.right,c.bisector=function(gt){return g(gt.length===1?function(Et,Xt){return s(gt(Et),Xt)}:gt)},c.shuffle=function(gt,Et,Xt){(he=arguments.length)<3&&(Xt=gt.length,he<2&&(Et=0));for(var he=Xt-Et,pe,we;he;)we=Math.random()*he--|0,pe=gt[he+Et],gt[he+Et]=gt[we+Et],gt[we+Et]=pe;return gt},c.permute=function(gt,Et){for(var Xt=Et.length,he=new Array(Xt);Xt--;)he[Xt]=gt[Et[Xt]];return he},c.pairs=function(gt){for(var Et=0,Xt=gt.length-1,he=gt[0],pe=new Array(Xt<0?0:Xt);Et<Xt;)pe[Et]=[he,he=gt[++Et]];return pe},c.transpose=function(gt){if(!(we=gt.length))return[];for(var Et=-1,Xt=c.min(gt,y),he=new Array(Xt);++Et<Xt;)for(var pe=-1,we,Ne=he[Et]=new Array(we);++pe<we;)Ne[pe]=gt[pe][Et];return he};function y(gt){return gt.length}c.zip=function(){return c.transpose(arguments)},c.keys=function(gt){var Et=[];for(var Xt in gt)Et.push(Xt);return Et},c.values=function(gt){var Et=[];for(var Xt in gt)Et.push(gt[Xt]);return Et},c.entries=function(gt){var Et=[];for(var Xt in gt)Et.push({key:Xt,value:gt[Xt]});return Et},c.merge=function(gt){for(var Et=gt.length,Xt,he=-1,pe=0,we,Ne;++he<Et;)pe+=gt[he].length;for(we=new Array(pe);--Et>=0;)for(Ne=gt[Et],Xt=Ne.length;--Xt>=0;)we[--pe]=Ne[Xt];return we};var l=Math.abs;c.range=function(gt,Et,Xt){if(arguments.length<3&&(Xt=1,arguments.length<2&&(Et=gt,gt=0)),(Et-gt)/Xt===1/0)throw new Error("infinite range");var he=[],pe=x(l(Xt)),we=-1,Ne;if(gt*=pe,Et*=pe,Xt*=pe,Xt<0)for(;(Ne=gt+Xt*++we)>Et;)he.push(Ne/pe);else for(;(Ne=gt+Xt*++we)<Et;)he.push(Ne/pe);return he};function x(gt){for(var Et=1;gt*Et%1;)Et*=10;return Et}function b(gt,Et){for(var Xt in Et)Object.defineProperty(gt.prototype,Xt,{value:Et[Xt],enumerable:!1})}c.map=function(gt,Et){var Xt=new E;if(gt instanceof E)gt.forEach(function(Ue,sr){Xt.set(Ue,sr)});else if(Array.isArray(gt)){var he=-1,pe=gt.length,we;if(arguments.length===1)for(;++he<pe;)Xt.set(he,gt[he]);else for(;++he<pe;)Xt.set(Et.call(gt,we=gt[he],he),we)}else for(var Ne in gt)Xt.set(Ne,gt[Ne]);return Xt};function E(){this._=Object.create(null)}var T="__proto__",S="\0";b(E,{has:f,get:function(gt){return this._[w(gt)]},set:function(gt,Et){return this._[w(gt)]=Et},remove:A,keys:_,values:function(){var gt=[];for(var Et in this._)gt.push(this._[Et]);return gt},entries:function(){var gt=[];for(var Et in this._)gt.push({key:u(Et),value:this._[Et]});return gt},size:O,empty:P,forEach:function(gt){for(var Et in this._)gt.call(this,u(Et),this._[Et])}});function w(gt){return(gt+="")===T||gt[0]===S?S+gt:gt}function u(gt){return(gt+="")[0]===S?gt.slice(1):gt}function f(gt){return w(gt)in this._}function A(gt){return(gt=w(gt))in this._&&delete this._[gt]}function _(){var gt=[];for(var Et in this._)gt.push(u(Et));return gt}function O(){var gt=0;for(var Et in this._)++gt;return gt}function P(){for(var gt in this._)return!1;return!0}c.nest=function(){var gt={},Et=[],Xt=[],he,pe;function we(Ue,sr,Lr){if(Lr>=Et.length)return pe?pe.call(gt,sr):he?sr.sort(he):sr;for(var Er=-1,Yr=sr.length,ln=Et[Lr++],cn,ci,mn,zn=new E,Vn;++Er<Yr;)(Vn=zn.get(cn=ln(ci=sr[Er])))?Vn.push(ci):zn.set(cn,[ci]);return Ue?(ci=Ue(),mn=function(ei,oi){ci.set(ei,we(Ue,oi,Lr))}):(ci={},mn=function(ei,oi){ci[ei]=we(Ue,oi,Lr)}),zn.forEach(mn),ci}function Ne(Ue,sr){if(sr>=Et.length)return Ue;var Lr=[],Er=Xt[sr++];return Ue.forEach(function(Yr,ln){Lr.push({key:Yr,values:Ne(ln,sr)})}),Er?Lr.sort(function(Yr,ln){return Er(Yr.key,ln.key)}):Lr}return gt.map=function(Ue,sr){return we(sr,Ue,0)},gt.entries=function(Ue){return Ne(we(c.map,Ue,0),0)},gt.key=function(Ue){return Et.push(Ue),gt},gt.sortKeys=function(Ue){return Xt[Et.length-1]=Ue,gt},gt.sortValues=function(Ue){return he=Ue,gt},gt.rollup=function(Ue){return pe=Ue,gt},gt},c.set=function(gt){var Et=new z;if(gt)for(var Xt=0,he=gt.length;Xt<he;++Xt)Et.add(gt[Xt]);return Et};function z(){this._=Object.create(null)}b(z,{has:f,add:function(gt){return this._[w(gt+="")]=!0,gt},remove:A,values:_,size:O,empty:P,forEach:function(gt){for(var Et in this._)gt.call(this,u(Et))}}),c.behavior={};function F(gt){return gt}c.rebind=function(gt,Et){for(var Xt=1,he=arguments.length,pe;++Xt<he;)gt[pe=arguments[Xt]]=B(gt,Et,Et[pe]);return gt};function B(gt,Et,Xt){return function(){var he=Xt.apply(Et,arguments);return he===Et?gt:he}}function C(gt,Et){if(Et in gt)return Et;Et=Et.charAt(0).toUpperCase()+Et.slice(1);for(var Xt=0,he=D.length;Xt<he;++Xt){var pe=D[Xt]+Et;if(pe in gt)return pe}}var D=["webkit","ms","moz","Moz","o","O"];function N(){}c.dispatch=function(){for(var gt=new j,Et=-1,Xt=arguments.length;++Et<Xt;)gt[arguments[Et]]=Y(gt);return gt};function j(){}j.prototype.on=function(gt,Et){var Xt=gt.indexOf("."),he="";if(Xt>=0&&(he=gt.slice(Xt+1),gt=gt.slice(0,Xt)),gt)return arguments.length<2?this[gt].on(he):this[gt].on(he,Et);if(arguments.length===2){if(Et==null)for(gt in this)this.hasOwnProperty(gt)&&this[gt].on(he,null);return this}};function Y(gt){var Et=[],Xt=new E;function he(){for(var pe=Et,we=-1,Ne=pe.length,Ue;++we<Ne;)(Ue=pe[we].on)&&Ue.apply(this,arguments);return gt}return he.on=function(pe,we){var Ne=Xt.get(pe),Ue;return arguments.length<2?Ne&&Ne.on:(Ne&&(Ne.on=null,Et=Et.slice(0,Ue=Et.indexOf(Ne)).concat(Et.slice(Ue+1)),Xt.remove(pe)),we&&Et.push(Xt.set(pe,{on:we})),gt)},he}c.event=null;function rt(){c.event.preventDefault()}function ht(){for(var gt=c.event,Et;Et=gt.sourceEvent;)gt=Et;return gt}function st(gt){for(var Et=new j,Xt=0,he=arguments.length;++Xt<he;)Et[arguments[Xt]]=Y(Et);return Et.of=function(pe,we){return function(Ne){try{var Ue=Ne.sourceEvent=c.event;Ne.target=gt,c.event=Ne,Et[Ne.type].apply(pe,we)}finally{c.event=Ue}}},Et}c.requote=function(gt){return gt.replace(et,"\\$&")};var et=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,G={}.__proto__?function(gt,Et){gt.__proto__=Et}:function(gt,Et){for(var Xt in Et)gt[Xt]=Et[Xt]};function ot(gt){return G(gt,W),gt}var J=function(gt,Et){return Et.querySelector(gt)},Q=function(gt,Et){return Et.querySelectorAll(gt)},ut=function(gt,Et){var Xt=gt.matches||gt[C(gt,"matchesSelector")];return ut=function(he,pe){return Xt.call(he,pe)},ut(gt,Et)};typeof Sizzle=="function"&&(J=function(gt,Et){return Sizzle(gt,Et)[0]||null},Q=Sizzle,ut=Sizzle.matchesSelector),c.selection=function(){return c.select(k.documentElement)};var W=c.selection.prototype=[];W.select=function(gt){var Et=[],Xt,he,pe,we;gt=H(gt);for(var Ne=-1,Ue=this.length;++Ne<Ue;){Et.push(Xt=[]),Xt.parentNode=(pe=this[Ne]).parentNode;for(var sr=-1,Lr=pe.length;++sr<Lr;)(we=pe[sr])?(Xt.push(he=gt.call(we,we.__data__,sr,Ne)),he&&"__data__"in we&&(he.__data__=we.__data__)):Xt.push(null)}return ot(Et)};function H(gt){return typeof gt=="function"?gt:function(){return J(gt,this)}}W.selectAll=function(gt){var Et=[],Xt,he;gt=at(gt);for(var pe=-1,we=this.length;++pe<we;)for(var Ne=this[pe],Ue=-1,sr=Ne.length;++Ue<sr;)(he=Ne[Ue])&&(Et.push(Xt=M(gt.call(he,he.__data__,Ue,pe))),Xt.parentNode=he);return ot(Et)};function at(gt){return typeof gt=="function"?gt:function(){return Q(gt,this)}}var nt="http://www.w3.org/1999/xhtml",dt={svg:"http://www.w3.org/2000/svg",xhtml:nt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};c.ns={prefix:dt,qualify:function(gt){var Et=gt.indexOf(":"),Xt=gt;return Et>=0&&(Xt=gt.slice(0,Et))!=="xmlns"&&(gt=gt.slice(Et+1)),dt.hasOwnProperty(Xt)?{space:dt[Xt],local:gt}:gt}},W.attr=function(gt,Et){if(arguments.length<2){if(typeof gt=="string"){var Xt=this.node();return gt=c.ns.qualify(gt),gt.local?Xt.getAttributeNS(gt.space,gt.local):Xt.getAttribute(gt)}for(Et in gt)this.each(wt(Et,gt[Et]));return this}return this.each(wt(gt,Et))};function wt(gt,Et){gt=c.ns.qualify(gt);function Xt(){this.removeAttribute(gt)}function he(){this.removeAttributeNS(gt.space,gt.local)}function pe(){this.setAttribute(gt,Et)}function we(){this.setAttributeNS(gt.space,gt.local,Et)}function Ne(){var sr=Et.apply(this,arguments);sr==null?this.removeAttribute(gt):this.setAttribute(gt,sr)}function Ue(){var sr=Et.apply(this,arguments);sr==null?this.removeAttributeNS(gt.space,gt.local):this.setAttributeNS(gt.space,gt.local,sr)}return Et==null?gt.local?he:Xt:typeof Et=="function"?gt.local?Ue:Ne:gt.local?we:pe}function _t(gt){return gt.trim().replace(/\s+/g," ")}W.classed=function(gt,Et){if(arguments.length<2){if(typeof gt=="string"){var Xt=this.node(),he=(gt=It(gt)).length,pe=-1;if(Et=Xt.classList){for(;++pe<he;)if(!Et.contains(gt[pe]))return!1}else for(Et=Xt.getAttribute("class");++pe<he;)if(!Ct(gt[pe]).test(Et))return!1;return!0}for(Et in gt)this.each(Bt(Et,gt[Et]));return this}return this.each(Bt(gt,Et))};function Ct(gt){return new RegExp("(?:^|\\s+)"+c.requote(gt)+"(?:\\s+|$)","g")}function It(gt){return(gt+"").trim().split(/^|\s+/)}function Bt(gt,Et){gt=It(gt).map(ee);var Xt=gt.length;function he(){for(var we=-1;++we<Xt;)gt[we](this,Et)}function pe(){for(var we=-1,Ne=Et.apply(this,arguments);++we<Xt;)gt[we](this,Ne)}return typeof Et=="function"?pe:he}function ee(gt){var Et=Ct(gt);return function(Xt,he){if(pe=Xt.classList)return he?pe.add(gt):pe.remove(gt);var pe=Xt.getAttribute("class")||"";he?(Et.lastIndex=0,Et.test(pe)||Xt.setAttribute("class",_t(pe+" "+gt))):Xt.setAttribute("class",_t(pe.replace(Et," ")))}}W.style=function(gt,Et,Xt){var he=arguments.length;if(he<3){if(typeof gt!="string"){he<2&&(Et="");for(Xt in gt)this.each(Wt(Xt,gt[Xt],Et));return this}if(he<2){var pe=this.node();return e(pe).getComputedStyle(pe,null).getPropertyValue(gt)}Xt=""}return this.each(Wt(gt,Et,Xt))};function Wt(gt,Et,Xt){function he(){this.style.removeProperty(gt)}function pe(){this.style.setProperty(gt,Et,Xt)}function we(){var Ne=Et.apply(this,arguments);Ne==null?this.style.removeProperty(gt):this.style.setProperty(gt,Ne,Xt)}return Et==null?he:typeof Et=="function"?we:pe}W.property=function(gt,Et){if(arguments.length<2){if(typeof gt=="string")return this.node()[gt];for(Et in gt)this.each(Qt(Et,gt[Et]));return this}return this.each(Qt(gt,Et))};function Qt(gt,Et){function Xt(){delete this[gt]}function he(){this[gt]=Et}function pe(){var we=Et.apply(this,arguments);we==null?delete this[gt]:this[gt]=we}return Et==null?Xt:typeof Et=="function"?pe:he}W.text=function(gt){return arguments.length?this.each(typeof gt=="function"?function(){var Et=gt.apply(this,arguments);this.textContent=Et??""}:gt==null?function(){this.textContent=""}:function(){this.textContent=gt}):this.node().textContent},W.html=function(gt){return arguments.length?this.each(typeof gt=="function"?function(){var Et=gt.apply(this,arguments);this.innerHTML=Et??""}:gt==null?function(){this.innerHTML=""}:function(){this.innerHTML=gt}):this.node().innerHTML},W.append=function(gt){return gt=Gt(gt),this.select(function(){return this.appendChild(gt.apply(this,arguments))})};function Gt(gt){function Et(){var he=this.ownerDocument,pe=this.namespaceURI;return pe===nt&&he.documentElement.namespaceURI===nt?he.createElement(gt):he.createElementNS(pe,gt)}function Xt(){return this.ownerDocument.createElementNS(gt.space,gt.local)}return typeof gt=="function"?gt:(gt=c.ns.qualify(gt)).local?Xt:Et}W.insert=function(gt,Et){return gt=Gt(gt),Et=H(Et),this.select(function(){return this.insertBefore(gt.apply(this,arguments),Et.apply(this,arguments)||null)})},W.remove=function(){return this.each(mt)};function mt(){var gt=this.parentNode;gt&&gt.removeChild(this)}W.data=function(gt,Et){var Xt=-1,he=this.length,pe,we;if(!arguments.length){for(gt=new Array(he=(pe=this[0]).length);++Xt<he;)(we=pe[Xt])&&(gt[Xt]=we.__data__);return gt}function Ne(Er,Yr){var ln,cn=Er.length,ci=Yr.length,mn=Math.min(cn,ci),zn=new Array(ci),Vn=new Array(ci),ei=new Array(cn),oi,Un;if(Et){var zi=new E,oa=new Array(cn),Gi;for(ln=-1;++ln<cn;)(oi=Er[ln])&&(zi.has(Gi=Et.call(oi,oi.__data__,ln))?ei[ln]=oi:zi.set(Gi,oi),oa[ln]=Gi);for(ln=-1;++ln<ci;)(oi=zi.get(Gi=Et.call(Yr,Un=Yr[ln],ln)))?oi!==!0&&(zn[ln]=oi,oi.__data__=Un):Vn[ln]=bt(Un),zi.set(Gi,!0);for(ln=-1;++ln<cn;)ln in oa&&zi.get(oa[ln])!==!0&&(ei[ln]=Er[ln])}else{for(ln=-1;++ln<mn;)oi=Er[ln],Un=Yr[ln],oi?(oi.__data__=Un,zn[ln]=oi):Vn[ln]=bt(Un);for(;ln<ci;++ln)Vn[ln]=bt(Yr[ln]);for(;ln<cn;++ln)ei[ln]=Er[ln]}Vn.update=zn,Vn.parentNode=zn.parentNode=ei.parentNode=Er.parentNode,Ue.push(Vn),sr.push(zn),Lr.push(ei)}var Ue=$t([]),sr=ot([]),Lr=ot([]);if(typeof gt=="function")for(;++Xt<he;)Ne(pe=this[Xt],gt.call(pe,pe.parentNode.__data__,Xt));else for(;++Xt<he;)Ne(pe=this[Xt],gt);return sr.enter=function(){return Ue},sr.exit=function(){return Lr},sr};function bt(gt){return{__data__:gt}}W.datum=function(gt){return arguments.length?this.property("__data__",gt):this.property("__data__")},W.filter=function(gt){var Et=[],Xt,he,pe;typeof gt!="function"&&(gt=vt(gt));for(var we=0,Ne=this.length;we<Ne;we++){Et.push(Xt=[]),Xt.parentNode=(he=this[we]).parentNode;for(var Ue=0,sr=he.length;Ue<sr;Ue++)(pe=he[Ue])&&gt.call(pe,pe.__data__,Ue,we)&&Xt.push(pe)}return ot(Et)};function vt(gt){return function(){return ut(this,gt)}}W.order=function(){for(var gt=-1,Et=this.length;++gt<Et;)for(var Xt=this[gt],he=Xt.length-1,pe=Xt[he],we;--he>=0;)(we=Xt[he])&&(pe&&pe!==we.nextSibling&&pe.parentNode.insertBefore(we,pe),pe=we);return this},W.sort=function(gt){gt=Ut.apply(this,arguments);for(var Et=-1,Xt=this.length;++Et<Xt;)this[Et].sort(gt);return this.order()};function Ut(gt){return arguments.length||(gt=s),function(Et,Xt){return Et&&Xt?gt(Et.__data__,Xt.__data__):!Et-!Xt}}W.each=function(gt){return te(this,function(Et,Xt,he){gt.call(Et,Et.__data__,Xt,he)})};function te(gt,Et){for(var Xt=0,he=gt.length;Xt<he;Xt++)for(var pe=gt[Xt],we=0,Ne=pe.length,Ue;we<Ne;we++)(Ue=pe[we])&&Et(Ue,we,Xt);return gt}W.call=function(gt){var Et=M(arguments);return gt.apply(Et[0]=this,Et),this},W.empty=function(){return!this.node()},W.node=function(){for(var gt=0,Et=this.length;gt<Et;gt++)for(var Xt=this[gt],he=0,pe=Xt.length;he<pe;he++){var we=Xt[he];if(we)return we}return null},W.size=function(){var gt=0;return te(this,function(){++gt}),gt};function $t(gt){return G(gt,le),gt}var le=[];c.selection.enter=$t,c.selection.enter.prototype=le,le.append=W.append,le.empty=W.empty,le.node=W.node,le.call=W.call,le.size=W.size,le.select=function(gt){for(var Et=[],Xt,he,pe,we,Ne,Ue=-1,sr=this.length;++Ue<sr;){pe=(we=this[Ue]).update,Et.push(Xt=[]),Xt.parentNode=we.parentNode;for(var Lr=-1,Er=we.length;++Lr<Er;)(Ne=we[Lr])?(Xt.push(pe[Lr]=he=gt.call(we.parentNode,Ne.__data__,Lr,Ue)),he.__data__=Ne.__data__):Xt.push(null)}return ot(Et)},le.insert=function(gt,Et){return arguments.length<2&&(Et=Me(this)),W.insert.call(this,gt,Et)};function Me(gt){var Et,Xt;return function(he,pe,we){var Ne=gt[we].update,Ue=Ne.length,sr;for(we!=Xt&&(Xt=we,Et=0),pe>=Et&&(Et=pe+1);!(sr=Ne[Et])&&++Et<Ue;);return sr}}c.select=function(gt){var Et;return typeof gt=="string"?(Et=[J(gt,k)],Et.parentNode=k.documentElement):(Et=[gt],Et.parentNode=t(gt)),ot([Et])},c.selectAll=function(gt){var Et;return typeof gt=="string"?(Et=M(Q(gt,k)),Et.parentNode=k.documentElement):(Et=M(gt),Et.parentNode=null),ot([Et])},W.on=function(gt,Et,Xt){var he=arguments.length;if(he<3){if(typeof gt!="string"){he<2&&(Et=!1);for(Xt in gt)this.each(Le(Xt,gt[Xt],Et));return this}if(he<2)return(he=this.node()["__on"+gt])&&he._;Xt=!1}return this.each(Le(gt,Et,Xt))};function Le(gt,Et,Xt){var he="__on"+gt,pe=gt.indexOf("."),we=He;pe>0&&(gt=gt.slice(0,pe));var Ne=Ye.get(gt);Ne&&(gt=Ne,we=mr);function Ue(){var Er=this[he];Er&&(this.removeEventListener(gt,Er,Er.$),delete this[he])}function sr(){var Er=we(Et,M(arguments));Ue.call(this),this.addEventListener(gt,this[he]=Er,Er.$=Xt),Er._=Et}function Lr(){var Er=new RegExp("^__on([^.]+)"+c.requote(gt)+"$"),Yr;for(var ln in this)if(Yr=ln.match(Er)){var cn=this[ln];this.removeEventListener(Yr[1],cn,cn.$),delete this[ln]}}return pe?Et?sr:Ue:Et?N:Lr}var Ye=c.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Ye.forEach(function(gt){"on"+gt in k&&Ye.remove(gt)});function He(gt,Et){return function(Xt){var he=c.event;c.event=Xt,Et[0]=this.__data__;try{gt.apply(this,Et)}finally{c.event=he}}}function mr(gt,Et){var Xt=He(gt,Et);return function(he){var pe=this,we=he.relatedTarget;(!we||we!==pe&&!(we.compareDocumentPosition(pe)&8))&&Xt.call(pe,he)}}var vr,rr=0;function Mr(gt){var Et=".dragsuppress-"+ ++rr,Xt="click"+Et,he=c.select(e(gt)).on("touchmove"+Et,rt).on("dragstart"+Et,rt).on("selectstart"+Et,rt);if(vr==null&&(vr="onselectstart"in gt?!1:C(gt.style,"userSelect")),vr){var pe=t(gt).style,we=pe[vr];pe[vr]="none"}return function(Ne){if(he.on(Et,null),vr&&(pe[vr]=we),Ne){var Ue=function(){he.on(Xt,null)};he.on(Xt,function(){rt(),Ue()},!0),setTimeout(Ue,0)}}}c.mouse=function(gt){return me(gt,ht())};var Cr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function me(gt,Et){Et.changedTouches&&(Et=Et.changedTouches[0]);var Xt=gt.ownerSVGElement||gt;if(Xt.createSVGPoint){var he=Xt.createSVGPoint();if(Cr<0){var pe=e(gt);if(pe.scrollX||pe.scrollY){Xt=c.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var we=Xt[0][0].getScreenCTM();Cr=!(we.f||we.e),Xt.remove()}}return Cr?(he.x=Et.pageX,he.y=Et.pageY):(he.x=Et.clientX,he.y=Et.clientY),he=he.matrixTransform(gt.getScreenCTM().inverse()),[he.x,he.y]}var Ne=gt.getBoundingClientRect();return[Et.clientX-Ne.left-gt.clientLeft,Et.clientY-Ne.top-gt.clientTop]}c.touch=function(gt,Et,Xt){if(arguments.length<3&&(Xt=Et,Et=ht().changedTouches),Et){for(var he=0,pe=Et.length,we;he<pe;++he)if((we=Et[he]).identifier===Xt)return me(gt,we)}},c.behavior.drag=function(){var gt=st(pe,"drag","dragstart","dragend"),Et=null,Xt=we(N,c.mouse,e,"mousemove","mouseup"),he=we(Rt,c.touch,F,"touchmove","touchend");function pe(){this.on("mousedown.drag",Xt).on("touchstart.drag",he)}function we(Ne,Ue,sr,Lr,Er){return function(){var Yr=this,ln=c.event.target.correspondingElement||c.event.target,cn=Yr.parentNode,ci=gt.of(Yr,arguments),mn=0,zn=Ne(),Vn=".drag"+(zn==null?"":"-"+zn),ei,oi=c.select(sr(ln)).on(Lr+Vn,oa).on(Er+Vn,Gi),Un=Mr(ln),zi=Ue(cn,zn);Et?(ei=Et.apply(Yr,arguments),ei=[ei.x-zi[0],ei.y-zi[1]]):ei=[0,0],ci({type:"dragstart"});function oa(){var na=Ue(cn,zn),Ta,Ia;na&&(Ta=na[0]-zi[0],Ia=na[1]-zi[1],mn|=Ta|Ia,zi=na,ci({type:"drag",x:na[0]+ei[0],y:na[1]+ei[1],dx:Ta,dy:Ia}))}function Gi(){Ue(cn,zn)&&(oi.on(Lr+Vn,null).on(Er+Vn,null),Un(mn),ci({type:"dragend"}))}}}return pe.origin=function(Ne){return arguments.length?(Et=Ne,pe):Et},c.rebind(pe,gt,"on")};function Rt(){return c.event.changedTouches[0].identifier}c.touches=function(gt,Et){return arguments.length<2&&(Et=ht().touches),Et?M(Et).map(function(Xt){var he=me(gt,Xt);return he.identifier=Xt.identifier,he}):[]};var Ht=1e-6,zt=Ht*Ht,lt=Math.PI,yt=2*lt,kt=yt-Ht,Dt=lt/2,Kt=lt/180,re=180/lt;function ke(gt,Et,Xt){return(Et[0]-gt[0])*(Xt[1]-gt[1])-(Et[1]-gt[1])*(Xt[0]-gt[0])}function Pe(gt){return gt>1?Dt:gt<-1?-Dt:Math.asin(gt)}function Xe(gt){return((gt=Math.exp(gt))-1/gt)/2}function Ze(gt){return((gt=Math.exp(gt))+1/gt)/2}function ir(gt){return((gt=Math.exp(2*gt))-1)/(gt+1)}var Je=Math.SQRT2,_r=2,un=4;c.interpolateZoom=function(gt,Et){var Xt=gt[0],he=gt[1],pe=gt[2],we=Et[0],Ne=Et[1],Ue=Et[2],sr=we-Xt,Lr=Ne-he,Er=sr*sr+Lr*Lr,Yr,ln;if(Er<zt)ln=Math.log(Ue/pe)/Je,Yr=function(ei){return[Xt+ei*sr,he+ei*Lr,pe*Math.exp(Je*ei*ln)]};else{var cn=Math.sqrt(Er),ci=(Ue*Ue-pe*pe+un*Er)/(2*pe*_r*cn),mn=(Ue*Ue-pe*pe-un*Er)/(2*Ue*_r*cn),zn=Math.log(Math.sqrt(ci*ci+1)-ci),Vn=Math.log(Math.sqrt(mn*mn+1)-mn);ln=(Vn-zn)/Je,Yr=function(ei){var oi=ei*ln,Un=Ze(zn),zi=pe/(_r*cn)*(Un*ir(Je*oi+zn)-Xe(zn));return[Xt+zi*sr,he+zi*Lr,pe*Un/Ze(Je*oi+zn)]}}return Yr.duration=ln*1e3,Yr},c.behavior.zoom=function(){var gt={x:0,y:0,k:1},Et,Xt,he,pe=[960,500],we=yn,Ne=250,Ue=0,sr="mousedown.zoom",Lr="mousemove.zoom",Er="mouseup.zoom",Yr,ln="touchstart.zoom",cn,ci=st(oi,"zoomstart","zoom","zoomend"),mn,zn,Vn,ei;Bn||(Bn="onwheel"in k?(kn=function(){return-c.event.deltaY*(c.event.deltaMode?120:1)},"wheel"):"onmousewheel"in k?(kn=function(){return c.event.wheelDelta},"mousewheel"):(kn=function(){return-c.event.detail},"MozMousePixelScroll"));function oi(ma){ma.on(sr,lo).on(Bn+".zoom",wl).on("dblclick.zoom",qs).on(ln,rs)}oi.event=function(ma){ma.each(function(){var Co=ci.of(this,arguments),Ko=gt;Aa?c.select(this).transition().each("start.zoom",function(){gt=this.__chart__||{x:0,y:0,k:1},Ia(Co)}).tween("zoom:zoom",function(){var Ns=pe[0],Is=pe[1],tc=Xt?Xt[0]:Ns/2,bs=Xt?Xt[1]:Is/2,js=c.interpolateZoom([(tc-gt.x)/gt.k,(bs-gt.y)/gt.k,Ns/gt.k],[(tc-Ko.x)/Ko.k,(bs-Ko.y)/Ko.k,Ns/Ko.k]);return function(xc){var xl=js(xc),ae=Ns/xl[2];this.__chart__=gt={x:tc-xl[0]*ae,y:bs-xl[1]*ae,k:ae},Xo(Co)}}).each("interrupt.zoom",function(){La(Co)}).each("end.zoom",function(){La(Co)}):(this.__chart__=gt,Ia(Co),Xo(Co),La(Co))})},oi.translate=function(ma){return arguments.length?(gt={x:+ma[0],y:+ma[1],k:gt.k},Ta(),oi):[gt.x,gt.y]},oi.scale=function(ma){return arguments.length?(gt={x:gt.x,y:gt.y,k:null},oa(+ma),Ta(),oi):gt.k},oi.scaleExtent=function(ma){return arguments.length?(we=ma==null?yn:[+ma[0],+ma[1]],oi):we},oi.center=function(ma){return arguments.length?(he=ma&&[+ma[0],+ma[1]],oi):he},oi.size=function(ma){return arguments.length?(pe=ma&&[+ma[0],+ma[1]],oi):pe},oi.duration=function(ma){return arguments.length?(Ne=+ma,oi):Ne},oi.x=function(ma){return arguments.length?(zn=ma,mn=ma.copy(),gt={x:0,y:0,k:1},oi):zn},oi.y=function(ma){return arguments.length?(ei=ma,Vn=ma.copy(),gt={x:0,y:0,k:1},oi):ei};function Un(ma){return[(ma[0]-gt.x)/gt.k,(ma[1]-gt.y)/gt.k]}function zi(ma){return[ma[0]*gt.k+gt.x,ma[1]*gt.k+gt.y]}function oa(ma){gt.k=Math.max(we[0],Math.min(we[1],ma))}function Gi(ma,Co){Co=zi(Co),gt.x+=ma[0]-Co[0],gt.y+=ma[1]-Co[1]}function na(ma,Co,Ko,Ns){ma.__chart__={x:gt.x,y:gt.y,k:gt.k},oa(Math.pow(2,Ns)),Gi(Xt=Co,Ko),ma=c.select(ma),Ne>0&&(ma=ma.transition().duration(Ne)),ma.call(oi.event)}function Ta(){zn&&zn.domain(mn.range().map(function(ma){return(ma-gt.x)/gt.k}).map(mn.invert)),ei&&ei.domain(Vn.range().map(function(ma){return(ma-gt.y)/gt.k}).map(Vn.invert))}function Ia(ma){Ue++||ma({type:"zoomstart"})}function Xo(ma){Ta(),ma({type:"zoom",scale:gt.k,translate:[gt.x,gt.y]})}function La(ma){--Ue||(ma({type:"zoomend"}),Xt=null)}function lo(){var ma=this,Co=ci.of(ma,arguments),Ko=0,Ns=c.select(e(ma)).on(Lr,bs).on(Er,js),Is=Un(c.mouse(ma)),tc=Mr(ma);Wn.call(ma),Ia(Co);function bs(){Ko=1,Gi(c.mouse(ma),Is),Xo(Co)}function js(){Ns.on(Lr,null).on(Er,null),tc(Ko),La(Co)}}function rs(){var ma=this,Co=ci.of(ma,arguments),Ko={},Ns=0,Is,tc=".zoom-"+c.event.changedTouches[0].identifier,bs="touchmove"+tc,js="touchend"+tc,xc=[],xl=c.select(ma),ae=Mr(ma);ur(),Ia(Co),xl.on(sr,null).on(ln,ur);function ar(){var Wr=c.touches(ma);return Is=gt.k,Wr.forEach(function(Kr){Kr.identifier in Ko&&(Ko[Kr.identifier]=Un(Kr))}),Wr}function ur(){var Wr=c.event.target;c.select(Wr).on(bs,fn).on(js,Hn),xc.push(Wr);for(var Kr=c.event.changedTouches,ui=0,li=Kr.length;ui<li;++ui)Ko[Kr[ui].identifier]=null;var hi=ar(),Ti=Date.now();if(hi.length===1){if(Ti-cn<500){var Wi=hi[0];na(ma,Wi,Ko[Wi.identifier],Math.floor(Math.log(gt.k)/Math.LN2)+1),rt()}cn=Ti}else if(hi.length>1){var Wi=hi[0],Vi=hi[1],yi=Wi[0]-Vi[0],Xn=Wi[1]-Vi[1];Ns=yi*yi+Xn*Xn}}function fn(){var Wr=c.touches(ma),Kr,ui,li,hi;Wn.call(ma);for(var Ti=0,Wi=Wr.length;Ti<Wi;++Ti,hi=null)if(li=Wr[Ti],hi=Ko[li.identifier]){if(ui)break;Kr=li,ui=hi}if(hi){var Vi=(Vi=li[0]-Kr[0])*Vi+(Vi=li[1]-Kr[1])*Vi,yi=Ns&&Math.sqrt(Vi/Ns);Kr=[(Kr[0]+li[0])/2,(Kr[1]+li[1])/2],ui=[(ui[0]+hi[0])/2,(ui[1]+hi[1])/2],oa(yi*Is)}cn=null,Gi(Kr,ui),Xo(Co)}function Hn(){if(c.event.touches.length){for(var Wr=c.event.changedTouches,Kr=0,ui=Wr.length;Kr<ui;++Kr)delete Ko[Wr[Kr].identifier];for(var li in Ko)return void ar()}c.selectAll(xc).on(tc,null),xl.on(sr,lo).on(ln,rs),ae(),La(Co)}}function wl(){var ma=ci.of(this,arguments);Yr?clearTimeout(Yr):(Wn.call(this),Et=Un(Xt=he||c.mouse(this)),Ia(ma)),Yr=setTimeout(function(){Yr=null,La(ma)},50),rt(),oa(Math.pow(2,kn()*.002)*gt.k),Gi(Xt,Et),Xo(ma)}function qs(){var ma=c.mouse(this),Co=Math.log(gt.k)/Math.LN2;na(this,ma,Un(ma),c.event.shiftKey?Math.ceil(Co)-1:Math.floor(Co)+1)}return c.rebind(oi,ci,"on")};var yn=[0,1/0],kn,Bn;c.color=Pn;function Pn(){}Pn.prototype.toString=function(){return this.rgb()+""},c.hsl=wn;function wn(gt,Et,Xt){return this instanceof wn?(this.h=+gt,this.s=+Et,void(this.l=+Xt)):arguments.length<2?gt instanceof wn?new wn(gt.h,gt.s,gt.l):Br(""+gt,jr,wn):new wn(gt,Et,Xt)}var ni=wn.prototype=new Pn;ni.brighter=function(gt){return gt=Math.pow(.7,arguments.length?gt:1),new wn(this.h,this.s,this.l/gt)},ni.darker=function(gt){return gt=Math.pow(.7,arguments.length?gt:1),new wn(this.h,this.s,gt*this.l)},ni.rgb=function(){return ai(this.h,this.s,this.l)};function ai(gt,Et,Xt){var he,pe;gt=isNaN(gt)?0:(gt%=360)<0?gt+360:gt,Et=isNaN(Et)||Et<0?0:Et>1?1:Et,Xt=Xt<0?0:Xt>1?1:Xt,pe=Xt<=.5?Xt*(1+Et):Xt+Et-Xt*Et,he=2*Xt-pe;function we(Ue){return Ue>360?Ue-=360:Ue<0&&(Ue+=360),Ue<60?he+(pe-he)*Ue/60:Ue<180?pe:Ue<240?he+(pe-he)*(240-Ue)/60:he}function Ne(Ue){return Math.round(we(Ue)*255)}return new fe(Ne(gt+120),Ne(gt),Ne(gt-120))}c.hcl=Ee;function Ee(gt,Et,Xt){return this instanceof Ee?(this.h=+gt,this.c=+Et,void(this.l=+Xt)):arguments.length<2?gt instanceof Ee?new Ee(gt.h,gt.c,gt.l):gt instanceof Ke?ri(gt.l,gt.a,gt.b):ri((gt=Pr((gt=c.rgb(gt)).r,gt.g,gt.b)).l,gt.a,gt.b):new Ee(gt,Et,Xt)}var je=Ee.prototype=new Pn;je.brighter=function(gt){return new Ee(this.h,this.c,Math.min(100,this.l+Sr*(arguments.length?gt:1)))},je.darker=function(gt){return new Ee(this.h,this.c,Math.max(0,this.l-Sr*(arguments.length?gt:1)))},je.rgb=function(){return $e(this.h,this.c,this.l).rgb()};function $e(gt,Et,Xt){return isNaN(gt)&&(gt=0),isNaN(Et)&&(Et=0),new Ke(Xt,Math.cos(gt*=Kt)*Et,Math.sin(gt)*Et)}c.lab=Ke;function Ke(gt,Et,Xt){return this instanceof Ke?(this.l=+gt,this.a=+Et,void(this.b=+Xt)):arguments.length<2?gt instanceof Ke?new Ke(gt.l,gt.a,gt.b):gt instanceof Ee?$e(gt.h,gt.c,gt.l):Pr((gt=fe(gt)).r,gt.g,gt.b):new Ke(gt,Et,Xt)}var Sr=18,nn=.95047,hn=1,Vr=1.08883,Sn=Ke.prototype=new Pn;Sn.brighter=function(gt){return new Ke(Math.min(100,this.l+Sr*(arguments.length?gt:1)),this.a,this.b)},Sn.darker=function(gt){return new Ke(Math.max(0,this.l-Sr*(arguments.length?gt:1)),this.a,this.b)},Sn.rgb=function(){return Cn(this.l,this.a,this.b)};function Cn(gt,Et,Xt){var he=(gt+16)/116,pe=he+Et/500,we=he-Xt/200;return pe=Kn(pe)*nn,he=Kn(he)*hn,we=Kn(we)*Vr,new fe(ue(3.2404542*pe-1.5371385*he-.4985314*we),ue(-.969266*pe+1.8760108*he+.041556*we),ue(.0556434*pe-.2040259*he+1.0572252*we))}function ri(gt,Et,Xt){return gt>0?new Ee(Math.atan2(Xt,Et)*re,Math.sqrt(Et*Et+Xt*Xt),gt):new Ee(NaN,NaN,gt)}function Kn(gt){return gt>.206893034?gt*gt*gt:(gt-4/29)/7.787037}function si(gt){return gt>.008856?Math.pow(gt,1/3):7.787037*gt+4/29}function ue(gt){return Math.round(255*(gt<=.00304?12.92*gt:1.055*Math.pow(gt,1/2.4)-.055))}c.rgb=fe;function fe(gt,Et,Xt){return this instanceof fe?(this.r=~~gt,this.g=~~Et,void(this.b=~~Xt)):arguments.length<2?gt instanceof fe?new fe(gt.r,gt.g,gt.b):Br(""+gt,fe,ai):new fe(gt,Et,Xt)}function Or(gt){return new fe(gt>>16,gt>>8&255,gt&255)}function kr(gt){return Or(gt)+""}var wr=fe.prototype=new Pn;wr.brighter=function(gt){gt=Math.pow(.7,arguments.length?gt:1);var Et=this.r,Xt=this.g,he=this.b,pe=30;return!Et&&!Xt&&!he?new fe(pe,pe,pe):(Et&&Et<pe&&(Et=pe),Xt&&Xt<pe&&(Xt=pe),he&&he<pe&&(he=pe),new fe(Math.min(255,Et/gt),Math.min(255,Xt/gt),Math.min(255,he/gt)))},wr.darker=function(gt){return gt=Math.pow(.7,arguments.length?gt:1),new fe(gt*this.r,gt*this.g,gt*this.b)},wr.hsl=function(){return jr(this.r,this.g,this.b)},wr.toString=function(){return"#"+yr(this.r)+yr(this.g)+yr(this.b)};function yr(gt){return gt<16?"0"+Math.max(0,gt).toString(16):Math.min(255,gt).toString(16)}function Br(gt,Et,Xt){var he=0,pe=0,we=0,Ne,Ue,sr;if(Ne=/([a-z]+)\((.*)\)/.exec(gt=gt.toLowerCase()),Ne)switch(Ue=Ne[2].split(","),Ne[1]){case"hsl":return Xt(parseFloat(Ue[0]),parseFloat(Ue[1])/100,parseFloat(Ue[2])/100);case"rgb":return Et(an(Ue[0]),an(Ue[1]),an(Ue[2]))}return(sr=en.get(gt))?Et(sr.r,sr.g,sr.b):(gt!=null&&gt.charAt(0)==="#"&&!isNaN(sr=parseInt(gt.slice(1),16))&&(gt.length===4?(he=(sr&3840)>>4,he=he>>4|he,pe=sr&240,pe=pe>>4|pe,we=sr&15,we=we<<4|we):gt.length===7&&(he=(sr&16711680)>>16,pe=(sr&65280)>>8,we=sr&255)),Et(he,pe,we))}function jr(gt,Et,Xt){var he=Math.min(gt/=255,Et/=255,Xt/=255),pe=Math.max(gt,Et,Xt),we=pe-he,Ne,Ue,sr=(pe+he)/2;return we?(Ue=sr<.5?we/(pe+he):we/(2-pe-he),gt==pe?Ne=(Et-Xt)/we+(Et<Xt?6:0):Et==pe?Ne=(Xt-gt)/we+2:Ne=(gt-Et)/we+4,Ne*=60):(Ne=NaN,Ue=sr>0&&sr<1?0:Ne),new wn(Ne,Ue,sr)}function Pr(gt,Et,Xt){gt=$r(gt),Et=$r(Et),Xt=$r(Xt);var he=si((.4124564*gt+.3575761*Et+.1804375*Xt)/nn),pe=si((.2126729*gt+.7151522*Et+.072175*Xt)/hn),we=si((.0193339*gt+.119192*Et+.9503041*Xt)/Vr);return Ke(116*pe-16,500*(he-pe),200*(pe-we))}function $r(gt){return(gt/=255)<=.04045?gt/12.92:Math.pow((gt+.055)/1.055,2.4)}function an(gt){var Et=parseFloat(gt);return gt.charAt(gt.length-1)==="%"?Math.round(Et*2.55):Et}var en=c.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});en.forEach(function(gt,Et){en.set(gt,Or(Et))});function Te(gt){return typeof gt=="function"?gt:function(){return gt}}c.functor=Te,c.xhr=or(F);function or(gt){return function(Et,Xt,he){return arguments.length===2&&typeof Xt=="function"&&(he=Xt,Xt=null),Tr(Et,Xt,gt,he)}}function Tr(gt,Et,Xt,he){var pe={},we=c.dispatch("beforesend","progress","load","error"),Ne={},Ue=new XMLHttpRequest,sr=null;self.XDomainRequest&&!("withCredentials"in Ue)&&/^(http(s)?:)?\/\//.test(gt)&&(Ue=new XDomainRequest),"onload"in Ue?Ue.onload=Ue.onerror=Lr:Ue.onreadystatechange=function(){Ue.readyState>3&&Lr()};function Lr(){var Er=Ue.status,Yr;if(!Er&&bn(Ue)||Er>=200&&Er<300||Er===304){try{Yr=Xt.call(pe,Ue)}catch(ln){we.error.call(pe,ln);return}we.load.call(pe,Yr)}else we.error.call(pe,Ue)}return Ue.onprogress=function(Er){var Yr=c.event;c.event=Er;try{we.progress.call(pe,Ue)}finally{c.event=Yr}},pe.header=function(Er,Yr){return Er=(Er+"").toLowerCase(),arguments.length<2?Ne[Er]:(Yr==null?delete Ne[Er]:Ne[Er]=Yr+"",pe)},pe.mimeType=function(Er){return arguments.length?(Et=Er==null?null:Er+"",pe):Et},pe.responseType=function(Er){return arguments.length?(sr=Er,pe):sr},pe.response=function(Er){return Xt=Er,pe},["get","post"].forEach(function(Er){pe[Er]=function(){return pe.send.apply(pe,[Er].concat(M(arguments)))}}),pe.send=function(Er,Yr,ln){if(arguments.length===2&&typeof Yr=="function"&&(ln=Yr,Yr=null),Ue.open(Er,gt,!0),Et!=null&&!("accept"in Ne)&&(Ne.accept=Et+",*/*"),Ue.setRequestHeader)for(var cn in Ne)Ue.setRequestHeader(cn,Ne[cn]);return Et!=null&&Ue.overrideMimeType&&Ue.overrideMimeType(Et),sr!=null&&(Ue.responseType=sr),ln!=null&&pe.on("error",ln).on("load",function(ci){ln(null,ci)}),we.beforesend.call(pe,Ue),Ue.send(Yr??null),pe},pe.abort=function(){return Ue.abort(),pe},c.rebind(pe,we,"on"),he==null?pe:pe.get(Xr(he))}function Xr(gt){return gt.length===1?function(Et,Xt){gt(Et==null?Xt:null)}:gt}function bn(gt){var Et=gt.responseType;return Et&&Et!=="text"?gt.response:gt.responseText}c.dsv=function(gt,Et){var