@orbcharts/plugins-basic 3.0.0-alpha.47 → 3.0.0-alpha.48
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,15 @@
|
|
1
|
-
(function(K,
|
1
|
+
(function(K,or){typeof exports=="object"&&typeof module<"u"?or(exports):typeof define=="function"&&define.amd?define(["exports"],or):(K=typeof globalThis<"u"?globalThis:K||self,or(K["orbcharts-plugins-basic"]={}))})(this,function(K){"use strict";const or={lineCurve:"curveLinear",lineWidth:2},qh={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},jh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Xh={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},ko={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},cx={...ko},Vh={barWidth:0,barGroupPadding:10,barRadius:!1},Zh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Kh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Tu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Qh=Tu,Jh={},tp={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};var Lu=function(t,e){return Lu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Lu(t,e)};function ar(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Lu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function lx(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,e||[])).next())})}function ep(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function sr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ur(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function ii(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function cr(t){return this instanceof cr?(this.v=t,this):new cr(t)}function fx(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,y){o.push([p,g,m,y])>1||u(p,g)})},d&&(i[p]=d(i[p])))}function u(p,d){try{c(r[p](d))}catch(g){f(o[0][3],g)}}function c(p){p.value instanceof cr?Promise.resolve(p.value.v).then(l,h):f(o[0][2],p)}function l(p){u("next",p)}function h(p){u("throw",p)}function f(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function hx(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof sr=="function"?sr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function yt(t){return typeof t=="function"}function Cu(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Eu=Cu(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
2
2
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function Iu(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var No=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=lr(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(yt(l))try{l()}catch(g){o=g instanceof Ru?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=lr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{ap(d)}catch(g){o=o??[],g instanceof Ru?o=ui(ui([],fr(o)),fr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Ru(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ap(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Iu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Iu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),ip=No.EMPTY;function op(t){return t instanceof No||t&&"closed"in t&&yt(t.remove)&&yt(t.add)&&yt(t.unsubscribe)}function ap(t){yt(t)?t():t.unsubscribe()}var sp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},up={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ui([t,e],fr(n)))},clearTimeout:function(t){var e=up.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function cp(t){up.setTimeout(function(){throw t})}function Nu(){}function Fo(t){t()}var Fu=function(t){cr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,op(n)&&n.add(r)):r.destination=Cx,r}return e.create=function(n,r,i){return new ci(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(No),Px=Function.prototype.bind;function Gu(t,e){return Px.call(t,e)}var Tx=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Go(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Go(r)}else Go(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Go(n)}},t}(),ci=function(t){cr(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(yt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&sp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Gu(n.next,s),error:n.error&&Gu(n.error,s),complete:n.complete&&Gu(n.complete,s)}):a=n}return o.destination=new Tx(a),o}return e}(Fu);function Go(t){cp(t)}function Lx(t){throw t}var Cx={closed:!0,next:Nu,error:Lx,complete:Nu},zu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function pr(t){return t}function Ex(t){return t.length===0?pr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var ht=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=Rx(e)?e:new ci(e,n,r);return Fo(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=lp(n),new n(function(i,o){var a=new ci({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[zu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Ex(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=lp(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function lp(t){var e;return(e=t??sp.Promise)!==null&&e!==void 0?e:Promise}function kx(t){return t&&yt(t.next)&&yt(t.error)&&yt(t.complete)}function Rx(t){return t&&t instanceof Fu||kx(t)&&op(t)}function Ix(t){return yt(t==null?void 0:t.lift)}function fe(t){return function(e){if(Ix(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function ae(t,e,n,r,i){return new Nx(t,e,n,r,i)}var Nx=function(t){cr(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Fu),Fx=ku(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ot=function(t){cr(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new fp(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Fx},e.prototype.next=function(n){var r=this;Fo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=lr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Fo(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Fo(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?ip:(this.currentObservers=null,s.push(n),new No(function(){r.currentObservers=null,Iu(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new ht;return n.source=this,n},e.create=function(n,r){return new fp(n,r)},e}(ht),fp=function(t){cr(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ip},e}(ot),hp={now:function(){return(hp.delegate||Date).now()},delegate:void 0},Gx=function(t){cr(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=hp);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(ot),pp=new ht(function(t){return t.complete()});function zx(t){return t&&yt(t.schedule)}function Ou(t){return t[t.length-1]}function Ox(t){return yt(Ou(t))?t.pop():void 0}function Uu(t){return zx(Ou(t))?t.pop():void 0}function Ux(t,e){return typeof Ou(t)=="number"?t.pop():e}var Bu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function dp(t){return yt(t==null?void 0:t.then)}function gp(t){return yt(t[zu])}function mp(t){return Symbol.asyncIterator&&yt(t==null?void 0:t[Symbol.asyncIterator])}function yp(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Bx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var bp=Bx();function vp(t){return yt(t==null?void 0:t[bp])}function xp(t){return Mx(this,arguments,function(){var n,r,i,o;return rp(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,hr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,hr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,hr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function _p(t){return yt(t==null?void 0:t.getReader)}function he(t){if(t instanceof ht)return t;if(t!=null){if(gp(t))return Yx(t);if(Bu(t))return Hx(t);if(dp(t))return Wx(t);if(mp(t))return wp(t);if(vp(t))return qx(t);if(_p(t))return jx(t)}throw yp(t)}function Yx(t){return new ht(function(e){var n=t[zu]();if(yt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Hx(t){return new ht(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Wx(t){return new ht(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,cp)})}function qx(t){return new ht(function(e){var n,r;try{for(var i=lr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function wp(t){return new ht(function(e){Xx(t,e).catch(function(n){return e.error(n)})})}function jx(t){return wp(xp(t))}function Xx(t,e){var n,r,i,o;return Ax(this,void 0,void 0,function(){var a,s;return rp(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=Dx(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function cn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function $p(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(ae(r,function(i){return cn(r,t,function(){return r.next(i)},e)},function(){return cn(r,t,function(){return r.complete()},e)},function(i){return cn(r,t,function(){return r.error(i)},e)}))})}function Sp(t,e){return e===void 0&&(e=0),fe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Vx(t,e){return he(t).pipe(Sp(e),$p(e))}function Zx(t,e){return he(t).pipe(Sp(e),$p(e))}function Kx(t,e){return new ht(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Qx(t,e){return new ht(function(n){var r;return cn(n,e,function(){r=t[bp](),cn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return yt(r==null?void 0:r.return)&&r.return()}})}function Ap(t,e){if(!t)throw new Error("Iterable cannot be null");return new ht(function(n){cn(n,e,function(){var r=t[Symbol.asyncIterator]();cn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Jx(t,e){return Ap(xp(t),e)}function t_(t,e){if(t!=null){if(gp(t))return Vx(t,e);if(Bu(t))return Kx(t,e);if(dp(t))return Zx(t,e);if(mp(t))return Ap(t,e);if(vp(t))return Qx(t,e);if(_p(t))return Jx(t,e)}throw yp(t)}function zo(t,e){return e?t_(t,e):he(t)}function Yu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t);return zo(t,n)}var Mp=ku(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function U(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(r,function(o){r.next(t.call(e,o,i++))}))})}var e_=Array.isArray;function n_(t,e){return e_(e)?t.apply(void 0,ui([],fr(e))):t(e)}function Dp(t){return U(function(e){return n_(t,e)})}var r_=Array.isArray,i_=Object.getPrototypeOf,o_=Object.prototype,a_=Object.keys;function s_(t){if(t.length===1){var e=t[0];if(r_(e))return{args:e,keys:null};if(u_(e)){var n=a_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function u_(t){return t&&typeof t=="object"&&i_(t)===o_}function c_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function B(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t),r=Ox(t),i=s_(t),o=i.args,a=i.keys;if(o.length===0)return zo([],n);var s=new ht(l_(o,n,a?function(u){return c_(a,u)}:pr));return r?s.pipe(Dp(r)):s}function l_(t,e,n){return n===void 0&&(n=pr),function(r){Pp(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){Pp(e,function(){var h=zo(t[l],e),f=!1;h.subscribe(ae(r,function(p){o[l]=p,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}}function Pp(t,e,n){t?cn(n,t,e):e()}function f_(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},p=function(g){return c<r?d(g):u.push(g)},d=function(g){c++;var m=!1;he(n(g,l++)).subscribe(ae(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||d(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(ae(e,p,function(){h=!0,f()})),function(){}}function Hu(t,e,n){return n===void 0&&(n=1/0),yt(e)?Hu(function(r,i){return U(function(o,a){return e(r,o,i,a)})(he(t(r,i)))},n):(typeof e=="number"&&(n=e),fe(function(r,i){return f_(r,i,t,n)}))}function h_(t){return t===void 0&&(t=1/0),Hu(pr,t)}function p_(t){return new ht(function(e){he(t()).subscribe(e)})}var d_=["addListener","removeListener"],g_=["addEventListener","removeEventListener"],m_=["on","off"];function Wu(t,e,n,r){if(yt(n)&&(r=n,n=void 0),r)return Wu(t,e,n).pipe(Dp(r));var i=fr(v_(t)?g_.map(function(s){return function(u){return t[s](e,u,n)}}):y_(t)?d_.map(Tp(t,e)):b_(t)?m_.map(Tp(t,e)):[],2),o=i[0],a=i[1];if(!o&&Bu(t))return Hu(function(s){return Wu(s,e,n)})(he(t));if(!o)throw new TypeError("Invalid event target");return new ht(function(s){var u=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return s.next(1<c.length?c:c[0])};return o(u),function(){return a(u)}})}function Tp(t,e){return function(n){return function(r){return t[n](e,r)}}}function y_(t){return yt(t.addListener)&&yt(t.removeListener)}function b_(t){return yt(t.on)&&yt(t.off)}function v_(t){return yt(t.addEventListener)&&yt(t.removeEventListener)}function Lp(t,e,n){return p_(function(){return t()?e:n})}function qu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t),r=Ux(t,1/0),i=t;return i.length?i.length===1?he(i[0]):h_(r)(zo(i,n)):pp}function li(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function x_(t){return fe(function(e,n){var r=!1;e.subscribe(ae(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function __(t){return t<=0?function(){return pp}:fe(function(e,n){var r=0;e.subscribe(ae(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function it(t,e){return e===void 0&&(e=pr),t=t??w_,fe(function(n,r){var i,o=!0;n.subscribe(ae(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function w_(t,e){return t===e}function $_(t){return t===void 0&&(t=S_),fe(function(e,n){var r=!1;e.subscribe(ae(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function S_(){return new Mp}function A_(t,e){var n=arguments.length>=2;return function(r){return r.pipe(pr,__(1),n?x_(e):$_(function(){return new Mp}))}}function M_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new ot}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,d=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return fe(function(v,b){p++,!g&&!d&&m();var $=f=f??n();b.add(function(){p--,p===0&&!g&&!d&&(h=ju(x,u))}),$.subscribe(b),!l&&p>0&&(l=new ci({next:function(_){return $.next(_)},error:function(_){g=!0,m(),h=ju(y,i,_),$.error(_)},complete:function(){d=!0,m(),h=ju(y,a),$.complete()}}),he(v).subscribe(l))})(c)}}function ju(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new ci({next:function(){i.unsubscribe(),t()}});return he(e.apply(void 0,ui([],fr(n)))).subscribe(i)}}function Dt(t,e,n){var r,i=!1;return r=t,M_({connector:function(){return new Gx(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Y(t,e){return fe(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(ae(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;he(t(u,l)).subscribe(i=ae(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function G(t){return fe(function(e,n){he(t).subscribe(ae(n,function(){return n.complete()},Nu)),!n.closed&&e.subscribe(n)})}const dr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Oo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function D_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Cp(t){let e,n,r;t.length!==2?(e=Oo,n=(s,u)=>Oo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Oo||t===D_?t:P_,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function P_(){return 0}function T_(t){return t===null?NaN:+t}const L_=Cp(Oo),Ep=L_.right;Cp(T_).center;class kp extends Map{constructor(e,n=k_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Rp(this,e))}has(e){return super.has(Rp(this,e))}set(e,n){return super.set(C_(this,e),n)}delete(e){return super.delete(E_(this,e))}}function Rp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function C_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function E_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function k_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const R_=Math.sqrt(50),I_=Math.sqrt(10),N_=Math.sqrt(2);function Uo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=R_?10:o>=I_?5:o>=N_?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?Uo(t,e,n*2):[s,u,c]}function F_(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Uo(e,t,n):Uo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Xu(t,e,n){return e=+e,t=+t,n=+n,Uo(t,e,n)[2]}function G_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Xu(e,t,n):Xu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function z_(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var O_={value:()=>{}};function Ip(){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 Bo(n)}function Bo(t){this._=t}function U_(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}})}Bo.prototype=Ip.prototype={constructor:Bo,on:function(t,e){var n=this._,r=U_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=B_(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Np(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Np(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 Bo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[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,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function B_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Np(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=O_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Vu="http://www.w3.org/1999/xhtml";const Fp={svg:"http://www.w3.org/2000/svg",xhtml:Vu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Fp.hasOwnProperty(e)?{space:Fp[e],local:t}:t}function Y_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vu&&e.documentElement.namespaceURI===Vu?e.createElement(t):e.createElementNS(n,t)}}function H_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Gp(t){var e=Yo(t);return(e.local?H_:Y_)(e)}function W_(){}function Zu(t){return t==null?W_:function(){return this.querySelector(t)}}function q_(t){typeof t!="function"&&(t=Zu(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new xe(r,this._parents)}function j_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function X_(){return[]}function zp(t){return t==null?X_:function(){return this.querySelectorAll(t)}}function V_(t){return function(){return j_(t.apply(this,arguments))}}function Z_(t){typeof t=="function"?t=V_(t):t=zp(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new xe(r,i)}function Op(t){return function(){return this.matches(t)}}function Up(t){return function(e){return e.matches(t)}}var K_=Array.prototype.find;function Q_(t){return function(){return K_.call(this.children,t)}}function J_(){return this.firstElementChild}function tw(t){return this.select(t==null?J_:Q_(typeof t=="function"?t:Up(t)))}var ew=Array.prototype.filter;function nw(){return Array.from(this.children)}function rw(t){return function(){return ew.call(this.children,t)}}function iw(t){return this.selectAll(t==null?nw:rw(typeof t=="function"?t:Up(t)))}function ow(t){typeof t!="function"&&(t=Op(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new xe(r,this._parents)}function Bp(t){return new Array(t.length)}function aw(){return new xe(this._enter||this._groups.map(Bp),this._parents)}function Ho(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ho.prototype={constructor:Ho,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 sw(t){return function(){return t}}function uw(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ho(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function cw(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),p;for(s=0;s<l;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",c.has(p)?i[s]=u:c.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=c.get(p))?(r[s]=u,u.__data__=o[s],c.delete(p)):n[s]=new Ho(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function lw(t){return t.__data__}function fw(t,e){if(!arguments.length)return Array.from(this,lw);var n=e?cw:uw,r=this._parents,i=this._groups;typeof t!="function"&&(t=sw(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,p=hw(t.call(l,l&&l.__data__,c,r)),d=p.length,g=s[c]=new Array(d),m=a[c]=new Array(d),y=u[c]=new Array(f);n(l,h,g,m,y,p,e);for(var x=0,v=0,b,$;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<d;);b._next=$||null}}return a=new xe(a,r),a._enter=s,a._exit=u,a}function hw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function pw(){return new xe(this._exit||this._groups.map(Bp),this._parents)}function dw(t,e,n){var r=this.enter(),i=this,o=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?o.remove():n(o),r&&i?r.merge(i).order():i}function gw(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),p,d=0;d<h;++d)(p=c[d]||l[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new xe(s,this._parents)}function mw(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function yw(t){t||(t=bw);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),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new xe(i,this._parents).order()}function bw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function vw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function xw(){return Array.from(this)}function _w(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function ww(){let t=0;for(const e of this)++t;return t}function $w(){return!this.node()}function Sw(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function Aw(t){return function(){this.removeAttribute(t)}}function Mw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Dw(t,e){return function(){this.setAttribute(t,e)}}function Pw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Tw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Lw(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 Cw(t,e){var n=Yo(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?Mw:Aw:typeof e=="function"?n.local?Lw:Tw:n.local?Pw:Dw)(n,e))}function Yp(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ew(t){return function(){this.style.removeProperty(t)}}function kw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Rw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Iw(t,e,n){return arguments.length>1?this.each((e==null?Ew:typeof e=="function"?Rw:kw)(t,e,n??"")):gr(this.node(),t)}function gr(t,e){return t.style.getPropertyValue(e)||Yp(t).getComputedStyle(t,null).getPropertyValue(e)}function Nw(t){return function(){delete this[t]}}function Fw(t,e){return function(){this[t]=e}}function Gw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function zw(t,e){return arguments.length>1?this.each((e==null?Nw:typeof e=="function"?Gw:Fw)(t,e)):this.node()[t]}function Hp(t){return t.trim().split(/^|\s+/)}function Ku(t){return t.classList||new Wp(t)}function Wp(t){this._node=t,this._names=Hp(t.getAttribute("class")||"")}Wp.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 qp(t,e){for(var n=Ku(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function jp(t,e){for(var n=Ku(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ow(t){return function(){qp(this,t)}}function Uw(t){return function(){jp(this,t)}}function Bw(t,e){return function(){(e.apply(this,arguments)?qp:jp)(this,t)}}function Yw(t,e){var n=Hp(t+"");if(arguments.length<2){for(var r=Ku(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Bw:e?Ow:Uw)(n,e))}function Hw(){this.textContent=""}function Ww(t){return function(){this.textContent=t}}function qw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function jw(t){return arguments.length?this.each(t==null?Hw:(typeof t=="function"?qw:Ww)(t)):this.node().textContent}function Xw(){this.innerHTML=""}function Vw(t){return function(){this.innerHTML=t}}function Zw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Kw(t){return arguments.length?this.each(t==null?Xw:(typeof t=="function"?Zw:Vw)(t)):this.node().innerHTML}function Qw(){this.nextSibling&&this.parentNode.appendChild(this)}function Jw(){return this.each(Qw)}function t$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function e$(){return this.each(t$)}function n$(t){var e=typeof t=="function"?t:Gp(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function r$(){return null}function i$(t,e){var n=typeof t=="function"?t:Gp(t),r=e==null?r$:typeof e=="function"?e:Zu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function o$(){var t=this.parentNode;t&&t.removeChild(this)}function a$(){return this.each(o$)}function s$(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function u$(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function c$(t){return this.select(t?u$:s$)}function l$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function f$(t){return function(e){t.call(this,e,this.__data__)}}function h$(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 p$(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function d$(t,e,n){return function(){var r=this.__on,i,o=f$(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function g$(t,e,n){var r=h$(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?d$:p$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Xp(t,e,n){var r=Yp(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 m$(t,e){return function(){return Xp(this,t,e)}}function y$(t,e){return function(){return Xp(this,t,e.apply(this,arguments))}}function b$(t,e){return this.each((typeof e=="function"?y$:m$)(t,e))}function*v$(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var x$=[null];function xe(t,e){this._groups=t,this._parents=e}function fi(){return new xe([[document.documentElement]],x$)}function _$(){return this}xe.prototype=fi.prototype={constructor:xe,select:q_,selectAll:Z_,selectChild:tw,selectChildren:iw,filter:ow,data:fw,enter:aw,exit:pw,join:dw,merge:gw,selection:_$,order:mw,sort:yw,call:vw,nodes:xw,node:_w,size:ww,empty:$w,each:Sw,attr:Cw,style:Iw,property:zw,classed:Yw,text:jw,html:Kw,raise:Jw,lower:e$,append:n$,insert:i$,remove:a$,clone:c$,datum:l$,on:g$,dispatch:b$,[Symbol.iterator]:v$};function Qu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Vp(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function hi(){}var pi=.7,Wo=1/pi,mr="\\s*([+-]?\\d+)\\s*",di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ce="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",w$=/^#([0-9a-f]{3,8})$/,$$=new RegExp(`^rgb\\(${mr},${mr},${mr}\\)$`),S$=new RegExp(`^rgb\\(${Ce},${Ce},${Ce}\\)$`),A$=new RegExp(`^rgba\\(${mr},${mr},${mr},${di}\\)$`),M$=new RegExp(`^rgba\\(${Ce},${Ce},${Ce},${di}\\)$`),D$=new RegExp(`^hsl\\(${di},${Ce},${Ce}\\)$`),P$=new RegExp(`^hsla\\(${di},${Ce},${Ce},${di}\\)$`),Zp={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};Qu(hi,Dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Kp,formatHex:Kp,formatHex8:T$,formatHsl:L$,formatRgb:Qp,toString:Qp});function Kp(){return this.rgb().formatHex()}function T$(){return this.rgb().formatHex8()}function L$(){return rd(this).formatHsl()}function Qp(){return this.rgb().formatRgb()}function Dn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=w$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Jp(e):n===3?new ne(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?qo(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=$$.exec(t))?new ne(e[1],e[2],e[3],1):(e=S$.exec(t))?new ne(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=A$.exec(t))?qo(e[1],e[2],e[3],e[4]):(e=M$.exec(t))?qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=D$.exec(t))?nd(e[1],e[2]/100,e[3]/100,1):(e=P$.exec(t))?nd(e[1],e[2]/100,e[3]/100,e[4]):Zp.hasOwnProperty(t)?Jp(Zp[t]):t==="transparent"?new ne(NaN,NaN,NaN,0):null}function Jp(t){return new ne(t>>16&255,t>>8&255,t&255,1)}function qo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ne(t,e,n,r)}function C$(t){return t instanceof hi||(t=Dn(t)),t?(t=t.rgb(),new ne(t.r,t.g,t.b,t.opacity)):new ne}function Ju(t,e,n,r){return arguments.length===1?C$(t):new ne(t,e,n,r??1)}function ne(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Qu(ne,Ju,Vp(hi,{brighter(t){return t=t==null?Wo:Math.pow(Wo,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?pi:Math.pow(pi,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ne(Pn(this.r),Pn(this.g),Pn(this.b),jo(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:td,formatHex:td,formatHex8:E$,formatRgb:ed,toString:ed}));function td(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}`}function E$(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}${Tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function ed(){const t=jo(this.opacity);return`${t===1?"rgb(":"rgba("}${Pn(this.r)}, ${Pn(this.g)}, ${Pn(this.b)}${t===1?")":`, ${t})`}`}function jo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Pn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Tn(t){return t=Pn(t),(t<16?"0":"")+t.toString(16)}function nd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _e(t,e,n,r)}function rd(t){if(t instanceof _e)return new _e(t.h,t.s,t.l,t.opacity);if(t instanceof hi||(t=Dn(t)),!t)return new _e;if(t instanceof _e)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new _e(a,s,u,t.opacity)}function k$(t,e,n,r){return arguments.length===1?rd(t):new _e(t,e,n,r??1)}function _e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Qu(_e,k$,Vp(hi,{brighter(t){return t=t==null?Wo:Math.pow(Wo,t),new _e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?pi:Math.pow(pi,t),new _e(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 ne(tc(t>=240?t-240:t+120,i,r),tc(t,i,r),tc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new _e(id(this.h),Xo(this.s),Xo(this.l),jo(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=jo(this.opacity);return`${t===1?"hsl(":"hsla("}${id(this.h)}, ${Xo(this.s)*100}%, ${Xo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function id(t){return t=(t||0)%360,t<0?t+360:t}function Xo(t){return Math.max(0,Math.min(1,t||0))}function tc(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 ec=t=>()=>t;function R$(t,e){return function(n){return t+n*e}}function I$(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 N$(t){return(t=+t)==1?od:function(e,n){return n-e?I$(e,n,t):ec(isNaN(e)?n:e)}}function od(t,e){var n=e-t;return n?R$(t,n):ec(isNaN(t)?e:t)}const Vo=function t(e){var n=N$(e);function r(i,o){var a=n((i=Ju(i)).r,(o=Ju(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=od(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function F$(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function G$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function z$(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=ic(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function O$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function we(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function U$(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]=ic(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var nc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rc=new RegExp(nc.source,"g");function B$(t){return function(){return t}}function Y$(t){return function(e){return t(e)+""}}function ad(t,e){var n=nc.lastIndex=rc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=nc.exec(t))&&(i=rc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:we(r,i)})),n=rc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?Y$(u[0].x):B$(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function ic(t,e){var n=typeof e,r;return e==null||n==="boolean"?ec(e):(n==="number"?we:n==="string"?(r=Dn(e))?(e=r,Vo):ad:e instanceof Dn?Vo:e instanceof Date?O$:G$(e)?F$:Array.isArray(e)?z$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?U$:we)(t,e)}function H$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var sd=180/Math.PI,ud={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cd(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*sd,skewX:Math.atan(u)*sd,scaleX:a,scaleY:s}}var Zo;function W$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ud:cd(e.a,e.b,e.c,e.d,e.e,e.f)}function q$(t){return t==null||(Zo||(Zo=document.createElementNS("http://www.w3.org/2000/svg","g")),Zo.setAttribute("transform",t),!(t=Zo.transform.baseVal.consolidate()))?ud:(t=t.matrix,cd(t.a,t.b,t.c,t.d,t.e,t.f))}function ld(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:we(c,h)},{i:g-2,x:we(l,f)})}else(h||f)&&p.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:we(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:we(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:we(c,h)},{i:g-2,x:we(l,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(p){for(var d=-1,g=f.length,m;++d<g;)h[(m=f[d]).i]=m.x(p);return h.join("")}}}var j$=ld(W$,"px, ","px)","deg)"),X$=ld(q$,", ",")",")"),yr=0,gi=0,mi=0,fd=1e3,Ko,yi,Qo=0,Ln=0,Jo=0,bi=typeof performance=="object"&&performance.now?performance:Date,hd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function oc(){return Ln||(hd(V$),Ln=bi.now()+Jo)}function V$(){Ln=0}function ta(){this._call=this._time=this._next=null}ta.prototype=pd.prototype={constructor:ta,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?oc():+n)+(e==null?0:+e),!this._next&&yi!==this&&(yi?yi._next=this:Ko=this,yi=this),this._call=t,this._time=n,ac()},stop:function(){this._call&&(this._call=null,this._time=1/0,ac())}};function pd(t,e,n){var r=new ta;return r.restart(t,e,n),r}function Z$(){oc(),++yr;for(var t=Ko,e;t;)(e=Ln-t._time)>=0&&t._call.call(void 0,e),t=t._next;--yr}function dd(){Ln=(Qo=bi.now())+Jo,yr=gi=0;try{Z$()}finally{yr=0,Q$(),Ln=0}}function K$(){var t=bi.now(),e=t-Qo;e>fd&&(Jo-=e,Qo=t)}function Q$(){for(var t,e=Ko,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:Ko=n);yi=t,ac(r)}function ac(t){if(!yr){gi&&(gi=clearTimeout(gi));var e=t-Ln;e>24?(t<1/0&&(gi=setTimeout(dd,t-bi.now()-Jo)),mi&&(mi=clearInterval(mi))):(mi||(Qo=bi.now(),mi=setInterval(K$,fd)),yr=1,hd(dd))}}function gd(t,e,n){var r=new ta;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var J$=Ip("start","end","cancel","interrupt"),tS=[],md=0,yd=1,sc=2,ea=3,bd=4,uc=5,na=6;function ra(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;eS(t,n,{name:e,index:r,group:i,on:J$,tween:tS,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:md})}function cc(t,e){var n=$e(t,e);if(n.state>md)throw new Error("too late; already scheduled");return n}function Ee(t,e){var n=$e(t,e);if(n.state>ea)throw new Error("too late; already running");return n}function $e(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function eS(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=pd(o,0,n.time);function o(c){n.state=yd,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,p;if(n.state!==yd)return u();for(l in r)if(p=r[l],p.name===n.name){if(p.state===ea)return gd(a);p.state===bd?(p.state=na,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[l]):+l<e&&(p.state=na,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[l])}if(gd(function(){n.state===ea&&(n.state=bd,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=sc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===sc){for(n.state=ea,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(p=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=uc,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===uc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=na,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function nS(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>sc&&r.state<uc,r.state=na,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function rS(t){return this.each(function(){nS(this,t)})}function iS(t,e){var n,r;return function(){var i=Ee(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function oS(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ee(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function aS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=$e(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?iS:oS)(n,t,e))}function lc(t,e,n){var r=t._id;return t.each(function(){var i=Ee(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return $e(i,r).value[e]}}function vd(t,e){var n;return(typeof e=="number"?we:e instanceof Dn?Vo:(n=Dn(e))?(e=n,Vo):ad)(t,e)}function sS(t){return function(){this.removeAttribute(t)}}function uS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function cS(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function lS(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function fS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function hS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function pS(t,e){var n=Yo(t),r=n==="transform"?X$:vd;return this.attrTween(t,typeof e=="function"?(n.local?hS:fS)(n,r,lc(this,"attr."+t,e)):e==null?(n.local?uS:sS)(n):(n.local?lS:cS)(n,r,e))}function dS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function gS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function mS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&gS(t,o)),n}return i._value=e,i}function yS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&dS(t,o)),n}return i._value=e,i}function bS(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=Yo(t);return this.tween(n,(r.local?mS:yS)(r,e))}function vS(t,e){return function(){cc(this,t).delay=+e.apply(this,arguments)}}function xS(t,e){return e=+e,function(){cc(this,t).delay=e}}function _S(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?vS:xS)(e,t)):$e(this.node(),e).delay}function wS(t,e){return function(){Ee(this,t).duration=+e.apply(this,arguments)}}function $S(t,e){return e=+e,function(){Ee(this,t).duration=e}}function SS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?wS:$S)(e,t)):$e(this.node(),e).duration}function AS(t,e){if(typeof e!="function")throw new Error;return function(){Ee(this,t).ease=e}}function MS(t){var e=this._id;return arguments.length?this.each(AS(e,t)):$e(this.node(),e).ease}function DS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ee(this,t).ease=n}}function PS(t){if(typeof t!="function")throw new Error;return this.each(DS(this._id,t))}function TS(t){typeof t!="function"&&(t=Op(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new We(r,this._parents,this._name,this._id)}function LS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,p=0;p<l;++p)(f=u[p]||c[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new We(a,this._parents,this._name,this._id)}function CS(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 ES(t,e,n){var r,i,o=CS(e)?cc:Ee;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function kS(t,e){var n=this._id;return arguments.length<2?$e(this.node(),n).on.on(t):this.each(ES(n,t,e))}function RS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function IS(){return this.on("end.remove",RS(this._id))}function NS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Zu(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,ra(c[f],e,n,f,c,$e(l,n)));return new We(o,this._parents,e,n)}function FS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=zp(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),p,d=$e(l,n),g=0,m=f.length;g<m;++g)(p=f[g])&&ra(p,e,n,g,f,d);o.push(f),a.push(l)}return new We(o,a,e,n)}var GS=fi.prototype.constructor;function zS(){return new GS(this._groups,this._parents)}function OS(t,e){var n,r,i;return function(){var o=gr(this,t),a=(this.style.removeProperty(t),gr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function xd(t){return function(){this.style.removeProperty(t)}}function US(t,e,n){var r,i=n+"",o;return function(){var a=gr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function BS(t,e,n){var r,i,o;return function(){var a=gr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),gr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function YS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ee(this,t),c=u.on,l=u.value[o]==null?s||(s=xd(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function HS(t,e,n){var r=(t+="")=="transform"?j$:vd;return e==null?this.styleTween(t,OS(t,r)).on("end.style."+t,xd(t)):typeof e=="function"?this.styleTween(t,BS(t,r,lc(this,"style."+t,e))).each(YS(this._id,t)):this.styleTween(t,US(t,r,e),n).on("end.style."+t,null)}function WS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function qS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&WS(t,a,n)),r}return o._value=e,o}function jS(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,qS(t,e,n??""))}function XS(t){return function(){this.textContent=t}}function VS(t){return function(){var e=t(this);this.textContent=e??""}}function ZS(t){return this.tween("text",typeof t=="function"?VS(lc(this,"text",t)):XS(t==null?"":t+""))}function KS(t){return function(e){this.textContent=t.call(this,e)}}function QS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&KS(i)),e}return r._value=t,r}function JS(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,QS(t))}function t3(){for(var t=this._name,e=this._id,n=_d(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=$e(u,e);ra(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new We(r,this._parents,t,n)}function e3(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ee(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var n3=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function _d(){return++n3}var qe=fi.prototype;We.prototype={constructor:We,select:NS,selectAll:FS,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:TS,merge:LS,selection:zS,transition:t3,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:kS,attr:pS,attrTween:bS,style:HS,styleTween:jS,text:ZS,textTween:JS,remove:IS,tween:aS,delay:_S,duration:SS,ease:MS,easeVarying:PS,end:e3,[Symbol.iterator]:qe[Symbol.iterator]};function r3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var i3={time:null,delay:0,duration:250,ease:r3};function o3(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 a3(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=_d(),(n=i3).time=oc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&ra(u,t,e,c,a,n||o3(u,e));return new We(r,this._parents,t,e)}fi.prototype.interrupt=rS,fi.prototype.transition=a3;function s3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ia(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 br(t){return t=ia(Math.abs(t)),t?t[1]:NaN}function u3(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function c3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var l3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function oa(t){if(!(e=l3.exec(t)))throw new Error("invalid format: "+t);var e;return new fc({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]})}oa.prototype=fc.prototype;function fc(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+""}fc.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 f3(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 wd;function h3(t,e){var n=ia(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(wd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ia(t,Math.max(0,e+o-1))[0]}function $d(t,e){var n=ia(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 Sd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:s3,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)=>$d(t*100,e),r:$d,s:h3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ad(t){return t}var Md=Array.prototype.map,Dd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function p3(t){var e=t.grouping===void 0||t.thousands===void 0?Ad:u3(Md.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+"",o=t.numerals===void 0?Ad:c3(Md.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=oa(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):Sd[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",D=g==="$"?r:/[%p]/.test($)?a:"",T=Sd[$],w=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function P(S){var z=_,k=D,A,L,M;if($==="c")k=T(S)+k,S="";else{S=+S;var F=S<0||1/S<0;if(S=isNaN(S)?u:T(Math.abs(S),v),b&&(S=f3(S)),F&&+S==0&&d!=="+"&&(F=!1),z=(F?d==="("?d:s:d==="-"||d==="("?"":d)+z,k=($==="s"?Dd[8+wd/3]:"")+k+(F&&d==="("?")":""),w){for(A=-1,L=S.length;++A<L;)if(M=S.charCodeAt(A),48>M||M>57){k=(M===46?i+S.slice(A+1):S.slice(A))+k,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var O=z.length+S.length+k.length,E=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-k.length:1/0),E=""),p){case"<":S=z+S+k+E;break;case"=":S=z+E+S+k;break;case"^":S=E.slice(0,O=E.length>>1)+z+S+k+E.slice(O);break;default:S=E+z+S+k;break}return o(S)}return P.toString=function(){return h+""},P}function l(h,f){var p=c((h=oa(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(br(f)/3)))*3,g=Math.pow(10,-d),m=Dd[8+d/3];return function(y){return p(g*y)+m}}return{format:c,formatPrefix:l}}var aa,Pd,Td;d3({thousands:",",grouping:[3],currency:["$",""]});function d3(t){return aa=p3(t),Pd=aa.format,Td=aa.formatPrefix,aa}function g3(t){return Math.max(0,-br(Math.abs(t)))}function m3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(br(e)/3)))*3-br(Math.abs(t)))}function y3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,br(e)-br(t))+1}function sa(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Ld=Symbol("implicit");function Cd(){var t=new kp,e=[],n=[],r=Ld;function i(o){let a=t.get(o);if(a===void 0){if(r!==Ld)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new kp;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Cd(e,n).unknown(r)},sa.apply(i,arguments),i}function Ed(){var t=Cd().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*l,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=z_(f).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Ed(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},sa.apply(h(),arguments)}function kd(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return kd(e())},t}function b3(){return kd(Ed.apply(null,arguments).paddingInner(1))}function v3(t){return function(){return t}}function x3(t){return+t}var Rd=[0,1];function vr(t){return t}function hc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:v3(isNaN(e)?NaN:.5)}function _3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function w3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=hc(i,r),o=n(a,o)):(r=hc(r,i),o=n(o,a)),function(s){return o(r(s))}}function $3(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=hc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Ep(t,s,1,r)-1;return o[u](i[u](s))}}function S3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function A3(){var t=Rd,e=Rd,n=ic,r,i,o,a=vr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==vr&&(a=_3(t[0],t[f-1])),s=f>2?$3:w3,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),we)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,x3),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=H$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:vr,l()):a!==vr},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,l()}}function M3(){return A3()(vr,vr)}function D3(t,e,n,r){var i=G_(t,e,n),o;switch(r=oa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=m3(i,a))&&(r.precision=o),Td(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=y3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=g3(i))&&(r.precision=o-(r.type==="%")*2);break}}return Pd(r)}function Id(t){var e=t.domain;return t.ticks=function(n){var r=e();return F_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return D3(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=Xu(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function Nd(){var t=M3();return t.copy=function(){return S3(t,Nd())},sa.apply(t,arguments),Id(t)}function Fd(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Ep(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Fd().domain([t,e]).range(i).unknown(o)},sa.apply(Id(a),arguments)}function vi(t,e,n){this.k=t,this.x=e,this.y=n}vi.prototype={constructor:vi,scale:function(t){return t===1?this:new vi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new vi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},vi.prototype;function ua(t){return Object.prototype.toString.call(t)==="[object Object]"}function pc(t,e){if(ua(t)===!1||ua(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;ua(r[a])&&ua(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var dc=function(t,e){return dc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},dc(t,e)};function je(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");dc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function P3(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,[])).next())})}function Gd(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function xr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function xi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function _i(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function _r(t){return this instanceof _r?(this.v=t,this):new _r(t)}function T3(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,y){o.push([p,g,m,y])>1||u(p,g)})},d&&(i[p]=d(i[p])))}function u(p,d){try{c(r[p](d))}catch(g){f(o[0][3],g)}}function c(p){p.value instanceof _r?Promise.resolve(p.value.v).then(l,h):f(o[0][2],p)}function l(p){u("next",p)}function h(p){u("throw",p)}function f(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function L3(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof xr=="function"?xr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Tt(t){return typeof t=="function"}function gc(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var mc=gc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function ku(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Ro=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=sr(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(yt(l))try{l()}catch(g){o=g instanceof Eu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=sr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{ip(d)}catch(g){o=o??[],g instanceof Eu?o=ii(ii([],ur(o)),ur(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Eu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ip(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&ku(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ku(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),np=Ro.EMPTY;function rp(t){return t instanceof Ro||t&&"closed"in t&&yt(t.remove)&&yt(t.add)&&yt(t.unsubscribe)}function ip(t){yt(t)?t():t.unsubscribe()}var op={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ap={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ii([t,e],ur(n)))},clearTimeout:function(t){var e=ap.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function sp(t){ap.setTimeout(function(){throw t})}function Ru(){}function Io(t){t()}var Iu=function(t){ar(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,rp(n)&&n.add(r)):r.destination=mx,r}return e.create=function(n,r,i){return new oi(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Ro),px=Function.prototype.bind;function Nu(t,e){return px.call(t,e)}var dx=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){No(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){No(r)}else No(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){No(n)}},t}(),oi=function(t){ar(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(yt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&op.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Nu(n.next,s),error:n.error&&Nu(n.error,s),complete:n.complete&&Nu(n.complete,s)}):a=n}return o.destination=new dx(a),o}return e}(Iu);function No(t){sp(t)}function gx(t){throw t}var mx={closed:!0,next:Ru,error:gx,complete:Ru},Fu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function lr(t){return t}function yx(t){return t.length===0?lr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var ht=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=vx(e)?e:new oi(e,n,r);return Io(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=up(n),new n(function(i,o){var a=new oi({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Fu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return yx(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=up(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function up(t){var e;return(e=t??op.Promise)!==null&&e!==void 0?e:Promise}function bx(t){return t&&yt(t.next)&&yt(t.error)&&yt(t.complete)}function vx(t){return t&&t instanceof Iu||bx(t)&&rp(t)}function xx(t){return yt(t==null?void 0:t.lift)}function fe(t){return function(e){if(xx(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function ae(t,e,n,r,i){return new _x(t,e,n,r,i)}var _x=function(t){ar(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Iu),wx=Cu(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ot=function(t){ar(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new cp(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new wx},e.prototype.next=function(n){var r=this;Io(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=sr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Io(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Io(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?np:(this.currentObservers=null,s.push(n),new Ro(function(){r.currentObservers=null,ku(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new ht;return n.source=this,n},e.create=function(n,r){return new cp(n,r)},e}(ht),cp=function(t){ar(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:np},e}(ot),lp={now:function(){return(lp.delegate||Date).now()},delegate:void 0},$x=function(t){ar(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=lp);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(ot),fp=new ht(function(t){return t.complete()});function Sx(t){return t&&yt(t.schedule)}function Gu(t){return t[t.length-1]}function Ax(t){return yt(Gu(t))?t.pop():void 0}function zu(t){return Sx(Gu(t))?t.pop():void 0}function Mx(t,e){return typeof Gu(t)=="number"?t.pop():e}var Ou=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function hp(t){return yt(t==null?void 0:t.then)}function pp(t){return yt(t[Fu])}function dp(t){return Symbol.asyncIterator&&yt(t==null?void 0:t[Symbol.asyncIterator])}function gp(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Dx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var mp=Dx();function yp(t){return yt(t==null?void 0:t[mp])}function bp(t){return fx(this,arguments,function(){var n,r,i,o;return ep(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,cr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,cr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,cr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function vp(t){return yt(t==null?void 0:t.getReader)}function he(t){if(t instanceof ht)return t;if(t!=null){if(pp(t))return Px(t);if(Ou(t))return Tx(t);if(hp(t))return Lx(t);if(dp(t))return xp(t);if(yp(t))return Cx(t);if(vp(t))return Ex(t)}throw gp(t)}function Px(t){return new ht(function(e){var n=t[Fu]();if(yt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Tx(t){return new ht(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Lx(t){return new ht(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,sp)})}function Cx(t){return new ht(function(e){var n,r;try{for(var i=sr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function xp(t){return new ht(function(e){kx(t,e).catch(function(n){return e.error(n)})})}function Ex(t){return xp(bp(t))}function kx(t,e){var n,r,i,o;return lx(this,void 0,void 0,function(){var a,s;return ep(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=hx(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function un(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function _p(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(ae(r,function(i){return un(r,t,function(){return r.next(i)},e)},function(){return un(r,t,function(){return r.complete()},e)},function(i){return un(r,t,function(){return r.error(i)},e)}))})}function wp(t,e){return e===void 0&&(e=0),fe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Rx(t,e){return he(t).pipe(wp(e),_p(e))}function Ix(t,e){return he(t).pipe(wp(e),_p(e))}function Nx(t,e){return new ht(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Fx(t,e){return new ht(function(n){var r;return un(n,e,function(){r=t[mp](),un(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return yt(r==null?void 0:r.return)&&r.return()}})}function $p(t,e){if(!t)throw new Error("Iterable cannot be null");return new ht(function(n){un(n,e,function(){var r=t[Symbol.asyncIterator]();un(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Gx(t,e){return $p(bp(t),e)}function zx(t,e){if(t!=null){if(pp(t))return Rx(t,e);if(Ou(t))return Nx(t,e);if(hp(t))return Ix(t,e);if(dp(t))return $p(t,e);if(yp(t))return Fx(t,e);if(vp(t))return Gx(t,e)}throw gp(t)}function Fo(t,e){return e?zx(t,e):he(t)}function Uu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=zu(t);return Fo(t,n)}var Sp=Cu(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function U(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(r,function(o){r.next(t.call(e,o,i++))}))})}var Ox=Array.isArray;function Ux(t,e){return Ox(e)?t.apply(void 0,ii([],ur(e))):t(e)}function Ap(t){return U(function(e){return Ux(t,e)})}var Bx=Array.isArray,Yx=Object.getPrototypeOf,Hx=Object.prototype,Wx=Object.keys;function qx(t){if(t.length===1){var e=t[0];if(Bx(e))return{args:e,keys:null};if(jx(e)){var n=Wx(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function jx(t){return t&&typeof t=="object"&&Yx(t)===Hx}function Xx(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function B(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=zu(t),r=Ax(t),i=qx(t),o=i.args,a=i.keys;if(o.length===0)return Fo([],n);var s=new ht(Vx(o,n,a?function(u){return Xx(a,u)}:lr));return r?s.pipe(Ap(r)):s}function Vx(t,e,n){return n===void 0&&(n=lr),function(r){Mp(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){Mp(e,function(){var h=Fo(t[l],e),f=!1;h.subscribe(ae(r,function(p){o[l]=p,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}}function Mp(t,e,n){t?un(n,t,e):e()}function Zx(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},p=function(g){return c<r?d(g):u.push(g)},d=function(g){c++;var m=!1;he(n(g,l++)).subscribe(ae(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||d(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(ae(e,p,function(){h=!0,f()})),function(){}}function Bu(t,e,n){return n===void 0&&(n=1/0),yt(e)?Bu(function(r,i){return U(function(o,a){return e(r,o,i,a)})(he(t(r,i)))},n):(typeof e=="number"&&(n=e),fe(function(r,i){return Zx(r,i,t,n)}))}function Kx(t){return t===void 0&&(t=1/0),Bu(lr,t)}function Qx(t){return new ht(function(e){he(t()).subscribe(e)})}var Jx=["addListener","removeListener"],t_=["addEventListener","removeEventListener"],e_=["on","off"];function Yu(t,e,n,r){if(yt(n)&&(r=n,n=void 0),r)return Yu(t,e,n).pipe(Ap(r));var i=ur(i_(t)?t_.map(function(s){return function(u){return t[s](e,u,n)}}):n_(t)?Jx.map(Dp(t,e)):r_(t)?e_.map(Dp(t,e)):[],2),o=i[0],a=i[1];if(!o&&Ou(t))return Bu(function(s){return Yu(s,e,n)})(he(t));if(!o)throw new TypeError("Invalid event target");return new ht(function(s){var u=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return s.next(1<c.length?c:c[0])};return o(u),function(){return a(u)}})}function Dp(t,e){return function(n){return function(r){return t[n](e,r)}}}function n_(t){return yt(t.addListener)&&yt(t.removeListener)}function r_(t){return yt(t.on)&&yt(t.off)}function i_(t){return yt(t.addEventListener)&&yt(t.removeEventListener)}function Pp(t,e,n){return Qx(function(){return t()?e:n})}function Hu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=zu(t),r=Mx(t,1/0),i=t;return i.length?i.length===1?he(i[0]):Kx(r)(Fo(i,n)):fp}function ai(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function o_(t){return fe(function(e,n){var r=!1;e.subscribe(ae(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function a_(t){return t<=0?function(){return fp}:fe(function(e,n){var r=0;e.subscribe(ae(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function it(t,e){return e===void 0&&(e=lr),t=t??s_,fe(function(n,r){var i,o=!0;n.subscribe(ae(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function s_(t,e){return t===e}function u_(t){return t===void 0&&(t=c_),fe(function(e,n){var r=!1;e.subscribe(ae(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function c_(){return new Sp}function l_(t,e){var n=arguments.length>=2;return function(r){return r.pipe(lr,a_(1),n?o_(e):u_(function(){return new Sp}))}}function f_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new ot}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,d=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return fe(function(v,b){p++,!g&&!d&&m();var $=f=f??n();b.add(function(){p--,p===0&&!g&&!d&&(h=Wu(x,u))}),$.subscribe(b),!l&&p>0&&(l=new oi({next:function(_){return $.next(_)},error:function(_){g=!0,m(),h=Wu(y,i,_),$.error(_)},complete:function(){d=!0,m(),h=Wu(y,a),$.complete()}}),he(v).subscribe(l))})(c)}}function Wu(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new oi({next:function(){i.unsubscribe(),t()}});return he(e.apply(void 0,ii([],ur(n)))).subscribe(i)}}function St(t,e,n){var r,i=!1;return r=t,f_({connector:function(){return new $x(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Y(t,e){return fe(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(ae(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;he(t(u,l)).subscribe(i=ae(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function G(t){return fe(function(e,n){he(t).subscribe(ae(n,function(){return n.complete()},Ru)),!n.closed&&e.subscribe(n)})}const fr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Go(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function h_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Tp(t){let e,n,r;t.length!==2?(e=Go,n=(s,u)=>Go(t(s),u),r=(s,u)=>t(s)-u):(e=t===Go||t===h_?t:p_,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function p_(){return 0}function d_(t){return t===null?NaN:+t}const g_=Tp(Go),Lp=g_.right;Tp(d_).center;class Cp extends Map{constructor(e,n=b_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Ep(this,e))}has(e){return super.has(Ep(this,e))}set(e,n){return super.set(m_(this,e),n)}delete(e){return super.delete(y_(this,e))}}function Ep({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function m_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function y_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function b_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const v_=Math.sqrt(50),x_=Math.sqrt(10),__=Math.sqrt(2);function zo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=v_?10:o>=x_?5:o>=__?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?zo(t,e,n*2):[s,u,c]}function w_(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?zo(e,t,n):zo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function qu(t,e,n){return e=+e,t=+t,n=+n,zo(t,e,n)[2]}function $_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?qu(e,t,n):qu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function S_(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var A_={value:()=>{}};function kp(){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 Oo(n)}function Oo(t){this._=t}function M_(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}})}Oo.prototype=kp.prototype={constructor:Oo,on:function(t,e){var n=this._,r=M_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=D_(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Rp(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Rp(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 Oo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[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,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function D_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Rp(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=A_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var ju="http://www.w3.org/1999/xhtml";const Ip={svg:"http://www.w3.org/2000/svg",xhtml:ju,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Uo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ip.hasOwnProperty(e)?{space:Ip[e],local:t}:t}function P_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ju&&e.documentElement.namespaceURI===ju?e.createElement(t):e.createElementNS(n,t)}}function T_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Np(t){var e=Uo(t);return(e.local?T_:P_)(e)}function L_(){}function Xu(t){return t==null?L_:function(){return this.querySelector(t)}}function C_(t){typeof t!="function"&&(t=Xu(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new xe(r,this._parents)}function E_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function k_(){return[]}function Fp(t){return t==null?k_:function(){return this.querySelectorAll(t)}}function R_(t){return function(){return E_(t.apply(this,arguments))}}function I_(t){typeof t=="function"?t=R_(t):t=Fp(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new xe(r,i)}function Gp(t){return function(){return this.matches(t)}}function zp(t){return function(e){return e.matches(t)}}var N_=Array.prototype.find;function F_(t){return function(){return N_.call(this.children,t)}}function G_(){return this.firstElementChild}function z_(t){return this.select(t==null?G_:F_(typeof t=="function"?t:zp(t)))}var O_=Array.prototype.filter;function U_(){return Array.from(this.children)}function B_(t){return function(){return O_.call(this.children,t)}}function Y_(t){return this.selectAll(t==null?U_:B_(typeof t=="function"?t:zp(t)))}function H_(t){typeof t!="function"&&(t=Gp(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new xe(r,this._parents)}function Op(t){return new Array(t.length)}function W_(){return new xe(this._enter||this._groups.map(Op),this._parents)}function Bo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Bo.prototype={constructor:Bo,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 q_(t){return function(){return t}}function j_(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Bo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function X_(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),p;for(s=0;s<l;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",c.has(p)?i[s]=u:c.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=c.get(p))?(r[s]=u,u.__data__=o[s],c.delete(p)):n[s]=new Bo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function V_(t){return t.__data__}function Z_(t,e){if(!arguments.length)return Array.from(this,V_);var n=e?X_:j_,r=this._parents,i=this._groups;typeof t!="function"&&(t=q_(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,p=K_(t.call(l,l&&l.__data__,c,r)),d=p.length,g=s[c]=new Array(d),m=a[c]=new Array(d),y=u[c]=new Array(f);n(l,h,g,m,y,p,e);for(var x=0,v=0,b,$;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<d;);b._next=$||null}}return a=new xe(a,r),a._enter=s,a._exit=u,a}function K_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Q_(){return new xe(this._exit||this._groups.map(Op),this._parents)}function J_(t,e,n){var r=this.enter(),i=this,o=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?o.remove():n(o),r&&i?r.merge(i).order():i}function tw(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),p,d=0;d<h;++d)(p=c[d]||l[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new xe(s,this._parents)}function ew(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function nw(t){t||(t=rw);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),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new xe(i,this._parents).order()}function rw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function iw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ow(){return Array.from(this)}function aw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function sw(){let t=0;for(const e of this)++t;return t}function uw(){return!this.node()}function cw(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function lw(t){return function(){this.removeAttribute(t)}}function fw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hw(t,e){return function(){this.setAttribute(t,e)}}function pw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function dw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function gw(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 mw(t,e){var n=Uo(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?fw:lw:typeof e=="function"?n.local?gw:dw:n.local?pw:hw)(n,e))}function Up(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function yw(t){return function(){this.style.removeProperty(t)}}function bw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function vw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function xw(t,e,n){return arguments.length>1?this.each((e==null?yw:typeof e=="function"?vw:bw)(t,e,n??"")):hr(this.node(),t)}function hr(t,e){return t.style.getPropertyValue(e)||Up(t).getComputedStyle(t,null).getPropertyValue(e)}function _w(t){return function(){delete this[t]}}function ww(t,e){return function(){this[t]=e}}function $w(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Sw(t,e){return arguments.length>1?this.each((e==null?_w:typeof e=="function"?$w:ww)(t,e)):this.node()[t]}function Bp(t){return t.trim().split(/^|\s+/)}function Vu(t){return t.classList||new Yp(t)}function Yp(t){this._node=t,this._names=Bp(t.getAttribute("class")||"")}Yp.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 Hp(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Wp(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Aw(t){return function(){Hp(this,t)}}function Mw(t){return function(){Wp(this,t)}}function Dw(t,e){return function(){(e.apply(this,arguments)?Hp:Wp)(this,t)}}function Pw(t,e){var n=Bp(t+"");if(arguments.length<2){for(var r=Vu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Dw:e?Aw:Mw)(n,e))}function Tw(){this.textContent=""}function Lw(t){return function(){this.textContent=t}}function Cw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ew(t){return arguments.length?this.each(t==null?Tw:(typeof t=="function"?Cw:Lw)(t)):this.node().textContent}function kw(){this.innerHTML=""}function Rw(t){return function(){this.innerHTML=t}}function Iw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Nw(t){return arguments.length?this.each(t==null?kw:(typeof t=="function"?Iw:Rw)(t)):this.node().innerHTML}function Fw(){this.nextSibling&&this.parentNode.appendChild(this)}function Gw(){return this.each(Fw)}function zw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ow(){return this.each(zw)}function Uw(t){var e=typeof t=="function"?t:Np(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Bw(){return null}function Yw(t,e){var n=typeof t=="function"?t:Np(t),r=e==null?Bw:typeof e=="function"?e:Xu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Hw(){var t=this.parentNode;t&&t.removeChild(this)}function Ww(){return this.each(Hw)}function qw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xw(t){return this.select(t?jw:qw)}function Vw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Zw(t){return function(e){t.call(this,e,this.__data__)}}function Kw(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 Qw(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function Jw(t,e,n){return function(){var r=this.__on,i,o=Zw(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function t$(t,e,n){var r=Kw(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?Jw:Qw,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function qp(t,e,n){var r=Up(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 e$(t,e){return function(){return qp(this,t,e)}}function n$(t,e){return function(){return qp(this,t,e.apply(this,arguments))}}function r$(t,e){return this.each((typeof e=="function"?n$:e$)(t,e))}function*i$(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var o$=[null];function xe(t,e){this._groups=t,this._parents=e}function si(){return new xe([[document.documentElement]],o$)}function a$(){return this}xe.prototype=si.prototype={constructor:xe,select:C_,selectAll:I_,selectChild:z_,selectChildren:Y_,filter:H_,data:Z_,enter:W_,exit:Q_,join:J_,merge:tw,selection:a$,order:ew,sort:nw,call:iw,nodes:ow,node:aw,size:sw,empty:uw,each:cw,attr:mw,style:xw,property:Sw,classed:Pw,text:Ew,html:Nw,raise:Gw,lower:Ow,append:Uw,insert:Yw,remove:Ww,clone:Xw,datum:Vw,on:t$,dispatch:r$,[Symbol.iterator]:i$};function Zu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function jp(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ui(){}var ci=.7,Yo=1/ci,pr="\\s*([+-]?\\d+)\\s*",li="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s$=/^#([0-9a-f]{3,8})$/,u$=new RegExp(`^rgb\\(${pr},${pr},${pr}\\)$`),c$=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),l$=new RegExp(`^rgba\\(${pr},${pr},${pr},${li}\\)$`),f$=new RegExp(`^rgba\\(${Le},${Le},${Le},${li}\\)$`),h$=new RegExp(`^hsl\\(${li},${Le},${Le}\\)$`),p$=new RegExp(`^hsla\\(${li},${Le},${Le},${li}\\)$`),Xp={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};Zu(ui,An,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Vp,formatHex:Vp,formatHex8:d$,formatHsl:g$,formatRgb:Zp,toString:Zp});function Vp(){return this.rgb().formatHex()}function d$(){return this.rgb().formatHex8()}function g$(){return ed(this).formatHsl()}function Zp(){return this.rgb().formatRgb()}function An(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=s$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Kp(e):n===3?new ne(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ho(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ho(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=u$.exec(t))?new ne(e[1],e[2],e[3],1):(e=c$.exec(t))?new ne(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=l$.exec(t))?Ho(e[1],e[2],e[3],e[4]):(e=f$.exec(t))?Ho(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=h$.exec(t))?td(e[1],e[2]/100,e[3]/100,1):(e=p$.exec(t))?td(e[1],e[2]/100,e[3]/100,e[4]):Xp.hasOwnProperty(t)?Kp(Xp[t]):t==="transparent"?new ne(NaN,NaN,NaN,0):null}function Kp(t){return new ne(t>>16&255,t>>8&255,t&255,1)}function Ho(t,e,n,r){return r<=0&&(t=e=n=NaN),new ne(t,e,n,r)}function m$(t){return t instanceof ui||(t=An(t)),t?(t=t.rgb(),new ne(t.r,t.g,t.b,t.opacity)):new ne}function Ku(t,e,n,r){return arguments.length===1?m$(t):new ne(t,e,n,r??1)}function ne(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Zu(ne,Ku,jp(ui,{brighter(t){return t=t==null?Yo:Math.pow(Yo,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ci:Math.pow(ci,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ne(Mn(this.r),Mn(this.g),Mn(this.b),Wo(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:Qp,formatHex:Qp,formatHex8:y$,formatRgb:Jp,toString:Jp}));function Qp(){return`#${Dn(this.r)}${Dn(this.g)}${Dn(this.b)}`}function y$(){return`#${Dn(this.r)}${Dn(this.g)}${Dn(this.b)}${Dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Jp(){const t=Wo(this.opacity);return`${t===1?"rgb(":"rgba("}${Mn(this.r)}, ${Mn(this.g)}, ${Mn(this.b)}${t===1?")":`, ${t})`}`}function Wo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Mn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Dn(t){return t=Mn(t),(t<16?"0":"")+t.toString(16)}function td(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _e(t,e,n,r)}function ed(t){if(t instanceof _e)return new _e(t.h,t.s,t.l,t.opacity);if(t instanceof ui||(t=An(t)),!t)return new _e;if(t instanceof _e)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new _e(a,s,u,t.opacity)}function b$(t,e,n,r){return arguments.length===1?ed(t):new _e(t,e,n,r??1)}function _e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Zu(_e,b$,jp(ui,{brighter(t){return t=t==null?Yo:Math.pow(Yo,t),new _e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ci:Math.pow(ci,t),new _e(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 ne(Qu(t>=240?t-240:t+120,i,r),Qu(t,i,r),Qu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new _e(nd(this.h),qo(this.s),qo(this.l),Wo(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=Wo(this.opacity);return`${t===1?"hsl(":"hsla("}${nd(this.h)}, ${qo(this.s)*100}%, ${qo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function nd(t){return t=(t||0)%360,t<0?t+360:t}function qo(t){return Math.max(0,Math.min(1,t||0))}function Qu(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 Ju=t=>()=>t;function v$(t,e){return function(n){return t+n*e}}function x$(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 _$(t){return(t=+t)==1?rd:function(e,n){return n-e?x$(e,n,t):Ju(isNaN(e)?n:e)}}function rd(t,e){var n=e-t;return n?v$(t,n):Ju(isNaN(t)?e:t)}const jo=function t(e){var n=_$(e);function r(i,o){var a=n((i=Ku(i)).r,(o=Ku(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=rd(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function w$(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function $$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function S$(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=nc(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function A$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function we(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function M$(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]=nc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var tc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ec=new RegExp(tc.source,"g");function D$(t){return function(){return t}}function P$(t){return function(e){return t(e)+""}}function id(t,e){var n=tc.lastIndex=ec.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=tc.exec(t))&&(i=ec.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:we(r,i)})),n=ec.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?P$(u[0].x):D$(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function nc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ju(e):(n==="number"?we:n==="string"?(r=An(e))?(e=r,jo):id:e instanceof An?jo:e instanceof Date?A$:$$(e)?w$:Array.isArray(e)?S$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?M$:we)(t,e)}function T$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var od=180/Math.PI,ad={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function sd(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*od,skewX:Math.atan(u)*od,scaleX:a,scaleY:s}}var Xo;function L$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ad:sd(e.a,e.b,e.c,e.d,e.e,e.f)}function C$(t){return t==null||(Xo||(Xo=document.createElementNS("http://www.w3.org/2000/svg","g")),Xo.setAttribute("transform",t),!(t=Xo.transform.baseVal.consolidate()))?ad:(t=t.matrix,sd(t.a,t.b,t.c,t.d,t.e,t.f))}function ud(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:we(c,h)},{i:g-2,x:we(l,f)})}else(h||f)&&p.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:we(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:we(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:we(c,h)},{i:g-2,x:we(l,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(p){for(var d=-1,g=f.length,m;++d<g;)h[(m=f[d]).i]=m.x(p);return h.join("")}}}var E$=ud(L$,"px, ","px)","deg)"),k$=ud(C$,", ",")",")"),dr=0,fi=0,hi=0,cd=1e3,Vo,pi,Zo=0,Pn=0,Ko=0,di=typeof performance=="object"&&performance.now?performance:Date,ld=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rc(){return Pn||(ld(R$),Pn=di.now()+Ko)}function R$(){Pn=0}function Qo(){this._call=this._time=this._next=null}Qo.prototype=fd.prototype={constructor:Qo,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rc():+n)+(e==null?0:+e),!this._next&&pi!==this&&(pi?pi._next=this:Vo=this,pi=this),this._call=t,this._time=n,ic()},stop:function(){this._call&&(this._call=null,this._time=1/0,ic())}};function fd(t,e,n){var r=new Qo;return r.restart(t,e,n),r}function I$(){rc(),++dr;for(var t=Vo,e;t;)(e=Pn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--dr}function hd(){Pn=(Zo=di.now())+Ko,dr=fi=0;try{I$()}finally{dr=0,F$(),Pn=0}}function N$(){var t=di.now(),e=t-Zo;e>cd&&(Ko-=e,Zo=t)}function F$(){for(var t,e=Vo,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:Vo=n);pi=t,ic(r)}function ic(t){if(!dr){fi&&(fi=clearTimeout(fi));var e=t-Pn;e>24?(t<1/0&&(fi=setTimeout(hd,t-di.now()-Ko)),hi&&(hi=clearInterval(hi))):(hi||(Zo=di.now(),hi=setInterval(N$,cd)),dr=1,ld(hd))}}function pd(t,e,n){var r=new Qo;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var G$=kp("start","end","cancel","interrupt"),z$=[],dd=0,gd=1,oc=2,Jo=3,md=4,ac=5,ta=6;function ea(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;O$(t,n,{name:e,index:r,group:i,on:G$,tween:z$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:dd})}function sc(t,e){var n=$e(t,e);if(n.state>dd)throw new Error("too late; already scheduled");return n}function Ce(t,e){var n=$e(t,e);if(n.state>Jo)throw new Error("too late; already running");return n}function $e(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function O$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=fd(o,0,n.time);function o(c){n.state=gd,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,p;if(n.state!==gd)return u();for(l in r)if(p=r[l],p.name===n.name){if(p.state===Jo)return pd(a);p.state===md?(p.state=ta,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[l]):+l<e&&(p.state=ta,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[l])}if(pd(function(){n.state===Jo&&(n.state=md,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=oc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===oc){for(n.state=Jo,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(p=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ac,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ac&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ta,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function U$(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>oc&&r.state<ac,r.state=ta,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function B$(t){return this.each(function(){U$(this,t)})}function Y$(t,e){var n,r;return function(){var i=Ce(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function H$(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ce(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function W$(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=$e(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?Y$:H$)(n,t,e))}function uc(t,e,n){var r=t._id;return t.each(function(){var i=Ce(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return $e(i,r).value[e]}}function yd(t,e){var n;return(typeof e=="number"?we:e instanceof An?jo:(n=An(e))?(e=n,jo):id)(t,e)}function q$(t){return function(){this.removeAttribute(t)}}function j$(t){return function(){this.removeAttributeNS(t.space,t.local)}}function X$(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function V$(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function Z$(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function K$(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function Q$(t,e){var n=Uo(t),r=n==="transform"?k$:yd;return this.attrTween(t,typeof e=="function"?(n.local?K$:Z$)(n,r,uc(this,"attr."+t,e)):e==null?(n.local?j$:q$)(n):(n.local?V$:X$)(n,r,e))}function J$(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function tS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function eS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&tS(t,o)),n}return i._value=e,i}function nS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&J$(t,o)),n}return i._value=e,i}function rS(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=Uo(t);return this.tween(n,(r.local?eS:nS)(r,e))}function iS(t,e){return function(){sc(this,t).delay=+e.apply(this,arguments)}}function oS(t,e){return e=+e,function(){sc(this,t).delay=e}}function aS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?iS:oS)(e,t)):$e(this.node(),e).delay}function sS(t,e){return function(){Ce(this,t).duration=+e.apply(this,arguments)}}function uS(t,e){return e=+e,function(){Ce(this,t).duration=e}}function cS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?sS:uS)(e,t)):$e(this.node(),e).duration}function lS(t,e){if(typeof e!="function")throw new Error;return function(){Ce(this,t).ease=e}}function fS(t){var e=this._id;return arguments.length?this.each(lS(e,t)):$e(this.node(),e).ease}function hS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ce(this,t).ease=n}}function pS(t){if(typeof t!="function")throw new Error;return this.each(hS(this._id,t))}function dS(t){typeof t!="function"&&(t=Gp(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new We(r,this._parents,this._name,this._id)}function gS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,p=0;p<l;++p)(f=u[p]||c[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new We(a,this._parents,this._name,this._id)}function mS(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 yS(t,e,n){var r,i,o=mS(e)?sc:Ce;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function bS(t,e){var n=this._id;return arguments.length<2?$e(this.node(),n).on.on(t):this.each(yS(n,t,e))}function vS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function xS(){return this.on("end.remove",vS(this._id))}function _S(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Xu(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,ea(c[f],e,n,f,c,$e(l,n)));return new We(o,this._parents,e,n)}function wS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Fp(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),p,d=$e(l,n),g=0,m=f.length;g<m;++g)(p=f[g])&&ea(p,e,n,g,f,d);o.push(f),a.push(l)}return new We(o,a,e,n)}var $S=si.prototype.constructor;function SS(){return new $S(this._groups,this._parents)}function AS(t,e){var n,r,i;return function(){var o=hr(this,t),a=(this.style.removeProperty(t),hr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function bd(t){return function(){this.style.removeProperty(t)}}function MS(t,e,n){var r,i=n+"",o;return function(){var a=hr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function DS(t,e,n){var r,i,o;return function(){var a=hr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),hr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function PS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ce(this,t),c=u.on,l=u.value[o]==null?s||(s=bd(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function TS(t,e,n){var r=(t+="")=="transform"?E$:yd;return e==null?this.styleTween(t,AS(t,r)).on("end.style."+t,bd(t)):typeof e=="function"?this.styleTween(t,DS(t,r,uc(this,"style."+t,e))).each(PS(this._id,t)):this.styleTween(t,MS(t,r,e),n).on("end.style."+t,null)}function LS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function CS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&LS(t,a,n)),r}return o._value=e,o}function ES(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,CS(t,e,n??""))}function kS(t){return function(){this.textContent=t}}function RS(t){return function(){var e=t(this);this.textContent=e??""}}function IS(t){return this.tween("text",typeof t=="function"?RS(uc(this,"text",t)):kS(t==null?"":t+""))}function NS(t){return function(e){this.textContent=t.call(this,e)}}function FS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&NS(i)),e}return r._value=t,r}function GS(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,FS(t))}function zS(){for(var t=this._name,e=this._id,n=vd(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=$e(u,e);ea(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new We(r,this._parents,t,n)}function OS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ce(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var US=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function vd(){return++US}var qe=si.prototype;We.prototype={constructor:We,select:_S,selectAll:wS,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:dS,merge:gS,selection:SS,transition:zS,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:bS,attr:Q$,attrTween:rS,style:TS,styleTween:ES,text:IS,textTween:GS,remove:xS,tween:W$,delay:aS,duration:cS,ease:fS,easeVarying:pS,end:OS,[Symbol.iterator]:qe[Symbol.iterator]};function BS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var YS={time:null,delay:0,duration:250,ease:BS};function HS(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 WS(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=vd(),(n=YS).time=rc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&ea(u,t,e,c,a,n||HS(u,e));return new We(r,this._parents,t,e)}si.prototype.interrupt=B$,si.prototype.transition=WS;function qS(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function na(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 gr(t){return t=na(Math.abs(t)),t?t[1]:NaN}function jS(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function XS(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var VS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ra(t){if(!(e=VS.exec(t)))throw new Error("invalid format: "+t);var e;return new cc({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]})}ra.prototype=cc.prototype;function cc(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+""}cc.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 ZS(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 xd;function KS(t,e){var n=na(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(xd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+na(t,Math.max(0,e+o-1))[0]}function _d(t,e){var n=na(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 wd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:qS,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)=>_d(t*100,e),r:_d,s:KS,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function $d(t){return t}var Sd=Array.prototype.map,Ad=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function QS(t){var e=t.grouping===void 0||t.thousands===void 0?$d:jS(Sd.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+"",o=t.numerals===void 0?$d:XS(Sd.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=ra(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):wd[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",D=g==="$"?r:/[%p]/.test($)?a:"",T=wd[$],w=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function P(S){var z=_,k=D,A,L,M;if($==="c")k=T(S)+k,S="";else{S=+S;var F=S<0||1/S<0;if(S=isNaN(S)?u:T(Math.abs(S),v),b&&(S=ZS(S)),F&&+S==0&&d!=="+"&&(F=!1),z=(F?d==="("?d:s:d==="-"||d==="("?"":d)+z,k=($==="s"?Ad[8+xd/3]:"")+k+(F&&d==="("?")":""),w){for(A=-1,L=S.length;++A<L;)if(M=S.charCodeAt(A),48>M||M>57){k=(M===46?i+S.slice(A+1):S.slice(A))+k,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var O=z.length+S.length+k.length,E=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-k.length:1/0),E=""),p){case"<":S=z+S+k+E;break;case"=":S=z+E+S+k;break;case"^":S=E.slice(0,O=E.length>>1)+z+S+k+E.slice(O);break;default:S=E+z+S+k;break}return o(S)}return P.toString=function(){return h+""},P}function l(h,f){var p=c((h=ra(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(gr(f)/3)))*3,g=Math.pow(10,-d),m=Ad[8+d/3];return function(y){return p(g*y)+m}}return{format:c,formatPrefix:l}}var ia,Md,Dd;JS({thousands:",",grouping:[3],currency:["$",""]});function JS(t){return ia=QS(t),Md=ia.format,Dd=ia.formatPrefix,ia}function t3(t){return Math.max(0,-gr(Math.abs(t)))}function e3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gr(e)/3)))*3-gr(Math.abs(t)))}function n3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,gr(e)-gr(t))+1}function oa(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Pd=Symbol("implicit");function Td(){var t=new Cp,e=[],n=[],r=Pd;function i(o){let a=t.get(o);if(a===void 0){if(r!==Pd)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Cp;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Td(e,n).unknown(r)},oa.apply(i,arguments),i}function Ld(){var t=Td().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*l,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=S_(f).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Ld(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},oa.apply(h(),arguments)}function Cd(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Cd(e())},t}function r3(){return Cd(Ld.apply(null,arguments).paddingInner(1))}function i3(t){return function(){return t}}function o3(t){return+t}var Ed=[0,1];function mr(t){return t}function lc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:i3(isNaN(e)?NaN:.5)}function a3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function s3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=lc(i,r),o=n(a,o)):(r=lc(r,i),o=n(o,a)),function(s){return o(r(s))}}function u3(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=lc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Lp(t,s,1,r)-1;return o[u](i[u](s))}}function c3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function l3(){var t=Ed,e=Ed,n=nc,r,i,o,a=mr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==mr&&(a=a3(t[0],t[f-1])),s=f>2?u3:s3,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),we)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,o3),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=T$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:mr,l()):a!==mr},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,l()}}function f3(){return l3()(mr,mr)}function h3(t,e,n,r){var i=$_(t,e,n),o;switch(r=ra(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=e3(i,a))&&(r.precision=o),Dd(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=n3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=t3(i))&&(r.precision=o-(r.type==="%")*2);break}}return Md(r)}function kd(t){var e=t.domain;return t.ticks=function(n){var r=e();return w_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return h3(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=qu(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function Rd(){var t=f3();return t.copy=function(){return c3(t,Rd())},oa.apply(t,arguments),kd(t)}function Id(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Lp(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Id().domain([t,e]).range(i).unknown(o)},oa.apply(kd(a),arguments)}function gi(t,e,n){this.k=t,this.x=e,this.y=n}gi.prototype={constructor:gi,scale:function(t){return t===1?this:new gi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new gi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},gi.prototype;function aa(t){return Object.prototype.toString.call(t)==="[object Object]"}function fc(t,e){if(aa(t)===!1||aa(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;aa(r[a])&&aa(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var hc=function(t,e){return hc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},hc(t,e)};function Ee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function p3(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,[])).next())})}function Nd(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function yr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function mi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function yi(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function br(t){return this instanceof br?(this.v=t,this):new br(t)}function d3(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,y){o.push([p,g,m,y])>1||u(p,g)})},d&&(i[p]=d(i[p])))}function u(p,d){try{c(r[p](d))}catch(g){f(o[0][3],g)}}function c(p){p.value instanceof br?Promise.resolve(p.value.v).then(l,h):f(o[0][2],p)}function l(p){u("next",p)}function h(p){u("throw",p)}function f(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function g3(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof yr=="function"?yr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Ft(t){return typeof t=="function"}function pc(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var dc=pc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
|
4
4
|
`+e.map(function(n,r){return r+1+") "+n.toString()}).join(`
|
5
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function ca(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var wi=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=xr(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(Tt(l))try{l()}catch(g){o=g instanceof mc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=xr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{Ud(d)}catch(g){o=o??[],g instanceof mc?o=_i(_i([],xi(o)),xi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new mc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Ud(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&ca(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ca(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),zd=wi.EMPTY;function Od(t){return t instanceof wi||t&&"closed"in t&&Tt(t.remove)&&Tt(t.add)&&Tt(t.unsubscribe)}function Ud(t){Tt(t)?t():t.unsubscribe()}var Bd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},C3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,_i([t,e],xi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Yd(t){C3.setTimeout(function(){throw t})}function yc(){}function la(t){t()}var bc=function(t){je(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Od(n)&&n.add(r)):r.destination=I3,r}return e.create=function(n,r,i){return new $i(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(wi),E3=Function.prototype.bind;function vc(t,e){return E3.call(t,e)}var k3=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){fa(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){fa(r)}else fa(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){fa(n)}},t}(),$i=function(t){je(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Tt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Bd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&vc(n.next,s),error:n.error&&vc(n.error,s),complete:n.complete&&vc(n.complete,s)}):a=n}return o.destination=new k3(a),o}return e}(bc);function fa(t){Yd(t)}function R3(t){throw t}var I3={closed:!0,next:yc,error:R3,complete:yc},xc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function _c(t){return t}function N3(t){return t.length===0?_c:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var Se=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=G3(e)?e:new $i(e,n,r);return la(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Hd(n),new n(function(i,o){var a=new $i({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[xc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return N3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Hd(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Hd(t){var e;return(e=t??Bd.Promise)!==null&&e!==void 0?e:Promise}function F3(t){return t&&Tt(t.next)&&Tt(t.error)&&Tt(t.complete)}function G3(t){return t&&t instanceof bc||F3(t)&&Od(t)}function z3(t){return Tt(t==null?void 0:t.lift)}function ln(t){return function(e){if(z3(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function wr(t,e,n,r,i){return new O3(t,e,n,r,i)}var O3=function(t){je(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(bc),U3=gc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Si=function(t){je(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Wd(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new U3},e.prototype.next=function(n){var r=this;la(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=xr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;la(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;la(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?zd:(this.currentObservers=null,s.push(n),new wi(function(){r.currentObservers=null,ca(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new Se;return n.source=this,n},e.create=function(n,r){return new Wd(n,r)},e}(Se),Wd=function(t){je(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:zd},e}(Si),wc={now:function(){return(wc.delegate||Date).now()},delegate:void 0},B3=function(t){je(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=wc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(Si),Y3=function(t){je(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(wi),qd={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,_i([t,e],xi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},H3=function(t){je(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),qd.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&qd.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ca(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(Y3),jd=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=wc.now,t}(),W3=function(t){je(e,t);function e(n,r){r===void 0&&(r=jd.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(jd);new W3(H3);function q3(t){return t&&Tt(t.schedule)}function j3(t){return t[t.length-1]}function Xd(t){return q3(j3(t))?t.pop():void 0}var Vd=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Zd(t){return Tt(t==null?void 0:t.then)}function Kd(t){return Tt(t[xc])}function Qd(t){return Symbol.asyncIterator&&Tt(t==null?void 0:t[Symbol.asyncIterator])}function Jd(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function X3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var tg=X3();function eg(t){return Tt(t==null?void 0:t[tg])}function ng(t){return T3(this,arguments,function(){var e,n,r,i;return Gd(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,_r(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,_r(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,_r(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function rg(t){return Tt(t==null?void 0:t.getReader)}function fn(t){if(t instanceof Se)return t;if(t!=null){if(Kd(t))return V3(t);if(Vd(t))return Z3(t);if(Zd(t))return K3(t);if(Qd(t))return ig(t);if(eg(t))return Q3(t);if(rg(t))return J3(t)}throw Jd(t)}function V3(t){return new Se(function(e){var n=t[xc]();if(Tt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Z3(t){return new Se(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function K3(t){return new Se(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Yd)})}function Q3(t){return new Se(function(e){var n,r;try{for(var i=xr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function ig(t){return new Se(function(e){tA(t,e).catch(function(n){return e.error(n)})})}function J3(t){return ig(ng(t))}function tA(t,e){var n,r,i,o;return P3(this,void 0,void 0,function(){var a,s;return Gd(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=L3(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Cn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function og(t,e){return e===void 0&&(e=0),ln(function(n,r){n.subscribe(wr(r,function(i){return Cn(r,t,function(){return r.next(i)},e)},function(){return Cn(r,t,function(){return r.complete()},e)},function(i){return Cn(r,t,function(){return r.error(i)},e)}))})}function ag(t,e){return e===void 0&&(e=0),ln(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function eA(t,e){return fn(t).pipe(ag(e),og(e))}function nA(t,e){return fn(t).pipe(ag(e),og(e))}function rA(t,e){return new Se(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function iA(t,e){return new Se(function(n){var r;return Cn(n,e,function(){r=t[tg](),Cn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Tt(r==null?void 0:r.return)&&r.return()}})}function sg(t,e){if(!t)throw new Error("Iterable cannot be null");return new Se(function(n){Cn(n,e,function(){var r=t[Symbol.asyncIterator]();Cn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function oA(t,e){return sg(ng(t),e)}function aA(t,e){if(t!=null){if(Kd(t))return eA(t,e);if(Vd(t))return rA(t,e);if(Zd(t))return nA(t,e);if(Qd(t))return sg(t,e);if(eg(t))return iA(t,e);if(rg(t))return oA(t,e)}throw Jd(t)}function sA(t,e){return e?aA(t,e):fn(t)}gc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function ha(t,e){return ln(function(n,r){var i=0;n.subscribe(wr(r,function(o){r.next(t.call(e,o,i++))}))})}function uA(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},p=function(g){return c<r?d(g):u.push(g)},d=function(g){c++;var m=!1;fn(n(g,l++)).subscribe(wr(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||d(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(wr(e,p,function(){h=!0,f()})),function(){}}function ug(t,e,n){return n===void 0&&(n=1/0),Tt(e)?ug(function(r,i){return ha(function(o,a){return e(r,o,i,a)})(fn(t(r,i)))},n):(typeof e=="number"&&(n=e),ln(function(r,i){return uA(r,i,t,n)}))}function cA(t){return ug(_c,t)}function lA(){return cA(1)}function cg(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return lA()(sA(t,Xd(t)))}function fA(t,e){return e===void 0&&(e=_c),t=t??hA,ln(function(n,r){var i,o=!0;n.subscribe(wr(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function hA(t,e){return t===e}function pA(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Si}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,d=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return ln(function(v,b){p++,!g&&!d&&m();var $=f=f??n();b.add(function(){p--,p===0&&!g&&!d&&(h=$c(x,u))}),$.subscribe(b),!l&&p>0&&(l=new $i({next:function(_){return $.next(_)},error:function(_){g=!0,m(),h=$c(y,i,_),$.error(_)},complete:function(){d=!0,m(),h=$c(y,a),$.complete()}}),fn(v).subscribe(l))})(c)}}function $c(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new $i({next:function(){i.unsubscribe(),t()}});return fn(e.apply(void 0,_i([],xi(n)))).subscribe(i)}}function dA(t,e,n){var r,i=!1;return r=t,pA({connector:function(){return new B3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function gA(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Xd(t);return ln(function(r,i){(n?cg(t,r,n):cg(t,r)).subscribe(i)})}function mA(t){return ln(function(e,n){fn(t).subscribe(wr(n,function(){return n.complete()},yc)),!n.closed&&e.subscribe(n)})}const yA=t=>t.pipe(ha(e=>e.styles.textSize),fA(),ha(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),lg=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=dr.scaleDomain,scaleRange:i=dr.scaleRange})=>{const o=r[0]??dr.scaleDomain[0],a=r[1]??dr.scaleDomain[1],s=i[0]??dr.scaleRange[0],u=i[1]??dr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a,h=t-(t-c)/(1-s),f=l/u;return Nd().domain([h,f]).range([0,n])},fg=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return b3().domain(t).range(r).padding(n)},bA=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Fd().domain([-0,e+0]).range(i)};function vA({name:t,defaultParams:e,initFn:n}){const r=new Si,i=new Si,o=new WeakMap;let a=()=>{},s,u=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:c=>{u=pc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(mA(r),gA({}),ha(l=>pc(l,u)),dA(1))}}}const Ai=()=>function(t,e){return function(n){return class{constructor(){const r=vA({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},Mi=Ai(),se=Ai(),ke=Ai(),hg=Ai(),pg=Ai();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function dg(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pa(t){let e,n,r;t.length!==2?(e=_t,n=(s,u)=>_t(t(s),u),r=(s,u)=>t(s)-u):(e=t===_t||t===dg?t:xA,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function xA(){return 0}function da(t){return t===null?NaN:+t}function*_A(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const gg=pa(_t),mg=gg.right,wA=gg.left,$A=pa(da).center,En=mg;function SA(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=Sc(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const yg=bg(Sc),AA=bg(MA);function bg(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),u=r&&t(r),c=i.slice();return s&&u?($r(s,c,i,o,a),$r(s,i,c,o,a),$r(s,c,i,o,a),Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)):s?($r(s,i,c,o,a),$r(s,c,i,o,a),$r(s,i,c,o,a)):u&&(Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)),e}}function $r(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function Sr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function MA(t){const e=Sc(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function Sc(t){const e=Math.floor(t);if(e===t)return DA(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let c=e*o[a];const l=u*e,h=l+u;for(let f=a,p=a+l;f<p;f+=u)c+=o[Math.min(s,f)];for(let f=a,p=s;f<=p;f+=u)c+=o[Math.min(s,f+l)],i[f]=(c+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,c-=o[Math.max(a,f-l)]}}function DA(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let c=i,l=i+u;c<l;c+=a)s+=r[Math.min(o,c)];for(let c=i,l=o;c<=l;c+=a)s+=r[Math.min(o,c+u)],n[c]=s/e,s-=r[Math.max(i,c-u)]}}function ga(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function PA(t){return t.length|0}function TA(t){return!(t>0)}function LA(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function CA(t){return e=>t(...e)}function EA(...t){const e=typeof t[t.length-1]=="function"&&CA(t.pop());t=t.map(LA);const n=t.map(PA),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(TA))return o;for(;;){o.push(i.map((s,u)=>t[u][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function kA(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function vg(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function xg(t,e){const n=vg(t,e);return n&&Math.sqrt(n)}function Di(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Lt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function RA(t,e){const n=new Lt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function IA(t,e){const n=new Lt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Pi extends Map{constructor(e,n=$g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Ac(this,e))}has(e){return super.has(Ac(this,e))}set(e,n){return super.set(_g(this,e),n)}delete(e){return super.delete(wg(this,e))}}class kn extends Set{constructor(e,n=$g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(Ac(this,e))}add(e){return super.add(_g(this,e))}delete(e){return super.delete(wg(this,e))}}function Ac({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function _g({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function wg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function $g(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Ar(t){return t}function Sg(t,...e){return Mr(t,Ar,Ar,e)}function Ag(t,...e){return Mr(t,Array.from,Ar,e)}function Mg(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function NA(t,...e){return Mg(Ag(t,...e),e)}function FA(t,e,...n){return Mg(Pg(t,e,...n),n)}function Dg(t,e,...n){return Mr(t,Ar,e,n)}function Pg(t,e,...n){return Mr(t,Array.from,e,n)}function GA(t,...e){return Mr(t,Ar,Tg,e)}function zA(t,...e){return Mr(t,Array.from,Tg,e)}function Tg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Mr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Pi,u=r[a++];let c=-1;for(const l of o){const h=u(l,++c,o),f=s.get(h);f?f.push(l):s.set(h,[l])}for(const[l,h]of s)s.set(l,i(h,a));return e(s)}(t,0)}function Lg(t,e){return Array.from(e,n=>t[n])}function Mc(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=Dr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Dr(n[i],n[o]))),Lg(t,r)}return t.sort(Dc(n))}function Dc(t=_t){if(t===_t)return Dr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Dr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function OA(t,e,n){return(e.length!==2?Mc(Dg(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):Mc(Sg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var UA=Array.prototype,BA=UA.slice;function Pc(t){return()=>t}const YA=Math.sqrt(50),HA=Math.sqrt(10),WA=Math.sqrt(2);function ma(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=YA?10:o>=HA?5:o>=WA?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?ma(t,e,n*2):[s,u,c]}function Rn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?ma(e,t,n):ma(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function In(t,e,n){return e=+e,t=+t,n=+n,ma(t,e,n)[2]}function ya(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?In(e,t,n):In(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Tc(t,e,n){let r;for(;;){const i=In(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function Lc(t){return Math.max(1,Math.ceil(Math.log(ga(t))/Math.LN2)+1)}function Cg(){var t=Ar,e=Di,n=Lc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,c=new Array(a);for(o=0;o<a;++o)c[o]=t(i[o],o,i);var l=e(c),h=l[0],f=l[1],p=n(c,h,f);if(!Array.isArray(p)){const v=f,b=+p;if(e===Di&&([h,f]=Tc(h,f,b)),p=Rn(h,f,b),p[0]<=h&&(u=In(h,f,b)),p[p.length-1]>=f)if(v>=f&&e===Di){const $=In(h,f,b);isFinite($)&&($>0?f=(Math.floor(f/$)+1)*$:$<0&&(f=(Math.ceil(f*-$)+1)/-$))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>f;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var y=new Array(d+1),x;for(o=0;o<=d;++o)x=y[o]=[],x.x0=o>0?p[o-1]:h,x.x1=o<d?p[o]:f;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Math.min(d,Math.floor((s-h)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=c[o])!=null&&h<=s&&s<=f){const v=Math.floor((h-s)*u);y[Math.min(d,v+(p[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[En(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Pc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Pc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Pc(Array.isArray(i)?BA.call(i):i),r):n},r}function Ti(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Cc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ba(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ec(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function va(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Dr:Dc(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,l=Math.log(u),h=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*h*(u-h)/u)*(c-u/2<0?-1:1),p=Math.max(n,Math.floor(e-c*h/u+f)),d=Math.min(r,Math.floor(e+(u-c)*h/u+f));va(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(Li(t,n,e),i(t[r],o)>0&&Li(t,n,r);a<s;){for(Li(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Li(t,n,s):(++s,Li(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Li(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Eg(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)>0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function Ci(t,e,n){if(t=Float64Array.from(_A(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return ba(t);if(e>=1)return Ti(t);var r,i=(r-1)*e,o=Math.floor(i),a=Ti(va(t,o).subarray(0,o+1)),s=ba(t.subarray(o+1));return a+(s-a)*(i-o)}}function kg(t,e,n=da){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function Rg(t,e,n=da){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>da(n(t[u],u,t))),e<=0)return Ec(r);if(e>=1)return Cc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return va(i,a,0,o,(s,u)=>Dr(r[s],r[u])),a=Eg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function qA(t,e,n){const r=ga(t),i=Ci(t,.75)-Ci(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function jA(t,e,n){const r=ga(t),i=xg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function XA(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function VA(t,e){return Ci(t,.5,e)}function ZA(t,e){return Rg(t,.5,e)}function*KA(t){for(const e of t)yield*e}function kc(t){return Array.from(KA(t))}function QA(t,e){const n=new Pi;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function JA(t,e=t5){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function t5(t,e){return[t,e]}function hn(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function e5(t,e=_t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=_t);const i=(s,u)=>e(n[s],n[u]);let o,a;return t=Uint32Array.from(n,(s,u)=>u),t.sort(e===_t?(s,u)=>Dr(n[s],n[u]):Dc(i)),t.forEach((s,u)=>{const c=i(s,o===void 0?s:o);c>=0?((o===void 0||c>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function n5(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)<0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function Ig(t,e=_t){if(e.length===1)return Ec(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function r5(t,e=_t){if(e.length===1)return Cc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function i5(t,e){const n=Ig(t,e);return n<0?void 0:n}const o5=Ng(Math.random);function Ng(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function a5(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Fg(t){if(!(o=t.length))return[];for(var e=-1,n=ba(t,s5),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function s5(t){return t.length}function u5(){return Fg(arguments)}function c5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function l5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function f5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function h5(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function p5(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function d5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function g5(t,...e){t=new kn(t);for(const n of e)for(const r of n)t.delete(r);return t}function m5(t,e){const n=e[Symbol.iterator](),r=new kn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function y5(t,...e){t=new kn(t),e=e.map(b5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function b5(t){return t instanceof kn?t:new kn(t)}function Gg(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=zg(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=zg(a);if(r.add(u),Object.is(o,u))break}}return!0}function zg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function v5(t,e){return Gg(e,t)}function x5(...t){const e=new kn;for(const n of t)for(const r of n)e.add(r);return e}function _5(t){return t}var xa=1,_a=2,Rc=3,Ei=4,Og=1e-6;function w5(t){return"translate("+t+",0)"}function $5(t){return"translate(0,"+t+")"}function S5(t){return e=>+t(e)}function A5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function M5(){return!this.__axis}function wa(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===xa||t===Ei?-1:1,l=t===Ei||t===_a?"x":"y",h=t===xa||t===Rc?w5:$5;function f(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):_5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?A5:S5)(e.copy(),u),$=p.selection?p.selection():p,_=$.selectAll(".domain").data([null]),D=$.selectAll(".tick").data(d,e).order(),T=D.exit(),w=D.enter().append("g").attr("class","tick"),P=D.select("line"),S=D.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),D=D.merge(w),P=P.merge(w.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),S=S.merge(w.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===xa?"0em":t===Rc?"0.71em":"0.32em")),p!==$&&(_=_.transition(p),D=D.transition(p),P=P.transition(p),S=S.transition(p),T=T.transition(p).attr("opacity",Og).attr("transform",function(z){return isFinite(z=b(z))?h(z+u):this.getAttribute("transform")}),w.attr("opacity",Og).attr("transform",function(z){var k=this.parentNode.__axis;return h((k&&isFinite(k=k(z))?k:b(z))+u)})),T.remove(),_.attr("d",t===Ei||t===_a?a?"M"+c*a+","+x+"H"+u+"V"+v+"H"+c*a:"M"+u+","+x+"V"+v:a?"M"+x+","+c*a+"V"+u+"H"+v+"V"+c*a:"M"+x+","+u+"H"+v),D.attr("opacity",1).attr("transform",function(z){return h(b(z)+u)}),P.attr(l+"2",c*o),S.attr(l,c*m).text(g),$.filter(M5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===_a?"start":t===Ei?"end":"middle"),$.each(function(){this.__axis=b})}return f.scale=function(p){return arguments.length?(e=p,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),f):n.slice()},f.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),f):r&&r.slice()},f.tickFormat=function(p){return arguments.length?(i=p,f):i},f.tickSize=function(p){return arguments.length?(o=a=+p,f):o},f.tickSizeInner=function(p){return arguments.length?(o=+p,f):o},f.tickSizeOuter=function(p){return arguments.length?(a=+p,f):a},f.tickPadding=function(p){return arguments.length?(s=+p,f):s},f.offset=function(p){return arguments.length?(u=+p,f):u},f}function Ug(t){return wa(xa,t)}function D5(t){return wa(_a,t)}function P5(t){return wa(Rc,t)}function Bg(t){return wa(Ei,t)}var T5={value:()=>{}};function Nn(){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 $a(n)}function $a(t){this._=t}function L5(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}})}$a.prototype=Nn.prototype={constructor:$a,on:function(t,e){var n=this._,r=L5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=C5(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Yg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Yg(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 $a(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[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,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function C5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Yg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=T5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ic="http://www.w3.org/1999/xhtml";const Nc={svg:"http://www.w3.org/2000/svg",xhtml:Ic,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ki(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Nc.hasOwnProperty(e)?{space:Nc[e],local:t}:t}function E5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ic&&e.documentElement.namespaceURI===Ic?e.createElement(t):e.createElementNS(n,t)}}function k5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Sa(t){var e=ki(t);return(e.local?k5:E5)(e)}function R5(){}function Aa(t){return t==null?R5:function(){return this.querySelector(t)}}function I5(t){typeof t!="function"&&(t=Aa(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Ht(r,this._parents)}function Hg(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function N5(){return[]}function Fc(t){return t==null?N5:function(){return this.querySelectorAll(t)}}function F5(t){return function(){return Hg(t.apply(this,arguments))}}function G5(t){typeof t=="function"?t=F5(t):t=Fc(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new Ht(r,i)}function Gc(t){return function(){return this.matches(t)}}function Wg(t){return function(e){return e.matches(t)}}var z5=Array.prototype.find;function O5(t){return function(){return z5.call(this.children,t)}}function U5(){return this.firstElementChild}function B5(t){return this.select(t==null?U5:O5(typeof t=="function"?t:Wg(t)))}var Y5=Array.prototype.filter;function H5(){return Array.from(this.children)}function W5(t){return function(){return Y5.call(this.children,t)}}function q5(t){return this.selectAll(t==null?H5:W5(typeof t=="function"?t:Wg(t)))}function j5(t){typeof t!="function"&&(t=Gc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Ht(r,this._parents)}function qg(t){return new Array(t.length)}function X5(){return new Ht(this._enter||this._groups.map(qg),this._parents)}function Ma(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ma.prototype={constructor:Ma,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 V5(t){return function(){return t}}function Z5(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ma(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function K5(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),p;for(s=0;s<l;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",c.has(p)?i[s]=u:c.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=c.get(p))?(r[s]=u,u.__data__=o[s],c.delete(p)):n[s]=new Ma(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function Q5(t){return t.__data__}function J5(t,e){if(!arguments.length)return Array.from(this,Q5);var n=e?K5:Z5,r=this._parents,i=this._groups;typeof t!="function"&&(t=V5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,p=t6(t.call(l,l&&l.__data__,c,r)),d=p.length,g=s[c]=new Array(d),m=a[c]=new Array(d),y=u[c]=new Array(f);n(l,h,g,m,y,p,e);for(var x=0,v=0,b,$;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<d;);b._next=$||null}}return a=new Ht(a,r),a._enter=s,a._exit=u,a}function t6(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function e6(){return new Ht(this._exit||this._groups.map(qg),this._parents)}function n6(t,e,n){var r=this.enter(),i=this,o=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?o.remove():n(o),r&&i?r.merge(i).order():i}function r6(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),p,d=0;d<h;++d)(p=c[d]||l[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new Ht(s,this._parents)}function i6(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function o6(t){t||(t=a6);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),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new Ht(i,this._parents).order()}function a6(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function s6(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function u6(){return Array.from(this)}function c6(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function l6(){let t=0;for(const e of this)++t;return t}function f6(){return!this.node()}function h6(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function p6(t){return function(){this.removeAttribute(t)}}function d6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function g6(t,e){return function(){this.setAttribute(t,e)}}function m6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function y6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function b6(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 v6(t,e){var n=ki(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?d6:p6:typeof e=="function"?n.local?b6:y6:n.local?m6:g6)(n,e))}function zc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function x6(t){return function(){this.style.removeProperty(t)}}function _6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function w6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function $6(t,e,n){return arguments.length>1?this.each((e==null?x6:typeof e=="function"?w6:_6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||zc(t).getComputedStyle(t,null).getPropertyValue(e)}function S6(t){return function(){delete this[t]}}function A6(t,e){return function(){this[t]=e}}function M6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function D6(t,e){return arguments.length>1?this.each((e==null?S6:typeof e=="function"?M6:A6)(t,e)):this.node()[t]}function jg(t){return t.trim().split(/^|\s+/)}function Oc(t){return t.classList||new Xg(t)}function Xg(t){this._node=t,this._names=jg(t.getAttribute("class")||"")}Xg.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 Vg(t,e){for(var n=Oc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Zg(t,e){for(var n=Oc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function P6(t){return function(){Vg(this,t)}}function T6(t){return function(){Zg(this,t)}}function L6(t,e){return function(){(e.apply(this,arguments)?Vg:Zg)(this,t)}}function C6(t,e){var n=jg(t+"");if(arguments.length<2){for(var r=Oc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?L6:e?P6:T6)(n,e))}function E6(){this.textContent=""}function k6(t){return function(){this.textContent=t}}function R6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function I6(t){return arguments.length?this.each(t==null?E6:(typeof t=="function"?R6:k6)(t)):this.node().textContent}function N6(){this.innerHTML=""}function F6(t){return function(){this.innerHTML=t}}function G6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function z6(t){return arguments.length?this.each(t==null?N6:(typeof t=="function"?G6:F6)(t)):this.node().innerHTML}function O6(){this.nextSibling&&this.parentNode.appendChild(this)}function U6(){return this.each(O6)}function B6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Y6(){return this.each(B6)}function H6(t){var e=typeof t=="function"?t:Sa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function W6(){return null}function q6(t,e){var n=typeof t=="function"?t:Sa(t),r=e==null?W6:typeof e=="function"?e:Aa(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function j6(){var t=this.parentNode;t&&t.removeChild(this)}function X6(){return this.each(j6)}function V6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Z6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function K6(t){return this.select(t?Z6:V6)}function Q6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function J6(t){return function(e){t.call(this,e,this.__data__)}}function t8(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 e8(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function n8(t,e,n){return function(){var r=this.__on,i,o=J6(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function r8(t,e,n){var r=t8(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?n8:e8,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Kg(t,e,n){var r=zc(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 i8(t,e){return function(){return Kg(this,t,e)}}function o8(t,e){return function(){return Kg(this,t,e.apply(this,arguments))}}function a8(t,e){return this.each((typeof e=="function"?o8:i8)(t,e))}function*s8(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Uc=[null];function Ht(t,e){this._groups=t,this._parents=e}function Gn(){return new Ht([[document.documentElement]],Uc)}function u8(){return this}Ht.prototype=Gn.prototype={constructor:Ht,select:I5,selectAll:G5,selectChild:B5,selectChildren:q5,filter:j5,data:J5,enter:X5,exit:e6,join:n6,merge:r6,selection:u8,order:i6,sort:o6,call:s6,nodes:u6,node:c6,size:l6,empty:f6,each:h6,attr:v6,style:$6,property:D6,classed:C6,text:I6,html:z6,raise:U6,lower:Y6,append:H6,insert:q6,remove:X6,clone:K6,datum:Q6,on:r8,dispatch:a8,[Symbol.iterator]:s8};function Z(t){return typeof t=="string"?new Ht([[document.querySelector(t)]],[document.documentElement]):new Ht([[t]],Uc)}function c8(t){return Z(Sa(t).call(document.documentElement))}var l8=0;function Qg(){return new Bc}function Bc(){this._="@"+(++l8).toString(36)}Bc.prototype=Qg.prototype={constructor:Bc,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Jg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ue(t,e){if(t=Jg(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function f8(t,e){return t.target&&(t=Jg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ue(n,e))}function h8(t){return typeof t=="string"?new Ht([document.querySelectorAll(t)],[document.documentElement]):new Ht([Hg(t)],Uc)}const p8={passive:!1},Ri={capture:!0,passive:!1};function Yc(t){t.stopImmediatePropagation()}function Pr(t){t.preventDefault(),t.stopImmediatePropagation()}function Da(t){var e=t.document.documentElement,n=Z(t).on("dragstart.drag",Pr,Ri);"onselectstart"in e?n.on("selectstart.drag",Pr,Ri):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Pa(t,e){var n=t.document.documentElement,r=Z(t).on("dragstart.drag",null);e&&(r.on("click.drag",Pr,Ri),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ta=t=>()=>t;function Hc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}Hc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function d8(t){return!t.ctrlKey&&!t.button}function g8(){return this.parentNode}function m8(t,e){return e??{x:t.x,y:t.y}}function y8(){return navigator.maxTouchPoints||"ontouchstart"in this}function t0(){var t=d8,e=g8,n=m8,r=y8,i={},o=Nn("start","drag","end"),a=0,s,u,c,l,h=0;function f(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,p8).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,$){if(!(l||!t.call(this,b,$))){var _=v(this,e.call(this,b,$),b,$,"mouse");_&&(Z(b.view).on("mousemove.drag",d,Ri).on("mouseup.drag",g,Ri),Da(b.view),Yc(b),c=!1,s=b.clientX,u=b.clientY,_("start",b))}}function d(b){if(Pr(b),!c){var $=b.clientX-s,_=b.clientY-u;c=$*$+_*_>h}i.mouse("drag",b)}function g(b){Z(b.view).on("mousemove.drag mouseup.drag",null),Pa(b.view,c),Pr(b),i.mouse("end",b)}function m(b,$){if(t.call(this,b,$)){var _=b.changedTouches,D=e.call(this,b,$),T=_.length,w,P;for(w=0;w<T;++w)(P=v(this,D,b,$,_[w].identifier,_[w]))&&(Yc(b),P("start",b,_[w]))}}function y(b){var $=b.changedTouches,_=$.length,D,T;for(D=0;D<_;++D)(T=i[$[D].identifier])&&(Pr(b),T("drag",b,$[D]))}function x(b){var $=b.changedTouches,_=$.length,D,T;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),D=0;D<_;++D)(T=i[$[D].identifier])&&(Yc(b),T("end",b,$[D]))}function v(b,$,_,D,T,w){var P=o.copy(),S=ue(w||_,$),z,k,A;if((A=n.call(b,new Hc("beforestart",{sourceEvent:_,target:f,identifier:T,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:P}),D))!=null)return z=A.x-S[0]||0,k=A.y-S[1]||0,function L(M,F,O){var E=S,R;switch(M){case"start":i[T]=L,R=a++;break;case"end":delete i[T],--a;case"drag":S=ue(O||F,$),R=a;break}P.call(M,b,new Hc(M,{sourceEvent:F,subject:A,target:f,identifier:T,active:R,x:S[0]+z,y:S[1]+k,dx:S[0]-E[0],dy:S[1]-E[1],dispatch:P}),D)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Ta(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:Ta(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Ta(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Ta(!!b),f):r},f.on=function(){var b=o.on.apply(o,arguments);return b===o?f:b},f.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,f):Math.sqrt(h)},f}function Tr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ii(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function pn(){}var zn=.7,Lr=1/zn,Cr="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b8=/^#([0-9a-f]{3,8})$/,v8=new RegExp(`^rgb\\(${Cr},${Cr},${Cr}\\)$`),x8=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),_8=new RegExp(`^rgba\\(${Cr},${Cr},${Cr},${Ni}\\)$`),w8=new RegExp(`^rgba\\(${Re},${Re},${Re},${Ni}\\)$`),$8=new RegExp(`^hsl\\(${Ni},${Re},${Re}\\)$`),S8=new RegExp(`^hsla\\(${Ni},${Re},${Re},${Ni}\\)$`),e0={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};Tr(pn,dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:n0,formatHex:n0,formatHex8:A8,formatHsl:M8,formatRgb:r0,toString:r0});function n0(){return this.rgb().formatHex()}function A8(){return this.rgb().formatHex8()}function M8(){return u0(this).formatHsl()}function r0(){return this.rgb().formatRgb()}function dn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=b8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?i0(e):n===3?new kt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?La(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?La(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=v8.exec(t))?new kt(e[1],e[2],e[3],1):(e=x8.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=_8.exec(t))?La(e[1],e[2],e[3],e[4]):(e=w8.exec(t))?La(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=$8.exec(t))?s0(e[1],e[2]/100,e[3]/100,1):(e=S8.exec(t))?s0(e[1],e[2]/100,e[3]/100,e[4]):e0.hasOwnProperty(t)?i0(e0[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function i0(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function La(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Wc(t){return t instanceof pn||(t=dn(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function Er(t,e,n,r){return arguments.length===1?Wc(t):new kt(t,e,n,r??1)}function kt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Tr(kt,Er,Ii(pn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(On(this.r),On(this.g),On(this.b),Ca(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:o0,formatHex:o0,formatHex8:D8,formatRgb:a0,toString:a0}));function o0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function D8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function a0(){const t=Ca(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function Ca(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function On(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Un(t){return t=On(t),(t<16?"0":"")+t.toString(16)}function s0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ae(t,e,n,r)}function u0(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof pn||(t=dn(t)),!t)return new Ae;if(t instanceof Ae)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Ae(a,s,u,t.opacity)}function Ea(t,e,n,r){return arguments.length===1?u0(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Tr(Ae,Ea,Ii(pn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Ae(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Ae(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 kt(qc(t>=240?t-240:t+120,i,r),qc(t,i,r),qc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(c0(this.h),ka(this.s),ka(this.l),Ca(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=Ca(this.opacity);return`${t===1?"hsl(":"hsla("}${c0(this.h)}, ${ka(this.s)*100}%, ${ka(this.l)*100}%${t===1?")":`, ${t})`}`}}));function c0(t){return t=(t||0)%360,t<0?t+360:t}function ka(t){return Math.max(0,Math.min(1,t||0))}function qc(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 l0=Math.PI/180,f0=180/Math.PI,Ra=18,h0=.96422,p0=1,d0=.82521,g0=4/29,kr=6/29,m0=3*kr*kr,P8=kr*kr*kr;function y0(t){if(t instanceof Me)return new Me(t.l,t.a,t.b,t.opacity);if(t instanceof Ie)return v0(t);t instanceof kt||(t=Wc(t));var e=Zc(t.r),n=Zc(t.g),r=Zc(t.b),i=jc((.2225045*e+.7168786*n+.0606169*r)/p0),o,a;return e===n&&n===r?o=a=i:(o=jc((.4360747*e+.3850649*n+.1430804*r)/h0),a=jc((.0139322*e+.0971045*n+.7141733*r)/d0)),new Me(116*i-16,500*(o-i),200*(i-a),t.opacity)}function T8(t,e){return new Me(t,0,0,e??1)}function Ia(t,e,n,r){return arguments.length===1?y0(t):new Me(t,e,n,r??1)}function Me(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Tr(Me,Ia,Ii(pn,{brighter(t){return new Me(this.l+Ra*(t??1),this.a,this.b,this.opacity)},darker(t){return new Me(this.l-Ra*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=h0*Xc(e),t=p0*Xc(t),n=d0*Xc(n),new kt(Vc(3.1338561*e-1.6168667*t-.4906146*n),Vc(-.9787684*e+1.9161415*t+.033454*n),Vc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function jc(t){return t>P8?Math.pow(t,1/3):t/m0+g0}function Xc(t){return t>kr?t*t*t:m0*(t-g0)}function Vc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Zc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function b0(t){if(t instanceof Ie)return new Ie(t.h,t.c,t.l,t.opacity);if(t instanceof Me||(t=y0(t)),t.a===0&&t.b===0)return new Ie(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*f0;return new Ie(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function L8(t,e,n,r){return arguments.length===1?b0(t):new Ie(n,e,t,r??1)}function Na(t,e,n,r){return arguments.length===1?b0(t):new Ie(t,e,n,r??1)}function Ie(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function v0(t){if(isNaN(t.h))return new Me(t.l,0,0,t.opacity);var e=t.h*l0;return new Me(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Tr(Ie,Na,Ii(pn,{brighter(t){return new Ie(this.h,this.c,this.l+Ra*(t??1),this.opacity)},darker(t){return new Ie(this.h,this.c,this.l-Ra*(t??1),this.opacity)},rgb(){return v0(this).rgb()}}));var x0=-.14861,Kc=1.78277,Qc=-.29227,Fa=-.90649,Fi=1.97294,_0=Fi*Fa,w0=Fi*Kc,$0=Kc*Qc-Fa*x0;function C8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Wc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=($0*r+_0*e-w0*n)/($0+_0-w0),o=r-i,a=(Fi*(n-i)-Qc*o)/Fa,s=Math.sqrt(a*a+o*o)/(Fi*i*(1-i)),u=s?Math.atan2(a,o)*f0-120:NaN;return new Bn(u<0?u+360:u,s,i,t.opacity)}function De(t,e,n,r){return arguments.length===1?C8(t):new Bn(t,e,n,r??1)}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Tr(Bn,De,Ii(pn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Bn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Bn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*l0,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new kt(255*(e+n*(x0*r+Kc*i)),255*(e+n*(Qc*r+Fa*i)),255*(e+n*(Fi*r)),this.opacity)}}));function S0(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function A0(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return S0((n-r/e)*e,a,i,o,s)}}function M0(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return S0((n-r/e)*e,i,o,a,s)}}const Ga=t=>()=>t;function D0(t,e){return function(n){return t+n*e}}function E8(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 za(t,e){var n=e-t;return n?D0(t,n>180||n<-180?n-360*Math.round(n/360):n):Ga(isNaN(t)?e:t)}function k8(t){return(t=+t)==1?Rt:function(e,n){return n-e?E8(e,n,t):Ga(isNaN(e)?n:e)}}function Rt(t,e){var n=e-t;return n?D0(t,n):Ga(isNaN(t)?e:t)}const Gi=function t(e){var n=k8(e);function r(i,o){var a=n((i=Er(i)).r,(o=Er(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Rt(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function P0(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Er(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=o(u),s+""}}}var T0=P0(A0),R8=P0(M0);function Jc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function L0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function I8(t,e){return(L0(e)?Jc:C0)(t,e)}function C0(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=gn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function E0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function pe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function k0(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]=gn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var tl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,el=new RegExp(tl.source,"g");function N8(t){return function(){return t}}function F8(t){return function(e){return t(e)+""}}function nl(t,e){var n=tl.lastIndex=el.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=tl.exec(t))&&(i=el.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:pe(r,i)})),n=el.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?F8(u[0].x):N8(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function gn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ga(e):(n==="number"?pe:n==="string"?(r=dn(e))?(e=r,Gi):nl:e instanceof dn?Gi:e instanceof Date?E0:L0(e)?Jc:Array.isArray(e)?C0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?k0:pe)(t,e)}function G8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function z8(t,e){var n=za(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Oa(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var R0=180/Math.PI,rl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function I0(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*R0,skewX:Math.atan(u)*R0,scaleX:a,scaleY:s}}var Ua;function O8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?rl:I0(e.a,e.b,e.c,e.d,e.e,e.f)}function U8(t){return t==null||(Ua||(Ua=document.createElementNS("http://www.w3.org/2000/svg","g")),Ua.setAttribute("transform",t),!(t=Ua.transform.baseVal.consolidate()))?rl:(t=t.matrix,I0(t.a,t.b,t.c,t.d,t.e,t.f))}function N0(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:pe(c,h)},{i:g-2,x:pe(l,f)})}else(h||f)&&p.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:pe(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:pe(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:pe(c,h)},{i:g-2,x:pe(l,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(p){for(var d=-1,g=f.length,m;++d<g;)h[(m=f[d]).i]=m.x(p);return h.join("")}}}var F0=N0(O8,"px, ","px)","deg)"),G0=N0(U8,", ",")",")"),B8=1e-12;function z0(t){return((t=Math.exp(t))+1/t)/2}function Y8(t){return((t=Math.exp(t))-1/t)/2}function H8(t){return((t=Math.exp(2*t))-1)/(t+1)}const O0=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],l=a[0],h=a[1],f=a[2],p=l-s,d=h-u,g=p*p+d*d,m,y;if(g<B8)y=Math.log(f/c)/e,m=function(D){return[s+D*p,u+D*d,c*Math.exp(e*D*y)]};else{var x=Math.sqrt(g),v=(f*f-c*c+r*g)/(2*c*n*x),b=(f*f-c*c-r*g)/(2*f*n*x),$=Math.log(Math.sqrt(v*v+1)-v),_=Math.log(Math.sqrt(b*b+1)-b);y=(_-$)/e,m=function(D){var T=D*y,w=z0($),P=c/(n*x)*(w*H8(e*T+$)-Y8($));return[s+P*p,u+P*d,c*w/z0(e*T+$)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function U0(t){return function(e,n){var r=t((e=Ea(e)).h,(n=Ea(n)).h),i=Rt(e.s,n.s),o=Rt(e.l,n.l),a=Rt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const W8=U0(za);var q8=U0(Rt);function j8(t,e){var n=Rt((t=Ia(t)).l,(e=Ia(e)).l),r=Rt(t.a,e.a),i=Rt(t.b,e.b),o=Rt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function B0(t){return function(e,n){var r=t((e=Na(e)).h,(n=Na(n)).h),i=Rt(e.c,n.c),o=Rt(e.l,n.l),a=Rt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const X8=B0(za);var V8=B0(Rt);function Y0(t){return function e(n){n=+n;function r(i,o){var a=t((i=De(i)).h,(o=De(o)).h),s=Rt(i.s,o.s),u=Rt(i.l,o.l),c=Rt(i.opacity,o.opacity);return function(l){return i.h=a(l),i.s=s(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return r.gamma=e,r}(1)}const Z8=Y0(za);var Ba=Y0(Rt);function H0(t,e){e===void 0&&(e=t,t=gn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function K8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Rr=0,zi=0,Oi=0,W0=1e3,Ya,Ui,Ha=0,Yn=0,Wa=0,Bi=typeof performance=="object"&&performance.now?performance:Date,q0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Yi(){return Yn||(q0(Q8),Yn=Bi.now()+Wa)}function Q8(){Yn=0}function Hi(){this._call=this._time=this._next=null}Hi.prototype=qa.prototype={constructor:Hi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Yi():+n)+(e==null?0:+e),!this._next&&Ui!==this&&(Ui?Ui._next=this:Ya=this,Ui=this),this._call=t,this._time=n,il()},stop:function(){this._call&&(this._call=null,this._time=1/0,il())}};function qa(t,e,n){var r=new Hi;return r.restart(t,e,n),r}function j0(){Yi(),++Rr;for(var t=Ya,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Rr}function X0(){Yn=(Ha=Bi.now())+Wa,Rr=zi=0;try{j0()}finally{Rr=0,tM(),Yn=0}}function J8(){var t=Bi.now(),e=t-Ha;e>W0&&(Wa-=e,Ha=t)}function tM(){for(var t,e=Ya,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:Ya=n);Ui=t,il(r)}function il(t){if(!Rr){zi&&(zi=clearTimeout(zi));var e=t-Yn;e>24?(t<1/0&&(zi=setTimeout(X0,t-Bi.now()-Wa)),Oi&&(Oi=clearInterval(Oi))):(Oi||(Ha=Bi.now(),Oi=setInterval(J8,W0)),Rr=1,q0(X0))}}function ol(t,e,n){var r=new Hi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function eM(t,e,n){var r=new Hi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?Yi():+s,r._restart(function u(c){c+=i,r._restart(u,i+=a,s),o(c)},a,s)},r.restart(t,e,n),r)}var nM=Nn("start","end","cancel","interrupt"),rM=[],V0=0,al=1,sl=2,ja=3,Z0=4,ul=5,Xa=6;function Va(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;iM(t,n,{name:e,index:r,group:i,on:nM,tween:rM,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:V0})}function cl(t,e){var n=Pe(t,e);if(n.state>V0)throw new Error("too late; already scheduled");return n}function Ne(t,e){var n=Pe(t,e);if(n.state>ja)throw new Error("too late; already running");return n}function Pe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function iM(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=qa(o,0,n.time);function o(c){n.state=al,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,p;if(n.state!==al)return u();for(l in r)if(p=r[l],p.name===n.name){if(p.state===ja)return ol(a);p.state===Z0?(p.state=Xa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[l]):+l<e&&(p.state=Xa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[l])}if(ol(function(){n.state===ja&&(n.state=Z0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=sl,n.on.call("start",t,t.__data__,n.index,n.group),n.state===sl){for(n.state=ja,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(p=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ul,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ul&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Xa,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Hn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>sl&&r.state<ul,r.state=Xa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function oM(t){return this.each(function(){Hn(this,t)})}function aM(t,e){var n,r;return function(){var i=Ne(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function sM(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ne(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function uM(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Pe(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?aM:sM)(n,t,e))}function ll(t,e,n){var r=t._id;return t.each(function(){var i=Ne(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Pe(i,r).value[e]}}function K0(t,e){var n;return(typeof e=="number"?pe:e instanceof dn?Gi:(n=dn(e))?(e=n,Gi):nl)(t,e)}function cM(t){return function(){this.removeAttribute(t)}}function lM(t){return function(){this.removeAttributeNS(t.space,t.local)}}function fM(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function hM(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function pM(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function dM(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function gM(t,e){var n=ki(t),r=n==="transform"?G0:K0;return this.attrTween(t,typeof e=="function"?(n.local?dM:pM)(n,r,ll(this,"attr."+t,e)):e==null?(n.local?lM:cM)(n):(n.local?hM:fM)(n,r,e))}function mM(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yM(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function bM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&yM(t,o)),n}return i._value=e,i}function vM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&mM(t,o)),n}return i._value=e,i}function xM(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=ki(t);return this.tween(n,(r.local?bM:vM)(r,e))}function _M(t,e){return function(){cl(this,t).delay=+e.apply(this,arguments)}}function wM(t,e){return e=+e,function(){cl(this,t).delay=e}}function $M(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?_M:wM)(e,t)):Pe(this.node(),e).delay}function SM(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function AM(t,e){return e=+e,function(){Ne(this,t).duration=e}}function MM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?SM:AM)(e,t)):Pe(this.node(),e).duration}function DM(t,e){if(typeof e!="function")throw new Error;return function(){Ne(this,t).ease=e}}function PM(t){var e=this._id;return arguments.length?this.each(DM(e,t)):Pe(this.node(),e).ease}function TM(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ne(this,t).ease=n}}function LM(t){if(typeof t!="function")throw new Error;return this.each(TM(this._id,t))}function CM(t){typeof t!="function"&&(t=Gc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Fe(r,this._parents,this._name,this._id)}function EM(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,p=0;p<l;++p)(f=u[p]||c[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new Fe(a,this._parents,this._name,this._id)}function kM(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 RM(t,e,n){var r,i,o=kM(e)?cl:Ne;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function IM(t,e){var n=this._id;return arguments.length<2?Pe(this.node(),n).on.on(t):this.each(RM(n,t,e))}function NM(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function FM(){return this.on("end.remove",NM(this._id))}function GM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Aa(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,Va(c[f],e,n,f,c,Pe(l,n)));return new Fe(o,this._parents,e,n)}function zM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Fc(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),p,d=Pe(l,n),g=0,m=f.length;g<m;++g)(p=f[g])&&Va(p,e,n,g,f,d);o.push(f),a.push(l)}return new Fe(o,a,e,n)}var OM=Gn.prototype.constructor;function UM(){return new OM(this._groups,this._parents)}function BM(t,e){var n,r,i;return function(){var o=Fn(this,t),a=(this.style.removeProperty(t),Fn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Q0(t){return function(){this.style.removeProperty(t)}}function YM(t,e,n){var r,i=n+"",o;return function(){var a=Fn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function HM(t,e,n){var r,i,o;return function(){var a=Fn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Fn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function WM(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ne(this,t),c=u.on,l=u.value[o]==null?s||(s=Q0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function qM(t,e,n){var r=(t+="")=="transform"?F0:K0;return e==null?this.styleTween(t,BM(t,r)).on("end.style."+t,Q0(t)):typeof e=="function"?this.styleTween(t,HM(t,r,ll(this,"style."+t,e))).each(WM(this._id,t)):this.styleTween(t,YM(t,r,e),n).on("end.style."+t,null)}function jM(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function XM(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&jM(t,a,n)),r}return o._value=e,o}function VM(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,XM(t,e,n??""))}function ZM(t){return function(){this.textContent=t}}function KM(t){return function(){var e=t(this);this.textContent=e??""}}function QM(t){return this.tween("text",typeof t=="function"?KM(ll(this,"text",t)):ZM(t==null?"":t+""))}function JM(t){return function(e){this.textContent=t.call(this,e)}}function t4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&JM(i)),e}return r._value=t,r}function e4(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,t4(t))}function n4(){for(var t=this._name,e=this._id,n=tm(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=Pe(u,e);Va(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Fe(r,this._parents,t,n)}function r4(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ne(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var i4=0;function Fe(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function J0(t){return Gn().transition(t)}function tm(){return++i4}var Xe=Gn.prototype;Fe.prototype=J0.prototype={constructor:Fe,select:GM,selectAll:zM,selectChild:Xe.selectChild,selectChildren:Xe.selectChildren,filter:CM,merge:EM,selection:UM,transition:n4,call:Xe.call,nodes:Xe.nodes,node:Xe.node,size:Xe.size,empty:Xe.empty,each:Xe.each,on:IM,attr:gM,attrTween:xM,style:qM,styleTween:VM,text:QM,textTween:e4,remove:FM,tween:uM,delay:$M,duration:MM,ease:PM,easeVarying:LM,end:r4,[Symbol.iterator]:Xe[Symbol.iterator]};const o4=t=>+t;function a4(t){return t*t}function s4(t){return t*(2-t)}function em(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function u4(t){return t*t*t}function c4(t){return--t*t*t+1}function Wi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var fl=3,l4=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(fl),f4=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(fl),nm=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(fl),rm=Math.PI,im=rm/2;function h4(t){return+t==1?1:1-Math.cos(t*im)}function p4(t){return Math.sin(t*im)}function om(t){return(1-Math.cos(rm*t))/2}function mn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function d4(t){return mn(1-+t)}function g4(t){return 1-mn(t)}function am(t){return((t*=2)<=1?mn(1-t):2-mn(t-1))/2}function m4(t){return 1-Math.sqrt(1-t*t)}function y4(t){return Math.sqrt(1- --t*t)}function sm(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var hl=4/11,b4=6/11,v4=8/11,x4=3/4,_4=9/11,w4=10/11,$4=15/16,S4=21/22,A4=63/64,Za=1/hl/hl;function M4(t){return 1-qi(1-t)}function qi(t){return(t=+t)<hl?Za*t*t:t<v4?Za*(t-=b4)*t+x4:t<w4?Za*(t-=_4)*t+$4:Za*(t-=S4)*t+A4}function D4(t){return((t*=2)<=1?1-qi(1-t):qi(t-1)+1)/2}var pl=1.70158,P4=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(pl),T4=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(pl),um=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(pl),Ir=2*Math.PI,dl=1,gl=.3,L4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ir);function i(o){return e*mn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Ir)},i.period=function(o){return t(e,o)},i}(dl,gl),Ka=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ir);function i(o){return 1-e*mn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Ir)},i.period=function(o){return t(e,o)},i}(dl,gl),C4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ir);function i(o){return((o=o*2-1)<0?e*mn(-o)*Math.sin((r-o)/n):2-e*mn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Ir)},i.period=function(o){return t(e,o)},i}(dl,gl),E4={time:null,delay:0,duration:250,ease:Wi};function k4(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 R4(t){var e,n;t instanceof Fe?(e=t._id,t=t._name):(e=tm(),(n=E4).time=Yi(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&Va(u,t,e,c,a,n||k4(u,e));return new Fe(r,this._parents,t,e)}Gn.prototype.interrupt=oM,Gn.prototype.transition=R4;var I4=[null];function N4(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>al&&r.name===e)return new Fe([[t]],I4,e,+i)}return null}const ml=t=>()=>t;function F4(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function G4(t){t.stopImmediatePropagation()}function yl(t){t.preventDefault(),t.stopImmediatePropagation()}var cm={name:"drag"},bl={name:"space"},Nr={name:"handle"},Fr={name:"center"};const{abs:lm,max:Gt,min:zt}=Math;function fm(t){return[+t[0],+t[1]]}function vl(t){return[fm(t[0]),fm(t[1])]}var Qa={name:"x",handles:["w","e"].map(ji),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ja={name:"y",handles:["n","s"].map(ji),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},z4={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(ji),input:function(t){return t==null?null:vl(t)},output:function(t){return t}},Ve={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},hm={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},pm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},O4={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},U4={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function ji(t){return{type:t}}function B4(t){return!t.ctrlKey&&!t.button}function Y4(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function H4(){return navigator.maxTouchPoints||"ontouchstart"in this}function xl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function W4(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function q4(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function j4(){return _l(Qa)}function X4(){return _l(Ja)}function V4(){return _l(z4)}function _l(t){var e=Y4,n=B4,r=H4,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([ji("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ve.overlay).merge(y).each(function(){var v=xl(this).extent;Z(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1])}),m.selectAll(".selection").data([ji("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ve.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=m.selectAll(".handle").data(t.handles,function(v){return v.type});x.exit().remove(),x.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return Ve[v.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,y,x){m.tween?m.on("start.brush",function(v){l(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){l(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,$=l(v,arguments),_=b.selection,D=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),T=gn(_,D);function w(P){b.selection=P===1&&D===null?null:T(P),c.call(v),$.brush()}return _!==null&&D!==null?w:w(1)}):m.each(function(){var v=this,b=arguments,$=v.__brush,_=t.input(typeof y=="function"?y.apply(v,b):y,$.extent),D=l(v,b).beforestart();Hn(v),$.selection=_===null?null:_,c.call(v),D.start(x).brush(x).end(x)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=Z(this),y=xl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(m,y,x){var v=m.__brush.emitter;return v&&(!x||!v.clean)?v:new h(m,y,x)}function h(m,y,x){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=x}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,x){var v=Z(this.that).datum();o.call(m,this.that,new F4(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:x,dispatch:o}),v)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,x=m.target.__data__.type,v=(i&&m.metaKey?x="overlay":x)==="selection"?cm:i&&m.altKey?Fr:Nr,b=t===Ja?null:O4[x],$=t===Qa?null:U4[x],_=xl(y),D=_.extent,T=_.selection,w=D[0][0],P,S,z=D[0][1],k,A,L=D[1][0],M,F,O=D[1][1],E,R,C=0,N=0,j,Q=b&&$&&i&&m.shiftKey,I,X,q=Array.from(m.touches||[m],at=>{const Mt=at.identifier;return at=ue(at,y),at.point0=at.slice(),at.identifier=Mt,at});Hn(y);var V=l(y,arguments,!0).beforestart();if(x==="overlay"){T&&(j=!0);const at=[q[0],q[1]||q[0]];_.selection=T=[[P=t===Ja?w:zt(at[0][0],at[1][0]),k=t===Qa?z:zt(at[0][1],at[1][1])],[M=t===Ja?L:Gt(at[0][0],at[1][0]),E=t===Qa?O:Gt(at[0][1],at[1][1])]],q.length>1&&mt(m)}else P=T[0][0],k=T[0][1],M=T[1][0],E=T[1][1];S=P,A=k,F=M,R=E;var W=Z(y).attr("pointer-events","none"),et=W.selectAll(".overlay").attr("cursor",Ve[x]);if(m.touches)V.moved=H,V.ended=pt;else{var ut=Z(m.view).on("mousemove.brush",H,!0).on("mouseup.brush",pt,!0);i&&ut.on("keydown.brush",Yt,!0).on("keyup.brush",ee,!0),Da(m.view)}c.call(y),V.start(m,v.name);function H(at){for(const Mt of at.changedTouches||[at])for(const Ro of q)Ro.identifier===Mt.identifier&&(Ro.cur=ue(Mt,y));if(Q&&!I&&!X&&q.length===1){const Mt=q[0];lm(Mt.cur[0]-Mt[0])>lm(Mt.cur[1]-Mt[1])?X=!0:I=!0}for(const Mt of q)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);j=!0,yl(at),mt(at)}function mt(at){const Mt=q[0],Ro=Mt.point0;var Mn;switch(C=Mt[0]-Ro[0],N=Mt[1]-Ro[1],v){case bl:case cm:{b&&(C=Gt(w-P,zt(L-M,C)),S=P+C,F=M+C),$&&(N=Gt(z-k,zt(O-E,N)),A=k+N,R=E+N);break}case Nr:{q[1]?(b&&(S=Gt(w,zt(L,q[0][0])),F=Gt(w,zt(L,q[1][0])),b=1),$&&(A=Gt(z,zt(O,q[0][1])),R=Gt(z,zt(O,q[1][1])),$=1)):(b<0?(C=Gt(w-P,zt(L-P,C)),S=P+C,F=M):b>0&&(C=Gt(w-M,zt(L-M,C)),S=P,F=M+C),$<0?(N=Gt(z-k,zt(O-k,N)),A=k+N,R=E):$>0&&(N=Gt(z-E,zt(O-E,N)),A=k,R=E+N));break}case Fr:{b&&(S=Gt(w,zt(L,P-C*b)),F=Gt(w,zt(L,M+C*b))),$&&(A=Gt(z,zt(O,k-N*$)),R=Gt(z,zt(O,E+N*$)));break}}F<S&&(b*=-1,Mn=P,P=M,M=Mn,Mn=S,S=F,F=Mn,x in hm&&et.attr("cursor",Ve[x=hm[x]])),R<A&&($*=-1,Mn=k,k=E,E=Mn,Mn=A,A=R,R=Mn,x in pm&&et.attr("cursor",Ve[x=pm[x]])),_.selection&&(T=_.selection),I&&(S=T[0][0],F=T[1][0]),X&&(A=T[0][1],R=T[1][1]),(T[0][0]!==S||T[0][1]!==A||T[1][0]!==F||T[1][1]!==R)&&(_.selection=[[S,A],[F,R]],c.call(y),V.brush(at,v.name))}function pt(at){if(G4(at),at.touches){if(at.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Pa(at.view,j),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),et.attr("cursor",Ve.overlay),_.selection&&(T=_.selection),W4(T)&&(_.selection=null,c.call(y)),V.end(at,v.name)}function Yt(at){switch(at.keyCode){case 16:{Q=b&&$;break}case 18:{v===Nr&&(b&&(M=F-C*b,P=S+C*b),$&&(E=R-N*$,k=A+N*$),v=Fr,mt(at));break}case 32:{(v===Nr||v===Fr)&&(b<0?M=F-C:b>0&&(P=S-C),$<0?E=R-N:$>0&&(k=A-N),v=bl,et.attr("cursor",Ve.selection),mt(at));break}default:return}yl(at)}function ee(at){switch(at.keyCode){case 16:{Q&&(I=X=Q=!1,mt(at));break}case 18:{v===Fr&&(b<0?M=F:b>0&&(P=S),$<0?E=R:$>0&&(k=A),v=Nr,mt(at));break}case 32:{v===bl&&(at.altKey?(b&&(M=F-C*b,P=S+C*b),$&&(E=R-N*$,k=A+N*$),v=Fr):(b<0?M=F:b>0&&(P=S),$<0?E=R:$>0&&(k=A),v=Nr),et.attr("cursor",Ve[x]),mt(at));break}default:return}yl(at)}}function p(m){l(this,arguments).moved(m)}function d(m){l(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=vl(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:ml(vl(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:ml(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:ml(!!m),u):r},u.handleSize=function(m){return arguments.length?(a=+m,u):a},u.keyModifiers=function(m){return arguments.length?(i=!!m,u):i},u.on=function(){var m=o.on.apply(o,arguments);return m===o?u:m},u}var dm=Math.abs,Gr=Math.cos,zr=Math.sin,gm=Math.PI,ts=gm/2,mm=gm*2,ym=Math.max,wl=1e-12;function $l(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function Z4(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function K4(){return Sl(!1,!1)}function Q4(){return Sl(!1,!0)}function J4(){return Sl(!0,!1)}function Sl(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=$l(0,u),h=new Array(u*u),f=new Array(u),p=0,d;s=Float64Array.from({length:u*u},e?(g,m)=>s[m%u][m/u|0]:(g,m)=>s[m/u|0][m%u]);for(let g=0;g<u;++g){let m=0;for(let y=0;y<u;++y)m+=s[g*u+y]+t*s[y*u+g];p+=c[g]=m}p=ym(0,mm-n*u)/p,d=p?n:mm/u;{let g=0;r&&l.sort((m,y)=>r(c[m],c[y]));for(const m of l){const y=g;if(t){const x=$l(~u+1,u).filter(v=>v<0?s[~v*u+m]:s[m*u+v]);i&&x.sort((v,b)=>i(v<0?-s[~v*u+m]:s[m*u+v],b<0?-s[~b*u+m]:s[m*u+b]));for(const v of x)if(v<0){const b=h[~v*u+m]||(h[~v*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~v*u+m]*p,value:s[~v*u+m]}}else{const b=h[m*u+v]||(h[m*u+v]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const x=$l(0,u).filter(v=>s[m*u+v]||s[v*u+m]);i&&x.sort((v,b)=>i(s[m*u+v],s[m*u+b]));for(const v of x){let b;if(m<v?(b=h[m*u+v]||(h[m*u+v]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]}):(b=h[v*u+m]||(h[v*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]},m===v&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const $=b.source;b.source=b.target,b.target=$}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}g+=d}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=ym(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=Z4(s))._=s,a):o&&o._},a}const Al=Math.PI,Ml=2*Al,Wn=1e-6,t7=Ml-Wn;function bm(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function e7(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return bm;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Xi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?bm:e7(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,l=a-e,h=s-n,f=l*l+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Wn)if(!(Math.abs(h*u-c*l)>Wn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=u*u+c*c,m=p*p+d*d,y=Math.sqrt(g),x=Math.sqrt(f),v=o*Math.tan((Al-Math.acos((g+f-m)/(2*y*x)))/2),b=v/x,$=v/y;Math.abs(b-1)>Wn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*p>l*d)},${this._x1=e+$*u},${this._y1=n+$*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,l=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Wn||Math.abs(this._y1-l)>Wn)&&this._append`L${c},${l}`,r&&(f<0&&(f=f%Ml+Ml),f>t7?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=c},${this._y1=l}`:f>Wn&&this._append`A${r},${r},0,${+(f>=Al)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Dl(){return new Xi}Dl.prototype=Xi.prototype;function n7(t=3){return new Xi(+t)}var r7=Array.prototype.slice;function qn(t){return function(){return t}}function i7(t){return t.source}function o7(t){return t.target}function vm(t){return t.radius}function a7(t){return t.startAngle}function s7(t){return t.endAngle}function u7(){return 0}function c7(){return 10}function xm(t){var e=i7,n=o7,r=vm,i=vm,o=a7,a=s7,s=u7,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=r7.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-ts,y=a.apply(this,d)-ts,x=+i.apply(this,(d[0]=f,d)),v=o.apply(this,d)-ts,b=a.apply(this,d)-ts;if(u||(u=l=Dl()),p>wl&&(dm(y-m)>p*2+wl?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,dm(b-v)>p*2+wl?b>v?(v+=p,b-=p):(v-=p,b+=p):v=b=(v+b)/2),u.moveTo(g*Gr(m),g*zr(m)),u.arc(0,0,g,m,y),m!==v||y!==b)if(t){var $=+t.apply(this,arguments),_=x-$,D=(v+b)/2;u.quadraticCurveTo(0,0,_*Gr(v),_*zr(v)),u.lineTo(x*Gr(D),x*zr(D)),u.lineTo(_*Gr(b),_*zr(b))}else u.quadraticCurveTo(0,0,x*Gr(v),x*zr(v)),u.arc(0,0,x,v,b);if(u.quadraticCurveTo(0,0,g*Gr(m),g*zr(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:qn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:qn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:qn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:qn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:qn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:qn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:qn(+l),c):s},c.source=function(l){return arguments.length?(e=l,c):e},c.target=function(l){return arguments.length?(n=l,c):n},c.context=function(l){return arguments.length?(u=l??null,c):u},c}function l7(){return xm()}function f7(){return xm(c7)}var h7=Array.prototype,_m=h7.slice;function p7(t,e){return t-e}function d7(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const yn=t=>()=>t;function g7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=m7(t,e[n]))return i;return 0}function m7(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],h=t[s],f=h[0],p=h[1];if(y7(u,h,e))return 0;l>r!=p>r&&n<(f-c)*(r-l)/(p-l)+c&&(i=-i)}return i}function y7(t,e,n){var r;return b7(t,e,n)&&v7(t[r=+(t[0]===e[0])],n[r],e[r])}function b7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function v7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function x7(){}var Ze=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Pl(){var t=1,e=1,n=Lc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(p7);else{const h=Di(c,_7);for(l=Rn(...Tc(h[0],h[1],l),l);l[l.length-1]>=h[1];)l.pop();for(;l[1]<h[0];)l.shift()}return l.map(h=>o(c,h))}function o(c,l){const h=l==null?NaN:+l;if(isNaN(h))throw new Error(`invalid value: ${l}`);var f=[],p=[];return a(c,h,function(d){r(d,c,h),d7(d)>0?f.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=f.length,y;g<m;++g)if(g7((y=f[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:l,coordinates:f}}function a(c,l,h){var f=new Array,p=new Array,d,g,m,y,x,v;for(d=g=-1,y=jn(c[0],l),Ze[y<<1].forEach(b);++d<t-1;)m=y,y=jn(c[d+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(d=-1,y=jn(c[g*t+t],l),x=jn(c[g*t],l),Ze[y<<1|x<<2].forEach(b);++d<t-1;)m=y,y=jn(c[g*t+t+d+1],l),v=x,x=jn(c[g*t+d+1],l),Ze[m|y<<1|x<<2|v<<3].forEach(b);Ze[y|x<<3].forEach(b)}for(d=-1,x=c[g*t]>=l,Ze[x<<2].forEach(b);++d<t-1;)v=x,x=jn(c[g*t+d+1],l),Ze[x<<2|v<<3].forEach(b);Ze[x<<3].forEach(b);function b($){var _=[$[0][0]+d,$[0][1]+g],D=[$[1][0]+d,$[1][1]+g],T=s(_),w=s(D),P,S;(P=p[T])?(S=f[w])?(delete p[P.end],delete f[S.start],P===S?(P.ring.push(D),h(P.ring)):f[P.start]=p[S.end]={start:P.start,end:S.end,ring:P.ring.concat(S.ring)}):(delete p[P.end],P.ring.push(D),p[P.end=w]=P):(P=f[w])?(S=p[T])?(delete f[P.start],delete p[S.end],P===S?(P.ring.push(D),h(P.ring)):f[S.start]=p[P.end]={start:S.start,end:P.end,ring:S.ring.concat(P.ring)}):(delete f[P.start],P.ring.unshift(_),f[P.start=T]=P):f[T]=p[w]={start:T,end:w,ring:[_,D]}}}function s(c){return c[0]*2+c[1]*(t+1)*4}function u(c,l,h){c.forEach(function(f){var p=f[0],d=f[1],g=p|0,m=d|0,y=Tl(l[m*t+g]);p>0&&p<t&&g===p&&(f[0]=wm(p,Tl(l[m*t+g-1]),y,h)),d>0&&d<e&&m===d&&(f[1]=wm(d,Tl(l[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(c){if(!arguments.length)return[t,e];var l=Math.floor(c[0]),h=Math.floor(c[1]);if(!(l>=0&&h>=0))throw new Error("invalid size");return t=l,e=h,i},i.thresholds=function(c){return arguments.length?(n=typeof c=="function"?c:Array.isArray(c)?yn(_m.call(c)):yn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:x7,i):r===u},i}function _7(t){return isFinite(t)?t:NaN}function jn(t,e){return t==null?!1:+t>=e}function Tl(t){return t==null||isNaN(t=+t)?-1/0:t}function wm(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function w7(t){return t[0]}function $7(t){return t[1]}function S7(){return 1}function A7(){var t=w7,e=$7,n=S7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=yn(20);function h(x){var v=new Float32Array(u*c),b=Math.pow(2,-a),$=-1;for(const k of x){var _=(t(k,++$,x)+s)*b,D=(e(k,$,x)+s)*b,T=+n(k,$,x);if(T&&_>=0&&_<u&&D>=0&&D<c){var w=Math.floor(_),P=Math.floor(D),S=_-w-.5,z=D-P-.5;v[w+P*u]+=(1-S)*(1-z)*T,v[w+1+P*u]+=S*(1-z)*T,v[w+1+(P+1)*u]+=S*z*T,v[w+(P+1)*u]+=(1-S)*z*T}}return yg({data:v,width:u,height:c},o*b),v}function f(x){var v=h(x),b=l(v),$=Math.pow(2,2*a);return Array.isArray(b)||(b=Rn(Number.MIN_VALUE,Ti(v)/$,b)),Pl().size([u,c]).thresholds(b.map(_=>_*$))(v).map((_,D)=>(_.value=+b[D],p(_)))}f.contours=function(x){var v=h(x),b=Pl().size([u,c]),$=Math.pow(2,2*a),_=D=>{D=+D;var T=p(b.contour(v,D*$));return T.value=D,T};return Object.defineProperty(_,"max",{get:()=>Ti(v)/$}),_};function p(x){return x.coordinates.forEach(d),x}function d(x){x.forEach(g)}function g(x){x.forEach(m)}function m(x){x[0]=x[0]*Math.pow(2,a)-s,x[1]=x[1]*Math.pow(2,a)-s}function y(){return s=o*3,u=r+s*2>>a,c=i+s*2>>a,f}return f.x=function(x){return arguments.length?(t=typeof x=="function"?x:yn(+x),f):t},f.y=function(x){return arguments.length?(e=typeof x=="function"?x:yn(+x),f):e},f.weight=function(x){return arguments.length?(n=typeof x=="function"?x:yn(+x),f):n},f.size=function(x){if(!arguments.length)return[r,i];var v=+x[0],b=+x[1];if(!(v>=0&&b>=0))throw new Error("invalid size");return r=v,i=b,y()},f.cellSize=function(x){if(!arguments.length)return 1<<a;if(!((x=+x)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(x)/Math.LN2),y()},f.thresholds=function(x){return arguments.length?(l=typeof x=="function"?x:Array.isArray(x)?yn(_m.call(x)):yn(x),f):l},f.bandwidth=function(x){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*x*x+1)-1)/2,y()},f}const Ke=11102230246251565e-32,Ot=134217729,M7=(3+8*Ke)*Ke;function Ll(t,e,n,r,i){let o,a,s,u,c=e[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=e[++h]):(o=l,l=r[++f]);let p=0;if(h<t&&f<n)for(l>c==l>-c?(a=c+o,s=o-(a-c),c=e[++h]):(a=l+o,s=o-(a-l),l=r[++f]),o=a,s!==0&&(i[p++]=s);h<t&&f<n;)l>c==l>-c?(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h]):(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f]),o=a,s!==0&&(i[p++]=s);for(;h<t;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h],o=a,s!==0&&(i[p++]=s);for(;f<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function D7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Vi(t){return new Float64Array(t)}const P7=(3+16*Ke)*Ke,T7=(2+12*Ke)*Ke,L7=(9+64*Ke)*Ke*Ke,Or=Vi(4),$m=Vi(8),Sm=Vi(12),Am=Vi(16),Wt=Vi(4);function C7(t,e,n,r,i,o,a){let s,u,c,l,h,f,p,d,g,m,y,x,v,b,$,_,D,T;const w=t-i,P=n-i,S=e-o,z=r-o;b=w*z,f=Ot*w,p=f-(f-w),d=w-p,f=Ot*z,g=f-(f-z),m=z-g,$=d*m-(b-p*g-d*g-p*m),_=S*P,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*P,g=f-(f-P),m=P-g,D=d*m-(_-p*g-d*g-p*m),y=$-D,h=$-y,Or[0]=$-(y+h)+(h-D),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Or[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Or[2]=x-(T-h)+(y-h),Or[3]=T;let k=D7(4,Or),A=T7*a;if(k>=A||-k>=A||(h=t-w,s=t-(w+h)+(h-i),h=n-P,c=n-(P+h)+(h-i),h=e-S,u=e-(S+h)+(h-o),h=r-z,l=r-(z+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(A=L7*a+M7*Math.abs(k),k+=w*l+z*s-(S*c+P*u),k>=A||-k>=A))return k;b=s*z,f=Ot*s,p=f-(f-s),d=s-p,f=Ot*z,g=f-(f-z),m=z-g,$=d*m-(b-p*g-d*g-p*m),_=u*P,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*P,g=f-(f-P),m=P-g,D=d*m-(_-p*g-d*g-p*m),y=$-D,h=$-y,Wt[0]=$-(y+h)+(h-D),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Wt[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Wt[2]=x-(T-h)+(y-h),Wt[3]=T;const L=Ll(4,Or,4,Wt,$m);b=w*l,f=Ot*w,p=f-(f-w),d=w-p,f=Ot*l,g=f-(f-l),m=l-g,$=d*m-(b-p*g-d*g-p*m),_=S*c,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*c,g=f-(f-c),m=c-g,D=d*m-(_-p*g-d*g-p*m),y=$-D,h=$-y,Wt[0]=$-(y+h)+(h-D),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Wt[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Wt[2]=x-(T-h)+(y-h),Wt[3]=T;const M=Ll(L,$m,4,Wt,Sm);b=s*l,f=Ot*s,p=f-(f-s),d=s-p,f=Ot*l,g=f-(f-l),m=l-g,$=d*m-(b-p*g-d*g-p*m),_=u*c,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*c,g=f-(f-c),m=c-g,D=d*m-(_-p*g-d*g-p*m),y=$-D,h=$-y,Wt[0]=$-(y+h)+(h-D),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Wt[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Wt[2]=x-(T-h)+(y-h),Wt[3]=T;const F=Ll(M,Sm,4,Wt,Am);return Am[F-1]}function es(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,c=Math.abs(a+s);return Math.abs(u)>=P7*c?u:-C7(t,e,n,r,i,o,c)}const Mm=Math.pow(2,-52),ns=new Uint32Array(512);class rs{static from(e,n=N7,r=F7){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new rs(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let w=0;w<a;w++){const P=e[2*w],S=e[2*w+1];P<s&&(s=P),S<u&&(u=S),P>c&&(c=P),S>l&&(l=S),this._ids[w]=w}const h=(s+c)/2,f=(u+l)/2;let p,d,g;for(let w=0,P=1/0;w<a;w++){const S=Cl(h,f,e[2*w],e[2*w+1]);S<P&&(p=w,P=S)}const m=e[2*p],y=e[2*p+1];for(let w=0,P=1/0;w<a;w++){if(w===p)continue;const S=Cl(m,y,e[2*w],e[2*w+1]);S<P&&S>0&&(d=w,P=S)}let x=e[2*d],v=e[2*d+1],b=1/0;for(let w=0;w<a;w++){if(w===p||w===d)continue;const P=R7(m,y,x,v,e[2*w],e[2*w+1]);P<b&&(g=w,b=P)}let $=e[2*g],_=e[2*g+1];if(b===1/0){for(let S=0;S<a;S++)this._dists[S]=e[2*S]-e[0]||e[2*S+1]-e[1];Ur(this._ids,this._dists,0,a-1);const w=new Uint32Array(a);let P=0;for(let S=0,z=-1/0;S<a;S++){const k=this._ids[S],A=this._dists[k];A>z&&(w[P++]=k,z=A)}this.hull=w.subarray(0,P),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(es(m,y,x,v,$,_)<0){const w=d,P=x,S=v;d=g,x=$,v=_,g=w,$=P,_=S}const D=I7(m,y,x,v,$,_);this._cx=D.x,this._cy=D.y;for(let w=0;w<a;w++)this._dists[w]=Cl(e[2*w],e[2*w+1],D.x,D.y);Ur(this._ids,this._dists,0,a-1),this._hullStart=p;let T=3;r[p]=n[g]=d,r[d]=n[p]=g,r[g]=n[d]=p,i[p]=0,i[d]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=p,o[this._hashKey(x,v)]=d,o[this._hashKey($,_)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let w=0,P,S;w<this._ids.length;w++){const z=this._ids[w],k=e[2*z],A=e[2*z+1];if(w>0&&Math.abs(k-P)<=Mm&&Math.abs(A-S)<=Mm||(P=k,S=A,z===p||z===d||z===g))continue;let L=0;for(let R=0,C=this._hashKey(k,A);R<this._hashSize&&(L=o[(C+R)%this._hashSize],!(L!==-1&&L!==r[L]));R++);L=n[L];let M=L,F;for(;F=r[M],es(k,A,e[2*M],e[2*M+1],e[2*F],e[2*F+1])>=0;)if(M=F,M===L){M=-1;break}if(M===-1)continue;let O=this._addTriangle(M,z,r[M],-1,-1,i[M]);i[z]=this._legalize(O+2),i[M]=O,T++;let E=r[M];for(;F=r[E],es(k,A,e[2*E],e[2*E+1],e[2*F],e[2*F+1])<0;)O=this._addTriangle(E,z,F,i[z],-1,i[E]),i[z]=this._legalize(O+2),r[E]=E,T--,E=F;if(M===L)for(;F=n[M],es(k,A,e[2*F],e[2*F+1],e[2*M],e[2*M+1])<0;)O=this._addTriangle(F,z,M,-1,i[M],i[F]),this._legalize(O+2),i[F]=O,r[M]=M,T--,M=F;this._hullStart=n[z]=M,r[M]=n[E]=z,r[z]=E,o[this._hashKey(k,A)]=z,o[this._hashKey(e[2*M],e[2*M+1])]=M}this.hull=new Uint32Array(T);for(let w=0,P=this._hullStart;w<T;w++)this.hull[w]=P,P=r[P];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(E7(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=ns[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],p=n[e],d=n[l],g=n[h];if(k7(i[2*f],i[2*f+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=f;const y=r[h];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===h){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const x=c+(s+1)%3;o<ns.length&&(ns[o++]=x)}else{if(o===0)break;e=ns[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function E7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Cl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function k7(t,e,n,r,i,o,a,s){const u=t-a,c=e-s,l=n-a,h=r-s,f=i-a,p=o-s,d=u*u+c*c,g=l*l+h*h,m=f*f+p*p;return u*(h*m-g*p)-c*(l*m-g*f)+d*(l*p-h*f)<0}function R7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),p=(c*l-s*h)*f,d=(a*h-u*l)*f;return p*p+d*d}function I7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),p=t+(c*l-s*h)*f,d=e+(a*h-u*l)*f;return{x:p,y:d}}function Ur(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Zi(t,i,o),e[t[n]]>e[t[r]]&&Zi(t,n,r),e[t[o]]>e[t[r]]&&Zi(t,o,r),e[t[n]]>e[t[o]]&&Zi(t,n,o);const s=t[o],u=e[s];for(;;){do o++;while(e[t[o]]<u);do a--;while(e[t[a]]>u);if(a<o)break;Zi(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Ur(t,e,o,r),Ur(t,e,n,a-1)):(Ur(t,e,n,a-1),Ur(t,e,o,r))}}function Zi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function N7(t){return t[0]}function F7(t){return t[1]}const Dm=1e-6;class Xn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>Dm||Math.abs(this._y1-o)>Dm)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class El{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class Pm{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,x,v;g<y;g+=3,m+=2){const b=r[g]*2,$=r[g+1]*2,_=r[g+2]*2,D=e[b],T=e[b+1],w=e[$],P=e[$+1],S=e[_],z=e[_+1],k=w-D,A=P-T,L=S-D,M=z-T,F=(k*M-A*L)*2;if(Math.abs(F)<1e-9){if(o===void 0){o=a=0;for(const E of n)o+=e[E*2],a+=e[E*2+1];o/=n.length,a/=n.length}const O=1e9*Math.sign((o-D)*M-(a-T)*L);x=(D+S)/2-O*M,v=(T+z)/2+O*L}else{const O=1/F,E=k*k+A*A,R=L*L+M*M;x=D+(M*E-A*R)*O,v=T+(k*R-L*E)*O}s[m]=x,s[m+1]=v}let u=n[n.length-1],c,l=u*4,h,f=e[2*u],p,d=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],c=l,h=f,p=d,l=u*4,f=e[2*u],d=e[2*u+1],i[c+2]=i[l]=p-d,i[c+3]=i[l+1]=f-h}render(e){const n=e==null?e=new Xn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let l=0,h=r.length;l<h;++l){const f=r[l];if(f<l)continue;const p=Math.floor(l/3)*2,d=Math.floor(f/3)*2,g=a[p],m=a[p+1],y=a[d],x=a[d+1];this._renderSegment(g,m,y,x,e)}let u,c=o[o.length-1];for(let l=0;l<o.length;++l){u=c,c=o[l];const h=Math.floor(i[c]/3)*2,f=a[h],p=a[h+1],d=u*4,g=this._project(f,p,s[d+2],s[d+3]);g&&this._renderSegment(f,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new Xn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new Xn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new El;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),u=this._regioncode(r,i);s===0&&u===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,u))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,u=i.length;s<u;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+u-2)%u]&&n[(o+3)%a]===i[(s+u-1)%u]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let u=a;do{const c=Math.floor(u/3);if(s.push(n[c*2],n[c*2+1]),u=u%3===2?u-2:u+1,o[u]!==e)break;u=i[u]}while(u!==a&&u!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],u=n[r-1],c,l=this._regioncode(s,u),h,f=0;for(let p=0;p<r;p+=2)if(o=s,a=u,s=n[p],u=n[p+1],c=l,l=this._regioncode(s,u),c===0&&l===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let d,g,m,y,x;if(c===0){if((d=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,x]=d}else{if((d=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,x,g,m]=d,h=f,f=this._edgecode(g,m),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(g,m):i=[g,m]}h=f,f=this._edgecode(y,x),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,x):i=[y,x]}if(i)h=f,f=this._edgecode(i[0],i[1]),h&&f&&this._edge(e,h,f,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let u,c,l=o||a;l&8?(u=e+(r-e)*(this.ymax-n)/(i-n),c=this.ymax):l&4?(u=e+(r-e)*(this.ymin-n)/(i-n),c=this.ymin):l&2?(c=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(c=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=c,o=this._regioncode(e,n)):(r=u,i=c,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),u;if((u=this._project(s[0],s[1],r,i))&&s.unshift(u[0],u[1]),(u=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(u[0],u[1]),s=this._clipFinite(e,s))for(let c=0,l=s.length,h,f=this._edgecode(s[l-2],s[l-1]);c<l;c+=2)h=f,f=this._edgecode(s[c],s[c+1]),h&&f&&(c=this._edge(e,h,f,s,c),l=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,u;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(u=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(u=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,u=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,u=n+(o=a)*i)}return[s,u]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const G7=2*Math.PI,Br=Math.pow;function z7(t){return t[0]}function O7(t){return t[1]}function U7(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function B7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class kl{static from(e,n=z7,r=O7,i){return new kl("length"in e?Y7(e,n,r,i):Float64Array.from(H7(e,n,r,i)))}constructor(e){this._delaunator=new rs(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&U7(e)){this.collinear=Int32Array.from({length:n.length/2},(f,p)=>p).sort((f,p)=>n[2*f]-n[2*p]||n[2*f+1]-n[2*p+1]);const u=this.collinear[0],c=this.collinear[this.collinear.length-1],l=[n[2*u],n[2*u+1],n[2*c],n[2*c+1]],h=1e-8*Math.hypot(l[3]-l[1],l[2]-l[0]);for(let f=0,p=n.length/2;f<p;++f){const d=B7(n[2*f],n[2*f+1],h);n[2*f]=d[0],n[2*f+1]=d[1]}this._delaunator=new rs(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,c=r.length;u<c;++u){const l=o[u%3===2?u-2:u+1];(r[u]===-1||a[l]===-1)&&(a[l]=u)}for(let u=0,c=i.length;u<c;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new Pm(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(e);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const u=n[e];if(u===-1)return;let c=u,l=-1;do{if(yield l=a[c],c=c%3===2?c-2:c+1,a[c]!==e)return;if(c=o[c],c===-1){const h=r[(i[e]+1)%r.length];h!==l&&(yield h);return}}while(c!==u)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:u,points:c}=this;if(i[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,h=Br(n-c[e*2],2)+Br(r-c[e*2+1],2);const f=i[e];let p=f;do{let d=u[p];const g=Br(n-c[d*2],2)+Br(r-c[d*2+1],2);if(g<h&&(h=g,l=d),p=p%3===2?p-2:p+1,u[p]!==e)break;if(p=s[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&Br(n-c[p*2],2)+Br(r-c[p*2+1],2)<h)return p;break}}while(p!==f);return l}render(e){const n=e==null?e=new Xn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const u=i[a];if(u<a)continue;const c=o[a]*2,l=o[u]*2;e.moveTo(r[c],r[c+1]),e.lineTo(r[l],r[l+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new Xn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],u=i[o+1];e.moveTo(s+n,u),e.arc(s,u,n,0,G7)}return r&&r.value()}renderHull(e){const n=e==null?e=new Xn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const u=2*r[s];e.lineTo(i[u],i[u+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new El;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Xn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,u=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[u],i[u+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new El;return this.renderTriangle(e,n),n.value()}}function Y7(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*H7(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var Tm={},Rl={},Il=34,Ki=10,Nl=13;function Lm(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function W7(t,e){var n=Lm(t);return function(r,i){return e(n(r),i,t)}}function Cm(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function re(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function q7(t){return t<0?"-"+re(-t,6):t>9999?"+"+re(t,6):re(t,4)}function j7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":q7(t.getUTCFullYear())+"-"+re(t.getUTCMonth()+1,2)+"-"+re(t.getUTCDate(),2)+(i?"T"+re(e,2)+":"+re(n,2)+":"+re(r,2)+"."+re(i,3)+"Z":r?"T"+re(e,2)+":"+re(n,2)+":"+re(r,2)+"Z":n||e?"T"+re(e,2)+":"+re(n,2)+"Z":"")}function is(t){var e=new RegExp('["'+t+`
|
6
|
-
\r]`),n=t.charCodeAt(0);function r(h,f){var p,d,g=i(h,function(m,y){if(p)return p(m,y-1);d=m,p=f?
|
7
|
-
`)}function s(h,f){return f==null&&(f=
|
5
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function sa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var bi=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=yr(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(Ft(l))try{l()}catch(g){o=g instanceof dc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=yr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{zd(d)}catch(g){o=o??[],g instanceof dc?o=yi(yi([],mi(o)),mi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new dc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)zd(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&sa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&sa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Fd=bi.EMPTY;function Gd(t){return t instanceof bi||t&&"closed"in t&&Ft(t.remove)&&Ft(t.add)&&Ft(t.unsubscribe)}function zd(t){Ft(t)?t():t.unsubscribe()}var Od={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},m3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,yi([t,e],mi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Ud(t){m3.setTimeout(function(){throw t})}function gc(){}function ua(t){t()}var mc=function(t){Ee(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Gd(n)&&n.add(r)):r.destination=x3,r}return e.create=function(n,r,i){return new vi(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(bi),y3=Function.prototype.bind;function yc(t,e){return y3.call(t,e)}var b3=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){ca(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){ca(r)}else ca(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){ca(n)}},t}(),vi=function(t){Ee(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Ft(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Od.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&yc(n.next,s),error:n.error&&yc(n.error,s),complete:n.complete&&yc(n.complete,s)}):a=n}return o.destination=new b3(a),o}return e}(mc);function ca(t){Ud(t)}function v3(t){throw t}var x3={closed:!0,next:gc,error:v3,complete:gc},bc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Bd(t){return t}function _3(t){return t.length===0?Bd:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var cn=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=$3(e)?e:new vi(e,n,r);return ua(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Yd(n),new n(function(i,o){var a=new vi({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[bc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Yd(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Yd(t){var e;return(e=t??Od.Promise)!==null&&e!==void 0?e:Promise}function w3(t){return t&&Ft(t.next)&&Ft(t.error)&&Ft(t.complete)}function $3(t){return t&&t instanceof mc||w3(t)&&Gd(t)}function S3(t){return Ft(t==null?void 0:t.lift)}function xi(t){return function(e){if(S3(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function _i(t,e,n,r,i){return new A3(t,e,n,r,i)}var A3=function(t){Ee(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(mc),M3=pc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),wi=function(t){Ee(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Hd(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new M3},e.prototype.next=function(n){var r=this;ua(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=yr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ua(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ua(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Fd:(this.currentObservers=null,s.push(n),new bi(function(){r.currentObservers=null,sa(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new cn;return n.source=this,n},e.create=function(n,r){return new Hd(n,r)},e}(cn),Hd=function(t){Ee(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Fd},e}(wi),Wd=function(t){Ee(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(wi),vc={now:function(){return(vc.delegate||Date).now()},delegate:void 0},D3=function(t){Ee(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=vc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(wi),P3=function(t){Ee(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(bi),qd={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,yi([t,e],mi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},T3=function(t){Ee(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),qd.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&qd.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,sa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(P3),jd=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=vc.now,t}(),L3=function(t){Ee(e,t);function e(n,r){r===void 0&&(r=jd.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(jd);new L3(T3);var C3=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function E3(t){return Ft(t==null?void 0:t.then)}function k3(t){return Ft(t[bc])}function R3(t){return Symbol.asyncIterator&&Ft(t==null?void 0:t[Symbol.asyncIterator])}function I3(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function N3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var F3=N3();function G3(t){return Ft(t==null?void 0:t[F3])}function z3(t){return d3(this,arguments,function(){var e,n,r,i;return Nd(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,br(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,br(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,br(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function O3(t){return Ft(t==null?void 0:t.getReader)}function la(t){if(t instanceof cn)return t;if(t!=null){if(k3(t))return U3(t);if(C3(t))return B3(t);if(E3(t))return Y3(t);if(R3(t))return Xd(t);if(G3(t))return H3(t);if(O3(t))return W3(t)}throw I3(t)}function U3(t){return new cn(function(e){var n=t[bc]();if(Ft(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function B3(t){return new cn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Y3(t){return new cn(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Ud)})}function H3(t){return new cn(function(e){var n,r;try{for(var i=yr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Xd(t){return new cn(function(e){q3(t,e).catch(function(n){return e.error(n)})})}function W3(t){return Xd(z3(t))}function q3(t,e){var n,r,i,o;return p3(this,void 0,void 0,function(){var a,s;return Nd(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=g3(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}pc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function xc(t,e){return xi(function(n,r){var i=0;n.subscribe(_i(r,function(o){r.next(t.call(e,o,i++))}))})}function j3(t,e){return e===void 0&&(e=Bd),t=t??X3,xi(function(n,r){var i,o=!0;n.subscribe(_i(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function X3(t,e){return t===e}function V3(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new wi}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,d=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return xi(function(v,b){p++,!g&&!d&&m();var $=f=f??n();b.add(function(){p--,p===0&&!g&&!d&&(h=_c(x,u))}),$.subscribe(b),!l&&p>0&&(l=new vi({next:function(_){return $.next(_)},error:function(_){g=!0,m(),h=_c(y,i,_),$.error(_)},complete:function(){d=!0,m(),h=_c(y,a),$.complete()}}),la(v).subscribe(l))})(c)}}function _c(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new vi({next:function(){i.unsubscribe(),t()}});return la(e.apply(void 0,yi([],mi(n)))).subscribe(i)}}function Z3(t,e,n){var r,i=!1;return r=t,V3({connector:function(){return new D3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function K3(t,e){return xi(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(_i(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;la(t(u,l)).subscribe(i=_i(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function Q3(t){return xi(function(e,n){la(t).subscribe(_i(n,function(){return n.complete()},gc)),!n.closed&&e.subscribe(n)})}const J3=t=>t.pipe(xc(e=>e.styles.textSize),j3(),xc(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),Vd=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=fr.scaleDomain,scaleRange:i=fr.scaleRange})=>{const o=r[0]??fr.scaleDomain[0],a=r[1]??fr.scaleDomain[1],s=i[0]??fr.scaleRange[0],u=i[1]??fr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a,h=t-(t-c)/(1-s),f=l/u;return Rd().domain([h,f]).range([0,n])},Zd=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return r3().domain(t).range(r).padding(n)},tA=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Id().domain([-0,e+0]).range(i)};function eA({name:t,defaultParams:e,initFn:n}){const r=new wi,i=new WeakMap;let o=()=>{},a;const s=new Wd(e),u=new Wd({}),c=s.pipe(K3(l=>u.pipe(Q3(r),xc(h=>fc(h,l)))),Z3(1));return{params$:u,name:t,defaultParams:e,init(){a&&(o=n(a)??(()=>{}),i.set(a.selection,a))},destroy(){o(),a&&(a.selection.remove(),a=void 0),r.next(void 0)},setPresetParams:l=>{s.next(fc(l,e))},setContext:l=>{a=l,a.observer.fullParams$=c}}}const $i=()=>function(t,e){return function(n){return class{constructor(){const r=eA({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},Si=$i(),se=$i(),ke=$i(),Kd=$i(),Qd=$i();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Jd(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fa(t){let e,n,r;t.length!==2?(e=_t,n=(s,u)=>_t(t(s),u),r=(s,u)=>t(s)-u):(e=t===_t||t===Jd?t:nA,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function nA(){return 0}function ha(t){return t===null?NaN:+t}function*rA(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const tg=fa(_t),eg=tg.right,iA=tg.left,oA=fa(ha).center,Tn=eg;function aA(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=wc(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const ng=rg(wc),sA=rg(uA);function rg(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),u=r&&t(r),c=i.slice();return s&&u?(vr(s,c,i,o,a),vr(s,i,c,o,a),vr(s,c,i,o,a),xr(u,i,c,o,a),xr(u,c,i,o,a),xr(u,i,c,o,a)):s?(vr(s,i,c,o,a),vr(s,c,i,o,a),vr(s,i,c,o,a)):u&&(xr(u,i,c,o,a),xr(u,c,i,o,a),xr(u,i,c,o,a)),e}}function vr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function xr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function uA(t){const e=wc(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function wc(t){const e=Math.floor(t);if(e===t)return cA(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let c=e*o[a];const l=u*e,h=l+u;for(let f=a,p=a+l;f<p;f+=u)c+=o[Math.min(s,f)];for(let f=a,p=s;f<=p;f+=u)c+=o[Math.min(s,f+l)],i[f]=(c+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,c-=o[Math.max(a,f-l)]}}function cA(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let c=i,l=i+u;c<l;c+=a)s+=r[Math.min(o,c)];for(let c=i,l=o;c<=l;c+=a)s+=r[Math.min(o,c+u)],n[c]=s/e,s-=r[Math.max(i,c-u)]}}function pa(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function lA(t){return t.length|0}function fA(t){return!(t>0)}function hA(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function pA(t){return e=>t(...e)}function dA(...t){const e=typeof t[t.length-1]=="function"&&pA(t.pop());t=t.map(hA);const n=t.map(lA),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(fA))return o;for(;;){o.push(i.map((s,u)=>t[u][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function gA(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function ig(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function og(t,e){const n=ig(t,e);return n&&Math.sqrt(n)}function Ai(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Tt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function mA(t,e){const n=new Tt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function yA(t,e){const n=new Tt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Mi extends Map{constructor(e,n=ug){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get($c(this,e))}has(e){return super.has($c(this,e))}set(e,n){return super.set(ag(this,e),n)}delete(e){return super.delete(sg(this,e))}}class Ln extends Set{constructor(e,n=ug){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has($c(this,e))}add(e){return super.add(ag(this,e))}delete(e){return super.delete(sg(this,e))}}function $c({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function ag({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function sg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function ug(t){return t!==null&&typeof t=="object"?t.valueOf():t}function _r(t){return t}function cg(t,...e){return wr(t,_r,_r,e)}function lg(t,...e){return wr(t,Array.from,_r,e)}function fg(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function bA(t,...e){return fg(lg(t,...e),e)}function vA(t,e,...n){return fg(pg(t,e,...n),n)}function hg(t,e,...n){return wr(t,_r,e,n)}function pg(t,e,...n){return wr(t,Array.from,e,n)}function xA(t,...e){return wr(t,_r,dg,e)}function _A(t,...e){return wr(t,Array.from,dg,e)}function dg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function wr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Mi,u=r[a++];let c=-1;for(const l of o){const h=u(l,++c,o),f=s.get(h);f?f.push(l):s.set(h,[l])}for(const[l,h]of s)s.set(l,i(h,a));return e(s)}(t,0)}function gg(t,e){return Array.from(e,n=>t[n])}function Sc(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=$r(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>$r(n[i],n[o]))),gg(t,r)}return t.sort(Ac(n))}function Ac(t=_t){if(t===_t)return $r;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function $r(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function wA(t,e,n){return(e.length!==2?Sc(hg(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):Sc(cg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var $A=Array.prototype,SA=$A.slice;function Mc(t){return()=>t}const AA=Math.sqrt(50),MA=Math.sqrt(10),DA=Math.sqrt(2);function da(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=AA?10:o>=MA?5:o>=DA?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?da(t,e,n*2):[s,u,c]}function Cn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?da(e,t,n):da(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function En(t,e,n){return e=+e,t=+t,n=+n,da(t,e,n)[2]}function ga(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?En(e,t,n):En(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Dc(t,e,n){let r;for(;;){const i=En(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function Pc(t){return Math.max(1,Math.ceil(Math.log(pa(t))/Math.LN2)+1)}function mg(){var t=_r,e=Ai,n=Pc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,c=new Array(a);for(o=0;o<a;++o)c[o]=t(i[o],o,i);var l=e(c),h=l[0],f=l[1],p=n(c,h,f);if(!Array.isArray(p)){const v=f,b=+p;if(e===Ai&&([h,f]=Dc(h,f,b)),p=Cn(h,f,b),p[0]<=h&&(u=En(h,f,b)),p[p.length-1]>=f)if(v>=f&&e===Ai){const $=En(h,f,b);isFinite($)&&($>0?f=(Math.floor(f/$)+1)*$:$<0&&(f=(Math.ceil(f*-$)+1)/-$))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>f;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var y=new Array(d+1),x;for(o=0;o<=d;++o)x=y[o]=[],x.x0=o>0?p[o-1]:h,x.x1=o<d?p[o]:f;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Math.min(d,Math.floor((s-h)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=c[o])!=null&&h<=s&&s<=f){const v=Math.floor((h-s)*u);y[Math.min(d,v+(p[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Tn(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Mc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Mc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Mc(Array.isArray(i)?SA.call(i):i),r):n},r}function Di(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Tc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ma(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Lc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ya(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?$r:Ac(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,l=Math.log(u),h=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*h*(u-h)/u)*(c-u/2<0?-1:1),p=Math.max(n,Math.floor(e-c*h/u+f)),d=Math.min(r,Math.floor(e+(u-c)*h/u+f));ya(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(Pi(t,n,e),i(t[r],o)>0&&Pi(t,n,r);a<s;){for(Pi(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Pi(t,n,s):(++s,Pi(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Pi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function yg(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)>0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function Ti(t,e,n){if(t=Float64Array.from(rA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return ma(t);if(e>=1)return Di(t);var r,i=(r-1)*e,o=Math.floor(i),a=Di(ya(t,o).subarray(0,o+1)),s=ma(t.subarray(o+1));return a+(s-a)*(i-o)}}function bg(t,e,n=ha){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function vg(t,e,n=ha){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ha(n(t[u],u,t))),e<=0)return Lc(r);if(e>=1)return Tc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return ya(i,a,0,o,(s,u)=>$r(r[s],r[u])),a=yg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function PA(t,e,n){const r=pa(t),i=Ti(t,.75)-Ti(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function TA(t,e,n){const r=pa(t),i=og(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function LA(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function CA(t,e){return Ti(t,.5,e)}function EA(t,e){return vg(t,.5,e)}function*kA(t){for(const e of t)yield*e}function Cc(t){return Array.from(kA(t))}function RA(t,e){const n=new Mi;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function IA(t,e=NA){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function NA(t,e){return[t,e]}function ln(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function FA(t,e=_t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=_t);const i=(s,u)=>e(n[s],n[u]);let o,a;return t=Uint32Array.from(n,(s,u)=>u),t.sort(e===_t?(s,u)=>$r(n[s],n[u]):Ac(i)),t.forEach((s,u)=>{const c=i(s,o===void 0?s:o);c>=0?((o===void 0||c>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function GA(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)<0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function xg(t,e=_t){if(e.length===1)return Lc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function zA(t,e=_t){if(e.length===1)return Tc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function OA(t,e){const n=xg(t,e);return n<0?void 0:n}const UA=_g(Math.random);function _g(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function BA(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function wg(t){if(!(o=t.length))return[];for(var e=-1,n=ma(t,YA),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function YA(t){return t.length}function HA(){return wg(arguments)}function WA(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function qA(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function jA(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function XA(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function VA(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function ZA(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function KA(t,...e){t=new Ln(t);for(const n of e)for(const r of n)t.delete(r);return t}function QA(t,e){const n=e[Symbol.iterator](),r=new Ln;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function JA(t,...e){t=new Ln(t),e=e.map(t5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function t5(t){return t instanceof Ln?t:new Ln(t)}function $g(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Sg(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Sg(a);if(r.add(u),Object.is(o,u))break}}return!0}function Sg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function e5(t,e){return $g(e,t)}function n5(...t){const e=new Ln;for(const n of t)for(const r of n)e.add(r);return e}function r5(t){return t}var ba=1,va=2,Ec=3,Li=4,Ag=1e-6;function i5(t){return"translate("+t+",0)"}function o5(t){return"translate(0,"+t+")"}function a5(t){return e=>+t(e)}function s5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function u5(){return!this.__axis}function xa(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===ba||t===Li?-1:1,l=t===Li||t===va?"x":"y",h=t===ba||t===Ec?i5:o5;function f(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):r5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?s5:a5)(e.copy(),u),$=p.selection?p.selection():p,_=$.selectAll(".domain").data([null]),D=$.selectAll(".tick").data(d,e).order(),T=D.exit(),w=D.enter().append("g").attr("class","tick"),P=D.select("line"),S=D.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),D=D.merge(w),P=P.merge(w.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),S=S.merge(w.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===ba?"0em":t===Ec?"0.71em":"0.32em")),p!==$&&(_=_.transition(p),D=D.transition(p),P=P.transition(p),S=S.transition(p),T=T.transition(p).attr("opacity",Ag).attr("transform",function(z){return isFinite(z=b(z))?h(z+u):this.getAttribute("transform")}),w.attr("opacity",Ag).attr("transform",function(z){var k=this.parentNode.__axis;return h((k&&isFinite(k=k(z))?k:b(z))+u)})),T.remove(),_.attr("d",t===Li||t===va?a?"M"+c*a+","+x+"H"+u+"V"+v+"H"+c*a:"M"+u+","+x+"V"+v:a?"M"+x+","+c*a+"V"+u+"H"+v+"V"+c*a:"M"+x+","+u+"H"+v),D.attr("opacity",1).attr("transform",function(z){return h(b(z)+u)}),P.attr(l+"2",c*o),S.attr(l,c*m).text(g),$.filter(u5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===va?"start":t===Li?"end":"middle"),$.each(function(){this.__axis=b})}return f.scale=function(p){return arguments.length?(e=p,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),f):n.slice()},f.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),f):r&&r.slice()},f.tickFormat=function(p){return arguments.length?(i=p,f):i},f.tickSize=function(p){return arguments.length?(o=a=+p,f):o},f.tickSizeInner=function(p){return arguments.length?(o=+p,f):o},f.tickSizeOuter=function(p){return arguments.length?(a=+p,f):a},f.tickPadding=function(p){return arguments.length?(s=+p,f):s},f.offset=function(p){return arguments.length?(u=+p,f):u},f}function Mg(t){return xa(ba,t)}function c5(t){return xa(va,t)}function l5(t){return xa(Ec,t)}function Dg(t){return xa(Li,t)}var f5={value:()=>{}};function kn(){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 _a(n)}function _a(t){this._=t}function h5(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}})}_a.prototype=kn.prototype={constructor:_a,on:function(t,e){var n=this._,r=h5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=p5(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Pg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Pg(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 _a(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[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,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function p5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Pg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=f5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var kc="http://www.w3.org/1999/xhtml";const Rc={svg:"http://www.w3.org/2000/svg",xhtml:kc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ci(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Rc.hasOwnProperty(e)?{space:Rc[e],local:t}:t}function d5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kc&&e.documentElement.namespaceURI===kc?e.createElement(t):e.createElementNS(n,t)}}function g5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function wa(t){var e=Ci(t);return(e.local?g5:d5)(e)}function m5(){}function $a(t){return t==null?m5:function(){return this.querySelector(t)}}function y5(t){typeof t!="function"&&(t=$a(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Ht(r,this._parents)}function Tg(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function b5(){return[]}function Ic(t){return t==null?b5:function(){return this.querySelectorAll(t)}}function v5(t){return function(){return Tg(t.apply(this,arguments))}}function x5(t){typeof t=="function"?t=v5(t):t=Ic(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new Ht(r,i)}function Nc(t){return function(){return this.matches(t)}}function Lg(t){return function(e){return e.matches(t)}}var _5=Array.prototype.find;function w5(t){return function(){return _5.call(this.children,t)}}function $5(){return this.firstElementChild}function S5(t){return this.select(t==null?$5:w5(typeof t=="function"?t:Lg(t)))}var A5=Array.prototype.filter;function M5(){return Array.from(this.children)}function D5(t){return function(){return A5.call(this.children,t)}}function P5(t){return this.selectAll(t==null?M5:D5(typeof t=="function"?t:Lg(t)))}function T5(t){typeof t!="function"&&(t=Nc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Ht(r,this._parents)}function Cg(t){return new Array(t.length)}function L5(){return new Ht(this._enter||this._groups.map(Cg),this._parents)}function Sa(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Sa.prototype={constructor:Sa,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 C5(t){return function(){return t}}function E5(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Sa(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function k5(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),p;for(s=0;s<l;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",c.has(p)?i[s]=u:c.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=c.get(p))?(r[s]=u,u.__data__=o[s],c.delete(p)):n[s]=new Sa(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function R5(t){return t.__data__}function I5(t,e){if(!arguments.length)return Array.from(this,R5);var n=e?k5:E5,r=this._parents,i=this._groups;typeof t!="function"&&(t=C5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,p=N5(t.call(l,l&&l.__data__,c,r)),d=p.length,g=s[c]=new Array(d),m=a[c]=new Array(d),y=u[c]=new Array(f);n(l,h,g,m,y,p,e);for(var x=0,v=0,b,$;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<d;);b._next=$||null}}return a=new Ht(a,r),a._enter=s,a._exit=u,a}function N5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function F5(){return new Ht(this._exit||this._groups.map(Cg),this._parents)}function G5(t,e,n){var r=this.enter(),i=this,o=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?o.remove():n(o),r&&i?r.merge(i).order():i}function z5(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),p,d=0;d<h;++d)(p=c[d]||l[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new Ht(s,this._parents)}function O5(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function U5(t){t||(t=B5);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),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new Ht(i,this._parents).order()}function B5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Y5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function H5(){return Array.from(this)}function W5(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function q5(){let t=0;for(const e of this)++t;return t}function j5(){return!this.node()}function X5(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function V5(t){return function(){this.removeAttribute(t)}}function Z5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K5(t,e){return function(){this.setAttribute(t,e)}}function Q5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function J5(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function t6(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 e6(t,e){var n=Ci(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?Z5:V5:typeof e=="function"?n.local?t6:J5:n.local?Q5:K5)(n,e))}function Fc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function n6(t){return function(){this.style.removeProperty(t)}}function r6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function i6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function o6(t,e,n){return arguments.length>1?this.each((e==null?n6:typeof e=="function"?i6:r6)(t,e,n??"")):Rn(this.node(),t)}function Rn(t,e){return t.style.getPropertyValue(e)||Fc(t).getComputedStyle(t,null).getPropertyValue(e)}function a6(t){return function(){delete this[t]}}function s6(t,e){return function(){this[t]=e}}function u6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function c6(t,e){return arguments.length>1?this.each((e==null?a6:typeof e=="function"?u6:s6)(t,e)):this.node()[t]}function Eg(t){return t.trim().split(/^|\s+/)}function Gc(t){return t.classList||new kg(t)}function kg(t){this._node=t,this._names=Eg(t.getAttribute("class")||"")}kg.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 Rg(t,e){for(var n=Gc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ig(t,e){for(var n=Gc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function l6(t){return function(){Rg(this,t)}}function f6(t){return function(){Ig(this,t)}}function h6(t,e){return function(){(e.apply(this,arguments)?Rg:Ig)(this,t)}}function p6(t,e){var n=Eg(t+"");if(arguments.length<2){for(var r=Gc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?h6:e?l6:f6)(n,e))}function d6(){this.textContent=""}function g6(t){return function(){this.textContent=t}}function m6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function y6(t){return arguments.length?this.each(t==null?d6:(typeof t=="function"?m6:g6)(t)):this.node().textContent}function b6(){this.innerHTML=""}function v6(t){return function(){this.innerHTML=t}}function x6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function _6(t){return arguments.length?this.each(t==null?b6:(typeof t=="function"?x6:v6)(t)):this.node().innerHTML}function w6(){this.nextSibling&&this.parentNode.appendChild(this)}function $6(){return this.each(w6)}function S6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function A6(){return this.each(S6)}function M6(t){var e=typeof t=="function"?t:wa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function D6(){return null}function P6(t,e){var n=typeof t=="function"?t:wa(t),r=e==null?D6:typeof e=="function"?e:$a(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function T6(){var t=this.parentNode;t&&t.removeChild(this)}function L6(){return this.each(T6)}function C6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function E6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function k6(t){return this.select(t?E6:C6)}function R6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function I6(t){return function(e){t.call(this,e,this.__data__)}}function N6(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 F6(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function G6(t,e,n){return function(){var r=this.__on,i,o=I6(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function z6(t,e,n){var r=N6(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?G6:F6,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Ng(t,e,n){var r=Fc(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 O6(t,e){return function(){return Ng(this,t,e)}}function U6(t,e){return function(){return Ng(this,t,e.apply(this,arguments))}}function B6(t,e){return this.each((typeof e=="function"?U6:O6)(t,e))}function*Y6(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var zc=[null];function Ht(t,e){this._groups=t,this._parents=e}function In(){return new Ht([[document.documentElement]],zc)}function H6(){return this}Ht.prototype=In.prototype={constructor:Ht,select:y5,selectAll:x5,selectChild:S5,selectChildren:P5,filter:T5,data:I5,enter:L5,exit:F5,join:G5,merge:z5,selection:H6,order:O5,sort:U5,call:Y5,nodes:H5,node:W5,size:q5,empty:j5,each:X5,attr:e6,style:o6,property:c6,classed:p6,text:y6,html:_6,raise:$6,lower:A6,append:M6,insert:P6,remove:L6,clone:k6,datum:R6,on:z6,dispatch:B6,[Symbol.iterator]:Y6};function Z(t){return typeof t=="string"?new Ht([[document.querySelector(t)]],[document.documentElement]):new Ht([[t]],zc)}function W6(t){return Z(wa(t).call(document.documentElement))}var q6=0;function Fg(){return new Oc}function Oc(){this._="@"+(++q6).toString(36)}Oc.prototype=Fg.prototype={constructor:Oc,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Gg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ue(t,e){if(t=Gg(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function j6(t,e){return t.target&&(t=Gg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ue(n,e))}function X6(t){return typeof t=="string"?new Ht([document.querySelectorAll(t)],[document.documentElement]):new Ht([Tg(t)],zc)}const V6={passive:!1},Ei={capture:!0,passive:!1};function Uc(t){t.stopImmediatePropagation()}function Sr(t){t.preventDefault(),t.stopImmediatePropagation()}function Aa(t){var e=t.document.documentElement,n=Z(t).on("dragstart.drag",Sr,Ei);"onselectstart"in e?n.on("selectstart.drag",Sr,Ei):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ma(t,e){var n=t.document.documentElement,r=Z(t).on("dragstart.drag",null);e&&(r.on("click.drag",Sr,Ei),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Da=t=>()=>t;function Bc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}Bc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Z6(t){return!t.ctrlKey&&!t.button}function K6(){return this.parentNode}function Q6(t,e){return e??{x:t.x,y:t.y}}function J6(){return navigator.maxTouchPoints||"ontouchstart"in this}function zg(){var t=Z6,e=K6,n=Q6,r=J6,i={},o=kn("start","drag","end"),a=0,s,u,c,l,h=0;function f(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,V6).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,$){if(!(l||!t.call(this,b,$))){var _=v(this,e.call(this,b,$),b,$,"mouse");_&&(Z(b.view).on("mousemove.drag",d,Ei).on("mouseup.drag",g,Ei),Aa(b.view),Uc(b),c=!1,s=b.clientX,u=b.clientY,_("start",b))}}function d(b){if(Sr(b),!c){var $=b.clientX-s,_=b.clientY-u;c=$*$+_*_>h}i.mouse("drag",b)}function g(b){Z(b.view).on("mousemove.drag mouseup.drag",null),Ma(b.view,c),Sr(b),i.mouse("end",b)}function m(b,$){if(t.call(this,b,$)){var _=b.changedTouches,D=e.call(this,b,$),T=_.length,w,P;for(w=0;w<T;++w)(P=v(this,D,b,$,_[w].identifier,_[w]))&&(Uc(b),P("start",b,_[w]))}}function y(b){var $=b.changedTouches,_=$.length,D,T;for(D=0;D<_;++D)(T=i[$[D].identifier])&&(Sr(b),T("drag",b,$[D]))}function x(b){var $=b.changedTouches,_=$.length,D,T;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),D=0;D<_;++D)(T=i[$[D].identifier])&&(Uc(b),T("end",b,$[D]))}function v(b,$,_,D,T,w){var P=o.copy(),S=ue(w||_,$),z,k,A;if((A=n.call(b,new Bc("beforestart",{sourceEvent:_,target:f,identifier:T,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:P}),D))!=null)return z=A.x-S[0]||0,k=A.y-S[1]||0,function L(M,F,O){var E=S,R;switch(M){case"start":i[T]=L,R=a++;break;case"end":delete i[T],--a;case"drag":S=ue(O||F,$),R=a;break}P.call(M,b,new Bc(M,{sourceEvent:F,subject:A,target:f,identifier:T,active:R,x:S[0]+z,y:S[1]+k,dx:S[0]-E[0],dy:S[1]-E[1],dispatch:P}),D)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Da(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:Da(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Da(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Da(!!b),f):r},f.on=function(){var b=o.on.apply(o,arguments);return b===o?f:b},f.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,f):Math.sqrt(h)},f}function Ar(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ki(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fn(){}var Nn=.7,Mr=1/Nn,Dr="\\s*([+-]?\\d+)\\s*",Ri="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",t8=/^#([0-9a-f]{3,8})$/,e8=new RegExp(`^rgb\\(${Dr},${Dr},${Dr}\\)$`),n8=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),r8=new RegExp(`^rgba\\(${Dr},${Dr},${Dr},${Ri}\\)$`),i8=new RegExp(`^rgba\\(${Re},${Re},${Re},${Ri}\\)$`),o8=new RegExp(`^hsl\\(${Ri},${Re},${Re}\\)$`),a8=new RegExp(`^hsla\\(${Ri},${Re},${Re},${Ri}\\)$`),Og={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};Ar(fn,hn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ug,formatHex:Ug,formatHex8:s8,formatHsl:u8,formatRgb:Bg,toString:Bg});function Ug(){return this.rgb().formatHex()}function s8(){return this.rgb().formatHex8()}function u8(){return jg(this).formatHsl()}function Bg(){return this.rgb().formatRgb()}function hn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=t8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Yg(e):n===3?new Et(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Pa(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Pa(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=e8.exec(t))?new Et(e[1],e[2],e[3],1):(e=n8.exec(t))?new Et(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=r8.exec(t))?Pa(e[1],e[2],e[3],e[4]):(e=i8.exec(t))?Pa(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=o8.exec(t))?qg(e[1],e[2]/100,e[3]/100,1):(e=a8.exec(t))?qg(e[1],e[2]/100,e[3]/100,e[4]):Og.hasOwnProperty(t)?Yg(Og[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function Yg(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function Pa(t,e,n,r){return r<=0&&(t=e=n=NaN),new Et(t,e,n,r)}function Yc(t){return t instanceof fn||(t=hn(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function Pr(t,e,n,r){return arguments.length===1?Yc(t):new Et(t,e,n,r??1)}function Et(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ar(Et,Pr,ki(fn,{brighter(t){return t=t==null?Mr:Math.pow(Mr,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Nn:Math.pow(Nn,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(Fn(this.r),Fn(this.g),Fn(this.b),Ta(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:Hg,formatHex:Hg,formatHex8:c8,formatRgb:Wg,toString:Wg}));function Hg(){return`#${Gn(this.r)}${Gn(this.g)}${Gn(this.b)}`}function c8(){return`#${Gn(this.r)}${Gn(this.g)}${Gn(this.b)}${Gn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Wg(){const t=Ta(this.opacity);return`${t===1?"rgb(":"rgba("}${Fn(this.r)}, ${Fn(this.g)}, ${Fn(this.b)}${t===1?")":`, ${t})`}`}function Ta(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Fn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Gn(t){return t=Fn(t),(t<16?"0":"")+t.toString(16)}function qg(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Se(t,e,n,r)}function jg(t){if(t instanceof Se)return new Se(t.h,t.s,t.l,t.opacity);if(t instanceof fn||(t=hn(t)),!t)return new Se;if(t instanceof Se)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Se(a,s,u,t.opacity)}function La(t,e,n,r){return arguments.length===1?jg(t):new Se(t,e,n,r??1)}function Se(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ar(Se,La,ki(fn,{brighter(t){return t=t==null?Mr:Math.pow(Mr,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Nn:Math.pow(Nn,t),new Se(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 Et(Hc(t>=240?t-240:t+120,i,r),Hc(t,i,r),Hc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(Xg(this.h),Ca(this.s),Ca(this.l),Ta(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=Ta(this.opacity);return`${t===1?"hsl(":"hsla("}${Xg(this.h)}, ${Ca(this.s)*100}%, ${Ca(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Xg(t){return t=(t||0)%360,t<0?t+360:t}function Ca(t){return Math.max(0,Math.min(1,t||0))}function Hc(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 Vg=Math.PI/180,Zg=180/Math.PI,Ea=18,Kg=.96422,Qg=1,Jg=.82521,t0=4/29,Tr=6/29,e0=3*Tr*Tr,l8=Tr*Tr*Tr;function n0(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Ie)return i0(t);t instanceof Et||(t=Yc(t));var e=Xc(t.r),n=Xc(t.g),r=Xc(t.b),i=Wc((.2225045*e+.7168786*n+.0606169*r)/Qg),o,a;return e===n&&n===r?o=a=i:(o=Wc((.4360747*e+.3850649*n+.1430804*r)/Kg),a=Wc((.0139322*e+.0971045*n+.7141733*r)/Jg)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function f8(t,e){return new Ae(t,0,0,e??1)}function ka(t,e,n,r){return arguments.length===1?n0(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Ar(Ae,ka,ki(fn,{brighter(t){return new Ae(this.l+Ea*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-Ea*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Kg*qc(e),t=Qg*qc(t),n=Jg*qc(n),new Et(jc(3.1338561*e-1.6168667*t-.4906146*n),jc(-.9787684*e+1.9161415*t+.033454*n),jc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Wc(t){return t>l8?Math.pow(t,1/3):t/e0+t0}function qc(t){return t>Tr?t*t*t:e0*(t-t0)}function jc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Xc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function r0(t){if(t instanceof Ie)return new Ie(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=n0(t)),t.a===0&&t.b===0)return new Ie(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Zg;return new Ie(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function h8(t,e,n,r){return arguments.length===1?r0(t):new Ie(n,e,t,r??1)}function Ra(t,e,n,r){return arguments.length===1?r0(t):new Ie(t,e,n,r??1)}function Ie(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function i0(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*Vg;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Ar(Ie,Ra,ki(fn,{brighter(t){return new Ie(this.h,this.c,this.l+Ea*(t??1),this.opacity)},darker(t){return new Ie(this.h,this.c,this.l-Ea*(t??1),this.opacity)},rgb(){return i0(this).rgb()}}));var o0=-.14861,Vc=1.78277,Zc=-.29227,Ia=-.90649,Ii=1.97294,a0=Ii*Ia,s0=Ii*Vc,u0=Vc*Zc-Ia*o0;function p8(t){if(t instanceof zn)return new zn(t.h,t.s,t.l,t.opacity);t instanceof Et||(t=Yc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(u0*r+a0*e-s0*n)/(u0+a0-s0),o=r-i,a=(Ii*(n-i)-Zc*o)/Ia,s=Math.sqrt(a*a+o*o)/(Ii*i*(1-i)),u=s?Math.atan2(a,o)*Zg-120:NaN;return new zn(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?p8(t):new zn(t,e,n,r??1)}function zn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ar(zn,Me,ki(fn,{brighter(t){return t=t==null?Mr:Math.pow(Mr,t),new zn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Nn:Math.pow(Nn,t),new zn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Vg,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Et(255*(e+n*(o0*r+Vc*i)),255*(e+n*(Zc*r+Ia*i)),255*(e+n*(Ii*r)),this.opacity)}}));function c0(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function l0(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return c0((n-r/e)*e,a,i,o,s)}}function f0(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return c0((n-r/e)*e,i,o,a,s)}}const Na=t=>()=>t;function h0(t,e){return function(n){return t+n*e}}function d8(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 Fa(t,e){var n=e-t;return n?h0(t,n>180||n<-180?n-360*Math.round(n/360):n):Na(isNaN(t)?e:t)}function g8(t){return(t=+t)==1?kt:function(e,n){return n-e?d8(e,n,t):Na(isNaN(e)?n:e)}}function kt(t,e){var n=e-t;return n?h0(t,n):Na(isNaN(t)?e:t)}const Ni=function t(e){var n=g8(e);function r(i,o){var a=n((i=Pr(i)).r,(o=Pr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=kt(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function p0(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Pr(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=o(u),s+""}}}var d0=p0(l0),m8=p0(f0);function Kc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function g0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function y8(t,e){return(g0(e)?Kc:m0)(t,e)}function m0(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=pn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function y0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function pe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function b0(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]=pn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Qc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jc=new RegExp(Qc.source,"g");function b8(t){return function(){return t}}function v8(t){return function(e){return t(e)+""}}function tl(t,e){var n=Qc.lastIndex=Jc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Qc.exec(t))&&(i=Jc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:pe(r,i)})),n=Jc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?v8(u[0].x):b8(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function pn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Na(e):(n==="number"?pe:n==="string"?(r=hn(e))?(e=r,Ni):tl:e instanceof hn?Ni:e instanceof Date?y0:g0(e)?Kc:Array.isArray(e)?m0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?b0:pe)(t,e)}function x8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function _8(t,e){var n=Fa(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ga(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var v0=180/Math.PI,el={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function x0(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*v0,skewX:Math.atan(u)*v0,scaleX:a,scaleY:s}}var za;function w8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?el:x0(e.a,e.b,e.c,e.d,e.e,e.f)}function $8(t){return t==null||(za||(za=document.createElementNS("http://www.w3.org/2000/svg","g")),za.setAttribute("transform",t),!(t=za.transform.baseVal.consolidate()))?el:(t=t.matrix,x0(t.a,t.b,t.c,t.d,t.e,t.f))}function _0(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:pe(c,h)},{i:g-2,x:pe(l,f)})}else(h||f)&&p.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:pe(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:pe(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:pe(c,h)},{i:g-2,x:pe(l,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(p){for(var d=-1,g=f.length,m;++d<g;)h[(m=f[d]).i]=m.x(p);return h.join("")}}}var w0=_0(w8,"px, ","px)","deg)"),$0=_0($8,", ",")",")"),S8=1e-12;function S0(t){return((t=Math.exp(t))+1/t)/2}function A8(t){return((t=Math.exp(t))-1/t)/2}function M8(t){return((t=Math.exp(2*t))-1)/(t+1)}const A0=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],l=a[0],h=a[1],f=a[2],p=l-s,d=h-u,g=p*p+d*d,m,y;if(g<S8)y=Math.log(f/c)/e,m=function(D){return[s+D*p,u+D*d,c*Math.exp(e*D*y)]};else{var x=Math.sqrt(g),v=(f*f-c*c+r*g)/(2*c*n*x),b=(f*f-c*c-r*g)/(2*f*n*x),$=Math.log(Math.sqrt(v*v+1)-v),_=Math.log(Math.sqrt(b*b+1)-b);y=(_-$)/e,m=function(D){var T=D*y,w=S0($),P=c/(n*x)*(w*M8(e*T+$)-A8($));return[s+P*p,u+P*d,c*w/S0(e*T+$)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function M0(t){return function(e,n){var r=t((e=La(e)).h,(n=La(n)).h),i=kt(e.s,n.s),o=kt(e.l,n.l),a=kt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const D8=M0(Fa);var P8=M0(kt);function T8(t,e){var n=kt((t=ka(t)).l,(e=ka(e)).l),r=kt(t.a,e.a),i=kt(t.b,e.b),o=kt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function D0(t){return function(e,n){var r=t((e=Ra(e)).h,(n=Ra(n)).h),i=kt(e.c,n.c),o=kt(e.l,n.l),a=kt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const L8=D0(Fa);var C8=D0(kt);function P0(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=kt(i.s,o.s),u=kt(i.l,o.l),c=kt(i.opacity,o.opacity);return function(l){return i.h=a(l),i.s=s(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return r.gamma=e,r}(1)}const E8=P0(Fa);var Oa=P0(kt);function T0(t,e){e===void 0&&(e=t,t=pn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function k8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Lr=0,Fi=0,Gi=0,L0=1e3,Ua,zi,Ba=0,On=0,Ya=0,Oi=typeof performance=="object"&&performance.now?performance:Date,C0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ui(){return On||(C0(R8),On=Oi.now()+Ya)}function R8(){On=0}function Bi(){this._call=this._time=this._next=null}Bi.prototype=Ha.prototype={constructor:Bi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ui():+n)+(e==null?0:+e),!this._next&&zi!==this&&(zi?zi._next=this:Ua=this,zi=this),this._call=t,this._time=n,nl()},stop:function(){this._call&&(this._call=null,this._time=1/0,nl())}};function Ha(t,e,n){var r=new Bi;return r.restart(t,e,n),r}function E0(){Ui(),++Lr;for(var t=Ua,e;t;)(e=On-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Lr}function k0(){On=(Ba=Oi.now())+Ya,Lr=Fi=0;try{E0()}finally{Lr=0,N8(),On=0}}function I8(){var t=Oi.now(),e=t-Ba;e>L0&&(Ya-=e,Ba=t)}function N8(){for(var t,e=Ua,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:Ua=n);zi=t,nl(r)}function nl(t){if(!Lr){Fi&&(Fi=clearTimeout(Fi));var e=t-On;e>24?(t<1/0&&(Fi=setTimeout(k0,t-Oi.now()-Ya)),Gi&&(Gi=clearInterval(Gi))):(Gi||(Ba=Oi.now(),Gi=setInterval(I8,L0)),Lr=1,C0(k0))}}function rl(t,e,n){var r=new Bi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function F8(t,e,n){var r=new Bi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?Ui():+s,r._restart(function u(c){c+=i,r._restart(u,i+=a,s),o(c)},a,s)},r.restart(t,e,n),r)}var G8=kn("start","end","cancel","interrupt"),z8=[],R0=0,il=1,ol=2,Wa=3,I0=4,al=5,qa=6;function ja(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;O8(t,n,{name:e,index:r,group:i,on:G8,tween:z8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:R0})}function sl(t,e){var n=De(t,e);if(n.state>R0)throw new Error("too late; already scheduled");return n}function Ne(t,e){var n=De(t,e);if(n.state>Wa)throw new Error("too late; already running");return n}function De(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function O8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Ha(o,0,n.time);function o(c){n.state=il,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,p;if(n.state!==il)return u();for(l in r)if(p=r[l],p.name===n.name){if(p.state===Wa)return rl(a);p.state===I0?(p.state=qa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[l]):+l<e&&(p.state=qa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[l])}if(rl(function(){n.state===Wa&&(n.state=I0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=ol,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ol){for(n.state=Wa,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(p=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=al,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===al&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=qa,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Un(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>ol&&r.state<al,r.state=qa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function U8(t){return this.each(function(){Un(this,t)})}function B8(t,e){var n,r;return function(){var i=Ne(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function Y8(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ne(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function H8(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=De(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?B8:Y8)(n,t,e))}function ul(t,e,n){var r=t._id;return t.each(function(){var i=Ne(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return De(i,r).value[e]}}function N0(t,e){var n;return(typeof e=="number"?pe:e instanceof hn?Ni:(n=hn(e))?(e=n,Ni):tl)(t,e)}function W8(t){return function(){this.removeAttribute(t)}}function q8(t){return function(){this.removeAttributeNS(t.space,t.local)}}function j8(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function X8(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function V8(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function Z8(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function K8(t,e){var n=Ci(t),r=n==="transform"?$0:N0;return this.attrTween(t,typeof e=="function"?(n.local?Z8:V8)(n,r,ul(this,"attr."+t,e)):e==null?(n.local?q8:W8)(n):(n.local?X8:j8)(n,r,e))}function Q8(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function J8(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function tM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&J8(t,o)),n}return i._value=e,i}function eM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Q8(t,o)),n}return i._value=e,i}function nM(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=Ci(t);return this.tween(n,(r.local?tM:eM)(r,e))}function rM(t,e){return function(){sl(this,t).delay=+e.apply(this,arguments)}}function iM(t,e){return e=+e,function(){sl(this,t).delay=e}}function oM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?rM:iM)(e,t)):De(this.node(),e).delay}function aM(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function sM(t,e){return e=+e,function(){Ne(this,t).duration=e}}function uM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?aM:sM)(e,t)):De(this.node(),e).duration}function cM(t,e){if(typeof e!="function")throw new Error;return function(){Ne(this,t).ease=e}}function lM(t){var e=this._id;return arguments.length?this.each(cM(e,t)):De(this.node(),e).ease}function fM(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ne(this,t).ease=n}}function hM(t){if(typeof t!="function")throw new Error;return this.each(fM(this._id,t))}function pM(t){typeof t!="function"&&(t=Nc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Fe(r,this._parents,this._name,this._id)}function dM(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,p=0;p<l;++p)(f=u[p]||c[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new Fe(a,this._parents,this._name,this._id)}function gM(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 mM(t,e,n){var r,i,o=gM(e)?sl:Ne;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function yM(t,e){var n=this._id;return arguments.length<2?De(this.node(),n).on.on(t):this.each(mM(n,t,e))}function bM(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function vM(){return this.on("end.remove",bM(this._id))}function xM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=$a(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,ja(c[f],e,n,f,c,De(l,n)));return new Fe(o,this._parents,e,n)}function _M(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ic(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),p,d=De(l,n),g=0,m=f.length;g<m;++g)(p=f[g])&&ja(p,e,n,g,f,d);o.push(f),a.push(l)}return new Fe(o,a,e,n)}var wM=In.prototype.constructor;function $M(){return new wM(this._groups,this._parents)}function SM(t,e){var n,r,i;return function(){var o=Rn(this,t),a=(this.style.removeProperty(t),Rn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function F0(t){return function(){this.style.removeProperty(t)}}function AM(t,e,n){var r,i=n+"",o;return function(){var a=Rn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function MM(t,e,n){var r,i,o;return function(){var a=Rn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Rn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function DM(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ne(this,t),c=u.on,l=u.value[o]==null?s||(s=F0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function PM(t,e,n){var r=(t+="")=="transform"?w0:N0;return e==null?this.styleTween(t,SM(t,r)).on("end.style."+t,F0(t)):typeof e=="function"?this.styleTween(t,MM(t,r,ul(this,"style."+t,e))).each(DM(this._id,t)):this.styleTween(t,AM(t,r,e),n).on("end.style."+t,null)}function TM(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function LM(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&TM(t,a,n)),r}return o._value=e,o}function CM(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,LM(t,e,n??""))}function EM(t){return function(){this.textContent=t}}function kM(t){return function(){var e=t(this);this.textContent=e??""}}function RM(t){return this.tween("text",typeof t=="function"?kM(ul(this,"text",t)):EM(t==null?"":t+""))}function IM(t){return function(e){this.textContent=t.call(this,e)}}function NM(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&IM(i)),e}return r._value=t,r}function FM(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,NM(t))}function GM(){for(var t=this._name,e=this._id,n=z0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=De(u,e);ja(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Fe(r,this._parents,t,n)}function zM(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ne(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var OM=0;function Fe(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function G0(t){return In().transition(t)}function z0(){return++OM}var je=In.prototype;Fe.prototype=G0.prototype={constructor:Fe,select:xM,selectAll:_M,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:pM,merge:dM,selection:$M,transition:GM,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:yM,attr:K8,attrTween:nM,style:PM,styleTween:CM,text:RM,textTween:FM,remove:vM,tween:H8,delay:oM,duration:uM,ease:lM,easeVarying:hM,end:zM,[Symbol.iterator]:je[Symbol.iterator]};const UM=t=>+t;function BM(t){return t*t}function YM(t){return t*(2-t)}function O0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function HM(t){return t*t*t}function WM(t){return--t*t*t+1}function Yi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var cl=3,qM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(cl),jM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(cl),U0=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(cl),B0=Math.PI,Y0=B0/2;function XM(t){return+t==1?1:1-Math.cos(t*Y0)}function VM(t){return Math.sin(t*Y0)}function H0(t){return(1-Math.cos(B0*t))/2}function dn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function ZM(t){return dn(1-+t)}function KM(t){return 1-dn(t)}function W0(t){return((t*=2)<=1?dn(1-t):2-dn(t-1))/2}function QM(t){return 1-Math.sqrt(1-t*t)}function JM(t){return Math.sqrt(1- --t*t)}function q0(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var ll=4/11,t4=6/11,e4=8/11,n4=3/4,r4=9/11,i4=10/11,o4=15/16,a4=21/22,s4=63/64,Xa=1/ll/ll;function u4(t){return 1-Hi(1-t)}function Hi(t){return(t=+t)<ll?Xa*t*t:t<e4?Xa*(t-=t4)*t+n4:t<i4?Xa*(t-=r4)*t+o4:Xa*(t-=a4)*t+s4}function c4(t){return((t*=2)<=1?1-Hi(1-t):Hi(t-1)+1)/2}var fl=1.70158,l4=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(fl),f4=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(fl),j0=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(fl),Cr=2*Math.PI,hl=1,pl=.3,h4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Cr);function i(o){return e*dn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Cr)},i.period=function(o){return t(e,o)},i}(hl,pl),Va=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Cr);function i(o){return 1-e*dn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Cr)},i.period=function(o){return t(e,o)},i}(hl,pl),p4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Cr);function i(o){return((o=o*2-1)<0?e*dn(-o)*Math.sin((r-o)/n):2-e*dn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Cr)},i.period=function(o){return t(e,o)},i}(hl,pl),d4={time:null,delay:0,duration:250,ease:Yi};function g4(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 m4(t){var e,n;t instanceof Fe?(e=t._id,t=t._name):(e=z0(),(n=d4).time=Ui(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&ja(u,t,e,c,a,n||g4(u,e));return new Fe(r,this._parents,t,e)}In.prototype.interrupt=U8,In.prototype.transition=m4;var y4=[null];function b4(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>il&&r.name===e)return new Fe([[t]],y4,e,+i)}return null}const dl=t=>()=>t;function v4(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function x4(t){t.stopImmediatePropagation()}function gl(t){t.preventDefault(),t.stopImmediatePropagation()}var X0={name:"drag"},ml={name:"space"},Er={name:"handle"},kr={name:"center"};const{abs:V0,max:Gt,min:zt}=Math;function Z0(t){return[+t[0],+t[1]]}function yl(t){return[Z0(t[0]),Z0(t[1])]}var Za={name:"x",handles:["w","e"].map(Wi),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ka={name:"y",handles:["n","s"].map(Wi),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},_4={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Wi),input:function(t){return t==null?null:yl(t)},output:function(t){return t}},Xe={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},K0={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Q0={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},w4={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},$4={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Wi(t){return{type:t}}function S4(t){return!t.ctrlKey&&!t.button}function A4(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function M4(){return navigator.maxTouchPoints||"ontouchstart"in this}function bl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function D4(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function P4(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function T4(){return vl(Za)}function L4(){return vl(Ka)}function C4(){return vl(_4)}function vl(t){var e=A4,n=S4,r=M4,i=!0,o=kn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Wi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Xe.overlay).merge(y).each(function(){var v=bl(this).extent;Z(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1])}),m.selectAll(".selection").data([Wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Xe.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=m.selectAll(".handle").data(t.handles,function(v){return v.type});x.exit().remove(),x.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return Xe[v.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,y,x){m.tween?m.on("start.brush",function(v){l(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){l(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,$=l(v,arguments),_=b.selection,D=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),T=pn(_,D);function w(P){b.selection=P===1&&D===null?null:T(P),c.call(v),$.brush()}return _!==null&&D!==null?w:w(1)}):m.each(function(){var v=this,b=arguments,$=v.__brush,_=t.input(typeof y=="function"?y.apply(v,b):y,$.extent),D=l(v,b).beforestart();Un(v),$.selection=_===null?null:_,c.call(v),D.start(x).brush(x).end(x)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=Z(this),y=bl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(m,y,x){var v=m.__brush.emitter;return v&&(!x||!v.clean)?v:new h(m,y,x)}function h(m,y,x){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=x}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,x){var v=Z(this.that).datum();o.call(m,this.that,new v4(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:x,dispatch:o}),v)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,x=m.target.__data__.type,v=(i&&m.metaKey?x="overlay":x)==="selection"?X0:i&&m.altKey?kr:Er,b=t===Ka?null:w4[x],$=t===Za?null:$4[x],_=bl(y),D=_.extent,T=_.selection,w=D[0][0],P,S,z=D[0][1],k,A,L=D[1][0],M,F,O=D[1][1],E,R,C=0,N=0,j,Q=b&&$&&i&&m.shiftKey,I,X,q=Array.from(m.touches||[m],at=>{const Dt=at.identifier;return at=ue(at,y),at.point0=at.slice(),at.identifier=Dt,at});Un(y);var V=l(y,arguments,!0).beforestart();if(x==="overlay"){T&&(j=!0);const at=[q[0],q[1]||q[0]];_.selection=T=[[P=t===Ka?w:zt(at[0][0],at[1][0]),k=t===Za?z:zt(at[0][1],at[1][1])],[M=t===Ka?L:Gt(at[0][0],at[1][0]),E=t===Za?O:Gt(at[0][1],at[1][1])]],q.length>1&&mt(m)}else P=T[0][0],k=T[0][1],M=T[1][0],E=T[1][1];S=P,A=k,F=M,R=E;var W=Z(y).attr("pointer-events","none"),et=W.selectAll(".overlay").attr("cursor",Xe[x]);if(m.touches)V.moved=H,V.ended=pt;else{var ut=Z(m.view).on("mousemove.brush",H,!0).on("mouseup.brush",pt,!0);i&&ut.on("keydown.brush",Yt,!0).on("keyup.brush",ee,!0),Aa(m.view)}c.call(y),V.start(m,v.name);function H(at){for(const Dt of at.changedTouches||[at])for(const Eo of q)Eo.identifier===Dt.identifier&&(Eo.cur=ue(Dt,y));if(Q&&!I&&!X&&q.length===1){const Dt=q[0];V0(Dt.cur[0]-Dt[0])>V0(Dt.cur[1]-Dt[1])?X=!0:I=!0}for(const Dt of q)Dt.cur&&(Dt[0]=Dt.cur[0],Dt[1]=Dt.cur[1]);j=!0,gl(at),mt(at)}function mt(at){const Dt=q[0],Eo=Dt.point0;var Sn;switch(C=Dt[0]-Eo[0],N=Dt[1]-Eo[1],v){case ml:case X0:{b&&(C=Gt(w-P,zt(L-M,C)),S=P+C,F=M+C),$&&(N=Gt(z-k,zt(O-E,N)),A=k+N,R=E+N);break}case Er:{q[1]?(b&&(S=Gt(w,zt(L,q[0][0])),F=Gt(w,zt(L,q[1][0])),b=1),$&&(A=Gt(z,zt(O,q[0][1])),R=Gt(z,zt(O,q[1][1])),$=1)):(b<0?(C=Gt(w-P,zt(L-P,C)),S=P+C,F=M):b>0&&(C=Gt(w-M,zt(L-M,C)),S=P,F=M+C),$<0?(N=Gt(z-k,zt(O-k,N)),A=k+N,R=E):$>0&&(N=Gt(z-E,zt(O-E,N)),A=k,R=E+N));break}case kr:{b&&(S=Gt(w,zt(L,P-C*b)),F=Gt(w,zt(L,M+C*b))),$&&(A=Gt(z,zt(O,k-N*$)),R=Gt(z,zt(O,E+N*$)));break}}F<S&&(b*=-1,Sn=P,P=M,M=Sn,Sn=S,S=F,F=Sn,x in K0&&et.attr("cursor",Xe[x=K0[x]])),R<A&&($*=-1,Sn=k,k=E,E=Sn,Sn=A,A=R,R=Sn,x in Q0&&et.attr("cursor",Xe[x=Q0[x]])),_.selection&&(T=_.selection),I&&(S=T[0][0],F=T[1][0]),X&&(A=T[0][1],R=T[1][1]),(T[0][0]!==S||T[0][1]!==A||T[1][0]!==F||T[1][1]!==R)&&(_.selection=[[S,A],[F,R]],c.call(y),V.brush(at,v.name))}function pt(at){if(x4(at),at.touches){if(at.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Ma(at.view,j),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),et.attr("cursor",Xe.overlay),_.selection&&(T=_.selection),D4(T)&&(_.selection=null,c.call(y)),V.end(at,v.name)}function Yt(at){switch(at.keyCode){case 16:{Q=b&&$;break}case 18:{v===Er&&(b&&(M=F-C*b,P=S+C*b),$&&(E=R-N*$,k=A+N*$),v=kr,mt(at));break}case 32:{(v===Er||v===kr)&&(b<0?M=F-C:b>0&&(P=S-C),$<0?E=R-N:$>0&&(k=A-N),v=ml,et.attr("cursor",Xe.selection),mt(at));break}default:return}gl(at)}function ee(at){switch(at.keyCode){case 16:{Q&&(I=X=Q=!1,mt(at));break}case 18:{v===kr&&(b<0?M=F:b>0&&(P=S),$<0?E=R:$>0&&(k=A),v=Er,mt(at));break}case 32:{v===ml&&(at.altKey?(b&&(M=F-C*b,P=S+C*b),$&&(E=R-N*$,k=A+N*$),v=kr):(b<0?M=F:b>0&&(P=S),$<0?E=R:$>0&&(k=A),v=Er),et.attr("cursor",Xe[x]),mt(at));break}default:return}gl(at)}}function p(m){l(this,arguments).moved(m)}function d(m){l(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=yl(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:dl(yl(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:dl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:dl(!!m),u):r},u.handleSize=function(m){return arguments.length?(a=+m,u):a},u.keyModifiers=function(m){return arguments.length?(i=!!m,u):i},u.on=function(){var m=o.on.apply(o,arguments);return m===o?u:m},u}var J0=Math.abs,Rr=Math.cos,Ir=Math.sin,tm=Math.PI,Qa=tm/2,em=tm*2,nm=Math.max,xl=1e-12;function _l(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function E4(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function k4(){return wl(!1,!1)}function R4(){return wl(!1,!0)}function I4(){return wl(!0,!1)}function wl(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=_l(0,u),h=new Array(u*u),f=new Array(u),p=0,d;s=Float64Array.from({length:u*u},e?(g,m)=>s[m%u][m/u|0]:(g,m)=>s[m/u|0][m%u]);for(let g=0;g<u;++g){let m=0;for(let y=0;y<u;++y)m+=s[g*u+y]+t*s[y*u+g];p+=c[g]=m}p=nm(0,em-n*u)/p,d=p?n:em/u;{let g=0;r&&l.sort((m,y)=>r(c[m],c[y]));for(const m of l){const y=g;if(t){const x=_l(~u+1,u).filter(v=>v<0?s[~v*u+m]:s[m*u+v]);i&&x.sort((v,b)=>i(v<0?-s[~v*u+m]:s[m*u+v],b<0?-s[~b*u+m]:s[m*u+b]));for(const v of x)if(v<0){const b=h[~v*u+m]||(h[~v*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~v*u+m]*p,value:s[~v*u+m]}}else{const b=h[m*u+v]||(h[m*u+v]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const x=_l(0,u).filter(v=>s[m*u+v]||s[v*u+m]);i&&x.sort((v,b)=>i(s[m*u+v],s[m*u+b]));for(const v of x){let b;if(m<v?(b=h[m*u+v]||(h[m*u+v]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]}):(b=h[v*u+m]||(h[v*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]},m===v&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const $=b.source;b.source=b.target,b.target=$}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}g+=d}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=nm(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=E4(s))._=s,a):o&&o._},a}const $l=Math.PI,Sl=2*$l,Bn=1e-6,N4=Sl-Bn;function rm(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function F4(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return rm;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let qi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?rm:F4(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,l=a-e,h=s-n,f=l*l+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Bn)if(!(Math.abs(h*u-c*l)>Bn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=u*u+c*c,m=p*p+d*d,y=Math.sqrt(g),x=Math.sqrt(f),v=o*Math.tan(($l-Math.acos((g+f-m)/(2*y*x)))/2),b=v/x,$=v/y;Math.abs(b-1)>Bn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*p>l*d)},${this._x1=e+$*u},${this._y1=n+$*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,l=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Bn||Math.abs(this._y1-l)>Bn)&&this._append`L${c},${l}`,r&&(f<0&&(f=f%Sl+Sl),f>N4?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=c},${this._y1=l}`:f>Bn&&this._append`A${r},${r},0,${+(f>=$l)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Al(){return new qi}Al.prototype=qi.prototype;function G4(t=3){return new qi(+t)}var z4=Array.prototype.slice;function Yn(t){return function(){return t}}function O4(t){return t.source}function U4(t){return t.target}function im(t){return t.radius}function B4(t){return t.startAngle}function Y4(t){return t.endAngle}function H4(){return 0}function W4(){return 10}function om(t){var e=O4,n=U4,r=im,i=im,o=B4,a=Y4,s=H4,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=z4.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-Qa,y=a.apply(this,d)-Qa,x=+i.apply(this,(d[0]=f,d)),v=o.apply(this,d)-Qa,b=a.apply(this,d)-Qa;if(u||(u=l=Al()),p>xl&&(J0(y-m)>p*2+xl?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,J0(b-v)>p*2+xl?b>v?(v+=p,b-=p):(v-=p,b+=p):v=b=(v+b)/2),u.moveTo(g*Rr(m),g*Ir(m)),u.arc(0,0,g,m,y),m!==v||y!==b)if(t){var $=+t.apply(this,arguments),_=x-$,D=(v+b)/2;u.quadraticCurveTo(0,0,_*Rr(v),_*Ir(v)),u.lineTo(x*Rr(D),x*Ir(D)),u.lineTo(_*Rr(b),_*Ir(b))}else u.quadraticCurveTo(0,0,x*Rr(v),x*Ir(v)),u.arc(0,0,x,v,b);if(u.quadraticCurveTo(0,0,g*Rr(m),g*Ir(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:Yn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:Yn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:Yn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:Yn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:Yn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Yn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Yn(+l),c):s},c.source=function(l){return arguments.length?(e=l,c):e},c.target=function(l){return arguments.length?(n=l,c):n},c.context=function(l){return arguments.length?(u=l??null,c):u},c}function q4(){return om()}function j4(){return om(W4)}var X4=Array.prototype,am=X4.slice;function V4(t,e){return t-e}function Z4(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const gn=t=>()=>t;function K4(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=Q4(t,e[n]))return i;return 0}function Q4(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],h=t[s],f=h[0],p=h[1];if(J4(u,h,e))return 0;l>r!=p>r&&n<(f-c)*(r-l)/(p-l)+c&&(i=-i)}return i}function J4(t,e,n){var r;return t7(t,e,n)&&e7(t[r=+(t[0]===e[0])],n[r],e[r])}function t7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function e7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function n7(){}var Ve=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Ml(){var t=1,e=1,n=Pc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(V4);else{const h=Ai(c,r7);for(l=Cn(...Dc(h[0],h[1],l),l);l[l.length-1]>=h[1];)l.pop();for(;l[1]<h[0];)l.shift()}return l.map(h=>o(c,h))}function o(c,l){const h=l==null?NaN:+l;if(isNaN(h))throw new Error(`invalid value: ${l}`);var f=[],p=[];return a(c,h,function(d){r(d,c,h),Z4(d)>0?f.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=f.length,y;g<m;++g)if(K4((y=f[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:l,coordinates:f}}function a(c,l,h){var f=new Array,p=new Array,d,g,m,y,x,v;for(d=g=-1,y=Hn(c[0],l),Ve[y<<1].forEach(b);++d<t-1;)m=y,y=Hn(c[d+1],l),Ve[m|y<<1].forEach(b);for(Ve[y<<0].forEach(b);++g<e-1;){for(d=-1,y=Hn(c[g*t+t],l),x=Hn(c[g*t],l),Ve[y<<1|x<<2].forEach(b);++d<t-1;)m=y,y=Hn(c[g*t+t+d+1],l),v=x,x=Hn(c[g*t+d+1],l),Ve[m|y<<1|x<<2|v<<3].forEach(b);Ve[y|x<<3].forEach(b)}for(d=-1,x=c[g*t]>=l,Ve[x<<2].forEach(b);++d<t-1;)v=x,x=Hn(c[g*t+d+1],l),Ve[x<<2|v<<3].forEach(b);Ve[x<<3].forEach(b);function b($){var _=[$[0][0]+d,$[0][1]+g],D=[$[1][0]+d,$[1][1]+g],T=s(_),w=s(D),P,S;(P=p[T])?(S=f[w])?(delete p[P.end],delete f[S.start],P===S?(P.ring.push(D),h(P.ring)):f[P.start]=p[S.end]={start:P.start,end:S.end,ring:P.ring.concat(S.ring)}):(delete p[P.end],P.ring.push(D),p[P.end=w]=P):(P=f[w])?(S=p[T])?(delete f[P.start],delete p[S.end],P===S?(P.ring.push(D),h(P.ring)):f[S.start]=p[P.end]={start:S.start,end:P.end,ring:S.ring.concat(P.ring)}):(delete f[P.start],P.ring.unshift(_),f[P.start=T]=P):f[T]=p[w]={start:T,end:w,ring:[_,D]}}}function s(c){return c[0]*2+c[1]*(t+1)*4}function u(c,l,h){c.forEach(function(f){var p=f[0],d=f[1],g=p|0,m=d|0,y=Dl(l[m*t+g]);p>0&&p<t&&g===p&&(f[0]=sm(p,Dl(l[m*t+g-1]),y,h)),d>0&&d<e&&m===d&&(f[1]=sm(d,Dl(l[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(c){if(!arguments.length)return[t,e];var l=Math.floor(c[0]),h=Math.floor(c[1]);if(!(l>=0&&h>=0))throw new Error("invalid size");return t=l,e=h,i},i.thresholds=function(c){return arguments.length?(n=typeof c=="function"?c:Array.isArray(c)?gn(am.call(c)):gn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:n7,i):r===u},i}function r7(t){return isFinite(t)?t:NaN}function Hn(t,e){return t==null?!1:+t>=e}function Dl(t){return t==null||isNaN(t=+t)?-1/0:t}function sm(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function i7(t){return t[0]}function o7(t){return t[1]}function a7(){return 1}function s7(){var t=i7,e=o7,n=a7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=gn(20);function h(x){var v=new Float32Array(u*c),b=Math.pow(2,-a),$=-1;for(const k of x){var _=(t(k,++$,x)+s)*b,D=(e(k,$,x)+s)*b,T=+n(k,$,x);if(T&&_>=0&&_<u&&D>=0&&D<c){var w=Math.floor(_),P=Math.floor(D),S=_-w-.5,z=D-P-.5;v[w+P*u]+=(1-S)*(1-z)*T,v[w+1+P*u]+=S*(1-z)*T,v[w+1+(P+1)*u]+=S*z*T,v[w+(P+1)*u]+=(1-S)*z*T}}return ng({data:v,width:u,height:c},o*b),v}function f(x){var v=h(x),b=l(v),$=Math.pow(2,2*a);return Array.isArray(b)||(b=Cn(Number.MIN_VALUE,Di(v)/$,b)),Ml().size([u,c]).thresholds(b.map(_=>_*$))(v).map((_,D)=>(_.value=+b[D],p(_)))}f.contours=function(x){var v=h(x),b=Ml().size([u,c]),$=Math.pow(2,2*a),_=D=>{D=+D;var T=p(b.contour(v,D*$));return T.value=D,T};return Object.defineProperty(_,"max",{get:()=>Di(v)/$}),_};function p(x){return x.coordinates.forEach(d),x}function d(x){x.forEach(g)}function g(x){x.forEach(m)}function m(x){x[0]=x[0]*Math.pow(2,a)-s,x[1]=x[1]*Math.pow(2,a)-s}function y(){return s=o*3,u=r+s*2>>a,c=i+s*2>>a,f}return f.x=function(x){return arguments.length?(t=typeof x=="function"?x:gn(+x),f):t},f.y=function(x){return arguments.length?(e=typeof x=="function"?x:gn(+x),f):e},f.weight=function(x){return arguments.length?(n=typeof x=="function"?x:gn(+x),f):n},f.size=function(x){if(!arguments.length)return[r,i];var v=+x[0],b=+x[1];if(!(v>=0&&b>=0))throw new Error("invalid size");return r=v,i=b,y()},f.cellSize=function(x){if(!arguments.length)return 1<<a;if(!((x=+x)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(x)/Math.LN2),y()},f.thresholds=function(x){return arguments.length?(l=typeof x=="function"?x:Array.isArray(x)?gn(am.call(x)):gn(x),f):l},f.bandwidth=function(x){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*x*x+1)-1)/2,y()},f}const Ze=11102230246251565e-32,Ot=134217729,u7=(3+8*Ze)*Ze;function Pl(t,e,n,r,i){let o,a,s,u,c=e[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=e[++h]):(o=l,l=r[++f]);let p=0;if(h<t&&f<n)for(l>c==l>-c?(a=c+o,s=o-(a-c),c=e[++h]):(a=l+o,s=o-(a-l),l=r[++f]),o=a,s!==0&&(i[p++]=s);h<t&&f<n;)l>c==l>-c?(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h]):(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f]),o=a,s!==0&&(i[p++]=s);for(;h<t;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h],o=a,s!==0&&(i[p++]=s);for(;f<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function c7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function ji(t){return new Float64Array(t)}const l7=(3+16*Ze)*Ze,f7=(2+12*Ze)*Ze,h7=(9+64*Ze)*Ze*Ze,Nr=ji(4),um=ji(8),cm=ji(12),lm=ji(16),Wt=ji(4);function p7(t,e,n,r,i,o,a){let s,u,c,l,h,f,p,d,g,m,y,x,v,b,$,_,D,T;const w=t-i,P=n-i,S=e-o,z=r-o;b=w*z,f=Ot*w,p=f-(f-w),d=w-p,f=Ot*z,g=f-(f-z),m=z-g,$=d*m-(b-p*g-d*g-p*m),_=S*P,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*P,g=f-(f-P),m=P-g,D=d*m-(_-p*g-d*g-p*m),y=$-D,h=$-y,Nr[0]=$-(y+h)+(h-D),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Nr[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Nr[2]=x-(T-h)+(y-h),Nr[3]=T;let k=c7(4,Nr),A=f7*a;if(k>=A||-k>=A||(h=t-w,s=t-(w+h)+(h-i),h=n-P,c=n-(P+h)+(h-i),h=e-S,u=e-(S+h)+(h-o),h=r-z,l=r-(z+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(A=h7*a+u7*Math.abs(k),k+=w*l+z*s-(S*c+P*u),k>=A||-k>=A))return k;b=s*z,f=Ot*s,p=f-(f-s),d=s-p,f=Ot*z,g=f-(f-z),m=z-g,$=d*m-(b-p*g-d*g-p*m),_=u*P,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*P,g=f-(f-P),m=P-g,D=d*m-(_-p*g-d*g-p*m),y=$-D,h=$-y,Wt[0]=$-(y+h)+(h-D),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Wt[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Wt[2]=x-(T-h)+(y-h),Wt[3]=T;const L=Pl(4,Nr,4,Wt,um);b=w*l,f=Ot*w,p=f-(f-w),d=w-p,f=Ot*l,g=f-(f-l),m=l-g,$=d*m-(b-p*g-d*g-p*m),_=S*c,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*c,g=f-(f-c),m=c-g,D=d*m-(_-p*g-d*g-p*m),y=$-D,h=$-y,Wt[0]=$-(y+h)+(h-D),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Wt[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Wt[2]=x-(T-h)+(y-h),Wt[3]=T;const M=Pl(L,um,4,Wt,cm);b=s*l,f=Ot*s,p=f-(f-s),d=s-p,f=Ot*l,g=f-(f-l),m=l-g,$=d*m-(b-p*g-d*g-p*m),_=u*c,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*c,g=f-(f-c),m=c-g,D=d*m-(_-p*g-d*g-p*m),y=$-D,h=$-y,Wt[0]=$-(y+h)+(h-D),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Wt[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Wt[2]=x-(T-h)+(y-h),Wt[3]=T;const F=Pl(M,cm,4,Wt,lm);return lm[F-1]}function Ja(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,c=Math.abs(a+s);return Math.abs(u)>=l7*c?u:-p7(t,e,n,r,i,o,c)}const fm=Math.pow(2,-52),ts=new Uint32Array(512);class es{static from(e,n=b7,r=v7){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new es(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let w=0;w<a;w++){const P=e[2*w],S=e[2*w+1];P<s&&(s=P),S<u&&(u=S),P>c&&(c=P),S>l&&(l=S),this._ids[w]=w}const h=(s+c)/2,f=(u+l)/2;let p,d,g;for(let w=0,P=1/0;w<a;w++){const S=Tl(h,f,e[2*w],e[2*w+1]);S<P&&(p=w,P=S)}const m=e[2*p],y=e[2*p+1];for(let w=0,P=1/0;w<a;w++){if(w===p)continue;const S=Tl(m,y,e[2*w],e[2*w+1]);S<P&&S>0&&(d=w,P=S)}let x=e[2*d],v=e[2*d+1],b=1/0;for(let w=0;w<a;w++){if(w===p||w===d)continue;const P=m7(m,y,x,v,e[2*w],e[2*w+1]);P<b&&(g=w,b=P)}let $=e[2*g],_=e[2*g+1];if(b===1/0){for(let S=0;S<a;S++)this._dists[S]=e[2*S]-e[0]||e[2*S+1]-e[1];Fr(this._ids,this._dists,0,a-1);const w=new Uint32Array(a);let P=0;for(let S=0,z=-1/0;S<a;S++){const k=this._ids[S],A=this._dists[k];A>z&&(w[P++]=k,z=A)}this.hull=w.subarray(0,P),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Ja(m,y,x,v,$,_)<0){const w=d,P=x,S=v;d=g,x=$,v=_,g=w,$=P,_=S}const D=y7(m,y,x,v,$,_);this._cx=D.x,this._cy=D.y;for(let w=0;w<a;w++)this._dists[w]=Tl(e[2*w],e[2*w+1],D.x,D.y);Fr(this._ids,this._dists,0,a-1),this._hullStart=p;let T=3;r[p]=n[g]=d,r[d]=n[p]=g,r[g]=n[d]=p,i[p]=0,i[d]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=p,o[this._hashKey(x,v)]=d,o[this._hashKey($,_)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let w=0,P,S;w<this._ids.length;w++){const z=this._ids[w],k=e[2*z],A=e[2*z+1];if(w>0&&Math.abs(k-P)<=fm&&Math.abs(A-S)<=fm||(P=k,S=A,z===p||z===d||z===g))continue;let L=0;for(let R=0,C=this._hashKey(k,A);R<this._hashSize&&(L=o[(C+R)%this._hashSize],!(L!==-1&&L!==r[L]));R++);L=n[L];let M=L,F;for(;F=r[M],Ja(k,A,e[2*M],e[2*M+1],e[2*F],e[2*F+1])>=0;)if(M=F,M===L){M=-1;break}if(M===-1)continue;let O=this._addTriangle(M,z,r[M],-1,-1,i[M]);i[z]=this._legalize(O+2),i[M]=O,T++;let E=r[M];for(;F=r[E],Ja(k,A,e[2*E],e[2*E+1],e[2*F],e[2*F+1])<0;)O=this._addTriangle(E,z,F,i[z],-1,i[E]),i[z]=this._legalize(O+2),r[E]=E,T--,E=F;if(M===L)for(;F=n[M],Ja(k,A,e[2*F],e[2*F+1],e[2*M],e[2*M+1])<0;)O=this._addTriangle(F,z,M,-1,i[M],i[F]),this._legalize(O+2),i[F]=O,r[M]=M,T--,M=F;this._hullStart=n[z]=M,r[M]=n[E]=z,r[z]=E,o[this._hashKey(k,A)]=z,o[this._hashKey(e[2*M],e[2*M+1])]=M}this.hull=new Uint32Array(T);for(let w=0,P=this._hullStart;w<T;w++)this.hull[w]=P,P=r[P];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(d7(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=ts[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],p=n[e],d=n[l],g=n[h];if(g7(i[2*f],i[2*f+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=f;const y=r[h];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===h){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const x=c+(s+1)%3;o<ts.length&&(ts[o++]=x)}else{if(o===0)break;e=ts[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function d7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Tl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function g7(t,e,n,r,i,o,a,s){const u=t-a,c=e-s,l=n-a,h=r-s,f=i-a,p=o-s,d=u*u+c*c,g=l*l+h*h,m=f*f+p*p;return u*(h*m-g*p)-c*(l*m-g*f)+d*(l*p-h*f)<0}function m7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),p=(c*l-s*h)*f,d=(a*h-u*l)*f;return p*p+d*d}function y7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),p=t+(c*l-s*h)*f,d=e+(a*h-u*l)*f;return{x:p,y:d}}function Fr(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Xi(t,i,o),e[t[n]]>e[t[r]]&&Xi(t,n,r),e[t[o]]>e[t[r]]&&Xi(t,o,r),e[t[n]]>e[t[o]]&&Xi(t,n,o);const s=t[o],u=e[s];for(;;){do o++;while(e[t[o]]<u);do a--;while(e[t[a]]>u);if(a<o)break;Xi(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Fr(t,e,o,r),Fr(t,e,n,a-1)):(Fr(t,e,n,a-1),Fr(t,e,o,r))}}function Xi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b7(t){return t[0]}function v7(t){return t[1]}const hm=1e-6;class Wn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>hm||Math.abs(this._y1-o)>hm)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Ll{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class pm{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,x,v;g<y;g+=3,m+=2){const b=r[g]*2,$=r[g+1]*2,_=r[g+2]*2,D=e[b],T=e[b+1],w=e[$],P=e[$+1],S=e[_],z=e[_+1],k=w-D,A=P-T,L=S-D,M=z-T,F=(k*M-A*L)*2;if(Math.abs(F)<1e-9){if(o===void 0){o=a=0;for(const E of n)o+=e[E*2],a+=e[E*2+1];o/=n.length,a/=n.length}const O=1e9*Math.sign((o-D)*M-(a-T)*L);x=(D+S)/2-O*M,v=(T+z)/2+O*L}else{const O=1/F,E=k*k+A*A,R=L*L+M*M;x=D+(M*E-A*R)*O,v=T+(k*R-L*E)*O}s[m]=x,s[m+1]=v}let u=n[n.length-1],c,l=u*4,h,f=e[2*u],p,d=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],c=l,h=f,p=d,l=u*4,f=e[2*u],d=e[2*u+1],i[c+2]=i[l]=p-d,i[c+3]=i[l+1]=f-h}render(e){const n=e==null?e=new Wn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let l=0,h=r.length;l<h;++l){const f=r[l];if(f<l)continue;const p=Math.floor(l/3)*2,d=Math.floor(f/3)*2,g=a[p],m=a[p+1],y=a[d],x=a[d+1];this._renderSegment(g,m,y,x,e)}let u,c=o[o.length-1];for(let l=0;l<o.length;++l){u=c,c=o[l];const h=Math.floor(i[c]/3)*2,f=a[h],p=a[h+1],d=u*4,g=this._project(f,p,s[d+2],s[d+3]);g&&this._renderSegment(f,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new Wn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new Wn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Ll;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),u=this._regioncode(r,i);s===0&&u===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,u))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,u=i.length;s<u;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+u-2)%u]&&n[(o+3)%a]===i[(s+u-1)%u]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let u=a;do{const c=Math.floor(u/3);if(s.push(n[c*2],n[c*2+1]),u=u%3===2?u-2:u+1,o[u]!==e)break;u=i[u]}while(u!==a&&u!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],u=n[r-1],c,l=this._regioncode(s,u),h,f=0;for(let p=0;p<r;p+=2)if(o=s,a=u,s=n[p],u=n[p+1],c=l,l=this._regioncode(s,u),c===0&&l===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let d,g,m,y,x;if(c===0){if((d=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,x]=d}else{if((d=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,x,g,m]=d,h=f,f=this._edgecode(g,m),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(g,m):i=[g,m]}h=f,f=this._edgecode(y,x),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,x):i=[y,x]}if(i)h=f,f=this._edgecode(i[0],i[1]),h&&f&&this._edge(e,h,f,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let u,c,l=o||a;l&8?(u=e+(r-e)*(this.ymax-n)/(i-n),c=this.ymax):l&4?(u=e+(r-e)*(this.ymin-n)/(i-n),c=this.ymin):l&2?(c=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(c=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=c,o=this._regioncode(e,n)):(r=u,i=c,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),u;if((u=this._project(s[0],s[1],r,i))&&s.unshift(u[0],u[1]),(u=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(u[0],u[1]),s=this._clipFinite(e,s))for(let c=0,l=s.length,h,f=this._edgecode(s[l-2],s[l-1]);c<l;c+=2)h=f,f=this._edgecode(s[c],s[c+1]),h&&f&&(c=this._edge(e,h,f,s,c),l=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,u;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(u=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(u=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,u=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,u=n+(o=a)*i)}return[s,u]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const x7=2*Math.PI,Gr=Math.pow;function _7(t){return t[0]}function w7(t){return t[1]}function $7(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function S7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Cl{static from(e,n=_7,r=w7,i){return new Cl("length"in e?A7(e,n,r,i):Float64Array.from(M7(e,n,r,i)))}constructor(e){this._delaunator=new es(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&$7(e)){this.collinear=Int32Array.from({length:n.length/2},(f,p)=>p).sort((f,p)=>n[2*f]-n[2*p]||n[2*f+1]-n[2*p+1]);const u=this.collinear[0],c=this.collinear[this.collinear.length-1],l=[n[2*u],n[2*u+1],n[2*c],n[2*c+1]],h=1e-8*Math.hypot(l[3]-l[1],l[2]-l[0]);for(let f=0,p=n.length/2;f<p;++f){const d=S7(n[2*f],n[2*f+1],h);n[2*f]=d[0],n[2*f+1]=d[1]}this._delaunator=new es(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,c=r.length;u<c;++u){const l=o[u%3===2?u-2:u+1];(r[u]===-1||a[l]===-1)&&(a[l]=u)}for(let u=0,c=i.length;u<c;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new pm(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(e);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const u=n[e];if(u===-1)return;let c=u,l=-1;do{if(yield l=a[c],c=c%3===2?c-2:c+1,a[c]!==e)return;if(c=o[c],c===-1){const h=r[(i[e]+1)%r.length];h!==l&&(yield h);return}}while(c!==u)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:u,points:c}=this;if(i[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,h=Gr(n-c[e*2],2)+Gr(r-c[e*2+1],2);const f=i[e];let p=f;do{let d=u[p];const g=Gr(n-c[d*2],2)+Gr(r-c[d*2+1],2);if(g<h&&(h=g,l=d),p=p%3===2?p-2:p+1,u[p]!==e)break;if(p=s[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&Gr(n-c[p*2],2)+Gr(r-c[p*2+1],2)<h)return p;break}}while(p!==f);return l}render(e){const n=e==null?e=new Wn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const u=i[a];if(u<a)continue;const c=o[a]*2,l=o[u]*2;e.moveTo(r[c],r[c+1]),e.lineTo(r[l],r[l+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new Wn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],u=i[o+1];e.moveTo(s+n,u),e.arc(s,u,n,0,x7)}return r&&r.value()}renderHull(e){const n=e==null?e=new Wn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const u=2*r[s];e.lineTo(i[u],i[u+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Ll;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Wn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,u=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[u],i[u+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Ll;return this.renderTriangle(e,n),n.value()}}function A7(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*M7(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var dm={},El={},kl=34,Vi=10,Rl=13;function gm(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function D7(t,e){var n=gm(t);return function(r,i){return e(n(r),i,t)}}function mm(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function re(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function P7(t){return t<0?"-"+re(-t,6):t>9999?"+"+re(t,6):re(t,4)}function T7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":P7(t.getUTCFullYear())+"-"+re(t.getUTCMonth()+1,2)+"-"+re(t.getUTCDate(),2)+(i?"T"+re(e,2)+":"+re(n,2)+":"+re(r,2)+"."+re(i,3)+"Z":r?"T"+re(e,2)+":"+re(n,2)+":"+re(r,2)+"Z":n||e?"T"+re(e,2)+":"+re(n,2)+"Z":"")}function ns(t){var e=new RegExp('["'+t+`
|
6
|
+
\r]`),n=t.charCodeAt(0);function r(h,f){var p,d,g=i(h,function(m,y){if(p)return p(m,y-1);d=m,p=f?D7(m,f):gm(m)});return g.columns=d||[],g}function i(h,f){var p=[],d=h.length,g=0,m=0,y,x=d<=0,v=!1;h.charCodeAt(d-1)===Vi&&--d,h.charCodeAt(d-1)===Rl&&--d;function b(){if(x)return El;if(v)return v=!1,dm;var _,D=g,T;if(h.charCodeAt(D)===kl){for(;g++<d&&h.charCodeAt(g)!==kl||h.charCodeAt(++g)===kl;);return(_=g)>=d?x=!0:(T=h.charCodeAt(g++))===Vi?v=!0:T===Rl&&(v=!0,h.charCodeAt(g)===Vi&&++g),h.slice(D+1,_-1).replace(/""/g,'"')}for(;g<d;){if((T=h.charCodeAt(_=g++))===Vi)v=!0;else if(T===Rl)v=!0,h.charCodeAt(g)===Vi&&++g;else if(T!==n)continue;return h.slice(D,_)}return x=!0,h.slice(D,d)}for(;(y=b())!==El;){for(var $=[];y!==dm&&y!==El;)$.push(y),y=b();f&&($=f($,m++))==null||p.push($)}return p}function o(h,f){return h.map(function(p){return f.map(function(d){return l(p[d])}).join(t)})}function a(h,f){return f==null&&(f=mm(h)),[f.map(l).join(t)].concat(o(h,f)).join(`
|
7
|
+
`)}function s(h,f){return f==null&&(f=mm(h)),o(h,f).join(`
|
8
8
|
`)}function u(h){return h.map(c).join(`
|
9
|
-
`)}function c(h){return h.map(l).join(t)}function l(h){return h==null?"":h instanceof Date?j7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:l}}var Vn=is(","),Em=Vn.parse,X7=Vn.parseRows,V7=Vn.format,Z7=Vn.formatBody,K7=Vn.formatRows,Q7=Vn.formatRow,J7=Vn.formatValue,Zn=is(" "),km=Zn.parse,tD=Zn.parseRows,eD=Zn.format,nD=Zn.formatBody,rD=Zn.formatRows,iD=Zn.formatRow,oD=Zn.formatValue;function aD(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))sD&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const sD=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function uD(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function cD(t,e){return fetch(t,e).then(uD)}function lD(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function fD(t,e){return fetch(t,e).then(lD)}function hD(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function os(t,e){return fetch(t,e).then(hD)}function Rm(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),os(e,n).then(function(i){return t(i,r)})}}function pD(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=is(t);return os(e,n).then(function(o){return i.parse(o,r)})}var dD=Rm(Em),gD=Rm(km);function mD(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function yD(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function bD(t,e){return fetch(t,e).then(yD)}function Fl(t){return(e,n)=>os(e,n).then(r=>new DOMParser().parseFromString(r,t))}const vD=Fl("application/xml");var xD=Fl("text/html"),_D=Fl("image/svg+xml");function wD(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,c=0;for(o=0;o<a;++o)s=n[o],u+=s.x,c+=s.y;for(u=(u/a-t)*r,c=(c/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function $D(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Im(this.cover(e,n),e,n,t)}function Im(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,u=t._y0,c=t._x1,l=t._y1,h,f,p,d,g,m,y,x;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),e===p&&n===d)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f;while((y=m<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,t}function SD(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<r;++n)Im(this,a[n],s[n],t[n]);return this}function AD(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,u,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,u=new Array(4),u[c]=s,s=u,a*=2,c){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function MD(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function DD(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function PD(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,c,l=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new qt(p,i,o,l,h)),n==null?n=1/0:(i=t-n,o=e-n,l=t+n,h=e+n,n*=n);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>l||(s=d.y0)>h||(u=d.x1)<i||(c=d.y1)<o))if(p.length){var m=(a+u)/2,y=(s+c)/2;f.push(new qt(p[3],m,y,u,c),new qt(p[2],a,y,m,c),new qt(p[1],m,s,u,y),new qt(p[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var x=t-+this._x.call(null,p.data),v=e-+this._y.call(null,p.data),b=x*x+v*v;if(b<n){var $=Math.sqrt(n=b);i=t-$,o=e-$,l=t+$,h=e+$,r=p.data}}return r}function TD(t){if(isNaN(l=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,c=this._y1,l,h,f,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=l>=(f=(a+u)/2))?a=f:u=f,(g=h>=(p=(s+c)/2))?s=p:c=p,e=n,!(n=n[m=g<<1|d]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function LD(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function CD(){return this._root}function ED(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function kD(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new qt(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var c=(o+s)/2,l=(a+u)/2;(i=r[3])&&e.push(new qt(i,c,l,s,u)),(i=r[2])&&e.push(new qt(i,o,l,c,u)),(i=r[1])&&e.push(new qt(i,c,a,s,l)),(i=r[0])&&e.push(new qt(i,o,a,c,l))}return this}function RD(t){var e=[],n=[],r;for(this._root&&e.push(new qt(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,c=r.y1,l=(a+u)/2,h=(s+c)/2;(o=i[0])&&e.push(new qt(o,a,s,l,h)),(o=i[1])&&e.push(new qt(o,l,s,u,h)),(o=i[2])&&e.push(new qt(o,a,h,l,c)),(o=i[3])&&e.push(new qt(o,l,h,u,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function ID(t){return t[0]}function ND(t){return arguments.length?(this._x=t,this):this._x}function FD(t){return t[1]}function GD(t){return arguments.length?(this._y=t,this):this._y}function as(t,e,n){var r=new Gl(e??ID,n??FD,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Gl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Nm(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var jt=as.prototype=Gl.prototype;jt.copy=function(){var t=new Gl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=Nm(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=Nm(r));return t},jt.add=$D,jt.addAll=SD,jt.cover=AD,jt.data=MD,jt.extent=DD,jt.find=PD,jt.remove=TD,jt.removeAll=LD,jt.root=CD,jt.size=ED,jt.visit=kD,jt.visitAfter=RD,jt.x=ND,jt.y=GD;function Ct(t){return function(){return t}}function bn(t){return(t()-.5)*1e-6}function zD(t){return t.x+t.vx}function OD(t){return t.y+t.vy}function Fm(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Ct(t==null?1:+t));function a(){for(var c,l=e.length,h,f,p,d,g,m,y=0;y<o;++y)for(h=as(e,zD,OD).visitAfter(s),c=0;c<l;++c)f=e[c],g=n[f.index],m=g*g,p=f.x+f.vx,d=f.y+f.vy,h.visit(x);function x(v,b,$,_,D){var T=v.data,w=v.r,P=g+w;if(T){if(T.index>f.index){var S=p-T.x-T.vx,z=d-T.y-T.vy,k=S*S+z*z;k<P*P&&(S===0&&(S=bn(r),k+=S*S),z===0&&(z=bn(r),k+=z*z),k=(P-(k=Math.sqrt(k)))/k*i,f.vx+=(S*=k)*(P=(w*=w)/(m+w)),f.vy+=(z*=k)*P,T.vx-=S*(P=1-P),T.vy-=z*P)}return}return b>p+P||_<p-P||$>d+P||D<d-P}}function s(c){if(c.data)return c.r=n[c.data.index];for(var l=c.r=0;l<4;++l)c[l]&&c[l].r>c.r&&(c.r=c[l].r)}function u(){if(e){var c,l=e.length,h;for(n=new Array(l),c=0;c<l;++c)h=e[c],n[h.index]=+t(h,c,e)}}return a.initialize=function(c,l){e=c,r=l,u()},a.iterations=function(c){return arguments.length?(o=+c,a):o},a.strength=function(c){return arguments.length?(i=+c,a):i},a.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Ct(+c),u(),a):t},a}function UD(t){return t.index}function Gm(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function BD(t){var e=UD,n=h,r,i=Ct(30),o,a,s,u,c,l=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function f(m){for(var y=0,x=t.length;y<l;++y)for(var v=0,b,$,_,D,T,w,P;v<x;++v)b=t[v],$=b.source,_=b.target,D=_.x+_.vx-$.x-$.vx||bn(c),T=_.y+_.vy-$.y-$.vy||bn(c),w=Math.sqrt(D*D+T*T),w=(w-o[v])/w*m*r[v],D*=w,T*=w,_.vx-=D*(P=u[v]),_.vy-=T*P,$.vx+=D*(P=1-P),$.vy+=T*P}function p(){if(a){var m,y=a.length,x=t.length,v=new Map(a.map(($,_)=>[e($,_,a),$])),b;for(m=0,s=new Array(y);m<x;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=Gm(v,b.source)),typeof b.target!="object"&&(b.target=Gm(v,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,u=new Array(x);m<x;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(x),d(),o=new Array(x),g()}}function d(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,y){a=m,c=y,p()},f.links=function(m){return arguments.length?(t=m,p(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(l=+m,f):l},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Ct(+m),d(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Ct(+m),g(),f):i},f}const YD=1664525,HD=1013904223,zm=4294967296;function WD(){let t=1;return()=>(t=(YD*t+HD)%zm)/zm}function qD(t){return t.x}function jD(t){return t.y}var XD=10,VD=Math.PI*(3-Math.sqrt(5));function Om(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=qa(h),c=Nn("tick","end"),l=WD();t==null&&(t=[]);function h(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(g){var m,y=t.length,x;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)x=t[m],x.fx==null?x.x+=x.vx*=a:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=a:(x.y=x.fy,x.vy=0);return e}function p(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var x=XD*Math.sqrt(.5+g),v=g*VD;y.x=x*Math.cos(v),y.y=x*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function d(g){return g.initialize&&g.initialize(t,l),g}return p(),e={tick:f,restart:function(){return u.restart(h),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,p(),s.forEach(d),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(l=g,s.forEach(d),e):l},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,d(m)),e):s.get(g)},find:function(g,m,y){var x=0,v=t.length,b,$,_,D,T;for(y==null?y=1/0:y*=y,x=0;x<v;++x)D=t[x],b=g-D.x,$=m-D.y,_=b*b+$*$,_<y&&(T=D,y=_);return T},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function Um(){var t,e,n,r,i=Ct(-30),o,a=1,s=1/0,u=.81;function c(p){var d,g=t.length,m=as(t,qD,jD).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(f)}function l(){if(t){var p,d=t.length,g;for(o=new Array(d),p=0;p<d;++p)g=t[p],o[g.index]=+i(g,p,t)}}function h(p){var d=0,g,m,y=0,x,v,b;if(p.length){for(x=v=b=0;b<4;++b)(g=p[b])&&(m=Math.abs(g.value))&&(d+=g.value,y+=m,x+=m*g.x,v+=m*g.y);p.x=x/y,p.y=v/y}else{g=p,g.x=g.data.x,g.y=g.data.y;do d+=o[g.data.index];while(g=g.next)}p.value=d}function f(p,d,g,m){if(!p.value)return!0;var y=p.x-e.x,x=p.y-e.y,v=m-d,b=y*y+x*x;if(v*v/u<b)return b<s&&(y===0&&(y=bn(n),b+=y*y),x===0&&(x=bn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*p.value*r/b,e.vy+=x*p.value*r/b),!0;if(p.length||b>=s)return;(p.data!==e||p.next)&&(y===0&&(y=bn(n),b+=y*y),x===0&&(x=bn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)));do p.data!==e&&(v=o[p.data.index]*r/b,e.vx+=y*v,e.vy+=x*v);while(p=p.next)}return c.initialize=function(p,d){t=p,n=d,l()},c.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Ct(+p),l(),c):i},c.distanceMin=function(p){return arguments.length?(a=p*p,c):Math.sqrt(a)},c.distanceMax=function(p){return arguments.length?(s=p*p,c):Math.sqrt(s)},c.theta=function(p){return arguments.length?(u=p*p,c):Math.sqrt(u)},c}function ZD(t,e,n){var r,i=Ct(.1),o,a;typeof t!="function"&&(t=Ct(+t)),e==null&&(e=0),n==null&&(n=0);function s(c){for(var l=0,h=r.length;l<h;++l){var f=r[l],p=f.x-e||1e-6,d=f.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[l]-g)*o[l]*c/g;f.vx+=p*m,f.vy+=d*m}}function u(){if(r){var c,l=r.length;for(o=new Array(l),a=new Array(l),c=0;c<l;++c)a[c]=+t(r[c],c,r),o[c]=isNaN(a[c])?0:+i(r[c],c,r)}}return s.initialize=function(c){r=c,u()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Ct(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Ct(+c),u(),s):t},s.x=function(c){return arguments.length?(e=+c,s):e},s.y=function(c){return arguments.length?(n=+c,s):n},s}function Bm(t){var e=Ct(.1),n,r,i;typeof t!="function"&&(t=Ct(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vx+=(i[u]-l.x)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Ct(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Ct(+s),a(),o):t},o}function Ym(t){var e=Ct(.1),n,r,i;typeof t!="function"&&(t=Ct(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vy+=(i[u]-l.y)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Ct(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Ct(+s),a(),o):t},o}function KD(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ss(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 Yr(t){return t=ss(Math.abs(t)),t?t[1]:NaN}function QD(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function JD(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var tP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hr(t){if(!(e=tP.exec(t)))throw new Error("invalid format: "+t);var e;return new us({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]})}Hr.prototype=us.prototype;function us(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+""}us.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 eP(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 Hm;function nP(t,e){var n=ss(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Hm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ss(t,Math.max(0,e+o-1))[0]}function Wm(t,e){var n=ss(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 qm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:KD,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)=>Wm(t*100,e),r:Wm,s:nP,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function jm(t){return t}var Xm=Array.prototype.map,Vm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Zm(t){var e=t.grouping===void 0||t.thousands===void 0?jm:QD(Xm.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+"",o=t.numerals===void 0?jm:JD(Xm.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=Hr(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):qm[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",D=g==="$"?r:/[%p]/.test($)?a:"",T=qm[$],w=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function P(S){var z=_,k=D,A,L,M;if($==="c")k=T(S)+k,S="";else{S=+S;var F=S<0||1/S<0;if(S=isNaN(S)?u:T(Math.abs(S),v),b&&(S=eP(S)),F&&+S==0&&d!=="+"&&(F=!1),z=(F?d==="("?d:s:d==="-"||d==="("?"":d)+z,k=($==="s"?Vm[8+Hm/3]:"")+k+(F&&d==="("?")":""),w){for(A=-1,L=S.length;++A<L;)if(M=S.charCodeAt(A),48>M||M>57){k=(M===46?i+S.slice(A+1):S.slice(A))+k,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var O=z.length+S.length+k.length,E=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-k.length:1/0),E=""),p){case"<":S=z+S+k+E;break;case"=":S=z+E+S+k;break;case"^":S=E.slice(0,O=E.length>>1)+z+S+k+E.slice(O);break;default:S=E+z+S+k;break}return o(S)}return P.toString=function(){return h+""},P}function l(h,f){var p=c((h=Hr(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Yr(f)/3)))*3,g=Math.pow(10,-d),m=Vm[8+d/3];return function(y){return p(g*y)+m}}return{format:c,formatPrefix:l}}var cs,Qi,zl;Km({thousands:",",grouping:[3],currency:["$",""]});function Km(t){return cs=Zm(t),Qi=cs.format,zl=cs.formatPrefix,cs}function Qm(t){return Math.max(0,-Yr(Math.abs(t)))}function Jm(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yr(e)/3)))*3-Yr(Math.abs(t)))}function t1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Yr(e)-Yr(t))+1}var nt=1e-6,Ji=1e-12,ft=Math.PI,St=ft/2,ls=ft/4,Xt=ft*2,bt=180/ft,rt=ft/180,dt=Math.abs,Wr=Math.atan,Vt=Math.atan2,tt=Math.cos,fs=Math.ceil,e1=Math.exp,Ol=Math.hypot,hs=Math.log,Ul=Math.pow,J=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,Bl=Math.tan;function n1(t){return t>1?0:t<-1?ft:Math.acos(t)}function Zt(t){return t>1?St:t<-1?-St:Math.asin(t)}function r1(t){return(t=J(t/2))*t}function wt(){}function ps(t,e){t&&o1.hasOwnProperty(t.type)&&o1[t.type](t,e)}var i1={Feature:function(t,e){ps(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ps(n[r].geometry,e)}},o1={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Yl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Yl(n[r],e,0)},Polygon:function(t,e){a1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)a1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ps(n[r],e)}};function Yl(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function a1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Yl(t[n],e,1);e.polygonEnd()}function Te(t,e){t&&i1.hasOwnProperty(t.type)?i1[t.type](t,e):ps(t,e)}var ds=new Lt,gs=new Lt,s1,u1,Hl,Wl,ql,Ge={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){ds=new Lt,Ge.lineStart=rP,Ge.lineEnd=iP},polygonEnd:function(){var t=+ds;gs.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){gs.add(Xt)}};function rP(){Ge.point=oP}function iP(){c1(s1,u1)}function oP(t,e){Ge.point=c1,s1=t,u1=e,t*=rt,e*=rt,Hl=t,Wl=tt(e=e/2+ls),ql=J(e)}function c1(t,e){t*=rt,e*=rt,e=e/2+ls;var n=t-Hl,r=n>=0?1:-1,i=r*n,o=tt(e),a=J(e),s=ql*a,u=Wl*o+s*tt(i),c=s*r*J(i);ds.add(Vt(c,u)),Hl=t,Wl=o,ql=a}function aP(t){return gs=new Lt,Te(t,Ge),gs*2}function ms(t){return[Vt(t[1],t[0]),Zt(t[2])]}function Kn(t){var e=t[0],n=t[1],r=tt(n);return[r*tt(e),r*J(e),J(n)]}function ys(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function jl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function bs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function vs(t){var e=It(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $t,ie,At,ce,Qn,l1,f1,jr,to,vn,Qe,Je={point:Xl,lineStart:p1,lineEnd:d1,polygonStart:function(){Je.point=g1,Je.lineStart=sP,Je.lineEnd=uP,to=new Lt,Ge.polygonStart()},polygonEnd:function(){Ge.polygonEnd(),Je.point=Xl,Je.lineStart=p1,Je.lineEnd=d1,ds<0?($t=-(At=180),ie=-(ce=90)):to>nt?ce=90:to<-nt&&(ie=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),ie=-(ce=90)}};function Xl(t,e){vn.push(Qe=[$t=t,At=t]),e<ie&&(ie=e),e>ce&&(ce=e)}function h1(t,e){var n=Kn([t*rt,e*rt]);if(jr){var r=qr(jr,n),i=[r[1],-r[0],0],o=qr(i,r);vs(o),o=ms(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*bt*s,c,l=dt(a)>180;l^(s*Qn<u&&u<s*t)?(c=o[1]*bt,c>ce&&(ce=c)):(u=(u+360)%360-180,l^(s*Qn<u&&u<s*t)?(c=-o[1]*bt,c<ie&&(ie=c)):(e<ie&&(ie=e),e>ce&&(ce=e))),l?t<Qn?le($t,t)>le($t,At)&&(At=t):le(t,At)>le($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Qn?le($t,t)>le($t,At)&&(At=t):le(t,At)>le($t,At)&&($t=t)}else vn.push(Qe=[$t=t,At=t]);e<ie&&(ie=e),e>ce&&(ce=e),jr=n,Qn=t}function p1(){Je.point=h1}function d1(){Qe[0]=$t,Qe[1]=At,Je.point=Xl,jr=null}function g1(t,e){if(jr){var n=t-Qn;to.add(dt(n)>180?n+(n>0?360:-360):n)}else l1=t,f1=e;Ge.point(t,e),h1(t,e)}function sP(){Ge.lineStart()}function uP(){g1(l1,f1),Ge.lineEnd(),dt(to)>nt&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,jr=null}function le(t,e){return(e-=t)<0?e+360:e}function cP(t,e){return t[0]-e[0]}function m1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function lP(t){var e,n,r,i,o,a,s;if(ce=At=-($t=ie=1/0),vn=[],Te(t,Je),n=vn.length){for(vn.sort(cP),e=1,r=vn[0],o=[r];e<n;++e)i=vn[e],m1(r,i[0])||m1(r,i[1])?(le(r[0],i[1])>le(r[0],r[1])&&(r[1]=i[1]),le(i[0],r[1])>le(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=le(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return vn=Qe=null,$t===1/0||ie===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,ie],[At,ce]]}var eo,xs,_s,ws,$s,Ss,As,Ms,Vl,Zl,Kl,y1,b1,Kt,Qt,Jt,Le={sphere:wt,point:Ql,lineStart:v1,lineEnd:x1,polygonStart:function(){Le.lineStart=pP,Le.lineEnd=dP},polygonEnd:function(){Le.lineStart=v1,Le.lineEnd=x1}};function Ql(t,e){t*=rt,e*=rt;var n=tt(e);no(n*tt(t),n*J(t),J(e))}function no(t,e,n){++eo,_s+=(t-_s)/eo,ws+=(e-ws)/eo,$s+=(n-$s)/eo}function v1(){Le.point=fP}function fP(t,e){t*=rt,e*=rt;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),Le.point=hP,no(Kt,Qt,Jt)}function hP(t,e){t*=rt,e*=rt;var n=tt(e),r=n*tt(t),i=n*J(t),o=J(e),a=Vt(It((a=Qt*o-Jt*i)*a+(a=Jt*r-Kt*o)*a+(a=Kt*i-Qt*r)*a),Kt*r+Qt*i+Jt*o);xs+=a,Ss+=a*(Kt+(Kt=r)),As+=a*(Qt+(Qt=i)),Ms+=a*(Jt+(Jt=o)),no(Kt,Qt,Jt)}function x1(){Le.point=Ql}function pP(){Le.point=gP}function dP(){_1(y1,b1),Le.point=Ql}function gP(t,e){y1=t,b1=e,t*=rt,e*=rt,Le.point=_1;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),no(Kt,Qt,Jt)}function _1(t,e){t*=rt,e*=rt;var n=tt(e),r=n*tt(t),i=n*J(t),o=J(e),a=Qt*o-Jt*i,s=Jt*r-Kt*o,u=Kt*i-Qt*r,c=Ol(a,s,u),l=Zt(c),h=c&&-l/c;Vl.add(h*a),Zl.add(h*s),Kl.add(h*u),xs+=l,Ss+=l*(Kt+(Kt=r)),As+=l*(Qt+(Qt=i)),Ms+=l*(Jt+(Jt=o)),no(Kt,Qt,Jt)}function mP(t){eo=xs=_s=ws=$s=Ss=As=Ms=0,Vl=new Lt,Zl=new Lt,Kl=new Lt,Te(t,Le);var e=+Vl,n=+Zl,r=+Kl,i=Ol(e,n,r);return i<Ji&&(e=Ss,n=As,r=Ms,xs<nt&&(e=_s,n=ws,r=$s),i=Ol(e,n,r),i<Ji)?[NaN,NaN]:[Vt(n,e)*bt,Zt(r/i)*bt]}function Xr(t){return function(){return t}}function Jl(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function tf(t,e){return dt(t)>ft&&(t-=Math.round(t/Xt)*Xt),[t,e]}tf.invert=tf;function ef(t,e,n){return(t%=Xt)?e||n?Jl($1(t),S1(e,n)):$1(t):e||n?S1(e,n):tf}function w1(t){return function(e,n){return e+=t,dt(e)>ft&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function $1(t){var e=w1(t);return e.invert=w1(-t),e}function S1(t,e){var n=tt(t),r=J(t),i=tt(e),o=J(e);function a(s,u){var c=tt(u),l=tt(s)*c,h=J(s)*c,f=J(u),p=f*n+l*r;return[Vt(h*i-p*o,l*n-f*r),Zt(p*i+h*o)]}return a.invert=function(s,u){var c=tt(u),l=tt(s)*c,h=J(s)*c,f=J(u),p=f*i-h*o;return[Vt(h*i+f*o,l*n+p*r),Zt(p*n-l*r)]},a}function A1(t){t=ef(t[0]*rt,t[1]*rt,t.length>2?t[2]*rt:0);function e(n){return n=t(n[0]*rt,n[1]*rt),n[0]*=bt,n[1]*=bt,n}return e.invert=function(n){return n=t.invert(n[0]*rt,n[1]*rt),n[0]*=bt,n[1]*=bt,n},e}function M1(t,e,n,r,i,o){if(n){var a=tt(e),s=J(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=D1(a,i),o=D1(a,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=ms([a,-s*tt(l),-s*J(l)]),t.point(c[0],c[1])}}function D1(t,e){e=Kn(e),e[0]-=t,vs(e);var n=n1(-e[1]);return((-e[2]<0?-n:n)+Xt-nt)%Xt}function yP(){var t=Xr([0,0]),e=Xr(90),n=Xr(2),r,i,o={point:a};function a(u,c){r.push(u=i(u,c)),u[0]*=bt,u[1]*=bt}function s(){var u=t.apply(this,arguments),c=e.apply(this,arguments)*rt,l=n.apply(this,arguments)*rt;return r=[],i=ef(-u[0]*rt,-u[1]*rt,0).invert,M1(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:Xr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Xr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:Xr(+u),s):n},s}function P1(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ds(t,e){return dt(t[0]-e[0])<nt&&dt(t[1]-e[1])<nt}function Ps(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function T1(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],y=d[g],x;if(Ds(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=d[s])[0],m[1]);i.lineEnd();return}y[0]+=2*nt}o.push(x=new Ps(m,d,null,!0)),a.push(x.o=new Ps(m,null,x,!1)),o.push(x=new Ps(y,d,null,!1)),a.push(x.o=new Ps(y,null,x,!0))}}),!!o.length){for(a.sort(e),L1(o),L1(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var c=o[0],l,h;;){for(var f=c,p=!0;f.v;)if((f=f.n)===c)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,u=l.length;s<u;++s)i.point((h=l[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(l=f.p.z,s=l.length-1;s>=0;--s)i.point((h=l[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,p=!p}while(!f.v);i.lineEnd()}}}function L1(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function nf(t){return dt(t[0])<=ft?t[0]:de(t[0])*((dt(t[0])+ft)%Xt-ft)}function C1(t,e){var n=nf(e),r=e[1],i=J(r),o=[J(n),-tt(n),0],a=0,s=0,u=new Lt;i===1?r=St+nt:i===-1&&(r=-St-nt);for(var c=0,l=t.length;c<l;++c)if(f=(h=t[c]).length)for(var h,f,p=h[f-1],d=nf(p),g=p[1]/2+ls,m=J(g),y=tt(g),x=0;x<f;++x,d=b,m=_,y=D,p=v){var v=h[x],b=nf(v),$=v[1]/2+ls,_=J($),D=tt($),T=b-d,w=T>=0?1:-1,P=w*T,S=P>ft,z=m*_;if(u.add(Vt(z*w*J(P),y*D+z*tt(P))),a+=S?T+w*Xt:T,S^d>=n^b>=n){var k=qr(Kn(p),Kn(v));vs(k);var A=qr(o,k);vs(A);var L=(S^T>=0?-1:1)*Zt(A[2]);(r>L||r===L&&(k[0]||k[1]))&&(s+=S^T>=0?1:-1)}}return(a<-nt||a<nt&&u<-Ji)^s&1}function E1(t,e,n,r){return function(i){var o=e(i),a=P1(),s=e(a),u=!1,c,l,h,f={point:p,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=v,l=[],c=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=m,l=kc(l);var b=C1(c,r);l.length?(u||(i.polygonStart(),u=!0),T1(l,vP,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(b,$){t(b,$)&&i.point(b,$)}function d(b,$){o.point(b,$)}function g(){f.point=d,o.lineStart()}function m(){f.point=p,o.lineEnd()}function y(b,$){h.push([b,$]),s.point(b,$)}function x(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),$=a.result(),_,D=$.length,T,w,P;if(h.pop(),c.push(h),h=null,!!D){if(b&1){if(w=$[0],(T=w.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),_=0;_<T;++_)i.point((P=w[_])[0],P[1]);i.lineEnd()}return}D>1&&b&2&&$.push($.pop().concat($.shift())),l.push($.filter(bP))}}return f}}function bP(t){return t.length>1}function vP(t,e){return((t=t.x)[0]<0?t[1]-St-nt:St-t[1])-((e=e.x)[0]<0?e[1]-St-nt:St-e[1])}const rf=E1(function(){return!0},xP,wP,[-ft,-St]);function xP(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ft:-ft,u=dt(o-e);dt(u-ft)<nt?(t.point(e,n=(n+a)/2>0?St:-St),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&u>=ft&&(dt(e-r)<nt&&(e-=r*nt),dt(o-s)<nt&&(o-=s*nt),n=_P(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function _P(t,e,n,r){var i,o,a=J(t-n);return dt(a)>nt?Wr((J(e)*(o=tt(r))*J(n)-J(r)*(i=tt(e))*J(t))/(i*o*a)):(e+r)/2}function wP(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ft,i),r.point(0,i),r.point(ft,i),r.point(ft,0),r.point(ft,-i),r.point(0,-i),r.point(-ft,-i),r.point(-ft,0),r.point(-ft,i);else if(dt(t[0]-e[0])>nt){var o=t[0]<e[0]?ft:-ft;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function k1(t){var e=tt(t),n=2*rt,r=e>0,i=dt(e)>nt;function o(l,h,f,p){M1(p,t,n,f,l,h)}function a(l,h){return tt(l)*tt(h)>e}function s(l){var h,f,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,y){var x=[m,y],v,b=a(m,y),$=r?b?0:c(m,y):b?c(m+(m<0?ft:-ft),y):0;if(!h&&(d=p=b)&&l.lineStart(),b!==p&&(v=u(h,x),(!v||Ds(h,v)||Ds(x,v))&&(x[2]=1)),b!==p)g=0,b?(l.lineStart(),v=u(x,h),l.point(v[0],v[1])):(v=u(h,x),l.point(v[0],v[1],2),l.lineEnd()),h=v;else if(i&&h&&r^b){var _;!($&f)&&(_=u(x,h,!0))&&(g=0,r?(l.lineStart(),l.point(_[0][0],_[0][1]),l.point(_[1][0],_[1][1]),l.lineEnd()):(l.point(_[1][0],_[1][1]),l.lineEnd(),l.lineStart(),l.point(_[0][0],_[0][1],3)))}b&&(!h||!Ds(h,x))&&l.point(x[0],x[1]),h=x,p=b,f=$},lineEnd:function(){p&&l.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function u(l,h,f){var p=Kn(l),d=Kn(h),g=[1,0,0],m=qr(p,d),y=ys(m,m),x=m[0],v=y-x*x;if(!v)return!f&&l;var b=e*y/v,$=-e*x/v,_=qr(g,m),D=bs(g,b),T=bs(m,$);jl(D,T);var w=_,P=ys(D,w),S=ys(w,w),z=P*P-S*(ys(D,D)-1);if(!(z<0)){var k=It(z),A=bs(w,(-P-k)/S);if(jl(A,D),A=ms(A),!f)return A;var L=l[0],M=h[0],F=l[1],O=h[1],E;M<L&&(E=L,L=M,M=E);var R=M-L,C=dt(R-ft)<nt,N=C||R<nt;if(!C&&O<F&&(E=F,F=O,O=E),N?C?F+O>0^A[1]<(dt(A[0]-L)<nt?F:O):F<=A[1]&&A[1]<=O:R>ft^(L<=A[0]&&A[0]<=M)){var j=bs(w,(-P+k)/S);return jl(j,D),[A,ms(j)]}}}function c(l,h){var f=r?t:ft-t,p=0;return l<-f?p|=1:l>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return E1(a,s,o,r?[0,-t]:[-ft,t-ft])}function $P(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],c=e[1],l=0,h=1,f=u-a,p=c-s,d;if(d=n-a,!(!f&&d>0)){if(d/=f,f<0){if(d<l)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>l&&(l=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>l&&(l=d)}else if(f>0){if(d<l)return;d<h&&(h=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<l)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>l&&(l=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>l&&(l=d)}else if(p>0){if(d<l)return;d<h&&(h=d)}return l>0&&(t[0]=a+l*f,t[1]=s+l*p),h<1&&(e[0]=a+h*f,e[1]=s+h*p),!0}}}}}var ro=1e9,Ts=-ro;function Ls(t,e,n,r){function i(c,l){return t<=c&&c<=n&&e<=l&&l<=r}function o(c,l,h,f){var p=0,d=0;if(c==null||(p=a(c,h))!==(d=a(l,h))||u(c,l)<0^h>0)do f.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+h+4)%4)!==d);else f.point(l[0],l[1])}function a(c,l){return dt(c[0]-t)<nt?l>0?0:3:dt(c[0]-n)<nt?l>0?2:1:dt(c[1]-e)<nt?l>0?1:0:l>0?3:2}function s(c,l){return u(c.x,l.x)}function u(c,l){var h=a(c,1),f=a(l,1);return h!==f?h-f:h===0?l[1]-c[1]:h===1?c[0]-l[0]:h===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,h=P1(),f,p,d,g,m,y,x,v,b,$,_,D={point:T,lineStart:z,lineEnd:k,polygonStart:P,polygonEnd:S};function T(L,M){i(L,M)&&l.point(L,M)}function w(){for(var L=0,M=0,F=p.length;M<F;++M)for(var O=p[M],E=1,R=O.length,C=O[0],N,j,Q=C[0],I=C[1];E<R;++E)N=Q,j=I,C=O[E],Q=C[0],I=C[1],j<=r?I>r&&(Q-N)*(r-j)>(I-j)*(t-N)&&++L:I<=r&&(Q-N)*(r-j)<(I-j)*(t-N)&&--L;return L}function P(){l=h,f=[],p=[],_=!0}function S(){var L=w(),M=_&&L,F=(f=kc(f)).length;(M||F)&&(c.polygonStart(),M&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),F&&T1(f,s,L,o,c),c.polygonEnd()),l=c,f=p=d=null}function z(){D.point=A,p&&p.push(d=[]),$=!0,b=!1,x=v=NaN}function k(){f&&(A(g,m),y&&b&&h.rejoin(),f.push(h.result())),D.point=T,b&&l.lineEnd()}function A(L,M){var F=i(L,M);if(p&&d.push([L,M]),$)g=L,m=M,y=F,$=!1,F&&(l.lineStart(),l.point(L,M));else if(F&&b)l.point(L,M);else{var O=[x=Math.max(Ts,Math.min(ro,x)),v=Math.max(Ts,Math.min(ro,v))],E=[L=Math.max(Ts,Math.min(ro,L)),M=Math.max(Ts,Math.min(ro,M))];$P(O,E,t,e,n,r)?(b||(l.lineStart(),l.point(O[0],O[1])),l.point(E[0],E[1]),F||l.lineEnd(),_=!1):F&&(l.lineStart(),l.point(L,M),_=!1)}x=L,v=M,b=F}return D}}function SP(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Ls(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var of,af,Cs,Es,Vr={sphere:wt,point:wt,lineStart:AP,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function AP(){Vr.point=DP,Vr.lineEnd=MP}function MP(){Vr.point=Vr.lineEnd=wt}function DP(t,e){t*=rt,e*=rt,af=t,Cs=J(e),Es=tt(e),Vr.point=PP}function PP(t,e){t*=rt,e*=rt;var n=J(e),r=tt(e),i=dt(t-af),o=tt(i),a=J(i),s=r*a,u=Es*n-Cs*r*o,c=Cs*n+Es*r*o;of.add(Vt(It(s*s+u*u),c)),af=t,Cs=n,Es=r}function R1(t){return of=new Lt,Te(t,Vr),+of}var sf=[null,null],TP={type:"LineString",coordinates:sf};function ks(t,e){return sf[0]=t,sf[1]=e,R1(TP)}var I1={Feature:function(t,e){return Rs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Rs(n[r].geometry,e))return!0;return!1}},N1={Sphere:function(){return!0},Point:function(t,e){return F1(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(F1(n[r],e))return!0;return!1},LineString:function(t,e){return G1(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(G1(n[r],e))return!0;return!1},Polygon:function(t,e){return z1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(z1(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Rs(n[r],e))return!0;return!1}};function Rs(t,e){return t&&N1.hasOwnProperty(t.type)?N1[t.type](t,e):!1}function F1(t,e){return ks(t,e)===0}function G1(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=ks(t[o],e),r===0||o>0&&(i=ks(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ji*i))return!0;n=r}return!1}function z1(t,e){return!!C1(t.map(LP),O1(e))}function LP(t){return t=t.map(O1),t.pop(),t}function O1(t){return[t[0]*rt,t[1]*rt]}function CP(t,e){return(t&&I1.hasOwnProperty(t.type)?I1[t.type]:Rs)(t,e)}function U1(t,e,n){var r=hn(t,e-nt,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function B1(t,e,n){var r=hn(t,e-nt,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function Y1(){var t,e,n,r,i,o,a,s,u=10,c=u,l=90,h=360,f,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return hn(fs(r/l)*l,n,l).map(d).concat(hn(fs(s/h)*h,a,h).map(g)).concat(hn(fs(e/u)*u,t,u).filter(function(v){return dt(v%l)>nt}).map(f)).concat(hn(fs(o/c)*c,i,c).filter(function(v){return dt(v%h)>nt}).map(p))}return y.lines=function(){return x().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(n).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],s=+v[0][1],a=+v[1][1],r>n&&(v=r,r=n,n=v),s>a&&(v=s,s=a,a=v),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(m)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(l=+v[0],h=+v[1],y):[l,h]},y.stepMinor=function(v){return arguments.length?(u=+v[0],c=+v[1],y):[u,c]},y.precision=function(v){return arguments.length?(m=+v,f=U1(o,i,90),p=B1(e,t,m),d=U1(s,a,90),g=B1(r,n,m),y):m},y.extentMajor([[-180,-90+nt],[180,90-nt]]).extentMinor([[-180,-80-nt],[180,80+nt]])}function EP(){return Y1()()}function kP(t,e){var n=t[0]*rt,r=t[1]*rt,i=e[0]*rt,o=e[1]*rt,a=tt(r),s=J(r),u=tt(o),c=J(o),l=a*tt(n),h=a*J(n),f=u*tt(i),p=u*J(i),d=2*Zt(It(r1(o-r)+a*u*r1(i-n))),g=J(d),m=d?function(y){var x=J(y*=d)/g,v=J(d-y)/g,b=v*l+x*f,$=v*h+x*p,_=v*s+x*c;return[Vt($,b)*bt,Vt(_,It(b*b+$*$))*bt]}:function(){return[n*bt,r*bt]};return m.distance=d,m}const io=t=>t;var uf=new Lt,cf=new Lt,H1,W1,lf,ff,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=RP,tn.lineEnd=NP},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,uf.add(dt(cf)),cf=new Lt},result:function(){var t=uf/2;return uf=new Lt,t}};function RP(){tn.point=IP}function IP(t,e){tn.point=q1,H1=lf=t,W1=ff=e}function q1(t,e){cf.add(ff*t-lf*e),lf=t,ff=e}function NP(){q1(H1,W1)}var Zr=1/0,Is=Zr,oo=-Zr,Ns=oo,Fs={point:FP,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Zr,Is],[oo,Ns]];return oo=Ns=-(Is=Zr=1/0),t}};function FP(t,e){t<Zr&&(Zr=t),t>oo&&(oo=t),e<Is&&(Is=e),e>Ns&&(Ns=e)}var hf=0,pf=0,ao=0,Gs=0,zs=0,Kr=0,df=0,gf=0,so=0,j1,X1,ze,Oe,ge={point:Jn,lineStart:V1,lineEnd:Z1,polygonStart:function(){ge.lineStart=OP,ge.lineEnd=UP},polygonEnd:function(){ge.point=Jn,ge.lineStart=V1,ge.lineEnd=Z1},result:function(){var t=so?[df/so,gf/so]:Kr?[Gs/Kr,zs/Kr]:ao?[hf/ao,pf/ao]:[NaN,NaN];return hf=pf=ao=Gs=zs=Kr=df=gf=so=0,t}};function Jn(t,e){hf+=t,pf+=e,++ao}function V1(){ge.point=GP}function GP(t,e){ge.point=zP,Jn(ze=t,Oe=e)}function zP(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);Gs+=i*(ze+t)/2,zs+=i*(Oe+e)/2,Kr+=i,Jn(ze=t,Oe=e)}function Z1(){ge.point=Jn}function OP(){ge.point=BP}function UP(){K1(j1,X1)}function BP(t,e){ge.point=K1,Jn(j1=ze=t,X1=Oe=e)}function K1(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);Gs+=i*(ze+t)/2,zs+=i*(Oe+e)/2,Kr+=i,i=Oe*t-ze*e,df+=i*(ze+t),gf+=i*(Oe+e),so+=i*3,Jn(ze=t,Oe=e)}function Q1(t){this._context=t}Q1.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Xt);break}}},result:wt};var mf=new Lt,yf,J1,ty,uo,co,lo={point:wt,lineStart:function(){lo.point=YP},lineEnd:function(){yf&&ey(J1,ty),lo.point=wt},polygonStart:function(){yf=!0},polygonEnd:function(){yf=null},result:function(){var t=+mf;return mf=new Lt,t}};function YP(t,e){lo.point=ey,J1=uo=t,ty=co=e}function ey(t,e){uo-=t,co-=e,mf.add(It(uo*uo+co*co)),uo=t,co=e}let ny,Os,ry,iy;class oy{constructor(e){this._append=e==null?ay:HP(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==ry||this._append!==Os){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,ry=r,Os=this._append,iy=this._,this._=i}this._+=iy;break}}}result(){const e=this._;return this._="",e.length?e:null}}function ay(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function HP(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ay;if(e!==ny){const n=10**e;ny=e,Os=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Os}function WP(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Te(s,i(o))),o.result()}return a.area=function(s){return Te(s,i(tn)),tn.result()},a.measure=function(s){return Te(s,i(lo)),lo.result()},a.bounds=function(s){return Te(s,i(Fs)),Fs.result()},a.centroid=function(s){return Te(s,i(ge)),ge.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,io):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new oy(n)):new Q1(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const u=Math.floor(s);if(!(u>=0))throw new RangeError(`invalid digits: ${s}`);n=u}return e===null&&(o=new oy(n)),a},a.projection(t).digits(n).context(e)}function qP(t){return{stream:fo(t)}}function fo(t){return function(e){var n=new bf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function bf(){}bf.prototype={constructor:bf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function vf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Te(n,t.stream(Fs)),e(Fs.result()),r!=null&&t.clipExtent(r),t}function Us(t,e,n){return vf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function xf(t,e,n){return Us(t,[[0,0],e],n)}function _f(t,e,n){return vf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function wf(t,e,n){return vf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var sy=16,jP=tt(30*rt);function uy(t,e){return+e?VP(t,e):XP(t)}function XP(t){return fo({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function VP(t,e){function n(r,i,o,a,s,u,c,l,h,f,p,d,g,m){var y=c-r,x=l-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+f,$=s+p,_=u+d,D=It(b*b+$*$+_*_),T=Zt(_/=D),w=dt(dt(_)-1)<nt||dt(o-h)<nt?(o+h)/2:Vt($,b),P=t(w,T),S=P[0],z=P[1],k=S-r,A=z-i,L=x*k-y*A;(L*L/v>e||dt((y*k+x*A)/v-.5)>.3||a*f+s*p+u*d<jP)&&(n(r,i,o,a,s,u,S,z,w,b/=D,$/=D,_,g,m),m.point(S,z),n(S,z,w,b,$,_,c,l,h,f,p,d,g,m))}}return function(r){var i,o,a,s,u,c,l,h,f,p,d,g,m={point:y,lineStart:x,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=$},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y(T,w){T=t(T,w),r.point(T[0],T[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v(T,w){var P=Kn([T,w]),S=t(T,w);n(h,f,l,p,d,g,h=S[0],f=S[1],l=T,p=P[0],d=P[1],g=P[2],sy,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function $(){x(),m.point=_,m.lineEnd=D}function _(T,w){v(i=T,w),o=h,a=f,s=p,u=d,c=g,m.point=v}function D(){n(h,f,l,p,d,g,o,a,i,s,u,c,sy,r),m.lineEnd=b,b()}return m}}var ZP=fo({point:function(t,e){this.stream.point(t*rt,e*rt)}});function KP(t){return fo({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function QP(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function cy(t,e,n,r,i,o){if(!o)return QP(t,e,n,r,i);var a=tt(o),s=J(o),u=a*t,c=s*t,l=a/t,h=s/t,f=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(g,m){return g*=r,m*=i,[u*g-c*m+e,n-c*g-u*m]}return d.invert=function(g,m){return[r*(l*g-h*m+f),i*(p-h*g-l*m)]},d}function Ue(t){return $f(function(){return t})()}function $f(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,c=0,l,h=0,f=1,p=1,d=null,g=rf,m=null,y,x,v,b=io,$=.5,_,D,T,w,P;function S(L){return T(L[0]*rt,L[1]*rt)}function z(L){return L=T.invert(L[0],L[1]),L&&[L[0]*bt,L[1]*bt]}S.stream=function(L){return w&&P===L?w:w=ZP(KP(l)(g(_(b(P=L)))))},S.preclip=function(L){return arguments.length?(g=L,d=void 0,A()):g},S.postclip=function(L){return arguments.length?(b=L,m=y=x=v=null,A()):b},S.clipAngle=function(L){return arguments.length?(g=+L?k1(d=L*rt):(d=null,rf),A()):d*bt},S.clipExtent=function(L){return arguments.length?(b=L==null?(m=y=x=v=null,io):Ls(m=+L[0][0],y=+L[0][1],x=+L[1][0],v=+L[1][1]),A()):m==null?null:[[m,y],[x,v]]},S.scale=function(L){return arguments.length?(n=+L,k()):n},S.translate=function(L){return arguments.length?(r=+L[0],i=+L[1],k()):[r,i]},S.center=function(L){return arguments.length?(o=L[0]%360*rt,a=L[1]%360*rt,k()):[o*bt,a*bt]},S.rotate=function(L){return arguments.length?(s=L[0]%360*rt,u=L[1]%360*rt,c=L.length>2?L[2]%360*rt:0,k()):[s*bt,u*bt,c*bt]},S.angle=function(L){return arguments.length?(h=L%360*rt,k()):h*bt},S.reflectX=function(L){return arguments.length?(f=L?-1:1,k()):f<0},S.reflectY=function(L){return arguments.length?(p=L?-1:1,k()):p<0},S.precision=function(L){return arguments.length?(_=uy(D,$=L*L),A()):It($)},S.fitExtent=function(L,M){return Us(S,L,M)},S.fitSize=function(L,M){return xf(S,L,M)},S.fitWidth=function(L,M){return _f(S,L,M)},S.fitHeight=function(L,M){return wf(S,L,M)};function k(){var L=cy(n,0,0,f,p,h).apply(null,e(o,a)),M=cy(n,r-L[0],i-L[1],f,p,h);return l=ef(s,u,c),D=Jl(e,M),T=Jl(l,D),_=uy(D,$),A()}function A(){return w=P=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&z,k()}}function Sf(t){var e=0,n=ft/3,r=$f(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*rt,n=o[1]*rt):[e*bt,n*bt]},i}function JP(t){var e=tt(t);function n(r,i){return[r*e,J(i)/e]}return n.invert=function(r,i){return[r/e,Zt(i*e)]},n}function ly(t,e){var n=J(t),r=(n+J(e))/2;if(dt(r)<nt)return JP(t);var i=1+n*(2*r-n),o=It(i)/r;function a(s,u){var c=It(i-2*r*J(u))/r;return[c*J(s*=r),o-c*tt(s)]}return a.invert=function(s,u){var c=o-u,l=Vt(s,dt(c))*de(c);return c*r<0&&(l-=ft*de(s)*de(c)),[l/r,Zt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Bs(){return Sf(ly).scale(155.424).center([0,33.6442])}function fy(){return Bs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function t9(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function e9(){var t,e,n=fy(),r,i=Bs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Bs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,p){u=[f,p]}};function l(f){var p=f[0],d=f[1];return u=null,r.point(p,d),u||(o.point(p,d),u)||(s.point(p,d),u)}l.invert=function(f){var p=n.scale(),d=n.translate(),g=(f[0]-d[0])/p,m=(f[1]-d[1])/p;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(f)},l.stream=function(f){return t&&e===f?t:t=t9([n.stream(e=f),i.stream(f),a.stream(f)])},l.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},l.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),l.translate(n.translate())):n.scale()},l.translate=function(f){if(!arguments.length)return n.translate();var p=n.scale(),d=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(c),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+nt,g+.12*p+nt],[d-.214*p-nt,g+.234*p-nt]]).stream(c),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+nt,g+.166*p+nt],[d-.115*p-nt,g+.234*p-nt]]).stream(c),h()},l.fitExtent=function(f,p){return Us(l,f,p)},l.fitSize=function(f,p){return xf(l,f,p)},l.fitWidth=function(f,p){return _f(l,f,p)},l.fitHeight=function(f,p){return wf(l,f,p)};function h(){return t=e=null,l}return l.scale(1070)}function hy(t){return function(e,n){var r=tt(e),i=tt(n),o=t(r*i);return o===1/0?[2,0]:[o*i*J(e),o*J(n)]}}function ho(t){return function(e,n){var r=It(e*e+n*n),i=t(r),o=J(i),a=tt(i);return[Vt(e*o,r*a),Zt(r&&n*o/r)]}}var Af=hy(function(t){return It(2/(1+t))});Af.invert=ho(function(t){return 2*Zt(t/2)});function n9(){return Ue(Af).scale(124.75).clipAngle(180-.001)}var Mf=hy(function(t){return(t=n1(t))&&t/J(t)});Mf.invert=ho(function(t){return t});function r9(){return Ue(Mf).scale(79.4188).clipAngle(180-.001)}function po(t,e){return[t,hs(Bl((St+e)/2))]}po.invert=function(t,e){return[t,2*Wr(e1(e))-St]};function i9(){return py(po).scale(961/Xt)}function py(t){var e=Ue(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,c;e.scale=function(h){return arguments.length?(r(h),l()):r()},e.translate=function(h){return arguments.length?(i(h),l()):i()},e.center=function(h){return arguments.length?(n(h),l()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=c=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],c=+h[1][1]),l()):a==null?null:[[a,s],[u,c]]};function l(){var h=ft*r(),f=e(A1(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===po?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),c]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,c)]])}return l()}function Ys(t){return Bl((St+t)/2)}function dy(t,e){var n=tt(t),r=t===e?J(t):hs(n/tt(e))/hs(Ys(e)/Ys(t)),i=n*Ul(Ys(t),r)/r;if(!r)return po;function o(a,s){i>0?s<-St+nt&&(s=-St+nt):s>St-nt&&(s=St-nt);var u=i/Ul(Ys(s),r);return[u*J(r*a),i-u*tt(r*a)]}return o.invert=function(a,s){var u=i-s,c=de(r)*It(a*a+u*u),l=Vt(a,dt(u))*de(u);return u*r<0&&(l-=ft*de(a)*de(u)),[l/r,2*Wr(Ul(i/c,1/r))-St]},o}function o9(){return Sf(dy).scale(109.5).parallels([30,30])}function go(t,e){return[t,e]}go.invert=go;function a9(){return Ue(go).scale(152.63)}function gy(t,e){var n=tt(t),r=t===e?J(t):(n-tt(e))/(e-t),i=n/r+t;if(dt(r)<nt)return go;function o(a,s){var u=i-s,c=r*a;return[u*J(c),i-u*tt(c)]}return o.invert=function(a,s){var u=i-s,c=Vt(a,dt(u))*de(u);return u*r<0&&(c-=ft*de(a)*de(u)),[c/r,i-de(r)*It(a*a+u*u)]},o}function s9(){return Sf(gy).scale(131.154).center([0,13.9389])}var mo=1.340264,yo=-.081106,bo=893e-6,vo=.003796,Hs=It(3)/2,u9=12;function Df(t,e){var n=Zt(Hs*J(e)),r=n*n,i=r*r*r;return[t*tt(n)/(Hs*(mo+3*yo*r+i*(7*bo+9*vo*r))),n*(mo+yo*r+i*(bo+vo*r))]}Df.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<u9&&(s=n*(mo+yo*r+i*(bo+vo*r))-e,u=mo+3*yo*r+i*(7*bo+9*vo*r),n-=a=s/u,r=n*n,i=r*r*r,!(dt(a)<Ji));++o);return[Hs*t*(mo+3*yo*r+i*(7*bo+9*vo*r))/tt(n),Zt(J(n)/Hs)]};function c9(){return Ue(Df).scale(177.158)}function Pf(t,e){var n=tt(e),r=tt(t)*n;return[n*J(t)/r,J(e)/r]}Pf.invert=ho(Wr);function l9(){return Ue(Pf).scale(144.049).clipAngle(60)}function f9(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,c,l,h,f=1,p=1,d=fo({point:function(b,$){var _=v([b,$]);this.stream.point(_[0],_[1])}}),g=io,m,y;function x(){return f=t*r,p=t*i,m=y=null,v}function v(b){var $=b[0]*f,_=b[1]*p;if(o){var D=_*a-$*s;$=$*a+_*s,_=D}return[$+e,_+n]}return v.invert=function(b){var $=b[0]-e,_=b[1]-n;if(o){var D=_*a+$*s;$=$*a-_*s,_=D}return[$/f,_/p]},v.stream=function(b){return m&&y===b?m:m=d(g(y=b))},v.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,io):Ls(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),x()):u==null?null:[[u,c],[l,h]]},v.scale=function(b){return arguments.length?(t=+b,x()):t},v.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],x()):[e,n]},v.angle=function(b){return arguments.length?(o=b%360*rt,s=J(o),a=tt(o),x()):o*bt},v.reflectX=function(b){return arguments.length?(r=b?-1:1,x()):r<0},v.reflectY=function(b){return arguments.length?(i=b?-1:1,x()):i<0},v.fitExtent=function(b,$){return Us(v,b,$)},v.fitSize=function(b,$){return xf(v,b,$)},v.fitWidth=function(b,$){return _f(v,b,$)},v.fitHeight=function(b,$){return wf(v,b,$)},v}function Tf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Tf.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(dt(i)>nt&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function h9(){return Ue(Tf).scale(175.295)}function Lf(t,e){return[tt(e)*J(t),J(e)]}Lf.invert=ho(Zt);function p9(){return Ue(Lf).scale(249.5).clipAngle(90+nt)}function Cf(t,e){var n=tt(e),r=1+tt(t)*n;return[n*J(t)/r,J(e)/r]}Cf.invert=ho(function(t){return 2*Wr(t)});function d9(){return Ue(Cf).scale(250).clipAngle(142)}function Ef(t,e){return[hs(Bl((St+e)/2)),-t]}Ef.invert=function(t,e){return[-e,2*Wr(e1(t))-St]};function g9(){var t=py(Ef),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function m9(t,e){return t.parent===e.parent?1:2}function y9(t){return t.reduce(b9,0)/t.length}function b9(t,e){return t+e.x}function v9(t){return 1+t.reduce(x9,0)}function x9(t,e){return Math.max(t,e.y)}function _9(t){for(var e;e=t.children;)t=e[0];return t}function w9(t){for(var e;e=t.children;)t=e[e.length-1];return t}function $9(){var t=m9,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=y9(p),f.y=v9(p)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=_9(o),c=w9(o),l=u.x-t(u,c)/2,h=c.x+t(c,u)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*e,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-l)/(h-l)*e,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function S9(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function A9(){return this.eachAfter(S9)}function M9(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function D9(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function P9(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function T9(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function L9(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function C9(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function E9(t){for(var e=this,n=k9(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function k9(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function R9(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function I9(){return Array.from(this)}function N9(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function F9(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*G9(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Ws(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=U9)):e===void 0&&(e=O9);for(var n=new tr(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new tr(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(my)}function z9(){return Ws(this).eachBefore(B9)}function O9(t){return t.children}function U9(t){return Array.isArray(t)?t[1]:null}function B9(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function my(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function tr(t){this.data=t,this.depth=this.height=0,this.parent=null}tr.prototype=Ws.prototype={constructor:tr,count:A9,each:M9,eachAfter:P9,eachBefore:D9,find:T9,sum:L9,sort:C9,path:E9,ancestors:R9,descendants:I9,leaves:N9,links:F9,copy:z9,[Symbol.iterator]:G9};function qs(t){return t==null?null:yy(t)}function yy(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Qr(t){return function(){return t}}const Y9=1664525,H9=1013904223,by=4294967296;function kf(){let t=1;return()=>(t=(Y9*t+H9)%by)/by}function W9(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function q9(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function j9(t){return vy(t,kf())}function vy(t,e){for(var n=0,r=(t=q9(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&xy(a,o)?++n:(a=V9(i=X9(i,o)),n=0);return a}function X9(t,e){var n,r;if(Rf(e,t))return[e];for(n=0;n<t.length;++n)if(js(e,t[n])&&Rf(xo(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(js(xo(t[n],t[r]),e)&&js(xo(t[n],e),t[r])&&js(xo(t[r],e),t[n])&&Rf(_y(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function js(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function xy(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Rf(t,e){for(var n=0;n<e.length;++n)if(!xy(t,e[n]))return!1;return!0}function V9(t){switch(t.length){case 1:return Z9(t[0]);case 2:return xo(t[0],t[1]);case 3:return _y(t[0],t[1],t[2])}}function Z9(t){return{x:t.x,y:t.y,r:t.r}}function xo(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,h=Math.sqrt(u*u+c*c);return{x:(n+o+u/h*l)/2,y:(r+a+c/h*l)/2,r:(h+i+s)/2}}function _y(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,h=n.r,f=r-a,p=r-c,d=i-s,g=i-l,m=u-o,y=h-o,x=r*r+i*i-o*o,v=x-a*a-s*s+u*u,b=x-c*c-l*l+h*h,$=p*d-f*g,_=(d*b-g*v)/($*2)-r,D=(g*m-d*y)/$,T=(p*v-f*b)/($*2)-i,w=(f*y-p*m)/$,P=D*D+w*w-1,S=2*(o+_*D+T*w),z=_*_+T*T-o*o,k=-(Math.abs(P)>1e-6?(S+Math.sqrt(S*S-4*P*z))/(2*P):z/S);return{x:r+_+D*k,y:i+T+w*k,r:k}}function wy(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function $y(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Sy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Xs(t){this._=t,this.next=null,this.previous=null}function Ay(t,e){if(!(o=(t=W9(t)).length))return 0;var n,r,i,o,a,s,u,c,l,h,f;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;wy(r,n,i=t[2]),n=new Xs(n),r=new Xs(r),i=new Xs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){wy(n._,r._,i=t[u]),i=new Xs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if($y(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if($y(l._,i._)){n=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.previous}while(c!==l.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=Sy(n);(i=i.next)!==r;)(s=Sy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=vy(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function K9(t){return Ay(t,kf()),t}function Q9(t){return Math.sqrt(t.value)}function J9(){var t=null,e=1,n=1,r=er;function i(o){const a=kf();return o.x=e/2,o.y=n/2,t?o.eachBefore(My(t)).eachAfter(If(r,.5,a)).eachBefore(Dy(1)):o.eachBefore(My(Q9)).eachAfter(If(er,1,a)).eachAfter(If(r,o.r/Math.min(e,n),a)).eachBefore(Dy(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=qs(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Qr(+o),i):r},i}function My(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function If(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=Ay(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function Dy(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Py(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function _o(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function tT(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore(Py),a}function o(a,s){return function(u){u.children&&_o(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var c=u.x0,l=u.y0,h=u.x1-n,f=u.y1-n;h<c&&(c=h=(c+h)/2),f<l&&(l=f=(l+f)/2),u.x0=c,u.y0=l,u.x1=h,u.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var eT={depth:-1},Ty={},Nf={};function nT(t){return t.id}function rT(t){return t.parentId}function iT(){var t=nT,e=rT,n;function r(i){var o=Array.from(i),a=t,s=e,u,c,l,h,f,p,d,g,m=new Map;if(n!=null){const y=o.map((b,$)=>oT(n(b,$,i))),x=y.map(Ly),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(Ly(b)),o.push(Nf));a=(b,$)=>y[$],s=(b,$)=>x[$]}for(l=0,u=o.length;l<u;++l)c=o[l],p=o[l]=new tr(c),(d=a(c,l,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?Ty:p)),(d=s(c,l,i))!=null&&(d+="")&&(p.parent=d);for(l=0;l<u;++l)if(p=o[l],d=p.parent){if(f=m.get(d),!f)throw new Error("missing: "+d);if(f===Ty)throw new Error("ambiguous: "+d);f.children?f.children.push(p):f.children=[p],p.parent=f}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Nf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Nf);--y)p.data=null}if(h.parent=eT,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(my),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=qs(i),r):t},r.parentId=function(i){return arguments.length?(e=qs(i),r):e},r.path=function(i){return arguments.length?(n=qs(i),r):n},r}function oT(t){t=`${t}`;let e=t.length;return Ff(t,e-1)&&!Ff(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Ly(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Ff(t,e););return t.slice(0,e)}function Ff(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function aT(t,e){return t.parent===e.parent?1:2}function Gf(t){var e=t.children;return e?e[0]:t.t}function zf(t){var e=t.children;return e?e[e.length-1]:t.t}function sT(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function uT(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function cT(t,e,n){return t.a.parent===e.parent?t.a:n}function Vs(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Vs.prototype=Object.create(tr.prototype);function lT(t){for(var e=new Vs(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Vs(o[a],a)),i.parent=n;return(e.parent=new Vs(null,0)).children=[e],e}function fT(){var t=aT,e=1,n=1,r=null;function i(c){var l=lT(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)c.eachBefore(u);else{var h=c,f=c,p=c;c.eachBefore(function(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>p.depth&&(p=x)});var d=h===f?1:t(h,f)/2,g=d-h.x,m=e/(f.x+d+g),y=n/(p.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*y})}return c}function o(c){var l=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(l){uT(c);var p=(l[0].z+l[l.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+t(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,l,h){if(l){for(var f=c,p=c,d=l,g=f.parent.children[0],m=f.m,y=p.m,x=d.m,v=g.m,b;d=zf(d),f=Gf(f),d&&f;)g=Gf(g),p=zf(p),p.a=c,b=d.z+x-f.z-m+t(d._,f._),b>0&&(sT(cT(d,c,h),c,b),m+=b,y+=b),x+=d.m,m+=f.m,v+=g.m,y+=p.m;d&&!zf(p)&&(p.t=d,p.m+=x-y),f&&!Gf(g)&&(g.t=f,g.m+=m-v,h=c)}return h}function u(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function Zs(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var Cy=(1+Math.sqrt(5))/2;function Ey(t,e,n,r,i,o){for(var a=[],s=e.children,u,c,l=0,h=0,f=s.length,p,d,g=e.value,m,y,x,v,b,$,_;l<f;){p=i-n,d=o-r;do m=s[h++].value;while(!m&&h<f);for(y=x=m,$=Math.max(d/p,p/d)/(g*t),_=m*m*$,b=Math.max(x/_,_/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),_=m*m*$,v=Math.max(x/_,_/y),v>b){m-=c;break}b=v}a.push(u={value:m,dice:p<d,children:s.slice(l,h)}),u.dice?_o(u,n,r,i,g?r+=d*m/g:o):Zs(u,n,r,g?n+=p*m/g:i,o),g-=m,l=h}return a}const Of=function t(e){function n(r,i,o,a,s){Ey(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Cy);function ky(){var t=Of,e=!1,n=1,r=1,i=[0],o=er,a=er,s=er,u=er,c=er;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore(Py),f}function h(f){var p=i[f.depth],d=f.x0+p,g=f.y0+p,m=f.x1-p,y=f.y1-p;m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),f.x0=d,f.y0=g,f.x1=m,f.y1=y,f.children&&(p=i[f.depth+1]=o(f)/2,d+=c(f)-p,g+=a(f)-p,m-=s(f)-p,y-=u(f)-p,m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),t(f,d,g,m,y))}return l.round=function(f){return arguments.length?(e=!!f,l):e},l.size=function(f){return arguments.length?(n=+f[0],r=+f[1],l):[n,r]},l.tile=function(f){return arguments.length?(t=yy(f),l):t},l.padding=function(f){return arguments.length?l.paddingInner(f).paddingOuter(f):l.paddingInner()},l.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Qr(+f),l):o},l.paddingOuter=function(f){return arguments.length?l.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):l.paddingTop()},l.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Qr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Qr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Qr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Qr(+f),l):c},l}function hT(t,e,n,r,i){var o=t.children,a,s=o.length,u,c=new Array(s+1);for(c[0]=u=a=0;a<s;++a)c[a+1]=u+=o[a].value;l(0,s,t.value,e,n,r,i);function l(h,f,p,d,g,m,y){if(h>=f-1){var x=o[h];x.x0=d,x.y0=g,x.x1=m,x.y1=y;return}for(var v=c[h],b=p/2+v,$=h+1,_=f-1;$<_;){var D=$+_>>>1;c[D]<b?$=D+1:_=D}b-c[$-1]<c[$]-b&&h+1<$&&--$;var T=c[$]-v,w=p-T;if(m-d>y-g){var P=p?(d*w+m*T)/p:m;l(h,$,T,d,g,P,y),l($,f,w,P,g,m,y)}else{var S=p?(g*w+y*T)/p:y;l(h,$,T,d,g,m,S),l($,f,w,d,S,m,y)}}}function pT(t,e,n,r,i){(t.depth&1?Zs:_o)(t,e,n,r,i)}const dT=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,c,l,h,f=-1,p,d=u.length,g=r.value;++f<d;){for(c=u[f],l=c.children,h=c.value=0,p=l.length;h<p;++h)c.value+=l[h].value;c.dice?_o(c,i,o,a,g?o+=(s-o)*c.value/g:s):Zs(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=Ey(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Cy);function gT(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function mT(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,u=0;++e<n;)o=a,a=t[e],u+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return u*=3,[r/u,i/u]}function yT(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function bT(t,e){return t[0]-e[0]||t[1]-e[1]}function Ry(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&yT(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function vT(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(bT),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Ry(r),a=Ry(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c}function xT(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,c,l=!1,h=0;h<n;++h)r=t[h],u=r[0],c=r[1],c>o!=s>o&&i<(a-u)*(o-c)/(s-c)+u&&(l=!l),a=u,s=c;return l}function _T(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],u=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,u+=Math.hypot(i,o);return u}const Ft=Math.random,wT=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Ft),$T=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Ft),Uf=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Ft),ST=function t(e){var n=Uf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Ft),Iy=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Ft),AT=function t(e){var n=Iy.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Ft),MT=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Ft),DT=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Ft),PT=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Ft),Ny=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Ft),Bf=function t(e){var n=Uf.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),u=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var c=n(),l=1+s*c;while(l<=0);l*=l*l;var h=1-e()}while(h>=1-.0331*c*c*c*c&&Math.log(h)>=.5*c*c+a*(1-l+Math.log(l)));return a*l*u()*o}}return r.source=t,r}(Ft),Fy=function t(e){var n=Bf.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var u=a();return u===0?0:u/(u+s())}}return r.source=t,r}(Ft),Gy=function t(e){var n=Ny.source(e),r=Fy.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,c=a;u*c>16&&u*(1-c)>16;){var l=Math.floor((u+1)*c),h=r(l,u-l+1)();h<=c?(s+=l,u-=l,c=(c-h)/(1-h)):(u=l-1,c/=h)}for(var f=c<.5,p=f?c:1-c,d=n(p),g=d(),m=0;g<=u;++m)g+=d();return s+(f?m:u-m)}}return i.source=t,i}(Ft),TT=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Ft),LT=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Ft),CT=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Ft),ET=function t(e){var n=Bf.source(e),r=Gy.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),c=n(u)();if(c>s)return a+r(u-1,s/c)();a+=u,s-=c}for(var l=-Math.log1p(-e()),h=0;l<=s;++h)l-=Math.log1p(-e());return a+h}}return i.source=t,i}(Ft),kT=1664525,RT=1013904223,zy=1/4294967296;function IT(t=Math.random()){let e=(0<=t&&t<1?t/zy:Math.abs(t))|0;return()=>(e=kT*e+RT|0,zy*(e>>>0))}function me(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function en(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Yf=Symbol("implicit");function Hf(){var t=new Pi,e=[],n=[],r=Yf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Yf)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Pi;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Hf(e,n).unknown(r)},me.apply(i,arguments),i}function Wf(){var t=Hf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*l,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=hn(f).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Wf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},me.apply(h(),arguments)}function Oy(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Oy(e())},t}function qf(){return Oy(Wf.apply(null,arguments).paddingInner(1))}function NT(t){return function(){return t}}function Ks(t){return+t}var Uy=[0,1];function te(t){return t}function jf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:NT(isNaN(e)?NaN:.5)}function FT(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function GT(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=jf(i,r),o=n(a,o)):(r=jf(r,i),o=n(o,a)),function(s){return o(r(s))}}function zT(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=jf(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=En(t,s,1,r)-1;return o[u](i[u](s))}}function wo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Qs(){var t=Uy,e=Uy,n=gn,r,i,o,a=te,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==te&&(a=FT(t[0],t[f-1])),s=f>2?zT:GT,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),pe)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Ks),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=Oa,l()},h.clamp=function(f){return arguments.length?(a=f?!0:te,l()):a!==te},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,l()}}function Xf(){return Qs()(te,te)}function By(t,e,n,r){var i=ya(t,e,n),o;switch(r=Hr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Jm(i,a))&&(r.precision=o),zl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=t1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Qm(i))&&(r.precision=o-(r.type==="%")*2);break}}return Qi(r)}function xn(t){var e=t.domain;return t.ticks=function(n){var r=e();return Rn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return By(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=In(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function Vf(){var t=Xf();return t.copy=function(){return wo(t,Vf())},me.apply(t,arguments),xn(t)}function Yy(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Ks),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Yy(t).unknown(e)},t=arguments.length?Array.from(t,Ks):[0,1],xn(n)}function Hy(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Wy(t){return Math.log(t)}function qy(t){return Math.exp(t)}function OT(t){return-Math.log(-t)}function UT(t){return-Math.exp(-t)}function BT(t){return isFinite(t)?+("1e"+t):t<0?0:t}function YT(t){return t===10?BT:t===Math.E?Math.exp:e=>Math.pow(t,e)}function HT(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function jy(t){return(e,n)=>-t(-e,n)}function Zf(t){const e=t(Wy,qy),n=e.domain;let r=10,i,o;function a(){return i=HT(r),o=YT(r),n()[0]<0?(i=jy(i),o=jy(o),t(OT,UT)):t(Wy,qy),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const u=n();let c=u[0],l=u[u.length-1];const h=l<c;h&&([c,l]=[l,c]);let f=i(c),p=i(l),d,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&p-f<m){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(d=1;d<r;++d)if(g=f<0?d/o(-f):d*o(f),!(g<c)){if(g>l)break;y.push(g)}}else for(;f<=p;++f)for(d=r-1;d>=1;--d)if(g=f>0?d/o(-f):d*o(f),!(g<c)){if(g>l)break;y.push(g)}y.length*2<m&&(y=Rn(c,l,m))}else y=Rn(f,p,Math.min(p-f,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Hr(u)).precision==null&&(u.trim=!0),u=Qi(u)),s===1/0)return u;const c=Math.max(1,r*s/e.ticks().length);return l=>{let h=l/o(Math.round(i(l)));return h*r<r-.5&&(h*=r),h<=c?u(l):""}},e.nice=()=>n(Hy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Xy(){const t=Zf(Qs()).domain([1,10]);return t.copy=()=>wo(t,Xy()).base(t.base()),me.apply(t,arguments),t}function Vy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Zy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Kf(t){var e=1,n=t(Vy(e),Zy(e));return n.constant=function(r){return arguments.length?t(Vy(e=+r),Zy(e)):e},xn(n)}function Ky(){var t=Kf(Qs());return t.copy=function(){return wo(t,Ky()).constant(t.constant())},me.apply(t,arguments)}function Qy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function WT(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function qT(t){return t<0?-t*t:t*t}function Qf(t){var e=t(te,te),n=1;function r(){return n===1?t(te,te):n===.5?t(WT,qT):t(Qy(n),Qy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},xn(e)}function Js(){var t=Qf(Qs());return t.copy=function(){return wo(t,Js()).exponent(t.exponent())},me.apply(t,arguments),t}function jT(){return Js.apply(null,arguments).exponent(.5)}function Jy(t){return Math.sign(t)*t*t}function XT(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function tb(){var t=Xf(),e=[0,1],n=!1,r;function i(o){var a=XT(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Jy(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Ks)).map(Jy)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return tb(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},me.apply(i,arguments),xn(i)}function eb(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=kg(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[En(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(_t),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return eb().domain(t).range(e).unknown(r)},me.apply(o,arguments)}function nb(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[En(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return nb().domain([t,e]).range(i).unknown(o)},me.apply(xn(a),arguments)}function rb(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[En(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return rb().domain(t).range(e).unknown(n)},me.apply(i,arguments)}const Jf=new Date,th=new Date;function Pt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let c;do u.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return u},i.filter=o=>Pt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(Jf.setTime(+o),th.setTime(+a),t(Jf),t(th),Math.floor(n(Jf,th))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Jr=Pt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Jr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Pt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Jr);const ib=Jr.range,nn=1e3,ye=nn*60,rn=ye*60,on=rn*24,eh=on*7,ob=on*30,nh=on*365,an=Pt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCSeconds()),ab=an.range,tu=Pt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*ye)},(t,e)=>(e-t)/ye,t=>t.getMinutes()),VT=tu.range,eu=Pt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ye)},(t,e)=>(e-t)/ye,t=>t.getUTCMinutes()),ZT=eu.range,nu=Pt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn-t.getMinutes()*ye)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getHours()),KT=nu.range,ru=Pt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),QT=ru.range,ti=Pt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ye)/on,t=>t.getDate()-1),JT=ti.range,$o=Pt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),tL=$o.range,rh=Pt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>Math.floor(t/on)),eL=rh.range;function nr(t){return Pt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ye)/eh)}const ei=nr(0),So=nr(1),sb=nr(2),ub=nr(3),rr=nr(4),cb=nr(5),lb=nr(6),fb=ei.range,nL=So.range,rL=sb.range,iL=ub.range,oL=rr.range,aL=cb.range,sL=lb.range;function ir(t){return Pt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/eh)}const ni=ir(0),Ao=ir(1),hb=ir(2),pb=ir(3),or=ir(4),db=ir(5),gb=ir(6),mb=ni.range,uL=Ao.range,cL=hb.range,lL=pb.range,fL=or.range,hL=db.range,pL=gb.range,iu=Pt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),dL=iu.range,ou=Pt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),gL=ou.range,Be=Pt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Be.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Pt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const mL=Be.range,Ye=Pt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ye.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Pt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const yL=Ye.range;function yb(t,e,n,r,i,o){const a=[[an,1,nn],[an,5,5*nn],[an,15,15*nn],[an,30,30*nn],[o,1,ye],[o,5,5*ye],[o,15,15*ye],[o,30,30*ye],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,on],[r,2,2*on],[n,1,eh],[e,1,ob],[e,3,3*ob],[t,1,nh]];function s(c,l,h){const f=l<c;f&&([c,l]=[l,c]);const p=h&&typeof h.range=="function"?h:u(c,l,h),d=p?p.range(c,+l+1):[];return f?d.reverse():d}function u(c,l,h){const f=Math.abs(l-c)/h,p=pa(([,,m])=>m).right(a,f);if(p===a.length)return t.every(ya(c/nh,l/nh,h));if(p===0)return Jr.every(Math.max(ya(c,l,h),1));const[d,g]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return d.every(g)}return[s,u]}const[bb,vb]=yb(Ye,ou,ni,rh,ru,eu),[xb,_b]=yb(Be,iu,ei,ti,nu,tu);function ih(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function oh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Mo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function wb(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Do(i),l=Po(i),h=Do(o),f=Po(o),p=Do(a),d=Po(a),g=Do(s),m=Po(s),y=Do(u),x=Po(u),v={a:F,A:O,b:E,B:R,c:null,d:Pb,e:Pb,f:OL,g:ZL,G:QL,H:FL,I:GL,j:zL,L:Tb,m:UL,M:BL,p:C,q:N,Q:Ib,s:Nb,S:YL,u:HL,U:WL,V:qL,w:jL,W:XL,x:null,X:null,y:VL,Y:KL,Z:JL,"%":Rb},b={a:j,A:Q,b:I,B:X,c:null,d:Cb,e:Cb,f:rC,g:pC,G:gC,H:tC,I:eC,j:nC,L:Eb,m:iC,M:oC,p:q,q:V,Q:Ib,s:Nb,S:aC,u:sC,U:uC,V:cC,w:lC,W:fC,x:null,X:null,y:hC,Y:dC,Z:mC,"%":Rb},$={a:P,A:S,b:z,B:k,c:A,d:Mb,e:Mb,f:kL,g:Ab,G:Sb,H:Db,I:Db,j:TL,L:EL,m:PL,M:LL,p:w,q:DL,Q:IL,s:NL,S:CL,u:wL,U:$L,V:SL,w:_L,W:AL,x:L,X:M,y:Ab,Y:Sb,Z:ML,"%":RL};v.x=_(n,v),v.X=_(r,v),v.c=_(e,v),b.x=_(n,b),b.X=_(r,b),b.c=_(e,b);function _(W,et){return function(ut){var H=[],mt=-1,pt=0,Yt=W.length,ee,at,Mt;for(ut instanceof Date||(ut=new Date(+ut));++mt<Yt;)W.charCodeAt(mt)===37&&(H.push(W.slice(pt,mt)),(at=$b[ee=W.charAt(++mt)])!=null?ee=W.charAt(++mt):at=ee==="e"?" ":"0",(Mt=et[ee])&&(ee=Mt(ut,at)),H.push(ee),pt=mt+1);return H.push(W.slice(pt,mt)),H.join("")}}function D(W,et){return function(ut){var H=Mo(1900,void 0,1),mt=T(H,W,ut+="",0),pt,Yt;if(mt!=ut.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(et&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(pt=oh(Mo(H.y,0,1)),Yt=pt.getUTCDay(),pt=Yt>4||Yt===0?Ao.ceil(pt):Ao(pt),pt=$o.offset(pt,(H.V-1)*7),H.y=pt.getUTCFullYear(),H.m=pt.getUTCMonth(),H.d=pt.getUTCDate()+(H.w+6)%7):(pt=ih(Mo(H.y,0,1)),Yt=pt.getDay(),pt=Yt>4||Yt===0?So.ceil(pt):So(pt),pt=ti.offset(pt,(H.V-1)*7),H.y=pt.getFullYear(),H.m=pt.getMonth(),H.d=pt.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),Yt="Z"in H?oh(Mo(H.y,0,1)).getUTCDay():ih(Mo(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(Yt+5)%7:H.w+H.U*7-(Yt+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,oh(H)):ih(H)}}function T(W,et,ut,H){for(var mt=0,pt=et.length,Yt=ut.length,ee,at;mt<pt;){if(H>=Yt)return-1;if(ee=et.charCodeAt(mt++),ee===37){if(ee=et.charAt(mt++),at=$[ee in $b?et.charAt(mt++):ee],!at||(H=at(W,ut,H))<0)return-1}else if(ee!=ut.charCodeAt(H++))return-1}return H}function w(W,et,ut){var H=c.exec(et.slice(ut));return H?(W.p=l.get(H[0].toLowerCase()),ut+H[0].length):-1}function P(W,et,ut){var H=p.exec(et.slice(ut));return H?(W.w=d.get(H[0].toLowerCase()),ut+H[0].length):-1}function S(W,et,ut){var H=h.exec(et.slice(ut));return H?(W.w=f.get(H[0].toLowerCase()),ut+H[0].length):-1}function z(W,et,ut){var H=y.exec(et.slice(ut));return H?(W.m=x.get(H[0].toLowerCase()),ut+H[0].length):-1}function k(W,et,ut){var H=g.exec(et.slice(ut));return H?(W.m=m.get(H[0].toLowerCase()),ut+H[0].length):-1}function A(W,et,ut){return T(W,e,et,ut)}function L(W,et,ut){return T(W,n,et,ut)}function M(W,et,ut){return T(W,r,et,ut)}function F(W){return a[W.getDay()]}function O(W){return o[W.getDay()]}function E(W){return u[W.getMonth()]}function R(W){return s[W.getMonth()]}function C(W){return i[+(W.getHours()>=12)]}function N(W){return 1+~~(W.getMonth()/3)}function j(W){return a[W.getUTCDay()]}function Q(W){return o[W.getUTCDay()]}function I(W){return u[W.getUTCMonth()]}function X(W){return s[W.getUTCMonth()]}function q(W){return i[+(W.getUTCHours()>=12)]}function V(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var et=_(W+="",v);return et.toString=function(){return W},et},parse:function(W){var et=D(W+="",!1);return et.toString=function(){return W},et},utcFormat:function(W){var et=_(W+="",b);return et.toString=function(){return W},et},utcParse:function(W){var et=D(W+="",!0);return et.toString=function(){return W},et}}}var $b={"-":"",_:" ",0:"0"},Nt=/^\s*\d+/,bL=/^%/,vL=/[\\^$*+?|[\]().{}]/g;function gt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function xL(t){return t.replace(vL,"\\$&")}function Do(t){return new RegExp("^(?:"+t.map(xL).join("|")+")","i")}function Po(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function _L(t,e,n){var r=Nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function wL(t,e,n){var r=Nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $L(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function AL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Sb(t,e,n){var r=Nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ab(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ML(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function DL(t,e,n){var r=Nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function PL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Mb(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function TL(t,e,n){var r=Nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Db(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function LL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function CL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function EL(t,e,n){var r=Nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function kL(t,e,n){var r=Nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function RL(t,e,n){var r=bL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function IL(t,e,n){var r=Nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function NL(t,e,n){var r=Nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Pb(t,e){return gt(t.getDate(),e,2)}function FL(t,e){return gt(t.getHours(),e,2)}function GL(t,e){return gt(t.getHours()%12||12,e,2)}function zL(t,e){return gt(1+ti.count(Be(t),t),e,3)}function Tb(t,e){return gt(t.getMilliseconds(),e,3)}function OL(t,e){return Tb(t,e)+"000"}function UL(t,e){return gt(t.getMonth()+1,e,2)}function BL(t,e){return gt(t.getMinutes(),e,2)}function YL(t,e){return gt(t.getSeconds(),e,2)}function HL(t){var e=t.getDay();return e===0?7:e}function WL(t,e){return gt(ei.count(Be(t)-1,t),e,2)}function Lb(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function qL(t,e){return t=Lb(t),gt(rr.count(Be(t),t)+(Be(t).getDay()===4),e,2)}function jL(t){return t.getDay()}function XL(t,e){return gt(So.count(Be(t)-1,t),e,2)}function VL(t,e){return gt(t.getFullYear()%100,e,2)}function ZL(t,e){return t=Lb(t),gt(t.getFullYear()%100,e,2)}function KL(t,e){return gt(t.getFullYear()%1e4,e,4)}function QL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),gt(t.getFullYear()%1e4,e,4)}function JL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+gt(e/60|0,"0",2)+gt(e%60,"0",2)}function Cb(t,e){return gt(t.getUTCDate(),e,2)}function tC(t,e){return gt(t.getUTCHours(),e,2)}function eC(t,e){return gt(t.getUTCHours()%12||12,e,2)}function nC(t,e){return gt(1+$o.count(Ye(t),t),e,3)}function Eb(t,e){return gt(t.getUTCMilliseconds(),e,3)}function rC(t,e){return Eb(t,e)+"000"}function iC(t,e){return gt(t.getUTCMonth()+1,e,2)}function oC(t,e){return gt(t.getUTCMinutes(),e,2)}function aC(t,e){return gt(t.getUTCSeconds(),e,2)}function sC(t){var e=t.getUTCDay();return e===0?7:e}function uC(t,e){return gt(ni.count(Ye(t)-1,t),e,2)}function kb(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function cC(t,e){return t=kb(t),gt(or.count(Ye(t),t)+(Ye(t).getUTCDay()===4),e,2)}function lC(t){return t.getUTCDay()}function fC(t,e){return gt(Ao.count(Ye(t)-1,t),e,2)}function hC(t,e){return gt(t.getUTCFullYear()%100,e,2)}function pC(t,e){return t=kb(t),gt(t.getUTCFullYear()%100,e,2)}function dC(t,e){return gt(t.getUTCFullYear()%1e4,e,4)}function gC(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),gt(t.getUTCFullYear()%1e4,e,4)}function mC(){return"+0000"}function Rb(){return"%"}function Ib(t){return+t}function Nb(t){return Math.floor(+t/1e3)}var ri,ah,Fb,au,sh;Gb({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Gb(t){return ri=wb(t),ah=ri.format,Fb=ri.parse,au=ri.utcFormat,sh=ri.utcParse,ri}var zb="%Y-%m-%dT%H:%M:%S.%LZ";function yC(t){return t.toISOString()}var bC=Date.prototype.toISOString?yC:au(zb);const vC=bC;function xC(t){var e=new Date(t);return isNaN(e)?null:e}var _C=+new Date("2000-01-01T00:00:00.000Z")?xC:sh(zb);const wC=_C;function $C(t){return new Date(t)}function SC(t){return t instanceof Date?+t:+new Date(+t)}function uh(t,e,n,r,i,o,a,s,u,c){var l=Xf(),h=l.invert,f=l.domain,p=c(".%L"),d=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),v=c("%B"),b=c("%Y");function $(_){return(u(_)<_?p:s(_)<_?d:a(_)<_?g:o(_)<_?m:r(_)<_?i(_)<_?y:x:n(_)<_?v:b)(_)}return l.invert=function(_){return new Date(h(_))},l.domain=function(_){return arguments.length?f(Array.from(_,SC)):f().map($C)},l.ticks=function(_){var D=f();return t(D[0],D[D.length-1],_??10)},l.tickFormat=function(_,D){return D==null?$:c(D)},l.nice=function(_){var D=f();return(!_||typeof _.range!="function")&&(_=e(D[0],D[D.length-1],_??10)),_?f(Hy(D,_)):l},l.copy=function(){return wo(l,uh(t,e,n,r,i,o,a,s,u,c))},l}function AC(){return me.apply(uh(xb,_b,Be,iu,ei,ti,nu,tu,an,ah).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function MC(){return me.apply(uh(bb,vb,Ye,ou,ni,$o,ru,eu,an,au).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function su(){var t=0,e=1,n,r,i,o,a=te,s=!1,u;function c(h){return h==null||isNaN(h=+h)?u:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(h){return arguments.length?(s=!!h,c):s},c.interpolator=function(h){return arguments.length?(a=h,c):a};function l(h){return function(f){var p,d;return arguments.length?([p,d]=f,a=h(p,d),c):[a(0),a(1)]}}return c.range=l(gn),c.rangeRound=l(Oa),c.unknown=function(h){return arguments.length?(u=h,c):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function _n(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ob(){var t=xn(su()(te));return t.copy=function(){return _n(t,Ob())},en.apply(t,arguments)}function Ub(){var t=Zf(su()).domain([1,10]);return t.copy=function(){return _n(t,Ub()).base(t.base())},en.apply(t,arguments)}function Bb(){var t=Kf(su());return t.copy=function(){return _n(t,Bb()).constant(t.constant())},en.apply(t,arguments)}function ch(){var t=Qf(su());return t.copy=function(){return _n(t,ch()).exponent(t.exponent())},en.apply(t,arguments)}function DC(){return ch.apply(null,arguments).exponent(.5)}function Yb(){var t=[],e=te;function n(r){if(r!=null&&!isNaN(r=+r))return e((En(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(_t),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Ci(t,o/r))},n.copy=function(){return Yb(e).domain(t)},en.apply(n,arguments)}function uu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,c=te,l,h=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+l(g))-o)*(r*g<r*o?s:u),c(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=l(t=+t),o=l(e=+e),a=l(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,p):[t,e,n]},p.clamp=function(g){return arguments.length?(h=!!g,p):h},p.interpolator=function(g){return arguments.length?(c=g,p):c};function d(g){return function(m){var y,x,v;return arguments.length?([y,x,v]=m,c=H0(g,[y,x,v]),p):[c(0),c(.5),c(1)]}}return p.range=d(gn),p.rangeRound=d(Oa),p.unknown=function(g){return arguments.length?(f=g,p):f},function(g){return l=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function Hb(){var t=xn(uu()(te));return t.copy=function(){return _n(t,Hb())},en.apply(t,arguments)}function Wb(){var t=Zf(uu()).domain([.1,1,10]);return t.copy=function(){return _n(t,Wb()).base(t.base())},en.apply(t,arguments)}function qb(){var t=Kf(uu());return t.copy=function(){return _n(t,qb()).constant(t.constant())},en.apply(t,arguments)}function lh(){var t=Qf(uu());return t.copy=function(){return _n(t,lh()).exponent(t.exponent())},en.apply(t,arguments)}function PC(){return lh.apply(null,arguments).exponent(.5)}function lt(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const TC=lt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),LC=lt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),CC=lt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),EC=lt("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),kC=lt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),RC=lt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),IC=lt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),NC=lt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),FC=lt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),GC=lt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),zC=lt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),vt=t=>T0(t[t.length-1]);var jb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(lt);const OC=vt(jb);var Xb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(lt);const UC=vt(Xb);var Vb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(lt);const BC=vt(Vb);var Zb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(lt);const YC=vt(Zb);var Kb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(lt);const HC=vt(Kb);var Qb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(lt);const WC=vt(Qb);var Jb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(lt);const qC=vt(Jb);var tv=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(lt);const jC=vt(tv);var ev=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(lt);const XC=vt(ev);var nv=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(lt);const VC=vt(nv);var rv=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(lt);const ZC=vt(rv);var iv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(lt);const KC=vt(iv);var ov=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(lt);const QC=vt(ov);var av=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(lt);const JC=vt(av);var sv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(lt);const tE=vt(sv);var uv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(lt);const eE=vt(uv);var cv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(lt);const nE=vt(cv);var lv=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(lt);const rE=vt(lv);var fv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(lt);const iE=vt(fv);var hv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(lt);const oE=vt(hv);var pv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(lt);const aE=vt(pv);var dv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(lt);const sE=vt(dv);var gv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(lt);const uE=vt(gv);var mv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(lt);const cE=vt(mv);var yv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(lt);const lE=vt(yv);var bv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(lt);const fE=vt(bv);var vv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(lt);const hE=vt(vv);function pE(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const dE=Ba(De(300,.5,0),De(-240,.5,1));var gE=Ba(De(-100,.75,.35),De(80,1.5,.8)),mE=Ba(De(260,.75,.35),De(80,1.5,.8)),cu=De();function yE(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return cu.h=360*t-100,cu.s=1.5-1.5*e,cu.l=.8-.9*e,cu+""}var lu=Er(),bE=Math.PI/3,vE=Math.PI*2/3;function xE(t){var e;return t=(.5-t)*Math.PI,lu.r=255*(e=Math.sin(t))*e,lu.g=255*(e=Math.sin(t+bE))*e,lu.b=255*(e=Math.sin(t+vE))*e,lu+""}function _E(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function fu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const wE=fu(lt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var $E=fu(lt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),SE=fu(lt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),AE=fu(lt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ct(t){return function(){return t}}const xv=Math.abs,Ut=Math.atan2,sn=Math.cos,ME=Math.max,ii=Math.min,oe=Math.sin,xt=Math.sqrt,Bt=1e-12,wn=Math.PI,hu=wn/2,$n=2*wn;function DE(t){return t>1?0:t<-1?wn:Math.acos(t)}function _v(t){return t>=1?hu:t<=-1?-hu:Math.asin(t)}function To(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Xi(e)}function PE(t){return t.innerRadius}function TE(t){return t.outerRadius}function LE(t){return t.startAngle}function CE(t){return t.endAngle}function EE(t){return t&&t.padAngle}function kE(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<Bt))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function pu(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/xt(s*s+u*u),l=c*u,h=-c*s,f=t+l,p=e+h,d=n+l,g=r+h,m=(f+d)/2,y=(p+g)/2,x=d-f,v=g-p,b=x*x+v*v,$=i-o,_=f*g-d*p,D=(v<0?-1:1)*xt(ME(0,$*$*b-_*_)),T=(_*v-x*D)/b,w=(-_*x-v*D)/b,P=(_*v+x*D)/b,S=(-_*x+v*D)/b,z=T-m,k=w-y,A=P-m,L=S-y;return z*z+k*k>A*A+L*L&&(T=P,w=S),{cx:T,cy:w,x01:-l,y01:-h,x11:T*(i/$-1),y11:w*(i/$-1)}}function wv(){var t=PE,e=TE,n=ct(0),r=null,i=LE,o=CE,a=EE,s=null,u=To(c);function c(){var l,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-hu,g=o.apply(this,arguments)-hu,m=xv(g-d),y=g>d;if(s||(s=l=u()),p<f&&(h=p,p=f,f=h),!(p>Bt))s.moveTo(0,0);else if(m>$n-Bt)s.moveTo(p*sn(d),p*oe(d)),s.arc(0,0,p,d,g,!y),f>Bt&&(s.moveTo(f*sn(g),f*oe(g)),s.arc(0,0,f,g,d,y));else{var x=d,v=g,b=d,$=g,_=m,D=m,T=a.apply(this,arguments)/2,w=T>Bt&&(r?+r.apply(this,arguments):xt(f*f+p*p)),P=ii(xv(p-f)/2,+n.apply(this,arguments)),S=P,z=P,k,A;if(w>Bt){var L=_v(w/f*oe(T)),M=_v(w/p*oe(T));(_-=L*2)>Bt?(L*=y?1:-1,b+=L,$-=L):(_=0,b=$=(d+g)/2),(D-=M*2)>Bt?(M*=y?1:-1,x+=M,v-=M):(D=0,x=v=(d+g)/2)}var F=p*sn(x),O=p*oe(x),E=f*sn($),R=f*oe($);if(P>Bt){var C=p*sn(v),N=p*oe(v),j=f*sn(b),Q=f*oe(b),I;if(m<wn)if(I=kE(F,O,j,Q,C,N,E,R)){var X=F-I[0],q=O-I[1],V=C-I[0],W=N-I[1],et=1/oe(DE((X*V+q*W)/(xt(X*X+q*q)*xt(V*V+W*W)))/2),ut=xt(I[0]*I[0]+I[1]*I[1]);S=ii(P,(f-ut)/(et-1)),z=ii(P,(p-ut)/(et+1))}else S=z=0}D>Bt?z>Bt?(k=pu(j,Q,F,O,p,z,y),A=pu(C,N,E,R,p,z,y),s.moveTo(k.cx+k.x01,k.cy+k.y01),z<P?s.arc(k.cx,k.cy,z,Ut(k.y01,k.x01),Ut(A.y01,A.x01),!y):(s.arc(k.cx,k.cy,z,Ut(k.y01,k.x01),Ut(k.y11,k.x11),!y),s.arc(0,0,p,Ut(k.cy+k.y11,k.cx+k.x11),Ut(A.cy+A.y11,A.cx+A.x11),!y),s.arc(A.cx,A.cy,z,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!y))):(s.moveTo(F,O),s.arc(0,0,p,x,v,!y)):s.moveTo(F,O),!(f>Bt)||!(_>Bt)?s.lineTo(E,R):S>Bt?(k=pu(E,R,C,N,f,-S,y),A=pu(F,O,j,Q,f,-S,y),s.lineTo(k.cx+k.x01,k.cy+k.y01),S<P?s.arc(k.cx,k.cy,S,Ut(k.y01,k.x01),Ut(A.y01,A.x01),!y):(s.arc(k.cx,k.cy,S,Ut(k.y01,k.x01),Ut(k.y11,k.x11),!y),s.arc(0,0,f,Ut(k.cy+k.y11,k.cx+k.x11),Ut(A.cy+A.y11,A.cx+A.x11),y),s.arc(A.cx,A.cy,S,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!y))):s.arc(0,0,f,$,b,y)}if(s.closePath(),l)return s=null,l+""||null}return c.centroid=function(){var l=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-wn/2;return[sn(h)*l,oe(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:ct(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:ct(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:ct(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:ct(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:ct(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:ct(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:ct(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var RE=Array.prototype.slice;function du(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function $v(t){this._context=t}$v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function gu(t){return new $v(t)}function fh(t){return t[0]}function hh(t){return t[1]}function mu(t,e){var n=ct(!0),r=null,i=gu,o=null,a=To(s);t=typeof t=="function"?t:t===void 0?fh:ct(t),e=typeof e=="function"?e:e===void 0?hh:ct(e);function s(u){var c,l=(u=du(u)).length,h,f=!1,p;for(r==null&&(o=i(p=a())),c=0;c<=l;++c)!(c<l&&n(h=u[c],c,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,u),+e(h,c,u));if(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:ct(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:ct(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:ct(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function ph(t,e,n){var r=null,i=ct(!0),o=null,a=gu,s=null,u=To(c);t=typeof t=="function"?t:t===void 0?fh:ct(+t),e=typeof e=="function"?e:ct(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?hh:ct(+n);function c(h){var f,p,d,g=(h=du(h)).length,m,y=!1,x,v=new Array(g),b=new Array(g);for(o==null&&(s=a(x=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=f-1;d>=p;--d)s.point(v[d],b[d]);s.lineEnd(),s.areaEnd()}y&&(v[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):v[f],n?+n(m,f,h):b[f]))}if(x)return s=null,x+""||null}function l(){return mu().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:ct(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:ct(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ct(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:ct(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:ct(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ct(+h),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(r).y(e)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:ct(!!h),c):i},c.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),c):a},c.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),c):o},c}function IE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function NE(t){return t}function Sv(){var t=NE,e=IE,n=null,r=ct(0),i=ct($n),o=ct(0);function a(s){var u,c=(s=du(s)).length,l,h,f=0,p=new Array(c),d=new Array(c),g=+r.apply(this,arguments),m=Math.min($n,Math.max(-$n,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/c,o.apply(this,arguments)),v=x*(m<0?-1:1),b;for(u=0;u<c;++u)(b=d[p[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?p.sort(function($,_){return e(d[$],d[_])}):n!=null&&p.sort(function($,_){return n(s[$],s[_])}),u=0,h=f?(m-c*v)/f:0;u<c;++u,g=y)l=p[u],b=d[l],y=g+(b>0?b*h:0)+v,d[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:ct(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ct(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ct(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ct(+s),a):o},a}var Av=dh(gu);function Mv(t){this._curve=t}Mv.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function dh(t){function e(n){return new Mv(t(n))}return e._curve=t,e}function Lo(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(dh(n)):e()._curve},t}function Dv(){return Lo(mu().curve(Av))}function Pv(){var t=ph().curve(Av),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Lo(n())},delete t.lineX0,t.lineEndAngle=function(){return Lo(r())},delete t.lineX1,t.lineInnerRadius=function(){return Lo(i())},delete t.lineY0,t.lineOuterRadius=function(){return Lo(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(dh(a)):e()._curve},t}function Co(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Tv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class FE{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=Co(this._x0,this._y0),i=Co(this._x0,this._y0=(this._y0+n)/2),o=Co(e,this._y0),a=Co(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Lv(t){return new Tv(t,!0)}function Cv(t){return new Tv(t,!1)}function GE(t){return new FE(t)}function zE(t){return t.source}function OE(t){return t.target}function yu(t){let e=zE,n=OE,r=fh,i=hh,o=null,a=null,s=To(u);function u(){let c;const l=RE.call(arguments),h=e.apply(this,l),f=n.apply(this,l);if(o==null&&(a=t(c=s())),a.lineStart(),l[0]=h,a.point(+r.apply(this,l),+i.apply(this,l)),l[0]=f,a.point(+r.apply(this,l),+i.apply(this,l)),a.lineEnd(),c)return a=null,c+""||null}return u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.x=function(c){return arguments.length?(r=typeof c=="function"?c:ct(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:ct(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function UE(){return yu(Lv)}function BE(){return yu(Cv)}function YE(){const t=yu(GE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const HE=xt(3),Ev={draw(t,e){const n=xt(e+ii(e/28,.75))*.59436,r=n/2,i=r*HE;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},bu={draw(t,e){const n=xt(e/wn);t.moveTo(n,0),t.arc(0,0,n,0,$n)}},kv={draw(t,e){const n=xt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Rv=xt(1/3),WE=Rv*2,Iv={draw(t,e){const n=xt(e/WE),r=n*Rv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Nv={draw(t,e){const n=xt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},Fv={draw(t,e){const n=xt(e-ii(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Gv={draw(t,e){const n=xt(e),r=-n/2;t.rect(r,r,n,n)}},zv={draw(t,e){const n=xt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},qE=.8908130915292852,Ov=oe(wn/10)/oe(7*wn/10),jE=oe($n/10)*Ov,XE=-sn($n/10)*Ov,Uv={draw(t,e){const n=xt(e*qE),r=jE*n,i=XE*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=$n*o/5,s=sn(a),u=oe(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},gh=xt(3),Bv={draw(t,e){const n=-xt(e/(gh*3));t.moveTo(0,n*2),t.lineTo(-gh*n,-n),t.lineTo(gh*n,-n),t.closePath()}},VE=xt(3),Yv={draw(t,e){const n=xt(e)*.6824,r=n/2,i=n*VE/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},be=-.5,ve=xt(3)/2,mh=1/xt(12),ZE=(mh/2+1)*3,Hv={draw(t,e){const n=xt(e/ZE),r=n/2,i=n*mh,o=r,a=n*mh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(be*r-ve*i,ve*r+be*i),t.lineTo(be*o-ve*a,ve*o+be*a),t.lineTo(be*s-ve*u,ve*s+be*u),t.lineTo(be*r+ve*i,be*i-ve*r),t.lineTo(be*o+ve*a,be*a-ve*o),t.lineTo(be*s+ve*u,be*u-ve*s),t.closePath()}},yh={draw(t,e){const n=xt(e-ii(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Wv=[bu,kv,Iv,Gv,Uv,Bv,Hv],KE=[bu,Fv,yh,Yv,Ev,zv,Nv];function QE(t,e){let n=null,r=To(i);t=typeof t=="function"?t:ct(t||bu),e=typeof e=="function"?e:ct(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:ct(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:ct(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Sn(){}function vu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function xu(t){this._context=t}xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function JE(t){return new xu(t)}function qv(t){this._context=t}qv.prototype={areaStart:Sn,areaEnd:Sn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:vu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function tk(t){return new qv(t)}function jv(t){this._context=t}jv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:vu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ek(t){return new jv(t)}function Xv(t,e){this._basis=new xu(t),this._beta=e}Xv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+u*o),this._beta*e[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const nk=function t(e){function n(r){return e===1?new xu(r):new Xv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function _u(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function bh(t,e){this._context=t,this._k=(1-e)/6}bh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:_u(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:_u(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const rk=function t(e){function n(r){return new bh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function vh(t,e){this._context=t,this._k=(1-e)/6}vh.prototype={areaStart:Sn,areaEnd:Sn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:_u(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ik=function t(e){function n(r){return new vh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function xh(t,e){this._context=t,this._k=(1-e)/6}xh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_u(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ok=function t(e){function n(r){return new xh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function _h(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Bt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Bt){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Vv(t,e){this._context=t,this._alpha=e}Vv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:_h(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ak=function t(e){function n(r){return e?new Vv(r,e):new bh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Zv(t,e){this._context=t,this._alpha=e}Zv.prototype={areaStart:Sn,areaEnd:Sn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:_h(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const sk=function t(e){function n(r){return e?new Zv(r,e):new vh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Kv(t,e){this._context=t,this._alpha=e}Kv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_h(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const uk=function t(e){function n(r){return e?new Kv(r,e):new xh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Qv(t){this._context=t}Qv.prototype={areaStart:Sn,areaEnd:Sn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function ck(t){return new Qv(t)}function Jv(t){return t<0?-1:1}function t2(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Jv(o)+Jv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function e2(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function wh(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function wu(t){this._context=t}wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:wh(this,this._t0,e2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,wh(this,e2(this,n=t2(this,t,e)),n);break;default:wh(this,this._t0,n=t2(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function n2(t){this._context=new r2(t)}(n2.prototype=Object.create(wu.prototype)).point=function(t,e){wu.prototype.point.call(this,e,t)};function r2(t){this._context=t}r2.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function lk(t){return new wu(t)}function fk(t){return new n2(t)}function i2(t){this._context=t}i2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=o2(t),i=o2(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function o2(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function hk(t){return new i2(t)}function $u(t,e){this._context=t,this._t=e}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function pk(t){return new $u(t,.5)}function dk(t){return new $u(t,0)}function gk(t){return new $u(t,1)}function oi(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ai(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function mk(t,e){return t[e]}function yk(t){const e=[];return e.key=t,e}function bk(){var t=ct([]),e=ai,n=oi,r=mk;function i(o){var a=Array.from(t.apply(this,arguments),yk),s,u=a.length,c=-1,l;for(const h of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(h,a[s].key,c,o)]).data=h;for(s=0,l=du(e(a));s<u;++s)a[l[s]].index=s;return n(a,l),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:ct(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ct(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ai:typeof o=="function"?o:ct(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??oi,i):n},i}function vk(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}oi(t,e)}}function xk(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,c=t[e[0]].length;r<c;++r)for(a=s=0,n=0;n<u;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function _k(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}oi(t,e)}}function wk(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,c=0;s<a;++s){for(var l=t[e[s]],h=l[r][1]||0,f=l[r-1][1]||0,p=(h-f)/2,d=0;d<s;++d){var g=t[e[d]],m=g[r][1]||0,y=g[r-1][1]||0;p+=m-y}u+=h,c+=p*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,oi(t,e)}}function a2(t){var e=t.map($k);return ai(t).sort(function(n,r){return e[n]-e[r]})}function $k(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function s2(t){var e=t.map(u2);return ai(t).sort(function(n,r){return e[n]-e[r]})}function u2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function Sk(t){return s2(t).reverse()}function Ak(t){var e=t.length,n,r,i=t.map(u2),o=a2(t),a=0,s=0,u=[],c=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(u)}function Mk(t){return ai(t).reverse()}const Su=t=>()=>t;function Dk(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function He(t,e,n){this.k=t,this.x=e,this.y=n}He.prototype={constructor:He,scale:function(t){return t===1?this:new He(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new He(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Au=new He(1,0,0);c2.prototype=He.prototype;function c2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Au;return t.__zoom}function $h(t){t.stopImmediatePropagation()}function Eo(t){t.preventDefault(),t.stopImmediatePropagation()}function Pk(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Tk(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function l2(){return this.__zoom||Au}function Lk(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Ck(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ek(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function f2(){var t=Pk,e=Tk,n=Ek,r=Lk,i=Ck,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=O0,c=Nn("start","zoom","end"),l,h,f,p=500,d=150,g=0,m=10;function y(A){A.property("__zoom",l2).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",P).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,L,M,F){var O=A.selection?A.selection():A;O.property("__zoom",l2),A!==O?$(A,L,M,F):O.interrupt().each(function(){_(this,arguments).event(F).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},y.scaleBy=function(A,L,M,F){y.scaleTo(A,function(){var O=this.__zoom.k,E=typeof L=="function"?L.apply(this,arguments):L;return O*E},M,F)},y.scaleTo=function(A,L,M,F){y.transform(A,function(){var O=e.apply(this,arguments),E=this.__zoom,R=M==null?b(O):typeof M=="function"?M.apply(this,arguments):M,C=E.invert(R),N=typeof L=="function"?L.apply(this,arguments):L;return n(v(x(E,N),R,C),O,a)},M,F)},y.translateBy=function(A,L,M,F){y.transform(A,function(){return n(this.__zoom.translate(typeof L=="function"?L.apply(this,arguments):L,typeof M=="function"?M.apply(this,arguments):M),e.apply(this,arguments),a)},null,F)},y.translateTo=function(A,L,M,F,O){y.transform(A,function(){var E=e.apply(this,arguments),R=this.__zoom,C=F==null?b(E):typeof F=="function"?F.apply(this,arguments):F;return n(Au.translate(C[0],C[1]).scale(R.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof M=="function"?-M.apply(this,arguments):-M),E,a)},F,O)};function x(A,L){return L=Math.max(o[0],Math.min(o[1],L)),L===A.k?A:new He(L,A.x,A.y)}function v(A,L,M){var F=L[0]-M[0]*A.k,O=L[1]-M[1]*A.k;return F===A.x&&O===A.y?A:new He(A.k,F,O)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function $(A,L,M,F){A.on("start.zoom",function(){_(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(F).end()}).tween("zoom",function(){var O=this,E=arguments,R=_(O,E).event(F),C=e.apply(O,E),N=M==null?b(C):typeof M=="function"?M.apply(O,E):M,j=Math.max(C[1][0]-C[0][0],C[1][1]-C[0][1]),Q=O.__zoom,I=typeof L=="function"?L.apply(O,E):L,X=u(Q.invert(N).concat(j/Q.k),I.invert(N).concat(j/I.k));return function(q){if(q===1)q=I;else{var V=X(q),W=j/V[2];q=new He(W,N[0]-V[0]*W,N[1]-V[1]*W)}R.zoom(null,q)}})}function _(A,L,M){return!M&&A.__zooming||new D(A,L)}function D(A,L){this.that=A,this.args=L,this.active=0,this.sourceEvent=null,this.extent=e.apply(A,L),this.taps=0}D.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,L){return this.mouse&&A!=="mouse"&&(this.mouse[1]=L.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=L.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=L.invert(this.touch1[0])),this.that.__zoom=L,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var L=Z(this.that).datum();c.call(A,this.that,new Dk(A,{sourceEvent:this.sourceEvent,target:y,type:A,transform:this.that.__zoom,dispatch:c}),L)}};function T(A,...L){if(!t.apply(this,arguments))return;var M=_(this,L).event(A),F=this.__zoom,O=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,r.apply(this,arguments)))),E=ue(A);if(M.wheel)(M.mouse[0][0]!==E[0]||M.mouse[0][1]!==E[1])&&(M.mouse[1]=F.invert(M.mouse[0]=E)),clearTimeout(M.wheel);else{if(F.k===O)return;M.mouse=[E,F.invert(E)],Hn(this),M.start()}Eo(A),M.wheel=setTimeout(R,d),M.zoom("mouse",n(v(x(F,O),M.mouse[0],M.mouse[1]),M.extent,a));function R(){M.wheel=null,M.end()}}function w(A,...L){if(f||!t.apply(this,arguments))return;var M=A.currentTarget,F=_(this,L,!0).event(A),O=Z(A.view).on("mousemove.zoom",N,!0).on("mouseup.zoom",j,!0),E=ue(A,M),R=A.clientX,C=A.clientY;Da(A.view),$h(A),F.mouse=[E,this.__zoom.invert(E)],Hn(this),F.start();function N(Q){if(Eo(Q),!F.moved){var I=Q.clientX-R,X=Q.clientY-C;F.moved=I*I+X*X>g}F.event(Q).zoom("mouse",n(v(F.that.__zoom,F.mouse[0]=ue(Q,M),F.mouse[1]),F.extent,a))}function j(Q){O.on("mousemove.zoom mouseup.zoom",null),Pa(Q.view,F.moved),Eo(Q),F.event(Q).end()}}function P(A,...L){if(t.apply(this,arguments)){var M=this.__zoom,F=ue(A.changedTouches?A.changedTouches[0]:A,this),O=M.invert(F),E=M.k*(A.shiftKey?.5:2),R=n(v(x(M,E),F,O),e.apply(this,L),a);Eo(A),s>0?Z(this).transition().duration(s).call($,R,F,A):Z(this).call(y.transform,R,F,A)}}function S(A,...L){if(t.apply(this,arguments)){var M=A.touches,F=M.length,O=_(this,L,A.changedTouches.length===F).event(A),E,R,C,N;for($h(A),R=0;R<F;++R)C=M[R],N=ue(C,this),N=[N,this.__zoom.invert(N),C.identifier],O.touch0?!O.touch1&&O.touch0[2]!==N[2]&&(O.touch1=N,O.taps=0):(O.touch0=N,E=!0,O.taps=1+!!l);l&&(l=clearTimeout(l)),E&&(O.taps<2&&(h=N[0],l=setTimeout(function(){l=null},p)),Hn(this),O.start())}}function z(A,...L){if(this.__zooming){var M=_(this,L).event(A),F=A.changedTouches,O=F.length,E,R,C,N;for(Eo(A),E=0;E<O;++E)R=F[E],C=ue(R,this),M.touch0&&M.touch0[2]===R.identifier?M.touch0[0]=C:M.touch1&&M.touch1[2]===R.identifier&&(M.touch1[0]=C);if(R=M.that.__zoom,M.touch1){var j=M.touch0[0],Q=M.touch0[1],I=M.touch1[0],X=M.touch1[1],q=(q=I[0]-j[0])*q+(q=I[1]-j[1])*q,V=(V=X[0]-Q[0])*V+(V=X[1]-Q[1])*V;R=x(R,Math.sqrt(q/V)),C=[(j[0]+I[0])/2,(j[1]+I[1])/2],N=[(Q[0]+X[0])/2,(Q[1]+X[1])/2]}else if(M.touch0)C=M.touch0[0],N=M.touch0[1];else return;M.zoom("touch",n(v(R,C,N),M.extent,a))}}function k(A,...L){if(this.__zooming){var M=_(this,L).event(A),F=A.changedTouches,O=F.length,E,R;for($h(A),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),E=0;E<O;++E)R=F[E],M.touch0&&M.touch0[2]===R.identifier?delete M.touch0:M.touch1&&M.touch1[2]===R.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(R=ue(R,this),Math.hypot(h[0]-R[0],h[1]-R[1])<m)){var C=Z(this).on("dblclick.zoom");C&&C.apply(this,arguments)}}}return y.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:Su(+A),y):r},y.filter=function(A){return arguments.length?(t=typeof A=="function"?A:Su(!!A),y):t},y.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:Su(!!A),y):i},y.extent=function(A){return arguments.length?(e=typeof A=="function"?A:Su([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),y):e},y.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],y):[o[0],o[1]]},y.translateExtent=function(A){return arguments.length?(a[0][0]=+A[0][0],a[1][0]=+A[1][0],a[0][1]=+A[0][1],a[1][1]=+A[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(A){return arguments.length?(n=A,y):n},y.duration=function(A){return arguments.length?(s=+A,y):s},y.interpolate=function(A){return arguments.length?(u=A,y):u},y.on=function(){var A=c.on.apply(c,arguments);return A===c?y:A},y.clickDistance=function(A){return arguments.length?(g=(A=+A)*A,y):Math.sqrt(g)},y.tapDistance=function(A){return arguments.length?(m=+A,y):m},y}const Sh=Object.freeze(Object.defineProperty({__proto__:null,Adder:Lt,Delaunay:kl,FormatSpecifier:us,InternMap:Pi,InternSet:kn,Node:tr,Path:Xi,Voronoi:Pm,ZoomTransform:He,active:N4,arc:wv,area:ph,areaRadial:Pv,ascending:_t,autoType:aD,axisBottom:P5,axisLeft:Bg,axisRight:D5,axisTop:Ug,bin:Cg,bisect:En,bisectCenter:$A,bisectLeft:wA,bisectRight:mg,bisector:pa,blob:cD,blur:SA,blur2:yg,blurImage:AA,brush:V4,brushSelection:q4,brushX:j4,brushY:X4,buffer:fD,chord:K4,chordDirected:J4,chordTranspose:Q4,cluster:$9,color:dn,contourDensity:A7,contours:Pl,count:ga,create:c8,creator:Sa,cross:EA,csv:dD,csvFormat:V7,csvFormatBody:Z7,csvFormatRow:Q7,csvFormatRows:K7,csvFormatValue:J7,csvParse:Em,csvParseRows:X7,cubehelix:De,cumsum:kA,curveBasis:JE,curveBasisClosed:tk,curveBasisOpen:ek,curveBumpX:Lv,curveBumpY:Cv,curveBundle:nk,curveCardinal:rk,curveCardinalClosed:ik,curveCardinalOpen:ok,curveCatmullRom:ak,curveCatmullRomClosed:sk,curveCatmullRomOpen:uk,curveLinear:gu,curveLinearClosed:ck,curveMonotoneX:lk,curveMonotoneY:fk,curveNatural:hk,curveStep:pk,curveStepAfter:gk,curveStepBefore:dk,descending:dg,deviation:xg,difference:g5,disjoint:m5,dispatch:Nn,drag:t0,dragDisable:Da,dragEnable:Pa,dsv:pD,dsvFormat:is,easeBack:um,easeBackIn:P4,easeBackInOut:um,easeBackOut:T4,easeBounce:qi,easeBounceIn:M4,easeBounceInOut:D4,easeBounceOut:qi,easeCircle:sm,easeCircleIn:m4,easeCircleInOut:sm,easeCircleOut:y4,easeCubic:Wi,easeCubicIn:u4,easeCubicInOut:Wi,easeCubicOut:c4,easeElastic:Ka,easeElasticIn:L4,easeElasticInOut:C4,easeElasticOut:Ka,easeExp:am,easeExpIn:d4,easeExpInOut:am,easeExpOut:g4,easeLinear:o4,easePoly:nm,easePolyIn:l4,easePolyInOut:nm,easePolyOut:f4,easeQuad:em,easeQuadIn:a4,easeQuadInOut:em,easeQuadOut:s4,easeSin:om,easeSinIn:h4,easeSinInOut:om,easeSinOut:p4,every:c5,extent:Di,fcumsum:IA,filter:f5,flatGroup:NA,flatRollup:FA,forceCenter:wD,forceCollide:Fm,forceLink:BD,forceManyBody:Um,forceRadial:ZD,forceSimulation:Om,forceX:Bm,forceY:Ym,get format(){return Qi},formatDefaultLocale:Km,formatLocale:Zm,get formatPrefix(){return zl},formatSpecifier:Hr,fsum:RA,geoAlbers:fy,geoAlbersUsa:e9,geoArea:aP,geoAzimuthalEqualArea:n9,geoAzimuthalEqualAreaRaw:Af,geoAzimuthalEquidistant:r9,geoAzimuthalEquidistantRaw:Mf,geoBounds:lP,geoCentroid:mP,geoCircle:yP,geoClipAntimeridian:rf,geoClipCircle:k1,geoClipExtent:SP,geoClipRectangle:Ls,geoConicConformal:o9,geoConicConformalRaw:dy,geoConicEqualArea:Bs,geoConicEqualAreaRaw:ly,geoConicEquidistant:s9,geoConicEquidistantRaw:gy,geoContains:CP,geoDistance:ks,geoEqualEarth:c9,geoEqualEarthRaw:Df,geoEquirectangular:a9,geoEquirectangularRaw:go,geoGnomonic:l9,geoGnomonicRaw:Pf,geoGraticule:Y1,geoGraticule10:EP,geoIdentity:f9,geoInterpolate:kP,geoLength:R1,geoMercator:i9,geoMercatorRaw:po,geoNaturalEarth1:h9,geoNaturalEarth1Raw:Tf,geoOrthographic:p9,geoOrthographicRaw:Lf,geoPath:WP,geoProjection:Ue,geoProjectionMutator:$f,geoRotation:A1,geoStereographic:d9,geoStereographicRaw:Cf,geoStream:Te,geoTransform:qP,geoTransverseMercator:g9,geoTransverseMercatorRaw:Ef,gray:T8,greatest:Eg,greatestIndex:r5,group:Sg,groupSort:OA,groups:Ag,hcl:Na,hierarchy:Ws,histogram:Cg,hsl:Ea,html:xD,image:mD,index:GA,indexes:zA,interpolate:gn,interpolateArray:I8,interpolateBasis:A0,interpolateBasisClosed:M0,interpolateBlues:sE,interpolateBrBG:OC,interpolateBuGn:VC,interpolateBuPu:ZC,interpolateCividis:pE,interpolateCool:mE,interpolateCubehelix:Z8,interpolateCubehelixDefault:dE,interpolateCubehelixLong:Ba,interpolateDate:E0,interpolateDiscrete:G8,interpolateGnBu:KC,interpolateGreens:uE,interpolateGreys:cE,interpolateHcl:X8,interpolateHclLong:V8,interpolateHsl:W8,interpolateHslLong:q8,interpolateHue:z8,interpolateInferno:SE,interpolateLab:j8,interpolateMagma:$E,interpolateNumber:pe,interpolateNumberArray:Jc,interpolateObject:k0,interpolateOrRd:QC,interpolateOranges:hE,interpolatePRGn:UC,interpolatePiYG:BC,interpolatePlasma:AE,interpolatePuBu:tE,interpolatePuBuGn:JC,interpolatePuOr:YC,interpolatePuRd:eE,interpolatePurples:lE,interpolateRainbow:yE,interpolateRdBu:HC,interpolateRdGy:WC,interpolateRdPu:nE,interpolateRdYlBu:qC,interpolateRdYlGn:jC,interpolateReds:fE,interpolateRgb:Gi,interpolateRgbBasis:T0,interpolateRgbBasisClosed:R8,interpolateRound:Oa,interpolateSinebow:xE,interpolateSpectral:XC,interpolateString:nl,interpolateTransformCss:F0,interpolateTransformSvg:G0,interpolateTurbo:_E,interpolateViridis:wE,interpolateWarm:gE,interpolateYlGn:iE,interpolateYlGnBu:rE,interpolateYlOrBr:oE,interpolateYlOrRd:aE,interpolateZoom:O0,interrupt:Hn,intersection:y5,interval:eM,isoFormat:vC,isoParse:wC,json:bD,lab:Ia,lch:L8,least:n5,leastIndex:Ig,line:mu,lineRadial:Dv,link:yu,linkHorizontal:UE,linkRadial:YE,linkVertical:BE,local:Qg,map:h5,matcher:Gc,max:Ti,maxIndex:Cc,mean:XA,median:VA,medianIndex:ZA,merge:kc,min:ba,minIndex:Ec,mode:QA,namespace:ki,namespaces:Nc,nice:Tc,now:Yi,pack:J9,packEnclose:j9,packSiblings:K9,pairs:JA,partition:tT,path:Dl,pathRound:n7,permute:Lg,pie:Sv,piecewise:H0,pointRadial:Co,pointer:ue,pointers:f8,polygonArea:gT,polygonCentroid:mT,polygonContains:xT,polygonHull:vT,polygonLength:_T,precisionFixed:Qm,precisionPrefix:Jm,precisionRound:t1,quadtree:as,quantile:Ci,quantileIndex:Rg,quantileSorted:kg,quantize:K8,quickselect:va,radialArea:Pv,radialLine:Dv,randomBates:AT,randomBernoulli:PT,randomBeta:Fy,randomBinomial:Gy,randomCauchy:LT,randomExponential:MT,randomGamma:Bf,randomGeometric:Ny,randomInt:$T,randomIrwinHall:Iy,randomLcg:IT,randomLogNormal:ST,randomLogistic:CT,randomNormal:Uf,randomPareto:DT,randomPoisson:ET,randomUniform:wT,randomWeibull:TT,range:hn,rank:e5,reduce:p5,reverse:d5,rgb:Er,ribbon:l7,ribbonArrow:f7,rollup:Dg,rollups:Pg,scaleBand:Wf,scaleDiverging:Hb,scaleDivergingLog:Wb,scaleDivergingPow:lh,scaleDivergingSqrt:PC,scaleDivergingSymlog:qb,scaleIdentity:Yy,scaleImplicit:Yf,scaleLinear:Vf,scaleLog:Xy,scaleOrdinal:Hf,scalePoint:qf,scalePow:Js,scaleQuantile:eb,scaleQuantize:nb,scaleRadial:tb,scaleSequential:Ob,scaleSequentialLog:Ub,scaleSequentialPow:ch,scaleSequentialQuantile:Yb,scaleSequentialSqrt:DC,scaleSequentialSymlog:Bb,scaleSqrt:jT,scaleSymlog:Ky,scaleThreshold:rb,scaleTime:AC,scaleUtc:MC,scan:i5,schemeAccent:LC,schemeBlues:dv,schemeBrBG:jb,schemeBuGn:nv,schemeBuPu:rv,schemeCategory10:TC,schemeDark2:CC,schemeGnBu:iv,schemeGreens:gv,schemeGreys:mv,schemeObservable10:EC,schemeOrRd:ov,schemeOranges:vv,schemePRGn:Xb,schemePaired:kC,schemePastel1:RC,schemePastel2:IC,schemePiYG:Vb,schemePuBu:sv,schemePuBuGn:av,schemePuOr:Zb,schemePuRd:uv,schemePurples:yv,schemeRdBu:Kb,schemeRdGy:Qb,schemeRdPu:cv,schemeRdYlBu:Jb,schemeRdYlGn:tv,schemeReds:bv,schemeSet1:NC,schemeSet2:FC,schemeSet3:GC,schemeSpectral:ev,schemeTableau10:zC,schemeYlGn:fv,schemeYlGnBu:lv,schemeYlOrBr:hv,schemeYlOrRd:pv,select:Z,selectAll:h8,selection:Gn,selector:Aa,selectorAll:Fc,shuffle:o5,shuffler:Ng,some:l5,sort:Mc,stack:bk,stackOffsetDiverging:xk,stackOffsetExpand:vk,stackOffsetNone:oi,stackOffsetSilhouette:_k,stackOffsetWiggle:wk,stackOrderAppearance:a2,stackOrderAscending:s2,stackOrderDescending:Sk,stackOrderInsideOut:Ak,stackOrderNone:ai,stackOrderReverse:Mk,stratify:iT,style:Fn,subset:v5,sum:a5,superset:Gg,svg:_D,symbol:QE,symbolAsterisk:Ev,symbolCircle:bu,symbolCross:kv,symbolDiamond:Iv,symbolDiamond2:Nv,symbolPlus:Fv,symbolSquare:Gv,symbolSquare2:zv,symbolStar:Uv,symbolTimes:yh,symbolTriangle:Bv,symbolTriangle2:Yv,symbolWye:Hv,symbolX:yh,symbols:Wv,symbolsFill:Wv,symbolsStroke:KE,text:os,thresholdFreedmanDiaconis:qA,thresholdScott:jA,thresholdSturges:Lc,tickFormat:By,tickIncrement:In,tickStep:ya,ticks:Rn,timeDay:ti,timeDays:JT,get timeFormat(){return ah},timeFormatDefaultLocale:Gb,timeFormatLocale:wb,timeFriday:cb,timeFridays:aL,timeHour:nu,timeHours:KT,timeInterval:Pt,timeMillisecond:Jr,timeMilliseconds:ib,timeMinute:tu,timeMinutes:VT,timeMonday:So,timeMondays:nL,timeMonth:iu,timeMonths:dL,get timeParse(){return Fb},timeSaturday:lb,timeSaturdays:sL,timeSecond:an,timeSeconds:ab,timeSunday:ei,timeSundays:fb,timeThursday:rr,timeThursdays:oL,timeTickInterval:_b,timeTicks:xb,timeTuesday:sb,timeTuesdays:rL,timeWednesday:ub,timeWednesdays:iL,timeWeek:ei,timeWeeks:fb,timeYear:Be,timeYears:mL,timeout:ol,timer:qa,timerFlush:j0,transition:J0,transpose:Fg,tree:fT,treemap:ky,treemapBinary:hT,treemapDice:_o,treemapResquarify:dT,treemapSlice:Zs,treemapSliceDice:pT,treemapSquarify:Of,tsv:gD,tsvFormat:eD,tsvFormatBody:nD,tsvFormatRow:iD,tsvFormatRows:rD,tsvFormatValue:oD,tsvParse:km,tsvParseRows:tD,union:x5,unixDay:rh,unixDays:eL,utcDay:$o,utcDays:tL,get utcFormat(){return au},utcFriday:db,utcFridays:hL,utcHour:ru,utcHours:QT,utcMillisecond:Jr,utcMilliseconds:ib,utcMinute:eu,utcMinutes:ZT,utcMonday:Ao,utcMondays:uL,utcMonth:ou,utcMonths:gL,get utcParse(){return sh},utcSaturday:gb,utcSaturdays:pL,utcSecond:an,utcSeconds:ab,utcSunday:ni,utcSundays:mb,utcThursday:or,utcThursdays:fL,utcTickInterval:vb,utcTicks:bb,utcTuesday:hb,utcTuesdays:cL,utcWednesday:pb,utcWednesdays:lL,utcWeek:ni,utcWeeks:mb,utcYear:Ye,utcYears:yL,variance:vg,window:zc,xml:vD,zip:u5,zoom:f2,zoomIdentity:Au,zoomTransform:c2},Symbol.toStringTag,{value:"Module"}));function h2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function kk(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function ko(t){return t.substring(0,4)!=="ease"?Wi:Sh[t]??Wi}function Mu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Vf().domain([0,1]).range([0,t/2]),a=o(n);return wv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Ah=(t,e)=>e instanceof Function?e(t):Qi(e)(t);function p2(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function Rk(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function Ik(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return Rk(e)}function Et(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function Mh({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function st(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function An(t,e){const r=Math.random().toString(36).substr(2,5);return st(t,e,r)}const si=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=st(e,"series"),u=st(e,"axes"),c=st(e,"graphic"),l=r.pipe(U((d,g)=>t.selectAll(`g.${s}`).data(d,m=>m).join(m=>m.append("g").classed(s,!0).each((y,x,v)=>{Z(v[x]).selectAll(`g.${u}`).data([x]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each(($,_,D)=>{Z(D[_]).selectAll("defs").data([_]).join("defs"),Z(D[_]).selectAll("g").data([_]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),Dt(1));B({seriesSelection:l,gridContainerPosition:i}).pipe(Y(async d=>d)).subscribe(d=>{d.seriesSelection.transition().attr("transform",(g,m)=>{const y=d.gridContainerPosition[m]??d.gridContainerPosition[0],x=y.translate,v=y.scale;return`translate(${x[0]}, ${x[1]}) scale(${v[0]}, ${v[1]})`})});const h=B({seriesSelection:l,gridAxesTransform:o}).pipe(Y(async d=>d),U(d=>d.seriesSelection.select(`g.${u}`).style("transform",d.gridAxesTransform.value)),Dt(1)),f=h.pipe(U(d=>d.select("defs")),Dt(1)),p=B({axesSelection:h,gridGraphicTransform:a}).pipe(Y(async d=>d),U(d=>{const g=d.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",d.gridGraphicTransform.value),g}),Dt(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:p}},Dh=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new ot,o=new ht(a=>{B({dataFormatter:t,computedData:n}).pipe(G(i),Y(async s=>s)).subscribe(s=>{const c=s.computedData[0]?s.computedData[0].length-1:0,l=s.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[0]-s.dataFormatter.grid.groupAxis.scalePadding,h=s.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?c+s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[1]+s.dataFormatter.grid.groupAxis.scalePadding,p=(s.dataFormatter.grid.seriesDirection==="row"?(s.computedData[0]??[]).map(d=>d.groupLabel):s.computedData.map(d=>d[0].groupLabel)).filter((d,g)=>g>=l&&g<=h);a.next(p)})});return new ht(a=>{B({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(G(i),Y(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=bA({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),l=f=>s.dataFormatter.grid.groupAxis.position==="bottom"||s.dataFormatter.grid.groupAxis.position==="top"?f.offsetX-s.fullChartParams.padding.left:f.offsetY-s.fullChartParams.padding.top,h=f=>{const p=l(f),d=c(p);return{groupIndex:d,groupLabel:s.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})};function Nk(t="curveLinear"){return mu().x(e=>e.axisX).y(e=>e.axisY).curve(Sh[t])}function Fk(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function Gk({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function zk({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function Ok({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ko(r)).tween("tween",(c,l,h)=>f=>{const p=c.width*f;u.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const d2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullDataFormatter$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new ot,v=An(t,"clipPath-box"),b=st(t,"path"),{seriesSelection$:$,axesSelection$:_,defsSelection$:D,graphicGSelection$:T}=si({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),w=new ht(M=>{const F=c.pipe(G(x)).subscribe(O=>{if(!O)return;const E=Nk(O.lineCurve);M.next(E)});return()=>{F.unsubscribe()}}),P=h.pipe(U(M=>M.transitionDuration),it()),S=h.pipe(U(M=>M.transitionEase),it());B({defsSelection:D,seriesLabels:a,axisSize:d,transitionDuration:P,transitionEase:S}).pipe(G(x),Y(async M=>M)).subscribe(M=>{const O=[{id:v,width:M.axisSize.width,height:M.axisSize.height}].concat(M.seriesLabels.map(E=>({id:`orbcharts__clipPath_${E}`,width:M.axisSize.width,height:M.axisSize.height})));Ok({defsSelection:M.defsSelection,clipPathData:O,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const z=n.pipe(U(M=>{const F=new Map;return M.flat().forEach(O=>F.set(O.id,O)),F})),k=Dh({fullDataFormatter$:l,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),A=h.pipe(G(x),U(M=>M.highlightTarget),it()),L=B({graphicGSelection:T,visibleComputedLayoutData:o,linePath:w,params:c}).pipe(G(x),Y(async M=>M),U(M=>{let F=[];return M.graphicGSelection.each((O,E,R)=>{const C=Fk(M.visibleComputedLayoutData[E]??[]);F[E]=Gk({selection:Z(R[E]),pathClassName:b,linePath:M.linePath,segmentData:C,params:M.params})}),F}));return B({pathSelectionArr:L,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:A,gridGroupPositionFn:k}).pipe(G(x),Y(async M=>M)).subscribe(M=>{M.pathSelectionArr.forEach(F=>{F.on("mouseover",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})}).on("mousemove",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})}).on("mouseout",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})}).on("click",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})})})}),h.pipe(G(x),li(M=>M.highlightTarget==="series"),Y(M=>B({graphicGSelection:T,gridHighlight:g,DataMap:z,fullChartParams:h}).pipe(G(x),Y(async F=>F)))).subscribe(M=>{const F=M.gridHighlight[0]?M.gridHighlight[0].seriesLabel:null;zk({selection:M.graphicGSelection,seriesLabel:F,fullChartParams:M.fullChartParams})}),()=>{x.next(void 0)}},g2="Lines",Uk=se(g2,ur)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=d2(g2,{selection:t,computedData$:n.computedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedData$:n.visibleComputedData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainerPosition$:n.gridContainerPosition$,event$:r.event$});return()=>{i.next(void 0),o()}});function Bk(t="curveLinear",e){return ph().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(Sh[t])}function Yk(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function Hk({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,u)=>s.length?`${s[0].id}_${s[s.length-1].id}`:u).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,u)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function Wk({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function qk({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
9
|
+
`)}function c(h){return h.map(l).join(t)}function l(h){return h==null?"":h instanceof Date?T7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:l}}var qn=ns(","),ym=qn.parse,L7=qn.parseRows,C7=qn.format,E7=qn.formatBody,k7=qn.formatRows,R7=qn.formatRow,I7=qn.formatValue,jn=ns(" "),bm=jn.parse,N7=jn.parseRows,F7=jn.format,G7=jn.formatBody,z7=jn.formatRows,O7=jn.formatRow,U7=jn.formatValue;function B7(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))Y7&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const Y7=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function H7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function W7(t,e){return fetch(t,e).then(H7)}function q7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function j7(t,e){return fetch(t,e).then(q7)}function X7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function rs(t,e){return fetch(t,e).then(X7)}function vm(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),rs(e,n).then(function(i){return t(i,r)})}}function V7(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=ns(t);return rs(e,n).then(function(o){return i.parse(o,r)})}var Z7=vm(ym),K7=vm(bm);function Q7(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function J7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function tD(t,e){return fetch(t,e).then(J7)}function Il(t){return(e,n)=>rs(e,n).then(r=>new DOMParser().parseFromString(r,t))}const eD=Il("application/xml");var nD=Il("text/html"),rD=Il("image/svg+xml");function iD(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,c=0;for(o=0;o<a;++o)s=n[o],u+=s.x,c+=s.y;for(u=(u/a-t)*r,c=(c/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function oD(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return xm(this.cover(e,n),e,n,t)}function xm(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,u=t._y0,c=t._x1,l=t._y1,h,f,p,d,g,m,y,x;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),e===p&&n===d)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f;while((y=m<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,t}function aD(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<r;++n)xm(this,a[n],s[n],t[n]);return this}function sD(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,u,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,u=new Array(4),u[c]=s,s=u,a*=2,c){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function uD(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function cD(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function lD(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,c,l=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new qt(p,i,o,l,h)),n==null?n=1/0:(i=t-n,o=e-n,l=t+n,h=e+n,n*=n);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>l||(s=d.y0)>h||(u=d.x1)<i||(c=d.y1)<o))if(p.length){var m=(a+u)/2,y=(s+c)/2;f.push(new qt(p[3],m,y,u,c),new qt(p[2],a,y,m,c),new qt(p[1],m,s,u,y),new qt(p[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var x=t-+this._x.call(null,p.data),v=e-+this._y.call(null,p.data),b=x*x+v*v;if(b<n){var $=Math.sqrt(n=b);i=t-$,o=e-$,l=t+$,h=e+$,r=p.data}}return r}function fD(t){if(isNaN(l=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,c=this._y1,l,h,f,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=l>=(f=(a+u)/2))?a=f:u=f,(g=h>=(p=(s+c)/2))?s=p:c=p,e=n,!(n=n[m=g<<1|d]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function hD(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function pD(){return this._root}function dD(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function gD(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new qt(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var c=(o+s)/2,l=(a+u)/2;(i=r[3])&&e.push(new qt(i,c,l,s,u)),(i=r[2])&&e.push(new qt(i,o,l,c,u)),(i=r[1])&&e.push(new qt(i,c,a,s,l)),(i=r[0])&&e.push(new qt(i,o,a,c,l))}return this}function mD(t){var e=[],n=[],r;for(this._root&&e.push(new qt(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,c=r.y1,l=(a+u)/2,h=(s+c)/2;(o=i[0])&&e.push(new qt(o,a,s,l,h)),(o=i[1])&&e.push(new qt(o,l,s,u,h)),(o=i[2])&&e.push(new qt(o,a,h,l,c)),(o=i[3])&&e.push(new qt(o,l,h,u,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function yD(t){return t[0]}function bD(t){return arguments.length?(this._x=t,this):this._x}function vD(t){return t[1]}function xD(t){return arguments.length?(this._y=t,this):this._y}function is(t,e,n){var r=new Nl(e??yD,n??vD,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Nl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function _m(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var jt=is.prototype=Nl.prototype;jt.copy=function(){var t=new Nl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=_m(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=_m(r));return t},jt.add=oD,jt.addAll=aD,jt.cover=sD,jt.data=uD,jt.extent=cD,jt.find=lD,jt.remove=fD,jt.removeAll=hD,jt.root=pD,jt.size=dD,jt.visit=gD,jt.visitAfter=mD,jt.x=bD,jt.y=xD;function Lt(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function _D(t){return t.x+t.vx}function wD(t){return t.y+t.vy}function wm(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var c,l=e.length,h,f,p,d,g,m,y=0;y<o;++y)for(h=is(e,_D,wD).visitAfter(s),c=0;c<l;++c)f=e[c],g=n[f.index],m=g*g,p=f.x+f.vx,d=f.y+f.vy,h.visit(x);function x(v,b,$,_,D){var T=v.data,w=v.r,P=g+w;if(T){if(T.index>f.index){var S=p-T.x-T.vx,z=d-T.y-T.vy,k=S*S+z*z;k<P*P&&(S===0&&(S=mn(r),k+=S*S),z===0&&(z=mn(r),k+=z*z),k=(P-(k=Math.sqrt(k)))/k*i,f.vx+=(S*=k)*(P=(w*=w)/(m+w)),f.vy+=(z*=k)*P,T.vx-=S*(P=1-P),T.vy-=z*P)}return}return b>p+P||_<p-P||$>d+P||D<d-P}}function s(c){if(c.data)return c.r=n[c.data.index];for(var l=c.r=0;l<4;++l)c[l]&&c[l].r>c.r&&(c.r=c[l].r)}function u(){if(e){var c,l=e.length,h;for(n=new Array(l),c=0;c<l;++c)h=e[c],n[h.index]=+t(h,c,e)}}return a.initialize=function(c,l){e=c,r=l,u()},a.iterations=function(c){return arguments.length?(o=+c,a):o},a.strength=function(c){return arguments.length?(i=+c,a):i},a.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),a):t},a}function $D(t){return t.index}function $m(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function SD(t){var e=$D,n=h,r,i=Lt(30),o,a,s,u,c,l=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function f(m){for(var y=0,x=t.length;y<l;++y)for(var v=0,b,$,_,D,T,w,P;v<x;++v)b=t[v],$=b.source,_=b.target,D=_.x+_.vx-$.x-$.vx||mn(c),T=_.y+_.vy-$.y-$.vy||mn(c),w=Math.sqrt(D*D+T*T),w=(w-o[v])/w*m*r[v],D*=w,T*=w,_.vx-=D*(P=u[v]),_.vy-=T*P,$.vx+=D*(P=1-P),$.vy+=T*P}function p(){if(a){var m,y=a.length,x=t.length,v=new Map(a.map(($,_)=>[e($,_,a),$])),b;for(m=0,s=new Array(y);m<x;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=$m(v,b.source)),typeof b.target!="object"&&(b.target=$m(v,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,u=new Array(x);m<x;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(x),d(),o=new Array(x),g()}}function d(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,y){a=m,c=y,p()},f.links=function(m){return arguments.length?(t=m,p(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(l=+m,f):l},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Lt(+m),d(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),f):i},f}const AD=1664525,MD=1013904223,Sm=4294967296;function DD(){let t=1;return()=>(t=(AD*t+MD)%Sm)/Sm}function PD(t){return t.x}function TD(t){return t.y}var LD=10,CD=Math.PI*(3-Math.sqrt(5));function Am(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Ha(h),c=kn("tick","end"),l=DD();t==null&&(t=[]);function h(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(g){var m,y=t.length,x;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)x=t[m],x.fx==null?x.x+=x.vx*=a:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=a:(x.y=x.fy,x.vy=0);return e}function p(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var x=LD*Math.sqrt(.5+g),v=g*CD;y.x=x*Math.cos(v),y.y=x*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function d(g){return g.initialize&&g.initialize(t,l),g}return p(),e={tick:f,restart:function(){return u.restart(h),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,p(),s.forEach(d),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(l=g,s.forEach(d),e):l},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,d(m)),e):s.get(g)},find:function(g,m,y){var x=0,v=t.length,b,$,_,D,T;for(y==null?y=1/0:y*=y,x=0;x<v;++x)D=t[x],b=g-D.x,$=m-D.y,_=b*b+$*$,_<y&&(T=D,y=_);return T},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function Mm(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function c(p){var d,g=t.length,m=is(t,PD,TD).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(f)}function l(){if(t){var p,d=t.length,g;for(o=new Array(d),p=0;p<d;++p)g=t[p],o[g.index]=+i(g,p,t)}}function h(p){var d=0,g,m,y=0,x,v,b;if(p.length){for(x=v=b=0;b<4;++b)(g=p[b])&&(m=Math.abs(g.value))&&(d+=g.value,y+=m,x+=m*g.x,v+=m*g.y);p.x=x/y,p.y=v/y}else{g=p,g.x=g.data.x,g.y=g.data.y;do d+=o[g.data.index];while(g=g.next)}p.value=d}function f(p,d,g,m){if(!p.value)return!0;var y=p.x-e.x,x=p.y-e.y,v=m-d,b=y*y+x*x;if(v*v/u<b)return b<s&&(y===0&&(y=mn(n),b+=y*y),x===0&&(x=mn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*p.value*r/b,e.vy+=x*p.value*r/b),!0;if(p.length||b>=s)return;(p.data!==e||p.next)&&(y===0&&(y=mn(n),b+=y*y),x===0&&(x=mn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)));do p.data!==e&&(v=o[p.data.index]*r/b,e.vx+=y*v,e.vy+=x*v);while(p=p.next)}return c.initialize=function(p,d){t=p,n=d,l()},c.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Lt(+p),l(),c):i},c.distanceMin=function(p){return arguments.length?(a=p*p,c):Math.sqrt(a)},c.distanceMax=function(p){return arguments.length?(s=p*p,c):Math.sqrt(s)},c.theta=function(p){return arguments.length?(u=p*p,c):Math.sqrt(u)},c}function ED(t,e,n){var r,i=Lt(.1),o,a;typeof t!="function"&&(t=Lt(+t)),e==null&&(e=0),n==null&&(n=0);function s(c){for(var l=0,h=r.length;l<h;++l){var f=r[l],p=f.x-e||1e-6,d=f.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[l]-g)*o[l]*c/g;f.vx+=p*m,f.vy+=d*m}}function u(){if(r){var c,l=r.length;for(o=new Array(l),a=new Array(l),c=0;c<l;++c)a[c]=+t(r[c],c,r),o[c]=isNaN(a[c])?0:+i(r[c],c,r)}}return s.initialize=function(c){r=c,u()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Lt(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),s):t},s.x=function(c){return arguments.length?(e=+c,s):e},s.y=function(c){return arguments.length?(n=+c,s):n},s}function Dm(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vx+=(i[u]-l.x)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function Pm(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vy+=(i[u]-l.y)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function kD(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function os(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 zr(t){return t=os(Math.abs(t)),t?t[1]:NaN}function RD(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function ID(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var ND=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Or(t){if(!(e=ND.exec(t)))throw new Error("invalid format: "+t);var e;return new as({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]})}Or.prototype=as.prototype;function as(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+""}as.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 FD(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 Tm;function GD(t,e){var n=os(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Tm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+os(t,Math.max(0,e+o-1))[0]}function Lm(t,e){var n=os(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 Cm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:kD,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)=>Lm(t*100,e),r:Lm,s:GD,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Em(t){return t}var km=Array.prototype.map,Rm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Im(t){var e=t.grouping===void 0||t.thousands===void 0?Em:RD(km.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+"",o=t.numerals===void 0?Em:ID(km.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=Or(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):Cm[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",D=g==="$"?r:/[%p]/.test($)?a:"",T=Cm[$],w=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function P(S){var z=_,k=D,A,L,M;if($==="c")k=T(S)+k,S="";else{S=+S;var F=S<0||1/S<0;if(S=isNaN(S)?u:T(Math.abs(S),v),b&&(S=FD(S)),F&&+S==0&&d!=="+"&&(F=!1),z=(F?d==="("?d:s:d==="-"||d==="("?"":d)+z,k=($==="s"?Rm[8+Tm/3]:"")+k+(F&&d==="("?")":""),w){for(A=-1,L=S.length;++A<L;)if(M=S.charCodeAt(A),48>M||M>57){k=(M===46?i+S.slice(A+1):S.slice(A))+k,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var O=z.length+S.length+k.length,E=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-k.length:1/0),E=""),p){case"<":S=z+S+k+E;break;case"=":S=z+E+S+k;break;case"^":S=E.slice(0,O=E.length>>1)+z+S+k+E.slice(O);break;default:S=E+z+S+k;break}return o(S)}return P.toString=function(){return h+""},P}function l(h,f){var p=c((h=Or(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(zr(f)/3)))*3,g=Math.pow(10,-d),m=Rm[8+d/3];return function(y){return p(g*y)+m}}return{format:c,formatPrefix:l}}var ss,Zi,Fl;Nm({thousands:",",grouping:[3],currency:["$",""]});function Nm(t){return ss=Im(t),Zi=ss.format,Fl=ss.formatPrefix,ss}function Fm(t){return Math.max(0,-zr(Math.abs(t)))}function Gm(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(zr(e)/3)))*3-zr(Math.abs(t)))}function zm(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,zr(e)-zr(t))+1}var nt=1e-6,Ki=1e-12,ft=Math.PI,At=ft/2,us=ft/4,Xt=ft*2,bt=180/ft,rt=ft/180,dt=Math.abs,Ur=Math.atan,Vt=Math.atan2,tt=Math.cos,cs=Math.ceil,Om=Math.exp,Gl=Math.hypot,ls=Math.log,zl=Math.pow,J=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},Rt=Math.sqrt,Ol=Math.tan;function Um(t){return t>1?0:t<-1?ft:Math.acos(t)}function Zt(t){return t>1?At:t<-1?-At:Math.asin(t)}function Bm(t){return(t=J(t/2))*t}function wt(){}function fs(t,e){t&&Hm.hasOwnProperty(t.type)&&Hm[t.type](t,e)}var Ym={Feature:function(t,e){fs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)fs(n[r].geometry,e)}},Hm={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ul(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ul(n[r],e,0)},Polygon:function(t,e){Wm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Wm(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)fs(n[r],e)}};function Ul(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function Wm(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ul(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&Ym.hasOwnProperty(t.type)?Ym[t.type](t,e):fs(t,e)}var hs=new Tt,ps=new Tt,qm,jm,Bl,Yl,Hl,Ge={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){hs=new Tt,Ge.lineStart=zD,Ge.lineEnd=OD},polygonEnd:function(){var t=+hs;ps.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ps.add(Xt)}};function zD(){Ge.point=UD}function OD(){Xm(qm,jm)}function UD(t,e){Ge.point=Xm,qm=t,jm=e,t*=rt,e*=rt,Bl=t,Yl=tt(e=e/2+us),Hl=J(e)}function Xm(t,e){t*=rt,e*=rt,e=e/2+us;var n=t-Bl,r=n>=0?1:-1,i=r*n,o=tt(e),a=J(e),s=Hl*a,u=Yl*o+s*tt(i),c=s*r*J(i);hs.add(Vt(c,u)),Bl=t,Yl=o,Hl=a}function BD(t){return ps=new Tt,Pe(t,Ge),ps*2}function ds(t){return[Vt(t[1],t[0]),Zt(t[2])]}function Xn(t){var e=t[0],n=t[1],r=tt(n);return[r*tt(e),r*J(e),J(n)]}function gs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Br(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Wl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ms(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ys(t){var e=Rt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $t,ie,Mt,ce,Vn,Vm,Zm,Yr,Qi,yn,Ke,Qe={point:ql,lineStart:Qm,lineEnd:Jm,polygonStart:function(){Qe.point=t1,Qe.lineStart=YD,Qe.lineEnd=HD,Qi=new Tt,Ge.polygonStart()},polygonEnd:function(){Ge.polygonEnd(),Qe.point=ql,Qe.lineStart=Qm,Qe.lineEnd=Jm,hs<0?($t=-(Mt=180),ie=-(ce=90)):Qi>nt?ce=90:Qi<-nt&&(ie=-90),Ke[0]=$t,Ke[1]=Mt},sphere:function(){$t=-(Mt=180),ie=-(ce=90)}};function ql(t,e){yn.push(Ke=[$t=t,Mt=t]),e<ie&&(ie=e),e>ce&&(ce=e)}function Km(t,e){var n=Xn([t*rt,e*rt]);if(Yr){var r=Br(Yr,n),i=[r[1],-r[0],0],o=Br(i,r);ys(o),o=ds(o);var a=t-Vn,s=a>0?1:-1,u=o[0]*bt*s,c,l=dt(a)>180;l^(s*Vn<u&&u<s*t)?(c=o[1]*bt,c>ce&&(ce=c)):(u=(u+360)%360-180,l^(s*Vn<u&&u<s*t)?(c=-o[1]*bt,c<ie&&(ie=c)):(e<ie&&(ie=e),e>ce&&(ce=e))),l?t<Vn?le($t,t)>le($t,Mt)&&(Mt=t):le(t,Mt)>le($t,Mt)&&($t=t):Mt>=$t?(t<$t&&($t=t),t>Mt&&(Mt=t)):t>Vn?le($t,t)>le($t,Mt)&&(Mt=t):le(t,Mt)>le($t,Mt)&&($t=t)}else yn.push(Ke=[$t=t,Mt=t]);e<ie&&(ie=e),e>ce&&(ce=e),Yr=n,Vn=t}function Qm(){Qe.point=Km}function Jm(){Ke[0]=$t,Ke[1]=Mt,Qe.point=ql,Yr=null}function t1(t,e){if(Yr){var n=t-Vn;Qi.add(dt(n)>180?n+(n>0?360:-360):n)}else Vm=t,Zm=e;Ge.point(t,e),Km(t,e)}function YD(){Ge.lineStart()}function HD(){t1(Vm,Zm),Ge.lineEnd(),dt(Qi)>nt&&($t=-(Mt=180)),Ke[0]=$t,Ke[1]=Mt,Yr=null}function le(t,e){return(e-=t)<0?e+360:e}function WD(t,e){return t[0]-e[0]}function e1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function qD(t){var e,n,r,i,o,a,s;if(ce=Mt=-($t=ie=1/0),yn=[],Pe(t,Qe),n=yn.length){for(yn.sort(WD),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],e1(r,i[0])||e1(r,i[1])?(le(r[0],i[1])>le(r[0],r[1])&&(r[1]=i[1]),le(i[0],r[1])>le(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=le(r[1],i[0]))>a&&(a=s,$t=i[0],Mt=r[1])}return yn=Ke=null,$t===1/0||ie===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,ie],[Mt,ce]]}var Ji,bs,vs,xs,_s,ws,$s,Ss,jl,Xl,Vl,n1,r1,Kt,Qt,Jt,Te={sphere:wt,point:Zl,lineStart:i1,lineEnd:o1,polygonStart:function(){Te.lineStart=VD,Te.lineEnd=ZD},polygonEnd:function(){Te.lineStart=i1,Te.lineEnd=o1}};function Zl(t,e){t*=rt,e*=rt;var n=tt(e);to(n*tt(t),n*J(t),J(e))}function to(t,e,n){++Ji,vs+=(t-vs)/Ji,xs+=(e-xs)/Ji,_s+=(n-_s)/Ji}function i1(){Te.point=jD}function jD(t,e){t*=rt,e*=rt;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),Te.point=XD,to(Kt,Qt,Jt)}function XD(t,e){t*=rt,e*=rt;var n=tt(e),r=n*tt(t),i=n*J(t),o=J(e),a=Vt(Rt((a=Qt*o-Jt*i)*a+(a=Jt*r-Kt*o)*a+(a=Kt*i-Qt*r)*a),Kt*r+Qt*i+Jt*o);bs+=a,ws+=a*(Kt+(Kt=r)),$s+=a*(Qt+(Qt=i)),Ss+=a*(Jt+(Jt=o)),to(Kt,Qt,Jt)}function o1(){Te.point=Zl}function VD(){Te.point=KD}function ZD(){a1(n1,r1),Te.point=Zl}function KD(t,e){n1=t,r1=e,t*=rt,e*=rt,Te.point=a1;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),to(Kt,Qt,Jt)}function a1(t,e){t*=rt,e*=rt;var n=tt(e),r=n*tt(t),i=n*J(t),o=J(e),a=Qt*o-Jt*i,s=Jt*r-Kt*o,u=Kt*i-Qt*r,c=Gl(a,s,u),l=Zt(c),h=c&&-l/c;jl.add(h*a),Xl.add(h*s),Vl.add(h*u),bs+=l,ws+=l*(Kt+(Kt=r)),$s+=l*(Qt+(Qt=i)),Ss+=l*(Jt+(Jt=o)),to(Kt,Qt,Jt)}function QD(t){Ji=bs=vs=xs=_s=ws=$s=Ss=0,jl=new Tt,Xl=new Tt,Vl=new Tt,Pe(t,Te);var e=+jl,n=+Xl,r=+Vl,i=Gl(e,n,r);return i<Ki&&(e=ws,n=$s,r=Ss,bs<nt&&(e=vs,n=xs,r=_s),i=Gl(e,n,r),i<Ki)?[NaN,NaN]:[Vt(n,e)*bt,Zt(r/i)*bt]}function Hr(t){return function(){return t}}function Kl(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Ql(t,e){return dt(t)>ft&&(t-=Math.round(t/Xt)*Xt),[t,e]}Ql.invert=Ql;function Jl(t,e,n){return(t%=Xt)?e||n?Kl(u1(t),c1(e,n)):u1(t):e||n?c1(e,n):Ql}function s1(t){return function(e,n){return e+=t,dt(e)>ft&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function u1(t){var e=s1(t);return e.invert=s1(-t),e}function c1(t,e){var n=tt(t),r=J(t),i=tt(e),o=J(e);function a(s,u){var c=tt(u),l=tt(s)*c,h=J(s)*c,f=J(u),p=f*n+l*r;return[Vt(h*i-p*o,l*n-f*r),Zt(p*i+h*o)]}return a.invert=function(s,u){var c=tt(u),l=tt(s)*c,h=J(s)*c,f=J(u),p=f*i-h*o;return[Vt(h*i+f*o,l*n+p*r),Zt(p*n-l*r)]},a}function l1(t){t=Jl(t[0]*rt,t[1]*rt,t.length>2?t[2]*rt:0);function e(n){return n=t(n[0]*rt,n[1]*rt),n[0]*=bt,n[1]*=bt,n}return e.invert=function(n){return n=t.invert(n[0]*rt,n[1]*rt),n[0]*=bt,n[1]*=bt,n},e}function f1(t,e,n,r,i,o){if(n){var a=tt(e),s=J(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=h1(a,i),o=h1(a,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=ds([a,-s*tt(l),-s*J(l)]),t.point(c[0],c[1])}}function h1(t,e){e=Xn(e),e[0]-=t,ys(e);var n=Um(-e[1]);return((-e[2]<0?-n:n)+Xt-nt)%Xt}function JD(){var t=Hr([0,0]),e=Hr(90),n=Hr(2),r,i,o={point:a};function a(u,c){r.push(u=i(u,c)),u[0]*=bt,u[1]*=bt}function s(){var u=t.apply(this,arguments),c=e.apply(this,arguments)*rt,l=n.apply(this,arguments)*rt;return r=[],i=Jl(-u[0]*rt,-u[1]*rt,0).invert,f1(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:Hr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Hr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:Hr(+u),s):n},s}function p1(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function As(t,e){return dt(t[0]-e[0])<nt&&dt(t[1]-e[1])<nt}function Ms(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function d1(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],y=d[g],x;if(As(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=d[s])[0],m[1]);i.lineEnd();return}y[0]+=2*nt}o.push(x=new Ms(m,d,null,!0)),a.push(x.o=new Ms(m,null,x,!1)),o.push(x=new Ms(y,d,null,!1)),a.push(x.o=new Ms(y,null,x,!0))}}),!!o.length){for(a.sort(e),g1(o),g1(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var c=o[0],l,h;;){for(var f=c,p=!0;f.v;)if((f=f.n)===c)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,u=l.length;s<u;++s)i.point((h=l[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(l=f.p.z,s=l.length-1;s>=0;--s)i.point((h=l[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,p=!p}while(!f.v);i.lineEnd()}}}function g1(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function tf(t){return dt(t[0])<=ft?t[0]:de(t[0])*((dt(t[0])+ft)%Xt-ft)}function m1(t,e){var n=tf(e),r=e[1],i=J(r),o=[J(n),-tt(n),0],a=0,s=0,u=new Tt;i===1?r=At+nt:i===-1&&(r=-At-nt);for(var c=0,l=t.length;c<l;++c)if(f=(h=t[c]).length)for(var h,f,p=h[f-1],d=tf(p),g=p[1]/2+us,m=J(g),y=tt(g),x=0;x<f;++x,d=b,m=_,y=D,p=v){var v=h[x],b=tf(v),$=v[1]/2+us,_=J($),D=tt($),T=b-d,w=T>=0?1:-1,P=w*T,S=P>ft,z=m*_;if(u.add(Vt(z*w*J(P),y*D+z*tt(P))),a+=S?T+w*Xt:T,S^d>=n^b>=n){var k=Br(Xn(p),Xn(v));ys(k);var A=Br(o,k);ys(A);var L=(S^T>=0?-1:1)*Zt(A[2]);(r>L||r===L&&(k[0]||k[1]))&&(s+=S^T>=0?1:-1)}}return(a<-nt||a<nt&&u<-Ki)^s&1}function y1(t,e,n,r){return function(i){var o=e(i),a=p1(),s=e(a),u=!1,c,l,h,f={point:p,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=v,l=[],c=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=m,l=Cc(l);var b=m1(c,r);l.length?(u||(i.polygonStart(),u=!0),d1(l,eP,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(b,$){t(b,$)&&i.point(b,$)}function d(b,$){o.point(b,$)}function g(){f.point=d,o.lineStart()}function m(){f.point=p,o.lineEnd()}function y(b,$){h.push([b,$]),s.point(b,$)}function x(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),$=a.result(),_,D=$.length,T,w,P;if(h.pop(),c.push(h),h=null,!!D){if(b&1){if(w=$[0],(T=w.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),_=0;_<T;++_)i.point((P=w[_])[0],P[1]);i.lineEnd()}return}D>1&&b&2&&$.push($.pop().concat($.shift())),l.push($.filter(tP))}}return f}}function tP(t){return t.length>1}function eP(t,e){return((t=t.x)[0]<0?t[1]-At-nt:At-t[1])-((e=e.x)[0]<0?e[1]-At-nt:At-e[1])}const ef=y1(function(){return!0},nP,iP,[-ft,-At]);function nP(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ft:-ft,u=dt(o-e);dt(u-ft)<nt?(t.point(e,n=(n+a)/2>0?At:-At),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&u>=ft&&(dt(e-r)<nt&&(e-=r*nt),dt(o-s)<nt&&(o-=s*nt),n=rP(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function rP(t,e,n,r){var i,o,a=J(t-n);return dt(a)>nt?Ur((J(e)*(o=tt(r))*J(n)-J(r)*(i=tt(e))*J(t))/(i*o*a)):(e+r)/2}function iP(t,e,n,r){var i;if(t==null)i=n*At,r.point(-ft,i),r.point(0,i),r.point(ft,i),r.point(ft,0),r.point(ft,-i),r.point(0,-i),r.point(-ft,-i),r.point(-ft,0),r.point(-ft,i);else if(dt(t[0]-e[0])>nt){var o=t[0]<e[0]?ft:-ft;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function b1(t){var e=tt(t),n=2*rt,r=e>0,i=dt(e)>nt;function o(l,h,f,p){f1(p,t,n,f,l,h)}function a(l,h){return tt(l)*tt(h)>e}function s(l){var h,f,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,y){var x=[m,y],v,b=a(m,y),$=r?b?0:c(m,y):b?c(m+(m<0?ft:-ft),y):0;if(!h&&(d=p=b)&&l.lineStart(),b!==p&&(v=u(h,x),(!v||As(h,v)||As(x,v))&&(x[2]=1)),b!==p)g=0,b?(l.lineStart(),v=u(x,h),l.point(v[0],v[1])):(v=u(h,x),l.point(v[0],v[1],2),l.lineEnd()),h=v;else if(i&&h&&r^b){var _;!($&f)&&(_=u(x,h,!0))&&(g=0,r?(l.lineStart(),l.point(_[0][0],_[0][1]),l.point(_[1][0],_[1][1]),l.lineEnd()):(l.point(_[1][0],_[1][1]),l.lineEnd(),l.lineStart(),l.point(_[0][0],_[0][1],3)))}b&&(!h||!As(h,x))&&l.point(x[0],x[1]),h=x,p=b,f=$},lineEnd:function(){p&&l.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function u(l,h,f){var p=Xn(l),d=Xn(h),g=[1,0,0],m=Br(p,d),y=gs(m,m),x=m[0],v=y-x*x;if(!v)return!f&&l;var b=e*y/v,$=-e*x/v,_=Br(g,m),D=ms(g,b),T=ms(m,$);Wl(D,T);var w=_,P=gs(D,w),S=gs(w,w),z=P*P-S*(gs(D,D)-1);if(!(z<0)){var k=Rt(z),A=ms(w,(-P-k)/S);if(Wl(A,D),A=ds(A),!f)return A;var L=l[0],M=h[0],F=l[1],O=h[1],E;M<L&&(E=L,L=M,M=E);var R=M-L,C=dt(R-ft)<nt,N=C||R<nt;if(!C&&O<F&&(E=F,F=O,O=E),N?C?F+O>0^A[1]<(dt(A[0]-L)<nt?F:O):F<=A[1]&&A[1]<=O:R>ft^(L<=A[0]&&A[0]<=M)){var j=ms(w,(-P+k)/S);return Wl(j,D),[A,ds(j)]}}}function c(l,h){var f=r?t:ft-t,p=0;return l<-f?p|=1:l>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return y1(a,s,o,r?[0,-t]:[-ft,t-ft])}function oP(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],c=e[1],l=0,h=1,f=u-a,p=c-s,d;if(d=n-a,!(!f&&d>0)){if(d/=f,f<0){if(d<l)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>l&&(l=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>l&&(l=d)}else if(f>0){if(d<l)return;d<h&&(h=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<l)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>l&&(l=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>l&&(l=d)}else if(p>0){if(d<l)return;d<h&&(h=d)}return l>0&&(t[0]=a+l*f,t[1]=s+l*p),h<1&&(e[0]=a+h*f,e[1]=s+h*p),!0}}}}}var eo=1e9,Ds=-eo;function Ps(t,e,n,r){function i(c,l){return t<=c&&c<=n&&e<=l&&l<=r}function o(c,l,h,f){var p=0,d=0;if(c==null||(p=a(c,h))!==(d=a(l,h))||u(c,l)<0^h>0)do f.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+h+4)%4)!==d);else f.point(l[0],l[1])}function a(c,l){return dt(c[0]-t)<nt?l>0?0:3:dt(c[0]-n)<nt?l>0?2:1:dt(c[1]-e)<nt?l>0?1:0:l>0?3:2}function s(c,l){return u(c.x,l.x)}function u(c,l){var h=a(c,1),f=a(l,1);return h!==f?h-f:h===0?l[1]-c[1]:h===1?c[0]-l[0]:h===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,h=p1(),f,p,d,g,m,y,x,v,b,$,_,D={point:T,lineStart:z,lineEnd:k,polygonStart:P,polygonEnd:S};function T(L,M){i(L,M)&&l.point(L,M)}function w(){for(var L=0,M=0,F=p.length;M<F;++M)for(var O=p[M],E=1,R=O.length,C=O[0],N,j,Q=C[0],I=C[1];E<R;++E)N=Q,j=I,C=O[E],Q=C[0],I=C[1],j<=r?I>r&&(Q-N)*(r-j)>(I-j)*(t-N)&&++L:I<=r&&(Q-N)*(r-j)<(I-j)*(t-N)&&--L;return L}function P(){l=h,f=[],p=[],_=!0}function S(){var L=w(),M=_&&L,F=(f=Cc(f)).length;(M||F)&&(c.polygonStart(),M&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),F&&d1(f,s,L,o,c),c.polygonEnd()),l=c,f=p=d=null}function z(){D.point=A,p&&p.push(d=[]),$=!0,b=!1,x=v=NaN}function k(){f&&(A(g,m),y&&b&&h.rejoin(),f.push(h.result())),D.point=T,b&&l.lineEnd()}function A(L,M){var F=i(L,M);if(p&&d.push([L,M]),$)g=L,m=M,y=F,$=!1,F&&(l.lineStart(),l.point(L,M));else if(F&&b)l.point(L,M);else{var O=[x=Math.max(Ds,Math.min(eo,x)),v=Math.max(Ds,Math.min(eo,v))],E=[L=Math.max(Ds,Math.min(eo,L)),M=Math.max(Ds,Math.min(eo,M))];oP(O,E,t,e,n,r)?(b||(l.lineStart(),l.point(O[0],O[1])),l.point(E[0],E[1]),F||l.lineEnd(),_=!1):F&&(l.lineStart(),l.point(L,M),_=!1)}x=L,v=M,b=F}return D}}function aP(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Ps(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var nf,rf,Ts,Ls,Wr={sphere:wt,point:wt,lineStart:sP,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function sP(){Wr.point=cP,Wr.lineEnd=uP}function uP(){Wr.point=Wr.lineEnd=wt}function cP(t,e){t*=rt,e*=rt,rf=t,Ts=J(e),Ls=tt(e),Wr.point=lP}function lP(t,e){t*=rt,e*=rt;var n=J(e),r=tt(e),i=dt(t-rf),o=tt(i),a=J(i),s=r*a,u=Ls*n-Ts*r*o,c=Ts*n+Ls*r*o;nf.add(Vt(Rt(s*s+u*u),c)),rf=t,Ts=n,Ls=r}function v1(t){return nf=new Tt,Pe(t,Wr),+nf}var of=[null,null],fP={type:"LineString",coordinates:of};function Cs(t,e){return of[0]=t,of[1]=e,v1(fP)}var x1={Feature:function(t,e){return Es(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Es(n[r].geometry,e))return!0;return!1}},_1={Sphere:function(){return!0},Point:function(t,e){return w1(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(w1(n[r],e))return!0;return!1},LineString:function(t,e){return $1(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if($1(n[r],e))return!0;return!1},Polygon:function(t,e){return S1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(S1(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Es(n[r],e))return!0;return!1}};function Es(t,e){return t&&_1.hasOwnProperty(t.type)?_1[t.type](t,e):!1}function w1(t,e){return Cs(t,e)===0}function $1(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Cs(t[o],e),r===0||o>0&&(i=Cs(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ki*i))return!0;n=r}return!1}function S1(t,e){return!!m1(t.map(hP),A1(e))}function hP(t){return t=t.map(A1),t.pop(),t}function A1(t){return[t[0]*rt,t[1]*rt]}function pP(t,e){return(t&&x1.hasOwnProperty(t.type)?x1[t.type]:Es)(t,e)}function M1(t,e,n){var r=ln(t,e-nt,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function D1(t,e,n){var r=ln(t,e-nt,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function P1(){var t,e,n,r,i,o,a,s,u=10,c=u,l=90,h=360,f,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return ln(cs(r/l)*l,n,l).map(d).concat(ln(cs(s/h)*h,a,h).map(g)).concat(ln(cs(e/u)*u,t,u).filter(function(v){return dt(v%l)>nt}).map(f)).concat(ln(cs(o/c)*c,i,c).filter(function(v){return dt(v%h)>nt}).map(p))}return y.lines=function(){return x().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(n).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],s=+v[0][1],a=+v[1][1],r>n&&(v=r,r=n,n=v),s>a&&(v=s,s=a,a=v),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(m)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(l=+v[0],h=+v[1],y):[l,h]},y.stepMinor=function(v){return arguments.length?(u=+v[0],c=+v[1],y):[u,c]},y.precision=function(v){return arguments.length?(m=+v,f=M1(o,i,90),p=D1(e,t,m),d=M1(s,a,90),g=D1(r,n,m),y):m},y.extentMajor([[-180,-90+nt],[180,90-nt]]).extentMinor([[-180,-80-nt],[180,80+nt]])}function dP(){return P1()()}function gP(t,e){var n=t[0]*rt,r=t[1]*rt,i=e[0]*rt,o=e[1]*rt,a=tt(r),s=J(r),u=tt(o),c=J(o),l=a*tt(n),h=a*J(n),f=u*tt(i),p=u*J(i),d=2*Zt(Rt(Bm(o-r)+a*u*Bm(i-n))),g=J(d),m=d?function(y){var x=J(y*=d)/g,v=J(d-y)/g,b=v*l+x*f,$=v*h+x*p,_=v*s+x*c;return[Vt($,b)*bt,Vt(_,Rt(b*b+$*$))*bt]}:function(){return[n*bt,r*bt]};return m.distance=d,m}const no=t=>t;var af=new Tt,sf=new Tt,T1,L1,uf,cf,Je={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){Je.lineStart=mP,Je.lineEnd=bP},polygonEnd:function(){Je.lineStart=Je.lineEnd=Je.point=wt,af.add(dt(sf)),sf=new Tt},result:function(){var t=af/2;return af=new Tt,t}};function mP(){Je.point=yP}function yP(t,e){Je.point=C1,T1=uf=t,L1=cf=e}function C1(t,e){sf.add(cf*t-uf*e),uf=t,cf=e}function bP(){C1(T1,L1)}var qr=1/0,ks=qr,ro=-qr,Rs=ro,Is={point:vP,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[qr,ks],[ro,Rs]];return ro=Rs=-(ks=qr=1/0),t}};function vP(t,e){t<qr&&(qr=t),t>ro&&(ro=t),e<ks&&(ks=e),e>Rs&&(Rs=e)}var lf=0,ff=0,io=0,Ns=0,Fs=0,jr=0,hf=0,pf=0,oo=0,E1,k1,ze,Oe,ge={point:Zn,lineStart:R1,lineEnd:I1,polygonStart:function(){ge.lineStart=wP,ge.lineEnd=$P},polygonEnd:function(){ge.point=Zn,ge.lineStart=R1,ge.lineEnd=I1},result:function(){var t=oo?[hf/oo,pf/oo]:jr?[Ns/jr,Fs/jr]:io?[lf/io,ff/io]:[NaN,NaN];return lf=ff=io=Ns=Fs=jr=hf=pf=oo=0,t}};function Zn(t,e){lf+=t,ff+=e,++io}function R1(){ge.point=xP}function xP(t,e){ge.point=_P,Zn(ze=t,Oe=e)}function _P(t,e){var n=t-ze,r=e-Oe,i=Rt(n*n+r*r);Ns+=i*(ze+t)/2,Fs+=i*(Oe+e)/2,jr+=i,Zn(ze=t,Oe=e)}function I1(){ge.point=Zn}function wP(){ge.point=SP}function $P(){N1(E1,k1)}function SP(t,e){ge.point=N1,Zn(E1=ze=t,k1=Oe=e)}function N1(t,e){var n=t-ze,r=e-Oe,i=Rt(n*n+r*r);Ns+=i*(ze+t)/2,Fs+=i*(Oe+e)/2,jr+=i,i=Oe*t-ze*e,hf+=i*(ze+t),pf+=i*(Oe+e),oo+=i*3,Zn(ze=t,Oe=e)}function F1(t){this._context=t}F1.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Xt);break}}},result:wt};var df=new Tt,gf,G1,z1,ao,so,uo={point:wt,lineStart:function(){uo.point=AP},lineEnd:function(){gf&&O1(G1,z1),uo.point=wt},polygonStart:function(){gf=!0},polygonEnd:function(){gf=null},result:function(){var t=+df;return df=new Tt,t}};function AP(t,e){uo.point=O1,G1=ao=t,z1=so=e}function O1(t,e){ao-=t,so-=e,df.add(Rt(ao*ao+so*so)),ao=t,so=e}let U1,Gs,B1,Y1;class H1{constructor(e){this._append=e==null?W1:MP(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==B1||this._append!==Gs){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,B1=r,Gs=this._append,Y1=this._,this._=i}this._+=Y1;break}}}result(){const e=this._;return this._="",e.length?e:null}}function W1(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function MP(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return W1;if(e!==U1){const n=10**e;U1=e,Gs=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Gs}function DP(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Pe(s,i(o))),o.result()}return a.area=function(s){return Pe(s,i(Je)),Je.result()},a.measure=function(s){return Pe(s,i(uo)),uo.result()},a.bounds=function(s){return Pe(s,i(Is)),Is.result()},a.centroid=function(s){return Pe(s,i(ge)),ge.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,no):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new H1(n)):new F1(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const u=Math.floor(s);if(!(u>=0))throw new RangeError(`invalid digits: ${s}`);n=u}return e===null&&(o=new H1(n)),a},a.projection(t).digits(n).context(e)}function PP(t){return{stream:co(t)}}function co(t){return function(e){var n=new mf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function mf(){}mf.prototype={constructor:mf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function yf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Pe(n,t.stream(Is)),e(Is.result()),r!=null&&t.clipExtent(r),t}function zs(t,e,n){return yf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function bf(t,e,n){return zs(t,[[0,0],e],n)}function vf(t,e,n){return yf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function xf(t,e,n){return yf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var q1=16,TP=tt(30*rt);function j1(t,e){return+e?CP(t,e):LP(t)}function LP(t){return co({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function CP(t,e){function n(r,i,o,a,s,u,c,l,h,f,p,d,g,m){var y=c-r,x=l-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+f,$=s+p,_=u+d,D=Rt(b*b+$*$+_*_),T=Zt(_/=D),w=dt(dt(_)-1)<nt||dt(o-h)<nt?(o+h)/2:Vt($,b),P=t(w,T),S=P[0],z=P[1],k=S-r,A=z-i,L=x*k-y*A;(L*L/v>e||dt((y*k+x*A)/v-.5)>.3||a*f+s*p+u*d<TP)&&(n(r,i,o,a,s,u,S,z,w,b/=D,$/=D,_,g,m),m.point(S,z),n(S,z,w,b,$,_,c,l,h,f,p,d,g,m))}}return function(r){var i,o,a,s,u,c,l,h,f,p,d,g,m={point:y,lineStart:x,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=$},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y(T,w){T=t(T,w),r.point(T[0],T[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v(T,w){var P=Xn([T,w]),S=t(T,w);n(h,f,l,p,d,g,h=S[0],f=S[1],l=T,p=P[0],d=P[1],g=P[2],q1,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function $(){x(),m.point=_,m.lineEnd=D}function _(T,w){v(i=T,w),o=h,a=f,s=p,u=d,c=g,m.point=v}function D(){n(h,f,l,p,d,g,o,a,i,s,u,c,q1,r),m.lineEnd=b,b()}return m}}var EP=co({point:function(t,e){this.stream.point(t*rt,e*rt)}});function kP(t){return co({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function RP(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function X1(t,e,n,r,i,o){if(!o)return RP(t,e,n,r,i);var a=tt(o),s=J(o),u=a*t,c=s*t,l=a/t,h=s/t,f=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(g,m){return g*=r,m*=i,[u*g-c*m+e,n-c*g-u*m]}return d.invert=function(g,m){return[r*(l*g-h*m+f),i*(p-h*g-l*m)]},d}function Ue(t){return _f(function(){return t})()}function _f(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,c=0,l,h=0,f=1,p=1,d=null,g=ef,m=null,y,x,v,b=no,$=.5,_,D,T,w,P;function S(L){return T(L[0]*rt,L[1]*rt)}function z(L){return L=T.invert(L[0],L[1]),L&&[L[0]*bt,L[1]*bt]}S.stream=function(L){return w&&P===L?w:w=EP(kP(l)(g(_(b(P=L)))))},S.preclip=function(L){return arguments.length?(g=L,d=void 0,A()):g},S.postclip=function(L){return arguments.length?(b=L,m=y=x=v=null,A()):b},S.clipAngle=function(L){return arguments.length?(g=+L?b1(d=L*rt):(d=null,ef),A()):d*bt},S.clipExtent=function(L){return arguments.length?(b=L==null?(m=y=x=v=null,no):Ps(m=+L[0][0],y=+L[0][1],x=+L[1][0],v=+L[1][1]),A()):m==null?null:[[m,y],[x,v]]},S.scale=function(L){return arguments.length?(n=+L,k()):n},S.translate=function(L){return arguments.length?(r=+L[0],i=+L[1],k()):[r,i]},S.center=function(L){return arguments.length?(o=L[0]%360*rt,a=L[1]%360*rt,k()):[o*bt,a*bt]},S.rotate=function(L){return arguments.length?(s=L[0]%360*rt,u=L[1]%360*rt,c=L.length>2?L[2]%360*rt:0,k()):[s*bt,u*bt,c*bt]},S.angle=function(L){return arguments.length?(h=L%360*rt,k()):h*bt},S.reflectX=function(L){return arguments.length?(f=L?-1:1,k()):f<0},S.reflectY=function(L){return arguments.length?(p=L?-1:1,k()):p<0},S.precision=function(L){return arguments.length?(_=j1(D,$=L*L),A()):Rt($)},S.fitExtent=function(L,M){return zs(S,L,M)},S.fitSize=function(L,M){return bf(S,L,M)},S.fitWidth=function(L,M){return vf(S,L,M)},S.fitHeight=function(L,M){return xf(S,L,M)};function k(){var L=X1(n,0,0,f,p,h).apply(null,e(o,a)),M=X1(n,r-L[0],i-L[1],f,p,h);return l=Jl(s,u,c),D=Kl(e,M),T=Kl(l,D),_=j1(D,$),A()}function A(){return w=P=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&z,k()}}function wf(t){var e=0,n=ft/3,r=_f(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*rt,n=o[1]*rt):[e*bt,n*bt]},i}function IP(t){var e=tt(t);function n(r,i){return[r*e,J(i)/e]}return n.invert=function(r,i){return[r/e,Zt(i*e)]},n}function V1(t,e){var n=J(t),r=(n+J(e))/2;if(dt(r)<nt)return IP(t);var i=1+n*(2*r-n),o=Rt(i)/r;function a(s,u){var c=Rt(i-2*r*J(u))/r;return[c*J(s*=r),o-c*tt(s)]}return a.invert=function(s,u){var c=o-u,l=Vt(s,dt(c))*de(c);return c*r<0&&(l-=ft*de(s)*de(c)),[l/r,Zt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Os(){return wf(V1).scale(155.424).center([0,33.6442])}function Z1(){return Os().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function NP(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function FP(){var t,e,n=Z1(),r,i=Os().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Os().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,p){u=[f,p]}};function l(f){var p=f[0],d=f[1];return u=null,r.point(p,d),u||(o.point(p,d),u)||(s.point(p,d),u)}l.invert=function(f){var p=n.scale(),d=n.translate(),g=(f[0]-d[0])/p,m=(f[1]-d[1])/p;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(f)},l.stream=function(f){return t&&e===f?t:t=NP([n.stream(e=f),i.stream(f),a.stream(f)])},l.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},l.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),l.translate(n.translate())):n.scale()},l.translate=function(f){if(!arguments.length)return n.translate();var p=n.scale(),d=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(c),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+nt,g+.12*p+nt],[d-.214*p-nt,g+.234*p-nt]]).stream(c),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+nt,g+.166*p+nt],[d-.115*p-nt,g+.234*p-nt]]).stream(c),h()},l.fitExtent=function(f,p){return zs(l,f,p)},l.fitSize=function(f,p){return bf(l,f,p)},l.fitWidth=function(f,p){return vf(l,f,p)},l.fitHeight=function(f,p){return xf(l,f,p)};function h(){return t=e=null,l}return l.scale(1070)}function K1(t){return function(e,n){var r=tt(e),i=tt(n),o=t(r*i);return o===1/0?[2,0]:[o*i*J(e),o*J(n)]}}function lo(t){return function(e,n){var r=Rt(e*e+n*n),i=t(r),o=J(i),a=tt(i);return[Vt(e*o,r*a),Zt(r&&n*o/r)]}}var $f=K1(function(t){return Rt(2/(1+t))});$f.invert=lo(function(t){return 2*Zt(t/2)});function GP(){return Ue($f).scale(124.75).clipAngle(180-.001)}var Sf=K1(function(t){return(t=Um(t))&&t/J(t)});Sf.invert=lo(function(t){return t});function zP(){return Ue(Sf).scale(79.4188).clipAngle(180-.001)}function fo(t,e){return[t,ls(Ol((At+e)/2))]}fo.invert=function(t,e){return[t,2*Ur(Om(e))-At]};function OP(){return Q1(fo).scale(961/Xt)}function Q1(t){var e=Ue(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,c;e.scale=function(h){return arguments.length?(r(h),l()):r()},e.translate=function(h){return arguments.length?(i(h),l()):i()},e.center=function(h){return arguments.length?(n(h),l()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=c=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],c=+h[1][1]),l()):a==null?null:[[a,s],[u,c]]};function l(){var h=ft*r(),f=e(l1(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===fo?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),c]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,c)]])}return l()}function Us(t){return Ol((At+t)/2)}function J1(t,e){var n=tt(t),r=t===e?J(t):ls(n/tt(e))/ls(Us(e)/Us(t)),i=n*zl(Us(t),r)/r;if(!r)return fo;function o(a,s){i>0?s<-At+nt&&(s=-At+nt):s>At-nt&&(s=At-nt);var u=i/zl(Us(s),r);return[u*J(r*a),i-u*tt(r*a)]}return o.invert=function(a,s){var u=i-s,c=de(r)*Rt(a*a+u*u),l=Vt(a,dt(u))*de(u);return u*r<0&&(l-=ft*de(a)*de(u)),[l/r,2*Ur(zl(i/c,1/r))-At]},o}function UP(){return wf(J1).scale(109.5).parallels([30,30])}function ho(t,e){return[t,e]}ho.invert=ho;function BP(){return Ue(ho).scale(152.63)}function ty(t,e){var n=tt(t),r=t===e?J(t):(n-tt(e))/(e-t),i=n/r+t;if(dt(r)<nt)return ho;function o(a,s){var u=i-s,c=r*a;return[u*J(c),i-u*tt(c)]}return o.invert=function(a,s){var u=i-s,c=Vt(a,dt(u))*de(u);return u*r<0&&(c-=ft*de(a)*de(u)),[c/r,i-de(r)*Rt(a*a+u*u)]},o}function YP(){return wf(ty).scale(131.154).center([0,13.9389])}var po=1.340264,go=-.081106,mo=893e-6,yo=.003796,Bs=Rt(3)/2,HP=12;function Af(t,e){var n=Zt(Bs*J(e)),r=n*n,i=r*r*r;return[t*tt(n)/(Bs*(po+3*go*r+i*(7*mo+9*yo*r))),n*(po+go*r+i*(mo+yo*r))]}Af.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<HP&&(s=n*(po+go*r+i*(mo+yo*r))-e,u=po+3*go*r+i*(7*mo+9*yo*r),n-=a=s/u,r=n*n,i=r*r*r,!(dt(a)<Ki));++o);return[Bs*t*(po+3*go*r+i*(7*mo+9*yo*r))/tt(n),Zt(J(n)/Bs)]};function WP(){return Ue(Af).scale(177.158)}function Mf(t,e){var n=tt(e),r=tt(t)*n;return[n*J(t)/r,J(e)/r]}Mf.invert=lo(Ur);function qP(){return Ue(Mf).scale(144.049).clipAngle(60)}function jP(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,c,l,h,f=1,p=1,d=co({point:function(b,$){var _=v([b,$]);this.stream.point(_[0],_[1])}}),g=no,m,y;function x(){return f=t*r,p=t*i,m=y=null,v}function v(b){var $=b[0]*f,_=b[1]*p;if(o){var D=_*a-$*s;$=$*a+_*s,_=D}return[$+e,_+n]}return v.invert=function(b){var $=b[0]-e,_=b[1]-n;if(o){var D=_*a+$*s;$=$*a-_*s,_=D}return[$/f,_/p]},v.stream=function(b){return m&&y===b?m:m=d(g(y=b))},v.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,no):Ps(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),x()):u==null?null:[[u,c],[l,h]]},v.scale=function(b){return arguments.length?(t=+b,x()):t},v.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],x()):[e,n]},v.angle=function(b){return arguments.length?(o=b%360*rt,s=J(o),a=tt(o),x()):o*bt},v.reflectX=function(b){return arguments.length?(r=b?-1:1,x()):r<0},v.reflectY=function(b){return arguments.length?(i=b?-1:1,x()):i<0},v.fitExtent=function(b,$){return zs(v,b,$)},v.fitSize=function(b,$){return bf(v,b,$)},v.fitWidth=function(b,$){return vf(v,b,$)},v.fitHeight=function(b,$){return xf(v,b,$)},v}function Df(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Df.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(dt(i)>nt&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function XP(){return Ue(Df).scale(175.295)}function Pf(t,e){return[tt(e)*J(t),J(e)]}Pf.invert=lo(Zt);function VP(){return Ue(Pf).scale(249.5).clipAngle(90+nt)}function Tf(t,e){var n=tt(e),r=1+tt(t)*n;return[n*J(t)/r,J(e)/r]}Tf.invert=lo(function(t){return 2*Ur(t)});function ZP(){return Ue(Tf).scale(250).clipAngle(142)}function Lf(t,e){return[ls(Ol((At+e)/2)),-t]}Lf.invert=function(t,e){return[-e,2*Ur(Om(t))-At]};function KP(){var t=Q1(Lf),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function QP(t,e){return t.parent===e.parent?1:2}function JP(t){return t.reduce(t9,0)/t.length}function t9(t,e){return t+e.x}function e9(t){return 1+t.reduce(n9,0)}function n9(t,e){return Math.max(t,e.y)}function r9(t){for(var e;e=t.children;)t=e[0];return t}function i9(t){for(var e;e=t.children;)t=e[e.length-1];return t}function o9(){var t=QP,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=JP(p),f.y=e9(p)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=r9(o),c=i9(o),l=u.x-t(u,c)/2,h=c.x+t(c,u)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*e,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-l)/(h-l)*e,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function a9(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function s9(){return this.eachAfter(a9)}function u9(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function c9(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function l9(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function f9(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function h9(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function p9(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function d9(t){for(var e=this,n=g9(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function g9(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function m9(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function y9(){return Array.from(this)}function b9(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function v9(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*x9(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Ys(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=$9)):e===void 0&&(e=w9);for(var n=new Kn(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new Kn(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(ey)}function _9(){return Ys(this).eachBefore(S9)}function w9(t){return t.children}function $9(t){return Array.isArray(t)?t[1]:null}function S9(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function ey(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Kn(t){this.data=t,this.depth=this.height=0,this.parent=null}Kn.prototype=Ys.prototype={constructor:Kn,count:s9,each:u9,eachAfter:l9,eachBefore:c9,find:f9,sum:h9,sort:p9,path:d9,ancestors:m9,descendants:y9,leaves:b9,links:v9,copy:_9,[Symbol.iterator]:x9};function Hs(t){return t==null?null:ny(t)}function ny(t){if(typeof t!="function")throw new Error;return t}function Qn(){return 0}function Xr(t){return function(){return t}}const A9=1664525,M9=1013904223,ry=4294967296;function Cf(){let t=1;return()=>(t=(A9*t+M9)%ry)/ry}function D9(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function P9(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function T9(t){return iy(t,Cf())}function iy(t,e){for(var n=0,r=(t=P9(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&oy(a,o)?++n:(a=C9(i=L9(i,o)),n=0);return a}function L9(t,e){var n,r;if(Ef(e,t))return[e];for(n=0;n<t.length;++n)if(Ws(e,t[n])&&Ef(bo(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Ws(bo(t[n],t[r]),e)&&Ws(bo(t[n],e),t[r])&&Ws(bo(t[r],e),t[n])&&Ef(ay(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Ws(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function oy(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Ef(t,e){for(var n=0;n<e.length;++n)if(!oy(t,e[n]))return!1;return!0}function C9(t){switch(t.length){case 1:return E9(t[0]);case 2:return bo(t[0],t[1]);case 3:return ay(t[0],t[1],t[2])}}function E9(t){return{x:t.x,y:t.y,r:t.r}}function bo(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,h=Math.sqrt(u*u+c*c);return{x:(n+o+u/h*l)/2,y:(r+a+c/h*l)/2,r:(h+i+s)/2}}function ay(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,h=n.r,f=r-a,p=r-c,d=i-s,g=i-l,m=u-o,y=h-o,x=r*r+i*i-o*o,v=x-a*a-s*s+u*u,b=x-c*c-l*l+h*h,$=p*d-f*g,_=(d*b-g*v)/($*2)-r,D=(g*m-d*y)/$,T=(p*v-f*b)/($*2)-i,w=(f*y-p*m)/$,P=D*D+w*w-1,S=2*(o+_*D+T*w),z=_*_+T*T-o*o,k=-(Math.abs(P)>1e-6?(S+Math.sqrt(S*S-4*P*z))/(2*P):z/S);return{x:r+_+D*k,y:i+T+w*k,r:k}}function sy(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function uy(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function cy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function qs(t){this._=t,this.next=null,this.previous=null}function ly(t,e){if(!(o=(t=D9(t)).length))return 0;var n,r,i,o,a,s,u,c,l,h,f;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;sy(r,n,i=t[2]),n=new qs(n),r=new qs(r),i=new qs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){sy(n._,r._,i=t[u]),i=new qs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(uy(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(uy(l._,i._)){n=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.previous}while(c!==l.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=cy(n);(i=i.next)!==r;)(s=cy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=iy(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function k9(t){return ly(t,Cf()),t}function R9(t){return Math.sqrt(t.value)}function I9(){var t=null,e=1,n=1,r=Qn;function i(o){const a=Cf();return o.x=e/2,o.y=n/2,t?o.eachBefore(fy(t)).eachAfter(kf(r,.5,a)).eachBefore(hy(1)):o.eachBefore(fy(R9)).eachAfter(kf(Qn,1,a)).eachAfter(kf(r,o.r/Math.min(e,n),a)).eachBefore(hy(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Hs(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Xr(+o),i):r},i}function fy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function kf(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=ly(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function hy(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function py(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function vo(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function N9(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore(py),a}function o(a,s){return function(u){u.children&&vo(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var c=u.x0,l=u.y0,h=u.x1-n,f=u.y1-n;h<c&&(c=h=(c+h)/2),f<l&&(l=f=(l+f)/2),u.x0=c,u.y0=l,u.x1=h,u.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var F9={depth:-1},dy={},Rf={};function G9(t){return t.id}function z9(t){return t.parentId}function O9(){var t=G9,e=z9,n;function r(i){var o=Array.from(i),a=t,s=e,u,c,l,h,f,p,d,g,m=new Map;if(n!=null){const y=o.map((b,$)=>U9(n(b,$,i))),x=y.map(gy),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(gy(b)),o.push(Rf));a=(b,$)=>y[$],s=(b,$)=>x[$]}for(l=0,u=o.length;l<u;++l)c=o[l],p=o[l]=new Kn(c),(d=a(c,l,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?dy:p)),(d=s(c,l,i))!=null&&(d+="")&&(p.parent=d);for(l=0;l<u;++l)if(p=o[l],d=p.parent){if(f=m.get(d),!f)throw new Error("missing: "+d);if(f===dy)throw new Error("ambiguous: "+d);f.children?f.children.push(p):f.children=[p],p.parent=f}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Rf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Rf);--y)p.data=null}if(h.parent=F9,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(ey),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Hs(i),r):t},r.parentId=function(i){return arguments.length?(e=Hs(i),r):e},r.path=function(i){return arguments.length?(n=Hs(i),r):n},r}function U9(t){t=`${t}`;let e=t.length;return If(t,e-1)&&!If(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function gy(t){let e=t.length;if(e<2)return"";for(;--e>1&&!If(t,e););return t.slice(0,e)}function If(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function B9(t,e){return t.parent===e.parent?1:2}function Nf(t){var e=t.children;return e?e[0]:t.t}function Ff(t){var e=t.children;return e?e[e.length-1]:t.t}function Y9(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function H9(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function W9(t,e,n){return t.a.parent===e.parent?t.a:n}function js(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}js.prototype=Object.create(Kn.prototype);function q9(t){for(var e=new js(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new js(o[a],a)),i.parent=n;return(e.parent=new js(null,0)).children=[e],e}function j9(){var t=B9,e=1,n=1,r=null;function i(c){var l=q9(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)c.eachBefore(u);else{var h=c,f=c,p=c;c.eachBefore(function(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>p.depth&&(p=x)});var d=h===f?1:t(h,f)/2,g=d-h.x,m=e/(f.x+d+g),y=n/(p.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*y})}return c}function o(c){var l=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(l){H9(c);var p=(l[0].z+l[l.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+t(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,l,h){if(l){for(var f=c,p=c,d=l,g=f.parent.children[0],m=f.m,y=p.m,x=d.m,v=g.m,b;d=Ff(d),f=Nf(f),d&&f;)g=Nf(g),p=Ff(p),p.a=c,b=d.z+x-f.z-m+t(d._,f._),b>0&&(Y9(W9(d,c,h),c,b),m+=b,y+=b),x+=d.m,m+=f.m,v+=g.m,y+=p.m;d&&!Ff(p)&&(p.t=d,p.m+=x-y),f&&!Nf(g)&&(g.t=f,g.m+=m-v,h=c)}return h}function u(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function Xs(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var my=(1+Math.sqrt(5))/2;function yy(t,e,n,r,i,o){for(var a=[],s=e.children,u,c,l=0,h=0,f=s.length,p,d,g=e.value,m,y,x,v,b,$,_;l<f;){p=i-n,d=o-r;do m=s[h++].value;while(!m&&h<f);for(y=x=m,$=Math.max(d/p,p/d)/(g*t),_=m*m*$,b=Math.max(x/_,_/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),_=m*m*$,v=Math.max(x/_,_/y),v>b){m-=c;break}b=v}a.push(u={value:m,dice:p<d,children:s.slice(l,h)}),u.dice?vo(u,n,r,i,g?r+=d*m/g:o):Xs(u,n,r,g?n+=p*m/g:i,o),g-=m,l=h}return a}const Gf=function t(e){function n(r,i,o,a,s){yy(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(my);function by(){var t=Gf,e=!1,n=1,r=1,i=[0],o=Qn,a=Qn,s=Qn,u=Qn,c=Qn;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore(py),f}function h(f){var p=i[f.depth],d=f.x0+p,g=f.y0+p,m=f.x1-p,y=f.y1-p;m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),f.x0=d,f.y0=g,f.x1=m,f.y1=y,f.children&&(p=i[f.depth+1]=o(f)/2,d+=c(f)-p,g+=a(f)-p,m-=s(f)-p,y-=u(f)-p,m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),t(f,d,g,m,y))}return l.round=function(f){return arguments.length?(e=!!f,l):e},l.size=function(f){return arguments.length?(n=+f[0],r=+f[1],l):[n,r]},l.tile=function(f){return arguments.length?(t=ny(f),l):t},l.padding=function(f){return arguments.length?l.paddingInner(f).paddingOuter(f):l.paddingInner()},l.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Xr(+f),l):o},l.paddingOuter=function(f){return arguments.length?l.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):l.paddingTop()},l.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Xr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Xr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Xr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Xr(+f),l):c},l}function X9(t,e,n,r,i){var o=t.children,a,s=o.length,u,c=new Array(s+1);for(c[0]=u=a=0;a<s;++a)c[a+1]=u+=o[a].value;l(0,s,t.value,e,n,r,i);function l(h,f,p,d,g,m,y){if(h>=f-1){var x=o[h];x.x0=d,x.y0=g,x.x1=m,x.y1=y;return}for(var v=c[h],b=p/2+v,$=h+1,_=f-1;$<_;){var D=$+_>>>1;c[D]<b?$=D+1:_=D}b-c[$-1]<c[$]-b&&h+1<$&&--$;var T=c[$]-v,w=p-T;if(m-d>y-g){var P=p?(d*w+m*T)/p:m;l(h,$,T,d,g,P,y),l($,f,w,P,g,m,y)}else{var S=p?(g*w+y*T)/p:y;l(h,$,T,d,g,m,S),l($,f,w,d,S,m,y)}}}function V9(t,e,n,r,i){(t.depth&1?Xs:vo)(t,e,n,r,i)}const Z9=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,c,l,h,f=-1,p,d=u.length,g=r.value;++f<d;){for(c=u[f],l=c.children,h=c.value=0,p=l.length;h<p;++h)c.value+=l[h].value;c.dice?vo(c,i,o,a,g?o+=(s-o)*c.value/g:s):Xs(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=yy(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(my);function K9(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function Q9(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,u=0;++e<n;)o=a,a=t[e],u+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return u*=3,[r/u,i/u]}function J9(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function tT(t,e){return t[0]-e[0]||t[1]-e[1]}function vy(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&J9(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function eT(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(tT),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=vy(r),a=vy(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c}function nT(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,c,l=!1,h=0;h<n;++h)r=t[h],u=r[0],c=r[1],c>o!=s>o&&i<(a-u)*(o-c)/(s-c)+u&&(l=!l),a=u,s=c;return l}function rT(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],u=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,u+=Math.hypot(i,o);return u}const Nt=Math.random,iT=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Nt),oT=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Nt),zf=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Nt),aT=function t(e){var n=zf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),xy=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Nt),sT=function t(e){var n=xy.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Nt),uT=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),cT=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Nt),lT=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Nt),_y=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Nt),Of=function t(e){var n=zf.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),u=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var c=n(),l=1+s*c;while(l<=0);l*=l*l;var h=1-e()}while(h>=1-.0331*c*c*c*c&&Math.log(h)>=.5*c*c+a*(1-l+Math.log(l)));return a*l*u()*o}}return r.source=t,r}(Nt),wy=function t(e){var n=Of.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var u=a();return u===0?0:u/(u+s())}}return r.source=t,r}(Nt),$y=function t(e){var n=_y.source(e),r=wy.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,c=a;u*c>16&&u*(1-c)>16;){var l=Math.floor((u+1)*c),h=r(l,u-l+1)();h<=c?(s+=l,u-=l,c=(c-h)/(1-h)):(u=l-1,c/=h)}for(var f=c<.5,p=f?c:1-c,d=n(p),g=d(),m=0;g<=u;++m)g+=d();return s+(f?m:u-m)}}return i.source=t,i}(Nt),fT=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Nt),hT=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Nt),pT=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Nt),dT=function t(e){var n=Of.source(e),r=$y.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),c=n(u)();if(c>s)return a+r(u-1,s/c)();a+=u,s-=c}for(var l=-Math.log1p(-e()),h=0;l<=s;++h)l-=Math.log1p(-e());return a+h}}return i.source=t,i}(Nt),gT=1664525,mT=1013904223,Sy=1/4294967296;function yT(t=Math.random()){let e=(0<=t&&t<1?t/Sy:Math.abs(t))|0;return()=>(e=gT*e+mT|0,Sy*(e>>>0))}function me(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function tn(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Uf=Symbol("implicit");function Bf(){var t=new Mi,e=[],n=[],r=Uf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Uf)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Mi;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Bf(e,n).unknown(r)},me.apply(i,arguments),i}function Yf(){var t=Bf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*l,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=ln(f).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Yf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},me.apply(h(),arguments)}function Ay(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ay(e())},t}function Hf(){return Ay(Yf.apply(null,arguments).paddingInner(1))}function bT(t){return function(){return t}}function Vs(t){return+t}var My=[0,1];function te(t){return t}function Wf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:bT(isNaN(e)?NaN:.5)}function vT(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function xT(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Wf(i,r),o=n(a,o)):(r=Wf(r,i),o=n(o,a)),function(s){return o(r(s))}}function _T(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Wf(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Tn(t,s,1,r)-1;return o[u](i[u](s))}}function xo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Zs(){var t=My,e=My,n=pn,r,i,o,a=te,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==te&&(a=vT(t[0],t[f-1])),s=f>2?_T:xT,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),pe)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Vs),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=Ga,l()},h.clamp=function(f){return arguments.length?(a=f?!0:te,l()):a!==te},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,l()}}function qf(){return Zs()(te,te)}function Dy(t,e,n,r){var i=ga(t,e,n),o;switch(r=Or(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Gm(i,a))&&(r.precision=o),Fl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=zm(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Fm(i))&&(r.precision=o-(r.type==="%")*2);break}}return Zi(r)}function bn(t){var e=t.domain;return t.ticks=function(n){var r=e();return Cn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Dy(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=En(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function jf(){var t=qf();return t.copy=function(){return xo(t,jf())},me.apply(t,arguments),bn(t)}function Py(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Vs),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Py(t).unknown(e)},t=arguments.length?Array.from(t,Vs):[0,1],bn(n)}function Ty(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Ly(t){return Math.log(t)}function Cy(t){return Math.exp(t)}function wT(t){return-Math.log(-t)}function $T(t){return-Math.exp(-t)}function ST(t){return isFinite(t)?+("1e"+t):t<0?0:t}function AT(t){return t===10?ST:t===Math.E?Math.exp:e=>Math.pow(t,e)}function MT(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Ey(t){return(e,n)=>-t(-e,n)}function Xf(t){const e=t(Ly,Cy),n=e.domain;let r=10,i,o;function a(){return i=MT(r),o=AT(r),n()[0]<0?(i=Ey(i),o=Ey(o),t(wT,$T)):t(Ly,Cy),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const u=n();let c=u[0],l=u[u.length-1];const h=l<c;h&&([c,l]=[l,c]);let f=i(c),p=i(l),d,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&p-f<m){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(d=1;d<r;++d)if(g=f<0?d/o(-f):d*o(f),!(g<c)){if(g>l)break;y.push(g)}}else for(;f<=p;++f)for(d=r-1;d>=1;--d)if(g=f>0?d/o(-f):d*o(f),!(g<c)){if(g>l)break;y.push(g)}y.length*2<m&&(y=Cn(c,l,m))}else y=Cn(f,p,Math.min(p-f,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Or(u)).precision==null&&(u.trim=!0),u=Zi(u)),s===1/0)return u;const c=Math.max(1,r*s/e.ticks().length);return l=>{let h=l/o(Math.round(i(l)));return h*r<r-.5&&(h*=r),h<=c?u(l):""}},e.nice=()=>n(Ty(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function ky(){const t=Xf(Zs()).domain([1,10]);return t.copy=()=>xo(t,ky()).base(t.base()),me.apply(t,arguments),t}function Ry(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Iy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Vf(t){var e=1,n=t(Ry(e),Iy(e));return n.constant=function(r){return arguments.length?t(Ry(e=+r),Iy(e)):e},bn(n)}function Ny(){var t=Vf(Zs());return t.copy=function(){return xo(t,Ny()).constant(t.constant())},me.apply(t,arguments)}function Fy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function DT(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function PT(t){return t<0?-t*t:t*t}function Zf(t){var e=t(te,te),n=1;function r(){return n===1?t(te,te):n===.5?t(DT,PT):t(Fy(n),Fy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function Ks(){var t=Zf(Zs());return t.copy=function(){return xo(t,Ks()).exponent(t.exponent())},me.apply(t,arguments),t}function TT(){return Ks.apply(null,arguments).exponent(.5)}function Gy(t){return Math.sign(t)*t*t}function LT(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function zy(){var t=qf(),e=[0,1],n=!1,r;function i(o){var a=LT(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Gy(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Vs)).map(Gy)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return zy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},me.apply(i,arguments),bn(i)}function Oy(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=bg(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[Tn(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(_t),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Oy().domain(t).range(e).unknown(r)},me.apply(o,arguments)}function Uy(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Tn(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Uy().domain([t,e]).range(i).unknown(o)},me.apply(bn(a),arguments)}function By(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[Tn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return By().domain(t).range(e).unknown(n)},me.apply(i,arguments)}const Kf=new Date,Qf=new Date;function Pt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let c;do u.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return u},i.filter=o=>Pt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(Kf.setTime(+o),Qf.setTime(+a),t(Kf),t(Qf),Math.floor(n(Kf,Qf))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Vr=Pt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Vr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Pt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Vr);const Yy=Vr.range,en=1e3,ye=en*60,nn=ye*60,rn=nn*24,Jf=rn*7,Hy=rn*30,th=rn*365,on=Pt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getUTCSeconds()),Wy=on.range,Qs=Pt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*en)},(t,e)=>{t.setTime(+t+e*ye)},(t,e)=>(e-t)/ye,t=>t.getMinutes()),CT=Qs.range,Js=Pt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ye)},(t,e)=>(e-t)/ye,t=>t.getUTCMinutes()),ET=Js.range,tu=Pt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*en-t.getMinutes()*ye)},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getHours()),kT=tu.range,eu=Pt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCHours()),RT=eu.range,Zr=Pt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ye)/rn,t=>t.getDate()-1),IT=Zr.range,_o=Pt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/rn,t=>t.getUTCDate()-1),NT=_o.range,eh=Pt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/rn,t=>Math.floor(t/rn)),FT=eh.range;function Jn(t){return Pt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ye)/Jf)}const Kr=Jn(0),wo=Jn(1),qy=Jn(2),jy=Jn(3),tr=Jn(4),Xy=Jn(5),Vy=Jn(6),Zy=Kr.range,GT=wo.range,zT=qy.range,OT=jy.range,UT=tr.range,BT=Xy.range,YT=Vy.range;function er(t){return Pt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Jf)}const Qr=er(0),$o=er(1),Ky=er(2),Qy=er(3),nr=er(4),Jy=er(5),tb=er(6),eb=Qr.range,HT=$o.range,WT=Ky.range,qT=Qy.range,jT=nr.range,XT=Jy.range,VT=tb.range,nu=Pt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),ZT=nu.range,ru=Pt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),KT=ru.range,Be=Pt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Be.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Pt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const QT=Be.range,Ye=Pt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ye.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Pt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const JT=Ye.range;function nb(t,e,n,r,i,o){const a=[[on,1,en],[on,5,5*en],[on,15,15*en],[on,30,30*en],[o,1,ye],[o,5,5*ye],[o,15,15*ye],[o,30,30*ye],[i,1,nn],[i,3,3*nn],[i,6,6*nn],[i,12,12*nn],[r,1,rn],[r,2,2*rn],[n,1,Jf],[e,1,Hy],[e,3,3*Hy],[t,1,th]];function s(c,l,h){const f=l<c;f&&([c,l]=[l,c]);const p=h&&typeof h.range=="function"?h:u(c,l,h),d=p?p.range(c,+l+1):[];return f?d.reverse():d}function u(c,l,h){const f=Math.abs(l-c)/h,p=fa(([,,m])=>m).right(a,f);if(p===a.length)return t.every(ga(c/th,l/th,h));if(p===0)return Vr.every(Math.max(ga(c,l,h),1));const[d,g]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return d.every(g)}return[s,u]}const[rb,ib]=nb(Ye,ru,Qr,eh,eu,Js),[ob,ab]=nb(Be,nu,Kr,Zr,tu,Qs);function nh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function rh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function So(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function sb(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Ao(i),l=Mo(i),h=Ao(o),f=Mo(o),p=Ao(a),d=Mo(a),g=Ao(s),m=Mo(s),y=Ao(u),x=Mo(u),v={a:F,A:O,b:E,B:R,c:null,d:pb,e:pb,f:wL,g:EL,G:RL,H:vL,I:xL,j:_L,L:db,m:$L,M:SL,p:C,q:N,Q:xb,s:_b,S:AL,u:ML,U:DL,V:PL,w:TL,W:LL,x:null,X:null,y:CL,Y:kL,Z:IL,"%":vb},b={a:j,A:Q,b:I,B:X,c:null,d:mb,e:mb,f:zL,g:VL,G:KL,H:NL,I:FL,j:GL,L:yb,m:OL,M:UL,p:q,q:V,Q:xb,s:_b,S:BL,u:YL,U:HL,V:WL,w:qL,W:jL,x:null,X:null,y:XL,Y:ZL,Z:QL,"%":vb},$={a:P,A:S,b:z,B:k,c:A,d:fb,e:fb,f:gL,g:lb,G:cb,H:hb,I:hb,j:fL,L:dL,m:lL,M:hL,p:w,q:cL,Q:yL,s:bL,S:pL,u:iL,U:oL,V:aL,w:rL,W:sL,x:L,X:M,y:lb,Y:cb,Z:uL,"%":mL};v.x=_(n,v),v.X=_(r,v),v.c=_(e,v),b.x=_(n,b),b.X=_(r,b),b.c=_(e,b);function _(W,et){return function(ut){var H=[],mt=-1,pt=0,Yt=W.length,ee,at,Dt;for(ut instanceof Date||(ut=new Date(+ut));++mt<Yt;)W.charCodeAt(mt)===37&&(H.push(W.slice(pt,mt)),(at=ub[ee=W.charAt(++mt)])!=null?ee=W.charAt(++mt):at=ee==="e"?" ":"0",(Dt=et[ee])&&(ee=Dt(ut,at)),H.push(ee),pt=mt+1);return H.push(W.slice(pt,mt)),H.join("")}}function D(W,et){return function(ut){var H=So(1900,void 0,1),mt=T(H,W,ut+="",0),pt,Yt;if(mt!=ut.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(et&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(pt=rh(So(H.y,0,1)),Yt=pt.getUTCDay(),pt=Yt>4||Yt===0?$o.ceil(pt):$o(pt),pt=_o.offset(pt,(H.V-1)*7),H.y=pt.getUTCFullYear(),H.m=pt.getUTCMonth(),H.d=pt.getUTCDate()+(H.w+6)%7):(pt=nh(So(H.y,0,1)),Yt=pt.getDay(),pt=Yt>4||Yt===0?wo.ceil(pt):wo(pt),pt=Zr.offset(pt,(H.V-1)*7),H.y=pt.getFullYear(),H.m=pt.getMonth(),H.d=pt.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),Yt="Z"in H?rh(So(H.y,0,1)).getUTCDay():nh(So(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(Yt+5)%7:H.w+H.U*7-(Yt+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,rh(H)):nh(H)}}function T(W,et,ut,H){for(var mt=0,pt=et.length,Yt=ut.length,ee,at;mt<pt;){if(H>=Yt)return-1;if(ee=et.charCodeAt(mt++),ee===37){if(ee=et.charAt(mt++),at=$[ee in ub?et.charAt(mt++):ee],!at||(H=at(W,ut,H))<0)return-1}else if(ee!=ut.charCodeAt(H++))return-1}return H}function w(W,et,ut){var H=c.exec(et.slice(ut));return H?(W.p=l.get(H[0].toLowerCase()),ut+H[0].length):-1}function P(W,et,ut){var H=p.exec(et.slice(ut));return H?(W.w=d.get(H[0].toLowerCase()),ut+H[0].length):-1}function S(W,et,ut){var H=h.exec(et.slice(ut));return H?(W.w=f.get(H[0].toLowerCase()),ut+H[0].length):-1}function z(W,et,ut){var H=y.exec(et.slice(ut));return H?(W.m=x.get(H[0].toLowerCase()),ut+H[0].length):-1}function k(W,et,ut){var H=g.exec(et.slice(ut));return H?(W.m=m.get(H[0].toLowerCase()),ut+H[0].length):-1}function A(W,et,ut){return T(W,e,et,ut)}function L(W,et,ut){return T(W,n,et,ut)}function M(W,et,ut){return T(W,r,et,ut)}function F(W){return a[W.getDay()]}function O(W){return o[W.getDay()]}function E(W){return u[W.getMonth()]}function R(W){return s[W.getMonth()]}function C(W){return i[+(W.getHours()>=12)]}function N(W){return 1+~~(W.getMonth()/3)}function j(W){return a[W.getUTCDay()]}function Q(W){return o[W.getUTCDay()]}function I(W){return u[W.getUTCMonth()]}function X(W){return s[W.getUTCMonth()]}function q(W){return i[+(W.getUTCHours()>=12)]}function V(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var et=_(W+="",v);return et.toString=function(){return W},et},parse:function(W){var et=D(W+="",!1);return et.toString=function(){return W},et},utcFormat:function(W){var et=_(W+="",b);return et.toString=function(){return W},et},utcParse:function(W){var et=D(W+="",!0);return et.toString=function(){return W},et}}}var ub={"-":"",_:" ",0:"0"},It=/^\s*\d+/,tL=/^%/,eL=/[\\^$*+?|[\]().{}]/g;function gt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function nL(t){return t.replace(eL,"\\$&")}function Ao(t){return new RegExp("^(?:"+t.map(nL).join("|")+")","i")}function Mo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function rL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function iL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function oL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function aL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function sL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function cb(t,e,n){var r=It.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function lb(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function uL(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function lL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function fb(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function fL(t,e,n){var r=It.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function hb(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function hL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function pL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function dL(t,e,n){var r=It.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function gL(t,e,n){var r=It.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function mL(t,e,n){var r=tL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function yL(t,e,n){var r=It.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function bL(t,e,n){var r=It.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function pb(t,e){return gt(t.getDate(),e,2)}function vL(t,e){return gt(t.getHours(),e,2)}function xL(t,e){return gt(t.getHours()%12||12,e,2)}function _L(t,e){return gt(1+Zr.count(Be(t),t),e,3)}function db(t,e){return gt(t.getMilliseconds(),e,3)}function wL(t,e){return db(t,e)+"000"}function $L(t,e){return gt(t.getMonth()+1,e,2)}function SL(t,e){return gt(t.getMinutes(),e,2)}function AL(t,e){return gt(t.getSeconds(),e,2)}function ML(t){var e=t.getDay();return e===0?7:e}function DL(t,e){return gt(Kr.count(Be(t)-1,t),e,2)}function gb(t){var e=t.getDay();return e>=4||e===0?tr(t):tr.ceil(t)}function PL(t,e){return t=gb(t),gt(tr.count(Be(t),t)+(Be(t).getDay()===4),e,2)}function TL(t){return t.getDay()}function LL(t,e){return gt(wo.count(Be(t)-1,t),e,2)}function CL(t,e){return gt(t.getFullYear()%100,e,2)}function EL(t,e){return t=gb(t),gt(t.getFullYear()%100,e,2)}function kL(t,e){return gt(t.getFullYear()%1e4,e,4)}function RL(t,e){var n=t.getDay();return t=n>=4||n===0?tr(t):tr.ceil(t),gt(t.getFullYear()%1e4,e,4)}function IL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+gt(e/60|0,"0",2)+gt(e%60,"0",2)}function mb(t,e){return gt(t.getUTCDate(),e,2)}function NL(t,e){return gt(t.getUTCHours(),e,2)}function FL(t,e){return gt(t.getUTCHours()%12||12,e,2)}function GL(t,e){return gt(1+_o.count(Ye(t),t),e,3)}function yb(t,e){return gt(t.getUTCMilliseconds(),e,3)}function zL(t,e){return yb(t,e)+"000"}function OL(t,e){return gt(t.getUTCMonth()+1,e,2)}function UL(t,e){return gt(t.getUTCMinutes(),e,2)}function BL(t,e){return gt(t.getUTCSeconds(),e,2)}function YL(t){var e=t.getUTCDay();return e===0?7:e}function HL(t,e){return gt(Qr.count(Ye(t)-1,t),e,2)}function bb(t){var e=t.getUTCDay();return e>=4||e===0?nr(t):nr.ceil(t)}function WL(t,e){return t=bb(t),gt(nr.count(Ye(t),t)+(Ye(t).getUTCDay()===4),e,2)}function qL(t){return t.getUTCDay()}function jL(t,e){return gt($o.count(Ye(t)-1,t),e,2)}function XL(t,e){return gt(t.getUTCFullYear()%100,e,2)}function VL(t,e){return t=bb(t),gt(t.getUTCFullYear()%100,e,2)}function ZL(t,e){return gt(t.getUTCFullYear()%1e4,e,4)}function KL(t,e){var n=t.getUTCDay();return t=n>=4||n===0?nr(t):nr.ceil(t),gt(t.getUTCFullYear()%1e4,e,4)}function QL(){return"+0000"}function vb(){return"%"}function xb(t){return+t}function _b(t){return Math.floor(+t/1e3)}var Jr,ih,wb,iu,oh;$b({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function $b(t){return Jr=sb(t),ih=Jr.format,wb=Jr.parse,iu=Jr.utcFormat,oh=Jr.utcParse,Jr}var Sb="%Y-%m-%dT%H:%M:%S.%LZ";function JL(t){return t.toISOString()}var tC=Date.prototype.toISOString?JL:iu(Sb);const eC=tC;function nC(t){var e=new Date(t);return isNaN(e)?null:e}var rC=+new Date("2000-01-01T00:00:00.000Z")?nC:oh(Sb);const iC=rC;function oC(t){return new Date(t)}function aC(t){return t instanceof Date?+t:+new Date(+t)}function ah(t,e,n,r,i,o,a,s,u,c){var l=qf(),h=l.invert,f=l.domain,p=c(".%L"),d=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),v=c("%B"),b=c("%Y");function $(_){return(u(_)<_?p:s(_)<_?d:a(_)<_?g:o(_)<_?m:r(_)<_?i(_)<_?y:x:n(_)<_?v:b)(_)}return l.invert=function(_){return new Date(h(_))},l.domain=function(_){return arguments.length?f(Array.from(_,aC)):f().map(oC)},l.ticks=function(_){var D=f();return t(D[0],D[D.length-1],_??10)},l.tickFormat=function(_,D){return D==null?$:c(D)},l.nice=function(_){var D=f();return(!_||typeof _.range!="function")&&(_=e(D[0],D[D.length-1],_??10)),_?f(Ty(D,_)):l},l.copy=function(){return xo(l,ah(t,e,n,r,i,o,a,s,u,c))},l}function sC(){return me.apply(ah(ob,ab,Be,nu,Kr,Zr,tu,Qs,on,ih).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function uC(){return me.apply(ah(rb,ib,Ye,ru,Qr,_o,eu,Js,on,iu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ou(){var t=0,e=1,n,r,i,o,a=te,s=!1,u;function c(h){return h==null||isNaN(h=+h)?u:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(h){return arguments.length?(s=!!h,c):s},c.interpolator=function(h){return arguments.length?(a=h,c):a};function l(h){return function(f){var p,d;return arguments.length?([p,d]=f,a=h(p,d),c):[a(0),a(1)]}}return c.range=l(pn),c.rangeRound=l(Ga),c.unknown=function(h){return arguments.length?(u=h,c):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ab(){var t=bn(ou()(te));return t.copy=function(){return vn(t,Ab())},tn.apply(t,arguments)}function Mb(){var t=Xf(ou()).domain([1,10]);return t.copy=function(){return vn(t,Mb()).base(t.base())},tn.apply(t,arguments)}function Db(){var t=Vf(ou());return t.copy=function(){return vn(t,Db()).constant(t.constant())},tn.apply(t,arguments)}function sh(){var t=Zf(ou());return t.copy=function(){return vn(t,sh()).exponent(t.exponent())},tn.apply(t,arguments)}function cC(){return sh.apply(null,arguments).exponent(.5)}function Pb(){var t=[],e=te;function n(r){if(r!=null&&!isNaN(r=+r))return e((Tn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(_t),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Ti(t,o/r))},n.copy=function(){return Pb(e).domain(t)},tn.apply(n,arguments)}function au(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,c=te,l,h=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+l(g))-o)*(r*g<r*o?s:u),c(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=l(t=+t),o=l(e=+e),a=l(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,p):[t,e,n]},p.clamp=function(g){return arguments.length?(h=!!g,p):h},p.interpolator=function(g){return arguments.length?(c=g,p):c};function d(g){return function(m){var y,x,v;return arguments.length?([y,x,v]=m,c=T0(g,[y,x,v]),p):[c(0),c(.5),c(1)]}}return p.range=d(pn),p.rangeRound=d(Ga),p.unknown=function(g){return arguments.length?(f=g,p):f},function(g){return l=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function Tb(){var t=bn(au()(te));return t.copy=function(){return vn(t,Tb())},tn.apply(t,arguments)}function Lb(){var t=Xf(au()).domain([.1,1,10]);return t.copy=function(){return vn(t,Lb()).base(t.base())},tn.apply(t,arguments)}function Cb(){var t=Vf(au());return t.copy=function(){return vn(t,Cb()).constant(t.constant())},tn.apply(t,arguments)}function uh(){var t=Zf(au());return t.copy=function(){return vn(t,uh()).exponent(t.exponent())},tn.apply(t,arguments)}function lC(){return uh.apply(null,arguments).exponent(.5)}function lt(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const fC=lt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),hC=lt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),pC=lt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),dC=lt("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),gC=lt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),mC=lt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),yC=lt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),bC=lt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),vC=lt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),xC=lt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),_C=lt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),vt=t=>d0(t[t.length-1]);var Eb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(lt);const wC=vt(Eb);var kb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(lt);const $C=vt(kb);var Rb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(lt);const SC=vt(Rb);var Ib=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(lt);const AC=vt(Ib);var Nb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(lt);const MC=vt(Nb);var Fb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(lt);const DC=vt(Fb);var Gb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(lt);const PC=vt(Gb);var zb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(lt);const TC=vt(zb);var Ob=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(lt);const LC=vt(Ob);var Ub=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(lt);const CC=vt(Ub);var Bb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(lt);const EC=vt(Bb);var Yb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(lt);const kC=vt(Yb);var Hb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(lt);const RC=vt(Hb);var Wb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(lt);const IC=vt(Wb);var qb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(lt);const NC=vt(qb);var jb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(lt);const FC=vt(jb);var Xb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(lt);const GC=vt(Xb);var Vb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(lt);const zC=vt(Vb);var Zb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(lt);const OC=vt(Zb);var Kb=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(lt);const UC=vt(Kb);var Qb=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(lt);const BC=vt(Qb);var Jb=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(lt);const YC=vt(Jb);var tv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(lt);const HC=vt(tv);var ev=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(lt);const WC=vt(ev);var nv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(lt);const qC=vt(nv);var rv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(lt);const jC=vt(rv);var iv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(lt);const XC=vt(iv);function VC(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const ZC=Oa(Me(300,.5,0),Me(-240,.5,1));var KC=Oa(Me(-100,.75,.35),Me(80,1.5,.8)),QC=Oa(Me(260,.75,.35),Me(80,1.5,.8)),su=Me();function JC(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return su.h=360*t-100,su.s=1.5-1.5*e,su.l=.8-.9*e,su+""}var uu=Pr(),tE=Math.PI/3,eE=Math.PI*2/3;function nE(t){var e;return t=(.5-t)*Math.PI,uu.r=255*(e=Math.sin(t))*e,uu.g=255*(e=Math.sin(t+tE))*e,uu.b=255*(e=Math.sin(t+eE))*e,uu+""}function rE(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function cu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const iE=cu(lt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var oE=cu(lt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),aE=cu(lt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),sE=cu(lt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ct(t){return function(){return t}}const ov=Math.abs,Ut=Math.atan2,an=Math.cos,uE=Math.max,ti=Math.min,oe=Math.sin,xt=Math.sqrt,Bt=1e-12,xn=Math.PI,lu=xn/2,_n=2*xn;function cE(t){return t>1?0:t<-1?xn:Math.acos(t)}function av(t){return t>=1?lu:t<=-1?-lu:Math.asin(t)}function Do(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new qi(e)}function lE(t){return t.innerRadius}function fE(t){return t.outerRadius}function hE(t){return t.startAngle}function pE(t){return t.endAngle}function dE(t){return t&&t.padAngle}function gE(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<Bt))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function fu(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/xt(s*s+u*u),l=c*u,h=-c*s,f=t+l,p=e+h,d=n+l,g=r+h,m=(f+d)/2,y=(p+g)/2,x=d-f,v=g-p,b=x*x+v*v,$=i-o,_=f*g-d*p,D=(v<0?-1:1)*xt(uE(0,$*$*b-_*_)),T=(_*v-x*D)/b,w=(-_*x-v*D)/b,P=(_*v+x*D)/b,S=(-_*x+v*D)/b,z=T-m,k=w-y,A=P-m,L=S-y;return z*z+k*k>A*A+L*L&&(T=P,w=S),{cx:T,cy:w,x01:-l,y01:-h,x11:T*(i/$-1),y11:w*(i/$-1)}}function sv(){var t=lE,e=fE,n=ct(0),r=null,i=hE,o=pE,a=dE,s=null,u=Do(c);function c(){var l,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-lu,g=o.apply(this,arguments)-lu,m=ov(g-d),y=g>d;if(s||(s=l=u()),p<f&&(h=p,p=f,f=h),!(p>Bt))s.moveTo(0,0);else if(m>_n-Bt)s.moveTo(p*an(d),p*oe(d)),s.arc(0,0,p,d,g,!y),f>Bt&&(s.moveTo(f*an(g),f*oe(g)),s.arc(0,0,f,g,d,y));else{var x=d,v=g,b=d,$=g,_=m,D=m,T=a.apply(this,arguments)/2,w=T>Bt&&(r?+r.apply(this,arguments):xt(f*f+p*p)),P=ti(ov(p-f)/2,+n.apply(this,arguments)),S=P,z=P,k,A;if(w>Bt){var L=av(w/f*oe(T)),M=av(w/p*oe(T));(_-=L*2)>Bt?(L*=y?1:-1,b+=L,$-=L):(_=0,b=$=(d+g)/2),(D-=M*2)>Bt?(M*=y?1:-1,x+=M,v-=M):(D=0,x=v=(d+g)/2)}var F=p*an(x),O=p*oe(x),E=f*an($),R=f*oe($);if(P>Bt){var C=p*an(v),N=p*oe(v),j=f*an(b),Q=f*oe(b),I;if(m<xn)if(I=gE(F,O,j,Q,C,N,E,R)){var X=F-I[0],q=O-I[1],V=C-I[0],W=N-I[1],et=1/oe(cE((X*V+q*W)/(xt(X*X+q*q)*xt(V*V+W*W)))/2),ut=xt(I[0]*I[0]+I[1]*I[1]);S=ti(P,(f-ut)/(et-1)),z=ti(P,(p-ut)/(et+1))}else S=z=0}D>Bt?z>Bt?(k=fu(j,Q,F,O,p,z,y),A=fu(C,N,E,R,p,z,y),s.moveTo(k.cx+k.x01,k.cy+k.y01),z<P?s.arc(k.cx,k.cy,z,Ut(k.y01,k.x01),Ut(A.y01,A.x01),!y):(s.arc(k.cx,k.cy,z,Ut(k.y01,k.x01),Ut(k.y11,k.x11),!y),s.arc(0,0,p,Ut(k.cy+k.y11,k.cx+k.x11),Ut(A.cy+A.y11,A.cx+A.x11),!y),s.arc(A.cx,A.cy,z,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!y))):(s.moveTo(F,O),s.arc(0,0,p,x,v,!y)):s.moveTo(F,O),!(f>Bt)||!(_>Bt)?s.lineTo(E,R):S>Bt?(k=fu(E,R,C,N,f,-S,y),A=fu(F,O,j,Q,f,-S,y),s.lineTo(k.cx+k.x01,k.cy+k.y01),S<P?s.arc(k.cx,k.cy,S,Ut(k.y01,k.x01),Ut(A.y01,A.x01),!y):(s.arc(k.cx,k.cy,S,Ut(k.y01,k.x01),Ut(k.y11,k.x11),!y),s.arc(0,0,f,Ut(k.cy+k.y11,k.cx+k.x11),Ut(A.cy+A.y11,A.cx+A.x11),y),s.arc(A.cx,A.cy,S,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!y))):s.arc(0,0,f,$,b,y)}if(s.closePath(),l)return s=null,l+""||null}return c.centroid=function(){var l=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xn/2;return[an(h)*l,oe(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:ct(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:ct(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:ct(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:ct(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:ct(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:ct(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:ct(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var mE=Array.prototype.slice;function hu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function uv(t){this._context=t}uv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function pu(t){return new uv(t)}function ch(t){return t[0]}function lh(t){return t[1]}function du(t,e){var n=ct(!0),r=null,i=pu,o=null,a=Do(s);t=typeof t=="function"?t:t===void 0?ch:ct(t),e=typeof e=="function"?e:e===void 0?lh:ct(e);function s(u){var c,l=(u=hu(u)).length,h,f=!1,p;for(r==null&&(o=i(p=a())),c=0;c<=l;++c)!(c<l&&n(h=u[c],c,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,u),+e(h,c,u));if(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:ct(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:ct(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:ct(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function fh(t,e,n){var r=null,i=ct(!0),o=null,a=pu,s=null,u=Do(c);t=typeof t=="function"?t:t===void 0?ch:ct(+t),e=typeof e=="function"?e:ct(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?lh:ct(+n);function c(h){var f,p,d,g=(h=hu(h)).length,m,y=!1,x,v=new Array(g),b=new Array(g);for(o==null&&(s=a(x=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=f-1;d>=p;--d)s.point(v[d],b[d]);s.lineEnd(),s.areaEnd()}y&&(v[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):v[f],n?+n(m,f,h):b[f]))}if(x)return s=null,x+""||null}function l(){return du().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:ct(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:ct(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ct(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:ct(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:ct(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ct(+h),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(r).y(e)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:ct(!!h),c):i},c.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),c):a},c.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),c):o},c}function yE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function bE(t){return t}function cv(){var t=bE,e=yE,n=null,r=ct(0),i=ct(_n),o=ct(0);function a(s){var u,c=(s=hu(s)).length,l,h,f=0,p=new Array(c),d=new Array(c),g=+r.apply(this,arguments),m=Math.min(_n,Math.max(-_n,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/c,o.apply(this,arguments)),v=x*(m<0?-1:1),b;for(u=0;u<c;++u)(b=d[p[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?p.sort(function($,_){return e(d[$],d[_])}):n!=null&&p.sort(function($,_){return n(s[$],s[_])}),u=0,h=f?(m-c*v)/f:0;u<c;++u,g=y)l=p[u],b=d[l],y=g+(b>0?b*h:0)+v,d[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:ct(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ct(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ct(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ct(+s),a):o},a}var lv=hh(pu);function fv(t){this._curve=t}fv.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function hh(t){function e(n){return new fv(t(n))}return e._curve=t,e}function Po(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(hh(n)):e()._curve},t}function hv(){return Po(du().curve(lv))}function pv(){var t=fh().curve(lv),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Po(n())},delete t.lineX0,t.lineEndAngle=function(){return Po(r())},delete t.lineX1,t.lineInnerRadius=function(){return Po(i())},delete t.lineY0,t.lineOuterRadius=function(){return Po(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(hh(a)):e()._curve},t}function To(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class dv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class vE{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=To(this._x0,this._y0),i=To(this._x0,this._y0=(this._y0+n)/2),o=To(e,this._y0),a=To(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function gv(t){return new dv(t,!0)}function mv(t){return new dv(t,!1)}function xE(t){return new vE(t)}function _E(t){return t.source}function wE(t){return t.target}function gu(t){let e=_E,n=wE,r=ch,i=lh,o=null,a=null,s=Do(u);function u(){let c;const l=mE.call(arguments),h=e.apply(this,l),f=n.apply(this,l);if(o==null&&(a=t(c=s())),a.lineStart(),l[0]=h,a.point(+r.apply(this,l),+i.apply(this,l)),l[0]=f,a.point(+r.apply(this,l),+i.apply(this,l)),a.lineEnd(),c)return a=null,c+""||null}return u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.x=function(c){return arguments.length?(r=typeof c=="function"?c:ct(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:ct(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function $E(){return gu(gv)}function SE(){return gu(mv)}function AE(){const t=gu(xE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const ME=xt(3),yv={draw(t,e){const n=xt(e+ti(e/28,.75))*.59436,r=n/2,i=r*ME;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},mu={draw(t,e){const n=xt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},bv={draw(t,e){const n=xt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},vv=xt(1/3),DE=vv*2,xv={draw(t,e){const n=xt(e/DE),r=n*vv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},_v={draw(t,e){const n=xt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},wv={draw(t,e){const n=xt(e-ti(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},$v={draw(t,e){const n=xt(e),r=-n/2;t.rect(r,r,n,n)}},Sv={draw(t,e){const n=xt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},PE=.8908130915292852,Av=oe(xn/10)/oe(7*xn/10),TE=oe(_n/10)*Av,LE=-an(_n/10)*Av,Mv={draw(t,e){const n=xt(e*PE),r=TE*n,i=LE*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=_n*o/5,s=an(a),u=oe(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},ph=xt(3),Dv={draw(t,e){const n=-xt(e/(ph*3));t.moveTo(0,n*2),t.lineTo(-ph*n,-n),t.lineTo(ph*n,-n),t.closePath()}},CE=xt(3),Pv={draw(t,e){const n=xt(e)*.6824,r=n/2,i=n*CE/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},be=-.5,ve=xt(3)/2,dh=1/xt(12),EE=(dh/2+1)*3,Tv={draw(t,e){const n=xt(e/EE),r=n/2,i=n*dh,o=r,a=n*dh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(be*r-ve*i,ve*r+be*i),t.lineTo(be*o-ve*a,ve*o+be*a),t.lineTo(be*s-ve*u,ve*s+be*u),t.lineTo(be*r+ve*i,be*i-ve*r),t.lineTo(be*o+ve*a,be*a-ve*o),t.lineTo(be*s+ve*u,be*u-ve*s),t.closePath()}},gh={draw(t,e){const n=xt(e-ti(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Lv=[mu,bv,xv,$v,Mv,Dv,Tv],kE=[mu,wv,gh,Pv,yv,Sv,_v];function RE(t,e){let n=null,r=Do(i);t=typeof t=="function"?t:ct(t||mu),e=typeof e=="function"?e:ct(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:ct(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:ct(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}function yu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function bu(t){this._context=t}bu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:yu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:yu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function IE(t){return new bu(t)}function Cv(t){this._context=t}Cv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:yu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function NE(t){return new Cv(t)}function Ev(t){this._context=t}Ev.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function FE(t){return new Ev(t)}function kv(t,e){this._basis=new bu(t),this._beta=e}kv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+u*o),this._beta*e[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const GE=function t(e){function n(r){return e===1?new bu(r):new kv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function vu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function mh(t,e){this._context=t,this._k=(1-e)/6}mh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:vu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:vu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zE=function t(e){function n(r){return new mh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function yh(t,e){this._context=t,this._k=(1-e)/6}yh.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:vu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const OE=function t(e){function n(r){return new yh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function bh(t,e){this._context=t,this._k=(1-e)/6}bh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const UE=function t(e){function n(r){return new bh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function vh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Bt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Bt){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Rv(t,e){this._context=t,this._alpha=e}Rv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:vh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const BE=function t(e){function n(r){return e?new Rv(r,e):new mh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Iv(t,e){this._context=t,this._alpha=e}Iv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:vh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const YE=function t(e){function n(r){return e?new Iv(r,e):new yh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Nv(t,e){this._context=t,this._alpha=e}Nv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const HE=function t(e){function n(r){return e?new Nv(r,e):new bh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Fv(t){this._context=t}Fv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function WE(t){return new Fv(t)}function Gv(t){return t<0?-1:1}function zv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Gv(o)+Gv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ov(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function xh(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function xu(t){this._context=t}xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xh(this,this._t0,Ov(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,xh(this,Ov(this,n=zv(this,t,e)),n);break;default:xh(this,this._t0,n=zv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Uv(t){this._context=new Bv(t)}(Uv.prototype=Object.create(xu.prototype)).point=function(t,e){xu.prototype.point.call(this,e,t)};function Bv(t){this._context=t}Bv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function qE(t){return new xu(t)}function jE(t){return new Uv(t)}function Yv(t){this._context=t}Yv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Hv(t),i=Hv(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Hv(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function XE(t){return new Yv(t)}function _u(t,e){this._context=t,this._t=e}_u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function VE(t){return new _u(t,.5)}function ZE(t){return new _u(t,0)}function KE(t){return new _u(t,1)}function ei(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ni(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function QE(t,e){return t[e]}function JE(t){const e=[];return e.key=t,e}function tk(){var t=ct([]),e=ni,n=ei,r=QE;function i(o){var a=Array.from(t.apply(this,arguments),JE),s,u=a.length,c=-1,l;for(const h of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(h,a[s].key,c,o)]).data=h;for(s=0,l=hu(e(a));s<u;++s)a[l[s]].index=s;return n(a,l),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:ct(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ct(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ni:typeof o=="function"?o:ct(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ei,i):n},i}function ek(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}ei(t,e)}}function nk(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,c=t[e[0]].length;r<c;++r)for(a=s=0,n=0;n<u;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function rk(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}ei(t,e)}}function ik(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,c=0;s<a;++s){for(var l=t[e[s]],h=l[r][1]||0,f=l[r-1][1]||0,p=(h-f)/2,d=0;d<s;++d){var g=t[e[d]],m=g[r][1]||0,y=g[r-1][1]||0;p+=m-y}u+=h,c+=p*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,ei(t,e)}}function Wv(t){var e=t.map(ok);return ni(t).sort(function(n,r){return e[n]-e[r]})}function ok(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function qv(t){var e=t.map(jv);return ni(t).sort(function(n,r){return e[n]-e[r]})}function jv(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function ak(t){return qv(t).reverse()}function sk(t){var e=t.length,n,r,i=t.map(jv),o=Wv(t),a=0,s=0,u=[],c=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(u)}function uk(t){return ni(t).reverse()}const wu=t=>()=>t;function ck(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function He(t,e,n){this.k=t,this.x=e,this.y=n}He.prototype={constructor:He,scale:function(t){return t===1?this:new He(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new He(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $u=new He(1,0,0);Xv.prototype=He.prototype;function Xv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return $u;return t.__zoom}function _h(t){t.stopImmediatePropagation()}function Lo(t){t.preventDefault(),t.stopImmediatePropagation()}function lk(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function fk(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Vv(){return this.__zoom||$u}function hk(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function pk(){return navigator.maxTouchPoints||"ontouchstart"in this}function dk(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Zv(){var t=lk,e=fk,n=dk,r=hk,i=pk,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=A0,c=kn("start","zoom","end"),l,h,f,p=500,d=150,g=0,m=10;function y(A){A.property("__zoom",Vv).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",P).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,L,M,F){var O=A.selection?A.selection():A;O.property("__zoom",Vv),A!==O?$(A,L,M,F):O.interrupt().each(function(){_(this,arguments).event(F).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},y.scaleBy=function(A,L,M,F){y.scaleTo(A,function(){var O=this.__zoom.k,E=typeof L=="function"?L.apply(this,arguments):L;return O*E},M,F)},y.scaleTo=function(A,L,M,F){y.transform(A,function(){var O=e.apply(this,arguments),E=this.__zoom,R=M==null?b(O):typeof M=="function"?M.apply(this,arguments):M,C=E.invert(R),N=typeof L=="function"?L.apply(this,arguments):L;return n(v(x(E,N),R,C),O,a)},M,F)},y.translateBy=function(A,L,M,F){y.transform(A,function(){return n(this.__zoom.translate(typeof L=="function"?L.apply(this,arguments):L,typeof M=="function"?M.apply(this,arguments):M),e.apply(this,arguments),a)},null,F)},y.translateTo=function(A,L,M,F,O){y.transform(A,function(){var E=e.apply(this,arguments),R=this.__zoom,C=F==null?b(E):typeof F=="function"?F.apply(this,arguments):F;return n($u.translate(C[0],C[1]).scale(R.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof M=="function"?-M.apply(this,arguments):-M),E,a)},F,O)};function x(A,L){return L=Math.max(o[0],Math.min(o[1],L)),L===A.k?A:new He(L,A.x,A.y)}function v(A,L,M){var F=L[0]-M[0]*A.k,O=L[1]-M[1]*A.k;return F===A.x&&O===A.y?A:new He(A.k,F,O)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function $(A,L,M,F){A.on("start.zoom",function(){_(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(F).end()}).tween("zoom",function(){var O=this,E=arguments,R=_(O,E).event(F),C=e.apply(O,E),N=M==null?b(C):typeof M=="function"?M.apply(O,E):M,j=Math.max(C[1][0]-C[0][0],C[1][1]-C[0][1]),Q=O.__zoom,I=typeof L=="function"?L.apply(O,E):L,X=u(Q.invert(N).concat(j/Q.k),I.invert(N).concat(j/I.k));return function(q){if(q===1)q=I;else{var V=X(q),W=j/V[2];q=new He(W,N[0]-V[0]*W,N[1]-V[1]*W)}R.zoom(null,q)}})}function _(A,L,M){return!M&&A.__zooming||new D(A,L)}function D(A,L){this.that=A,this.args=L,this.active=0,this.sourceEvent=null,this.extent=e.apply(A,L),this.taps=0}D.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,L){return this.mouse&&A!=="mouse"&&(this.mouse[1]=L.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=L.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=L.invert(this.touch1[0])),this.that.__zoom=L,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var L=Z(this.that).datum();c.call(A,this.that,new ck(A,{sourceEvent:this.sourceEvent,target:y,type:A,transform:this.that.__zoom,dispatch:c}),L)}};function T(A,...L){if(!t.apply(this,arguments))return;var M=_(this,L).event(A),F=this.__zoom,O=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,r.apply(this,arguments)))),E=ue(A);if(M.wheel)(M.mouse[0][0]!==E[0]||M.mouse[0][1]!==E[1])&&(M.mouse[1]=F.invert(M.mouse[0]=E)),clearTimeout(M.wheel);else{if(F.k===O)return;M.mouse=[E,F.invert(E)],Un(this),M.start()}Lo(A),M.wheel=setTimeout(R,d),M.zoom("mouse",n(v(x(F,O),M.mouse[0],M.mouse[1]),M.extent,a));function R(){M.wheel=null,M.end()}}function w(A,...L){if(f||!t.apply(this,arguments))return;var M=A.currentTarget,F=_(this,L,!0).event(A),O=Z(A.view).on("mousemove.zoom",N,!0).on("mouseup.zoom",j,!0),E=ue(A,M),R=A.clientX,C=A.clientY;Aa(A.view),_h(A),F.mouse=[E,this.__zoom.invert(E)],Un(this),F.start();function N(Q){if(Lo(Q),!F.moved){var I=Q.clientX-R,X=Q.clientY-C;F.moved=I*I+X*X>g}F.event(Q).zoom("mouse",n(v(F.that.__zoom,F.mouse[0]=ue(Q,M),F.mouse[1]),F.extent,a))}function j(Q){O.on("mousemove.zoom mouseup.zoom",null),Ma(Q.view,F.moved),Lo(Q),F.event(Q).end()}}function P(A,...L){if(t.apply(this,arguments)){var M=this.__zoom,F=ue(A.changedTouches?A.changedTouches[0]:A,this),O=M.invert(F),E=M.k*(A.shiftKey?.5:2),R=n(v(x(M,E),F,O),e.apply(this,L),a);Lo(A),s>0?Z(this).transition().duration(s).call($,R,F,A):Z(this).call(y.transform,R,F,A)}}function S(A,...L){if(t.apply(this,arguments)){var M=A.touches,F=M.length,O=_(this,L,A.changedTouches.length===F).event(A),E,R,C,N;for(_h(A),R=0;R<F;++R)C=M[R],N=ue(C,this),N=[N,this.__zoom.invert(N),C.identifier],O.touch0?!O.touch1&&O.touch0[2]!==N[2]&&(O.touch1=N,O.taps=0):(O.touch0=N,E=!0,O.taps=1+!!l);l&&(l=clearTimeout(l)),E&&(O.taps<2&&(h=N[0],l=setTimeout(function(){l=null},p)),Un(this),O.start())}}function z(A,...L){if(this.__zooming){var M=_(this,L).event(A),F=A.changedTouches,O=F.length,E,R,C,N;for(Lo(A),E=0;E<O;++E)R=F[E],C=ue(R,this),M.touch0&&M.touch0[2]===R.identifier?M.touch0[0]=C:M.touch1&&M.touch1[2]===R.identifier&&(M.touch1[0]=C);if(R=M.that.__zoom,M.touch1){var j=M.touch0[0],Q=M.touch0[1],I=M.touch1[0],X=M.touch1[1],q=(q=I[0]-j[0])*q+(q=I[1]-j[1])*q,V=(V=X[0]-Q[0])*V+(V=X[1]-Q[1])*V;R=x(R,Math.sqrt(q/V)),C=[(j[0]+I[0])/2,(j[1]+I[1])/2],N=[(Q[0]+X[0])/2,(Q[1]+X[1])/2]}else if(M.touch0)C=M.touch0[0],N=M.touch0[1];else return;M.zoom("touch",n(v(R,C,N),M.extent,a))}}function k(A,...L){if(this.__zooming){var M=_(this,L).event(A),F=A.changedTouches,O=F.length,E,R;for(_h(A),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),E=0;E<O;++E)R=F[E],M.touch0&&M.touch0[2]===R.identifier?delete M.touch0:M.touch1&&M.touch1[2]===R.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(R=ue(R,this),Math.hypot(h[0]-R[0],h[1]-R[1])<m)){var C=Z(this).on("dblclick.zoom");C&&C.apply(this,arguments)}}}return y.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:wu(+A),y):r},y.filter=function(A){return arguments.length?(t=typeof A=="function"?A:wu(!!A),y):t},y.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:wu(!!A),y):i},y.extent=function(A){return arguments.length?(e=typeof A=="function"?A:wu([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),y):e},y.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],y):[o[0],o[1]]},y.translateExtent=function(A){return arguments.length?(a[0][0]=+A[0][0],a[1][0]=+A[1][0],a[0][1]=+A[0][1],a[1][1]=+A[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(A){return arguments.length?(n=A,y):n},y.duration=function(A){return arguments.length?(s=+A,y):s},y.interpolate=function(A){return arguments.length?(u=A,y):u},y.on=function(){var A=c.on.apply(c,arguments);return A===c?y:A},y.clickDistance=function(A){return arguments.length?(g=(A=+A)*A,y):Math.sqrt(g)},y.tapDistance=function(A){return arguments.length?(m=+A,y):m},y}const wh=Object.freeze(Object.defineProperty({__proto__:null,Adder:Tt,Delaunay:Cl,FormatSpecifier:as,InternMap:Mi,InternSet:Ln,Node:Kn,Path:qi,Voronoi:pm,ZoomTransform:He,active:b4,arc:sv,area:fh,areaRadial:pv,ascending:_t,autoType:B7,axisBottom:l5,axisLeft:Dg,axisRight:c5,axisTop:Mg,bin:mg,bisect:Tn,bisectCenter:oA,bisectLeft:iA,bisectRight:eg,bisector:fa,blob:W7,blur:aA,blur2:ng,blurImage:sA,brush:C4,brushSelection:P4,brushX:T4,brushY:L4,buffer:j7,chord:k4,chordDirected:I4,chordTranspose:R4,cluster:o9,color:hn,contourDensity:s7,contours:Ml,count:pa,create:W6,creator:wa,cross:dA,csv:Z7,csvFormat:C7,csvFormatBody:E7,csvFormatRow:R7,csvFormatRows:k7,csvFormatValue:I7,csvParse:ym,csvParseRows:L7,cubehelix:Me,cumsum:gA,curveBasis:IE,curveBasisClosed:NE,curveBasisOpen:FE,curveBumpX:gv,curveBumpY:mv,curveBundle:GE,curveCardinal:zE,curveCardinalClosed:OE,curveCardinalOpen:UE,curveCatmullRom:BE,curveCatmullRomClosed:YE,curveCatmullRomOpen:HE,curveLinear:pu,curveLinearClosed:WE,curveMonotoneX:qE,curveMonotoneY:jE,curveNatural:XE,curveStep:VE,curveStepAfter:KE,curveStepBefore:ZE,descending:Jd,deviation:og,difference:KA,disjoint:QA,dispatch:kn,drag:zg,dragDisable:Aa,dragEnable:Ma,dsv:V7,dsvFormat:ns,easeBack:j0,easeBackIn:l4,easeBackInOut:j0,easeBackOut:f4,easeBounce:Hi,easeBounceIn:u4,easeBounceInOut:c4,easeBounceOut:Hi,easeCircle:q0,easeCircleIn:QM,easeCircleInOut:q0,easeCircleOut:JM,easeCubic:Yi,easeCubicIn:HM,easeCubicInOut:Yi,easeCubicOut:WM,easeElastic:Va,easeElasticIn:h4,easeElasticInOut:p4,easeElasticOut:Va,easeExp:W0,easeExpIn:ZM,easeExpInOut:W0,easeExpOut:KM,easeLinear:UM,easePoly:U0,easePolyIn:qM,easePolyInOut:U0,easePolyOut:jM,easeQuad:O0,easeQuadIn:BM,easeQuadInOut:O0,easeQuadOut:YM,easeSin:H0,easeSinIn:XM,easeSinInOut:H0,easeSinOut:VM,every:WA,extent:Ai,fcumsum:yA,filter:jA,flatGroup:bA,flatRollup:vA,forceCenter:iD,forceCollide:wm,forceLink:SD,forceManyBody:Mm,forceRadial:ED,forceSimulation:Am,forceX:Dm,forceY:Pm,get format(){return Zi},formatDefaultLocale:Nm,formatLocale:Im,get formatPrefix(){return Fl},formatSpecifier:Or,fsum:mA,geoAlbers:Z1,geoAlbersUsa:FP,geoArea:BD,geoAzimuthalEqualArea:GP,geoAzimuthalEqualAreaRaw:$f,geoAzimuthalEquidistant:zP,geoAzimuthalEquidistantRaw:Sf,geoBounds:qD,geoCentroid:QD,geoCircle:JD,geoClipAntimeridian:ef,geoClipCircle:b1,geoClipExtent:aP,geoClipRectangle:Ps,geoConicConformal:UP,geoConicConformalRaw:J1,geoConicEqualArea:Os,geoConicEqualAreaRaw:V1,geoConicEquidistant:YP,geoConicEquidistantRaw:ty,geoContains:pP,geoDistance:Cs,geoEqualEarth:WP,geoEqualEarthRaw:Af,geoEquirectangular:BP,geoEquirectangularRaw:ho,geoGnomonic:qP,geoGnomonicRaw:Mf,geoGraticule:P1,geoGraticule10:dP,geoIdentity:jP,geoInterpolate:gP,geoLength:v1,geoMercator:OP,geoMercatorRaw:fo,geoNaturalEarth1:XP,geoNaturalEarth1Raw:Df,geoOrthographic:VP,geoOrthographicRaw:Pf,geoPath:DP,geoProjection:Ue,geoProjectionMutator:_f,geoRotation:l1,geoStereographic:ZP,geoStereographicRaw:Tf,geoStream:Pe,geoTransform:PP,geoTransverseMercator:KP,geoTransverseMercatorRaw:Lf,gray:f8,greatest:yg,greatestIndex:zA,group:cg,groupSort:wA,groups:lg,hcl:Ra,hierarchy:Ys,histogram:mg,hsl:La,html:nD,image:Q7,index:xA,indexes:_A,interpolate:pn,interpolateArray:y8,interpolateBasis:l0,interpolateBasisClosed:f0,interpolateBlues:YC,interpolateBrBG:wC,interpolateBuGn:CC,interpolateBuPu:EC,interpolateCividis:VC,interpolateCool:QC,interpolateCubehelix:E8,interpolateCubehelixDefault:ZC,interpolateCubehelixLong:Oa,interpolateDate:y0,interpolateDiscrete:x8,interpolateGnBu:kC,interpolateGreens:HC,interpolateGreys:WC,interpolateHcl:L8,interpolateHclLong:C8,interpolateHsl:D8,interpolateHslLong:P8,interpolateHue:_8,interpolateInferno:aE,interpolateLab:T8,interpolateMagma:oE,interpolateNumber:pe,interpolateNumberArray:Kc,interpolateObject:b0,interpolateOrRd:RC,interpolateOranges:XC,interpolatePRGn:$C,interpolatePiYG:SC,interpolatePlasma:sE,interpolatePuBu:NC,interpolatePuBuGn:IC,interpolatePuOr:AC,interpolatePuRd:FC,interpolatePurples:qC,interpolateRainbow:JC,interpolateRdBu:MC,interpolateRdGy:DC,interpolateRdPu:GC,interpolateRdYlBu:PC,interpolateRdYlGn:TC,interpolateReds:jC,interpolateRgb:Ni,interpolateRgbBasis:d0,interpolateRgbBasisClosed:m8,interpolateRound:Ga,interpolateSinebow:nE,interpolateSpectral:LC,interpolateString:tl,interpolateTransformCss:w0,interpolateTransformSvg:$0,interpolateTurbo:rE,interpolateViridis:iE,interpolateWarm:KC,interpolateYlGn:OC,interpolateYlGnBu:zC,interpolateYlOrBr:UC,interpolateYlOrRd:BC,interpolateZoom:A0,interrupt:Un,intersection:JA,interval:F8,isoFormat:eC,isoParse:iC,json:tD,lab:ka,lch:h8,least:GA,leastIndex:xg,line:du,lineRadial:hv,link:gu,linkHorizontal:$E,linkRadial:AE,linkVertical:SE,local:Fg,map:XA,matcher:Nc,max:Di,maxIndex:Tc,mean:LA,median:CA,medianIndex:EA,merge:Cc,min:ma,minIndex:Lc,mode:RA,namespace:Ci,namespaces:Rc,nice:Dc,now:Ui,pack:I9,packEnclose:T9,packSiblings:k9,pairs:IA,partition:N9,path:Al,pathRound:G4,permute:gg,pie:cv,piecewise:T0,pointRadial:To,pointer:ue,pointers:j6,polygonArea:K9,polygonCentroid:Q9,polygonContains:nT,polygonHull:eT,polygonLength:rT,precisionFixed:Fm,precisionPrefix:Gm,precisionRound:zm,quadtree:is,quantile:Ti,quantileIndex:vg,quantileSorted:bg,quantize:k8,quickselect:ya,radialArea:pv,radialLine:hv,randomBates:sT,randomBernoulli:lT,randomBeta:wy,randomBinomial:$y,randomCauchy:hT,randomExponential:uT,randomGamma:Of,randomGeometric:_y,randomInt:oT,randomIrwinHall:xy,randomLcg:yT,randomLogNormal:aT,randomLogistic:pT,randomNormal:zf,randomPareto:cT,randomPoisson:dT,randomUniform:iT,randomWeibull:fT,range:ln,rank:FA,reduce:VA,reverse:ZA,rgb:Pr,ribbon:q4,ribbonArrow:j4,rollup:hg,rollups:pg,scaleBand:Yf,scaleDiverging:Tb,scaleDivergingLog:Lb,scaleDivergingPow:uh,scaleDivergingSqrt:lC,scaleDivergingSymlog:Cb,scaleIdentity:Py,scaleImplicit:Uf,scaleLinear:jf,scaleLog:ky,scaleOrdinal:Bf,scalePoint:Hf,scalePow:Ks,scaleQuantile:Oy,scaleQuantize:Uy,scaleRadial:zy,scaleSequential:Ab,scaleSequentialLog:Mb,scaleSequentialPow:sh,scaleSequentialQuantile:Pb,scaleSequentialSqrt:cC,scaleSequentialSymlog:Db,scaleSqrt:TT,scaleSymlog:Ny,scaleThreshold:By,scaleTime:sC,scaleUtc:uC,scan:OA,schemeAccent:hC,schemeBlues:Jb,schemeBrBG:Eb,schemeBuGn:Ub,schemeBuPu:Bb,schemeCategory10:fC,schemeDark2:pC,schemeGnBu:Yb,schemeGreens:tv,schemeGreys:ev,schemeObservable10:dC,schemeOrRd:Hb,schemeOranges:iv,schemePRGn:kb,schemePaired:gC,schemePastel1:mC,schemePastel2:yC,schemePiYG:Rb,schemePuBu:qb,schemePuBuGn:Wb,schemePuOr:Ib,schemePuRd:jb,schemePurples:nv,schemeRdBu:Nb,schemeRdGy:Fb,schemeRdPu:Xb,schemeRdYlBu:Gb,schemeRdYlGn:zb,schemeReds:rv,schemeSet1:bC,schemeSet2:vC,schemeSet3:xC,schemeSpectral:Ob,schemeTableau10:_C,schemeYlGn:Zb,schemeYlGnBu:Vb,schemeYlOrBr:Kb,schemeYlOrRd:Qb,select:Z,selectAll:X6,selection:In,selector:$a,selectorAll:Ic,shuffle:UA,shuffler:_g,some:qA,sort:Sc,stack:tk,stackOffsetDiverging:nk,stackOffsetExpand:ek,stackOffsetNone:ei,stackOffsetSilhouette:rk,stackOffsetWiggle:ik,stackOrderAppearance:Wv,stackOrderAscending:qv,stackOrderDescending:ak,stackOrderInsideOut:sk,stackOrderNone:ni,stackOrderReverse:uk,stratify:O9,style:Rn,subset:e5,sum:BA,superset:$g,svg:rD,symbol:RE,symbolAsterisk:yv,symbolCircle:mu,symbolCross:bv,symbolDiamond:xv,symbolDiamond2:_v,symbolPlus:wv,symbolSquare:$v,symbolSquare2:Sv,symbolStar:Mv,symbolTimes:gh,symbolTriangle:Dv,symbolTriangle2:Pv,symbolWye:Tv,symbolX:gh,symbols:Lv,symbolsFill:Lv,symbolsStroke:kE,text:rs,thresholdFreedmanDiaconis:PA,thresholdScott:TA,thresholdSturges:Pc,tickFormat:Dy,tickIncrement:En,tickStep:ga,ticks:Cn,timeDay:Zr,timeDays:IT,get timeFormat(){return ih},timeFormatDefaultLocale:$b,timeFormatLocale:sb,timeFriday:Xy,timeFridays:BT,timeHour:tu,timeHours:kT,timeInterval:Pt,timeMillisecond:Vr,timeMilliseconds:Yy,timeMinute:Qs,timeMinutes:CT,timeMonday:wo,timeMondays:GT,timeMonth:nu,timeMonths:ZT,get timeParse(){return wb},timeSaturday:Vy,timeSaturdays:YT,timeSecond:on,timeSeconds:Wy,timeSunday:Kr,timeSundays:Zy,timeThursday:tr,timeThursdays:UT,timeTickInterval:ab,timeTicks:ob,timeTuesday:qy,timeTuesdays:zT,timeWednesday:jy,timeWednesdays:OT,timeWeek:Kr,timeWeeks:Zy,timeYear:Be,timeYears:QT,timeout:rl,timer:Ha,timerFlush:E0,transition:G0,transpose:wg,tree:j9,treemap:by,treemapBinary:X9,treemapDice:vo,treemapResquarify:Z9,treemapSlice:Xs,treemapSliceDice:V9,treemapSquarify:Gf,tsv:K7,tsvFormat:F7,tsvFormatBody:G7,tsvFormatRow:O7,tsvFormatRows:z7,tsvFormatValue:U7,tsvParse:bm,tsvParseRows:N7,union:n5,unixDay:eh,unixDays:FT,utcDay:_o,utcDays:NT,get utcFormat(){return iu},utcFriday:Jy,utcFridays:XT,utcHour:eu,utcHours:RT,utcMillisecond:Vr,utcMilliseconds:Yy,utcMinute:Js,utcMinutes:ET,utcMonday:$o,utcMondays:HT,utcMonth:ru,utcMonths:KT,get utcParse(){return oh},utcSaturday:tb,utcSaturdays:VT,utcSecond:on,utcSeconds:Wy,utcSunday:Qr,utcSundays:eb,utcThursday:nr,utcThursdays:jT,utcTickInterval:ib,utcTicks:rb,utcTuesday:Ky,utcTuesdays:WT,utcWednesday:Qy,utcWednesdays:qT,utcWeek:Qr,utcWeeks:eb,utcYear:Ye,utcYears:JT,variance:ig,window:Fc,xml:eD,zip:HA,zoom:Zv,zoomIdentity:$u,zoomTransform:Xv},Symbol.toStringTag,{value:"Module"}));function Kv(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function gk(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function Co(t){return t.substring(0,4)!=="ease"?Yi:wh[t]??Yi}function Su({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=jf().domain([0,1]).range([0,t/2]),a=o(n);return sv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const $h=(t,e)=>e instanceof Function?e(t):Zi(e)(t);function Qv(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function mk(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function yk(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return mk(e)}function Ct(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function Sh({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function st(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function $n(t,e){const r=Math.random().toString(36).substr(2,5);return st(t,e,r)}const ri=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=st(e,"series"),u=st(e,"axes"),c=st(e,"graphic"),l=r.pipe(U((d,g)=>t.selectAll(`g.${s}`).data(d,m=>m).join(m=>m.append("g").classed(s,!0).each((y,x,v)=>{Z(v[x]).selectAll(`g.${u}`).data([x]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each(($,_,D)=>{Z(D[_]).selectAll("defs").data([_]).join("defs"),Z(D[_]).selectAll("g").data([_]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),St(1));B({seriesSelection:l,gridContainerPosition:i}).pipe(Y(async d=>d)).subscribe(d=>{d.seriesSelection.transition().attr("transform",(g,m)=>{const y=d.gridContainerPosition[m]??d.gridContainerPosition[0],x=y.translate,v=y.scale;return`translate(${x[0]}, ${x[1]}) scale(${v[0]}, ${v[1]})`})});const h=B({seriesSelection:l,gridAxesTransform:o}).pipe(Y(async d=>d),U(d=>d.seriesSelection.select(`g.${u}`).style("transform",d.gridAxesTransform.value)),St(1)),f=h.pipe(U(d=>d.select("defs")),St(1)),p=B({axesSelection:h,gridGraphicTransform:a}).pipe(Y(async d=>d),U(d=>{const g=d.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",d.gridGraphicTransform.value),g}),St(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:p}},Ah=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new ot,o=new ht(a=>{B({dataFormatter:t,computedData:n}).pipe(G(i),Y(async s=>s)).subscribe(s=>{const c=s.computedData[0]?s.computedData[0].length-1:0,l=s.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[0]-s.dataFormatter.grid.groupAxis.scalePadding,h=s.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?c+s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[1]+s.dataFormatter.grid.groupAxis.scalePadding,p=(s.dataFormatter.grid.seriesDirection==="row"?(s.computedData[0]??[]).map(d=>d.groupLabel):s.computedData.map(d=>d[0].groupLabel)).filter((d,g)=>g>=l&&g<=h);a.next(p)})});return new ht(a=>{B({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(G(i),Y(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=tA({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),l=f=>s.dataFormatter.grid.groupAxis.position==="bottom"||s.dataFormatter.grid.groupAxis.position==="top"?f.offsetX-s.fullChartParams.padding.left:f.offsetY-s.fullChartParams.padding.top,h=f=>{const p=l(f),d=c(p);return{groupIndex:d,groupLabel:s.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})};function bk(t="curveLinear"){return du().x(e=>e.axisX).y(e=>e.axisY).curve(wh[t])}function vk(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function xk({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function _k({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function wk({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(Co(r)).tween("tween",(c,l,h)=>f=>{const p=c.width*f;u.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const Jv=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullDataFormatter$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new ot,v=$n(t,"clipPath-box"),b=st(t,"path"),{seriesSelection$:$,axesSelection$:_,defsSelection$:D,graphicGSelection$:T}=ri({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),w=new ht(M=>{const F=c.pipe(G(x)).subscribe(O=>{if(!O)return;const E=bk(O.lineCurve);M.next(E)});return()=>{F.unsubscribe()}}),P=h.pipe(U(M=>M.transitionDuration),it()),S=h.pipe(U(M=>M.transitionEase),it());B({defsSelection:D,seriesLabels:a,axisSize:d,transitionDuration:P,transitionEase:S}).pipe(G(x),Y(async M=>M)).subscribe(M=>{const O=[{id:v,width:M.axisSize.width,height:M.axisSize.height}].concat(M.seriesLabels.map(E=>({id:`orbcharts__clipPath_${E}`,width:M.axisSize.width,height:M.axisSize.height})));wk({defsSelection:M.defsSelection,clipPathData:O,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const z=n.pipe(U(M=>{const F=new Map;return M.flat().forEach(O=>F.set(O.id,O)),F})),k=Ah({fullDataFormatter$:l,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),A=h.pipe(G(x),U(M=>M.highlightTarget),it()),L=B({graphicGSelection:T,visibleComputedLayoutData:o,linePath:w,params:c}).pipe(G(x),Y(async M=>M),U(M=>{let F=[];return M.graphicGSelection.each((O,E,R)=>{const C=vk(M.visibleComputedLayoutData[E]??[]);F[E]=xk({selection:Z(R[E]),pathClassName:b,linePath:M.linePath,segmentData:C,params:M.params})}),F}));return B({pathSelectionArr:L,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:A,gridGroupPositionFn:k}).pipe(G(x),Y(async M=>M)).subscribe(M=>{M.pathSelectionArr.forEach(F=>{F.on("mouseover",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})}).on("mousemove",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})}).on("mouseout",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})}).on("click",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})})})}),h.pipe(G(x),ai(M=>M.highlightTarget==="series"),Y(M=>B({graphicGSelection:T,gridHighlight:g,DataMap:z,fullChartParams:h}).pipe(G(x),Y(async F=>F)))).subscribe(M=>{const F=M.gridHighlight[0]?M.gridHighlight[0].seriesLabel:null;_k({selection:M.graphicGSelection,seriesLabel:F,fullChartParams:M.fullChartParams})}),()=>{x.next(void 0)}},t2="Lines",$k=se(t2,or)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=Jv(t2,{selection:t,computedData$:n.computedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedData$:n.visibleComputedData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainerPosition$:n.gridContainerPosition$,event$:r.event$});return()=>{i.next(void 0),o()}});function Sk(t="curveLinear",e){return fh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(wh[t])}function Ak(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function Mk({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,u)=>s.length?`${s[0].id}_${s[s.length-1].id}`:u).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,u)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function Dk({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function Pk({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
10
10
|
<stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
|
11
11
|
<stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
|
12
|
-
`})}function jk({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ko(r)).tween("tween",(c,l,h)=>f=>{const p=c.width*f;u.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const m2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullDataFormatter$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:y,event$:x})=>{const v=new ot,b=An(t,"clipPath-box"),$=st(t,"path"),{seriesSelection$:_,axesSelection$:D,defsSelection$:T,graphicGSelection$:w}=si({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),P=p.pipe(G(v),U(E=>-E.translate[1]/E.scale[1])),S=new ht(E=>{const R=B({fullParams:c,valueAxisStart:P}).pipe(G(v)).subscribe(C=>{const N=Bk(C.fullParams.lineCurve,C.valueAxisStart);E.next(N)});return()=>{R.unsubscribe()}}),z=h.pipe(U(E=>E.transitionDuration),it()),k=h.pipe(U(E=>E.transitionEase),it());B({defsSelection:T,seriesLabels:a,axisSize:d,transitionDuration:z,transitionEase:k}).pipe(G(v),Y(async E=>E)).subscribe(E=>{const C=[{id:b,width:E.axisSize.width,height:E.axisSize.height}].concat(E.seriesLabels.map(N=>({id:`orbcharts__clipPath_${N}`,width:E.axisSize.width,height:E.axisSize.height})));jk({defsSelection:E.defsSelection,clipPathData:C,transitionDuration:E.transitionDuration,transitionEase:E.transitionEase})});const A=n.pipe(U(E=>{const R=new Map;return E.flat().forEach(C=>R.set(C.id,C)),R})),L=Dh({fullDataFormatter$:l,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),M=h.pipe(G(v),U(E=>E.highlightTarget),it()),F=a.pipe(G(v),U(E=>E.map((R,C)=>An(t,`lineargradient-${R}`)))),O=B({graphicGSelection:w,defsSelection:T,visibleComputedLayoutData:o,linearGradientIds:F,areaPath:S,params:c}).pipe(G(v),Y(async E=>E),U(E=>{let R=[];return E.graphicGSelection.each((C,N,j)=>{const Q=Yk(E.visibleComputedLayoutData[N]??[]);R[N]=Hk({selection:Z(j[N]),pathClassName:$,areaPath:E.areaPath,segmentData:Q,linearGradientIds:E.linearGradientIds,params:E.params}),qk({defsSelection:E.defsSelection,computedData:E.visibleComputedLayoutData,linearGradientIds:E.linearGradientIds,params:E.params})}),R}));return B({pathSelectionArr:O,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:M,gridGroupPositionFn:L}).pipe(G(v),Y(async E=>E)).subscribe(E=>{E.pathSelectionArr.forEach(R=>{R.on("mouseover",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})}).on("mousemove",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})}).on("mouseout",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})}).on("click",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})})})}),h.pipe(G(v),li(E=>E.highlightTarget==="series"),Y(E=>B({graphicGSelection:w,gridHighlight:g,DataMap:A,fullChartParams:h}).pipe(G(v),Y(async R=>R)))).subscribe(E=>{const R=E.gridHighlight[0]?E.gridHighlight[0].seriesLabel:null;Wk({selection:E.graphicGSelection,seriesLabel:R,fullChartParams:E.fullChartParams})}),()=>{v.next(void 0)}},y2="LineAreas",Xk=se(y2,Xh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=m2(y2,{selection:t,computedData$:n.computedData$,visibleComputedData$:n.visibleComputedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainerPosition$:n.gridContainerPosition$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),b2=.3;function v2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((e>1?t/(e-1):t)-i)/n-r;return a>1?a:1}function Vk(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return qf().domain(e).range([-i/2+r,i/2-r])}function Zk(t,e){return t<=1?0:e/(t-1)*b2}function Kk(t,e){return t<=1?e:e*(1-b2)}function Qk({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:c,delayGroup:l,transitionItem:h,isSeriesSeprate:f}){const p=u/2;return t.each((g,m,y)=>{Z(y[m]).selectAll(`rect.${e}`).data(n[m]??[],x=>x.id).join(x=>x.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),x=>x,x=>x.remove()).attr("transform",(x,v)=>`translate(${(x?x.axisX:0)-p}, 0)`).attr("fill",x=>x.color).attr("y",x=>x.axisY<r[m]?x.axisY:r[m]).attr("x",x=>f?0:o(x.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(ko(s.transitionEase)).delay((x,v)=>x.groupIndex*l).attr("height",x=>Math.abs(x.axisYFromZero))}),t.selectAll(`rect.${e}`)}function Jk({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function tR({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Ph=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullChartParams$:l,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new ot,b=An(t,"clipPath-box"),$=st(t,"rect"),{seriesSelection$:_,axesSelection$:D,defsSelection$:T,graphicGSelection$:w}=si({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),P=o.pipe(G(v),U(R=>R.map(C=>C[0]?C[0].axisY-C[0].axisYFromZero:0)),it()),S=B({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(G(v),Y(async R=>R),U(R=>R.params.barWidth?R.params.barWidth:R.isSeriesSeprate?v2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:1,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}):v2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:R.visibleComputedData.length,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding})),it()),z=B({computedData:n,barWidth:S,params:c,gridGraphicReverseScale:p}).pipe(G(v),Y(async R=>R),U(R=>{const C=R.barWidth/2,N=R.params.barRadius===!0?C:R.params.barRadius===!1?0:typeof R.params.barRadius=="number"?R.params.barRadius:0;return R.computedData.map((j,Q)=>{const I=R.gridGraphicReverseScale[Q]??R.gridGraphicReverseScale[0];let X=N*I[0],q=N*I[1];if(X>C){const V=C/X;X=X*V,q=q*V}return[X,q]})})),k=i.pipe(G(v),U(R=>{const C=new Set;return R.forEach(N=>{N.forEach(j=>{C.add(j.groupLabel)})}),Array.from(C)})),A=B({seriesLabels:a,barWidth:S,params:c}).pipe(G(v),Y(async R=>R),U(R=>Vk(R.barWidth,R.seriesLabels,R.params))),L=l.pipe(G(v),U(R=>R.transitionDuration),it()),M=new ht(R=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const N=Zk(C.groupLabels.length,C.transitionDuration);R.next(N)})}).pipe(G(v),it()),F=new ht(R=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const N=Kk(C.groupLabels.length,C.transitionDuration);R.next(N)})}).pipe(G(v),it());B({defsSelection:T,gridAxesSize:d}).pipe(G(v),Y(async R=>R)).subscribe(R=>{const C=[{id:b,width:R.gridAxesSize.width,height:R.gridAxesSize.height}];Jk({defsSelection:R.defsSelection,clipPathData:C})});const O=l.pipe(G(v),U(R=>R.highlightTarget),it()),E=B({graphicGSelection:w,visibleComputedLayoutData:o,zeroYArr:P,groupLabels:k,barScale:A,params:c,chartParams:l,highlightTarget:O,barWidth:S,transformedBarRadius:z,delayGroup:M,transitionItem:F,isSeriesSeprate:y}).pipe(G(v),Y(async R=>R),U(R=>Qk({graphicGSelection:R.graphicGSelection,rectClassName:$,visibleComputedLayoutData:R.visibleComputedLayoutData,zeroYArr:R.zeroYArr,groupLabels:R.groupLabels,barScale:R.barScale,params:R.params,chartParams:R.chartParams,barWidth:R.barWidth,transformedBarRadius:R.transformedBarRadius,delayGroup:R.delayGroup,transitionItem:R.transitionItem,isSeriesSeprate:R.isSeriesSeprate})));return B({barSelection:E,computedData:n,highlightTarget:O,SeriesDataMap:s,GroupDataMap:u}).pipe(G(v),Y(async R=>R)).subscribe(R=>{R.barSelection.on("mouseover",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})}).on("mousemove",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})}).on("mouseout",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})}).on("click",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})})}),B({barSelection:E,highlight:g.pipe(U(R=>R.map(C=>C.id))),fullChartParams:l}).pipe(G(v),Y(async R=>R)).subscribe(R=>{tR({selection:R.barSelection,ids:R.highlight,fullChartParams:R.fullChartParams})}),()=>{v.next(void 0)}},x2="Bars",eR=se(x2,Io)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=r.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),Dt(1)),a=Ph(x2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:o,event$:n.event$});return()=>{i.next(void 0),a()}}),_2="BarsDiverging",nR=se(_2,Io)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=Ph(_2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:Yu(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),w2=.3;function rR({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function iR(t,e){return t<=1?0:e/(t-1)*w2}function oR(t,e){return t<=1?e:e*(1-w2)}function aR({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:c,transitionItem:l,isSeriesSeprate:h}){const f=s/2;return t.each((d,g,m)=>{Z(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),y=>y,y=>y.remove()).attr("transform",(y,x)=>`translate(${(y?y.axisX:0)-f}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(l).ease(ko(a.transitionEase)).delay((y,x)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function sR({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function uR({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const $2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullDataFormatter$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:y,isSeriesSeprate$:x,event$:v})=>{const b=new ot,$=An(t,"clipPath-box"),_=st(t,"rect"),{seriesSelection$:D,axesSelection$:T,defsSelection$:w,graphicGSelection$:P}=si({selection:e,pluginName:t,clipPathID:$,seriesLabels$:a,gridContainerPosition$:y,gridAxesTransform$:f,gridGraphicTransform$:p}),S=o.pipe(G(b),U(I=>I[0]&&I[0][0]?I[0][0].axisY-I[0][0].axisYFromZero:0),it()),z=B({computedData:n,params:c,axisSize:g,isSeriesSeprate:x}).pipe(G(b),Y(async I=>I),U(I=>I.params.barWidth?I.params.barWidth:rR({axisWidth:I.axisSize.width,groupAmount:I.computedData[0]?I.computedData[0].length:0,barGroupPadding:I.params.barGroupPadding})),it()),k=B({computedData:n,barWidth:z,params:c,gridGraphicReverseScale:d}).pipe(G(b),Y(async I=>I),U(I=>{const X=I.barWidth/2,q=I.params.barRadius===!0?X:I.params.barRadius===!1?0:typeof I.params.barRadius=="number"?I.params.barRadius:0;return I.computedData.map((V,W)=>{const et=I.gridGraphicReverseScale[W]??I.gridGraphicReverseScale[0],ut=q*et[0],H=q*et[1];return[ut,H]})})),A=i.pipe(G(b),U(I=>{const X=new Set;return I.forEach(q=>{q.forEach(V=>{X.add(V.groupLabel)})}),Array.from(X)}),Dt(1)),L=h.pipe(G(b),U(I=>I.transitionDuration),it()),M=new ht(I=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async X=>X)).subscribe(X=>{const q=iR(X.groupLabels.length,X.transitionDuration);I.next(q)})}).pipe(G(b),it()),F=new ht(I=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async X=>X)).subscribe(X=>{const q=oR(X.groupLabels.length,X.transitionDuration);I.next(q)})}).pipe(G(b),it()),O=B({computedData:n,dataFormatter:l}).pipe(G(b),Y(async I=>I),U(I=>{const q=I.computedData[0]?I.computedData[0].length-1:0,V=I.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0:I.dataFormatter.grid.groupAxis.scaleDomain[0],W=I.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?q:I.dataFormatter.grid.groupAxis.scaleDomain[1];return[V,W]})),E=B({visibleComputedLayoutData:o,groupScaleDomain:O}).pipe(G(b),Y(async I=>I),U(I=>{const X=I.groupScaleDomain[0],q=I.groupScaleDomain[1],W=I.visibleComputedLayoutData.map(mt=>mt.filter((pt,Yt)=>pt.groupIndex>=X&&pt.groupIndex<=q)).flat();if(W.length<=1)return 1;const et=W.reduce((mt,pt)=>pt.value>mt.value?pt:mt,W[0]),ut=et.groupIndex,H=W.filter(mt=>mt.groupIndex===ut).reduce((mt,pt)=>mt+pt.value,0);return et.value/H})),R=B({computedLayoutData:r,yRatio:E,zeroY:S}).pipe(G(b),U(I=>{let X=I.computedLayoutData[0]?I.computedLayoutData[0].map(()=>I.zeroY):[];return I.computedLayoutData.map((q,V)=>q.map((W,et)=>{const ut=X[et];let H=0;return W.visible&&(H=W.axisYFromZero*I.yRatio,X[et]=X[et]+H),{...W,_barStartY:ut,_barHeight:H}}))})),C=B({computedLayoutData:r,zeroY:S}).pipe(G(b),U(I=>I.computedLayoutData.map((X,q)=>X.map((V,W)=>({...V,_barStartY:I.zeroY,_barHeight:V.axisYFromZero}))))),N=x.pipe(Y(I=>Lp(()=>I,C,R)));B({defsSelection:w,gridAxesSize:g}).pipe(G(b),Y(async I=>I)).subscribe(I=>{const X=[{id:$,width:I.gridAxesSize.width,height:I.gridAxesSize.height}];sR({defsSelection:I.defsSelection,clipPathData:X})});const j=h.pipe(G(b),U(I=>I.highlightTarget),it()),Q=B({graphicGSelection:P,graphicData:N,zeroY:S,groupLabels:A,params:c,chartParams:h,highlightTarget:j,barWidth:z,transformedBarRadius:k,delayGroup:M,transitionItem:F,isSeriesSeprate:x}).pipe(G(b),Y(async I=>I),U(I=>aR({graphicGSelection:I.graphicGSelection,rectClassName:_,barData:I.graphicData,zeroY:I.zeroY,groupLabels:I.groupLabels,params:I.params,chartParams:I.chartParams,barWidth:I.barWidth,transformedBarRadius:I.transformedBarRadius,delayGroup:I.delayGroup,transitionItem:I.transitionItem,isSeriesSeprate:I.isSeriesSeprate})));return B({barSelection:Q,computedData:n,highlightTarget:j,SeriesDataMap:s,GroupDataMap:u}).subscribe(I=>{I.barSelection.on("mouseover",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})}).on("mousemove",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})}).on("mouseout",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})}).on("click",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})})}),B({barSelection:Q,highlight:m.pipe(U(I=>I.map(X=>X.id))),fullChartParams:h}).pipe(G(b),Y(async I=>I)).subscribe(I=>{uR({selection:I.barSelection,ids:I.highlight,fullChartParams:I.fullChartParams})}),()=>{b.next(void 0)}},S2="BarStack",cR=se(S2,Kh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=r.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),Dt(1)),a=$2(S2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:o,event$:n.event$});return()=>{i.next(void 0),a()}}),A2=.3;function M2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function lR(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return qf().domain(e).range([-i/2+r,i/2-r])}function fR(t,e){return t<=1?0:e/(t-1)*A2}function hR(t,e){return t<=1?e:e*(1-A2)}function pR({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:c,barWidth:l,delayGroup:h,transitionItem:f,isSeriesSeprate:p}){const d=l/2;return t.each((m,y,x)=>{Z(x[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const $=b.append("g").classed(e,!0).attr("cursor","pointer");return $.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",_=>{const D=-d,T=o[y],w=o[y];return`M${D},${T} L${D+l/2},${w} ${D+l},${T}`}),$},b=>b,b=>b.remove()).attr("transform",b=>`translate(${p?0:s(b.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("y",b=>b.axisY<o[y]?b.axisY:o[y]).attr("x",b=>p?0:s(b.seriesLabel)).style("fill",b=>`url(#${i[b.seriesIndex]})`).attr("stroke",b=>b.color).attr("transform",b=>`translate(${b?b.axisX:0}, 0)`).transition().duration(f).ease(ko(c.transitionEase)).delay((b,$)=>b.groupIndex*h).attr("d",b=>{const $=-d,_=o[y],D=b.axisY;return`M${$},${_} L${$+l/2},${D} ${$+l},${_}`})}),t.selectAll(`path.${n}`)}function dR({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
12
|
+
`})}function Tk({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(Co(r)).tween("tween",(c,l,h)=>f=>{const p=c.width*f;u.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const e2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullDataFormatter$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:y,event$:x})=>{const v=new ot,b=$n(t,"clipPath-box"),$=st(t,"path"),{seriesSelection$:_,axesSelection$:D,defsSelection$:T,graphicGSelection$:w}=ri({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),P=p.pipe(G(v),U(E=>-E.translate[1]/E.scale[1])),S=new ht(E=>{const R=B({fullParams:c,valueAxisStart:P}).pipe(G(v)).subscribe(C=>{const N=Sk(C.fullParams.lineCurve,C.valueAxisStart);E.next(N)});return()=>{R.unsubscribe()}}),z=h.pipe(U(E=>E.transitionDuration),it()),k=h.pipe(U(E=>E.transitionEase),it());B({defsSelection:T,seriesLabels:a,axisSize:d,transitionDuration:z,transitionEase:k}).pipe(G(v),Y(async E=>E)).subscribe(E=>{const C=[{id:b,width:E.axisSize.width,height:E.axisSize.height}].concat(E.seriesLabels.map(N=>({id:`orbcharts__clipPath_${N}`,width:E.axisSize.width,height:E.axisSize.height})));Tk({defsSelection:E.defsSelection,clipPathData:C,transitionDuration:E.transitionDuration,transitionEase:E.transitionEase})});const A=n.pipe(U(E=>{const R=new Map;return E.flat().forEach(C=>R.set(C.id,C)),R})),L=Ah({fullDataFormatter$:l,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),M=h.pipe(G(v),U(E=>E.highlightTarget),it()),F=a.pipe(G(v),U(E=>E.map((R,C)=>$n(t,`lineargradient-${R}`)))),O=B({graphicGSelection:w,defsSelection:T,visibleComputedLayoutData:o,linearGradientIds:F,areaPath:S,params:c}).pipe(G(v),Y(async E=>E),U(E=>{let R=[];return E.graphicGSelection.each((C,N,j)=>{const Q=Ak(E.visibleComputedLayoutData[N]??[]);R[N]=Mk({selection:Z(j[N]),pathClassName:$,areaPath:E.areaPath,segmentData:Q,linearGradientIds:E.linearGradientIds,params:E.params}),Pk({defsSelection:E.defsSelection,computedData:E.visibleComputedLayoutData,linearGradientIds:E.linearGradientIds,params:E.params})}),R}));return B({pathSelectionArr:O,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:M,gridGroupPositionFn:L}).pipe(G(v),Y(async E=>E)).subscribe(E=>{E.pathSelectionArr.forEach(R=>{R.on("mouseover",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})}).on("mousemove",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})}).on("mouseout",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})}).on("click",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})})})}),h.pipe(G(v),ai(E=>E.highlightTarget==="series"),Y(E=>B({graphicGSelection:w,gridHighlight:g,DataMap:A,fullChartParams:h}).pipe(G(v),Y(async R=>R)))).subscribe(E=>{const R=E.gridHighlight[0]?E.gridHighlight[0].seriesLabel:null;Dk({selection:E.graphicGSelection,seriesLabel:R,fullChartParams:E.fullChartParams})}),()=>{v.next(void 0)}},n2="LineAreas",Lk=se(n2,qh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=e2(n2,{selection:t,computedData$:n.computedData$,visibleComputedData$:n.visibleComputedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainerPosition$:n.gridContainerPosition$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),r2=.3;function i2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((e>1?t/(e-1):t)-i)/n-r;return a>1?a:1}function Ck(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Hf().domain(e).range([-i/2+r,i/2-r])}function Ek(t,e){return t<=1?0:e/(t-1)*r2}function kk(t,e){return t<=1?e:e*(1-r2)}function Rk({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:c,delayGroup:l,transitionItem:h,isSeriesSeprate:f}){const p=u/2;return t.each((g,m,y)=>{Z(y[m]).selectAll(`rect.${e}`).data(n[m]??[],x=>x.id).join(x=>x.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),x=>x,x=>x.remove()).attr("transform",(x,v)=>`translate(${(x?x.axisX:0)-p}, 0)`).attr("fill",x=>x.color).attr("y",x=>x.axisY<r[m]?x.axisY:r[m]).attr("x",x=>f?0:o(x.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(Co(s.transitionEase)).delay((x,v)=>x.groupIndex*l).attr("height",x=>Math.abs(x.axisYFromZero))}),t.selectAll(`rect.${e}`)}function Ik({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function Nk({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Mh=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullChartParams$:l,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new ot,b=$n(t,"clipPath-box"),$=st(t,"rect"),{seriesSelection$:_,axesSelection$:D,defsSelection$:T,graphicGSelection$:w}=ri({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),P=o.pipe(G(v),U(R=>R.map(C=>C[0]?C[0].axisY-C[0].axisYFromZero:0)),it()),S=B({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(G(v),Y(async R=>R),U(R=>R.params.barWidth?R.params.barWidth:R.isSeriesSeprate?i2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:1,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}):i2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:R.visibleComputedData.length,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding})),it()),z=B({computedData:n,barWidth:S,params:c,gridGraphicReverseScale:p}).pipe(G(v),Y(async R=>R),U(R=>{const C=R.barWidth/2,N=R.params.barRadius===!0?C:R.params.barRadius===!1?0:typeof R.params.barRadius=="number"?R.params.barRadius:0;return R.computedData.map((j,Q)=>{const I=R.gridGraphicReverseScale[Q]??R.gridGraphicReverseScale[0];let X=N*I[0],q=N*I[1];if(X>C){const V=C/X;X=X*V,q=q*V}return[X,q]})})),k=i.pipe(G(v),U(R=>{const C=new Set;return R.forEach(N=>{N.forEach(j=>{C.add(j.groupLabel)})}),Array.from(C)})),A=B({seriesLabels:a,barWidth:S,params:c}).pipe(G(v),Y(async R=>R),U(R=>Ck(R.barWidth,R.seriesLabels,R.params))),L=l.pipe(G(v),U(R=>R.transitionDuration),it()),M=new ht(R=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const N=Ek(C.groupLabels.length,C.transitionDuration);R.next(N)})}).pipe(G(v),it()),F=new ht(R=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const N=kk(C.groupLabels.length,C.transitionDuration);R.next(N)})}).pipe(G(v),it());B({defsSelection:T,gridAxesSize:d}).pipe(G(v),Y(async R=>R)).subscribe(R=>{const C=[{id:b,width:R.gridAxesSize.width,height:R.gridAxesSize.height}];Ik({defsSelection:R.defsSelection,clipPathData:C})});const O=l.pipe(G(v),U(R=>R.highlightTarget),it()),E=B({graphicGSelection:w,visibleComputedLayoutData:o,zeroYArr:P,groupLabels:k,barScale:A,params:c,chartParams:l,highlightTarget:O,barWidth:S,transformedBarRadius:z,delayGroup:M,transitionItem:F,isSeriesSeprate:y}).pipe(G(v),Y(async R=>R),U(R=>Rk({graphicGSelection:R.graphicGSelection,rectClassName:$,visibleComputedLayoutData:R.visibleComputedLayoutData,zeroYArr:R.zeroYArr,groupLabels:R.groupLabels,barScale:R.barScale,params:R.params,chartParams:R.chartParams,barWidth:R.barWidth,transformedBarRadius:R.transformedBarRadius,delayGroup:R.delayGroup,transitionItem:R.transitionItem,isSeriesSeprate:R.isSeriesSeprate})));return B({barSelection:E,computedData:n,highlightTarget:O,SeriesDataMap:s,GroupDataMap:u}).pipe(G(v),Y(async R=>R)).subscribe(R=>{R.barSelection.on("mouseover",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})}).on("mousemove",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})}).on("mouseout",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})}).on("click",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})})}),B({barSelection:E,highlight:g.pipe(U(R=>R.map(C=>C.id))),fullChartParams:l}).pipe(G(v),Y(async R=>R)).subscribe(R=>{Nk({selection:R.barSelection,ids:R.highlight,fullChartParams:R.fullChartParams})}),()=>{v.next(void 0)}},o2="Bars",Fk=se(o2,ko)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=r.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),St(1)),a=Mh(o2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:o,event$:n.event$});return()=>{i.next(void 0),a()}}),a2="BarsDiverging",Gk=se(a2,ko)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=Mh(a2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:Uu(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),s2=.3;function zk({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function Ok(t,e){return t<=1?0:e/(t-1)*s2}function Uk(t,e){return t<=1?e:e*(1-s2)}function Bk({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:c,transitionItem:l,isSeriesSeprate:h}){const f=s/2;return t.each((d,g,m)=>{Z(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),y=>y,y=>y.remove()).attr("transform",(y,x)=>`translate(${(y?y.axisX:0)-f}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(l).ease(Co(a.transitionEase)).delay((y,x)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function Yk({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function Hk({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const u2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullDataFormatter$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:y,isSeriesSeprate$:x,event$:v})=>{const b=new ot,$=$n(t,"clipPath-box"),_=st(t,"rect"),{seriesSelection$:D,axesSelection$:T,defsSelection$:w,graphicGSelection$:P}=ri({selection:e,pluginName:t,clipPathID:$,seriesLabels$:a,gridContainerPosition$:y,gridAxesTransform$:f,gridGraphicTransform$:p}),S=o.pipe(G(b),U(I=>I[0]&&I[0][0]?I[0][0].axisY-I[0][0].axisYFromZero:0),it()),z=B({computedData:n,params:c,axisSize:g,isSeriesSeprate:x}).pipe(G(b),Y(async I=>I),U(I=>I.params.barWidth?I.params.barWidth:zk({axisWidth:I.axisSize.width,groupAmount:I.computedData[0]?I.computedData[0].length:0,barGroupPadding:I.params.barGroupPadding})),it()),k=B({computedData:n,barWidth:z,params:c,gridGraphicReverseScale:d}).pipe(G(b),Y(async I=>I),U(I=>{const X=I.barWidth/2,q=I.params.barRadius===!0?X:I.params.barRadius===!1?0:typeof I.params.barRadius=="number"?I.params.barRadius:0;return I.computedData.map((V,W)=>{const et=I.gridGraphicReverseScale[W]??I.gridGraphicReverseScale[0],ut=q*et[0],H=q*et[1];return[ut,H]})})),A=i.pipe(G(b),U(I=>{const X=new Set;return I.forEach(q=>{q.forEach(V=>{X.add(V.groupLabel)})}),Array.from(X)}),St(1)),L=h.pipe(G(b),U(I=>I.transitionDuration),it()),M=new ht(I=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async X=>X)).subscribe(X=>{const q=Ok(X.groupLabels.length,X.transitionDuration);I.next(q)})}).pipe(G(b),it()),F=new ht(I=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async X=>X)).subscribe(X=>{const q=Uk(X.groupLabels.length,X.transitionDuration);I.next(q)})}).pipe(G(b),it()),O=B({computedData:n,dataFormatter:l}).pipe(G(b),Y(async I=>I),U(I=>{const q=I.computedData[0]?I.computedData[0].length-1:0,V=I.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0:I.dataFormatter.grid.groupAxis.scaleDomain[0],W=I.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?q:I.dataFormatter.grid.groupAxis.scaleDomain[1];return[V,W]})),E=B({visibleComputedLayoutData:o,groupScaleDomain:O}).pipe(G(b),Y(async I=>I),U(I=>{const X=I.groupScaleDomain[0],q=I.groupScaleDomain[1],W=I.visibleComputedLayoutData.map(mt=>mt.filter((pt,Yt)=>pt.groupIndex>=X&&pt.groupIndex<=q)).flat();if(W.length<=1)return 1;const et=W.reduce((mt,pt)=>pt.value>mt.value?pt:mt,W[0]),ut=et.groupIndex,H=W.filter(mt=>mt.groupIndex===ut).reduce((mt,pt)=>mt+pt.value,0);return et.value/H})),R=B({computedLayoutData:r,yRatio:E,zeroY:S}).pipe(G(b),U(I=>{let X=I.computedLayoutData[0]?I.computedLayoutData[0].map(()=>I.zeroY):[];return I.computedLayoutData.map((q,V)=>q.map((W,et)=>{const ut=X[et];let H=0;return W.visible&&(H=W.axisYFromZero*I.yRatio,X[et]=X[et]+H),{...W,_barStartY:ut,_barHeight:H}}))})),C=B({computedLayoutData:r,zeroY:S}).pipe(G(b),U(I=>I.computedLayoutData.map((X,q)=>X.map((V,W)=>({...V,_barStartY:I.zeroY,_barHeight:V.axisYFromZero}))))),N=x.pipe(Y(I=>Pp(()=>I,C,R)));B({defsSelection:w,gridAxesSize:g}).pipe(G(b),Y(async I=>I)).subscribe(I=>{const X=[{id:$,width:I.gridAxesSize.width,height:I.gridAxesSize.height}];Yk({defsSelection:I.defsSelection,clipPathData:X})});const j=h.pipe(G(b),U(I=>I.highlightTarget),it()),Q=B({graphicGSelection:P,graphicData:N,zeroY:S,groupLabels:A,params:c,chartParams:h,highlightTarget:j,barWidth:z,transformedBarRadius:k,delayGroup:M,transitionItem:F,isSeriesSeprate:x}).pipe(G(b),Y(async I=>I),U(I=>Bk({graphicGSelection:I.graphicGSelection,rectClassName:_,barData:I.graphicData,zeroY:I.zeroY,groupLabels:I.groupLabels,params:I.params,chartParams:I.chartParams,barWidth:I.barWidth,transformedBarRadius:I.transformedBarRadius,delayGroup:I.delayGroup,transitionItem:I.transitionItem,isSeriesSeprate:I.isSeriesSeprate})));return B({barSelection:Q,computedData:n,highlightTarget:j,SeriesDataMap:s,GroupDataMap:u}).subscribe(I=>{I.barSelection.on("mouseover",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})}).on("mousemove",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})}).on("mouseout",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})}).on("click",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})})}),B({barSelection:Q,highlight:m.pipe(U(I=>I.map(X=>X.id))),fullChartParams:h}).pipe(G(b),Y(async I=>I)).subscribe(I=>{Hk({selection:I.barSelection,ids:I.highlight,fullChartParams:I.fullChartParams})}),()=>{b.next(void 0)}},c2="BarStack",Wk=se(c2,Vh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=r.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),St(1)),a=u2(c2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:o,event$:n.event$});return()=>{i.next(void 0),a()}}),l2=.3;function f2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function qk(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Hf().domain(e).range([-i/2+r,i/2-r])}function jk(t,e){return t<=1?0:e/(t-1)*l2}function Xk(t,e){return t<=1?e:e*(1-l2)}function Vk({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:c,barWidth:l,delayGroup:h,transitionItem:f,isSeriesSeprate:p}){const d=l/2;return t.each((m,y,x)=>{Z(x[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const $=b.append("g").classed(e,!0).attr("cursor","pointer");return $.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",_=>{const D=-d,T=o[y],w=o[y];return`M${D},${T} L${D+l/2},${w} ${D+l},${T}`}),$},b=>b,b=>b.remove()).attr("transform",b=>`translate(${p?0:s(b.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("y",b=>b.axisY<o[y]?b.axisY:o[y]).attr("x",b=>p?0:s(b.seriesLabel)).style("fill",b=>`url(#${i[b.seriesIndex]})`).attr("stroke",b=>b.color).attr("transform",b=>`translate(${b?b.axisX:0}, 0)`).transition().duration(f).ease(Co(c.transitionEase)).delay((b,$)=>b.groupIndex*h).attr("d",b=>{const $=-d,_=o[y],D=b.axisY;return`M${$},${_} L${$+l/2},${D} ${$+l},${_}`})}),t.selectAll(`path.${n}`)}function Zk({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
13
13
|
<stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
|
14
14
|
<stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
|
15
|
-
`})}function gR({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function mR({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1):Z(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const D2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:c,fullParams$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new ot,b=An(t,"clipPath-box"),$=st(t,"pathG"),_=st(t,"path"),{seriesSelection$:D,axesSelection$:T,defsSelection$:w,graphicGSelection$:P}=si({selection:e,pluginName:t,clipPathID:b,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p});p.pipe(G(v),U(C=>-C.translate[1]/C.scale[1]));const S=o.pipe(U(C=>C.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),it()),z=B({computedData:n,visibleComputedData:i,params:l,gridAxesSize:d,isSeriesSeprate:y}).pipe(G(v),Y(async C=>C),U(C=>C.params.barWidth?C.params.barWidth:C.isSeriesSeprate?M2({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:1,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}):M2({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:C.visibleComputedData.length,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}))),k=i.pipe(G(v),U(C=>{const N=new Set;return C.forEach(j=>{j.forEach(Q=>{N.add(Q.groupLabel)})}),Array.from(N)})),A=new ht(C=>{B({seriesLabels:s,barWidth:z,params:l}).pipe(G(v),Y(async N=>N)).subscribe(N=>{const j=lR(N.barWidth,N.seriesLabels,N.params);C.next(j)})}),L=h.pipe(G(v),U(C=>C.transitionDuration),it()),M=new ht(C=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async N=>N)).subscribe(N=>{const j=fR(N.groupLabels.length,N.transitionDuration);C.next(j)})}).pipe(G(v),it()),F=new ht(C=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async N=>N)).subscribe(N=>{const j=hR(N.groupLabels.length,N.transitionDuration);C.next(j)})}).pipe(G(v),it());B({defsSelection:w,gridAxesSize:d}).pipe(G(v),Y(async C=>C)).subscribe(C=>{const N=[{id:b,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];gR({defsSelection:C.defsSelection,clipPathData:N})});const O=h.pipe(G(v),U(C=>C.highlightTarget),it()),E=s.pipe(G(v),U(C=>C.map((N,j)=>An(t,`lineargradient-${N}`)))),R=B({graphicGSelection:P,defsSelection:w,computedData:n,visibleComputedLayoutData:o,linearGradientIds:E,zeroYArr:S,groupLabels:k,barScale:A,params:l,chartParams:h,barWidth:z,delayGroup:M,transitionItem:F,isSeriesSeprate:y}).pipe(G(v),Y(async C=>C),U(C=>(dR({defsSelection:C.defsSelection,computedData:C.computedData,linearGradientIds:C.linearGradientIds,params:C.params}),pR({graphicGSelection:C.graphicGSelection,pathGClassName:$,pathClassName:_,visibleComputedLayoutData:C.visibleComputedLayoutData,linearGradientIds:C.linearGradientIds,zeroYArr:C.zeroYArr,groupLabels:C.groupLabels,barScale:C.barScale,params:C.params,chartParams:C.chartParams,barWidth:C.barWidth,delayGroup:C.delayGroup,transitionItem:C.transitionItem,isSeriesSeprate:C.isSeriesSeprate}))));return B({barSelection:R,computedData:n,highlightTarget:O,SeriesDataMap:u,GroupDataMap:c}).subscribe(C=>{C.barSelection.on("mouseover",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})}).on("mousemove",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})}).on("mouseout",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})}).on("click",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})})}),B({barSelection:R,highlight:g.pipe(U(C=>C.map(N=>N.id))),fullChartParams:h}).pipe(G(v),Y(async C=>C)).subscribe(C=>{mR({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{v.next(void 0)}},P2="BarsTriangle",yR=se(P2,Qh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=r.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),Dt(1)),a=D2(P2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,fullDataFormatter$:r.fullDataFormatter$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:o,event$:n.event$});return()=>{i.next(void 0),a()}});function bR({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=l=>{const h=l.size();return o.transitionDuration/h};let u=0;return t.each((l,h,f)=>{Z(f[h]).selectAll("g").data(r[h],p=>p.id).join(p=>(u=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,g)=>{Z(g[d]).selectAll("circle").data([p]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,x)=>d*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>Mh({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Mh({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),t.selectAll(`circle.${n}`)}function vR({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1).transition("highlight").duration(200):Z(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function xR({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const T2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullChartParams$:l,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new ot,v=An(t,"clipPath-box"),b=st(t,"circleG"),$=st(t,"circle"),{seriesSelection$:_,axesSelection$:D,defsSelection$:T,graphicGSelection$:w}=si({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),P=B({computedData:n,gridGraphicReverseScale:p}).pipe(G(x),Y(async A=>A),U(A=>A.computedData.map((L,M)=>A.gridGraphicReverseScale[M])));B({defsSelection:T,gridAxesSize:d}).pipe(G(x),Y(async A=>A)).subscribe(A=>{const L=[{id:v,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];xR({defsSelection:A.defsSelection,clipPathData:L})});const S=l.pipe(G(x),U(A=>A.highlightTarget),it()),z=B({graphicGSelection:w,visibleComputedLayoutData:o,graphicReverseScale:P,fullChartParams:l,fullParams:c}).pipe(G(x),Y(async A=>A),U(A=>bR({graphicGSelection:A.graphicGSelection,circleGClassName:b,circleClassName:$,visibleComputedLayoutData:A.visibleComputedLayoutData,fullParams:A.fullParams,fullChartParams:A.fullChartParams,graphicReverseScale:A.graphicReverseScale})));B({graphicSelection:z,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:S}).pipe(G(x),Y(async A=>A)).subscribe(A=>{A.graphicSelection.on("mouseover",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L,data:A.computedData})}).on("mousemove",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,data:A.computedData,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L})}).on("mouseout",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L,data:A.computedData})}).on("click",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L,data:A.computedData})})});const k=c.pipe(G(x),U(A=>A.onlyShowHighlighted),it());return l.pipe(G(x),Y(A=>B({graphicSelection:z,highlight:g.pipe(U(L=>L.map(M=>M.id))),onlyShowHighlighted:k,fullChartParams:l}).pipe(G(x),Y(async L=>L)))).subscribe(A=>{vR({selection:A.graphicSelection,ids:A.highlight,onlyShowHighlighted:A.onlyShowHighlighted,fullChartParams:A.fullChartParams})}),()=>{x.next(void 0)}},L2="Dots",_R=se(L2,Vh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=T2(L2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,event$:n.event$});return()=>{i.next(void 0),o()}}),wR={listRectWidth:14,listRectHeight:14,listRectRadius:0};function C2(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}const Du=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=st(t,"root-position"),u=st(t,"legend-card"),c=st(t,"legend-list"),l=st(t,"legend-item"),h=new ot,f=B({seriesLabels:n,fullChartParams:o}).pipe(G(h),Y(async w=>w),U(w=>{const P=new Map;let S=0;return w.seriesLabels.forEach((z,k)=>{if(!P.has(z)){const A=C2(S,w.fullChartParams);P.set(z,A),S++}}),P})),p=n.pipe(G(h),U(w=>{const P=new Set;let S=[];return w.forEach(z=>{P.has(z)?S.push(!1):S.push(!0),P.add(z)}),S})),d=r.pipe(G(h),U(w=>w.position==="bottom"||w.position==="top"?"row":"column")),g=B({fullParams:r,layout:i}).pipe(G(h),Y(async w=>w),U(w=>{const P=w.fullParams.padding*2+w.fullParams.gap*2;return w.fullParams.position==="bottom"||w.fullParams.position==="top"?w.layout.rootWidth-P:w.layout.rootHeight-P})),y=B({layout:i,fullParams:r}).pipe(G(h),Y(async w=>w),U(w=>{let P=0,S=0;return w.fullParams.position==="bottom"?(S=w.layout.rootHeight,w.fullParams.justify==="start"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="right"?(P=w.layout.rootWidth,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)):w.fullParams.position==="top"?(S=0,w.fullParams.justify==="start"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="left"&&(P=0,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)),{x:P,y:S}})).pipe(G(h),U(w=>e.selectAll(`g.${s}`).data([w]).join(P=>P.append("g").classed(s,!0).attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.transition().attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.remove()))),x=r.pipe(G(h),U(w=>w.seriesList[0]?w.seriesList[0]:wR)),v=B({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:g,defaultListStyle:x,SeriesLabelColorMap:f,textSizePx:a}).pipe(G(h),Y(async w=>w),U(w=>w.seriesLabels.reduce((P,S,z)=>{if(!w.visibleList[z])return P;const k=p2(S,w.textSizePx),A=w.textSizePx*1.5+k,L=w.SeriesLabelColorMap.get(S),M=P[0]&&P[0][0]?P[P.length-1][P[P.length-1].length-1]:null,{translateX:F,translateY:O,lineIndex:E,itemIndex:R}=((N,j,Q)=>{let I=0,X=0,q=0,V=0;if(N.lineDirection==="column"){let W=Q?Q.translateY+N.textSizePx+N.fullParams.gap:0;if(W+N.textSizePx>N.lineMaxSize){q=Q.lineIndex+1,V=0,X=0;const et=j[j.length-1].reduce((ut,H)=>H.itemWidth>ut?H.itemWidth:ut,0);I=Q.translateX+et+N.fullParams.gap}else q=Q?Q.lineIndex:0,V=Q?Q.itemIndex+1:0,X=W,I=Q?Q.translateX:0}else{let W=Q?Q.translateX+Q.itemWidth+N.fullParams.gap:0;W+A>N.lineMaxSize?(q=Q.lineIndex+1,V=0,I=0):(q=Q?Q.lineIndex:0,V=Q?Q.itemIndex+1:0,I=W),X=(N.textSizePx+N.fullParams.gap)*q}return{translateX:I,translateY:X,lineIndex:q,itemIndex:V}})(w,P,M);P[E]||(P[E]=[]);const C=w.fullParams.seriesList[R]?w.fullParams.seriesList[R]:w.defaultListStyle;return P[E].push({id:S,seriesLabel:S,seriesIndex:z,lineIndex:E,itemIndex:R,text:S,itemWidth:A,translateX:F,translateY:O,color:L,listRectWidth:C.listRectWidth,listRectHeight:C.listRectHeight,listRectRadius:C.listRectRadius}),P},[])),Dt(1)),b=B({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v,textSizePx:a}).pipe(G(h),Y(async w=>w),U(w=>{const{width:P,height:S}=((z,k)=>{let A=0,L=0;if(!k.length||!k[0].length)return{width:A,height:L};const M=k[0][k[0].length-1];return z.lineDirection==="column"?(A=k.reduce((F,O)=>{const E=O.reduce((R,C)=>C.itemWidth>R?C.itemWidth:R,0);return F+E},0),A+=z.fullParams.gap*(k.length-1),L=M.translateY+z.textSizePx):(A=M.translateX+M.itemWidth,L=z.textSizePx*k.length+z.fullParams.gap*(k.length-1)),{width:A,height:L}})(w,w.lengendItems);return{direction:w.lineDirection,width:P,height:S,translateX:w.fullParams.gap,translateY:w.fullParams.gap}}),Dt(1)),$=B({fullParams:r,lengendList:b}).pipe(G(h),Y(async w=>w),U(w=>{const P=w.lengendList.width+w.fullParams.gap*2,S=w.lengendList.height+w.fullParams.gap*2;let z=0,k=0;return w.fullParams.position==="left"?w.fullParams.justify==="start"?(z=w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="center"?(z=w.fullParams.padding,k=-S/2):w.fullParams.justify==="end"&&(z=w.fullParams.padding,k=-S-w.fullParams.padding):w.fullParams.position==="right"?w.fullParams.justify==="start"?(z=-P-w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="center"?(z=-P-w.fullParams.padding,k=-S/2):w.fullParams.justify==="end"&&(z=-P-w.fullParams.padding,k=-S-w.fullParams.padding):w.fullParams.position==="top"?w.fullParams.justify==="start"?(z=w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="center"?(z=-P/2,k=w.fullParams.padding):w.fullParams.justify==="end"&&(z=-P-w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="start"?(z=w.fullParams.padding,k=-S-w.fullParams.padding):w.fullParams.justify==="center"?(z=-P/2,k=-S-w.fullParams.padding):w.fullParams.justify==="end"&&(z=-P-w.fullParams.padding,k=-S-w.fullParams.padding),{width:P,height:S,translateX:z,translateY:k}})),_=B({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:$}).pipe(G(h),Y(async w=>w),U(w=>w.rootPositionSelection.selectAll("g").data([w.legendCard]).join(P=>P.append("g").classed(u,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove()).each((P,S,z)=>{Z(z[S]).selectAll("rect").data([P]).join("rect").attr("width",k=>k.width).attr("height",k=>k.height).attr("fill",Et(w.fullParams.backgroundFill,w.fullChartParams)).attr("stroke",Et(w.fullParams.backgroundStroke,w.fullChartParams))}))),D=B({lengendCardSelection:_,fullParams:r,lengendList:b}).pipe(G(h),Y(async w=>w),U(w=>w.lengendCardSelection.selectAll("g").data([w.lengendList]).join(P=>P.append("g").classed(c,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove())));return B({lengendListSelection:D,fullParams:r,fullChartParams:o,lengendItems:v,textSizePx:a}).pipe(G(h),Y(async w=>w),U(w=>{const P=w.lengendItems[0]?w.lengendItems.flat():[];return w.lengendListSelection.selectAll(`g.${l}`).data(P).join(S=>S.append("g").classed(l,!0).attr("cursor","default"),S=>S,S=>S.remove()).attr("transform",(S,z)=>`translate(${S.translateX}, ${S.translateY})`).each((S,z,k)=>{const A=w.textSizePx/2,L=-S.listRectWidth/2,M=-S.listRectHeight/2;Z(k[z]).selectAll("rect").data([S]).join("rect").attr("x",A).attr("y",A).attr("width",F=>F.listRectWidth).attr("height",F=>F.listRectHeight).attr("transform",F=>`translate(${L}, ${M})`).attr("fill",F=>F.color).attr("rx",F=>F.listRectRadius),Z(k[z]).selectAll("text").data([S]).join(F=>F.append("text").attr("dominant-baseline","hanging"),F=>F,F=>F.remove()).attr("x",w.textSizePx*1.5).attr("font-size",w.fullChartParams.styles.textSize).attr("fill",F=>w.fullParams.textColorType==="series"?C2(F.seriesIndex,w.fullChartParams):Et(w.fullParams.textColorType,w.fullChartParams)).text(F=>F.text)})})).subscribe(),()=>{h.next(void 0)}},E2="GridLegend",$R=se(E2,np)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.SeriesDataMap$.pipe(G(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Du(E2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Th=6;function SR({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:c,textTransform:l}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((d,g,m)=>{Z(m[g]).selectAll("text").data([d]).join(y=>y.append("text").style("font-weight","bold"),y=>y,y=>y.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Et(r.labelColorType,u)).style("transform",l).text(y=>s.grid.groupAxis.label)}).attr("transform",d=>`translate(${a.width+d.tickPadding+r.labelOffset[0]}, ${-d.tickPadding-Th-r.labelOffset[1]})`);const f=Ug(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:Th).tickSizeOuter(0).tickFormat(d=>Ah(d,r.tickFormat)).tickPadding(r.tickPadding),p=h.transition().duration(100).call(f);return p.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",u.styles.textSize).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Th}`).style("transform",l),h}const k2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:c,isSeriesSeprate$:l})=>{const h=new ot,f=st(t,"container"),p=st(t,"xAxisG"),d=st(t,"xAxis"),g=st(t,"groupingLabel"),m=B({computedData:n.pipe(it((_,D)=>_.length===D.length)),isSeriesSeprate:l}).pipe(G(h),Y(async _=>_),U(_=>_.isSeriesSeprate?_.computedData:[_.computedData[0]]),U((_,D)=>e.selectAll(`g.${f}`).data(_,T=>T[0]?T[0].seriesIndex:D).join("g").classed(f,!0))),y=m.pipe(G(h),U((_,D)=>_.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:c}).pipe(G(h),Y(async _=>_)).subscribe(_=>{_.containerSelection.attr("transform",(D,T)=>{const w=_.gridContainerPosition[T]??_.gridContainerPosition[0],P=w.translate,S=w.scale;return`translate(${P[0]}, ${P[1]}) scale(${S[0]}, ${S[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(G(h),Y(async _=>_)).subscribe(_=>{_.axisSelection.style("transform",_.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:c}).pipe(G(h),Y(async _=>_),U(_=>{const D=`translate(${_.gridAxesReverseTransform.translate[0]}px, ${_.gridAxesReverseTransform.translate[1]}px)`,T=`rotate(${_.gridAxesReverseTransform.rotate}deg) rotateX(${_.gridAxesReverseTransform.rotateX}deg) rotateY(${_.gridAxesReverseTransform.rotateY}deg)`,w=`scale(${1/_.gridContainerPosition[0].scale[0]}, ${1/_.gridContainerPosition[0].scale[1]})`,S=`rotate(${_.fullDataFormatter.grid.groupAxis.position==="left"&&_.fullDataFormatter.grid.valueAxis.position==="top"||_.fullDataFormatter.grid.groupAxis.position==="right"&&_.fullDataFormatter.grid.valueAxis.position==="bottom"?_.fullParams.tickTextRotate+180:_.fullParams.tickTextRotate}deg)`;return`${D} ${T} ${w} ${S}`}),it()),v=new ht(_=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),Y(async D=>D)).subscribe(D=>{const w=D.computedData[0]?D.computedData[0].length-1:0,P=D.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-D.fullDataFormatter.grid.groupAxis.scalePadding:D.fullDataFormatter.grid.groupAxis.scaleDomain[0]-D.fullDataFormatter.grid.groupAxis.scalePadding,S=D.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?w+D.fullDataFormatter.grid.groupAxis.scalePadding:D.fullDataFormatter.grid.groupAxis.scaleDomain[1]+D.fullDataFormatter.grid.groupAxis.scalePadding,z=D.computedData[0]?D.computedData[0].length:0;let k=(D.computedData[0]??[]).map(F=>F.groupLabel);const A=new Array(z).fill(0).map((F,O)=>k[O]!=null?k[O]:String(O)).filter((F,O)=>O>=P&&O<=S),L=D.fullDataFormatter.grid.groupAxis.scalePadding,M=fg({axisLabels:A,axisWidth:D.gridAxesSize.width,padding:L});_.next(M)})}),b=B({fullDataFormatter:i,fullParams:r}).pipe(G(h),Y(async _=>_),U(_=>{let D="middle",T="hanging";return _.fullDataFormatter.grid.groupAxis.position==="bottom"?(D=_.fullParams.tickTextRotate?"end":"middle",T="hanging"):_.fullDataFormatter.grid.groupAxis.position==="top"?(D=_.fullParams.tickTextRotate?"end":"middle",T="auto"):_.fullDataFormatter.grid.groupAxis.position==="left"?(D="end",T="middle"):_.fullDataFormatter.grid.groupAxis.position==="right"&&(D="start",T="middle"),{textAnchor:D,dominantBaseline:T}})),$=i.pipe(G(h),U(_=>{let D="start",T="hanging";return _.grid.groupAxis.position==="bottom"?T="hanging":_.grid.groupAxis.position==="top"?T="auto":_.grid.groupAxis.position==="left"?D="end":_.grid.groupAxis.position==="right"&&(D="start"),_.grid.valueAxis.position==="left"?D="start":_.grid.valueAxis.position==="right"?D="end":_.grid.valueAxis.position==="bottom"?T="auto":_.grid.valueAxis.position==="top"&&(T="hanging"),{textAnchor:D,dominantBaseline:T}}));return B({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:$,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:v,textTransform:x}).pipe(G(h),Y(async _=>_)).subscribe(_=>{SR({selection:_.axisSelection,xAxisClassName:d,groupingLabelClassName:g,params:_.params,tickTextAlign:_.tickTextAlign,axisLabelAlign:_.axisLabelAlign,gridAxesSize:_.gridAxesSize,fullDataFormatter:_.fullDataFormatter,chartParams:_.chartParams,groupScale:_.groupScale,textTransform:_.textTransform})}),()=>{h.next(void 0)}},R2="GroupAxis",AR=se(R2,Jh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=n.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),Dt(1)),a=k2(R2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:o});return()=>{i.next(void 0),a()}}),I2=6;function MR({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:c,textTransform:l,minAndMax:h}){const f=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,x,v)=>{Z(v[x]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Et(r.labelColorType,u)).style("transform",l).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const p=h[1]-h[0],d=Bg(c).scale(c).ticks(p>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(p)).tickFormat(y=>Ah(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:I2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(d);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),f.selectAll("text").attr("font-size",u.styles.textSize).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+I2} 0`).style("transform",l),f}const Pu=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:c,isSeriesSeprate$:l})=>{const h=new ot,f=st(t,"container"),p=st(t,"yAxisG"),d=st(t,"yAxis"),g=st(t,"text"),m=B({computedData:n.pipe(it((D,T)=>D.length===T.length)),isSeriesSeprate:l}).pipe(G(h),Y(async D=>D),U(D=>D.isSeriesSeprate?D.computedData:[D.computedData[0]]),U((D,T)=>e.selectAll(`g.${f}`).data(D,w=>w[0]?w[0].seriesIndex:T).join("g").classed(f,!0))),y=m.pipe(G(h),U((D,T)=>D.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:c}).pipe(G(h),Y(async D=>D)).subscribe(D=>{D.containerSelection.attr("transform",(T,w)=>{const P=D.gridContainerPosition[w]??D.gridContainerPosition[0],S=P.translate,z=P.scale;return`translate(${S[0]}, ${S[1]}) scale(${z[0]}, ${z[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(G(h),Y(async D=>D)).subscribe(D=>{D.axisSelection.style("transform",D.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:c}).pipe(G(h),Y(async D=>D),U(D=>{const T=`translate(${D.gridAxesReverseTransform.translate[0]}px, ${D.gridAxesReverseTransform.translate[1]}px)`,w=`rotate(${D.gridAxesReverseTransform.rotate}deg) rotateX(${D.gridAxesReverseTransform.rotateX}deg) rotateY(${D.gridAxesReverseTransform.rotateY}deg)`,P=`scale(${1/D.gridContainerPosition[0].scale[0]}, ${1/D.gridContainerPosition[0].scale[1]})`,z=`rotate(${D.fullDataFormatter.grid.groupAxis.position==="left"&&D.fullDataFormatter.grid.valueAxis.position==="top"||D.fullDataFormatter.grid.groupAxis.position==="right"&&D.fullDataFormatter.grid.valueAxis.position==="bottom"?D.fullParams.tickTextRotate+180:D.fullParams.tickTextRotate}deg)`;return`${T} ${w} ${P} ${z}`}),it()),v=new ht(D=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),Y(async T=>T)).subscribe(T=>{const P=T.computedData[0]?T.computedData[0].length-1:0,S=T.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-T.fullDataFormatter.grid.groupAxis.scalePadding:T.fullDataFormatter.grid.groupAxis.scaleDomain[0]-T.fullDataFormatter.grid.groupAxis.scalePadding,z=T.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+T.fullDataFormatter.grid.groupAxis.scalePadding:T.fullDataFormatter.grid.groupAxis.scaleDomain[1]+T.fullDataFormatter.grid.groupAxis.scalePadding,k=T.computedData.map((L,M)=>L.filter((F,O)=>O>=S&&O<=z)),A=Ik(k.flat());D.next(A)})}),b=new ht(D=>{B({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(G(h),Y(async T=>T)).subscribe(T=>{const w=lg({maxValue:T.minAndMax[1],minValue:T.minAndMax[0],axisWidth:T.gridAxesSize.height,scaleDomain:T.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:T.fullDataFormatter.grid.valueAxis.scaleRange});D.next(w)})}),$=i.pipe(G(h),U(D=>{let T="start",w="hanging";return D.grid.valueAxis.position==="left"?(T="end",w="middle"):D.grid.valueAxis.position==="right"?(T="start",w="middle"):D.grid.valueAxis.position==="bottom"?(T="middle",w="hanging"):D.grid.valueAxis.position==="top"&&(T="middle",w="auto"),{textAnchor:T,dominantBaseline:w}})),_=i.pipe(G(h),U(D=>{let T="start",w="hanging";return D.grid.groupAxis.position==="bottom"?w="auto":D.grid.groupAxis.position==="top"?w="hanging":D.grid.groupAxis.position==="left"?T="start":D.grid.groupAxis.position==="right"&&(T="end"),D.grid.valueAxis.position==="left"?T="end":D.grid.valueAxis.position==="right"?T="start":D.grid.valueAxis.position==="bottom"?w="hanging":D.grid.valueAxis.position==="top"&&(w="auto"),{textAnchor:T,dominantBaseline:w}}));return B({axisSelection:y,fullParams:r,tickTextAlign:$,axisLabelAlign:_,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:x,minAndMax:v}).pipe(G(h),Y(async D=>D)).subscribe(D=>{MR({selection:D.axisSelection,yAxisClassName:d,textClassName:g,fullParams:D.fullParams,tickTextAlign:D.tickTextAlign,axisLabelAlign:D.axisLabelAlign,gridAxesSize:D.gridAxesSize,fullDataFormatter:D.fullDataFormatter,fullChartParams:D.fullChartParams,valueScale:D.valueScale,textTransform:D.textTransform,minAndMax:D.minAndMax})}),()=>{h.next(void 0)}},N2="ValueAxis",DR=se(N2,Cu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=n.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),Dt(1)),a=Pu(N2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:o});return()=>{i.next(void 0),a()}}),F2="ValueStackAxis",PR=se(F2,tp)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=n.computedData$.pipe(G(i),U(u=>{const c=new Array(u[0]?u[0].length:0).fill(null).map((h,f)=>u.reduce((p,d)=>{if(d&&d[f]){const g=d[f].value==null||d[f].visible==!1?0:d[f].value;return p+g}return p},0));return u.map((h,f)=>h.map((p,d)=>({...p,value:c[d]})))})),a=n.fullDataFormatter$.pipe(G(i),U(u=>u.grid.separateSeries),it(),Dt(1)),s=Pu(F2,{selection:t,computedData$:a.pipe(Y(u=>Lp(()=>u,n.computedData$,o))),fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:a});return()=>{i.next(void 0),s()}}),G2="ScalingArea",TR=st(G2,"rect"),LR=se(G2,ep)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new ot,a=e.insert("rect","g").classed(TR,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(G(o)).subscribe(c=>{a.attr("width",c.width).attr("height",c.height).attr("x",c.left).attr("y",c.top)});const u=r.computedData$.pipe(U(c=>c[0]?c[0].length-1:0),it());return B({initGroupAxis:r.fullDataFormatter$.pipe(U(c=>c.grid.groupAxis),A_()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(G(o),Y(async c=>c)).subscribe(c=>{const h=c.groupMaxIndex,f=c.initGroupAxis.scaleDomain[0]==="auto"?0-c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,p=c.initGroupAxis.scaleDomain[1]==="auto"?h+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding,g=lg({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,p],scaleRange:[0,1]}).copy(),m=f2().on("zoom",function(x){const v=x.transform,b=D=>{const T=Math.round(D);return Math.min(h,Math.max(0,T))},$=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?v.rescaleX(g).domain().map(b):v.rescaleY(g).domain().map(b);$[0]<=0&&$[1]>=h?v.k<s.k&&(v.k=s.k,v.x=s.x,v.y=s.y):$[1]-$[0]<=1&&v.k>s.k&&(v.k=s.k,v.x=s.x,v.y=s.y),s.k=v.k,s.x=v.x,s.y=v.y;const _={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:$}}};i.dataFormatter$.next(_)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function CR(t,e){let n=new ht(()=>{});return t.each(function(){const r=Wu(this,e);n=qu(n,r)}),n}const Lh="GroupAux",Ch=st(Lh,"label-box");function ER({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function kR({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=st(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Et(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),a.transition().duration(50).attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),u}function RR(t){t.selectAll("line").data([]).exit().remove()}function IR({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Ah(t,n.labelTextFormat)}]:[]}function NR({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i,textSizePx:o}){const a=o+4,s=t.selectAll(`g.${Ch}`).data(e),u=s.enter().append("g").classed(Ch,!0).style("cursor","pointer"),c=u.merge(s);return u.attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.transition().duration(50).attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.exit().remove(),c.each((l,h,f)=>{const p=p2(l.text,o)+12,d=-p/2,g=Z(f[h]).selectAll("rect").data([l]),m=g.enter().append("rect").attr("height",`${a}px`).attr("fill",v=>Et(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");g.merge(m).attr("width",v=>`${p}px`).style("transform",i),g.exit().remove();const y=Z(f[h]).selectAll("text").data([l]),x=y.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");y.merge(x).text(v=>v.text).style("transform",i).attr("fill",v=>Et(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),y.exit().remove()}),c}function FR(t){t.selectAll(`g.${Ch}`).data([]).exit().remove()}const GR=se(Lh,Zh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new ot,a=e.insert("rect","g").classed(st(Lh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(G(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(G(o),U(f=>f.value),it()).subscribe(f=>{s.style("transform",f)});const u=new ht(f=>{B({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(G(o),Y(async p=>p)).subscribe(p=>{const g=p.computedData[0]?p.computedData[0].length-1:0,m=p.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-p.fullDataFormatter.grid.groupAxis.scalePadding:p.fullDataFormatter.grid.groupAxis.scaleDomain[0]-p.fullDataFormatter.grid.groupAxis.scalePadding,y=p.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?g+p.fullDataFormatter.grid.groupAxis.scalePadding:p.fullDataFormatter.grid.groupAxis.scaleDomain[1]+p.fullDataFormatter.grid.groupAxis.scalePadding,x=p.computedData[0]?p.computedData[0].length:0;let v=p.fullDataFormatter.grid.seriesDirection==="row"?(p.computedData[0]??[]).map(D=>D.groupLabel):p.computedData.map(D=>D[0].groupLabel);const b=new Array(x).fill(0).map((D,T)=>v[T]!=null?v[T]:String(T)).filter((D,T)=>T>=m&&T<=y),$=p.fullDataFormatter.grid.groupAxis.scalePadding,_=fg({axisLabels:b,axisWidth:p.gridAxesSize.width,padding:$});f.next(_)})}),c=Dh({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(G(o),U(f=>f.highlightTarget),it());return B({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,groupScale:u}).pipe(G(o),Y(async f=>f)).subscribe(f=>{e.on("mouseover",(p,d)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:f.computedData})}).on("click",(p,d)=>{p.stopPropagation();const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:f.computedData})})}),B({event:r.event$.pipe(li(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,textSizePx:i.textSizePx$}).pipe(G(o),Y(async f=>f)).subscribe(f=>{const p=f.groupScale(f.event.groupLabel)??0,d=ER({groupLabel:f.event.groupLabel,axisX:p,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});kR({selection:s,pluginName:n,lineData:d,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=IR({groupLabel:f.event.groupLabel,axisX:p,fullParams:f.fullParams});NR({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value,textSizePx:f.textSizePx}).on("mouseover",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})})}),CR(a,"mouseout").pipe(G(o)).subscribe(f=>{console.log("rootMouseout"),RR(s),FR(s)}),()=>{o.next(void 0),a.remove()}}),z2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},O2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},U2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},B2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},Y2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},H2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},W2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},q2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},j2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},X2={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},V2="MultiGridLegend",zR=ke(V2,z2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.multiGridEachDetail$.pipe(G(i),U(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(U(p=>Array.from(p.keys()))))),Y(c=>B(c)),U(c=>c.flat())),a=B({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(G(i),Y(async c=>c),U(c=>c.computedData.map((l,h)=>{const f=pc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(p=>f)}).flat())),s=B({fullParams:n.fullParams$,seriesList:a}).pipe(G(i),Y(async c=>c),U(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Du(V2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),un=t=>{const e=t.fullParams$.pipe(U(n=>n.gridIndexes),it(),Dt(1));return B({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(U(n=>n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Eh="MultiBars",Z2=st(Eh,"grid"),OR=ke(Eh,B2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Z2}`).data(s).join("g").attr("class",Z2).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),Dt(1));o[c]=Ph(Eh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),kh="MultiBarStack",K2=st(kh,"grid"),UR=ke(kh,Y2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${K2}`).data(s).join("g").attr("class",K2).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),Dt(1));o[c]=$2(kh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Rh="MultiBarsTriangle",Q2=st(Rh,"grid"),BR=ke(Rh,H2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Q2}`).data(s).join("g").attr("class",Q2).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),Dt(1));o[c]=D2(Rh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,fullDataFormatter$:u.dataFormatter$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ih="MultiLines",J2=st(Ih,"grid"),YR=ke(Ih,W2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${J2}`).data(s).join("g").attr("class",J2).each((u,c,l)=>{const h=Z(l[c]);o[c]=d2(Ih,{selection:h,computedData$:u.computedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedData$:u.visibleComputedData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Nh="MultiLineAreas",tx=st(Nh,"grid"),HR=ke(Nh,q2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${tx}`).data(s).join("g").attr("class",tx).each((u,c,l)=>{const h=Z(l[c]);o[c]=m2(Nh,{selection:h,computedData$:u.computedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedData$:u.visibleComputedData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Fh="MultiDots",ex=st(Fh,"grid"),WR=ke(Fh,j2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${ex}`).data(s).join("g").attr("class",ex).each((u,c,l)=>{const h=Z(l[c]);o[c]=T2(Fh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Gh="MultiGroupAxis",nx=st(Gh,"grid"),qR=ke(Gh,O2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${nx}`).data(s).join("g").attr("class",nx).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),Dt(1));o[c]=k2(Gh,{selection:h,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),zh="MultiValueAxis",rx=st(zh,"grid"),jR=ke(zh,U2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${rx}`).data(s).join("g").attr("class",rx).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),Dt(1));o[c]=Pu(zh,{selection:h,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function XR(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function ix(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:XR(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,c=Math.floor(s/o),l=(t.width-r*(o-1))/o,h=(t.height-r*(i-1))/i,f=u*l+u*r,p=c*h+c*r,d=[f,p],g=[l/t.width,h/t.height];return{slotIndex:s,rowIndex:c,columnIndex:u,translate:d,scale:g}})}const VR=({fullDataFormatter$:t,layout$:e})=>{const n=new ot;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,c=0,l=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,c=s):o.position==="right"?(h=180,f=180,u=a,c=s):(h=180,c=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,c=s)):i.position==="left"?o.position==="bottom"?(l=-90,c=s):o.position==="top"?(l=-90,f=180):(h=180,c=s):i.position==="right"&&(o.position==="bottom"?(l=-90,h=180,c=s,u=a):o.position==="top"?(l=-90,h=180,f=180,u=a):(h=180,c=s)),{translate:[u,c],scale:[1,1],rotate:l,rotateX:h,rotateY:f,value:`translate(${u}px, ${c}px) rotate(${l}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new ht(i=>(B({fullDataFormatter:t,layout:e}).pipe(G(n),Y(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},ZR=({gridAxesTransform$:t})=>t.pipe(U(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),KR=({computedData$:t,fullDataFormatter$:e,layout$:n})=>B({computedData:t,fullDataFormatter:e,layout:n}).pipe(Y(async i=>i),U(i=>i.fullDataFormatter.grid.separateSeries?ix(i.layout,i.fullDataFormatter.container,i.computedData.length):ix(i.layout,i.fullDataFormatter.container,1))),Oh="OverlappingValueAxes",ox=st(Oh,"grid"),QR=ke(Oh,X2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[],a=r.fullParams$.pipe(G(i),U(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(G(i),U(l=>l.gridIndexes[1])),u=B({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(G(i),Y(async l=>l),U(l=>{l.fullDataFormatter.gridList[l.secondGridIndex]||(l.fullDataFormatter.gridList[l.secondGridIndex]=Object.assign({},l.fullDataFormatter.gridList[l.firstGridIndex]));let h="";return l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="left"?h="right":l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="bottom"?h="top":l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="top"?h="bottom":l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="right"&&(h="left"),{type:"grid",visibleFilter:l.fullDataFormatter.visibleFilter,grid:{...l.fullDataFormatter.gridList[l.secondGridIndex],valueAxis:{...l.fullDataFormatter.gridList[l.secondGridIndex].valueAxis,position:h}},container:{...l.fullDataFormatter.container}}}));return Yu(r).pipe(G(i),U(l=>({...l,fullParams$:l.fullParams$.pipe(U(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),Y(l=>un(l)),U(l=>l.map((h,f)=>{if(f===0)return h;const p=VR({fullDataFormatter$:u,layout$:r.layout$}),d=ZR({gridAxesTransform$:p}),g=KR({computedData$:h.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...h,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(G(i)).subscribe(l=>{o.forEach(h=>h()),t.selectAll(`g.${ox}`).data(l).join("g").attr("class",ox).each((h,f,p)=>{if(f>1)return;const d=Z(p[f]),g=h.dataFormatter$.pipe(G(i),U(m=>m.grid.separateSeries),it(),Dt(1));o[f]=Pu(Oh,{selection:d,computedData$:h.computedData$,fullParams$:r.fullParams$.pipe(U(m=>f===0?m.firstAxis:m.secondAxis)),fullDataFormatter$:h.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainerPosition$:h.gridContainerPosition$,isSeriesSeprate$:g})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),ax={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},sx={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null},JR=hg("Container",ax)(({selection:t})=>function(){}),Uh="Tooltip",ux=st(Uh,"g"),tI=st(Uh,"box");function eI(t,e){const n=e.textSizePx*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function nI({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],c=i?[o]:[],h=t.selectAll(`g.${ux}`).data(u).join(b=>b.append("g").classed(ux,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${tI}`).data(c).join(b=>b.append("g").classed(st(e,"box"),!0)),f=h.selectAll("rect").data(c).join(b=>b.append("rect").attr("rx",s).attr("ry",s)).attr("fill",b=>b.backgroundColor).attr("stroke",b=>b.strokeColor).attr("opacity",b=>b.backgroundOpacity),p=h.selectAll("g").data(u).join(b=>b.append("g").classed(st(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&kk(p,u[0]);const d=p!=null&&p.node()?h2(p):{width:0,height:0};f.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=h!=null&&h.node()?h2(h):{width:0,height:0},m=n-g.width,y=r-g.height,x=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],v=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${x}, ${v})`),h.attr("transform",b=>`translate(${x}, ${v})`)}const rI=hg(Uh,sx)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new ot,s=o.event$.pipe(G(a),li(g=>g.eventName==="mouseover"||g.eventName==="mousemove")),u=o.event$.pipe(G(a),li(g=>g.eventName==="mouseout")),c=yA(i.fullChartParams$),l=B({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$,textSizePx:c}).pipe(G(a),Y(async g=>g),U(g=>({backgroundColor:Et(g.fullParams.backgroundColorType,g.fullChartParams),backgroundOpacity:g.fullParams.backgroundOpacity,strokeColor:Et(g.fullParams.strokeColorType,g.fullChartParams),offset:g.fullParams.offset,padding:g.fullParams.padding,textSize:g.fullChartParams.styles.textSize,textSizePx:g.textSizePx,textColor:Et(g.fullParams.textColorType,g.fullChartParams)}))),h=B({fullParams:i.fullParams$,tooltipStyle:l}).pipe(G(a),Y(async g=>g),U(g=>g.fullParams.svgRenderFn?g.fullParams.svgRenderFn:m=>{const y=g.fullParams.textRenderFn(m);return eI(y,g.tooltipStyle)})),f=B({event:s,contentRenderFn:h}).pipe(G(a),Y(async g=>g),U(g=>g.contentRenderFn(g.event))),p=u.pipe(G(a),U(g=>"")),d=qu(s,u).pipe(G(a),U(g=>g.event));return B({svgString:qu(f,p),event:d,layout:i.layout$,tooltipStyle:l}).pipe(G(a),Y(async g=>g)).subscribe(g=>{nI({rootSelection:e,pluginName:n,rootWidth:g.layout.rootWidth,rootHeight:g.layout.rootHeight,svgString:g.svgString,tooltipStyle:g.tooltipStyle,event:g.event})}),function(){a.next(void 0)}}),cx={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},lx={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},fx={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+i.reduce((o,a)=>o+(a.value??0),0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},hx={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},px={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function iI(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function s(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function u(p){var g;const d=document.createElement("canvas").getContext("2d");return((g=d==null?void 0:d.measureText(p))==null?void 0:g.width)??0}function c(p){const d=u(p.trim());return Math.sqrt(d*r)}function l(p,d){let g={width:0,text:""},m=1/0;const y=[];let x=" ";i&&(x="");for(let v=0,b=p.length;v<b;++v){const $=(g.text?g.text+x:"")+p[v],_=u($);(m+_)/2<d?(g.width=m=_,g.text=$):(m=u(p[v]),g={width:m,text:p[v]},y.push(g))}return y}function h(p){let d=0;for(let g=0,m=p.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,x=p[g].width/2;d=Math.max(d,Math.sqrt(x**2+y**2))}return d}function f(p,d){o>0&&(d=s(d,o));const g=a(d),m=c(d),y=l(g,m),x=h(y);let v=p.select("text");v.size()||(v=p.append("text")),v.attr("transform",`translate(0,0) scale(${n/x})`);const b=v.selectAll("tspan").data(y),$=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(_,D)=>(D-y.length/2+.8)*r).text(_=>_.text);return b.exit().remove(),b.merge($)}return f(t,e)}let ar;function oI(t,e){return Om().velocityDecay(e.force.velocityDecay).force("collision",Fm().radius(n=>n.r+e.force.collisionSpacing)).force("charge",Um().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function aI({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function sI({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=t.flat().filter(d=>d.value!=null&&d.visible!=!1),u=Math.max(...s.map(d=>d.value)),c=s.reduce((d,g)=>d+(g.value??0),0)/s.length,l=aI({data:s,bubbleGroupR:a,maxValue:u,avgValue:c}),h=o==="area"?.5:1,f=Js().domain([0,u]).range([0,l]).exponent(h);return s.map(d=>{const g=d,m=e.get(d.id);if(m)g.x=m.x,g.y=m.y;else{const x=i.get(g.seriesLabel);g.x=Math.random()*x.width,g.y=Math.random()*x.height}const y=f(g.value??0);return g.r=y,g._originR=y,g})}function dx({graphicSelection:t,bubblesData:e,fullParams:n,sumSeries:r}){const i=t.selectAll("g").data(e,a=>a.id).join(a=>{const s=a.append("g").attr("cursor","pointer").attr("font-size",12).style("fill","#ffffff").attr("text-anchor","middle");return s.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",u=>u.color),s.append("text").style("opacity",.8).attr("pointer-events","none"),s},a=>a,a=>a.remove()).attr("transform",a=>`translate(${a.x},${a.y})`),o=r?"seriesLabel":"label";return i.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),i.each((a,s,u)=>{const c=Z(u[s]);let l=!0;a[o].length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(iI,{text:a[o],radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),i}function uI({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function cI(){return t0().on("start",(t,e)=>{t.active||ar.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||ar.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function gx({fullParams:t,SeriesContainerPositionMap:e}){ar.force("x",Bm().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",Ym().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),ar.alpha(1).restart()}function lI({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Ka).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const fI=Mi("Bubbles",cx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=t.append("g");let a=new Map;const s=n.fullDataFormatter$.pipe(U(f=>f.sumSeries),it()),u=n.fullParams$.pipe(G(i),U(f=>f.bubbleScaleType),it()),c=new ht(f=>{B({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:u}).pipe(G(i),Y(async p=>p)).subscribe(p=>{const d=sI({data:p.visibleComputedLayoutData,LastBubbleDataMap:a,graphicWidth:p.layout.width,graphicHeight:p.layout.height,SeriesContainerPositionMap:p.SeriesContainerPositionMap,scaleType:p.scaleType});f.next(d)})});c.subscribe(f=>{a=new Map(f.map(p=>[p.id,p]))});const l=n.fullChartParams$.pipe(G(i),U(f=>f.highlightTarget),it()),h=B({bubblesData:c,fullParams:n.fullParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:s}).pipe(G(i),Y(async f=>f),U(f=>{const p=dx({graphicSelection:o,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries});return ar=oI(p,f.fullParams),ar.nodes(f.bubblesData),gx({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),p}));return B({bubblesSelection:h,layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(G(i),Y(async f=>f)).subscribe(f=>{f.bubblesSelection.on("mouseover",(p,d)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("click",(p,d)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).call(cI())}),B({bubblesSelection:h,bubblesData:c,highlight:n.seriesHighlight$.pipe(U(f=>f.map(p=>p.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:s,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(G(i),Y(async f=>f)).subscribe(f=>{lI({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams}),f.fullParams.highlightRIncrease&&(uI({data:f.bubblesData,highlightRIncrease:f.fullParams.highlightRIncrease,highlightIds:f.highlight}),dx({graphicSelection:o,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries})),gx({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),ar.nodes(f.bubblesData)}),()=>{i.next(void 0)}});function mx({data:t,startAngle:e,endAngle:n}){return Sv().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function hI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=st(e,"series");return B({seriesLabels:r,separateSeries:n}).pipe(Y(async o=>o),U((o,a)=>{const s=o.separateSeries?o.seriesLabels:[o.seriesLabels.join("")];return t.selectAll(`g.${i}`).data(s,u=>u).join(u=>u.append("g").classed(i,!0),u=>u,u=>u.remove())}),Dt(1))}const Bh=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=hI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a),it((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,u)=>{const c=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${c.centerX}, ${c.centerY})`})}),B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,u)=>{const c=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${c.centerX}, ${c.centerY})`})}),{seriesCenterSelection$:o}},Yh="Pie";function pI({enter:t,exit:e,data:n,lastTweenData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const c=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+c.startAngle*(1-o),endAngle:s.endAngle*o+c.endAngle*(1-o),value:s.value*o+c.value*(1-o)}});return Hh(a,i.startAngle,i.endAngle,1)}:o=>Hh(n,i.startAngle,i.endAngle,o)}function Hh(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function Wh({selection:t,data:e,arc:n,pathClassName:r}){return t.selectAll("path").data(e,o=>o.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(o,a)=>o.data.color).attr("d",(o,a)=>n(o))}function dI({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const u=Z(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(Ka).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}function gI(t,e){const n=new ot,r=st(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(G(n),U(f=>f.width<f.height?f.width:f.height)),s=new ht(f=>{B({containerComputedLayoutData:e.containerComputedLayoutData$,fullParams:e.fullParams$}).pipe(G(n),Y(async p=>p)).subscribe(p=>{const d=mx({data:p.containerComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});f.next(d)})}),u=new ht(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(G(n),Y(async p=>p)).subscribe(p=>{const d=Mu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),c=new ht(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(G(n),Y(async p=>p)).subscribe(p=>{const d=Mu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerMouseoverRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),l=e.fullChartParams$.pipe(G(n),U(f=>f.highlightTarget),it()),h=new ht(f=>{B({pieData:s,arc:u,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:l}).pipe(G(n),Y(async p=>p)).subscribe(p=>{e.containerSelection.interrupt("graphicMove");const d=e.containerSelection.selectAll("path").data(p.pieData,x=>x.id),g=d.enter(),m=d.exit(),y=pI({enter:g,exit:m,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});if(e.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(x,v)=>b=>{o=y(b),Wh({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r})}).on("end",(x,v)=>{o=Hh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const b=Wh({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r});f.next(b),i=Object.assign([],p.pieData),e.event$.next({type:"series",pluginName:t,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}),!g.size()&&d.size()>0){const x=Wh({selection:e.containerSelection,data:p.pieData,arc:p.arc,pathClassName:r});f.next(x)}})});return B({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:l}).pipe(G(n),Y(async f=>f)).subscribe(f=>{f.pathSelection.on("mouseover",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("click",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})})}),B({pathSelection:h,highlight:e.seriesHighlight$.pipe(U(f=>f.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:u,arcMouseover:c}).pipe(G(n),Y(async f=>f)).subscribe(f=>{dI({pathSelection:f.pathSelection,ids:f.highlight,fullChartParams:f.fullChartParams,arc:f.arc,arcMouseover:f.arcMouseover})}),()=>{n.next(void 0)}}const mI=Mi(Yh,lx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,{seriesCenterSelection$:o}=Bh({selection:t,pluginName:Yh,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return r.fullParams$.subscribe(),o.pipe(G(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,c,l)=>{const h=Z(l[c]),f=r.computedLayoutData$.pipe(G(i),U(d=>d[c]??d[0])),p=r.seriesContainerPosition$.pipe(G(i),U(d=>d[c]??d[0]));a[c]=gI(Yh,{containerSelection:h,computedData$:r.computedData$,containerComputedLayoutData$:f,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Tu="PieEventTexts",yx=st(Tu,"text");function qh(t,e){const n=t.selectAll(`text.${yx}`).data(e),r=n.enter().append("text").classed(yx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=Z(s[a]).text(o.text);Object.keys(o.attr).forEach(c=>{u.attr(c,o.attr[c])}),Object.keys(o.style).forEach(c=>{u.style(c,o.style[c])})}),n.exit().remove(),i}function jh({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,u)=>({text:s,attr:i[u],style:o[u]}))}function yI(t,e){const n=new ot;let r;const i=e.fullChartParams$.pipe(G(n),U(o=>o.highlightTarget),it());return B({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(G(n),Y(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>u=>{const c=jh({eventData:{type:"series",pluginName:t,eventName:"transitionMove",event:a,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:u,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});qh(e.containerSelection,c)}).on("end",(a,s)=>{const u=jh({eventData:{type:"series",pluginName:t,eventName:"transitionEnd",event:a,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});qh(e.containerSelection,u),r&&r.unsubscribe(),r=e.event$.subscribe(c=>{const l=jh({eventData:c,eventName:c.eventName,t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});qh(e.containerSelection,l)})})}),()=>{n.next(void 0)}}const bI=Mi(Tu,fx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,{seriesCenterSelection$:o}=Bh({selection:t,pluginName:Tu,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(G(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,c,l)=>{const h=Z(l[c]),f=n.computedLayoutData$.pipe(G(i),U(d=>d[c]??d[0])),p=n.seriesContainerPosition$.pipe(G(i),U(d=>d[c]??d[0]));a[c]=yI(Tu,{containerSelection:h,computedData$:n.computedData$,containerComputedLayoutData$:f,SeriesDataMap$:n.SeriesDataMap$,fullParams$:n.fullParams$,fullChartParams$:n.fullChartParams$,seriesHighlight$:n.seriesHighlight$,seriesContainerPosition$:p,event$:r.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Lu="PieLabels",vI=st(Lu,"text");function xI(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,c]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:c*r}}).filter(i=>i.pieDatum.data.visible)}function _I(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(vI,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",u=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(u=>n.labelFn(u.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(u,c)=>Mh({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function wI({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",s=>"translate("+s.mouseoverX+","+s.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",s=>"translate("+s.x+","+s.y+")")})}function $I(t,e){const n=new ot;let r=new ot,i=[];return B({layout:e.seriesContainerPosition$,containerComputedLayoutData:e.containerComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(G(n),Y(async o=>o)).subscribe(o=>{const a=o.layout.width<o.layout.height?o.layout.width:o.layout.height,s=Mu({axisWidth:a,innerRadius:0,outerRadius:o.fullParams.outerRadius,padAngle:0,cornerRadius:0}),u=Mu({axisWidth:a,innerRadius:0,outerRadius:o.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),c=mx({data:o.containerComputedLayoutData,startAngle:o.fullParams.startAngle,endAngle:o.fullParams.endAngle});i=xI(c,s,u,o.fullParams.labelCentroid);const l=_I(e.containerSelection,i,o.fullParams,o.fullChartParams);r.next(l)}),B({labelSelection:r,highlight:e.seriesHighlight$.pipe(U(o=>o.map(a=>a.id))),fullChartParams:e.fullChartParams$}).pipe(G(n),Y(async o=>o)).subscribe(o=>{wI({labelSelection:o.labelSelection,ids:o.highlight,fullChartParams:o.fullChartParams})}),()=>{n.next(void 0)}}const SI=Mi(Lu,hx)(({selection:t,observer:e,subject:n})=>{const r=new ot,{seriesCenterSelection$:i}=Bh({selection:t,pluginName:Lu,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(G(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,c)=>{const l=Z(c[u]),h=e.computedLayoutData$.pipe(G(r),U(p=>p[u]??p[0])),f=e.seriesContainerPosition$.pipe(G(r),U(p=>p[u]??p[0]));o[u]=$I(Lu,{containerSelection:l,containerComputedLayoutData$:h,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:f,event$:n.event$})})}),()=>{r.next(void 0)}}),bx="SeriesLegend",AI=Mi(bx,px)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.SeriesDataMap$.pipe(G(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Du(bx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),vx={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},xx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},_x="TreeLegend",MI=pg(_x,xx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.CategoryDataMap$.pipe(G(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Du(_x,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),sr="TreeMap",wx=st(sr,"tree"),$x=st(sr,"tile");function DI({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${wx}`).data(e,u=>u.data.id).join("g").attr("class",wx);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,c,l)=>{const h=Z(l[c]);h.selectAll(`rect.${$x}`).data([u],f=>f.data.id).join("rect").attr("id",f=>f.data.id).attr("class",$x).attr("cursor","pointer").attr("width",f=>f.x1-f.x0).attr("height",f=>f.y1-f.y0).attr("fill",f=>f.data.color).attr("data-name",f=>f.data.label).attr("data-category",f=>f.data.categoryLabel).attr("data-value",f=>f.data.value),h.selectAll("g").data([u]).join("g").each((f,p,d)=>{Z(d[p]).selectAll("text").data([f]).join("text").text(m=>m.data.label).attr("dominant-baseline","hanging").attr("x",o).attr("y",o).attr("font-size",r.styles.textSize).each(function(m){const y=Z(this),x=m.data.label.split(/\s+/).reverse();let v,b=[];const $=y.attr("x");let _=y.attr("y"),D=0,T=y.text(null).append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",$).attr("y",_);for(;v=x.pop();)b.push(v),T.text(b.join(" ")),T.node().getComputedTextLength()>m.x1-m.x0-o&&(b.pop(),T.text(b.join(" ")),b=[v],D+=a,T=y.append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",$).attr("y",_).attr("dy",D+"px").text(v))})})}),s}function PI({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.data.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const TI=pg(sr,vx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=B({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(G(i),Y(async u=>u),U(u=>{const c=ky().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Of.ratio(u.fullParams.squarifyRatio)),l=Ws(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=B({selection:Yu(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(G(i),Y(async u=>u),U(u=>DI({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(G(i),U(u=>u.highlightTarget),it());return B({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(G(i),Y(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:sr,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mousemove",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:sr,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mouseout",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:sr,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("click",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:sr,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})})}),B({cellSelection:a,highlight:r.treeHighlight$.pipe(U(u=>u.map(c=>c.id))),fullChartParams:r.fullChartParams$}).pipe(G(i),Y(async u=>u)).subscribe(u=>{PI({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});K.BarStack=cR,K.Bars=eR,K.BarsDiverging=nR,K.BarsTriangle=yR,K.Bubbles=fI,K.CONTAINER_PLUGIN_PARAMS=ax,K.Container=JR,K.DEFAULT_BARS_DIVERGING_PARAMS=Sx,K.DEFAULT_BARS_PARAMS=Io,K.DEFAULT_BARS_TRIANGLE_PARAMS=Qh,K.DEFAULT_BAR_STACK_PARAMS=Kh,K.DEFAULT_BUBBLES_PARAMS=cx,K.DEFAULT_DOTS_PARAMS=Vh,K.DEFAULT_GRID_LEGEND_PARAMS=np,K.DEFAULT_GROUP_AREA_PARAMS=Zh,K.DEFAULT_GROUP_AXIS_PARAMS=Jh,K.DEFAULT_LINES_PARAMS=ur,K.DEFAULT_LINE_AREAS_PARAMS=Xh,K.DEFAULT_MULTI_BARS_PARAMS=B2,K.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=H2,K.DEFAULT_MULTI_BAR_STACK_PARAMS=Y2,K.DEFAULT_MULTI_DOTS_PARAMS=j2,K.DEFAULT_MULTI_GRID_LEGEND_PARAMS=z2,K.DEFAULT_MULTI_GROUP_AXIS_PARAMS=O2,K.DEFAULT_MULTI_LINES_PARAMS=W2,K.DEFAULT_MULTI_LINE_AREAS_PARAMS=q2,K.DEFAULT_MULTI_VALUE_AXIS_PARAMS=U2,K.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=X2,K.DEFAULT_PIE_EVENT_TEXTS_PARAMS=fx,K.DEFAULT_PIE_LABELS_PARAMS=hx,K.DEFAULT_PIE_PARAMS=lx,K.DEFAULT_SCALING_AREA_PARAMS=ep,K.DEFAULT_SERIES_LEGEND_PARAMS=px,K.DEFAULT_TREE_LEGEND_PARAMS=xx,K.DEFAULT_TREE_MAP_PARAMS=vx,K.DEFAULT_VALUE_AXIS_PARAMS=Cu,K.DEFAULT_VALUE_STACK_AXIS_PARAMS=tp,K.Dots=_R,K.GridLegend=$R,K.GroupAux=GR,K.GroupAxis=AR,K.LineAreas=Xk,K.Lines=Uk,K.MultiBarStack=UR,K.MultiBars=OR,K.MultiBarsTriangle=BR,K.MultiDots=WR,K.MultiGridLegend=zR,K.MultiGroupAxis=qR,K.MultiLineAreas=HR,K.MultiLines=YR,K.MultiValueAxis=jR,K.OverlappingValueAxes=QR,K.Pie=mI,K.PieEventTexts=bI,K.PieLabels=SI,K.ScalingArea=LR,K.SeriesLegend=AI,K.TOOLTIP_PARAMS=sx,K.Tooltip=rI,K.TreeLegend=MI,K.TreeMap=TI,K.ValueAxis=DR,K.ValueStackAxis=PR,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
|
15
|
+
`})}function Kk({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function Qk({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1):Z(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const h2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:c,fullParams$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new ot,b=$n(t,"clipPath-box"),$=st(t,"pathG"),_=st(t,"path"),{seriesSelection$:D,axesSelection$:T,defsSelection$:w,graphicGSelection$:P}=ri({selection:e,pluginName:t,clipPathID:b,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p});p.pipe(G(v),U(C=>-C.translate[1]/C.scale[1]));const S=o.pipe(U(C=>C.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),it()),z=B({computedData:n,visibleComputedData:i,params:l,gridAxesSize:d,isSeriesSeprate:y}).pipe(G(v),Y(async C=>C),U(C=>C.params.barWidth?C.params.barWidth:C.isSeriesSeprate?f2({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:1,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}):f2({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:C.visibleComputedData.length,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}))),k=i.pipe(G(v),U(C=>{const N=new Set;return C.forEach(j=>{j.forEach(Q=>{N.add(Q.groupLabel)})}),Array.from(N)})),A=new ht(C=>{B({seriesLabels:s,barWidth:z,params:l}).pipe(G(v),Y(async N=>N)).subscribe(N=>{const j=qk(N.barWidth,N.seriesLabels,N.params);C.next(j)})}),L=h.pipe(G(v),U(C=>C.transitionDuration),it()),M=new ht(C=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async N=>N)).subscribe(N=>{const j=jk(N.groupLabels.length,N.transitionDuration);C.next(j)})}).pipe(G(v),it()),F=new ht(C=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async N=>N)).subscribe(N=>{const j=Xk(N.groupLabels.length,N.transitionDuration);C.next(j)})}).pipe(G(v),it());B({defsSelection:w,gridAxesSize:d}).pipe(G(v),Y(async C=>C)).subscribe(C=>{const N=[{id:b,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];Kk({defsSelection:C.defsSelection,clipPathData:N})});const O=h.pipe(G(v),U(C=>C.highlightTarget),it()),E=s.pipe(G(v),U(C=>C.map((N,j)=>$n(t,`lineargradient-${N}`)))),R=B({graphicGSelection:P,defsSelection:w,computedData:n,visibleComputedLayoutData:o,linearGradientIds:E,zeroYArr:S,groupLabels:k,barScale:A,params:l,chartParams:h,barWidth:z,delayGroup:M,transitionItem:F,isSeriesSeprate:y}).pipe(G(v),Y(async C=>C),U(C=>(Zk({defsSelection:C.defsSelection,computedData:C.computedData,linearGradientIds:C.linearGradientIds,params:C.params}),Vk({graphicGSelection:C.graphicGSelection,pathGClassName:$,pathClassName:_,visibleComputedLayoutData:C.visibleComputedLayoutData,linearGradientIds:C.linearGradientIds,zeroYArr:C.zeroYArr,groupLabels:C.groupLabels,barScale:C.barScale,params:C.params,chartParams:C.chartParams,barWidth:C.barWidth,delayGroup:C.delayGroup,transitionItem:C.transitionItem,isSeriesSeprate:C.isSeriesSeprate}))));return B({barSelection:R,computedData:n,highlightTarget:O,SeriesDataMap:u,GroupDataMap:c}).subscribe(C=>{C.barSelection.on("mouseover",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})}).on("mousemove",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})}).on("mouseout",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})}).on("click",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})})}),B({barSelection:R,highlight:g.pipe(U(C=>C.map(N=>N.id))),fullChartParams:h}).pipe(G(v),Y(async C=>C)).subscribe(C=>{Qk({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{v.next(void 0)}},p2="BarsTriangle",Jk=se(p2,Zh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=r.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),St(1)),a=h2(p2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,fullDataFormatter$:r.fullDataFormatter$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:o,event$:n.event$});return()=>{i.next(void 0),a()}});function tR({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=l=>{const h=l.size();return o.transitionDuration/h};let u=0;return t.each((l,h,f)=>{Z(f[h]).selectAll("g").data(r[h],p=>p.id).join(p=>(u=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,g)=>{Z(g[d]).selectAll("circle").data([p]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,x)=>d*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>Sh({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Sh({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),t.selectAll(`circle.${n}`)}function eR({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1).transition("highlight").duration(200):Z(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function nR({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const d2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullChartParams$:l,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new ot,v=$n(t,"clipPath-box"),b=st(t,"circleG"),$=st(t,"circle"),{seriesSelection$:_,axesSelection$:D,defsSelection$:T,graphicGSelection$:w}=ri({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),P=B({computedData:n,gridGraphicReverseScale:p}).pipe(G(x),Y(async A=>A),U(A=>A.computedData.map((L,M)=>A.gridGraphicReverseScale[M])));B({defsSelection:T,gridAxesSize:d}).pipe(G(x),Y(async A=>A)).subscribe(A=>{const L=[{id:v,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];nR({defsSelection:A.defsSelection,clipPathData:L})});const S=l.pipe(G(x),U(A=>A.highlightTarget),it()),z=B({graphicGSelection:w,visibleComputedLayoutData:o,graphicReverseScale:P,fullChartParams:l,fullParams:c}).pipe(G(x),Y(async A=>A),U(A=>tR({graphicGSelection:A.graphicGSelection,circleGClassName:b,circleClassName:$,visibleComputedLayoutData:A.visibleComputedLayoutData,fullParams:A.fullParams,fullChartParams:A.fullChartParams,graphicReverseScale:A.graphicReverseScale})));B({graphicSelection:z,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:S}).pipe(G(x),Y(async A=>A)).subscribe(A=>{A.graphicSelection.on("mouseover",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L,data:A.computedData})}).on("mousemove",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,data:A.computedData,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L})}).on("mouseout",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L,data:A.computedData})}).on("click",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L,data:A.computedData})})});const k=c.pipe(G(x),U(A=>A.onlyShowHighlighted),it());return l.pipe(G(x),Y(A=>B({graphicSelection:z,highlight:g.pipe(U(L=>L.map(M=>M.id))),onlyShowHighlighted:k,fullChartParams:l}).pipe(G(x),Y(async L=>L)))).subscribe(A=>{eR({selection:A.graphicSelection,ids:A.highlight,onlyShowHighlighted:A.onlyShowHighlighted,fullChartParams:A.fullChartParams})}),()=>{x.next(void 0)}},g2="Dots",rR=se(g2,jh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=d2(g2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,event$:n.event$});return()=>{i.next(void 0),o()}}),iR={listRectWidth:14,listRectHeight:14,listRectRadius:0};function m2(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}const Au=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=st(t,"root-position"),u=st(t,"legend-card"),c=st(t,"legend-list"),l=st(t,"legend-item"),h=new ot,f=B({seriesLabels:n,fullChartParams:o}).pipe(G(h),Y(async w=>w),U(w=>{const P=new Map;let S=0;return w.seriesLabels.forEach((z,k)=>{if(!P.has(z)){const A=m2(S,w.fullChartParams);P.set(z,A),S++}}),P})),p=n.pipe(G(h),U(w=>{const P=new Set;let S=[];return w.forEach(z=>{P.has(z)?S.push(!1):S.push(!0),P.add(z)}),S})),d=r.pipe(G(h),U(w=>w.position==="bottom"||w.position==="top"?"row":"column")),g=B({fullParams:r,layout:i}).pipe(G(h),Y(async w=>w),U(w=>{const P=w.fullParams.padding*2+w.fullParams.gap*2;return w.fullParams.position==="bottom"||w.fullParams.position==="top"?w.layout.rootWidth-P:w.layout.rootHeight-P})),y=B({layout:i,fullParams:r}).pipe(G(h),Y(async w=>w),U(w=>{let P=0,S=0;return w.fullParams.position==="bottom"?(S=w.layout.rootHeight,w.fullParams.justify==="start"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="right"?(P=w.layout.rootWidth,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)):w.fullParams.position==="top"?(S=0,w.fullParams.justify==="start"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="left"&&(P=0,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)),{x:P,y:S}})).pipe(G(h),U(w=>e.selectAll(`g.${s}`).data([w]).join(P=>P.append("g").classed(s,!0).attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.transition().attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.remove()))),x=r.pipe(G(h),U(w=>w.seriesList[0]?w.seriesList[0]:iR)),v=B({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:g,defaultListStyle:x,SeriesLabelColorMap:f,textSizePx:a}).pipe(G(h),Y(async w=>w),U(w=>w.seriesLabels.reduce((P,S,z)=>{if(!w.visibleList[z])return P;const k=Qv(S,w.textSizePx),A=w.textSizePx*1.5+k,L=w.SeriesLabelColorMap.get(S),M=P[0]&&P[0][0]?P[P.length-1][P[P.length-1].length-1]:null,{translateX:F,translateY:O,lineIndex:E,itemIndex:R}=((N,j,Q)=>{let I=0,X=0,q=0,V=0;if(N.lineDirection==="column"){let W=Q?Q.translateY+N.textSizePx+N.fullParams.gap:0;if(W+N.textSizePx>N.lineMaxSize){q=Q.lineIndex+1,V=0,X=0;const et=j[j.length-1].reduce((ut,H)=>H.itemWidth>ut?H.itemWidth:ut,0);I=Q.translateX+et+N.fullParams.gap}else q=Q?Q.lineIndex:0,V=Q?Q.itemIndex+1:0,X=W,I=Q?Q.translateX:0}else{let W=Q?Q.translateX+Q.itemWidth+N.fullParams.gap:0;W+A>N.lineMaxSize?(q=Q.lineIndex+1,V=0,I=0):(q=Q?Q.lineIndex:0,V=Q?Q.itemIndex+1:0,I=W),X=(N.textSizePx+N.fullParams.gap)*q}return{translateX:I,translateY:X,lineIndex:q,itemIndex:V}})(w,P,M);P[E]||(P[E]=[]);const C=w.fullParams.seriesList[R]?w.fullParams.seriesList[R]:w.defaultListStyle;return P[E].push({id:S,seriesLabel:S,seriesIndex:z,lineIndex:E,itemIndex:R,text:S,itemWidth:A,translateX:F,translateY:O,color:L,listRectWidth:C.listRectWidth,listRectHeight:C.listRectHeight,listRectRadius:C.listRectRadius}),P},[])),St(1)),b=B({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v,textSizePx:a}).pipe(G(h),Y(async w=>w),U(w=>{const{width:P,height:S}=((z,k)=>{let A=0,L=0;if(!k.length||!k[0].length)return{width:A,height:L};const M=k[0][k[0].length-1];return z.lineDirection==="column"?(A=k.reduce((F,O)=>{const E=O.reduce((R,C)=>C.itemWidth>R?C.itemWidth:R,0);return F+E},0),A+=z.fullParams.gap*(k.length-1),L=M.translateY+z.textSizePx):(A=M.translateX+M.itemWidth,L=z.textSizePx*k.length+z.fullParams.gap*(k.length-1)),{width:A,height:L}})(w,w.lengendItems);return{direction:w.lineDirection,width:P,height:S,translateX:w.fullParams.gap,translateY:w.fullParams.gap}}),St(1)),$=B({fullParams:r,lengendList:b}).pipe(G(h),Y(async w=>w),U(w=>{const P=w.lengendList.width+w.fullParams.gap*2,S=w.lengendList.height+w.fullParams.gap*2;let z=0,k=0;return w.fullParams.position==="left"?w.fullParams.justify==="start"?(z=w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="center"?(z=w.fullParams.padding,k=-S/2):w.fullParams.justify==="end"&&(z=w.fullParams.padding,k=-S-w.fullParams.padding):w.fullParams.position==="right"?w.fullParams.justify==="start"?(z=-P-w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="center"?(z=-P-w.fullParams.padding,k=-S/2):w.fullParams.justify==="end"&&(z=-P-w.fullParams.padding,k=-S-w.fullParams.padding):w.fullParams.position==="top"?w.fullParams.justify==="start"?(z=w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="center"?(z=-P/2,k=w.fullParams.padding):w.fullParams.justify==="end"&&(z=-P-w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="start"?(z=w.fullParams.padding,k=-S-w.fullParams.padding):w.fullParams.justify==="center"?(z=-P/2,k=-S-w.fullParams.padding):w.fullParams.justify==="end"&&(z=-P-w.fullParams.padding,k=-S-w.fullParams.padding),{width:P,height:S,translateX:z,translateY:k}})),_=B({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:$}).pipe(G(h),Y(async w=>w),U(w=>w.rootPositionSelection.selectAll("g").data([w.legendCard]).join(P=>P.append("g").classed(u,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove()).each((P,S,z)=>{Z(z[S]).selectAll("rect").data([P]).join("rect").attr("width",k=>k.width).attr("height",k=>k.height).attr("fill",Ct(w.fullParams.backgroundFill,w.fullChartParams)).attr("stroke",Ct(w.fullParams.backgroundStroke,w.fullChartParams))}))),D=B({lengendCardSelection:_,fullParams:r,lengendList:b}).pipe(G(h),Y(async w=>w),U(w=>w.lengendCardSelection.selectAll("g").data([w.lengendList]).join(P=>P.append("g").classed(c,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove())));return B({lengendListSelection:D,fullParams:r,fullChartParams:o,lengendItems:v,textSizePx:a}).pipe(G(h),Y(async w=>w),U(w=>{const P=w.lengendItems[0]?w.lengendItems.flat():[];return w.lengendListSelection.selectAll(`g.${l}`).data(P).join(S=>S.append("g").classed(l,!0).attr("cursor","default"),S=>S,S=>S.remove()).attr("transform",(S,z)=>`translate(${S.translateX}, ${S.translateY})`).each((S,z,k)=>{const A=w.textSizePx/2,L=-S.listRectWidth/2,M=-S.listRectHeight/2;Z(k[z]).selectAll("rect").data([S]).join("rect").attr("x",A).attr("y",A).attr("width",F=>F.listRectWidth).attr("height",F=>F.listRectHeight).attr("transform",F=>`translate(${L}, ${M})`).attr("fill",F=>F.color).attr("rx",F=>F.listRectRadius),Z(k[z]).selectAll("text").data([S]).join(F=>F.append("text").attr("dominant-baseline","hanging"),F=>F,F=>F.remove()).attr("x",w.textSizePx*1.5).attr("font-size",w.fullChartParams.styles.textSize).attr("fill",F=>w.fullParams.textColorType==="series"?m2(F.seriesIndex,w.fullChartParams):Ct(w.fullParams.textColorType,w.fullChartParams)).text(F=>F.text)})})).subscribe(),()=>{h.next(void 0)}},y2="GridLegend",oR=se(y2,tp)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.SeriesDataMap$.pipe(G(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Au(y2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Dh=6;function aR({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:c,textTransform:l}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((d,g,m)=>{Z(m[g]).selectAll("text").data([d]).join(y=>y.append("text").style("font-weight","bold"),y=>y,y=>y.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Ct(r.labelColorType,u)).style("transform",l).text(y=>s.grid.groupAxis.label)}).attr("transform",d=>`translate(${a.width+d.tickPadding+r.labelOffset[0]}, ${-d.tickPadding-Dh-r.labelOffset[1]})`);const f=Mg(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:Dh).tickSizeOuter(0).tickFormat(d=>$h(d,r.tickFormat)).tickPadding(r.tickPadding),p=h.transition().duration(100).call(f);return p.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Dh}`).style("transform",l),h}const b2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:c,isSeriesSeprate$:l})=>{const h=new ot,f=st(t,"container"),p=st(t,"xAxisG"),d=st(t,"xAxis"),g=st(t,"groupingLabel"),m=B({computedData:n.pipe(it((_,D)=>_.length===D.length)),isSeriesSeprate:l}).pipe(G(h),Y(async _=>_),U(_=>_.isSeriesSeprate?_.computedData:[_.computedData[0]]),U((_,D)=>e.selectAll(`g.${f}`).data(_,T=>T[0]?T[0].seriesIndex:D).join("g").classed(f,!0))),y=m.pipe(G(h),U((_,D)=>_.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:c}).pipe(G(h),Y(async _=>_)).subscribe(_=>{_.containerSelection.attr("transform",(D,T)=>{const w=_.gridContainerPosition[T]??_.gridContainerPosition[0],P=w.translate,S=w.scale;return`translate(${P[0]}, ${P[1]}) scale(${S[0]}, ${S[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(G(h),Y(async _=>_)).subscribe(_=>{_.axisSelection.style("transform",_.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:c}).pipe(G(h),Y(async _=>_),U(_=>{const D=`translate(${_.gridAxesReverseTransform.translate[0]}px, ${_.gridAxesReverseTransform.translate[1]}px)`,T=`rotate(${_.gridAxesReverseTransform.rotate}deg) rotateX(${_.gridAxesReverseTransform.rotateX}deg) rotateY(${_.gridAxesReverseTransform.rotateY}deg)`,w=`scale(${1/_.gridContainerPosition[0].scale[0]}, ${1/_.gridContainerPosition[0].scale[1]})`,S=`rotate(${_.fullDataFormatter.grid.groupAxis.position==="left"&&_.fullDataFormatter.grid.valueAxis.position==="top"||_.fullDataFormatter.grid.groupAxis.position==="right"&&_.fullDataFormatter.grid.valueAxis.position==="bottom"?_.fullParams.tickTextRotate+180:_.fullParams.tickTextRotate}deg)`;return`${D} ${T} ${w} ${S}`}),it()),v=new ht(_=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),Y(async D=>D)).subscribe(D=>{const w=D.computedData[0]?D.computedData[0].length-1:0,P=D.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-D.fullDataFormatter.grid.groupAxis.scalePadding:D.fullDataFormatter.grid.groupAxis.scaleDomain[0]-D.fullDataFormatter.grid.groupAxis.scalePadding,S=D.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?w+D.fullDataFormatter.grid.groupAxis.scalePadding:D.fullDataFormatter.grid.groupAxis.scaleDomain[1]+D.fullDataFormatter.grid.groupAxis.scalePadding,z=D.computedData[0]?D.computedData[0].length:0;let k=(D.computedData[0]??[]).map(F=>F.groupLabel);const A=new Array(z).fill(0).map((F,O)=>k[O]!=null?k[O]:String(O)).filter((F,O)=>O>=P&&O<=S),L=D.fullDataFormatter.grid.groupAxis.scalePadding,M=Zd({axisLabels:A,axisWidth:D.gridAxesSize.width,padding:L});_.next(M)})}),b=B({fullDataFormatter:i,fullParams:r}).pipe(G(h),Y(async _=>_),U(_=>{let D="middle",T="hanging";return _.fullDataFormatter.grid.groupAxis.position==="bottom"?(D=_.fullParams.tickTextRotate?"end":"middle",T="hanging"):_.fullDataFormatter.grid.groupAxis.position==="top"?(D=_.fullParams.tickTextRotate?"end":"middle",T="auto"):_.fullDataFormatter.grid.groupAxis.position==="left"?(D="end",T="middle"):_.fullDataFormatter.grid.groupAxis.position==="right"&&(D="start",T="middle"),{textAnchor:D,dominantBaseline:T}})),$=i.pipe(G(h),U(_=>{let D="start",T="hanging";return _.grid.groupAxis.position==="bottom"?T="hanging":_.grid.groupAxis.position==="top"?T="auto":_.grid.groupAxis.position==="left"?D="end":_.grid.groupAxis.position==="right"&&(D="start"),_.grid.valueAxis.position==="left"?D="start":_.grid.valueAxis.position==="right"?D="end":_.grid.valueAxis.position==="bottom"?T="auto":_.grid.valueAxis.position==="top"&&(T="hanging"),{textAnchor:D,dominantBaseline:T}}));return B({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:$,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:v,textTransform:x}).pipe(G(h),Y(async _=>_)).subscribe(_=>{aR({selection:_.axisSelection,xAxisClassName:d,groupingLabelClassName:g,params:_.params,tickTextAlign:_.tickTextAlign,axisLabelAlign:_.axisLabelAlign,gridAxesSize:_.gridAxesSize,fullDataFormatter:_.fullDataFormatter,chartParams:_.chartParams,groupScale:_.groupScale,textTransform:_.textTransform})}),()=>{h.next(void 0)}},v2="GroupAxis",sR=se(v2,Kh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=n.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),St(1)),a=b2(v2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:o});return()=>{i.next(void 0),a()}}),x2=6;function uR({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:c,textTransform:l,minAndMax:h}){const f=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,x,v)=>{Z(v[x]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Ct(r.labelColorType,u)).style("transform",l).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const p=h[1]-h[0],d=Dg(c).scale(c).ticks(p>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(p)).tickFormat(y=>$h(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:x2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(d);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),f.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+x2} 0`).style("transform",l),f}const Mu=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:c,isSeriesSeprate$:l})=>{const h=new ot,f=st(t,"container"),p=st(t,"yAxisG"),d=st(t,"yAxis"),g=st(t,"text"),m=B({computedData:n.pipe(it((D,T)=>D.length===T.length)),isSeriesSeprate:l}).pipe(G(h),Y(async D=>D),U(D=>D.isSeriesSeprate?D.computedData:[D.computedData[0]]),U((D,T)=>e.selectAll(`g.${f}`).data(D,w=>w[0]?w[0].seriesIndex:T).join("g").classed(f,!0))),y=m.pipe(G(h),U((D,T)=>D.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:c}).pipe(G(h),Y(async D=>D)).subscribe(D=>{D.containerSelection.attr("transform",(T,w)=>{const P=D.gridContainerPosition[w]??D.gridContainerPosition[0],S=P.translate,z=P.scale;return`translate(${S[0]}, ${S[1]}) scale(${z[0]}, ${z[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(G(h),Y(async D=>D)).subscribe(D=>{D.axisSelection.style("transform",D.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:c}).pipe(G(h),Y(async D=>D),U(D=>{const T=`translate(${D.gridAxesReverseTransform.translate[0]}px, ${D.gridAxesReverseTransform.translate[1]}px)`,w=`rotate(${D.gridAxesReverseTransform.rotate}deg) rotateX(${D.gridAxesReverseTransform.rotateX}deg) rotateY(${D.gridAxesReverseTransform.rotateY}deg)`,P=`scale(${1/D.gridContainerPosition[0].scale[0]}, ${1/D.gridContainerPosition[0].scale[1]})`,z=`rotate(${D.fullDataFormatter.grid.groupAxis.position==="left"&&D.fullDataFormatter.grid.valueAxis.position==="top"||D.fullDataFormatter.grid.groupAxis.position==="right"&&D.fullDataFormatter.grid.valueAxis.position==="bottom"?D.fullParams.tickTextRotate+180:D.fullParams.tickTextRotate}deg)`;return`${T} ${w} ${P} ${z}`}),it()),v=new ht(D=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),Y(async T=>T)).subscribe(T=>{const P=T.computedData[0]?T.computedData[0].length-1:0,S=T.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-T.fullDataFormatter.grid.groupAxis.scalePadding:T.fullDataFormatter.grid.groupAxis.scaleDomain[0]-T.fullDataFormatter.grid.groupAxis.scalePadding,z=T.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+T.fullDataFormatter.grid.groupAxis.scalePadding:T.fullDataFormatter.grid.groupAxis.scaleDomain[1]+T.fullDataFormatter.grid.groupAxis.scalePadding,k=T.computedData.map((L,M)=>L.filter((F,O)=>O>=S&&O<=z)),A=yk(k.flat());D.next(A)})}),b=new ht(D=>{B({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(G(h),Y(async T=>T)).subscribe(T=>{const w=Vd({maxValue:T.minAndMax[1],minValue:T.minAndMax[0],axisWidth:T.gridAxesSize.height,scaleDomain:T.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:T.fullDataFormatter.grid.valueAxis.scaleRange});D.next(w)})}),$=i.pipe(G(h),U(D=>{let T="start",w="hanging";return D.grid.valueAxis.position==="left"?(T="end",w="middle"):D.grid.valueAxis.position==="right"?(T="start",w="middle"):D.grid.valueAxis.position==="bottom"?(T="middle",w="hanging"):D.grid.valueAxis.position==="top"&&(T="middle",w="auto"),{textAnchor:T,dominantBaseline:w}})),_=i.pipe(G(h),U(D=>{let T="start",w="hanging";return D.grid.groupAxis.position==="bottom"?w="auto":D.grid.groupAxis.position==="top"?w="hanging":D.grid.groupAxis.position==="left"?T="start":D.grid.groupAxis.position==="right"&&(T="end"),D.grid.valueAxis.position==="left"?T="end":D.grid.valueAxis.position==="right"?T="start":D.grid.valueAxis.position==="bottom"?w="hanging":D.grid.valueAxis.position==="top"&&(w="auto"),{textAnchor:T,dominantBaseline:w}}));return B({axisSelection:y,fullParams:r,tickTextAlign:$,axisLabelAlign:_,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:x,minAndMax:v}).pipe(G(h),Y(async D=>D)).subscribe(D=>{uR({selection:D.axisSelection,yAxisClassName:d,textClassName:g,fullParams:D.fullParams,tickTextAlign:D.tickTextAlign,axisLabelAlign:D.axisLabelAlign,gridAxesSize:D.gridAxesSize,fullDataFormatter:D.fullDataFormatter,fullChartParams:D.fullChartParams,valueScale:D.valueScale,textTransform:D.textTransform,minAndMax:D.minAndMax})}),()=>{h.next(void 0)}},_2="ValueAxis",cR=se(_2,Tu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=n.fullDataFormatter$.pipe(G(i),U(s=>s.grid.separateSeries),it(),St(1)),a=Mu(_2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:o});return()=>{i.next(void 0),a()}}),w2="ValueStackAxis",lR=se(w2,Qh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=n.computedData$.pipe(G(i),U(u=>{const c=new Array(u[0]?u[0].length:0).fill(null).map((h,f)=>u.reduce((p,d)=>{if(d&&d[f]){const g=d[f].value==null||d[f].visible==!1?0:d[f].value;return p+g}return p},0));return u.map((h,f)=>h.map((p,d)=>({...p,value:c[d]})))})),a=n.fullDataFormatter$.pipe(G(i),U(u=>u.grid.separateSeries),it(),St(1)),s=Mu(w2,{selection:t,computedData$:a.pipe(Y(u=>Pp(()=>u,n.computedData$,o))),fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:a});return()=>{i.next(void 0),s()}}),$2="ScalingArea",fR=st($2,"rect"),hR=se($2,Jh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new ot,a=e.insert("rect","g").classed(fR,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(G(o)).subscribe(c=>{a.attr("width",c.width).attr("height",c.height).attr("x",c.left).attr("y",c.top)});const u=r.computedData$.pipe(U(c=>c[0]?c[0].length-1:0),it());return B({initGroupAxis:r.fullDataFormatter$.pipe(U(c=>c.grid.groupAxis),l_()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(G(o),Y(async c=>c)).subscribe(c=>{const h=c.groupMaxIndex,f=c.initGroupAxis.scaleDomain[0]==="auto"?0-c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,p=c.initGroupAxis.scaleDomain[1]==="auto"?h+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding,g=Vd({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,p],scaleRange:[0,1]}).copy(),m=Zv().on("zoom",function(x){const v=x.transform,b=D=>{const T=Math.round(D);return Math.min(h,Math.max(0,T))},$=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?v.rescaleX(g).domain().map(b):v.rescaleY(g).domain().map(b);$[0]<=0&&$[1]>=h?v.k<s.k&&(v.k=s.k,v.x=s.x,v.y=s.y):$[1]-$[0]<=1&&v.k>s.k&&(v.k=s.k,v.x=s.x,v.y=s.y),s.k=v.k,s.x=v.x,s.y=v.y;const _={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:$}}};i.dataFormatter$.next(_)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function pR(t,e){let n=new ht(()=>{});return t.each(function(){const r=Yu(this,e);n=Hu(n,r)}),n}const Ph="GroupAux",Th=st(Ph,"label-box");function dR({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function gR({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=st(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Ct(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),a.transition().duration(50).attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),u}function mR(t){t.selectAll("line").data([]).exit().remove()}function yR({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:$h(t,n.labelTextFormat)}]:[]}function bR({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i,textSizePx:o}){const a=o+4,s=t.selectAll(`g.${Th}`).data(e),u=s.enter().append("g").classed(Th,!0).style("cursor","pointer"),c=u.merge(s);return u.attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.transition().duration(50).attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.exit().remove(),c.each((l,h,f)=>{const p=Qv(l.text,o)+12,d=-p/2,g=Z(f[h]).selectAll("rect").data([l]),m=g.enter().append("rect").attr("height",`${a}px`).attr("fill",v=>Ct(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");g.merge(m).attr("width",v=>`${p}px`).style("transform",i),g.exit().remove();const y=Z(f[h]).selectAll("text").data([l]),x=y.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");y.merge(x).text(v=>v.text).style("transform",i).attr("fill",v=>Ct(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),y.exit().remove()}),c}function vR(t){t.selectAll(`g.${Th}`).data([]).exit().remove()}const xR=se(Ph,Xh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new ot,a=e.insert("rect","g").classed(st(Ph,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(G(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(G(o),U(f=>f.value),it()).subscribe(f=>{s.style("transform",f)});const u=new ht(f=>{B({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(G(o),Y(async p=>p)).subscribe(p=>{const g=p.computedData[0]?p.computedData[0].length-1:0,m=p.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-p.fullDataFormatter.grid.groupAxis.scalePadding:p.fullDataFormatter.grid.groupAxis.scaleDomain[0]-p.fullDataFormatter.grid.groupAxis.scalePadding,y=p.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?g+p.fullDataFormatter.grid.groupAxis.scalePadding:p.fullDataFormatter.grid.groupAxis.scaleDomain[1]+p.fullDataFormatter.grid.groupAxis.scalePadding,x=p.computedData[0]?p.computedData[0].length:0;let v=p.fullDataFormatter.grid.seriesDirection==="row"?(p.computedData[0]??[]).map(D=>D.groupLabel):p.computedData.map(D=>D[0].groupLabel);const b=new Array(x).fill(0).map((D,T)=>v[T]!=null?v[T]:String(T)).filter((D,T)=>T>=m&&T<=y),$=p.fullDataFormatter.grid.groupAxis.scalePadding,_=Zd({axisLabels:b,axisWidth:p.gridAxesSize.width,padding:$});f.next(_)})}),c=Ah({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(G(o),U(f=>f.highlightTarget),it());return B({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,groupScale:u}).pipe(G(o),Y(async f=>f)).subscribe(f=>{e.on("mouseover",(p,d)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:f.computedData})}).on("click",(p,d)=>{p.stopPropagation();const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:f.computedData})})}),B({event:r.event$.pipe(ai(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,textSizePx:i.textSizePx$}).pipe(G(o),Y(async f=>f)).subscribe(f=>{const p=f.groupScale(f.event.groupLabel)??0,d=dR({groupLabel:f.event.groupLabel,axisX:p,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});gR({selection:s,pluginName:n,lineData:d,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=yR({groupLabel:f.event.groupLabel,axisX:p,fullParams:f.fullParams});bR({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value,textSizePx:f.textSizePx}).on("mouseover",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})})}),pR(a,"mouseout").pipe(G(o)).subscribe(f=>{console.log("rootMouseout"),mR(s),vR(s)}),()=>{o.next(void 0),a.remove()}}),S2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},A2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},M2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},D2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},P2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},T2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},L2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},C2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},E2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},k2={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},R2="MultiGridLegend",_R=ke(R2,S2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.multiGridEachDetail$.pipe(G(i),U(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(U(p=>Array.from(p.keys()))))),Y(c=>B(c)),U(c=>c.flat())),a=B({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(G(i),Y(async c=>c),U(c=>c.computedData.map((l,h)=>{const f=fc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(p=>f)}).flat())),s=B({fullParams:n.fullParams$,seriesList:a}).pipe(G(i),Y(async c=>c),U(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Au(R2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),sn=t=>{const e=t.fullParams$.pipe(U(n=>n.gridIndexes),it(),St(1));return B({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(U(n=>n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Lh="MultiBars",I2=st(Lh,"grid"),wR=ke(Lh,D2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return sn(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${I2}`).data(s).join("g").attr("class",I2).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),St(1));o[c]=Mh(Lh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ch="MultiBarStack",N2=st(Ch,"grid"),$R=ke(Ch,P2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return sn(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${N2}`).data(s).join("g").attr("class",N2).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),St(1));o[c]=u2(Ch,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Eh="MultiBarsTriangle",F2=st(Eh,"grid"),SR=ke(Eh,T2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return sn(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${F2}`).data(s).join("g").attr("class",F2).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),St(1));o[c]=h2(Eh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,fullDataFormatter$:u.dataFormatter$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),kh="MultiLines",G2=st(kh,"grid"),AR=ke(kh,L2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return sn(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${G2}`).data(s).join("g").attr("class",G2).each((u,c,l)=>{const h=Z(l[c]);o[c]=Jv(kh,{selection:h,computedData$:u.computedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedData$:u.visibleComputedData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Rh="MultiLineAreas",z2=st(Rh,"grid"),MR=ke(Rh,C2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return sn(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${z2}`).data(s).join("g").attr("class",z2).each((u,c,l)=>{const h=Z(l[c]);o[c]=e2(Rh,{selection:h,computedData$:u.computedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedData$:u.visibleComputedData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ih="MultiDots",O2=st(Ih,"grid"),DR=ke(Ih,E2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return sn(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${O2}`).data(s).join("g").attr("class",O2).each((u,c,l)=>{const h=Z(l[c]);o[c]=d2(Ih,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Nh="MultiGroupAxis",U2=st(Nh,"grid"),PR=ke(Nh,A2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return sn(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${U2}`).data(s).join("g").attr("class",U2).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),St(1));o[c]=b2(Nh,{selection:h,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Fh="MultiValueAxis",B2=st(Fh,"grid"),TR=ke(Fh,M2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return sn(r).pipe(G(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${B2}`).data(s).join("g").attr("class",B2).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(G(i),U(p=>p.grid.separateSeries),it(),St(1));o[c]=Mu(Fh,{selection:h,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function LR(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function Y2(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:LR(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,c=Math.floor(s/o),l=(t.width-r*(o-1))/o,h=(t.height-r*(i-1))/i,f=u*l+u*r,p=c*h+c*r,d=[f,p],g=[l/t.width,h/t.height];return{slotIndex:s,rowIndex:c,columnIndex:u,translate:d,scale:g}})}const CR=({fullDataFormatter$:t,layout$:e})=>{const n=new ot;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,c=0,l=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,c=s):o.position==="right"?(h=180,f=180,u=a,c=s):(h=180,c=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,c=s)):i.position==="left"?o.position==="bottom"?(l=-90,c=s):o.position==="top"?(l=-90,f=180):(h=180,c=s):i.position==="right"&&(o.position==="bottom"?(l=-90,h=180,c=s,u=a):o.position==="top"?(l=-90,h=180,f=180,u=a):(h=180,c=s)),{translate:[u,c],scale:[1,1],rotate:l,rotateX:h,rotateY:f,value:`translate(${u}px, ${c}px) rotate(${l}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new ht(i=>(B({fullDataFormatter:t,layout:e}).pipe(G(n),Y(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},ER=({gridAxesTransform$:t})=>t.pipe(U(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),kR=({computedData$:t,fullDataFormatter$:e,layout$:n})=>B({computedData:t,fullDataFormatter:e,layout:n}).pipe(Y(async i=>i),U(i=>i.fullDataFormatter.grid.separateSeries?Y2(i.layout,i.fullDataFormatter.container,i.computedData.length):Y2(i.layout,i.fullDataFormatter.container,1))),Gh="OverlappingValueAxes",H2=st(Gh,"grid"),RR=ke(Gh,k2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[],a=r.fullParams$.pipe(G(i),U(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(G(i),U(l=>l.gridIndexes[1])),u=B({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(G(i),Y(async l=>l),U(l=>{l.fullDataFormatter.gridList[l.secondGridIndex]||(l.fullDataFormatter.gridList[l.secondGridIndex]=Object.assign({},l.fullDataFormatter.gridList[l.firstGridIndex]));let h="";return l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="left"?h="right":l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="bottom"?h="top":l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="top"?h="bottom":l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="right"&&(h="left"),{type:"grid",visibleFilter:l.fullDataFormatter.visibleFilter,grid:{...l.fullDataFormatter.gridList[l.secondGridIndex],valueAxis:{...l.fullDataFormatter.gridList[l.secondGridIndex].valueAxis,position:h}},container:{...l.fullDataFormatter.container}}}));return Uu(r).pipe(G(i),U(l=>({...l,fullParams$:l.fullParams$.pipe(U(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),Y(l=>sn(l)),U(l=>l.map((h,f)=>{if(f===0)return h;const p=CR({fullDataFormatter$:u,layout$:r.layout$}),d=ER({gridAxesTransform$:p}),g=kR({computedData$:h.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...h,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(G(i)).subscribe(l=>{o.forEach(h=>h()),t.selectAll(`g.${H2}`).data(l).join("g").attr("class",H2).each((h,f,p)=>{if(f>1)return;const d=Z(p[f]),g=h.dataFormatter$.pipe(G(i),U(m=>m.grid.separateSeries),it(),St(1));o[f]=Mu(Gh,{selection:d,computedData$:h.computedData$,fullParams$:r.fullParams$.pipe(U(m=>f===0?m.firstAxis:m.secondAxis)),fullDataFormatter$:h.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainerPosition$:h.gridContainerPosition$,isSeriesSeprate$:g})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),W2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},q2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null},IR=Kd("Container",W2)(({selection:t})=>function(){}),zh="Tooltip",j2=st(zh,"g"),NR=st(zh,"box");function FR(t,e){const n=e.textSizePx*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function GR({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],c=i?[o]:[],h=t.selectAll(`g.${j2}`).data(u).join(b=>b.append("g").classed(j2,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${NR}`).data(c).join(b=>b.append("g").classed(st(e,"box"),!0)),f=h.selectAll("rect").data(c).join(b=>b.append("rect").attr("rx",s).attr("ry",s)).attr("fill",b=>b.backgroundColor).attr("stroke",b=>b.strokeColor).attr("opacity",b=>b.backgroundOpacity),p=h.selectAll("g").data(u).join(b=>b.append("g").classed(st(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&gk(p,u[0]);const d=p!=null&&p.node()?Kv(p):{width:0,height:0};f.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=h!=null&&h.node()?Kv(h):{width:0,height:0},m=n-g.width,y=r-g.height,x=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],v=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${x}, ${v})`),h.attr("transform",b=>`translate(${x}, ${v})`)}const zR=Kd(zh,q2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new ot,s=o.event$.pipe(G(a),ai(g=>g.eventName==="mouseover"||g.eventName==="mousemove")),u=o.event$.pipe(G(a),ai(g=>g.eventName==="mouseout")),c=J3(i.fullChartParams$),l=B({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$,textSizePx:c}).pipe(G(a),Y(async g=>g),U(g=>({backgroundColor:Ct(g.fullParams.backgroundColorType,g.fullChartParams),backgroundOpacity:g.fullParams.backgroundOpacity,strokeColor:Ct(g.fullParams.strokeColorType,g.fullChartParams),offset:g.fullParams.offset,padding:g.fullParams.padding,textSize:g.fullChartParams.styles.textSize,textSizePx:g.textSizePx,textColor:Ct(g.fullParams.textColorType,g.fullChartParams)}))),h=B({fullParams:i.fullParams$,tooltipStyle:l}).pipe(G(a),Y(async g=>g),U(g=>g.fullParams.svgRenderFn?g.fullParams.svgRenderFn:m=>{const y=g.fullParams.textRenderFn(m);return FR(y,g.tooltipStyle)})),f=B({event:s,contentRenderFn:h}).pipe(G(a),Y(async g=>g),U(g=>g.contentRenderFn(g.event))),p=u.pipe(G(a),U(g=>"")),d=Hu(s,u).pipe(G(a),U(g=>g.event));return B({svgString:Hu(f,p),event:d,layout:i.layout$,tooltipStyle:l}).pipe(G(a),Y(async g=>g)).subscribe(g=>{GR({rootSelection:e,pluginName:n,rootWidth:g.layout.rootWidth,rootHeight:g.layout.rootHeight,svgString:g.svgString,tooltipStyle:g.tooltipStyle,event:g.event})}),function(){a.next(void 0)}}),X2={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},V2={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},Z2={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+i.reduce((o,a)=>o+(a.value??0),0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},K2={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},Q2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function OR(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function s(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function u(p){var g;const d=document.createElement("canvas").getContext("2d");return((g=d==null?void 0:d.measureText(p))==null?void 0:g.width)??0}function c(p){const d=u(p.trim());return Math.sqrt(d*r)}function l(p,d){let g={width:0,text:""},m=1/0;const y=[];let x=" ";i&&(x="");for(let v=0,b=p.length;v<b;++v){const $=(g.text?g.text+x:"")+p[v],_=u($);(m+_)/2<d?(g.width=m=_,g.text=$):(m=u(p[v]),g={width:m,text:p[v]},y.push(g))}return y}function h(p){let d=0;for(let g=0,m=p.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,x=p[g].width/2;d=Math.max(d,Math.sqrt(x**2+y**2))}return d}function f(p,d){o>0&&(d=s(d,o));const g=a(d),m=c(d),y=l(g,m),x=h(y);let v=p.select("text");v.size()||(v=p.append("text")),v.attr("transform",`translate(0,0) scale(${n/x})`);const b=v.selectAll("tspan").data(y),$=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(_,D)=>(D-y.length/2+.8)*r).text(_=>_.text);return b.exit().remove(),b.merge($)}return f(t,e)}let rr;function UR(t,e){return Am().velocityDecay(e.force.velocityDecay).force("collision",wm().radius(n=>n.r+e.force.collisionSpacing)).force("charge",Mm().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function BR({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function YR({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=t.flat().filter(d=>d.value!=null&&d.visible!=!1),u=Math.max(...s.map(d=>d.value)),c=s.reduce((d,g)=>d+(g.value??0),0)/s.length,l=BR({data:s,bubbleGroupR:a,maxValue:u,avgValue:c}),h=o==="area"?.5:1,f=Ks().domain([0,u]).range([0,l]).exponent(h);return s.map(d=>{const g=d,m=e.get(d.id);if(m)g.x=m.x,g.y=m.y;else{const x=i.get(g.seriesLabel);g.x=Math.random()*x.width,g.y=Math.random()*x.height}const y=f(g.value??0);return g.r=y,g._originR=y,g})}function J2({graphicSelection:t,bubblesData:e,fullParams:n,sumSeries:r}){const i=t.selectAll("g").data(e,a=>a.id).join(a=>{const s=a.append("g").attr("cursor","pointer").attr("font-size",12).style("fill","#ffffff").attr("text-anchor","middle");return s.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",u=>u.color),s.append("text").style("opacity",.8).attr("pointer-events","none"),s},a=>a,a=>a.remove()).attr("transform",a=>`translate(${a.x},${a.y})`),o=r?"seriesLabel":"label";return i.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),i.each((a,s,u)=>{const c=Z(u[s]);let l=!0;a[o].length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(OR,{text:a[o],radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),i}function HR({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function WR(){return zg().on("start",(t,e)=>{t.active||rr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||rr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function tx({fullParams:t,SeriesContainerPositionMap:e}){rr.force("x",Dm().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",Pm().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),rr.alpha(1).restart()}function qR({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Va).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const jR=Si("Bubbles",X2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=t.append("g");let a=new Map;const s=n.fullDataFormatter$.pipe(U(f=>f.sumSeries),it()),u=n.fullParams$.pipe(G(i),U(f=>f.bubbleScaleType),it()),c=new ht(f=>{B({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:u}).pipe(G(i),Y(async p=>p)).subscribe(p=>{const d=YR({data:p.visibleComputedLayoutData,LastBubbleDataMap:a,graphicWidth:p.layout.width,graphicHeight:p.layout.height,SeriesContainerPositionMap:p.SeriesContainerPositionMap,scaleType:p.scaleType});f.next(d)})});c.subscribe(f=>{a=new Map(f.map(p=>[p.id,p]))});const l=n.fullChartParams$.pipe(G(i),U(f=>f.highlightTarget),it()),h=B({bubblesData:c,fullParams:n.fullParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:s}).pipe(G(i),Y(async f=>f),U(f=>{const p=J2({graphicSelection:o,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries});return rr=UR(p,f.fullParams),rr.nodes(f.bubblesData),tx({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),p}));return B({bubblesSelection:h,layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(G(i),Y(async f=>f)).subscribe(f=>{f.bubblesSelection.on("mouseover",(p,d)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("click",(p,d)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).call(WR())}),B({bubblesSelection:h,bubblesData:c,highlight:n.seriesHighlight$.pipe(U(f=>f.map(p=>p.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:s,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(G(i),Y(async f=>f)).subscribe(f=>{qR({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams}),f.fullParams.highlightRIncrease&&(HR({data:f.bubblesData,highlightRIncrease:f.fullParams.highlightRIncrease,highlightIds:f.highlight}),J2({graphicSelection:o,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries})),tx({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),rr.nodes(f.bubblesData)}),()=>{i.next(void 0)}});function ex({data:t,startAngle:e,endAngle:n}){return cv().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function XR({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=st(e,"series");return B({seriesLabels:r,separateSeries:n}).pipe(Y(async o=>o),U((o,a)=>{const s=o.separateSeries?o.seriesLabels:[o.seriesLabels.join("")];return t.selectAll(`g.${i}`).data(s,u=>u).join(u=>u.append("g").classed(i,!0),u=>u,u=>u.remove())}),St(1))}const Oh=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=XR({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a),it((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,u)=>{const c=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${c.centerX}, ${c.centerY})`})}),B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,u)=>{const c=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${c.centerX}, ${c.centerY})`})}),{seriesCenterSelection$:o}},Uh="Pie";function VR({enter:t,exit:e,data:n,lastTweenData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const c=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+c.startAngle*(1-o),endAngle:s.endAngle*o+c.endAngle*(1-o),value:s.value*o+c.value*(1-o)}});return Bh(a,i.startAngle,i.endAngle,1)}:o=>Bh(n,i.startAngle,i.endAngle,o)}function Bh(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function Yh({selection:t,data:e,arc:n,pathClassName:r}){return t.selectAll("path").data(e,o=>o.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(o,a)=>o.data.color).attr("d",(o,a)=>n(o))}function ZR({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const u=Z(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(Va).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}function KR(t,e){const n=new ot,r=st(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(G(n),U(f=>f.width<f.height?f.width:f.height)),s=new ht(f=>{B({containerComputedLayoutData:e.containerComputedLayoutData$,fullParams:e.fullParams$}).pipe(G(n),Y(async p=>p)).subscribe(p=>{const d=ex({data:p.containerComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});f.next(d)})}),u=new ht(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(G(n),Y(async p=>p)).subscribe(p=>{const d=Su({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),c=new ht(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(G(n),Y(async p=>p)).subscribe(p=>{const d=Su({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerMouseoverRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),l=e.fullChartParams$.pipe(G(n),U(f=>f.highlightTarget),it()),h=new ht(f=>{B({pieData:s,arc:u,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:l}).pipe(G(n),Y(async p=>p)).subscribe(p=>{e.containerSelection.interrupt("graphicMove");const d=e.containerSelection.selectAll("path").data(p.pieData,x=>x.id),g=d.enter(),m=d.exit(),y=VR({enter:g,exit:m,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});if(e.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(x,v)=>b=>{o=y(b),Yh({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r})}).on("end",(x,v)=>{o=Bh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const b=Yh({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r});f.next(b),i=Object.assign([],p.pieData),e.event$.next({type:"series",pluginName:t,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}),!g.size()&&d.size()>0){const x=Yh({selection:e.containerSelection,data:p.pieData,arc:p.arc,pathClassName:r});f.next(x)}})}).pipe(St(1));return B({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:l}).pipe(G(n),Y(async f=>f)).subscribe(f=>{f.pathSelection.on("mouseover",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("click",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})})}),B({pathSelection:h,highlight:e.seriesHighlight$.pipe(U(f=>f.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:u,arcMouseover:c}).pipe(G(n),Y(async f=>f)).subscribe(f=>{ZR({pathSelection:f.pathSelection,ids:f.highlight,fullChartParams:f.fullChartParams,arc:f.arc,arcMouseover:f.arcMouseover})}),()=>{n.next(void 0)}}const QR=Si(Uh,V2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,{seriesCenterSelection$:o}=Oh({selection:t,pluginName:Uh,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(G(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,c,l)=>{const h=Z(l[c]),f=r.computedLayoutData$.pipe(G(i),U(d=>d[c]??d[0])),p=r.seriesContainerPosition$.pipe(G(i),U(d=>d[c]??d[0]));a[c]=KR(Uh,{containerSelection:h,computedData$:r.computedData$,containerComputedLayoutData$:f,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Du="PieEventTexts",nx=st(Du,"text");function Hh(t,e){const n=t.selectAll(`text.${nx}`).data(e),r=n.enter().append("text").classed(nx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=Z(s[a]).text(o.text);Object.keys(o.attr).forEach(c=>{u.attr(c,o.attr[c])}),Object.keys(o.style).forEach(c=>{u.style(c,o.style[c])})}),n.exit().remove(),i}function Wh({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,u)=>({text:s,attr:i[u],style:o[u]}))}function JR(t,e){const n=new ot;let r;const i=e.fullChartParams$.pipe(G(n),U(o=>o.highlightTarget),it());return B({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(G(n),Y(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>u=>{const c=Wh({eventData:{type:"series",pluginName:t,eventName:"transitionMove",event:a,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:u,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});Hh(e.containerSelection,c)}).on("end",(a,s)=>{const u=Wh({eventData:{type:"series",pluginName:t,eventName:"transitionEnd",event:a,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});Hh(e.containerSelection,u),r&&r.unsubscribe(),r=e.event$.subscribe(c=>{const l=Wh({eventData:c,eventName:c.eventName,t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});Hh(e.containerSelection,l)})})}),()=>{n.next(void 0)}}const tI=Si(Du,Z2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,{seriesCenterSelection$:o}=Oh({selection:t,pluginName:Du,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(G(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,c,l)=>{const h=Z(l[c]),f=n.computedLayoutData$.pipe(G(i),U(d=>d[c]??d[0])),p=n.seriesContainerPosition$.pipe(G(i),U(d=>d[c]??d[0]));a[c]=JR(Du,{containerSelection:h,computedData$:n.computedData$,containerComputedLayoutData$:f,SeriesDataMap$:n.SeriesDataMap$,fullParams$:n.fullParams$,fullChartParams$:n.fullChartParams$,seriesHighlight$:n.seriesHighlight$,seriesContainerPosition$:p,event$:r.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Pu="PieLabels",eI=st(Pu,"text");function nI(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,c]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:c*r}}).filter(i=>i.pieDatum.data.visible)}function rI(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(eI,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",u=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(u=>n.labelFn(u.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(u,c)=>Sh({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function iI({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",s=>"translate("+s.mouseoverX+","+s.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",s=>"translate("+s.x+","+s.y+")")})}function oI(t,e){const n=new ot;let r=new ot,i=[];return B({layout:e.seriesContainerPosition$,containerComputedLayoutData:e.containerComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(G(n),Y(async o=>o)).subscribe(o=>{const a=o.layout.width<o.layout.height?o.layout.width:o.layout.height,s=Su({axisWidth:a,innerRadius:0,outerRadius:o.fullParams.outerRadius,padAngle:0,cornerRadius:0}),u=Su({axisWidth:a,innerRadius:0,outerRadius:o.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),c=ex({data:o.containerComputedLayoutData,startAngle:o.fullParams.startAngle,endAngle:o.fullParams.endAngle});i=nI(c,s,u,o.fullParams.labelCentroid);const l=rI(e.containerSelection,i,o.fullParams,o.fullChartParams);r.next(l)}),B({labelSelection:r,highlight:e.seriesHighlight$.pipe(U(o=>o.map(a=>a.id))),fullChartParams:e.fullChartParams$}).pipe(G(n),Y(async o=>o)).subscribe(o=>{iI({labelSelection:o.labelSelection,ids:o.highlight,fullChartParams:o.fullChartParams})}),()=>{n.next(void 0)}}const aI=Si(Pu,K2)(({selection:t,observer:e,subject:n})=>{const r=new ot,{seriesCenterSelection$:i}=Oh({selection:t,pluginName:Pu,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(G(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,c)=>{const l=Z(c[u]),h=e.computedLayoutData$.pipe(G(r),U(p=>p[u]??p[0])),f=e.seriesContainerPosition$.pipe(G(r),U(p=>p[u]??p[0]));o[u]=oI(Pu,{containerSelection:l,containerComputedLayoutData$:h,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:f,event$:n.event$})})}),()=>{r.next(void 0)}}),rx="SeriesLegend",sI=Si(rx,Q2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.SeriesDataMap$.pipe(G(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Au(rx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),ix={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},ox={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},ax="TreeLegend",uI=Qd(ax,ox)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.CategoryDataMap$.pipe(G(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Au(ax,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),ir="TreeMap",sx=st(ir,"tree"),ux=st(ir,"tile");function cI({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${sx}`).data(e,u=>u.data.id).join("g").attr("class",sx);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,c,l)=>{const h=Z(l[c]);h.selectAll(`rect.${ux}`).data([u],f=>f.data.id).join("rect").attr("id",f=>f.data.id).attr("class",ux).attr("cursor","pointer").attr("width",f=>f.x1-f.x0).attr("height",f=>f.y1-f.y0).attr("fill",f=>f.data.color).attr("data-name",f=>f.data.label).attr("data-category",f=>f.data.categoryLabel).attr("data-value",f=>f.data.value),h.selectAll("g").data([u]).join("g").each((f,p,d)=>{Z(d[p]).selectAll("text").data([f]).join("text").text(m=>m.data.label).attr("dominant-baseline","hanging").attr("x",o).attr("y",o).attr("font-size",r.styles.textSize).each(function(m){const y=Z(this),x=m.data.label.split(/\s+/).reverse();let v,b=[];const $=y.attr("x");let _=y.attr("y"),D=0,T=y.text(null).append("tspan").attr("cursor","pointer").attr("fill",Ct(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",$).attr("y",_);for(;v=x.pop();)b.push(v),T.text(b.join(" ")),T.node().getComputedTextLength()>m.x1-m.x0-o&&(b.pop(),T.text(b.join(" ")),b=[v],D+=a,T=y.append("tspan").attr("cursor","pointer").attr("fill",Ct(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",$).attr("y",_).attr("dy",D+"px").text(v))})})}),s}function lI({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.data.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const fI=Qd(ir,ix)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=B({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(G(i),Y(async u=>u),U(u=>{const c=by().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Gf.ratio(u.fullParams.squarifyRatio)),l=Ys(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=B({selection:Uu(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(G(i),Y(async u=>u),U(u=>cI({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(G(i),U(u=>u.highlightTarget),it());return B({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(G(i),Y(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:ir,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mousemove",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:ir,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mouseout",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:ir,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("click",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:ir,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})})}),B({cellSelection:a,highlight:r.treeHighlight$.pipe(U(u=>u.map(c=>c.id))),fullChartParams:r.fullChartParams$}).pipe(G(i),Y(async u=>u)).subscribe(u=>{lI({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});K.BarStack=Wk,K.Bars=Fk,K.BarsDiverging=Gk,K.BarsTriangle=Jk,K.Bubbles=jR,K.CONTAINER_PLUGIN_PARAMS=W2,K.Container=IR,K.DEFAULT_BARS_DIVERGING_PARAMS=cx,K.DEFAULT_BARS_PARAMS=ko,K.DEFAULT_BARS_TRIANGLE_PARAMS=Zh,K.DEFAULT_BAR_STACK_PARAMS=Vh,K.DEFAULT_BUBBLES_PARAMS=X2,K.DEFAULT_DOTS_PARAMS=jh,K.DEFAULT_GRID_LEGEND_PARAMS=tp,K.DEFAULT_GROUP_AREA_PARAMS=Xh,K.DEFAULT_GROUP_AXIS_PARAMS=Kh,K.DEFAULT_LINES_PARAMS=or,K.DEFAULT_LINE_AREAS_PARAMS=qh,K.DEFAULT_MULTI_BARS_PARAMS=D2,K.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=T2,K.DEFAULT_MULTI_BAR_STACK_PARAMS=P2,K.DEFAULT_MULTI_DOTS_PARAMS=E2,K.DEFAULT_MULTI_GRID_LEGEND_PARAMS=S2,K.DEFAULT_MULTI_GROUP_AXIS_PARAMS=A2,K.DEFAULT_MULTI_LINES_PARAMS=L2,K.DEFAULT_MULTI_LINE_AREAS_PARAMS=C2,K.DEFAULT_MULTI_VALUE_AXIS_PARAMS=M2,K.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=k2,K.DEFAULT_PIE_EVENT_TEXTS_PARAMS=Z2,K.DEFAULT_PIE_LABELS_PARAMS=K2,K.DEFAULT_PIE_PARAMS=V2,K.DEFAULT_SCALING_AREA_PARAMS=Jh,K.DEFAULT_SERIES_LEGEND_PARAMS=Q2,K.DEFAULT_TREE_LEGEND_PARAMS=ox,K.DEFAULT_TREE_MAP_PARAMS=ix,K.DEFAULT_VALUE_AXIS_PARAMS=Tu,K.DEFAULT_VALUE_STACK_AXIS_PARAMS=Qh,K.Dots=rR,K.GridLegend=oR,K.GroupAux=xR,K.GroupAxis=sR,K.LineAreas=Lk,K.Lines=$k,K.MultiBarStack=$R,K.MultiBars=wR,K.MultiBarsTriangle=SR,K.MultiDots=DR,K.MultiGridLegend=_R,K.MultiGroupAxis=PR,K.MultiLineAreas=MR,K.MultiLines=AR,K.MultiValueAxis=TR,K.OverlappingValueAxes=RR,K.Pie=QR,K.PieEventTexts=tI,K.PieLabels=aI,K.ScalingArea=hR,K.SeriesLegend=sI,K.TOOLTIP_PARAMS=q2,K.Tooltip=zR,K.TreeLegend=uI,K.TreeMap=fI,K.ValueAxis=cR,K.ValueStackAxis=lR,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
|