@explorables/particularly_stuck
Version:
This explorable illustrates a model for fractal growth patterns in natural systems based on the aggregation of randomly moving particles.
2 lines • 174 kB
JavaScript
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('/*! tailwindcss v4.1.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial}}}@layer theme{:root,:host{--tw-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--tw-color-black:#000;--tw-color-white:#fff;--tw-spacing:.25rem;--tw-container-5xl:64rem;--tw-text-2xl:1.5rem;--tw-text-2xl--line-height:calc(2/1.5);--tw-text-3xl:1.875rem;--tw-text-3xl--line-height: 1.2 ;--tw-text-5xl:3rem;--tw-text-5xl--line-height:1;--tw-font-weight-light:300}}@layer base,components;@layer utilities{.tw\\:m-8{margin:calc(var(--tw-spacing)*8)}.tw\\:grid{display:grid}.tw\\:max-w-5xl{max-width:var(--tw-container-5xl)}.tw\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.tw\\:border-1{border-style:var(--tw-border-style);border-width:1px}.tw\\:bg-white{background-color:var(--tw-color-white)}.tw\\:p-0{padding:calc(var(--tw-spacing)*0)}.tw\\:px-1{padding-inline:calc(var(--tw-spacing)*1)}.tw\\:px-10{padding-inline:calc(var(--tw-spacing)*10)}.tw\\:font-sans{font-family:var(--tw-font-sans)}.tw\\:text-2xl{font-size:var(--tw-text-2xl);line-height:var(--tw-leading,var(--tw-text-2xl--line-height))}.tw\\:text-3xl{font-size:var(--tw-text-3xl);line-height:var(--tw-leading,var(--tw-text-3xl--line-height))}.tw\\:text-5xl{font-size:var(--tw-text-5xl);line-height:var(--tw-leading,var(--tw-text-5xl--line-height))}.tw\\:font-light{--tw-font-weight:var(--tw-font-weight-light);font-weight:var(--tw-font-weight-light)}.tw\\:text-black{color:var(--tw-color-black)}@media (min-width:40rem){.tw\\:sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.tw\\:sm\\:gap-8{gap:calc(var(--tw-spacing)*8)}.tw\\:sm\\:p-0{padding:calc(var(--tw-spacing)*0)}}@media (prefers-color-scheme:dark){.tw\\:dark\\:border-white{border-color:var(--tw-color-white)}.tw\\:dark\\:bg-black{background-color:var(--tw-color-black)}.tw\\:dark\\:text-white{color:var(--tw-color-white)}}.debug-grid-16{background-image:linear-gradient(90deg,#0000ff1a 1px,#0000 1px),linear-gradient(#0000ff1a 1px,#0000 1px);background-repeat:repeat;background-size:6.25% 6.25%,6.25% 6.25%}}.explorable *,.explorable :before,.explorable :after{box-sizing:border-box}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}._displayPanel_19jk0_1,._controlPanel_19jk0_8{display:block;line-height:0;box-sizing:border-box}._displayPanel_19jk0_1>canvas,._displayPanel_19jk0_1>svg,._controlPanel_19jk0_8>svg,._controlPanel_19jk0_8>canvas{display:block;box-sizing:border-box}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
(function($,Ut){typeof exports=="object"&&typeof module<"u"?Ut(exports):typeof define=="function"&&define.amd?define(["exports"],Ut):($=typeof globalThis<"u"?globalThis:$||self,Ut($.particularly_stuck={}))})(this,function($){"use strict";const Ut={display_type:"canvas",debug:!1,controls_border:"",display_border:"",debug_lattice:"debug-grid-16",controls_grid:{nx:12,ny:12},display_size:{width:500,height:500},controls_size:{width:480,height:480},display_class:"tw:border-1 tw-border-black tw:dark:border-white tw:p-0",controls_class:"tw:p-0",container_class:"tw:font-sans tw:font-light tw:grid tw:grid-cols-1 tw:sm:grid-cols-2 tw:sm:gap-8 tw:px-1 tw:sm:p-0 tw:m-8"};function Le(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Bu(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ui(t){let e,n,r;t.length!==2?(e=Le,n=(s,c)=>Le(t(s),c),r=(s,c)=>t(s)-c):(e=t===Le||t===Bu?t:Hu,n=t,r=t);function i(s,c,u=0,l=s.length){if(u<l){if(e(c,c)!==0)return l;do{const h=u+l>>>1;n(s[h],c)<0?u=h+1:l=h}while(u<l)}return u}function a(s,c,u=0,l=s.length){if(u<l){if(e(c,c)!==0)return l;do{const h=u+l>>>1;n(s[h],c)<=0?u=h+1:l=h}while(u<l)}return u}function o(s,c,u=0,l=s.length){const h=i(s,c,u,l-1);return h>u&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:i,center:o,right:a}}function Hu(){return 0}function Uu(t){return t===null?NaN:+t}const Yu=Ui(Le).right;Ui(Uu).center;const Gu=Math.sqrt(50),Vu=Math.sqrt(10),Ku=Math.sqrt(2);function qe(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=Gu?10:a>=Vu?5:a>=Ku?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(t*u),c=Math.round(e*u),s/u<t&&++s,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*o,s=Math.round(t/u),c=Math.round(e/u),s*u<t&&++s,c*u>e&&--c),c<s&&.5<=n&&n<2?qe(t,e,n*2):[s,c,u]}function Wu(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,a,o]=r?qe(e,t,n):qe(t,e,n);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let u=0;u<s;++u)c[u]=(a-u)/-o;else for(let u=0;u<s;++u)c[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)c[u]=(i+u)/-o;else for(let u=0;u<s;++u)c[u]=(i+u)*o;return c}function sr(t,e,n){return e=+e,t=+t,n=+n,qe(t,e,n)[2]}function Zu(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?sr(e,t,n):sr(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var Ju={value:()=>{}};function Yi(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Xe(n)}function Xe(t){this._=t}function Qu(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Xe.prototype=Yi.prototype={constructor:Xe,on:function(t,e){var n=this._,r=Qu(t+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(t=r[a]).type)&&(i=tc(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(i=(t=r[a]).type)n[i]=Gi(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Gi(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Xe(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],r=0,i=a.length;r<i;++r)a[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};function tc(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Gi(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ju,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var ur="http://www.w3.org/1999/xhtml";const Vi={svg:"http://www.w3.org/2000/svg",xhtml:ur,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Be(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Vi.hasOwnProperty(e)?{space:Vi[e],local:t}:t}function ec(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ur&&e.documentElement.namespaceURI===ur?e.createElement(t):e.createElementNS(n,t)}}function nc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ki(t){var e=Be(t);return(e.local?nc:ec)(e)}function rc(){}function cr(t){return t==null?rc:function(){return this.querySelector(t)}}function ic(t){typeof t!="function"&&(t=cr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,s=r[i]=new Array(o),c,u,l=0;l<o;++l)(c=a[l])&&(u=t.call(c,c.__data__,l,a))&&("__data__"in c&&(u.__data__=c.__data__),s[l]=u);return new D(r,this._parents)}function ac(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function oc(){return[]}function Wi(t){return t==null?oc:function(){return this.querySelectorAll(t)}}function sc(t){return function(){return ac(t.apply(this,arguments))}}function uc(t){typeof t=="function"?t=sc(t):t=Wi(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o=e[a],s=o.length,c,u=0;u<s;++u)(c=o[u])&&(r.push(t.call(c,c.__data__,u,o)),i.push(c));return new D(r,i)}function Zi(t){return function(){return this.matches(t)}}function Ji(t){return function(e){return e.matches(t)}}var cc=Array.prototype.find;function lc(t){return function(){return cc.call(this.children,t)}}function fc(){return this.firstElementChild}function hc(t){return this.select(t==null?fc:lc(typeof t=="function"?t:Ji(t)))}var dc=Array.prototype.filter;function pc(){return Array.from(this.children)}function gc(t){return function(){return dc.call(this.children,t)}}function yc(t){return this.selectAll(t==null?pc:gc(typeof t=="function"?t:Ji(t)))}function bc(t){typeof t!="function"&&(t=Zi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,s=r[i]=[],c,u=0;u<o;++u)(c=a[u])&&t.call(c,c.__data__,u,a)&&s.push(c);return new D(r,this._parents)}function Qi(t){return new Array(t.length)}function _c(){return new D(this._enter||this._groups.map(Qi),this._parents)}function He(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}He.prototype={constructor:He,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function vc(t){return function(){return t}}function mc(t,e,n,r,i,a){for(var o=0,s,c=e.length,u=a.length;o<u;++o)(s=e[o])?(s.__data__=a[o],r[o]=s):n[o]=new He(t,a[o]);for(;o<c;++o)(s=e[o])&&(i[o]=s)}function wc(t,e,n,r,i,a,o){var s,c,u=new Map,l=e.length,h=a.length,f=new Array(l),d;for(s=0;s<l;++s)(c=e[s])&&(f[s]=d=o.call(c,c.__data__,s,e)+"",u.has(d)?i[s]=c:u.set(d,c));for(s=0;s<h;++s)d=o.call(t,a[s],s,a)+"",(c=u.get(d))?(r[s]=c,c.__data__=a[s],u.delete(d)):n[s]=new He(t,a[s]);for(s=0;s<l;++s)(c=e[s])&&u.get(f[s])===c&&(i[s]=c)}function xc(t){return t.__data__}function Mc(t,e){if(!arguments.length)return Array.from(this,xc);var n=e?wc:mc,r=this._parents,i=this._groups;typeof t!="function"&&(t=vc(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=Ac(t.call(l,l&&l.__data__,u,r)),g=d.length,b=s[u]=new Array(g),m=o[u]=new Array(g),w=c[u]=new Array(f);n(l,h,b,m,w,d,e);for(var p=0,M=0,y,v;p<g;++p)if(y=b[p]){for(p>=M&&(M=p+1);!(v=m[M])&&++M<g;);y._next=v||null}}return o=new D(o,r),o._enter=s,o._exit=c,o}function Ac(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function $c(){return new D(this._exit||this._groups.map(Qi),this._parents)}function Tc(t,e,n){var r=this.enter(),i=this,a=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Nc(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u=n[c],l=r[c],h=u.length,f=s[c]=new Array(h),d,g=0;g<h;++g)(d=u[g]||l[g])&&(f[g]=d);for(;c<i;++c)s[c]=n[c];return new D(s,this._parents)}function Sc(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Pc(t){t||(t=kc);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=new Array(s),u,l=0;l<s;++l)(u=o[l])&&(c[l]=u);c.sort(e)}return new D(i,this._parents).order()}function kc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ec(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Oc(){return Array.from(this)}function zc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Cc(){let t=0;for(const e of this)++t;return t}function Ic(){return!this.node()}function Rc(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&t.call(s,s.__data__,a,i);return this}function jc(t){return function(){this.removeAttribute(t)}}function Fc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Dc(t,e){return function(){this.setAttribute(t,e)}}function Lc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function qc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Xc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Bc(t,e){var n=Be(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Fc:jc:typeof e=="function"?n.local?Xc:qc:n.local?Lc:Dc)(n,e))}function ta(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Hc(t){return function(){this.style.removeProperty(t)}}function Uc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Yc(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Gc(t,e,n){return arguments.length>1?this.each((e==null?Hc:typeof e=="function"?Yc:Uc)(t,e,n??"")):Yt(this.node(),t)}function Yt(t,e){return t.style.getPropertyValue(e)||ta(t).getComputedStyle(t,null).getPropertyValue(e)}function Vc(t){return function(){delete this[t]}}function Kc(t,e){return function(){this[t]=e}}function Wc(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Zc(t,e){return arguments.length>1?this.each((e==null?Vc:typeof e=="function"?Wc:Kc)(t,e)):this.node()[t]}function ea(t){return t.trim().split(/^|\s+/)}function lr(t){return t.classList||new na(t)}function na(t){this._node=t,this._names=ea(t.getAttribute("class")||"")}na.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ra(t,e){for(var n=lr(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ia(t,e){for(var n=lr(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Jc(t){return function(){ra(this,t)}}function Qc(t){return function(){ia(this,t)}}function tl(t,e){return function(){(e.apply(this,arguments)?ra:ia)(this,t)}}function el(t,e){var n=ea(t+"");if(arguments.length<2){for(var r=lr(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?tl:e?Jc:Qc)(n,e))}function nl(){this.textContent=""}function rl(t){return function(){this.textContent=t}}function il(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function al(t){return arguments.length?this.each(t==null?nl:(typeof t=="function"?il:rl)(t)):this.node().textContent}function ol(){this.innerHTML=""}function sl(t){return function(){this.innerHTML=t}}function ul(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function cl(t){return arguments.length?this.each(t==null?ol:(typeof t=="function"?ul:sl)(t)):this.node().innerHTML}function ll(){this.nextSibling&&this.parentNode.appendChild(this)}function fl(){return this.each(ll)}function hl(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dl(){return this.each(hl)}function pl(t){var e=typeof t=="function"?t:Ki(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function gl(){return null}function yl(t,e){var n=typeof t=="function"?t:Ki(t),r=e==null?gl:typeof e=="function"?e:cr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function bl(){var t=this.parentNode;t&&t.removeChild(this)}function _l(){return this.each(bl)}function vl(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ml(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wl(t){return this.select(t?ml:vl)}function xl(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Ml(t){return function(e){t.call(this,e,this.__data__)}}function Al(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function $l(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,a;n<i;++n)a=e[n],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++r]=a;++r?e.length=r:delete this.__on}}}function Tl(t,e,n){return function(){var r=this.__on,i,a=Ml(e);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=e;return}}this.addEventListener(t.type,a,n),i={type:t.type,name:t.name,value:e,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Nl(t,e,n){var r=Al(t+""),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,l;c<u;++c)for(i=0,l=s[c];i<a;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value}return}for(s=e?Tl:$l,i=0;i<a;++i)this.each(s(r[i],e,n));return this}function aa(t,e,n){var r=ta(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Sl(t,e){return function(){return aa(this,t,e)}}function Pl(t,e){return function(){return aa(this,t,e.apply(this,arguments))}}function kl(t,e){return this.each((typeof e=="function"?Pl:Sl)(t,e))}function*El(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var oa=[null];function D(t,e){this._groups=t,this._parents=e}function ce(){return new D([[document.documentElement]],oa)}function Ol(){return this}D.prototype=ce.prototype={constructor:D,select:ic,selectAll:uc,selectChild:hc,selectChildren:yc,filter:bc,data:Mc,enter:_c,exit:$c,join:Tc,merge:Nc,selection:Ol,order:Sc,sort:Pc,call:Ec,nodes:Oc,node:zc,size:Cc,empty:Ic,each:Rc,attr:Bc,style:Gc,property:Zc,classed:el,text:al,html:cl,raise:fl,lower:dl,append:pl,insert:yl,remove:_l,clone:wl,datum:xl,on:Nl,dispatch:kl,[Symbol.iterator]:El};function zl(t){return typeof t=="string"?new D([[document.querySelector(t)]],[document.documentElement]):new D([[t]],oa)}function fr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function sa(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function le(){}var fe=.7,Ue=1/fe,Gt="\\s*([+-]?\\d+)\\s*",he="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cl=/^#([0-9a-f]{3,8})$/,Il=new RegExp(`^rgb\\(${Gt},${Gt},${Gt}\\)$`),Rl=new RegExp(`^rgb\\(${et},${et},${et}\\)$`),jl=new RegExp(`^rgba\\(${Gt},${Gt},${Gt},${he}\\)$`),Fl=new RegExp(`^rgba\\(${et},${et},${et},${he}\\)$`),Dl=new RegExp(`^hsl\\(${he},${et},${et}\\)$`),Ll=new RegExp(`^hsla\\(${he},${et},${et},${he}\\)$`),ua={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};fr(le,Tt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ca,formatHex:ca,formatHex8:ql,formatHsl:Xl,formatRgb:la,toString:la});function ca(){return this.rgb().formatHex()}function ql(){return this.rgb().formatHex8()}function Xl(){return ga(this).formatHsl()}function la(){return this.rgb().formatRgb()}function Tt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Cl.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?fa(e):n===3?new j(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ye(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ye(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Il.exec(t))?new j(e[1],e[2],e[3],1):(e=Rl.exec(t))?new j(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=jl.exec(t))?Ye(e[1],e[2],e[3],e[4]):(e=Fl.exec(t))?Ye(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Dl.exec(t))?pa(e[1],e[2]/100,e[3]/100,1):(e=Ll.exec(t))?pa(e[1],e[2]/100,e[3]/100,e[4]):ua.hasOwnProperty(t)?fa(ua[t]):t==="transparent"?new j(NaN,NaN,NaN,0):null}function fa(t){return new j(t>>16&255,t>>8&255,t&255,1)}function Ye(t,e,n,r){return r<=0&&(t=e=n=NaN),new j(t,e,n,r)}function Bl(t){return t instanceof le||(t=Tt(t)),t?(t=t.rgb(),new j(t.r,t.g,t.b,t.opacity)):new j}function Ge(t,e,n,r){return arguments.length===1?Bl(t):new j(t,e,n,r??1)}function j(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}fr(j,Ge,sa(le,{brighter(t){return t=t==null?Ue:Math.pow(Ue,t),new j(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?fe:Math.pow(fe,t),new j(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new j(Nt(this.r),Nt(this.g),Nt(this.b),Ve(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ha,formatHex:ha,formatHex8:Hl,formatRgb:da,toString:da}));function ha(){return`#${St(this.r)}${St(this.g)}${St(this.b)}`}function Hl(){return`#${St(this.r)}${St(this.g)}${St(this.b)}${St((isNaN(this.opacity)?1:this.opacity)*255)}`}function da(){const t=Ve(this.opacity);return`${t===1?"rgb(":"rgba("}${Nt(this.r)}, ${Nt(this.g)}, ${Nt(this.b)}${t===1?")":`, ${t})`}`}function Ve(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Nt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function St(t){return t=Nt(t),(t<16?"0":"")+t.toString(16)}function pa(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Y(t,e,n,r)}function ga(t){if(t instanceof Y)return new Y(t.h,t.s,t.l,t.opacity);if(t instanceof le||(t=Tt(t)),!t)return new Y;if(t instanceof Y)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(e===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-e)/s+2:o=(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Y(o,s,c,t.opacity)}function Ul(t,e,n,r){return arguments.length===1?ga(t):new Y(t,e,n,r??1)}function Y(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}fr(Y,Ul,sa(le,{brighter(t){return t=t==null?Ue:Math.pow(Ue,t),new Y(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?fe:Math.pow(fe,t),new Y(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new j(hr(t>=240?t-240:t+120,i,r),hr(t,i,r),hr(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Y(ya(this.h),Ke(this.s),Ke(this.l),Ve(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ve(this.opacity);return`${t===1?"hsl(":"hsla("}${ya(this.h)}, ${Ke(this.s)*100}%, ${Ke(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ya(t){return t=(t||0)%360,t<0?t+360:t}function Ke(t){return Math.max(0,Math.min(1,t||0))}function hr(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const dr=t=>()=>t;function Yl(t,e){return function(n){return t+n*e}}function Gl(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Vl(t){return(t=+t)==1?ba:function(e,n){return n-e?Gl(e,n,t):dr(isNaN(e)?n:e)}}function ba(t,e){var n=e-t;return n?Yl(t,n):dr(isNaN(t)?e:t)}const Mt=function t(e){var n=Vl(e);function r(i,a){var o=n((i=Ge(i)).r,(a=Ge(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),u=ba(i.opacity,a.opacity);return function(l){return i.r=o(l),i.g=s(l),i.b=c(l),i.opacity=u(l),i+""}}return r.gamma=t,r}(1);function Kl(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=t[i]*(1-a)+e[i]*a;return r}}function Wl(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Zl(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=We(t[o],e[o]);for(;o<n;++o)a[o]=e[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function Jl(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function G(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ql(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=We(t[i],e[i]):r[i]=e[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var pr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gr=new RegExp(pr.source,"g");function tf(t){return function(){return t}}function ef(t){return function(e){return t(e)+""}}function _a(t,e){var n=pr.lastIndex=gr.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(t=t+"",e=e+"";(r=pr.exec(t))&&(i=gr.exec(e));)(a=i.index)>n&&(a=e.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:G(r,i)})),n=gr.lastIndex;return n<e.length&&(a=e.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?ef(c[0].x):tf(e):(e=c.length,function(u){for(var l=0,h;l<e;++l)s[(h=c[l]).i]=h.x(u);return s.join("")})}function We(t,e){var n=typeof e,r;return e==null||n==="boolean"?dr(e):(n==="number"?G:n==="string"?(r=Tt(e))?(e=r,Mt):_a:e instanceof Tt?Mt:e instanceof Date?Jl:Wl(e)?Kl:Array.isArray(e)?Zl:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ql:G)(t,e)}function nf(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var va=180/Math.PI,yr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ma(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*va,skewX:Math.atan(c)*va,scaleX:o,scaleY:s}}var Ze;function rf(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?yr:ma(e.a,e.b,e.c,e.d,e.e,e.f)}function af(t){return t==null||(Ze||(Ze=document.createElementNS("http://www.w3.org/2000/svg","g")),Ze.setAttribute("transform",t),!(t=Ze.transform.baseVal.consolidate()))?yr:(t=t.matrix,ma(t.a,t.b,t.c,t.d,t.e,t.f))}function wa(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function a(u,l,h,f,d,g){if(u!==h||l!==f){var b=d.push("translate(",null,e,null,n);g.push({i:b-4,x:G(u,h)},{i:b-2,x:G(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function o(u,l,h,f){u!==l?(u-l>180?l+=360:l-u>180&&(u+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:G(u,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(u,l,h,f){u!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:G(u,l)}):l&&h.push(i(h)+"skewX("+l+r)}function c(u,l,h,f,d,g){if(u!==h||l!==f){var b=d.push(i(d)+"scale(",null,",",null,")");g.push({i:b-4,x:G(u,h)},{i:b-2,x:G(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(u,l){var h=[],f=[];return u=t(u),l=t(l),a(u.translateX,u.translateY,l.translateX,l.translateY,h,f),o(u.rotate,l.rotate,h,f),s(u.skewX,l.skewX,h,f),c(u.scaleX,u.scaleY,l.scaleX,l.scaleY,h,f),u=l=null,function(d){for(var g=-1,b=f.length,m;++g<b;)h[(m=f[g]).i]=m.x(d);return h.join("")}}}var of=wa(rf,"px, ","px)","deg)"),sf=wa(af,", ",")",")");function Je(t,e){e===void 0&&(e=t,t=We);for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(o){var s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}var Vt=0,de=0,pe=0,xa=1e3,Qe,ge,tn=0,Pt=0,en=0,ye=typeof performance=="object"&&performance.now?performance:Date,Ma=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function nn(){return Pt||(Ma(uf),Pt=ye.now()+en)}function uf(){Pt=0}function be(){this._call=this._time=this._next=null}be.prototype=Aa.prototype={constructor:be,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?nn():+n)+(e==null?0:+e),!this._next&&ge!==this&&(ge?ge._next=this:Qe=this,ge=this),this._call=t,this._time=n,br()},stop:function(){this._call&&(this._call=null,this._time=1/0,br())}};function Aa(t,e,n){var r=new be;return r.restart(t,e,n),r}function cf(){nn(),++Vt;for(var t=Qe,e;t;)(e=Pt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Vt}function $a(){Pt=(tn=ye.now())+en,Vt=de=0;try{cf()}finally{Vt=0,ff(),Pt=0}}function lf(){var t=ye.now(),e=t-tn;e>xa&&(en-=e,tn=t)}function ff(){for(var t,e=Qe,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Qe=n);ge=t,br(r)}function br(t){if(!Vt){de&&(de=clearTimeout(de));var e=t-Pt;e>24?(t<1/0&&(de=setTimeout($a,t-ye.now()-en)),pe&&(pe=clearInterval(pe))):(pe||(tn=ye.now(),pe=setInterval(lf,xa)),Vt=1,Ma($a))}}function Ta(t,e,n){var r=new be;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function hf(t,e,n){var r=new be,i=e;return r._restart=r.restart,r.restart=function(a,o,s){o=+o,s=s==null?nn():+s,r._restart(function c(u){u+=i,r._restart(c,i+=o,s),a(u)},o,s)},r.restart(t,e,n),r}var df=Yi("start","end","cancel","interrupt"),pf=[],Na=0,Sa=1,_r=2,rn=3,Pa=4,vr=5,an=6;function on(t,e,n,r,i,a){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;gf(t,n,{name:e,index:r,group:i,on:df,tween:pf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Na})}function mr(t,e){var n=V(t,e);if(n.state>Na)throw new Error("too late; already scheduled");return n}function nt(t,e){var n=V(t,e);if(n.state>rn)throw new Error("too late; already running");return n}function V(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function gf(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Aa(a,0,n.time);function a(u){n.state=Sa,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var l,h,f,d;if(n.state!==Sa)return c();for(l in r)if(d=r[l],d.name===n.name){if(d.state===rn)return Ta(o);d.state===Pa?(d.state=an,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=an,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(Ta(function(){n.state===rn&&(n.state=Pa,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=_r,n.on.call("start",t,t.__data__,n.index,n.group),n.state===_r){for(n.state=rn,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(u){for(var l=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=vr,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===vr&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=an,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function yf(t,e){var n=t.__transition,r,i,a=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){a=!1;continue}i=r.state>_r&&r.state<vr,r.state=an,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}a&&delete t.__transition}}function bf(t){return this.each(function(){yf(this,t)})}function _f(t,e){var n,r;return function(){var i=nt(this,t),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function vf(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=nt(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function mf(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=V(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?_f:vf)(n,t,e))}function wr(t,e,n){var r=t._id;return t.each(function(){var i=nt(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return V(i,r).value[e]}}function ka(t,e){var n;return(typeof e=="number"?G:e instanceof Tt?Mt:(n=Tt(e))?(e=n,Mt):_a)(t,e)}function wf(t){return function(){this.removeAttribute(t)}}function xf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mf(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttribute(t);return o===i?null:o===r?a:a=e(r=o,n)}}function Af(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?a:a=e(r=o,n)}}function $f(t,e,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(t):(o=this.getAttribute(t),c=s+"",o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s)))}}function Tf(t,e,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),c=s+"",o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s)))}}function Nf(t,e){var n=Be(t),r=n==="transform"?sf:ka;return this.attrTween(t,typeof e=="function"?(n.local?Tf:$f)(n,r,wr(this,"attr."+t,e)):e==null?(n.local?xf:wf)(n):(n.local?Af:Mf)(n,r,e))}function Sf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Pf(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function kf(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&Pf(t,a)),n}return i._value=e,i}function Ef(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&Sf(t,a)),n}return i._value=e,i}function Of(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Be(t);return this.tween(n,(r.local?kf:Ef)(r,e))}function zf(t,e){return function(){mr(this,t).delay=+e.apply(this,arguments)}}function Cf(t,e){return e=+e,function(){mr(this,t).delay=e}}function If(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?zf:Cf)(e,t)):V(this.node(),e).delay}function Rf(t,e){return function(){nt(this,t).duration=+e.apply(this,arguments)}}function jf(t,e){return e=+e,function(){nt(this,t).duration=e}}function Ff(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Rf:jf)(e,t)):V(this.node(),e).duration}function Df(t,e){if(typeof e!="function")throw new Error;return function(){nt(this,t).ease=e}}function Lf(t){var e=this._id;return arguments.length?this.each(Df(e,t)):V(this.node(),e).ease}function qf(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;nt(this,t).ease=n}}function Xf(t){if(typeof t!="function")throw new Error;return this.each(qf(this._id,t))}function Bf(t){typeof t!="function"&&(t=Zi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,s=r[i]=[],c,u=0;u<o;++u)(c=a[u])&&t.call(c,c.__data__,u,a)&&s.push(c);return new st(r,this._parents,this._name,this._id)}function Hf(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c=e[s],u=n[s],l=c.length,h=o[s]=new Array(l),f,d=0;d<l;++d)(f=c[d]||u[d])&&(h[d]=f);for(;s<r;++s)o[s]=e[s];return new st(o,this._parents,this._name,this._id)}function Uf(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Yf(t,e,n){var r,i,a=Uf(e)?mr:nt;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}function Gf(t,e){var n=this._id;return arguments.length<2?V(this.node(),n).on.on(t):this.each(Yf(n,t,e))}function Vf(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Kf(){return this.on("end.remove",Vf(this._id))}function Wf(t){var e=this._name,n=this._id;typeof t!="function"&&(t=cr(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,u=a[o]=new Array(c),l,h,f=0;f<c;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),u[f]=h,on(u[f],e,n,f,u,V(l,n)));return new st(a,this._parents,e,n)}function Zf(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Wi(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],u=c.length,l,h=0;h<u;++h)if(l=c[h]){for(var f=t.call(l,l.__data__,h,c),d,g=V(l,n),b=0,m=f.length;b<m;++b)(d=f[b])&&on(d,e,n,b,f,g);a.push(f),o.push(l)}return new st(a,o,e,n)}var Jf=ce.prototype.constructor;function Qf(){return new Jf(this._groups,this._parents)}function th(t,e){var n,r,i;return function(){var a=Yt(this,t),o=(this.style.removeProperty(t),Yt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}function Ea(t){return function(){this.style.removeProperty(t)}}function eh(t,e,n){var r,i=n+"",a;return function(){var o=Yt(this,t);return o===i?null:o===r?a:a=e(r=o,n)}}function nh(t,e,n){var r,i,a;return function(){var o=Yt(this,t),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(t),Yt(this,t))),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}function rh(t,e){var n,r,i,a="style."+e,o="end."+a,s;return function(){var c=nt(this,t),u=c.on,l=c.value[a]==null?s||(s=Ea(e)):void 0;(u!==n||i!==l)&&(r=(n=u).copy()).on(o,i=l),c.on=r}}function ih(t,e,n){var r=(t+="")=="transform"?of:ka;return e==null?this.styleTween(t,th(t,r)).on("end.style."+t,Ea(t)):typeof e=="function"?this.styleTween(t,nh(t,r,wr(this,"style."+t,e))).each(rh(this._id,t)):this.styleTween(t,eh(t,r,e),n).on("end.style."+t,null)}function ah(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function oh(t,e,n){var r,i;function a(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&ah(t,o,n)),r}return a._value=e,a}function sh(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,oh(t,e,n??""))}function uh(t){return function(){this.textContent=t}}function ch(t){return function(){var e=t(this);this.textContent=e??""}}function lh(t){return this.tween("text",typeof t=="function"?ch(wr(this,"text",t)):uh(t==null?"":t+""))}function fh(t){return function(e){this.textContent=t.call(this,e)}}function hh(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&fh(i)),e}return r._value=t,r}function dh(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,hh(t))}function ph(){for(var t=this._name,e=this._id,n=Oa(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,u=0;u<s;++u)if(c=o[u]){var l=V(c,e);on(c,t,n,u,o,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new st(r,this._parents,t,n)}function gh(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var u=nt(this,r),l=u.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),u.on=e}),i===0&&a()})}var yh=0;function st(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Oa(){return++yh}var ut=ce.prototype;st.prototype={constructor:st,select:Wf,selectAll:Zf,selectChild:ut.selectChild,selectChildren:ut.selectChildren,filter:Bf,merge:Hf,selection:Qf,transition:ph,call:ut.call,nodes:ut.nodes,node:ut.node,size:ut.size,empty:ut.empty,each:ut.each,on:Gf,attr:Nf,attrTween:Of,style:ih,styleTween:sh,text:lh,textTween:dh,remove:Kf,tween:mf,delay:If,duration:Ff,ease:Lf,easeVarying:Xf,end:gh,[Symbol.iterator]:ut[Symbol.iterator]};function bh(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var _h={time:null,delay:0,duration:250,ease:bh};function vh(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function mh(t){var e,n;t instanceof st?(e=t._id,t=t._name):(e=Oa(),(n=_h).time=nn(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,u=0;u<s;++u)(c=o[u])&&on(c,t,e,u,o,n||vh(c,e));return new st(r,this._parents,t,e)}ce.prototype.interrupt=bf,ce.prototype.transition=mh;function wh(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Kt(t){return t=sn(Math.abs(t)),t?t[1]:NaN}function xh(t,e){return function(n,r){for(var i=n.length,a=[],o=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function Mh(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Ah=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function un(t){if(!(e=Ah.exec(t)))throw new Error("invalid format: "+t);var e;return new xr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}un.prototype=xr.prototype;function xr(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}xr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $h(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var za;function Th(t,e){var n=sn(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(za=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+sn(t,Math.max(0,e+a-1))[0]}function Ca(t,e){var n=sn(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Ia={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:wh,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ca(t*100,e),r:Ca,s:Th,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ra(t){return t}var ja=Array.prototype.map,Fa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nh(t){var e=t.grouping===void 0||t.thousands===void 0?Ra:xh(ja.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?Ra:Mh(ja.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(h){h=un(h);var f=h.fill,d=h.align,g=h.sign,b=h.symbol,m=h.zero,w=h.width,p=h.comma,M=h.precision,y=h.trim,v=h.type;v==="n"?(p=!0,v="g"):Ia[v]||(M===void 0&&(M=12),y=!0,v="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var k=b==="$"?n:b==="#"&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",E=b==="$"?r:/[%p]/.test(v)?o:"",C=Ia[v],B=/[defgprs%]/.test(v);M=M===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function H(_){var I=k,A=E,R,Ht,q;if(v==="c")A=C(_)+A,_="";else{_=+_;var U=_<0||1/_<0;if(_=isNaN(_)?c:C(Math.abs(_),M),y&&(_=$h(_)),U&&+_==0&&g!=="+"&&(U=!1),I=(U?g==="("?g:s:g==="-"||g==="("?"":g)+I,A=(v==="s"?Fa[8+za/3]:"")+A+(U&&g==="("?")":""),B){for(R=-1,Ht=_.length;++R<Ht;)if(q=_.charCodeAt(R),48>q||q>57){A=(q===46?i+_.slice(R+1):_.slice(R))+A,_=_.slice(0,R);break}}}p&&!m&&(_=e(_,1/0));var tt=I.length+_.length+A.length,O=tt<w?new Array(w-tt+1).join(f):"";switch(p&&m&&(_=e(O+_,O.length?w-A.length:1/0),O=""),d){case"<":_=I+_+A+O;break;case"=":_=I+O+_+A;break;case"^":_=O.slice(0,tt=O.length>>1)+I+_+A+O.slice(tt);break;default:_=O+I+_+A;break}return a(_)}return H.toString=function(){return h+""},H}function l(h,f){var d=u((h=un(h),h.type="f",h)),g=Math.max(-8,Math.min(8,Math.floor(Kt(f)/3)))*3,b=Math.pow(10,-g),m=Fa[8+g/3];return function(w){return d(b*w)+m}}return{format:u,formatPrefix:l}}var cn,Da,La;Sh({thousands:",",grouping:[3],currency:["$",""]});function Sh(t){return cn=Nh(t),Da=cn.format,La=cn.formatPrefix,cn}function Ph(t){return Math.max(0,-Kt(Math.abs(t)))}function kh(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Kt(e)/3)))*3-Kt(Math.abs(t)))}function Eh(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Kt(e)-Kt(t))+1}function Oh(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function zh(t){return function(){return t}}function Ch(t){return+t}var qa=[0,1];function Wt(t){return t}function Mr(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:zh(isNaN(e)?NaN:.5)}function Ih(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Rh(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Mr(i,r),a=n(o,a)):(r=Mr(r,i),a=n(a,o)),function(s){return a(r(s))}}function jh(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Mr(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(s){var c=Yu(t,s,1,r)-1;return a[c](i[c](s))}}function Fh(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Dh(){var t=qa,e=qa,n=We,r,i,a,o=Wt,s,c,u;function l(){var f=Math.min(t.length,e.length);return o!==Wt&&(o=Ih(t[0],t[f-1])),s=f>2?jh:Rh,c=u=null,h}function h(f){return f==null||isNaN(f=+f)?a:(c||(c=s(t.map(r),e,n)))(r(o(f)))}return h.invert=function(f){return o(i((u||(u=s(e,t.map(r),G)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Ch),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=nf,l()},h.clamp=function(f){return arguments.length?(o=f?!0:Wt,l()):o!==Wt},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(a=f,h):a},function(f,d){return r=f,i=d,l()}}function Lh(){return Dh()(Wt,Wt)}function qh(t,e,n,r){var i=Zu(t,e,n),a;switch(r=un(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(a=kh(i,o))&&(r.precision=a),La(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Eh(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Ph(i))&&(r.precision=a-(r.type==="%")*2);bre