@orbcharts/plugins-basic 3.0.0-alpha.49 → 3.0.0-alpha.51
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +200 -200
- package/dist/orbcharts-plugins-basic.es.js +6325 -6272
- package/dist/orbcharts-plugins-basic.umd.js +8 -8
- package/dist/src/base/BaseGroupAxis.d.ts +1 -0
- package/dist/src/grid/index.d.ts +1 -1
- package/dist/src/grid/plugins/BarsPN.d.ts +1 -0
- package/dist/src/grid/types.d.ts +3 -2
- package/dist/src/multiGrid/defaults.d.ts +2 -1
- package/dist/src/multiGrid/index.d.ts +2 -0
- package/dist/src/multiGrid/multiGridObservables.d.ts +1 -1
- package/dist/src/multiGrid/plugins/MultiValueStackAxis.d.ts +1 -0
- package/dist/src/multiGrid/plugins/OverlappingValueStackAxes.d.ts +1 -0
- package/dist/src/multiGrid/types.d.ts +3 -0
- package/dist/src/series/types.d.ts +2 -3
- package/package.json +42 -42
- package/src/base/BaseBarStack.ts +778 -778
- package/src/base/BaseBars.ts +764 -764
- package/src/base/BaseBarsTriangle.ts +672 -672
- package/src/base/BaseDots.ts +513 -502
- package/src/base/BaseGroupAxis.ts +562 -496
- package/src/base/BaseLegend.ts +641 -641
- package/src/base/BaseLineAreas.ts +625 -625
- package/src/base/BaseLines.ts +699 -699
- package/src/base/BaseValueAxis.ts +478 -478
- package/src/base/types.ts +2 -2
- package/src/grid/defaults.ts +125 -121
- package/src/grid/gridObservables.ts +248 -247
- package/src/grid/index.ts +15 -15
- package/src/grid/plugins/BarStack.ts +43 -50
- package/src/grid/plugins/Bars.ts +44 -51
- package/src/grid/plugins/{BarsDiverging.ts → BarsPN.ts} +41 -41
- package/src/grid/plugins/BarsTriangle.ts +42 -50
- package/src/grid/plugins/Dots.ts +37 -37
- package/src/grid/plugins/GridLegend.ts +59 -59
- package/src/grid/plugins/GroupAux.ts +645 -645
- package/src/grid/plugins/GroupAxis.ts +35 -42
- package/src/grid/plugins/LineAreas.ts +39 -39
- package/src/grid/plugins/Lines.ts +38 -38
- package/src/grid/plugins/ScalingArea.ts +173 -173
- package/src/grid/plugins/ValueAxis.ts +36 -43
- package/src/grid/plugins/ValueStackAxis.ts +38 -79
- package/src/grid/types.ts +122 -120
- package/src/index.ts +9 -9
- package/src/multiGrid/defaults.ts +152 -147
- package/src/multiGrid/index.ts +14 -12
- package/src/multiGrid/multiGridObservables.ts +44 -43
- package/src/multiGrid/plugins/MultiBarStack.ts +78 -78
- package/src/multiGrid/plugins/MultiBars.ts +77 -77
- package/src/multiGrid/plugins/MultiBarsTriangle.ts +77 -77
- package/src/multiGrid/plugins/MultiDots.ts +65 -65
- package/src/multiGrid/plugins/MultiGridLegend.ts +89 -89
- package/src/multiGrid/plugins/MultiGroupAxis.ts +69 -69
- package/src/multiGrid/plugins/MultiLineAreas.ts +67 -67
- package/src/multiGrid/plugins/MultiLines.ts +66 -66
- package/src/multiGrid/plugins/MultiValueAxis.ts +69 -69
- package/src/multiGrid/plugins/MultiValueStackAxis.ts +69 -0
- package/src/multiGrid/plugins/OverlappingValueAxes.ts +166 -173
- package/src/multiGrid/plugins/OverlappingValueStackAxes.ts +167 -0
- package/src/multiGrid/types.ts +71 -67
- package/src/noneData/defaults.ts +64 -64
- package/src/noneData/index.ts +3 -3
- package/src/noneData/plugins/Container.ts +10 -10
- package/src/noneData/plugins/Tooltip.ts +310 -310
- package/src/noneData/types.ts +26 -26
- package/src/series/defaults.ts +126 -126
- package/src/series/index.ts +9 -9
- package/src/series/plugins/Bubbles.ts +545 -602
- package/src/series/plugins/Pie.ts +576 -576
- package/src/series/plugins/PieEventTexts.ts +262 -262
- package/src/series/plugins/PieLabels.ts +304 -304
- package/src/series/plugins/Rose.ts +472 -472
- package/src/series/plugins/RoseLabels.ts +362 -362
- package/src/series/plugins/SeriesLegend.ts +59 -59
- package/src/series/seriesObservables.ts +145 -145
- package/src/series/seriesUtils.ts +51 -51
- package/src/series/types.ts +83 -83
- package/src/tree/defaults.ts +22 -22
- package/src/tree/index.ts +3 -3
- package/src/tree/plugins/TreeLegend.ts +59 -59
- package/src/tree/plugins/TreeMap.ts +305 -305
- package/src/tree/types.ts +23 -23
- package/src/utils/commonUtils.ts +21 -21
- package/src/utils/d3Graphics.ts +124 -124
- package/src/utils/d3Utils.ts +73 -73
- package/src/utils/observables.ts +14 -14
- package/src/utils/orbchartsUtils.ts +100 -100
- package/tsconfig.dev.json +16 -16
- package/tsconfig.json +13 -13
- package/tsconfig.prod.json +13 -13
- package/vite.config.js +49 -49
- package/dist/src/grid/plugins/BarsDiverging.d.ts +0 -1
@@ -1,15 +1,15 @@
|
|
1
|
-
(function(
|
1
|
+
(function(Z,sr){typeof exports=="object"&&typeof module<"u"?sr(exports):typeof define=="function"&&define.amd?define(["exports"],sr):(Z=typeof globalThis<"u"?globalThis:Z||self,sr(Z["orbcharts-plugins-basic"]={}))})(this,function(Z){"use strict";const sr={lineCurve:"curveLinear",lineWidth:2},Qh={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},Jh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},tp={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Fo={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},bx={...Fo},ep={barWidth:0,barGroupPadding:10,barRadius:!1},np={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},rp={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Nu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},ip={...Nu},op={},ap={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};var Fu=function(t,e){return Fu=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])},Fu(t,e)};function Mn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Fu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function vx(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(c){try{l(r.next(c))}catch(h){a(h)}}function u(c){try{l(r.throw(c))}catch(h){a(h)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(t,e||[])).next())})}function sp(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(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ur(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 lr(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 ui(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 xx(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{l(r[p](d))}catch(g){f(o[0][3],g)}}function l(p){p.value instanceof cr?Promise.resolve(p.value.v).then(c,h):f(o[0][2],p)}function c(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 _x(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 ur=="function"?ur(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(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function yt(t){return typeof t=="function"}function Gu(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 zu=Gu(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 Fu(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Fo=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=ur(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.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 c=this.initialTeardown;if(yt(c))try{c()}catch(g){o=g instanceof Nu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=ur(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{ap(d)}catch(g){o=o??[],g instanceof Nu?o=si(si([],lr(o)),lr(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 Nu(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)&&Fu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Fu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),ip=Fo.EMPTY;function op(t){return t instanceof Fo||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,si([t,e],lr(n)))},clearTimeout:function(t){var e=up.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function lp(t){up.setTimeout(function(){throw t})}function Gu(){}function Go(t){t()}var zu=function(t){An(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=_x,r}return e.create=function(n,r,i){return new ui(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}(Fo),bx=Function.prototype.bind;function Ou(t,e){return bx.call(t,e)}var vx=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){zo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){zo(r)}else zo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){zo(n)}},t}(),ui=function(t){An(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&&Ou(n.next,s),error:n.error&&Ou(n.error,s),complete:n.complete&&Ou(n.complete,s)}):a=n}return o.destination=new vx(a),o}return e}(zu);function zo(t){lp(t)}function xx(t){throw t}var _x={closed:!0,next:Gu,error:xx,complete:Gu},Uu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function fr(t){return t}function wx(t){return t.length===0?fr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var ft=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=Sx(e)?e:new ui(e,n,r);return Go(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=cp(n),new n(function(i,o){var a=new ui({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[Uu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wx(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=cp(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 cp(t){var e;return(e=t??sp.Promise)!==null&&e!==void 0?e:Promise}function $x(t){return t&&yt(t.next)&&yt(t.error)&&yt(t.complete)}function Sx(t){return t&&t instanceof zu||$x(t)&&op(t)}function Ax(t){return yt(t==null?void 0:t.lift)}function fe(t){return function(e){if(Ax(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 Mx(t,e,n,r,i)}var Mx=function(t){An(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(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}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}(zu),Px=Iu(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rt=function(t){An(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 Px},e.prototype.next=function(n){var r=this;Go(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=ur(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}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;Go(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;Go(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 Fo(function(){r.currentObservers=null,Fu(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 ft;return n.source=this,n},e.create=function(n,r){return new fp(n,r)},e}(ft),fp=function(t){An(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}(rt),Dx=function(t){An(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}(rt),hp={now:function(){return(hp.delegate||Date).now()},delegate:void 0},Tx=function(t){An(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(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(rt),pp=new ft(function(t){return t.complete()});function Lx(t){return t&&yt(t.schedule)}function Bu(t){return t[t.length-1]}function Cx(t){return yt(Bu(t))?t.pop():void 0}function Yu(t){return Lx(Bu(t))?t.pop():void 0}function Ex(t,e){return typeof Bu(t)=="number"?t.pop():e}var Hu=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[Uu])}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 Rx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var bp=Rx();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,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 _p(t){return yt(t==null?void 0:t.getReader)}function he(t){if(t instanceof ft)return t;if(t!=null){if(gp(t))return kx(t);if(Hu(t))return Ix(t);if(dp(t))return Nx(t);if(mp(t))return wp(t);if(vp(t))return Fx(t);if(_p(t))return Gx(t)}throw yp(t)}function kx(t){return new ft(function(e){var n=t[Uu]();if(yt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ix(t){return new ft(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Nx(t){return new ft(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,lp)})}function Fx(t){return new ft(function(e){var n,r;try{for(var i=ur(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 ft(function(e){zx(t,e).catch(function(n){return e.error(n)})})}function Gx(t){return wp(xp(t))}function zx(t,e){var n,r,i,o;return gx(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=yx(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 ln(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 ln(r,t,function(){return r.next(i)},e)},function(){return ln(r,t,function(){return r.complete()},e)},function(i){return ln(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 Ox(t,e){return he(t).pipe(Sp(e),$p(e))}function Ux(t,e){return he(t).pipe(Sp(e),$p(e))}function Bx(t,e){return new ft(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Yx(t,e){return new ft(function(n){var r;return ln(n,e,function(){r=t[bp](),ln(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 ft(function(n){ln(n,e,function(){var r=t[Symbol.asyncIterator]();ln(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Hx(t,e){return Ap(xp(t),e)}function Wx(t,e){if(t!=null){if(gp(t))return Ox(t,e);if(Hu(t))return Bx(t,e);if(dp(t))return Ux(t,e);if(mp(t))return Ap(t,e);if(vp(t))return Yx(t,e);if(_p(t))return Hx(t,e)}throw yp(t)}function Oo(t,e){return e?Wx(t,e):he(t)}function Wu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Yu(t);return Oo(t,n)}var Mp=Iu(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function O(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(r,function(o){r.next(t.call(e,o,i++))}))})}var qx=Array.isArray;function Vx(t,e){return qx(e)?t.apply(void 0,si([],lr(e))):t(e)}function Pp(t){return O(function(e){return Vx(t,e)})}var jx=Array.isArray,Xx=Object.getPrototypeOf,Zx=Object.prototype,Kx=Object.keys;function Qx(t){if(t.length===1){var e=t[0];if(jx(e))return{args:e,keys:null};if(Jx(e)){var n=Kx(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"&&Xx(t)===Zx}function t_(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=Yu(t),r=Cx(t),i=Qx(t),o=i.args,a=i.keys;if(o.length===0)return Oo([],n);var s=new ft(e_(o,n,a?function(u){return t_(a,u)}:fr));return r?s.pipe(Pp(r)):s}function e_(t,e,n){return n===void 0&&(n=fr),function(r){Dp(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(c){Dp(e,function(){var h=Oo(t[c],e),f=!1;h.subscribe(ae(r,function(p){o[c]=p,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},l=0;l<i;l++)u(l)},r)}}function Dp(t,e,n){t?ln(n,t,e):e()}function n_(t,e,n,r,i,o,a,s){var u=[],l=0,c=0,h=!1,f=function(){h&&!u.length&&!l&&e.complete()},p=function(g){return l<r?d(g):u.push(g)},d=function(g){l++;var m=!1;he(n(g,c++)).subscribe(ae(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{l--;for(var y=function(){var x=u.shift();a||d(x)};u.length&&l<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(ae(e,p,function(){h=!0,f()})),function(){}}function qu(t,e,n){return n===void 0&&(n=1/0),yt(e)?qu(function(r,i){return O(function(o,a){return e(r,o,i,a)})(he(t(r,i)))},n):(typeof e=="number"&&(n=e),fe(function(r,i){return n_(r,i,t,n)}))}function r_(t){return t===void 0&&(t=1/0),qu(fr,t)}function i_(t){return new ft(function(e){he(t()).subscribe(e)})}var o_=["addListener","removeListener"],a_=["addEventListener","removeEventListener"],s_=["on","off"];function Vu(t,e,n,r){if(yt(n)&&(r=n,n=void 0),r)return Vu(t,e,n).pipe(Pp(r));var i=lr(c_(t)?a_.map(function(s){return function(u){return t[s](e,u,n)}}):u_(t)?o_.map(Tp(t,e)):l_(t)?s_.map(Tp(t,e)):[],2),o=i[0],a=i[1];if(!o&&Hu(t))return qu(function(s){return Vu(s,e,n)})(he(t));if(!o)throw new TypeError("Invalid event target");return new ft(function(s){var u=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return s.next(1<l.length?l:l[0])};return o(u),function(){return a(u)}})}function Tp(t,e){return function(n){return function(r){return t[n](e,r)}}}function u_(t){return yt(t.addListener)&&yt(t.removeListener)}function l_(t){return yt(t.on)&&yt(t.off)}function c_(t){return yt(t.addEventListener)&&yt(t.removeEventListener)}function Lp(t,e,n){return i_(function(){return t()?e:n})}function ju(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Yu(t),r=Ex(t,1/0),i=t;return i.length?i.length===1?he(i[0]):r_(r)(Oo(i,n)):pp}function hr(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 f_(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 h_(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 tt(t,e){return e===void 0&&(e=fr),t=t??p_,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 p_(t,e){return t===e}function d_(t){return t===void 0&&(t=g_),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 g_(){return new Mp}function m_(t,e){var n=arguments.length>=2;return function(r){return r.pipe(fr,h_(1),n?f_(e):d_(function(){return new Mp}))}}function y_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new rt}: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(l){var c,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),c=f=void 0,d=g=!1},x=function(){var v=c;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=Xu(x,u))}),$.subscribe(b),!c&&p>0&&(c=new ui({next:function(_){return $.next(_)},error:function(_){g=!0,m(),h=Xu(y,i,_),$.error(_)},complete:function(){d=!0,m(),h=Xu(y,a),$.complete()}}),he(v).subscribe(c))})(l)}}function Xu(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 ui({next:function(){i.unsubscribe(),t()}});return he(e.apply(void 0,si([],lr(n)))).subscribe(i)}}function _t(t,e,n){var r,i=!1;return r=t,y_({connector:function(){return new Tx(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 l=0,c=o++;he(t(u,c)).subscribe(i=ae(r,function(h){return r.next(e?e(u,h,c,l++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function I(t){return fe(function(e,n){he(t).subscribe(ae(n,function(){return n.complete()},Gu)),!n.closed&&e.subscribe(n)})}const pr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Uo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function b_(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=Uo,n=(s,u)=>Uo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Uo||t===b_?t:v_,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const h=l+c>>>1;n(s[h],u)<0?l=h+1:c=h}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const h=l+c>>>1;n(s[h],u)<=0?l=h+1:c=h}while(l<c)}return l}function a(s,u,l=0,c=s.length){const h=i(s,u,l,c-1);return h>l&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function v_(){return 0}function x_(t){return t===null?NaN:+t}const __=Cp(Uo),Ep=__.right;Cp(x_).center;class Rp extends Map{constructor(e,n=S_){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(kp(this,e))}has(e){return super.has(kp(this,e))}set(e,n){return super.set(w_(this,e),n)}delete(e){return super.delete($_(this,e))}}function kp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function w_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function $_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function S_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const A_=Math.sqrt(50),M_=Math.sqrt(10),P_=Math.sqrt(2);function Bo(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>=A_?10:o>=M_?5:o>=P_?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?Bo(t,e,n*2):[s,u,l]}function D_(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?Bo(e,t,n):Bo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function Zu(t,e,n){return e=+e,t=+t,n=+n,Bo(t,e,n)[2]}function T_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Zu(e,t,n):Zu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function L_(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 C_={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 Yo(n)}function Yo(t){this._=t}function E_(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}})}Yo.prototype=Ip.prototype={constructor:Yo,on:function(t,e){var n=this._,r=E_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=R_(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 Yo(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 R_(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]=C_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ku="http://www.w3.org/1999/xhtml";const Fp={svg:"http://www.w3.org/2000/svg",xhtml:Ku,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ho(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 k_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ku&&e.documentElement.namespaceURI===Ku?e.createElement(t):e.createElementNS(n,t)}}function I_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Gp(t){var e=Ho(t);return(e.local?I_:k_)(e)}function N_(){}function Qu(t){return t==null?N_:function(){return this.querySelector(t)}}function F_(t){typeof t!="function"&&(t=Qu(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,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new xe(r,this._parents)}function G_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function z_(){return[]}function zp(t){return t==null?z_:function(){return this.querySelectorAll(t)}}function O_(t){return function(){return G_(t.apply(this,arguments))}}function U_(t){typeof t=="function"?t=O_(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,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,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 B_=Array.prototype.find;function Y_(t){return function(){return B_.call(this.children,t)}}function H_(){return this.firstElementChild}function W_(t){return this.select(t==null?H_:Y_(typeof t=="function"?t:Up(t)))}var q_=Array.prototype.filter;function V_(){return Array.from(this.children)}function j_(t){return function(){return q_.call(this.children,t)}}function X_(t){return this.selectAll(t==null?V_:j_(typeof t=="function"?t:Up(t)))}function Z_(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new xe(r,this._parents)}function Bp(t){return new Array(t.length)}function K_(){return new xe(this._enter||this._groups.map(Bp),this._parents)}function Wo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Wo.prototype={constructor:Wo,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,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Wo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function tw(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,h=o.length,f=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new Wo(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(f[s])===u&&(i[s]=u)}function ew(t){return t.__data__}function nw(t,e){if(!arguments.length)return Array.from(this,ew);var n=e?tw: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),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,p=rw(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),y=u[l]=new Array(f);n(c,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 rw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function iw(){return new xe(this._exit||this._groups.map(Bp),this._parents)}function ow(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 aw(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 l=n[u],c=r[u],h=l.length,f=s[u]=new Array(h),p,d=0;d<h;++d)(p=l[d]||c[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new xe(s,this._parents)}function sw(){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 uw(t){t||(t=lw);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),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new xe(i,this._parents).order()}function lw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function cw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function fw(){return Array.from(this)}function hw(){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 pw(){let t=0;for(const e of this)++t;return t}function dw(){return!this.node()}function gw(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 mw(t){return function(){this.removeAttribute(t)}}function yw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function bw(t,e){return function(){this.setAttribute(t,e)}}function vw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function xw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function _w(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 ww(t,e){var n=Ho(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?yw:mw:typeof e=="function"?n.local?_w:xw:n.local?vw:bw)(n,e))}function Yp(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $w(t){return function(){this.style.removeProperty(t)}}function Sw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Aw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Mw(t,e,n){return arguments.length>1?this.each((e==null?$w:typeof e=="function"?Aw:Sw)(t,e,n??"")):dr(this.node(),t)}function dr(t,e){return t.style.getPropertyValue(e)||Yp(t).getComputedStyle(t,null).getPropertyValue(e)}function Pw(t){return function(){delete this[t]}}function Dw(t,e){return function(){this[t]=e}}function Tw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Lw(t,e){return arguments.length>1?this.each((e==null?Pw:typeof e=="function"?Tw:Dw)(t,e)):this.node()[t]}function Hp(t){return t.trim().split(/^|\s+/)}function Ju(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=Ju(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Vp(t,e){for(var n=Ju(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Cw(t){return function(){qp(this,t)}}function Ew(t){return function(){Vp(this,t)}}function Rw(t,e){return function(){(e.apply(this,arguments)?qp:Vp)(this,t)}}function kw(t,e){var n=Hp(t+"");if(arguments.length<2){for(var r=Ju(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Rw:e?Cw:Ew)(n,e))}function Iw(){this.textContent=""}function Nw(t){return function(){this.textContent=t}}function Fw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Gw(t){return arguments.length?this.each(t==null?Iw:(typeof t=="function"?Fw:Nw)(t)):this.node().textContent}function zw(){this.innerHTML=""}function Ow(t){return function(){this.innerHTML=t}}function Uw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Bw(t){return arguments.length?this.each(t==null?zw:(typeof t=="function"?Uw:Ow)(t)):this.node().innerHTML}function Yw(){this.nextSibling&&this.parentNode.appendChild(this)}function Hw(){return this.each(Yw)}function Ww(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qw(){return this.each(Ww)}function Vw(t){var e=typeof t=="function"?t:Gp(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function jw(){return null}function Xw(t,e){var n=typeof t=="function"?t:Gp(t),r=e==null?jw:typeof e=="function"?e:Qu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Zw(){var t=this.parentNode;t&&t.removeChild(this)}function Kw(){return this.each(Zw)}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 t$(t){return this.select(t?Jw:Qw)}function e$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function n$(t){return function(e){t.call(this,e,this.__data__)}}function r$(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 i$(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 o$(t,e,n){return function(){var r=this.__on,i,o=n$(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 a$(t,e,n){var r=r$(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?o$:i$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function jp(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 s$(t,e){return function(){return jp(this,t,e)}}function u$(t,e){return function(){return jp(this,t,e.apply(this,arguments))}}function l$(t,e){return this.each((typeof e=="function"?u$:s$)(t,e))}function*c$(){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 f$=[null];function xe(t,e){this._groups=t,this._parents=e}function li(){return new xe([[document.documentElement]],f$)}function h$(){return this}xe.prototype=li.prototype={constructor:xe,select:F_,selectAll:U_,selectChild:W_,selectChildren:X_,filter:Z_,data:nw,enter:K_,exit:iw,join:ow,merge:aw,selection:h$,order:sw,sort:uw,call:cw,nodes:fw,node:hw,size:pw,empty:dw,each:gw,attr:ww,style:Mw,property:Lw,classed:kw,text:Gw,html:Bw,raise:Hw,lower:qw,append:Vw,insert:Xw,remove:Kw,clone:t$,datum:e$,on:a$,dispatch:l$,[Symbol.iterator]:c$};function tl(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Xp(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ci(){}var fi=.7,qo=1/fi,gr="\\s*([+-]?\\d+)\\s*",hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",p$=/^#([0-9a-f]{3,8})$/,d$=new RegExp(`^rgb\\(${gr},${gr},${gr}\\)$`),g$=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),m$=new RegExp(`^rgba\\(${gr},${gr},${gr},${hi}\\)$`),y$=new RegExp(`^rgba\\(${Le},${Le},${Le},${hi}\\)$`),b$=new RegExp(`^hsl\\(${hi},${Le},${Le}\\)$`),v$=new RegExp(`^hsla\\(${hi},${Le},${Le},${hi}\\)$`),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};tl(ci,Mn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Kp,formatHex:Kp,formatHex8:x$,formatHsl:_$,formatRgb:Qp,toString:Qp});function Kp(){return this.rgb().formatHex()}function x$(){return this.rgb().formatHex8()}function _$(){return rd(this).formatHsl()}function Qp(){return this.rgb().formatRgb()}function Mn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=p$.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?Vo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Vo(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=d$.exec(t))?new ne(e[1],e[2],e[3],1):(e=g$.exec(t))?new ne(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=m$.exec(t))?Vo(e[1],e[2],e[3],e[4]):(e=y$.exec(t))?Vo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=b$.exec(t))?nd(e[1],e[2]/100,e[3]/100,1):(e=v$.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 Vo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ne(t,e,n,r)}function w$(t){return t instanceof ci||(t=Mn(t)),t?(t=t.rgb(),new ne(t.r,t.g,t.b,t.opacity)):new ne}function el(t,e,n,r){return arguments.length===1?w$(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}tl(ne,el,Xp(ci,{brighter(t){return t=t==null?qo:Math.pow(qo,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?fi:Math.pow(fi,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:$$,formatRgb:ed,toString:ed}));function td(){return`#${Dn(this.r)}${Dn(this.g)}${Dn(this.b)}`}function $$(){return`#${Dn(this.r)}${Dn(this.g)}${Dn(this.b)}${Dn((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 Dn(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 ci||(t=Mn(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 S$(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}tl(_e,S$,Xp(ci,{brighter(t){return t=t==null?qo:Math.pow(qo,t),new _e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?fi:Math.pow(fi,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(nl(t>=240?t-240:t+120,i,r),nl(t,i,r),nl(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 nl(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 rl=t=>()=>t;function A$(t,e){return function(n){return t+n*e}}function M$(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 P$(t){return(t=+t)==1?od:function(e,n){return n-e?M$(e,n,t):rl(isNaN(e)?n:e)}}function od(t,e){var n=e-t;return n?A$(t,n):rl(isNaN(t)?e:t)}const Zo=function t(e){var n=P$(e);function r(i,o){var a=n((i=el(i)).r,(o=el(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=od(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function D$(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$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function L$(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]=al(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 C$(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 E$(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]=al(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var il=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ol=new RegExp(il.source,"g");function R$(t){return function(){return t}}function k$(t){return function(e){return t(e)+""}}function ad(t,e){var n=il.lastIndex=ol.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=il.exec(t))&&(i=ol.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=ol.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?k$(u[0].x):R$(e):(e=u.length,function(l){for(var c=0,h;c<e;++c)s[(h=u[c]).i]=h.x(l);return s.join("")})}function al(t,e){var n=typeof e,r;return e==null||n==="boolean"?rl(e):(n==="number"?we:n==="string"?(r=Mn(e))?(e=r,Zo):ad:e instanceof Mn?Zo:e instanceof Date?C$:T$(e)?D$:Array.isArray(e)?L$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?E$:we)(t,e)}function I$(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 ld(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 Ko;function N$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ud:ld(e.a,e.b,e.c,e.d,e.e,e.f)}function F$(t){return t==null||(Ko||(Ko=document.createElementNS("http://www.w3.org/2000/svg","g")),Ko.setAttribute("transform",t),!(t=Ko.transform.baseVal.consolidate()))?ud:(t=t.matrix,ld(t.a,t.b,t.c,t.d,t.e,t.f))}function cd(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,h,f,p,d){if(l!==h||c!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:we(l,h)},{i:g-2,x:we(c,f)})}else(h||f)&&p.push("translate("+h+e+f+n)}function a(l,c,h,f){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:we(l,c)})):c&&h.push(i(h)+"rotate("+c+r)}function s(l,c,h,f){l!==c?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:we(l,c)}):c&&h.push(i(h)+"skewX("+c+r)}function u(l,c,h,f,p,d){if(l!==h||c!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:we(l,h)},{i:g-2,x:we(c,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(l,c){var h=[],f=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,h,f),a(l.rotate,c.rotate,h,f),s(l.skewX,c.skewX,h,f),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,f),l=c=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 G$=cd(N$,"px, ","px)","deg)"),z$=cd(F$,", ",")",")"),mr=0,pi=0,di=0,fd=1e3,Qo,gi,Jo=0,Tn=0,ta=0,mi=typeof performance=="object"&&performance.now?performance:Date,hd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function sl(){return Tn||(hd(O$),Tn=mi.now()+ta)}function O$(){Tn=0}function ea(){this._call=this._time=this._next=null}ea.prototype=pd.prototype={constructor:ea,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?sl():+n)+(e==null?0:+e),!this._next&&gi!==this&&(gi?gi._next=this:Qo=this,gi=this),this._call=t,this._time=n,ul()},stop:function(){this._call&&(this._call=null,this._time=1/0,ul())}};function pd(t,e,n){var r=new ea;return r.restart(t,e,n),r}function U$(){sl(),++mr;for(var t=Qo,e;t;)(e=Tn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--mr}function dd(){Tn=(Jo=mi.now())+ta,mr=pi=0;try{U$()}finally{mr=0,Y$(),Tn=0}}function B$(){var t=mi.now(),e=t-Jo;e>fd&&(ta-=e,Jo=t)}function Y$(){for(var t,e=Qo,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:Qo=n);gi=t,ul(r)}function ul(t){if(!mr){pi&&(pi=clearTimeout(pi));var e=t-Tn;e>24?(t<1/0&&(pi=setTimeout(dd,t-mi.now()-ta)),di&&(di=clearInterval(di))):(di||(Jo=mi.now(),di=setInterval(B$,fd)),mr=1,hd(dd))}}function gd(t,e,n){var r=new ea;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var H$=Ip("start","end","cancel","interrupt"),W$=[],md=0,yd=1,ll=2,na=3,bd=4,cl=5,ra=6;function ia(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;q$(t,n,{name:e,index:r,group:i,on:H$,tween:W$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:md})}function fl(t,e){var n=$e(t,e);if(n.state>md)throw new Error("too late; already scheduled");return n}function Ce(t,e){var n=$e(t,e);if(n.state>na)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 q$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=pd(o,0,n.time);function o(l){n.state=yd,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,h,f,p;if(n.state!==yd)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===na)return gd(a);p.state===bd?(p.state=ra,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=ra,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(gd(function(){n.state===na&&(n.state=bd,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=ll,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ll){for(n.state=na,i=new Array(f=n.tween.length),c=0,h=-1;c<f;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=cl,1),h=-1,f=i.length;++h<f;)i[h].call(t,c);n.state===cl&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ra,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function V$(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>ll&&r.state<cl,r.state=ra,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function j$(t){return this.each(function(){V$(this,t)})}function X$(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 Z$(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,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function K$(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?X$:Z$)(n,t,e))}function hl(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 vd(t,e){var n;return(typeof e=="number"?we:e instanceof Mn?Zo:(n=Mn(e))?(e=n,Zo):ad)(t,e)}function Q$(t){return function(){this.removeAttribute(t)}}function J$(t){return function(){this.removeAttributeNS(t.space,t.local)}}function tS(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 eS(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 nS(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 rS(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 iS(t,e){var n=Ho(t),r=n==="transform"?z$:vd;return this.attrTween(t,typeof e=="function"?(n.local?rS:nS)(n,r,hl(this,"attr."+t,e)):e==null?(n.local?J$:Q$)(n):(n.local?eS:tS)(n,r,e))}function oS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function aS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function sS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&aS(t,o)),n}return i._value=e,i}function uS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&oS(t,o)),n}return i._value=e,i}function lS(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=Ho(t);return this.tween(n,(r.local?sS:uS)(r,e))}function cS(t,e){return function(){fl(this,t).delay=+e.apply(this,arguments)}}function fS(t,e){return e=+e,function(){fl(this,t).delay=e}}function hS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?cS:fS)(e,t)):$e(this.node(),e).delay}function pS(t,e){return function(){Ce(this,t).duration=+e.apply(this,arguments)}}function dS(t,e){return e=+e,function(){Ce(this,t).duration=e}}function gS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?pS:dS)(e,t)):$e(this.node(),e).duration}function mS(t,e){if(typeof e!="function")throw new Error;return function(){Ce(this,t).ease=e}}function yS(t){var e=this._id;return arguments.length?this.each(mS(e,t)):$e(this.node(),e).ease}function bS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ce(this,t).ease=n}}function vS(t){if(typeof t!="function")throw new Error;return this.each(bS(this._id,t))}function xS(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new We(r,this._parents,this._name,this._id)}function _S(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],l=n[s],c=u.length,h=a[s]=new Array(c),f,p=0;p<c;++p)(f=u[p]||l[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new We(a,this._parents,this._name,this._id)}function wS(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 $S(t,e,n){var r,i,o=wS(e)?fl:Ce;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function SS(t,e){var n=this._id;return arguments.length<2?$e(this.node(),n).on.on(t):this.each($S(n,t,e))}function AS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function MS(){return this.on("end.remove",AS(this._id))}function PS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Qu(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,l=o[a]=new Array(u),c,h,f=0;f<u;++f)(c=s[f])&&(h=t.call(c,c.__data__,f,s))&&("__data__"in c&&(h.__data__=c.__data__),l[f]=h,ia(l[f],e,n,f,l,$e(c,n)));return new We(o,this._parents,e,n)}function DS(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],l=u.length,c,h=0;h<l;++h)if(c=u[h]){for(var f=t.call(c,c.__data__,h,u),p,d=$e(c,n),g=0,m=f.length;g<m;++g)(p=f[g])&&ia(p,e,n,g,f,d);o.push(f),a.push(c)}return new We(o,a,e,n)}var TS=li.prototype.constructor;function LS(){return new TS(this._groups,this._parents)}function CS(t,e){var n,r,i;return function(){var o=dr(this,t),a=(this.style.removeProperty(t),dr(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 ES(t,e,n){var r,i=n+"",o;return function(){var a=dr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function RS(t,e,n){var r,i,o;return function(){var a=dr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),dr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function kS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ce(this,t),l=u.on,c=u.value[o]==null?s||(s=xd(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function IS(t,e,n){var r=(t+="")=="transform"?G$:vd;return e==null?this.styleTween(t,CS(t,r)).on("end.style."+t,xd(t)):typeof e=="function"?this.styleTween(t,RS(t,r,hl(this,"style."+t,e))).each(kS(this._id,t)):this.styleTween(t,ES(t,r,e),n).on("end.style."+t,null)}function NS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function FS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&NS(t,a,n)),r}return o._value=e,o}function GS(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,FS(t,e,n??""))}function zS(t){return function(){this.textContent=t}}function OS(t){return function(){var e=t(this);this.textContent=e??""}}function US(t){return this.tween("text",typeof t=="function"?OS(hl(this,"text",t)):zS(t==null?"":t+""))}function BS(t){return function(e){this.textContent=t.call(this,e)}}function YS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&BS(i)),e}return r._value=t,r}function HS(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,YS(t))}function WS(){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,l=0;l<s;++l)if(u=a[l]){var c=$e(u,e);ia(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new We(r,this._parents,t,n)}function qS(){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 l=Ce(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var VS=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function _d(){return++VS}var qe=li.prototype;We.prototype={constructor:We,select:PS,selectAll:DS,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:xS,merge:_S,selection:LS,transition:WS,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:SS,attr:iS,attrTween:lS,style:IS,styleTween:GS,text:US,textTween:HS,remove:MS,tween:K$,delay:hS,duration:gS,ease:yS,easeVarying:vS,end:qS,[Symbol.iterator]:qe[Symbol.iterator]};function jS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var XS={time:null,delay:0,duration:250,ease:jS};function ZS(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 KS(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=_d(),(n=XS).time=sl(),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,l=0;l<s;++l)(u=a[l])&&ia(u,t,e,l,a,n||ZS(u,e));return new We(r,this._parents,t,e)}li.prototype.interrupt=j$,li.prototype.transition=KS;function QS(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function oa(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=oa(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 tA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var eA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function aa(t){if(!(e=eA.exec(t)))throw new Error("invalid format: "+t);var e;return new pl({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]})}aa.prototype=pl.prototype;function pl(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+""}pl.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 nA(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 rA(t,e){var n=oa(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")+oa(t,Math.max(0,e+o-1))[0]}function $d(t,e){var n=oa(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: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:rA,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,Pd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function iA(t){var e=t.grouping===void 0||t.thousands===void 0?Ad:JS(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:tA(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 l(h){h=aa(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():"",P=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 D(S){var z=_,R=P,A,L,M;if($==="c")R=T(S)+R,S="";else{S=+S;var G=S<0||1/S<0;if(S=isNaN(S)?u:T(Math.abs(S),v),b&&(S=nA(S)),G&&+S==0&&d!=="+"&&(G=!1),z=(G?d==="("?d:s:d==="-"||d==="("?"":d)+z,R=($==="s"?Pd[8+wd/3]:"")+R+(G&&d==="("?")":""),w){for(A=-1,L=S.length;++A<L;)if(M=S.charCodeAt(A),48>M||M>57){R=(M===46?i+S.slice(A+1):S.slice(A))+R,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var U=z.length+S.length+R.length,E=U<y?new Array(y-U+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-R.length:1/0),E=""),p){case"<":S=z+S+R+E;break;case"=":S=z+E+S+R;break;case"^":S=E.slice(0,U=E.length>>1)+z+S+R+E.slice(U);break;default:S=E+z+S+R;break}return o(S)}return D.toString=function(){return h+""},D}function c(h,f){var p=l((h=aa(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(yr(f)/3)))*3,g=Math.pow(10,-d),m=Pd[8+d/3];return function(y){return p(g*y)+m}}return{format:l,formatPrefix:c}}var sa,Dd,Td;oA({thousands:",",grouping:[3],currency:["$",""]});function oA(t){return sa=iA(t),Dd=sa.format,Td=sa.formatPrefix,sa}function aA(t){return Math.max(0,-yr(Math.abs(t)))}function sA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yr(e)/3)))*3-yr(Math.abs(t)))}function uA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,yr(e)-yr(t))+1}function ua(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 Rp,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 Rp;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)},ua.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,l=0,c=.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+l*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*c,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=L_(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,l=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(l=+f,h()):l},t.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),h()):c},t.copy=function(){return Ed(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},ua.apply(h(),arguments)}function Rd(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Rd(e())},t}function lA(){return Rd(Ed.apply(null,arguments).paddingInner(1))}function cA(t){return function(){return t}}function fA(t){return+t}var kd=[0,1];function br(t){return t}function dl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:cA(isNaN(e)?NaN:.5)}function hA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function pA(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=dl(i,r),o=n(a,o)):(r=dl(r,i),o=n(o,a)),function(s){return o(r(s))}}function dA(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]=dl(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 gA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function mA(){var t=kd,e=kd,n=al,r,i,o,a=br,s,u,l;function c(){var f=Math.min(t.length,e.length);return a!==br&&(a=hA(t[0],t[f-1])),s=f>2?dA:pA,u=l=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((l||(l=s(e,t.map(r),we)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,fA),c()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),c()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=I$,c()},h.clamp=function(f){return arguments.length?(a=f?!0:br,c()):a!==br},h.interpolate=function(f){return arguments.length?(n=f,c()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,c()}}function yA(){return mA()(br,br)}function bA(t,e,n,r){var i=T_(t,e,n),o;switch(r=aa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=sA(i,a))&&(r.precision=o),Td(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=uA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=aA(i))&&(r.precision=o-(r.type==="%")*2);break}}return Dd(r)}function Id(t){var e=t.domain;return t.ticks=function(n){var r=e();return D_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return bA(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,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=Zu(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function Nd(){var t=yA();return t.copy=function(){return gA(t,Nd())},ua.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 l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},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)},ua.apply(Id(a),arguments)}function yi(t,e,n){this.k=t,this.x=e,this.y=n}yi.prototype={constructor:yi,scale:function(t){return t===1?this:new yi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new yi(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+")"}},yi.prototype;function la(t){return Object.prototype.toString.call(t)==="[object Object]"}function gl(t,e){if(la(t)===!1||la(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;la(r[a])&&la(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var ml=function(t,e){return ml=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])},ml(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");ml(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function vA(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(c){try{l(r.next(c))}catch(h){a(h)}}function u(c){try{l(r.throw(c))}catch(h){a(h)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((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(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function vr(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 bi(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 vi(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 xr(t){return this instanceof xr?(this.v=t,this):new xr(t)}function xA(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{l(r[p](d))}catch(g){f(o[0][3],g)}}function l(p){p.value instanceof xr?Promise.resolve(p.value.v).then(c,h):f(o[0][2],p)}function c(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 _A(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 vr=="function"?vr(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(l){o({value:l,done:s})},a)}}function Ft(t){return typeof t=="function"}function yl(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 bl=yl(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Ou(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Go=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=ur(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.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 c=this.initialTeardown;if(yt(c))try{c()}catch(g){o=g instanceof zu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=ur(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{cp(d)}catch(g){o=o??[],g instanceof zu?o=ui(ui([],lr(o)),lr(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 zu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)cp(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)&&Ou(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ou(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),up=Go.EMPTY;function lp(t){return t instanceof Go||t&&"closed"in t&&yt(t.remove)&&yt(t.add)&&yt(t.unsubscribe)}function cp(t){yt(t)?t():t.unsubscribe()}var fp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},hp={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],lr(n)))},clearTimeout:function(t){var e=hp.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function pp(t){hp.setTimeout(function(){throw t})}function Uu(){}function zo(t){t()}var Bu=function(t){Mn(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,lp(n)&&n.add(r)):r.destination=Ax,r}return e.create=function(n,r,i){return new li(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}(Go),wx=Function.prototype.bind;function Yu(t,e){return wx.call(t,e)}var $x=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){Oo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Oo(r)}else Oo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Oo(n)}},t}(),li=function(t){Mn(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&&fp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Yu(n.next,s),error:n.error&&Yu(n.error,s),complete:n.complete&&Yu(n.complete,s)}):a=n}return o.destination=new $x(a),o}return e}(Bu);function Oo(t){pp(t)}function Sx(t){throw t}var Ax={closed:!0,next:Uu,error:Sx,complete:Uu},Hu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function fr(t){return t}function Mx(t){return t.length===0?fr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var pt=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=Px(e)?e:new li(e,n,r);return zo(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=dp(n),new n(function(i,o){var a=new li({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[Hu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Mx(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=dp(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 dp(t){var e;return(e=t??fp.Promise)!==null&&e!==void 0?e:Promise}function Dx(t){return t&&yt(t.next)&&yt(t.error)&&yt(t.complete)}function Px(t){return t&&t instanceof Bu||Dx(t)&&lp(t)}function Tx(t){return yt(t==null?void 0:t.lift)}function fe(t){return function(e){if(Tx(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 Lx(t,e,n,r,i)}var Lx=function(t){Mn(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(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}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}(Bu),Cx=Gu(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),et=function(t){Mn(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 gp(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Cx},e.prototype.next=function(n){var r=this;zo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=ur(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}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;zo(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;zo(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?up:(this.currentObservers=null,s.push(n),new Go(function(){r.currentObservers=null,Ou(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 pt;return n.source=this,n},e.create=function(n,r){return new gp(n,r)},e}(pt),gp=function(t){Mn(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:up},e}(et),Ex=function(t){Mn(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}(et),mp={now:function(){return(mp.delegate||Date).now()},delegate:void 0},kx=function(t){Mn(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=mp);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(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(et),yp=new pt(function(t){return t.complete()});function Rx(t){return t&&yt(t.schedule)}function Wu(t){return t[t.length-1]}function Ix(t){return yt(Wu(t))?t.pop():void 0}function Vu(t){return Rx(Wu(t))?t.pop():void 0}function Nx(t,e){return typeof Wu(t)=="number"?t.pop():e}var ju=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function bp(t){return yt(t==null?void 0:t.then)}function vp(t){return yt(t[Hu])}function xp(t){return Symbol.asyncIterator&&yt(t==null?void 0:t[Symbol.asyncIterator])}function _p(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 Fx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var wp=Fx();function $p(t){return yt(t==null?void 0:t[wp])}function Sp(t){return xx(this,arguments,function(){var n,r,i,o;return sp(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 Ap(t){return yt(t==null?void 0:t.getReader)}function he(t){if(t instanceof pt)return t;if(t!=null){if(vp(t))return Gx(t);if(ju(t))return zx(t);if(bp(t))return Ox(t);if(xp(t))return Mp(t);if($p(t))return Ux(t);if(Ap(t))return Bx(t)}throw _p(t)}function Gx(t){return new pt(function(e){var n=t[Hu]();if(yt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function zx(t){return new pt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Ox(t){return new pt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,pp)})}function Ux(t){return new pt(function(e){var n,r;try{for(var i=ur(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 Mp(t){return new pt(function(e){Yx(t,e).catch(function(n){return e.error(n)})})}function Bx(t){return Mp(Sp(t))}function Yx(t,e){var n,r,i,o;return vx(this,void 0,void 0,function(){var a,s;return sp(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=_x(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 ln(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 Dp(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(ae(r,function(i){return ln(r,t,function(){return r.next(i)},e)},function(){return ln(r,t,function(){return r.complete()},e)},function(i){return ln(r,t,function(){return r.error(i)},e)}))})}function Pp(t,e){return e===void 0&&(e=0),fe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Hx(t,e){return he(t).pipe(Pp(e),Dp(e))}function Wx(t,e){return he(t).pipe(Pp(e),Dp(e))}function Vx(t,e){return new pt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function jx(t,e){return new pt(function(n){var r;return ln(n,e,function(){r=t[wp](),ln(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 Tp(t,e){if(!t)throw new Error("Iterable cannot be null");return new pt(function(n){ln(n,e,function(){var r=t[Symbol.asyncIterator]();ln(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function qx(t,e){return Tp(Sp(t),e)}function Xx(t,e){if(t!=null){if(vp(t))return Hx(t,e);if(ju(t))return Vx(t,e);if(bp(t))return Wx(t,e);if(xp(t))return Tp(t,e);if($p(t))return jx(t,e);if(Ap(t))return qx(t,e)}throw _p(t)}function Uo(t,e){return e?Xx(t,e):he(t)}function Bo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Vu(t);return Uo(t,n)}var Lp=Gu(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function O(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(r,function(o){r.next(t.call(e,o,i++))}))})}var Zx=Array.isArray;function Kx(t,e){return Zx(e)?t.apply(void 0,ui([],lr(e))):t(e)}function Cp(t){return O(function(e){return Kx(t,e)})}var Qx=Array.isArray,Jx=Object.getPrototypeOf,t_=Object.prototype,e_=Object.keys;function n_(t){if(t.length===1){var e=t[0];if(Qx(e))return{args:e,keys:null};if(r_(e)){var n=e_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function r_(t){return t&&typeof t=="object"&&Jx(t)===t_}function i_(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=Vu(t),r=Ix(t),i=n_(t),o=i.args,a=i.keys;if(o.length===0)return Uo([],n);var s=new pt(o_(o,n,a?function(u){return i_(a,u)}:fr));return r?s.pipe(Cp(r)):s}function o_(t,e,n){return n===void 0&&(n=fr),function(r){Ep(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(c){Ep(e,function(){var h=Uo(t[c],e),f=!1;h.subscribe(ae(r,function(p){o[c]=p,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},l=0;l<i;l++)u(l)},r)}}function Ep(t,e,n){t?ln(n,t,e):e()}function a_(t,e,n,r,i,o,a,s){var u=[],l=0,c=0,h=!1,f=function(){h&&!u.length&&!l&&e.complete()},p=function(g){return l<r?d(g):u.push(g)},d=function(g){l++;var m=!1;he(n(g,c++)).subscribe(ae(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{l--;for(var y=function(){var x=u.shift();a||d(x)};u.length&&l<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(ae(e,p,function(){h=!0,f()})),function(){}}function qu(t,e,n){return n===void 0&&(n=1/0),yt(e)?qu(function(r,i){return O(function(o,a){return e(r,o,i,a)})(he(t(r,i)))},n):(typeof e=="number"&&(n=e),fe(function(r,i){return a_(r,i,t,n)}))}function s_(t){return t===void 0&&(t=1/0),qu(fr,t)}function u_(t){return new pt(function(e){he(t()).subscribe(e)})}var l_=["addListener","removeListener"],c_=["addEventListener","removeEventListener"],f_=["on","off"];function Xu(t,e,n,r){if(yt(n)&&(r=n,n=void 0),r)return Xu(t,e,n).pipe(Cp(r));var i=lr(d_(t)?c_.map(function(s){return function(u){return t[s](e,u,n)}}):h_(t)?l_.map(kp(t,e)):p_(t)?f_.map(kp(t,e)):[],2),o=i[0],a=i[1];if(!o&&ju(t))return qu(function(s){return Xu(s,e,n)})(he(t));if(!o)throw new TypeError("Invalid event target");return new pt(function(s){var u=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return s.next(1<l.length?l:l[0])};return o(u),function(){return a(u)}})}function kp(t,e){return function(n){return function(r){return t[n](e,r)}}}function h_(t){return yt(t.addListener)&&yt(t.removeListener)}function p_(t){return yt(t.on)&&yt(t.off)}function d_(t){return yt(t.addEventListener)&&yt(t.removeEventListener)}function g_(t,e,n){return u_(function(){return t()?e:n})}function Zu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Vu(t),r=Nx(t,1/0),i=t;return i.length?i.length===1?he(i[0]):s_(r)(Uo(i,n)):yp}function hr(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 m_(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 y_(t){return t<=0?function(){return yp}:fe(function(e,n){var r=0;e.subscribe(ae(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function rt(t,e){return e===void 0&&(e=fr),t=t??b_,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 b_(t,e){return t===e}function v_(t){return t===void 0&&(t=x_),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 x_(){return new Lp}function __(t,e){var n=arguments.length>=2;return function(r){return r.pipe(fr,y_(1),n?m_(e):v_(function(){return new Lp}))}}function w_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new et}: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(l){var c,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),c=f=void 0,d=g=!1},x=function(){var v=c;y(),v==null||v.unsubscribe()};return fe(function(v,b){p++,!g&&!d&&m();var w=f=f??n();b.add(function(){p--,p===0&&!g&&!d&&(h=Ku(x,u))}),w.subscribe(b),!c&&p>0&&(c=new li({next:function(D){return w.next(D)},error:function(D){g=!0,m(),h=Ku(y,i,D),w.error(D)},complete:function(){d=!0,m(),h=Ku(y,a),w.complete()}}),he(v).subscribe(c))})(l)}}function Ku(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 li({next:function(){i.unsubscribe(),t()}});return he(e.apply(void 0,ui([],lr(n)))).subscribe(i)}}function Pt(t,e,n){var r,i=!1;return r=t,w_({connector:function(){return new kx(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 l=0,c=o++;he(t(u,c)).subscribe(i=ae(r,function(h){return r.next(e?e(u,h,c,l++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function I(t){return fe(function(e,n){he(t).subscribe(ae(n,function(){return n.complete()},Uu)),!n.closed&&e.subscribe(n)})}const pr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Yo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Rp(t){let e,n,r;t.length!==2?(e=Yo,n=(s,u)=>Yo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Yo||t===$_?t:S_,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const h=l+c>>>1;n(s[h],u)<0?l=h+1:c=h}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const h=l+c>>>1;n(s[h],u)<=0?l=h+1:c=h}while(l<c)}return l}function a(s,u,l=0,c=s.length){const h=i(s,u,l,c-1);return h>l&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function S_(){return 0}function A_(t){return t===null?NaN:+t}const M_=Rp(Yo),Ip=M_.right;Rp(A_).center;class Np extends Map{constructor(e,n=T_){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(Fp(this,e))}has(e){return super.has(Fp(this,e))}set(e,n){return super.set(D_(this,e),n)}delete(e){return super.delete(P_(this,e))}}function Fp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function D_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function P_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function T_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const L_=Math.sqrt(50),C_=Math.sqrt(10),E_=Math.sqrt(2);function Ho(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>=L_?10:o>=C_?5:o>=E_?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?Ho(t,e,n*2):[s,u,l]}function k_(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?Ho(e,t,n):Ho(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function Qu(t,e,n){return e=+e,t=+t,n=+n,Ho(t,e,n)[2]}function R_(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 I_(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 N_={value:()=>{}};function Gp(){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 Wo(n)}function Wo(t){this._=t}function F_(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}})}Wo.prototype=Gp.prototype={constructor:Wo,on:function(t,e){var n=this._,r=F_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=G_(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]=zp(n[i],t.name,e);else if(e==null)for(i in n)n[i]=zp(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 Wo(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 G_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function zp(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=N_,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 Op={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 Vo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Op.hasOwnProperty(e)?{space:Op[e],local:t}:t}function z_(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 O_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Up(t){var e=Vo(t);return(e.local?O_:z_)(e)}function U_(){}function tl(t){return t==null?U_:function(){return this.querySelector(t)}}function B_(t){typeof t!="function"&&(t=tl(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,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new _e(r,this._parents)}function Y_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function H_(){return[]}function Bp(t){return t==null?H_:function(){return this.querySelectorAll(t)}}function W_(t){return function(){return Y_(t.apply(this,arguments))}}function V_(t){typeof t=="function"?t=W_(t):t=Bp(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,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new _e(r,i)}function Yp(t){return function(){return this.matches(t)}}function Hp(t){return function(e){return e.matches(t)}}var j_=Array.prototype.find;function q_(t){return function(){return j_.call(this.children,t)}}function X_(){return this.firstElementChild}function Z_(t){return this.select(t==null?X_:q_(typeof t=="function"?t:Hp(t)))}var K_=Array.prototype.filter;function Q_(){return Array.from(this.children)}function J_(t){return function(){return K_.call(this.children,t)}}function tw(t){return this.selectAll(t==null?Q_:J_(typeof t=="function"?t:Hp(t)))}function ew(t){typeof t!="function"&&(t=Yp(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new _e(r,this._parents)}function Wp(t){return new Array(t.length)}function nw(){return new _e(this._enter||this._groups.map(Wp),this._parents)}function jo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}jo.prototype={constructor:jo,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 rw(t){return function(){return t}}function iw(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new jo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function ow(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,h=o.length,f=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new jo(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(f[s])===u&&(i[s]=u)}function aw(t){return t.__data__}function sw(t,e){if(!arguments.length)return Array.from(this,aw);var n=e?ow:iw,r=this._parents,i=this._groups;typeof t!="function"&&(t=rw(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,p=uw(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),y=u[l]=new Array(f);n(c,h,g,m,y,p,e);for(var x=0,v=0,b,w;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!(w=m[v])&&++v<d;);b._next=w||null}}return a=new _e(a,r),a._enter=s,a._exit=u,a}function uw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lw(){return new _e(this._exit||this._groups.map(Wp),this._parents)}function cw(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 fw(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 l=n[u],c=r[u],h=l.length,f=s[u]=new Array(h),p,d=0;d<h;++d)(p=l[d]||c[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new _e(s,this._parents)}function hw(){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 pw(t){t||(t=dw);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),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new _e(i,this._parents).order()}function dw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function gw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function mw(){return Array.from(this)}function yw(){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 bw(){let t=0;for(const e of this)++t;return t}function vw(){return!this.node()}function xw(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 _w(t){return function(){this.removeAttribute(t)}}function ww(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $w(t,e){return function(){this.setAttribute(t,e)}}function Sw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Aw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Mw(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 Dw(t,e){var n=Vo(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?ww:_w:typeof e=="function"?n.local?Mw:Aw:n.local?Sw:$w)(n,e))}function Vp(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Pw(t){return function(){this.style.removeProperty(t)}}function Tw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Lw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Cw(t,e,n){return arguments.length>1?this.each((e==null?Pw:typeof e=="function"?Lw:Tw)(t,e,n??"")):dr(this.node(),t)}function dr(t,e){return t.style.getPropertyValue(e)||Vp(t).getComputedStyle(t,null).getPropertyValue(e)}function Ew(t){return function(){delete this[t]}}function kw(t,e){return function(){this[t]=e}}function Rw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Iw(t,e){return arguments.length>1?this.each((e==null?Ew:typeof e=="function"?Rw:kw)(t,e)):this.node()[t]}function jp(t){return t.trim().split(/^|\s+/)}function el(t){return t.classList||new qp(t)}function qp(t){this._node=t,this._names=jp(t.getAttribute("class")||"")}qp.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 Xp(t,e){for(var n=el(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Zp(t,e){for(var n=el(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Nw(t){return function(){Xp(this,t)}}function Fw(t){return function(){Zp(this,t)}}function Gw(t,e){return function(){(e.apply(this,arguments)?Xp:Zp)(this,t)}}function zw(t,e){var n=jp(t+"");if(arguments.length<2){for(var r=el(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Gw:e?Nw:Fw)(n,e))}function Ow(){this.textContent=""}function Uw(t){return function(){this.textContent=t}}function Bw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Yw(t){return arguments.length?this.each(t==null?Ow:(typeof t=="function"?Bw:Uw)(t)):this.node().textContent}function Hw(){this.innerHTML=""}function Ww(t){return function(){this.innerHTML=t}}function Vw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function jw(t){return arguments.length?this.each(t==null?Hw:(typeof t=="function"?Vw:Ww)(t)):this.node().innerHTML}function qw(){this.nextSibling&&this.parentNode.appendChild(this)}function Xw(){return this.each(qw)}function Zw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Kw(){return this.each(Zw)}function Qw(t){var e=typeof t=="function"?t:Up(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Jw(){return null}function t$(t,e){var n=typeof t=="function"?t:Up(t),r=e==null?Jw:typeof e=="function"?e:tl(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function e$(){var t=this.parentNode;t&&t.removeChild(this)}function n$(){return this.each(e$)}function r$(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function i$(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function o$(t){return this.select(t?i$:r$)}function a$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function s$(t){return function(e){t.call(this,e,this.__data__)}}function u$(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function l$(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,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 c$(t,e,n){return function(){var r=this.__on,i,o=s$(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 f$(t,e,n){var r=u$(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?c$:l$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Kp(t,e,n){var r=Vp(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 h$(t,e){return function(){return Kp(this,t,e)}}function p$(t,e){return function(){return Kp(this,t,e.apply(this,arguments))}}function d$(t,e){return this.each((typeof e=="function"?p$:h$)(t,e))}function*g$(){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 m$=[null];function _e(t,e){this._groups=t,this._parents=e}function ci(){return new _e([[document.documentElement]],m$)}function y$(){return this}_e.prototype=ci.prototype={constructor:_e,select:B_,selectAll:V_,selectChild:Z_,selectChildren:tw,filter:ew,data:sw,enter:nw,exit:lw,join:cw,merge:fw,selection:y$,order:hw,sort:pw,call:gw,nodes:mw,node:yw,size:bw,empty:vw,each:xw,attr:Dw,style:Cw,property:Iw,classed:zw,text:Yw,html:jw,raise:Xw,lower:Kw,append:Qw,insert:t$,remove:n$,clone:o$,datum:a$,on:f$,dispatch:d$,[Symbol.iterator]:g$};function nl(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Qp(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fi(){}var hi=.7,qo=1/hi,gr="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b$=/^#([0-9a-f]{3,8})$/,v$=new RegExp(`^rgb\\(${gr},${gr},${gr}\\)$`),x$=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),_$=new RegExp(`^rgba\\(${gr},${gr},${gr},${pi}\\)$`),w$=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${pi}\\)$`),$$=new RegExp(`^hsl\\(${pi},${Ee},${Ee}\\)$`),S$=new RegExp(`^hsla\\(${pi},${Ee},${Ee},${pi}\\)$`),Jp={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};nl(fi,Dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:td,formatHex:td,formatHex8:A$,formatHsl:M$,formatRgb:ed,toString:ed});function td(){return this.rgb().formatHex()}function A$(){return this.rgb().formatHex8()}function M$(){return ad(this).formatHsl()}function ed(){return this.rgb().formatRgb()}function Dn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=b$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?nd(e):n===3?new ne(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Xo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Xo(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=v$.exec(t))?new ne(e[1],e[2],e[3],1):(e=x$.exec(t))?new ne(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=_$.exec(t))?Xo(e[1],e[2],e[3],e[4]):(e=w$.exec(t))?Xo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=$$.exec(t))?od(e[1],e[2]/100,e[3]/100,1):(e=S$.exec(t))?od(e[1],e[2]/100,e[3]/100,e[4]):Jp.hasOwnProperty(t)?nd(Jp[t]):t==="transparent"?new ne(NaN,NaN,NaN,0):null}function nd(t){return new ne(t>>16&255,t>>8&255,t&255,1)}function Xo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ne(t,e,n,r)}function D$(t){return t instanceof fi||(t=Dn(t)),t?(t=t.rgb(),new ne(t.r,t.g,t.b,t.opacity)):new ne}function rl(t,e,n,r){return arguments.length===1?D$(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}nl(ne,rl,Qp(fi,{brighter(t){return t=t==null?qo:Math.pow(qo,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?hi:Math.pow(hi,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),Zo(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:rd,formatHex:rd,formatHex8:P$,formatRgb:id,toString:id}));function rd(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}`}function P$(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}${Tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function id(){const t=Zo(this.opacity);return`${t===1?"rgb(":"rgba("}${Pn(this.r)}, ${Pn(this.g)}, ${Pn(this.b)}${t===1?")":`, ${t})`}`}function Zo(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 od(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new we(t,e,n,r)}function ad(t){if(t instanceof we)return new we(t.h,t.s,t.l,t.opacity);if(t instanceof fi||(t=Dn(t)),!t)return new we;if(t instanceof we)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 we(a,s,u,t.opacity)}function T$(t,e,n,r){return arguments.length===1?ad(t):new we(t,e,n,r??1)}function we(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}nl(we,T$,Qp(fi,{brighter(t){return t=t==null?qo:Math.pow(qo,t),new we(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?hi:Math.pow(hi,t),new we(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(il(t>=240?t-240:t+120,i,r),il(t,i,r),il(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new we(sd(this.h),Ko(this.s),Ko(this.l),Zo(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=Zo(this.opacity);return`${t===1?"hsl(":"hsla("}${sd(this.h)}, ${Ko(this.s)*100}%, ${Ko(this.l)*100}%${t===1?")":`, ${t})`}`}}));function sd(t){return t=(t||0)%360,t<0?t+360:t}function Ko(t){return Math.max(0,Math.min(1,t||0))}function il(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 ol=t=>()=>t;function L$(t,e){return function(n){return t+n*e}}function C$(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 E$(t){return(t=+t)==1?ud:function(e,n){return n-e?C$(e,n,t):ol(isNaN(e)?n:e)}}function ud(t,e){var n=e-t;return n?L$(t,n):ol(isNaN(t)?e:t)}const Qo=function t(e){var n=E$(e);function r(i,o){var a=n((i=rl(i)).r,(o=rl(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=ud(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function k$(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 R$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function I$(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]=ul(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 N$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function $e(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function F$(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]=ul(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var al=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(al.source,"g");function G$(t){return function(){return t}}function z$(t){return function(e){return t(e)+""}}function ld(t,e){var n=al.lastIndex=sl.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=al.exec(t))&&(i=sl.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:$e(r,i)})),n=sl.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?z$(u[0].x):G$(e):(e=u.length,function(l){for(var c=0,h;c<e;++c)s[(h=u[c]).i]=h.x(l);return s.join("")})}function ul(t,e){var n=typeof e,r;return e==null||n==="boolean"?ol(e):(n==="number"?$e:n==="string"?(r=Dn(e))?(e=r,Qo):ld:e instanceof Dn?Qo:e instanceof Date?N$:R$(e)?k$:Array.isArray(e)?I$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?F$:$e)(t,e)}function O$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var cd=180/Math.PI,fd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function hd(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)*cd,skewX:Math.atan(u)*cd,scaleX:a,scaleY:s}}var Jo;function U$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?fd:hd(e.a,e.b,e.c,e.d,e.e,e.f)}function B$(t){return t==null||(Jo||(Jo=document.createElementNS("http://www.w3.org/2000/svg","g")),Jo.setAttribute("transform",t),!(t=Jo.transform.baseVal.consolidate()))?fd:(t=t.matrix,hd(t.a,t.b,t.c,t.d,t.e,t.f))}function pd(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,h,f,p,d){if(l!==h||c!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:$e(l,h)},{i:g-2,x:$e(c,f)})}else(h||f)&&p.push("translate("+h+e+f+n)}function a(l,c,h,f){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:$e(l,c)})):c&&h.push(i(h)+"rotate("+c+r)}function s(l,c,h,f){l!==c?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:$e(l,c)}):c&&h.push(i(h)+"skewX("+c+r)}function u(l,c,h,f,p,d){if(l!==h||c!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:$e(l,h)},{i:g-2,x:$e(c,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(l,c){var h=[],f=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,h,f),a(l.rotate,c.rotate,h,f),s(l.skewX,c.skewX,h,f),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,f),l=c=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 Y$=pd(U$,"px, ","px)","deg)"),H$=pd(B$,", ",")",")"),mr=0,di=0,gi=0,dd=1e3,ta,mi,ea=0,Ln=0,na=0,yi=typeof performance=="object"&&performance.now?performance:Date,gd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ll(){return Ln||(gd(W$),Ln=yi.now()+na)}function W$(){Ln=0}function ra(){this._call=this._time=this._next=null}ra.prototype=md.prototype={constructor:ra,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ll():+n)+(e==null?0:+e),!this._next&&mi!==this&&(mi?mi._next=this:ta=this,mi=this),this._call=t,this._time=n,cl()},stop:function(){this._call&&(this._call=null,this._time=1/0,cl())}};function md(t,e,n){var r=new ra;return r.restart(t,e,n),r}function V$(){ll(),++mr;for(var t=ta,e;t;)(e=Ln-t._time)>=0&&t._call.call(void 0,e),t=t._next;--mr}function yd(){Ln=(ea=yi.now())+na,mr=di=0;try{V$()}finally{mr=0,q$(),Ln=0}}function j$(){var t=yi.now(),e=t-ea;e>dd&&(na-=e,ea=t)}function q$(){for(var t,e=ta,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:ta=n);mi=t,cl(r)}function cl(t){if(!mr){di&&(di=clearTimeout(di));var e=t-Ln;e>24?(t<1/0&&(di=setTimeout(yd,t-yi.now()-na)),gi&&(gi=clearInterval(gi))):(gi||(ea=yi.now(),gi=setInterval(j$,dd)),mr=1,gd(yd))}}function bd(t,e,n){var r=new ra;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var X$=Gp("start","end","cancel","interrupt"),Z$=[],vd=0,xd=1,fl=2,ia=3,_d=4,hl=5,oa=6;function aa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;K$(t,n,{name:e,index:r,group:i,on:X$,tween:Z$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:vd})}function pl(t,e){var n=Se(t,e);if(n.state>vd)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=Se(t,e);if(n.state>ia)throw new Error("too late; already running");return n}function Se(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function K$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=md(o,0,n.time);function o(l){n.state=xd,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,h,f,p;if(n.state!==xd)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===ia)return bd(a);p.state===_d?(p.state=oa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=oa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(bd(function(){n.state===ia&&(n.state=_d,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=fl,n.on.call("start",t,t.__data__,n.index,n.group),n.state===fl){for(n.state=ia,i=new Array(f=n.tween.length),c=0,h=-1;c<f;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=hl,1),h=-1,f=i.length;++h<f;)i[h].call(t,c);n.state===hl&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=oa,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Q$(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>fl&&r.state<hl,r.state=oa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function J$(t){return this.each(function(){Q$(this,t)})}function tS(t,e){var n,r;return function(){var i=ke(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 eS(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=ke(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function nS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Se(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?tS:eS)(n,t,e))}function dl(t,e,n){var r=t._id;return t.each(function(){var i=ke(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Se(i,r).value[e]}}function wd(t,e){var n;return(typeof e=="number"?$e:e instanceof Dn?Qo:(n=Dn(e))?(e=n,Qo):ld)(t,e)}function rS(t){return function(){this.removeAttribute(t)}}function iS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function oS(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 aS(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 sS(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 uS(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 lS(t,e){var n=Vo(t),r=n==="transform"?H$:wd;return this.attrTween(t,typeof e=="function"?(n.local?uS:sS)(n,r,dl(this,"attr."+t,e)):e==null?(n.local?iS:rS)(n):(n.local?aS:oS)(n,r,e))}function cS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function fS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function hS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&fS(t,o)),n}return i._value=e,i}function pS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&cS(t,o)),n}return i._value=e,i}function dS(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=Vo(t);return this.tween(n,(r.local?hS:pS)(r,e))}function gS(t,e){return function(){pl(this,t).delay=+e.apply(this,arguments)}}function mS(t,e){return e=+e,function(){pl(this,t).delay=e}}function yS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?gS:mS)(e,t)):Se(this.node(),e).delay}function bS(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function vS(t,e){return e=+e,function(){ke(this,t).duration=e}}function xS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?bS:vS)(e,t)):Se(this.node(),e).duration}function _S(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function wS(t){var e=this._id;return arguments.length?this.each(_S(e,t)):Se(this.node(),e).ease}function $S(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function SS(t){if(typeof t!="function")throw new Error;return this.each($S(this._id,t))}function AS(t){typeof t!="function"&&(t=Yp(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ve(r,this._parents,this._name,this._id)}function MS(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],l=n[s],c=u.length,h=a[s]=new Array(c),f,p=0;p<c;++p)(f=u[p]||l[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new Ve(a,this._parents,this._name,this._id)}function DS(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 PS(t,e,n){var r,i,o=DS(e)?pl:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function TS(t,e){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(t):this.each(PS(n,t,e))}function LS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function CS(){return this.on("end.remove",LS(this._id))}function ES(t){var e=this._name,n=this._id;typeof t!="function"&&(t=tl(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,l=o[a]=new Array(u),c,h,f=0;f<u;++f)(c=s[f])&&(h=t.call(c,c.__data__,f,s))&&("__data__"in c&&(h.__data__=c.__data__),l[f]=h,aa(l[f],e,n,f,l,Se(c,n)));return new Ve(o,this._parents,e,n)}function kS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Bp(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,h=0;h<l;++h)if(c=u[h]){for(var f=t.call(c,c.__data__,h,u),p,d=Se(c,n),g=0,m=f.length;g<m;++g)(p=f[g])&&aa(p,e,n,g,f,d);o.push(f),a.push(c)}return new Ve(o,a,e,n)}var RS=ci.prototype.constructor;function IS(){return new RS(this._groups,this._parents)}function NS(t,e){var n,r,i;return function(){var o=dr(this,t),a=(this.style.removeProperty(t),dr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function $d(t){return function(){this.style.removeProperty(t)}}function FS(t,e,n){var r,i=n+"",o;return function(){var a=dr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function GS(t,e,n){var r,i,o;return function(){var a=dr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),dr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function zS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=ke(this,t),l=u.on,c=u.value[o]==null?s||(s=$d(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function OS(t,e,n){var r=(t+="")=="transform"?Y$:wd;return e==null?this.styleTween(t,NS(t,r)).on("end.style."+t,$d(t)):typeof e=="function"?this.styleTween(t,GS(t,r,dl(this,"style."+t,e))).each(zS(this._id,t)):this.styleTween(t,FS(t,r,e),n).on("end.style."+t,null)}function US(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function BS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&US(t,a,n)),r}return o._value=e,o}function YS(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,BS(t,e,n??""))}function HS(t){return function(){this.textContent=t}}function WS(t){return function(){var e=t(this);this.textContent=e??""}}function VS(t){return this.tween("text",typeof t=="function"?WS(dl(this,"text",t)):HS(t==null?"":t+""))}function jS(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)&&jS(i)),e}return r._value=t,r}function XS(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 ZS(){for(var t=this._name,e=this._id,n=Sd(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var c=Se(u,e);aa(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ve(r,this._parents,t,n)}function KS(){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 l=ke(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var QS=0;function Ve(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Sd(){return++QS}var je=ci.prototype;Ve.prototype={constructor:Ve,select:ES,selectAll:kS,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:AS,merge:MS,selection:IS,transition:ZS,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:TS,attr:lS,attrTween:dS,style:OS,styleTween:YS,text:VS,textTween:XS,remove:CS,tween:nS,delay:yS,duration:xS,ease:wS,easeVarying:SS,end:KS,[Symbol.iterator]:je[Symbol.iterator]};function JS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var tA={time:null,delay:0,duration:250,ease:JS};function eA(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 nA(t){var e,n;t instanceof Ve?(e=t._id,t=t._name):(e=Sd(),(n=tA).time=ll(),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,l=0;l<s;++l)(u=a[l])&&aa(u,t,e,l,a,n||eA(u,e));return new Ve(r,this._parents,t,e)}ci.prototype.interrupt=J$,ci.prototype.transition=nA;function rA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sa(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=sa(Math.abs(t)),t?t[1]:NaN}function iA(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 oA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var aA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ua(t){if(!(e=aA.exec(t)))throw new Error("invalid format: "+t);var e;return new gl({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]})}ua.prototype=gl.prototype;function gl(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+""}gl.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 sA(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 Ad;function uA(t,e){var n=sa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Ad=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")+sa(t,Math.max(0,e+o-1))[0]}function Md(t,e){var n=sa(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 Dd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:rA,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)=>Md(t*100,e),r:Md,s:uA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Pd(t){return t}var Td=Array.prototype.map,Ld=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lA(t){var e=t.grouping===void 0||t.thousands===void 0?Pd:iA(Td.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?Pd:oA(Td.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 l(h){h=ua(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,w=h.type;w==="n"?(x=!0,w="g"):Dd[w]||(v===void 0&&(v=12),b=!0,w="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var D=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T=g==="$"?r:/[%p]/.test(w)?a:"",$=Dd[w],_=/[defgprs%]/.test(w);v=v===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function P(S){var G=D,k=T,A,L,M;if(w==="c")k=$(S)+k,S="";else{S=+S;var z=S<0||1/S<0;if(S=isNaN(S)?u:$(Math.abs(S),v),b&&(S=sA(S)),z&&+S==0&&d!=="+"&&(z=!1),G=(z?d==="("?d:s:d==="-"||d==="("?"":d)+G,k=(w==="s"?Ld[8+Ad/3]:"")+k+(z&&d==="("?")":""),_){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 U=G.length+S.length+k.length,E=U<y?new Array(y-U+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-k.length:1/0),E=""),p){case"<":S=G+S+k+E;break;case"=":S=G+E+S+k;break;case"^":S=E.slice(0,U=E.length>>1)+G+S+k+E.slice(U);break;default:S=E+G+S+k;break}return o(S)}return P.toString=function(){return h+""},P}function c(h,f){var p=l((h=ua(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(yr(f)/3)))*3,g=Math.pow(10,-d),m=Ld[8+d/3];return function(y){return p(g*y)+m}}return{format:l,formatPrefix:c}}var la,Cd,Ed;cA({thousands:",",grouping:[3],currency:["$",""]});function cA(t){return la=lA(t),Cd=la.format,Ed=la.formatPrefix,la}function fA(t){return Math.max(0,-yr(Math.abs(t)))}function hA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yr(e)/3)))*3-yr(Math.abs(t)))}function pA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,yr(e)-yr(t))+1}function ca(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const kd=Symbol("implicit");function Rd(){var t=new Np,e=[],n=[],r=kd;function i(o){let a=t.get(o);if(a===void 0){if(r!==kd)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 Np;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 Rd(e,n).unknown(r)},ca.apply(i,arguments),i}function Id(){var t=Rd().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,l=0,c=.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+l*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*c,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=I_(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,l=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(l=+f,h()):l},t.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),h()):c},t.copy=function(){return Id(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},ca.apply(h(),arguments)}function Nd(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Nd(e())},t}function dA(){return Nd(Id.apply(null,arguments).paddingInner(1))}function gA(t){return function(){return t}}function mA(t){return+t}var Fd=[0,1];function br(t){return t}function ml(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:gA(isNaN(e)?NaN:.5)}function yA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function bA(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=ml(i,r),o=n(a,o)):(r=ml(r,i),o=n(o,a)),function(s){return o(r(s))}}function vA(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]=ml(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Ip(t,s,1,r)-1;return o[u](i[u](s))}}function xA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function _A(){var t=Fd,e=Fd,n=ul,r,i,o,a=br,s,u,l;function c(){var f=Math.min(t.length,e.length);return a!==br&&(a=yA(t[0],t[f-1])),s=f>2?vA:bA,u=l=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((l||(l=s(e,t.map(r),$e)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,mA),c()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),c()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=O$,c()},h.clamp=function(f){return arguments.length?(a=f?!0:br,c()):a!==br},h.interpolate=function(f){return arguments.length?(n=f,c()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,c()}}function wA(){return _A()(br,br)}function $A(t,e,n,r){var i=R_(t,e,n),o;switch(r=ua(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=hA(i,a))&&(r.precision=o),Ed(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=pA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=fA(i))&&(r.precision=o-(r.type==="%")*2);break}}return Cd(r)}function Gd(t){var e=t.domain;return t.ticks=function(n){var r=e();return k_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return $A(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,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=Qu(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function zd(){var t=wA();return t.copy=function(){return xA(t,zd())},ca.apply(t,arguments),Gd(t)}function Od(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Ip(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 l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Od().domain([t,e]).range(i).unknown(o)},ca.apply(Gd(a),arguments)}function bi(t,e,n){this.k=t,this.x=e,this.y=n}bi.prototype={constructor:bi,scale:function(t){return t===1?this:new bi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new bi(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+")"}},bi.prototype;function fa(t){return Object.prototype.toString.call(t)==="[object Object]"}function yl(t,e){if(fa(t)===!1||fa(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;fa(r[a])&&fa(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var bl=function(t,e){return bl=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])},bl(t,e)};function Re(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");bl(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function SA(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(c){try{l(r.next(c))}catch(h){a(h)}}function u(c){try{l(r.throw(c))}catch(h){a(h)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(t,[])).next())})}function Ud(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(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function vr(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 vi(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 xi(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 xr(t){return this instanceof xr?(this.v=t,this):new xr(t)}function AA(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{l(r[p](d))}catch(g){f(o[0][3],g)}}function l(p){p.value instanceof xr?Promise.resolve(p.value.v).then(c,h):f(o[0][2],p)}function c(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 MA(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 vr=="function"?vr(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(l){o({value:l,done:s})},a)}}function Ft(t){return typeof t=="function"}function vl(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 xl=vl(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 xi=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=vr(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.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 c=this.initialTeardown;if(Ft(c))try{c()}catch(g){o=g instanceof bl?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=vr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{Ud(d)}catch(g){o=o??[],g instanceof bl?o=vi(vi([],bi(o)),bi(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 bl(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=xi.EMPTY;function Od(t){return t instanceof xi||t&&"closed"in t&&Ft(t.remove)&&Ft(t.add)&&Ft(t.unsubscribe)}function Ud(t){Ft(t)?t():t.unsubscribe()}var Bd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},wA={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,vi([t,e],bi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Yd(t){wA.setTimeout(function(){throw t})}function vl(){}function fa(t){t()}var xl=function(t){Ee(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=MA,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}(xi),$A=Function.prototype.bind;function _l(t,e){return $A.call(t,e)}var SA=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){ha(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){ha(r)}else ha(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){ha(n)}},t}(),_i=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&&Bd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&_l(n.next,s),error:n.error&&_l(n.error,s),complete:n.complete&&_l(n.complete,s)}):a=n}return o.destination=new SA(a),o}return e}(xl);function ha(t){Yd(t)}function AA(t){throw t}var MA={closed:!0,next:vl,error:AA,complete:vl},wl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Hd(t){return t}function PA(t){return t.length===0?Hd: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=TA(e)?e:new _i(e,n,r);return fa(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=Wd(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[wl]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return PA(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Wd(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 Wd(t){var e;return(e=t??Bd.Promise)!==null&&e!==void 0?e:Promise}function DA(t){return t&&Ft(t.next)&&Ft(t.error)&&Ft(t.complete)}function TA(t){return t&&t instanceof xl||DA(t)&&Od(t)}function LA(t){return Ft(t==null?void 0:t.lift)}function wi(t){return function(e){if(LA(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 CA(t,e,n,r,i)}var CA=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(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}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}(xl),EA=yl(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Si=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 qd(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new EA},e.prototype.next=function(n){var r=this;fa(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=vr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}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;fa(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;fa(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 xi(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 cn;return n.source=this,n},e.create=function(n,r){return new qd(n,r)},e}(cn),qd=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:zd},e}(Si),Vd=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}(Si),$l={now:function(){return($l.delegate||Date).now()},delegate:void 0},RA=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=$l);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(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(Si),kA=function(t){Ee(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(xi),jd={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,vi([t,e],bi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},IA=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),jd.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&&jd.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}(kA),Xd=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=$l.now,t}(),NA=function(t){Ee(e,t);function e(n,r){r===void 0&&(r=Xd.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}(Xd);new NA(IA);var FA=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function GA(t){return Ft(t==null?void 0:t.then)}function zA(t){return Ft(t[wl])}function OA(t){return Symbol.asyncIterator&&Ft(t==null?void 0:t[Symbol.asyncIterator])}function UA(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 BA(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var YA=BA();function HA(t){return Ft(t==null?void 0:t[YA])}function WA(t){return xA(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,xr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,xr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,xr(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 qA(t){return Ft(t==null?void 0:t.getReader)}function pa(t){if(t instanceof cn)return t;if(t!=null){if(zA(t))return VA(t);if(FA(t))return jA(t);if(GA(t))return XA(t);if(OA(t))return Zd(t);if(HA(t))return ZA(t);if(qA(t))return KA(t)}throw UA(t)}function VA(t){return new cn(function(e){var n=t[wl]();if(Ft(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function jA(t){return new cn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function XA(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,Yd)})}function ZA(t){return new cn(function(e){var n,r;try{for(var i=vr(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 Zd(t){return new cn(function(e){QA(t,e).catch(function(n){return e.error(n)})})}function KA(t){return Zd(WA(t))}function QA(t,e){var n,r,i,o;return vA(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=_A(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]}})})}yl(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Sl(t,e){return wi(function(n,r){var i=0;n.subscribe($i(r,function(o){r.next(t.call(e,o,i++))}))})}function JA(t,e){return e===void 0&&(e=Hd),t=t??t3,wi(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 t3(t,e){return t===e}function e3(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(l){var c,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),c=f=void 0,d=g=!1},x=function(){var v=c;y(),v==null||v.unsubscribe()};return wi(function(v,b){p++,!g&&!d&&m();var $=f=f??n();b.add(function(){p--,p===0&&!g&&!d&&(h=Al(x,u))}),$.subscribe(b),!c&&p>0&&(c=new _i({next:function(_){return $.next(_)},error:function(_){g=!0,m(),h=Al(y,i,_),$.error(_)},complete:function(){d=!0,m(),h=Al(y,a),$.complete()}}),pa(v).subscribe(c))})(l)}}function Al(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 pa(e.apply(void 0,vi([],bi(n)))).subscribe(i)}}function n3(t,e,n){var r,i=!1;return r=t,e3({connector:function(){return new RA(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function r3(t,e){return wi(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 l=0,c=o++;pa(t(u,c)).subscribe(i=$i(r,function(h){return r.next(e?e(u,h,c,l++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function i3(t){return wi(function(e,n){pa(t).subscribe($i(n,function(){return n.complete()},vl)),!n.closed&&e.subscribe(n)})}const o3=t=>t.pipe(Sl(e=>e.styles.textSize),JA(),Sl(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})),Kd=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=pr.scaleDomain,scaleRange:i=pr.scaleRange})=>{const o=r[0]??pr.scaleDomain[0],a=r[1]??pr.scaleDomain[1],s=i[0]??pr.scaleRange[0],u=i[1]??pr.scaleRange[1],l=o==="auto"?e:o,c=a==="auto"?t:a,h=t-(t-l)/(1-s),f=c/u;return Nd().domain([h,f]).range([0,n])},Qd=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return lA().domain(t).range(r).padding(n)},a3=({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 s3({name:t,defaultParams:e,initFn:n}){const r=new Si,i=new WeakMap;let o=()=>{},a;const s=new Vd(e),u=new Vd({}),l=s.pipe(r3(c=>u.pipe(i3(r),Sl(h=>gl(h,c)))),n3(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:c=>{s.next(gl(c,e))},setContext:c=>{a=c,a.observer.fullParams$=l}}}const Ai=()=>function(t,e){return function(n){return class{constructor(){const r=s3({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}}}},Ln=Ai(),se=Ai(),Re=Ai(),Jd=Ai(),tg=Ai();function wt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function eg(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function da(t){let e,n,r;t.length!==2?(e=wt,n=(s,u)=>wt(t(s),u),r=(s,u)=>t(s)-u):(e=t===wt||t===eg?t:u3,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const h=l+c>>>1;n(s[h],u)<0?l=h+1:c=h}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const h=l+c>>>1;n(s[h],u)<=0?l=h+1:c=h}while(l<c)}return l}function a(s,u,l=0,c=s.length){const h=i(s,u,l,c-1);return h>l&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function u3(){return 0}function ga(t){return t===null?NaN:+t}function*l3(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 ng=da(wt),rg=ng.right,c3=ng.left,f3=da(ga).center,Cn=rg;function h3(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=Ml(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 ig=og(Ml),p3=og(d3);function og(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),l=i.slice();return s&&u?(_r(s,l,i,o,a),_r(s,i,l,o,a),_r(s,l,i,o,a),wr(u,i,l,o,a),wr(u,l,i,o,a),wr(u,i,l,o,a)):s?(_r(s,i,l,o,a),_r(s,l,i,o,a),_r(s,i,l,o,a)):u&&(wr(u,i,l,o,a),wr(u,l,i,o,a),wr(u,i,l,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 wr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function d3(t){const e=Ml(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 Ml(t){const e=Math.floor(t);if(e===t)return g3(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let l=e*o[a];const c=u*e,h=c+u;for(let f=a,p=a+c;f<p;f+=u)l+=o[Math.min(s,f)];for(let f=a,p=s;f<=p;f+=u)l+=o[Math.min(s,f+c)],i[f]=(l+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,l-=o[Math.max(a,f-c)]}}function g3(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 l=i,c=i+u;l<c;l+=a)s+=r[Math.min(o,l)];for(let l=i,c=o;l<=c;l+=a)s+=r[Math.min(o,l+u)],n[l]=s/e,s-=r[Math.max(i,l-u)]}}function ma(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 m3(t){return t.length|0}function y3(t){return!(t>0)}function b3(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function v3(t){return e=>t(...e)}function x3(...t){const e=typeof t[t.length-1]=="function"&&v3(t.pop());t=t.map(b3);const n=t.map(m3),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(y3))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 _3(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 ag(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 sg(t,e){const n=ag(t,e);return n&&Math.sqrt(n)}function Mi(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 w3(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 $3(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 Pi extends Map{constructor(e,n=cg){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(Pl(this,e))}has(e){return super.has(Pl(this,e))}set(e,n){return super.set(ug(this,e),n)}delete(e){return super.delete(lg(this,e))}}class En extends Set{constructor(e,n=cg){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(Pl(this,e))}add(e){return super.add(ug(this,e))}delete(e){return super.delete(lg(this,e))}}function Pl({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function ug({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function lg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function cg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function $r(t){return t}function fg(t,...e){return Sr(t,$r,$r,e)}function hg(t,...e){return Sr(t,Array.from,$r,e)}function pg(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 S3(t,...e){return pg(hg(t,...e),e)}function A3(t,e,...n){return pg(gg(t,e,...n),n)}function dg(t,e,...n){return Sr(t,$r,e,n)}function gg(t,e,...n){return Sr(t,Array.from,e,n)}function M3(t,...e){return Sr(t,$r,mg,e)}function P3(t,...e){return Sr(t,Array.from,mg,e)}function mg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Sr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Pi,u=r[a++];let l=-1;for(const c of o){const h=u(c,++l,o),f=s.get(h);f?f.push(c):s.set(h,[c])}for(const[c,h]of s)s.set(c,i(h,a));return e(s)}(t,0)}function yg(t,e){return Array.from(e,n=>t[n])}function Dl(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=Ar(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Ar(n[i],n[o]))),yg(t,r)}return t.sort(Tl(n))}function Tl(t=wt){if(t===wt)return Ar;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 Ar(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function D3(t,e,n){return(e.length!==2?Dl(dg(t,e,n),([r,i],[o,a])=>wt(i,a)||wt(r,o)):Dl(fg(t,n),([r,i],[o,a])=>e(i,a)||wt(r,o))).map(([r])=>r)}var T3=Array.prototype,L3=T3.slice;function Ll(t){return()=>t}const C3=Math.sqrt(50),E3=Math.sqrt(10),R3=Math.sqrt(2);function ya(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>=C3?10:o>=E3?5:o>=R3?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?ya(t,e,n*2):[s,u,l]}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?ya(e,t,n):ya(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function kn(t,e,n){return e=+e,t=+t,n=+n,ya(t,e,n)[2]}function ba(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?kn(e,t,n):kn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Cl(t,e,n){let r;for(;;){const i=kn(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 El(t){return Math.max(1,Math.ceil(Math.log(ma(t))/Math.LN2)+1)}function bg(){var t=$r,e=Mi,n=El;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,l=new Array(a);for(o=0;o<a;++o)l[o]=t(i[o],o,i);var c=e(l),h=c[0],f=c[1],p=n(l,h,f);if(!Array.isArray(p)){const v=f,b=+p;if(e===Mi&&([h,f]=Cl(h,f,b)),p=Rn(h,f,b),p[0]<=h&&(u=kn(h,f,b)),p[p.length-1]>=f)if(v>=f&&e===Mi){const $=kn(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=l[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=l[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=l[o])!=null&&h<=s&&s<=f&&y[Cn(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Ll(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Ll([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ll(Array.isArray(i)?L3.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 Rl(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){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 kl(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 xa(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?Ar:Tl(i);r>n;){if(r-n>600){const u=r-n+1,l=e-n+1,c=Math.log(u),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(u-h)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(e-l*h/u+f)),d=Math.min(r,Math.floor(e+(u-l)*h/u+f));xa(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(Ti(t,n,e),i(t[r],o)>0&&Ti(t,n,r);a<s;){for(Ti(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ti(t,n,s):(++s,Ti(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ti(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function vg(t,e=wt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?wt(a,i)>0:wt(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 Li(t,e,n){if(t=Float64Array.from(l3(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return va(t);if(e>=1)return Di(t);var r,i=(r-1)*e,o=Math.floor(i),a=Di(xa(t,o).subarray(0,o+1)),s=va(t.subarray(o+1));return a+(s-a)*(i-o)}}function xg(t,e,n=ga){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 _g(t,e,n=ga){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ga(n(t[u],u,t))),e<=0)return kl(r);if(e>=1)return Rl(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return xa(i,a,0,o,(s,u)=>Ar(r[s],r[u])),a=vg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function k3(t,e,n){const r=ma(t),i=Li(t,.75)-Li(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function I3(t,e,n){const r=ma(t),i=sg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function N3(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 F3(t,e){return Li(t,.5,e)}function G3(t,e){return _g(t,.5,e)}function*z3(t){for(const e of t)yield*e}function Il(t){return Array.from(z3(t))}function O3(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 U3(t,e=B3){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function B3(t,e){return[t,e]}function fn(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 Y3(t,e=wt){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=wt);const i=(s,u)=>e(n[s],n[u]);let o,a;return t=Uint32Array.from(n,(s,u)=>u),t.sort(e===wt?(s,u)=>Ar(n[s],n[u]):Tl(i)),t.forEach((s,u)=>{const l=i(s,o===void 0?s:o);l>=0?((o===void 0||l>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function H3(t,e=wt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?wt(a,i)<0:wt(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 wg(t,e=wt){if(e.length===1)return kl(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 W3(t,e=wt){if(e.length===1)return Rl(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 q3(t,e){const n=wg(t,e);return n<0?void 0:n}const V3=$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 j3(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 Sg(t){if(!(o=t.length))return[];for(var e=-1,n=va(t,X3),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 X3(t){return t.length}function Z3(){return Sg(arguments)}function K3(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 Q3(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 J3(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 t5(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 e5(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 n5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function r5(t,...e){t=new En(t);for(const n of e)for(const r of n)t.delete(r);return t}function i5(t,e){const n=e[Symbol.iterator](),r=new En;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 o5(t,...e){t=new En(t),e=e.map(a5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function a5(t){return t instanceof En?t:new En(t)}function Ag(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Mg(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Mg(a);if(r.add(u),Object.is(o,u))break}}return!0}function Mg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function s5(t,e){return Ag(e,t)}function u5(...t){const e=new En;for(const n of t)for(const r of n)e.add(r);return e}function l5(t){return t}var _a=1,wa=2,Nl=3,Ci=4,Pg=1e-6;function c5(t){return"translate("+t+",0)"}function f5(t){return"translate(0,"+t+")"}function h5(t){return e=>+t(e)}function p5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function d5(){return!this.__axis}function $a(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=t===_a||t===Ci?-1:1,c=t===Ci||t===wa?"x":"y",h=t===_a||t===Nl?c5:f5;function f(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):l5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?p5:h5)(e.copy(),u),$=p.selection?p.selection():p,_=$.selectAll(".domain").data([null]),P=$.selectAll(".tick").data(d,e).order(),T=P.exit(),w=P.enter().append("g").attr("class","tick"),D=P.select("line"),S=P.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(w),D=D.merge(w.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),S=S.merge(w.append("text").attr("fill","currentColor").attr(c,l*m).attr("dy",t===_a?"0em":t===Nl?"0.71em":"0.32em")),p!==$&&(_=_.transition(p),P=P.transition(p),D=D.transition(p),S=S.transition(p),T=T.transition(p).attr("opacity",Pg).attr("transform",function(z){return isFinite(z=b(z))?h(z+u):this.getAttribute("transform")}),w.attr("opacity",Pg).attr("transform",function(z){var R=this.parentNode.__axis;return h((R&&isFinite(R=R(z))?R:b(z))+u)})),T.remove(),_.attr("d",t===Ci||t===wa?a?"M"+l*a+","+x+"H"+u+"V"+v+"H"+l*a:"M"+u+","+x+"V"+v:a?"M"+x+","+l*a+"V"+u+"H"+v+"V"+l*a:"M"+x+","+u+"H"+v),P.attr("opacity",1).attr("transform",function(z){return h(b(z)+u)}),D.attr(c+"2",l*o),S.attr(c,l*m).text(g),$.filter(d5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===wa?"start":t===Ci?"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 Dg(t){return $a(_a,t)}function g5(t){return $a(wa,t)}function m5(t){return $a(Nl,t)}function Tg(t){return $a(Ci,t)}var y5={value:()=>{}};function In(){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 Sa(n)}function Sa(t){this._=t}function b5(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}})}Sa.prototype=In.prototype={constructor:Sa,on:function(t,e){var n=this._,r=b5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=v5(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]=Lg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Lg(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 Sa(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 v5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Lg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=y5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Fl="http://www.w3.org/1999/xhtml";const Gl={svg:"http://www.w3.org/2000/svg",xhtml:Fl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ei(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Gl.hasOwnProperty(e)?{space:Gl[e],local:t}:t}function x5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Fl&&e.documentElement.namespaceURI===Fl?e.createElement(t):e.createElementNS(n,t)}}function _5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Aa(t){var e=Ei(t);return(e.local?_5:x5)(e)}function w5(){}function Ma(t){return t==null?w5:function(){return this.querySelector(t)}}function $5(t){typeof t!="function"&&(t=Ma(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,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new Ht(r,this._parents)}function Cg(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function S5(){return[]}function zl(t){return t==null?S5:function(){return this.querySelectorAll(t)}}function A5(t){return function(){return Cg(t.apply(this,arguments))}}function M5(t){typeof t=="function"?t=A5(t):t=zl(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,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new Ht(r,i)}function Ol(t){return function(){return this.matches(t)}}function Eg(t){return function(e){return e.matches(t)}}var P5=Array.prototype.find;function D5(t){return function(){return P5.call(this.children,t)}}function T5(){return this.firstElementChild}function L5(t){return this.select(t==null?T5:D5(typeof t=="function"?t:Eg(t)))}var C5=Array.prototype.filter;function E5(){return Array.from(this.children)}function R5(t){return function(){return C5.call(this.children,t)}}function k5(t){return this.selectAll(t==null?E5:R5(typeof t=="function"?t:Eg(t)))}function I5(t){typeof t!="function"&&(t=Ol(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ht(r,this._parents)}function Rg(t){return new Array(t.length)}function N5(){return new Ht(this._enter||this._groups.map(Rg),this._parents)}function Pa(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Pa.prototype={constructor:Pa,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 F5(t){return function(){return t}}function G5(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Pa(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function z5(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,h=o.length,f=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new Pa(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(f[s])===u&&(i[s]=u)}function O5(t){return t.__data__}function U5(t,e){if(!arguments.length)return Array.from(this,O5);var n=e?z5:G5,r=this._parents,i=this._groups;typeof t!="function"&&(t=F5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,p=B5(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),y=u[l]=new Array(f);n(c,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 B5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Y5(){return new Ht(this._exit||this._groups.map(Rg),this._parents)}function H5(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 W5(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 l=n[u],c=r[u],h=l.length,f=s[u]=new Array(h),p,d=0;d<h;++d)(p=l[d]||c[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new Ht(s,this._parents)}function q5(){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 V5(t){t||(t=j5);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),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new Ht(i,this._parents).order()}function j5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function X5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Z5(){return Array.from(this)}function K5(){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 t6(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 e6(t){return function(){this.removeAttribute(t)}}function n6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function r6(t,e){return function(){this.setAttribute(t,e)}}function i6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function o6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function a6(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 s6(t,e){var n=Ei(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?n6:e6:typeof e=="function"?n.local?a6:o6:n.local?i6:r6)(n,e))}function Ul(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function u6(t){return function(){this.style.removeProperty(t)}}function l6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function c6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function f6(t,e,n){return arguments.length>1?this.each((e==null?u6:typeof e=="function"?c6:l6)(t,e,n??"")):Nn(this.node(),t)}function Nn(t,e){return t.style.getPropertyValue(e)||Ul(t).getComputedStyle(t,null).getPropertyValue(e)}function h6(t){return function(){delete this[t]}}function p6(t,e){return function(){this[t]=e}}function d6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function g6(t,e){return arguments.length>1?this.each((e==null?h6:typeof e=="function"?d6:p6)(t,e)):this.node()[t]}function kg(t){return t.trim().split(/^|\s+/)}function Bl(t){return t.classList||new Ig(t)}function Ig(t){this._node=t,this._names=kg(t.getAttribute("class")||"")}Ig.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 Ng(t,e){for(var n=Bl(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Fg(t,e){for(var n=Bl(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function m6(t){return function(){Ng(this,t)}}function y6(t){return function(){Fg(this,t)}}function b6(t,e){return function(){(e.apply(this,arguments)?Ng:Fg)(this,t)}}function v6(t,e){var n=kg(t+"");if(arguments.length<2){for(var r=Bl(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?b6:e?m6:y6)(n,e))}function x6(){this.textContent=""}function _6(t){return function(){this.textContent=t}}function w6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function $6(t){return arguments.length?this.each(t==null?x6:(typeof t=="function"?w6:_6)(t)):this.node().textContent}function S6(){this.innerHTML=""}function A6(t){return function(){this.innerHTML=t}}function M6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function P6(t){return arguments.length?this.each(t==null?S6:(typeof t=="function"?M6:A6)(t)):this.node().innerHTML}function D6(){this.nextSibling&&this.parentNode.appendChild(this)}function T6(){return this.each(D6)}function L6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function C6(){return this.each(L6)}function E6(t){var e=typeof t=="function"?t:Aa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function R6(){return null}function k6(t,e){var n=typeof t=="function"?t:Aa(t),r=e==null?R6:typeof e=="function"?e:Ma(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function I6(){var t=this.parentNode;t&&t.removeChild(this)}function N6(){return this.each(I6)}function F6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function G6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function z6(t){return this.select(t?G6:F6)}function O6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function U6(t){return function(e){t.call(this,e,this.__data__)}}function B6(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 Y6(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 H6(t,e,n){return function(){var r=this.__on,i,o=U6(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 W6(t,e,n){var r=B6(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?H6:Y6,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Gg(t,e,n){var r=Ul(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 q6(t,e){return function(){return Gg(this,t,e)}}function V6(t,e){return function(){return Gg(this,t,e.apply(this,arguments))}}function j6(t,e){return this.each((typeof e=="function"?V6:q6)(t,e))}function*X6(){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 Yl=[null];function Ht(t,e){this._groups=t,this._parents=e}function Fn(){return new Ht([[document.documentElement]],Yl)}function Z6(){return this}Ht.prototype=Fn.prototype={constructor:Ht,select:$5,selectAll:M5,selectChild:L5,selectChildren:k5,filter:I5,data:U5,enter:N5,exit:Y5,join:H5,merge:W5,selection:Z6,order:q5,sort:V5,call:X5,nodes:Z5,node:K5,size:Q5,empty:J5,each:t6,attr:s6,style:f6,property:g6,classed:v6,text:$6,html:P6,raise:T6,lower:C6,append:E6,insert:k6,remove:N6,clone:z6,datum:O6,on:W6,dispatch:j6,[Symbol.iterator]:X6};function X(t){return typeof t=="string"?new Ht([[document.querySelector(t)]],[document.documentElement]):new Ht([[t]],Yl)}function K6(t){return X(Aa(t).call(document.documentElement))}var Q6=0;function zg(){return new Hl}function Hl(){this._="@"+(++Q6).toString(36)}Hl.prototype=zg.prototype={constructor:Hl,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 Og(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ue(t,e){if(t=Og(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=Og(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ue(n,e))}function t8(t){return typeof t=="string"?new Ht([document.querySelectorAll(t)],[document.documentElement]):new Ht([Cg(t)],Yl)}const e8={passive:!1},Ri={capture:!0,passive:!1};function Wl(t){t.stopImmediatePropagation()}function Mr(t){t.preventDefault(),t.stopImmediatePropagation()}function Da(t){var e=t.document.documentElement,n=X(t).on("dragstart.drag",Mr,Ri);"onselectstart"in e?n.on("selectstart.drag",Mr,Ri):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ta(t,e){var n=t.document.documentElement,r=X(t).on("dragstart.drag",null);e&&(r.on("click.drag",Mr,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 La=t=>()=>t;function ql(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:l,dispatch:c}){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:l,enumerable:!0,configurable:!0},_:{value:c}})}ql.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function n8(t){return!t.ctrlKey&&!t.button}function r8(){return this.parentNode}function i8(t,e){return e??{x:t.x,y:t.y}}function o8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ug(){var t=n8,e=r8,n=i8,r=o8,i={},o=In("start","drag","end"),a=0,s,u,l,c,h=0;function f(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,e8).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,$){if(!(c||!t.call(this,b,$))){var _=v(this,e.call(this,b,$),b,$,"mouse");_&&(X(b.view).on("mousemove.drag",d,Ri).on("mouseup.drag",g,Ri),Da(b.view),Wl(b),l=!1,s=b.clientX,u=b.clientY,_("start",b))}}function d(b){if(Mr(b),!l){var $=b.clientX-s,_=b.clientY-u;l=$*$+_*_>h}i.mouse("drag",b)}function g(b){X(b.view).on("mousemove.drag mouseup.drag",null),Ta(b.view,l),Mr(b),i.mouse("end",b)}function m(b,$){if(t.call(this,b,$)){var _=b.changedTouches,P=e.call(this,b,$),T=_.length,w,D;for(w=0;w<T;++w)(D=v(this,P,b,$,_[w].identifier,_[w]))&&(Wl(b),D("start",b,_[w]))}}function y(b){var $=b.changedTouches,_=$.length,P,T;for(P=0;P<_;++P)(T=i[$[P].identifier])&&(Mr(b),T("drag",b,$[P]))}function x(b){var $=b.changedTouches,_=$.length,P,T;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),P=0;P<_;++P)(T=i[$[P].identifier])&&(Wl(b),T("end",b,$[P]))}function v(b,$,_,P,T,w){var D=o.copy(),S=ue(w||_,$),z,R,A;if((A=n.call(b,new ql("beforestart",{sourceEvent:_,target:f,identifier:T,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:D}),P))!=null)return z=A.x-S[0]||0,R=A.y-S[1]||0,function L(M,G,U){var E=S,k;switch(M){case"start":i[T]=L,k=a++;break;case"end":delete i[T],--a;case"drag":S=ue(U||G,$),k=a;break}D.call(M,b,new ql(M,{sourceEvent:G,subject:A,target:f,identifier:T,active:k,x:S[0]+z,y:S[1]+R,dx:S[0]-E[0],dy:S[1]-E[1],dispatch:D}),P)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:La(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:La(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:La(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:La(!!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 Pr(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 hn(){}var Gn=.7,Dr=1/Gn,Tr="\\s*([+-]?\\d+)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",a8=/^#([0-9a-f]{3,8})$/,s8=new RegExp(`^rgb\\(${Tr},${Tr},${Tr}\\)$`),u8=new RegExp(`^rgb\\(${ke},${ke},${ke}\\)$`),l8=new RegExp(`^rgba\\(${Tr},${Tr},${Tr},${Ii}\\)$`),c8=new RegExp(`^rgba\\(${ke},${ke},${ke},${Ii}\\)$`),f8=new RegExp(`^hsl\\(${Ii},${ke},${ke}\\)$`),h8=new RegExp(`^hsla\\(${Ii},${ke},${ke},${Ii}\\)$`),Bg={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};Pr(hn,pn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Yg,formatHex:Yg,formatHex8:p8,formatHsl:d8,formatRgb:Hg,toString:Hg});function Yg(){return this.rgb().formatHex()}function p8(){return this.rgb().formatHex8()}function d8(){return Xg(this).formatHsl()}function Hg(){return this.rgb().formatRgb()}function pn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=a8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Wg(e):n===3?new Et(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ca(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ca(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=s8.exec(t))?new Et(e[1],e[2],e[3],1):(e=u8.exec(t))?new Et(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=l8.exec(t))?Ca(e[1],e[2],e[3],e[4]):(e=c8.exec(t))?Ca(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=f8.exec(t))?jg(e[1],e[2]/100,e[3]/100,1):(e=h8.exec(t))?jg(e[1],e[2]/100,e[3]/100,e[4]):Bg.hasOwnProperty(t)?Wg(Bg[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function Wg(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function Ca(t,e,n,r){return r<=0&&(t=e=n=NaN),new Et(t,e,n,r)}function Vl(t){return t instanceof hn||(t=pn(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function Lr(t,e,n,r){return arguments.length===1?Vl(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}Pr(Et,Lr,ki(hn,{brighter(t){return t=t==null?Dr:Math.pow(Dr,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(zn(this.r),zn(this.g),zn(this.b),Ea(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:qg,formatHex:qg,formatHex8:g8,formatRgb:Vg,toString:Vg}));function qg(){return`#${On(this.r)}${On(this.g)}${On(this.b)}`}function g8(){return`#${On(this.r)}${On(this.g)}${On(this.b)}${On((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vg(){const t=Ea(this.opacity);return`${t===1?"rgb(":"rgba("}${zn(this.r)}, ${zn(this.g)}, ${zn(this.b)}${t===1?")":`, ${t})`}`}function Ea(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function zn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function On(t){return t=zn(t),(t<16?"0":"")+t.toString(16)}function jg(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 Xg(t){if(t instanceof Se)return new Se(t.h,t.s,t.l,t.opacity);if(t instanceof hn||(t=pn(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 Ra(t,e,n,r){return arguments.length===1?Xg(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}Pr(Se,Ra,ki(hn,{brighter(t){return t=t==null?Dr:Math.pow(Dr,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,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(jl(t>=240?t-240:t+120,i,r),jl(t,i,r),jl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(Zg(this.h),ka(this.s),ka(this.l),Ea(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=Ea(this.opacity);return`${t===1?"hsl(":"hsla("}${Zg(this.h)}, ${ka(this.s)*100}%, ${ka(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Zg(t){return t=(t||0)%360,t<0?t+360:t}function ka(t){return Math.max(0,Math.min(1,t||0))}function jl(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 Kg=Math.PI/180,Qg=180/Math.PI,Ia=18,Jg=.96422,t0=1,e0=.82521,n0=4/29,Cr=6/29,r0=3*Cr*Cr,m8=Cr*Cr*Cr;function i0(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Ie)return a0(t);t instanceof Et||(t=Vl(t));var e=Ql(t.r),n=Ql(t.g),r=Ql(t.b),i=Xl((.2225045*e+.7168786*n+.0606169*r)/t0),o,a;return e===n&&n===r?o=a=i:(o=Xl((.4360747*e+.3850649*n+.1430804*r)/Jg),a=Xl((.0139322*e+.0971045*n+.7141733*r)/e0)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function y8(t,e){return new Ae(t,0,0,e??1)}function Na(t,e,n,r){return arguments.length===1?i0(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}Pr(Ae,Na,ki(hn,{brighter(t){return new Ae(this.l+Ia*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-Ia*(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=Jg*Zl(e),t=t0*Zl(t),n=e0*Zl(n),new Et(Kl(3.1338561*e-1.6168667*t-.4906146*n),Kl(-.9787684*e+1.9161415*t+.033454*n),Kl(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Xl(t){return t>m8?Math.pow(t,1/3):t/r0+n0}function Zl(t){return t>Cr?t*t*t:r0*(t-n0)}function Kl(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ql(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function o0(t){if(t instanceof Ie)return new Ie(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=i0(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)*Qg;return new Ie(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function b8(t,e,n,r){return arguments.length===1?o0(t):new Ie(n,e,t,r??1)}function Fa(t,e,n,r){return arguments.length===1?o0(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 a0(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*Kg;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Pr(Ie,Fa,ki(hn,{brighter(t){return new Ie(this.h,this.c,this.l+Ia*(t??1),this.opacity)},darker(t){return new Ie(this.h,this.c,this.l-Ia*(t??1),this.opacity)},rgb(){return a0(this).rgb()}}));var s0=-.14861,Jl=1.78277,tc=-.29227,Ga=-.90649,Ni=1.97294,u0=Ni*Ga,l0=Ni*Jl,c0=Jl*tc-Ga*s0;function v8(t){if(t instanceof Un)return new Un(t.h,t.s,t.l,t.opacity);t instanceof Et||(t=Vl(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(c0*r+u0*e-l0*n)/(c0+u0-l0),o=r-i,a=(Ni*(n-i)-tc*o)/Ga,s=Math.sqrt(a*a+o*o)/(Ni*i*(1-i)),u=s?Math.atan2(a,o)*Qg-120:NaN;return new Un(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?v8(t):new Un(t,e,n,r??1)}function Un(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Pr(Un,Me,ki(hn,{brighter(t){return t=t==null?Dr:Math.pow(Dr,t),new Un(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,t),new Un(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Kg,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*(s0*r+Jl*i)),255*(e+n*(tc*r+Ga*i)),255*(e+n*(Ni*r)),this.opacity)}}));function f0(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 h0(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 f0((n-r/e)*e,a,i,o,s)}}function p0(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 f0((n-r/e)*e,i,o,a,s)}}const za=t=>()=>t;function d0(t,e){return function(n){return t+n*e}}function x8(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 Oa(t,e){var n=e-t;return n?d0(t,n>180||n<-180?n-360*Math.round(n/360):n):za(isNaN(t)?e:t)}function _8(t){return(t=+t)==1?Rt:function(e,n){return n-e?x8(e,n,t):za(isNaN(e)?n:e)}}function Rt(t,e){var n=e-t;return n?d0(t,n):za(isNaN(t)?e:t)}const Fi=function t(e){var n=_8(e);function r(i,o){var a=n((i=Lr(i)).r,(o=Lr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=Rt(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function g0(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=Lr(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 m0=g0(h0),w8=g0(p0);function ec(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 y0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function $8(t,e){return(y0(e)?ec:b0)(t,e)}function b0(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]=Ve(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 v0(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 x0(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]=Ve(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 S8(t){return function(){return t}}function A8(t){return function(e){return t(e)+""}}function ic(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:pe(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]?A8(u[0].x):S8(e):(e=u.length,function(l){for(var c=0,h;c<e;++c)s[(h=u[c]).i]=h.x(l);return s.join("")})}function Ve(t,e){var n=typeof e,r;return e==null||n==="boolean"?za(e):(n==="number"?pe:n==="string"?(r=pn(e))?(e=r,Fi):ic:e instanceof pn?Fi:e instanceof Date?v0:y0(e)?ec:Array.isArray(e)?b0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?x0:pe)(t,e)}function M8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function P8(t,e){var n=Oa(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ua(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var _0=180/Math.PI,oc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function w0(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)*_0,skewX:Math.atan(u)*_0,scaleX:a,scaleY:s}}var Ba;function D8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?oc:w0(e.a,e.b,e.c,e.d,e.e,e.f)}function T8(t){return t==null||(Ba||(Ba=document.createElementNS("http://www.w3.org/2000/svg","g")),Ba.setAttribute("transform",t),!(t=Ba.transform.baseVal.consolidate()))?oc:(t=t.matrix,w0(t.a,t.b,t.c,t.d,t.e,t.f))}function $0(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,h,f,p,d){if(l!==h||c!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:pe(l,h)},{i:g-2,x:pe(c,f)})}else(h||f)&&p.push("translate("+h+e+f+n)}function a(l,c,h,f){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:pe(l,c)})):c&&h.push(i(h)+"rotate("+c+r)}function s(l,c,h,f){l!==c?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:pe(l,c)}):c&&h.push(i(h)+"skewX("+c+r)}function u(l,c,h,f,p,d){if(l!==h||c!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:pe(l,h)},{i:g-2,x:pe(c,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(l,c){var h=[],f=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,h,f),a(l.rotate,c.rotate,h,f),s(l.skewX,c.skewX,h,f),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,f),l=c=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 S0=$0(D8,"px, ","px)","deg)"),A0=$0(T8,", ",")",")"),L8=1e-12;function M0(t){return((t=Math.exp(t))+1/t)/2}function C8(t){return((t=Math.exp(t))-1/t)/2}function E8(t){return((t=Math.exp(2*t))-1)/(t+1)}const P0=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],l=o[2],c=a[0],h=a[1],f=a[2],p=c-s,d=h-u,g=p*p+d*d,m,y;if(g<L8)y=Math.log(f/l)/e,m=function(P){return[s+P*p,u+P*d,l*Math.exp(e*P*y)]};else{var x=Math.sqrt(g),v=(f*f-l*l+r*g)/(2*l*n*x),b=(f*f-l*l-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(P){var T=P*y,w=M0($),D=l/(n*x)*(w*E8(e*T+$)-C8($));return[s+D*p,u+D*d,l*w/M0(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 D0(t){return function(e,n){var r=t((e=Ra(e)).h,(n=Ra(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 R8=D0(Oa);var k8=D0(Rt);function I8(t,e){var n=Rt((t=Na(t)).l,(e=Na(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 T0(t){return function(e,n){var r=t((e=Fa(e)).h,(n=Fa(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 N8=T0(Oa);var F8=T0(Rt);function L0(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Rt(i.s,o.s),u=Rt(i.l,o.l),l=Rt(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=e,r}(1)}const G8=L0(Oa);var Ya=L0(Rt);function C0(t,e){e===void 0&&(e=t,t=Ve);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 z8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Er=0,Gi=0,zi=0,E0=1e3,Ha,Oi,Wa=0,Bn=0,qa=0,Ui=typeof performance=="object"&&performance.now?performance:Date,R0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bi(){return Bn||(R0(O8),Bn=Ui.now()+qa)}function O8(){Bn=0}function Yi(){this._call=this._time=this._next=null}Yi.prototype=Va.prototype={constructor:Yi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Bi():+n)+(e==null?0:+e),!this._next&&Oi!==this&&(Oi?Oi._next=this:Ha=this,Oi=this),this._call=t,this._time=n,ac()},stop:function(){this._call&&(this._call=null,this._time=1/0,ac())}};function Va(t,e,n){var r=new Yi;return r.restart(t,e,n),r}function k0(){Bi(),++Er;for(var t=Ha,e;t;)(e=Bn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Er}function I0(){Bn=(Wa=Ui.now())+qa,Er=Gi=0;try{k0()}finally{Er=0,B8(),Bn=0}}function U8(){var t=Ui.now(),e=t-Wa;e>E0&&(qa-=e,Wa=t)}function B8(){for(var t,e=Ha,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:Ha=n);Oi=t,ac(r)}function ac(t){if(!Er){Gi&&(Gi=clearTimeout(Gi));var e=t-Bn;e>24?(t<1/0&&(Gi=setTimeout(I0,t-Ui.now()-qa)),zi&&(zi=clearInterval(zi))):(zi||(Wa=Ui.now(),zi=setInterval(U8,E0)),Er=1,R0(I0))}}function sc(t,e,n){var r=new Yi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function Y8(t,e,n){var r=new Yi,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?Bi():+s,r._restart(function u(l){l+=i,r._restart(u,i+=a,s),o(l)},a,s)},r.restart(t,e,n),r)}var H8=In("start","end","cancel","interrupt"),W8=[],N0=0,uc=1,lc=2,ja=3,F0=4,cc=5,Xa=6;function Za(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;q8(t,n,{name:e,index:r,group:i,on:H8,tween:W8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:N0})}function fc(t,e){var n=Pe(t,e);if(n.state>N0)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 q8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Va(o,0,n.time);function o(l){n.state=uc,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,h,f,p;if(n.state!==uc)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===ja)return sc(a);p.state===F0?(p.state=Xa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=Xa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(sc(function(){n.state===ja&&(n.state=F0,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=lc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===lc){for(n.state=ja,i=new Array(f=n.tween.length),c=0,h=-1;c<f;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=cc,1),h=-1,f=i.length;++h<f;)i[h].call(t,c);n.state===cc&&(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 l in r)return;delete t.__transition}}function Yn(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>lc&&r.state<cc,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 V8(t){return this.each(function(){Yn(this,t)})}function j8(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 X8(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,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function Z8(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?j8:X8)(n,t,e))}function hc(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 G0(t,e){var n;return(typeof e=="number"?pe:e instanceof pn?Fi:(n=pn(e))?(e=n,Fi):ic)(t,e)}function K8(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 tM(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 eM(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 nM(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 rM(t,e){var n=Ei(t),r=n==="transform"?A0:G0;return this.attrTween(t,typeof e=="function"?(n.local?nM:eM)(n,r,hc(this,"attr."+t,e)):e==null?(n.local?Q8:K8)(n):(n.local?tM:J8)(n,r,e))}function iM(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function oM(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function aM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&oM(t,o)),n}return i._value=e,i}function sM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&iM(t,o)),n}return i._value=e,i}function uM(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=Ei(t);return this.tween(n,(r.local?aM:sM)(r,e))}function lM(t,e){return function(){fc(this,t).delay=+e.apply(this,arguments)}}function cM(t,e){return e=+e,function(){fc(this,t).delay=e}}function fM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?lM:cM)(e,t)):Pe(this.node(),e).delay}function hM(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function pM(t,e){return e=+e,function(){Ne(this,t).duration=e}}function dM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?hM:pM)(e,t)):Pe(this.node(),e).duration}function gM(t,e){if(typeof e!="function")throw new Error;return function(){Ne(this,t).ease=e}}function mM(t){var e=this._id;return arguments.length?this.each(gM(e,t)):Pe(this.node(),e).ease}function yM(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ne(this,t).ease=n}}function bM(t){if(typeof t!="function")throw new Error;return this.each(yM(this._id,t))}function vM(t){typeof t!="function"&&(t=Ol(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Fe(r,this._parents,this._name,this._id)}function xM(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],l=n[s],c=u.length,h=a[s]=new Array(c),f,p=0;p<c;++p)(f=u[p]||l[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new Fe(a,this._parents,this._name,this._id)}function _M(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 wM(t,e,n){var r,i,o=_M(e)?fc:Ne;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function $M(t,e){var n=this._id;return arguments.length<2?Pe(this.node(),n).on.on(t):this.each(wM(n,t,e))}function SM(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function AM(){return this.on("end.remove",SM(this._id))}function MM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ma(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,l=o[a]=new Array(u),c,h,f=0;f<u;++f)(c=s[f])&&(h=t.call(c,c.__data__,f,s))&&("__data__"in c&&(h.__data__=c.__data__),l[f]=h,Za(l[f],e,n,f,l,Pe(c,n)));return new Fe(o,this._parents,e,n)}function PM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=zl(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,h=0;h<l;++h)if(c=u[h]){for(var f=t.call(c,c.__data__,h,u),p,d=Pe(c,n),g=0,m=f.length;g<m;++g)(p=f[g])&&Za(p,e,n,g,f,d);o.push(f),a.push(c)}return new Fe(o,a,e,n)}var DM=Fn.prototype.constructor;function TM(){return new DM(this._groups,this._parents)}function LM(t,e){var n,r,i;return function(){var o=Nn(this,t),a=(this.style.removeProperty(t),Nn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function z0(t){return function(){this.style.removeProperty(t)}}function CM(t,e,n){var r,i=n+"",o;return function(){var a=Nn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function EM(t,e,n){var r,i,o;return function(){var a=Nn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Nn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function RM(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ne(this,t),l=u.on,c=u.value[o]==null?s||(s=z0(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function kM(t,e,n){var r=(t+="")=="transform"?S0:G0;return e==null?this.styleTween(t,LM(t,r)).on("end.style."+t,z0(t)):typeof e=="function"?this.styleTween(t,EM(t,r,hc(this,"style."+t,e))).each(RM(this._id,t)):this.styleTween(t,CM(t,r,e),n).on("end.style."+t,null)}function IM(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function NM(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&IM(t,a,n)),r}return o._value=e,o}function FM(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,NM(t,e,n??""))}function GM(t){return function(){this.textContent=t}}function zM(t){return function(){var e=t(this);this.textContent=e??""}}function OM(t){return this.tween("text",typeof t=="function"?zM(hc(this,"text",t)):GM(t==null?"":t+""))}function UM(t){return function(e){this.textContent=t.call(this,e)}}function BM(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&UM(i)),e}return r._value=t,r}function YM(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,BM(t))}function HM(){for(var t=this._name,e=this._id,n=U0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var c=Pe(u,e);Za(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Fe(r,this._parents,t,n)}function WM(){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 l=Ne(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var qM=0;function Fe(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function O0(t){return Fn().transition(t)}function U0(){return++qM}var je=Fn.prototype;Fe.prototype=O0.prototype={constructor:Fe,select:MM,selectAll:PM,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:vM,merge:xM,selection:TM,transition:HM,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:$M,attr:rM,attrTween:uM,style:kM,styleTween:FM,text:OM,textTween:YM,remove:AM,tween:Z8,delay:fM,duration:dM,ease:mM,easeVarying:bM,end:WM,[Symbol.iterator]:je[Symbol.iterator]};const VM=t=>+t;function jM(t){return t*t}function XM(t){return t*(2-t)}function B0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function ZM(t){return t*t*t}function KM(t){return--t*t*t+1}function Hi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var pc=3,QM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(pc),JM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(pc),Y0=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}(pc),H0=Math.PI,W0=H0/2;function t4(t){return+t==1?1:1-Math.cos(t*W0)}function e4(t){return Math.sin(t*W0)}function q0(t){return(1-Math.cos(H0*t))/2}function dn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function n4(t){return dn(1-+t)}function r4(t){return 1-dn(t)}function V0(t){return((t*=2)<=1?dn(1-t):2-dn(t-1))/2}function i4(t){return 1-Math.sqrt(1-t*t)}function o4(t){return Math.sqrt(1- --t*t)}function j0(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var dc=4/11,a4=6/11,s4=8/11,u4=3/4,l4=9/11,c4=10/11,f4=15/16,h4=21/22,p4=63/64,Ka=1/dc/dc;function d4(t){return 1-Wi(1-t)}function Wi(t){return(t=+t)<dc?Ka*t*t:t<s4?Ka*(t-=a4)*t+u4:t<c4?Ka*(t-=l4)*t+f4:Ka*(t-=h4)*t+p4}function g4(t){return((t*=2)<=1?1-Wi(1-t):Wi(t-1)+1)/2}var gc=1.70158,m4=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(gc),y4=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(gc),X0=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}(gc),Rr=2*Math.PI,mc=1,yc=.3,b4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return e*dn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(mc,yc),qi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return 1-e*dn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(mc,yc),v4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);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*Rr)},i.period=function(o){return t(e,o)},i}(mc,yc),x4={time:null,delay:0,duration:250,ease:Hi};function _4(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 w4(t){var e,n;t instanceof Fe?(e=t._id,t=t._name):(e=U0(),(n=x4).time=Bi(),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,l=0;l<s;++l)(u=a[l])&&Za(u,t,e,l,a,n||_4(u,e));return new Fe(r,this._parents,t,e)}Fn.prototype.interrupt=V8,Fn.prototype.transition=w4;var $4=[null];function S4(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>uc&&r.name===e)return new Fe([[t]],$4,e,+i)}return null}const bc=t=>()=>t;function A4(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 M4(t){t.stopImmediatePropagation()}function vc(t){t.preventDefault(),t.stopImmediatePropagation()}var Z0={name:"drag"},xc={name:"space"},kr={name:"handle"},Ir={name:"center"};const{abs:K0,max:Gt,min:zt}=Math;function Q0(t){return[+t[0],+t[1]]}function _c(t){return[Q0(t[0]),Q0(t[1])]}var Qa={name:"x",handles:["w","e"].map(Vi),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(Vi),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]]}},P4={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Vi),input:function(t){return t==null?null:_c(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"},J0={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},tm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},D4={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},T4={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Vi(t){return{type:t}}function L4(t){return!t.ctrlKey&&!t.button}function C4(){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 E4(){return navigator.maxTouchPoints||"ontouchstart"in this}function wc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function R4(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function k4(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function I4(){return $c(Qa)}function N4(){return $c(Ja)}function F4(){return $c(P4)}function $c(t){var e=C4,n=L4,r=E4,i=!0,o=In("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Vi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Xe.overlay).merge(y).each(function(){var v=wc(this).extent;X(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([Vi("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(l).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){c(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){c(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,$=c(v,arguments),_=b.selection,P=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),T=Ve(_,P);function w(D){b.selection=D===1&&P===null?null:T(D),l.call(v),$.brush()}return _!==null&&P!==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),P=c(v,b).beforestart();Yn(v),$.selection=_===null?null:_,l.call(v),P.start(x).brush(x).end(x)})},u.clear=function(m,y){u.move(m,null,y)};function l(){var m=X(this),y=wc(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 c(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=X(this.that).datum();o.call(m,this.that,new A4(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"?Z0:i&&m.altKey?Ir:kr,b=t===Ja?null:D4[x],$=t===Qa?null:T4[x],_=wc(y),P=_.extent,T=_.selection,w=P[0][0],D,S,z=P[0][1],R,A,L=P[1][0],M,G,U=P[1][1],E,k,C=0,F=0,V,Q=b&&$&&i&&m.shiftKey,N,j,q=Array.from(m.touches||[m],st=>{const Pt=st.identifier;return st=ue(st,y),st.point0=st.slice(),st.identifier=Pt,st});Yn(y);var Z=c(y,arguments,!0).beforestart();if(x==="overlay"){T&&(V=!0);const st=[q[0],q[1]||q[0]];_.selection=T=[[D=t===Ja?w:zt(st[0][0],st[1][0]),R=t===Qa?z:zt(st[0][1],st[1][1])],[M=t===Ja?L:Gt(st[0][0],st[1][0]),E=t===Qa?U:Gt(st[0][1],st[1][1])]],q.length>1&&mt(m)}else D=T[0][0],R=T[0][1],M=T[1][0],E=T[1][1];S=D,A=R,G=M,k=E;var W=X(y).attr("pointer-events","none"),nt=W.selectAll(".overlay").attr("cursor",Xe[x]);if(m.touches)Z.moved=H,Z.ended=pt;else{var ut=X(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)}l.call(y),Z.start(m,v.name);function H(st){for(const Pt of st.changedTouches||[st])for(const Io of q)Io.identifier===Pt.identifier&&(Io.cur=ue(Pt,y));if(Q&&!N&&!j&&q.length===1){const Pt=q[0];K0(Pt.cur[0]-Pt[0])>K0(Pt.cur[1]-Pt[1])?j=!0:N=!0}for(const Pt of q)Pt.cur&&(Pt[0]=Pt.cur[0],Pt[1]=Pt.cur[1]);V=!0,vc(st),mt(st)}function mt(st){const Pt=q[0],Io=Pt.point0;var Sn;switch(C=Pt[0]-Io[0],F=Pt[1]-Io[1],v){case xc:case Z0:{b&&(C=Gt(w-D,zt(L-M,C)),S=D+C,G=M+C),$&&(F=Gt(z-R,zt(U-E,F)),A=R+F,k=E+F);break}case kr:{q[1]?(b&&(S=Gt(w,zt(L,q[0][0])),G=Gt(w,zt(L,q[1][0])),b=1),$&&(A=Gt(z,zt(U,q[0][1])),k=Gt(z,zt(U,q[1][1])),$=1)):(b<0?(C=Gt(w-D,zt(L-D,C)),S=D+C,G=M):b>0&&(C=Gt(w-M,zt(L-M,C)),S=D,G=M+C),$<0?(F=Gt(z-R,zt(U-R,F)),A=R+F,k=E):$>0&&(F=Gt(z-E,zt(U-E,F)),A=R,k=E+F));break}case Ir:{b&&(S=Gt(w,zt(L,D-C*b)),G=Gt(w,zt(L,M+C*b))),$&&(A=Gt(z,zt(U,R-F*$)),k=Gt(z,zt(U,E+F*$)));break}}G<S&&(b*=-1,Sn=D,D=M,M=Sn,Sn=S,S=G,G=Sn,x in J0&&nt.attr("cursor",Xe[x=J0[x]])),k<A&&($*=-1,Sn=R,R=E,E=Sn,Sn=A,A=k,k=Sn,x in tm&&nt.attr("cursor",Xe[x=tm[x]])),_.selection&&(T=_.selection),N&&(S=T[0][0],G=T[1][0]),j&&(A=T[0][1],k=T[1][1]),(T[0][0]!==S||T[0][1]!==A||T[1][0]!==G||T[1][1]!==k)&&(_.selection=[[S,A],[G,k]],l.call(y),Z.brush(st,v.name))}function pt(st){if(M4(st),st.touches){if(st.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Ta(st.view,V),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),nt.attr("cursor",Xe.overlay),_.selection&&(T=_.selection),R4(T)&&(_.selection=null,l.call(y)),Z.end(st,v.name)}function Yt(st){switch(st.keyCode){case 16:{Q=b&&$;break}case 18:{v===kr&&(b&&(M=G-C*b,D=S+C*b),$&&(E=k-F*$,R=A+F*$),v=Ir,mt(st));break}case 32:{(v===kr||v===Ir)&&(b<0?M=G-C:b>0&&(D=S-C),$<0?E=k-F:$>0&&(R=A-F),v=xc,nt.attr("cursor",Xe.selection),mt(st));break}default:return}vc(st)}function ee(st){switch(st.keyCode){case 16:{Q&&(N=j=Q=!1,mt(st));break}case 18:{v===Ir&&(b<0?M=G:b>0&&(D=S),$<0?E=k:$>0&&(R=A),v=kr,mt(st));break}case 32:{v===xc&&(st.altKey?(b&&(M=G-C*b,D=S+C*b),$&&(E=k-F*$,R=A+F*$),v=Ir):(b<0?M=G:b>0&&(D=S),$<0?E=k:$>0&&(R=A),v=kr),nt.attr("cursor",Xe[x]),mt(st));break}default:return}vc(st)}}function p(m){c(this,arguments).moved(m)}function d(m){c(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=_c(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:bc(_c(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:bc(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:bc(!!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 em=Math.abs,Nr=Math.cos,Fr=Math.sin,nm=Math.PI,ts=nm/2,rm=nm*2,im=Math.max,Sc=1e-12;function Ac(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function G4(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function z4(){return Mc(!1,!1)}function O4(){return Mc(!1,!0)}function U4(){return Mc(!0,!1)}function Mc(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,l=new Array(u),c=Ac(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+=l[g]=m}p=im(0,rm-n*u)/p,d=p?n:rm/u;{let g=0;r&&c.sort((m,y)=>r(l[m],l[y]));for(const m of c){const y=g;if(t){const x=Ac(~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:l[m]}}else{const x=Ac(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:l[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=im(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=G4(s))._=s,a):o&&o._},a}const Pc=Math.PI,Dc=2*Pc,Hn=1e-6,B4=Dc-Hn;function om(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Y4(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return om;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 ji=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?om:Y4(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,l=i-n,c=a-e,h=s-n,f=c*c+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Hn)if(!(Math.abs(h*u-l*c)>Hn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=u*u+l*l,m=p*p+d*d,y=Math.sqrt(g),x=Math.sqrt(f),v=o*Math.tan((Pc-Math.acos((g+f-m)/(2*y*x)))/2),b=v/x,$=v/y;Math.abs(b-1)>Hn&&this._append`L${e+b*c},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*p>c*d)},${this._x1=e+$*u},${this._y1=n+$*l}`}}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),l=e+s,c=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Hn||Math.abs(this._y1-c)>Hn)&&this._append`L${l},${c}`,r&&(f<0&&(f=f%Dc+Dc),f>B4?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:f>Hn&&this._append`A${r},${r},0,${+(f>=Pc)},${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 Tc(){return new ji}Tc.prototype=ji.prototype;function H4(t=3){return new ji(+t)}var W4=Array.prototype.slice;function Wn(t){return function(){return t}}function q4(t){return t.source}function V4(t){return t.target}function am(t){return t.radius}function j4(t){return t.startAngle}function X4(t){return t.endAngle}function Z4(){return 0}function K4(){return 10}function sm(t){var e=q4,n=V4,r=am,i=am,o=j4,a=X4,s=Z4,u=null;function l(){var c,h=e.apply(this,arguments),f=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=W4.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=c=Tc()),p>Sc&&(em(y-m)>p*2+Sc?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,em(b-v)>p*2+Sc?b>v?(v+=p,b-=p):(v-=p,b+=p):v=b=(v+b)/2),u.moveTo(g*Nr(m),g*Fr(m)),u.arc(0,0,g,m,y),m!==v||y!==b)if(t){var $=+t.apply(this,arguments),_=x-$,P=(v+b)/2;u.quadraticCurveTo(0,0,_*Nr(v),_*Fr(v)),u.lineTo(x*Nr(P),x*Fr(P)),u.lineTo(_*Nr(b),_*Fr(b))}else u.quadraticCurveTo(0,0,x*Nr(v),x*Fr(v)),u.arc(0,0,x,v,b);if(u.quadraticCurveTo(0,0,g*Nr(m),g*Fr(m)),u.closePath(),c)return u=null,c+""||null}return t&&(l.headRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Wn(+c),l):t}),l.radius=function(c){return arguments.length?(r=i=typeof c=="function"?c:Wn(+c),l):r},l.sourceRadius=function(c){return arguments.length?(r=typeof c=="function"?c:Wn(+c),l):r},l.targetRadius=function(c){return arguments.length?(i=typeof c=="function"?c:Wn(+c),l):i},l.startAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Wn(+c),l):o},l.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Wn(+c),l):a},l.padAngle=function(c){return arguments.length?(s=typeof c=="function"?c:Wn(+c),l):s},l.source=function(c){return arguments.length?(e=c,l):e},l.target=function(c){return arguments.length?(n=c,l):n},l.context=function(c){return arguments.length?(u=c??null,l):u},l}function Q4(){return sm()}function J4(){return sm(K4)}var t7=Array.prototype,um=t7.slice;function e7(t,e){return t-e}function n7(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 r7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=i7(t,e[n]))return i;return 0}function i7(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],l=u[0],c=u[1],h=t[s],f=h[0],p=h[1];if(o7(u,h,e))return 0;c>r!=p>r&&n<(f-l)*(r-c)/(p-c)+l&&(i=-i)}return i}function o7(t,e,n){var r;return a7(t,e,n)&&s7(t[r=+(t[0]===e[0])],n[r],e[r])}function a7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function s7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function u7(){}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 Lc(){var t=1,e=1,n=El,r=u;function i(l){var c=n(l);if(Array.isArray(c))c=c.slice().sort(e7);else{const h=Mi(l,l7);for(c=Rn(...Cl(h[0],h[1],c),c);c[c.length-1]>=h[1];)c.pop();for(;c[1]<h[0];)c.shift()}return c.map(h=>o(l,h))}function o(l,c){const h=c==null?NaN:+c;if(isNaN(h))throw new Error(`invalid value: ${c}`);var f=[],p=[];return a(l,h,function(d){r(d,l,h),n7(d)>0?f.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=f.length,y;g<m;++g)if(r7((y=f[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:c,coordinates:f}}function a(l,c,h){var f=new Array,p=new Array,d,g,m,y,x,v;for(d=g=-1,y=qn(l[0],c),Ze[y<<1].forEach(b);++d<t-1;)m=y,y=qn(l[d+1],c),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(d=-1,y=qn(l[g*t+t],c),x=qn(l[g*t],c),Ze[y<<1|x<<2].forEach(b);++d<t-1;)m=y,y=qn(l[g*t+t+d+1],c),v=x,x=qn(l[g*t+d+1],c),Ze[m|y<<1|x<<2|v<<3].forEach(b);Ze[y|x<<3].forEach(b)}for(d=-1,x=l[g*t]>=c,Ze[x<<2].forEach(b);++d<t-1;)v=x,x=qn(l[g*t+d+1],c),Ze[x<<2|v<<3].forEach(b);Ze[x<<3].forEach(b);function b($){var _=[$[0][0]+d,$[0][1]+g],P=[$[1][0]+d,$[1][1]+g],T=s(_),w=s(P),D,S;(D=p[T])?(S=f[w])?(delete p[D.end],delete f[S.start],D===S?(D.ring.push(P),h(D.ring)):f[D.start]=p[S.end]={start:D.start,end:S.end,ring:D.ring.concat(S.ring)}):(delete p[D.end],D.ring.push(P),p[D.end=w]=D):(D=f[w])?(S=p[T])?(delete f[D.start],delete p[S.end],D===S?(D.ring.push(P),h(D.ring)):f[S.start]=p[D.end]={start:S.start,end:D.end,ring:S.ring.concat(D.ring)}):(delete f[D.start],D.ring.unshift(_),f[D.start=T]=D):f[T]=p[w]={start:T,end:w,ring:[_,P]}}}function s(l){return l[0]*2+l[1]*(t+1)*4}function u(l,c,h){l.forEach(function(f){var p=f[0],d=f[1],g=p|0,m=d|0,y=Cc(c[m*t+g]);p>0&&p<t&&g===p&&(f[0]=lm(p,Cc(c[m*t+g-1]),y,h)),d>0&&d<e&&m===d&&(f[1]=lm(d,Cc(c[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(l){if(!arguments.length)return[t,e];var c=Math.floor(l[0]),h=Math.floor(l[1]);if(!(c>=0&&h>=0))throw new Error("invalid size");return t=c,e=h,i},i.thresholds=function(l){return arguments.length?(n=typeof l=="function"?l:Array.isArray(l)?gn(um.call(l)):gn(l),i):n},i.smooth=function(l){return arguments.length?(r=l?u:u7,i):r===u},i}function l7(t){return isFinite(t)?t:NaN}function qn(t,e){return t==null?!1:+t>=e}function Cc(t){return t==null||isNaN(t=+t)?-1/0:t}function lm(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 c7(t){return t[0]}function f7(t){return t[1]}function h7(){return 1}function p7(){var t=c7,e=f7,n=h7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,l=i+s*2>>a,c=gn(20);function h(x){var v=new Float32Array(u*l),b=Math.pow(2,-a),$=-1;for(const R of x){var _=(t(R,++$,x)+s)*b,P=(e(R,$,x)+s)*b,T=+n(R,$,x);if(T&&_>=0&&_<u&&P>=0&&P<l){var w=Math.floor(_),D=Math.floor(P),S=_-w-.5,z=P-D-.5;v[w+D*u]+=(1-S)*(1-z)*T,v[w+1+D*u]+=S*(1-z)*T,v[w+1+(D+1)*u]+=S*z*T,v[w+(D+1)*u]+=(1-S)*z*T}}return ig({data:v,width:u,height:l},o*b),v}function f(x){var v=h(x),b=c(v),$=Math.pow(2,2*a);return Array.isArray(b)||(b=Rn(Number.MIN_VALUE,Di(v)/$,b)),Lc().size([u,l]).thresholds(b.map(_=>_*$))(v).map((_,P)=>(_.value=+b[P],p(_)))}f.contours=function(x){var v=h(x),b=Lc().size([u,l]),$=Math.pow(2,2*a),_=P=>{P=+P;var T=p(b.contour(v,P*$));return T.value=P,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,l=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?(c=typeof x=="function"?x:Array.isArray(x)?gn(um.call(x)):gn(x),f):c},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,d7=(3+8*Ke)*Ke;function Ec(t,e,n,r,i){let o,a,s,u,l=e[0],c=r[0],h=0,f=0;c>l==c>-l?(o=l,l=e[++h]):(o=c,c=r[++f]);let p=0;if(h<t&&f<n)for(c>l==c>-l?(a=l+o,s=o-(a-l),l=e[++h]):(a=c+o,s=o-(a-c),c=r[++f]),o=a,s!==0&&(i[p++]=s);h<t&&f<n;)c>l==c>-l?(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++h]):(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++f]),o=a,s!==0&&(i[p++]=s);for(;h<t;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++h],o=a,s!==0&&(i[p++]=s);for(;f<n;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++f],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function g7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Xi(t){return new Float64Array(t)}const m7=(3+16*Ke)*Ke,y7=(2+12*Ke)*Ke,b7=(9+64*Ke)*Ke*Ke,Gr=Xi(4),cm=Xi(8),fm=Xi(12),hm=Xi(16),Wt=Xi(4);function v7(t,e,n,r,i,o,a){let s,u,l,c,h,f,p,d,g,m,y,x,v,b,$,_,P,T;const w=t-i,D=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*D,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*D,g=f-(f-D),m=D-g,P=d*m-(_-p*g-d*g-p*m),y=$-P,h=$-y,Gr[0]=$-(y+h)+(h-P),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Gr[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Gr[2]=x-(T-h)+(y-h),Gr[3]=T;let R=g7(4,Gr),A=y7*a;if(R>=A||-R>=A||(h=t-w,s=t-(w+h)+(h-i),h=n-D,l=n-(D+h)+(h-i),h=e-S,u=e-(S+h)+(h-o),h=r-z,c=r-(z+h)+(h-o),s===0&&u===0&&l===0&&c===0)||(A=b7*a+d7*Math.abs(R),R+=w*c+z*s-(S*l+D*u),R>=A||-R>=A))return R;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*D,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*D,g=f-(f-D),m=D-g,P=d*m-(_-p*g-d*g-p*m),y=$-P,h=$-y,Wt[0]=$-(y+h)+(h-P),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=Ec(4,Gr,4,Wt,cm);b=w*c,f=Ot*w,p=f-(f-w),d=w-p,f=Ot*c,g=f-(f-c),m=c-g,$=d*m-(b-p*g-d*g-p*m),_=S*l,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*l,g=f-(f-l),m=l-g,P=d*m-(_-p*g-d*g-p*m),y=$-P,h=$-y,Wt[0]=$-(y+h)+(h-P),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=Ec(L,cm,4,Wt,fm);b=s*c,f=Ot*s,p=f-(f-s),d=s-p,f=Ot*c,g=f-(f-c),m=c-g,$=d*m-(b-p*g-d*g-p*m),_=u*l,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*l,g=f-(f-l),m=l-g,P=d*m-(_-p*g-d*g-p*m),y=$-P,h=$-y,Wt[0]=$-(y+h)+(h-P),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 G=Ec(M,fm,4,Wt,hm);return hm[G-1]}function es(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,l=Math.abs(a+s);return Math.abs(u)>=m7*l?u:-v7(t,e,n,r,i,o,l)}const pm=Math.pow(2,-52),ns=new Uint32Array(512);class rs{static from(e,n=S7,r=A7){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,l=-1/0,c=-1/0;for(let w=0;w<a;w++){const D=e[2*w],S=e[2*w+1];D<s&&(s=D),S<u&&(u=S),D>l&&(l=D),S>c&&(c=S),this._ids[w]=w}const h=(s+l)/2,f=(u+c)/2;let p,d,g;for(let w=0,D=1/0;w<a;w++){const S=Rc(h,f,e[2*w],e[2*w+1]);S<D&&(p=w,D=S)}const m=e[2*p],y=e[2*p+1];for(let w=0,D=1/0;w<a;w++){if(w===p)continue;const S=Rc(m,y,e[2*w],e[2*w+1]);S<D&&S>0&&(d=w,D=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 D=w7(m,y,x,v,e[2*w],e[2*w+1]);D<b&&(g=w,b=D)}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];zr(this._ids,this._dists,0,a-1);const w=new Uint32Array(a);let D=0;for(let S=0,z=-1/0;S<a;S++){const R=this._ids[S],A=this._dists[R];A>z&&(w[D++]=R,z=A)}this.hull=w.subarray(0,D),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(es(m,y,x,v,$,_)<0){const w=d,D=x,S=v;d=g,x=$,v=_,g=w,$=D,_=S}const P=$7(m,y,x,v,$,_);this._cx=P.x,this._cy=P.y;for(let w=0;w<a;w++)this._dists[w]=Rc(e[2*w],e[2*w+1],P.x,P.y);zr(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,D,S;w<this._ids.length;w++){const z=this._ids[w],R=e[2*z],A=e[2*z+1];if(w>0&&Math.abs(R-D)<=pm&&Math.abs(A-S)<=pm||(D=R,S=A,z===p||z===d||z===g))continue;let L=0;for(let k=0,C=this._hashKey(R,A);k<this._hashSize&&(L=o[(C+k)%this._hashSize],!(L!==-1&&L!==r[L]));k++);L=n[L];let M=L,G;for(;G=r[M],es(R,A,e[2*M],e[2*M+1],e[2*G],e[2*G+1])>=0;)if(M=G,M===L){M=-1;break}if(M===-1)continue;let U=this._addTriangle(M,z,r[M],-1,-1,i[M]);i[z]=this._legalize(U+2),i[M]=U,T++;let E=r[M];for(;G=r[E],es(R,A,e[2*E],e[2*E+1],e[2*G],e[2*G+1])<0;)U=this._addTriangle(E,z,G,i[z],-1,i[E]),i[z]=this._legalize(U+2),r[E]=E,T--,E=G;if(M===L)for(;G=n[M],es(R,A,e[2*G],e[2*G+1],e[2*M],e[2*M+1])<0;)U=this._addTriangle(G,z,M,-1,i[M],i[G]),this._legalize(U+2),i[G]=U,r[M]=M,T--,M=G;this._hullStart=n[z]=M,r[M]=n[E]=z,r[z]=E,o[this._hashKey(R,A)]=z,o[this._hashKey(e[2*M],e[2*M+1])]=M}this.hull=new Uint32Array(T);for(let w=0,D=this._hullStart;w<T;w++)this.hull[w]=D,D=r[D];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(x7(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 l=s-s%3,c=u+(e+1)%3,h=l+(s+2)%3,f=n[a],p=n[e],d=n[c],g=n[h];if(_7(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=l+(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 x7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Rc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function _7(t,e,n,r,i,o,a,s){const u=t-a,l=e-s,c=n-a,h=r-s,f=i-a,p=o-s,d=u*u+l*l,g=c*c+h*h,m=f*f+p*p;return u*(h*m-g*p)-l*(c*m-g*f)+d*(c*p-h*f)<0}function w7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,h=u*u+l*l,f=.5/(a*l-s*u),p=(l*c-s*h)*f,d=(a*h-u*c)*f;return p*p+d*d}function $7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,h=u*u+l*l,f=.5/(a*l-s*u),p=t+(l*c-s*h)*f,d=e+(a*h-u*c)*f;return{x:p,y:d}}function zr(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?(zr(t,e,o,r),zr(t,e,n,a-1)):(zr(t,e,n,a-1),zr(t,e,o,r))}}function Zi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function S7(t){return t[0]}function A7(t){return t[1]}const dm=1e-6;class Vn{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 kc{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 gm{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,P=e[b],T=e[b+1],w=e[$],D=e[$+1],S=e[_],z=e[_+1],R=w-P,A=D-T,L=S-P,M=z-T,G=(R*M-A*L)*2;if(Math.abs(G)<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 U=1e9*Math.sign((o-P)*M-(a-T)*L);x=(P+S)/2-U*M,v=(T+z)/2+U*L}else{const U=1/G,E=R*R+A*A,k=L*L+M*M;x=P+(M*E-A*k)*U,v=T+(R*k-L*E)*U}s[m]=x,s[m+1]=v}let u=n[n.length-1],l,c=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],l=c,h=f,p=d,c=u*4,f=e[2*u],d=e[2*u+1],i[l+2]=i[c]=p-d,i[l+3]=i[c+1]=f-h}render(e){const n=e==null?e=new Vn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let c=0,h=r.length;c<h;++c){const f=r[c];if(f<c)continue;const p=Math.floor(c/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,l=o[o.length-1];for(let c=0;c<o.length;++c){u=l,l=o[c];const h=Math.floor(i[l]/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 Vn: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 Vn: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 kc;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 l=Math.floor(u/3);if(s.push(n[l*2],n[l*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],l,c=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],l=c,c=this._regioncode(s,u),l===0&&c===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let d,g,m,y,x;if(l===0){if((d=this._clipSegment(o,a,s,u,l,c))===null)continue;[g,m,y,x]=d}else{if((d=this._clipSegment(s,u,o,a,c,l))===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,l,c=o||a;c&8?(u=e+(r-e)*(this.ymax-n)/(i-n),l=this.ymax):c&4?(u=e+(r-e)*(this.ymin-n)/(i-n),l=this.ymin):c&2?(l=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(l=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=l,o=this._regioncode(e,n)):(r=u,i=l,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 l=0,c=s.length,h,f=this._edgecode(s[c-2],s[c-1]);l<c;l+=2)h=f,f=this._edgecode(s[l],s[l+1]),h&&f&&(l=this._edge(e,h,f,s,l),c=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 M7=2*Math.PI,Or=Math.pow;function P7(t){return t[0]}function D7(t){return t[1]}function T7(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 L7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Ic{static from(e,n=P7,r=D7,i){return new Ic("length"in e?C7(e,n,r,i):Float64Array.from(E7(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&&T7(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],l=this.collinear[this.collinear.length-1],c=[n[2*u],n[2*u+1],n[2*l],n[2*l+1]],h=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let f=0,p=n.length/2;f<p;++f){const d=L7(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,l=r.length;u<l;++u){const c=o[u%3===2?u-2:u+1];(r[u]===-1||a[c]===-1)&&(a[c]=u)}for(let u=0,l=i.length;u<l;++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 gm(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 l=u,c=-1;do{if(yield c=a[l],l=l%3===2?l-2:l+1,a[l]!==e)return;if(l=o[l],l===-1){const h=r[(i[e]+1)%r.length];h!==c&&(yield h);return}}while(l!==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:l}=this;if(i[e]===-1||!l.length)return(e+1)%(l.length>>1);let c=e,h=Or(n-l[e*2],2)+Or(r-l[e*2+1],2);const f=i[e];let p=f;do{let d=u[p];const g=Or(n-l[d*2],2)+Or(r-l[d*2+1],2);if(g<h&&(h=g,c=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&&Or(n-l[p*2],2)+Or(r-l[p*2+1],2)<h)return p;break}}while(p!==f);return c}render(e){const n=e==null?e=new Vn: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 l=o[a]*2,c=o[u]*2;e.moveTo(r[l],r[l+1]),e.lineTo(r[c],r[c+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 Vn: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,M7)}return r&&r.value()}renderHull(e){const n=e==null?e=new Vn: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 kc;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Vn: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 kc;return this.renderTriangle(e,n),n.value()}}function C7(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*E7(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 mm={},Nc={},Fc=34,Ki=10,Gc=13;function ym(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function R7(t,e){var n=ym(t);return function(r,i){return e(n(r),i,t)}}function bm(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 k7(t){return t<0?"-"+re(-t,6):t>9999?"+"+re(t,6):re(t,4)}function I7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":k7(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 ha(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var _i=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=vr(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.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 c=this.initialTeardown;if(Ft(c))try{c()}catch(g){o=g instanceof xl?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=vr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{Hd(d)}catch(g){o=o??[],g instanceof xl?o=xi(xi([],vi(o)),vi(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 xl(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Hd(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)&&ha(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ha(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Bd=_i.EMPTY;function Yd(t){return t instanceof _i||t&&"closed"in t&&Ft(t.remove)&&Ft(t.add)&&Ft(t.unsubscribe)}function Hd(t){Ft(t)?t():t.unsubscribe()}var Wd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},DA={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,xi([t,e],vi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Vd(t){DA.setTimeout(function(){throw t})}function _l(){}function pa(t){t()}var wl=function(t){Re(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Yd(n)&&n.add(r)):r.destination=CA,r}return e.create=function(n,r,i){return new wi(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}(_i),PA=Function.prototype.bind;function $l(t,e){return PA.call(t,e)}var TA=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){da(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){da(r)}else da(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){da(n)}},t}(),wi=function(t){Re(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&&Wd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&$l(n.next,s),error:n.error&&$l(n.error,s),complete:n.complete&&$l(n.complete,s)}):a=n}return o.destination=new TA(a),o}return e}(wl);function da(t){Vd(t)}function LA(t){throw t}var CA={closed:!0,next:_l,error:LA,complete:_l},Sl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function jd(t){return t}function EA(t){return t.length===0?jd: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=RA(e)?e:new wi(e,n,r);return pa(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=qd(n),new n(function(i,o){var a=new wi({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[Sl]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return EA(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=qd(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 qd(t){var e;return(e=t??Wd.Promise)!==null&&e!==void 0?e:Promise}function kA(t){return t&&Ft(t.next)&&Ft(t.error)&&Ft(t.complete)}function RA(t){return t&&t instanceof wl||kA(t)&&Yd(t)}function IA(t){return Ft(t==null?void 0:t.lift)}function $i(t){return function(e){if(IA(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 Si(t,e,n,r,i){return new NA(t,e,n,r,i)}var NA=function(t){Re(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(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}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}(wl),FA=vl(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ai=function(t){Re(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 Xd(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new FA},e.prototype.next=function(n){var r=this;pa(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=vr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}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;pa(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;pa(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?Bd:(this.currentObservers=null,s.push(n),new _i(function(){r.currentObservers=null,ha(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 Xd(n,r)},e}(cn),Xd=function(t){Re(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:Bd},e}(Ai),Zd=function(t){Re(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}(Ai),Al={now:function(){return(Al.delegate||Date).now()},delegate:void 0},GA=function(t){Re(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Al);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(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(Ai),zA=function(t){Re(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(_i),Kd={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,xi([t,e],vi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},OA=function(t){Re(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),Kd.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&&Kd.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,ha(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(zA),Qd=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=Al.now,t}(),UA=function(t){Re(e,t);function e(n,r){r===void 0&&(r=Qd.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}(Qd);new UA(OA);var BA=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function YA(t){return Ft(t==null?void 0:t.then)}function HA(t){return Ft(t[Sl])}function WA(t){return Symbol.asyncIterator&&Ft(t==null?void 0:t[Symbol.asyncIterator])}function VA(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 jA(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var qA=jA();function XA(t){return Ft(t==null?void 0:t[qA])}function ZA(t){return AA(this,arguments,function(){var e,n,r,i;return Ud(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,xr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,xr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,xr(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 KA(t){return Ft(t==null?void 0:t.getReader)}function ga(t){if(t instanceof cn)return t;if(t!=null){if(HA(t))return QA(t);if(BA(t))return JA(t);if(YA(t))return t3(t);if(WA(t))return Jd(t);if(XA(t))return e3(t);if(KA(t))return n3(t)}throw VA(t)}function QA(t){return new cn(function(e){var n=t[Sl]();if(Ft(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function JA(t){return new cn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function t3(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,Vd)})}function e3(t){return new cn(function(e){var n,r;try{for(var i=vr(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 Jd(t){return new cn(function(e){r3(t,e).catch(function(n){return e.error(n)})})}function n3(t){return Jd(ZA(t))}function r3(t,e){var n,r,i,o;return SA(this,void 0,void 0,function(){var a,s;return Ud(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=MA(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]}})})}vl(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Ml(t,e){return $i(function(n,r){var i=0;n.subscribe(Si(r,function(o){r.next(t.call(e,o,i++))}))})}function i3(t,e){return e===void 0&&(e=jd),t=t??o3,$i(function(n,r){var i,o=!0;n.subscribe(Si(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function o3(t,e){return t===e}function a3(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Ai}: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(l){var c,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),c=f=void 0,d=g=!1},x=function(){var v=c;y(),v==null||v.unsubscribe()};return $i(function(v,b){p++,!g&&!d&&m();var w=f=f??n();b.add(function(){p--,p===0&&!g&&!d&&(h=Dl(x,u))}),w.subscribe(b),!c&&p>0&&(c=new wi({next:function(D){return w.next(D)},error:function(D){g=!0,m(),h=Dl(y,i,D),w.error(D)},complete:function(){d=!0,m(),h=Dl(y,a),w.complete()}}),ga(v).subscribe(c))})(l)}}function Dl(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 wi({next:function(){i.unsubscribe(),t()}});return ga(e.apply(void 0,xi([],vi(n)))).subscribe(i)}}function s3(t,e,n){var r,i=!1;return r=t,a3({connector:function(){return new GA(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function u3(t,e){return $i(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(Si(r,function(u){i==null||i.unsubscribe();var l=0,c=o++;ga(t(u,c)).subscribe(i=Si(r,function(h){return r.next(e?e(u,h,c,l++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function l3(t){return $i(function(e,n){ga(t).subscribe(Si(n,function(){return n.complete()},_l)),!n.closed&&e.subscribe(n)})}const c3=t=>t.pipe(Ml(e=>e.styles.textSize),i3(),Ml(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})),tg=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=pr.scaleDomain,scaleRange:i=pr.scaleRange})=>{const o=r[0]??pr.scaleDomain[0],a=r[1]??pr.scaleDomain[1],s=i[0]??pr.scaleRange[0],u=i[1]??pr.scaleRange[1],l=o==="auto"?e:o,c=a==="auto"?t:a,h=t-(t-l)/(1-s),f=c/u;return zd().domain([h,f]).range([0,n])},f3=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return dA().domain(t).range(r).padding(n)},h3=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Od().domain([-0,e+0]).range(i)};function p3({name:t,defaultParams:e,initFn:n}){const r=new Ai,i=new WeakMap;let o=()=>{},a;const s=new Zd(e),u=new Zd({}),l=s.pipe(u3(c=>u.pipe(l3(r),Ml(h=>yl(h,c)))),s3(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:c=>{s.next(yl(c,e))},setContext:c=>{a=c,a.observer.fullParams$=l}}}const Mi=()=>function(t,e){return function(n){return class{constructor(){const r=p3({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}}}},Cn=Mi(),se=Mi(),pe=Mi(),eg=Mi(),ng=Mi();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function rg(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ma(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===rg?t:d3,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const h=l+c>>>1;n(s[h],u)<0?l=h+1:c=h}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const h=l+c>>>1;n(s[h],u)<=0?l=h+1:c=h}while(l<c)}return l}function a(s,u,l=0,c=s.length){const h=i(s,u,l,c-1);return h>l&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function d3(){return 0}function ya(t){return t===null?NaN:+t}function*g3(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 ig=ma(_t),og=ig.right,m3=ig.left,y3=ma(ya).center,En=og;function b3(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=Pl(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 ag=sg(Pl),v3=sg(x3);function sg(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),l=i.slice();return s&&u?(_r(s,l,i,o,a),_r(s,i,l,o,a),_r(s,l,i,o,a),wr(u,i,l,o,a),wr(u,l,i,o,a),wr(u,i,l,o,a)):s?(_r(s,i,l,o,a),_r(s,l,i,o,a),_r(s,i,l,o,a)):u&&(wr(u,i,l,o,a),wr(u,l,i,o,a),wr(u,i,l,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 wr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function x3(t){const e=Pl(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 Pl(t){const e=Math.floor(t);if(e===t)return _3(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let l=e*o[a];const c=u*e,h=c+u;for(let f=a,p=a+c;f<p;f+=u)l+=o[Math.min(s,f)];for(let f=a,p=s;f<=p;f+=u)l+=o[Math.min(s,f+c)],i[f]=(l+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,l-=o[Math.max(a,f-c)]}}function _3(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 l=i,c=i+u;l<c;l+=a)s+=r[Math.min(o,l)];for(let l=i,c=o;l<=c;l+=a)s+=r[Math.min(o,l+u)],n[l]=s/e,s-=r[Math.max(i,l-u)]}}function ba(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 w3(t){return t.length|0}function $3(t){return!(t>0)}function S3(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function A3(t){return e=>t(...e)}function M3(...t){const e=typeof t[t.length-1]=="function"&&A3(t.pop());t=t.map(S3);const n=t.map(w3),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some($3))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 D3(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 ug(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 lg(t,e){const n=ug(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 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 P3(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 T3(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 Pi extends Map{constructor(e,n=hg){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(Tl(this,e))}has(e){return super.has(Tl(this,e))}set(e,n){return super.set(cg(this,e),n)}delete(e){return super.delete(fg(this,e))}}class kn extends Set{constructor(e,n=hg){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(Tl(this,e))}add(e){return super.add(cg(this,e))}delete(e){return super.delete(fg(this,e))}}function Tl({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function cg({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function fg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function hg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function $r(t){return t}function pg(t,...e){return Sr(t,$r,$r,e)}function dg(t,...e){return Sr(t,Array.from,$r,e)}function gg(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 L3(t,...e){return gg(dg(t,...e),e)}function C3(t,e,...n){return gg(yg(t,e,...n),n)}function mg(t,e,...n){return Sr(t,$r,e,n)}function yg(t,e,...n){return Sr(t,Array.from,e,n)}function E3(t,...e){return Sr(t,$r,bg,e)}function k3(t,...e){return Sr(t,Array.from,bg,e)}function bg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Sr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Pi,u=r[a++];let l=-1;for(const c of o){const h=u(c,++l,o),f=s.get(h);f?f.push(c):s.set(h,[c])}for(const[c,h]of s)s.set(c,i(h,a));return e(s)}(t,0)}function vg(t,e){return Array.from(e,n=>t[n])}function Ll(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=Ar(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Ar(n[i],n[o]))),vg(t,r)}return t.sort(Cl(n))}function Cl(t=_t){if(t===_t)return Ar;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 Ar(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function R3(t,e,n){return(e.length!==2?Ll(mg(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):Ll(pg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var I3=Array.prototype,N3=I3.slice;function El(t){return()=>t}const F3=Math.sqrt(50),G3=Math.sqrt(10),z3=Math.sqrt(2);function va(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>=F3?10:o>=G3?5:o>=z3?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?va(t,e,n*2):[s,u,l]}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?va(e,t,n):va(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function In(t,e,n){return e=+e,t=+t,n=+n,va(t,e,n)[2]}function xa(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 kl(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 Rl(t){return Math.max(1,Math.ceil(Math.log(ba(t))/Math.LN2)+1)}function xg(){var t=$r,e=Di,n=Rl;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,l=new Array(a);for(o=0;o<a;++o)l[o]=t(i[o],o,i);var c=e(l),h=c[0],f=c[1],p=n(l,h,f);if(!Array.isArray(p)){const v=f,b=+p;if(e===Di&&([h,f]=kl(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 w=In(h,f,b);isFinite(w)&&(w>0?f=(Math.floor(f/w)+1)*w:w<0&&(f=(Math.ceil(f*-w)+1)/-w))}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=l[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=l[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=l[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:El(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:El([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:El(Array.isArray(i)?N3.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 Il(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 _a(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 Nl(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 wa(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?Ar:Cl(i);r>n;){if(r-n>600){const u=r-n+1,l=e-n+1,c=Math.log(u),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(u-h)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(e-l*h/u+f)),d=Math.min(r,Math.floor(e+(u-l)*h/u+f));wa(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 _g(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(g3(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return _a(t);if(e>=1)return Ti(t);var r,i=(r-1)*e,o=Math.floor(i),a=Ti(wa(t,o).subarray(0,o+1)),s=_a(t.subarray(o+1));return a+(s-a)*(i-o)}}function wg(t,e,n=ya){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 $g(t,e,n=ya){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ya(n(t[u],u,t))),e<=0)return Nl(r);if(e>=1)return Il(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return wa(i,a,0,o,(s,u)=>Ar(r[s],r[u])),a=_g(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function O3(t,e,n){const r=ba(t),i=Ci(t,.75)-Ci(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function U3(t,e,n){const r=ba(t),i=lg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function B3(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 Y3(t,e){return Ci(t,.5,e)}function H3(t,e){return $g(t,.5,e)}function*W3(t){for(const e of t)yield*e}function Fl(t){return Array.from(W3(t))}function V3(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 j3(t,e=q3){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function q3(t,e){return[t,e]}function fn(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 X3(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)=>Ar(n[s],n[u]):Cl(i)),t.forEach((s,u)=>{const l=i(s,o===void 0?s:o);l>=0?((o===void 0||l>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function Z3(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 Sg(t,e=_t){if(e.length===1)return Nl(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 K3(t,e=_t){if(e.length===1)return Il(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 Q3(t,e){const n=Sg(t,e);return n<0?void 0:n}const J3=Ag(Math.random);function Ag(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 Mg(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 Dg(t){if(!(o=t.length))return[];for(var e=-1,n=_a(t,t5),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 t5(t){return t.length}function e5(){return Dg(arguments)}function n5(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 r5(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 i5(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 o5(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 a5(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 s5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function u5(t,...e){t=new kn(t);for(const n of e)for(const r of n)t.delete(r);return t}function l5(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 c5(t,...e){t=new kn(t),e=e.map(f5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function f5(t){return t instanceof kn?t:new kn(t)}function Pg(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Tg(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Tg(a);if(r.add(u),Object.is(o,u))break}}return!0}function Tg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function h5(t,e){return Pg(e,t)}function p5(...t){const e=new kn;for(const n of t)for(const r of n)e.add(r);return e}function d5(t){return t}var $a=1,Sa=2,Gl=3,Ei=4,Lg=1e-6;function g5(t){return"translate("+t+",0)"}function m5(t){return"translate(0,"+t+")"}function y5(t){return e=>+t(e)}function b5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function v5(){return!this.__axis}function Aa(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=t===$a||t===Ei?-1:1,c=t===Ei||t===Sa?"x":"y",h=t===$a||t===Gl?g5:m5;function f(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):d5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?b5:y5)(e.copy(),u),w=p.selection?p.selection():p,D=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(d,e).order(),$=T.exit(),_=T.enter().append("g").attr("class","tick"),P=T.select("line"),S=T.select("text");D=D.merge(D.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(_),P=P.merge(_.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),S=S.merge(_.append("text").attr("fill","currentColor").attr(c,l*m).attr("dy",t===$a?"0em":t===Gl?"0.71em":"0.32em")),p!==w&&(D=D.transition(p),T=T.transition(p),P=P.transition(p),S=S.transition(p),$=$.transition(p).attr("opacity",Lg).attr("transform",function(G){return isFinite(G=b(G))?h(G+u):this.getAttribute("transform")}),_.attr("opacity",Lg).attr("transform",function(G){var k=this.parentNode.__axis;return h((k&&isFinite(k=k(G))?k:b(G))+u)})),$.remove(),D.attr("d",t===Ei||t===Sa?a?"M"+l*a+","+x+"H"+u+"V"+v+"H"+l*a:"M"+u+","+x+"V"+v:a?"M"+x+","+l*a+"V"+u+"H"+v+"V"+l*a:"M"+x+","+u+"H"+v),T.attr("opacity",1).attr("transform",function(G){return h(b(G)+u)}),P.attr(c+"2",l*o),S.attr(c,l*m).text(g),w.filter(v5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Sa?"start":t===Ei?"end":"middle"),w.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 Cg(t){return Aa($a,t)}function x5(t){return Aa(Sa,t)}function _5(t){return Aa(Gl,t)}function Eg(t){return Aa(Ei,t)}var w5={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 Ma(n)}function Ma(t){this._=t}function $5(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}})}Ma.prototype=Nn.prototype={constructor:Ma,on:function(t,e){var n=this._,r=$5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=S5(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]=kg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=kg(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 Ma(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 S5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function kg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=w5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var zl="http://www.w3.org/1999/xhtml";const Ol={svg:"http://www.w3.org/2000/svg",xhtml:zl,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)),Ol.hasOwnProperty(e)?{space:Ol[e],local:t}:t}function A5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===zl&&e.documentElement.namespaceURI===zl?e.createElement(t):e.createElementNS(n,t)}}function M5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Da(t){var e=ki(t);return(e.local?M5:A5)(e)}function D5(){}function Pa(t){return t==null?D5:function(){return this.querySelector(t)}}function P5(t){typeof t!="function"&&(t=Pa(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,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new Ht(r,this._parents)}function Rg(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function T5(){return[]}function Ul(t){return t==null?T5:function(){return this.querySelectorAll(t)}}function L5(t){return function(){return Rg(t.apply(this,arguments))}}function C5(t){typeof t=="function"?t=L5(t):t=Ul(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,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new Ht(r,i)}function Bl(t){return function(){return this.matches(t)}}function Ig(t){return function(e){return e.matches(t)}}var E5=Array.prototype.find;function k5(t){return function(){return E5.call(this.children,t)}}function R5(){return this.firstElementChild}function I5(t){return this.select(t==null?R5:k5(typeof t=="function"?t:Ig(t)))}var N5=Array.prototype.filter;function F5(){return Array.from(this.children)}function G5(t){return function(){return N5.call(this.children,t)}}function z5(t){return this.selectAll(t==null?F5:G5(typeof t=="function"?t:Ig(t)))}function O5(t){typeof t!="function"&&(t=Bl(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ht(r,this._parents)}function Ng(t){return new Array(t.length)}function U5(){return new Ht(this._enter||this._groups.map(Ng),this._parents)}function Ta(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ta.prototype={constructor:Ta,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 B5(t){return function(){return t}}function Y5(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ta(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function H5(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,h=o.length,f=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new Ta(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(f[s])===u&&(i[s]=u)}function W5(t){return t.__data__}function V5(t,e){if(!arguments.length)return Array.from(this,W5);var n=e?H5:Y5,r=this._parents,i=this._groups;typeof t!="function"&&(t=B5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,p=j5(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),y=u[l]=new Array(f);n(c,h,g,m,y,p,e);for(var x=0,v=0,b,w;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!(w=m[v])&&++v<d;);b._next=w||null}}return a=new Ht(a,r),a._enter=s,a._exit=u,a}function j5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function q5(){return new Ht(this._exit||this._groups.map(Ng),this._parents)}function X5(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 l=n[u],c=r[u],h=l.length,f=s[u]=new Array(h),p,d=0;d<h;++d)(p=l[d]||c[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new Ht(s,this._parents)}function K5(){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 Q5(t){t||(t=J5);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),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new Ht(i,this._parents).order()}function J5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function t6(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function e6(){return Array.from(this)}function n6(){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 r6(){let t=0;for(const e of this)++t;return t}function i6(){return!this.node()}function o6(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 a6(t){return function(){this.removeAttribute(t)}}function s6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function u6(t,e){return function(){this.setAttribute(t,e)}}function l6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function c6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function f6(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 h6(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?s6:a6:typeof e=="function"?n.local?f6:c6:n.local?l6:u6)(n,e))}function Yl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function p6(t){return function(){this.style.removeProperty(t)}}function d6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function g6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function m6(t,e,n){return arguments.length>1?this.each((e==null?p6:typeof e=="function"?g6:d6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||Yl(t).getComputedStyle(t,null).getPropertyValue(e)}function y6(t){return function(){delete this[t]}}function b6(t,e){return function(){this[t]=e}}function v6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function x6(t,e){return arguments.length>1?this.each((e==null?y6:typeof e=="function"?v6:b6)(t,e)):this.node()[t]}function Fg(t){return t.trim().split(/^|\s+/)}function Hl(t){return t.classList||new Gg(t)}function Gg(t){this._node=t,this._names=Fg(t.getAttribute("class")||"")}Gg.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 zg(t,e){for(var n=Hl(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Og(t,e){for(var n=Hl(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function _6(t){return function(){zg(this,t)}}function w6(t){return function(){Og(this,t)}}function $6(t,e){return function(){(e.apply(this,arguments)?zg:Og)(this,t)}}function S6(t,e){var n=Fg(t+"");if(arguments.length<2){for(var r=Hl(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?$6:e?_6:w6)(n,e))}function A6(){this.textContent=""}function M6(t){return function(){this.textContent=t}}function D6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function P6(t){return arguments.length?this.each(t==null?A6:(typeof t=="function"?D6:M6)(t)):this.node().textContent}function T6(){this.innerHTML=""}function L6(t){return function(){this.innerHTML=t}}function C6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function E6(t){return arguments.length?this.each(t==null?T6:(typeof t=="function"?C6:L6)(t)):this.node().innerHTML}function k6(){this.nextSibling&&this.parentNode.appendChild(this)}function R6(){return this.each(k6)}function I6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function N6(){return this.each(I6)}function F6(t){var e=typeof t=="function"?t:Da(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function G6(){return null}function z6(t,e){var n=typeof t=="function"?t:Da(t),r=e==null?G6:typeof e=="function"?e:Pa(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function O6(){var t=this.parentNode;t&&t.removeChild(this)}function U6(){return this.each(O6)}function B6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Y6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function H6(t){return this.select(t?Y6:B6)}function W6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function V6(t){return function(e){t.call(this,e,this.__data__)}}function j6(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 q6(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 X6(t,e,n){return function(){var r=this.__on,i,o=V6(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=j6(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?X6:q6,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Ug(t,e,n){var r=Yl(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 K6(t,e){return function(){return Ug(this,t,e)}}function Q6(t,e){return function(){return Ug(this,t,e.apply(this,arguments))}}function J6(t,e){return this.each((typeof e=="function"?Q6:K6)(t,e))}function*t8(){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 Wl=[null];function Ht(t,e){this._groups=t,this._parents=e}function Gn(){return new Ht([[document.documentElement]],Wl)}function e8(){return this}Ht.prototype=Gn.prototype={constructor:Ht,select:P5,selectAll:C5,selectChild:I5,selectChildren:z5,filter:O5,data:V5,enter:U5,exit:q5,join:X5,merge:Z5,selection:e8,order:K5,sort:Q5,call:t6,nodes:e6,node:n6,size:r6,empty:i6,each:o6,attr:h6,style:m6,property:x6,classed:S6,text:P6,html:E6,raise:R6,lower:N6,append:F6,insert:z6,remove:U6,clone:H6,datum:W6,on:Z6,dispatch:J6,[Symbol.iterator]:t8};function X(t){return typeof t=="string"?new Ht([[document.querySelector(t)]],[document.documentElement]):new Ht([[t]],Wl)}function n8(t){return X(Da(t).call(document.documentElement))}var r8=0;function Bg(){return new Vl}function Vl(){this._="@"+(++r8).toString(36)}Vl.prototype=Bg.prototype={constructor:Vl,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 Yg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ue(t,e){if(t=Yg(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 i8(t,e){return t.target&&(t=Yg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ue(n,e))}function o8(t){return typeof t=="string"?new Ht([document.querySelectorAll(t)],[document.documentElement]):new Ht([Rg(t)],Wl)}const a8={passive:!1},Ri={capture:!0,passive:!1};function jl(t){t.stopImmediatePropagation()}function Mr(t){t.preventDefault(),t.stopImmediatePropagation()}function La(t){var e=t.document.documentElement,n=X(t).on("dragstart.drag",Mr,Ri);"onselectstart"in e?n.on("selectstart.drag",Mr,Ri):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ca(t,e){var n=t.document.documentElement,r=X(t).on("dragstart.drag",null);e&&(r.on("click.drag",Mr,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 Ea=t=>()=>t;function ql(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:l,dispatch:c}){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:l,enumerable:!0,configurable:!0},_:{value:c}})}ql.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function s8(t){return!t.ctrlKey&&!t.button}function u8(){return this.parentNode}function l8(t,e){return e??{x:t.x,y:t.y}}function c8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hg(){var t=s8,e=u8,n=l8,r=c8,i={},o=Nn("start","drag","end"),a=0,s,u,l,c,h=0;function f(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,a8).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,w){if(!(c||!t.call(this,b,w))){var D=v(this,e.call(this,b,w),b,w,"mouse");D&&(X(b.view).on("mousemove.drag",d,Ri).on("mouseup.drag",g,Ri),La(b.view),jl(b),l=!1,s=b.clientX,u=b.clientY,D("start",b))}}function d(b){if(Mr(b),!l){var w=b.clientX-s,D=b.clientY-u;l=w*w+D*D>h}i.mouse("drag",b)}function g(b){X(b.view).on("mousemove.drag mouseup.drag",null),Ca(b.view,l),Mr(b),i.mouse("end",b)}function m(b,w){if(t.call(this,b,w)){var D=b.changedTouches,T=e.call(this,b,w),$=D.length,_,P;for(_=0;_<$;++_)(P=v(this,T,b,w,D[_].identifier,D[_]))&&(jl(b),P("start",b,D[_]))}}function y(b){var w=b.changedTouches,D=w.length,T,$;for(T=0;T<D;++T)($=i[w[T].identifier])&&(Mr(b),$("drag",b,w[T]))}function x(b){var w=b.changedTouches,D=w.length,T,$;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),T=0;T<D;++T)($=i[w[T].identifier])&&(jl(b),$("end",b,w[T]))}function v(b,w,D,T,$,_){var P=o.copy(),S=ue(_||D,w),G,k,A;if((A=n.call(b,new ql("beforestart",{sourceEvent:D,target:f,identifier:$,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:P}),T))!=null)return G=A.x-S[0]||0,k=A.y-S[1]||0,function L(M,z,U){var E=S,R;switch(M){case"start":i[$]=L,R=a++;break;case"end":delete i[$],--a;case"drag":S=ue(U||z,w),R=a;break}P.call(M,b,new ql(M,{sourceEvent:z,subject:A,target:f,identifier:$,active:R,x:S[0]+G,y:S[1]+k,dx:S[0]-E[0],dy:S[1]-E[1],dispatch:P}),T)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Ea(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:Ea(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Ea(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Ea(!!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 Dr(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 hn(){}var zn=.7,Pr=1/zn,Tr="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f8=/^#([0-9a-f]{3,8})$/,h8=new RegExp(`^rgb\\(${Tr},${Tr},${Tr}\\)$`),p8=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),d8=new RegExp(`^rgba\\(${Tr},${Tr},${Tr},${Ni}\\)$`),g8=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${Ni}\\)$`),m8=new RegExp(`^hsl\\(${Ni},${Ie},${Ie}\\)$`),y8=new RegExp(`^hsla\\(${Ni},${Ie},${Ie},${Ni}\\)$`),Wg={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};Dr(hn,pn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Vg,formatHex:Vg,formatHex8:b8,formatHsl:v8,formatRgb:jg,toString:jg});function Vg(){return this.rgb().formatHex()}function b8(){return this.rgb().formatHex8()}function v8(){return Qg(this).formatHsl()}function jg(){return this.rgb().formatRgb()}function pn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=f8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?qg(e):n===3?new Et(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ka(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ka(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=h8.exec(t))?new Et(e[1],e[2],e[3],1):(e=p8.exec(t))?new Et(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=d8.exec(t))?ka(e[1],e[2],e[3],e[4]):(e=g8.exec(t))?ka(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=m8.exec(t))?Kg(e[1],e[2]/100,e[3]/100,1):(e=y8.exec(t))?Kg(e[1],e[2]/100,e[3]/100,e[4]):Wg.hasOwnProperty(t)?qg(Wg[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function qg(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function ka(t,e,n,r){return r<=0&&(t=e=n=NaN),new Et(t,e,n,r)}function Xl(t){return t instanceof hn||(t=pn(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function Lr(t,e,n,r){return arguments.length===1?Xl(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}Dr(Et,Lr,Ii(hn,{brighter(t){return t=t==null?Pr:Math.pow(Pr,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(On(this.r),On(this.g),On(this.b),Ra(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:Xg,formatHex:Xg,formatHex8:x8,formatRgb:Zg,toString:Zg}));function Xg(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function x8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function Zg(){const t=Ra(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function Ra(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 Kg(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 Qg(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof hn||(t=pn(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 Ia(t,e,n,r){return arguments.length===1?Qg(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}Dr(Ae,Ia,Ii(hn,{brighter(t){return t=t==null?Pr:Math.pow(Pr,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 Et(Zl(t>=240?t-240:t+120,i,r),Zl(t,i,r),Zl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(Jg(this.h),Na(this.s),Na(this.l),Ra(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=Ra(this.opacity);return`${t===1?"hsl(":"hsla("}${Jg(this.h)}, ${Na(this.s)*100}%, ${Na(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Jg(t){return t=(t||0)%360,t<0?t+360:t}function Na(t){return Math.max(0,Math.min(1,t||0))}function Zl(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 t0=Math.PI/180,e0=180/Math.PI,Fa=18,n0=.96422,r0=1,i0=.82521,o0=4/29,Cr=6/29,a0=3*Cr*Cr,_8=Cr*Cr*Cr;function s0(t){if(t instanceof Me)return new Me(t.l,t.a,t.b,t.opacity);if(t instanceof Ne)return l0(t);t instanceof Et||(t=Xl(t));var e=tc(t.r),n=tc(t.g),r=tc(t.b),i=Kl((.2225045*e+.7168786*n+.0606169*r)/r0),o,a;return e===n&&n===r?o=a=i:(o=Kl((.4360747*e+.3850649*n+.1430804*r)/n0),a=Kl((.0139322*e+.0971045*n+.7141733*r)/i0)),new Me(116*i-16,500*(o-i),200*(i-a),t.opacity)}function w8(t,e){return new Me(t,0,0,e??1)}function Ga(t,e,n,r){return arguments.length===1?s0(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}Dr(Me,Ga,Ii(hn,{brighter(t){return new Me(this.l+Fa*(t??1),this.a,this.b,this.opacity)},darker(t){return new Me(this.l-Fa*(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=n0*Ql(e),t=r0*Ql(t),n=i0*Ql(n),new Et(Jl(3.1338561*e-1.6168667*t-.4906146*n),Jl(-.9787684*e+1.9161415*t+.033454*n),Jl(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Kl(t){return t>_8?Math.pow(t,1/3):t/a0+o0}function Ql(t){return t>Cr?t*t*t:a0*(t-o0)}function Jl(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function tc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function u0(t){if(t instanceof Ne)return new Ne(t.h,t.c,t.l,t.opacity);if(t instanceof Me||(t=s0(t)),t.a===0&&t.b===0)return new Ne(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*e0;return new Ne(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function $8(t,e,n,r){return arguments.length===1?u0(t):new Ne(n,e,t,r??1)}function za(t,e,n,r){return arguments.length===1?u0(t):new Ne(t,e,n,r??1)}function Ne(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function l0(t){if(isNaN(t.h))return new Me(t.l,0,0,t.opacity);var e=t.h*t0;return new Me(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Dr(Ne,za,Ii(hn,{brighter(t){return new Ne(this.h,this.c,this.l+Fa*(t??1),this.opacity)},darker(t){return new Ne(this.h,this.c,this.l-Fa*(t??1),this.opacity)},rgb(){return l0(this).rgb()}}));var c0=-.14861,ec=1.78277,nc=-.29227,Oa=-.90649,Fi=1.97294,f0=Fi*Oa,h0=Fi*ec,p0=ec*nc-Oa*c0;function S8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof Et||(t=Xl(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(p0*r+f0*e-h0*n)/(p0+f0-h0),o=r-i,a=(Fi*(n-i)-nc*o)/Oa,s=Math.sqrt(a*a+o*o)/(Fi*i*(1-i)),u=s?Math.atan2(a,o)*e0-120:NaN;return new Bn(u<0?u+360:u,s,i,t.opacity)}function De(t,e,n,r){return arguments.length===1?S8(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}Dr(Bn,De,Ii(hn,{brighter(t){return t=t==null?Pr:Math.pow(Pr,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)*t0,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*(c0*r+ec*i)),255*(e+n*(nc*r+Oa*i)),255*(e+n*(Fi*r)),this.opacity)}}));function d0(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 g0(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 d0((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 d0((n-r/e)*e,i,o,a,s)}}const Ua=t=>()=>t;function y0(t,e){return function(n){return t+n*e}}function A8(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 Ba(t,e){var n=e-t;return n?y0(t,n>180||n<-180?n-360*Math.round(n/360):n):Ua(isNaN(t)?e:t)}function M8(t){return(t=+t)==1?kt:function(e,n){return n-e?A8(e,n,t):Ua(isNaN(e)?n:e)}}function kt(t,e){var n=e-t;return n?y0(t,n):Ua(isNaN(t)?e:t)}const Gi=function t(e){var n=M8(e);function r(i,o){var a=n((i=Lr(i)).r,(o=Lr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=kt(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function b0(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=Lr(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 v0=b0(g0),D8=b0(m0);function rc(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 x0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function P8(t,e){return(x0(e)?rc:_0)(t,e)}function _0(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]=qe(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 w0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function de(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function $0(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]=qe(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ic=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oc=new RegExp(ic.source,"g");function T8(t){return function(){return t}}function L8(t){return function(e){return t(e)+""}}function ac(t,e){var n=ic.lastIndex=oc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=ic.exec(t))&&(i=oc.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:de(r,i)})),n=oc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?L8(u[0].x):T8(e):(e=u.length,function(l){for(var c=0,h;c<e;++c)s[(h=u[c]).i]=h.x(l);return s.join("")})}function qe(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ua(e):(n==="number"?de:n==="string"?(r=pn(e))?(e=r,Gi):ac:e instanceof pn?Gi:e instanceof Date?w0:x0(e)?rc:Array.isArray(e)?_0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?$0:de)(t,e)}function C8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function E8(t,e){var n=Ba(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ya(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var S0=180/Math.PI,sc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function A0(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)*S0,skewX:Math.atan(u)*S0,scaleX:a,scaleY:s}}var Ha;function k8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?sc:A0(e.a,e.b,e.c,e.d,e.e,e.f)}function R8(t){return t==null||(Ha||(Ha=document.createElementNS("http://www.w3.org/2000/svg","g")),Ha.setAttribute("transform",t),!(t=Ha.transform.baseVal.consolidate()))?sc:(t=t.matrix,A0(t.a,t.b,t.c,t.d,t.e,t.f))}function M0(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,h,f,p,d){if(l!==h||c!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:de(l,h)},{i:g-2,x:de(c,f)})}else(h||f)&&p.push("translate("+h+e+f+n)}function a(l,c,h,f){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:de(l,c)})):c&&h.push(i(h)+"rotate("+c+r)}function s(l,c,h,f){l!==c?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:de(l,c)}):c&&h.push(i(h)+"skewX("+c+r)}function u(l,c,h,f,p,d){if(l!==h||c!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:de(l,h)},{i:g-2,x:de(c,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(l,c){var h=[],f=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,h,f),a(l.rotate,c.rotate,h,f),s(l.skewX,c.skewX,h,f),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,f),l=c=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 D0=M0(k8,"px, ","px)","deg)"),P0=M0(R8,", ",")",")"),I8=1e-12;function T0(t){return((t=Math.exp(t))+1/t)/2}function N8(t){return((t=Math.exp(t))-1/t)/2}function F8(t){return((t=Math.exp(2*t))-1)/(t+1)}const L0=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],l=o[2],c=a[0],h=a[1],f=a[2],p=c-s,d=h-u,g=p*p+d*d,m,y;if(g<I8)y=Math.log(f/l)/e,m=function(T){return[s+T*p,u+T*d,l*Math.exp(e*T*y)]};else{var x=Math.sqrt(g),v=(f*f-l*l+r*g)/(2*l*n*x),b=(f*f-l*l-r*g)/(2*f*n*x),w=Math.log(Math.sqrt(v*v+1)-v),D=Math.log(Math.sqrt(b*b+1)-b);y=(D-w)/e,m=function(T){var $=T*y,_=T0(w),P=l/(n*x)*(_*F8(e*$+w)-N8(w));return[s+P*p,u+P*d,l*_/T0(e*$+w)]}}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 C0(t){return function(e,n){var r=t((e=Ia(e)).h,(n=Ia(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 G8=C0(Ba);var z8=C0(kt);function O8(t,e){var n=kt((t=Ga(t)).l,(e=Ga(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 E0(t){return function(e,n){var r=t((e=za(e)).h,(n=za(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 U8=E0(Ba);var B8=E0(kt);function k0(t){return function e(n){n=+n;function r(i,o){var a=t((i=De(i)).h,(o=De(o)).h),s=kt(i.s,o.s),u=kt(i.l,o.l),l=kt(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=e,r}(1)}const Y8=k0(Ba);var Wa=k0(kt);function R0(t,e){e===void 0&&(e=t,t=qe);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 H8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Er=0,zi=0,Oi=0,I0=1e3,Va,Ui,ja=0,Yn=0,qa=0,Bi=typeof performance=="object"&&performance.now?performance:Date,N0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Yi(){return Yn||(N0(W8),Yn=Bi.now()+qa)}function W8(){Yn=0}function Hi(){this._call=this._time=this._next=null}Hi.prototype=Xa.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:Va=this,Ui=this),this._call=t,this._time=n,uc()},stop:function(){this._call&&(this._call=null,this._time=1/0,uc())}};function Xa(t,e,n){var r=new Hi;return r.restart(t,e,n),r}function F0(){Yi(),++Er;for(var t=Va,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Er}function G0(){Yn=(ja=Bi.now())+qa,Er=zi=0;try{F0()}finally{Er=0,j8(),Yn=0}}function V8(){var t=Bi.now(),e=t-ja;e>I0&&(qa-=e,ja=t)}function j8(){for(var t,e=Va,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:Va=n);Ui=t,uc(r)}function uc(t){if(!Er){zi&&(zi=clearTimeout(zi));var e=t-Yn;e>24?(t<1/0&&(zi=setTimeout(G0,t-Bi.now()-qa)),Oi&&(Oi=clearInterval(Oi))):(Oi||(ja=Bi.now(),Oi=setInterval(V8,I0)),Er=1,N0(G0))}}function lc(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 q8(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(l){l+=i,r._restart(u,i+=a,s),o(l)},a,s)},r.restart(t,e,n),r)}var X8=Nn("start","end","cancel","interrupt"),Z8=[],z0=0,cc=1,fc=2,Za=3,O0=4,hc=5,Ka=6;function Qa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;K8(t,n,{name:e,index:r,group:i,on:X8,tween:Z8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:z0})}function pc(t,e){var n=Pe(t,e);if(n.state>z0)throw new Error("too late; already scheduled");return n}function Fe(t,e){var n=Pe(t,e);if(n.state>Za)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 K8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(l){n.state=cc,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,h,f,p;if(n.state!==cc)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Za)return lc(a);p.state===O0?(p.state=Ka,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=Ka,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(lc(function(){n.state===Za&&(n.state=O0,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=fc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===fc){for(n.state=Za,i=new Array(f=n.tween.length),c=0,h=-1;c<f;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=hc,1),h=-1,f=i.length;++h<f;)i[h].call(t,c);n.state===hc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Ka,n.timer.stop(),delete r[e];for(var l 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>fc&&r.state<hc,r.state=Ka,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function Q8(t){return this.each(function(){Hn(this,t)})}function J8(t,e){var n,r;return function(){var i=Fe(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 tM(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Fe(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function eM(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?J8:tM)(n,t,e))}function dc(t,e,n){var r=t._id;return t.each(function(){var i=Fe(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Pe(i,r).value[e]}}function U0(t,e){var n;return(typeof e=="number"?de:e instanceof pn?Gi:(n=pn(e))?(e=n,Gi):ac)(t,e)}function nM(t){return function(){this.removeAttribute(t)}}function rM(t){return function(){this.removeAttributeNS(t.space,t.local)}}function iM(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 oM(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 aM(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 sM(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 uM(t,e){var n=ki(t),r=n==="transform"?P0:U0;return this.attrTween(t,typeof e=="function"?(n.local?sM:aM)(n,r,dc(this,"attr."+t,e)):e==null?(n.local?rM:nM)(n):(n.local?oM:iM)(n,r,e))}function lM(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function cM(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function fM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&cM(t,o)),n}return i._value=e,i}function hM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&lM(t,o)),n}return i._value=e,i}function pM(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?fM:hM)(r,e))}function dM(t,e){return function(){pc(this,t).delay=+e.apply(this,arguments)}}function gM(t,e){return e=+e,function(){pc(this,t).delay=e}}function mM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dM:gM)(e,t)):Pe(this.node(),e).delay}function yM(t,e){return function(){Fe(this,t).duration=+e.apply(this,arguments)}}function bM(t,e){return e=+e,function(){Fe(this,t).duration=e}}function vM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?yM:bM)(e,t)):Pe(this.node(),e).duration}function xM(t,e){if(typeof e!="function")throw new Error;return function(){Fe(this,t).ease=e}}function _M(t){var e=this._id;return arguments.length?this.each(xM(e,t)):Pe(this.node(),e).ease}function wM(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Fe(this,t).ease=n}}function $M(t){if(typeof t!="function")throw new Error;return this.each(wM(this._id,t))}function SM(t){typeof t!="function"&&(t=Bl(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ge(r,this._parents,this._name,this._id)}function AM(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],l=n[s],c=u.length,h=a[s]=new Array(c),f,p=0;p<c;++p)(f=u[p]||l[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new Ge(a,this._parents,this._name,this._id)}function MM(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 DM(t,e,n){var r,i,o=MM(e)?pc:Fe;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function PM(t,e){var n=this._id;return arguments.length<2?Pe(this.node(),n).on.on(t):this.each(DM(n,t,e))}function TM(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function LM(){return this.on("end.remove",TM(this._id))}function CM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Pa(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,l=o[a]=new Array(u),c,h,f=0;f<u;++f)(c=s[f])&&(h=t.call(c,c.__data__,f,s))&&("__data__"in c&&(h.__data__=c.__data__),l[f]=h,Qa(l[f],e,n,f,l,Pe(c,n)));return new Ge(o,this._parents,e,n)}function EM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ul(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,h=0;h<l;++h)if(c=u[h]){for(var f=t.call(c,c.__data__,h,u),p,d=Pe(c,n),g=0,m=f.length;g<m;++g)(p=f[g])&&Qa(p,e,n,g,f,d);o.push(f),a.push(c)}return new Ge(o,a,e,n)}var kM=Gn.prototype.constructor;function RM(){return new kM(this._groups,this._parents)}function IM(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 B0(t){return function(){this.style.removeProperty(t)}}function NM(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 FM(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 GM(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Fe(this,t),l=u.on,c=u.value[o]==null?s||(s=B0(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function zM(t,e,n){var r=(t+="")=="transform"?D0:U0;return e==null?this.styleTween(t,IM(t,r)).on("end.style."+t,B0(t)):typeof e=="function"?this.styleTween(t,FM(t,r,dc(this,"style."+t,e))).each(GM(this._id,t)):this.styleTween(t,NM(t,r,e),n).on("end.style."+t,null)}function OM(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function UM(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&OM(t,a,n)),r}return o._value=e,o}function BM(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,UM(t,e,n??""))}function YM(t){return function(){this.textContent=t}}function HM(t){return function(){var e=t(this);this.textContent=e??""}}function WM(t){return this.tween("text",typeof t=="function"?HM(dc(this,"text",t)):YM(t==null?"":t+""))}function VM(t){return function(e){this.textContent=t.call(this,e)}}function jM(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&VM(i)),e}return r._value=t,r}function qM(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,jM(t))}function XM(){for(var t=this._name,e=this._id,n=H0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var c=Pe(u,e);Qa(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ge(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 l=Fe(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var KM=0;function Ge(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Y0(t){return Gn().transition(t)}function H0(){return++KM}var Xe=Gn.prototype;Ge.prototype=Y0.prototype={constructor:Ge,select:CM,selectAll:EM,selectChild:Xe.selectChild,selectChildren:Xe.selectChildren,filter:SM,merge:AM,selection:RM,transition:XM,call:Xe.call,nodes:Xe.nodes,node:Xe.node,size:Xe.size,empty:Xe.empty,each:Xe.each,on:PM,attr:uM,attrTween:pM,style:zM,styleTween:BM,text:WM,textTween:qM,remove:LM,tween:eM,delay:mM,duration:vM,ease:_M,easeVarying:$M,end:ZM,[Symbol.iterator]:Xe[Symbol.iterator]};const QM=t=>+t;function JM(t){return t*t}function t4(t){return t*(2-t)}function W0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function e4(t){return t*t*t}function n4(t){return--t*t*t+1}function Wi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var gc=3,r4=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(gc),i4=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(gc),V0=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}(gc),j0=Math.PI,q0=j0/2;function o4(t){return+t==1?1:1-Math.cos(t*q0)}function a4(t){return Math.sin(t*q0)}function X0(t){return(1-Math.cos(j0*t))/2}function dn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function s4(t){return dn(1-+t)}function u4(t){return 1-dn(t)}function Z0(t){return((t*=2)<=1?dn(1-t):2-dn(t-1))/2}function l4(t){return 1-Math.sqrt(1-t*t)}function c4(t){return Math.sqrt(1- --t*t)}function K0(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var mc=4/11,f4=6/11,h4=8/11,p4=3/4,d4=9/11,g4=10/11,m4=15/16,y4=21/22,b4=63/64,Ja=1/mc/mc;function v4(t){return 1-Vi(1-t)}function Vi(t){return(t=+t)<mc?Ja*t*t:t<h4?Ja*(t-=f4)*t+p4:t<g4?Ja*(t-=d4)*t+m4:Ja*(t-=y4)*t+b4}function x4(t){return((t*=2)<=1?1-Vi(1-t):Vi(t-1)+1)/2}var yc=1.70158,_4=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(yc),w4=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(yc),Q0=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}(yc),kr=2*Math.PI,bc=1,vc=.3,$4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=kr);function i(o){return e*dn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*kr)},i.period=function(o){return t(e,o)},i}(bc,vc),ji=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=kr);function i(o){return 1-e*dn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*kr)},i.period=function(o){return t(e,o)},i}(bc,vc),S4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=kr);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*kr)},i.period=function(o){return t(e,o)},i}(bc,vc),A4={time:null,delay:0,duration:250,ease:Wi};function M4(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 D4(t){var e,n;t instanceof Ge?(e=t._id,t=t._name):(e=H0(),(n=A4).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,l=0;l<s;++l)(u=a[l])&&Qa(u,t,e,l,a,n||M4(u,e));return new Ge(r,this._parents,t,e)}Gn.prototype.interrupt=Q8,Gn.prototype.transition=D4;var P4=[null];function T4(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>cc&&r.name===e)return new Ge([[t]],P4,e,+i)}return null}const xc=t=>()=>t;function L4(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 C4(t){t.stopImmediatePropagation()}function _c(t){t.preventDefault(),t.stopImmediatePropagation()}var J0={name:"drag"},wc={name:"space"},Rr={name:"handle"},Ir={name:"center"};const{abs:tm,max:Gt,min:zt}=Math;function em(t){return[+t[0],+t[1]]}function $c(t){return[em(t[0]),em(t[1])]}var ts={name:"x",handles:["w","e"].map(qi),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]]}},es={name:"y",handles:["n","s"].map(qi),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]]}},E4={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(qi),input:function(t){return t==null?null:$c(t)},output:function(t){return t}},Ze={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"},nm={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},rm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},k4={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},R4={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function qi(t){return{type:t}}function I4(t){return!t.ctrlKey&&!t.button}function N4(){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 F4(){return navigator.maxTouchPoints||"ontouchstart"in this}function Sc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function G4(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function z4(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function O4(){return Ac(ts)}function U4(){return Ac(es)}function B4(){return Ac(E4)}function Ac(t){var e=N4,n=I4,r=F4,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([qi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ze.overlay).merge(y).each(function(){var v=Sc(this).extent;X(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([qi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ze.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 Ze[v.type]}),m.each(l).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){c(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){c(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,w=c(v,arguments),D=b.selection,T=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),$=qe(D,T);function _(P){b.selection=P===1&&T===null?null:$(P),l.call(v),w.brush()}return D!==null&&T!==null?_:_(1)}):m.each(function(){var v=this,b=arguments,w=v.__brush,D=t.input(typeof y=="function"?y.apply(v,b):y,w.extent),T=c(v,b).beforestart();Hn(v),w.selection=D===null?null:D,l.call(v),T.start(x).brush(x).end(x)})},u.clear=function(m,y){u.move(m,null,y)};function l(){var m=X(this),y=Sc(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 c(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=X(this.that).datum();o.call(m,this.that,new L4(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"?J0:i&&m.altKey?Ir:Rr,b=t===es?null:k4[x],w=t===ts?null:R4[x],D=Sc(y),T=D.extent,$=D.selection,_=T[0][0],P,S,G=T[0][1],k,A,L=T[1][0],M,z,U=T[1][1],E,R,C=0,F=0,j,Q=b&&w&&i&&m.shiftKey,N,q,V=Array.from(m.touches||[m],st=>{const Mt=st.identifier;return st=ue(st,y),st.point0=st.slice(),st.identifier=Mt,st});Hn(y);var K=c(y,arguments,!0).beforestart();if(x==="overlay"){$&&(j=!0);const st=[V[0],V[1]||V[0]];D.selection=$=[[P=t===es?_:zt(st[0][0],st[1][0]),k=t===ts?G:zt(st[0][1],st[1][1])],[M=t===es?L:Gt(st[0][0],st[1][0]),E=t===ts?U:Gt(st[0][1],st[1][1])]],V.length>1&&mt(m)}else P=$[0][0],k=$[0][1],M=$[1][0],E=$[1][1];S=P,A=k,z=M,R=E;var W=X(y).attr("pointer-events","none"),nt=W.selectAll(".overlay").attr("cursor",Ze[x]);if(m.touches)K.moved=H,K.ended=ht;else{var ut=X(m.view).on("mousemove.brush",H,!0).on("mouseup.brush",ht,!0);i&&ut.on("keydown.brush",Yt,!0).on("keyup.brush",ee,!0),La(m.view)}l.call(y),K.start(m,v.name);function H(st){for(const Mt of st.changedTouches||[st])for(const No of V)No.identifier===Mt.identifier&&(No.cur=ue(Mt,y));if(Q&&!N&&!q&&V.length===1){const Mt=V[0];tm(Mt.cur[0]-Mt[0])>tm(Mt.cur[1]-Mt[1])?q=!0:N=!0}for(const Mt of V)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);j=!0,_c(st),mt(st)}function mt(st){const Mt=V[0],No=Mt.point0;var An;switch(C=Mt[0]-No[0],F=Mt[1]-No[1],v){case wc:case J0:{b&&(C=Gt(_-P,zt(L-M,C)),S=P+C,z=M+C),w&&(F=Gt(G-k,zt(U-E,F)),A=k+F,R=E+F);break}case Rr:{V[1]?(b&&(S=Gt(_,zt(L,V[0][0])),z=Gt(_,zt(L,V[1][0])),b=1),w&&(A=Gt(G,zt(U,V[0][1])),R=Gt(G,zt(U,V[1][1])),w=1)):(b<0?(C=Gt(_-P,zt(L-P,C)),S=P+C,z=M):b>0&&(C=Gt(_-M,zt(L-M,C)),S=P,z=M+C),w<0?(F=Gt(G-k,zt(U-k,F)),A=k+F,R=E):w>0&&(F=Gt(G-E,zt(U-E,F)),A=k,R=E+F));break}case Ir:{b&&(S=Gt(_,zt(L,P-C*b)),z=Gt(_,zt(L,M+C*b))),w&&(A=Gt(G,zt(U,k-F*w)),R=Gt(G,zt(U,E+F*w)));break}}z<S&&(b*=-1,An=P,P=M,M=An,An=S,S=z,z=An,x in nm&&nt.attr("cursor",Ze[x=nm[x]])),R<A&&(w*=-1,An=k,k=E,E=An,An=A,A=R,R=An,x in rm&&nt.attr("cursor",Ze[x=rm[x]])),D.selection&&($=D.selection),N&&(S=$[0][0],z=$[1][0]),q&&(A=$[0][1],R=$[1][1]),($[0][0]!==S||$[0][1]!==A||$[1][0]!==z||$[1][1]!==R)&&(D.selection=[[S,A],[z,R]],l.call(y),K.brush(st,v.name))}function ht(st){if(C4(st),st.touches){if(st.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Ca(st.view,j),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),nt.attr("cursor",Ze.overlay),D.selection&&($=D.selection),G4($)&&(D.selection=null,l.call(y)),K.end(st,v.name)}function Yt(st){switch(st.keyCode){case 16:{Q=b&&w;break}case 18:{v===Rr&&(b&&(M=z-C*b,P=S+C*b),w&&(E=R-F*w,k=A+F*w),v=Ir,mt(st));break}case 32:{(v===Rr||v===Ir)&&(b<0?M=z-C:b>0&&(P=S-C),w<0?E=R-F:w>0&&(k=A-F),v=wc,nt.attr("cursor",Ze.selection),mt(st));break}default:return}_c(st)}function ee(st){switch(st.keyCode){case 16:{Q&&(N=q=Q=!1,mt(st));break}case 18:{v===Ir&&(b<0?M=z:b>0&&(P=S),w<0?E=R:w>0&&(k=A),v=Rr,mt(st));break}case 32:{v===wc&&(st.altKey?(b&&(M=z-C*b,P=S+C*b),w&&(E=R-F*w,k=A+F*w),v=Ir):(b<0?M=z:b>0&&(P=S),w<0?E=R:w>0&&(k=A),v=Rr),nt.attr("cursor",Ze[x]),mt(st));break}default:return}_c(st)}}function p(m){c(this,arguments).moved(m)}function d(m){c(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=$c(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:xc($c(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:xc(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:xc(!!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 im=Math.abs,Nr=Math.cos,Fr=Math.sin,om=Math.PI,ns=om/2,am=om*2,sm=Math.max,Mc=1e-12;function Dc(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function Y4(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function H4(){return Pc(!1,!1)}function W4(){return Pc(!1,!0)}function V4(){return Pc(!0,!1)}function Pc(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,l=new Array(u),c=Dc(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+=l[g]=m}p=sm(0,am-n*u)/p,d=p?n:am/u;{let g=0;r&&c.sort((m,y)=>r(l[m],l[y]));for(const m of c){const y=g;if(t){const x=Dc(~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:l[m]}}else{const x=Dc(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 w=b.source;b.source=b.target,b.target=w}}f[m]={index:m,startAngle:y,endAngle:g,value:l[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=sm(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=Y4(s))._=s,a):o&&o._},a}const Tc=Math.PI,Lc=2*Tc,Wn=1e-6,j4=Lc-Wn;function um(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function q4(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return um;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?um:q4(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,l=i-n,c=a-e,h=s-n,f=c*c+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Wn)if(!(Math.abs(h*u-l*c)>Wn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=u*u+l*l,m=p*p+d*d,y=Math.sqrt(g),x=Math.sqrt(f),v=o*Math.tan((Tc-Math.acos((g+f-m)/(2*y*x)))/2),b=v/x,w=v/y;Math.abs(b-1)>Wn&&this._append`L${e+b*c},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*p>c*d)},${this._x1=e+w*u},${this._y1=n+w*l}`}}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),l=e+s,c=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Wn||Math.abs(this._y1-c)>Wn)&&this._append`L${l},${c}`,r&&(f<0&&(f=f%Lc+Lc),f>j4?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:f>Wn&&this._append`A${r},${r},0,${+(f>=Tc)},${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 Cc(){return new Xi}Cc.prototype=Xi.prototype;function X4(t=3){return new Xi(+t)}var Z4=Array.prototype.slice;function Vn(t){return function(){return t}}function K4(t){return t.source}function Q4(t){return t.target}function lm(t){return t.radius}function J4(t){return t.startAngle}function tD(t){return t.endAngle}function eD(){return 0}function nD(){return 10}function cm(t){var e=K4,n=Q4,r=lm,i=lm,o=J4,a=tD,s=eD,u=null;function l(){var c,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)-ns,y=a.apply(this,d)-ns,x=+i.apply(this,(d[0]=f,d)),v=o.apply(this,d)-ns,b=a.apply(this,d)-ns;if(u||(u=c=Cc()),p>Mc&&(im(y-m)>p*2+Mc?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,im(b-v)>p*2+Mc?b>v?(v+=p,b-=p):(v-=p,b+=p):v=b=(v+b)/2),u.moveTo(g*Nr(m),g*Fr(m)),u.arc(0,0,g,m,y),m!==v||y!==b)if(t){var w=+t.apply(this,arguments),D=x-w,T=(v+b)/2;u.quadraticCurveTo(0,0,D*Nr(v),D*Fr(v)),u.lineTo(x*Nr(T),x*Fr(T)),u.lineTo(D*Nr(b),D*Fr(b))}else u.quadraticCurveTo(0,0,x*Nr(v),x*Fr(v)),u.arc(0,0,x,v,b);if(u.quadraticCurveTo(0,0,g*Nr(m),g*Fr(m)),u.closePath(),c)return u=null,c+""||null}return t&&(l.headRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Vn(+c),l):t}),l.radius=function(c){return arguments.length?(r=i=typeof c=="function"?c:Vn(+c),l):r},l.sourceRadius=function(c){return arguments.length?(r=typeof c=="function"?c:Vn(+c),l):r},l.targetRadius=function(c){return arguments.length?(i=typeof c=="function"?c:Vn(+c),l):i},l.startAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Vn(+c),l):o},l.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Vn(+c),l):a},l.padAngle=function(c){return arguments.length?(s=typeof c=="function"?c:Vn(+c),l):s},l.source=function(c){return arguments.length?(e=c,l):e},l.target=function(c){return arguments.length?(n=c,l):n},l.context=function(c){return arguments.length?(u=c??null,l):u},l}function rD(){return cm()}function iD(){return cm(nD)}var oD=Array.prototype,fm=oD.slice;function aD(t,e){return t-e}function sD(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 uD(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=lD(t,e[n]))return i;return 0}function lD(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],l=u[0],c=u[1],h=t[s],f=h[0],p=h[1];if(cD(u,h,e))return 0;c>r!=p>r&&n<(f-l)*(r-c)/(p-c)+l&&(i=-i)}return i}function cD(t,e,n){var r;return fD(t,e,n)&&hD(t[r=+(t[0]===e[0])],n[r],e[r])}function fD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function hD(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function pD(){}var Ke=[[],[[[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 Ec(){var t=1,e=1,n=Rl,r=u;function i(l){var c=n(l);if(Array.isArray(c))c=c.slice().sort(aD);else{const h=Di(l,dD);for(c=Rn(...kl(h[0],h[1],c),c);c[c.length-1]>=h[1];)c.pop();for(;c[1]<h[0];)c.shift()}return c.map(h=>o(l,h))}function o(l,c){const h=c==null?NaN:+c;if(isNaN(h))throw new Error(`invalid value: ${c}`);var f=[],p=[];return a(l,h,function(d){r(d,l,h),sD(d)>0?f.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=f.length,y;g<m;++g)if(uD((y=f[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:c,coordinates:f}}function a(l,c,h){var f=new Array,p=new Array,d,g,m,y,x,v;for(d=g=-1,y=jn(l[0],c),Ke[y<<1].forEach(b);++d<t-1;)m=y,y=jn(l[d+1],c),Ke[m|y<<1].forEach(b);for(Ke[y<<0].forEach(b);++g<e-1;){for(d=-1,y=jn(l[g*t+t],c),x=jn(l[g*t],c),Ke[y<<1|x<<2].forEach(b);++d<t-1;)m=y,y=jn(l[g*t+t+d+1],c),v=x,x=jn(l[g*t+d+1],c),Ke[m|y<<1|x<<2|v<<3].forEach(b);Ke[y|x<<3].forEach(b)}for(d=-1,x=l[g*t]>=c,Ke[x<<2].forEach(b);++d<t-1;)v=x,x=jn(l[g*t+d+1],c),Ke[x<<2|v<<3].forEach(b);Ke[x<<3].forEach(b);function b(w){var D=[w[0][0]+d,w[0][1]+g],T=[w[1][0]+d,w[1][1]+g],$=s(D),_=s(T),P,S;(P=p[$])?(S=f[_])?(delete p[P.end],delete f[S.start],P===S?(P.ring.push(T),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(T),p[P.end=_]=P):(P=f[_])?(S=p[$])?(delete f[P.start],delete p[S.end],P===S?(P.ring.push(T),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(D),f[P.start=$]=P):f[$]=p[_]={start:$,end:_,ring:[D,T]}}}function s(l){return l[0]*2+l[1]*(t+1)*4}function u(l,c,h){l.forEach(function(f){var p=f[0],d=f[1],g=p|0,m=d|0,y=kc(c[m*t+g]);p>0&&p<t&&g===p&&(f[0]=hm(p,kc(c[m*t+g-1]),y,h)),d>0&&d<e&&m===d&&(f[1]=hm(d,kc(c[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(l){if(!arguments.length)return[t,e];var c=Math.floor(l[0]),h=Math.floor(l[1]);if(!(c>=0&&h>=0))throw new Error("invalid size");return t=c,e=h,i},i.thresholds=function(l){return arguments.length?(n=typeof l=="function"?l:Array.isArray(l)?gn(fm.call(l)):gn(l),i):n},i.smooth=function(l){return arguments.length?(r=l?u:pD,i):r===u},i}function dD(t){return isFinite(t)?t:NaN}function jn(t,e){return t==null?!1:+t>=e}function kc(t){return t==null||isNaN(t=+t)?-1/0:t}function hm(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 gD(t){return t[0]}function mD(t){return t[1]}function yD(){return 1}function bD(){var t=gD,e=mD,n=yD,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,l=i+s*2>>a,c=gn(20);function h(x){var v=new Float32Array(u*l),b=Math.pow(2,-a),w=-1;for(const k of x){var D=(t(k,++w,x)+s)*b,T=(e(k,w,x)+s)*b,$=+n(k,w,x);if($&&D>=0&&D<u&&T>=0&&T<l){var _=Math.floor(D),P=Math.floor(T),S=D-_-.5,G=T-P-.5;v[_+P*u]+=(1-S)*(1-G)*$,v[_+1+P*u]+=S*(1-G)*$,v[_+1+(P+1)*u]+=S*G*$,v[_+(P+1)*u]+=(1-S)*G*$}}return ag({data:v,width:u,height:l},o*b),v}function f(x){var v=h(x),b=c(v),w=Math.pow(2,2*a);return Array.isArray(b)||(b=Rn(Number.MIN_VALUE,Ti(v)/w,b)),Ec().size([u,l]).thresholds(b.map(D=>D*w))(v).map((D,T)=>(D.value=+b[T],p(D)))}f.contours=function(x){var v=h(x),b=Ec().size([u,l]),w=Math.pow(2,2*a),D=T=>{T=+T;var $=p(b.contour(v,T*w));return $.value=T,$};return Object.defineProperty(D,"max",{get:()=>Ti(v)/w}),D};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,l=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?(c=typeof x=="function"?x:Array.isArray(x)?gn(fm.call(x)):gn(x),f):c},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 Qe=11102230246251565e-32,Ot=134217729,vD=(3+8*Qe)*Qe;function Rc(t,e,n,r,i){let o,a,s,u,l=e[0],c=r[0],h=0,f=0;c>l==c>-l?(o=l,l=e[++h]):(o=c,c=r[++f]);let p=0;if(h<t&&f<n)for(c>l==c>-l?(a=l+o,s=o-(a-l),l=e[++h]):(a=c+o,s=o-(a-c),c=r[++f]),o=a,s!==0&&(i[p++]=s);h<t&&f<n;)c>l==c>-l?(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++h]):(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++f]),o=a,s!==0&&(i[p++]=s);for(;h<t;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++h],o=a,s!==0&&(i[p++]=s);for(;f<n;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++f],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function xD(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Zi(t){return new Float64Array(t)}const _D=(3+16*Qe)*Qe,wD=(2+12*Qe)*Qe,$D=(9+64*Qe)*Qe*Qe,Gr=Zi(4),pm=Zi(8),dm=Zi(12),gm=Zi(16),Wt=Zi(4);function SD(t,e,n,r,i,o,a){let s,u,l,c,h,f,p,d,g,m,y,x,v,b,w,D,T,$;const _=t-i,P=n-i,S=e-o,G=r-o;b=_*G,f=Ot*_,p=f-(f-_),d=_-p,f=Ot*G,g=f-(f-G),m=G-g,w=d*m-(b-p*g-d*g-p*m),D=S*P,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*P,g=f-(f-P),m=P-g,T=d*m-(D-p*g-d*g-p*m),y=w-T,h=w-y,Gr[0]=w-(y+h)+(h-T),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-D,h=v-y,Gr[1]=v-(y+h)+(h-D),$=x+y,h=$-x,Gr[2]=x-($-h)+(y-h),Gr[3]=$;let k=xD(4,Gr),A=wD*a;if(k>=A||-k>=A||(h=t-_,s=t-(_+h)+(h-i),h=n-P,l=n-(P+h)+(h-i),h=e-S,u=e-(S+h)+(h-o),h=r-G,c=r-(G+h)+(h-o),s===0&&u===0&&l===0&&c===0)||(A=$D*a+vD*Math.abs(k),k+=_*c+G*s-(S*l+P*u),k>=A||-k>=A))return k;b=s*G,f=Ot*s,p=f-(f-s),d=s-p,f=Ot*G,g=f-(f-G),m=G-g,w=d*m-(b-p*g-d*g-p*m),D=u*P,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*P,g=f-(f-P),m=P-g,T=d*m-(D-p*g-d*g-p*m),y=w-T,h=w-y,Wt[0]=w-(y+h)+(h-T),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-D,h=v-y,Wt[1]=v-(y+h)+(h-D),$=x+y,h=$-x,Wt[2]=x-($-h)+(y-h),Wt[3]=$;const L=Rc(4,Gr,4,Wt,pm);b=_*c,f=Ot*_,p=f-(f-_),d=_-p,f=Ot*c,g=f-(f-c),m=c-g,w=d*m-(b-p*g-d*g-p*m),D=S*l,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*l,g=f-(f-l),m=l-g,T=d*m-(D-p*g-d*g-p*m),y=w-T,h=w-y,Wt[0]=w-(y+h)+(h-T),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-D,h=v-y,Wt[1]=v-(y+h)+(h-D),$=x+y,h=$-x,Wt[2]=x-($-h)+(y-h),Wt[3]=$;const M=Rc(L,pm,4,Wt,dm);b=s*c,f=Ot*s,p=f-(f-s),d=s-p,f=Ot*c,g=f-(f-c),m=c-g,w=d*m-(b-p*g-d*g-p*m),D=u*l,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*l,g=f-(f-l),m=l-g,T=d*m-(D-p*g-d*g-p*m),y=w-T,h=w-y,Wt[0]=w-(y+h)+(h-T),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-D,h=v-y,Wt[1]=v-(y+h)+(h-D),$=x+y,h=$-x,Wt[2]=x-($-h)+(y-h),Wt[3]=$;const z=Rc(M,dm,4,Wt,gm);return gm[z-1]}function rs(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,l=Math.abs(a+s);return Math.abs(u)>=_D*l?u:-SD(t,e,n,r,i,o,l)}const mm=Math.pow(2,-52),is=new Uint32Array(512);class os{static from(e,n=TD,r=LD){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 os(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,l=-1/0,c=-1/0;for(let _=0;_<a;_++){const P=e[2*_],S=e[2*_+1];P<s&&(s=P),S<u&&(u=S),P>l&&(l=P),S>c&&(c=S),this._ids[_]=_}const h=(s+l)/2,f=(u+c)/2;let p,d,g;for(let _=0,P=1/0;_<a;_++){const S=Ic(h,f,e[2*_],e[2*_+1]);S<P&&(p=_,P=S)}const m=e[2*p],y=e[2*p+1];for(let _=0,P=1/0;_<a;_++){if(_===p)continue;const S=Ic(m,y,e[2*_],e[2*_+1]);S<P&&S>0&&(d=_,P=S)}let x=e[2*d],v=e[2*d+1],b=1/0;for(let _=0;_<a;_++){if(_===p||_===d)continue;const P=DD(m,y,x,v,e[2*_],e[2*_+1]);P<b&&(g=_,b=P)}let w=e[2*g],D=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];zr(this._ids,this._dists,0,a-1);const _=new Uint32Array(a);let P=0;for(let S=0,G=-1/0;S<a;S++){const k=this._ids[S],A=this._dists[k];A>G&&(_[P++]=k,G=A)}this.hull=_.subarray(0,P),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(rs(m,y,x,v,w,D)<0){const _=d,P=x,S=v;d=g,x=w,v=D,g=_,w=P,D=S}const T=PD(m,y,x,v,w,D);this._cx=T.x,this._cy=T.y;for(let _=0;_<a;_++)this._dists[_]=Ic(e[2*_],e[2*_+1],T.x,T.y);zr(this._ids,this._dists,0,a-1),this._hullStart=p;let $=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(w,D)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let _=0,P,S;_<this._ids.length;_++){const G=this._ids[_],k=e[2*G],A=e[2*G+1];if(_>0&&Math.abs(k-P)<=mm&&Math.abs(A-S)<=mm||(P=k,S=A,G===p||G===d||G===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,z;for(;z=r[M],rs(k,A,e[2*M],e[2*M+1],e[2*z],e[2*z+1])>=0;)if(M=z,M===L){M=-1;break}if(M===-1)continue;let U=this._addTriangle(M,G,r[M],-1,-1,i[M]);i[G]=this._legalize(U+2),i[M]=U,$++;let E=r[M];for(;z=r[E],rs(k,A,e[2*E],e[2*E+1],e[2*z],e[2*z+1])<0;)U=this._addTriangle(E,G,z,i[G],-1,i[E]),i[G]=this._legalize(U+2),r[E]=E,$--,E=z;if(M===L)for(;z=n[M],rs(k,A,e[2*z],e[2*z+1],e[2*M],e[2*M+1])<0;)U=this._addTriangle(z,G,M,-1,i[M],i[z]),this._legalize(U+2),i[z]=U,r[M]=M,$--,M=z;this._hullStart=n[G]=M,r[M]=n[E]=G,r[G]=E,o[this._hashKey(k,A)]=G,o[this._hashKey(e[2*M],e[2*M+1])]=M}this.hull=new Uint32Array($);for(let _=0,P=this._hullStart;_<$;_++)this.hull[_]=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(AD(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=is[--o];continue}const l=s-s%3,c=u+(e+1)%3,h=l+(s+2)%3,f=n[a],p=n[e],d=n[c],g=n[h];if(MD(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=l+(s+1)%3;o<is.length&&(is[o++]=x)}else{if(o===0)break;e=is[--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 AD(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Ic(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function MD(t,e,n,r,i,o,a,s){const u=t-a,l=e-s,c=n-a,h=r-s,f=i-a,p=o-s,d=u*u+l*l,g=c*c+h*h,m=f*f+p*p;return u*(h*m-g*p)-l*(c*m-g*f)+d*(c*p-h*f)<0}function DD(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,h=u*u+l*l,f=.5/(a*l-s*u),p=(l*c-s*h)*f,d=(a*h-u*c)*f;return p*p+d*d}function PD(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,h=u*u+l*l,f=.5/(a*l-s*u),p=t+(l*c-s*h)*f,d=e+(a*h-u*c)*f;return{x:p,y:d}}function zr(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;Ki(t,i,o),e[t[n]]>e[t[r]]&&Ki(t,n,r),e[t[o]]>e[t[r]]&&Ki(t,o,r),e[t[n]]>e[t[o]]&&Ki(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;Ki(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(zr(t,e,o,r),zr(t,e,n,a-1)):(zr(t,e,n,a-1),zr(t,e,o,r))}}function Ki(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function TD(t){return t[0]}function LD(t){return t[1]}const ym=1e-6;class qn{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)>ym||Math.abs(this._y1-o)>ym)&&(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 Nc{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 bm{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,w=r[g+1]*2,D=r[g+2]*2,T=e[b],$=e[b+1],_=e[w],P=e[w+1],S=e[D],G=e[D+1],k=_-T,A=P-$,L=S-T,M=G-$,z=(k*M-A*L)*2;if(Math.abs(z)<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 U=1e9*Math.sign((o-T)*M-(a-$)*L);x=(T+S)/2-U*M,v=($+G)/2+U*L}else{const U=1/z,E=k*k+A*A,R=L*L+M*M;x=T+(M*E-A*R)*U,v=$+(k*R-L*E)*U}s[m]=x,s[m+1]=v}let u=n[n.length-1],l,c=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],l=c,h=f,p=d,c=u*4,f=e[2*u],d=e[2*u+1],i[l+2]=i[c]=p-d,i[l+3]=i[c+1]=f-h}render(e){const n=e==null?e=new qn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let c=0,h=r.length;c<h;++c){const f=r[c];if(f<c)continue;const p=Math.floor(c/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,l=o[o.length-1];for(let c=0;c<o.length;++c){u=l,l=o[c];const h=Math.floor(i[l]/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 qn: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 qn: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 Nc;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 l=Math.floor(u/3);if(s.push(n[l*2],n[l*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],l,c=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],l=c,c=this._regioncode(s,u),l===0&&c===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let d,g,m,y,x;if(l===0){if((d=this._clipSegment(o,a,s,u,l,c))===null)continue;[g,m,y,x]=d}else{if((d=this._clipSegment(s,u,o,a,c,l))===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,l,c=o||a;c&8?(u=e+(r-e)*(this.ymax-n)/(i-n),l=this.ymax):c&4?(u=e+(r-e)*(this.ymin-n)/(i-n),l=this.ymin):c&2?(l=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(l=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=l,o=this._regioncode(e,n)):(r=u,i=l,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 l=0,c=s.length,h,f=this._edgecode(s[c-2],s[c-1]);l<c;l+=2)h=f,f=this._edgecode(s[l],s[l+1]),h&&f&&(l=this._edge(e,h,f,s,l),c=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 CD=2*Math.PI,Or=Math.pow;function ED(t){return t[0]}function kD(t){return t[1]}function RD(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 ID(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Fc{static from(e,n=ED,r=kD,i){return new Fc("length"in e?ND(e,n,r,i):Float64Array.from(FD(e,n,r,i)))}constructor(e){this._delaunator=new os(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&&RD(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],l=this.collinear[this.collinear.length-1],c=[n[2*u],n[2*u+1],n[2*l],n[2*l+1]],h=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let f=0,p=n.length/2;f<p;++f){const d=ID(n[2*f],n[2*f+1],h);n[2*f]=d[0],n[2*f+1]=d[1]}this._delaunator=new os(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,l=r.length;u<l;++u){const c=o[u%3===2?u-2:u+1];(r[u]===-1||a[c]===-1)&&(a[c]=u)}for(let u=0,l=i.length;u<l;++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 bm(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 l=u,c=-1;do{if(yield c=a[l],l=l%3===2?l-2:l+1,a[l]!==e)return;if(l=o[l],l===-1){const h=r[(i[e]+1)%r.length];h!==c&&(yield h);return}}while(l!==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:l}=this;if(i[e]===-1||!l.length)return(e+1)%(l.length>>1);let c=e,h=Or(n-l[e*2],2)+Or(r-l[e*2+1],2);const f=i[e];let p=f;do{let d=u[p];const g=Or(n-l[d*2],2)+Or(r-l[d*2+1],2);if(g<h&&(h=g,c=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&&Or(n-l[p*2],2)+Or(r-l[p*2+1],2)<h)return p;break}}while(p!==f);return c}render(e){const n=e==null?e=new qn: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 l=o[a]*2,c=o[u]*2;e.moveTo(r[l],r[l+1]),e.lineTo(r[c],r[c+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 qn: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,CD)}return r&&r.value()}renderHull(e){const n=e==null?e=new qn: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 Nc;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new qn: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 Nc;return this.renderTriangle(e,n),n.value()}}function ND(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*FD(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 vm={},Gc={},zc=34,Qi=10,Oc=13;function xm(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function GD(t,e){var n=xm(t);return function(r,i){return e(n(r),i,t)}}function _m(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 zD(t){return t<0?"-"+re(-t,6):t>9999?"+"+re(t,6):re(t,4)}function OD(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":zD(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 as(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?GD(m,f):xm(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)===Qi&&--d,h.charCodeAt(d-1)===Oc&&--d;function b(){if(x)return Gc;if(v)return v=!1,vm;var D,T=g,$;if(h.charCodeAt(T)===zc){for(;g++<d&&h.charCodeAt(g)!==zc||h.charCodeAt(++g)===zc;);return(D=g)>=d?x=!0:($=h.charCodeAt(g++))===Qi?v=!0:$===Oc&&(v=!0,h.charCodeAt(g)===Qi&&++g),h.slice(T+1,D-1).replace(/""/g,'"')}for(;g<d;){if(($=h.charCodeAt(D=g++))===Qi)v=!0;else if($===Oc)v=!0,h.charCodeAt(g)===Qi&&++g;else if($!==n)continue;return h.slice(T,D)}return x=!0,h.slice(T,d)}for(;(y=b())!==Gc;){for(var w=[];y!==vm&&y!==Gc;)w.push(y),y=b();f&&(w=f(w,m++))==null||p.push(w)}return p}function o(h,f){return h.map(function(p){return f.map(function(d){return c(p[d])}).join(t)})}function a(h,f){return f==null&&(f=_m(h)),[f.map(c).join(t)].concat(o(h,f)).join(`
|
7
|
+
`)}function s(h,f){return f==null&&(f=_m(h)),o(h,f).join(`
|
8
8
|
`)}function u(h){return h.map(l).join(`
|
9
|
-
`)}function l(h){return h.map(c).join(t)}function c(h){return h==null?"":h instanceof Date?I7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:l,formatValue:c}}var jn=is(","),vm=jn.parse,N7=jn.parseRows,F7=jn.format,G7=jn.formatBody,z7=jn.formatRows,O7=jn.formatRow,U7=jn.formatValue,Xn=is(" "),xm=Xn.parse,B7=Xn.parseRows,Y7=Xn.format,H7=Xn.formatBody,W7=Xn.formatRows,q7=Xn.formatRow,V7=Xn.formatValue;function j7(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})?)?$/))X7&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const X7=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Z7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function K7(t,e){return fetch(t,e).then(Z7)}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 tP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function os(t,e){return fetch(t,e).then(tP)}function _m(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 eP(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 nP=_m(vm),rP=_m(xm);function iP(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 oP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function aP(t,e){return fetch(t,e).then(oP)}function zc(t){return(e,n)=>os(e,n).then(r=>new DOMParser().parseFromString(r,t))}const sP=zc("application/xml");var uP=zc("text/html"),lP=zc("image/svg+xml");function cP(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,l=0;for(o=0;o<a;++o)s=n[o],u+=s.x,l+=s.y;for(u=(u/a-t)*r,l=(l/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=l}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 fP(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return wm(this.cover(e,n),e,n,t)}function wm(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,l=t._x1,c=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+l)/2))?s=h:l=h,(m=n>=(f=(u+c)/2))?u=f:c=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+l)/2))?s=h:l=h,(m=n>=(f=(u+c)/2))?u=f:c=f;while((y=m<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,t}function hP(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,l=1/0,c=-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>c&&(c=i),o<l&&(l=o),o>h&&(h=o));if(u>c||l>h)return this;for(this.cover(u,l).cover(c,h),n=0;n<r;++n)wm(this,a[n],s[n],t[n]);return this}function pP(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,l;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,u=new Array(4),u[l]=s,s=u,a*=2,l){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 dP(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function gP(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 mP(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,l,c=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new qt(p,i,o,c,h)),n==null?n=1/0:(i=t-n,o=e-n,c=t+n,h=e+n,n*=n);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>c||(s=d.y0)>h||(u=d.x1)<i||(l=d.y1)<o))if(p.length){var m=(a+u)/2,y=(s+l)/2;f.push(new qt(p[3],m,y,u,l),new qt(p[2],a,y,m,l),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-$,c=t+$,h=e+$,r=p.data}}return r}function yP(t){if(isNaN(c=+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,l=this._y1,c,h,f,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=c>=(f=(a+u)/2))?a=f:u=f,(g=h>=(p=(s+l)/2))?s=p:l=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 bP(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function vP(){return this._root}function xP(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function _P(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 l=(o+s)/2,c=(a+u)/2;(i=r[3])&&e.push(new qt(i,l,c,s,u)),(i=r[2])&&e.push(new qt(i,o,c,l,u)),(i=r[1])&&e.push(new qt(i,l,a,s,c)),(i=r[0])&&e.push(new qt(i,o,a,l,c))}return this}function wP(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,l=r.y1,c=(a+u)/2,h=(s+l)/2;(o=i[0])&&e.push(new qt(o,a,s,c,h)),(o=i[1])&&e.push(new qt(o,c,s,u,h)),(o=i[2])&&e.push(new qt(o,a,h,c,l)),(o=i[3])&&e.push(new qt(o,c,h,u,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function $P(t){return t[0]}function SP(t){return arguments.length?(this._x=t,this):this._x}function AP(t){return t[1]}function MP(t){return arguments.length?(this._y=t,this):this._y}function as(t,e,n){var r=new Oc(e??$P,n??AP,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Oc(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 Vt=as.prototype=Oc.prototype;Vt.copy=function(){var t=new Oc(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},Vt.add=fP,Vt.addAll=hP,Vt.cover=pP,Vt.data=dP,Vt.extent=gP,Vt.find=mP,Vt.remove=yP,Vt.removeAll=bP,Vt.root=vP,Vt.size=xP,Vt.visit=_P,Vt.visitAfter=wP,Vt.x=SP,Vt.y=MP;function Lt(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function PP(t){return t.x+t.vx}function DP(t){return t.y+t.vy}function Sm(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var l,c=e.length,h,f,p,d,g,m,y=0;y<o;++y)for(h=as(e,PP,DP).visitAfter(s),l=0;l<c;++l)f=e[l],g=n[f.index],m=g*g,p=f.x+f.vx,d=f.y+f.vy,h.visit(x);function x(v,b,$,_,P){var T=v.data,w=v.r,D=g+w;if(T){if(T.index>f.index){var S=p-T.x-T.vx,z=d-T.y-T.vy,R=S*S+z*z;R<D*D&&(S===0&&(S=mn(r),R+=S*S),z===0&&(z=mn(r),R+=z*z),R=(D-(R=Math.sqrt(R)))/R*i,f.vx+=(S*=R)*(D=(w*=w)/(m+w)),f.vy+=(z*=R)*D,T.vx-=S*(D=1-D),T.vy-=z*D)}return}return b>p+D||_<p-D||$>d+D||P<d-D}}function s(l){if(l.data)return l.r=n[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(e){var l,c=e.length,h;for(n=new Array(c),l=0;l<c;++l)h=e[l],n[h.index]=+t(h,l,e)}}return a.initialize=function(l,c){e=l,r=c,u()},a.iterations=function(l){return arguments.length?(o=+l,a):o},a.strength=function(l){return arguments.length?(i=+l,a):i},a.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),a):t},a}function TP(t){return t.index}function Am(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function LP(t){var e=TP,n=h,r,i=Lt(30),o,a,s,u,l,c=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<c;++y)for(var v=0,b,$,_,P,T,w,D;v<x;++v)b=t[v],$=b.source,_=b.target,P=_.x+_.vx-$.x-$.vx||mn(l),T=_.y+_.vy-$.y-$.vy||mn(l),w=Math.sqrt(P*P+T*T),w=(w-o[v])/w*m*r[v],P*=w,T*=w,_.vx-=P*(D=u[v]),_.vy-=T*D,$.vx+=P*(D=1-D),$.vy+=T*D}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=Am(v,b.source)),typeof b.target!="object"&&(b.target=Am(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,l=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?(c=+m,f):c},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 CP=1664525,EP=1013904223,Mm=4294967296;function RP(){let t=1;return()=>(t=(CP*t+EP)%Mm)/Mm}function kP(t){return t.x}function IP(t){return t.y}var NP=10,FP=Math.PI*(3-Math.sqrt(5));function Pm(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Va(h),l=In("tick","end"),c=RP();t==null&&(t=[]);function h(){f(),l.call("tick",e),n<r&&(u.stop(),l.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=NP*Math.sqrt(.5+g),v=g*FP;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,c),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?(c=g,s.forEach(d),e):c},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,$,_,P,T;for(y==null?y=1/0:y*=y,x=0;x<v;++x)P=t[x],b=g-P.x,$=m-P.y,_=b*b+$*$,_<y&&(T=P,y=_);return T},on:function(g,m){return arguments.length>1?(l.on(g,m),e):l.on(g)}}}function Dm(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function l(p){var d,g=t.length,m=as(t,kP,IP).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(f)}function c(){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 l.initialize=function(p,d){t=p,n=d,c()},l.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Lt(+p),c(),l):i},l.distanceMin=function(p){return arguments.length?(a=p*p,l):Math.sqrt(a)},l.distanceMax=function(p){return arguments.length?(s=p*p,l):Math.sqrt(s)},l.theta=function(p){return arguments.length?(u=p*p,l):Math.sqrt(u)},l}function GP(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(l){for(var c=0,h=r.length;c<h;++c){var f=r[c],p=f.x-e||1e-6,d=f.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[c]-g)*o[c]*l/g;f.vx+=p*m,f.vy+=d*m}}function u(){if(r){var l,c=r.length;for(o=new Array(c),a=new Array(c),l=0;l<c;++l)a[l]=+t(r[l],l,r),o[l]=isNaN(a[l])?0:+i(r[l],l,r)}}return s.initialize=function(l){r=l,u()},s.strength=function(l){return arguments.length?(i=typeof l=="function"?l:Lt(+l),u(),s):i},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),s):t},s.x=function(l){return arguments.length?(e=+l,s):e},s.y=function(l){return arguments.length?(n=+l,s):n},s}function Tm(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vx+=(i[u]-c.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 Lm(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vy+=(i[u]-c.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 zP(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 Ur(t){return t=ss(Math.abs(t)),t?t[1]:NaN}function OP(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 UP(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var BP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Br(t){if(!(e=BP.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]})}Br.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 YP(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 Cm;function HP(t,e){var n=ss(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Cm=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 Em(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 Rm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:zP,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)=>Em(t*100,e),r:Em,s:HP,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function km(t){return t}var Im=Array.prototype.map,Nm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Fm(t){var e=t.grouping===void 0||t.thousands===void 0?km:OP(Im.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?km:UP(Im.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 l(h){h=Br(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"):Rm[$]||(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():"",P=g==="$"?r:/[%p]/.test($)?a:"",T=Rm[$],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 D(S){var z=_,R=P,A,L,M;if($==="c")R=T(S)+R,S="";else{S=+S;var G=S<0||1/S<0;if(S=isNaN(S)?u:T(Math.abs(S),v),b&&(S=YP(S)),G&&+S==0&&d!=="+"&&(G=!1),z=(G?d==="("?d:s:d==="-"||d==="("?"":d)+z,R=($==="s"?Nm[8+Cm/3]:"")+R+(G&&d==="("?")":""),w){for(A=-1,L=S.length;++A<L;)if(M=S.charCodeAt(A),48>M||M>57){R=(M===46?i+S.slice(A+1):S.slice(A))+R,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var U=z.length+S.length+R.length,E=U<y?new Array(y-U+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-R.length:1/0),E=""),p){case"<":S=z+S+R+E;break;case"=":S=z+E+S+R;break;case"^":S=E.slice(0,U=E.length>>1)+z+S+R+E.slice(U);break;default:S=E+z+S+R;break}return o(S)}return D.toString=function(){return h+""},D}function c(h,f){var p=l((h=Br(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Ur(f)/3)))*3,g=Math.pow(10,-d),m=Nm[8+d/3];return function(y){return p(g*y)+m}}return{format:l,formatPrefix:c}}var ls,Qi,Uc;Gm({thousands:",",grouping:[3],currency:["$",""]});function Gm(t){return ls=Fm(t),Qi=ls.format,Uc=ls.formatPrefix,ls}function zm(t){return Math.max(0,-Ur(Math.abs(t)))}function Om(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ur(e)/3)))*3-Ur(Math.abs(t)))}function Um(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ur(e)-Ur(t))+1}var it=1e-6,Ji=1e-12,ht=Math.PI,At=ht/2,cs=ht/4,jt=ht*2,bt=180/ht,ot=ht/180,dt=Math.abs,Yr=Math.atan,Xt=Math.atan2,et=Math.cos,fs=Math.ceil,Bm=Math.exp,Bc=Math.hypot,hs=Math.log,Yc=Math.pow,J=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},kt=Math.sqrt,Hc=Math.tan;function Ym(t){return t>1?0:t<-1?ht:Math.acos(t)}function Zt(t){return t>1?At:t<-1?-At:Math.asin(t)}function Hm(t){return(t=J(t/2))*t}function $t(){}function ps(t,e){t&&qm.hasOwnProperty(t.type)&&qm[t.type](t,e)}var Wm={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)}},qm={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){Wc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Wc(n[r],e,0)},Polygon:function(t,e){Vm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Vm(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ps(n[r],e)}};function Wc(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 Vm(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Wc(t[n],e,1);e.polygonEnd()}function De(t,e){t&&Wm.hasOwnProperty(t.type)?Wm[t.type](t,e):ps(t,e)}var ds=new Tt,gs=new Tt,jm,Xm,qc,Vc,jc,Ge={point:$t,lineStart:$t,lineEnd:$t,polygonStart:function(){ds=new Tt,Ge.lineStart=WP,Ge.lineEnd=qP},polygonEnd:function(){var t=+ds;gs.add(t<0?jt+t:t),this.lineStart=this.lineEnd=this.point=$t},sphere:function(){gs.add(jt)}};function WP(){Ge.point=VP}function qP(){Zm(jm,Xm)}function VP(t,e){Ge.point=Zm,jm=t,Xm=e,t*=ot,e*=ot,qc=t,Vc=et(e=e/2+cs),jc=J(e)}function Zm(t,e){t*=ot,e*=ot,e=e/2+cs;var n=t-qc,r=n>=0?1:-1,i=r*n,o=et(e),a=J(e),s=jc*a,u=Vc*o+s*et(i),l=s*r*J(i);ds.add(Xt(l,u)),qc=t,Vc=o,jc=a}function jP(t){return gs=new Tt,De(t,Ge),gs*2}function ms(t){return[Xt(t[1],t[0]),Zt(t[2])]}function Zn(t){var e=t[0],n=t[1],r=et(n);return[r*et(e),r*J(e),J(n)]}function ys(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Hr(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 Xc(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=kt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var St,ie,Mt,le,Kn,Km,Qm,Wr,to,yn,Qe,Je={point:Zc,lineStart:t1,lineEnd:e1,polygonStart:function(){Je.point=n1,Je.lineStart=XP,Je.lineEnd=ZP,to=new Tt,Ge.polygonStart()},polygonEnd:function(){Ge.polygonEnd(),Je.point=Zc,Je.lineStart=t1,Je.lineEnd=e1,ds<0?(St=-(Mt=180),ie=-(le=90)):to>it?le=90:to<-it&&(ie=-90),Qe[0]=St,Qe[1]=Mt},sphere:function(){St=-(Mt=180),ie=-(le=90)}};function Zc(t,e){yn.push(Qe=[St=t,Mt=t]),e<ie&&(ie=e),e>le&&(le=e)}function Jm(t,e){var n=Zn([t*ot,e*ot]);if(Wr){var r=Hr(Wr,n),i=[r[1],-r[0],0],o=Hr(i,r);vs(o),o=ms(o);var a=t-Kn,s=a>0?1:-1,u=o[0]*bt*s,l,c=dt(a)>180;c^(s*Kn<u&&u<s*t)?(l=o[1]*bt,l>le&&(le=l)):(u=(u+360)%360-180,c^(s*Kn<u&&u<s*t)?(l=-o[1]*bt,l<ie&&(ie=l)):(e<ie&&(ie=e),e>le&&(le=e))),c?t<Kn?ce(St,t)>ce(St,Mt)&&(Mt=t):ce(t,Mt)>ce(St,Mt)&&(St=t):Mt>=St?(t<St&&(St=t),t>Mt&&(Mt=t)):t>Kn?ce(St,t)>ce(St,Mt)&&(Mt=t):ce(t,Mt)>ce(St,Mt)&&(St=t)}else yn.push(Qe=[St=t,Mt=t]);e<ie&&(ie=e),e>le&&(le=e),Wr=n,Kn=t}function t1(){Je.point=Jm}function e1(){Qe[0]=St,Qe[1]=Mt,Je.point=Zc,Wr=null}function n1(t,e){if(Wr){var n=t-Kn;to.add(dt(n)>180?n+(n>0?360:-360):n)}else Km=t,Qm=e;Ge.point(t,e),Jm(t,e)}function XP(){Ge.lineStart()}function ZP(){n1(Km,Qm),Ge.lineEnd(),dt(to)>it&&(St=-(Mt=180)),Qe[0]=St,Qe[1]=Mt,Wr=null}function ce(t,e){return(e-=t)<0?e+360:e}function KP(t,e){return t[0]-e[0]}function r1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function QP(t){var e,n,r,i,o,a,s;if(le=Mt=-(St=ie=1/0),yn=[],De(t,Je),n=yn.length){for(yn.sort(KP),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],r1(r,i[0])||r1(r,i[1])?(ce(r[0],i[1])>ce(r[0],r[1])&&(r[1]=i[1]),ce(i[0],r[1])>ce(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=ce(r[1],i[0]))>a&&(a=s,St=i[0],Mt=r[1])}return yn=Qe=null,St===1/0||ie===1/0?[[NaN,NaN],[NaN,NaN]]:[[St,ie],[Mt,le]]}var eo,xs,_s,ws,$s,Ss,As,Ms,Kc,Qc,Jc,i1,o1,Kt,Qt,Jt,Te={sphere:$t,point:tf,lineStart:a1,lineEnd:s1,polygonStart:function(){Te.lineStart=eD,Te.lineEnd=nD},polygonEnd:function(){Te.lineStart=a1,Te.lineEnd=s1}};function tf(t,e){t*=ot,e*=ot;var n=et(e);no(n*et(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 a1(){Te.point=JP}function JP(t,e){t*=ot,e*=ot;var n=et(e);Kt=n*et(t),Qt=n*J(t),Jt=J(e),Te.point=tD,no(Kt,Qt,Jt)}function tD(t,e){t*=ot,e*=ot;var n=et(e),r=n*et(t),i=n*J(t),o=J(e),a=Xt(kt((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 s1(){Te.point=tf}function eD(){Te.point=rD}function nD(){u1(i1,o1),Te.point=tf}function rD(t,e){i1=t,o1=e,t*=ot,e*=ot,Te.point=u1;var n=et(e);Kt=n*et(t),Qt=n*J(t),Jt=J(e),no(Kt,Qt,Jt)}function u1(t,e){t*=ot,e*=ot;var n=et(e),r=n*et(t),i=n*J(t),o=J(e),a=Qt*o-Jt*i,s=Jt*r-Kt*o,u=Kt*i-Qt*r,l=Bc(a,s,u),c=Zt(l),h=l&&-c/l;Kc.add(h*a),Qc.add(h*s),Jc.add(h*u),xs+=c,Ss+=c*(Kt+(Kt=r)),As+=c*(Qt+(Qt=i)),Ms+=c*(Jt+(Jt=o)),no(Kt,Qt,Jt)}function iD(t){eo=xs=_s=ws=$s=Ss=As=Ms=0,Kc=new Tt,Qc=new Tt,Jc=new Tt,De(t,Te);var e=+Kc,n=+Qc,r=+Jc,i=Bc(e,n,r);return i<Ji&&(e=Ss,n=As,r=Ms,xs<it&&(e=_s,n=ws,r=$s),i=Bc(e,n,r),i<Ji)?[NaN,NaN]:[Xt(n,e)*bt,Zt(r/i)*bt]}function qr(t){return function(){return t}}function ef(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 nf(t,e){return dt(t)>ht&&(t-=Math.round(t/jt)*jt),[t,e]}nf.invert=nf;function rf(t,e,n){return(t%=jt)?e||n?ef(c1(t),f1(e,n)):c1(t):e||n?f1(e,n):nf}function l1(t){return function(e,n){return e+=t,dt(e)>ht&&(e-=Math.round(e/jt)*jt),[e,n]}}function c1(t){var e=l1(t);return e.invert=l1(-t),e}function f1(t,e){var n=et(t),r=J(t),i=et(e),o=J(e);function a(s,u){var l=et(u),c=et(s)*l,h=J(s)*l,f=J(u),p=f*n+c*r;return[Xt(h*i-p*o,c*n-f*r),Zt(p*i+h*o)]}return a.invert=function(s,u){var l=et(u),c=et(s)*l,h=J(s)*l,f=J(u),p=f*i-h*o;return[Xt(h*i+f*o,c*n+p*r),Zt(p*n-c*r)]},a}function h1(t){t=rf(t[0]*ot,t[1]*ot,t.length>2?t[2]*ot:0);function e(n){return n=t(n[0]*ot,n[1]*ot),n[0]*=bt,n[1]*=bt,n}return e.invert=function(n){return n=t.invert(n[0]*ot,n[1]*ot),n[0]*=bt,n[1]*=bt,n},e}function p1(t,e,n,r,i,o){if(n){var a=et(e),s=J(e),u=r*n;i==null?(i=e+r*jt,o=e-u/2):(i=d1(a,i),o=d1(a,o),(r>0?i<o:i>o)&&(i+=r*jt));for(var l,c=i;r>0?c>o:c<o;c-=u)l=ms([a,-s*et(c),-s*J(c)]),t.point(l[0],l[1])}}function d1(t,e){e=Zn(e),e[0]-=t,vs(e);var n=Ym(-e[1]);return((-e[2]<0?-n:n)+jt-it)%jt}function oD(){var t=qr([0,0]),e=qr(90),n=qr(2),r,i,o={point:a};function a(u,l){r.push(u=i(u,l)),u[0]*=bt,u[1]*=bt}function s(){var u=t.apply(this,arguments),l=e.apply(this,arguments)*ot,c=n.apply(this,arguments)*ot;return r=[],i=rf(-u[0]*ot,-u[1]*ot,0).invert,p1(o,l,c,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:qr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:qr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:qr(+u),s):n},s}function g1(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:$t,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ps(t,e){return dt(t[0]-e[0])<it&&dt(t[1]-e[1])<it}function Ds(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 m1(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(Ps(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*it}o.push(x=new Ds(m,d,null,!0)),a.push(x.o=new Ds(m,null,x,!1)),o.push(x=new Ds(y,d,null,!1)),a.push(x.o=new Ds(y,null,x,!0))}}),!!o.length){for(a.sort(e),y1(o),y1(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var l=o[0],c,h;;){for(var f=l,p=!0;f.v;)if((f=f.n)===l)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,u=c.length;s<u;++s)i.point((h=c[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(c=f.p.z,s=c.length-1;s>=0;--s)i.point((h=c[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,p=!p}while(!f.v);i.lineEnd()}}}function y1(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 of(t){return dt(t[0])<=ht?t[0]:de(t[0])*((dt(t[0])+ht)%jt-ht)}function b1(t,e){var n=of(e),r=e[1],i=J(r),o=[J(n),-et(n),0],a=0,s=0,u=new Tt;i===1?r=At+it:i===-1&&(r=-At-it);for(var l=0,c=t.length;l<c;++l)if(f=(h=t[l]).length)for(var h,f,p=h[f-1],d=of(p),g=p[1]/2+cs,m=J(g),y=et(g),x=0;x<f;++x,d=b,m=_,y=P,p=v){var v=h[x],b=of(v),$=v[1]/2+cs,_=J($),P=et($),T=b-d,w=T>=0?1:-1,D=w*T,S=D>ht,z=m*_;if(u.add(Xt(z*w*J(D),y*P+z*et(D))),a+=S?T+w*jt:T,S^d>=n^b>=n){var R=Hr(Zn(p),Zn(v));vs(R);var A=Hr(o,R);vs(A);var L=(S^T>=0?-1:1)*Zt(A[2]);(r>L||r===L&&(R[0]||R[1]))&&(s+=S^T>=0?1:-1)}}return(a<-it||a<it&&u<-Ji)^s&1}function v1(t,e,n,r){return function(i){var o=e(i),a=g1(),s=e(a),u=!1,l,c,h,f={point:p,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=v,c=[],l=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=m,c=Il(c);var b=b1(l,r);c.length?(u||(i.polygonStart(),u=!0),m1(c,sD,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),c=l=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(),_,P=$.length,T,w,D;if(h.pop(),l.push(h),h=null,!!P){if(b&1){if(w=$[0],(T=w.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),_=0;_<T;++_)i.point((D=w[_])[0],D[1]);i.lineEnd()}return}P>1&&b&2&&$.push($.pop().concat($.shift())),c.push($.filter(aD))}}return f}}function aD(t){return t.length>1}function sD(t,e){return((t=t.x)[0]<0?t[1]-At-it:At-t[1])-((e=e.x)[0]<0?e[1]-At-it:At-e[1])}const af=v1(function(){return!0},uD,cD,[-ht,-At]);function uD(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ht:-ht,u=dt(o-e);dt(u-ht)<it?(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>=ht&&(dt(e-r)<it&&(e-=r*it),dt(o-s)<it&&(o-=s*it),n=lD(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 lD(t,e,n,r){var i,o,a=J(t-n);return dt(a)>it?Yr((J(e)*(o=et(r))*J(n)-J(r)*(i=et(e))*J(t))/(i*o*a)):(e+r)/2}function cD(t,e,n,r){var i;if(t==null)i=n*At,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(dt(t[0]-e[0])>it){var o=t[0]<e[0]?ht:-ht;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function x1(t){var e=et(t),n=2*ot,r=e>0,i=dt(e)>it;function o(c,h,f,p){p1(p,t,n,f,c,h)}function a(c,h){return et(c)*et(h)>e}function s(c){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:l(m,y):b?l(m+(m<0?ht:-ht),y):0;if(!h&&(d=p=b)&&c.lineStart(),b!==p&&(v=u(h,x),(!v||Ps(h,v)||Ps(x,v))&&(x[2]=1)),b!==p)g=0,b?(c.lineStart(),v=u(x,h),c.point(v[0],v[1])):(v=u(h,x),c.point(v[0],v[1],2),c.lineEnd()),h=v;else if(i&&h&&r^b){var _;!($&f)&&(_=u(x,h,!0))&&(g=0,r?(c.lineStart(),c.point(_[0][0],_[0][1]),c.point(_[1][0],_[1][1]),c.lineEnd()):(c.point(_[1][0],_[1][1]),c.lineEnd(),c.lineStart(),c.point(_[0][0],_[0][1],3)))}b&&(!h||!Ps(h,x))&&c.point(x[0],x[1]),h=x,p=b,f=$},lineEnd:function(){p&&c.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function u(c,h,f){var p=Zn(c),d=Zn(h),g=[1,0,0],m=Hr(p,d),y=ys(m,m),x=m[0],v=y-x*x;if(!v)return!f&&c;var b=e*y/v,$=-e*x/v,_=Hr(g,m),P=bs(g,b),T=bs(m,$);Xc(P,T);var w=_,D=ys(P,w),S=ys(w,w),z=D*D-S*(ys(P,P)-1);if(!(z<0)){var R=kt(z),A=bs(w,(-D-R)/S);if(Xc(A,P),A=ms(A),!f)return A;var L=c[0],M=h[0],G=c[1],U=h[1],E;M<L&&(E=L,L=M,M=E);var k=M-L,C=dt(k-ht)<it,F=C||k<it;if(!C&&U<G&&(E=G,G=U,U=E),F?C?G+U>0^A[1]<(dt(A[0]-L)<it?G:U):G<=A[1]&&A[1]<=U:k>ht^(L<=A[0]&&A[0]<=M)){var V=bs(w,(-D+R)/S);return Xc(V,P),[A,ms(V)]}}}function l(c,h){var f=r?t:ht-t,p=0;return c<-f?p|=1:c>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return v1(a,s,o,r?[0,-t]:[-ht,t-ht])}function fD(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],l=e[1],c=0,h=1,f=u-a,p=l-s,d;if(d=n-a,!(!f&&d>0)){if(d/=f,f<0){if(d<c)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>c&&(c=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>c&&(c=d)}else if(f>0){if(d<c)return;d<h&&(h=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<c)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>c&&(c=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>c&&(c=d)}else if(p>0){if(d<c)return;d<h&&(h=d)}return c>0&&(t[0]=a+c*f,t[1]=s+c*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(l,c){return t<=l&&l<=n&&e<=c&&c<=r}function o(l,c,h,f){var p=0,d=0;if(l==null||(p=a(l,h))!==(d=a(c,h))||u(l,c)<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(c[0],c[1])}function a(l,c){return dt(l[0]-t)<it?c>0?0:3:dt(l[0]-n)<it?c>0?2:1:dt(l[1]-e)<it?c>0?1:0:c>0?3:2}function s(l,c){return u(l.x,c.x)}function u(l,c){var h=a(l,1),f=a(c,1);return h!==f?h-f:h===0?c[1]-l[1]:h===1?l[0]-c[0]:h===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,h=g1(),f,p,d,g,m,y,x,v,b,$,_,P={point:T,lineStart:z,lineEnd:R,polygonStart:D,polygonEnd:S};function T(L,M){i(L,M)&&c.point(L,M)}function w(){for(var L=0,M=0,G=p.length;M<G;++M)for(var U=p[M],E=1,k=U.length,C=U[0],F,V,Q=C[0],N=C[1];E<k;++E)F=Q,V=N,C=U[E],Q=C[0],N=C[1],V<=r?N>r&&(Q-F)*(r-V)>(N-V)*(t-F)&&++L:N<=r&&(Q-F)*(r-V)<(N-V)*(t-F)&&--L;return L}function D(){c=h,f=[],p=[],_=!0}function S(){var L=w(),M=_&&L,G=(f=Il(f)).length;(M||G)&&(l.polygonStart(),M&&(l.lineStart(),o(null,null,1,l),l.lineEnd()),G&&m1(f,s,L,o,l),l.polygonEnd()),c=l,f=p=d=null}function z(){P.point=A,p&&p.push(d=[]),$=!0,b=!1,x=v=NaN}function R(){f&&(A(g,m),y&&b&&h.rejoin(),f.push(h.result())),P.point=T,b&&c.lineEnd()}function A(L,M){var G=i(L,M);if(p&&d.push([L,M]),$)g=L,m=M,y=G,$=!1,G&&(c.lineStart(),c.point(L,M));else if(G&&b)c.point(L,M);else{var U=[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))];fD(U,E,t,e,n,r)?(b||(c.lineStart(),c.point(U[0],U[1])),c.point(E[0],E[1]),G||c.lineEnd(),_=!1):G&&(c.lineStart(),c.point(L,M),_=!1)}x=L,v=M,b=G}return P}}function hD(){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 sf,uf,Cs,Es,Vr={sphere:$t,point:$t,lineStart:pD,lineEnd:$t,polygonStart:$t,polygonEnd:$t};function pD(){Vr.point=gD,Vr.lineEnd=dD}function dD(){Vr.point=Vr.lineEnd=$t}function gD(t,e){t*=ot,e*=ot,uf=t,Cs=J(e),Es=et(e),Vr.point=mD}function mD(t,e){t*=ot,e*=ot;var n=J(e),r=et(e),i=dt(t-uf),o=et(i),a=J(i),s=r*a,u=Es*n-Cs*r*o,l=Cs*n+Es*r*o;sf.add(Xt(kt(s*s+u*u),l)),uf=t,Cs=n,Es=r}function _1(t){return sf=new Tt,De(t,Vr),+sf}var lf=[null,null],yD={type:"LineString",coordinates:lf};function Rs(t,e){return lf[0]=t,lf[1]=e,_1(yD)}var w1={Feature:function(t,e){return ks(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(ks(n[r].geometry,e))return!0;return!1}},$1={Sphere:function(){return!0},Point:function(t,e){return S1(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(S1(n[r],e))return!0;return!1},LineString:function(t,e){return A1(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(A1(n[r],e))return!0;return!1},Polygon:function(t,e){return M1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(M1(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(ks(n[r],e))return!0;return!1}};function ks(t,e){return t&&$1.hasOwnProperty(t.type)?$1[t.type](t,e):!1}function S1(t,e){return Rs(t,e)===0}function A1(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Rs(t[o],e),r===0||o>0&&(i=Rs(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 M1(t,e){return!!b1(t.map(bD),P1(e))}function bD(t){return t=t.map(P1),t.pop(),t}function P1(t){return[t[0]*ot,t[1]*ot]}function vD(t,e){return(t&&w1.hasOwnProperty(t.type)?w1[t.type]:ks)(t,e)}function D1(t,e,n){var r=fn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function T1(t,e,n){var r=fn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function L1(){var t,e,n,r,i,o,a,s,u=10,l=u,c=90,h=360,f,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return fn(fs(r/c)*c,n,c).map(d).concat(fn(fs(s/h)*h,a,h).map(g)).concat(fn(fs(e/u)*u,t,u).filter(function(v){return dt(v%c)>it}).map(f)).concat(fn(fs(o/l)*l,i,l).filter(function(v){return dt(v%h)>it}).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?(c=+v[0],h=+v[1],y):[c,h]},y.stepMinor=function(v){return arguments.length?(u=+v[0],l=+v[1],y):[u,l]},y.precision=function(v){return arguments.length?(m=+v,f=D1(o,i,90),p=T1(e,t,m),d=D1(s,a,90),g=T1(r,n,m),y):m},y.extentMajor([[-180,-90+it],[180,90-it]]).extentMinor([[-180,-80-it],[180,80+it]])}function xD(){return L1()()}function _D(t,e){var n=t[0]*ot,r=t[1]*ot,i=e[0]*ot,o=e[1]*ot,a=et(r),s=J(r),u=et(o),l=J(o),c=a*et(n),h=a*J(n),f=u*et(i),p=u*J(i),d=2*Zt(kt(Hm(o-r)+a*u*Hm(i-n))),g=J(d),m=d?function(y){var x=J(y*=d)/g,v=J(d-y)/g,b=v*c+x*f,$=v*h+x*p,_=v*s+x*l;return[Xt($,b)*bt,Xt(_,kt(b*b+$*$))*bt]}:function(){return[n*bt,r*bt]};return m.distance=d,m}const io=t=>t;var cf=new Tt,ff=new Tt,C1,E1,hf,pf,tn={point:$t,lineStart:$t,lineEnd:$t,polygonStart:function(){tn.lineStart=wD,tn.lineEnd=SD},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=$t,cf.add(dt(ff)),ff=new Tt},result:function(){var t=cf/2;return cf=new Tt,t}};function wD(){tn.point=$D}function $D(t,e){tn.point=R1,C1=hf=t,E1=pf=e}function R1(t,e){ff.add(pf*t-hf*e),hf=t,pf=e}function SD(){R1(C1,E1)}var jr=1/0,Is=jr,oo=-jr,Ns=oo,Fs={point:AD,lineStart:$t,lineEnd:$t,polygonStart:$t,polygonEnd:$t,result:function(){var t=[[jr,Is],[oo,Ns]];return oo=Ns=-(Is=jr=1/0),t}};function AD(t,e){t<jr&&(jr=t),t>oo&&(oo=t),e<Is&&(Is=e),e>Ns&&(Ns=e)}var df=0,gf=0,ao=0,Gs=0,zs=0,Xr=0,mf=0,yf=0,so=0,k1,I1,ze,Oe,ge={point:Qn,lineStart:N1,lineEnd:F1,polygonStart:function(){ge.lineStart=DD,ge.lineEnd=TD},polygonEnd:function(){ge.point=Qn,ge.lineStart=N1,ge.lineEnd=F1},result:function(){var t=so?[mf/so,yf/so]:Xr?[Gs/Xr,zs/Xr]:ao?[df/ao,gf/ao]:[NaN,NaN];return df=gf=ao=Gs=zs=Xr=mf=yf=so=0,t}};function Qn(t,e){df+=t,gf+=e,++ao}function N1(){ge.point=MD}function MD(t,e){ge.point=PD,Qn(ze=t,Oe=e)}function PD(t,e){var n=t-ze,r=e-Oe,i=kt(n*n+r*r);Gs+=i*(ze+t)/2,zs+=i*(Oe+e)/2,Xr+=i,Qn(ze=t,Oe=e)}function F1(){ge.point=Qn}function DD(){ge.point=LD}function TD(){G1(k1,I1)}function LD(t,e){ge.point=G1,Qn(k1=ze=t,I1=Oe=e)}function G1(t,e){var n=t-ze,r=e-Oe,i=kt(n*n+r*r);Gs+=i*(ze+t)/2,zs+=i*(Oe+e)/2,Xr+=i,i=Oe*t-ze*e,mf+=i*(ze+t),yf+=i*(Oe+e),so+=i*3,Qn(ze=t,Oe=e)}function z1(t){this._context=t}z1.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,jt);break}}},result:$t};var bf=new Tt,vf,O1,U1,uo,lo,co={point:$t,lineStart:function(){co.point=CD},lineEnd:function(){vf&&B1(O1,U1),co.point=$t},polygonStart:function(){vf=!0},polygonEnd:function(){vf=null},result:function(){var t=+bf;return bf=new Tt,t}};function CD(t,e){co.point=B1,O1=uo=t,U1=lo=e}function B1(t,e){uo-=t,lo-=e,bf.add(kt(uo*uo+lo*lo)),uo=t,lo=e}let Y1,Os,H1,W1;class q1{constructor(e){this._append=e==null?V1:ED(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!==H1||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`,H1=r,Os=this._append,W1=this._,this._=i}this._+=W1;break}}}result(){const e=this._;return this._="",e.length?e:null}}function V1(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function ED(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return V1;if(e!==Y1){const n=10**e;Y1=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 RD(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),De(s,i(o))),o.result()}return a.area=function(s){return De(s,i(tn)),tn.result()},a.measure=function(s){return De(s,i(co)),co.result()},a.bounds=function(s){return De(s,i(Fs)),Fs.result()},a.centroid=function(s){return De(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 q1(n)):new z1(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 q1(n)),a},a.projection(t).digits(n).context(e)}function kD(t){return{stream:fo(t)}}function fo(t){return function(e){var n=new xf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function xf(){}xf.prototype={constructor:xf,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 _f(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),De(n,t.stream(Fs)),e(Fs.result()),r!=null&&t.clipExtent(r),t}function Us(t,e,n){return _f(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 wf(t,e,n){return Us(t,[[0,0],e],n)}function $f(t,e,n){return _f(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 Sf(t,e,n){return _f(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 j1=16,ID=et(30*ot);function X1(t,e){return+e?FD(t,e):ND(t)}function ND(t){return fo({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function FD(t,e){function n(r,i,o,a,s,u,l,c,h,f,p,d,g,m){var y=l-r,x=c-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+f,$=s+p,_=u+d,P=kt(b*b+$*$+_*_),T=Zt(_/=P),w=dt(dt(_)-1)<it||dt(o-h)<it?(o+h)/2:Xt($,b),D=t(w,T),S=D[0],z=D[1],R=S-r,A=z-i,L=x*R-y*A;(L*L/v>e||dt((y*R+x*A)/v-.5)>.3||a*f+s*p+u*d<ID)&&(n(r,i,o,a,s,u,S,z,w,b/=P,$/=P,_,g,m),m.point(S,z),n(S,z,w,b,$,_,l,c,h,f,p,d,g,m))}}return function(r){var i,o,a,s,u,l,c,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 D=Zn([T,w]),S=t(T,w);n(h,f,c,p,d,g,h=S[0],f=S[1],c=T,p=D[0],d=D[1],g=D[2],j1,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function $(){x(),m.point=_,m.lineEnd=P}function _(T,w){v(i=T,w),o=h,a=f,s=p,u=d,l=g,m.point=v}function P(){n(h,f,c,p,d,g,o,a,i,s,u,l,j1,r),m.lineEnd=b,b()}return m}}var GD=fo({point:function(t,e){this.stream.point(t*ot,e*ot)}});function zD(t){return fo({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function OD(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 Z1(t,e,n,r,i,o){if(!o)return OD(t,e,n,r,i);var a=et(o),s=J(o),u=a*t,l=s*t,c=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-l*m+e,n-l*g-u*m]}return d.invert=function(g,m){return[r*(c*g-h*m+f),i*(p-h*g-c*m)]},d}function Ue(t){return Af(function(){return t})()}function Af(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,l=0,c,h=0,f=1,p=1,d=null,g=af,m=null,y,x,v,b=io,$=.5,_,P,T,w,D;function S(L){return T(L[0]*ot,L[1]*ot)}function z(L){return L=T.invert(L[0],L[1]),L&&[L[0]*bt,L[1]*bt]}S.stream=function(L){return w&&D===L?w:w=GD(zD(c)(g(_(b(D=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?x1(d=L*ot):(d=null,af),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,R()):n},S.translate=function(L){return arguments.length?(r=+L[0],i=+L[1],R()):[r,i]},S.center=function(L){return arguments.length?(o=L[0]%360*ot,a=L[1]%360*ot,R()):[o*bt,a*bt]},S.rotate=function(L){return arguments.length?(s=L[0]%360*ot,u=L[1]%360*ot,l=L.length>2?L[2]%360*ot:0,R()):[s*bt,u*bt,l*bt]},S.angle=function(L){return arguments.length?(h=L%360*ot,R()):h*bt},S.reflectX=function(L){return arguments.length?(f=L?-1:1,R()):f<0},S.reflectY=function(L){return arguments.length?(p=L?-1:1,R()):p<0},S.precision=function(L){return arguments.length?(_=X1(P,$=L*L),A()):kt($)},S.fitExtent=function(L,M){return Us(S,L,M)},S.fitSize=function(L,M){return wf(S,L,M)},S.fitWidth=function(L,M){return $f(S,L,M)},S.fitHeight=function(L,M){return Sf(S,L,M)};function R(){var L=Z1(n,0,0,f,p,h).apply(null,e(o,a)),M=Z1(n,r-L[0],i-L[1],f,p,h);return c=rf(s,u,l),P=ef(e,M),T=ef(c,P),_=X1(P,$),A()}function A(){return w=D=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&z,R()}}function Mf(t){var e=0,n=ht/3,r=Af(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*ot,n=o[1]*ot):[e*bt,n*bt]},i}function UD(t){var e=et(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 K1(t,e){var n=J(t),r=(n+J(e))/2;if(dt(r)<it)return UD(t);var i=1+n*(2*r-n),o=kt(i)/r;function a(s,u){var l=kt(i-2*r*J(u))/r;return[l*J(s*=r),o-l*et(s)]}return a.invert=function(s,u){var l=o-u,c=Xt(s,dt(l))*de(l);return l*r<0&&(c-=ht*de(s)*de(l)),[c/r,Zt((i-(s*s+l*l)*r*r)/(2*r))]},a}function Bs(){return Mf(K1).scale(155.424).center([0,33.6442])}function Q1(){return Bs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function BD(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 YD(){var t,e,n=Q1(),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,l={point:function(f,p){u=[f,p]}};function c(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)}c.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)},c.stream=function(f){return t&&e===f?t:t=BD([n.stream(e=f),i.stream(f),a.stream(f)])},c.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},c.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),c.translate(n.translate())):n.scale()},c.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(l),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+it,g+.12*p+it],[d-.214*p-it,g+.234*p-it]]).stream(l),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+it,g+.166*p+it],[d-.115*p-it,g+.234*p-it]]).stream(l),h()},c.fitExtent=function(f,p){return Us(c,f,p)},c.fitSize=function(f,p){return wf(c,f,p)},c.fitWidth=function(f,p){return $f(c,f,p)},c.fitHeight=function(f,p){return Sf(c,f,p)};function h(){return t=e=null,c}return c.scale(1070)}function J1(t){return function(e,n){var r=et(e),i=et(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=kt(e*e+n*n),i=t(r),o=J(i),a=et(i);return[Xt(e*o,r*a),Zt(r&&n*o/r)]}}var Pf=J1(function(t){return kt(2/(1+t))});Pf.invert=ho(function(t){return 2*Zt(t/2)});function HD(){return Ue(Pf).scale(124.75).clipAngle(180-.001)}var Df=J1(function(t){return(t=Ym(t))&&t/J(t)});Df.invert=ho(function(t){return t});function WD(){return Ue(Df).scale(79.4188).clipAngle(180-.001)}function po(t,e){return[t,hs(Hc((At+e)/2))]}po.invert=function(t,e){return[t,2*Yr(Bm(e))-At]};function qD(){return ty(po).scale(961/jt)}function ty(t){var e=Ue(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,l;e.scale=function(h){return arguments.length?(r(h),c()):r()},e.translate=function(h){return arguments.length?(i(h),c()):i()},e.center=function(h){return arguments.length?(n(h),c()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=l=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],l=+h[1][1]),c()):a==null?null:[[a,s],[u,l]]};function c(){var h=ht*r(),f=e(h1(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),l]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,l)]])}return c()}function Ys(t){return Hc((At+t)/2)}function ey(t,e){var n=et(t),r=t===e?J(t):hs(n/et(e))/hs(Ys(e)/Ys(t)),i=n*Yc(Ys(t),r)/r;if(!r)return po;function o(a,s){i>0?s<-At+it&&(s=-At+it):s>At-it&&(s=At-it);var u=i/Yc(Ys(s),r);return[u*J(r*a),i-u*et(r*a)]}return o.invert=function(a,s){var u=i-s,l=de(r)*kt(a*a+u*u),c=Xt(a,dt(u))*de(u);return u*r<0&&(c-=ht*de(a)*de(u)),[c/r,2*Yr(Yc(i/l,1/r))-At]},o}function VD(){return Mf(ey).scale(109.5).parallels([30,30])}function go(t,e){return[t,e]}go.invert=go;function jD(){return Ue(go).scale(152.63)}function ny(t,e){var n=et(t),r=t===e?J(t):(n-et(e))/(e-t),i=n/r+t;if(dt(r)<it)return go;function o(a,s){var u=i-s,l=r*a;return[u*J(l),i-u*et(l)]}return o.invert=function(a,s){var u=i-s,l=Xt(a,dt(u))*de(u);return u*r<0&&(l-=ht*de(a)*de(u)),[l/r,i-de(r)*kt(a*a+u*u)]},o}function XD(){return Mf(ny).scale(131.154).center([0,13.9389])}var mo=1.340264,yo=-.081106,bo=893e-6,vo=.003796,Hs=kt(3)/2,ZD=12;function Tf(t,e){var n=Zt(Hs*J(e)),r=n*n,i=r*r*r;return[t*et(n)/(Hs*(mo+3*yo*r+i*(7*bo+9*vo*r))),n*(mo+yo*r+i*(bo+vo*r))]}Tf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<ZD&&(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))/et(n),Zt(J(n)/Hs)]};function KD(){return Ue(Tf).scale(177.158)}function Lf(t,e){var n=et(e),r=et(t)*n;return[n*J(t)/r,J(e)/r]}Lf.invert=ho(Yr);function QD(){return Ue(Lf).scale(144.049).clipAngle(60)}function JD(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,l,c,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 P=_*a-$*s;$=$*a+_*s,_=P}return[$+e,_+n]}return v.invert=function(b){var $=b[0]-e,_=b[1]-n;if(o){var P=_*a+$*s;$=$*a-_*s,_=P}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=l=c=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(u=l=c=h=null,io):Ls(u=+b[0][0],l=+b[0][1],c=+b[1][0],h=+b[1][1]),x()):u==null?null:[[u,l],[c,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*ot,s=J(o),a=et(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 wf(v,b,$)},v.fitWidth=function(b,$){return $f(v,b,$)},v.fitHeight=function(b,$){return Sf(v,b,$)},v}function Cf(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)))]}Cf.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)>it&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function tT(){return Ue(Cf).scale(175.295)}function Ef(t,e){return[et(e)*J(t),J(e)]}Ef.invert=ho(Zt);function eT(){return Ue(Ef).scale(249.5).clipAngle(90+it)}function Rf(t,e){var n=et(e),r=1+et(t)*n;return[n*J(t)/r,J(e)/r]}Rf.invert=ho(function(t){return 2*Yr(t)});function nT(){return Ue(Rf).scale(250).clipAngle(142)}function kf(t,e){return[hs(Hc((At+e)/2)),-t]}kf.invert=function(t,e){return[-e,2*Yr(Bm(t))-At]};function rT(){var t=ty(kf),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 iT(t,e){return t.parent===e.parent?1:2}function oT(t){return t.reduce(aT,0)/t.length}function aT(t,e){return t+e.x}function sT(t){return 1+t.reduce(uT,0)}function uT(t,e){return Math.max(t,e.y)}function lT(t){for(var e;e=t.children;)t=e[0];return t}function cT(t){for(var e;e=t.children;)t=e[e.length-1];return t}function fT(){var t=iT,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=oT(p),f.y=sT(p)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=lT(o),l=cT(o),c=u.x-t(u,l)/2,h=l.x+t(l,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-c)/(h-c)*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 hT(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 pT(){return this.eachAfter(hT)}function dT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function gT(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 mT(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 yT(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function bT(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 vT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function xT(t){for(var e=this,n=_T(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 _T(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 wT(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function $T(){return Array.from(this)}function ST(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function AT(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*MT(){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=TT)):e===void 0&&(e=DT);for(var n=new Jn(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 Jn(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(ry)}function PT(){return Ws(this).eachBefore(LT)}function DT(t){return t.children}function TT(t){return Array.isArray(t)?t[1]:null}function LT(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function ry(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Jn(t){this.data=t,this.depth=this.height=0,this.parent=null}Jn.prototype=Ws.prototype={constructor:Jn,count:pT,each:dT,eachAfter:mT,eachBefore:gT,find:yT,sum:bT,sort:vT,path:xT,ancestors:wT,descendants:$T,leaves:ST,links:AT,copy:PT,[Symbol.iterator]:MT};function qs(t){return t==null?null:iy(t)}function iy(t){if(typeof t!="function")throw new Error;return t}function tr(){return 0}function Zr(t){return function(){return t}}const CT=1664525,ET=1013904223,oy=4294967296;function If(){let t=1;return()=>(t=(CT*t+ET)%oy)/oy}function RT(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function kT(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 IT(t){return ay(t,If())}function ay(t,e){for(var n=0,r=(t=kT(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&sy(a,o)?++n:(a=FT(i=NT(i,o)),n=0);return a}function NT(t,e){var n,r;if(Nf(e,t))return[e];for(n=0;n<t.length;++n)if(Vs(e,t[n])&&Nf(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(Vs(xo(t[n],t[r]),e)&&Vs(xo(t[n],e),t[r])&&Vs(xo(t[r],e),t[n])&&Nf(uy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Vs(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 sy(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 Nf(t,e){for(var n=0;n<e.length;++n)if(!sy(t,e[n]))return!1;return!0}function FT(t){switch(t.length){case 1:return GT(t[0]);case 2:return xo(t[0],t[1]);case 3:return uy(t[0],t[1],t[2])}}function GT(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,l=a-r,c=s-i,h=Math.sqrt(u*u+l*l);return{x:(n+o+u/h*c)/2,y:(r+a+l/h*c)/2,r:(h+i+s)/2}}function uy(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,h=n.r,f=r-a,p=r-l,d=i-s,g=i-c,m=u-o,y=h-o,x=r*r+i*i-o*o,v=x-a*a-s*s+u*u,b=x-l*l-c*c+h*h,$=p*d-f*g,_=(d*b-g*v)/($*2)-r,P=(g*m-d*y)/$,T=(p*v-f*b)/($*2)-i,w=(f*y-p*m)/$,D=P*P+w*w-1,S=2*(o+_*P+T*w),z=_*_+T*T-o*o,R=-(Math.abs(D)>1e-6?(S+Math.sqrt(S*S-4*D*z))/(2*D):z/S);return{x:r+_+P*R,y:i+T+w*R,r:R}}function ly(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,l=r*r+a*a;l?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(l+u-o)/(2*l),s=Math.sqrt(Math.max(0,u/l-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(l+o-u)/(2*l),s=Math.sqrt(Math.max(0,o/l-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 cy(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 fy(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 js(t){this._=t,this.next=null,this.previous=null}function hy(t,e){if(!(o=(t=RT(t)).length))return 0;var n,r,i,o,a,s,u,l,c,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;ly(r,n,i=t[2]),n=new js(n),r=new js(r),i=new js(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){ly(n._,r._,i=t[u]),i=new js(i),l=r.next,c=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(cy(l._,i._)){r=l,n.next=r,r.previous=n,--u;continue t}h+=l._.r,l=l.next}else{if(cy(c._,i._)){n=c,n.next=r,r.previous=n,--u;continue t}f+=c._.r,c=c.previous}while(l!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=fy(n);(i=i.next)!==r;)(s=fy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=ay(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function zT(t){return hy(t,If()),t}function OT(t){return Math.sqrt(t.value)}function UT(){var t=null,e=1,n=1,r=tr;function i(o){const a=If();return o.x=e/2,o.y=n/2,t?o.eachBefore(py(t)).eachAfter(Ff(r,.5,a)).eachBefore(dy(1)):o.eachBefore(py(OT)).eachAfter(Ff(tr,1,a)).eachAfter(Ff(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:Zr(+o),i):r},i}function py(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Ff(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=hy(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 gy(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,l=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*l}function BT(){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(gy),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 l=u.x0,c=u.y0,h=u.x1-n,f=u.y1-n;h<l&&(l=h=(l+h)/2),f<c&&(c=f=(c+f)/2),u.x0=l,u.y0=c,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 YT={depth:-1},my={},Gf={};function HT(t){return t.id}function WT(t){return t.parentId}function qT(){var t=HT,e=WT,n;function r(i){var o=Array.from(i),a=t,s=e,u,l,c,h,f,p,d,g,m=new Map;if(n!=null){const y=o.map((b,$)=>VT(n(b,$,i))),x=y.map(yy),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(yy(b)),o.push(Gf));a=(b,$)=>y[$],s=(b,$)=>x[$]}for(c=0,u=o.length;c<u;++c)l=o[c],p=o[c]=new Jn(l),(d=a(l,c,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?my:p)),(d=s(l,c,i))!=null&&(d+="")&&(p.parent=d);for(c=0;c<u;++c)if(p=o[c],d=p.parent){if(f=m.get(d),!f)throw new Error("missing: "+d);if(f===my)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===Gf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Gf);--y)p.data=null}if(h.parent=YT,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(ry),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 VT(t){t=`${t}`;let e=t.length;return zf(t,e-1)&&!zf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function yy(t){let e=t.length;if(e<2)return"";for(;--e>1&&!zf(t,e););return t.slice(0,e)}function zf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function jT(t,e){return t.parent===e.parent?1:2}function Of(t){var e=t.children;return e?e[0]:t.t}function Uf(t){var e=t.children;return e?e[e.length-1]:t.t}function XT(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 ZT(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 KT(t,e,n){return t.a.parent===e.parent?t.a:n}function Xs(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}Xs.prototype=Object.create(Jn.prototype);function QT(t){for(var e=new Xs(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 Xs(o[a],a)),i.parent=n;return(e.parent=new Xs(null,0)).children=[e],e}function JT(){var t=jT,e=1,n=1,r=null;function i(l){var c=QT(l);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)l.eachBefore(u);else{var h=l,f=l,p=l;l.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);l.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*y})}return l}function o(l){var c=l.children,h=l.parent.children,f=l.i?h[l.i-1]:null;if(c){ZT(l);var p=(c[0].z+c[c.length-1].z)/2;f?(l.z=f.z+t(l._,f._),l.m=l.z-p):l.z=p}else f&&(l.z=f.z+t(l._,f._));l.parent.A=s(l,f,l.parent.A||h[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,c,h){if(c){for(var f=l,p=l,d=c,g=f.parent.children[0],m=f.m,y=p.m,x=d.m,v=g.m,b;d=Uf(d),f=Of(f),d&&f;)g=Of(g),p=Uf(p),p.a=l,b=d.z+x-f.z-m+t(d._,f._),b>0&&(XT(KT(d,l,h),l,b),m+=b,y+=b),x+=d.m,m+=f.m,v+=g.m,y+=p.m;d&&!Uf(p)&&(p.t=d,p.m+=x-y),f&&!Of(g)&&(g.t=f,g.m+=m-v,h=l)}return h}function u(l){l.x*=e,l.y=l.depth*n}return i.separation=function(l){return arguments.length?(t=l,i):t},i.size=function(l){return arguments.length?(r=!1,e=+l[0],n=+l[1],i):r?null:[e,n]},i.nodeSize=function(l){return arguments.length?(r=!0,e=+l[0],n=+l[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,l=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*l}var by=(1+Math.sqrt(5))/2;function vy(t,e,n,r,i,o){for(var a=[],s=e.children,u,l,c=0,h=0,f=s.length,p,d,g=e.value,m,y,x,v,b,$,_;c<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+=l=s[h].value,l<y&&(y=l),l>x&&(x=l),_=m*m*$,v=Math.max(x/_,_/y),v>b){m-=l;break}b=v}a.push(u={value:m,dice:p<d,children:s.slice(c,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,c=h}return a}const Bf=function t(e){function n(r,i,o,a,s){vy(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(by);function xy(){var t=Bf,e=!1,n=1,r=1,i=[0],o=tr,a=tr,s=tr,u=tr,l=tr;function c(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore(gy),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+=l(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 c.round=function(f){return arguments.length?(e=!!f,c):e},c.size=function(f){return arguments.length?(n=+f[0],r=+f[1],c):[n,r]},c.tile=function(f){return arguments.length?(t=iy(f),c):t},c.padding=function(f){return arguments.length?c.paddingInner(f).paddingOuter(f):c.paddingInner()},c.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Zr(+f),c):o},c.paddingOuter=function(f){return arguments.length?c.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):c.paddingTop()},c.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Zr(+f),c):a},c.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Zr(+f),c):s},c.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Zr(+f),c):u},c.paddingLeft=function(f){return arguments.length?(l=typeof f=="function"?f:Zr(+f),c):l},c}function t9(t,e,n,r,i){var o=t.children,a,s=o.length,u,l=new Array(s+1);for(l[0]=u=a=0;a<s;++a)l[a+1]=u+=o[a].value;c(0,s,t.value,e,n,r,i);function c(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=l[h],b=p/2+v,$=h+1,_=f-1;$<_;){var P=$+_>>>1;l[P]<b?$=P+1:_=P}b-l[$-1]<l[$]-b&&h+1<$&&--$;var T=l[$]-v,w=p-T;if(m-d>y-g){var D=p?(d*w+m*T)/p:m;c(h,$,T,d,g,D,y),c($,f,w,D,g,m,y)}else{var S=p?(g*w+y*T)/p:y;c(h,$,T,d,g,m,S),c($,f,w,d,S,m,y)}}}function e9(t,e,n,r,i){(t.depth&1?Zs:_o)(t,e,n,r,i)}const n9=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,l,c,h,f=-1,p,d=u.length,g=r.value;++f<d;){for(l=u[f],c=l.children,h=l.value=0,p=c.length;h<p;++h)l.value+=c[h].value;l.dice?_o(l,i,o,a,g?o+=(s-o)*l.value/g:s):Zs(l,i,o,g?i+=(a-i)*l.value/g:a,s),g-=l.value}else r._squarify=u=vy(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(by);function r9(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 i9(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 o9(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function a9(t,e){return t[0]-e[0]||t[1]-e[1]}function _y(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&o9(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function s9(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(a9),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=_y(r),a=_y(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],l=[];for(e=o.length-1;e>=0;--e)l.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)l.push(t[r[a[e]][2]]);return l}function u9(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,l,c=!1,h=0;h<n;++h)r=t[h],u=r[0],l=r[1],l>o!=s>o&&i<(a-u)*(o-l)/(s-l)+u&&(c=!c),a=u,s=l;return c}function l9(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,c9=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),f9=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),Yf=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),h9=function t(e){var n=Yf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),wy=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),p9=function t(e){var n=wy.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),d9=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),g9=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),m9=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),Hf=function t(e){var n=Yf.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 l=n(),c=1+s*l;while(c<=0);c*=c*c;var h=1-e()}while(h>=1-.0331*l*l*l*l&&Math.log(h)>=.5*l*l+a*(1-c+Math.log(c)));return a*c*u()*o}}return r.source=t,r}(Nt),Sy=function t(e){var n=Hf.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),Ay=function t(e){var n=$y.source(e),r=Sy.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,l=a;u*l>16&&u*(1-l)>16;){var c=Math.floor((u+1)*l),h=r(c,u-c+1)();h<=l?(s+=c,u-=c,l=(l-h)/(1-h)):(u=c-1,l/=h)}for(var f=l<.5,p=f?l:1-l,d=n(p),g=d(),m=0;g<=u;++m)g+=d();return s+(f?m:u-m)}}return i.source=t,i}(Nt),y9=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),b9=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),v9=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),x9=function t(e){var n=Hf.source(e),r=Ay.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),l=n(u)();if(l>s)return a+r(u-1,s/l)();a+=u,s-=l}for(var c=-Math.log1p(-e()),h=0;c<=s;++h)c-=Math.log1p(-e());return a+h}}return i.source=t,i}(Nt),_9=1664525,w9=1013904223,My=1/4294967296;function $9(t=Math.random()){let e=(0<=t&&t<1?t/My:Math.abs(t))|0;return()=>(e=_9*e+w9|0,My*(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 Wf=Symbol("implicit");function qf(){var t=new Pi,e=[],n=[],r=Wf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Wf)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 qf(e,n).unknown(r)},me.apply(i,arguments),i}function Vf(){var t=qf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,l=0,c=.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+l*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*c,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=fn(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,l=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(l=+f,h()):l},t.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),h()):c},t.copy=function(){return Vf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},me.apply(h(),arguments)}function Py(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Py(e())},t}function jf(){return Py(Vf.apply(null,arguments).paddingInner(1))}function S9(t){return function(){return t}}function Ks(t){return+t}var Dy=[0,1];function te(t){return t}function Xf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:S9(isNaN(e)?NaN:.5)}function A9(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function M9(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Xf(i,r),o=n(a,o)):(r=Xf(r,i),o=n(o,a)),function(s){return o(r(s))}}function P9(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]=Xf(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Cn(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=Dy,e=Dy,n=Ve,r,i,o,a=te,s,u,l;function c(){var f=Math.min(t.length,e.length);return a!==te&&(a=A9(t[0],t[f-1])),s=f>2?P9:M9,u=l=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((l||(l=s(e,t.map(r),pe)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Ks),c()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),c()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Ua,c()},h.clamp=function(f){return arguments.length?(a=f?!0:te,c()):a!==te},h.interpolate=function(f){return arguments.length?(n=f,c()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,c()}}function Zf(){return Qs()(te,te)}function Ty(t,e,n,r){var i=ba(t,e,n),o;switch(r=Br(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Om(i,a))&&(r.precision=o),Uc(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Um(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=zm(i))&&(r.precision=o-(r.type==="%")*2);break}}return Qi(r)}function bn(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 Ty(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,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=kn(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function Kf(){var t=Zf();return t.copy=function(){return wo(t,Kf())},me.apply(t,arguments),bn(t)}function Ly(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 Ly(t).unknown(e)},t=arguments.length?Array.from(t,Ks):[0,1],bn(n)}function Cy(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 Ey(t){return Math.log(t)}function Ry(t){return Math.exp(t)}function D9(t){return-Math.log(-t)}function T9(t){return-Math.exp(-t)}function L9(t){return isFinite(t)?+("1e"+t):t<0?0:t}function C9(t){return t===10?L9:t===Math.E?Math.exp:e=>Math.pow(t,e)}function E9(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 ky(t){return(e,n)=>-t(-e,n)}function Qf(t){const e=t(Ey,Ry),n=e.domain;let r=10,i,o;function a(){return i=E9(r),o=C9(r),n()[0]<0?(i=ky(i),o=ky(o),t(D9,T9)):t(Ey,Ry),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 l=u[0],c=u[u.length-1];const h=c<l;h&&([l,c]=[c,l]);let f=i(l),p=i(c),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),l>0){for(;f<=p;++f)for(d=1;d<r;++d)if(g=f<0?d/o(-f):d*o(f),!(g<l)){if(g>c)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<l)){if(g>c)break;y.push(g)}y.length*2<m&&(y=Rn(l,c,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=Br(u)).precision==null&&(u.trim=!0),u=Qi(u)),s===1/0)return u;const l=Math.max(1,r*s/e.ticks().length);return c=>{let h=c/o(Math.round(i(c)));return h*r<r-.5&&(h*=r),h<=l?u(c):""}},e.nice=()=>n(Cy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Iy(){const t=Qf(Qs()).domain([1,10]);return t.copy=()=>wo(t,Iy()).base(t.base()),me.apply(t,arguments),t}function Ny(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Fy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Jf(t){var e=1,n=t(Ny(e),Fy(e));return n.constant=function(r){return arguments.length?t(Ny(e=+r),Fy(e)):e},bn(n)}function Gy(){var t=Jf(Qs());return t.copy=function(){return wo(t,Gy()).constant(t.constant())},me.apply(t,arguments)}function zy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function R9(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function k9(t){return t<0?-t*t:t*t}function th(t){var e=t(te,te),n=1;function r(){return n===1?t(te,te):n===.5?t(R9,k9):t(zy(n),zy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function Kr(){var t=th(Qs());return t.copy=function(){return wo(t,Kr()).exponent(t.exponent())},me.apply(t,arguments),t}function I9(){return Kr.apply(null,arguments).exponent(.5)}function Oy(t){return Math.sign(t)*t*t}function N9(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Uy(){var t=Zf(),e=[0,1],n=!1,r;function i(o){var a=N9(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Oy(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(Oy)),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 Uy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},me.apply(i,arguments),bn(i)}function By(){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]=xg(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[Cn(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(wt),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 By().domain(t).range(e).unknown(r)},me.apply(o,arguments)}function Yy(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Cn(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 l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Yy().domain([t,e]).range(i).unknown(o)},me.apply(bn(a),arguments)}function Hy(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[Cn(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 Hy().domain(t).range(e).unknown(n)},me.apply(i,arguments)}const eh=new Date,nh=new Date;function Dt(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 l;do u.push(l=new Date(+o)),e(o,s),t(o);while(l<o&&o<a);return u},i.filter=o=>Dt(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)=>(eh.setTime(+o),nh.setTime(+a),t(eh),t(nh),Math.floor(n(eh,nh))),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 Qr=Dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Qr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Dt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Qr);const Wy=Qr.range,nn=1e3,ye=nn*60,rn=ye*60,on=rn*24,rh=on*7,qy=on*30,ih=on*365,an=Dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCSeconds()),Vy=an.range,Js=Dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*ye)},(t,e)=>(e-t)/ye,t=>t.getMinutes()),F9=Js.range,tu=Dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ye)},(t,e)=>(e-t)/ye,t=>t.getUTCMinutes()),G9=tu.range,eu=Dt(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()),z9=eu.range,nu=Dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),O9=nu.range,Jr=Dt(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),U9=Jr.range,$o=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),B9=$o.range,oh=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>Math.floor(t/on)),Y9=oh.range;function er(t){return Dt(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)/rh)}const ti=er(0),So=er(1),jy=er(2),Xy=er(3),nr=er(4),Zy=er(5),Ky=er(6),Qy=ti.range,H9=So.range,W9=jy.range,q9=Xy.range,V9=nr.range,j9=Zy.range,X9=Ky.range;function rr(t){return Dt(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)/rh)}const ei=rr(0),Ao=rr(1),Jy=rr(2),tb=rr(3),ir=rr(4),eb=rr(5),nb=rr(6),rb=ei.range,Z9=Ao.range,K9=Jy.range,Q9=tb.range,J9=ir.range,tL=eb.range,eL=nb.range,ru=Dt(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()),nL=ru.range,iu=Dt(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()),rL=iu.range,Be=Dt(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:Dt(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 iL=Be.range,Ye=Dt(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:Dt(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 oL=Ye.range;function ib(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,rh],[e,1,qy],[e,3,3*qy],[t,1,ih]];function s(l,c,h){const f=c<l;f&&([l,c]=[c,l]);const p=h&&typeof h.range=="function"?h:u(l,c,h),d=p?p.range(l,+c+1):[];return f?d.reverse():d}function u(l,c,h){const f=Math.abs(c-l)/h,p=da(([,,m])=>m).right(a,f);if(p===a.length)return t.every(ba(l/ih,c/ih,h));if(p===0)return Qr.every(Math.max(ba(l,c,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[ob,ab]=ib(Ye,iu,ei,oh,nu,tu),[sb,ub]=ib(Be,ru,ti,Jr,eu,Js);function ah(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 sh(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 lb(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,l=Po(i),c=Do(i),h=Po(o),f=Do(o),p=Po(a),d=Do(a),g=Po(s),m=Do(s),y=Po(u),x=Do(u),v={a:G,A:U,b:E,B:k,c:null,d:gb,e:gb,f:DL,g:GL,G:OL,H:AL,I:ML,j:PL,L:mb,m:TL,M:LL,p:C,q:F,Q:wb,s:$b,S:CL,u:EL,U:RL,V:kL,w:IL,W:NL,x:null,X:null,y:FL,Y:zL,Z:UL,"%":_b},b={a:V,A:Q,b:N,B:j,c:null,d:bb,e:bb,f:WL,g:eC,G:rC,H:BL,I:YL,j:HL,L:vb,m:qL,M:VL,p:q,q:Z,Q:wb,s:$b,S:jL,u:XL,U:ZL,V:KL,w:QL,W:JL,x:null,X:null,y:tC,Y:nC,Z:iC,"%":_b},$={a:D,A:S,b:z,B:R,c:A,d:pb,e:pb,f:_L,g:hb,G:fb,H:db,I:db,j:yL,L:xL,m:mL,M:bL,p:w,q:gL,Q:$L,s:SL,S:vL,u:cL,U:fL,V:hL,w:lL,W:pL,x:L,X:M,y:hb,Y:fb,Z:dL,"%":wL};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,nt){return function(ut){var H=[],mt=-1,pt=0,Yt=W.length,ee,st,Pt;for(ut instanceof Date||(ut=new Date(+ut));++mt<Yt;)W.charCodeAt(mt)===37&&(H.push(W.slice(pt,mt)),(st=cb[ee=W.charAt(++mt)])!=null?ee=W.charAt(++mt):st=ee==="e"?" ":"0",(Pt=nt[ee])&&(ee=Pt(ut,st)),H.push(ee),pt=mt+1);return H.push(W.slice(pt,mt)),H.join("")}}function P(W,nt){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(nt&&!("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=sh(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=ah(Mo(H.y,0,1)),Yt=pt.getDay(),pt=Yt>4||Yt===0?So.ceil(pt):So(pt),pt=Jr.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?sh(Mo(H.y,0,1)).getUTCDay():ah(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,sh(H)):ah(H)}}function T(W,nt,ut,H){for(var mt=0,pt=nt.length,Yt=ut.length,ee,st;mt<pt;){if(H>=Yt)return-1;if(ee=nt.charCodeAt(mt++),ee===37){if(ee=nt.charAt(mt++),st=$[ee in cb?nt.charAt(mt++):ee],!st||(H=st(W,ut,H))<0)return-1}else if(ee!=ut.charCodeAt(H++))return-1}return H}function w(W,nt,ut){var H=l.exec(nt.slice(ut));return H?(W.p=c.get(H[0].toLowerCase()),ut+H[0].length):-1}function D(W,nt,ut){var H=p.exec(nt.slice(ut));return H?(W.w=d.get(H[0].toLowerCase()),ut+H[0].length):-1}function S(W,nt,ut){var H=h.exec(nt.slice(ut));return H?(W.w=f.get(H[0].toLowerCase()),ut+H[0].length):-1}function z(W,nt,ut){var H=y.exec(nt.slice(ut));return H?(W.m=x.get(H[0].toLowerCase()),ut+H[0].length):-1}function R(W,nt,ut){var H=g.exec(nt.slice(ut));return H?(W.m=m.get(H[0].toLowerCase()),ut+H[0].length):-1}function A(W,nt,ut){return T(W,e,nt,ut)}function L(W,nt,ut){return T(W,n,nt,ut)}function M(W,nt,ut){return T(W,r,nt,ut)}function G(W){return a[W.getDay()]}function U(W){return o[W.getDay()]}function E(W){return u[W.getMonth()]}function k(W){return s[W.getMonth()]}function C(W){return i[+(W.getHours()>=12)]}function F(W){return 1+~~(W.getMonth()/3)}function V(W){return a[W.getUTCDay()]}function Q(W){return o[W.getUTCDay()]}function N(W){return u[W.getUTCMonth()]}function j(W){return s[W.getUTCMonth()]}function q(W){return i[+(W.getUTCHours()>=12)]}function Z(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var nt=_(W+="",v);return nt.toString=function(){return W},nt},parse:function(W){var nt=P(W+="",!1);return nt.toString=function(){return W},nt},utcFormat:function(W){var nt=_(W+="",b);return nt.toString=function(){return W},nt},utcParse:function(W){var nt=P(W+="",!0);return nt.toString=function(){return W},nt}}}var cb={"-":"",_:" ",0:"0"},It=/^\s*\d+/,aL=/^%/,sL=/[\\^$*+?|[\]().{}]/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 uL(t){return t.replace(sL,"\\$&")}function Po(t){return new RegExp("^(?:"+t.map(uL).join("|")+")","i")}function Do(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function lL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function cL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function fL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function hL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function pL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function fb(t,e,n){var r=It.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function hb(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 dL(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 gL(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 mL(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 pb(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function yL(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 db(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function bL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function vL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function xL(t,e,n){var r=It.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function _L(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 wL(t,e,n){var r=aL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function $L(t,e,n){var r=It.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=It.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function gb(t,e){return gt(t.getDate(),e,2)}function AL(t,e){return gt(t.getHours(),e,2)}function ML(t,e){return gt(t.getHours()%12||12,e,2)}function PL(t,e){return gt(1+Jr.count(Be(t),t),e,3)}function mb(t,e){return gt(t.getMilliseconds(),e,3)}function DL(t,e){return mb(t,e)+"000"}function TL(t,e){return gt(t.getMonth()+1,e,2)}function LL(t,e){return gt(t.getMinutes(),e,2)}function CL(t,e){return gt(t.getSeconds(),e,2)}function EL(t){var e=t.getDay();return e===0?7:e}function RL(t,e){return gt(ti.count(Be(t)-1,t),e,2)}function yb(t){var e=t.getDay();return e>=4||e===0?nr(t):nr.ceil(t)}function kL(t,e){return t=yb(t),gt(nr.count(Be(t),t)+(Be(t).getDay()===4),e,2)}function IL(t){return t.getDay()}function NL(t,e){return gt(So.count(Be(t)-1,t),e,2)}function FL(t,e){return gt(t.getFullYear()%100,e,2)}function GL(t,e){return t=yb(t),gt(t.getFullYear()%100,e,2)}function zL(t,e){return gt(t.getFullYear()%1e4,e,4)}function OL(t,e){var n=t.getDay();return t=n>=4||n===0?nr(t):nr.ceil(t),gt(t.getFullYear()%1e4,e,4)}function UL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+gt(e/60|0,"0",2)+gt(e%60,"0",2)}function bb(t,e){return gt(t.getUTCDate(),e,2)}function BL(t,e){return gt(t.getUTCHours(),e,2)}function YL(t,e){return gt(t.getUTCHours()%12||12,e,2)}function HL(t,e){return gt(1+$o.count(Ye(t),t),e,3)}function vb(t,e){return gt(t.getUTCMilliseconds(),e,3)}function WL(t,e){return vb(t,e)+"000"}function qL(t,e){return gt(t.getUTCMonth()+1,e,2)}function VL(t,e){return gt(t.getUTCMinutes(),e,2)}function jL(t,e){return gt(t.getUTCSeconds(),e,2)}function XL(t){var e=t.getUTCDay();return e===0?7:e}function ZL(t,e){return gt(ei.count(Ye(t)-1,t),e,2)}function xb(t){var e=t.getUTCDay();return e>=4||e===0?ir(t):ir.ceil(t)}function KL(t,e){return t=xb(t),gt(ir.count(Ye(t),t)+(Ye(t).getUTCDay()===4),e,2)}function QL(t){return t.getUTCDay()}function JL(t,e){return gt(Ao.count(Ye(t)-1,t),e,2)}function tC(t,e){return gt(t.getUTCFullYear()%100,e,2)}function eC(t,e){return t=xb(t),gt(t.getUTCFullYear()%100,e,2)}function nC(t,e){return gt(t.getUTCFullYear()%1e4,e,4)}function rC(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ir(t):ir.ceil(t),gt(t.getUTCFullYear()%1e4,e,4)}function iC(){return"+0000"}function _b(){return"%"}function wb(t){return+t}function $b(t){return Math.floor(+t/1e3)}var ni,uh,Sb,ou,lh;Ab({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 Ab(t){return ni=lb(t),uh=ni.format,Sb=ni.parse,ou=ni.utcFormat,lh=ni.utcParse,ni}var Mb="%Y-%m-%dT%H:%M:%S.%LZ";function oC(t){return t.toISOString()}var aC=Date.prototype.toISOString?oC:ou(Mb);const sC=aC;function uC(t){var e=new Date(t);return isNaN(e)?null:e}var lC=+new Date("2000-01-01T00:00:00.000Z")?uC:lh(Mb);const cC=lC;function fC(t){return new Date(t)}function hC(t){return t instanceof Date?+t:+new Date(+t)}function ch(t,e,n,r,i,o,a,s,u,l){var c=Zf(),h=c.invert,f=c.domain,p=l(".%L"),d=l(":%S"),g=l("%I:%M"),m=l("%I %p"),y=l("%a %d"),x=l("%b %d"),v=l("%B"),b=l("%Y");function $(_){return(u(_)<_?p:s(_)<_?d:a(_)<_?g:o(_)<_?m:r(_)<_?i(_)<_?y:x:n(_)<_?v:b)(_)}return c.invert=function(_){return new Date(h(_))},c.domain=function(_){return arguments.length?f(Array.from(_,hC)):f().map(fC)},c.ticks=function(_){var P=f();return t(P[0],P[P.length-1],_??10)},c.tickFormat=function(_,P){return P==null?$:l(P)},c.nice=function(_){var P=f();return(!_||typeof _.range!="function")&&(_=e(P[0],P[P.length-1],_??10)),_?f(Cy(P,_)):c},c.copy=function(){return wo(c,ch(t,e,n,r,i,o,a,s,u,l))},c}function pC(){return me.apply(ch(sb,ub,Be,ru,ti,Jr,eu,Js,an,uh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function dC(){return me.apply(ch(ob,ab,Ye,iu,ei,$o,nu,tu,an,ou).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function au(){var t=0,e=1,n,r,i,o,a=te,s=!1,u;function l(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))}l.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),l):[t,e]},l.clamp=function(h){return arguments.length?(s=!!h,l):s},l.interpolator=function(h){return arguments.length?(a=h,l):a};function c(h){return function(f){var p,d;return arguments.length?([p,d]=f,a=h(p,d),l):[a(0),a(1)]}}return l.range=c(Ve),l.rangeRound=c(Ua),l.unknown=function(h){return arguments.length?(u=h,l):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),l}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Pb(){var t=bn(au()(te));return t.copy=function(){return vn(t,Pb())},en.apply(t,arguments)}function Db(){var t=Qf(au()).domain([1,10]);return t.copy=function(){return vn(t,Db()).base(t.base())},en.apply(t,arguments)}function Tb(){var t=Jf(au());return t.copy=function(){return vn(t,Tb()).constant(t.constant())},en.apply(t,arguments)}function fh(){var t=th(au());return t.copy=function(){return vn(t,fh()).exponent(t.exponent())},en.apply(t,arguments)}function gC(){return fh.apply(null,arguments).exponent(.5)}function Lb(){var t=[],e=te;function n(r){if(r!=null&&!isNaN(r=+r))return e((Cn(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(wt),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)=>Li(t,o/r))},n.copy=function(){return Lb(e).domain(t)},en.apply(n,arguments)}function su(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,l=te,c,h=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+c(g))-o)*(r*g<r*o?s:u),l(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=c(t=+t),o=c(e=+e),a=c(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?(l=g,p):l};function d(g){return function(m){var y,x,v;return arguments.length?([y,x,v]=m,l=C0(g,[y,x,v]),p):[l(0),l(.5),l(1)]}}return p.range=d(Ve),p.rangeRound=d(Ua),p.unknown=function(g){return arguments.length?(f=g,p):f},function(g){return c=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 Cb(){var t=bn(su()(te));return t.copy=function(){return vn(t,Cb())},en.apply(t,arguments)}function Eb(){var t=Qf(su()).domain([.1,1,10]);return t.copy=function(){return vn(t,Eb()).base(t.base())},en.apply(t,arguments)}function Rb(){var t=Jf(su());return t.copy=function(){return vn(t,Rb()).constant(t.constant())},en.apply(t,arguments)}function hh(){var t=th(su());return t.copy=function(){return vn(t,hh()).exponent(t.exponent())},en.apply(t,arguments)}function mC(){return hh.apply(null,arguments).exponent(.5)}function ct(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 yC=ct("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),bC=ct("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),vC=ct("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),xC=ct("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),_C=ct("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),wC=ct("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),$C=ct("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),SC=ct("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),AC=ct("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),MC=ct("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),PC=ct("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),vt=t=>m0(t[t.length-1]);var kb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ct);const DC=vt(kb);var Ib=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ct);const TC=vt(Ib);var Nb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ct);const LC=vt(Nb);var Fb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ct);const CC=vt(Fb);var Gb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ct);const EC=vt(Gb);var zb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ct);const RC=vt(zb);var Ob=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ct);const kC=vt(Ob);var Ub=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ct);const IC=vt(Ub);var Bb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ct);const NC=vt(Bb);var Yb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ct);const FC=vt(Yb);var Hb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ct);const GC=vt(Hb);var Wb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ct);const zC=vt(Wb);var qb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ct);const OC=vt(qb);var Vb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ct);const UC=vt(Vb);var jb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ct);const BC=vt(jb);var Xb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ct);const YC=vt(Xb);var Zb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ct);const HC=vt(Zb);var Kb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ct);const WC=vt(Kb);var Qb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ct);const qC=vt(Qb);var Jb=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ct);const VC=vt(Jb);var tv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ct);const jC=vt(tv);var ev=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ct);const XC=vt(ev);var nv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ct);const ZC=vt(nv);var rv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ct);const KC=vt(rv);var iv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ct);const QC=vt(iv);var ov=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ct);const JC=vt(ov);var av=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ct);const tE=vt(av);function eE(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 nE=Ya(Me(300,.5,0),Me(-240,.5,1));var rE=Ya(Me(-100,.75,.35),Me(80,1.5,.8)),iE=Ya(Me(260,.75,.35),Me(80,1.5,.8)),uu=Me();function oE(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return uu.h=360*t-100,uu.s=1.5-1.5*e,uu.l=.8-.9*e,uu+""}var lu=Lr(),aE=Math.PI/3,sE=Math.PI*2/3;function uE(t){var e;return t=(.5-t)*Math.PI,lu.r=255*(e=Math.sin(t))*e,lu.g=255*(e=Math.sin(t+aE))*e,lu.b=255*(e=Math.sin(t+sE))*e,lu+""}function lE(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 cE=cu(ct("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var fE=cu(ct("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),hE=cu(ct("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),pE=cu(ct("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function lt(t){return function(){return t}}const sv=Math.abs,Ut=Math.atan2,sn=Math.cos,dE=Math.max,ri=Math.min,oe=Math.sin,xt=Math.sqrt,Bt=1e-12,xn=Math.PI,fu=xn/2,_n=2*xn;function gE(t){return t>1?0:t<-1?xn:Math.acos(t)}function uv(t){return t>=1?fu:t<=-1?-fu: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 ji(e)}function mE(t){return t.innerRadius}function yE(t){return t.outerRadius}function bE(t){return t.startAngle}function vE(t){return t.endAngle}function xE(t){return t&&t.padAngle}function _E(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,f=h*u-c*l;if(!(f*f<Bt))return f=(c*(e-o)-h*(t-i))/f,[t+f*u,e+f*l]}function hu(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/xt(s*s+u*u),c=l*u,h=-l*s,f=t+c,p=e+h,d=n+c,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,P=(v<0?-1:1)*xt(dE(0,$*$*b-_*_)),T=(_*v-x*P)/b,w=(-_*x-v*P)/b,D=(_*v+x*P)/b,S=(-_*x+v*P)/b,z=T-m,R=w-y,A=D-m,L=S-y;return z*z+R*R>A*A+L*L&&(T=D,w=S),{cx:T,cy:w,x01:-c,y01:-h,x11:T*(i/$-1),y11:w*(i/$-1)}}function pu(){var t=mE,e=yE,n=lt(0),r=null,i=bE,o=vE,a=xE,s=null,u=To(l);function l(){var c,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-fu,g=o.apply(this,arguments)-fu,m=sv(g-d),y=g>d;if(s||(s=c=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,P=m,T=a.apply(this,arguments)/2,w=T>Bt&&(r?+r.apply(this,arguments):xt(f*f+p*p)),D=ri(sv(p-f)/2,+n.apply(this,arguments)),S=D,z=D,R,A;if(w>Bt){var L=uv(w/f*oe(T)),M=uv(w/p*oe(T));(_-=L*2)>Bt?(L*=y?1:-1,b+=L,$-=L):(_=0,b=$=(d+g)/2),(P-=M*2)>Bt?(M*=y?1:-1,x+=M,v-=M):(P=0,x=v=(d+g)/2)}var G=p*sn(x),U=p*oe(x),E=f*sn($),k=f*oe($);if(D>Bt){var C=p*sn(v),F=p*oe(v),V=f*sn(b),Q=f*oe(b),N;if(m<xn)if(N=_E(G,U,V,Q,C,F,E,k)){var j=G-N[0],q=U-N[1],Z=C-N[0],W=F-N[1],nt=1/oe(gE((j*Z+q*W)/(xt(j*j+q*q)*xt(Z*Z+W*W)))/2),ut=xt(N[0]*N[0]+N[1]*N[1]);S=ri(D,(f-ut)/(nt-1)),z=ri(D,(p-ut)/(nt+1))}else S=z=0}P>Bt?z>Bt?(R=hu(V,Q,G,U,p,z,y),A=hu(C,F,E,k,p,z,y),s.moveTo(R.cx+R.x01,R.cy+R.y01),z<D?s.arc(R.cx,R.cy,z,Ut(R.y01,R.x01),Ut(A.y01,A.x01),!y):(s.arc(R.cx,R.cy,z,Ut(R.y01,R.x01),Ut(R.y11,R.x11),!y),s.arc(0,0,p,Ut(R.cy+R.y11,R.cx+R.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(G,U),s.arc(0,0,p,x,v,!y)):s.moveTo(G,U),!(f>Bt)||!(_>Bt)?s.lineTo(E,k):S>Bt?(R=hu(E,k,C,F,f,-S,y),A=hu(G,U,V,Q,f,-S,y),s.lineTo(R.cx+R.x01,R.cy+R.y01),S<D?s.arc(R.cx,R.cy,S,Ut(R.y01,R.x01),Ut(A.y01,A.x01),!y):(s.arc(R.cx,R.cy,S,Ut(R.y01,R.x01),Ut(R.y11,R.x11),!y),s.arc(0,0,f,Ut(R.cy+R.y11,R.cx+R.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(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xn/2;return[sn(h)*c,oe(h)*c]},l.innerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:lt(+c),l):t},l.outerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:lt(+c),l):e},l.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:lt(+c),l):n},l.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:lt(+c),l):r},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:lt(+c),l):i},l.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:lt(+c),l):o},l.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:lt(+c),l):a},l.context=function(c){return arguments.length?(s=c??null,l):s},l}var wE=Array.prototype.slice;function du(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lv(t){this._context=t}lv.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 lv(t)}function ph(t){return t[0]}function dh(t){return t[1]}function mu(t,e){var n=lt(!0),r=null,i=gu,o=null,a=To(s);t=typeof t=="function"?t:t===void 0?ph:lt(t),e=typeof e=="function"?e:e===void 0?dh:lt(e);function s(u){var l,c=(u=du(u)).length,h,f=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l<c&&n(h=u[l],l,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,l,u),+e(h,l,u));if(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:lt(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:lt(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:lt(!!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 gh(t,e,n){var r=null,i=lt(!0),o=null,a=gu,s=null,u=To(l);t=typeof t=="function"?t:t===void 0?ph:lt(+t),e=typeof e=="function"?e:lt(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?dh:lt(+n);function l(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 c(){return mu().defined(i).curve(a).context(o)}return l.x=function(h){return arguments.length?(t=typeof h=="function"?h:lt(+h),r=null,l):t},l.x0=function(h){return arguments.length?(t=typeof h=="function"?h:lt(+h),l):t},l.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:lt(+h),l):r},l.y=function(h){return arguments.length?(e=typeof h=="function"?h:lt(+h),n=null,l):e},l.y0=function(h){return arguments.length?(e=typeof h=="function"?h:lt(+h),l):e},l.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:lt(+h),l):n},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(n)},l.lineX1=function(){return c().x(r).y(e)},l.defined=function(h){return arguments.length?(i=typeof h=="function"?h:lt(!!h),l):i},l.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),l):a},l.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),l):o},l}function $E(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function SE(t){return t}function cv(){var t=SE,e=$E,n=null,r=lt(0),i=lt(_n),o=lt(0);function a(s){var u,l=(s=du(s)).length,c,h,f=0,p=new Array(l),d=new Array(l),g=+r.apply(this,arguments),m=Math.min(_n,Math.max(-_n,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/l,o.apply(this,arguments)),v=x*(m<0?-1:1),b;for(u=0;u<l;++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-l*v)/f:0;u<l;++u,g=y)c=p[u],b=d[c],y=g+(b>0?b*h:0)+v,d[c]={data:s[c],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:lt(+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:lt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:lt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:lt(+s),a):o},a}var fv=mh(gu);function hv(t){this._curve=t}hv.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 mh(t){function e(n){return new hv(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(mh(n)):e()._curve},t}function pv(){return Lo(mu().curve(fv))}function dv(){var t=gh().curve(fv),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(mh(a)):e()._curve},t}function Co(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class gv{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 AE{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 mv(t){return new gv(t,!0)}function yv(t){return new gv(t,!1)}function ME(t){return new AE(t)}function PE(t){return t.source}function DE(t){return t.target}function yu(t){let e=PE,n=DE,r=ph,i=dh,o=null,a=null,s=To(u);function u(){let l;const c=wE.call(arguments),h=e.apply(this,c),f=n.apply(this,c);if(o==null&&(a=t(l=s())),a.lineStart(),c[0]=h,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),l)return a=null,l+""||null}return u.source=function(l){return arguments.length?(e=l,u):e},u.target=function(l){return arguments.length?(n=l,u):n},u.x=function(l){return arguments.length?(r=typeof l=="function"?l:lt(+l),u):r},u.y=function(l){return arguments.length?(i=typeof l=="function"?l:lt(+l),u):i},u.context=function(l){return arguments.length?(l==null?o=a=null:a=t(o=l),u):o},u}function TE(){return yu(mv)}function LE(){return yu(yv)}function CE(){const t=yu(ME);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const EE=xt(3),bv={draw(t,e){const n=xt(e+ri(e/28,.75))*.59436,r=n/2,i=r*EE;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/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},vv={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()}},xv=xt(1/3),RE=xv*2,_v={draw(t,e){const n=xt(e/RE),r=n*xv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},wv={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()}},$v={draw(t,e){const n=xt(e-ri(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Sv={draw(t,e){const n=xt(e),r=-n/2;t.rect(r,r,n,n)}},Av={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()}},kE=.8908130915292852,Mv=oe(xn/10)/oe(7*xn/10),IE=oe(_n/10)*Mv,NE=-sn(_n/10)*Mv,Pv={draw(t,e){const n=xt(e*kE),r=IE*n,i=NE*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()}},yh=xt(3),Dv={draw(t,e){const n=-xt(e/(yh*3));t.moveTo(0,n*2),t.lineTo(-yh*n,-n),t.lineTo(yh*n,-n),t.closePath()}},FE=xt(3),Tv={draw(t,e){const n=xt(e)*.6824,r=n/2,i=n*FE/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},be=-.5,ve=xt(3)/2,bh=1/xt(12),GE=(bh/2+1)*3,Lv={draw(t,e){const n=xt(e/GE),r=n/2,i=n*bh,o=r,a=n*bh+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()}},vh={draw(t,e){const n=xt(e-ri(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Cv=[bu,vv,_v,Sv,Pv,Dv,Lv],zE=[bu,$v,vh,Tv,bv,Av,wv];function OE(t,e){let n=null,r=To(i);t=typeof t=="function"?t:lt(t||bu),e=typeof e=="function"?e:lt(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:lt(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:lt(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}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 UE(t){return new xu(t)}function Ev(t){this._context=t}Ev.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:vu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function BE(t){return new Ev(t)}function Rv(t){this._context=t}Rv.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 YE(t){return new Rv(t)}function kv(t,e){this._basis=new xu(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 HE=function t(e){function n(r){return e===1?new xu(r):new kv(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 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(){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 WE=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){this._context=t,this._k=(1-e)/6}_h.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:_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 qE=function t(e){function n(r){return new _h(r,e)}return n.tension=function(r){return t(+r)},n}(0);function wh(t,e){this._context=t,this._k=(1-e)/6}wh.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 VE=function t(e){function n(r){return new wh(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 l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Iv(t,e){this._context=t,this._alpha=e}Iv.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 jE=function t(e){function n(r){return e?new Iv(r,e):new xh(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: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:$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 XE=function t(e){function n(r){return e?new Nv(r,e):new _h(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Fv(t,e){this._context=t,this._alpha=e}Fv.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 ZE=function t(e){function n(r){return e?new Fv(r,e):new wh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Gv(t){this._context=t}Gv.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 KE(t){return new Gv(t)}function zv(t){return t<0?-1:1}function Ov(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(zv(o)+zv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Uv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Sh(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:Sh(this,this._t0,Uv(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,Sh(this,Uv(this,n=Ov(this,t,e)),n);break;default:Sh(this,this._t0,n=Ov(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Bv(t){this._context=new Yv(t)}(Bv.prototype=Object.create(wu.prototype)).point=function(t,e){wu.prototype.point.call(this,e,t)};function Yv(t){this._context=t}Yv.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 wu(t)}function JE(t){return new Bv(t)}function Hv(t){this._context=t}Hv.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=Wv(t),i=Wv(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 Wv(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 tR(t){return new Hv(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 eR(t){return new $u(t,.5)}function nR(t){return new $u(t,0)}function rR(t){return new $u(t,1)}function ii(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 oi(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function iR(t,e){return t[e]}function oR(t){const e=[];return e.key=t,e}function aR(){var t=lt([]),e=oi,n=ii,r=iR;function i(o){var a=Array.from(t.apply(this,arguments),oR),s,u=a.length,l=-1,c;for(const h of o)for(s=0,++l;s<u;++s)(a[s][l]=[0,+r(h,a[s].key,l,o)]).data=h;for(s=0,c=du(e(a));s<u;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:lt(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:lt(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?oi:typeof o=="function"?o:lt(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ii,i):n},i}function sR(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}ii(t,e)}}function uR(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,l=t[e[0]].length;r<l;++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 lR(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}ii(t,e)}}function cR(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,l=0;s<a;++s){for(var c=t[e[s]],h=c[r][1]||0,f=c[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,l+=p*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=l/u)}i[r-1][1]+=i[r-1][0]=n,ii(t,e)}}function qv(t){var e=t.map(fR);return oi(t).sort(function(n,r){return e[n]-e[r]})}function fR(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 Vv(t){var e=t.map(jv);return oi(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 hR(t){return Vv(t).reverse()}function pR(t){var e=t.length,n,r,i=t.map(jv),o=qv(t),a=0,s=0,u=[],l=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],l.push(r));return l.reverse().concat(u)}function dR(t){return oi(t).reverse()}const Su=t=>()=>t;function gR(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);Xv.prototype=He.prototype;function Xv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Au;return t.__zoom}function Ah(t){t.stopImmediatePropagation()}function Eo(t){t.preventDefault(),t.stopImmediatePropagation()}function mR(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function yR(){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 Zv(){return this.__zoom||Au}function bR(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function vR(){return navigator.maxTouchPoints||"ontouchstart"in this}function xR(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 Kv(){var t=mR,e=yR,n=xR,r=bR,i=vR,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=P0,l=In("start","zoom","end"),c,h,f,p=500,d=150,g=0,m=10;function y(A){A.property("__zoom",Zv).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",R).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,L,M,G){var U=A.selection?A.selection():A;U.property("__zoom",Zv),A!==U?$(A,L,M,G):U.interrupt().each(function(){_(this,arguments).event(G).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},y.scaleBy=function(A,L,M,G){y.scaleTo(A,function(){var U=this.__zoom.k,E=typeof L=="function"?L.apply(this,arguments):L;return U*E},M,G)},y.scaleTo=function(A,L,M,G){y.transform(A,function(){var U=e.apply(this,arguments),E=this.__zoom,k=M==null?b(U):typeof M=="function"?M.apply(this,arguments):M,C=E.invert(k),F=typeof L=="function"?L.apply(this,arguments):L;return n(v(x(E,F),k,C),U,a)},M,G)},y.translateBy=function(A,L,M,G){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,G)},y.translateTo=function(A,L,M,G,U){y.transform(A,function(){var E=e.apply(this,arguments),k=this.__zoom,C=G==null?b(E):typeof G=="function"?G.apply(this,arguments):G;return n(Au.translate(C[0],C[1]).scale(k.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof M=="function"?-M.apply(this,arguments):-M),E,a)},G,U)};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 G=L[0]-M[0]*A.k,U=L[1]-M[1]*A.k;return G===A.x&&U===A.y?A:new He(A.k,G,U)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function $(A,L,M,G){A.on("start.zoom",function(){_(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(G).end()}).tween("zoom",function(){var U=this,E=arguments,k=_(U,E).event(G),C=e.apply(U,E),F=M==null?b(C):typeof M=="function"?M.apply(U,E):M,V=Math.max(C[1][0]-C[0][0],C[1][1]-C[0][1]),Q=U.__zoom,N=typeof L=="function"?L.apply(U,E):L,j=u(Q.invert(F).concat(V/Q.k),N.invert(F).concat(V/N.k));return function(q){if(q===1)q=N;else{var Z=j(q),W=V/Z[2];q=new He(W,F[0]-Z[0]*W,F[1]-Z[1]*W)}k.zoom(null,q)}})}function _(A,L,M){return!M&&A.__zooming||new P(A,L)}function P(A,L){this.that=A,this.args=L,this.active=0,this.sourceEvent=null,this.extent=e.apply(A,L),this.taps=0}P.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=X(this.that).datum();l.call(A,this.that,new gR(A,{sourceEvent:this.sourceEvent,target:y,type:A,transform:this.that.__zoom,dispatch:l}),L)}};function T(A,...L){if(!t.apply(this,arguments))return;var M=_(this,L).event(A),G=this.__zoom,U=Math.max(o[0],Math.min(o[1],G.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]=G.invert(M.mouse[0]=E)),clearTimeout(M.wheel);else{if(G.k===U)return;M.mouse=[E,G.invert(E)],Yn(this),M.start()}Eo(A),M.wheel=setTimeout(k,d),M.zoom("mouse",n(v(x(G,U),M.mouse[0],M.mouse[1]),M.extent,a));function k(){M.wheel=null,M.end()}}function w(A,...L){if(f||!t.apply(this,arguments))return;var M=A.currentTarget,G=_(this,L,!0).event(A),U=X(A.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",V,!0),E=ue(A,M),k=A.clientX,C=A.clientY;Da(A.view),Ah(A),G.mouse=[E,this.__zoom.invert(E)],Yn(this),G.start();function F(Q){if(Eo(Q),!G.moved){var N=Q.clientX-k,j=Q.clientY-C;G.moved=N*N+j*j>g}G.event(Q).zoom("mouse",n(v(G.that.__zoom,G.mouse[0]=ue(Q,M),G.mouse[1]),G.extent,a))}function V(Q){U.on("mousemove.zoom mouseup.zoom",null),Ta(Q.view,G.moved),Eo(Q),G.event(Q).end()}}function D(A,...L){if(t.apply(this,arguments)){var M=this.__zoom,G=ue(A.changedTouches?A.changedTouches[0]:A,this),U=M.invert(G),E=M.k*(A.shiftKey?.5:2),k=n(v(x(M,E),G,U),e.apply(this,L),a);Eo(A),s>0?X(this).transition().duration(s).call($,k,G,A):X(this).call(y.transform,k,G,A)}}function S(A,...L){if(t.apply(this,arguments)){var M=A.touches,G=M.length,U=_(this,L,A.changedTouches.length===G).event(A),E,k,C,F;for(Ah(A),k=0;k<G;++k)C=M[k],F=ue(C,this),F=[F,this.__zoom.invert(F),C.identifier],U.touch0?!U.touch1&&U.touch0[2]!==F[2]&&(U.touch1=F,U.taps=0):(U.touch0=F,E=!0,U.taps=1+!!c);c&&(c=clearTimeout(c)),E&&(U.taps<2&&(h=F[0],c=setTimeout(function(){c=null},p)),Yn(this),U.start())}}function z(A,...L){if(this.__zooming){var M=_(this,L).event(A),G=A.changedTouches,U=G.length,E,k,C,F;for(Eo(A),E=0;E<U;++E)k=G[E],C=ue(k,this),M.touch0&&M.touch0[2]===k.identifier?M.touch0[0]=C:M.touch1&&M.touch1[2]===k.identifier&&(M.touch1[0]=C);if(k=M.that.__zoom,M.touch1){var V=M.touch0[0],Q=M.touch0[1],N=M.touch1[0],j=M.touch1[1],q=(q=N[0]-V[0])*q+(q=N[1]-V[1])*q,Z=(Z=j[0]-Q[0])*Z+(Z=j[1]-Q[1])*Z;k=x(k,Math.sqrt(q/Z)),C=[(V[0]+N[0])/2,(V[1]+N[1])/2],F=[(Q[0]+j[0])/2,(Q[1]+j[1])/2]}else if(M.touch0)C=M.touch0[0],F=M.touch0[1];else return;M.zoom("touch",n(v(k,C,F),M.extent,a))}}function R(A,...L){if(this.__zooming){var M=_(this,L).event(A),G=A.changedTouches,U=G.length,E,k;for(Ah(A),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),E=0;E<U;++E)k=G[E],M.touch0&&M.touch0[2]===k.identifier?delete M.touch0:M.touch1&&M.touch1[2]===k.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&&(k=ue(k,this),Math.hypot(h[0]-k[0],h[1]-k[1])<m)){var C=X(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=l.on.apply(l,arguments);return A===l?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 Mh=Object.freeze(Object.defineProperty({__proto__:null,Adder:Tt,Delaunay:Ic,FormatSpecifier:us,InternMap:Pi,InternSet:En,Node:Jn,Path:ji,Voronoi:gm,ZoomTransform:He,active:S4,arc:pu,area:gh,areaRadial:dv,ascending:wt,autoType:j7,axisBottom:m5,axisLeft:Tg,axisRight:g5,axisTop:Dg,bin:bg,bisect:Cn,bisectCenter:f3,bisectLeft:c3,bisectRight:rg,bisector:da,blob:K7,blur:h3,blur2:ig,blurImage:p3,brush:F4,brushSelection:k4,brushX:I4,brushY:N4,buffer:J7,chord:z4,chordDirected:U4,chordTranspose:O4,cluster:fT,color:pn,contourDensity:p7,contours:Lc,count:ma,create:K6,creator:Aa,cross:x3,csv:nP,csvFormat:F7,csvFormatBody:G7,csvFormatRow:O7,csvFormatRows:z7,csvFormatValue:U7,csvParse:vm,csvParseRows:N7,cubehelix:Me,cumsum:_3,curveBasis:UE,curveBasisClosed:BE,curveBasisOpen:YE,curveBumpX:mv,curveBumpY:yv,curveBundle:HE,curveCardinal:WE,curveCardinalClosed:qE,curveCardinalOpen:VE,curveCatmullRom:jE,curveCatmullRomClosed:XE,curveCatmullRomOpen:ZE,curveLinear:gu,curveLinearClosed:KE,curveMonotoneX:QE,curveMonotoneY:JE,curveNatural:tR,curveStep:eR,curveStepAfter:rR,curveStepBefore:nR,descending:eg,deviation:sg,difference:r5,disjoint:i5,dispatch:In,drag:Ug,dragDisable:Da,dragEnable:Ta,dsv:eP,dsvFormat:is,easeBack:X0,easeBackIn:m4,easeBackInOut:X0,easeBackOut:y4,easeBounce:Wi,easeBounceIn:d4,easeBounceInOut:g4,easeBounceOut:Wi,easeCircle:j0,easeCircleIn:i4,easeCircleInOut:j0,easeCircleOut:o4,easeCubic:Hi,easeCubicIn:ZM,easeCubicInOut:Hi,easeCubicOut:KM,easeElastic:qi,easeElasticIn:b4,easeElasticInOut:v4,easeElasticOut:qi,easeExp:V0,easeExpIn:n4,easeExpInOut:V0,easeExpOut:r4,easeLinear:VM,easePoly:Y0,easePolyIn:QM,easePolyInOut:Y0,easePolyOut:JM,easeQuad:B0,easeQuadIn:jM,easeQuadInOut:B0,easeQuadOut:XM,easeSin:q0,easeSinIn:t4,easeSinInOut:q0,easeSinOut:e4,every:K3,extent:Mi,fcumsum:$3,filter:J3,flatGroup:S3,flatRollup:A3,forceCenter:cP,forceCollide:Sm,forceLink:LP,forceManyBody:Dm,forceRadial:GP,forceSimulation:Pm,forceX:Tm,forceY:Lm,get format(){return Qi},formatDefaultLocale:Gm,formatLocale:Fm,get formatPrefix(){return Uc},formatSpecifier:Br,fsum:w3,geoAlbers:Q1,geoAlbersUsa:YD,geoArea:jP,geoAzimuthalEqualArea:HD,geoAzimuthalEqualAreaRaw:Pf,geoAzimuthalEquidistant:WD,geoAzimuthalEquidistantRaw:Df,geoBounds:QP,geoCentroid:iD,geoCircle:oD,geoClipAntimeridian:af,geoClipCircle:x1,geoClipExtent:hD,geoClipRectangle:Ls,geoConicConformal:VD,geoConicConformalRaw:ey,geoConicEqualArea:Bs,geoConicEqualAreaRaw:K1,geoConicEquidistant:XD,geoConicEquidistantRaw:ny,geoContains:vD,geoDistance:Rs,geoEqualEarth:KD,geoEqualEarthRaw:Tf,geoEquirectangular:jD,geoEquirectangularRaw:go,geoGnomonic:QD,geoGnomonicRaw:Lf,geoGraticule:L1,geoGraticule10:xD,geoIdentity:JD,geoInterpolate:_D,geoLength:_1,geoMercator:qD,geoMercatorRaw:po,geoNaturalEarth1:tT,geoNaturalEarth1Raw:Cf,geoOrthographic:eT,geoOrthographicRaw:Ef,geoPath:RD,geoProjection:Ue,geoProjectionMutator:Af,geoRotation:h1,geoStereographic:nT,geoStereographicRaw:Rf,geoStream:De,geoTransform:kD,geoTransverseMercator:rT,geoTransverseMercatorRaw:kf,gray:y8,greatest:vg,greatestIndex:W3,group:fg,groupSort:D3,groups:hg,hcl:Fa,hierarchy:Ws,histogram:bg,hsl:Ra,html:uP,image:iP,index:M3,indexes:P3,interpolate:Ve,interpolateArray:$8,interpolateBasis:h0,interpolateBasisClosed:p0,interpolateBlues:XC,interpolateBrBG:DC,interpolateBuGn:FC,interpolateBuPu:GC,interpolateCividis:eE,interpolateCool:iE,interpolateCubehelix:G8,interpolateCubehelixDefault:nE,interpolateCubehelixLong:Ya,interpolateDate:v0,interpolateDiscrete:M8,interpolateGnBu:zC,interpolateGreens:ZC,interpolateGreys:KC,interpolateHcl:N8,interpolateHclLong:F8,interpolateHsl:R8,interpolateHslLong:k8,interpolateHue:P8,interpolateInferno:hE,interpolateLab:I8,interpolateMagma:fE,interpolateNumber:pe,interpolateNumberArray:ec,interpolateObject:x0,interpolateOrRd:OC,interpolateOranges:tE,interpolatePRGn:TC,interpolatePiYG:LC,interpolatePlasma:pE,interpolatePuBu:BC,interpolatePuBuGn:UC,interpolatePuOr:CC,interpolatePuRd:YC,interpolatePurples:QC,interpolateRainbow:oE,interpolateRdBu:EC,interpolateRdGy:RC,interpolateRdPu:HC,interpolateRdYlBu:kC,interpolateRdYlGn:IC,interpolateReds:JC,interpolateRgb:Fi,interpolateRgbBasis:m0,interpolateRgbBasisClosed:w8,interpolateRound:Ua,interpolateSinebow:uE,interpolateSpectral:NC,interpolateString:ic,interpolateTransformCss:S0,interpolateTransformSvg:A0,interpolateTurbo:lE,interpolateViridis:cE,interpolateWarm:rE,interpolateYlGn:qC,interpolateYlGnBu:WC,interpolateYlOrBr:VC,interpolateYlOrRd:jC,interpolateZoom:P0,interrupt:Yn,intersection:o5,interval:Y8,isoFormat:sC,isoParse:cC,json:aP,lab:Na,lch:b8,least:H3,leastIndex:wg,line:mu,lineRadial:pv,link:yu,linkHorizontal:TE,linkRadial:CE,linkVertical:LE,local:zg,map:t5,matcher:Ol,max:Di,maxIndex:Rl,mean:N3,median:F3,medianIndex:G3,merge:Il,min:va,minIndex:kl,mode:O3,namespace:Ei,namespaces:Gl,nice:Cl,now:Bi,pack:UT,packEnclose:IT,packSiblings:zT,pairs:U3,partition:BT,path:Tc,pathRound:H4,permute:yg,pie:cv,piecewise:C0,pointRadial:Co,pointer:ue,pointers:J6,polygonArea:r9,polygonCentroid:i9,polygonContains:u9,polygonHull:s9,polygonLength:l9,precisionFixed:zm,precisionPrefix:Om,precisionRound:Um,quadtree:as,quantile:Li,quantileIndex:_g,quantileSorted:xg,quantize:z8,quickselect:xa,radialArea:dv,radialLine:pv,randomBates:p9,randomBernoulli:m9,randomBeta:Sy,randomBinomial:Ay,randomCauchy:b9,randomExponential:d9,randomGamma:Hf,randomGeometric:$y,randomInt:f9,randomIrwinHall:wy,randomLcg:$9,randomLogNormal:h9,randomLogistic:v9,randomNormal:Yf,randomPareto:g9,randomPoisson:x9,randomUniform:c9,randomWeibull:y9,range:fn,rank:Y3,reduce:e5,reverse:n5,rgb:Lr,ribbon:Q4,ribbonArrow:J4,rollup:dg,rollups:gg,scaleBand:Vf,scaleDiverging:Cb,scaleDivergingLog:Eb,scaleDivergingPow:hh,scaleDivergingSqrt:mC,scaleDivergingSymlog:Rb,scaleIdentity:Ly,scaleImplicit:Wf,scaleLinear:Kf,scaleLog:Iy,scaleOrdinal:qf,scalePoint:jf,scalePow:Kr,scaleQuantile:By,scaleQuantize:Yy,scaleRadial:Uy,scaleSequential:Pb,scaleSequentialLog:Db,scaleSequentialPow:fh,scaleSequentialQuantile:Lb,scaleSequentialSqrt:gC,scaleSequentialSymlog:Tb,scaleSqrt:I9,scaleSymlog:Gy,scaleThreshold:Hy,scaleTime:pC,scaleUtc:dC,scan:q3,schemeAccent:bC,schemeBlues:ev,schemeBrBG:kb,schemeBuGn:Yb,schemeBuPu:Hb,schemeCategory10:yC,schemeDark2:vC,schemeGnBu:Wb,schemeGreens:nv,schemeGreys:rv,schemeObservable10:xC,schemeOrRd:qb,schemeOranges:av,schemePRGn:Ib,schemePaired:_C,schemePastel1:wC,schemePastel2:$C,schemePiYG:Nb,schemePuBu:jb,schemePuBuGn:Vb,schemePuOr:Fb,schemePuRd:Xb,schemePurples:iv,schemeRdBu:Gb,schemeRdGy:zb,schemeRdPu:Zb,schemeRdYlBu:Ob,schemeRdYlGn:Ub,schemeReds:ov,schemeSet1:SC,schemeSet2:AC,schemeSet3:MC,schemeSpectral:Bb,schemeTableau10:PC,schemeYlGn:Qb,schemeYlGnBu:Kb,schemeYlOrBr:Jb,schemeYlOrRd:tv,select:X,selectAll:t8,selection:Fn,selector:Ma,selectorAll:zl,shuffle:V3,shuffler:$g,some:Q3,sort:Dl,stack:aR,stackOffsetDiverging:uR,stackOffsetExpand:sR,stackOffsetNone:ii,stackOffsetSilhouette:lR,stackOffsetWiggle:cR,stackOrderAppearance:qv,stackOrderAscending:Vv,stackOrderDescending:hR,stackOrderInsideOut:pR,stackOrderNone:oi,stackOrderReverse:dR,stratify:qT,style:Nn,subset:s5,sum:j3,superset:Ag,svg:lP,symbol:OE,symbolAsterisk:bv,symbolCircle:bu,symbolCross:vv,symbolDiamond:_v,symbolDiamond2:wv,symbolPlus:$v,symbolSquare:Sv,symbolSquare2:Av,symbolStar:Pv,symbolTimes:vh,symbolTriangle:Dv,symbolTriangle2:Tv,symbolWye:Lv,symbolX:vh,symbols:Cv,symbolsFill:Cv,symbolsStroke:zE,text:os,thresholdFreedmanDiaconis:k3,thresholdScott:I3,thresholdSturges:El,tickFormat:Ty,tickIncrement:kn,tickStep:ba,ticks:Rn,timeDay:Jr,timeDays:U9,get timeFormat(){return uh},timeFormatDefaultLocale:Ab,timeFormatLocale:lb,timeFriday:Zy,timeFridays:j9,timeHour:eu,timeHours:z9,timeInterval:Dt,timeMillisecond:Qr,timeMilliseconds:Wy,timeMinute:Js,timeMinutes:F9,timeMonday:So,timeMondays:H9,timeMonth:ru,timeMonths:nL,get timeParse(){return Sb},timeSaturday:Ky,timeSaturdays:X9,timeSecond:an,timeSeconds:Vy,timeSunday:ti,timeSundays:Qy,timeThursday:nr,timeThursdays:V9,timeTickInterval:ub,timeTicks:sb,timeTuesday:jy,timeTuesdays:W9,timeWednesday:Xy,timeWednesdays:q9,timeWeek:ti,timeWeeks:Qy,timeYear:Be,timeYears:iL,timeout:sc,timer:Va,timerFlush:k0,transition:O0,transpose:Sg,tree:JT,treemap:xy,treemapBinary:t9,treemapDice:_o,treemapResquarify:n9,treemapSlice:Zs,treemapSliceDice:e9,treemapSquarify:Bf,tsv:rP,tsvFormat:Y7,tsvFormatBody:H7,tsvFormatRow:q7,tsvFormatRows:W7,tsvFormatValue:V7,tsvParse:xm,tsvParseRows:B7,union:u5,unixDay:oh,unixDays:Y9,utcDay:$o,utcDays:B9,get utcFormat(){return ou},utcFriday:eb,utcFridays:tL,utcHour:nu,utcHours:O9,utcMillisecond:Qr,utcMilliseconds:Wy,utcMinute:tu,utcMinutes:G9,utcMonday:Ao,utcMondays:Z9,utcMonth:iu,utcMonths:rL,get utcParse(){return lh},utcSaturday:nb,utcSaturdays:eL,utcSecond:an,utcSeconds:Vy,utcSunday:ei,utcSundays:rb,utcThursday:ir,utcThursdays:J9,utcTickInterval:ab,utcTicks:ob,utcTuesday:Jy,utcTuesdays:K9,utcWednesday:tb,utcWednesdays:Q9,utcWeek:ei,utcWeeks:rb,utcYear:Ye,utcYears:oL,variance:ag,window:Ul,xml:sP,zip:Z3,zoom:Kv,zoomIdentity:Au,zoomTransform:Xv},Symbol.toStringTag,{value:"Module"}));function Qv(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function _R(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 Ro(t){return t.substring(0,4)!=="ease"?Hi:Mh[t]??Hi}function Mu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Kf().domain([0,1]).range([0,t/2]),a=o(n);return pu().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Ph=(t,e)=>e instanceof Function?e(t):Qi(e)(t);function Jv(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 wR(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 $R(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return wR(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 Pu({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 at(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 at(t,e,r)}const ai=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=at(e,"series"),u=at(e,"axes"),l=at(e,"graphic"),c=r.pipe(O((d,g)=>t.selectAll(`g.${s}`).data(d,m=>m).join(m=>m.append("g").classed(s,!0).each((y,x,v)=>{X(v[x]).selectAll(`g.${u}`).data([x]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each(($,_,P)=>{X(P[_]).selectAll("defs").data([_]).join("defs"),X(P[_]).selectAll("g").data([_]).join("g").classed(l,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),_t(1));B({seriesSelection:c,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:c,gridAxesTransform:o}).pipe(Y(async d=>d),O(d=>d.seriesSelection.select(`g.${u}`).style("transform",d.gridAxesTransform.value)),_t(1)),f=h.pipe(O(d=>d.select("defs")),_t(1)),p=B({axesSelection:h,gridGraphicTransform:a}).pipe(Y(async d=>d),O(d=>{const g=d.axesSelection.select(`g.${l}`);return g.transition().duration(50).style("transform",d.gridGraphicTransform.value),g}),_t(1));return{seriesSelection$:c,axesSelection$:h,defsSelection$:f,graphicGSelection$:p}},Dh=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new rt,o=new ft(a=>{B({dataFormatter:t,computedData:n}).pipe(I(i),Y(async s=>s)).subscribe(s=>{const l=s.computedData[0]?s.computedData[0].length-1:0,c=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"?l+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>=c&&g<=h);a.next(p)})});return new ft(a=>{B({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(I(i),Y(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",l=a3({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),c=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=c(f),d=l(p);return{groupIndex:d,groupLabel:s.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})};function SR(t="curveLinear"){return mu().x(e=>e.axisX).y(e=>e.axisY).curve(Mh[t])}function AR(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 MR({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 PR({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?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function DR({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)=>{X(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(Ro(r)).tween("tween",(l,c,h)=>f=>{const p=l.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 t2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new rt,v=$n(t,"clipPath-box"),b=at(t,"path"),{seriesSelection$:$,axesSelection$:_,defsSelection$:P,graphicGSelection$:T}=ai({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),w=new ft(M=>{const G=l.pipe(I(x)).subscribe(U=>{if(!U)return;const E=SR(U.lineCurve);M.next(E)});return()=>{G.unsubscribe()}}),D=h.pipe(O(M=>M.transitionDuration),tt()),S=h.pipe(O(M=>M.transitionEase),tt());B({defsSelection:P,seriesLabels:a,axisSize:d,transitionDuration:D,transitionEase:S}).pipe(I(x),Y(async M=>M)).subscribe(M=>{const U=[{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})));DR({defsSelection:M.defsSelection,clipPathData:U,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const z=n.pipe(O(M=>{const G=new Map;return M.flat().forEach(U=>G.set(U.id,U)),G})),R=Dh({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),A=h.pipe(I(x),O(M=>M.highlightTarget),tt()),L=B({graphicGSelection:T,visibleComputedLayoutData:o,linePath:w,params:l}).pipe(I(x),Y(async M=>M),O(M=>{let G=[];return M.graphicGSelection.each((U,E,k)=>{const C=AR(M.visibleComputedLayoutData[E]??[]);G[E]=MR({selection:X(k[E]),pathClassName:b,linePath:M.linePath,segmentData:C,params:M.params})}),G}));return B({pathSelectionArr:L,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:A,gridGroupPositionFn:R}).pipe(I(x),Y(async M=>M)).subscribe(M=>{M.pathSelectionArr.forEach(G=>{G.on("mouseover",(U,E)=>{U.stopPropagation();const k=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:F}=M.gridGroupPositionFn(U),N=M.GroupDataMap.get(F).find(j=>j.seriesLabel===k)??E[0];y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:N,gridIndex:N.gridIndex,series:M.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:M.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:U,data:M.computedData})}).on("mousemove",(U,E)=>{U.stopPropagation();const k=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:F}=M.gridGroupPositionFn(U),N=M.GroupDataMap.get(F).find(j=>j.seriesLabel===k)??E[0];y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:N,gridIndex:N.gridIndex,series:M.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:M.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:U,data:M.computedData})}).on("mouseout",(U,E)=>{U.stopPropagation();const k=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:F}=M.gridGroupPositionFn(U),N=M.GroupDataMap.get(F).find(j=>j.seriesLabel===k)??E[0];y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:N,gridIndex:N.gridIndex,series:M.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:M.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:U,data:M.computedData})}).on("click",(U,E)=>{U.stopPropagation();const k=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:F}=M.gridGroupPositionFn(U),N=M.GroupDataMap.get(F).find(j=>j.seriesLabel===k)??E[0];y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:N,gridIndex:N.gridIndex,series:M.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:M.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:U,data:M.computedData})})})}),h.pipe(I(x),hr(M=>M.highlightTarget==="series"),Y(M=>B({graphicGSelection:T,gridHighlight:g,DataMap:z,fullChartParams:h}).pipe(I(x),Y(async G=>G)))).subscribe(M=>{const G=M.gridHighlight[0]?M.gridHighlight[0].seriesLabel:null;PR({selection:M.graphicGSelection,seriesLabel:G,fullChartParams:M.fullChartParams})}),()=>{x.next(void 0)}},e2="Lines",TR=se(e2,sr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t2(e2,{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 LR(t="curveLinear",e){return gh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(Mh[t])}function CR(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 ER({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 RR({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?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function kR({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 l(h){return h.map(c).join(t)}function c(h){return h==null?"":h instanceof Date?OD(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:l,formatValue:c}}var Xn=as(","),wm=Xn.parse,UD=Xn.parseRows,BD=Xn.format,YD=Xn.formatBody,HD=Xn.formatRows,WD=Xn.formatRow,VD=Xn.formatValue,Zn=as(" "),$m=Zn.parse,jD=Zn.parseRows,qD=Zn.format,XD=Zn.formatBody,ZD=Zn.formatRows,KD=Zn.formatRow,QD=Zn.formatValue;function JD(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})?)?$/))tP&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const tP=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function eP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function nP(t,e){return fetch(t,e).then(eP)}function rP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function iP(t,e){return fetch(t,e).then(rP)}function oP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function ss(t,e){return fetch(t,e).then(oP)}function Sm(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),ss(e,n).then(function(i){return t(i,r)})}}function aP(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=as(t);return ss(e,n).then(function(o){return i.parse(o,r)})}var sP=Sm(wm),uP=Sm($m);function lP(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 cP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function fP(t,e){return fetch(t,e).then(cP)}function Uc(t){return(e,n)=>ss(e,n).then(r=>new DOMParser().parseFromString(r,t))}const hP=Uc("application/xml");var pP=Uc("text/html"),dP=Uc("image/svg+xml");function gP(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,l=0;for(o=0;o<a;++o)s=n[o],u+=s.x,l+=s.y;for(u=(u/a-t)*r,l=(l/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=l}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 mP(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Am(this.cover(e,n),e,n,t)}function Am(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,l=t._x1,c=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+l)/2))?s=h:l=h,(m=n>=(f=(u+c)/2))?u=f:c=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+l)/2))?s=h:l=h,(m=n>=(f=(u+c)/2))?u=f:c=f;while((y=m<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,t}function yP(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,l=1/0,c=-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>c&&(c=i),o<l&&(l=o),o>h&&(h=o));if(u>c||l>h)return this;for(this.cover(u,l).cover(c,h),n=0;n<r;++n)Am(this,a[n],s[n],t[n]);return this}function bP(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,l;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,u=new Array(4),u[l]=s,s=u,a*=2,l){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 vP(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function xP(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 Vt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function _P(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,l,c=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new Vt(p,i,o,c,h)),n==null?n=1/0:(i=t-n,o=e-n,c=t+n,h=e+n,n*=n);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>c||(s=d.y0)>h||(u=d.x1)<i||(l=d.y1)<o))if(p.length){var m=(a+u)/2,y=(s+l)/2;f.push(new Vt(p[3],m,y,u,l),new Vt(p[2],a,y,m,l),new Vt(p[1],m,s,u,y),new Vt(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 w=Math.sqrt(n=b);i=t-w,o=e-w,c=t+w,h=e+w,r=p.data}}return r}function wP(t){if(isNaN(c=+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,l=this._y1,c,h,f,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=c>=(f=(a+u)/2))?a=f:u=f,(g=h>=(p=(s+l)/2))?s=p:l=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 $P(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function SP(){return this._root}function AP(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function MP(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Vt(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 l=(o+s)/2,c=(a+u)/2;(i=r[3])&&e.push(new Vt(i,l,c,s,u)),(i=r[2])&&e.push(new Vt(i,o,c,l,u)),(i=r[1])&&e.push(new Vt(i,l,a,s,c)),(i=r[0])&&e.push(new Vt(i,o,a,l,c))}return this}function DP(t){var e=[],n=[],r;for(this._root&&e.push(new Vt(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,l=r.y1,c=(a+u)/2,h=(s+l)/2;(o=i[0])&&e.push(new Vt(o,a,s,c,h)),(o=i[1])&&e.push(new Vt(o,c,s,u,h)),(o=i[2])&&e.push(new Vt(o,a,h,c,l)),(o=i[3])&&e.push(new Vt(o,c,h,u,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function PP(t){return t[0]}function TP(t){return arguments.length?(this._x=t,this):this._x}function LP(t){return t[1]}function CP(t){return arguments.length?(this._y=t,this):this._y}function us(t,e,n){var r=new Bc(e??PP,n??LP,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Bc(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 Mm(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var jt=us.prototype=Bc.prototype;jt.copy=function(){var t=new Bc(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=Mm(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]=Mm(r));return t},jt.add=mP,jt.addAll=yP,jt.cover=bP,jt.data=vP,jt.extent=xP,jt.find=_P,jt.remove=wP,jt.removeAll=$P,jt.root=SP,jt.size=AP,jt.visit=MP,jt.visitAfter=DP,jt.x=TP,jt.y=CP;function Lt(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function EP(t){return t.x+t.vx}function kP(t){return t.y+t.vy}function Dm(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var l,c=e.length,h,f,p,d,g,m,y=0;y<o;++y)for(h=us(e,EP,kP).visitAfter(s),l=0;l<c;++l)f=e[l],g=n[f.index],m=g*g,p=f.x+f.vx,d=f.y+f.vy,h.visit(x);function x(v,b,w,D,T){var $=v.data,_=v.r,P=g+_;if($){if($.index>f.index){var S=p-$.x-$.vx,G=d-$.y-$.vy,k=S*S+G*G;k<P*P&&(S===0&&(S=mn(r),k+=S*S),G===0&&(G=mn(r),k+=G*G),k=(P-(k=Math.sqrt(k)))/k*i,f.vx+=(S*=k)*(P=(_*=_)/(m+_)),f.vy+=(G*=k)*P,$.vx-=S*(P=1-P),$.vy-=G*P)}return}return b>p+P||D<p-P||w>d+P||T<d-P}}function s(l){if(l.data)return l.r=n[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(e){var l,c=e.length,h;for(n=new Array(c),l=0;l<c;++l)h=e[l],n[h.index]=+t(h,l,e)}}return a.initialize=function(l,c){e=l,r=c,u()},a.iterations=function(l){return arguments.length?(o=+l,a):o},a.strength=function(l){return arguments.length?(i=+l,a):i},a.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),a):t},a}function RP(t){return t.index}function Pm(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function IP(t){var e=RP,n=h,r,i=Lt(30),o,a,s,u,l,c=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<c;++y)for(var v=0,b,w,D,T,$,_,P;v<x;++v)b=t[v],w=b.source,D=b.target,T=D.x+D.vx-w.x-w.vx||mn(l),$=D.y+D.vy-w.y-w.vy||mn(l),_=Math.sqrt(T*T+$*$),_=(_-o[v])/_*m*r[v],T*=_,$*=_,D.vx-=T*(P=u[v]),D.vy-=$*P,w.vx+=T*(P=1-P),w.vy+=$*P}function p(){if(a){var m,y=a.length,x=t.length,v=new Map(a.map((w,D)=>[e(w,D,a),w])),b;for(m=0,s=new Array(y);m<x;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=Pm(v,b.source)),typeof b.target!="object"&&(b.target=Pm(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,l=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?(c=+m,f):c},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 NP=1664525,FP=1013904223,Tm=4294967296;function GP(){let t=1;return()=>(t=(NP*t+FP)%Tm)/Tm}function zP(t){return t.x}function OP(t){return t.y}var UP=10,BP=Math.PI*(3-Math.sqrt(5));function Lm(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Xa(h),l=Nn("tick","end"),c=GP();t==null&&(t=[]);function h(){f(),l.call("tick",e),n<r&&(u.stop(),l.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=UP*Math.sqrt(.5+g),v=g*BP;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,c),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?(c=g,s.forEach(d),e):c},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,w,D,T,$;for(y==null?y=1/0:y*=y,x=0;x<v;++x)T=t[x],b=g-T.x,w=m-T.y,D=b*b+w*w,D<y&&($=T,y=D);return $},on:function(g,m){return arguments.length>1?(l.on(g,m),e):l.on(g)}}}function Cm(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function l(p){var d,g=t.length,m=us(t,zP,OP).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(f)}function c(){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 l.initialize=function(p,d){t=p,n=d,c()},l.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Lt(+p),c(),l):i},l.distanceMin=function(p){return arguments.length?(a=p*p,l):Math.sqrt(a)},l.distanceMax=function(p){return arguments.length?(s=p*p,l):Math.sqrt(s)},l.theta=function(p){return arguments.length?(u=p*p,l):Math.sqrt(u)},l}function YP(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(l){for(var c=0,h=r.length;c<h;++c){var f=r[c],p=f.x-e||1e-6,d=f.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[c]-g)*o[c]*l/g;f.vx+=p*m,f.vy+=d*m}}function u(){if(r){var l,c=r.length;for(o=new Array(c),a=new Array(c),l=0;l<c;++l)a[l]=+t(r[l],l,r),o[l]=isNaN(a[l])?0:+i(r[l],l,r)}}return s.initialize=function(l){r=l,u()},s.strength=function(l){return arguments.length?(i=typeof l=="function"?l:Lt(+l),u(),s):i},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),s):t},s.x=function(l){return arguments.length?(e=+l,s):e},s.y=function(l){return arguments.length?(n=+l,s):n},s}function Em(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vx+=(i[u]-c.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 km(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vy+=(i[u]-c.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 HP(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ls(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 Ur(t){return t=ls(Math.abs(t)),t?t[1]:NaN}function WP(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 VP(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var jP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Br(t){if(!(e=jP.exec(t)))throw new Error("invalid format: "+t);var e;return new cs({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]})}Br.prototype=cs.prototype;function cs(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+""}cs.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 qP(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 Rm;function XP(t,e){var n=ls(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Rm=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")+ls(t,Math.max(0,e+o-1))[0]}function Im(t,e){var n=ls(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 Nm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:HP,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)=>Im(t*100,e),r:Im,s:XP,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Fm(t){return t}var Gm=Array.prototype.map,zm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Om(t){var e=t.grouping===void 0||t.thousands===void 0?Fm:WP(Gm.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?Fm:VP(Gm.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 l(h){h=Br(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,w=h.type;w==="n"?(x=!0,w="g"):Nm[w]||(v===void 0&&(v=12),b=!0,w="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var D=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T=g==="$"?r:/[%p]/.test(w)?a:"",$=Nm[w],_=/[defgprs%]/.test(w);v=v===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function P(S){var G=D,k=T,A,L,M;if(w==="c")k=$(S)+k,S="";else{S=+S;var z=S<0||1/S<0;if(S=isNaN(S)?u:$(Math.abs(S),v),b&&(S=qP(S)),z&&+S==0&&d!=="+"&&(z=!1),G=(z?d==="("?d:s:d==="-"||d==="("?"":d)+G,k=(w==="s"?zm[8+Rm/3]:"")+k+(z&&d==="("?")":""),_){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 U=G.length+S.length+k.length,E=U<y?new Array(y-U+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-k.length:1/0),E=""),p){case"<":S=G+S+k+E;break;case"=":S=G+E+S+k;break;case"^":S=E.slice(0,U=E.length>>1)+G+S+k+E.slice(U);break;default:S=E+G+S+k;break}return o(S)}return P.toString=function(){return h+""},P}function c(h,f){var p=l((h=Br(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Ur(f)/3)))*3,g=Math.pow(10,-d),m=zm[8+d/3];return function(y){return p(g*y)+m}}return{format:l,formatPrefix:c}}var fs,Ji,Yc;Um({thousands:",",grouping:[3],currency:["$",""]});function Um(t){return fs=Om(t),Ji=fs.format,Yc=fs.formatPrefix,fs}function Bm(t){return Math.max(0,-Ur(Math.abs(t)))}function Ym(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ur(e)/3)))*3-Ur(Math.abs(t)))}function Hm(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ur(e)-Ur(t))+1}var it=1e-6,to=1e-12,ft=Math.PI,St=ft/2,hs=ft/4,qt=ft*2,bt=180/ft,ot=ft/180,dt=Math.abs,Yr=Math.atan,Xt=Math.atan2,tt=Math.cos,ps=Math.ceil,Wm=Math.exp,Hc=Math.hypot,ds=Math.log,Wc=Math.pow,J=Math.sin,ge=Math.sign||function(t){return t>0?1:t<0?-1:0},Rt=Math.sqrt,Vc=Math.tan;function Vm(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 jm(t){return(t=J(t/2))*t}function wt(){}function gs(t,e){t&&Xm.hasOwnProperty(t.type)&&Xm[t.type](t,e)}var qm={Feature:function(t,e){gs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)gs(n[r].geometry,e)}},Xm={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){jc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)jc(n[r],e,0)},Polygon:function(t,e){Zm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Zm(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)gs(n[r],e)}};function jc(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 Zm(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)jc(t[n],e,1);e.polygonEnd()}function Te(t,e){t&&qm.hasOwnProperty(t.type)?qm[t.type](t,e):gs(t,e)}var ms=new Tt,ys=new Tt,Km,Qm,qc,Xc,Zc,ze={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){ms=new Tt,ze.lineStart=ZP,ze.lineEnd=KP},polygonEnd:function(){var t=+ms;ys.add(t<0?qt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ys.add(qt)}};function ZP(){ze.point=QP}function KP(){Jm(Km,Qm)}function QP(t,e){ze.point=Jm,Km=t,Qm=e,t*=ot,e*=ot,qc=t,Xc=tt(e=e/2+hs),Zc=J(e)}function Jm(t,e){t*=ot,e*=ot,e=e/2+hs;var n=t-qc,r=n>=0?1:-1,i=r*n,o=tt(e),a=J(e),s=Zc*a,u=Xc*o+s*tt(i),l=s*r*J(i);ms.add(Xt(l,u)),qc=t,Xc=o,Zc=a}function JP(t){return ys=new Tt,Te(t,ze),ys*2}function bs(t){return[Xt(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 vs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Hr(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 Kc(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function _s(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,At,le,Qn,t1,e1,Wr,eo,yn,Je,tn={point:Qc,lineStart:r1,lineEnd:i1,polygonStart:function(){tn.point=o1,tn.lineStart=t7,tn.lineEnd=e7,eo=new Tt,ze.polygonStart()},polygonEnd:function(){ze.polygonEnd(),tn.point=Qc,tn.lineStart=r1,tn.lineEnd=i1,ms<0?($t=-(At=180),ie=-(le=90)):eo>it?le=90:eo<-it&&(ie=-90),Je[0]=$t,Je[1]=At},sphere:function(){$t=-(At=180),ie=-(le=90)}};function Qc(t,e){yn.push(Je=[$t=t,At=t]),e<ie&&(ie=e),e>le&&(le=e)}function n1(t,e){var n=Kn([t*ot,e*ot]);if(Wr){var r=Hr(Wr,n),i=[r[1],-r[0],0],o=Hr(i,r);_s(o),o=bs(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*bt*s,l,c=dt(a)>180;c^(s*Qn<u&&u<s*t)?(l=o[1]*bt,l>le&&(le=l)):(u=(u+360)%360-180,c^(s*Qn<u&&u<s*t)?(l=-o[1]*bt,l<ie&&(ie=l)):(e<ie&&(ie=e),e>le&&(le=e))),c?t<Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t)}else yn.push(Je=[$t=t,At=t]);e<ie&&(ie=e),e>le&&(le=e),Wr=n,Qn=t}function r1(){tn.point=n1}function i1(){Je[0]=$t,Je[1]=At,tn.point=Qc,Wr=null}function o1(t,e){if(Wr){var n=t-Qn;eo.add(dt(n)>180?n+(n>0?360:-360):n)}else t1=t,e1=e;ze.point(t,e),n1(t,e)}function t7(){ze.lineStart()}function e7(){o1(t1,e1),ze.lineEnd(),dt(eo)>it&&($t=-(At=180)),Je[0]=$t,Je[1]=At,Wr=null}function ce(t,e){return(e-=t)<0?e+360:e}function n7(t,e){return t[0]-e[0]}function a1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function r7(t){var e,n,r,i,o,a,s;if(le=At=-($t=ie=1/0),yn=[],Te(t,tn),n=yn.length){for(yn.sort(n7),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],a1(r,i[0])||a1(r,i[1])?(ce(r[0],i[1])>ce(r[0],r[1])&&(r[1]=i[1]),ce(i[0],r[1])>ce(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=ce(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return yn=Je=null,$t===1/0||ie===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,ie],[At,le]]}var no,ws,$s,Ss,As,Ms,Ds,Ps,Jc,tf,ef,s1,u1,Kt,Qt,Jt,Le={sphere:wt,point:nf,lineStart:l1,lineEnd:c1,polygonStart:function(){Le.lineStart=a7,Le.lineEnd=s7},polygonEnd:function(){Le.lineStart=l1,Le.lineEnd=c1}};function nf(t,e){t*=ot,e*=ot;var n=tt(e);ro(n*tt(t),n*J(t),J(e))}function ro(t,e,n){++no,$s+=(t-$s)/no,Ss+=(e-Ss)/no,As+=(n-As)/no}function l1(){Le.point=i7}function i7(t,e){t*=ot,e*=ot;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),Le.point=o7,ro(Kt,Qt,Jt)}function o7(t,e){t*=ot,e*=ot;var n=tt(e),r=n*tt(t),i=n*J(t),o=J(e),a=Xt(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);ws+=a,Ms+=a*(Kt+(Kt=r)),Ds+=a*(Qt+(Qt=i)),Ps+=a*(Jt+(Jt=o)),ro(Kt,Qt,Jt)}function c1(){Le.point=nf}function a7(){Le.point=u7}function s7(){f1(s1,u1),Le.point=nf}function u7(t,e){s1=t,u1=e,t*=ot,e*=ot,Le.point=f1;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),ro(Kt,Qt,Jt)}function f1(t,e){t*=ot,e*=ot;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,l=Hc(a,s,u),c=Zt(l),h=l&&-c/l;Jc.add(h*a),tf.add(h*s),ef.add(h*u),ws+=c,Ms+=c*(Kt+(Kt=r)),Ds+=c*(Qt+(Qt=i)),Ps+=c*(Jt+(Jt=o)),ro(Kt,Qt,Jt)}function l7(t){no=ws=$s=Ss=As=Ms=Ds=Ps=0,Jc=new Tt,tf=new Tt,ef=new Tt,Te(t,Le);var e=+Jc,n=+tf,r=+ef,i=Hc(e,n,r);return i<to&&(e=Ms,n=Ds,r=Ps,ws<it&&(e=$s,n=Ss,r=As),i=Hc(e,n,r),i<to)?[NaN,NaN]:[Xt(n,e)*bt,Zt(r/i)*bt]}function Vr(t){return function(){return t}}function rf(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 of(t,e){return dt(t)>ft&&(t-=Math.round(t/qt)*qt),[t,e]}of.invert=of;function af(t,e,n){return(t%=qt)?e||n?rf(p1(t),d1(e,n)):p1(t):e||n?d1(e,n):of}function h1(t){return function(e,n){return e+=t,dt(e)>ft&&(e-=Math.round(e/qt)*qt),[e,n]}}function p1(t){var e=h1(t);return e.invert=h1(-t),e}function d1(t,e){var n=tt(t),r=J(t),i=tt(e),o=J(e);function a(s,u){var l=tt(u),c=tt(s)*l,h=J(s)*l,f=J(u),p=f*n+c*r;return[Xt(h*i-p*o,c*n-f*r),Zt(p*i+h*o)]}return a.invert=function(s,u){var l=tt(u),c=tt(s)*l,h=J(s)*l,f=J(u),p=f*i-h*o;return[Xt(h*i+f*o,c*n+p*r),Zt(p*n-c*r)]},a}function g1(t){t=af(t[0]*ot,t[1]*ot,t.length>2?t[2]*ot:0);function e(n){return n=t(n[0]*ot,n[1]*ot),n[0]*=bt,n[1]*=bt,n}return e.invert=function(n){return n=t.invert(n[0]*ot,n[1]*ot),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*qt,o=e-u/2):(i=y1(a,i),o=y1(a,o),(r>0?i<o:i>o)&&(i+=r*qt));for(var l,c=i;r>0?c>o:c<o;c-=u)l=bs([a,-s*tt(c),-s*J(c)]),t.point(l[0],l[1])}}function y1(t,e){e=Kn(e),e[0]-=t,_s(e);var n=Vm(-e[1]);return((-e[2]<0?-n:n)+qt-it)%qt}function c7(){var t=Vr([0,0]),e=Vr(90),n=Vr(2),r,i,o={point:a};function a(u,l){r.push(u=i(u,l)),u[0]*=bt,u[1]*=bt}function s(){var u=t.apply(this,arguments),l=e.apply(this,arguments)*ot,c=n.apply(this,arguments)*ot;return r=[],i=af(-u[0]*ot,-u[1]*ot,0).invert,m1(o,l,c,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:Vr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Vr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:Vr(+u),s):n},s}function b1(){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 Ts(t,e){return dt(t[0]-e[0])<it&&dt(t[1]-e[1])<it}function Ls(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 v1(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(Ts(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*it}o.push(x=new Ls(m,d,null,!0)),a.push(x.o=new Ls(m,null,x,!1)),o.push(x=new Ls(y,d,null,!1)),a.push(x.o=new Ls(y,null,x,!0))}}),!!o.length){for(a.sort(e),x1(o),x1(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var l=o[0],c,h;;){for(var f=l,p=!0;f.v;)if((f=f.n)===l)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,u=c.length;s<u;++s)i.point((h=c[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(c=f.p.z,s=c.length-1;s>=0;--s)i.point((h=c[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,p=!p}while(!f.v);i.lineEnd()}}}function x1(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 sf(t){return dt(t[0])<=ft?t[0]:ge(t[0])*((dt(t[0])+ft)%qt-ft)}function _1(t,e){var n=sf(e),r=e[1],i=J(r),o=[J(n),-tt(n),0],a=0,s=0,u=new Tt;i===1?r=St+it:i===-1&&(r=-St-it);for(var l=0,c=t.length;l<c;++l)if(f=(h=t[l]).length)for(var h,f,p=h[f-1],d=sf(p),g=p[1]/2+hs,m=J(g),y=tt(g),x=0;x<f;++x,d=b,m=D,y=T,p=v){var v=h[x],b=sf(v),w=v[1]/2+hs,D=J(w),T=tt(w),$=b-d,_=$>=0?1:-1,P=_*$,S=P>ft,G=m*D;if(u.add(Xt(G*_*J(P),y*T+G*tt(P))),a+=S?$+_*qt:$,S^d>=n^b>=n){var k=Hr(Kn(p),Kn(v));_s(k);var A=Hr(o,k);_s(A);var L=(S^$>=0?-1:1)*Zt(A[2]);(r>L||r===L&&(k[0]||k[1]))&&(s+=S^$>=0?1:-1)}}return(a<-it||a<it&&u<-to)^s&1}function w1(t,e,n,r){return function(i){var o=e(i),a=b1(),s=e(a),u=!1,l,c,h,f={point:p,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=v,c=[],l=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=m,c=Fl(c);var b=_1(l,r);c.length?(u||(i.polygonStart(),u=!0),v1(c,h7,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),c=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(b,w){t(b,w)&&i.point(b,w)}function d(b,w){o.point(b,w)}function g(){f.point=d,o.lineStart()}function m(){f.point=p,o.lineEnd()}function y(b,w){h.push([b,w]),s.point(b,w)}function x(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),w=a.result(),D,T=w.length,$,_,P;if(h.pop(),l.push(h),h=null,!!T){if(b&1){if(_=w[0],($=_.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),D=0;D<$;++D)i.point((P=_[D])[0],P[1]);i.lineEnd()}return}T>1&&b&2&&w.push(w.pop().concat(w.shift())),c.push(w.filter(f7))}}return f}}function f7(t){return t.length>1}function h7(t,e){return((t=t.x)[0]<0?t[1]-St-it:St-t[1])-((e=e.x)[0]<0?e[1]-St-it:St-e[1])}const uf=w1(function(){return!0},p7,g7,[-ft,-St]);function p7(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)<it?(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)<it&&(e-=r*it),dt(o-s)<it&&(o-=s*it),n=d7(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 d7(t,e,n,r){var i,o,a=J(t-n);return dt(a)>it?Yr((J(e)*(o=tt(r))*J(n)-J(r)*(i=tt(e))*J(t))/(i*o*a)):(e+r)/2}function g7(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])>it){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 $1(t){var e=tt(t),n=2*ot,r=e>0,i=dt(e)>it;function o(c,h,f,p){m1(p,t,n,f,c,h)}function a(c,h){return tt(c)*tt(h)>e}function s(c){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),w=r?b?0:l(m,y):b?l(m+(m<0?ft:-ft),y):0;if(!h&&(d=p=b)&&c.lineStart(),b!==p&&(v=u(h,x),(!v||Ts(h,v)||Ts(x,v))&&(x[2]=1)),b!==p)g=0,b?(c.lineStart(),v=u(x,h),c.point(v[0],v[1])):(v=u(h,x),c.point(v[0],v[1],2),c.lineEnd()),h=v;else if(i&&h&&r^b){var D;!(w&f)&&(D=u(x,h,!0))&&(g=0,r?(c.lineStart(),c.point(D[0][0],D[0][1]),c.point(D[1][0],D[1][1]),c.lineEnd()):(c.point(D[1][0],D[1][1]),c.lineEnd(),c.lineStart(),c.point(D[0][0],D[0][1],3)))}b&&(!h||!Ts(h,x))&&c.point(x[0],x[1]),h=x,p=b,f=w},lineEnd:function(){p&&c.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function u(c,h,f){var p=Kn(c),d=Kn(h),g=[1,0,0],m=Hr(p,d),y=vs(m,m),x=m[0],v=y-x*x;if(!v)return!f&&c;var b=e*y/v,w=-e*x/v,D=Hr(g,m),T=xs(g,b),$=xs(m,w);Kc(T,$);var _=D,P=vs(T,_),S=vs(_,_),G=P*P-S*(vs(T,T)-1);if(!(G<0)){var k=Rt(G),A=xs(_,(-P-k)/S);if(Kc(A,T),A=bs(A),!f)return A;var L=c[0],M=h[0],z=c[1],U=h[1],E;M<L&&(E=L,L=M,M=E);var R=M-L,C=dt(R-ft)<it,F=C||R<it;if(!C&&U<z&&(E=z,z=U,U=E),F?C?z+U>0^A[1]<(dt(A[0]-L)<it?z:U):z<=A[1]&&A[1]<=U:R>ft^(L<=A[0]&&A[0]<=M)){var j=xs(_,(-P+k)/S);return Kc(j,T),[A,bs(j)]}}}function l(c,h){var f=r?t:ft-t,p=0;return c<-f?p|=1:c>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return w1(a,s,o,r?[0,-t]:[-ft,t-ft])}function m7(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],l=e[1],c=0,h=1,f=u-a,p=l-s,d;if(d=n-a,!(!f&&d>0)){if(d/=f,f<0){if(d<c)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>c&&(c=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>c&&(c=d)}else if(f>0){if(d<c)return;d<h&&(h=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<c)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>c&&(c=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>c&&(c=d)}else if(p>0){if(d<c)return;d<h&&(h=d)}return c>0&&(t[0]=a+c*f,t[1]=s+c*p),h<1&&(e[0]=a+h*f,e[1]=s+h*p),!0}}}}}var io=1e9,Cs=-io;function Es(t,e,n,r){function i(l,c){return t<=l&&l<=n&&e<=c&&c<=r}function o(l,c,h,f){var p=0,d=0;if(l==null||(p=a(l,h))!==(d=a(c,h))||u(l,c)<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(c[0],c[1])}function a(l,c){return dt(l[0]-t)<it?c>0?0:3:dt(l[0]-n)<it?c>0?2:1:dt(l[1]-e)<it?c>0?1:0:c>0?3:2}function s(l,c){return u(l.x,c.x)}function u(l,c){var h=a(l,1),f=a(c,1);return h!==f?h-f:h===0?c[1]-l[1]:h===1?l[0]-c[0]:h===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,h=b1(),f,p,d,g,m,y,x,v,b,w,D,T={point:$,lineStart:G,lineEnd:k,polygonStart:P,polygonEnd:S};function $(L,M){i(L,M)&&c.point(L,M)}function _(){for(var L=0,M=0,z=p.length;M<z;++M)for(var U=p[M],E=1,R=U.length,C=U[0],F,j,Q=C[0],N=C[1];E<R;++E)F=Q,j=N,C=U[E],Q=C[0],N=C[1],j<=r?N>r&&(Q-F)*(r-j)>(N-j)*(t-F)&&++L:N<=r&&(Q-F)*(r-j)<(N-j)*(t-F)&&--L;return L}function P(){c=h,f=[],p=[],D=!0}function S(){var L=_(),M=D&&L,z=(f=Fl(f)).length;(M||z)&&(l.polygonStart(),M&&(l.lineStart(),o(null,null,1,l),l.lineEnd()),z&&v1(f,s,L,o,l),l.polygonEnd()),c=l,f=p=d=null}function G(){T.point=A,p&&p.push(d=[]),w=!0,b=!1,x=v=NaN}function k(){f&&(A(g,m),y&&b&&h.rejoin(),f.push(h.result())),T.point=$,b&&c.lineEnd()}function A(L,M){var z=i(L,M);if(p&&d.push([L,M]),w)g=L,m=M,y=z,w=!1,z&&(c.lineStart(),c.point(L,M));else if(z&&b)c.point(L,M);else{var U=[x=Math.max(Cs,Math.min(io,x)),v=Math.max(Cs,Math.min(io,v))],E=[L=Math.max(Cs,Math.min(io,L)),M=Math.max(Cs,Math.min(io,M))];m7(U,E,t,e,n,r)?(b||(c.lineStart(),c.point(U[0],U[1])),c.point(E[0],E[1]),z||c.lineEnd(),D=!1):z&&(c.lineStart(),c.point(L,M),D=!1)}x=L,v=M,b=z}return T}}function y7(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Es(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 lf,cf,ks,Rs,jr={sphere:wt,point:wt,lineStart:b7,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function b7(){jr.point=x7,jr.lineEnd=v7}function v7(){jr.point=jr.lineEnd=wt}function x7(t,e){t*=ot,e*=ot,cf=t,ks=J(e),Rs=tt(e),jr.point=_7}function _7(t,e){t*=ot,e*=ot;var n=J(e),r=tt(e),i=dt(t-cf),o=tt(i),a=J(i),s=r*a,u=Rs*n-ks*r*o,l=ks*n+Rs*r*o;lf.add(Xt(Rt(s*s+u*u),l)),cf=t,ks=n,Rs=r}function S1(t){return lf=new Tt,Te(t,jr),+lf}var ff=[null,null],w7={type:"LineString",coordinates:ff};function Is(t,e){return ff[0]=t,ff[1]=e,S1(w7)}var A1={Feature:function(t,e){return Ns(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ns(n[r].geometry,e))return!0;return!1}},M1={Sphere:function(){return!0},Point:function(t,e){return D1(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(D1(n[r],e))return!0;return!1},LineString:function(t,e){return P1(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(P1(n[r],e))return!0;return!1},Polygon:function(t,e){return T1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(T1(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ns(n[r],e))return!0;return!1}};function Ns(t,e){return t&&M1.hasOwnProperty(t.type)?M1[t.type](t,e):!1}function D1(t,e){return Is(t,e)===0}function P1(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Is(t[o],e),r===0||o>0&&(i=Is(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<to*i))return!0;n=r}return!1}function T1(t,e){return!!_1(t.map($7),L1(e))}function $7(t){return t=t.map(L1),t.pop(),t}function L1(t){return[t[0]*ot,t[1]*ot]}function S7(t,e){return(t&&A1.hasOwnProperty(t.type)?A1[t.type]:Ns)(t,e)}function C1(t,e,n){var r=fn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function E1(t,e,n){var r=fn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function k1(){var t,e,n,r,i,o,a,s,u=10,l=u,c=90,h=360,f,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return fn(ps(r/c)*c,n,c).map(d).concat(fn(ps(s/h)*h,a,h).map(g)).concat(fn(ps(e/u)*u,t,u).filter(function(v){return dt(v%c)>it}).map(f)).concat(fn(ps(o/l)*l,i,l).filter(function(v){return dt(v%h)>it}).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?(c=+v[0],h=+v[1],y):[c,h]},y.stepMinor=function(v){return arguments.length?(u=+v[0],l=+v[1],y):[u,l]},y.precision=function(v){return arguments.length?(m=+v,f=C1(o,i,90),p=E1(e,t,m),d=C1(s,a,90),g=E1(r,n,m),y):m},y.extentMajor([[-180,-90+it],[180,90-it]]).extentMinor([[-180,-80-it],[180,80+it]])}function A7(){return k1()()}function M7(t,e){var n=t[0]*ot,r=t[1]*ot,i=e[0]*ot,o=e[1]*ot,a=tt(r),s=J(r),u=tt(o),l=J(o),c=a*tt(n),h=a*J(n),f=u*tt(i),p=u*J(i),d=2*Zt(Rt(jm(o-r)+a*u*jm(i-n))),g=J(d),m=d?function(y){var x=J(y*=d)/g,v=J(d-y)/g,b=v*c+x*f,w=v*h+x*p,D=v*s+x*l;return[Xt(w,b)*bt,Xt(D,Rt(b*b+w*w))*bt]}:function(){return[n*bt,r*bt]};return m.distance=d,m}const oo=t=>t;var hf=new Tt,pf=new Tt,R1,I1,df,gf,en={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){en.lineStart=D7,en.lineEnd=T7},polygonEnd:function(){en.lineStart=en.lineEnd=en.point=wt,hf.add(dt(pf)),pf=new Tt},result:function(){var t=hf/2;return hf=new Tt,t}};function D7(){en.point=P7}function P7(t,e){en.point=N1,R1=df=t,I1=gf=e}function N1(t,e){pf.add(gf*t-df*e),df=t,gf=e}function T7(){N1(R1,I1)}var qr=1/0,Fs=qr,ao=-qr,Gs=ao,zs={point:L7,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[qr,Fs],[ao,Gs]];return ao=Gs=-(Fs=qr=1/0),t}};function L7(t,e){t<qr&&(qr=t),t>ao&&(ao=t),e<Fs&&(Fs=e),e>Gs&&(Gs=e)}var mf=0,yf=0,so=0,Os=0,Us=0,Xr=0,bf=0,vf=0,uo=0,F1,G1,Oe,Ue,me={point:Jn,lineStart:z1,lineEnd:O1,polygonStart:function(){me.lineStart=k7,me.lineEnd=R7},polygonEnd:function(){me.point=Jn,me.lineStart=z1,me.lineEnd=O1},result:function(){var t=uo?[bf/uo,vf/uo]:Xr?[Os/Xr,Us/Xr]:so?[mf/so,yf/so]:[NaN,NaN];return mf=yf=so=Os=Us=Xr=bf=vf=uo=0,t}};function Jn(t,e){mf+=t,yf+=e,++so}function z1(){me.point=C7}function C7(t,e){me.point=E7,Jn(Oe=t,Ue=e)}function E7(t,e){var n=t-Oe,r=e-Ue,i=Rt(n*n+r*r);Os+=i*(Oe+t)/2,Us+=i*(Ue+e)/2,Xr+=i,Jn(Oe=t,Ue=e)}function O1(){me.point=Jn}function k7(){me.point=I7}function R7(){U1(F1,G1)}function I7(t,e){me.point=U1,Jn(F1=Oe=t,G1=Ue=e)}function U1(t,e){var n=t-Oe,r=e-Ue,i=Rt(n*n+r*r);Os+=i*(Oe+t)/2,Us+=i*(Ue+e)/2,Xr+=i,i=Ue*t-Oe*e,bf+=i*(Oe+t),vf+=i*(Ue+e),uo+=i*3,Jn(Oe=t,Ue=e)}function B1(t){this._context=t}B1.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,qt);break}}},result:wt};var xf=new Tt,_f,Y1,H1,lo,co,fo={point:wt,lineStart:function(){fo.point=N7},lineEnd:function(){_f&&W1(Y1,H1),fo.point=wt},polygonStart:function(){_f=!0},polygonEnd:function(){_f=null},result:function(){var t=+xf;return xf=new Tt,t}};function N7(t,e){fo.point=W1,Y1=lo=t,H1=co=e}function W1(t,e){lo-=t,co-=e,xf.add(Rt(lo*lo+co*co)),lo=t,co=e}let V1,Bs,j1,q1;class X1{constructor(e){this._append=e==null?Z1:F7(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!==j1||this._append!==Bs){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`,j1=r,Bs=this._append,q1=this._,this._=i}this._+=q1;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Z1(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function F7(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Z1;if(e!==V1){const n=10**e;V1=e,Bs=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 Bs}function G7(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(en)),en.result()},a.measure=function(s){return Te(s,i(fo)),fo.result()},a.bounds=function(s){return Te(s,i(zs)),zs.result()},a.centroid=function(s){return Te(s,i(me)),me.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,oo):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new X1(n)):new B1(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 X1(n)),a},a.projection(t).digits(n).context(e)}function z7(t){return{stream:ho(t)}}function ho(t){return function(e){var n=new wf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function wf(){}wf.prototype={constructor:wf,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 $f(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(zs)),e(zs.result()),r!=null&&t.clipExtent(r),t}function Ys(t,e,n){return $f(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 Sf(t,e,n){return Ys(t,[[0,0],e],n)}function Af(t,e,n){return $f(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 Mf(t,e,n){return $f(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 K1=16,O7=tt(30*ot);function Q1(t,e){return+e?B7(t,e):U7(t)}function U7(t){return ho({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function B7(t,e){function n(r,i,o,a,s,u,l,c,h,f,p,d,g,m){var y=l-r,x=c-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+f,w=s+p,D=u+d,T=Rt(b*b+w*w+D*D),$=Zt(D/=T),_=dt(dt(D)-1)<it||dt(o-h)<it?(o+h)/2:Xt(w,b),P=t(_,$),S=P[0],G=P[1],k=S-r,A=G-i,L=x*k-y*A;(L*L/v>e||dt((y*k+x*A)/v-.5)>.3||a*f+s*p+u*d<O7)&&(n(r,i,o,a,s,u,S,G,_,b/=T,w/=T,D,g,m),m.point(S,G),n(S,G,_,b,w,D,l,c,h,f,p,d,g,m))}}return function(r){var i,o,a,s,u,l,c,h,f,p,d,g,m={point:y,lineStart:x,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y($,_){$=t($,_),r.point($[0],$[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v($,_){var P=Kn([$,_]),S=t($,_);n(h,f,c,p,d,g,h=S[0],f=S[1],c=$,p=P[0],d=P[1],g=P[2],K1,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function w(){x(),m.point=D,m.lineEnd=T}function D($,_){v(i=$,_),o=h,a=f,s=p,u=d,l=g,m.point=v}function T(){n(h,f,c,p,d,g,o,a,i,s,u,l,K1,r),m.lineEnd=b,b()}return m}}var Y7=ho({point:function(t,e){this.stream.point(t*ot,e*ot)}});function H7(t){return ho({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function W7(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 J1(t,e,n,r,i,o){if(!o)return W7(t,e,n,r,i);var a=tt(o),s=J(o),u=a*t,l=s*t,c=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-l*m+e,n-l*g-u*m]}return d.invert=function(g,m){return[r*(c*g-h*m+f),i*(p-h*g-c*m)]},d}function Be(t){return Df(function(){return t})()}function Df(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,l=0,c,h=0,f=1,p=1,d=null,g=uf,m=null,y,x,v,b=oo,w=.5,D,T,$,_,P;function S(L){return $(L[0]*ot,L[1]*ot)}function G(L){return L=$.invert(L[0],L[1]),L&&[L[0]*bt,L[1]*bt]}S.stream=function(L){return _&&P===L?_:_=Y7(H7(c)(g(D(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?$1(d=L*ot):(d=null,uf),A()):d*bt},S.clipExtent=function(L){return arguments.length?(b=L==null?(m=y=x=v=null,oo):Es(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*ot,a=L[1]%360*ot,k()):[o*bt,a*bt]},S.rotate=function(L){return arguments.length?(s=L[0]%360*ot,u=L[1]%360*ot,l=L.length>2?L[2]%360*ot:0,k()):[s*bt,u*bt,l*bt]},S.angle=function(L){return arguments.length?(h=L%360*ot,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?(D=Q1(T,w=L*L),A()):Rt(w)},S.fitExtent=function(L,M){return Ys(S,L,M)},S.fitSize=function(L,M){return Sf(S,L,M)},S.fitWidth=function(L,M){return Af(S,L,M)},S.fitHeight=function(L,M){return Mf(S,L,M)};function k(){var L=J1(n,0,0,f,p,h).apply(null,e(o,a)),M=J1(n,r-L[0],i-L[1],f,p,h);return c=af(s,u,l),T=rf(e,M),$=rf(c,T),D=Q1(T,w),A()}function A(){return _=P=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&G,k()}}function Pf(t){var e=0,n=ft/3,r=Df(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*ot,n=o[1]*ot):[e*bt,n*bt]},i}function V7(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 ty(t,e){var n=J(t),r=(n+J(e))/2;if(dt(r)<it)return V7(t);var i=1+n*(2*r-n),o=Rt(i)/r;function a(s,u){var l=Rt(i-2*r*J(u))/r;return[l*J(s*=r),o-l*tt(s)]}return a.invert=function(s,u){var l=o-u,c=Xt(s,dt(l))*ge(l);return l*r<0&&(c-=ft*ge(s)*ge(l)),[c/r,Zt((i-(s*s+l*l)*r*r)/(2*r))]},a}function Hs(){return Pf(ty).scale(155.424).center([0,33.6442])}function ey(){return Hs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function j7(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 q7(){var t,e,n=ey(),r,i=Hs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Hs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,l={point:function(f,p){u=[f,p]}};function c(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)}c.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)},c.stream=function(f){return t&&e===f?t:t=j7([n.stream(e=f),i.stream(f),a.stream(f)])},c.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},c.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),c.translate(n.translate())):n.scale()},c.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(l),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+it,g+.12*p+it],[d-.214*p-it,g+.234*p-it]]).stream(l),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+it,g+.166*p+it],[d-.115*p-it,g+.234*p-it]]).stream(l),h()},c.fitExtent=function(f,p){return Ys(c,f,p)},c.fitSize=function(f,p){return Sf(c,f,p)},c.fitWidth=function(f,p){return Af(c,f,p)},c.fitHeight=function(f,p){return Mf(c,f,p)};function h(){return t=e=null,c}return c.scale(1070)}function ny(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 po(t){return function(e,n){var r=Rt(e*e+n*n),i=t(r),o=J(i),a=tt(i);return[Xt(e*o,r*a),Zt(r&&n*o/r)]}}var Tf=ny(function(t){return Rt(2/(1+t))});Tf.invert=po(function(t){return 2*Zt(t/2)});function X7(){return Be(Tf).scale(124.75).clipAngle(180-.001)}var Lf=ny(function(t){return(t=Vm(t))&&t/J(t)});Lf.invert=po(function(t){return t});function Z7(){return Be(Lf).scale(79.4188).clipAngle(180-.001)}function go(t,e){return[t,ds(Vc((St+e)/2))]}go.invert=function(t,e){return[t,2*Yr(Wm(e))-St]};function K7(){return ry(go).scale(961/qt)}function ry(t){var e=Be(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,l;e.scale=function(h){return arguments.length?(r(h),c()):r()},e.translate=function(h){return arguments.length?(i(h),c()):i()},e.center=function(h){return arguments.length?(n(h),c()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=l=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],l=+h[1][1]),c()):a==null?null:[[a,s],[u,l]]};function c(){var h=ft*r(),f=e(g1(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===go?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),l]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,l)]])}return c()}function Ws(t){return Vc((St+t)/2)}function iy(t,e){var n=tt(t),r=t===e?J(t):ds(n/tt(e))/ds(Ws(e)/Ws(t)),i=n*Wc(Ws(t),r)/r;if(!r)return go;function o(a,s){i>0?s<-St+it&&(s=-St+it):s>St-it&&(s=St-it);var u=i/Wc(Ws(s),r);return[u*J(r*a),i-u*tt(r*a)]}return o.invert=function(a,s){var u=i-s,l=ge(r)*Rt(a*a+u*u),c=Xt(a,dt(u))*ge(u);return u*r<0&&(c-=ft*ge(a)*ge(u)),[c/r,2*Yr(Wc(i/l,1/r))-St]},o}function Q7(){return Pf(iy).scale(109.5).parallels([30,30])}function mo(t,e){return[t,e]}mo.invert=mo;function J7(){return Be(mo).scale(152.63)}function oy(t,e){var n=tt(t),r=t===e?J(t):(n-tt(e))/(e-t),i=n/r+t;if(dt(r)<it)return mo;function o(a,s){var u=i-s,l=r*a;return[u*J(l),i-u*tt(l)]}return o.invert=function(a,s){var u=i-s,l=Xt(a,dt(u))*ge(u);return u*r<0&&(l-=ft*ge(a)*ge(u)),[l/r,i-ge(r)*Rt(a*a+u*u)]},o}function tT(){return Pf(oy).scale(131.154).center([0,13.9389])}var yo=1.340264,bo=-.081106,vo=893e-6,xo=.003796,Vs=Rt(3)/2,eT=12;function Cf(t,e){var n=Zt(Vs*J(e)),r=n*n,i=r*r*r;return[t*tt(n)/(Vs*(yo+3*bo*r+i*(7*vo+9*xo*r))),n*(yo+bo*r+i*(vo+xo*r))]}Cf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<eT&&(s=n*(yo+bo*r+i*(vo+xo*r))-e,u=yo+3*bo*r+i*(7*vo+9*xo*r),n-=a=s/u,r=n*n,i=r*r*r,!(dt(a)<to));++o);return[Vs*t*(yo+3*bo*r+i*(7*vo+9*xo*r))/tt(n),Zt(J(n)/Vs)]};function nT(){return Be(Cf).scale(177.158)}function Ef(t,e){var n=tt(e),r=tt(t)*n;return[n*J(t)/r,J(e)/r]}Ef.invert=po(Yr);function rT(){return Be(Ef).scale(144.049).clipAngle(60)}function iT(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,l,c,h,f=1,p=1,d=ho({point:function(b,w){var D=v([b,w]);this.stream.point(D[0],D[1])}}),g=oo,m,y;function x(){return f=t*r,p=t*i,m=y=null,v}function v(b){var w=b[0]*f,D=b[1]*p;if(o){var T=D*a-w*s;w=w*a+D*s,D=T}return[w+e,D+n]}return v.invert=function(b){var w=b[0]-e,D=b[1]-n;if(o){var T=D*a+w*s;w=w*a-D*s,D=T}return[w/f,D/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=l=c=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(u=l=c=h=null,oo):Es(u=+b[0][0],l=+b[0][1],c=+b[1][0],h=+b[1][1]),x()):u==null?null:[[u,l],[c,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*ot,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,w){return Ys(v,b,w)},v.fitSize=function(b,w){return Sf(v,b,w)},v.fitWidth=function(b,w){return Af(v,b,w)},v.fitHeight=function(b,w){return Mf(v,b,w)},v}function kf(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)))]}kf.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)>it&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function oT(){return Be(kf).scale(175.295)}function Rf(t,e){return[tt(e)*J(t),J(e)]}Rf.invert=po(Zt);function aT(){return Be(Rf).scale(249.5).clipAngle(90+it)}function If(t,e){var n=tt(e),r=1+tt(t)*n;return[n*J(t)/r,J(e)/r]}If.invert=po(function(t){return 2*Yr(t)});function sT(){return Be(If).scale(250).clipAngle(142)}function Nf(t,e){return[ds(Vc((St+e)/2)),-t]}Nf.invert=function(t,e){return[-e,2*Yr(Wm(t))-St]};function uT(){var t=ry(Nf),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 lT(t,e){return t.parent===e.parent?1:2}function cT(t){return t.reduce(fT,0)/t.length}function fT(t,e){return t+e.x}function hT(t){return 1+t.reduce(pT,0)}function pT(t,e){return Math.max(t,e.y)}function dT(t){for(var e;e=t.children;)t=e[0];return t}function gT(t){for(var e;e=t.children;)t=e[e.length-1];return t}function mT(){var t=lT,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=cT(p),f.y=hT(p)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=dT(o),l=gT(o),c=u.x-t(u,l)/2,h=l.x+t(l,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-c)/(h-c)*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 yT(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 bT(){return this.eachAfter(yT)}function vT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function xT(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 _T(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 wT(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function $T(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 ST(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function AT(t){for(var e=this,n=MT(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 MT(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 DT(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function PT(){return Array.from(this)}function TT(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function LT(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*CT(){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 js(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=RT)):e===void 0&&(e=kT);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(ay)}function ET(){return js(this).eachBefore(IT)}function kT(t){return t.children}function RT(t){return Array.isArray(t)?t[1]:null}function IT(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function ay(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=js.prototype={constructor:tr,count:bT,each:vT,eachAfter:_T,eachBefore:xT,find:wT,sum:$T,sort:ST,path:AT,ancestors:DT,descendants:PT,leaves:TT,links:LT,copy:ET,[Symbol.iterator]:CT};function qs(t){return t==null?null:sy(t)}function sy(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Zr(t){return function(){return t}}const NT=1664525,FT=1013904223,uy=4294967296;function Ff(){let t=1;return()=>(t=(NT*t+FT)%uy)/uy}function GT(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function zT(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 OT(t){return ly(t,Ff())}function ly(t,e){for(var n=0,r=(t=zT(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&cy(a,o)?++n:(a=BT(i=UT(i,o)),n=0);return a}function UT(t,e){var n,r;if(Gf(e,t))return[e];for(n=0;n<t.length;++n)if(Xs(e,t[n])&&Gf(_o(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(Xs(_o(t[n],t[r]),e)&&Xs(_o(t[n],e),t[r])&&Xs(_o(t[r],e),t[n])&&Gf(fy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Xs(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 cy(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 Gf(t,e){for(var n=0;n<e.length;++n)if(!cy(t,e[n]))return!1;return!0}function BT(t){switch(t.length){case 1:return YT(t[0]);case 2:return _o(t[0],t[1]);case 3:return fy(t[0],t[1],t[2])}}function YT(t){return{x:t.x,y:t.y,r:t.r}}function _o(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,l=a-r,c=s-i,h=Math.sqrt(u*u+l*l);return{x:(n+o+u/h*c)/2,y:(r+a+l/h*c)/2,r:(h+i+s)/2}}function fy(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,h=n.r,f=r-a,p=r-l,d=i-s,g=i-c,m=u-o,y=h-o,x=r*r+i*i-o*o,v=x-a*a-s*s+u*u,b=x-l*l-c*c+h*h,w=p*d-f*g,D=(d*b-g*v)/(w*2)-r,T=(g*m-d*y)/w,$=(p*v-f*b)/(w*2)-i,_=(f*y-p*m)/w,P=T*T+_*_-1,S=2*(o+D*T+$*_),G=D*D+$*$-o*o,k=-(Math.abs(P)>1e-6?(S+Math.sqrt(S*S-4*P*G))/(2*P):G/S);return{x:r+D+T*k,y:i+$+_*k,r:k}}function hy(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,l=r*r+a*a;l?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(l+u-o)/(2*l),s=Math.sqrt(Math.max(0,u/l-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(l+o-u)/(2*l),s=Math.sqrt(Math.max(0,o/l-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 py(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 dy(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 Zs(t){this._=t,this.next=null,this.previous=null}function gy(t,e){if(!(o=(t=GT(t)).length))return 0;var n,r,i,o,a,s,u,l,c,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;hy(r,n,i=t[2]),n=new Zs(n),r=new Zs(r),i=new Zs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){hy(n._,r._,i=t[u]),i=new Zs(i),l=r.next,c=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(py(l._,i._)){r=l,n.next=r,r.previous=n,--u;continue t}h+=l._.r,l=l.next}else{if(py(c._,i._)){n=c,n.next=r,r.previous=n,--u;continue t}f+=c._.r,c=c.previous}while(l!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=dy(n);(i=i.next)!==r;)(s=dy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=ly(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function HT(t){return gy(t,Ff()),t}function WT(t){return Math.sqrt(t.value)}function VT(){var t=null,e=1,n=1,r=er;function i(o){const a=Ff();return o.x=e/2,o.y=n/2,t?o.eachBefore(my(t)).eachAfter(zf(r,.5,a)).eachBefore(yy(1)):o.eachBefore(my(WT)).eachAfter(zf(er,1,a)).eachAfter(zf(r,o.r/Math.min(e,n),a)).eachBefore(yy(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:Zr(+o),i):r},i}function my(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function zf(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=gy(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function yy(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 by(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 wo(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,l=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*l}function jT(){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(by),a}function o(a,s){return function(u){u.children&&wo(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var l=u.x0,c=u.y0,h=u.x1-n,f=u.y1-n;h<l&&(l=h=(l+h)/2),f<c&&(c=f=(c+f)/2),u.x0=l,u.y0=c,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 qT={depth:-1},vy={},Of={};function XT(t){return t.id}function ZT(t){return t.parentId}function KT(){var t=XT,e=ZT,n;function r(i){var o=Array.from(i),a=t,s=e,u,l,c,h,f,p,d,g,m=new Map;if(n!=null){const y=o.map((b,w)=>QT(n(b,w,i))),x=y.map(xy),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(xy(b)),o.push(Of));a=(b,w)=>y[w],s=(b,w)=>x[w]}for(c=0,u=o.length;c<u;++c)l=o[c],p=o[c]=new tr(l),(d=a(l,c,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?vy:p)),(d=s(l,c,i))!=null&&(d+="")&&(p.parent=d);for(c=0;c<u;++c)if(p=o[c],d=p.parent){if(f=m.get(d),!f)throw new Error("missing: "+d);if(f===vy)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===Of&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Of);--y)p.data=null}if(h.parent=qT,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(ay),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 QT(t){t=`${t}`;let e=t.length;return Uf(t,e-1)&&!Uf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function xy(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Uf(t,e););return t.slice(0,e)}function Uf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function JT(t,e){return t.parent===e.parent?1:2}function Bf(t){var e=t.children;return e?e[0]:t.t}function Yf(t){var e=t.children;return e?e[e.length-1]:t.t}function t9(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 e9(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 n9(t,e,n){return t.a.parent===e.parent?t.a:n}function Ks(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}Ks.prototype=Object.create(tr.prototype);function r9(t){for(var e=new Ks(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 Ks(o[a],a)),i.parent=n;return(e.parent=new Ks(null,0)).children=[e],e}function i9(){var t=JT,e=1,n=1,r=null;function i(l){var c=r9(l);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)l.eachBefore(u);else{var h=l,f=l,p=l;l.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);l.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*y})}return l}function o(l){var c=l.children,h=l.parent.children,f=l.i?h[l.i-1]:null;if(c){e9(l);var p=(c[0].z+c[c.length-1].z)/2;f?(l.z=f.z+t(l._,f._),l.m=l.z-p):l.z=p}else f&&(l.z=f.z+t(l._,f._));l.parent.A=s(l,f,l.parent.A||h[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,c,h){if(c){for(var f=l,p=l,d=c,g=f.parent.children[0],m=f.m,y=p.m,x=d.m,v=g.m,b;d=Yf(d),f=Bf(f),d&&f;)g=Bf(g),p=Yf(p),p.a=l,b=d.z+x-f.z-m+t(d._,f._),b>0&&(t9(n9(d,l,h),l,b),m+=b,y+=b),x+=d.m,m+=f.m,v+=g.m,y+=p.m;d&&!Yf(p)&&(p.t=d,p.m+=x-y),f&&!Bf(g)&&(g.t=f,g.m+=m-v,h=l)}return h}function u(l){l.x*=e,l.y=l.depth*n}return i.separation=function(l){return arguments.length?(t=l,i):t},i.size=function(l){return arguments.length?(r=!1,e=+l[0],n=+l[1],i):r?null:[e,n]},i.nodeSize=function(l){return arguments.length?(r=!0,e=+l[0],n=+l[1],i):r?[e,n]:null},i}function Qs(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,l=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*l}var _y=(1+Math.sqrt(5))/2;function wy(t,e,n,r,i,o){for(var a=[],s=e.children,u,l,c=0,h=0,f=s.length,p,d,g=e.value,m,y,x,v,b,w,D;c<f;){p=i-n,d=o-r;do m=s[h++].value;while(!m&&h<f);for(y=x=m,w=Math.max(d/p,p/d)/(g*t),D=m*m*w,b=Math.max(x/D,D/y);h<f;++h){if(m+=l=s[h].value,l<y&&(y=l),l>x&&(x=l),D=m*m*w,v=Math.max(x/D,D/y),v>b){m-=l;break}b=v}a.push(u={value:m,dice:p<d,children:s.slice(c,h)}),u.dice?wo(u,n,r,i,g?r+=d*m/g:o):Qs(u,n,r,g?n+=p*m/g:i,o),g-=m,c=h}return a}const Hf=function t(e){function n(r,i,o,a,s){wy(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(_y);function $y(){var t=Hf,e=!1,n=1,r=1,i=[0],o=er,a=er,s=er,u=er,l=er;function c(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore(by),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+=l(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 c.round=function(f){return arguments.length?(e=!!f,c):e},c.size=function(f){return arguments.length?(n=+f[0],r=+f[1],c):[n,r]},c.tile=function(f){return arguments.length?(t=sy(f),c):t},c.padding=function(f){return arguments.length?c.paddingInner(f).paddingOuter(f):c.paddingInner()},c.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Zr(+f),c):o},c.paddingOuter=function(f){return arguments.length?c.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):c.paddingTop()},c.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Zr(+f),c):a},c.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Zr(+f),c):s},c.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Zr(+f),c):u},c.paddingLeft=function(f){return arguments.length?(l=typeof f=="function"?f:Zr(+f),c):l},c}function o9(t,e,n,r,i){var o=t.children,a,s=o.length,u,l=new Array(s+1);for(l[0]=u=a=0;a<s;++a)l[a+1]=u+=o[a].value;c(0,s,t.value,e,n,r,i);function c(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=l[h],b=p/2+v,w=h+1,D=f-1;w<D;){var T=w+D>>>1;l[T]<b?w=T+1:D=T}b-l[w-1]<l[w]-b&&h+1<w&&--w;var $=l[w]-v,_=p-$;if(m-d>y-g){var P=p?(d*_+m*$)/p:m;c(h,w,$,d,g,P,y),c(w,f,_,P,g,m,y)}else{var S=p?(g*_+y*$)/p:y;c(h,w,$,d,g,m,S),c(w,f,_,d,S,m,y)}}}function a9(t,e,n,r,i){(t.depth&1?Qs:wo)(t,e,n,r,i)}const s9=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,l,c,h,f=-1,p,d=u.length,g=r.value;++f<d;){for(l=u[f],c=l.children,h=l.value=0,p=c.length;h<p;++h)l.value+=c[h].value;l.dice?wo(l,i,o,a,g?o+=(s-o)*l.value/g:s):Qs(l,i,o,g?i+=(a-i)*l.value/g:a,s),g-=l.value}else r._squarify=u=wy(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(_y);function u9(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 l9(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 c9(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function f9(t,e){return t[0]-e[0]||t[1]-e[1]}function Sy(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&c9(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function h9(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(f9),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Sy(r),a=Sy(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],l=[];for(e=o.length-1;e>=0;--e)l.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)l.push(t[r[a[e]][2]]);return l}function p9(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,l,c=!1,h=0;h<n;++h)r=t[h],u=r[0],l=r[1],l>o!=s>o&&i<(a-u)*(o-l)/(s-l)+u&&(c=!c),a=u,s=l;return c}function d9(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,g9=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),m9=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),Wf=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),y9=function t(e){var n=Wf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),Ay=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),b9=function t(e){var n=Ay.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),v9=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),x9=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),_9=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),My=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),Vf=function t(e){var n=Wf.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 l=n(),c=1+s*l;while(c<=0);c*=c*c;var h=1-e()}while(h>=1-.0331*l*l*l*l&&Math.log(h)>=.5*l*l+a*(1-c+Math.log(c)));return a*c*u()*o}}return r.source=t,r}(Nt),Dy=function t(e){var n=Vf.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),Py=function t(e){var n=My.source(e),r=Dy.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,l=a;u*l>16&&u*(1-l)>16;){var c=Math.floor((u+1)*l),h=r(c,u-c+1)();h<=l?(s+=c,u-=c,l=(l-h)/(1-h)):(u=c-1,l/=h)}for(var f=l<.5,p=f?l:1-l,d=n(p),g=d(),m=0;g<=u;++m)g+=d();return s+(f?m:u-m)}}return i.source=t,i}(Nt),w9=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),$9=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),S9=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),A9=function t(e){var n=Vf.source(e),r=Py.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),l=n(u)();if(l>s)return a+r(u-1,s/l)();a+=u,s-=l}for(var c=-Math.log1p(-e()),h=0;c<=s;++h)c-=Math.log1p(-e());return a+h}}return i.source=t,i}(Nt),M9=1664525,D9=1013904223,Ty=1/4294967296;function P9(t=Math.random()){let e=(0<=t&&t<1?t/Ty:Math.abs(t))|0;return()=>(e=M9*e+D9|0,Ty*(e>>>0))}function ye(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function nn(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 jf=Symbol("implicit");function qf(){var t=new Pi,e=[],n=[],r=jf;function i(o){let a=t.get(o);if(a===void 0){if(r!==jf)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 qf(e,n).unknown(r)},ye.apply(i,arguments),i}function Xf(){var t=qf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,l=0,c=.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+l*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*c,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=fn(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,l=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(l=+f,h()):l},t.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),h()):c},t.copy=function(){return Xf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},ye.apply(h(),arguments)}function Ly(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ly(e())},t}function Zf(){return Ly(Xf.apply(null,arguments).paddingInner(1))}function T9(t){return function(){return t}}function Js(t){return+t}var Cy=[0,1];function te(t){return t}function Kf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:T9(isNaN(e)?NaN:.5)}function L9(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function C9(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Kf(i,r),o=n(a,o)):(r=Kf(r,i),o=n(o,a)),function(s){return o(r(s))}}function E9(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]=Kf(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 $o(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function tu(){var t=Cy,e=Cy,n=qe,r,i,o,a=te,s,u,l;function c(){var f=Math.min(t.length,e.length);return a!==te&&(a=L9(t[0],t[f-1])),s=f>2?E9:C9,u=l=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((l||(l=s(e,t.map(r),de)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Js),c()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),c()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Ya,c()},h.clamp=function(f){return arguments.length?(a=f?!0:te,c()):a!==te},h.interpolate=function(f){return arguments.length?(n=f,c()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,c()}}function Qf(){return tu()(te,te)}function Ey(t,e,n,r){var i=xa(t,e,n),o;switch(r=Br(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Ym(i,a))&&(r.precision=o),Yc(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Hm(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Bm(i))&&(r.precision=o-(r.type==="%")*2);break}}return Ji(r)}function bn(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 Ey(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,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=In(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function eu(){var t=Qf();return t.copy=function(){return $o(t,eu())},ye.apply(t,arguments),bn(t)}function ky(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,Js),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return ky(t).unknown(e)},t=arguments.length?Array.from(t,Js):[0,1],bn(n)}function Ry(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 Iy(t){return Math.log(t)}function Ny(t){return Math.exp(t)}function k9(t){return-Math.log(-t)}function R9(t){return-Math.exp(-t)}function I9(t){return isFinite(t)?+("1e"+t):t<0?0:t}function N9(t){return t===10?I9:t===Math.E?Math.exp:e=>Math.pow(t,e)}function F9(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 Fy(t){return(e,n)=>-t(-e,n)}function Jf(t){const e=t(Iy,Ny),n=e.domain;let r=10,i,o;function a(){return i=F9(r),o=N9(r),n()[0]<0?(i=Fy(i),o=Fy(o),t(k9,R9)):t(Iy,Ny),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 l=u[0],c=u[u.length-1];const h=c<l;h&&([l,c]=[c,l]);let f=i(l),p=i(c),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),l>0){for(;f<=p;++f)for(d=1;d<r;++d)if(g=f<0?d/o(-f):d*o(f),!(g<l)){if(g>c)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<l)){if(g>c)break;y.push(g)}y.length*2<m&&(y=Rn(l,c,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=Br(u)).precision==null&&(u.trim=!0),u=Ji(u)),s===1/0)return u;const l=Math.max(1,r*s/e.ticks().length);return c=>{let h=c/o(Math.round(i(c)));return h*r<r-.5&&(h*=r),h<=l?u(c):""}},e.nice=()=>n(Ry(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Gy(){const t=Jf(tu()).domain([1,10]);return t.copy=()=>$o(t,Gy()).base(t.base()),ye.apply(t,arguments),t}function zy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Oy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function th(t){var e=1,n=t(zy(e),Oy(e));return n.constant=function(r){return arguments.length?t(zy(e=+r),Oy(e)):e},bn(n)}function Uy(){var t=th(tu());return t.copy=function(){return $o(t,Uy()).constant(t.constant())},ye.apply(t,arguments)}function By(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function G9(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function z9(t){return t<0?-t*t:t*t}function eh(t){var e=t(te,te),n=1;function r(){return n===1?t(te,te):n===.5?t(G9,z9):t(By(n),By(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function Kr(){var t=eh(tu());return t.copy=function(){return $o(t,Kr()).exponent(t.exponent())},ye.apply(t,arguments),t}function O9(){return Kr.apply(null,arguments).exponent(.5)}function Yy(t){return Math.sign(t)*t*t}function U9(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Hy(){var t=Qf(),e=[0,1],n=!1,r;function i(o){var a=U9(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Yy(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,Js)).map(Yy)),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 Hy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},ye.apply(i,arguments),bn(i)}function Wy(){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]=wg(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 Wy().domain(t).range(e).unknown(r)},ye.apply(o,arguments)}function Vy(){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 l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Vy().domain([t,e]).range(i).unknown(o)},ye.apply(bn(a),arguments)}function jy(){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 jy().domain(t).range(e).unknown(n)},ye.apply(i,arguments)}const nh=new Date,rh=new Date;function Dt(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 l;do u.push(l=new Date(+o)),e(o,s),t(o);while(l<o&&o<a);return u},i.filter=o=>Dt(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)=>(nh.setTime(+o),rh.setTime(+a),t(nh),t(rh),Math.floor(n(nh,rh))),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 Qr=Dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Qr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Dt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Qr);const qy=Qr.range,rn=1e3,be=rn*60,on=be*60,an=on*24,ih=an*7,Xy=an*30,oh=an*365,sn=Dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCSeconds()),Zy=sn.range,nu=Dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*rn)},(t,e)=>{t.setTime(+t+e*be)},(t,e)=>(e-t)/be,t=>t.getMinutes()),B9=nu.range,ru=Dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*be)},(t,e)=>(e-t)/be,t=>t.getUTCMinutes()),Y9=ru.range,iu=Dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*rn-t.getMinutes()*be)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getHours()),H9=iu.range,ou=Dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getUTCHours()),W9=ou.range,Jr=Dt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*be)/an,t=>t.getDate()-1),V9=Jr.range,So=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/an,t=>t.getUTCDate()-1),j9=So.range,ah=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/an,t=>Math.floor(t/an)),q9=ah.range;function nr(t){return Dt(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())*be)/ih)}const ti=nr(0),Ao=nr(1),Ky=nr(2),Qy=nr(3),rr=nr(4),Jy=nr(5),tb=nr(6),eb=ti.range,X9=Ao.range,Z9=Ky.range,K9=Qy.range,Q9=rr.range,J9=Jy.range,tL=tb.range;function ir(t){return Dt(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)/ih)}const ei=ir(0),Mo=ir(1),nb=ir(2),rb=ir(3),or=ir(4),ib=ir(5),ob=ir(6),ab=ei.range,eL=Mo.range,nL=nb.range,rL=rb.range,iL=or.range,oL=ib.range,aL=ob.range,au=Dt(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()),sL=au.range,su=Dt(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()),uL=su.range,Ye=Dt(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());Ye.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Dt(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 lL=Ye.range,He=Dt(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());He.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Dt(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 cL=He.range;function sb(t,e,n,r,i,o){const a=[[sn,1,rn],[sn,5,5*rn],[sn,15,15*rn],[sn,30,30*rn],[o,1,be],[o,5,5*be],[o,15,15*be],[o,30,30*be],[i,1,on],[i,3,3*on],[i,6,6*on],[i,12,12*on],[r,1,an],[r,2,2*an],[n,1,ih],[e,1,Xy],[e,3,3*Xy],[t,1,oh]];function s(l,c,h){const f=c<l;f&&([l,c]=[c,l]);const p=h&&typeof h.range=="function"?h:u(l,c,h),d=p?p.range(l,+c+1):[];return f?d.reverse():d}function u(l,c,h){const f=Math.abs(c-l)/h,p=ma(([,,m])=>m).right(a,f);if(p===a.length)return t.every(xa(l/oh,c/oh,h));if(p===0)return Qr.every(Math.max(xa(l,c,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[ub,lb]=sb(He,su,ei,ah,ou,ru),[cb,fb]=sb(Ye,au,ti,Jr,iu,nu);function sh(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 uh(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 Do(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function hb(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,l=Po(i),c=To(i),h=Po(o),f=To(o),p=Po(a),d=To(a),g=Po(s),m=To(s),y=Po(u),x=To(u),v={a:z,A:U,b:E,B:R,c:null,d:bb,e:bb,f:kL,g:YL,G:WL,H:LL,I:CL,j:EL,L:vb,m:RL,M:IL,p:C,q:F,Q:Ab,s:Mb,S:NL,u:FL,U:GL,V:zL,w:OL,W:UL,x:null,X:null,y:BL,Y:HL,Z:VL,"%":Sb},b={a:j,A:Q,b:N,B:q,c:null,d:_b,e:_b,f:ZL,g:aC,G:uC,H:jL,I:qL,j:XL,L:wb,m:KL,M:QL,p:V,q:K,Q:Ab,s:Mb,S:JL,u:tC,U:eC,V:nC,w:rC,W:iC,x:null,X:null,y:oC,Y:sC,Z:lC,"%":Sb},w={a:P,A:S,b:G,B:k,c:A,d:mb,e:mb,f:ML,g:gb,G:db,H:yb,I:yb,j:wL,L:AL,m:_L,M:$L,p:_,q:xL,Q:PL,s:TL,S:SL,u:gL,U:mL,V:yL,w:dL,W:bL,x:L,X:M,y:gb,Y:db,Z:vL,"%":DL};v.x=D(n,v),v.X=D(r,v),v.c=D(e,v),b.x=D(n,b),b.X=D(r,b),b.c=D(e,b);function D(W,nt){return function(ut){var H=[],mt=-1,ht=0,Yt=W.length,ee,st,Mt;for(ut instanceof Date||(ut=new Date(+ut));++mt<Yt;)W.charCodeAt(mt)===37&&(H.push(W.slice(ht,mt)),(st=pb[ee=W.charAt(++mt)])!=null?ee=W.charAt(++mt):st=ee==="e"?" ":"0",(Mt=nt[ee])&&(ee=Mt(ut,st)),H.push(ee),ht=mt+1);return H.push(W.slice(ht,mt)),H.join("")}}function T(W,nt){return function(ut){var H=Do(1900,void 0,1),mt=$(H,W,ut+="",0),ht,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(nt&&!("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?(ht=uh(Do(H.y,0,1)),Yt=ht.getUTCDay(),ht=Yt>4||Yt===0?Mo.ceil(ht):Mo(ht),ht=So.offset(ht,(H.V-1)*7),H.y=ht.getUTCFullYear(),H.m=ht.getUTCMonth(),H.d=ht.getUTCDate()+(H.w+6)%7):(ht=sh(Do(H.y,0,1)),Yt=ht.getDay(),ht=Yt>4||Yt===0?Ao.ceil(ht):Ao(ht),ht=Jr.offset(ht,(H.V-1)*7),H.y=ht.getFullYear(),H.m=ht.getMonth(),H.d=ht.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?uh(Do(H.y,0,1)).getUTCDay():sh(Do(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,uh(H)):sh(H)}}function $(W,nt,ut,H){for(var mt=0,ht=nt.length,Yt=ut.length,ee,st;mt<ht;){if(H>=Yt)return-1;if(ee=nt.charCodeAt(mt++),ee===37){if(ee=nt.charAt(mt++),st=w[ee in pb?nt.charAt(mt++):ee],!st||(H=st(W,ut,H))<0)return-1}else if(ee!=ut.charCodeAt(H++))return-1}return H}function _(W,nt,ut){var H=l.exec(nt.slice(ut));return H?(W.p=c.get(H[0].toLowerCase()),ut+H[0].length):-1}function P(W,nt,ut){var H=p.exec(nt.slice(ut));return H?(W.w=d.get(H[0].toLowerCase()),ut+H[0].length):-1}function S(W,nt,ut){var H=h.exec(nt.slice(ut));return H?(W.w=f.get(H[0].toLowerCase()),ut+H[0].length):-1}function G(W,nt,ut){var H=y.exec(nt.slice(ut));return H?(W.m=x.get(H[0].toLowerCase()),ut+H[0].length):-1}function k(W,nt,ut){var H=g.exec(nt.slice(ut));return H?(W.m=m.get(H[0].toLowerCase()),ut+H[0].length):-1}function A(W,nt,ut){return $(W,e,nt,ut)}function L(W,nt,ut){return $(W,n,nt,ut)}function M(W,nt,ut){return $(W,r,nt,ut)}function z(W){return a[W.getDay()]}function U(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 F(W){return 1+~~(W.getMonth()/3)}function j(W){return a[W.getUTCDay()]}function Q(W){return o[W.getUTCDay()]}function N(W){return u[W.getUTCMonth()]}function q(W){return s[W.getUTCMonth()]}function V(W){return i[+(W.getUTCHours()>=12)]}function K(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var nt=D(W+="",v);return nt.toString=function(){return W},nt},parse:function(W){var nt=T(W+="",!1);return nt.toString=function(){return W},nt},utcFormat:function(W){var nt=D(W+="",b);return nt.toString=function(){return W},nt},utcParse:function(W){var nt=T(W+="",!0);return nt.toString=function(){return W},nt}}}var pb={"-":"",_:" ",0:"0"},It=/^\s*\d+/,fL=/^%/,hL=/[\\^$*+?|[\]().{}]/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 pL(t){return t.replace(hL,"\\$&")}function Po(t){return new RegExp("^(?:"+t.map(pL).join("|")+")","i")}function To(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function dL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function gL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function mL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function yL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function bL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function db(t,e,n){var r=It.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function gb(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 vL(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 xL(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 _L(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 mb(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function wL(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 yb(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function $L(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function AL(t,e,n){var r=It.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ML(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 DL(t,e,n){var r=fL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function PL(t,e,n){var r=It.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function TL(t,e,n){var r=It.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function bb(t,e){return gt(t.getDate(),e,2)}function LL(t,e){return gt(t.getHours(),e,2)}function CL(t,e){return gt(t.getHours()%12||12,e,2)}function EL(t,e){return gt(1+Jr.count(Ye(t),t),e,3)}function vb(t,e){return gt(t.getMilliseconds(),e,3)}function kL(t,e){return vb(t,e)+"000"}function RL(t,e){return gt(t.getMonth()+1,e,2)}function IL(t,e){return gt(t.getMinutes(),e,2)}function NL(t,e){return gt(t.getSeconds(),e,2)}function FL(t){var e=t.getDay();return e===0?7:e}function GL(t,e){return gt(ti.count(Ye(t)-1,t),e,2)}function xb(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function zL(t,e){return t=xb(t),gt(rr.count(Ye(t),t)+(Ye(t).getDay()===4),e,2)}function OL(t){return t.getDay()}function UL(t,e){return gt(Ao.count(Ye(t)-1,t),e,2)}function BL(t,e){return gt(t.getFullYear()%100,e,2)}function YL(t,e){return t=xb(t),gt(t.getFullYear()%100,e,2)}function HL(t,e){return gt(t.getFullYear()%1e4,e,4)}function WL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),gt(t.getFullYear()%1e4,e,4)}function VL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+gt(e/60|0,"0",2)+gt(e%60,"0",2)}function _b(t,e){return gt(t.getUTCDate(),e,2)}function jL(t,e){return gt(t.getUTCHours(),e,2)}function qL(t,e){return gt(t.getUTCHours()%12||12,e,2)}function XL(t,e){return gt(1+So.count(He(t),t),e,3)}function wb(t,e){return gt(t.getUTCMilliseconds(),e,3)}function ZL(t,e){return wb(t,e)+"000"}function KL(t,e){return gt(t.getUTCMonth()+1,e,2)}function QL(t,e){return gt(t.getUTCMinutes(),e,2)}function JL(t,e){return gt(t.getUTCSeconds(),e,2)}function tC(t){var e=t.getUTCDay();return e===0?7:e}function eC(t,e){return gt(ei.count(He(t)-1,t),e,2)}function $b(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function nC(t,e){return t=$b(t),gt(or.count(He(t),t)+(He(t).getUTCDay()===4),e,2)}function rC(t){return t.getUTCDay()}function iC(t,e){return gt(Mo.count(He(t)-1,t),e,2)}function oC(t,e){return gt(t.getUTCFullYear()%100,e,2)}function aC(t,e){return t=$b(t),gt(t.getUTCFullYear()%100,e,2)}function sC(t,e){return gt(t.getUTCFullYear()%1e4,e,4)}function uC(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),gt(t.getUTCFullYear()%1e4,e,4)}function lC(){return"+0000"}function Sb(){return"%"}function Ab(t){return+t}function Mb(t){return Math.floor(+t/1e3)}var ni,lh,Db,uu,ch;Pb({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 Pb(t){return ni=hb(t),lh=ni.format,Db=ni.parse,uu=ni.utcFormat,ch=ni.utcParse,ni}var Tb="%Y-%m-%dT%H:%M:%S.%LZ";function cC(t){return t.toISOString()}var fC=Date.prototype.toISOString?cC:uu(Tb);const hC=fC;function pC(t){var e=new Date(t);return isNaN(e)?null:e}var dC=+new Date("2000-01-01T00:00:00.000Z")?pC:ch(Tb);const gC=dC;function mC(t){return new Date(t)}function yC(t){return t instanceof Date?+t:+new Date(+t)}function fh(t,e,n,r,i,o,a,s,u,l){var c=Qf(),h=c.invert,f=c.domain,p=l(".%L"),d=l(":%S"),g=l("%I:%M"),m=l("%I %p"),y=l("%a %d"),x=l("%b %d"),v=l("%B"),b=l("%Y");function w(D){return(u(D)<D?p:s(D)<D?d:a(D)<D?g:o(D)<D?m:r(D)<D?i(D)<D?y:x:n(D)<D?v:b)(D)}return c.invert=function(D){return new Date(h(D))},c.domain=function(D){return arguments.length?f(Array.from(D,yC)):f().map(mC)},c.ticks=function(D){var T=f();return t(T[0],T[T.length-1],D??10)},c.tickFormat=function(D,T){return T==null?w:l(T)},c.nice=function(D){var T=f();return(!D||typeof D.range!="function")&&(D=e(T[0],T[T.length-1],D??10)),D?f(Ry(T,D)):c},c.copy=function(){return $o(c,fh(t,e,n,r,i,o,a,s,u,l))},c}function bC(){return ye.apply(fh(cb,fb,Ye,au,ti,Jr,iu,nu,sn,lh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function vC(){return ye.apply(fh(ub,lb,He,su,ei,So,ou,ru,sn,uu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function lu(){var t=0,e=1,n,r,i,o,a=te,s=!1,u;function l(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))}l.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),l):[t,e]},l.clamp=function(h){return arguments.length?(s=!!h,l):s},l.interpolator=function(h){return arguments.length?(a=h,l):a};function c(h){return function(f){var p,d;return arguments.length?([p,d]=f,a=h(p,d),l):[a(0),a(1)]}}return l.range=c(qe),l.rangeRound=c(Ya),l.unknown=function(h){return arguments.length?(u=h,l):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),l}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Lb(){var t=bn(lu()(te));return t.copy=function(){return vn(t,Lb())},nn.apply(t,arguments)}function Cb(){var t=Jf(lu()).domain([1,10]);return t.copy=function(){return vn(t,Cb()).base(t.base())},nn.apply(t,arguments)}function Eb(){var t=th(lu());return t.copy=function(){return vn(t,Eb()).constant(t.constant())},nn.apply(t,arguments)}function hh(){var t=eh(lu());return t.copy=function(){return vn(t,hh()).exponent(t.exponent())},nn.apply(t,arguments)}function xC(){return hh.apply(null,arguments).exponent(.5)}function kb(){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 kb(e).domain(t)},nn.apply(n,arguments)}function cu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,l=te,c,h=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+c(g))-o)*(r*g<r*o?s:u),l(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=c(t=+t),o=c(e=+e),a=c(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?(l=g,p):l};function d(g){return function(m){var y,x,v;return arguments.length?([y,x,v]=m,l=R0(g,[y,x,v]),p):[l(0),l(.5),l(1)]}}return p.range=d(qe),p.rangeRound=d(Ya),p.unknown=function(g){return arguments.length?(f=g,p):f},function(g){return c=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 Rb(){var t=bn(cu()(te));return t.copy=function(){return vn(t,Rb())},nn.apply(t,arguments)}function Ib(){var t=Jf(cu()).domain([.1,1,10]);return t.copy=function(){return vn(t,Ib()).base(t.base())},nn.apply(t,arguments)}function Nb(){var t=th(cu());return t.copy=function(){return vn(t,Nb()).constant(t.constant())},nn.apply(t,arguments)}function ph(){var t=eh(cu());return t.copy=function(){return vn(t,ph()).exponent(t.exponent())},nn.apply(t,arguments)}function _C(){return ph.apply(null,arguments).exponent(.5)}function ct(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 wC=ct("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),$C=ct("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),SC=ct("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),AC=ct("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),MC=ct("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),DC=ct("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),PC=ct("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),TC=ct("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),LC=ct("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),CC=ct("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),EC=ct("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),vt=t=>v0(t[t.length-1]);var Fb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ct);const kC=vt(Fb);var Gb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ct);const RC=vt(Gb);var zb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ct);const IC=vt(zb);var Ob=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ct);const NC=vt(Ob);var Ub=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ct);const FC=vt(Ub);var Bb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ct);const GC=vt(Bb);var Yb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ct);const zC=vt(Yb);var Hb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ct);const OC=vt(Hb);var Wb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ct);const UC=vt(Wb);var Vb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ct);const BC=vt(Vb);var jb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ct);const YC=vt(jb);var qb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ct);const HC=vt(qb);var Xb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ct);const WC=vt(Xb);var Zb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ct);const VC=vt(Zb);var Kb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ct);const jC=vt(Kb);var Qb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ct);const qC=vt(Qb);var Jb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ct);const XC=vt(Jb);var tv=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ct);const ZC=vt(tv);var ev=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ct);const KC=vt(ev);var nv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ct);const QC=vt(nv);var rv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ct);const JC=vt(rv);var iv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ct);const tE=vt(iv);var ov=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ct);const eE=vt(ov);var av=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ct);const nE=vt(av);var sv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ct);const rE=vt(sv);var uv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ct);const iE=vt(uv);var lv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ct);const oE=vt(lv);function aE(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 sE=Wa(De(300,.5,0),De(-240,.5,1));var uE=Wa(De(-100,.75,.35),De(80,1.5,.8)),lE=Wa(De(260,.75,.35),De(80,1.5,.8)),fu=De();function cE(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return fu.h=360*t-100,fu.s=1.5-1.5*e,fu.l=.8-.9*e,fu+""}var hu=Lr(),fE=Math.PI/3,hE=Math.PI*2/3;function pE(t){var e;return t=(.5-t)*Math.PI,hu.r=255*(e=Math.sin(t))*e,hu.g=255*(e=Math.sin(t+fE))*e,hu.b=255*(e=Math.sin(t+hE))*e,hu+""}function dE(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 pu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const gE=pu(ct("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var mE=pu(ct("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),yE=pu(ct("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),bE=pu(ct("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function lt(t){return function(){return t}}const cv=Math.abs,Ut=Math.atan2,un=Math.cos,vE=Math.max,ri=Math.min,oe=Math.sin,xt=Math.sqrt,Bt=1e-12,xn=Math.PI,du=xn/2,_n=2*xn;function xE(t){return t>1?0:t<-1?xn:Math.acos(t)}function fv(t){return t>=1?du:t<=-1?-du:Math.asin(t)}function Lo(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 _E(t){return t.innerRadius}function wE(t){return t.outerRadius}function $E(t){return t.startAngle}function SE(t){return t.endAngle}function AE(t){return t&&t.padAngle}function ME(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,f=h*u-c*l;if(!(f*f<Bt))return f=(c*(e-o)-h*(t-i))/f,[t+f*u,e+f*l]}function gu(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/xt(s*s+u*u),c=l*u,h=-l*s,f=t+c,p=e+h,d=n+c,g=r+h,m=(f+d)/2,y=(p+g)/2,x=d-f,v=g-p,b=x*x+v*v,w=i-o,D=f*g-d*p,T=(v<0?-1:1)*xt(vE(0,w*w*b-D*D)),$=(D*v-x*T)/b,_=(-D*x-v*T)/b,P=(D*v+x*T)/b,S=(-D*x+v*T)/b,G=$-m,k=_-y,A=P-m,L=S-y;return G*G+k*k>A*A+L*L&&($=P,_=S),{cx:$,cy:_,x01:-c,y01:-h,x11:$*(i/w-1),y11:_*(i/w-1)}}function mu(){var t=_E,e=wE,n=lt(0),r=null,i=$E,o=SE,a=AE,s=null,u=Lo(l);function l(){var c,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-du,g=o.apply(this,arguments)-du,m=cv(g-d),y=g>d;if(s||(s=c=u()),p<f&&(h=p,p=f,f=h),!(p>Bt))s.moveTo(0,0);else if(m>_n-Bt)s.moveTo(p*un(d),p*oe(d)),s.arc(0,0,p,d,g,!y),f>Bt&&(s.moveTo(f*un(g),f*oe(g)),s.arc(0,0,f,g,d,y));else{var x=d,v=g,b=d,w=g,D=m,T=m,$=a.apply(this,arguments)/2,_=$>Bt&&(r?+r.apply(this,arguments):xt(f*f+p*p)),P=ri(cv(p-f)/2,+n.apply(this,arguments)),S=P,G=P,k,A;if(_>Bt){var L=fv(_/f*oe($)),M=fv(_/p*oe($));(D-=L*2)>Bt?(L*=y?1:-1,b+=L,w-=L):(D=0,b=w=(d+g)/2),(T-=M*2)>Bt?(M*=y?1:-1,x+=M,v-=M):(T=0,x=v=(d+g)/2)}var z=p*un(x),U=p*oe(x),E=f*un(w),R=f*oe(w);if(P>Bt){var C=p*un(v),F=p*oe(v),j=f*un(b),Q=f*oe(b),N;if(m<xn)if(N=ME(z,U,j,Q,C,F,E,R)){var q=z-N[0],V=U-N[1],K=C-N[0],W=F-N[1],nt=1/oe(xE((q*K+V*W)/(xt(q*q+V*V)*xt(K*K+W*W)))/2),ut=xt(N[0]*N[0]+N[1]*N[1]);S=ri(P,(f-ut)/(nt-1)),G=ri(P,(p-ut)/(nt+1))}else S=G=0}T>Bt?G>Bt?(k=gu(j,Q,z,U,p,G,y),A=gu(C,F,E,R,p,G,y),s.moveTo(k.cx+k.x01,k.cy+k.y01),G<P?s.arc(k.cx,k.cy,G,Ut(k.y01,k.x01),Ut(A.y01,A.x01),!y):(s.arc(k.cx,k.cy,G,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,G,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!y))):(s.moveTo(z,U),s.arc(0,0,p,x,v,!y)):s.moveTo(z,U),!(f>Bt)||!(D>Bt)?s.lineTo(E,R):S>Bt?(k=gu(E,R,C,F,f,-S,y),A=gu(z,U,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,w,b,y)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xn/2;return[un(h)*c,oe(h)*c]},l.innerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:lt(+c),l):t},l.outerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:lt(+c),l):e},l.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:lt(+c),l):n},l.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:lt(+c),l):r},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:lt(+c),l):i},l.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:lt(+c),l):o},l.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:lt(+c),l):a},l.context=function(c){return arguments.length?(s=c??null,l):s},l}var DE=Array.prototype.slice;function yu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function hv(t){this._context=t}hv.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 bu(t){return new hv(t)}function dh(t){return t[0]}function gh(t){return t[1]}function vu(t,e){var n=lt(!0),r=null,i=bu,o=null,a=Lo(s);t=typeof t=="function"?t:t===void 0?dh:lt(t),e=typeof e=="function"?e:e===void 0?gh:lt(e);function s(u){var l,c=(u=yu(u)).length,h,f=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l<c&&n(h=u[l],l,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,l,u),+e(h,l,u));if(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:lt(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:lt(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:lt(!!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 mh(t,e,n){var r=null,i=lt(!0),o=null,a=bu,s=null,u=Lo(l);t=typeof t=="function"?t:t===void 0?dh:lt(+t),e=typeof e=="function"?e:lt(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?gh:lt(+n);function l(h){var f,p,d,g=(h=yu(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 c(){return vu().defined(i).curve(a).context(o)}return l.x=function(h){return arguments.length?(t=typeof h=="function"?h:lt(+h),r=null,l):t},l.x0=function(h){return arguments.length?(t=typeof h=="function"?h:lt(+h),l):t},l.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:lt(+h),l):r},l.y=function(h){return arguments.length?(e=typeof h=="function"?h:lt(+h),n=null,l):e},l.y0=function(h){return arguments.length?(e=typeof h=="function"?h:lt(+h),l):e},l.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:lt(+h),l):n},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(n)},l.lineX1=function(){return c().x(r).y(e)},l.defined=function(h){return arguments.length?(i=typeof h=="function"?h:lt(!!h),l):i},l.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),l):a},l.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),l):o},l}function PE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function TE(t){return t}function pv(){var t=TE,e=PE,n=null,r=lt(0),i=lt(_n),o=lt(0);function a(s){var u,l=(s=yu(s)).length,c,h,f=0,p=new Array(l),d=new Array(l),g=+r.apply(this,arguments),m=Math.min(_n,Math.max(-_n,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/l,o.apply(this,arguments)),v=x*(m<0?-1:1),b;for(u=0;u<l;++u)(b=d[p[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?p.sort(function(w,D){return e(d[w],d[D])}):n!=null&&p.sort(function(w,D){return n(s[w],s[D])}),u=0,h=f?(m-l*v)/f:0;u<l;++u,g=y)c=p[u],b=d[c],y=g+(b>0?b*h:0)+v,d[c]={data:s[c],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:lt(+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:lt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:lt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:lt(+s),a):o},a}var dv=yh(bu);function gv(t){this._curve=t}gv.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 yh(t){function e(n){return new gv(t(n))}return e._curve=t,e}function Co(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(yh(n)):e()._curve},t}function mv(){return Co(vu().curve(dv))}function yv(){var t=mh().curve(dv),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 Co(n())},delete t.lineX0,t.lineEndAngle=function(){return Co(r())},delete t.lineX1,t.lineInnerRadius=function(){return Co(i())},delete t.lineY0,t.lineOuterRadius=function(){return Co(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(yh(a)):e()._curve},t}function Eo(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class bv{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 LE{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=Eo(this._x0,this._y0),i=Eo(this._x0,this._y0=(this._y0+n)/2),o=Eo(e,this._y0),a=Eo(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function vv(t){return new bv(t,!0)}function xv(t){return new bv(t,!1)}function CE(t){return new LE(t)}function EE(t){return t.source}function kE(t){return t.target}function xu(t){let e=EE,n=kE,r=dh,i=gh,o=null,a=null,s=Lo(u);function u(){let l;const c=DE.call(arguments),h=e.apply(this,c),f=n.apply(this,c);if(o==null&&(a=t(l=s())),a.lineStart(),c[0]=h,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),l)return a=null,l+""||null}return u.source=function(l){return arguments.length?(e=l,u):e},u.target=function(l){return arguments.length?(n=l,u):n},u.x=function(l){return arguments.length?(r=typeof l=="function"?l:lt(+l),u):r},u.y=function(l){return arguments.length?(i=typeof l=="function"?l:lt(+l),u):i},u.context=function(l){return arguments.length?(l==null?o=a=null:a=t(o=l),u):o},u}function RE(){return xu(vv)}function IE(){return xu(xv)}function NE(){const t=xu(CE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const FE=xt(3),_v={draw(t,e){const n=xt(e+ri(e/28,.75))*.59436,r=n/2,i=r*FE;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},_u={draw(t,e){const n=xt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},wv={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()}},$v=xt(1/3),GE=$v*2,Sv={draw(t,e){const n=xt(e/GE),r=n*$v;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Av={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()}},Mv={draw(t,e){const n=xt(e-ri(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Dv={draw(t,e){const n=xt(e),r=-n/2;t.rect(r,r,n,n)}},Pv={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()}},zE=.8908130915292852,Tv=oe(xn/10)/oe(7*xn/10),OE=oe(_n/10)*Tv,UE=-un(_n/10)*Tv,Lv={draw(t,e){const n=xt(e*zE),r=OE*n,i=UE*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=_n*o/5,s=un(a),u=oe(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},bh=xt(3),Cv={draw(t,e){const n=-xt(e/(bh*3));t.moveTo(0,n*2),t.lineTo(-bh*n,-n),t.lineTo(bh*n,-n),t.closePath()}},BE=xt(3),Ev={draw(t,e){const n=xt(e)*.6824,r=n/2,i=n*BE/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ve=-.5,xe=xt(3)/2,vh=1/xt(12),YE=(vh/2+1)*3,kv={draw(t,e){const n=xt(e/YE),r=n/2,i=n*vh,o=r,a=n*vh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ve*r-xe*i,xe*r+ve*i),t.lineTo(ve*o-xe*a,xe*o+ve*a),t.lineTo(ve*s-xe*u,xe*s+ve*u),t.lineTo(ve*r+xe*i,ve*i-xe*r),t.lineTo(ve*o+xe*a,ve*a-xe*o),t.lineTo(ve*s+xe*u,ve*u-xe*s),t.closePath()}},xh={draw(t,e){const n=xt(e-ri(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Rv=[_u,wv,Sv,Dv,Lv,Cv,kv],HE=[_u,Mv,xh,Ev,_v,Pv,Av];function WE(t,e){let n=null,r=Lo(i);t=typeof t=="function"?t:lt(t||_u),e=typeof e=="function"?e:lt(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:lt(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:lt(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}function wu(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 $u(t){this._context=t}$u.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:wu(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:wu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function VE(t){return new $u(t)}function Iv(t){this._context=t}Iv.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:wu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function jE(t){return new Iv(t)}function Nv(t){this._context=t}Nv.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:wu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function qE(t){return new Nv(t)}function Fv(t,e){this._basis=new $u(t),this._beta=e}Fv.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 XE=function t(e){function n(r){return e===1?new $u(r):new Fv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function Su(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 _h(t,e){this._context=t,this._k=(1-e)/6}_h.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:Su(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:Su(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 _h(r,e)}return n.tension=function(r){return t(+r)},n}(0);function wh(t,e){this._context=t,this._k=(1-e)/6}wh.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:Su(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 KE=function t(e){function n(r){return new wh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function $h(t,e){this._context=t,this._k=(1-e)/6}$h.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:Su(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 QE=function t(e){function n(r){return new $h(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Sh(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 l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Gv(t,e){this._context=t,this._alpha=e}Gv.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:Sh(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 JE=function t(e){function n(r){return e?new Gv(r,e):new _h(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: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:Sh(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 tk=function t(e){function n(r){return e?new zv(r,e):new wh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Ov(t,e){this._context=t,this._alpha=e}Ov.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:Sh(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 ek=function t(e){function n(r){return e?new Ov(r,e):new $h(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Uv(t){this._context=t}Uv.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 nk(t){return new Uv(t)}function Bv(t){return t<0?-1:1}function Yv(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(Bv(o)+Bv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Hv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ah(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 Au(t){this._context=t}Au.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:Ah(this,this._t0,Hv(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,Ah(this,Hv(this,n=Yv(this,t,e)),n);break;default:Ah(this,this._t0,n=Yv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Wv(t){this._context=new Vv(t)}(Wv.prototype=Object.create(Au.prototype)).point=function(t,e){Au.prototype.point.call(this,e,t)};function Vv(t){this._context=t}Vv.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 rk(t){return new Au(t)}function ik(t){return new Wv(t)}function jv(t){this._context=t}jv.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=qv(t),i=qv(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 qv(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 ok(t){return new jv(t)}function Mu(t,e){this._context=t,this._t=e}Mu.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 ak(t){return new Mu(t,.5)}function sk(t){return new Mu(t,0)}function uk(t){return new Mu(t,1)}function ii(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 oi(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function lk(t,e){return t[e]}function ck(t){const e=[];return e.key=t,e}function fk(){var t=lt([]),e=oi,n=ii,r=lk;function i(o){var a=Array.from(t.apply(this,arguments),ck),s,u=a.length,l=-1,c;for(const h of o)for(s=0,++l;s<u;++s)(a[s][l]=[0,+r(h,a[s].key,l,o)]).data=h;for(s=0,c=yu(e(a));s<u;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:lt(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:lt(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?oi:typeof o=="function"?o:lt(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ii,i):n},i}function hk(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}ii(t,e)}}function pk(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,l=t[e[0]].length;r<l;++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 dk(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}ii(t,e)}}function gk(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,l=0;s<a;++s){for(var c=t[e[s]],h=c[r][1]||0,f=c[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,l+=p*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=l/u)}i[r-1][1]+=i[r-1][0]=n,ii(t,e)}}function Xv(t){var e=t.map(mk);return oi(t).sort(function(n,r){return e[n]-e[r]})}function mk(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 Zv(t){var e=t.map(Kv);return oi(t).sort(function(n,r){return e[n]-e[r]})}function Kv(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function yk(t){return Zv(t).reverse()}function bk(t){var e=t.length,n,r,i=t.map(Kv),o=Xv(t),a=0,s=0,u=[],l=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],l.push(r));return l.reverse().concat(u)}function vk(t){return oi(t).reverse()}const Du=t=>()=>t;function xk(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 We(t,e,n){this.k=t,this.x=e,this.y=n}We.prototype={constructor:We,scale:function(t){return t===1?this:new We(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new We(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 Pu=new We(1,0,0);Qv.prototype=We.prototype;function Qv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Pu;return t.__zoom}function Mh(t){t.stopImmediatePropagation()}function ko(t){t.preventDefault(),t.stopImmediatePropagation()}function _k(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function wk(){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 Jv(){return this.__zoom||Pu}function $k(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Sk(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ak(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 t2(){var t=_k,e=wk,n=Ak,r=$k,i=Sk,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=L0,l=Nn("start","zoom","end"),c,h,f,p=500,d=150,g=0,m=10;function y(A){A.property("__zoom",Jv).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",P).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,L,M,z){var U=A.selection?A.selection():A;U.property("__zoom",Jv),A!==U?w(A,L,M,z):U.interrupt().each(function(){D(this,arguments).event(z).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},y.scaleBy=function(A,L,M,z){y.scaleTo(A,function(){var U=this.__zoom.k,E=typeof L=="function"?L.apply(this,arguments):L;return U*E},M,z)},y.scaleTo=function(A,L,M,z){y.transform(A,function(){var U=e.apply(this,arguments),E=this.__zoom,R=M==null?b(U):typeof M=="function"?M.apply(this,arguments):M,C=E.invert(R),F=typeof L=="function"?L.apply(this,arguments):L;return n(v(x(E,F),R,C),U,a)},M,z)},y.translateBy=function(A,L,M,z){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,z)},y.translateTo=function(A,L,M,z,U){y.transform(A,function(){var E=e.apply(this,arguments),R=this.__zoom,C=z==null?b(E):typeof z=="function"?z.apply(this,arguments):z;return n(Pu.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)},z,U)};function x(A,L){return L=Math.max(o[0],Math.min(o[1],L)),L===A.k?A:new We(L,A.x,A.y)}function v(A,L,M){var z=L[0]-M[0]*A.k,U=L[1]-M[1]*A.k;return z===A.x&&U===A.y?A:new We(A.k,z,U)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function w(A,L,M,z){A.on("start.zoom",function(){D(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(z).end()}).tween("zoom",function(){var U=this,E=arguments,R=D(U,E).event(z),C=e.apply(U,E),F=M==null?b(C):typeof M=="function"?M.apply(U,E):M,j=Math.max(C[1][0]-C[0][0],C[1][1]-C[0][1]),Q=U.__zoom,N=typeof L=="function"?L.apply(U,E):L,q=u(Q.invert(F).concat(j/Q.k),N.invert(F).concat(j/N.k));return function(V){if(V===1)V=N;else{var K=q(V),W=j/K[2];V=new We(W,F[0]-K[0]*W,F[1]-K[1]*W)}R.zoom(null,V)}})}function D(A,L,M){return!M&&A.__zooming||new T(A,L)}function T(A,L){this.that=A,this.args=L,this.active=0,this.sourceEvent=null,this.extent=e.apply(A,L),this.taps=0}T.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=X(this.that).datum();l.call(A,this.that,new xk(A,{sourceEvent:this.sourceEvent,target:y,type:A,transform:this.that.__zoom,dispatch:l}),L)}};function $(A,...L){if(!t.apply(this,arguments))return;var M=D(this,L).event(A),z=this.__zoom,U=Math.max(o[0],Math.min(o[1],z.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]=z.invert(M.mouse[0]=E)),clearTimeout(M.wheel);else{if(z.k===U)return;M.mouse=[E,z.invert(E)],Hn(this),M.start()}ko(A),M.wheel=setTimeout(R,d),M.zoom("mouse",n(v(x(z,U),M.mouse[0],M.mouse[1]),M.extent,a));function R(){M.wheel=null,M.end()}}function _(A,...L){if(f||!t.apply(this,arguments))return;var M=A.currentTarget,z=D(this,L,!0).event(A),U=X(A.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",j,!0),E=ue(A,M),R=A.clientX,C=A.clientY;La(A.view),Mh(A),z.mouse=[E,this.__zoom.invert(E)],Hn(this),z.start();function F(Q){if(ko(Q),!z.moved){var N=Q.clientX-R,q=Q.clientY-C;z.moved=N*N+q*q>g}z.event(Q).zoom("mouse",n(v(z.that.__zoom,z.mouse[0]=ue(Q,M),z.mouse[1]),z.extent,a))}function j(Q){U.on("mousemove.zoom mouseup.zoom",null),Ca(Q.view,z.moved),ko(Q),z.event(Q).end()}}function P(A,...L){if(t.apply(this,arguments)){var M=this.__zoom,z=ue(A.changedTouches?A.changedTouches[0]:A,this),U=M.invert(z),E=M.k*(A.shiftKey?.5:2),R=n(v(x(M,E),z,U),e.apply(this,L),a);ko(A),s>0?X(this).transition().duration(s).call(w,R,z,A):X(this).call(y.transform,R,z,A)}}function S(A,...L){if(t.apply(this,arguments)){var M=A.touches,z=M.length,U=D(this,L,A.changedTouches.length===z).event(A),E,R,C,F;for(Mh(A),R=0;R<z;++R)C=M[R],F=ue(C,this),F=[F,this.__zoom.invert(F),C.identifier],U.touch0?!U.touch1&&U.touch0[2]!==F[2]&&(U.touch1=F,U.taps=0):(U.touch0=F,E=!0,U.taps=1+!!c);c&&(c=clearTimeout(c)),E&&(U.taps<2&&(h=F[0],c=setTimeout(function(){c=null},p)),Hn(this),U.start())}}function G(A,...L){if(this.__zooming){var M=D(this,L).event(A),z=A.changedTouches,U=z.length,E,R,C,F;for(ko(A),E=0;E<U;++E)R=z[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],N=M.touch1[0],q=M.touch1[1],V=(V=N[0]-j[0])*V+(V=N[1]-j[1])*V,K=(K=q[0]-Q[0])*K+(K=q[1]-Q[1])*K;R=x(R,Math.sqrt(V/K)),C=[(j[0]+N[0])/2,(j[1]+N[1])/2],F=[(Q[0]+q[0])/2,(Q[1]+q[1])/2]}else if(M.touch0)C=M.touch0[0],F=M.touch0[1];else return;M.zoom("touch",n(v(R,C,F),M.extent,a))}}function k(A,...L){if(this.__zooming){var M=D(this,L).event(A),z=A.changedTouches,U=z.length,E,R;for(Mh(A),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),E=0;E<U;++E)R=z[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=X(this).on("dblclick.zoom");C&&C.apply(this,arguments)}}}return y.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:Du(+A),y):r},y.filter=function(A){return arguments.length?(t=typeof A=="function"?A:Du(!!A),y):t},y.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:Du(!!A),y):i},y.extent=function(A){return arguments.length?(e=typeof A=="function"?A:Du([[+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=l.on.apply(l,arguments);return A===l?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 Dh=Object.freeze(Object.defineProperty({__proto__:null,Adder:Tt,Delaunay:Fc,FormatSpecifier:cs,InternMap:Pi,InternSet:kn,Node:tr,Path:Xi,Voronoi:bm,ZoomTransform:We,active:T4,arc:mu,area:mh,areaRadial:yv,ascending:_t,autoType:JD,axisBottom:_5,axisLeft:Eg,axisRight:x5,axisTop:Cg,bin:xg,bisect:En,bisectCenter:y3,bisectLeft:m3,bisectRight:og,bisector:ma,blob:nP,blur:b3,blur2:ag,blurImage:v3,brush:B4,brushSelection:z4,brushX:O4,brushY:U4,buffer:iP,chord:H4,chordDirected:V4,chordTranspose:W4,cluster:mT,color:pn,contourDensity:bD,contours:Ec,count:ba,create:n8,creator:Da,cross:M3,csv:sP,csvFormat:BD,csvFormatBody:YD,csvFormatRow:WD,csvFormatRows:HD,csvFormatValue:VD,csvParse:wm,csvParseRows:UD,cubehelix:De,cumsum:D3,curveBasis:VE,curveBasisClosed:jE,curveBasisOpen:qE,curveBumpX:vv,curveBumpY:xv,curveBundle:XE,curveCardinal:ZE,curveCardinalClosed:KE,curveCardinalOpen:QE,curveCatmullRom:JE,curveCatmullRomClosed:tk,curveCatmullRomOpen:ek,curveLinear:bu,curveLinearClosed:nk,curveMonotoneX:rk,curveMonotoneY:ik,curveNatural:ok,curveStep:ak,curveStepAfter:uk,curveStepBefore:sk,descending:rg,deviation:lg,difference:u5,disjoint:l5,dispatch:Nn,drag:Hg,dragDisable:La,dragEnable:Ca,dsv:aP,dsvFormat:as,easeBack:Q0,easeBackIn:_4,easeBackInOut:Q0,easeBackOut:w4,easeBounce:Vi,easeBounceIn:v4,easeBounceInOut:x4,easeBounceOut:Vi,easeCircle:K0,easeCircleIn:l4,easeCircleInOut:K0,easeCircleOut:c4,easeCubic:Wi,easeCubicIn:e4,easeCubicInOut:Wi,easeCubicOut:n4,easeElastic:ji,easeElasticIn:$4,easeElasticInOut:S4,easeElasticOut:ji,easeExp:Z0,easeExpIn:s4,easeExpInOut:Z0,easeExpOut:u4,easeLinear:QM,easePoly:V0,easePolyIn:r4,easePolyInOut:V0,easePolyOut:i4,easeQuad:W0,easeQuadIn:JM,easeQuadInOut:W0,easeQuadOut:t4,easeSin:X0,easeSinIn:o4,easeSinInOut:X0,easeSinOut:a4,every:n5,extent:Di,fcumsum:T3,filter:i5,flatGroup:L3,flatRollup:C3,forceCenter:gP,forceCollide:Dm,forceLink:IP,forceManyBody:Cm,forceRadial:YP,forceSimulation:Lm,forceX:Em,forceY:km,get format(){return Ji},formatDefaultLocale:Um,formatLocale:Om,get formatPrefix(){return Yc},formatSpecifier:Br,fsum:P3,geoAlbers:ey,geoAlbersUsa:q7,geoArea:JP,geoAzimuthalEqualArea:X7,geoAzimuthalEqualAreaRaw:Tf,geoAzimuthalEquidistant:Z7,geoAzimuthalEquidistantRaw:Lf,geoBounds:r7,geoCentroid:l7,geoCircle:c7,geoClipAntimeridian:uf,geoClipCircle:$1,geoClipExtent:y7,geoClipRectangle:Es,geoConicConformal:Q7,geoConicConformalRaw:iy,geoConicEqualArea:Hs,geoConicEqualAreaRaw:ty,geoConicEquidistant:tT,geoConicEquidistantRaw:oy,geoContains:S7,geoDistance:Is,geoEqualEarth:nT,geoEqualEarthRaw:Cf,geoEquirectangular:J7,geoEquirectangularRaw:mo,geoGnomonic:rT,geoGnomonicRaw:Ef,geoGraticule:k1,geoGraticule10:A7,geoIdentity:iT,geoInterpolate:M7,geoLength:S1,geoMercator:K7,geoMercatorRaw:go,geoNaturalEarth1:oT,geoNaturalEarth1Raw:kf,geoOrthographic:aT,geoOrthographicRaw:Rf,geoPath:G7,geoProjection:Be,geoProjectionMutator:Df,geoRotation:g1,geoStereographic:sT,geoStereographicRaw:If,geoStream:Te,geoTransform:z7,geoTransverseMercator:uT,geoTransverseMercatorRaw:Nf,gray:w8,greatest:_g,greatestIndex:K3,group:pg,groupSort:R3,groups:dg,hcl:za,hierarchy:js,histogram:xg,hsl:Ia,html:pP,image:lP,index:E3,indexes:k3,interpolate:qe,interpolateArray:P8,interpolateBasis:g0,interpolateBasisClosed:m0,interpolateBlues:tE,interpolateBrBG:kC,interpolateBuGn:BC,interpolateBuPu:YC,interpolateCividis:aE,interpolateCool:lE,interpolateCubehelix:Y8,interpolateCubehelixDefault:sE,interpolateCubehelixLong:Wa,interpolateDate:w0,interpolateDiscrete:C8,interpolateGnBu:HC,interpolateGreens:eE,interpolateGreys:nE,interpolateHcl:U8,interpolateHclLong:B8,interpolateHsl:G8,interpolateHslLong:z8,interpolateHue:E8,interpolateInferno:yE,interpolateLab:O8,interpolateMagma:mE,interpolateNumber:de,interpolateNumberArray:rc,interpolateObject:$0,interpolateOrRd:WC,interpolateOranges:oE,interpolatePRGn:RC,interpolatePiYG:IC,interpolatePlasma:bE,interpolatePuBu:jC,interpolatePuBuGn:VC,interpolatePuOr:NC,interpolatePuRd:qC,interpolatePurples:rE,interpolateRainbow:cE,interpolateRdBu:FC,interpolateRdGy:GC,interpolateRdPu:XC,interpolateRdYlBu:zC,interpolateRdYlGn:OC,interpolateReds:iE,interpolateRgb:Gi,interpolateRgbBasis:v0,interpolateRgbBasisClosed:D8,interpolateRound:Ya,interpolateSinebow:pE,interpolateSpectral:UC,interpolateString:ac,interpolateTransformCss:D0,interpolateTransformSvg:P0,interpolateTurbo:dE,interpolateViridis:gE,interpolateWarm:uE,interpolateYlGn:KC,interpolateYlGnBu:ZC,interpolateYlOrBr:QC,interpolateYlOrRd:JC,interpolateZoom:L0,interrupt:Hn,intersection:c5,interval:q8,isoFormat:hC,isoParse:gC,json:fP,lab:Ga,lch:$8,least:Z3,leastIndex:Sg,line:vu,lineRadial:mv,link:xu,linkHorizontal:RE,linkRadial:NE,linkVertical:IE,local:Bg,map:o5,matcher:Bl,max:Ti,maxIndex:Il,mean:B3,median:Y3,medianIndex:H3,merge:Fl,min:_a,minIndex:Nl,mode:V3,namespace:ki,namespaces:Ol,nice:kl,now:Yi,pack:VT,packEnclose:OT,packSiblings:HT,pairs:j3,partition:jT,path:Cc,pathRound:X4,permute:vg,pie:pv,piecewise:R0,pointRadial:Eo,pointer:ue,pointers:i8,polygonArea:u9,polygonCentroid:l9,polygonContains:p9,polygonHull:h9,polygonLength:d9,precisionFixed:Bm,precisionPrefix:Ym,precisionRound:Hm,quadtree:us,quantile:Ci,quantileIndex:$g,quantileSorted:wg,quantize:H8,quickselect:wa,radialArea:yv,radialLine:mv,randomBates:b9,randomBernoulli:_9,randomBeta:Dy,randomBinomial:Py,randomCauchy:$9,randomExponential:v9,randomGamma:Vf,randomGeometric:My,randomInt:m9,randomIrwinHall:Ay,randomLcg:P9,randomLogNormal:y9,randomLogistic:S9,randomNormal:Wf,randomPareto:x9,randomPoisson:A9,randomUniform:g9,randomWeibull:w9,range:fn,rank:X3,reduce:a5,reverse:s5,rgb:Lr,ribbon:rD,ribbonArrow:iD,rollup:mg,rollups:yg,scaleBand:Xf,scaleDiverging:Rb,scaleDivergingLog:Ib,scaleDivergingPow:ph,scaleDivergingSqrt:_C,scaleDivergingSymlog:Nb,scaleIdentity:ky,scaleImplicit:jf,scaleLinear:eu,scaleLog:Gy,scaleOrdinal:qf,scalePoint:Zf,scalePow:Kr,scaleQuantile:Wy,scaleQuantize:Vy,scaleRadial:Hy,scaleSequential:Lb,scaleSequentialLog:Cb,scaleSequentialPow:hh,scaleSequentialQuantile:kb,scaleSequentialSqrt:xC,scaleSequentialSymlog:Eb,scaleSqrt:O9,scaleSymlog:Uy,scaleThreshold:jy,scaleTime:bC,scaleUtc:vC,scan:Q3,schemeAccent:$C,schemeBlues:iv,schemeBrBG:Fb,schemeBuGn:Vb,schemeBuPu:jb,schemeCategory10:wC,schemeDark2:SC,schemeGnBu:qb,schemeGreens:ov,schemeGreys:av,schemeObservable10:AC,schemeOrRd:Xb,schemeOranges:lv,schemePRGn:Gb,schemePaired:MC,schemePastel1:DC,schemePastel2:PC,schemePiYG:zb,schemePuBu:Kb,schemePuBuGn:Zb,schemePuOr:Ob,schemePuRd:Qb,schemePurples:sv,schemeRdBu:Ub,schemeRdGy:Bb,schemeRdPu:Jb,schemeRdYlBu:Yb,schemeRdYlGn:Hb,schemeReds:uv,schemeSet1:TC,schemeSet2:LC,schemeSet3:CC,schemeSpectral:Wb,schemeTableau10:EC,schemeYlGn:ev,schemeYlGnBu:tv,schemeYlOrBr:nv,schemeYlOrRd:rv,select:X,selectAll:o8,selection:Gn,selector:Pa,selectorAll:Ul,shuffle:J3,shuffler:Ag,some:r5,sort:Ll,stack:fk,stackOffsetDiverging:pk,stackOffsetExpand:hk,stackOffsetNone:ii,stackOffsetSilhouette:dk,stackOffsetWiggle:gk,stackOrderAppearance:Xv,stackOrderAscending:Zv,stackOrderDescending:yk,stackOrderInsideOut:bk,stackOrderNone:oi,stackOrderReverse:vk,stratify:KT,style:Fn,subset:h5,sum:Mg,superset:Pg,svg:dP,symbol:WE,symbolAsterisk:_v,symbolCircle:_u,symbolCross:wv,symbolDiamond:Sv,symbolDiamond2:Av,symbolPlus:Mv,symbolSquare:Dv,symbolSquare2:Pv,symbolStar:Lv,symbolTimes:xh,symbolTriangle:Cv,symbolTriangle2:Ev,symbolWye:kv,symbolX:xh,symbols:Rv,symbolsFill:Rv,symbolsStroke:HE,text:ss,thresholdFreedmanDiaconis:O3,thresholdScott:U3,thresholdSturges:Rl,tickFormat:Ey,tickIncrement:In,tickStep:xa,ticks:Rn,timeDay:Jr,timeDays:V9,get timeFormat(){return lh},timeFormatDefaultLocale:Pb,timeFormatLocale:hb,timeFriday:Jy,timeFridays:J9,timeHour:iu,timeHours:H9,timeInterval:Dt,timeMillisecond:Qr,timeMilliseconds:qy,timeMinute:nu,timeMinutes:B9,timeMonday:Ao,timeMondays:X9,timeMonth:au,timeMonths:sL,get timeParse(){return Db},timeSaturday:tb,timeSaturdays:tL,timeSecond:sn,timeSeconds:Zy,timeSunday:ti,timeSundays:eb,timeThursday:rr,timeThursdays:Q9,timeTickInterval:fb,timeTicks:cb,timeTuesday:Ky,timeTuesdays:Z9,timeWednesday:Qy,timeWednesdays:K9,timeWeek:ti,timeWeeks:eb,timeYear:Ye,timeYears:lL,timeout:lc,timer:Xa,timerFlush:F0,transition:Y0,transpose:Dg,tree:i9,treemap:$y,treemapBinary:o9,treemapDice:wo,treemapResquarify:s9,treemapSlice:Qs,treemapSliceDice:a9,treemapSquarify:Hf,tsv:uP,tsvFormat:qD,tsvFormatBody:XD,tsvFormatRow:KD,tsvFormatRows:ZD,tsvFormatValue:QD,tsvParse:$m,tsvParseRows:jD,union:p5,unixDay:ah,unixDays:q9,utcDay:So,utcDays:j9,get utcFormat(){return uu},utcFriday:ib,utcFridays:oL,utcHour:ou,utcHours:W9,utcMillisecond:Qr,utcMilliseconds:qy,utcMinute:ru,utcMinutes:Y9,utcMonday:Mo,utcMondays:eL,utcMonth:su,utcMonths:uL,get utcParse(){return ch},utcSaturday:ob,utcSaturdays:aL,utcSecond:sn,utcSeconds:Zy,utcSunday:ei,utcSundays:ab,utcThursday:or,utcThursdays:iL,utcTickInterval:lb,utcTicks:ub,utcTuesday:nb,utcTuesdays:nL,utcWednesday:rb,utcWednesdays:rL,utcWeek:ei,utcWeeks:ab,utcYear:He,utcYears:cL,variance:ug,window:Yl,xml:hP,zip:e5,zoom:t2,zoomIdentity:Pu,zoomTransform:Qv},Symbol.toStringTag,{value:"Module"}));function e2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function Mk(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 Ro(t){return t.substring(0,4)!=="ease"?Wi:Dh[t]??Wi}function Tu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=eu().domain([0,1]).range([0,t/2]),a=o(n);return mu().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Ph=(t,e)=>e instanceof Function?e(t):Ji(e)(t);function n2(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 Dk(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 Pk(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return Dk(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 Lu({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 at(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 at(t,e,r)}const ai=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=at(e,"series"),u=at(e,"axes"),l=at(e,"graphic"),c=r.pipe(O((d,g)=>t.selectAll(`g.${s}`).data(d,m=>m).join(m=>m.append("g").classed(s,!0).each((y,x,v)=>{X(v[x]).selectAll(`g.${u}`).data([x]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((w,D,T)=>{X(T[D]).selectAll("defs").data([D]).join("defs"),X(T[D]).selectAll("g").data([D]).join("g").classed(l,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),Pt(1));B({seriesSelection:c,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:c,gridAxesTransform:o}).pipe(Y(async d=>d),O(d=>d.seriesSelection.select(`g.${u}`).style("transform",d.gridAxesTransform.value)),Pt(1)),f=h.pipe(O(d=>d.select("defs")),Pt(1)),p=B({axesSelection:h,gridGraphicTransform:a}).pipe(Y(async d=>d),O(d=>{const g=d.axesSelection.select(`g.${l}`);return g.transition().duration(50).style("transform",d.gridGraphicTransform.value),g}),Pt(1));return{seriesSelection$:c,axesSelection$:h,defsSelection$:f,graphicGSelection$:p}},Th=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new et,o=new pt(a=>{B({dataFormatter:t,computedData:n}).pipe(I(i),Y(async s=>s)).subscribe(s=>{const l=s.computedData[0]?s.computedData[0].length-1:0,c=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"?l+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>=c&&g<=h);a.next(p)})});return new pt(a=>{B({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(I(i),Y(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",l=h3({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),c=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=c(f),d=l(p);return{groupIndex:d,groupLabel:s.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})};function Tk(t="curveLinear"){return vu().x(e=>e.axisX).y(e=>e.axisY).curve(Dh[t])}function Lk(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 Ck({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 Ek({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?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function kk({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)=>{X(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(Ro(r)).tween("tween",(l,c,h)=>f=>{const p=l.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 r2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new et,v=$n(t,"clipPath-box"),b=at(t,"path"),{seriesSelection$:w,axesSelection$:D,defsSelection$:T,graphicGSelection$:$}=ai({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),_=new pt(M=>{const z=l.pipe(I(x)).subscribe(U=>{if(!U)return;const E=Tk(U.lineCurve);M.next(E)});return()=>{z.unsubscribe()}}),P=h.pipe(O(M=>M.transitionDuration),rt()),S=h.pipe(O(M=>M.transitionEase),rt());B({defsSelection:T,seriesLabels:a,axisSize:d,transitionDuration:P,transitionEase:S}).pipe(I(x),Y(async M=>M)).subscribe(M=>{const U=[{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})));kk({defsSelection:M.defsSelection,clipPathData:U,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const G=n.pipe(O(M=>{const z=new Map;return M.flat().forEach(U=>z.set(U.id,U)),z})),k=Th({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),A=h.pipe(I(x),O(M=>M.highlightTarget),rt()),L=B({graphicGSelection:$,visibleComputedLayoutData:o,linePath:_,params:l}).pipe(I(x),Y(async M=>M),O(M=>{let z=[];return M.graphicGSelection.each((U,E,R)=>{const C=Lk(M.visibleComputedLayoutData[E]??[]);z[E]=Ck({selection:X(R[E]),pathClassName:b,linePath:M.linePath,segmentData:C,params:M.params})}),z}));return B({pathSelectionArr:L,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:A,gridGroupPositionFn:k}).pipe(I(x),Y(async M=>M)).subscribe(M=>{M.pathSelectionArr.forEach(z=>{z.on("mouseover",(U,E)=>{U.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:F}=M.gridGroupPositionFn(U),N=M.GroupDataMap.get(F).find(q=>q.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:N,gridIndex:N.gridIndex,series:M.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:M.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:U,data:M.computedData})}).on("mousemove",(U,E)=>{U.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:F}=M.gridGroupPositionFn(U),N=M.GroupDataMap.get(F).find(q=>q.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:N,gridIndex:N.gridIndex,series:M.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:M.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:U,data:M.computedData})}).on("mouseout",(U,E)=>{U.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:F}=M.gridGroupPositionFn(U),N=M.GroupDataMap.get(F).find(q=>q.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:N,gridIndex:N.gridIndex,series:M.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:M.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:U,data:M.computedData})}).on("click",(U,E)=>{U.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:F}=M.gridGroupPositionFn(U),N=M.GroupDataMap.get(F).find(q=>q.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:N,gridIndex:N.gridIndex,series:M.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:M.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:U,data:M.computedData})})})}),h.pipe(I(x),hr(M=>M.highlightTarget==="series"),Y(M=>B({graphicGSelection:$,gridHighlight:g,DataMap:G,fullChartParams:h}).pipe(I(x),Y(async z=>z)))).subscribe(M=>{const z=M.gridHighlight[0]?M.gridHighlight[0].seriesLabel:null;Ek({selection:M.graphicGSelection,seriesLabel:z,fullChartParams:M.fullChartParams})}),()=>{x.next(void 0)}},i2="Lines",Rk=se(i2,sr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=r2(i2,{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 Ik(t="curveLinear",e){return mh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(Dh[t])}function Nk(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 Fk({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 Gk({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?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}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`
|
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 IR({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)=>{X(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(Ro(r)).tween("tween",(l,c,h)=>f=>{const p=l.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 n2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:y,event$:x})=>{const v=new rt,b=$n(t,"clipPath-box"),$=at(t,"path"),{seriesSelection$:_,axesSelection$:P,defsSelection$:T,graphicGSelection$:w}=ai({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),D=p.pipe(I(v),O(E=>-E.translate[1]/E.scale[1])),S=new ft(E=>{const k=B({fullParams:l,valueAxisStart:D}).pipe(I(v)).subscribe(C=>{const F=LR(C.fullParams.lineCurve,C.valueAxisStart);E.next(F)});return()=>{k.unsubscribe()}}),z=h.pipe(O(E=>E.transitionDuration),tt()),R=h.pipe(O(E=>E.transitionEase),tt());B({defsSelection:T,seriesLabels:a,axisSize:d,transitionDuration:z,transitionEase:R}).pipe(I(v),Y(async E=>E)).subscribe(E=>{const C=[{id:b,width:E.axisSize.width,height:E.axisSize.height}].concat(E.seriesLabels.map(F=>({id:`orbcharts__clipPath_${F}`,width:E.axisSize.width,height:E.axisSize.height})));IR({defsSelection:E.defsSelection,clipPathData:C,transitionDuration:E.transitionDuration,transitionEase:E.transitionEase})});const A=n.pipe(O(E=>{const k=new Map;return E.flat().forEach(C=>k.set(C.id,C)),k})),L=Dh({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),M=h.pipe(I(v),O(E=>E.highlightTarget),tt()),G=a.pipe(I(v),O(E=>E.map((k,C)=>$n(t,`lineargradient-${k}`)))),U=B({graphicGSelection:w,defsSelection:T,visibleComputedLayoutData:o,linearGradientIds:G,areaPath:S,params:l}).pipe(I(v),Y(async E=>E),O(E=>{let k=[];return E.graphicGSelection.each((C,F,V)=>{const Q=CR(E.visibleComputedLayoutData[F]??[]);k[F]=ER({selection:X(V[F]),pathClassName:$,areaPath:E.areaPath,segmentData:Q,linearGradientIds:E.linearGradientIds,params:E.params}),kR({defsSelection:E.defsSelection,computedData:E.visibleComputedLayoutData,linearGradientIds:E.linearGradientIds,params:E.params})}),k}));return B({pathSelectionArr:U,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:M,gridGroupPositionFn:L}).pipe(I(v),Y(async E=>E)).subscribe(E=>{E.pathSelectionArr.forEach(k=>{k.on("mouseover",(C,F)=>{C.stopPropagation();const V=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:N}=E.gridGroupPositionFn(C),Z=E.GroupDataMap.get(N).find(W=>W.seriesLabel===V)??F[0];x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:Z,gridIndex:Z.gridIndex,series:E.SeriesDataMap.get(Z.seriesLabel),seriesIndex:Z.seriesIndex,seriesLabel:Z.seriesLabel,groups:E.GroupDataMap.get(Z.groupLabel),groupIndex:Z.groupIndex,groupLabel:Z.groupLabel,event:C,data:E.computedData})}).on("mousemove",(C,F)=>{C.stopPropagation();const V=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:N}=E.gridGroupPositionFn(C),Z=E.GroupDataMap.get(N).find(W=>W.seriesLabel===V)??F[0];x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:Z,gridIndex:Z.gridIndex,series:E.SeriesDataMap.get(Z.seriesLabel),seriesIndex:Z.seriesIndex,seriesLabel:Z.seriesLabel,groups:E.GroupDataMap.get(Z.groupLabel),groupIndex:Z.groupIndex,groupLabel:Z.groupLabel,event:C,data:E.computedData})}).on("mouseout",(C,F)=>{C.stopPropagation();const V=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:N}=E.gridGroupPositionFn(C),Z=E.GroupDataMap.get(N).find(W=>W.seriesLabel===V)??F[0];x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:Z,gridIndex:Z.gridIndex,series:E.SeriesDataMap.get(Z.seriesLabel),seriesIndex:Z.seriesIndex,seriesLabel:Z.seriesLabel,groups:E.GroupDataMap.get(Z.groupLabel),groupIndex:Z.groupIndex,groupLabel:Z.groupLabel,event:C,data:E.computedData})}).on("click",(C,F)=>{C.stopPropagation();const V=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:N}=E.gridGroupPositionFn(C),Z=E.GroupDataMap.get(N).find(W=>W.seriesLabel===V)??F[0];x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:Z,gridIndex:Z.gridIndex,series:E.SeriesDataMap.get(Z.seriesLabel),seriesIndex:Z.seriesIndex,seriesLabel:Z.seriesLabel,groups:E.GroupDataMap.get(Z.groupLabel),groupIndex:Z.groupIndex,groupLabel:Z.groupLabel,event:C,data:E.computedData})})})}),h.pipe(I(v),hr(E=>E.highlightTarget==="series"),Y(E=>B({graphicGSelection:w,gridHighlight:g,DataMap:A,fullChartParams:h}).pipe(I(v),Y(async k=>k)))).subscribe(E=>{const k=E.gridHighlight[0]?E.gridHighlight[0].seriesLabel:null;RR({selection:E.graphicGSelection,seriesLabel:k,fullChartParams:E.fullChartParams})}),()=>{v.next(void 0)}},r2="LineAreas",NR=se(r2,jh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=n2(r2,{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()}}),i2=.3;function o2({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 FR(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return jf().domain(e).range([-i/2+r,i/2-r])}function GR(t,e){return t<=1?0:e/(t-1)*i2}function zR(t,e){return t<=1?e:e*(1-i2)}function OR({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:l,delayGroup:c,transitionItem:h,isSeriesSeprate:f}){const p=u/2;return t.each((g,m,y)=>{X(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",l[m][0]??1).attr("ry",l[m][1]??1).transition().duration(h).ease(Ro(s.transitionEase)).delay((x,v)=>x.groupIndex*c).attr("height",x=>Math.abs(x.axisYFromZero))}),t.selectAll(`rect.${e}`)}function UR({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)=>{X(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 BR({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)?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Th=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new rt,b=$n(t,"clipPath-box"),$=at(t,"rect"),{seriesSelection$:_,axesSelection$:P,defsSelection$:T,graphicGSelection$:w}=ai({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),D=o.pipe(I(v),O(k=>k.map(C=>C[0]?C[0].axisY-C[0].axisYFromZero:0)),tt()),S=B({computedData:n,visibleComputedData:i,params:l,gridAxesSize:d,isSeriesSeprate:y}).pipe(I(v),Y(async k=>k),O(k=>k.params.barWidth?k.params.barWidth:k.isSeriesSeprate?o2({axisWidth:k.gridAxesSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barAmountOfGroup:1,barPadding:k.params.barPadding,barGroupPadding:k.params.barGroupPadding}):o2({axisWidth:k.gridAxesSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barAmountOfGroup:k.visibleComputedData.length,barPadding:k.params.barPadding,barGroupPadding:k.params.barGroupPadding})),tt()),z=B({computedData:n,barWidth:S,params:l,gridGraphicReverseScale:p}).pipe(I(v),Y(async k=>k),O(k=>{const C=k.barWidth/2,F=k.params.barRadius===!0?C:k.params.barRadius===!1?0:typeof k.params.barRadius=="number"?k.params.barRadius:0;return k.computedData.map((V,Q)=>{const N=k.gridGraphicReverseScale[Q]??k.gridGraphicReverseScale[0];let j=F*N[0],q=F*N[1];if(j>C){const Z=C/j;j=j*Z,q=q*Z}return[j,q]})})),R=i.pipe(I(v),O(k=>{const C=new Set;return k.forEach(F=>{F.forEach(V=>{C.add(V.groupLabel)})}),Array.from(C)})),A=B({seriesLabels:a,barWidth:S,params:l}).pipe(I(v),Y(async k=>k),O(k=>FR(k.barWidth,k.seriesLabels,k.params))),L=c.pipe(I(v),O(k=>k.transitionDuration),tt()),M=new ft(k=>{B({groupLabels:R,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const F=GR(C.groupLabels.length,C.transitionDuration);k.next(F)})}).pipe(I(v),tt()),G=new ft(k=>{B({groupLabels:R,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const F=zR(C.groupLabels.length,C.transitionDuration);k.next(F)})}).pipe(I(v),tt());B({defsSelection:T,gridAxesSize:d}).pipe(I(v),Y(async k=>k)).subscribe(k=>{const C=[{id:b,width:k.gridAxesSize.width,height:k.gridAxesSize.height}];UR({defsSelection:k.defsSelection,clipPathData:C})});const U=c.pipe(I(v),O(k=>k.highlightTarget),tt()),E=B({graphicGSelection:w,visibleComputedLayoutData:o,zeroYArr:D,groupLabels:R,barScale:A,params:l,chartParams:c,highlightTarget:U,barWidth:S,transformedBarRadius:z,delayGroup:M,transitionItem:G,isSeriesSeprate:y}).pipe(I(v),Y(async k=>k),O(k=>OR({graphicGSelection:k.graphicGSelection,rectClassName:$,visibleComputedLayoutData:k.visibleComputedLayoutData,zeroYArr:k.zeroYArr,groupLabels:k.groupLabels,barScale:k.barScale,params:k.params,chartParams:k.chartParams,barWidth:k.barWidth,transformedBarRadius:k.transformedBarRadius,delayGroup:k.delayGroup,transitionItem:k.transitionItem,isSeriesSeprate:k.isSeriesSeprate})));return B({barSelection:E,computedData:n,highlightTarget:U,SeriesDataMap:s,GroupDataMap:u}).pipe(I(v),Y(async k=>k)).subscribe(k=>{k.barSelection.on("mouseover",(C,F)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:F,gridIndex:F.gridIndex,series:k.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:k.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:k.computedData})}).on("mousemove",(C,F)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:F,gridIndex:F.gridIndex,series:k.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:k.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:k.computedData})}).on("mouseout",(C,F)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:F,gridIndex:F.gridIndex,series:k.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:k.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:k.computedData})}).on("click",(C,F)=>{C.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:F,gridIndex:F.gridIndex,series:k.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:k.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:k.computedData})})}),B({barSelection:E,highlight:g.pipe(O(k=>k.map(C=>C.id))),fullChartParams:c}).pipe(I(v),Y(async k=>k)).subscribe(k=>{BR({selection:k.barSelection,ids:k.highlight,fullChartParams:k.fullChartParams})}),()=>{v.next(void 0)}},a2="Bars",YR=se(a2,No)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=r.fullDataFormatter$.pipe(I(i),O(s=>s.grid.separateSeries),tt(),_t(1)),a=Th(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$:o,event$:n.event$});return()=>{i.next(void 0),a()}}),s2="BarsDiverging",HR=se(s2,No)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=Th(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$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:Wu(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),u2=.3;function WR({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function qR(t,e){return t<=1?0:e/(t-1)*u2}function VR(t,e){return t<=1?e:e*(1-u2)}function jR({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:l,transitionItem:c,isSeriesSeprate:h}){const f=s/2;return t.each((d,g,m)=>{X(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(c).ease(Ro(a.transitionEase)).delay((y,x)=>y.groupIndex*l).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}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)=>{X(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 ZR({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)?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const l2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:y,isSeriesSeprate$:x,event$:v})=>{const b=new rt,$=$n(t,"clipPath-box"),_=at(t,"rect"),{seriesSelection$:P,axesSelection$:T,defsSelection$:w,graphicGSelection$:D}=ai({selection:e,pluginName:t,clipPathID:$,seriesLabels$:a,gridContainerPosition$:y,gridAxesTransform$:f,gridGraphicTransform$:p}),S=o.pipe(I(b),O(N=>N[0]&&N[0][0]?N[0][0].axisY-N[0][0].axisYFromZero:0),tt()),z=B({computedData:n,params:l,axisSize:g,isSeriesSeprate:x}).pipe(I(b),Y(async N=>N),O(N=>N.params.barWidth?N.params.barWidth:WR({axisWidth:N.axisSize.width,groupAmount:N.computedData[0]?N.computedData[0].length:0,barGroupPadding:N.params.barGroupPadding})),tt()),R=B({computedData:n,barWidth:z,params:l,gridGraphicReverseScale:d}).pipe(I(b),Y(async N=>N),O(N=>{const j=N.barWidth/2,q=N.params.barRadius===!0?j:N.params.barRadius===!1?0:typeof N.params.barRadius=="number"?N.params.barRadius:0;return N.computedData.map((Z,W)=>{const nt=N.gridGraphicReverseScale[W]??N.gridGraphicReverseScale[0],ut=q*nt[0],H=q*nt[1];return[ut,H]})})),A=i.pipe(I(b),O(N=>{const j=new Set;return N.forEach(q=>{q.forEach(Z=>{j.add(Z.groupLabel)})}),Array.from(j)}),_t(1)),L=h.pipe(I(b),O(N=>N.transitionDuration),tt()),M=new ft(N=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async j=>j)).subscribe(j=>{const q=qR(j.groupLabels.length,j.transitionDuration);N.next(q)})}).pipe(I(b),tt()),G=new ft(N=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async j=>j)).subscribe(j=>{const q=VR(j.groupLabels.length,j.transitionDuration);N.next(q)})}).pipe(I(b),tt()),U=B({computedData:n,dataFormatter:c}).pipe(I(b),Y(async N=>N),O(N=>{const q=N.computedData[0]?N.computedData[0].length-1:0,Z=N.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0:N.dataFormatter.grid.groupAxis.scaleDomain[0],W=N.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?q:N.dataFormatter.grid.groupAxis.scaleDomain[1];return[Z,W]})),E=B({visibleComputedLayoutData:o,groupScaleDomain:U}).pipe(I(b),Y(async N=>N),O(N=>{const j=N.groupScaleDomain[0],q=N.groupScaleDomain[1],W=N.visibleComputedLayoutData.map(mt=>mt.filter((pt,Yt)=>pt.groupIndex>=j&&pt.groupIndex<=q)).flat();if(W.length<=1)return 1;const nt=W.reduce((mt,pt)=>pt.value>mt.value?pt:mt,W[0]),ut=nt.groupIndex,H=W.filter(mt=>mt.groupIndex===ut).reduce((mt,pt)=>mt+pt.value,0);return nt.value/H})),k=B({computedLayoutData:r,yRatio:E,zeroY:S}).pipe(I(b),O(N=>{let j=N.computedLayoutData[0]?N.computedLayoutData[0].map(()=>N.zeroY):[];return N.computedLayoutData.map((q,Z)=>q.map((W,nt)=>{const ut=j[nt];let H=0;return W.visible&&(H=W.axisYFromZero*N.yRatio,j[nt]=j[nt]+H),{...W,_barStartY:ut,_barHeight:H}}))})),C=B({computedLayoutData:r,zeroY:S}).pipe(I(b),O(N=>N.computedLayoutData.map((j,q)=>j.map((Z,W)=>({...Z,_barStartY:N.zeroY,_barHeight:Z.axisYFromZero}))))),F=x.pipe(Y(N=>Lp(()=>N,C,k)));B({defsSelection:w,gridAxesSize:g}).pipe(I(b),Y(async N=>N)).subscribe(N=>{const j=[{id:$,width:N.gridAxesSize.width,height:N.gridAxesSize.height}];XR({defsSelection:N.defsSelection,clipPathData:j})});const V=h.pipe(I(b),O(N=>N.highlightTarget),tt()),Q=B({graphicGSelection:D,graphicData:F,zeroY:S,groupLabels:A,params:l,chartParams:h,highlightTarget:V,barWidth:z,transformedBarRadius:R,delayGroup:M,transitionItem:G,isSeriesSeprate:x}).pipe(I(b),Y(async N=>N),O(N=>jR({graphicGSelection:N.graphicGSelection,rectClassName:_,barData:N.graphicData,zeroY:N.zeroY,groupLabels:N.groupLabels,params:N.params,chartParams:N.chartParams,barWidth:N.barWidth,transformedBarRadius:N.transformedBarRadius,delayGroup:N.delayGroup,transitionItem:N.transitionItem,isSeriesSeprate:N.isSeriesSeprate})));return B({barSelection:Q,computedData:n,highlightTarget:V,SeriesDataMap:s,GroupDataMap:u}).subscribe(N=>{N.barSelection.on("mouseover",(j,q)=>{j.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:N.highlightTarget,datum:q,gridIndex:q.gridIndex,series:N.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:N.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:j,data:N.computedData})}).on("mousemove",(j,q)=>{j.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:N.highlightTarget,datum:q,gridIndex:q.gridIndex,series:N.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:N.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:j,data:N.computedData})}).on("mouseout",(j,q)=>{j.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:N.highlightTarget,datum:q,gridIndex:q.gridIndex,series:N.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:N.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:j,data:N.computedData})}).on("click",(j,q)=>{j.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:N.highlightTarget,datum:q,gridIndex:q.gridIndex,series:N.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:N.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:j,data:N.computedData})})}),B({barSelection:Q,highlight:m.pipe(O(N=>N.map(j=>j.id))),fullChartParams:h}).pipe(I(b),Y(async N=>N)).subscribe(N=>{ZR({selection:N.barSelection,ids:N.highlight,fullChartParams:N.fullChartParams})}),()=>{b.next(void 0)}},c2="BarStack",KR=se(c2,Kh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=r.fullDataFormatter$.pipe(I(i),O(s=>s.grid.separateSeries),tt(),_t(1)),a=l2(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()}}),f2=.3;function h2({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 QR(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return jf().domain(e).range([-i/2+r,i/2-r])}function JR(t,e){return t<=1?0:e/(t-1)*f2}function tk(t,e){return t<=1?e:e*(1-f2)}function ek({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:l,barWidth:c,delayGroup:h,transitionItem:f,isSeriesSeprate:p}){const d=c/2;return t.each((m,y,x)=>{X(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 P=-d,T=o[y],w=o[y];return`M${P},${T} L${P+c/2},${w} ${P+c},${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(Ro(l.transitionEase)).delay((b,$)=>b.groupIndex*h).attr("d",b=>{const $=-d,_=o[y],P=b.axisY;return`M${$},${_} L${$+c/2},${P} ${$+c},${_}`})}),t.selectAll(`path.${n}`)}function nk({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 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)=>{X(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(Ro(r)).tween("tween",(l,c,h)=>f=>{const p=l.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 o2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:y,event$:x})=>{const v=new et,b=$n(t,"clipPath-box"),w=at(t,"path"),{seriesSelection$:D,axesSelection$:T,defsSelection$:$,graphicGSelection$:_}=ai({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),P=p.pipe(I(v),O(E=>-E.translate[1]/E.scale[1])),S=new pt(E=>{const R=B({fullParams:l,valueAxisStart:P}).pipe(I(v)).subscribe(C=>{const F=Ik(C.fullParams.lineCurve,C.valueAxisStart);E.next(F)});return()=>{R.unsubscribe()}}),G=h.pipe(O(E=>E.transitionDuration),rt()),k=h.pipe(O(E=>E.transitionEase),rt());B({defsSelection:$,seriesLabels:a,axisSize:d,transitionDuration:G,transitionEase:k}).pipe(I(v),Y(async E=>E)).subscribe(E=>{const C=[{id:b,width:E.axisSize.width,height:E.axisSize.height}].concat(E.seriesLabels.map(F=>({id:`orbcharts__clipPath_${F}`,width:E.axisSize.width,height:E.axisSize.height})));Ok({defsSelection:E.defsSelection,clipPathData:C,transitionDuration:E.transitionDuration,transitionEase:E.transitionEase})});const A=n.pipe(O(E=>{const R=new Map;return E.flat().forEach(C=>R.set(C.id,C)),R})),L=Th({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),M=h.pipe(I(v),O(E=>E.highlightTarget),rt()),z=a.pipe(I(v),O(E=>E.map((R,C)=>$n(t,`lineargradient-${R}`)))),U=B({graphicGSelection:_,defsSelection:$,visibleComputedLayoutData:o,linearGradientIds:z,areaPath:S,params:l}).pipe(I(v),Y(async E=>E),O(E=>{let R=[];return E.graphicGSelection.each((C,F,j)=>{const Q=Nk(E.visibleComputedLayoutData[F]??[]);R[F]=Fk({selection:X(j[F]),pathClassName:w,areaPath:E.areaPath,segmentData:Q,linearGradientIds:E.linearGradientIds,params:E.params}),zk({defsSelection:E.defsSelection,computedData:E.visibleComputedLayoutData,linearGradientIds:E.linearGradientIds,params:E.params})}),R}));return B({pathSelectionArr:U,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:M,gridGroupPositionFn:L}).pipe(I(v),Y(async E=>E)).subscribe(E=>{E.pathSelectionArr.forEach(R=>{R.on("mouseover",(C,F)=>{C.stopPropagation();const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:N}=E.gridGroupPositionFn(C),K=E.GroupDataMap.get(N).find(W=>W.seriesLabel===j)??F[0];x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:K,gridIndex:K.gridIndex,series:E.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:E.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:C,data:E.computedData})}).on("mousemove",(C,F)=>{C.stopPropagation();const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:N}=E.gridGroupPositionFn(C),K=E.GroupDataMap.get(N).find(W=>W.seriesLabel===j)??F[0];x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:K,gridIndex:K.gridIndex,series:E.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:E.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:C,data:E.computedData})}).on("mouseout",(C,F)=>{C.stopPropagation();const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:N}=E.gridGroupPositionFn(C),K=E.GroupDataMap.get(N).find(W=>W.seriesLabel===j)??F[0];x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:K,gridIndex:K.gridIndex,series:E.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:E.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:C,data:E.computedData})}).on("click",(C,F)=>{C.stopPropagation();const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:N}=E.gridGroupPositionFn(C),K=E.GroupDataMap.get(N).find(W=>W.seriesLabel===j)??F[0];x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:K,gridIndex:K.gridIndex,series:E.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:E.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:C,data:E.computedData})})})}),h.pipe(I(v),hr(E=>E.highlightTarget==="series"),Y(E=>B({graphicGSelection:_,gridHighlight:g,DataMap:A,fullChartParams:h}).pipe(I(v),Y(async R=>R)))).subscribe(E=>{const R=E.gridHighlight[0]?E.gridHighlight[0].seriesLabel:null;Gk({selection:E.graphicGSelection,seriesLabel:R,fullChartParams:E.fullChartParams})}),()=>{v.next(void 0)}},a2="LineAreas",Uk=se(a2,Qh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=o2(a2,{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()}}),s2=.3;function u2({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 Bk(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Zf().domain(e).range([-i/2+r,i/2-r])}function Yk(t,e){return t<=1?0:e/(t-1)*s2}function Hk(t,e){return t<=1?e:e*(1-s2)}function Wk({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:l,delayGroup:c,transitionItem:h,isSeriesSeprate:f}){const p=u/2;return t.each((g,m,y)=>{X(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",l[m][0]??1).attr("ry",l[m][1]??1).transition().duration(h).ease(Ro(s.transitionEase)).delay((x,v)=>x.groupIndex*c).attr("height",x=>Math.abs(x.axisYFromZero))}),t.selectAll(`rect.${e}`)}function Vk({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)=>{X(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 jk({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)?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Lh=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new et,b=$n(t,"clipPath-box"),w=at(t,"rect"),{seriesSelection$:D,axesSelection$:T,defsSelection$:$,graphicGSelection$:_}=ai({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),P=o.pipe(I(v),O(R=>R.map(C=>C[0]?C[0].axisY-C[0].axisYFromZero:0)),rt()),S=B({computedData:n,visibleComputedData:i,params:l,gridAxesSize:d,isSeriesSeprate:y}).pipe(I(v),Y(async R=>R),O(R=>R.params.barWidth?R.params.barWidth:R.isSeriesSeprate?u2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:1,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}):u2({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})),rt()),G=B({computedData:n,barWidth:S,params:l,gridGraphicReverseScale:p}).pipe(I(v),Y(async R=>R),O(R=>{const C=R.barWidth/2,F=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 N=R.gridGraphicReverseScale[Q]??R.gridGraphicReverseScale[0];let q=F*N[0],V=F*N[1];if(q>C){const K=C/q;q=q*K,V=V*K}return[q,V]})})),k=i.pipe(I(v),O(R=>{const C=new Set;return R.forEach(F=>{F.forEach(j=>{C.add(j.groupLabel)})}),Array.from(C)})),A=B({seriesLabels:a,barWidth:S,params:l}).pipe(I(v),Y(async R=>R),O(R=>Bk(R.barWidth,R.seriesLabels,R.params))),L=c.pipe(I(v),O(R=>R.transitionDuration),rt()),M=new pt(R=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const F=Yk(C.groupLabels.length,C.transitionDuration);R.next(F)})}).pipe(I(v),rt()),z=new pt(R=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const F=Hk(C.groupLabels.length,C.transitionDuration);R.next(F)})}).pipe(I(v),rt());B({defsSelection:$,gridAxesSize:d}).pipe(I(v),Y(async R=>R)).subscribe(R=>{const C=[{id:b,width:R.gridAxesSize.width,height:R.gridAxesSize.height}];Vk({defsSelection:R.defsSelection,clipPathData:C})});const U=c.pipe(I(v),O(R=>R.highlightTarget),rt()),E=B({graphicGSelection:_,visibleComputedLayoutData:o,zeroYArr:P,groupLabels:k,barScale:A,params:l,chartParams:c,highlightTarget:U,barWidth:S,transformedBarRadius:G,delayGroup:M,transitionItem:z,isSeriesSeprate:y}).pipe(I(v),Y(async R=>R),O(R=>Wk({graphicGSelection:R.graphicGSelection,rectClassName:w,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:U,SeriesDataMap:s,GroupDataMap:u}).pipe(I(v),Y(async R=>R)).subscribe(R=>{R.barSelection.on("mouseover",(C,F)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:R.highlightTarget,datum:F,gridIndex:F.gridIndex,series:R.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:R.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:R.computedData})}).on("mousemove",(C,F)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:R.highlightTarget,datum:F,gridIndex:F.gridIndex,series:R.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:R.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:R.computedData})}).on("mouseout",(C,F)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:R.highlightTarget,datum:F,gridIndex:F.gridIndex,series:R.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:R.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:R.computedData})}).on("click",(C,F)=>{C.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:R.highlightTarget,datum:F,gridIndex:F.gridIndex,series:R.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:R.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:R.computedData})})}),B({barSelection:E,highlight:g.pipe(O(R=>R.map(C=>C.id))),fullChartParams:c}).pipe(I(v),Y(async R=>R)).subscribe(R=>{jk({selection:R.barSelection,ids:R.highlight,fullChartParams:R.fullChartParams})}),()=>{v.next(void 0)}},l2="Bars",qk=se(l2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=Lh(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$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),c2="BarsPN",Xk=se(c2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=Lh(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$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:Bo(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),f2=.3;function Zk({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function Kk(t,e){return t<=1?0:e/(t-1)*f2}function Qk(t,e){return t<=1?e:e*(1-f2)}function Jk({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:l,transitionItem:c,isSeriesSeprate:h}){const f=s/2;return t.each((d,g,m)=>{X(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(c).ease(Ro(a.transitionEase)).delay((y,x)=>y.groupIndex*l).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function tR({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)=>{X(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 eR({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)?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const h2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:y,isSeriesSeprate$:x,event$:v})=>{const b=new et,w=$n(t,"clipPath-box"),D=at(t,"rect"),{seriesSelection$:T,axesSelection$:$,defsSelection$:_,graphicGSelection$:P}=ai({selection:e,pluginName:t,clipPathID:w,seriesLabels$:a,gridContainerPosition$:y,gridAxesTransform$:f,gridGraphicTransform$:p}),S=o.pipe(I(b),O(N=>N[0]&&N[0][0]?N[0][0].axisY-N[0][0].axisYFromZero:0),rt()),G=B({computedData:n,params:l,axisSize:g,isSeriesSeprate:x}).pipe(I(b),Y(async N=>N),O(N=>N.params.barWidth?N.params.barWidth:Zk({axisWidth:N.axisSize.width,groupAmount:N.computedData[0]?N.computedData[0].length:0,barGroupPadding:N.params.barGroupPadding})),rt()),k=B({computedData:n,barWidth:G,params:l,gridGraphicReverseScale:d}).pipe(I(b),Y(async N=>N),O(N=>{const q=N.barWidth/2,V=N.params.barRadius===!0?q:N.params.barRadius===!1?0:typeof N.params.barRadius=="number"?N.params.barRadius:0;return N.computedData.map((K,W)=>{const nt=N.gridGraphicReverseScale[W]??N.gridGraphicReverseScale[0],ut=V*nt[0],H=V*nt[1];return[ut,H]})})),A=i.pipe(I(b),O(N=>{const q=new Set;return N.forEach(V=>{V.forEach(K=>{q.add(K.groupLabel)})}),Array.from(q)}),Pt(1)),L=h.pipe(I(b),O(N=>N.transitionDuration),rt()),M=new pt(N=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async q=>q)).subscribe(q=>{const V=Kk(q.groupLabels.length,q.transitionDuration);N.next(V)})}).pipe(I(b),rt()),z=new pt(N=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async q=>q)).subscribe(q=>{const V=Qk(q.groupLabels.length,q.transitionDuration);N.next(V)})}).pipe(I(b),rt()),U=B({computedData:n,dataFormatter:c}).pipe(I(b),Y(async N=>N),O(N=>{const V=N.computedData[0]?N.computedData[0].length-1:0,K=N.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0:N.dataFormatter.grid.groupAxis.scaleDomain[0],W=N.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?V:N.dataFormatter.grid.groupAxis.scaleDomain[1];return[K,W]})),E=B({visibleComputedLayoutData:o,groupScaleDomain:U}).pipe(I(b),Y(async N=>N),O(N=>{const q=N.groupScaleDomain[0],V=N.groupScaleDomain[1],W=N.visibleComputedLayoutData.map(mt=>mt.filter((ht,Yt)=>ht.groupIndex>=q&&ht.groupIndex<=V)).flat();if(W.length<=1)return 1;const nt=W.reduce((mt,ht)=>ht.value>mt.value?ht:mt,W[0]),ut=nt.groupIndex,H=W.filter(mt=>mt.groupIndex===ut).reduce((mt,ht)=>mt+ht.value,0);return nt.value/H})),R=B({computedLayoutData:r,yRatio:E,zeroY:S}).pipe(I(b),O(N=>{let q=N.computedLayoutData[0]?N.computedLayoutData[0].map(()=>N.zeroY):[];return N.computedLayoutData.map((V,K)=>V.map((W,nt)=>{const ut=q[nt];let H=0;return W.visible&&(H=W.axisYFromZero*N.yRatio,q[nt]=q[nt]+H),{...W,_barStartY:ut,_barHeight:H}}))})),C=B({computedLayoutData:r,zeroY:S}).pipe(I(b),O(N=>N.computedLayoutData.map((q,V)=>q.map((K,W)=>({...K,_barStartY:N.zeroY,_barHeight:K.axisYFromZero}))))),F=x.pipe(Y(N=>g_(()=>N,C,R)));B({defsSelection:_,gridAxesSize:g}).pipe(I(b),Y(async N=>N)).subscribe(N=>{const q=[{id:w,width:N.gridAxesSize.width,height:N.gridAxesSize.height}];tR({defsSelection:N.defsSelection,clipPathData:q})});const j=h.pipe(I(b),O(N=>N.highlightTarget),rt()),Q=B({graphicGSelection:P,graphicData:F,zeroY:S,groupLabels:A,params:l,chartParams:h,highlightTarget:j,barWidth:G,transformedBarRadius:k,delayGroup:M,transitionItem:z,isSeriesSeprate:x}).pipe(I(b),Y(async N=>N),O(N=>Jk({graphicGSelection:N.graphicGSelection,rectClassName:D,barData:N.graphicData,zeroY:N.zeroY,groupLabels:N.groupLabels,params:N.params,chartParams:N.chartParams,barWidth:N.barWidth,transformedBarRadius:N.transformedBarRadius,delayGroup:N.delayGroup,transitionItem:N.transitionItem,isSeriesSeprate:N.isSeriesSeprate})));return B({barSelection:Q,computedData:n,highlightTarget:j,SeriesDataMap:s,GroupDataMap:u}).subscribe(N=>{N.barSelection.on("mouseover",(q,V)=>{q.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:N.highlightTarget,datum:V,gridIndex:V.gridIndex,series:N.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:N.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:q,data:N.computedData})}).on("mousemove",(q,V)=>{q.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:N.highlightTarget,datum:V,gridIndex:V.gridIndex,series:N.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:N.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:q,data:N.computedData})}).on("mouseout",(q,V)=>{q.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:N.highlightTarget,datum:V,gridIndex:V.gridIndex,series:N.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:N.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:q,data:N.computedData})}).on("click",(q,V)=>{q.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:N.highlightTarget,datum:V,gridIndex:V.gridIndex,series:N.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:N.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:q,data:N.computedData})})}),B({barSelection:Q,highlight:m.pipe(O(N=>N.map(q=>q.id))),fullChartParams:h}).pipe(I(b),Y(async N=>N)).subscribe(N=>{eR({selection:N.barSelection,ids:N.highlight,fullChartParams:N.fullChartParams})}),()=>{b.next(void 0)}},p2="BarStack",nR=se(p2,ep)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=h2(p2,{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$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),d2=.3;function g2({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 rR(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Zf().domain(e).range([-i/2+r,i/2-r])}function iR(t,e){return t<=1?0:e/(t-1)*d2}function oR(t,e){return t<=1?e:e*(1-d2)}function aR({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:l,barWidth:c,delayGroup:h,transitionItem:f,isSeriesSeprate:p}){const d=c/2;return t.each((m,y,x)=>{X(x[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const w=b.append("g").classed(e,!0).attr("cursor","pointer");return w.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",D=>{const T=-d,$=o[y],_=o[y];return`M${T},${$} L${T+c/2},${_} ${T+c},${$}`}),w},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(Ro(l.transitionEase)).delay((b,w)=>b.groupIndex*h).attr("d",b=>{const w=-d,D=o[y],T=b.axisY;return`M${w},${D} L${w+c/2},${T} ${w+c},${D}`})}),t.selectAll(`path.${n}`)}function sR({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 rk({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)=>{X(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 ik({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)?X(a[o]).style("opacity",1):X(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const p2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:l,fullParams$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new rt,b=$n(t,"clipPath-box"),$=at(t,"pathG"),_=at(t,"path"),{seriesSelection$:P,axesSelection$:T,defsSelection$:w,graphicGSelection$:D}=ai({selection:e,pluginName:t,clipPathID:b,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p});p.pipe(I(v),O(C=>-C.translate[1]/C.scale[1]));const S=o.pipe(O(C=>C.map(F=>F[0]?F[0].axisY-F[0].axisYFromZero:0)),tt()),z=B({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(I(v),Y(async C=>C),O(C=>C.params.barWidth?C.params.barWidth:C.isSeriesSeprate?h2({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:1,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}):h2({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}))),R=i.pipe(I(v),O(C=>{const F=new Set;return C.forEach(V=>{V.forEach(Q=>{F.add(Q.groupLabel)})}),Array.from(F)})),A=new ft(C=>{B({seriesLabels:s,barWidth:z,params:c}).pipe(I(v),Y(async F=>F)).subscribe(F=>{const V=QR(F.barWidth,F.seriesLabels,F.params);C.next(V)})}),L=h.pipe(I(v),O(C=>C.transitionDuration),tt()),M=new ft(C=>{B({groupLabels:R,transitionDuration:L}).pipe(Y(async F=>F)).subscribe(F=>{const V=JR(F.groupLabels.length,F.transitionDuration);C.next(V)})}).pipe(I(v),tt()),G=new ft(C=>{B({groupLabels:R,transitionDuration:L}).pipe(Y(async F=>F)).subscribe(F=>{const V=tk(F.groupLabels.length,F.transitionDuration);C.next(V)})}).pipe(I(v),tt());B({defsSelection:w,gridAxesSize:d}).pipe(I(v),Y(async C=>C)).subscribe(C=>{const F=[{id:b,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];rk({defsSelection:C.defsSelection,clipPathData:F})});const U=h.pipe(I(v),O(C=>C.highlightTarget),tt()),E=s.pipe(I(v),O(C=>C.map((F,V)=>$n(t,`lineargradient-${F}`)))),k=B({graphicGSelection:D,defsSelection:w,computedData:n,visibleComputedLayoutData:o,linearGradientIds:E,zeroYArr:S,groupLabels:R,barScale:A,params:c,chartParams:h,barWidth:z,delayGroup:M,transitionItem:G,isSeriesSeprate:y}).pipe(I(v),Y(async C=>C),O(C=>(nk({defsSelection:C.defsSelection,computedData:C.computedData,linearGradientIds:C.linearGradientIds,params:C.params}),ek({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:k,computedData:n,highlightTarget:U,SeriesDataMap:u,GroupDataMap:l}).subscribe(C=>{C.barSelection.on("mouseover",(F,V)=>{F.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:V,gridIndex:V.gridIndex,series:C.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:C.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:F,data:C.computedData})}).on("mousemove",(F,V)=>{F.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:V,gridIndex:V.gridIndex,series:C.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:C.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:F,data:C.computedData})}).on("mouseout",(F,V)=>{F.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:V,gridIndex:V.gridIndex,series:C.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:C.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:F,data:C.computedData})}).on("click",(F,V)=>{F.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:V,gridIndex:V.gridIndex,series:C.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:C.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:F,data:C.computedData})})}),B({barSelection:k,highlight:g.pipe(O(C=>C.map(F=>F.id))),fullChartParams:h}).pipe(I(v),Y(async C=>C)).subscribe(C=>{ik({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{v.next(void 0)}},d2="BarsTriangle",ok=se(d2,Qh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=r.fullDataFormatter$.pipe(I(i),O(s=>s.grid.separateSeries),tt(),_t(1)),a=p2(d2,{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 ak({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const h=c.size();return o.transitionDuration/h};let u=0;return t.each((c,h,f)=>{X(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)=>{X(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)=>Pu({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Pu({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 sk({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)?X(a[o]).style("opacity",1).transition("highlight").duration(200):X(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function uk({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)=>{X(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 g2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new rt,v=$n(t,"clipPath-box"),b=at(t,"circleG"),$=at(t,"circle"),{seriesSelection$:_,axesSelection$:P,defsSelection$:T,graphicGSelection$:w}=ai({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),D=B({computedData:n,gridGraphicReverseScale:p}).pipe(I(x),Y(async A=>A),O(A=>A.computedData.map((L,M)=>A.gridGraphicReverseScale[M])));B({defsSelection:T,gridAxesSize:d}).pipe(I(x),Y(async A=>A)).subscribe(A=>{const L=[{id:v,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];uk({defsSelection:A.defsSelection,clipPathData:L})});const S=c.pipe(I(x),O(A=>A.highlightTarget),tt()),z=B({graphicGSelection:w,visibleComputedLayoutData:o,graphicReverseScale:D,fullChartParams:c,fullParams:l}).pipe(I(x),Y(async A=>A),O(A=>ak({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(I(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 R=l.pipe(I(x),O(A=>A.onlyShowHighlighted),tt());return c.pipe(I(x),Y(A=>B({graphicSelection:z,highlight:g.pipe(O(L=>L.map(M=>M.id))),onlyShowHighlighted:R,fullChartParams:c}).pipe(I(x),Y(async L=>L)))).subscribe(A=>{sk({selection:A.graphicSelection,ids:A.highlight,onlyShowHighlighted:A.onlyShowHighlighted,fullChartParams:A.fullChartParams})}),()=>{x.next(void 0)}},m2="Dots",lk=se(m2,Xh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=g2(m2,{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()}}),ck={listRectWidth:14,listRectHeight:14,listRectRadius:0};function y2(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=at(t,"root-position"),u=at(t,"legend-card"),l=at(t,"legend-list"),c=at(t,"legend-item"),h=new rt,f=B({seriesLabels:n,fullChartParams:o}).pipe(I(h),Y(async w=>w),O(w=>{const D=new Map;let S=0;return w.seriesLabels.forEach((z,R)=>{if(!D.has(z)){const A=y2(S,w.fullChartParams);D.set(z,A),S++}}),D})),p=n.pipe(I(h),O(w=>{const D=new Set;let S=[];return w.forEach(z=>{D.has(z)?S.push(!1):S.push(!0),D.add(z)}),S})),d=r.pipe(I(h),O(w=>w.position==="bottom"||w.position==="top"?"row":"column")),g=B({fullParams:r,layout:i}).pipe(I(h),Y(async w=>w),O(w=>{const D=w.fullParams.padding*2+w.fullParams.gap*2;return w.fullParams.position==="bottom"||w.fullParams.position==="top"?w.layout.rootWidth-D:w.layout.rootHeight-D})),y=B({layout:i,fullParams:r}).pipe(I(h),Y(async w=>w),O(w=>{let D=0,S=0;return w.fullParams.position==="bottom"?(S=w.layout.rootHeight,w.fullParams.justify==="start"?D=0:w.fullParams.justify==="center"?D=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(D=w.layout.rootWidth)):w.fullParams.position==="right"?(D=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"?D=0:w.fullParams.justify==="center"?D=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(D=w.layout.rootWidth)):w.fullParams.position==="left"&&(D=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:D,y:S}})).pipe(I(h),O(w=>e.selectAll(`g.${s}`).data([w]).join(D=>D.append("g").classed(s,!0).attr("transform",S=>`translate(${S.x}, ${S.y})`),D=>D.transition().attr("transform",S=>`translate(${S.x}, ${S.y})`),D=>D.remove()))),x=r.pipe(I(h),O(w=>w.seriesList[0]?w.seriesList[0]:ck)),v=B({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:g,defaultListStyle:x,SeriesLabelColorMap:f,textSizePx:a}).pipe(I(h),Y(async w=>w),O(w=>w.seriesLabels.reduce((D,S,z)=>{if(!w.visibleList[z])return D;const R=Jv(S,w.textSizePx),A=w.textSizePx*1.5+R,L=w.SeriesLabelColorMap.get(S),M=D[0]&&D[0][0]?D[D.length-1][D[D.length-1].length-1]:null,{translateX:G,translateY:U,lineIndex:E,itemIndex:k}=((F,V,Q)=>{let N=0,j=0,q=0,Z=0;if(F.lineDirection==="column"){let W=Q?Q.translateY+F.textSizePx+F.fullParams.gap:0;if(W+F.textSizePx>F.lineMaxSize){q=Q.lineIndex+1,Z=0,j=0;const nt=V[V.length-1].reduce((ut,H)=>H.itemWidth>ut?H.itemWidth:ut,0);N=Q.translateX+nt+F.fullParams.gap}else q=Q?Q.lineIndex:0,Z=Q?Q.itemIndex+1:0,j=W,N=Q?Q.translateX:0}else{let W=Q?Q.translateX+Q.itemWidth+F.fullParams.gap:0;W+A>F.lineMaxSize?(q=Q.lineIndex+1,Z=0,N=0):(q=Q?Q.lineIndex:0,Z=Q?Q.itemIndex+1:0,N=W),j=(F.textSizePx+F.fullParams.gap)*q}return{translateX:N,translateY:j,lineIndex:q,itemIndex:Z}})(w,D,M);D[E]||(D[E]=[]);const C=w.fullParams.seriesList[k]?w.fullParams.seriesList[k]:w.defaultListStyle;return D[E].push({id:S,seriesLabel:S,seriesIndex:z,lineIndex:E,itemIndex:k,text:S,itemWidth:A,translateX:G,translateY:U,color:L,listRectWidth:C.listRectWidth,listRectHeight:C.listRectHeight,listRectRadius:C.listRectRadius}),D},[])),_t(1)),b=B({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v,textSizePx:a}).pipe(I(h),Y(async w=>w),O(w=>{const{width:D,height:S}=((z,R)=>{let A=0,L=0;if(!R.length||!R[0].length)return{width:A,height:L};const M=R[0][R[0].length-1];return z.lineDirection==="column"?(A=R.reduce((G,U)=>{const E=U.reduce((k,C)=>C.itemWidth>k?C.itemWidth:k,0);return G+E},0),A+=z.fullParams.gap*(R.length-1),L=M.translateY+z.textSizePx):(A=M.translateX+M.itemWidth,L=z.textSizePx*R.length+z.fullParams.gap*(R.length-1)),{width:A,height:L}})(w,w.lengendItems);return{direction:w.lineDirection,width:D,height:S,translateX:w.fullParams.gap,translateY:w.fullParams.gap}}),_t(1)),$=B({fullParams:r,lengendList:b}).pipe(I(h),Y(async w=>w),O(w=>{const D=w.lengendList.width+w.fullParams.gap*2,S=w.lengendList.height+w.fullParams.gap*2;let z=0,R=0;return w.fullParams.position==="left"?w.fullParams.justify==="start"?(z=w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(z=w.fullParams.padding,R=-S/2):w.fullParams.justify==="end"&&(z=w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.position==="right"?w.fullParams.justify==="start"?(z=-D-w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(z=-D-w.fullParams.padding,R=-S/2):w.fullParams.justify==="end"&&(z=-D-w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.position==="top"?w.fullParams.justify==="start"?(z=w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(z=-D/2,R=w.fullParams.padding):w.fullParams.justify==="end"&&(z=-D-w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="start"?(z=w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.justify==="center"?(z=-D/2,R=-S-w.fullParams.padding):w.fullParams.justify==="end"&&(z=-D-w.fullParams.padding,R=-S-w.fullParams.padding),{width:D,height:S,translateX:z,translateY:R}})),_=B({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:$}).pipe(I(h),Y(async w=>w),O(w=>w.rootPositionSelection.selectAll("g").data([w.legendCard]).join(D=>D.append("g").classed(u,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),D=>D.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),D=>D.remove()).each((D,S,z)=>{X(z[S]).selectAll("rect").data([D]).join("rect").attr("width",R=>R.width).attr("height",R=>R.height).attr("fill",Ct(w.fullParams.backgroundFill,w.fullChartParams)).attr("stroke",Ct(w.fullParams.backgroundStroke,w.fullChartParams))}))),P=B({lengendCardSelection:_,fullParams:r,lengendList:b}).pipe(I(h),Y(async w=>w),O(w=>w.lengendCardSelection.selectAll("g").data([w.lengendList]).join(D=>D.append("g").classed(l,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),D=>D.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),D=>D.remove())));return B({lengendListSelection:P,fullParams:r,fullChartParams:o,lengendItems:v,textSizePx:a}).pipe(I(h),Y(async w=>w),O(w=>{const D=w.lengendItems[0]?w.lengendItems.flat():[];return w.lengendListSelection.selectAll(`g.${c}`).data(D).join(S=>S.append("g").classed(c,!0).attr("cursor","default"),S=>S,S=>S.remove()).attr("transform",(S,z)=>`translate(${S.translateX}, ${S.translateY})`).each((S,z,R)=>{const A=w.textSizePx/2,L=-S.listRectWidth/2,M=-S.listRectHeight/2;X(R[z]).selectAll("rect").data([S]).join("rect").attr("x",A).attr("y",A).attr("width",G=>G.listRectWidth).attr("height",G=>G.listRectHeight).attr("transform",G=>`translate(${L}, ${M})`).attr("fill",G=>G.color).attr("rx",G=>G.listRectRadius),X(R[z]).selectAll("text").data([S]).join(G=>G.append("text").attr("dominant-baseline","hanging"),G=>G,G=>G.remove()).attr("x",w.textSizePx*1.5).attr("font-size",w.fullChartParams.styles.textSize).attr("fill",G=>w.fullParams.textColorType==="series"?y2(G.seriesIndex,w.fullChartParams):Ct(w.fullParams.textColorType,w.fullChartParams)).text(G=>G.text)})})).subscribe(),()=>{h.next(void 0)}},b2="GridLegend",fk=se(b2,np)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(I(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),O(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Du(b2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Lh=6;function hk({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:l,textTransform:c}){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)=>{X(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",c).text(y=>s.grid.groupAxis.label)}).attr("transform",d=>`translate(${a.width+d.tickPadding+r.labelOffset[0]}, ${-d.tickPadding-Lh-r.labelOffset[1]})`);const f=Dg(l).scale(l).tickSize(r.tickFullLine==!0?-a.height:Lh).tickSizeOuter(0).tickFormat(d=>Ph(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+Lh}`).style("transform",c),h}const v2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const h=new rt,f=at(t,"container"),p=at(t,"xAxisG"),d=at(t,"xAxis"),g=at(t,"groupingLabel"),m=B({computedData:n.pipe(tt((_,P)=>_.length===P.length)),isSeriesSeprate:c}).pipe(I(h),Y(async _=>_),O(_=>_.isSeriesSeprate?_.computedData:[_.computedData[0]]),O((_,P)=>e.selectAll(`g.${f}`).data(_,T=>T[0]?T[0].seriesIndex:P).join("g").classed(f,!0))),y=m.pipe(I(h),O((_,P)=>_.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:l}).pipe(I(h),Y(async _=>_)).subscribe(_=>{_.containerSelection.attr("transform",(P,T)=>{const w=_.gridContainerPosition[T]??_.gridContainerPosition[0],D=w.translate,S=w.scale;return`translate(${D[0]}, ${D[1]}) scale(${S[0]}, ${S[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(I(h),Y(async _=>_)).subscribe(_=>{_.axisSelection.style("transform",_.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(h),Y(async _=>_),O(_=>{const P=`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`${P} ${T} ${w} ${S}`}),tt()),v=new ft(_=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(h),Y(async P=>P)).subscribe(P=>{const w=P.computedData[0]?P.computedData[0].length-1:0,D=P.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-P.fullDataFormatter.grid.groupAxis.scalePadding:P.fullDataFormatter.grid.groupAxis.scaleDomain[0]-P.fullDataFormatter.grid.groupAxis.scalePadding,S=P.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?w+P.fullDataFormatter.grid.groupAxis.scalePadding:P.fullDataFormatter.grid.groupAxis.scaleDomain[1]+P.fullDataFormatter.grid.groupAxis.scalePadding,z=P.computedData[0]?P.computedData[0].length:0;let R=(P.computedData[0]??[]).map(G=>G.groupLabel);const A=new Array(z).fill(0).map((G,U)=>R[U]!=null?R[U]:String(U)).filter((G,U)=>U>=D&&U<=S),L=P.fullDataFormatter.grid.groupAxis.scalePadding,M=Qd({axisLabels:A,axisWidth:P.gridAxesSize.width,padding:L});_.next(M)})}),b=B({fullDataFormatter:i,fullParams:r}).pipe(I(h),Y(async _=>_),O(_=>{let P="middle",T="hanging";return _.fullDataFormatter.grid.groupAxis.position==="bottom"?(P=_.fullParams.tickTextRotate?"end":"middle",T="hanging"):_.fullDataFormatter.grid.groupAxis.position==="top"?(P=_.fullParams.tickTextRotate?"end":"middle",T="auto"):_.fullDataFormatter.grid.groupAxis.position==="left"?(P="end",T="middle"):_.fullDataFormatter.grid.groupAxis.position==="right"&&(P="start",T="middle"),{textAnchor:P,dominantBaseline:T}})),$=i.pipe(I(h),O(_=>{let P="start",T="hanging";return _.grid.groupAxis.position==="bottom"?T="hanging":_.grid.groupAxis.position==="top"?T="auto":_.grid.groupAxis.position==="left"?P="end":_.grid.groupAxis.position==="right"&&(P="start"),_.grid.valueAxis.position==="left"?P="start":_.grid.valueAxis.position==="right"?P="end":_.grid.valueAxis.position==="bottom"?T="auto":_.grid.valueAxis.position==="top"&&(T="hanging"),{textAnchor:P,dominantBaseline:T}}));return B({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:$,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:v,textTransform:x}).pipe(I(h),Y(async _=>_)).subscribe(_=>{hk({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)}},x2="GroupAxis",pk=se(x2,Jh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=n.fullDataFormatter$.pipe(I(i),O(s=>s.grid.separateSeries),tt(),_t(1)),a=v2(x2,{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()}}),_2=6;function dk({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:l,textTransform:c,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)=>{X(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",c).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=Tg(l).scale(l).ticks(p>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(p)).tickFormat(y=>Ph(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:_2).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+_2} 0`).style("transform",c),f}const Tu=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const h=new rt,f=at(t,"container"),p=at(t,"yAxisG"),d=at(t,"yAxis"),g=at(t,"text"),m=B({computedData:n.pipe(tt((P,T)=>P.length===T.length)),isSeriesSeprate:c}).pipe(I(h),Y(async P=>P),O(P=>P.isSeriesSeprate?P.computedData:[P.computedData[0]]),O((P,T)=>e.selectAll(`g.${f}`).data(P,w=>w[0]?w[0].seriesIndex:T).join("g").classed(f,!0))),y=m.pipe(I(h),O((P,T)=>P.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:l}).pipe(I(h),Y(async P=>P)).subscribe(P=>{P.containerSelection.attr("transform",(T,w)=>{const D=P.gridContainerPosition[w]??P.gridContainerPosition[0],S=D.translate,z=D.scale;return`translate(${S[0]}, ${S[1]}) scale(${z[0]}, ${z[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(I(h),Y(async P=>P)).subscribe(P=>{P.axisSelection.style("transform",P.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(h),Y(async P=>P),O(P=>{const T=`translate(${P.gridAxesReverseTransform.translate[0]}px, ${P.gridAxesReverseTransform.translate[1]}px)`,w=`rotate(${P.gridAxesReverseTransform.rotate}deg) rotateX(${P.gridAxesReverseTransform.rotateX}deg) rotateY(${P.gridAxesReverseTransform.rotateY}deg)`,D=`scale(${1/P.gridContainerPosition[0].scale[0]}, ${1/P.gridContainerPosition[0].scale[1]})`,z=`rotate(${P.fullDataFormatter.grid.groupAxis.position==="left"&&P.fullDataFormatter.grid.valueAxis.position==="top"||P.fullDataFormatter.grid.groupAxis.position==="right"&&P.fullDataFormatter.grid.valueAxis.position==="bottom"?P.fullParams.tickTextRotate+180:P.fullParams.tickTextRotate}deg)`;return`${T} ${w} ${D} ${z}`}),tt()),v=new ft(P=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(h),Y(async T=>T)).subscribe(T=>{const D=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"?D+T.fullDataFormatter.grid.groupAxis.scalePadding:T.fullDataFormatter.grid.groupAxis.scaleDomain[1]+T.fullDataFormatter.grid.groupAxis.scalePadding,R=T.computedData.map((L,M)=>L.filter((G,U)=>U>=S&&U<=z)),A=$R(R.flat());P.next(A)})}),b=new ft(P=>{B({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(I(h),Y(async T=>T)).subscribe(T=>{const w=Kd({maxValue:T.minAndMax[1],minValue:T.minAndMax[0],axisWidth:T.gridAxesSize.height,scaleDomain:T.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:T.fullDataFormatter.grid.valueAxis.scaleRange});P.next(w)})}),$=i.pipe(I(h),O(P=>{let T="start",w="hanging";return P.grid.valueAxis.position==="left"?(T="end",w="middle"):P.grid.valueAxis.position==="right"?(T="start",w="middle"):P.grid.valueAxis.position==="bottom"?(T="middle",w="hanging"):P.grid.valueAxis.position==="top"&&(T="middle",w="auto"),{textAnchor:T,dominantBaseline:w}})),_=i.pipe(I(h),O(P=>{let T="start",w="hanging";return P.grid.groupAxis.position==="bottom"?w="auto":P.grid.groupAxis.position==="top"?w="hanging":P.grid.groupAxis.position==="left"?T="start":P.grid.groupAxis.position==="right"&&(T="end"),P.grid.valueAxis.position==="left"?T="end":P.grid.valueAxis.position==="right"?T="start":P.grid.valueAxis.position==="bottom"?w="hanging":P.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(I(h),Y(async P=>P)).subscribe(P=>{dk({selection:P.axisSelection,yAxisClassName:d,textClassName:g,fullParams:P.fullParams,tickTextAlign:P.tickTextAlign,axisLabelAlign:P.axisLabelAlign,gridAxesSize:P.gridAxesSize,fullDataFormatter:P.fullDataFormatter,fullChartParams:P.fullChartParams,valueScale:P.valueScale,textTransform:P.textTransform,minAndMax:P.minAndMax})}),()=>{h.next(void 0)}},w2="ValueAxis",gk=se(w2,Ru)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=n.fullDataFormatter$.pipe(I(i),O(s=>s.grid.separateSeries),tt(),_t(1)),a=Tu(w2,{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()}}),$2="ValueStackAxis",mk=se($2,tp)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=n.computedData$.pipe(I(i),O(u=>{const l=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:l[d]})))})),a=n.fullDataFormatter$.pipe(I(i),O(u=>u.grid.separateSeries),tt(),_t(1)),s=Tu($2,{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()}}),S2="ScalingArea",yk=at(S2,"rect"),bk=se(S2,ep)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new rt,a=e.insert("rect","g").classed(yk,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.width).attr("height",l.height).attr("x",l.left).attr("y",l.top)});const u=r.computedData$.pipe(O(l=>l[0]?l[0].length-1:0),tt());return B({initGroupAxis:r.fullDataFormatter$.pipe(O(l=>l.grid.groupAxis),m_()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),Y(async l=>l)).subscribe(l=>{const h=l.groupMaxIndex,f=l.initGroupAxis.scaleDomain[0]==="auto"?0-l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[0]-l.initGroupAxis.scalePadding,p=l.initGroupAxis.scaleDomain[1]==="auto"?h+l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[1]+l.initGroupAxis.scalePadding,g=Kd({maxValue:l.groupMaxIndex,minValue:0,axisWidth:l.axisSize.width,scaleDomain:[f,p],scaleRange:[0,1]}).copy(),m=Kv().on("zoom",function(x){const v=x.transform,b=P=>{const T=Math.round(P);return Math.min(h,Math.max(0,T))},$=l.fullDataFormatter.grid.groupAxis.position==="bottom"||l.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 _={...l.fullDataFormatter,grid:{...l.fullDataFormatter.grid,groupAxis:{...l.fullDataFormatter.grid.groupAxis,scaleDomain:$}}};i.dataFormatter$.next(_)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function vk(t,e){let n=new ft(()=>{});return t.each(function(){const r=Vu(this,e);n=ju(n,r)}),n}const Ch="GroupAux",Eh=at(Ch,"label-box");function xk({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function _k({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=at(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",l=>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",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),a.transition().duration(50).attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),u}function wk(t){t.selectAll("line").data([]).exit().remove()}function $k({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Ph(t,n.labelTextFormat)}]:[]}function Sk({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i,textSizePx:o}){const a=o+4,s=t.selectAll(`g.${Eh}`).data(e),u=s.enter().append("g").classed(Eh,!0).style("cursor","pointer"),l=u.merge(s);return u.attr("transform",(c,h)=>`translate(${c.x}, ${c.y})`),s.transition().duration(50).attr("transform",(c,h)=>`translate(${c.x}, ${c.y})`),s.exit().remove(),l.each((c,h,f)=>{const p=Jv(c.text,o)+12,d=-p/2,g=X(f[h]).selectAll("rect").data([c]),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=X(f[h]).selectAll("text").data([c]),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()}),l}function Ak(t){t.selectAll(`g.${Eh}`).data([]).exit().remove()}const Mk=se(Ch,Zh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new rt,a=e.insert("rect","g").classed(at(Ch,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(I(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(I(o),O(f=>f.value),tt()).subscribe(f=>{s.style("transform",f)});const u=new ft(f=>{B({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(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(P=>P.groupLabel):p.computedData.map(P=>P[0].groupLabel);const b=new Array(x).fill(0).map((P,T)=>v[T]!=null?v[T]:String(T)).filter((P,T)=>T>=m&&T<=y),$=p.fullDataFormatter.grid.groupAxis.scalePadding,_=Qd({axisLabels:b,axisWidth:p.gridAxesSize.width,padding:$});f.next(_)})}),l=Dh({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),c=i.fullChartParams$.pipe(I(o),O(f=>f.highlightTarget),tt());return B({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:c,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:l,groupScale:u}).pipe(I(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(hr(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:c,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:l,textSizePx:i.textSizePx$}).pipe(I(o),Y(async f=>f)).subscribe(f=>{const p=f.groupScale(f.event.groupLabel)??0,d=xk({groupLabel:f.event.groupLabel,axisX:p,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});_k({selection:s,pluginName:n,lineData:d,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=$k({groupLabel:f.event.groupLabel,axisX:p,fullParams:f.fullParams});Sk({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})})}),vk(a,"mouseout").pipe(I(o)).subscribe(f=>{console.log("rootMouseout"),wk(s),Ak(s)}),()=>{o.next(void 0),a.remove()}}),A2={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"},M2={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]},P2={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]},T2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},L2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},C2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},E2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},R2={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]},I2="MultiGridLegend",Pk=Re(I2,A2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.multiGridEachDetail$.pipe(I(i),O(l=>l.map((h,f)=>h.SeriesDataMap$.pipe(O(p=>Array.from(p.keys()))))),Y(l=>B(l)),O(l=>l.flat())),a=B({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(I(i),Y(async l=>l),O(l=>l.computedData.map((c,h)=>{const f=gl(l.fullParams.gridList[h]??{},{listRectWidth:l.fullParams.listRectWidth,listRectHeight:l.fullParams.listRectHeight,listRectRadius:l.fullParams.listRectRadius});return c.map(p=>f)}).flat())),s=B({fullParams:n.fullParams$,seriesList:a}).pipe(I(i),Y(async l=>l),O(l=>({...l.fullParams,seriesList:l.seriesList}))),u=Du(I2,{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(O(n=>n.gridIndexes),tt(),_t(1));return B({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(O(n=>n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Rh="MultiBars",N2=at(Rh,"grid"),Dk=Re(Rh,D2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return un(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${N2}`).data(s).join("g").attr("class",N2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),tt(),_t(1));o[l]=Th(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$,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",F2=at(kh,"grid"),Tk=Re(kh,T2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return un(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${F2}`).data(s).join("g").attr("class",F2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),tt(),_t(1));o[l]=l2(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())}}),Ih="MultiBarsTriangle",G2=at(Ih,"grid"),Lk=Re(Ih,L2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return un(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${G2}`).data(s).join("g").attr("class",G2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),tt(),_t(1));o[l]=p2(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$,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())}}),Nh="MultiLines",z2=at(Nh,"grid"),Ck=Re(Nh,C2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return un(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${z2}`).data(s).join("g").attr("class",z2).each((u,l,c)=>{const h=X(c[l]);o[l]=t2(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$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Fh="MultiLineAreas",O2=at(Fh,"grid"),Ek=Re(Fh,E2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return un(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${O2}`).data(s).join("g").attr("class",O2).each((u,l,c)=>{const h=X(c[l]);o[l]=n2(Fh,{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())}}),Gh="MultiDots",U2=at(Gh,"grid"),Rk=Re(Gh,R2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return un(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${U2}`).data(s).join("g").attr("class",U2).each((u,l,c)=>{const h=X(c[l]);o[l]=g2(Gh,{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())}}),zh="MultiGroupAxis",B2=at(zh,"grid"),kk=Re(zh,M2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return un(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${B2}`).data(s).join("g").attr("class",B2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),tt(),_t(1));o[l]=v2(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())}}),Oh="MultiValueAxis",Y2=at(Oh,"grid"),Ik=Re(Oh,P2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return un(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Y2}`).data(s).join("g").attr("class",Y2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),tt(),_t(1));o[l]=Tu(Oh,{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 Nk(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function H2(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:Nk(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),c=(t.width-r*(o-1))/o,h=(t.height-r*(i-1))/i,f=u*c+u*r,p=l*h+l*r,d=[f,p],g=[c/t.width,h/t.height];return{slotIndex:s,rowIndex:l,columnIndex:u,translate:d,scale:g}})}const Fk=({fullDataFormatter$:t,layout$:e})=>{const n=new rt;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,l=0,c=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,l=s):o.position==="right"?(h=180,f=180,u=a,l=s):(h=180,l=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,l=s)):i.position==="left"?o.position==="bottom"?(c=-90,l=s):o.position==="top"?(c=-90,f=180):(h=180,l=s):i.position==="right"&&(o.position==="bottom"?(c=-90,h=180,l=s,u=a):o.position==="top"?(c=-90,h=180,f=180,u=a):(h=180,l=s)),{translate:[u,l],scale:[1,1],rotate:c,rotateX:h,rotateY:f,value:`translate(${u}px, ${l}px) rotate(${c}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new ft(i=>(B({fullDataFormatter:t,layout:e}).pipe(I(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)}))},Gk=({gridAxesTransform$:t})=>t.pipe(O(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)`}})),zk=({computedData$:t,fullDataFormatter$:e,layout$:n})=>B({computedData:t,fullDataFormatter:e,layout:n}).pipe(Y(async i=>i),O(i=>{if(i.fullDataFormatter.grid.separateSeries)return H2(i.layout,i.fullDataFormatter.container,i.computedData.length);{const o=H2(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((a,s)=>o[0])}})),Uh="OverlappingValueAxes",W2=at(Uh,"grid"),Ok=Re(Uh,k2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[],a=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[1])),u=B({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),Y(async c=>c),O(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));let h="";return c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="left"?h="right":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="bottom"?h="top":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="top"?h="bottom":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Wu(r).pipe(I(i),O(c=>({...c,fullParams$:c.fullParams$.pipe(O(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),Y(c=>un(c)),O(c=>c.map((h,f)=>{if(f===0)return h;const p=Fk({fullDataFormatter$:u,layout$:r.layout$}),d=Gk({gridAxesTransform$:p}),g=zk({computedData$:h.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...h,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(h=>h()),t.selectAll(`g.${W2}`).data(c).join("g").attr("class",W2).each((h,f,p)=>{if(f>1)return;const d=X(p[f]),g=h.dataFormatter$.pipe(I(i),O(m=>m.grid.separateSeries),tt(),_t(1));o[f]=Tu(Uh,{selection:d,computedData$:h.computedData$,fullParams$:r.fullParams$.pipe(O(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(c=>c())}}),q2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},V2={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},Uk=Jd("Container",q2)(({selection:t})=>function(){}),Bh="Tooltip",j2=at(Bh,"g"),Bk=at(Bh,"box");function Yk(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 Hk({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],l=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.${Bk}`).data(l).join(b=>b.append("g").classed(at(e,"box"),!0)),f=h.selectAll("rect").data(l).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(at(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&_R(p,u[0]);const d=p!=null&&p.node()?Qv(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()?Qv(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 Wk=Jd(Bh,V2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new rt,s=o.event$.pipe(I(a),hr(g=>g.eventName==="mouseover"||g.eventName==="mousemove")),u=o.event$.pipe(I(a),hr(g=>g.eventName==="mouseout")),l=o3(i.fullChartParams$),c=B({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$,textSizePx:l}).pipe(I(a),Y(async g=>g),O(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:c}).pipe(I(a),Y(async g=>g),O(g=>g.fullParams.svgRenderFn?g.fullParams.svgRenderFn:m=>{const y=g.fullParams.textRenderFn(m);return Yk(y,g.tooltipStyle)})),f=B({event:s,contentRenderFn:h}).pipe(I(a),Y(async g=>g),O(g=>g.contentRenderFn(g.event))),p=u.pipe(I(a),O(g=>"")),d=ju(s,u).pipe(I(a),O(g=>g.event));return B({svgString:ju(f,p),event:d,layout:i.layout$,tooltipStyle:c}).pipe(I(a),Y(async g=>g)).subscribe(g=>{Hk({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,arcScaleType:"area"},Z2={outerRadius:.95,innerRadius:0,mouseoverOuterRadius:1,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},K2={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"}]},Q2={outerRadius:.95,mouseoverOuterRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.label)},J2={outerRadius:.95,cornerRadius:0,arcScaleType:"area",mouseoverAngleIncrease:.05},tx={outerRadius:.95,labelCentroid:2.5,labelFn:t=>String(t.label),labelColorType:"series",arcScaleType:"area"},ex={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function qk(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 l(p){const d=u(p.trim());return Math.sqrt(d*r)}function c(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=l(d),y=c(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",(_,P)=>(P-y.length/2+.8)*r).text(_=>_.text);return b.exit().remove(),b.merge($)}return f(t,e)}let or;function Vk(t,e){return Pm().velocityDecay(e.force.velocityDecay).force("collision",Sm().radius(n=>n.r+e.force.collisionSpacing)).force("charge",Dm().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function jk({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)*.785}function Xk({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)),l=s.reduce((d,g)=>d+(g.value??0),0)/s.length,c=jk({data:s,bubbleGroupR:a,maxValue:u,avgValue:l}),h=o==="area"?.5:1,f=Kr().domain([0,u]).range([0,c]).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 nx({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 l=X(u[s]);let c=!0;a[o].length<=n.bubbleText.lineLengthMin&&(c=!1),l.call(qk,{text:a[o],radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:c})}),i}function Zk({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 Kk(){return Ug().on("start",(t,e)=>{t.active||or.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||or.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function rx({fullParams:t,SeriesContainerPositionMap:e}){or.force("x",Tm().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",Lm().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),or.alpha(1).restart()}function Qk({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=X(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(qi).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const Jk=Ln("Bubbles",X2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g");let a=new Map;const s=n.fullDataFormatter$.pipe(O(f=>f.sumSeries),tt()),u=n.fullParams$.pipe(I(i),O(f=>f.arcScaleType),tt()),l=new ft(f=>{B({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:u}).pipe(I(i),Y(async p=>p)).subscribe(p=>{const d=Xk({data:p.visibleComputedLayoutData,LastBubbleDataMap:a,graphicWidth:p.layout.width,graphicHeight:p.layout.height,SeriesContainerPositionMap:p.SeriesContainerPositionMap,scaleType:p.scaleType});f.next(d)})});l.subscribe(f=>{a=new Map(f.map(p=>[p.id,p]))});const c=n.fullChartParams$.pipe(I(i),O(f=>f.highlightTarget),tt()),h=B({bubblesData:l,fullParams:n.fullParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:s}).pipe(I(i),Y(async f=>f),O(f=>{const p=nx({graphicSelection:o,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries});return or=Vk(p,f.fullParams),or.nodes(f.bubblesData),rx({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),p}));return B({bubblesSelection:h,layout:n.layout$,computedData:n.computedData$,bubblesData:l,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:c,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(I(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(Kk())}),B({bubblesSelection:h,bubblesData:l,highlight:n.seriesHighlight$.pipe(O(f=>f.map(p=>p.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:s,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(I(i),Y(async f=>f)).subscribe(f=>{Qk({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams}),f.fullParams.highlightRIncrease&&(Zk({data:f.bubblesData,highlightRIncrease:f.fullParams.highlightRIncrease,highlightIds:f.highlight}),nx({graphicSelection:o,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries})),rx({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),or.nodes(f.bubblesData)}),()=>{i.next(void 0)}});function ix({data:t,startAngle:e,endAngle:n}){return cv().startAngle(e).endAngle(n).value(o=>o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function tI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=at(e,"series");return B({seriesLabels:r,separateSeries:n}).pipe(Y(async o=>o),O((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())}),_t(1))}const ko=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=tI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a),tt((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),{seriesCenterSelection$:o}},Yh="Pie";function eI({enter:t,exit:e,data:n,lastTweenData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const l=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+l.startAngle*(1-o),endAngle:s.endAngle*o+l.endAngle*(1-o),value:s.value*o+l.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 ox({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 nI({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=X(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(qi).duration(500).attr("d",l=>i(l)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>r(l))})}function rI(t,e){const n=new rt,r=at(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(I(n),O(f=>f.width<f.height?f.width:f.height),tt()),s=new ft(f=>{B({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p)).subscribe(p=>{const d=ix({data:p.containerVisibleComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});f.next(d)})}),u=new ft(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(I(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)})}),l=new ft(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p)).subscribe(p=>{const d=Mu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.mouseoverOuterRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),c=e.fullChartParams$.pipe(I(n),O(f=>f.highlightTarget),tt()),h=new ft(f=>{B({pieData:s,arc:u,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:c}).pipe(I(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=eI({enter:g,exit:m,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});e.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(x,v)=>b=>{o=y(b),ox({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=ox({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})})})}).pipe(_t(1));return B({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:c}).pipe(I(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(O(f=>f.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:u,arcMouseover:l}).pipe(I(n),Y(async f=>f)).subscribe(f=>{nI({pathSelection:f.pathSelection,ids:f.highlight,fullChartParams:f.fullChartParams,arc:f.arc,arcMouseover:f.arcMouseover})}),()=>{n.next(void 0)}}const iI=Ln(Yh,Z2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,{seriesCenterSelection$:o}=ko({selection:t,pluginName:Yh,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const h=X(c[l]),f=r.visibleComputedLayoutData$.pipe(I(i),O(d=>d[l]??d[0])),p=r.seriesContainerPosition$.pipe(I(i),O(d=>d[l]??d[0]));a[l]=rI(Yh,{containerSelection:h,computedData$:r.computedData$,containerVisibleComputedLayoutData$: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())}}),Lu="PieEventTexts",ax=at(Lu,"text");function Wh(t,e){const n=t.selectAll(`text.${ax}`).data(e),r=n.enter().append("text").classed(ax,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=X(s[a]).text(o.text);Object.keys(o.attr).forEach(l=>{u.attr(l,o.attr[l])}),Object.keys(o.style).forEach(l=>{u.style(l,o.style[l])})}),n.exit().remove(),i}function qh({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 oI(t,e){const n=new rt;let r;const i=e.fullChartParams$.pipe(I(n),O(o=>o.highlightTarget),tt());return B({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(I(n),Y(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>u=>{const l=qh({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});Wh(e.containerSelection,l)}).on("end",(a,s)=>{const u=qh({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});Wh(e.containerSelection,u),r&&r.unsubscribe(),r=e.event$.subscribe(l=>{const c=qh({eventData:l,eventName:l.eventName,t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});Wh(e.containerSelection,c)})})}),()=>{n.next(void 0)}}const aI=Ln(Lu,K2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,{seriesCenterSelection$:o}=ko({selection:t,pluginName:Lu,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const h=X(c[l]),f=n.computedLayoutData$.pipe(I(i),O(d=>d[l]??d[0])),p=n.seriesContainerPosition$.pipe(I(i),O(d=>d[l]??d[0]));a[l]=oI(Lu,{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())}}),Cu="PieLabels",sI=at(Cu,"text");function uI(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,l]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:l*r}}).filter(i=>i.pieDatum.data.visible)}function lI(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(sI,!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,l)=>Pu({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function cI({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=X(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 fI(t,e){const n=new rt;let r=new rt,i=[];const o=e.seriesContainerPosition$.pipe(I(n),O(a=>a.width<a.height?a.width:a.height),tt());return B({shorterSideWith:o,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async a=>a)).subscribe(a=>{const s=Mu({axisWidth:a.shorterSideWith,innerRadius:0,outerRadius:a.fullParams.outerRadius,padAngle:0,cornerRadius:0}),u=Mu({axisWidth:a.shorterSideWith,innerRadius:0,outerRadius:a.fullParams.mouseoverOuterRadius,padAngle:0,cornerRadius:0}),l=ix({data:a.containerVisibleComputedLayoutData,startAngle:a.fullParams.startAngle,endAngle:a.fullParams.endAngle});i=uI(l,s,u,a.fullParams.labelCentroid);const c=lI(e.containerSelection,i,a.fullParams,a.fullChartParams);r.next(c)}),B({labelSelection:r,highlight:e.seriesHighlight$.pipe(O(a=>a.map(s=>s.id))),fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async a=>a)).subscribe(a=>{cI({labelSelection:a.labelSelection,ids:a.highlight,fullChartParams:a.fullChartParams})}),()=>{n.next(void 0)}}const hI=Ln(Cu,Q2)(({selection:t,observer:e,subject:n})=>{const r=new rt,{seriesCenterSelection$:i}=ko({selection:t,pluginName:Cu,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(I(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=X(l[u]),h=e.visibleComputedLayoutData$.pipe(I(r),O(p=>p[u]??p[0])),f=e.seriesContainerPosition$.pipe(I(r),O(p=>p[u]??p[0]));o[u]=fI(Cu,{containerSelection:c,containerVisibleComputedLayoutData$:h,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:f,event$:n.event$})})}),()=>{r.next(void 0)}}),Vh="Rose",pI=Math.PI*2,sx=0;function dI({cornerRadius:t,outerRadius:e,axisWidth:n,maxValue:r,arcScaleType:i}){const o=n/2*e,a=i==="area"?.5:1,s=Kr().domain([0,r]).range([0,o]).exponent(a);return u=>{const l=s(u.prevValue),c=s(u.value),h=Ve(l,c);return f=>{const p=h(f);return pu().innerRadius(0).outerRadius(p).padAngle(sx).padRadius(p).cornerRadius(t)(u)}}}function gI({pathSelection:t,ids:e,fullParams:n,fullChartParams:r,tweenArc:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>i(o)(1));return}t.each((o,a,s)=>{const u=X(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(qi).duration(500).attr("d",l=>i({...l,startAngle:l.startAngle-n.mouseoverAngleIncrease,endAngle:l.endAngle+n.mouseoverAngleIncrease})(1)):u.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>i(l)(1))})}function mI(t,e){const n=new rt,r=at(t,"path");let i=[];const o=e.seriesContainerPosition$.pipe(I(n),O(p=>p.width<p.height?p.width:p.height),tt()),a=B({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p),O(p=>{const d=pI/p.containerVisibleComputedLayoutData.length;return p.containerVisibleComputedLayoutData.map((g,m)=>({id:g.id,data:g,index:m,value:g.value,startAngle:d*m,endAngle:d*(m+1),padAngle:sx,prevValue:i[m]&&i[m].id===g.id?i[m].value:0}))})),s=e.fullChartParams$.pipe(I(n),O(p=>p.highlightTarget),tt()),u=e.visibleComputedLayoutData$.pipe(O(p=>Math.max(...p.flat().map(d=>d.value))),tt()),l=B({fullParams:e.fullParams$,axisWidth:o,maxValue:u}).pipe(I(n),Y(async p=>p),O(p=>dI({cornerRadius:p.fullParams.cornerRadius,outerRadius:p.fullParams.outerRadius,axisWidth:p.axisWidth,maxValue:p.maxValue,arcScaleType:p.fullParams.arcScaleType}))),c=e.fullChartParams$.pipe(I(n),O(p=>p.transitionDuration),tt()),h=new Dx(!1),f=new ft(p=>{B({pieData:a,tweenArc:l,transitionDuration:c}).pipe(I(n),Y(async d=>d)).subscribe(d=>{const g=d.pieData.map((y,x)=>(y.prevValue=i[x]&&i[x].id===y.id?i[x].value:0,y));h.next(!0);const m=e.containerSelection.selectAll("path").data(g,y=>y.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(y,x)=>y.data.color);m.interrupt("graphicMove"),m.transition("graphicMove").duration(d.transitionDuration).attrTween("d",d.tweenArc).on("end",()=>{p.next(m),h.next(!1)}),i=Object.assign([],g)})}).pipe(_t(1));return B({pathSelection:f,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:s}).pipe(I(n),Y(async p=>p)).subscribe(p=>{p.pathSelection.on("mouseover",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mousemove",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mouseout",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("click",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})})}),B({pathSelection:f,highlight:e.seriesHighlight$.pipe(O(p=>p.map(d=>d.id))),fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,tweenArc:l,isTransitionMoving:h}).pipe(I(n),Y(async p=>p),hr(p=>!p.isTransitionMoving)).subscribe(p=>{gI({pathSelection:p.pathSelection,ids:p.highlight,fullParams:p.fullParams,fullChartParams:p.fullChartParams,tweenArc:p.tweenArc})}),()=>{n.next(void 0)}}const yI=Ln(Vh,J2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,{seriesCenterSelection$:o}=ko({selection:t,pluginName:Vh,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const h=X(c[l]),f=r.visibleComputedLayoutData$.pipe(I(i),O(d=>JSON.parse(JSON.stringify(d[l]??d[0])))),p=r.seriesContainerPosition$.pipe(I(i),O(d=>JSON.parse(JSON.stringify(d[l]??d[0]))));a[l]=mI(Vh,{containerSelection:h,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,containerVisibleComputedLayoutData$: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())}}),Eu="RoseLabels",bI=at(Eu,"text");function vI({pieData:t,centroid:e,arcScaleType:n,maxValue:r,axisWidth:i,outerRadius:o}){const a=i/2*o,s=n==="area"?.5:1,u=Kr().domain([0,r]).range([0,a]).exponent(s);return t.map((l,c)=>{const h=u(l.value),f=pu().innerRadius(0).outerRadius(h).padAngle(0).padRadius(h).cornerRadius(0),[p,d]=f.centroid(l),[g,m]=[p,d];return{pieDatum:l,arcIndex:c,arcLabel:l.data.label,x:p*e,y:d*e,mouseoverX:g*e,mouseoverY:m*e}}).filter(l=>l.pieDatum.data.visible)}function xI(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(bI,!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,l)=>Pu({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function _I({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=X(o[i]);e.includes(r.pieDatum.data.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 wI(t,e){const n=new rt;let r=new rt,i=[];const o=e.seriesContainerPosition$.pipe(I(n),O(s=>s.width<s.height?s.width:s.height),tt()),a=e.visibleComputedLayoutData$.pipe(O(s=>Math.max(...s.flat().map(u=>u.value))),tt());return B({shorterSideWith:o,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,maxValue:a,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async s=>s)).subscribe(s=>{const u=Math.PI*2/s.containerVisibleComputedLayoutData.length,l=s.containerVisibleComputedLayoutData.map((h,f)=>({id:h.id,data:h,index:f,value:h.value,startAngle:u*f,endAngle:u*(f+1),padAngle:0}));i=vI({pieData:l,centroid:s.fullParams.labelCentroid,arcScaleType:s.fullParams.arcScaleType,maxValue:s.maxValue,axisWidth:s.shorterSideWith,outerRadius:s.fullParams.outerRadius});const c=xI(e.containerSelection,i,s.fullParams,s.fullChartParams);r.next(c)}),B({labelSelection:r,highlight:e.seriesHighlight$.pipe(O(s=>s.map(u=>u.id))),fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async s=>s)).subscribe(s=>{_I({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{n.next(void 0)}}const $I=Ln(Eu,tx)(({selection:t,observer:e,subject:n})=>{const r=new rt,{seriesCenterSelection$:i}=ko({selection:t,pluginName:Eu,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(I(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=X(l[u]),h=e.visibleComputedLayoutData$.pipe(I(r),O(p=>JSON.parse(JSON.stringify(p[u]??p[0])))),f=e.seriesContainerPosition$.pipe(I(r),O(p=>JSON.parse(JSON.stringify(p[u]??p[0]))));o[u]=wI(Eu,{containerSelection:c,visibleComputedLayoutData$:e.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:h,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:f,event$:n.event$})})}),()=>{r.next(void 0)}}),ux="SeriesLegend",SI=Ln(ux,ex)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(I(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),O(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Du(ux,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),lx={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},cx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},fx="TreeLegend",AI=tg(fx,cx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.CategoryDataMap$.pipe(I(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),O(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Du(fx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),ar="TreeMap",hx=at(ar,"tree"),px=at(ar,"tile");function MI({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${hx}`).data(e,u=>u.data.id).join("g").attr("class",hx);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,l,c)=>{const h=X(c[l]);h.selectAll(`rect.${px}`).data([u],f=>f.data.id).join("rect").attr("id",f=>f.data.id).attr("class",px).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)=>{X(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=X(this),x=m.data.label.split(/\s+/).reverse();let v,b=[];const $=y.attr("x");let _=y.attr("y"),P=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],P+=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",P+"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)?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const DI=tg(ar,lx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=B({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async u=>u),O(u=>{const l=xy().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Bf.ratio(u.fullParams.squarifyRatio)),c=Ws(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return l(c),c.leaves()})),a=B({selection:Wu(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(I(i),Y(async u=>u),O(u=>MI({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(I(i),O(u=>u.highlightTarget),tt());return B({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(I(i),Y(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:ar,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mousemove",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:ar,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mouseout",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:ar,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("click",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:ar,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})})}),B({cellSelection:a,highlight:r.treeHighlight$.pipe(O(u=>u.map(l=>l.id))),fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async u=>u)).subscribe(u=>{PI({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});K.BarStack=KR,K.Bars=YR,K.BarsDiverging=HR,K.BarsTriangle=ok,K.Bubbles=Jk,K.CONTAINER_PLUGIN_PARAMS=q2,K.Container=Uk,K.DEFAULT_BARS_DIVERGING_PARAMS=dx,K.DEFAULT_BARS_PARAMS=No,K.DEFAULT_BARS_TRIANGLE_PARAMS=Qh,K.DEFAULT_BAR_STACK_PARAMS=Kh,K.DEFAULT_BUBBLES_PARAMS=X2,K.DEFAULT_DOTS_PARAMS=Xh,K.DEFAULT_GRID_LEGEND_PARAMS=np,K.DEFAULT_GROUP_AREA_PARAMS=Zh,K.DEFAULT_GROUP_AXIS_PARAMS=Jh,K.DEFAULT_LINES_PARAMS=sr,K.DEFAULT_LINE_AREAS_PARAMS=jh,K.DEFAULT_MULTI_BARS_PARAMS=D2,K.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=L2,K.DEFAULT_MULTI_BAR_STACK_PARAMS=T2,K.DEFAULT_MULTI_DOTS_PARAMS=R2,K.DEFAULT_MULTI_GRID_LEGEND_PARAMS=A2,K.DEFAULT_MULTI_GROUP_AXIS_PARAMS=M2,K.DEFAULT_MULTI_LINES_PARAMS=C2,K.DEFAULT_MULTI_LINE_AREAS_PARAMS=E2,K.DEFAULT_MULTI_VALUE_AXIS_PARAMS=P2,K.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=k2,K.DEFAULT_PIE_EVENT_TEXTS_PARAMS=K2,K.DEFAULT_PIE_LABELS_PARAMS=Q2,K.DEFAULT_PIE_PARAMS=Z2,K.DEFAULT_ROSE_LABELS_PARAMS=tx,K.DEFAULT_ROSE_PARAMS=J2,K.DEFAULT_SCALING_AREA_PARAMS=ep,K.DEFAULT_SERIES_LEGEND_PARAMS=ex,K.DEFAULT_TREE_LEGEND_PARAMS=cx,K.DEFAULT_TREE_MAP_PARAMS=lx,K.DEFAULT_VALUE_AXIS_PARAMS=Ru,K.DEFAULT_VALUE_STACK_AXIS_PARAMS=tp,K.Dots=lk,K.GridLegend=fk,K.GroupAux=Mk,K.GroupAxis=pk,K.LineAreas=NR,K.Lines=TR,K.MultiBarStack=Tk,K.MultiBars=Dk,K.MultiBarsTriangle=Lk,K.MultiDots=Rk,K.MultiGridLegend=Pk,K.MultiGroupAxis=kk,K.MultiLineAreas=Ek,K.MultiLines=Ck,K.MultiValueAxis=Ik,K.OverlappingValueAxes=Ok,K.Pie=iI,K.PieEventTexts=aI,K.PieLabels=hI,K.Rose=yI,K.RoseLabels=$I,K.ScalingArea=bk,K.SeriesLegend=SI,K.TOOLTIP_PARAMS=V2,K.Tooltip=Wk,K.TreeLegend=AI,K.TreeMap=DI,K.ValueAxis=gk,K.ValueStackAxis=mk,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
|
15
|
+
`})}function uR({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)=>{X(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 lR({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)?X(a[o]).style("opacity",1):X(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const m2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:l,fullParams$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new et,b=$n(t,"clipPath-box"),w=at(t,"pathG"),D=at(t,"path"),{seriesSelection$:T,axesSelection$:$,defsSelection$:_,graphicGSelection$:P}=ai({selection:e,pluginName:t,clipPathID:b,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p});p.pipe(I(v),O(C=>-C.translate[1]/C.scale[1]));const S=o.pipe(O(C=>C.map(F=>F[0]?F[0].axisY-F[0].axisYFromZero:0)),rt()),G=B({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(I(v),Y(async C=>C),O(C=>C.params.barWidth?C.params.barWidth:C.isSeriesSeprate?g2({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:1,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}):g2({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(I(v),O(C=>{const F=new Set;return C.forEach(j=>{j.forEach(Q=>{F.add(Q.groupLabel)})}),Array.from(F)})),A=new pt(C=>{B({seriesLabels:s,barWidth:G,params:c}).pipe(I(v),Y(async F=>F)).subscribe(F=>{const j=rR(F.barWidth,F.seriesLabels,F.params);C.next(j)})}),L=h.pipe(I(v),O(C=>C.transitionDuration),rt()),M=new pt(C=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async F=>F)).subscribe(F=>{const j=iR(F.groupLabels.length,F.transitionDuration);C.next(j)})}).pipe(I(v),rt()),z=new pt(C=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async F=>F)).subscribe(F=>{const j=oR(F.groupLabels.length,F.transitionDuration);C.next(j)})}).pipe(I(v),rt());B({defsSelection:_,gridAxesSize:d}).pipe(I(v),Y(async C=>C)).subscribe(C=>{const F=[{id:b,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];uR({defsSelection:C.defsSelection,clipPathData:F})});const U=h.pipe(I(v),O(C=>C.highlightTarget),rt()),E=s.pipe(I(v),O(C=>C.map((F,j)=>$n(t,`lineargradient-${F}`)))),R=B({graphicGSelection:P,defsSelection:_,computedData:n,visibleComputedLayoutData:o,linearGradientIds:E,zeroYArr:S,groupLabels:k,barScale:A,params:c,chartParams:h,barWidth:G,delayGroup:M,transitionItem:z,isSeriesSeprate:y}).pipe(I(v),Y(async C=>C),O(C=>(sR({defsSelection:C.defsSelection,computedData:C.computedData,linearGradientIds:C.linearGradientIds,params:C.params}),aR({graphicGSelection:C.graphicGSelection,pathGClassName:w,pathClassName:D,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:U,SeriesDataMap:u,GroupDataMap:l}).subscribe(C=>{C.barSelection.on("mouseover",(F,j)=>{F.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:F,data:C.computedData})}).on("mousemove",(F,j)=>{F.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:F,data:C.computedData})}).on("mouseout",(F,j)=>{F.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:F,data:C.computedData})}).on("click",(F,j)=>{F.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:F,data:C.computedData})})}),B({barSelection:R,highlight:g.pipe(O(C=>C.map(F=>F.id))),fullChartParams:h}).pipe(I(v),Y(async C=>C)).subscribe(C=>{lR({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{v.next(void 0)}},y2="BarsTriangle",cR=se(y2,np)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=m2(y2,{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$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function fR({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const h=c.size();return o.transitionDuration/h};let u=0;return t.each((c,h,f)=>{X(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)=>{X(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)=>Lu({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Lu({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 hR({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)?X(a[o]).style("opacity",1).transition("highlight").duration(200):X(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function pR({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)=>{X(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 b2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new et,v=$n(t,"clipPath-box"),b=at(t,"circleG"),w=at(t,"circle"),{seriesSelection$:D,axesSelection$:T,defsSelection$:$,graphicGSelection$:_}=ai({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),P=B({computedData:n,gridGraphicReverseScale:p}).pipe(I(x),Y(async A=>A),O(A=>A.computedData.map((L,M)=>A.gridGraphicReverseScale[M])));B({defsSelection:$,gridAxesSize:d}).pipe(I(x),Y(async A=>A)).subscribe(A=>{const L=[{id:v,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];pR({defsSelection:A.defsSelection,clipPathData:L})});const S=c.pipe(I(x),O(A=>A.highlightTarget),rt()),G=B({graphicGSelection:_,visibleComputedLayoutData:o,graphicReverseScale:P,fullChartParams:c,fullParams:l}).pipe(I(x),Y(async A=>A),O(A=>fR({graphicGSelection:A.graphicGSelection,circleGClassName:b,circleClassName:w,visibleComputedLayoutData:A.visibleComputedLayoutData,fullParams:A.fullParams,fullChartParams:A.fullChartParams,graphicReverseScale:A.graphicReverseScale})));B({graphicSelection:G,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:S}).pipe(I(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=l.pipe(I(x),O(A=>A.onlyShowHighlighted),rt());return B({graphicSelection:G,highlight:g.pipe(O(A=>A.map(L=>L.id))),onlyShowHighlighted:k,fullChartParams:c}).pipe(I(x),Y(async A=>A)).subscribe(A=>{hR({selection:A.graphicSelection,ids:A.highlight,onlyShowHighlighted:A.onlyShowHighlighted,fullChartParams:A.fullChartParams})}),()=>{x.next(void 0)}},v2="Dots",dR=se(v2,Jh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=b2(v2,{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()}}),gR={listRectWidth:14,listRectHeight:14,listRectRadius:0};function x2(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 Cu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=at(t,"root-position"),u=at(t,"legend-card"),l=at(t,"legend-list"),c=at(t,"legend-item"),h=new et,f=B({seriesLabels:n,fullChartParams:o}).pipe(I(h),Y(async _=>_),O(_=>{const P=new Map;let S=0;return _.seriesLabels.forEach((G,k)=>{if(!P.has(G)){const A=x2(S,_.fullChartParams);P.set(G,A),S++}}),P})),p=n.pipe(I(h),O(_=>{const P=new Set;let S=[];return _.forEach(G=>{P.has(G)?S.push(!1):S.push(!0),P.add(G)}),S})),d=r.pipe(I(h),O(_=>_.position==="bottom"||_.position==="top"?"row":"column")),g=B({fullParams:r,layout:i}).pipe(I(h),Y(async _=>_),O(_=>{const P=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-P:_.layout.rootHeight-P})),y=B({layout:i,fullParams:r}).pipe(I(h),Y(async _=>_),O(_=>{let P=0,S=0;return _.fullParams.position==="bottom"?(S=_.layout.rootHeight,_.fullParams.justify==="start"?P=0:_.fullParams.justify==="center"?P=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(P=_.layout.rootWidth)):_.fullParams.position==="right"?(P=_.layout.rootWidth,_.fullParams.justify==="start"?S=0:_.fullParams.justify==="center"?S=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(S=_.layout.rootHeight)):_.fullParams.position==="top"?(S=0,_.fullParams.justify==="start"?P=0:_.fullParams.justify==="center"?P=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(P=_.layout.rootWidth)):_.fullParams.position==="left"&&(P=0,_.fullParams.justify==="start"?S=0:_.fullParams.justify==="center"?S=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(S=_.layout.rootHeight)),{x:P,y:S}})).pipe(I(h),O(_=>e.selectAll(`g.${s}`).data([_]).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(I(h),O(_=>_.seriesList[0]?_.seriesList[0]:gR)),v=B({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:g,defaultListStyle:x,SeriesLabelColorMap:f,textSizePx:a}).pipe(I(h),Y(async _=>_),O(_=>_.seriesLabels.reduce((P,S,G)=>{if(!_.visibleList[G])return P;const k=n2(S,_.textSizePx),A=_.textSizePx*1.5+k,L=_.SeriesLabelColorMap.get(S),M=P[0]&&P[0][0]?P[P.length-1][P[P.length-1].length-1]:null,{translateX:z,translateY:U,lineIndex:E,itemIndex:R}=((F,j,Q)=>{let N=0,q=0,V=0,K=0;if(F.lineDirection==="column"){let W=Q?Q.translateY+F.textSizePx+F.fullParams.gap:0;if(W+F.textSizePx>F.lineMaxSize){V=Q.lineIndex+1,K=0,q=0;const nt=j[j.length-1].reduce((ut,H)=>H.itemWidth>ut?H.itemWidth:ut,0);N=Q.translateX+nt+F.fullParams.gap}else V=Q?Q.lineIndex:0,K=Q?Q.itemIndex+1:0,q=W,N=Q?Q.translateX:0}else{let W=Q?Q.translateX+Q.itemWidth+F.fullParams.gap:0;W+A>F.lineMaxSize?(V=Q.lineIndex+1,K=0,N=0):(V=Q?Q.lineIndex:0,K=Q?Q.itemIndex+1:0,N=W),q=(F.textSizePx+F.fullParams.gap)*V}return{translateX:N,translateY:q,lineIndex:V,itemIndex:K}})(_,P,M);P[E]||(P[E]=[]);const C=_.fullParams.seriesList[R]?_.fullParams.seriesList[R]:_.defaultListStyle;return P[E].push({id:S,seriesLabel:S,seriesIndex:G,lineIndex:E,itemIndex:R,text:S,itemWidth:A,translateX:z,translateY:U,color:L,listRectWidth:C.listRectWidth,listRectHeight:C.listRectHeight,listRectRadius:C.listRectRadius}),P},[])),Pt(1)),b=B({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v,textSizePx:a}).pipe(I(h),Y(async _=>_),O(_=>{const{width:P,height:S}=((G,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 G.lineDirection==="column"?(A=k.reduce((z,U)=>{const E=U.reduce((R,C)=>C.itemWidth>R?C.itemWidth:R,0);return z+E},0),A+=G.fullParams.gap*(k.length-1),L=M.translateY+G.textSizePx):(A=M.translateX+M.itemWidth,L=G.textSizePx*k.length+G.fullParams.gap*(k.length-1)),{width:A,height:L}})(_,_.lengendItems);return{direction:_.lineDirection,width:P,height:S,translateX:_.fullParams.gap,translateY:_.fullParams.gap}}),Pt(1)),w=B({fullParams:r,lengendList:b}).pipe(I(h),Y(async _=>_),O(_=>{const P=_.lengendList.width+_.fullParams.gap*2,S=_.lengendList.height+_.fullParams.gap*2;let G=0,k=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(G=_.fullParams.padding,k=_.fullParams.padding):_.fullParams.justify==="center"?(G=_.fullParams.padding,k=-S/2):_.fullParams.justify==="end"&&(G=_.fullParams.padding,k=-S-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(G=-P-_.fullParams.padding,k=_.fullParams.padding):_.fullParams.justify==="center"?(G=-P-_.fullParams.padding,k=-S/2):_.fullParams.justify==="end"&&(G=-P-_.fullParams.padding,k=-S-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(G=_.fullParams.padding,k=_.fullParams.padding):_.fullParams.justify==="center"?(G=-P/2,k=_.fullParams.padding):_.fullParams.justify==="end"&&(G=-P-_.fullParams.padding,k=_.fullParams.padding):_.fullParams.justify==="start"?(G=_.fullParams.padding,k=-S-_.fullParams.padding):_.fullParams.justify==="center"?(G=-P/2,k=-S-_.fullParams.padding):_.fullParams.justify==="end"&&(G=-P-_.fullParams.padding,k=-S-_.fullParams.padding),{width:P,height:S,translateX:G,translateY:k}})),D=B({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:w}).pipe(I(h),Y(async _=>_),O(_=>_.rootPositionSelection.selectAll("g").data([_.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,G)=>{X(G[S]).selectAll("rect").data([P]).join("rect").attr("width",k=>k.width).attr("height",k=>k.height).attr("fill",Ct(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Ct(_.fullParams.backgroundStroke,_.fullChartParams))}))),T=B({lengendCardSelection:D,fullParams:r,lengendList:b}).pipe(I(h),Y(async _=>_),O(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join(P=>P.append("g").classed(l,!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:T,fullParams:r,fullChartParams:o,lengendItems:v,textSizePx:a}).pipe(I(h),Y(async _=>_),O(_=>{const P=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${c}`).data(P).join(S=>S.append("g").classed(c,!0).attr("cursor","default"),S=>S,S=>S.remove()).attr("transform",(S,G)=>`translate(${S.translateX}, ${S.translateY})`).each((S,G,k)=>{const A=_.textSizePx/2,L=-S.listRectWidth/2,M=-S.listRectHeight/2;X(k[G]).selectAll("rect").data([S]).join("rect").attr("x",A).attr("y",A).attr("width",z=>z.listRectWidth).attr("height",z=>z.listRectHeight).attr("transform",z=>`translate(${L}, ${M})`).attr("fill",z=>z.color).attr("rx",z=>z.listRectRadius),X(k[G]).selectAll("text").data([S]).join(z=>z.append("text").attr("dominant-baseline","hanging"),z=>z,z=>z.remove()).attr("x",_.textSizePx*1.5).attr("font-size",_.fullChartParams.styles.textSize).attr("fill",z=>_.fullParams.textColorType==="series"?x2(z.seriesIndex,_.fullChartParams):Ct(_.fullParams.textColorType,_.fullChartParams)).text(z=>z.text)})})).subscribe(),()=>{h.next(void 0)}},_2="GridLegend",mR=se(_2,ap)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.SeriesDataMap$.pipe(I(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),O(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Cu(_2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Ch=6;function yR({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:l,groupScaleDomain:c,groupLabels:h,textTransform:f}){const p=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)=>{X(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",f).text(b=>s.grid.groupAxis.label)}).attr("transform",y=>`translate(${a.width+y.tickPadding+r.labelOffset[0]}, ${-y.tickPadding-Ch-r.labelOffset[1]})`);const d=Math.floor(c[1])-Math.ceil(c[0])+1;console.log(r.ticks,r.ticks==="all"||r.ticks>d?d:r.ticks);const g=Cg(l).scale(l).ticks(r.ticks==="all"||r.ticks>d?d:r.ticks).tickSize(r.tickFullLine==!0?-a.height:Ch).tickSizeOuter(0).tickFormat(y=>{const x=h[y]??"";return Ph(x,r.tickFormat)}).tickPadding(r.tickPadding),m=p.transition().duration(100).call(g);return m.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),m.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),p.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+Ch}`).style("transform",f),p}const w2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const h=new et,f=at(t,"container"),p=at(t,"xAxisG"),d=at(t,"xAxis"),g=at(t,"groupingLabel"),m=B({computedData:n.pipe(rt(($,_)=>$.length===_.length)),isSeriesSeprate:c}).pipe(I(h),Y(async $=>$),O($=>$.isSeriesSeprate?$.computedData:[$.computedData[0]]),O(($,_)=>e.selectAll(`g.${f}`).data($,P=>P[0]?P[0].seriesIndex:_).join("g").classed(f,!0))),y=m.pipe(I(h),O(($,_)=>$.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:l}).pipe(I(h),Y(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(_,P)=>{const S=$.gridContainerPosition[P]??$.gridContainerPosition[0],G=S.translate,k=S.scale;return`translate(${G[0]}, ${G[1]}) scale(${k[0]}, ${k[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(I(h),Y(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(h),Y(async $=>$),O($=>{const _=`translate(${$.gridAxesReverseTransform.translate[0]}px, ${$.gridAxesReverseTransform.translate[1]}px)`,P=`rotate(${$.gridAxesReverseTransform.rotate}deg) rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,S=`scale(${1/$.gridContainerPosition[0].scale[0]}, ${1/$.gridContainerPosition[0].scale[1]})`,k=`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`${_} ${P} ${S} ${k}`}),rt()),v=B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(h),Y(async $=>$),O($=>{const P=$.computedData[0]?$.computedData[0].length-1:0,S=$.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[0]-$.fullDataFormatter.grid.groupAxis.scalePadding,G=$.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[1]+$.fullDataFormatter.grid.groupAxis.scalePadding;return[S,G]}),Pt(1)),b=B({groupScaleDomain:v,gridAxesSize:u}).pipe(I(h),Y(async $=>$),O($=>eu().domain($.groupScaleDomain).range([0,$.gridAxesSize.width]))),w=n.pipe(O($=>($[0]??[]).map(_=>_.groupLabel))),D=B({fullDataFormatter:i,fullParams:r}).pipe(I(h),Y(async $=>$),O($=>{let _="middle",P="hanging";return $.fullDataFormatter.grid.groupAxis.position==="bottom"?(_=$.fullParams.tickTextRotate?"end":"middle",P="hanging"):$.fullDataFormatter.grid.groupAxis.position==="top"?(_=$.fullParams.tickTextRotate?"end":"middle",P="auto"):$.fullDataFormatter.grid.groupAxis.position==="left"?(_="end",P="middle"):$.fullDataFormatter.grid.groupAxis.position==="right"&&(_="start",P="middle"),{textAnchor:_,dominantBaseline:P}})),T=i.pipe(I(h),O($=>{let _="start",P="hanging";return $.grid.groupAxis.position==="bottom"?P="hanging":$.grid.groupAxis.position==="top"?P="auto":$.grid.groupAxis.position==="left"?_="end":$.grid.groupAxis.position==="right"&&(_="start"),$.grid.valueAxis.position==="left"?_="start":$.grid.valueAxis.position==="right"?_="end":$.grid.valueAxis.position==="bottom"?P="auto":$.grid.valueAxis.position==="top"&&(P="hanging"),{textAnchor:_,dominantBaseline:P}}));return B({axisSelection:y,params:r,tickTextAlign:D,axisLabelAlign:T,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:b,groupScaleDomain:v,groupLabels:w,textTransform:x}).pipe(I(h),Y(async $=>$)).subscribe($=>{yR({selection:$.axisSelection,xAxisClassName:d,groupingLabelClassName:g,params:$.params,tickTextAlign:$.tickTextAlign,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,groupScaleDomain:$.groupScaleDomain,groupLabels:$.groupLabels,textTransform:$.textTransform})}),()=>{h.next(void 0)}},$2="GroupAxis",bR=se($2,rp)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=w2($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$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),S2=6;function vR({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:l,textTransform:c,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)=>{X(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",c).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=Eg(l).scale(l).ticks(p>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(p)).tickFormat(y=>Ph(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:S2).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+S2} 0`).style("transform",c),f}const si=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const h=new et,f=at(t,"container"),p=at(t,"yAxisG"),d=at(t,"yAxis"),g=at(t,"text"),m=B({computedData:n.pipe(rt((T,$)=>T.length===$.length)),isSeriesSeprate:c}).pipe(I(h),Y(async T=>T),O(T=>T.isSeriesSeprate?T.computedData:[T.computedData[0]]),O((T,$)=>e.selectAll(`g.${f}`).data(T,_=>_[0]?_[0].seriesIndex:$).join("g").classed(f,!0))),y=m.pipe(I(h),O((T,$)=>T.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:l}).pipe(I(h),Y(async T=>T)).subscribe(T=>{T.containerSelection.attr("transform",($,_)=>{const P=T.gridContainerPosition[_]??T.gridContainerPosition[0],S=P.translate,G=P.scale;return`translate(${S[0]}, ${S[1]}) scale(${G[0]}, ${G[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(I(h),Y(async T=>T)).subscribe(T=>{T.axisSelection.style("transform",T.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(h),Y(async T=>T),O(T=>{const $=`translate(${T.gridAxesReverseTransform.translate[0]}px, ${T.gridAxesReverseTransform.translate[1]}px)`,_=`rotate(${T.gridAxesReverseTransform.rotate}deg) rotateX(${T.gridAxesReverseTransform.rotateX}deg) rotateY(${T.gridAxesReverseTransform.rotateY}deg)`,P=`scale(${1/T.gridContainerPosition[0].scale[0]}, ${1/T.gridContainerPosition[0].scale[1]})`,G=`rotate(${T.fullDataFormatter.grid.groupAxis.position==="left"&&T.fullDataFormatter.grid.valueAxis.position==="top"||T.fullDataFormatter.grid.groupAxis.position==="right"&&T.fullDataFormatter.grid.valueAxis.position==="bottom"?T.fullParams.tickTextRotate+180:T.fullParams.tickTextRotate}deg)`;return`${$} ${_} ${P} ${G}`}),rt()),v=new pt(T=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(h),Y(async $=>$)).subscribe($=>{const P=$.computedData[0]?$.computedData[0].length-1:0,S=$.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[0]-$.fullDataFormatter.grid.groupAxis.scalePadding,G=$.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[1]+$.fullDataFormatter.grid.groupAxis.scalePadding,k=$.computedData.map((L,M)=>L.filter((z,U)=>U>=S&&U<=G)),A=Pk(k.flat());T.next(A)})}),b=new pt(T=>{B({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(I(h),Y(async $=>$)).subscribe($=>{const _=tg({maxValue:$.minAndMax[1],minValue:$.minAndMax[0],axisWidth:$.gridAxesSize.height,scaleDomain:$.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:$.fullDataFormatter.grid.valueAxis.scaleRange});T.next(_)})}),w=i.pipe(I(h),O(T=>{let $="start",_="hanging";return T.grid.valueAxis.position==="left"?($="end",_="middle"):T.grid.valueAxis.position==="right"?($="start",_="middle"):T.grid.valueAxis.position==="bottom"?($="middle",_="hanging"):T.grid.valueAxis.position==="top"&&($="middle",_="auto"),{textAnchor:$,dominantBaseline:_}})),D=i.pipe(I(h),O(T=>{let $="start",_="hanging";return T.grid.groupAxis.position==="bottom"?_="auto":T.grid.groupAxis.position==="top"?_="hanging":T.grid.groupAxis.position==="left"?$="start":T.grid.groupAxis.position==="right"&&($="end"),T.grid.valueAxis.position==="left"?$="end":T.grid.valueAxis.position==="right"?$="start":T.grid.valueAxis.position==="bottom"?_="hanging":T.grid.valueAxis.position==="top"&&(_="auto"),{textAnchor:$,dominantBaseline:_}}));return B({axisSelection:y,fullParams:r,tickTextAlign:w,axisLabelAlign:D,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:x,minAndMax:v}).pipe(I(h),Y(async T=>T)).subscribe(T=>{vR({selection:T.axisSelection,yAxisClassName:d,textClassName:g,fullParams:T.fullParams,tickTextAlign:T.tickTextAlign,axisLabelAlign:T.axisLabelAlign,gridAxesSize:T.gridAxesSize,fullDataFormatter:T.fullDataFormatter,fullChartParams:T.fullChartParams,valueScale:T.valueScale,textTransform:T.textTransform,minAndMax:T.minAndMax})}),()=>{h.next(void 0)}},A2="ValueAxis",xR=se(A2,Nu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=si(A2,{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$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),M2="ValueStackAxis",_R=se(M2,ip)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=si(M2,{selection:t,computedData$:n.computedStackedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),D2="ScalingArea",wR=at(D2,"rect"),$R=se(D2,op)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new et,a=e.insert("rect","g").classed(wR,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.width).attr("height",l.height).attr("x",l.left).attr("y",l.top)});const u=r.computedData$.pipe(O(l=>l[0]?l[0].length-1:0),rt());return B({initGroupAxis:r.fullDataFormatter$.pipe(O(l=>l.grid.groupAxis),__()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),Y(async l=>l)).subscribe(l=>{const h=l.groupMaxIndex,f=l.initGroupAxis.scaleDomain[0]==="auto"?0-l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[0]-l.initGroupAxis.scalePadding,p=l.initGroupAxis.scaleDomain[1]==="auto"?h+l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[1]+l.initGroupAxis.scalePadding,g=tg({maxValue:l.groupMaxIndex,minValue:0,axisWidth:l.axisSize.width,scaleDomain:[f,p],scaleRange:[0,1]}).copy(),m=t2().on("zoom",function(x){const v=x.transform,b=T=>{const $=Math.round(T);return Math.min(h,Math.max(0,$))},w=l.fullDataFormatter.grid.groupAxis.position==="bottom"||l.fullDataFormatter.grid.groupAxis.position==="top"?v.rescaleX(g).domain().map(b):v.rescaleY(g).domain().map(b);w[0]<=0&&w[1]>=h?v.k<s.k&&(v.k=s.k,v.x=s.x,v.y=s.y):w[1]-w[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 D={...l.fullDataFormatter,grid:{...l.fullDataFormatter.grid,groupAxis:{...l.fullDataFormatter.grid.groupAxis,scaleDomain:w}}};i.dataFormatter$.next(D)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function SR(t,e){let n=new pt(()=>{});return t.each(function(){const r=Xu(this,e);n=Zu(n,r)}),n}const Eh="GroupAux",kh=at(Eh,"label-box");function AR({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function MR({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=at(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",l=>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",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),a.transition().duration(50).attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),u}function DR(t){t.selectAll("line").data([]).exit().remove()}function PR({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Ph(t,n.labelTextFormat)}]:[]}function TR({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i,textSizePx:o}){const a=o+4,s=t.selectAll(`g.${kh}`).data(e),u=s.enter().append("g").classed(kh,!0).style("cursor","pointer"),l=u.merge(s);return u.attr("transform",(c,h)=>`translate(${c.x}, ${c.y})`),s.transition().duration(50).attr("transform",(c,h)=>`translate(${c.x}, ${c.y})`),s.exit().remove(),l.each((c,h,f)=>{const p=n2(c.text,o)+12,d=-p/2,g=X(f[h]).selectAll("rect").data([c]),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=X(f[h]).selectAll("text").data([c]),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()}),l}function LR(t){t.selectAll(`g.${kh}`).data([]).exit().remove()}const CR=se(Eh,tp)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new et,a=e.insert("rect","g").classed(at(Eh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(I(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(I(o),O(f=>f.value),rt()).subscribe(f=>{s.style("transform",f)});const u=new pt(f=>{B({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(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(T=>T.groupLabel):p.computedData.map(T=>T[0].groupLabel);const b=new Array(x).fill(0).map((T,$)=>v[$]!=null?v[$]:String($)).filter((T,$)=>$>=m&&$<=y),w=p.fullDataFormatter.grid.groupAxis.scalePadding,D=f3({axisLabels:b,axisWidth:p.gridAxesSize.width,padding:w});f.next(D)})}),l=Th({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),c=i.fullChartParams$.pipe(I(o),O(f=>f.highlightTarget),rt());return B({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:c,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:l,groupScale:u}).pipe(I(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(hr(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:c,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:l,textSizePx:i.textSizePx$}).pipe(I(o),Y(async f=>f)).subscribe(f=>{const p=f.groupScale(f.event.groupLabel)??0,d=AR({groupLabel:f.event.groupLabel,axisX:p,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});MR({selection:s,pluginName:n,lineData:d,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=PR({groupLabel:f.event.groupLabel,axisX:p,fullParams:f.fullParams});TR({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})})}),SR(a,"mouseout").pipe(I(o)).subscribe(f=>{console.log("rootMouseout"),DR(s),LR(s)}),()=>{o.next(void 0),a.remove()}}),P2={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"},T2={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]},Eu={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]},ER={...Eu},L2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},C2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},E2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},k2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},R2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},I2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},Rh={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]},N2="MultiGridLegend",kR=pe(N2,P2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.multiGridEachDetail$.pipe(I(i),O(l=>l.map((h,f)=>h.SeriesDataMap$.pipe(O(p=>Array.from(p.keys()))))),Y(l=>B(l)),O(l=>l.flat())),a=B({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(I(i),Y(async l=>l),O(l=>l.computedData.map((c,h)=>{const f=yl(l.fullParams.gridList[h]??{},{listRectWidth:l.fullParams.listRectWidth,listRectHeight:l.fullParams.listRectHeight,listRectRadius:l.fullParams.listRectRadius});return c.map(p=>f)}).flat())),s=B({fullParams:n.fullParams$,seriesList:a}).pipe(I(i),Y(async l=>l),O(l=>({...l.fullParams,seriesList:l.seriesList}))),u=Cu(N2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),Ce=t=>{const e=t.fullParams$.pipe(O(n=>n.gridIndexes),rt(),Pt(1));return B({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(O(n=>n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Ih="MultiBars",F2=at(Ih,"grid"),RR=pe(Ih,L2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${F2}`).data(s).join("g").attr("class",F2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=Lh(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$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Nh="MultiBarStack",G2=at(Nh,"grid"),IR=pe(Nh,C2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${G2}`).data(s).join("g").attr("class",G2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=h2(Nh,{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())}}),Fh="MultiBarsTriangle",z2=at(Fh,"grid"),NR=pe(Fh,E2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${z2}`).data(s).join("g").attr("class",z2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=m2(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$,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())}}),Gh="MultiLines",O2=at(Gh,"grid"),FR=pe(Gh,k2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${O2}`).data(s).join("g").attr("class",O2).each((u,l,c)=>{const h=X(c[l]);o[l]=r2(Gh,{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())}}),zh="MultiLineAreas",U2=at(zh,"grid"),GR=pe(zh,R2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${U2}`).data(s).join("g").attr("class",U2).each((u,l,c)=>{const h=X(c[l]);o[l]=o2(zh,{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())}}),Oh="MultiDots",B2=at(Oh,"grid"),zR=pe(Oh,I2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${B2}`).data(s).join("g").attr("class",B2).each((u,l,c)=>{const h=X(c[l]);o[l]=b2(Oh,{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())}}),Uh="MultiGroupAxis",Y2=at(Uh,"grid"),OR=pe(Uh,T2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Y2}`).data(s).join("g").attr("class",Y2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=w2(Uh,{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())}}),Bh="MultiValueAxis",H2=at(Bh,"grid"),UR=pe(Bh,Eu)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${H2}`).data(s).join("g").attr("class",H2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=si(Bh,{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())}}),Yh="MultiValueStackAxis",W2=at(Yh,"grid"),BR=pe(Yh,Eu)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${W2}`).data(s).join("g").attr("class",W2).each((u,l,c)=>{const h=X(c[l]),f=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=si(Yh,{selection:h,computedData$:u.computedStackedData$,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 YR(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function V2(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:YR(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),c=(t.width-r*(o-1))/o,h=(t.height-r*(i-1))/i,f=u*c+u*r,p=l*h+l*r,d=[f,p],g=[c/t.width,h/t.height];return{slotIndex:s,rowIndex:l,columnIndex:u,translate:d,scale:g}})}const j2=({fullDataFormatter$:t,layout$:e})=>{const n=new et;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,l=0,c=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,l=s):o.position==="right"?(h=180,f=180,u=a,l=s):(h=180,l=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,l=s)):i.position==="left"?o.position==="bottom"?(c=-90,l=s):o.position==="top"?(c=-90,f=180):(h=180,l=s):i.position==="right"&&(o.position==="bottom"?(c=-90,h=180,l=s,u=a):o.position==="top"?(c=-90,h=180,f=180,u=a):(h=180,l=s)),{translate:[u,l],scale:[1,1],rotate:c,rotateX:h,rotateY:f,value:`translate(${u}px, ${l}px) rotate(${c}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new pt(i=>(B({fullDataFormatter:t,layout:e}).pipe(I(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)}))},q2=({gridAxesTransform$:t})=>t.pipe(O(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)`}})),X2=({computedData$:t,fullDataFormatter$:e,layout$:n})=>B({computedData:t,fullDataFormatter:e,layout:n}).pipe(Y(async i=>i),O(i=>{if(i.fullDataFormatter.grid.separateSeries)return V2(i.layout,i.fullDataFormatter.container,i.computedData.length);{const o=V2(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((a,s)=>o[0])}})),Hh="OverlappingValueAxes",Z2=at(Hh,"grid"),HR=pe(Hh,Rh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[],a=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[1])),u=B({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),Y(async c=>c),O(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));let h="";return c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="left"?h="right":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="bottom"?h="top":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="top"?h="bottom":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Bo(r).pipe(I(i),O(c=>({...c,fullParams$:c.fullParams$.pipe(O(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),Y(c=>Ce(c)),O(c=>c.map((h,f)=>{if(f===0)return h;const p=j2({fullDataFormatter$:u,layout$:r.layout$}),d=q2({gridAxesTransform$:p}),g=X2({computedData$:h.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...h,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(h=>h()),t.selectAll(`g.${Z2}`).data(c).join("g").attr("class",Z2).each((h,f,p)=>{if(f>1)return;const d=X(p[f]);o[f]=si(Hh,{selection:d,computedData$:h.computedData$,fullParams$:r.fullParams$.pipe(O(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainerPosition$:h.gridContainerPosition$,isSeriesSeprate$:h.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),Wh="OverlappingValueStackAxes",K2=at(Wh,"grid"),WR=pe(Wh,Rh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[],a=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[1])),u=B({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),Y(async c=>c),O(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));let h="";return c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="left"?h="right":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="bottom"?h="top":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="top"?h="bottom":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Bo(r).pipe(I(i),O(c=>({...c,fullParams$:c.fullParams$.pipe(O(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),Y(c=>Ce(c)),O(c=>c.map((h,f)=>{if(f===0)return h;const p=j2({fullDataFormatter$:u,layout$:r.layout$}),d=q2({gridAxesTransform$:p}),g=X2({computedData$:h.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...h,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(h=>h()),t.selectAll(`g.${K2}`).data(c).join("g").attr("class",K2).each((h,f,p)=>{if(f>1)return;const d=X(p[f]);o[f]=si(Wh,{selection:d,computedData$:f===0?h.computedStackedData$:h.computedData$,fullParams$:r.fullParams$.pipe(O(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainerPosition$:h.gridContainerPosition$,isSeriesSeprate$:h.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),Q2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},J2={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},VR=eg("Container",Q2)(({selection:t})=>function(){}),Vh="Tooltip",tx=at(Vh,"g"),jR=at(Vh,"box");function qR(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 XR({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],l=i?[o]:[],h=t.selectAll(`g.${tx}`).data(u).join(b=>b.append("g").classed(tx,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${jR}`).data(l).join(b=>b.append("g").classed(at(e,"box"),!0)),f=h.selectAll("rect").data(l).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(at(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&Mk(p,u[0]);const d=p!=null&&p.node()?e2(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()?e2(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=eg(Vh,J2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new et,s=o.event$.pipe(I(a),hr(g=>g.eventName==="mouseover"||g.eventName==="mousemove")),u=o.event$.pipe(I(a),hr(g=>g.eventName==="mouseout")),l=c3(i.fullChartParams$),c=B({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$,textSizePx:l}).pipe(I(a),Y(async g=>g),O(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:c}).pipe(I(a),Y(async g=>g),O(g=>g.fullParams.svgRenderFn?g.fullParams.svgRenderFn:m=>{const y=g.fullParams.textRenderFn(m);return qR(y,g.tooltipStyle)})),f=B({event:s,contentRenderFn:h}).pipe(I(a),Y(async g=>g),O(g=>g.contentRenderFn(g.event))),p=u.pipe(I(a),O(g=>"")),d=Zu(s,u).pipe(I(a),O(g=>g.event));return B({svgString:Zu(f,p),event:d,layout:i.layout$,tooltipStyle:c}).pipe(I(a),Y(async g=>g)).subscribe(g=>{XR({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)}}),ex={force:{strength:.08,velocityDecay:.3,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},arcScaleType:"area"},nx={outerRadius:.95,innerRadius:0,outerRadiusWhileHighlight:1,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},rx={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"}]},ix={outerRadius:.95,outerRadiusWhileHighlight:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"primary",labelFn:t=>String(t.label)},ox={outerRadius:.95,cornerRadius:0,arcScaleType:"area",mouseoverAngleIncrease:.05},ax={outerRadius:.95,labelCentroid:2.5,labelFn:t=>String(t.label),labelColorType:"primary",arcScaleType:"area"},sx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function KR(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 l(p){const d=u(p.trim());return Math.sqrt(d*r)}function c(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 w=(g.text?g.text+x:"")+p[v],D=u(w);(m+D)/2<d?(g.width=m=D,g.text=w):(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=l(d),y=c(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),w=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(D,T)=>(T-y.length/2+.8)*r).text(D=>D.text);return b.exit().remove(),b.merge(w)}return f(t,e)}let Sn;function QR(t,e){return Lm().velocityDecay(e.force.velocityDecay).force("collision",Dm().radius(n=>n.r+e.force.collisionSpacing)).force("charge",Cm().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function JR({visibleComputedLayoutData:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=t.flat(),u=s.reduce((f,p)=>f+p.value,0),l=Kr().domain([0,u]).range([0,a]).exponent(o==="area"?.5:1),c=o==="area"?1:(()=>{const f=a*a*Math.PI;return Math.sqrt(f/Mg(s,p=>Math.PI*Math.pow(l(p.value),2)))})(),h=.9;return s.map(f=>{const p=f,d=e.get(p.id);if(d)p.x=d.x,p.y=d.y;else{const m=i.get(p.seriesLabel);p.x=Math.random()*m.width,p.y=Math.random()*m.height}const g=l(p.value??0)*c*h;return p.r=g,p._originR=g,p})}function tI({selection: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 l=X(u[s]);let c=!0;a[o].length<=n.bubbleText.lineLengthMin&&(c=!1),l.call(KR,{text:a[o],radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:c})}),i}function eI(){return Hg().on("start",(t,e)=>{t.active||Sn.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||Sn.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function nI({fullParams:t,SeriesContainerPositionMap:e}){Sn.force("x",Em().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",km().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),Sn.alpha(1).restart()}function rI({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=X(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(ji).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const iI=Cn("Bubbles",ex)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et;let o=new Map;const a=n.fullDataFormatter$.pipe(O(h=>h.sumSeries),rt()),s=n.fullParams$.pipe(I(i),O(h=>h.arcScaleType),rt()),u=B({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:s}).pipe(I(i),Y(async h=>h),O(h=>JR({visibleComputedLayoutData:h.visibleComputedLayoutData,LastBubbleDataMap:o,graphicWidth:h.layout.width,graphicHeight:h.layout.height,SeriesContainerPositionMap:h.SeriesContainerPositionMap,scaleType:h.scaleType})),Pt(1));u.subscribe(h=>{o=new Map(h.map(f=>[f.id,f]))});const l=n.fullChartParams$.pipe(I(i),O(h=>h.highlightTarget),rt()),c=B({bubblesData:u,fullParams:n.fullParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:a}).pipe(I(i),Y(async h=>h),O(h=>{Sn&&Sn.stop();const f=tI({selection:t,bubblesData:h.bubblesData,fullParams:h.fullParams,sumSeries:h.sumSeries});return Sn=QR(f,h.fullParams),Sn.nodes(h.bubblesData),nI({fullParams:h.fullParams,SeriesContainerPositionMap:h.SeriesContainerPositionMap}),f}));return B({bubblesSelection:c,computedData:n.computedData$,SeriesDataMap:n.SeriesDataMap$,highlightTarget:l}).pipe(I(i),Y(async h=>h)).subscribe(h=>{h.bubblesSelection.on("mouseover",(f,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:f,data:h.computedData})}).on("mousemove",(f,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:f,data:h.computedData})}).on("mouseout",(f,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:f,data:h.computedData})}).on("click",(f,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:f,data:h.computedData})}).call(eI())}),B({bubblesSelection:c,bubblesData:u,highlight:n.seriesHighlight$.pipe(O(h=>h.map(f=>f.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:a,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(I(i),Y(async h=>h)).subscribe(h=>{rI({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams})}),()=>{i.next(void 0)}});function ux({data:t,startAngle:e,endAngle:n}){return pv().startAngle(e).endAngle(n).value(o=>o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function oI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=at(e,"series");return B({seriesLabels:r,separateSeries:n}).pipe(Y(async o=>o),O((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())}),Pt(1))}const Io=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=oI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a),rt((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),{seriesCenterSelection$:o}},jh="Pie";function aI({enter:t,exit:e,data:n,lastTweenData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const l=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+l.startAngle*(1-o),endAngle:s.endAngle*o+l.endAngle*(1-o),value:s.value*o+l.value*(1-o)}});return qh(a,i.startAngle,i.endAngle,1)}:o=>qh(n,i.startAngle,i.endAngle,o)}function qh(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 lx({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 sI({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcHighlight: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=X(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(ji).duration(500).attr("d",l=>i(l)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>r(l))})}function uI(t,e){const n=new et,r=at(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(I(n),O(f=>f.width<f.height?f.width:f.height),rt()),s=new pt(f=>{B({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p)).subscribe(p=>{const d=ux({data:p.containerVisibleComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});f.next(d)})}),u=new pt(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p)).subscribe(p=>{const d=Tu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),l=new pt(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p)).subscribe(p=>{const d=Tu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadiusWhileHighlight,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),c=e.fullChartParams$.pipe(I(n),O(f=>f.highlightTarget),rt()),h=new pt(f=>{B({pieData:s,arc:u,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:c}).pipe(I(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=aI({enter:g,exit:m,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});e.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(x,v)=>b=>{o=y(b),lx({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r})}).on("end",(x,v)=>{o=qh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const b=lx({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})})})}).pipe(Pt(1));return B({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:c}).pipe(I(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(O(f=>f.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:u,arcHighlight:l}).pipe(I(n),Y(async f=>f)).subscribe(f=>{sI({pathSelection:f.pathSelection,ids:f.highlight,fullChartParams:f.fullChartParams,arc:f.arc,arcHighlight:f.arcHighlight})}),()=>{n.next(void 0)}}const lI=Cn(jh,nx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,{seriesCenterSelection$:o}=Io({selection:t,pluginName:jh,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const h=X(c[l]),f=r.visibleComputedLayoutData$.pipe(I(i),O(d=>d[l]??d[0])),p=r.seriesContainerPosition$.pipe(I(i),O(d=>d[l]??d[0]));a[l]=uI(jh,{containerSelection:h,computedData$:r.computedData$,containerVisibleComputedLayoutData$: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())}}),ku="PieEventTexts",cx=at(ku,"text");function Xh(t,e){const n=t.selectAll(`text.${cx}`).data(e),r=n.enter().append("text").classed(cx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=X(s[a]).text(o.text);Object.keys(o.attr).forEach(l=>{u.attr(l,o.attr[l])}),Object.keys(o.style).forEach(l=>{u.style(l,o.style[l])})}),n.exit().remove(),i}function Zh({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 cI(t,e){const n=new et;let r;const i=e.fullChartParams$.pipe(I(n),O(o=>o.highlightTarget),rt());return B({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(I(n),Y(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>u=>{const l=Zh({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});Xh(e.containerSelection,l)}).on("end",(a,s)=>{const u=Zh({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});Xh(e.containerSelection,u),r&&r.unsubscribe(),r=e.event$.subscribe(l=>{const c=Zh({eventData:l,eventName:l.eventName,t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});Xh(e.containerSelection,c)})})}),()=>{n.next(void 0)}}const fI=Cn(ku,rx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,{seriesCenterSelection$:o}=Io({selection:t,pluginName:ku,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const h=X(c[l]),f=n.computedLayoutData$.pipe(I(i),O(d=>d[l]??d[0])),p=n.seriesContainerPosition$.pipe(I(i),O(d=>d[l]??d[0]));a[l]=cI(ku,{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())}}),Ru="PieLabels",hI=at(Ru,"text");function pI(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,l]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:l*r}}).filter(i=>i.pieDatum.data.visible)}function dI(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(hI,!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,l)=>Lu({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function gI({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=X(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 mI(t,e){const n=new et;let r=new et,i=[];const o=e.seriesContainerPosition$.pipe(I(n),O(a=>a.width<a.height?a.width:a.height),rt());return B({shorterSideWith:o,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async a=>a)).subscribe(a=>{const s=Tu({axisWidth:a.shorterSideWith,innerRadius:0,outerRadius:a.fullParams.outerRadius,padAngle:0,cornerRadius:0}),u=Tu({axisWidth:a.shorterSideWith,innerRadius:0,outerRadius:a.fullParams.outerRadiusWhileHighlight,padAngle:0,cornerRadius:0}),l=ux({data:a.containerVisibleComputedLayoutData,startAngle:a.fullParams.startAngle,endAngle:a.fullParams.endAngle});i=pI(l,s,u,a.fullParams.labelCentroid);const c=dI(e.containerSelection,i,a.fullParams,a.fullChartParams);r.next(c)}),B({labelSelection:r,highlight:e.seriesHighlight$.pipe(O(a=>a.map(s=>s.id))),fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async a=>a)).subscribe(a=>{gI({labelSelection:a.labelSelection,ids:a.highlight,fullChartParams:a.fullChartParams})}),()=>{n.next(void 0)}}const yI=Cn(Ru,ix)(({selection:t,observer:e,subject:n})=>{const r=new et,{seriesCenterSelection$:i}=Io({selection:t,pluginName:Ru,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(I(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=X(l[u]),h=e.visibleComputedLayoutData$.pipe(I(r),O(p=>p[u]??p[0])),f=e.seriesContainerPosition$.pipe(I(r),O(p=>p[u]??p[0]));o[u]=mI(Ru,{containerSelection:c,containerVisibleComputedLayoutData$:h,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:f,event$:n.event$})})}),()=>{r.next(void 0)}}),Kh="Rose",bI=Math.PI*2,fx=0;function vI({cornerRadius:t,outerRadius:e,axisWidth:n,maxValue:r,arcScaleType:i}){const o=n/2*e,a=i==="area"?.5:1,s=Kr().domain([0,r]).range([0,o]).exponent(a);return u=>{const l=s(u.prevValue),c=s(u.value),h=qe(l,c);return f=>{const p=h(f);return mu().innerRadius(0).outerRadius(p).padAngle(fx).padRadius(p).cornerRadius(t)(u)}}}function xI({pathSelection:t,ids:e,fullParams:n,fullChartParams:r,tweenArc:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>i(o)(1));return}t.each((o,a,s)=>{const u=X(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(ji).duration(500).attr("d",l=>i({...l,startAngle:l.startAngle-n.mouseoverAngleIncrease,endAngle:l.endAngle+n.mouseoverAngleIncrease})(1)):u.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>i(l)(1))})}function _I(t,e){const n=new et,r=at(t,"path");let i=[];const o=e.seriesContainerPosition$.pipe(I(n),O(p=>p.width<p.height?p.width:p.height),rt()),a=B({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p),O(p=>{const d=bI/p.containerVisibleComputedLayoutData.length;return p.containerVisibleComputedLayoutData.map((g,m)=>({id:g.id,data:g,index:m,value:g.value,startAngle:d*m,endAngle:d*(m+1),padAngle:fx,prevValue:i[m]&&i[m].id===g.id?i[m].value:0}))})),s=e.fullChartParams$.pipe(I(n),O(p=>p.highlightTarget),rt()),u=e.visibleComputedLayoutData$.pipe(O(p=>Math.max(...p.flat().map(d=>d.value))),rt()),l=B({fullParams:e.fullParams$,axisWidth:o,maxValue:u}).pipe(I(n),Y(async p=>p),O(p=>vI({cornerRadius:p.fullParams.cornerRadius,outerRadius:p.fullParams.outerRadius,axisWidth:p.axisWidth,maxValue:p.maxValue,arcScaleType:p.fullParams.arcScaleType}))),c=e.fullChartParams$.pipe(I(n),O(p=>p.transitionDuration),rt()),h=new Ex(!1),f=new pt(p=>{B({pieData:a,tweenArc:l,transitionDuration:c}).pipe(I(n),Y(async d=>d)).subscribe(d=>{const g=d.pieData.map((y,x)=>(y.prevValue=i[x]&&i[x].id===y.id?i[x].value:0,y));h.next(!0);const m=e.containerSelection.selectAll("path").data(g,y=>y.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(y,x)=>y.data.color);m.interrupt("graphicMove"),m.transition("graphicMove").duration(d.transitionDuration).attrTween("d",d.tweenArc).on("end",()=>{p.next(m),h.next(!1)}),i=Object.assign([],g)})}).pipe(Pt(1));return B({pathSelection:f,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:s}).pipe(I(n),Y(async p=>p)).subscribe(p=>{p.pathSelection.on("mouseover",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mousemove",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mouseout",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("click",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})})}),B({pathSelection:f,highlight:e.seriesHighlight$.pipe(O(p=>p.map(d=>d.id))),fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,tweenArc:l,isTransitionMoving:h}).pipe(I(n),Y(async p=>p),hr(p=>!p.isTransitionMoving)).subscribe(p=>{xI({pathSelection:p.pathSelection,ids:p.highlight,fullParams:p.fullParams,fullChartParams:p.fullChartParams,tweenArc:p.tweenArc})}),()=>{n.next(void 0)}}const wI=Cn(Kh,ox)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,{seriesCenterSelection$:o}=Io({selection:t,pluginName:Kh,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const h=X(c[l]),f=r.visibleComputedLayoutData$.pipe(I(i),O(d=>JSON.parse(JSON.stringify(d[l]??d[0])))),p=r.seriesContainerPosition$.pipe(I(i),O(d=>JSON.parse(JSON.stringify(d[l]??d[0]))));a[l]=_I(Kh,{containerSelection:h,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,containerVisibleComputedLayoutData$: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())}}),Iu="RoseLabels",$I=at(Iu,"text");function SI({pieData:t,centroid:e,arcScaleType:n,maxValue:r,axisWidth:i,outerRadius:o}){const a=i/2*o,s=n==="area"?.5:1,u=Kr().domain([0,r]).range([0,a]).exponent(s);return t.map((l,c)=>{const h=u(l.value),f=mu().innerRadius(0).outerRadius(h).padAngle(0).padRadius(h).cornerRadius(0),[p,d]=f.centroid(l),[g,m]=[p,d];return{pieDatum:l,arcIndex:c,arcLabel:l.data.label,x:p*e,y:d*e,mouseoverX:g*e,mouseoverY:m*e}}).filter(l=>l.pieDatum.data.visible)}function AI(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed($I,!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,l)=>Lu({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function MI({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=X(o[i]);e.includes(r.pieDatum.data.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 DI(t,e){const n=new et;let r=new et,i=[];const o=e.seriesContainerPosition$.pipe(I(n),O(s=>s.width<s.height?s.width:s.height),rt()),a=e.visibleComputedLayoutData$.pipe(O(s=>Math.max(...s.flat().map(u=>u.value))),rt());return B({shorterSideWith:o,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,maxValue:a,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async s=>s)).subscribe(s=>{const u=Math.PI*2/s.containerVisibleComputedLayoutData.length,l=s.containerVisibleComputedLayoutData.map((h,f)=>({id:h.id,data:h,index:f,value:h.value,startAngle:u*f,endAngle:u*(f+1),padAngle:0}));i=SI({pieData:l,centroid:s.fullParams.labelCentroid,arcScaleType:s.fullParams.arcScaleType,maxValue:s.maxValue,axisWidth:s.shorterSideWith,outerRadius:s.fullParams.outerRadius});const c=AI(e.containerSelection,i,s.fullParams,s.fullChartParams);r.next(c)}),B({labelSelection:r,highlight:e.seriesHighlight$.pipe(O(s=>s.map(u=>u.id))),fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async s=>s)).subscribe(s=>{MI({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{n.next(void 0)}}const PI=Cn(Iu,ax)(({selection:t,observer:e,subject:n})=>{const r=new et,{seriesCenterSelection$:i}=Io({selection:t,pluginName:Iu,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(I(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=X(l[u]),h=e.visibleComputedLayoutData$.pipe(I(r),O(p=>JSON.parse(JSON.stringify(p[u]??p[0])))),f=e.seriesContainerPosition$.pipe(I(r),O(p=>JSON.parse(JSON.stringify(p[u]??p[0]))));o[u]=DI(Iu,{containerSelection:c,visibleComputedLayoutData$:e.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:h,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:f,event$:n.event$})})}),()=>{r.next(void 0)}}),hx="SeriesLegend",TI=Cn(hx,sx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.SeriesDataMap$.pipe(I(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),O(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Cu(hx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),px={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},dx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},gx="TreeLegend",LI=ng(gx,dx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.CategoryDataMap$.pipe(I(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),O(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Cu(gx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),ar="TreeMap",mx=at(ar,"tree"),yx=at(ar,"tile");function CI({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${mx}`).data(e,u=>u.data.id).join("g").attr("class",mx);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,l,c)=>{const h=X(c[l]);h.selectAll(`rect.${yx}`).data([u],f=>f.data.id).join("rect").attr("id",f=>f.data.id).attr("class",yx).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)=>{X(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=X(this),x=m.data.label.split(/\s+/).reverse();let v,b=[];const w=y.attr("x");let D=y.attr("y"),T=0,$=y.text(null).append("tspan").attr("cursor","pointer").attr("fill",Ct(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",w).attr("y",D);for(;v=x.pop();)b.push(v),$.text(b.join(" ")),$.node().getComputedTextLength()>m.x1-m.x0-o&&(b.pop(),$.text(b.join(" ")),b=[v],T+=a,$=y.append("tspan").attr("cursor","pointer").attr("fill",Ct(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",w).attr("y",D).attr("dy",T+"px").text(v))})})}),s}function EI({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)?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const kI=ng(ar,px)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=B({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async u=>u),O(u=>{const l=$y().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Hf.ratio(u.fullParams.squarifyRatio)),c=js(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return l(c),c.leaves()})),a=B({selection:Bo(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(I(i),Y(async u=>u),O(u=>CI({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(I(i),O(u=>u.highlightTarget),rt());return B({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(I(i),Y(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:ar,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mousemove",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:ar,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mouseout",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:ar,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("click",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:ar,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})})}),B({cellSelection:a,highlight:r.treeHighlight$.pipe(O(u=>u.map(l=>l.id))),fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async u=>u)).subscribe(u=>{EI({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});Z.BarStack=nR,Z.Bars=qk,Z.BarsPN=Xk,Z.BarsTriangle=cR,Z.Bubbles=iI,Z.CONTAINER_PLUGIN_PARAMS=Q2,Z.Container=VR,Z.DEFAULT_BARS_DIVERGING_PARAMS=bx,Z.DEFAULT_BARS_PARAMS=Fo,Z.DEFAULT_BARS_TRIANGLE_PARAMS=np,Z.DEFAULT_BAR_STACK_PARAMS=ep,Z.DEFAULT_BUBBLES_PARAMS=ex,Z.DEFAULT_DOTS_PARAMS=Jh,Z.DEFAULT_GRID_LEGEND_PARAMS=ap,Z.DEFAULT_GROUP_AREA_PARAMS=tp,Z.DEFAULT_GROUP_AXIS_PARAMS=rp,Z.DEFAULT_LINES_PARAMS=sr,Z.DEFAULT_LINE_AREAS_PARAMS=Qh,Z.DEFAULT_MULTI_BARS_PARAMS=L2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=E2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=C2,Z.DEFAULT_MULTI_DOTS_PARAMS=I2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=P2,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=T2,Z.DEFAULT_MULTI_LINES_PARAMS=k2,Z.DEFAULT_MULTI_LINE_AREAS_PARAMS=R2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=Eu,Z.DEFAULT_MULTI_VALUE_STACK_AXIS_PARAMS=ER,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=Rh,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=rx,Z.DEFAULT_PIE_LABELS_PARAMS=ix,Z.DEFAULT_PIE_PARAMS=nx,Z.DEFAULT_ROSE_LABELS_PARAMS=ax,Z.DEFAULT_ROSE_PARAMS=ox,Z.DEFAULT_SCALING_AREA_PARAMS=op,Z.DEFAULT_SERIES_LEGEND_PARAMS=sx,Z.DEFAULT_TREE_LEGEND_PARAMS=dx,Z.DEFAULT_TREE_MAP_PARAMS=px,Z.DEFAULT_VALUE_AXIS_PARAMS=Nu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=ip,Z.Dots=dR,Z.GridLegend=mR,Z.GroupAux=CR,Z.GroupAxis=bR,Z.LineAreas=Uk,Z.Lines=Rk,Z.MultiBarStack=IR,Z.MultiBars=RR,Z.MultiBarsTriangle=NR,Z.MultiDots=zR,Z.MultiGridLegend=kR,Z.MultiGroupAxis=OR,Z.MultiLineAreas=GR,Z.MultiLines=FR,Z.MultiValueAxis=UR,Z.MultiValueStackAxis=BR,Z.OverlappingValueAxes=HR,Z.OverlappingValueStackAxes=WR,Z.Pie=lI,Z.PieEventTexts=fI,Z.PieLabels=yI,Z.Rose=wI,Z.RoseLabels=PI,Z.ScalingArea=$R,Z.SeriesLegend=TI,Z.TOOLTIP_PARAMS=J2,Z.Tooltip=ZR,Z.TreeLegend=LI,Z.TreeMap=kI,Z.ValueAxis=xR,Z.ValueStackAxis=_R,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|