@orbcharts/plugins-basic 3.0.0-alpha.32 → 3.0.0-alpha.34

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
- (function(et,rr){typeof exports=="object"&&typeof module<"u"?rr(exports):typeof define=="function"&&define.amd?define(["exports"],rr):(et=typeof globalThis<"u"?globalThis:et||self,rr(et["orbcharts-plugins-basic"]={}))})(this,function(et){"use strict";const rr={lineCurve:"curveLinear",lineWidth:2},Mh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},$h={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Sh={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},Th={barWidth:0,barGroupPadding:10,barRadius:!1},Ph={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Dh={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"},_u={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"},kh=_u,Eh={},Lh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};var wu=function(t,e){return wu=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])},wu(t,e)};function ei(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function Yv(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(f){try{u(r.next(f))}catch(h){a(h)}}function c(f){try{u(r.throw(f))}catch(h){a(h)}}function u(f){f.done?o(f.value):i(f.value).then(s,c)}u((r=r.apply(t,e||[])).next())})}function Nh(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function ir(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 ni(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 Po(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 or(t){return this instanceof or?(this.v=t,this):new or(t)}function Wv(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},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||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{u(r[p](d))}catch(g){l(o[0][3],g)}}function u(p){p.value instanceof or?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function Hv(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 ir=="function"?ir(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,c){a=t[o](a),i(s,c,a.done,a.value)})}}function i(o,a,s,c){Promise.resolve(c).then(function(u){o({value:u,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function mt(t){return typeof t=="function"}function Au(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 Mu=Au(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
1
+ (function(et,rr){typeof exports=="object"&&typeof module<"u"?rr(exports):typeof define=="function"&&define.amd?define(["exports"],rr):(et=typeof globalThis<"u"?globalThis:et||self,rr(et["orbcharts-plugins-basic"]={}))})(this,function(et){"use strict";const rr={lineCurve:"curveLinear",lineWidth:2},Mh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},$h={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Sh={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},Th={barWidth:0,barGroupPadding:10,barRadius:!1},Dh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Ph={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"},xu={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"},kh=xu,Eh={},Lh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};var _u=function(t,e){return _u=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])},_u(t,e)};function ei(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");_u(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function Wv(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(f){try{u(r.next(f))}catch(h){a(h)}}function c(f){try{u(r.throw(f))}catch(h){a(h)}}function u(f){f.done?o(f.value):i(f.value).then(s,c)}u((r=r.apply(t,e||[])).next())})}function Nh(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function ir(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 ni(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 Do(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 or(t){return this instanceof or?(this.v=t,this):new or(t)}function qv(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},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||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{u(r[p](d))}catch(g){l(o[0][3],g)}}function u(p){p.value instanceof or?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function Hv(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 ir=="function"?ir(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,c){a=t[o](a),i(s,c,a.done,a.value)})}}function i(o,a,s,c){Promise.resolve(c).then(function(u){o({value:u,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function mt(t){return typeof t=="function"}function wu(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 Au=wu(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 $u(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Do=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=ir(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(mt(f))try{f()}catch(g){o=g instanceof Mu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=ir(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{Ih(d)}catch(g){o=o??[],g instanceof Mu?o=Po(Po([],ni(o)),ni(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new Mu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Ih(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)&&$u(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&$u(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Rh=Do.EMPTY;function Ch(t){return t instanceof Do||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function Ih(t){mt(t)?t():t.unsubscribe()}var Fh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},zh={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Po([t,e],ni(n)))},clearTimeout:function(t){var e=zh.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Oh(t){zh.setTimeout(function(){throw t})}function Su(){}function ko(t){t()}var Tu=function(t){ei(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Ch(n)&&n.add(r)):r.destination=jv,r}return e.create=function(n,r,i){return new Du(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}(Do),qv=Function.prototype.bind;function Pu(t,e){return qv.call(t,e)}var Xv=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){Eo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Eo(r)}else Eo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Eo(n)}},t}(),Du=function(t){ei(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Fh.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Pu(n.next,s),error:n.error&&Pu(n.error,s),complete:n.complete&&Pu(n.complete,s)}):a=n}return o.destination=new Xv(a),o}return e}(Tu);function Eo(t){Oh(t)}function Vv(t){throw t}var jv={closed:!0,next:Su,error:Vv,complete:Su},ku=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ar(t){return t}function Zv(t){return t.length===0?ar:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var at=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=Qv(e)?e:new Du(e,n,r);return ko(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?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=Gh(n),new n(function(i,o){var a=new Du({next:function(s){try{e(s)}catch(c){o(c),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[ku]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Zv(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Gh(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 Gh(t){var e;return(e=t??Fh.Promise)!==null&&e!==void 0?e:Promise}function Kv(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function Qv(t){return t&&t instanceof Tu||Kv(t)&&Ch(t)}function Jv(t){return mt(t==null?void 0:t.lift)}function me(t){return function(e){if(Jv(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 oe(t,e,n,r,i){return new tx(t,e,n,r,i)}var tx=function(t){ei(e,t);function e(n,r,i,o,a,s){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=r?function(u){try{r(u)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(u){try{o(u)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}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}(Tu),ex=Au(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),lt=function(t){ei(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 Bh(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new ex},e.prototype.next=function(n){var r=this;ko(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=ir(r.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(n)}}catch(u){i={error:u}}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;ko(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;ko(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?Rh:(this.currentObservers=null,s.push(n),new Do(function(){r.currentObservers=null,$u(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 at;return n.source=this,n},e.create=function(n,r){return new Bh(n,r)},e}(at),Bh=function(t){ei(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:Rh},e}(lt),Uh=new at(function(t){return t.complete()});function nx(t){return t&&mt(t.schedule)}function Eu(t){return t[t.length-1]}function rx(t){return mt(Eu(t))?t.pop():void 0}function Yh(t){return nx(Eu(t))?t.pop():void 0}function ix(t,e){return typeof Eu(t)=="number"?t.pop():e}var Lu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Wh(t){return mt(t==null?void 0:t.then)}function Hh(t){return mt(t[ku])}function qh(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function Xh(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 ox(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Vh=ox();function jh(t){return mt(t==null?void 0:t[Vh])}function Zh(t){return Wv(this,arguments,function(){var n,r,i,o;return Nh(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,or(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,or(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,or(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 Kh(t){return mt(t==null?void 0:t.getReader)}function Ue(t){if(t instanceof at)return t;if(t!=null){if(Hh(t))return ax(t);if(Lu(t))return sx(t);if(Wh(t))return ux(t);if(qh(t))return Qh(t);if(jh(t))return cx(t);if(Kh(t))return lx(t)}throw Xh(t)}function ax(t){return new at(function(e){var n=t[ku]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function sx(t){return new at(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function ux(t){return new at(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Oh)})}function cx(t){return new at(function(e){var n,r;try{for(var i=ir(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 Qh(t){return new at(function(e){fx(t,e).catch(function(n){return e.error(n)})})}function lx(t){return Qh(Zh(t))}function fx(t,e){var n,r,i,o;return Yv(this,void 0,void 0,function(){var a,s;return Nh(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Hv(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.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 an(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 Jh(t,e){return e===void 0&&(e=0),me(function(n,r){n.subscribe(oe(r,function(i){return an(r,t,function(){return r.next(i)},e)},function(){return an(r,t,function(){return r.complete()},e)},function(i){return an(r,t,function(){return r.error(i)},e)}))})}function t0(t,e){return e===void 0&&(e=0),me(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function hx(t,e){return Ue(t).pipe(t0(e),Jh(e))}function px(t,e){return Ue(t).pipe(t0(e),Jh(e))}function dx(t,e){return new at(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function gx(t,e){return new at(function(n){var r;return an(n,e,function(){r=t[Vh](),an(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 mt(r==null?void 0:r.return)&&r.return()}})}function e0(t,e){if(!t)throw new Error("Iterable cannot be null");return new at(function(n){an(n,e,function(){var r=t[Symbol.asyncIterator]();an(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function mx(t,e){return e0(Zh(t),e)}function yx(t,e){if(t!=null){if(Hh(t))return hx(t,e);if(Lu(t))return dx(t,e);if(Wh(t))return px(t,e);if(qh(t))return e0(t,e);if(jh(t))return gx(t,e);if(Kh(t))return mx(t,e)}throw Xh(t)}function Nu(t,e){return e?yx(t,e):Ue(t)}var n0=Au(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function G(t,e){return me(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var bx=Array.isArray;function vx(t,e){return bx(e)?t.apply(void 0,Po([],ni(e))):t(e)}function r0(t){return G(function(e){return vx(t,e)})}var xx=Array.isArray,_x=Object.getPrototypeOf,wx=Object.prototype,Ax=Object.keys;function Mx(t){if(t.length===1){var e=t[0];if(xx(e))return{args:e,keys:null};if($x(e)){var n=Ax(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function $x(t){return t&&typeof t=="object"&&_x(t)===wx}function Sx(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Yh(t),r=rx(t),i=Mx(t),o=i.args,a=i.keys;if(o.length===0)return Nu([],n);var s=new at(Tx(o,n,a?function(c){return Sx(a,c)}:ar));return r?s.pipe(r0(r)):s}function Tx(t,e,n){return n===void 0&&(n=ar),function(r){i0(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,c=function(f){i0(e,function(){var h=Nu(t[f],e),l=!1;h.subscribe(oe(r,function(p){o[f]=p,l||(l=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},u=0;u<i;u++)c(u)},r)}}function i0(t,e,n){t?an(n,t,e):e()}function Px(t,e,n,r,i,o,a,s){var c=[],u=0,f=0,h=!1,l=function(){h&&!c.length&&!u&&e.complete()},p=function(g){return u<r?d(g):c.push(g)},d=function(g){u++;var m=!1;Ue(n(g,f++)).subscribe(oe(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{u--;for(var y=function(){var x=c.shift();a||d(x)};c.length&&u<r;)y();l()}catch(x){e.error(x)}}))};return t.subscribe(oe(e,p,function(){h=!0,l()})),function(){}}function Ru(t,e,n){return n===void 0&&(n=1/0),mt(e)?Ru(function(r,i){return G(function(o,a){return e(r,o,i,a)})(Ue(t(r,i)))},n):(typeof e=="number"&&(n=e),me(function(r,i){return Px(r,i,t,n)}))}function Dx(t){return t===void 0&&(t=1/0),Ru(ar,t)}var kx=["addListener","removeListener"],Ex=["addEventListener","removeEventListener"],Lx=["on","off"];function Cu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Cu(t,e,n).pipe(r0(r));var i=ni(Cx(t)?Ex.map(function(s){return function(c){return t[s](e,c,n)}}):Nx(t)?kx.map(o0(t,e)):Rx(t)?Lx.map(o0(t,e)):[],2),o=i[0],a=i[1];if(!o&&Lu(t))return Ru(function(s){return Cu(s,e,n)})(Ue(t));if(!o)throw new TypeError("Invalid event target");return new at(function(s){var c=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return s.next(1<u.length?u:u[0])};return o(c),function(){return a(c)}})}function o0(t,e){return function(n){return function(r){return t[n](e,r)}}}function Nx(t){return mt(t.addListener)&&mt(t.removeListener)}function Rx(t){return mt(t.on)&&mt(t.off)}function Cx(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function Iu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Yh(t),r=ix(t,1/0),i=t;return i.length?i.length===1?Ue(i[0]):Dx(r)(Nu(i,n)):Uh}function Lo(t,e){return me(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function Ix(t){return me(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function Fx(t){return t<=0?function(){return Uh}:me(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function tt(t,e){return e===void 0&&(e=ar),t=t??zx,me(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function zx(t,e){return t===e}function Ox(t){return t===void 0&&(t=Gx),me(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function Gx(){return new n0}function ri(t,e){var n=arguments.length>=2;return function(r){return r.pipe(ar,Fx(1),n?Ix(e):Ox(function(){return new n0}))}}function U(t,e){return me(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(c){i==null||i.unsubscribe();var u=0,f=o++;Ue(t(c,f)).subscribe(i=oe(r,function(h){return r.next(e?e(c,h,f,u++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function I(t){return me(function(e,n){Ue(t).subscribe(oe(n,function(){return n.complete()},Su)),!n.closed&&e.subscribe(n)})}const sr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function No(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Bx(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function a0(t){let e,n,r;t.length!==2?(e=No,n=(s,c)=>No(t(s),c),r=(s,c)=>t(s)-c):(e=t===No||t===Bx?t:Ux,n=t,r=t);function i(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<0?u=h+1:f=h}while(u<f)}return u}function o(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<=0?u=h+1:f=h}while(u<f)}return u}function a(s,c,u=0,f=s.length){const h=i(s,c,u,f-1);return h>u&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:i,center:a,right:o}}function Ux(){return 0}function Yx(t){return t===null?NaN:+t}const Wx=a0(No),s0=Wx.right;a0(Yx).center;class u0 extends Map{constructor(e,n=Xx){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(c0(this,e))}has(e){return super.has(c0(this,e))}set(e,n){return super.set(Hx(this,e),n)}delete(e){return super.delete(qx(this,e))}}function c0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Hx({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function qx({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Xx(t){return t!==null&&typeof t=="object"?t.valueOf():t}const Vx=Math.sqrt(50),jx=Math.sqrt(10),Zx=Math.sqrt(2);function Ro(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>=Vx?10:o>=jx?5:o>=Zx?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),c=Math.round(e*u),s/u<t&&++s,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),c=Math.round(e/u),s*u<t&&++s,c*u>e&&--c),c<s&&.5<=n&&n<2?Ro(t,e,n*2):[s,c,u]}function Kx(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?Ro(e,t,n):Ro(t,e,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)c[u]=(o-u)/-a;else for(let u=0;u<s;++u)c[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)c[u]=(i+u)/-a;else for(let u=0;u<s;++u)c[u]=(i+u)*a;return c}function Fu(t,e,n){return e=+e,t=+t,n=+n,Ro(t,e,n)[2]}function Qx(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Fu(e,t,n):Fu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Jx(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 t_={value:()=>{}};function l0(){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 Co(n)}function Co(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}})}Co.prototype=l0.prototype={constructor:Co,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=n_(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]=f0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=f0(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 Co(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 n_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function f0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=t_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var zu="http://www.w3.org/1999/xhtml";const h0={svg:"http://www.w3.org/2000/svg",xhtml:zu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Io(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),h0.hasOwnProperty(e)?{space:h0[e],local:t}:t}function r_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===zu&&e.documentElement.namespaceURI===zu?e.createElement(t):e.createElementNS(n,t)}}function i_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function p0(t){var e=Io(t);return(e.local?i_:r_)(e)}function o_(){}function Ou(t){return t==null?o_:function(){return this.querySelector(t)}}function a_(t){typeof t!="function"&&(t=Ou(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),c,u,f=0;f<a;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),s[f]=u);return new ye(r,this._parents)}function s_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function u_(){return[]}function d0(t){return t==null?u_:function(){return this.querySelectorAll(t)}}function c_(t){return function(){return s_(t.apply(this,arguments))}}function l_(t){typeof t=="function"?t=c_(t):t=d0(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(r.push(t.call(c,c.__data__,u,a)),i.push(c));return new ye(r,i)}function g0(t){return function(){return this.matches(t)}}function m0(t){return function(e){return e.matches(t)}}var f_=Array.prototype.find;function h_(t){return function(){return f_.call(this.children,t)}}function p_(){return this.firstElementChild}function d_(t){return this.select(t==null?p_:h_(typeof t=="function"?t:m0(t)))}var g_=Array.prototype.filter;function m_(){return Array.from(this.children)}function y_(t){return function(){return g_.call(this.children,t)}}function b_(t){return this.selectAll(t==null?m_:y_(typeof t=="function"?t:m0(t)))}function v_(t){typeof t!="function"&&(t=g0(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]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new ye(r,this._parents)}function y0(t){return new Array(t.length)}function x_(){return new ye(this._enter||this._groups.map(y0),this._parents)}function Fo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Fo.prototype={constructor:Fo,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 __(t){return function(){return t}}function w_(t,e,n,r,i,o){for(var a=0,s,c=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Fo(t,o[a]);for(;a<c;++a)(s=e[a])&&(i[a]=s)}function A_(t,e,n,r,i,o,a){var s,c,u=new Map,f=e.length,h=o.length,l=new Array(f),p;for(s=0;s<f;++s)(c=e[s])&&(l[s]=p=a.call(c,c.__data__,s,e)+"",u.has(p)?i[s]=c:u.set(p,c));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(c=u.get(p))?(r[s]=c,c.__data__=o[s],u.delete(p)):n[s]=new Fo(t,o[s]);for(s=0;s<f;++s)(c=e[s])&&u.get(l[s])===c&&(i[s]=c)}function M_(t){return t.__data__}function $_(t,e){if(!arguments.length)return Array.from(this,M_);var n=e?A_:w_,r=this._parents,i=this._groups;typeof t!="function"&&(t=__(t));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],h=i[u],l=h.length,p=S_(t.call(f,f&&f.__data__,u,r)),d=p.length,g=s[u]=new Array(d),m=a[u]=new Array(d),y=c[u]=new Array(l);n(f,h,g,m,y,p,e);for(var x=0,v=0,b,M;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!(M=m[v])&&++v<d;);b._next=M||null}}return a=new ye(a,r),a._enter=s,a._exit=c,a}function S_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function T_(){return new ye(this._exit||this._groups.map(y0),this._parents)}function P_(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 D_(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),c=0;c<a;++c)for(var u=n[c],f=r[c],h=u.length,l=s[c]=new Array(h),p,d=0;d<h;++d)(p=u[d]||f[d])&&(l[d]=p);for(;c<i;++c)s[c]=n[c];return new ye(s,this._parents)}function k_(){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 E_(t){t||(t=L_);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}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,c=i[o]=new Array(s),u,f=0;f<s;++f)(u=a[f])&&(c[f]=u);c.sort(e)}return new ye(i,this._parents).order()}function L_(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function N_(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function R_(){return Array.from(this)}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;i<o;++i){var a=r[i];if(a)return a}return null}function I_(){let t=0;for(const e of this)++t;return t}function F_(){return!this.node()}function z_(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 O_(t){return function(){this.removeAttribute(t)}}function G_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function B_(t,e){return function(){this.setAttribute(t,e)}}function U_(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Y_(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 H_(t,e){var n=Io(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?G_:O_:typeof e=="function"?n.local?W_:Y_:n.local?U_:B_)(n,e))}function b0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function q_(t){return function(){this.style.removeProperty(t)}}function X_(t,e,n){return function(){this.style.setProperty(t,e,n)}}function V_(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function j_(t,e,n){return arguments.length>1?this.each((e==null?q_:typeof e=="function"?V_:X_)(t,e,n??"")):ur(this.node(),t)}function ur(t,e){return t.style.getPropertyValue(e)||b0(t).getComputedStyle(t,null).getPropertyValue(e)}function Z_(t){return function(){delete this[t]}}function K_(t,e){return function(){this[t]=e}}function Q_(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function J_(t,e){return arguments.length>1?this.each((e==null?Z_:typeof e=="function"?Q_:K_)(t,e)):this.node()[t]}function v0(t){return t.trim().split(/^|\s+/)}function Gu(t){return t.classList||new x0(t)}function x0(t){this._node=t,this._names=v0(t.getAttribute("class")||"")}x0.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 _0(t,e){for(var n=Gu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function w0(t,e){for(var n=Gu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function tw(t){return function(){_0(this,t)}}function ew(t){return function(){w0(this,t)}}function nw(t,e){return function(){(e.apply(this,arguments)?_0:w0)(this,t)}}function rw(t,e){var n=v0(t+"");if(arguments.length<2){for(var r=Gu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?nw:e?tw:ew)(n,e))}function iw(){this.textContent=""}function ow(t){return function(){this.textContent=t}}function aw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function sw(t){return arguments.length?this.each(t==null?iw:(typeof t=="function"?aw:ow)(t)):this.node().textContent}function uw(){this.innerHTML=""}function cw(t){return function(){this.innerHTML=t}}function lw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function fw(t){return arguments.length?this.each(t==null?uw:(typeof t=="function"?lw:cw)(t)):this.node().innerHTML}function hw(){this.nextSibling&&this.parentNode.appendChild(this)}function pw(){return this.each(hw)}function dw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gw(){return this.each(dw)}function mw(t){var e=typeof t=="function"?t:p0(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function yw(){return null}function bw(t,e){var n=typeof t=="function"?t:p0(t),r=e==null?yw:typeof e=="function"?e:Ou(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function vw(){var t=this.parentNode;t&&t.removeChild(this)}function xw(){return this.each(vw)}function _w(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ww(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Aw(t){return this.select(t?ww:_w)}function Mw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function $w(t){return function(e){t.call(this,e,this.__data__)}}function Sw(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 Tw(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 Pw(t,e,n){return function(){var r=this.__on,i,o=$w(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 Dw(t,e,n){var r=Sw(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,f;c<u;++c)for(i=0,f=s[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?Pw:Tw,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function A0(t,e,n){var r=b0(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 kw(t,e){return function(){return A0(this,t,e)}}function Ew(t,e){return function(){return A0(this,t,e.apply(this,arguments))}}function Lw(t,e){return this.each((typeof e=="function"?Ew:kw)(t,e))}function*Nw(){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 Rw=[null];function ye(t,e){this._groups=t,this._parents=e}function ii(){return new ye([[document.documentElement]],Rw)}function Cw(){return this}ye.prototype=ii.prototype={constructor:ye,select:a_,selectAll:l_,selectChild:d_,selectChildren:b_,filter:v_,data:$_,enter:x_,exit:T_,join:P_,merge:D_,selection:Cw,order:k_,sort:E_,call:N_,nodes:R_,node:C_,size:I_,empty:F_,each:z_,attr:H_,style:j_,property:J_,classed:rw,text:sw,html:fw,raise:pw,lower:gw,append:mw,insert:bw,remove:xw,clone:Aw,datum:Mw,on:Dw,dispatch:Lw,[Symbol.iterator]:Nw};function Bu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function M0(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function oi(){}var ai=.7,zo=1/ai,cr="\\s*([+-]?\\d+)\\s*",si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Iw=/^#([0-9a-f]{3,8})$/,Fw=new RegExp(`^rgb\\(${cr},${cr},${cr}\\)$`),zw=new RegExp(`^rgb\\(${De},${De},${De}\\)$`),Ow=new RegExp(`^rgba\\(${cr},${cr},${cr},${si}\\)$`),Gw=new RegExp(`^rgba\\(${De},${De},${De},${si}\\)$`),Bw=new RegExp(`^hsl\\(${si},${De},${De}\\)$`),Uw=new RegExp(`^hsla\\(${si},${De},${De},${si}\\)$`),$0={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};Bu(oi,wn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:S0,formatHex:S0,formatHex8:Yw,formatHsl:Ww,formatRgb:T0,toString:T0});function S0(){return this.rgb().formatHex()}function Yw(){return this.rgb().formatHex8()}function Ww(){return L0(this).formatHsl()}function T0(){return this.rgb().formatRgb()}function wn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Iw.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?P0(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Oo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Oo(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=Fw.exec(t))?new ee(e[1],e[2],e[3],1):(e=zw.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Ow.exec(t))?Oo(e[1],e[2],e[3],e[4]):(e=Gw.exec(t))?Oo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Bw.exec(t))?E0(e[1],e[2]/100,e[3]/100,1):(e=Uw.exec(t))?E0(e[1],e[2]/100,e[3]/100,e[4]):$0.hasOwnProperty(t)?P0($0[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function P0(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function Oo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function Hw(t){return t instanceof oi||(t=wn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Uu(t,e,n,r){return arguments.length===1?Hw(t):new ee(t,e,n,r??1)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Bu(ee,Uu,M0(oi,{brighter(t){return t=t==null?zo:Math.pow(zo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ai:Math.pow(ai,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(An(this.r),An(this.g),An(this.b),Go(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:D0,formatHex:D0,formatHex8:qw,formatRgb:k0,toString:k0}));function D0(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}`}function qw(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}${Mn((isNaN(this.opacity)?1:this.opacity)*255)}`}function k0(){const t=Go(this.opacity);return`${t===1?"rgb(":"rgba("}${An(this.r)}, ${An(this.g)}, ${An(this.b)}${t===1?")":`, ${t})`}`}function Go(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function An(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mn(t){return t=An(t),(t<16?"0":"")+t.toString(16)}function E0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new be(t,e,n,r)}function L0(t){if(t instanceof be)return new be(t.h,t.s,t.l,t.opacity);if(t instanceof oi||(t=wn(t)),!t)return new be;if(t instanceof be)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,c=(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/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new be(a,s,c,t.opacity)}function Xw(t,e,n,r){return arguments.length===1?L0(t):new be(t,e,n,r??1)}function be(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Bu(be,Xw,M0(oi,{brighter(t){return t=t==null?zo:Math.pow(zo,t),new be(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ai:Math.pow(ai,t),new be(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 ee(Yu(t>=240?t-240:t+120,i,r),Yu(t,i,r),Yu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new be(N0(this.h),Bo(this.s),Bo(this.l),Go(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=Go(this.opacity);return`${t===1?"hsl(":"hsla("}${N0(this.h)}, ${Bo(this.s)*100}%, ${Bo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function N0(t){return t=(t||0)%360,t<0?t+360:t}function Bo(t){return Math.max(0,Math.min(1,t||0))}function Yu(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 Wu=t=>()=>t;function Vw(t,e){return function(n){return t+n*e}}function jw(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 Zw(t){return(t=+t)==1?R0:function(e,n){return n-e?jw(e,n,t):Wu(isNaN(e)?n:e)}}function R0(t,e){var n=e-t;return n?Vw(t,n):Wu(isNaN(t)?e:t)}const Uo=function t(e){var n=Zw(e);function r(i,o){var a=n((i=Uu(i)).r,(o=Uu(o)).r),s=n(i.g,o.g),c=n(i.b,o.b),u=R0(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r}(1);function Kw(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 Qw(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Jw(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]=Xu(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 t3(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ve(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function e3(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]=Xu(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Hu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qu=new RegExp(Hu.source,"g");function n3(t){return function(){return t}}function r3(t){return function(e){return t(e)+""}}function C0(t,e){var n=Hu.lastIndex=qu.lastIndex=0,r,i,o,a=-1,s=[],c=[];for(t=t+"",e=e+"";(r=Hu.exec(t))&&(i=qu.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,c.push({i:a,x:ve(r,i)})),n=qu.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?r3(c[0].x):n3(e):(e=c.length,function(u){for(var f=0,h;f<e;++f)s[(h=c[f]).i]=h.x(u);return s.join("")})}function Xu(t,e){var n=typeof e,r;return e==null||n==="boolean"?Wu(e):(n==="number"?ve:n==="string"?(r=wn(e))?(e=r,Uo):C0:e instanceof wn?Uo:e instanceof Date?t3:Qw(e)?Kw:Array.isArray(e)?Jw:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?e3:ve)(t,e)}function i3(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var I0=180/Math.PI,F0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function z0(t,e,n,r,i,o){var a,s,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*I0,skewX:Math.atan(c)*I0,scaleX:a,scaleY:s}}var Yo;function o3(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?F0:z0(e.a,e.b,e.c,e.d,e.e,e.f)}function a3(t){return t==null||(Yo||(Yo=document.createElementNS("http://www.w3.org/2000/svg","g")),Yo.setAttribute("transform",t),!(t=Yo.transform.baseVal.consolidate()))?F0:(t=t.matrix,z0(t.a,t.b,t.c,t.d,t.e,t.f))}function O0(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:ve(u,h)},{i:g-2,x:ve(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(u,f,h,l){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ve(u,f)})):f&&h.push(i(h)+"rotate("+f+r)}function s(u,f,h,l){u!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ve(u,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ve(u,h)},{i:g-2,x:ve(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(u,f){var h=[],l=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,h,l),a(u.rotate,f.rotate,h,l),s(u.skewX,f.skewX,h,l),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,h,l),u=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var s3=O0(o3,"px, ","px)","deg)"),u3=O0(a3,", ",")",")"),lr=0,ui=0,ci=0,G0=1e3,Wo,li,Ho=0,$n=0,qo=0,fi=typeof performance=="object"&&performance.now?performance:Date,B0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Vu(){return $n||(B0(c3),$n=fi.now()+qo)}function c3(){$n=0}function Xo(){this._call=this._time=this._next=null}Xo.prototype=U0.prototype={constructor:Xo,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Vu():+n)+(e==null?0:+e),!this._next&&li!==this&&(li?li._next=this:Wo=this,li=this),this._call=t,this._time=n,ju()},stop:function(){this._call&&(this._call=null,this._time=1/0,ju())}};function U0(t,e,n){var r=new Xo;return r.restart(t,e,n),r}function l3(){Vu(),++lr;for(var t=Wo,e;t;)(e=$n-t._time)>=0&&t._call.call(void 0,e),t=t._next;--lr}function Y0(){$n=(Ho=fi.now())+qo,lr=ui=0;try{l3()}finally{lr=0,h3(),$n=0}}function f3(){var t=fi.now(),e=t-Ho;e>G0&&(qo-=e,Ho=t)}function h3(){for(var t,e=Wo,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:Wo=n);li=t,ju(r)}function ju(t){if(!lr){ui&&(ui=clearTimeout(ui));var e=t-$n;e>24?(t<1/0&&(ui=setTimeout(Y0,t-fi.now()-qo)),ci&&(ci=clearInterval(ci))):(ci||(Ho=fi.now(),ci=setInterval(f3,G0)),lr=1,B0(Y0))}}function W0(t,e,n){var r=new Xo;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var p3=l0("start","end","cancel","interrupt"),d3=[],H0=0,q0=1,Zu=2,Vo=3,X0=4,Ku=5,jo=6;function Zo(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;g3(t,n,{name:e,index:r,group:i,on:p3,tween:d3,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:H0})}function Qu(t,e){var n=xe(t,e);if(n.state>H0)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=xe(t,e);if(n.state>Vo)throw new Error("too late; already running");return n}function xe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function g3(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=U0(o,0,n.time);function o(u){n.state=q0,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var f,h,l,p;if(n.state!==q0)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===Vo)return W0(a);p.state===X0?(p.state=jo,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=jo,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(W0(function(){n.state===Vo&&(n.state=X0,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Zu,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Zu){for(n.state=Vo,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Ku,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===Ku&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=jo,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function m3(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>Zu&&r.state<Ku,r.state=jo,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function y3(t){return this.each(function(){m3(this,t)})}function b3(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 v3(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},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}o.tween=i}}function x3(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=xe(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?b3:v3)(n,t,e))}function Ju(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 xe(i,r).value[e]}}function V0(t,e){var n;return(typeof e=="number"?ve:e instanceof wn?Uo:(n=wn(e))?(e=n,Uo):C0)(t,e)}function _3(t){return function(){this.removeAttribute(t)}}function w3(t){return function(){this.removeAttributeNS(t.space,t.local)}}function A3(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 M3(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 $3(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function S3(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function T3(t,e){var n=Io(t),r=n==="transform"?u3:V0;return this.attrTween(t,typeof e=="function"?(n.local?S3:$3)(n,r,Ju(this,"attr."+t,e)):e==null?(n.local?w3:_3)(n):(n.local?M3:A3)(n,r,e))}function P3(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function D3(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function k3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&D3(t,o)),n}return i._value=e,i}function E3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&P3(t,o)),n}return i._value=e,i}function L3(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=Io(t);return this.tween(n,(r.local?k3:E3)(r,e))}function N3(t,e){return function(){Qu(this,t).delay=+e.apply(this,arguments)}}function R3(t,e){return e=+e,function(){Qu(this,t).delay=e}}function C3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?N3:R3)(e,t)):xe(this.node(),e).delay}function I3(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function F3(t,e){return e=+e,function(){ke(this,t).duration=e}}function z3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?I3:F3)(e,t)):xe(this.node(),e).duration}function O3(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function G3(t){var e=this._id;return arguments.length?this.each(O3(e,t)):xe(this.node(),e).ease}function B3(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function U3(t){if(typeof t!="function")throw new Error;return this.each(B3(this._id,t))}function Y3(t){typeof t!="function"&&(t=g0(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]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new Ye(r,this._parents,this._name,this._id)}function W3(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 c=e[s],u=n[s],f=c.length,h=a[s]=new Array(f),l,p=0;p<f;++p)(l=c[p]||u[p])&&(h[p]=l);for(;s<r;++s)a[s]=e[s];return new Ye(a,this._parents,this._name,this._id)}function H3(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 q3(t,e,n){var r,i,o=H3(e)?Qu:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function X3(t,e){var n=this._id;return arguments.length<2?xe(this.node(),n).on.on(t):this.each(q3(n,t,e))}function V3(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function j3(){return this.on("end.remove",V3(this._id))}function Z3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ou(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],c=s.length,u=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=s[l])&&(h=t.call(f,f.__data__,l,s))&&("__data__"in f&&(h.__data__=f.__data__),u[l]=h,Zo(u[l],e,n,l,u,xe(f,n)));return new Ye(o,this._parents,e,n)}function K3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=d0(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var c=r[s],u=c.length,f,h=0;h<u;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=xe(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&Zo(p,e,n,g,l,d);o.push(l),a.push(f)}return new Ye(o,a,e,n)}var Q3=ii.prototype.constructor;function J3(){return new Q3(this._groups,this._parents)}function t5(t,e){var n,r,i;return function(){var o=ur(this,t),a=(this.style.removeProperty(t),ur(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function j0(t){return function(){this.style.removeProperty(t)}}function e5(t,e,n){var r,i=n+"",o;return function(){var a=ur(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function n5(t,e,n){var r,i,o;return function(){var a=ur(this,t),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(t),ur(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s))}}function r5(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var c=ke(this,t),u=c.on,f=c.value[o]==null?s||(s=j0(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(a,i=f),c.on=r}}function i5(t,e,n){var r=(t+="")=="transform"?s3:V0;return e==null?this.styleTween(t,t5(t,r)).on("end.style."+t,j0(t)):typeof e=="function"?this.styleTween(t,n5(t,r,Ju(this,"style."+t,e))).each(r5(this._id,t)):this.styleTween(t,e5(t,r,e),n).on("end.style."+t,null)}function o5(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function a5(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&o5(t,a,n)),r}return o._value=e,o}function s5(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,a5(t,e,n??""))}function u5(t){return function(){this.textContent=t}}function c5(t){return function(){var e=t(this);this.textContent=e??""}}function l5(t){return this.tween("text",typeof t=="function"?c5(Ju(this,"text",t)):u5(t==null?"":t+""))}function f5(t){return function(e){this.textContent=t.call(this,e)}}function h5(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&f5(i)),e}return r._value=t,r}function p5(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,h5(t))}function d5(){for(var t=this._name,e=this._id,n=Z0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var f=xe(c,e);Zo(c,t,n,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ye(r,this._parents,t,n)}function g5(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var u=ke(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),u.on=e}),i===0&&o()})}var m5=0;function Ye(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Z0(){return++m5}var We=ii.prototype;Ye.prototype={constructor:Ye,select:Z3,selectAll:K3,selectChild:We.selectChild,selectChildren:We.selectChildren,filter:Y3,merge:W3,selection:J3,transition:d5,call:We.call,nodes:We.nodes,node:We.node,size:We.size,empty:We.empty,each:We.each,on:X3,attr:T3,attrTween:L3,style:i5,styleTween:s5,text:l5,textTween:p5,remove:j3,tween:x3,delay:C3,duration:z3,ease:G3,easeVarying:U3,end:g5,[Symbol.iterator]:We[Symbol.iterator]};function y5(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var b5={time:null,delay:0,duration:250,ease:y5};function v5(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 x5(t){var e,n;t instanceof Ye?(e=t._id,t=t._name):(e=Z0(),(n=b5).time=Vu(),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,c,u=0;u<s;++u)(c=a[u])&&Zo(c,t,e,u,a,n||v5(c,e));return new Ye(r,this._parents,t,e)}ii.prototype.interrupt=y3,ii.prototype.transition=x5;function _5(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ko(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 fr(t){return t=Ko(Math.abs(t)),t?t[1]:NaN}function w5(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function A5(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var M5=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qo(t){if(!(e=M5.exec(t)))throw new Error("invalid format: "+t);var e;return new tc({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]})}Qo.prototype=tc.prototype;function tc(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+""}tc.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 $5(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 K0;function S5(t,e){var n=Ko(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(K0=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")+Ko(t,Math.max(0,e+o-1))[0]}function Q0(t,e){var n=Ko(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 J0={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:_5,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)=>Q0(t*100,e),r:Q0,s:S5,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function tp(t){return t}var ep=Array.prototype.map,np=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function T5(t){var e=t.grouping===void 0||t.thousands===void 0?tp:w5(ep.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?tp:A5(ep.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(h){h=Qo(h);var l=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,M=h.type;M==="n"?(x=!0,M="g"):J0[M]||(v===void 0&&(v=12),b=!0,M="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():"",T=g==="$"?r:/[%p]/.test(M)?a:"",P=J0[M],E=/[defgprs%]/.test(M);v=v===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function k(S){var C=_,N=T,A,$,w;if(M==="c")N=P(S)+N,S="";else{S=+S;var D=S<0||1/S<0;if(S=isNaN(S)?c:P(Math.abs(S),v),b&&(S=$5(S)),D&&+S==0&&d!=="+"&&(D=!1),C=(D?d==="("?d:s:d==="-"||d==="("?"":d)+C,N=(M==="s"?np[8+K0/3]:"")+N+(D&&d==="("?")":""),E){for(A=-1,$=S.length;++A<$;)if(w=S.charCodeAt(A),48>w||w>57){N=(w===46?i+S.slice(A+1):S.slice(A))+N,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var L=C.length+S.length+N.length,R=L<y?new Array(y-L+1).join(l):"";switch(x&&m&&(S=e(R+S,R.length?y-N.length:1/0),R=""),p){case"<":S=C+S+N+R;break;case"=":S=C+R+S+N;break;case"^":S=R.slice(0,L=R.length>>1)+C+S+N+R.slice(L);break;default:S=R+C+S+N;break}return o(S)}return k.toString=function(){return h+""},k}function f(h,l){var p=u((h=Qo(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(fr(l)/3)))*3,g=Math.pow(10,-d),m=np[8+d/3];return function(y){return p(g*y)+m}}return{format:u,formatPrefix:f}}var Jo,rp,ip;P5({thousands:",",grouping:[3],currency:["$",""]});function P5(t){return Jo=T5(t),rp=Jo.format,ip=Jo.formatPrefix,Jo}function D5(t){return Math.max(0,-fr(Math.abs(t)))}function k5(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fr(e)/3)))*3-fr(Math.abs(t)))}function E5(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,fr(e)-fr(t))+1}function ta(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const op=Symbol("implicit");function ap(){var t=new u0,e=[],n=[],r=op;function i(o){let a=t.get(o);if(a===void 0){if(r!==op)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 u0;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 ap(e,n).unknown(r)},ta.apply(i,arguments),i}function sp(){var t=ap().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,c=0,u=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+u*2),s&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),s&&(d=Math.round(d),a=Math.round(a));var m=Jx(l).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(s=!!l,h()):s},t.padding=function(l){return arguments.length?(c=Math.min(1,u=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(u=+l,h()):u},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return sp(e(),[r,i]).round(s).paddingInner(c).paddingOuter(u).align(f)},ta.apply(h(),arguments)}function up(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return up(e())},t}function L5(){return up(sp.apply(null,arguments).paddingInner(1))}function N5(t){return function(){return t}}function R5(t){return+t}var cp=[0,1];function hr(t){return t}function ec(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:N5(isNaN(e)?NaN:.5)}function C5(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function I5(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=ec(i,r),o=n(a,o)):(r=ec(r,i),o=n(o,a)),function(s){return o(r(s))}}function F5(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]=ec(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var c=s0(t,s,1,r)-1;return o[c](i[c](s))}}function z5(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function O5(){var t=cp,e=cp,n=Xu,r,i,o,a=hr,s,c,u;function f(){var l=Math.min(t.length,e.length);return a!==hr&&(a=C5(t[0],t[l-1])),s=l>2?F5:I5,c=u=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=s(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((u||(u=s(e,t.map(r),ve)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,R5),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=i3,f()},h.clamp=function(l){return arguments.length?(a=l?!0:hr,f()):a!==hr},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function G5(){return O5()(hr,hr)}function B5(t,e,n,r){var i=Qx(t,e,n),o;switch(r=Qo(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=k5(i,a))&&(r.precision=o),ip(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=E5(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=D5(i))&&(r.precision=o-(r.type==="%")*2);break}}return rp(r)}function lp(t){var e=t.domain;return t.ticks=function(n){var r=e();return Kx(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return B5(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],c,u,f=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);f-- >0;){if(u=Fu(a,s,n),u===c)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;c=u}return t},t}function fp(){var t=G5();return t.copy=function(){return z5(t,fp())},ta.apply(t,arguments),lp(t)}function hp(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[s0(r,c,0,n)]:o}function s(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,s()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,s()):i.slice()},a.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return hp().domain([t,e]).range(i).unknown(o)},ta.apply(lp(a),arguments)}function hi(t,e,n){this.k=t,this.x=e,this.y=n}hi.prototype={constructor:hi,scale:function(t){return t===1?this:new hi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new hi(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+")"}},hi.prototype;function ea(t){return Object.prototype.toString.call(t)==="[object Object]"}function pp(t,e){if(ea(t)===!1||ea(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;ea(r[a])&&ea(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var nc=function(t,e){return nc=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])},nc(t,e)};function He(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");nc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function U5(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(f){try{u(r.next(f))}catch(h){a(h)}}function c(f){try{u(r.throw(f))}catch(h){a(h)}}function u(f){f.done?o(f.value):i(f.value).then(s,c)}u((r=r.apply(t,[])).next())})}function dp(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function pr(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 pi(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 di(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 dr(t){return this instanceof dr?(this.v=t,this):new dr(t)}function Y5(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},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||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{u(r[p](d))}catch(g){l(o[0][3],g)}}function u(p){p.value instanceof dr?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function W5(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 pr=="function"?pr(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,c){a=t[o](a),i(s,c,a.done,a.value)})}}function i(o,a,s,c){Promise.resolve(c).then(function(u){o({value:u,done:s})},a)}}function Dt(t){return typeof t=="function"}function rc(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 ic=rc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
3
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function Mu(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Po=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=ir(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(mt(f))try{f()}catch(g){o=g instanceof Au?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=ir(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{Ih(d)}catch(g){o=o??[],g instanceof Au?o=Do(Do([],ni(o)),ni(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new Au(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Ih(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)&&Mu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Mu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Rh=Po.EMPTY;function Ch(t){return t instanceof Po||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function Ih(t){mt(t)?t():t.unsubscribe()}var Fh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},zh={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Do([t,e],ni(n)))},clearTimeout:function(t){var e=zh.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Oh(t){zh.setTimeout(function(){throw t})}function $u(){}function ko(t){t()}var Su=function(t){ei(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Ch(n)&&n.add(r)):r.destination=Zv,r}return e.create=function(n,r,i){return new Du(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}(Po),Xv=Function.prototype.bind;function Tu(t,e){return Xv.call(t,e)}var Vv=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){Eo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Eo(r)}else Eo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Eo(n)}},t}(),Du=function(t){ei(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Fh.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Tu(n.next,s),error:n.error&&Tu(n.error,s),complete:n.complete&&Tu(n.complete,s)}):a=n}return o.destination=new Vv(a),o}return e}(Su);function Eo(t){Oh(t)}function jv(t){throw t}var Zv={closed:!0,next:$u,error:jv,complete:$u},Pu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ar(t){return t}function Kv(t){return t.length===0?ar:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var at=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=Jv(e)?e:new Du(e,n,r);return ko(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?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=Gh(n),new n(function(i,o){var a=new Du({next:function(s){try{e(s)}catch(c){o(c),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[Pu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Kv(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Gh(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 Gh(t){var e;return(e=t??Fh.Promise)!==null&&e!==void 0?e:Promise}function Qv(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function Jv(t){return t&&t instanceof Su||Qv(t)&&Ch(t)}function tx(t){return mt(t==null?void 0:t.lift)}function me(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 oe(t,e,n,r,i){return new ex(t,e,n,r,i)}var ex=function(t){ei(e,t);function e(n,r,i,o,a,s){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=r?function(u){try{r(u)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(u){try{o(u)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}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}(Su),nx=wu(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),lt=function(t){ei(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 Bh(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new nx},e.prototype.next=function(n){var r=this;ko(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=ir(r.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(n)}}catch(u){i={error:u}}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;ko(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;ko(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?Rh:(this.currentObservers=null,s.push(n),new Po(function(){r.currentObservers=null,Mu(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 at;return n.source=this,n},e.create=function(n,r){return new Bh(n,r)},e}(at),Bh=function(t){ei(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:Rh},e}(lt),Uh=new at(function(t){return t.complete()});function rx(t){return t&&mt(t.schedule)}function ku(t){return t[t.length-1]}function ix(t){return mt(ku(t))?t.pop():void 0}function Yh(t){return rx(ku(t))?t.pop():void 0}function ox(t,e){return typeof ku(t)=="number"?t.pop():e}var Eu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Wh(t){return mt(t==null?void 0:t.then)}function qh(t){return mt(t[Pu])}function Hh(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function Xh(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 ax(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Vh=ax();function jh(t){return mt(t==null?void 0:t[Vh])}function Zh(t){return qv(this,arguments,function(){var n,r,i,o;return Nh(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,or(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,or(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,or(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 Kh(t){return mt(t==null?void 0:t.getReader)}function Ue(t){if(t instanceof at)return t;if(t!=null){if(qh(t))return sx(t);if(Eu(t))return ux(t);if(Wh(t))return cx(t);if(Hh(t))return Qh(t);if(jh(t))return lx(t);if(Kh(t))return fx(t)}throw Xh(t)}function sx(t){return new at(function(e){var n=t[Pu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ux(t){return new at(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function cx(t){return new at(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Oh)})}function lx(t){return new at(function(e){var n,r;try{for(var i=ir(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 Qh(t){return new at(function(e){hx(t,e).catch(function(n){return e.error(n)})})}function fx(t){return Qh(Zh(t))}function hx(t,e){var n,r,i,o;return Wv(this,void 0,void 0,function(){var a,s;return Nh(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Hv(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.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 an(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 Jh(t,e){return e===void 0&&(e=0),me(function(n,r){n.subscribe(oe(r,function(i){return an(r,t,function(){return r.next(i)},e)},function(){return an(r,t,function(){return r.complete()},e)},function(i){return an(r,t,function(){return r.error(i)},e)}))})}function t0(t,e){return e===void 0&&(e=0),me(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function px(t,e){return Ue(t).pipe(t0(e),Jh(e))}function dx(t,e){return Ue(t).pipe(t0(e),Jh(e))}function gx(t,e){return new at(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function mx(t,e){return new at(function(n){var r;return an(n,e,function(){r=t[Vh](),an(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 mt(r==null?void 0:r.return)&&r.return()}})}function e0(t,e){if(!t)throw new Error("Iterable cannot be null");return new at(function(n){an(n,e,function(){var r=t[Symbol.asyncIterator]();an(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function yx(t,e){return e0(Zh(t),e)}function bx(t,e){if(t!=null){if(qh(t))return px(t,e);if(Eu(t))return gx(t,e);if(Wh(t))return dx(t,e);if(Hh(t))return e0(t,e);if(jh(t))return mx(t,e);if(Kh(t))return yx(t,e)}throw Xh(t)}function Lu(t,e){return e?bx(t,e):Ue(t)}var n0=wu(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function G(t,e){return me(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var vx=Array.isArray;function xx(t,e){return vx(e)?t.apply(void 0,Do([],ni(e))):t(e)}function r0(t){return G(function(e){return xx(t,e)})}var _x=Array.isArray,wx=Object.getPrototypeOf,Ax=Object.prototype,Mx=Object.keys;function $x(t){if(t.length===1){var e=t[0];if(_x(e))return{args:e,keys:null};if(Sx(e)){var n=Mx(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function Sx(t){return t&&typeof t=="object"&&wx(t)===Ax}function Tx(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Yh(t),r=ix(t),i=$x(t),o=i.args,a=i.keys;if(o.length===0)return Lu([],n);var s=new at(Dx(o,n,a?function(c){return Tx(a,c)}:ar));return r?s.pipe(r0(r)):s}function Dx(t,e,n){return n===void 0&&(n=ar),function(r){i0(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,c=function(f){i0(e,function(){var h=Lu(t[f],e),l=!1;h.subscribe(oe(r,function(p){o[f]=p,l||(l=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},u=0;u<i;u++)c(u)},r)}}function i0(t,e,n){t?an(n,t,e):e()}function Px(t,e,n,r,i,o,a,s){var c=[],u=0,f=0,h=!1,l=function(){h&&!c.length&&!u&&e.complete()},p=function(g){return u<r?d(g):c.push(g)},d=function(g){u++;var m=!1;Ue(n(g,f++)).subscribe(oe(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{u--;for(var y=function(){var x=c.shift();a||d(x)};c.length&&u<r;)y();l()}catch(x){e.error(x)}}))};return t.subscribe(oe(e,p,function(){h=!0,l()})),function(){}}function Nu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Nu(function(r,i){return G(function(o,a){return e(r,o,i,a)})(Ue(t(r,i)))},n):(typeof e=="number"&&(n=e),me(function(r,i){return Px(r,i,t,n)}))}function kx(t){return t===void 0&&(t=1/0),Nu(ar,t)}var Ex=["addListener","removeListener"],Lx=["addEventListener","removeEventListener"],Nx=["on","off"];function Ru(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Ru(t,e,n).pipe(r0(r));var i=ni(Ix(t)?Lx.map(function(s){return function(c){return t[s](e,c,n)}}):Rx(t)?Ex.map(o0(t,e)):Cx(t)?Nx.map(o0(t,e)):[],2),o=i[0],a=i[1];if(!o&&Eu(t))return Nu(function(s){return Ru(s,e,n)})(Ue(t));if(!o)throw new TypeError("Invalid event target");return new at(function(s){var c=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return s.next(1<u.length?u:u[0])};return o(c),function(){return a(c)}})}function o0(t,e){return function(n){return function(r){return t[n](e,r)}}}function Rx(t){return mt(t.addListener)&&mt(t.removeListener)}function Cx(t){return mt(t.on)&&mt(t.off)}function Ix(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function Cu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Yh(t),r=ox(t,1/0),i=t;return i.length?i.length===1?Ue(i[0]):kx(r)(Lu(i,n)):Uh}function Lo(t,e){return me(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function Fx(t){return me(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function zx(t){return t<=0?function(){return Uh}:me(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function tt(t,e){return e===void 0&&(e=ar),t=t??Ox,me(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function Ox(t,e){return t===e}function Gx(t){return t===void 0&&(t=Bx),me(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function Bx(){return new n0}function ri(t,e){var n=arguments.length>=2;return function(r){return r.pipe(ar,zx(1),n?Fx(e):Gx(function(){return new n0}))}}function U(t,e){return me(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(c){i==null||i.unsubscribe();var u=0,f=o++;Ue(t(c,f)).subscribe(i=oe(r,function(h){return r.next(e?e(c,h,f,u++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function I(t){return me(function(e,n){Ue(t).subscribe(oe(n,function(){return n.complete()},$u)),!n.closed&&e.subscribe(n)})}const sr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function No(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ux(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function a0(t){let e,n,r;t.length!==2?(e=No,n=(s,c)=>No(t(s),c),r=(s,c)=>t(s)-c):(e=t===No||t===Ux?t:Yx,n=t,r=t);function i(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<0?u=h+1:f=h}while(u<f)}return u}function o(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<=0?u=h+1:f=h}while(u<f)}return u}function a(s,c,u=0,f=s.length){const h=i(s,c,u,f-1);return h>u&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:i,center:a,right:o}}function Yx(){return 0}function Wx(t){return t===null?NaN:+t}const qx=a0(No),s0=qx.right;a0(Wx).center;class u0 extends Map{constructor(e,n=Vx){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(c0(this,e))}has(e){return super.has(c0(this,e))}set(e,n){return super.set(Hx(this,e),n)}delete(e){return super.delete(Xx(this,e))}}function c0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Hx({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Xx({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Vx(t){return t!==null&&typeof t=="object"?t.valueOf():t}const jx=Math.sqrt(50),Zx=Math.sqrt(10),Kx=Math.sqrt(2);function Ro(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>=jx?10:o>=Zx?5:o>=Kx?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),c=Math.round(e*u),s/u<t&&++s,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),c=Math.round(e/u),s*u<t&&++s,c*u>e&&--c),c<s&&.5<=n&&n<2?Ro(t,e,n*2):[s,c,u]}function Qx(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?Ro(e,t,n):Ro(t,e,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)c[u]=(o-u)/-a;else for(let u=0;u<s;++u)c[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)c[u]=(i+u)/-a;else for(let u=0;u<s;++u)c[u]=(i+u)*a;return c}function Iu(t,e,n){return e=+e,t=+t,n=+n,Ro(t,e,n)[2]}function Jx(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Iu(e,t,n):Iu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function t_(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 e_={value:()=>{}};function l0(){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 Co(n)}function Co(t){this._=t}function n_(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}})}Co.prototype=l0.prototype={constructor:Co,on:function(t,e){var n=this._,r=n_(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]=f0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=f0(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 Co(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 f0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=e_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Fu="http://www.w3.org/1999/xhtml";const h0={svg:"http://www.w3.org/2000/svg",xhtml:Fu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Io(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),h0.hasOwnProperty(e)?{space:h0[e],local:t}:t}function i_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Fu&&e.documentElement.namespaceURI===Fu?e.createElement(t):e.createElementNS(n,t)}}function o_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function p0(t){var e=Io(t);return(e.local?o_:i_)(e)}function a_(){}function zu(t){return t==null?a_:function(){return this.querySelector(t)}}function s_(t){typeof t!="function"&&(t=zu(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),c,u,f=0;f<a;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),s[f]=u);return new ye(r,this._parents)}function u_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function c_(){return[]}function d0(t){return t==null?c_:function(){return this.querySelectorAll(t)}}function l_(t){return function(){return u_(t.apply(this,arguments))}}function f_(t){typeof t=="function"?t=l_(t):t=d0(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(r.push(t.call(c,c.__data__,u,a)),i.push(c));return new ye(r,i)}function g0(t){return function(){return this.matches(t)}}function m0(t){return function(e){return e.matches(t)}}var h_=Array.prototype.find;function p_(t){return function(){return h_.call(this.children,t)}}function d_(){return this.firstElementChild}function g_(t){return this.select(t==null?d_:p_(typeof t=="function"?t:m0(t)))}var m_=Array.prototype.filter;function y_(){return Array.from(this.children)}function b_(t){return function(){return m_.call(this.children,t)}}function v_(t){return this.selectAll(t==null?y_:b_(typeof t=="function"?t:m0(t)))}function x_(t){typeof t!="function"&&(t=g0(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]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new ye(r,this._parents)}function y0(t){return new Array(t.length)}function __(){return new ye(this._enter||this._groups.map(y0),this._parents)}function Fo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Fo.prototype={constructor:Fo,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 w_(t){return function(){return t}}function A_(t,e,n,r,i,o){for(var a=0,s,c=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Fo(t,o[a]);for(;a<c;++a)(s=e[a])&&(i[a]=s)}function M_(t,e,n,r,i,o,a){var s,c,u=new Map,f=e.length,h=o.length,l=new Array(f),p;for(s=0;s<f;++s)(c=e[s])&&(l[s]=p=a.call(c,c.__data__,s,e)+"",u.has(p)?i[s]=c:u.set(p,c));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(c=u.get(p))?(r[s]=c,c.__data__=o[s],u.delete(p)):n[s]=new Fo(t,o[s]);for(s=0;s<f;++s)(c=e[s])&&u.get(l[s])===c&&(i[s]=c)}function $_(t){return t.__data__}function S_(t,e){if(!arguments.length)return Array.from(this,$_);var n=e?M_:A_,r=this._parents,i=this._groups;typeof t!="function"&&(t=w_(t));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],h=i[u],l=h.length,p=T_(t.call(f,f&&f.__data__,u,r)),d=p.length,g=s[u]=new Array(d),m=a[u]=new Array(d),y=c[u]=new Array(l);n(f,h,g,m,y,p,e);for(var x=0,v=0,b,M;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!(M=m[v])&&++v<d;);b._next=M||null}}return a=new ye(a,r),a._enter=s,a._exit=c,a}function T_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function D_(){return new ye(this._exit||this._groups.map(y0),this._parents)}function P_(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 k_(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),c=0;c<a;++c)for(var u=n[c],f=r[c],h=u.length,l=s[c]=new Array(h),p,d=0;d<h;++d)(p=u[d]||f[d])&&(l[d]=p);for(;c<i;++c)s[c]=n[c];return new ye(s,this._parents)}function E_(){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 L_(t){t||(t=N_);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}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,c=i[o]=new Array(s),u,f=0;f<s;++f)(u=a[f])&&(c[f]=u);c.sort(e)}return new ye(i,this._parents).order()}function N_(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function R_(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function C_(){return Array.from(this)}function I_(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function F_(){let t=0;for(const e of this)++t;return t}function z_(){return!this.node()}function O_(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 G_(t){return function(){this.removeAttribute(t)}}function B_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function U_(t,e){return function(){this.setAttribute(t,e)}}function Y_(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function W_(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function q_(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 H_(t,e){var n=Io(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?B_:G_:typeof e=="function"?n.local?q_:W_:n.local?Y_:U_)(n,e))}function b0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function X_(t){return function(){this.style.removeProperty(t)}}function V_(t,e,n){return function(){this.style.setProperty(t,e,n)}}function j_(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Z_(t,e,n){return arguments.length>1?this.each((e==null?X_:typeof e=="function"?j_:V_)(t,e,n??"")):ur(this.node(),t)}function ur(t,e){return t.style.getPropertyValue(e)||b0(t).getComputedStyle(t,null).getPropertyValue(e)}function K_(t){return function(){delete this[t]}}function Q_(t,e){return function(){this[t]=e}}function J_(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function tw(t,e){return arguments.length>1?this.each((e==null?K_:typeof e=="function"?J_:Q_)(t,e)):this.node()[t]}function v0(t){return t.trim().split(/^|\s+/)}function Ou(t){return t.classList||new x0(t)}function x0(t){this._node=t,this._names=v0(t.getAttribute("class")||"")}x0.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 _0(t,e){for(var n=Ou(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function w0(t,e){for(var n=Ou(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ew(t){return function(){_0(this,t)}}function nw(t){return function(){w0(this,t)}}function rw(t,e){return function(){(e.apply(this,arguments)?_0:w0)(this,t)}}function iw(t,e){var n=v0(t+"");if(arguments.length<2){for(var r=Ou(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?ew:nw)(n,e))}function ow(){this.textContent=""}function aw(t){return function(){this.textContent=t}}function sw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function uw(t){return arguments.length?this.each(t==null?ow:(typeof t=="function"?sw:aw)(t)):this.node().textContent}function cw(){this.innerHTML=""}function lw(t){return function(){this.innerHTML=t}}function fw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function hw(t){return arguments.length?this.each(t==null?cw:(typeof t=="function"?fw:lw)(t)):this.node().innerHTML}function pw(){this.nextSibling&&this.parentNode.appendChild(this)}function dw(){return this.each(pw)}function gw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mw(){return this.each(gw)}function yw(t){var e=typeof t=="function"?t:p0(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function bw(){return null}function vw(t,e){var n=typeof t=="function"?t:p0(t),r=e==null?bw:typeof e=="function"?e:zu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function xw(){var t=this.parentNode;t&&t.removeChild(this)}function _w(){return this.each(xw)}function ww(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Aw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Mw(t){return this.select(t?Aw:ww)}function $w(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Sw(t){return function(e){t.call(this,e,this.__data__)}}function Tw(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 Dw(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 Pw(t,e,n){return function(){var r=this.__on,i,o=Sw(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 kw(t,e,n){var r=Tw(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,f;c<u;++c)for(i=0,f=s[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?Pw:Dw,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function A0(t,e,n){var r=b0(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 Ew(t,e){return function(){return A0(this,t,e)}}function Lw(t,e){return function(){return A0(this,t,e.apply(this,arguments))}}function Nw(t,e){return this.each((typeof e=="function"?Lw:Ew)(t,e))}function*Rw(){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 Cw=[null];function ye(t,e){this._groups=t,this._parents=e}function ii(){return new ye([[document.documentElement]],Cw)}function Iw(){return this}ye.prototype=ii.prototype={constructor:ye,select:s_,selectAll:f_,selectChild:g_,selectChildren:v_,filter:x_,data:S_,enter:__,exit:D_,join:P_,merge:k_,selection:Iw,order:E_,sort:L_,call:R_,nodes:C_,node:I_,size:F_,empty:z_,each:O_,attr:H_,style:Z_,property:tw,classed:iw,text:uw,html:hw,raise:dw,lower:mw,append:yw,insert:vw,remove:_w,clone:Mw,datum:$w,on:kw,dispatch:Nw,[Symbol.iterator]:Rw};function Gu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function M0(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function oi(){}var ai=.7,zo=1/ai,cr="\\s*([+-]?\\d+)\\s*",si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fw=/^#([0-9a-f]{3,8})$/,zw=new RegExp(`^rgb\\(${cr},${cr},${cr}\\)$`),Ow=new RegExp(`^rgb\\(${Pe},${Pe},${Pe}\\)$`),Gw=new RegExp(`^rgba\\(${cr},${cr},${cr},${si}\\)$`),Bw=new RegExp(`^rgba\\(${Pe},${Pe},${Pe},${si}\\)$`),Uw=new RegExp(`^hsl\\(${si},${Pe},${Pe}\\)$`),Yw=new RegExp(`^hsla\\(${si},${Pe},${Pe},${si}\\)$`),$0={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};Gu(oi,wn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:S0,formatHex:S0,formatHex8:Ww,formatHsl:qw,formatRgb:T0,toString:T0});function S0(){return this.rgb().formatHex()}function Ww(){return this.rgb().formatHex8()}function qw(){return L0(this).formatHsl()}function T0(){return this.rgb().formatRgb()}function wn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Fw.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?D0(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Oo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Oo(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=zw.exec(t))?new ee(e[1],e[2],e[3],1):(e=Ow.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Gw.exec(t))?Oo(e[1],e[2],e[3],e[4]):(e=Bw.exec(t))?Oo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Uw.exec(t))?E0(e[1],e[2]/100,e[3]/100,1):(e=Yw.exec(t))?E0(e[1],e[2]/100,e[3]/100,e[4]):$0.hasOwnProperty(t)?D0($0[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function D0(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function Oo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function Hw(t){return t instanceof oi||(t=wn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Bu(t,e,n,r){return arguments.length===1?Hw(t):new ee(t,e,n,r??1)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Gu(ee,Bu,M0(oi,{brighter(t){return t=t==null?zo:Math.pow(zo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ai:Math.pow(ai,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(An(this.r),An(this.g),An(this.b),Go(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:P0,formatHex:P0,formatHex8:Xw,formatRgb:k0,toString:k0}));function P0(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}`}function Xw(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}${Mn((isNaN(this.opacity)?1:this.opacity)*255)}`}function k0(){const t=Go(this.opacity);return`${t===1?"rgb(":"rgba("}${An(this.r)}, ${An(this.g)}, ${An(this.b)}${t===1?")":`, ${t})`}`}function Go(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function An(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mn(t){return t=An(t),(t<16?"0":"")+t.toString(16)}function E0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new be(t,e,n,r)}function L0(t){if(t instanceof be)return new be(t.h,t.s,t.l,t.opacity);if(t instanceof oi||(t=wn(t)),!t)return new be;if(t instanceof be)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,c=(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/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new be(a,s,c,t.opacity)}function Vw(t,e,n,r){return arguments.length===1?L0(t):new be(t,e,n,r??1)}function be(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Gu(be,Vw,M0(oi,{brighter(t){return t=t==null?zo:Math.pow(zo,t),new be(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ai:Math.pow(ai,t),new be(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 ee(Uu(t>=240?t-240:t+120,i,r),Uu(t,i,r),Uu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new be(N0(this.h),Bo(this.s),Bo(this.l),Go(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=Go(this.opacity);return`${t===1?"hsl(":"hsla("}${N0(this.h)}, ${Bo(this.s)*100}%, ${Bo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function N0(t){return t=(t||0)%360,t<0?t+360:t}function Bo(t){return Math.max(0,Math.min(1,t||0))}function Uu(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 Yu=t=>()=>t;function jw(t,e){return function(n){return t+n*e}}function Zw(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 Kw(t){return(t=+t)==1?R0:function(e,n){return n-e?Zw(e,n,t):Yu(isNaN(e)?n:e)}}function R0(t,e){var n=e-t;return n?jw(t,n):Yu(isNaN(t)?e:t)}const Uo=function t(e){var n=Kw(e);function r(i,o){var a=n((i=Bu(i)).r,(o=Bu(o)).r),s=n(i.g,o.g),c=n(i.b,o.b),u=R0(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r}(1);function Qw(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 Jw(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function t3(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]=Hu(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 e3(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ve(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function n3(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]=Hu(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Wu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qu=new RegExp(Wu.source,"g");function r3(t){return function(){return t}}function i3(t){return function(e){return t(e)+""}}function C0(t,e){var n=Wu.lastIndex=qu.lastIndex=0,r,i,o,a=-1,s=[],c=[];for(t=t+"",e=e+"";(r=Wu.exec(t))&&(i=qu.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,c.push({i:a,x:ve(r,i)})),n=qu.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?i3(c[0].x):r3(e):(e=c.length,function(u){for(var f=0,h;f<e;++f)s[(h=c[f]).i]=h.x(u);return s.join("")})}function Hu(t,e){var n=typeof e,r;return e==null||n==="boolean"?Yu(e):(n==="number"?ve:n==="string"?(r=wn(e))?(e=r,Uo):C0:e instanceof wn?Uo:e instanceof Date?e3:Jw(e)?Qw:Array.isArray(e)?t3:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?n3:ve)(t,e)}function o3(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var I0=180/Math.PI,F0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function z0(t,e,n,r,i,o){var a,s,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*I0,skewX:Math.atan(c)*I0,scaleX:a,scaleY:s}}var Yo;function a3(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?F0:z0(e.a,e.b,e.c,e.d,e.e,e.f)}function s3(t){return t==null||(Yo||(Yo=document.createElementNS("http://www.w3.org/2000/svg","g")),Yo.setAttribute("transform",t),!(t=Yo.transform.baseVal.consolidate()))?F0:(t=t.matrix,z0(t.a,t.b,t.c,t.d,t.e,t.f))}function O0(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:ve(u,h)},{i:g-2,x:ve(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(u,f,h,l){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ve(u,f)})):f&&h.push(i(h)+"rotate("+f+r)}function s(u,f,h,l){u!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ve(u,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ve(u,h)},{i:g-2,x:ve(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(u,f){var h=[],l=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,h,l),a(u.rotate,f.rotate,h,l),s(u.skewX,f.skewX,h,l),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,h,l),u=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var u3=O0(a3,"px, ","px)","deg)"),c3=O0(s3,", ",")",")"),lr=0,ui=0,ci=0,G0=1e3,Wo,li,qo=0,$n=0,Ho=0,fi=typeof performance=="object"&&performance.now?performance:Date,B0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Xu(){return $n||(B0(l3),$n=fi.now()+Ho)}function l3(){$n=0}function Xo(){this._call=this._time=this._next=null}Xo.prototype=U0.prototype={constructor:Xo,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Xu():+n)+(e==null?0:+e),!this._next&&li!==this&&(li?li._next=this:Wo=this,li=this),this._call=t,this._time=n,Vu()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vu())}};function U0(t,e,n){var r=new Xo;return r.restart(t,e,n),r}function f3(){Xu(),++lr;for(var t=Wo,e;t;)(e=$n-t._time)>=0&&t._call.call(void 0,e),t=t._next;--lr}function Y0(){$n=(qo=fi.now())+Ho,lr=ui=0;try{f3()}finally{lr=0,p3(),$n=0}}function h3(){var t=fi.now(),e=t-qo;e>G0&&(Ho-=e,qo=t)}function p3(){for(var t,e=Wo,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:Wo=n);li=t,Vu(r)}function Vu(t){if(!lr){ui&&(ui=clearTimeout(ui));var e=t-$n;e>24?(t<1/0&&(ui=setTimeout(Y0,t-fi.now()-Ho)),ci&&(ci=clearInterval(ci))):(ci||(qo=fi.now(),ci=setInterval(h3,G0)),lr=1,B0(Y0))}}function W0(t,e,n){var r=new Xo;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var d3=l0("start","end","cancel","interrupt"),g3=[],q0=0,H0=1,ju=2,Vo=3,X0=4,Zu=5,jo=6;function Zo(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;m3(t,n,{name:e,index:r,group:i,on:d3,tween:g3,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:q0})}function Ku(t,e){var n=xe(t,e);if(n.state>q0)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=xe(t,e);if(n.state>Vo)throw new Error("too late; already running");return n}function xe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function m3(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=U0(o,0,n.time);function o(u){n.state=H0,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var f,h,l,p;if(n.state!==H0)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===Vo)return W0(a);p.state===X0?(p.state=jo,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=jo,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(W0(function(){n.state===Vo&&(n.state=X0,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=ju,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ju){for(n.state=Vo,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Zu,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===Zu&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=jo,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function y3(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>ju&&r.state<Zu,r.state=jo,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function b3(t){return this.each(function(){y3(this,t)})}function v3(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 x3(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},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}o.tween=i}}function _3(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=xe(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?v3:x3)(n,t,e))}function Qu(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 xe(i,r).value[e]}}function V0(t,e){var n;return(typeof e=="number"?ve:e instanceof wn?Uo:(n=wn(e))?(e=n,Uo):C0)(t,e)}function w3(t){return function(){this.removeAttribute(t)}}function A3(t){return function(){this.removeAttributeNS(t.space,t.local)}}function M3(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 $3(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 S3(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function T3(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function D3(t,e){var n=Io(t),r=n==="transform"?c3:V0;return this.attrTween(t,typeof e=="function"?(n.local?T3:S3)(n,r,Qu(this,"attr."+t,e)):e==null?(n.local?A3:w3)(n):(n.local?$3:M3)(n,r,e))}function P3(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function k3(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function E3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&k3(t,o)),n}return i._value=e,i}function L3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&P3(t,o)),n}return i._value=e,i}function N3(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=Io(t);return this.tween(n,(r.local?E3:L3)(r,e))}function R3(t,e){return function(){Ku(this,t).delay=+e.apply(this,arguments)}}function C3(t,e){return e=+e,function(){Ku(this,t).delay=e}}function I3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?R3:C3)(e,t)):xe(this.node(),e).delay}function F3(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function z3(t,e){return e=+e,function(){ke(this,t).duration=e}}function O3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?F3:z3)(e,t)):xe(this.node(),e).duration}function G3(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function B3(t){var e=this._id;return arguments.length?this.each(G3(e,t)):xe(this.node(),e).ease}function U3(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function Y3(t){if(typeof t!="function")throw new Error;return this.each(U3(this._id,t))}function W3(t){typeof t!="function"&&(t=g0(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]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new Ye(r,this._parents,this._name,this._id)}function q3(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 c=e[s],u=n[s],f=c.length,h=a[s]=new Array(f),l,p=0;p<f;++p)(l=c[p]||u[p])&&(h[p]=l);for(;s<r;++s)a[s]=e[s];return new Ye(a,this._parents,this._name,this._id)}function H3(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 X3(t,e,n){var r,i,o=H3(e)?Ku:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function V3(t,e){var n=this._id;return arguments.length<2?xe(this.node(),n).on.on(t):this.each(X3(n,t,e))}function j3(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Z3(){return this.on("end.remove",j3(this._id))}function K3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=zu(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],c=s.length,u=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=s[l])&&(h=t.call(f,f.__data__,l,s))&&("__data__"in f&&(h.__data__=f.__data__),u[l]=h,Zo(u[l],e,n,l,u,xe(f,n)));return new Ye(o,this._parents,e,n)}function Q3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=d0(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var c=r[s],u=c.length,f,h=0;h<u;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=xe(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&Zo(p,e,n,g,l,d);o.push(l),a.push(f)}return new Ye(o,a,e,n)}var J3=ii.prototype.constructor;function t5(){return new J3(this._groups,this._parents)}function e5(t,e){var n,r,i;return function(){var o=ur(this,t),a=(this.style.removeProperty(t),ur(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function j0(t){return function(){this.style.removeProperty(t)}}function n5(t,e,n){var r,i=n+"",o;return function(){var a=ur(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function r5(t,e,n){var r,i,o;return function(){var a=ur(this,t),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(t),ur(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s))}}function i5(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var c=ke(this,t),u=c.on,f=c.value[o]==null?s||(s=j0(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(a,i=f),c.on=r}}function o5(t,e,n){var r=(t+="")=="transform"?u3:V0;return e==null?this.styleTween(t,e5(t,r)).on("end.style."+t,j0(t)):typeof e=="function"?this.styleTween(t,r5(t,r,Qu(this,"style."+t,e))).each(i5(this._id,t)):this.styleTween(t,n5(t,r,e),n).on("end.style."+t,null)}function a5(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function s5(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&a5(t,a,n)),r}return o._value=e,o}function u5(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,s5(t,e,n??""))}function c5(t){return function(){this.textContent=t}}function l5(t){return function(){var e=t(this);this.textContent=e??""}}function f5(t){return this.tween("text",typeof t=="function"?l5(Qu(this,"text",t)):c5(t==null?"":t+""))}function h5(t){return function(e){this.textContent=t.call(this,e)}}function p5(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&h5(i)),e}return r._value=t,r}function d5(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,p5(t))}function g5(){for(var t=this._name,e=this._id,n=Z0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var f=xe(c,e);Zo(c,t,n,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ye(r,this._parents,t,n)}function m5(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var u=ke(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),u.on=e}),i===0&&o()})}var y5=0;function Ye(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Z0(){return++y5}var We=ii.prototype;Ye.prototype={constructor:Ye,select:K3,selectAll:Q3,selectChild:We.selectChild,selectChildren:We.selectChildren,filter:W3,merge:q3,selection:t5,transition:g5,call:We.call,nodes:We.nodes,node:We.node,size:We.size,empty:We.empty,each:We.each,on:V3,attr:D3,attrTween:N3,style:o5,styleTween:u5,text:f5,textTween:d5,remove:Z3,tween:_3,delay:I3,duration:O3,ease:B3,easeVarying:Y3,end:m5,[Symbol.iterator]:We[Symbol.iterator]};function b5(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var v5={time:null,delay:0,duration:250,ease:b5};function x5(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 _5(t){var e,n;t instanceof Ye?(e=t._id,t=t._name):(e=Z0(),(n=v5).time=Xu(),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,c,u=0;u<s;++u)(c=a[u])&&Zo(c,t,e,u,a,n||x5(c,e));return new Ye(r,this._parents,t,e)}ii.prototype.interrupt=b3,ii.prototype.transition=_5;function w5(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ko(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 fr(t){return t=Ko(Math.abs(t)),t?t[1]:NaN}function A5(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function M5(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var $5=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qo(t){if(!(e=$5.exec(t)))throw new Error("invalid format: "+t);var e;return new Ju({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]})}Qo.prototype=Ju.prototype;function Ju(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+""}Ju.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 S5(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 K0;function T5(t,e){var n=Ko(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(K0=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")+Ko(t,Math.max(0,e+o-1))[0]}function Q0(t,e){var n=Ko(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 J0={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:w5,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)=>Q0(t*100,e),r:Q0,s:T5,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function tp(t){return t}var ep=Array.prototype.map,np=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function D5(t){var e=t.grouping===void 0||t.thousands===void 0?tp:A5(ep.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?tp:M5(ep.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(h){h=Qo(h);var l=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,M=h.type;M==="n"?(x=!0,M="g"):J0[M]||(v===void 0&&(v=12),b=!0,M="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():"",$=g==="$"?r:/[%p]/.test(M)?a:"",D=J0[M],E=/[defgprs%]/.test(M);v=v===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function P(T){var C=_,N=$,A,S,w;if(M==="c")N=D(T)+N,T="";else{T=+T;var k=T<0||1/T<0;if(T=isNaN(T)?c:D(Math.abs(T),v),b&&(T=S5(T)),k&&+T==0&&d!=="+"&&(k=!1),C=(k?d==="("?d:s:d==="-"||d==="("?"":d)+C,N=(M==="s"?np[8+K0/3]:"")+N+(k&&d==="("?")":""),E){for(A=-1,S=T.length;++A<S;)if(w=T.charCodeAt(A),48>w||w>57){N=(w===46?i+T.slice(A+1):T.slice(A))+N,T=T.slice(0,A);break}}}x&&!m&&(T=e(T,1/0));var L=C.length+T.length+N.length,R=L<y?new Array(y-L+1).join(l):"";switch(x&&m&&(T=e(R+T,R.length?y-N.length:1/0),R=""),p){case"<":T=C+T+N+R;break;case"=":T=C+R+T+N;break;case"^":T=R.slice(0,L=R.length>>1)+C+T+N+R.slice(L);break;default:T=R+C+T+N;break}return o(T)}return P.toString=function(){return h+""},P}function f(h,l){var p=u((h=Qo(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(fr(l)/3)))*3,g=Math.pow(10,-d),m=np[8+d/3];return function(y){return p(g*y)+m}}return{format:u,formatPrefix:f}}var Jo,rp,ip;P5({thousands:",",grouping:[3],currency:["$",""]});function P5(t){return Jo=D5(t),rp=Jo.format,ip=Jo.formatPrefix,Jo}function k5(t){return Math.max(0,-fr(Math.abs(t)))}function E5(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fr(e)/3)))*3-fr(Math.abs(t)))}function L5(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,fr(e)-fr(t))+1}function ta(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const op=Symbol("implicit");function ap(){var t=new u0,e=[],n=[],r=op;function i(o){let a=t.get(o);if(a===void 0){if(r!==op)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 u0;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 ap(e,n).unknown(r)},ta.apply(i,arguments),i}function sp(){var t=ap().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,c=0,u=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+u*2),s&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),s&&(d=Math.round(d),a=Math.round(a));var m=t_(l).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(s=!!l,h()):s},t.padding=function(l){return arguments.length?(c=Math.min(1,u=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(u=+l,h()):u},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return sp(e(),[r,i]).round(s).paddingInner(c).paddingOuter(u).align(f)},ta.apply(h(),arguments)}function up(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return up(e())},t}function N5(){return up(sp.apply(null,arguments).paddingInner(1))}function R5(t){return function(){return t}}function C5(t){return+t}var cp=[0,1];function hr(t){return t}function tc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:R5(isNaN(e)?NaN:.5)}function I5(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function F5(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=tc(i,r),o=n(a,o)):(r=tc(r,i),o=n(o,a)),function(s){return o(r(s))}}function z5(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]=tc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var c=s0(t,s,1,r)-1;return o[c](i[c](s))}}function O5(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function G5(){var t=cp,e=cp,n=Hu,r,i,o,a=hr,s,c,u;function f(){var l=Math.min(t.length,e.length);return a!==hr&&(a=I5(t[0],t[l-1])),s=l>2?z5:F5,c=u=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=s(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((u||(u=s(e,t.map(r),ve)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,C5),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=o3,f()},h.clamp=function(l){return arguments.length?(a=l?!0:hr,f()):a!==hr},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function B5(){return G5()(hr,hr)}function U5(t,e,n,r){var i=Jx(t,e,n),o;switch(r=Qo(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=E5(i,a))&&(r.precision=o),ip(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=L5(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=k5(i))&&(r.precision=o-(r.type==="%")*2);break}}return rp(r)}function lp(t){var e=t.domain;return t.ticks=function(n){var r=e();return Qx(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return U5(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],c,u,f=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);f-- >0;){if(u=Iu(a,s,n),u===c)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;c=u}return t},t}function fp(){var t=B5();return t.copy=function(){return O5(t,fp())},ta.apply(t,arguments),lp(t)}function hp(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[s0(r,c,0,n)]:o}function s(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,s()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,s()):i.slice()},a.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return hp().domain([t,e]).range(i).unknown(o)},ta.apply(lp(a),arguments)}function hi(t,e,n){this.k=t,this.x=e,this.y=n}hi.prototype={constructor:hi,scale:function(t){return t===1?this:new hi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new hi(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+")"}},hi.prototype;function ea(t){return Object.prototype.toString.call(t)==="[object Object]"}function ec(t,e){if(ea(t)===!1||ea(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;ea(r[a])&&ea(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var nc=function(t,e){return nc=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])},nc(t,e)};function qe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");nc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function Y5(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(f){try{u(r.next(f))}catch(h){a(h)}}function c(f){try{u(r.throw(f))}catch(h){a(h)}}function u(f){f.done?o(f.value):i(f.value).then(s,c)}u((r=r.apply(t,[])).next())})}function pp(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function pr(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 pi(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 di(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 dr(t){return this instanceof dr?(this.v=t,this):new dr(t)}function W5(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},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||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{u(r[p](d))}catch(g){l(o[0][3],g)}}function u(p){p.value instanceof dr?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function q5(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 pr=="function"?pr(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,c){a=t[o](a),i(s,c,a.done,a.value)})}}function i(o,a,s,c){Promise.resolve(c).then(function(u){o({value:u,done:s})},a)}}function Pt(t){return typeof t=="function"}function rc(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 ic=rc(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 na(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var gi=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=pr(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(Dt(f))try{f()}catch(g){o=g instanceof ic?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=pr(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{yp(d)}catch(g){o=o??[],g instanceof ic?o=di(di([],pi(o)),pi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new ic(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)yp(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)&&na(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&na(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),gp=gi.EMPTY;function mp(t){return t instanceof gi||t&&"closed"in t&&Dt(t.remove)&&Dt(t.add)&&Dt(t.unsubscribe)}function yp(t){Dt(t)?t():t.unsubscribe()}var bp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},H5={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,di([t,e],pi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function vp(t){H5.setTimeout(function(){throw t})}function oc(){}function ra(t){t()}var ac=function(t){He(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,mp(n)&&n.add(r)):r.destination=j5,r}return e.create=function(n,r,i){return new mi(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}(gi),q5=Function.prototype.bind;function sc(t,e){return q5.call(t,e)}var X5=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){ia(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){ia(r)}else ia(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){ia(n)}},t}(),mi=function(t){He(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Dt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&bp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&sc(n.next,s),error:n.error&&sc(n.error,s),complete:n.complete&&sc(n.complete,s)}):a=n}return o.destination=new X5(a),o}return e}(ac);function ia(t){vp(t)}function V5(t){throw t}var j5={closed:!0,next:oc,error:V5,complete:oc},uc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function xp(t){return t}function Z5(t){return t.length===0?xp:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var _e=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=Q5(e)?e:new mi(e,n,r);return ra(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?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=_p(n),new n(function(i,o){var a=new mi({next:function(s){try{e(s)}catch(c){o(c),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[uc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Z5(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=_p(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 _p(t){var e;return(e=t??bp.Promise)!==null&&e!==void 0?e:Promise}function K5(t){return t&&Dt(t.next)&&Dt(t.error)&&Dt(t.complete)}function Q5(t){return t&&t instanceof ac||K5(t)&&mp(t)}function J5(t){return Dt(t==null?void 0:t.lift)}function Sn(t){return function(e){if(J5(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 yi(t,e,n,r,i){return new t6(t,e,n,r,i)}var t6=function(t){He(e,t);function e(n,r,i,o,a,s){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=r?function(u){try{r(u)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(u){try{o(u)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}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}(ac),e6=rc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),bi=function(t){He(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 wp(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new e6},e.prototype.next=function(n){var r=this;ra(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=pr(r.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(n)}}catch(u){i={error:u}}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;ra(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;ra(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?gp:(this.currentObservers=null,s.push(n),new gi(function(){r.currentObservers=null,na(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 _e;return n.source=this,n},e.create=function(n,r){return new wp(n,r)},e}(_e),wp=function(t){He(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:gp},e}(bi),cc={now:function(){return(cc.delegate||Date).now()},delegate:void 0},n6=function(t){He(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=cc);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,c=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+c)),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(),c=0;c<s.length&&!n.closed;c+=o?1:2)n.next(s[c]);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 c=i.now(),u=0,f=1;f<o.length&&o[f]<=c;f+=2)u=f;u&&o.splice(0,u+1)}},e}(bi),r6=function(t){He(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(gi),Ap={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,di([t,e],pi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},i6=function(t){He(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),Ap.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&&Ap.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,na(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(r6),Mp=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=cc.now,t}(),o6=function(t){He(e,t);function e(n,r){r===void 0&&(r=Mp.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}(Mp);new o6(i6);function a6(t){return t&&Dt(t.schedule)}function s6(t){return t[t.length-1]}function $p(t){return a6(s6(t))?t.pop():void 0}var Sp=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Tp(t){return Dt(t==null?void 0:t.then)}function Pp(t){return Dt(t[uc])}function Dp(t){return Symbol.asyncIterator&&Dt(t==null?void 0:t[Symbol.asyncIterator])}function kp(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 u6(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ep=u6();function Lp(t){return Dt(t==null?void 0:t[Ep])}function Np(t){return Y5(this,arguments,function(){var e,n,r,i;return dp(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,dr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,dr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,dr(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 Rp(t){return Dt(t==null?void 0:t.getReader)}function sn(t){if(t instanceof _e)return t;if(t!=null){if(Pp(t))return c6(t);if(Sp(t))return l6(t);if(Tp(t))return f6(t);if(Dp(t))return Cp(t);if(Lp(t))return h6(t);if(Rp(t))return p6(t)}throw kp(t)}function c6(t){return new _e(function(e){var n=t[uc]();if(Dt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function l6(t){return new _e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function f6(t){return new _e(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,vp)})}function h6(t){return new _e(function(e){var n,r;try{for(var i=pr(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 Cp(t){return new _e(function(e){d6(t,e).catch(function(n){return e.error(n)})})}function p6(t){return Cp(Np(t))}function d6(t,e){var n,r,i,o;return U5(this,void 0,void 0,function(){var a,s;return dp(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=W5(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.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 Tn(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 Ip(t,e){return e===void 0&&(e=0),Sn(function(n,r){n.subscribe(yi(r,function(i){return Tn(r,t,function(){return r.next(i)},e)},function(){return Tn(r,t,function(){return r.complete()},e)},function(i){return Tn(r,t,function(){return r.error(i)},e)}))})}function Fp(t,e){return e===void 0&&(e=0),Sn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function g6(t,e){return sn(t).pipe(Fp(e),Ip(e))}function m6(t,e){return sn(t).pipe(Fp(e),Ip(e))}function y6(t,e){return new _e(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function b6(t,e){return new _e(function(n){var r;return Tn(n,e,function(){r=t[Ep](),Tn(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 Dt(r==null?void 0:r.return)&&r.return()}})}function zp(t,e){if(!t)throw new Error("Iterable cannot be null");return new _e(function(n){Tn(n,e,function(){var r=t[Symbol.asyncIterator]();Tn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function v6(t,e){return zp(Np(t),e)}function x6(t,e){if(t!=null){if(Pp(t))return g6(t,e);if(Sp(t))return y6(t,e);if(Tp(t))return m6(t,e);if(Dp(t))return zp(t,e);if(Lp(t))return b6(t,e);if(Rp(t))return v6(t,e)}throw kp(t)}function _6(t,e){return e?x6(t,e):sn(t)}rc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Op(t,e){return Sn(function(n,r){var i=0;n.subscribe(yi(r,function(o){r.next(t.call(e,o,i++))}))})}function w6(t,e,n,r,i,o,a,s){var c=[],u=0,f=0,h=!1,l=function(){h&&!c.length&&!u&&e.complete()},p=function(g){return u<r?d(g):c.push(g)},d=function(g){u++;var m=!1;sn(n(g,f++)).subscribe(yi(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{u--;for(var y=function(){var x=c.shift();a||d(x)};c.length&&u<r;)y();l()}catch(x){e.error(x)}}))};return t.subscribe(yi(e,p,function(){h=!0,l()})),function(){}}function Gp(t,e,n){return n===void 0&&(n=1/0),Dt(e)?Gp(function(r,i){return Op(function(o,a){return e(r,o,i,a)})(sn(t(r,i)))},n):(typeof e=="number"&&(n=e),Sn(function(r,i){return w6(r,i,t,n)}))}function A6(t){return Gp(xp,t)}function M6(){return A6(1)}function Bp(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return M6()(_6(t,$p(t)))}function $6(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new bi}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,c=s===void 0?!0:s;return function(u){var f,h,l,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),f=l=void 0,d=g=!1},x=function(){var v=f;y(),v==null||v.unsubscribe()};return Sn(function(v,b){p++,!g&&!d&&m();var M=l=l??n();b.add(function(){p--,p===0&&!g&&!d&&(h=lc(x,c))}),M.subscribe(b),!f&&p>0&&(f=new mi({next:function(_){return M.next(_)},error:function(_){g=!0,m(),h=lc(y,i,_),M.error(_)},complete:function(){d=!0,m(),h=lc(y,a),M.complete()}}),sn(v).subscribe(f))})(u)}}function lc(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 mi({next:function(){i.unsubscribe(),t()}});return sn(e.apply(void 0,di([],pi(n)))).subscribe(i)}}function S6(t,e,n){var r,i=!1;return r=t,$6({connector:function(){return new n6(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function T6(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=$p(t);return Sn(function(r,i){(n?Bp(t,r,n):Bp(t,r)).subscribe(i)})}function P6(t){return Sn(function(e,n){sn(t).subscribe(yi(n,function(){return n.complete()},oc)),!n.closed&&e.subscribe(n)})}const fc=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=sr.scaleDomain,scaleRange:i=sr.scaleRange})=>{const o=r[0]??sr.scaleDomain[0],a=r[1]??sr.scaleDomain[1],s=i[0]??sr.scaleRange[0],c=i[1]??sr.scaleRange[1],u=o==="auto"?e:o,f=a==="auto"?t:a;let h=n*s,l=n*c;return fp().domain([u,f]).range([h,l])},Up=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return L5().domain(t).range(r).padding(n)},D6=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),hp().domain([-0,e+0]).range(i)};function k6({name:t,defaultParams:e,initFn:n}){const r=new bi,i=new bi,o=new WeakMap;let a=()=>{},s,c=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:u=>{c=pp(u,e)},setContext:u=>{s=u,s.observer.fullParams$=i.pipe(P6(r),T6({}),Op(f=>pp(f,c)),S6(1))}}}const oa=()=>function(t,e){return function(n){return class{constructor(){const r=k6({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}}}},vi=oa(),we=oa(),Yp=oa(),Wp=oa();function xt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Hp(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function aa(t){let e,n,r;t.length!==2?(e=xt,n=(s,c)=>xt(t(s),c),r=(s,c)=>t(s)-c):(e=t===xt||t===Hp?t:E6,n=t,r=t);function i(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<0?u=h+1:f=h}while(u<f)}return u}function o(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<=0?u=h+1:f=h}while(u<f)}return u}function a(s,c,u=0,f=s.length){const h=i(s,c,u,f-1);return h>u&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:i,center:a,right:o}}function E6(){return 0}function sa(t){return t===null?NaN:+t}function*L6(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 qp=aa(xt),Xp=qp.right,N6=qp.left,R6=aa(sa).center,Pn=Xp;function C6(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=hc(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 Vp=jp(hc),I6=jp(F6);function jp(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),c=r&&t(r),u=i.slice();return s&&c?(gr(s,u,i,o,a),gr(s,i,u,o,a),gr(s,u,i,o,a),mr(c,i,u,o,a),mr(c,u,i,o,a),mr(c,i,u,o,a)):s?(gr(s,i,u,o,a),gr(s,u,i,o,a),gr(s,i,u,o,a)):c&&(mr(c,i,u,o,a),mr(c,u,i,o,a),mr(c,i,u,o,a)),e}}function gr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function mr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function F6(t){const e=hc(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 hc(t){const e=Math.floor(t);if(e===t)return z6(t);const n=t-e,r=2*t+1;return(i,o,a,s,c)=>{if(!((s-=c)>=a))return;let u=e*o[a];const f=c*e,h=f+c;for(let l=a,p=a+f;l<p;l+=c)u+=o[Math.min(s,l)];for(let l=a,p=s;l<=p;l+=c)u+=o[Math.min(s,l+f)],i[l]=(u+n*(o[Math.max(a,l-h)]+o[Math.min(s,l+h)]))/r,u-=o[Math.max(a,l-f)]}}function z6(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const c=a*t;for(let u=i,f=i+c;u<f;u+=a)s+=r[Math.min(o,u)];for(let u=i,f=o;u<=f;u+=a)s+=r[Math.min(o,u+c)],n[u]=s/e,s-=r[Math.max(i,u-c)]}}function ua(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 O6(t){return t.length|0}function G6(t){return!(t>0)}function B6(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function U6(t){return e=>t(...e)}function Y6(...t){const e=typeof t[t.length-1]=="function"&&U6(t.pop());t=t.map(B6);const n=t.map(O6),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(G6))return o;for(;;){o.push(i.map((s,c)=>t[c][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function W6(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 Zp(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 Kp(t,e){const n=Zp(t,e);return n&&Math.sqrt(n)}function xi(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 kt{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 H6(t,e){const n=new kt;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 q6(t,e){const n=new kt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class _i extends Map{constructor(e,n=td){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(pc(this,e))}has(e){return super.has(pc(this,e))}set(e,n){return super.set(Qp(this,e),n)}delete(e){return super.delete(Jp(this,e))}}class Dn extends Set{constructor(e,n=td){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(pc(this,e))}add(e){return super.add(Qp(this,e))}delete(e){return super.delete(Jp(this,e))}}function pc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Qp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Jp({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function td(t){return t!==null&&typeof t=="object"?t.valueOf():t}function yr(t){return t}function ed(t,...e){return br(t,yr,yr,e)}function nd(t,...e){return br(t,Array.from,yr,e)}function rd(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 X6(t,...e){return rd(nd(t,...e),e)}function V6(t,e,...n){return rd(od(t,e,...n),n)}function id(t,e,...n){return br(t,yr,e,n)}function od(t,e,...n){return br(t,Array.from,e,n)}function j6(t,...e){return br(t,yr,ad,e)}function Z6(t,...e){return br(t,Array.from,ad,e)}function ad(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function br(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new _i,c=r[a++];let u=-1;for(const f of o){const h=c(f,++u,o),l=s.get(h);l?l.push(f):s.set(h,[f])}for(const[f,h]of s)s.set(f,i(h,a));return e(s)}(t,0)}function sd(t,e){return Array.from(e,n=>t[n])}function dc(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=vr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>vr(n[i],n[o]))),sd(t,r)}return t.sort(gc(n))}function gc(t=xt){if(t===xt)return vr;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 vr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function K6(t,e,n){return(e.length!==2?dc(id(t,e,n),([r,i],[o,a])=>xt(i,a)||xt(r,o)):dc(ed(t,n),([r,i],[o,a])=>e(i,a)||xt(r,o))).map(([r])=>r)}var Q6=Array.prototype,J6=Q6.slice;function mc(t){return()=>t}const t8=Math.sqrt(50),e8=Math.sqrt(10),n8=Math.sqrt(2);function ca(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>=t8?10:o>=e8?5:o>=n8?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),c=Math.round(e*u),s/u<t&&++s,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),c=Math.round(e/u),s*u<t&&++s,c*u>e&&--c),c<s&&.5<=n&&n<2?ca(t,e,n*2):[s,c,u]}function kn(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?ca(e,t,n):ca(t,e,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)c[u]=(o-u)/-a;else for(let u=0;u<s;++u)c[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)c[u]=(i+u)/-a;else for(let u=0;u<s;++u)c[u]=(i+u)*a;return c}function En(t,e,n){return e=+e,t=+t,n=+n,ca(t,e,n)[2]}function la(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?En(e,t,n):En(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function yc(t,e,n){let r;for(;;){const i=En(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function bc(t){return Math.max(1,Math.ceil(Math.log(ua(t))/Math.LN2)+1)}function ud(){var t=yr,e=xi,n=bc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,c,u=new Array(a);for(o=0;o<a;++o)u[o]=t(i[o],o,i);var f=e(u),h=f[0],l=f[1],p=n(u,h,l);if(!Array.isArray(p)){const v=l,b=+p;if(e===xi&&([h,l]=yc(h,l,b)),p=kn(h,l,b),p[0]<=h&&(c=En(h,l,b)),p[p.length-1]>=l)if(v>=l&&e===xi){const M=En(h,l,b);isFinite(M)&&(M>0?l=(Math.floor(l/M)+1)*M:M<0&&(l=(Math.ceil(l*-M)+1)/-M))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>l;)--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]:l;if(isFinite(c)){if(c>0)for(o=0;o<a;++o)(s=u[o])!=null&&h<=s&&s<=l&&y[Math.min(d,Math.floor((s-h)/c))].push(i[o]);else if(c<0){for(o=0;o<a;++o)if((s=u[o])!=null&&h<=s&&s<=l){const v=Math.floor((h-s)*c);y[Math.min(d,v+(p[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=u[o])!=null&&h<=s&&s<=l&&y[Pn(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:mc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:mc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:mc(Array.isArray(i)?J6.call(i):i),r):n},r}function wi(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 vc(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 fa(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 xc(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 ha(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?vr:gc(i);r>n;){if(r-n>600){const c=r-n+1,u=e-n+1,f=Math.log(c),h=.5*Math.exp(2*f/3),l=.5*Math.sqrt(f*h*(c-h)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(e-u*h/c+l)),d=Math.min(r,Math.floor(e+(c-u)*h/c+l));ha(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(Ai(t,n,e),i(t[r],o)>0&&Ai(t,n,r);a<s;){for(Ai(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ai(t,n,s):(++s,Ai(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ai(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function cd(t,e=xt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?xt(a,i)>0:xt(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 Mi(t,e,n){if(t=Float64Array.from(L6(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return fa(t);if(e>=1)return wi(t);var r,i=(r-1)*e,o=Math.floor(i),a=wi(ha(t,o).subarray(0,o+1)),s=fa(t.subarray(o+1));return a+(s-a)*(i-o)}}function ld(t,e,n=sa){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 fd(t,e,n=sa){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,c)=>sa(n(t[c],c,t))),e<=0)return xc(r);if(e>=1)return vc(r);var r,i=Uint32Array.from(t,(s,c)=>c),o=r.length-1,a=Math.floor(o*e);return ha(i,a,0,o,(s,c)=>vr(r[s],r[c])),a=cd(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function r8(t,e,n){const r=ua(t),i=Mi(t,.75)-Mi(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function i8(t,e,n){const r=ua(t),i=Kp(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function o8(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 a8(t,e){return Mi(t,.5,e)}function s8(t,e){return fd(t,.5,e)}function*u8(t){for(const e of t)yield*e}function _c(t){return Array.from(u8(t))}function c8(t,e){const n=new _i;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 l8(t,e=f8){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function f8(t,e){return[t,e]}function un(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 h8(t,e=xt){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=xt);const i=(s,c)=>e(n[s],n[c]);let o,a;return t=Uint32Array.from(n,(s,c)=>c),t.sort(e===xt?(s,c)=>vr(n[s],n[c]):gc(i)),t.forEach((s,c)=>{const u=i(s,o===void 0?s:o);u>=0?((o===void 0||u>0)&&(o=s,a=c),r[s]=a):r[s]=NaN}),r}function p8(t,e=xt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?xt(a,i)<0:xt(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 hd(t,e=xt){if(e.length===1)return xc(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 d8(t,e=xt){if(e.length===1)return vc(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 g8(t,e){const n=hd(t,e);return n<0?void 0:n}const m8=pd(Math.random);function pd(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 y8(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 dd(t){if(!(o=t.length))return[];for(var e=-1,n=fa(t,b8),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 b8(t){return t.length}function v8(){return dd(arguments)}function x8(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 _8(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 w8(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 A8(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 M8(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 $8(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function S8(t,...e){t=new Dn(t);for(const n of e)for(const r of n)t.delete(r);return t}function T8(t,e){const n=e[Symbol.iterator](),r=new Dn;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 P8(t,...e){t=new Dn(t),e=e.map(D8);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function D8(t){return t instanceof Dn?t:new Dn(t)}function gd(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=md(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const c=md(a);if(r.add(c),Object.is(o,c))break}}return!0}function md(t){return t!==null&&typeof t=="object"?t.valueOf():t}function k8(t,e){return gd(e,t)}function E8(...t){const e=new Dn;for(const n of t)for(const r of n)e.add(r);return e}function L8(t){return t}var pa=1,da=2,wc=3,$i=4,yd=1e-6;function N8(t){return"translate("+t+",0)"}function R8(t){return"translate(0,"+t+")"}function C8(t){return e=>+t(e)}function I8(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function F8(){return!this.__axis}function ga(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===pa||t===$i?-1:1,f=t===$i||t===da?"x":"y",h=t===pa||t===wc?N8:R8;function l(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):L8),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+c,v=+y[y.length-1]+c,b=(e.bandwidth?I8:C8)(e.copy(),c),M=p.selection?p.selection():p,_=M.selectAll(".domain").data([null]),T=M.selectAll(".tick").data(d,e).order(),P=T.exit(),E=T.enter().append("g").attr("class","tick"),k=T.select("line"),S=T.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(E),k=k.merge(E.append("line").attr("stroke","currentColor").attr(f+"2",u*o)),S=S.merge(E.append("text").attr("fill","currentColor").attr(f,u*m).attr("dy",t===pa?"0em":t===wc?"0.71em":"0.32em")),p!==M&&(_=_.transition(p),T=T.transition(p),k=k.transition(p),S=S.transition(p),P=P.transition(p).attr("opacity",yd).attr("transform",function(C){return isFinite(C=b(C))?h(C+c):this.getAttribute("transform")}),E.attr("opacity",yd).attr("transform",function(C){var N=this.parentNode.__axis;return h((N&&isFinite(N=N(C))?N:b(C))+c)})),P.remove(),_.attr("d",t===$i||t===da?a?"M"+u*a+","+x+"H"+c+"V"+v+"H"+u*a:"M"+c+","+x+"V"+v:a?"M"+x+","+u*a+"V"+c+"H"+v+"V"+u*a:"M"+x+","+c+"H"+v),T.attr("opacity",1).attr("transform",function(C){return h(b(C)+c)}),k.attr(f+"2",u*o),S.attr(f,u*m).text(g),M.filter(F8).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===da?"start":t===$i?"end":"middle"),M.each(function(){this.__axis=b})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(i=p,l):i},l.tickSize=function(p){return arguments.length?(o=a=+p,l):o},l.tickSizeInner=function(p){return arguments.length?(o=+p,l):o},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(s=+p,l):s},l.offset=function(p){return arguments.length?(c=+p,l):c},l}function bd(t){return ga(pa,t)}function z8(t){return ga(da,t)}function O8(t){return ga(wc,t)}function Ac(t){return ga($i,t)}var G8={value:()=>{}};function Ln(){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 B8(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=Ln.prototype={constructor:ma,on:function(t,e){var n=this._,r=B8(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=U8(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]=vd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=vd(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 U8(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function vd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=G8,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Mc="http://www.w3.org/1999/xhtml";const $c={svg:"http://www.w3.org/2000/svg",xhtml:Mc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Si(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),$c.hasOwnProperty(e)?{space:$c[e],local:t}:t}function Y8(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Mc&&e.documentElement.namespaceURI===Mc?e.createElement(t):e.createElementNS(n,t)}}function W8(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ya(t){var e=Si(t);return(e.local?W8:Y8)(e)}function H8(){}function ba(t){return t==null?H8:function(){return this.querySelector(t)}}function q8(t){typeof t!="function"&&(t=ba(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),c,u,f=0;f<a;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),s[f]=u);return new Ut(r,this._parents)}function xd(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function X8(){return[]}function Sc(t){return t==null?X8:function(){return this.querySelectorAll(t)}}function V8(t){return function(){return xd(t.apply(this,arguments))}}function j8(t){typeof t=="function"?t=V8(t):t=Sc(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(r.push(t.call(c,c.__data__,u,a)),i.push(c));return new Ut(r,i)}function Tc(t){return function(){return this.matches(t)}}function _d(t){return function(e){return e.matches(t)}}var Z8=Array.prototype.find;function K8(t){return function(){return Z8.call(this.children,t)}}function Q8(){return this.firstElementChild}function J8(t){return this.select(t==null?Q8:K8(typeof t=="function"?t:_d(t)))}var t4=Array.prototype.filter;function e4(){return Array.from(this.children)}function n4(t){return function(){return t4.call(this.children,t)}}function r4(t){return this.selectAll(t==null?e4:n4(typeof t=="function"?t:_d(t)))}function i4(t){typeof t!="function"&&(t=Tc(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]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new Ut(r,this._parents)}function wd(t){return new Array(t.length)}function o4(){return new Ut(this._enter||this._groups.map(wd),this._parents)}function va(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}va.prototype={constructor:va,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 a4(t){return function(){return t}}function s4(t,e,n,r,i,o){for(var a=0,s,c=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new va(t,o[a]);for(;a<c;++a)(s=e[a])&&(i[a]=s)}function u4(t,e,n,r,i,o,a){var s,c,u=new Map,f=e.length,h=o.length,l=new Array(f),p;for(s=0;s<f;++s)(c=e[s])&&(l[s]=p=a.call(c,c.__data__,s,e)+"",u.has(p)?i[s]=c:u.set(p,c));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(c=u.get(p))?(r[s]=c,c.__data__=o[s],u.delete(p)):n[s]=new va(t,o[s]);for(s=0;s<f;++s)(c=e[s])&&u.get(l[s])===c&&(i[s]=c)}function c4(t){return t.__data__}function l4(t,e){if(!arguments.length)return Array.from(this,c4);var n=e?u4:s4,r=this._parents,i=this._groups;typeof t!="function"&&(t=a4(t));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],h=i[u],l=h.length,p=f4(t.call(f,f&&f.__data__,u,r)),d=p.length,g=s[u]=new Array(d),m=a[u]=new Array(d),y=c[u]=new Array(l);n(f,h,g,m,y,p,e);for(var x=0,v=0,b,M;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!(M=m[v])&&++v<d;);b._next=M||null}}return a=new Ut(a,r),a._enter=s,a._exit=c,a}function f4(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function h4(){return new Ut(this._exit||this._groups.map(wd),this._parents)}function p4(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 d4(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),c=0;c<a;++c)for(var u=n[c],f=r[c],h=u.length,l=s[c]=new Array(h),p,d=0;d<h;++d)(p=u[d]||f[d])&&(l[d]=p);for(;c<i;++c)s[c]=n[c];return new Ut(s,this._parents)}function g4(){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 m4(t){t||(t=y4);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}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,c=i[o]=new Array(s),u,f=0;f<s;++f)(u=a[f])&&(c[f]=u);c.sort(e)}return new Ut(i,this._parents).order()}function y4(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function b4(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function v4(){return Array.from(this)}function x4(){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 _4(){let t=0;for(const e of this)++t;return t}function w4(){return!this.node()}function A4(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 M4(t){return function(){this.removeAttribute(t)}}function $4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function S4(t,e){return function(){this.setAttribute(t,e)}}function T4(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function P4(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function D4(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 k4(t,e){var n=Si(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?$4:M4:typeof e=="function"?n.local?D4:P4:n.local?T4:S4)(n,e))}function Pc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function E4(t){return function(){this.style.removeProperty(t)}}function L4(t,e,n){return function(){this.style.setProperty(t,e,n)}}function N4(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function R4(t,e,n){return arguments.length>1?this.each((e==null?E4:typeof e=="function"?N4:L4)(t,e,n??"")):Nn(this.node(),t)}function Nn(t,e){return t.style.getPropertyValue(e)||Pc(t).getComputedStyle(t,null).getPropertyValue(e)}function C4(t){return function(){delete this[t]}}function I4(t,e){return function(){this[t]=e}}function F4(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function z4(t,e){return arguments.length>1?this.each((e==null?C4:typeof e=="function"?F4:I4)(t,e)):this.node()[t]}function Ad(t){return t.trim().split(/^|\s+/)}function Dc(t){return t.classList||new Md(t)}function Md(t){this._node=t,this._names=Ad(t.getAttribute("class")||"")}Md.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 $d(t,e){for(var n=Dc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Sd(t,e){for(var n=Dc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function O4(t){return function(){$d(this,t)}}function G4(t){return function(){Sd(this,t)}}function B4(t,e){return function(){(e.apply(this,arguments)?$d:Sd)(this,t)}}function U4(t,e){var n=Ad(t+"");if(arguments.length<2){for(var r=Dc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?B4:e?O4:G4)(n,e))}function Y4(){this.textContent=""}function W4(t){return function(){this.textContent=t}}function H4(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function q4(t){return arguments.length?this.each(t==null?Y4:(typeof t=="function"?H4:W4)(t)):this.node().textContent}function X4(){this.innerHTML=""}function V4(t){return function(){this.innerHTML=t}}function j4(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Z4(t){return arguments.length?this.each(t==null?X4:(typeof t=="function"?j4:V4)(t)):this.node().innerHTML}function K4(){this.nextSibling&&this.parentNode.appendChild(this)}function Q4(){return this.each(K4)}function J4(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function t7(){return this.each(J4)}function e7(t){var e=typeof t=="function"?t:ya(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function n7(){return null}function r7(t,e){var n=typeof t=="function"?t:ya(t),r=e==null?n7:typeof e=="function"?e:ba(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function i7(){var t=this.parentNode;t&&t.removeChild(this)}function o7(){return this.each(i7)}function a7(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function s7(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function u7(t){return this.select(t?s7:a7)}function c7(t){return arguments.length?this.property("__data__",t):this.node().__data__}function l7(t){return function(e){t.call(this,e,this.__data__)}}function f7(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 h7(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 p7(t,e,n){return function(){var r=this.__on,i,o=l7(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 d7(t,e,n){var r=f7(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,f;c<u;++c)for(i=0,f=s[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?p7:h7,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Td(t,e,n){var r=Pc(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 g7(t,e){return function(){return Td(this,t,e)}}function m7(t,e){return function(){return Td(this,t,e.apply(this,arguments))}}function y7(t,e){return this.each((typeof e=="function"?m7:g7)(t,e))}function*b7(){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 kc=[null];function Ut(t,e){this._groups=t,this._parents=e}function Rn(){return new Ut([[document.documentElement]],kc)}function v7(){return this}Ut.prototype=Rn.prototype={constructor:Ut,select:q8,selectAll:j8,selectChild:J8,selectChildren:r4,filter:i4,data:l4,enter:o4,exit:h4,join:p4,merge:d4,selection:v7,order:g4,sort:m4,call:b4,nodes:v4,node:x4,size:_4,empty:w4,each:A4,attr:k4,style:R4,property:z4,classed:U4,text:q4,html:Z4,raise:Q4,lower:t7,append:e7,insert:r7,remove:o7,clone:u7,datum:c7,on:d7,dispatch:y7,[Symbol.iterator]:b7};function K(t){return typeof t=="string"?new Ut([[document.querySelector(t)]],[document.documentElement]):new Ut([[t]],kc)}function x7(t){return K(ya(t).call(document.documentElement))}var _7=0;function Pd(){return new Ec}function Ec(){this._="@"+(++_7).toString(36)}Ec.prototype=Pd.prototype={constructor:Ec,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 Dd(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ae(t,e){if(t=Dd(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 w7(t,e){return t.target&&(t=Dd(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ae(n,e))}function A7(t){return typeof t=="string"?new Ut([document.querySelectorAll(t)],[document.documentElement]):new Ut([xd(t)],kc)}const M7={passive:!1},Ti={capture:!0,passive:!1};function Lc(t){t.stopImmediatePropagation()}function xr(t){t.preventDefault(),t.stopImmediatePropagation()}function xa(t){var e=t.document.documentElement,n=K(t).on("dragstart.drag",xr,Ti);"onselectstart"in e?n.on("selectstart.drag",xr,Ti):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function _a(t,e){var n=t.document.documentElement,r=K(t).on("dragstart.drag",null);e&&(r.on("click.drag",xr,Ti),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 wa=t=>()=>t;function Nc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:c,dy:u,dispatch:f}){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:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Nc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function $7(t){return!t.ctrlKey&&!t.button}function S7(){return this.parentNode}function T7(t,e){return e??{x:t.x,y:t.y}}function P7(){return navigator.maxTouchPoints||"ontouchstart"in this}function kd(){var t=$7,e=S7,n=T7,r=P7,i={},o=Ln("start","drag","end"),a=0,s,c,u,f,h=0;function l(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,M7).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,M){if(!(f||!t.call(this,b,M))){var _=v(this,e.call(this,b,M),b,M,"mouse");_&&(K(b.view).on("mousemove.drag",d,Ti).on("mouseup.drag",g,Ti),xa(b.view),Lc(b),u=!1,s=b.clientX,c=b.clientY,_("start",b))}}function d(b){if(xr(b),!u){var M=b.clientX-s,_=b.clientY-c;u=M*M+_*_>h}i.mouse("drag",b)}function g(b){K(b.view).on("mousemove.drag mouseup.drag",null),_a(b.view,u),xr(b),i.mouse("end",b)}function m(b,M){if(t.call(this,b,M)){var _=b.changedTouches,T=e.call(this,b,M),P=_.length,E,k;for(E=0;E<P;++E)(k=v(this,T,b,M,_[E].identifier,_[E]))&&(Lc(b),k("start",b,_[E]))}}function y(b){var M=b.changedTouches,_=M.length,T,P;for(T=0;T<_;++T)(P=i[M[T].identifier])&&(xr(b),P("drag",b,M[T]))}function x(b){var M=b.changedTouches,_=M.length,T,P;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),T=0;T<_;++T)(P=i[M[T].identifier])&&(Lc(b),P("end",b,M[T]))}function v(b,M,_,T,P,E){var k=o.copy(),S=ae(E||_,M),C,N,A;if((A=n.call(b,new Nc("beforestart",{sourceEvent:_,target:l,identifier:P,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:k}),T))!=null)return C=A.x-S[0]||0,N=A.y-S[1]||0,function $(w,D,L){var R=S,F;switch(w){case"start":i[P]=$,F=a++;break;case"end":delete i[P],--a;case"drag":S=ae(L||D,M),F=a;break}k.call(w,b,new Nc(w,{sourceEvent:D,subject:A,target:l,identifier:P,active:F,x:S[0]+C,y:S[1]+N,dx:S[0]-R[0],dy:S[1]-R[1],dispatch:k}),T)}}return l.filter=function(b){return arguments.length?(t=typeof b=="function"?b:wa(!!b),l):t},l.container=function(b){return arguments.length?(e=typeof b=="function"?b:wa(b),l):e},l.subject=function(b){return arguments.length?(n=typeof b=="function"?b:wa(b),l):n},l.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:wa(!!b),l):r},l.on=function(){var b=o.on.apply(o,arguments);return b===o?l:b},l.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,l):Math.sqrt(h)},l}function _r(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Pi(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function cn(){}var Cn=.7,wr=1/Cn,Ar="\\s*([+-]?\\d+)\\s*",Di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",D7=/^#([0-9a-f]{3,8})$/,k7=new RegExp(`^rgb\\(${Ar},${Ar},${Ar}\\)$`),E7=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),L7=new RegExp(`^rgba\\(${Ar},${Ar},${Ar},${Di}\\)$`),N7=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${Di}\\)$`),R7=new RegExp(`^hsl\\(${Di},${Ee},${Ee}\\)$`),C7=new RegExp(`^hsla\\(${Di},${Ee},${Ee},${Di}\\)$`),Ed={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};_r(cn,ln,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ld,formatHex:Ld,formatHex8:I7,formatHsl:F7,formatRgb:Nd,toString:Nd});function Ld(){return this.rgb().formatHex()}function I7(){return this.rgb().formatHex8()}function F7(){return zd(this).formatHsl()}function Nd(){return this.rgb().formatRgb()}function ln(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=D7.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Rd(e):n===3?new Lt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Aa(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Aa(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=k7.exec(t))?new Lt(e[1],e[2],e[3],1):(e=E7.exec(t))?new Lt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=L7.exec(t))?Aa(e[1],e[2],e[3],e[4]):(e=N7.exec(t))?Aa(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=R7.exec(t))?Fd(e[1],e[2]/100,e[3]/100,1):(e=C7.exec(t))?Fd(e[1],e[2]/100,e[3]/100,e[4]):Ed.hasOwnProperty(t)?Rd(Ed[t]):t==="transparent"?new Lt(NaN,NaN,NaN,0):null}function Rd(t){return new Lt(t>>16&255,t>>8&255,t&255,1)}function Aa(t,e,n,r){return r<=0&&(t=e=n=NaN),new Lt(t,e,n,r)}function Rc(t){return t instanceof cn||(t=ln(t)),t?(t=t.rgb(),new Lt(t.r,t.g,t.b,t.opacity)):new Lt}function Mr(t,e,n,r){return arguments.length===1?Rc(t):new Lt(t,e,n,r??1)}function Lt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}_r(Lt,Mr,Pi(cn,{brighter(t){return t=t==null?wr:Math.pow(wr,t),new Lt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,t),new Lt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Lt(In(this.r),In(this.g),In(this.b),Ma(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:Cd,formatHex:Cd,formatHex8:z7,formatRgb:Id,toString:Id}));function Cd(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}`}function z7(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}${Fn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Id(){const t=Ma(this.opacity);return`${t===1?"rgb(":"rgba("}${In(this.r)}, ${In(this.g)}, ${In(this.b)}${t===1?")":`, ${t})`}`}function Ma(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function In(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Fn(t){return t=In(t),(t<16?"0":"")+t.toString(16)}function Fd(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 zd(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof cn||(t=ln(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,c=(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/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new Ae(a,s,c,t.opacity)}function $a(t,e,n,r){return arguments.length===1?zd(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}_r(Ae,$a,Pi(cn,{brighter(t){return t=t==null?wr:Math.pow(wr,t),new Ae(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,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 Lt(Cc(t>=240?t-240:t+120,i,r),Cc(t,i,r),Cc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(Od(this.h),Sa(this.s),Sa(this.l),Ma(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=Ma(this.opacity);return`${t===1?"hsl(":"hsla("}${Od(this.h)}, ${Sa(this.s)*100}%, ${Sa(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Od(t){return t=(t||0)%360,t<0?t+360:t}function Sa(t){return Math.max(0,Math.min(1,t||0))}function Cc(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 Gd=Math.PI/180,Bd=180/Math.PI,Ta=18,Ud=.96422,Yd=1,Wd=.82521,Hd=4/29,$r=6/29,qd=3*$r*$r,O7=$r*$r*$r;function Xd(t){if(t instanceof Me)return new Me(t.l,t.a,t.b,t.opacity);if(t instanceof Le)return jd(t);t instanceof Lt||(t=Rc(t));var e=Oc(t.r),n=Oc(t.g),r=Oc(t.b),i=Ic((.2225045*e+.7168786*n+.0606169*r)/Yd),o,a;return e===n&&n===r?o=a=i:(o=Ic((.4360747*e+.3850649*n+.1430804*r)/Ud),a=Ic((.0139322*e+.0971045*n+.7141733*r)/Wd)),new Me(116*i-16,500*(o-i),200*(i-a),t.opacity)}function G7(t,e){return new Me(t,0,0,e??1)}function Pa(t,e,n,r){return arguments.length===1?Xd(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}_r(Me,Pa,Pi(cn,{brighter(t){return new Me(this.l+Ta*(t??1),this.a,this.b,this.opacity)},darker(t){return new Me(this.l-Ta*(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=Ud*Fc(e),t=Yd*Fc(t),n=Wd*Fc(n),new Lt(zc(3.1338561*e-1.6168667*t-.4906146*n),zc(-.9787684*e+1.9161415*t+.033454*n),zc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Ic(t){return t>O7?Math.pow(t,1/3):t/qd+Hd}function Fc(t){return t>$r?t*t*t:qd*(t-Hd)}function zc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Oc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Vd(t){if(t instanceof Le)return new Le(t.h,t.c,t.l,t.opacity);if(t instanceof Me||(t=Xd(t)),t.a===0&&t.b===0)return new Le(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Bd;return new Le(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function B7(t,e,n,r){return arguments.length===1?Vd(t):new Le(n,e,t,r??1)}function Da(t,e,n,r){return arguments.length===1?Vd(t):new Le(t,e,n,r??1)}function Le(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function jd(t){if(isNaN(t.h))return new Me(t.l,0,0,t.opacity);var e=t.h*Gd;return new Me(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}_r(Le,Da,Pi(cn,{brighter(t){return new Le(this.h,this.c,this.l+Ta*(t??1),this.opacity)},darker(t){return new Le(this.h,this.c,this.l-Ta*(t??1),this.opacity)},rgb(){return jd(this).rgb()}}));var Zd=-.14861,Gc=1.78277,Bc=-.29227,ka=-.90649,ki=1.97294,Kd=ki*ka,Qd=ki*Gc,Jd=Gc*Bc-ka*Zd;function U7(t){if(t instanceof zn)return new zn(t.h,t.s,t.l,t.opacity);t instanceof Lt||(t=Rc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Jd*r+Kd*e-Qd*n)/(Jd+Kd-Qd),o=r-i,a=(ki*(n-i)-Bc*o)/ka,s=Math.sqrt(a*a+o*o)/(ki*i*(1-i)),c=s?Math.atan2(a,o)*Bd-120:NaN;return new zn(c<0?c+360:c,s,i,t.opacity)}function $e(t,e,n,r){return arguments.length===1?U7(t):new zn(t,e,n,r??1)}function zn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}_r(zn,$e,Pi(cn,{brighter(t){return t=t==null?wr:Math.pow(wr,t),new zn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,t),new zn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Gd,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Lt(255*(e+n*(Zd*r+Gc*i)),255*(e+n*(Bc*r+ka*i)),255*(e+n*(ki*r)),this.opacity)}}));function tg(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 eg(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 tg((n-r/e)*e,a,i,o,s)}}function ng(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 tg((n-r/e)*e,i,o,a,s)}}const Ea=t=>()=>t;function rg(t,e){return function(n){return t+n*e}}function Y7(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 La(t,e){var n=e-t;return n?rg(t,n>180||n<-180?n-360*Math.round(n/360):n):Ea(isNaN(t)?e:t)}function W7(t){return(t=+t)==1?Nt:function(e,n){return n-e?Y7(e,n,t):Ea(isNaN(e)?n:e)}}function Nt(t,e){var n=e-t;return n?rg(t,n):Ea(isNaN(t)?e:t)}const Ei=function t(e){var n=W7(e);function r(i,o){var a=n((i=Mr(i)).r,(o=Mr(o)).r),s=n(i.g,o.g),c=n(i.b,o.b),u=Nt(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r}(1);function ig(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=Mr(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(c){return s.r=r(c),s.g=i(c),s.b=o(c),s+""}}}var og=ig(eg),H7=ig(ng);function Uc(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 ag(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function q7(t,e){return(ag(e)?Uc:sg)(t,e)}function sg(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]=fn(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 ug(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ce(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function cg(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]=fn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Yc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wc=new RegExp(Yc.source,"g");function X7(t){return function(){return t}}function V7(t){return function(e){return t(e)+""}}function Hc(t,e){var n=Yc.lastIndex=Wc.lastIndex=0,r,i,o,a=-1,s=[],c=[];for(t=t+"",e=e+"";(r=Yc.exec(t))&&(i=Wc.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,c.push({i:a,x:ce(r,i)})),n=Wc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?V7(c[0].x):X7(e):(e=c.length,function(u){for(var f=0,h;f<e;++f)s[(h=c[f]).i]=h.x(u);return s.join("")})}function fn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ea(e):(n==="number"?ce:n==="string"?(r=ln(e))?(e=r,Ei):Hc:e instanceof ln?Ei:e instanceof Date?ug:ag(e)?Uc:Array.isArray(e)?sg:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?cg:ce)(t,e)}function j7(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Z7(t,e){var n=La(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Na(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var lg=180/Math.PI,qc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fg(t,e,n,r,i,o){var a,s,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*lg,skewX:Math.atan(c)*lg,scaleX:a,scaleY:s}}var Ra;function K7(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?qc:fg(e.a,e.b,e.c,e.d,e.e,e.f)}function Q7(t){return t==null||(Ra||(Ra=document.createElementNS("http://www.w3.org/2000/svg","g")),Ra.setAttribute("transform",t),!(t=Ra.transform.baseVal.consolidate()))?qc:(t=t.matrix,fg(t.a,t.b,t.c,t.d,t.e,t.f))}function hg(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:ce(u,h)},{i:g-2,x:ce(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(u,f,h,l){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ce(u,f)})):f&&h.push(i(h)+"rotate("+f+r)}function s(u,f,h,l){u!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ce(u,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ce(u,h)},{i:g-2,x:ce(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(u,f){var h=[],l=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,h,l),a(u.rotate,f.rotate,h,l),s(u.skewX,f.skewX,h,l),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,h,l),u=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var pg=hg(K7,"px, ","px)","deg)"),dg=hg(Q7,", ",")",")"),J7=1e-12;function gg(t){return((t=Math.exp(t))+1/t)/2}function tA(t){return((t=Math.exp(t))-1/t)/2}function eA(t){return((t=Math.exp(2*t))-1)/(t+1)}const mg=function t(e,n,r){function i(o,a){var s=o[0],c=o[1],u=o[2],f=a[0],h=a[1],l=a[2],p=f-s,d=h-c,g=p*p+d*d,m,y;if(g<J7)y=Math.log(l/u)/e,m=function(T){return[s+T*p,c+T*d,u*Math.exp(e*T*y)]};else{var x=Math.sqrt(g),v=(l*l-u*u+r*g)/(2*u*n*x),b=(l*l-u*u-r*g)/(2*l*n*x),M=Math.log(Math.sqrt(v*v+1)-v),_=Math.log(Math.sqrt(b*b+1)-b);y=(_-M)/e,m=function(T){var P=T*y,E=gg(M),k=u/(n*x)*(E*eA(e*P+M)-tA(M));return[s+k*p,c+k*d,u*E/gg(e*P+M)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return t(a,s,c)},i}(Math.SQRT2,2,4);function yg(t){return function(e,n){var r=t((e=$a(e)).h,(n=$a(n)).h),i=Nt(e.s,n.s),o=Nt(e.l,n.l),a=Nt(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 nA=yg(La);var rA=yg(Nt);function iA(t,e){var n=Nt((t=Pa(t)).l,(e=Pa(e)).l),r=Nt(t.a,e.a),i=Nt(t.b,e.b),o=Nt(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 bg(t){return function(e,n){var r=t((e=Da(e)).h,(n=Da(n)).h),i=Nt(e.c,n.c),o=Nt(e.l,n.l),a=Nt(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 oA=bg(La);var aA=bg(Nt);function vg(t){return function e(n){n=+n;function r(i,o){var a=t((i=$e(i)).h,(o=$e(o)).h),s=Nt(i.s,o.s),c=Nt(i.l,o.l),u=Nt(i.opacity,o.opacity);return function(f){return i.h=a(f),i.s=s(f),i.l=c(Math.pow(f,n)),i.opacity=u(f),i+""}}return r.gamma=e,r}(1)}const sA=vg(La);var Ca=vg(Nt);function xg(t,e){e===void 0&&(e=t,t=fn);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 uA(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Sr=0,Li=0,Ni=0,_g=1e3,Ia,Ri,Fa=0,On=0,za=0,Ci=typeof performance=="object"&&performance.now?performance:Date,wg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ii(){return On||(wg(cA),On=Ci.now()+za)}function cA(){On=0}function Fi(){this._call=this._time=this._next=null}Fi.prototype=Oa.prototype={constructor:Fi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ii():+n)+(e==null?0:+e),!this._next&&Ri!==this&&(Ri?Ri._next=this:Ia=this,Ri=this),this._call=t,this._time=n,Xc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xc())}};function Oa(t,e,n){var r=new Fi;return r.restart(t,e,n),r}function Ag(){Ii(),++Sr;for(var t=Ia,e;t;)(e=On-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Sr}function Mg(){On=(Fa=Ci.now())+za,Sr=Li=0;try{Ag()}finally{Sr=0,fA(),On=0}}function lA(){var t=Ci.now(),e=t-Fa;e>_g&&(za-=e,Fa=t)}function fA(){for(var t,e=Ia,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:Ia=n);Ri=t,Xc(r)}function Xc(t){if(!Sr){Li&&(Li=clearTimeout(Li));var e=t-On;e>24?(t<1/0&&(Li=setTimeout(Mg,t-Ci.now()-za)),Ni&&(Ni=clearInterval(Ni))):(Ni||(Fa=Ci.now(),Ni=setInterval(lA,_g)),Sr=1,wg(Mg))}}function Vc(t,e,n){var r=new Fi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function hA(t,e,n){var r=new Fi,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?Ii():+s,r._restart(function c(u){u+=i,r._restart(c,i+=a,s),o(u)},a,s)},r.restart(t,e,n),r)}var pA=Ln("start","end","cancel","interrupt"),dA=[],$g=0,jc=1,Zc=2,Ga=3,Sg=4,Kc=5,Ba=6;function Ua(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;gA(t,n,{name:e,index:r,group:i,on:pA,tween:dA,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:$g})}function Qc(t,e){var n=Se(t,e);if(n.state>$g)throw new Error("too late; already scheduled");return n}function Ne(t,e){var n=Se(t,e);if(n.state>Ga)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 gA(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Oa(o,0,n.time);function o(u){n.state=jc,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var f,h,l,p;if(n.state!==jc)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===Ga)return Vc(a);p.state===Sg?(p.state=Ba,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=Ba,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Vc(function(){n.state===Ga&&(n.state=Sg,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Zc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Zc){for(n.state=Ga,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Kc,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===Kc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Ba,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function Gn(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>Zc&&r.state<Kc,r.state=Ba,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function mA(t){return this.each(function(){Gn(this,t)})}function yA(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 bA(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},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}o.tween=i}}function vA(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?yA:bA)(n,t,e))}function Jc(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 Se(i,r).value[e]}}function Tg(t,e){var n;return(typeof e=="number"?ce:e instanceof ln?Ei:(n=ln(e))?(e=n,Ei):Hc)(t,e)}function xA(t){return function(){this.removeAttribute(t)}}function _A(t){return function(){this.removeAttributeNS(t.space,t.local)}}function wA(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 AA(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 MA(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function $A(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function SA(t,e){var n=Si(t),r=n==="transform"?dg:Tg;return this.attrTween(t,typeof e=="function"?(n.local?$A:MA)(n,r,Jc(this,"attr."+t,e)):e==null?(n.local?_A:xA)(n):(n.local?AA:wA)(n,r,e))}function TA(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function PA(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function DA(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&PA(t,o)),n}return i._value=e,i}function kA(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&TA(t,o)),n}return i._value=e,i}function EA(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=Si(t);return this.tween(n,(r.local?DA:kA)(r,e))}function LA(t,e){return function(){Qc(this,t).delay=+e.apply(this,arguments)}}function NA(t,e){return e=+e,function(){Qc(this,t).delay=e}}function RA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?LA:NA)(e,t)):Se(this.node(),e).delay}function CA(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function IA(t,e){return e=+e,function(){Ne(this,t).duration=e}}function FA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?CA:IA)(e,t)):Se(this.node(),e).duration}function zA(t,e){if(typeof e!="function")throw new Error;return function(){Ne(this,t).ease=e}}function OA(t){var e=this._id;return arguments.length?this.each(zA(e,t)):Se(this.node(),e).ease}function GA(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ne(this,t).ease=n}}function BA(t){if(typeof t!="function")throw new Error;return this.each(GA(this._id,t))}function UA(t){typeof t!="function"&&(t=Tc(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]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new Re(r,this._parents,this._name,this._id)}function YA(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 c=e[s],u=n[s],f=c.length,h=a[s]=new Array(f),l,p=0;p<f;++p)(l=c[p]||u[p])&&(h[p]=l);for(;s<r;++s)a[s]=e[s];return new Re(a,this._parents,this._name,this._id)}function WA(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 HA(t,e,n){var r,i,o=WA(e)?Qc:Ne;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function qA(t,e){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(t):this.each(HA(n,t,e))}function XA(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function VA(){return this.on("end.remove",XA(this._id))}function jA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ba(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],c=s.length,u=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=s[l])&&(h=t.call(f,f.__data__,l,s))&&("__data__"in f&&(h.__data__=f.__data__),u[l]=h,Ua(u[l],e,n,l,u,Se(f,n)));return new Re(o,this._parents,e,n)}function ZA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Sc(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var c=r[s],u=c.length,f,h=0;h<u;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=Se(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&Ua(p,e,n,g,l,d);o.push(l),a.push(f)}return new Re(o,a,e,n)}var KA=Rn.prototype.constructor;function QA(){return new KA(this._groups,this._parents)}function JA(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 Pg(t){return function(){this.style.removeProperty(t)}}function tM(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),c=s+"";return s==null&&(c=s=(this.style.removeProperty(t),Nn(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s))}}function nM(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var c=Ne(this,t),u=c.on,f=c.value[o]==null?s||(s=Pg(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(a,i=f),c.on=r}}function rM(t,e,n){var r=(t+="")=="transform"?pg:Tg;return e==null?this.styleTween(t,JA(t,r)).on("end.style."+t,Pg(t)):typeof e=="function"?this.styleTween(t,eM(t,r,Jc(this,"style."+t,e))).each(nM(this._id,t)):this.styleTween(t,tM(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 oM(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 aM(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,oM(t,e,n??""))}function sM(t){return function(){this.textContent=t}}function uM(t){return function(){var e=t(this);this.textContent=e??""}}function cM(t){return this.tween("text",typeof t=="function"?uM(Jc(this,"text",t)):sM(t==null?"":t+""))}function lM(t){return function(e){this.textContent=t.call(this,e)}}function fM(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&lM(i)),e}return r._value=t,r}function hM(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,fM(t))}function pM(){for(var t=this._name,e=this._id,n=kg(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var f=Se(c,e);Ua(c,t,n,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Re(r,this._parents,t,n)}function dM(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var u=Ne(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),u.on=e}),i===0&&o()})}var gM=0;function Re(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Dg(t){return Rn().transition(t)}function kg(){return++gM}var qe=Rn.prototype;Re.prototype=Dg.prototype={constructor:Re,select:jA,selectAll:ZA,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:UA,merge:YA,selection:QA,transition:pM,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:qA,attr:SA,attrTween:EA,style:rM,styleTween:aM,text:cM,textTween:hM,remove:VA,tween:vA,delay:RA,duration:FA,ease:OA,easeVarying:BA,end:dM,[Symbol.iterator]:qe[Symbol.iterator]};const mM=t=>+t;function yM(t){return t*t}function bM(t){return t*(2-t)}function Eg(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function vM(t){return t*t*t}function xM(t){return--t*t*t+1}function zi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var tl=3,_M=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(tl),wM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(tl),Lg=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}(tl),Ng=Math.PI,Rg=Ng/2;function AM(t){return+t==1?1:1-Math.cos(t*Rg)}function MM(t){return Math.sin(t*Rg)}function Cg(t){return(1-Math.cos(Ng*t))/2}function hn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function $M(t){return hn(1-+t)}function SM(t){return 1-hn(t)}function Ig(t){return((t*=2)<=1?hn(1-t):2-hn(t-1))/2}function TM(t){return 1-Math.sqrt(1-t*t)}function PM(t){return Math.sqrt(1- --t*t)}function Fg(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var el=4/11,DM=6/11,kM=8/11,EM=3/4,LM=9/11,NM=10/11,RM=15/16,CM=21/22,IM=63/64,Ya=1/el/el;function FM(t){return 1-Oi(1-t)}function Oi(t){return(t=+t)<el?Ya*t*t:t<kM?Ya*(t-=DM)*t+EM:t<NM?Ya*(t-=LM)*t+RM:Ya*(t-=CM)*t+IM}function zM(t){return((t*=2)<=1?1-Oi(1-t):Oi(t-1)+1)/2}var nl=1.70158,OM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(nl),GM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(nl),zg=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}(nl),Tr=2*Math.PI,rl=1,il=.3,BM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tr);function i(o){return e*hn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Tr)},i.period=function(o){return t(e,o)},i}(rl,il),Wa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tr);function i(o){return 1-e*hn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Tr)},i.period=function(o){return t(e,o)},i}(rl,il),UM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tr);function i(o){return((o=o*2-1)<0?e*hn(-o)*Math.sin((r-o)/n):2-e*hn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Tr)},i.period=function(o){return t(e,o)},i}(rl,il),YM={time:null,delay:0,duration:250,ease:zi};function WM(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 HM(t){var e,n;t instanceof Re?(e=t._id,t=t._name):(e=kg(),(n=YM).time=Ii(),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,c,u=0;u<s;++u)(c=a[u])&&Ua(c,t,e,u,a,n||WM(c,e));return new Re(r,this._parents,t,e)}Rn.prototype.interrupt=mA,Rn.prototype.transition=HM;var qM=[null];function XM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>jc&&r.name===e)return new Re([[t]],qM,e,+i)}return null}const ol=t=>()=>t;function VM(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 jM(t){t.stopImmediatePropagation()}function al(t){t.preventDefault(),t.stopImmediatePropagation()}var Og={name:"drag"},sl={name:"space"},Pr={name:"handle"},Dr={name:"center"};const{abs:Gg,max:Ft,min:zt}=Math;function Bg(t){return[+t[0],+t[1]]}function ul(t){return[Bg(t[0]),Bg(t[1])]}var Ha={name:"x",handles:["w","e"].map(Gi),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]]}},qa={name:"y",handles:["n","s"].map(Gi),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]]}},ZM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Gi),input:function(t){return t==null?null:ul(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"},Ug={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Yg={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},KM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},QM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Gi(t){return{type:t}}function JM(t){return!t.ctrlKey&&!t.button}function t$(){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 e$(){return navigator.maxTouchPoints||"ontouchstart"in this}function cl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function n$(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function r$(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function i$(){return ll(Ha)}function o$(){return ll(qa)}function a$(){return ll(ZM)}function ll(t){var e=t$,n=JM,r=e$,i=!0,o=Ln("start","brush","end"),a=6,s;function c(m){var y=m.property("__brush",g).selectAll(".overlay").data([Gi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Xe.overlay).merge(y).each(function(){var v=cl(this).extent;K(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([Gi("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(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",l).filter(r).on("touchstart.brush",l).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(m,y,x){m.tween?m.on("start.brush",function(v){f(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){f(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,M=f(v,arguments),_=b.selection,T=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),P=fn(_,T);function E(k){b.selection=k===1&&T===null?null:P(k),u.call(v),M.brush()}return _!==null&&T!==null?E:E(1)}):m.each(function(){var v=this,b=arguments,M=v.__brush,_=t.input(typeof y=="function"?y.apply(v,b):y,M.extent),T=f(v,b).beforestart();Gn(v),M.selection=_===null?null:_,u.call(v),T.start(x).brush(x).end(x)})},c.clear=function(m,y){c.move(m,null,y)};function u(){var m=K(this),y=cl(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 f(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=K(this.that).datum();o.call(m,this.that,new VM(m,{sourceEvent:y,target:c,selection:t.output(this.state.selection),mode:x,dispatch:o}),v)}};function l(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"?Og:i&&m.altKey?Dr:Pr,b=t===qa?null:KM[x],M=t===Ha?null:QM[x],_=cl(y),T=_.extent,P=_.selection,E=T[0][0],k,S,C=T[0][1],N,A,$=T[1][0],w,D,L=T[1][1],R,F,z=0,Y=0,rt,Z=b&&M&&i&&m.shiftKey,J,ht,H=Array.from(m.touches||[m],Q=>{const St=Q.identifier;return Q=ae(Q,y),Q.point0=Q.slice(),Q.identifier=St,Q});Gn(y);var pt=f(y,arguments,!0).beforestart();if(x==="overlay"){P&&(rt=!0);const Q=[H[0],H[1]||H[0]];_.selection=P=[[k=t===qa?E:zt(Q[0][0],Q[1][0]),N=t===Ha?C:zt(Q[0][1],Q[1][1])],[w=t===qa?$:Ft(Q[0][0],Q[1][0]),R=t===Ha?L:Ft(Q[0][1],Q[1][1])]],H.length>1&&$t(m)}else k=P[0][0],N=P[0][1],w=P[1][0],R=P[1][1];S=k,A=N,D=w,F=R;var B=K(y).attr("pointer-events","none"),nt=B.selectAll(".overlay").attr("cursor",Xe[x]);if(m.touches)pt.moved=O,pt.ended=gt;else{var ut=K(m.view).on("mousemove.brush",O,!0).on("mouseup.brush",gt,!0);i&&ut.on("keydown.brush",Jt,!0).on("keyup.brush",te,!0),xa(m.view)}u.call(y),pt.start(m,v.name);function O(Q){for(const St of Q.changedTouches||[Q])for(const To of H)To.identifier===St.identifier&&(To.cur=ae(St,y));if(Z&&!J&&!ht&&H.length===1){const St=H[0];Gg(St.cur[0]-St[0])>Gg(St.cur[1]-St[1])?ht=!0:J=!0}for(const St of H)St.cur&&(St[0]=St.cur[0],St[1]=St.cur[1]);rt=!0,al(Q),$t(Q)}function $t(Q){const St=H[0],To=St.point0;var _n;switch(z=St[0]-To[0],Y=St[1]-To[1],v){case sl:case Og:{b&&(z=Ft(E-k,zt($-w,z)),S=k+z,D=w+z),M&&(Y=Ft(C-N,zt(L-R,Y)),A=N+Y,F=R+Y);break}case Pr:{H[1]?(b&&(S=Ft(E,zt($,H[0][0])),D=Ft(E,zt($,H[1][0])),b=1),M&&(A=Ft(C,zt(L,H[0][1])),F=Ft(C,zt(L,H[1][1])),M=1)):(b<0?(z=Ft(E-k,zt($-k,z)),S=k+z,D=w):b>0&&(z=Ft(E-w,zt($-w,z)),S=k,D=w+z),M<0?(Y=Ft(C-N,zt(L-N,Y)),A=N+Y,F=R):M>0&&(Y=Ft(C-R,zt(L-R,Y)),A=N,F=R+Y));break}case Dr:{b&&(S=Ft(E,zt($,k-z*b)),D=Ft(E,zt($,w+z*b))),M&&(A=Ft(C,zt(L,N-Y*M)),F=Ft(C,zt(L,R+Y*M)));break}}D<S&&(b*=-1,_n=k,k=w,w=_n,_n=S,S=D,D=_n,x in Ug&&nt.attr("cursor",Xe[x=Ug[x]])),F<A&&(M*=-1,_n=N,N=R,R=_n,_n=A,A=F,F=_n,x in Yg&&nt.attr("cursor",Xe[x=Yg[x]])),_.selection&&(P=_.selection),J&&(S=P[0][0],D=P[1][0]),ht&&(A=P[0][1],F=P[1][1]),(P[0][0]!==S||P[0][1]!==A||P[1][0]!==D||P[1][1]!==F)&&(_.selection=[[S,A],[D,F]],u.call(y),pt.brush(Q,v.name))}function gt(Q){if(jM(Q),Q.touches){if(Q.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else _a(Q.view,rt),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);B.attr("pointer-events","all"),nt.attr("cursor",Xe.overlay),_.selection&&(P=_.selection),n$(P)&&(_.selection=null,u.call(y)),pt.end(Q,v.name)}function Jt(Q){switch(Q.keyCode){case 16:{Z=b&&M;break}case 18:{v===Pr&&(b&&(w=D-z*b,k=S+z*b),M&&(R=F-Y*M,N=A+Y*M),v=Dr,$t(Q));break}case 32:{(v===Pr||v===Dr)&&(b<0?w=D-z:b>0&&(k=S-z),M<0?R=F-Y:M>0&&(N=A-Y),v=sl,nt.attr("cursor",Xe.selection),$t(Q));break}default:return}al(Q)}function te(Q){switch(Q.keyCode){case 16:{Z&&(J=ht=Z=!1,$t(Q));break}case 18:{v===Dr&&(b<0?w=D:b>0&&(k=S),M<0?R=F:M>0&&(N=A),v=Pr,$t(Q));break}case 32:{v===sl&&(Q.altKey?(b&&(w=D-z*b,k=S+z*b),M&&(R=F-Y*M,N=A+Y*M),v=Dr):(b<0?w=D:b>0&&(k=S),M<0?R=F:M>0&&(N=A),v=Pr),nt.attr("cursor",Xe[x]),$t(Q));break}default:return}al(Q)}}function p(m){f(this,arguments).moved(m)}function d(m){f(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=ul(e.apply(this,arguments)),m.dim=t,m}return c.extent=function(m){return arguments.length?(e=typeof m=="function"?m:ol(ul(m)),c):e},c.filter=function(m){return arguments.length?(n=typeof m=="function"?m:ol(!!m),c):n},c.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:ol(!!m),c):r},c.handleSize=function(m){return arguments.length?(a=+m,c):a},c.keyModifiers=function(m){return arguments.length?(i=!!m,c):i},c.on=function(){var m=o.on.apply(o,arguments);return m===o?c:m},c}var Wg=Math.abs,kr=Math.cos,Er=Math.sin,Hg=Math.PI,Xa=Hg/2,qg=Hg*2,Xg=Math.max,fl=1e-12;function hl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function s$(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function u$(){return pl(!1,!1)}function c$(){return pl(!1,!0)}function l$(){return pl(!0,!1)}function pl(t,e){var n=0,r=null,i=null,o=null;function a(s){var c=s.length,u=new Array(c),f=hl(0,c),h=new Array(c*c),l=new Array(c),p=0,d;s=Float64Array.from({length:c*c},e?(g,m)=>s[m%c][m/c|0]:(g,m)=>s[m/c|0][m%c]);for(let g=0;g<c;++g){let m=0;for(let y=0;y<c;++y)m+=s[g*c+y]+t*s[y*c+g];p+=u[g]=m}p=Xg(0,qg-n*c)/p,d=p?n:qg/c;{let g=0;r&&f.sort((m,y)=>r(u[m],u[y]));for(const m of f){const y=g;if(t){const x=hl(~c+1,c).filter(v=>v<0?s[~v*c+m]:s[m*c+v]);i&&x.sort((v,b)=>i(v<0?-s[~v*c+m]:s[m*c+v],b<0?-s[~b*c+m]:s[m*c+b]));for(const v of x)if(v<0){const b=h[~v*c+m]||(h[~v*c+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~v*c+m]*p,value:s[~v*c+m]}}else{const b=h[m*c+v]||(h[m*c+v]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*c+v]*p,value:s[m*c+v]}}l[m]={index:m,startAngle:y,endAngle:g,value:u[m]}}else{const x=hl(0,c).filter(v=>s[m*c+v]||s[v*c+m]);i&&x.sort((v,b)=>i(s[m*c+v],s[m*c+b]));for(const v of x){let b;if(m<v?(b=h[m*c+v]||(h[m*c+v]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*c+v]*p,value:s[m*c+v]}):(b=h[v*c+m]||(h[v*c+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*c+v]*p,value:s[m*c+v]},m===v&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const M=b.source;b.source=b.target,b.target=M}}l[m]={index:m,startAngle:y,endAngle:g,value:u[m]}}g+=d}}return h=Object.values(h),h.groups=l,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=Xg(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=s$(s))._=s,a):o&&o._},a}const dl=Math.PI,gl=2*dl,Bn=1e-6,f$=gl-Bn;function Vg(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function h$(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Vg;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 Bi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Vg:h$(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,c=r-e,u=i-n,f=a-e,h=s-n,l=f*f+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(l>Bn)if(!(Math.abs(h*c-u*f)>Bn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=c*c+u*u,m=p*p+d*d,y=Math.sqrt(g),x=Math.sqrt(l),v=o*Math.tan((dl-Math.acos((g+l-m)/(2*y*x)))/2),b=v/x,M=v/y;Math.abs(b-1)>Bn&&this._append`L${e+b*f},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*p>f*d)},${this._x1=e+M*c},${this._y1=n+M*u}`}}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),c=r*Math.sin(i),u=e+s,f=n+c,h=1^a,l=a?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Bn||Math.abs(this._y1-f)>Bn)&&this._append`L${u},${f}`,r&&(l<0&&(l=l%gl+gl),l>f$?this._append`A${r},${r},0,1,${h},${e-s},${n-c}A${r},${r},0,1,${h},${this._x1=u},${this._y1=f}`:l>Bn&&this._append`A${r},${r},0,${+(l>=dl)},${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 ml(){return new Bi}ml.prototype=Bi.prototype;function p$(t=3){return new Bi(+t)}var d$=Array.prototype.slice;function Un(t){return function(){return t}}function g$(t){return t.source}function m$(t){return t.target}function jg(t){return t.radius}function y$(t){return t.startAngle}function b$(t){return t.endAngle}function v$(){return 0}function x$(){return 10}function Zg(t){var e=g$,n=m$,r=jg,i=jg,o=y$,a=b$,s=v$,c=null;function u(){var f,h=e.apply(this,arguments),l=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=d$.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-Xa,y=a.apply(this,d)-Xa,x=+i.apply(this,(d[0]=l,d)),v=o.apply(this,d)-Xa,b=a.apply(this,d)-Xa;if(c||(c=f=ml()),p>fl&&(Wg(y-m)>p*2+fl?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,Wg(b-v)>p*2+fl?b>v?(v+=p,b-=p):(v-=p,b+=p):v=b=(v+b)/2),c.moveTo(g*kr(m),g*Er(m)),c.arc(0,0,g,m,y),m!==v||y!==b)if(t){var M=+t.apply(this,arguments),_=x-M,T=(v+b)/2;c.quadraticCurveTo(0,0,_*kr(v),_*Er(v)),c.lineTo(x*kr(T),x*Er(T)),c.lineTo(_*kr(b),_*Er(b))}else c.quadraticCurveTo(0,0,x*kr(v),x*Er(v)),c.arc(0,0,x,v,b);if(c.quadraticCurveTo(0,0,g*kr(m),g*Er(m)),c.closePath(),f)return c=null,f+""||null}return t&&(u.headRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Un(+f),u):t}),u.radius=function(f){return arguments.length?(r=i=typeof f=="function"?f:Un(+f),u):r},u.sourceRadius=function(f){return arguments.length?(r=typeof f=="function"?f:Un(+f),u):r},u.targetRadius=function(f){return arguments.length?(i=typeof f=="function"?f:Un(+f),u):i},u.startAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Un(+f),u):o},u.endAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Un(+f),u):a},u.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Un(+f),u):s},u.source=function(f){return arguments.length?(e=f,u):e},u.target=function(f){return arguments.length?(n=f,u):n},u.context=function(f){return arguments.length?(c=f??null,u):c},u}function _$(){return Zg()}function w$(){return Zg(x$)}var A$=Array.prototype,Kg=A$.slice;function M$(t,e){return t-e}function $$(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 pn=t=>()=>t;function S$(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=T$(t,e[n]))return i;return 0}function T$(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 c=t[o],u=c[0],f=c[1],h=t[s],l=h[0],p=h[1];if(P$(c,h,e))return 0;f>r!=p>r&&n<(l-u)*(r-f)/(p-f)+u&&(i=-i)}return i}function P$(t,e,n){var r;return D$(t,e,n)&&k$(t[r=+(t[0]===e[0])],n[r],e[r])}function D$(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function k$(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function E$(){}var Ve=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function yl(){var t=1,e=1,n=bc,r=c;function i(u){var f=n(u);if(Array.isArray(f))f=f.slice().sort(M$);else{const h=xi(u,L$);for(f=kn(...yc(h[0],h[1],f),f);f[f.length-1]>=h[1];)f.pop();for(;f[1]<h[0];)f.shift()}return f.map(h=>o(u,h))}function o(u,f){const h=f==null?NaN:+f;if(isNaN(h))throw new Error(`invalid value: ${f}`);var l=[],p=[];return a(u,h,function(d){r(d,u,h),$$(d)>0?l.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=l.length,y;g<m;++g)if(S$((y=l[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:f,coordinates:l}}function a(u,f,h){var l=new Array,p=new Array,d,g,m,y,x,v;for(d=g=-1,y=Yn(u[0],f),Ve[y<<1].forEach(b);++d<t-1;)m=y,y=Yn(u[d+1],f),Ve[m|y<<1].forEach(b);for(Ve[y<<0].forEach(b);++g<e-1;){for(d=-1,y=Yn(u[g*t+t],f),x=Yn(u[g*t],f),Ve[y<<1|x<<2].forEach(b);++d<t-1;)m=y,y=Yn(u[g*t+t+d+1],f),v=x,x=Yn(u[g*t+d+1],f),Ve[m|y<<1|x<<2|v<<3].forEach(b);Ve[y|x<<3].forEach(b)}for(d=-1,x=u[g*t]>=f,Ve[x<<2].forEach(b);++d<t-1;)v=x,x=Yn(u[g*t+d+1],f),Ve[x<<2|v<<3].forEach(b);Ve[x<<3].forEach(b);function b(M){var _=[M[0][0]+d,M[0][1]+g],T=[M[1][0]+d,M[1][1]+g],P=s(_),E=s(T),k,S;(k=p[P])?(S=l[E])?(delete p[k.end],delete l[S.start],k===S?(k.ring.push(T),h(k.ring)):l[k.start]=p[S.end]={start:k.start,end:S.end,ring:k.ring.concat(S.ring)}):(delete p[k.end],k.ring.push(T),p[k.end=E]=k):(k=l[E])?(S=p[P])?(delete l[k.start],delete p[S.end],k===S?(k.ring.push(T),h(k.ring)):l[S.start]=p[k.end]={start:S.start,end:k.end,ring:S.ring.concat(k.ring)}):(delete l[k.start],k.ring.unshift(_),l[k.start=P]=k):l[P]=p[E]={start:P,end:E,ring:[_,T]}}}function s(u){return u[0]*2+u[1]*(t+1)*4}function c(u,f,h){u.forEach(function(l){var p=l[0],d=l[1],g=p|0,m=d|0,y=bl(f[m*t+g]);p>0&&p<t&&g===p&&(l[0]=Qg(p,bl(f[m*t+g-1]),y,h)),d>0&&d<e&&m===d&&(l[1]=Qg(d,bl(f[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(u){if(!arguments.length)return[t,e];var f=Math.floor(u[0]),h=Math.floor(u[1]);if(!(f>=0&&h>=0))throw new Error("invalid size");return t=f,e=h,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?pn(Kg.call(u)):pn(u),i):n},i.smooth=function(u){return arguments.length?(r=u?c:E$,i):r===c},i}function L$(t){return isFinite(t)?t:NaN}function Yn(t,e){return t==null?!1:+t>=e}function bl(t){return t==null||isNaN(t=+t)?-1/0:t}function Qg(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 N$(t){return t[0]}function R$(t){return t[1]}function C$(){return 1}function I$(){var t=N$,e=R$,n=C$,r=960,i=500,o=20,a=2,s=o*3,c=r+s*2>>a,u=i+s*2>>a,f=pn(20);function h(x){var v=new Float32Array(c*u),b=Math.pow(2,-a),M=-1;for(const N of x){var _=(t(N,++M,x)+s)*b,T=(e(N,M,x)+s)*b,P=+n(N,M,x);if(P&&_>=0&&_<c&&T>=0&&T<u){var E=Math.floor(_),k=Math.floor(T),S=_-E-.5,C=T-k-.5;v[E+k*c]+=(1-S)*(1-C)*P,v[E+1+k*c]+=S*(1-C)*P,v[E+1+(k+1)*c]+=S*C*P,v[E+(k+1)*c]+=(1-S)*C*P}}return Vp({data:v,width:c,height:u},o*b),v}function l(x){var v=h(x),b=f(v),M=Math.pow(2,2*a);return Array.isArray(b)||(b=kn(Number.MIN_VALUE,wi(v)/M,b)),yl().size([c,u]).thresholds(b.map(_=>_*M))(v).map((_,T)=>(_.value=+b[T],p(_)))}l.contours=function(x){var v=h(x),b=yl().size([c,u]),M=Math.pow(2,2*a),_=T=>{T=+T;var P=p(b.contour(v,T*M));return P.value=T,P};return Object.defineProperty(_,"max",{get:()=>wi(v)/M}),_};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,c=r+s*2>>a,u=i+s*2>>a,l}return l.x=function(x){return arguments.length?(t=typeof x=="function"?x:pn(+x),l):t},l.y=function(x){return arguments.length?(e=typeof x=="function"?x:pn(+x),l):e},l.weight=function(x){return arguments.length?(n=typeof x=="function"?x:pn(+x),l):n},l.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()},l.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()},l.thresholds=function(x){return arguments.length?(f=typeof x=="function"?x:Array.isArray(x)?pn(Kg.call(x)):pn(x),l):f},l.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()},l}const je=11102230246251565e-32,Ot=134217729,F$=(3+8*je)*je;function vl(t,e,n,r,i){let o,a,s,c,u=e[0],f=r[0],h=0,l=0;f>u==f>-u?(o=u,u=e[++h]):(o=f,f=r[++l]);let p=0;if(h<t&&l<n)for(f>u==f>-u?(a=u+o,s=o-(a-u),u=e[++h]):(a=f+o,s=o-(a-f),f=r[++l]),o=a,s!==0&&(i[p++]=s);h<t&&l<n;)f>u==f>-u?(a=o+u,c=a-o,s=o-(a-c)+(u-c),u=e[++h]):(a=o+f,c=a-o,s=o-(a-c)+(f-c),f=r[++l]),o=a,s!==0&&(i[p++]=s);for(;h<t;)a=o+u,c=a-o,s=o-(a-c)+(u-c),u=e[++h],o=a,s!==0&&(i[p++]=s);for(;l<n;)a=o+f,c=a-o,s=o-(a-c)+(f-c),f=r[++l],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function z$(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Ui(t){return new Float64Array(t)}const O$=(3+16*je)*je,G$=(2+12*je)*je,B$=(9+64*je)*je*je,Lr=Ui(4),Jg=Ui(8),t1=Ui(12),e1=Ui(16),Yt=Ui(4);function U$(t,e,n,r,i,o,a){let s,c,u,f,h,l,p,d,g,m,y,x,v,b,M,_,T,P;const E=t-i,k=n-i,S=e-o,C=r-o;b=E*C,l=Ot*E,p=l-(l-E),d=E-p,l=Ot*C,g=l-(l-C),m=C-g,M=d*m-(b-p*g-d*g-p*m),_=S*k,l=Ot*S,p=l-(l-S),d=S-p,l=Ot*k,g=l-(l-k),m=k-g,T=d*m-(_-p*g-d*g-p*m),y=M-T,h=M-y,Lr[0]=M-(y+h)+(h-T),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Lr[1]=v-(y+h)+(h-_),P=x+y,h=P-x,Lr[2]=x-(P-h)+(y-h),Lr[3]=P;let N=z$(4,Lr),A=G$*a;if(N>=A||-N>=A||(h=t-E,s=t-(E+h)+(h-i),h=n-k,u=n-(k+h)+(h-i),h=e-S,c=e-(S+h)+(h-o),h=r-C,f=r-(C+h)+(h-o),s===0&&c===0&&u===0&&f===0)||(A=B$*a+F$*Math.abs(N),N+=E*f+C*s-(S*u+k*c),N>=A||-N>=A))return N;b=s*C,l=Ot*s,p=l-(l-s),d=s-p,l=Ot*C,g=l-(l-C),m=C-g,M=d*m-(b-p*g-d*g-p*m),_=c*k,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*k,g=l-(l-k),m=k-g,T=d*m-(_-p*g-d*g-p*m),y=M-T,h=M-y,Yt[0]=M-(y+h)+(h-T),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Yt[1]=v-(y+h)+(h-_),P=x+y,h=P-x,Yt[2]=x-(P-h)+(y-h),Yt[3]=P;const $=vl(4,Lr,4,Yt,Jg);b=E*f,l=Ot*E,p=l-(l-E),d=E-p,l=Ot*f,g=l-(l-f),m=f-g,M=d*m-(b-p*g-d*g-p*m),_=S*u,l=Ot*S,p=l-(l-S),d=S-p,l=Ot*u,g=l-(l-u),m=u-g,T=d*m-(_-p*g-d*g-p*m),y=M-T,h=M-y,Yt[0]=M-(y+h)+(h-T),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Yt[1]=v-(y+h)+(h-_),P=x+y,h=P-x,Yt[2]=x-(P-h)+(y-h),Yt[3]=P;const w=vl($,Jg,4,Yt,t1);b=s*f,l=Ot*s,p=l-(l-s),d=s-p,l=Ot*f,g=l-(l-f),m=f-g,M=d*m-(b-p*g-d*g-p*m),_=c*u,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*u,g=l-(l-u),m=u-g,T=d*m-(_-p*g-d*g-p*m),y=M-T,h=M-y,Yt[0]=M-(y+h)+(h-T),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Yt[1]=v-(y+h)+(h-_),P=x+y,h=P-x,Yt[2]=x-(P-h)+(y-h),Yt[3]=P;const D=vl(w,t1,4,Yt,e1);return e1[D-1]}function Va(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),c=a-s,u=Math.abs(a+s);return Math.abs(c)>=O$*u?c:-U$(t,e,n,r,i,o,u)}const n1=Math.pow(2,-52),ja=new Uint32Array(512);class Za{static from(e,n=X$,r=V$){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 Za(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,c=1/0,u=-1/0,f=-1/0;for(let E=0;E<a;E++){const k=e[2*E],S=e[2*E+1];k<s&&(s=k),S<c&&(c=S),k>u&&(u=k),S>f&&(f=S),this._ids[E]=E}const h=(s+u)/2,l=(c+f)/2;let p,d,g;for(let E=0,k=1/0;E<a;E++){const S=xl(h,l,e[2*E],e[2*E+1]);S<k&&(p=E,k=S)}const m=e[2*p],y=e[2*p+1];for(let E=0,k=1/0;E<a;E++){if(E===p)continue;const S=xl(m,y,e[2*E],e[2*E+1]);S<k&&S>0&&(d=E,k=S)}let x=e[2*d],v=e[2*d+1],b=1/0;for(let E=0;E<a;E++){if(E===p||E===d)continue;const k=H$(m,y,x,v,e[2*E],e[2*E+1]);k<b&&(g=E,b=k)}let M=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];Nr(this._ids,this._dists,0,a-1);const E=new Uint32Array(a);let k=0;for(let S=0,C=-1/0;S<a;S++){const N=this._ids[S],A=this._dists[N];A>C&&(E[k++]=N,C=A)}this.hull=E.subarray(0,k),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Va(m,y,x,v,M,_)<0){const E=d,k=x,S=v;d=g,x=M,v=_,g=E,M=k,_=S}const T=q$(m,y,x,v,M,_);this._cx=T.x,this._cy=T.y;for(let E=0;E<a;E++)this._dists[E]=xl(e[2*E],e[2*E+1],T.x,T.y);Nr(this._ids,this._dists,0,a-1),this._hullStart=p;let P=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(M,_)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let E=0,k,S;E<this._ids.length;E++){const C=this._ids[E],N=e[2*C],A=e[2*C+1];if(E>0&&Math.abs(N-k)<=n1&&Math.abs(A-S)<=n1||(k=N,S=A,C===p||C===d||C===g))continue;let $=0;for(let F=0,z=this._hashKey(N,A);F<this._hashSize&&($=o[(z+F)%this._hashSize],!($!==-1&&$!==r[$]));F++);$=n[$];let w=$,D;for(;D=r[w],Va(N,A,e[2*w],e[2*w+1],e[2*D],e[2*D+1])>=0;)if(w=D,w===$){w=-1;break}if(w===-1)continue;let L=this._addTriangle(w,C,r[w],-1,-1,i[w]);i[C]=this._legalize(L+2),i[w]=L,P++;let R=r[w];for(;D=r[R],Va(N,A,e[2*R],e[2*R+1],e[2*D],e[2*D+1])<0;)L=this._addTriangle(R,C,D,i[C],-1,i[R]),i[C]=this._legalize(L+2),r[R]=R,P--,R=D;if(w===$)for(;D=n[w],Va(N,A,e[2*D],e[2*D+1],e[2*w],e[2*w+1])<0;)L=this._addTriangle(D,C,w,-1,i[w],i[D]),this._legalize(L+2),i[D]=L,r[w]=w,P--,w=D;this._hullStart=n[C]=w,r[w]=n[R]=C,r[C]=R,o[this._hashKey(N,A)]=C,o[this._hashKey(e[2*w],e[2*w+1])]=w}this.hull=new Uint32Array(P);for(let E=0,k=this._hullStart;E<P;E++)this.hull[E]=k,k=r[k];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(Y$(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],c=e-e%3;if(a=c+(e+2)%3,s===-1){if(o===0)break;e=ja[--o];continue}const u=s-s%3,f=c+(e+1)%3,h=u+(s+2)%3,l=n[a],p=n[e],d=n[f],g=n[h];if(W$(i[2*l],i[2*l+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]=l;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=u+(s+1)%3;o<ja.length&&(ja[o++]=x)}else{if(o===0)break;e=ja[--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 Y$(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function xl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function W$(t,e,n,r,i,o,a,s){const c=t-a,u=e-s,f=n-a,h=r-s,l=i-a,p=o-s,d=c*c+u*u,g=f*f+h*h,m=l*l+p*p;return c*(h*m-g*p)-u*(f*m-g*l)+d*(f*p-h*l)<0}function H$(t,e,n,r,i,o){const a=n-t,s=r-e,c=i-t,u=o-e,f=a*a+s*s,h=c*c+u*u,l=.5/(a*u-s*c),p=(u*f-s*h)*l,d=(a*h-c*f)*l;return p*p+d*d}function q$(t,e,n,r,i,o){const a=n-t,s=r-e,c=i-t,u=o-e,f=a*a+s*s,h=c*c+u*u,l=.5/(a*u-s*c),p=t+(u*f-s*h)*l,d=e+(a*h-c*f)*l;return{x:p,y:d}}function Nr(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;Yi(t,i,o),e[t[n]]>e[t[r]]&&Yi(t,n,r),e[t[o]]>e[t[r]]&&Yi(t,o,r),e[t[n]]>e[t[o]]&&Yi(t,n,o);const s=t[o],c=e[s];for(;;){do o++;while(e[t[o]]<c);do a--;while(e[t[a]]>c);if(a<o)break;Yi(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Nr(t,e,o,r),Nr(t,e,n,a-1)):(Nr(t,e,n,a-1),Nr(t,e,o,r))}}function Yi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function X$(t){return t[0]}function V$(t){return t[1]}const r1=1e-6;class Wn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>r1||Math.abs(this._y1-o)>r1)&&(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 _l{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 i1{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,M=r[g+1]*2,_=r[g+2]*2,T=e[b],P=e[b+1],E=e[M],k=e[M+1],S=e[_],C=e[_+1],N=E-T,A=k-P,$=S-T,w=C-P,D=(N*w-A*$)*2;if(Math.abs(D)<1e-9){if(o===void 0){o=a=0;for(const R of n)o+=e[R*2],a+=e[R*2+1];o/=n.length,a/=n.length}const L=1e9*Math.sign((o-T)*w-(a-P)*$);x=(T+S)/2-L*w,v=(P+C)/2+L*$}else{const L=1/D,R=N*N+A*A,F=$*$+w*w;x=T+(w*R-A*F)*L,v=P+(N*F-$*R)*L}s[m]=x,s[m+1]=v}let c=n[n.length-1],u,f=c*4,h,l=e[2*c],p,d=e[2*c+1];i.fill(0);for(let g=0;g<n.length;++g)c=n[g],u=f,h=l,p=d,f=c*4,l=e[2*c],d=e[2*c+1],i[u+2]=i[f]=p-d,i[u+3]=i[f+1]=l-h}render(e){const n=e==null?e=new Wn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let f=0,h=r.length;f<h;++f){const l=r[f];if(l<f)continue;const p=Math.floor(f/3)*2,d=Math.floor(l/3)*2,g=a[p],m=a[p+1],y=a[d],x=a[d+1];this._renderSegment(g,m,y,x,e)}let c,u=o[o.length-1];for(let f=0;f<o.length;++f){c=u,u=o[f];const h=Math.floor(i[u]/3)*2,l=a[h],p=a[h+1],d=c*4,g=this._project(l,p,s[d+2],s[d+3]);g&&this._renderSegment(l,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new Wn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new Wn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new _l;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),c=this._regioncode(r,i);s===0&&c===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,c))&&(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,c=i.length;s<c;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+c-2)%c]&&n[(o+3)%a]===i[(s+c-1)%c]){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 c=a;do{const u=Math.floor(c/3);if(s.push(n[u*2],n[u*2+1]),c=c%3===2?c-2:c+1,o[c]!==e)break;c=i[c]}while(c!==a&&c!==-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],c=n[r-1],u,f=this._regioncode(s,c),h,l=0;for(let p=0;p<r;p+=2)if(o=s,a=c,s=n[p],c=n[p+1],u=f,f=this._regioncode(s,c),u===0&&f===0)h=l,l=0,i?i.push(s,c):i=[s,c];else{let d,g,m,y,x;if(u===0){if((d=this._clipSegment(o,a,s,c,u,f))===null)continue;[g,m,y,x]=d}else{if((d=this._clipSegment(s,c,o,a,f,u))===null)continue;[y,x,g,m]=d,h=l,l=this._edgecode(g,m),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(g,m):i=[g,m]}h=l,l=this._edgecode(y,x),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(y,x):i=[y,x]}if(i)h=l,l=this._edgecode(i[0],i[1]),h&&l&&this._edge(e,h,l,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 c,u,f=o||a;f&8?(c=e+(r-e)*(this.ymax-n)/(i-n),u=this.ymax):f&4?(c=e+(r-e)*(this.ymin-n)/(i-n),u=this.ymin):f&2?(u=n+(i-n)*(this.xmax-e)/(r-e),c=this.xmax):(u=n+(i-n)*(this.xmin-e)/(r-e),c=this.xmin),o?(e=c,n=u,o=this._regioncode(e,n)):(r=c,i=u,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),c;if((c=this._project(s[0],s[1],r,i))&&s.unshift(c[0],c[1]),(c=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(c[0],c[1]),s=this._clipFinite(e,s))for(let u=0,f=s.length,h,l=this._edgecode(s[f-2],s[f-1]);u<f;u+=2)h=l,l=this._edgecode(s[u],s[u+1]),h&&l&&(u=this._edge(e,h,l,s,u),f=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,c;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(c=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(c=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,c=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,c=n+(o=a)*i)}return[s,c]}_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 j$=2*Math.PI,Rr=Math.pow;function Z$(t){return t[0]}function K$(t){return t[1]}function Q$(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 J$(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class wl{static from(e,n=Z$,r=K$,i){return new wl("length"in e?tS(e,n,r,i):Float64Array.from(eS(e,n,r,i)))}constructor(e){this._delaunator=new Za(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&&Q$(e)){this.collinear=Int32Array.from({length:n.length/2},(l,p)=>p).sort((l,p)=>n[2*l]-n[2*p]||n[2*l+1]-n[2*p+1]);const c=this.collinear[0],u=this.collinear[this.collinear.length-1],f=[n[2*c],n[2*c+1],n[2*u],n[2*u+1]],h=1e-8*Math.hypot(f[3]-f[1],f[2]-f[0]);for(let l=0,p=n.length/2;l<p;++l){const d=J$(n[2*l],n[2*l+1],h);n[2*l]=d[0],n[2*l+1]=d[1]}this._delaunator=new Za(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 c=0,u=r.length;c<u;++c){const f=o[c%3===2?c-2:c+1];(r[c]===-1||a[f]===-1)&&(a[f]=c)}for(let c=0,u=i.length;c<u;++c)s[i[c]]=c;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 i1(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 c=n[e];if(c===-1)return;let u=c,f=-1;do{if(yield f=a[u],u=u%3===2?u-2:u+1,a[u]!==e)return;if(u=o[u],u===-1){const h=r[(i[e]+1)%r.length];h!==f&&(yield h);return}}while(u!==c)}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:c,points:u}=this;if(i[e]===-1||!u.length)return(e+1)%(u.length>>1);let f=e,h=Rr(n-u[e*2],2)+Rr(r-u[e*2+1],2);const l=i[e];let p=l;do{let d=c[p];const g=Rr(n-u[d*2],2)+Rr(r-u[d*2+1],2);if(g<h&&(h=g,f=d),p=p%3===2?p-2:p+1,c[p]!==e)break;if(p=s[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&Rr(n-u[p*2],2)+Rr(r-u[p*2+1],2)<h)return p;break}}while(p!==l);return f}render(e){const n=e==null?e=new Wn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const c=i[a];if(c<a)continue;const u=o[a]*2,f=o[c]*2;e.moveTo(r[u],r[u+1]),e.lineTo(r[f],r[f+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new Wn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],c=i[o+1];e.moveTo(s+n,c),e.arc(s,c,n,0,j$)}return r&&r.value()}renderHull(e){const n=e==null?e=new Wn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const c=2*r[s];e.lineTo(i[c],i[c+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new _l;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Wn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,c=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[c],i[c+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 _l;return this.renderTriangle(e,n),n.value()}}function tS(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*eS(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 o1={},Al={},Ml=34,Wi=10,$l=13;function a1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function nS(t,e){var n=a1(t);return function(r,i){return e(n(r),i,t)}}function s1(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 ne(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function rS(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function iS(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":rS(t.getUTCFullYear())+"-"+ne(t.getUTCMonth()+1,2)+"-"+ne(t.getUTCDate(),2)+(i?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"."+ne(i,3)+"Z":r?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"Z":n||e?"T"+ne(e,2)+":"+ne(n,2)+"Z":"")}function Ka(t){var e=new RegExp('["'+t+`
6
- \r]`),n=t.charCodeAt(0);function r(h,l){var p,d,g=i(h,function(m,y){if(p)return p(m,y-1);d=m,p=l?nS(m,l):a1(m)});return g.columns=d||[],g}function i(h,l){var p=[],d=h.length,g=0,m=0,y,x=d<=0,v=!1;h.charCodeAt(d-1)===Wi&&--d,h.charCodeAt(d-1)===$l&&--d;function b(){if(x)return Al;if(v)return v=!1,o1;var _,T=g,P;if(h.charCodeAt(T)===Ml){for(;g++<d&&h.charCodeAt(g)!==Ml||h.charCodeAt(++g)===Ml;);return(_=g)>=d?x=!0:(P=h.charCodeAt(g++))===Wi?v=!0:P===$l&&(v=!0,h.charCodeAt(g)===Wi&&++g),h.slice(T+1,_-1).replace(/""/g,'"')}for(;g<d;){if((P=h.charCodeAt(_=g++))===Wi)v=!0;else if(P===$l)v=!0,h.charCodeAt(g)===Wi&&++g;else if(P!==n)continue;return h.slice(T,_)}return x=!0,h.slice(T,d)}for(;(y=b())!==Al;){for(var M=[];y!==o1&&y!==Al;)M.push(y),y=b();l&&(M=l(M,m++))==null||p.push(M)}return p}function o(h,l){return h.map(function(p){return l.map(function(d){return f(p[d])}).join(t)})}function a(h,l){return l==null&&(l=s1(h)),[l.map(f).join(t)].concat(o(h,l)).join(`
7
- `)}function s(h,l){return l==null&&(l=s1(h)),o(h,l).join(`
5
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function na(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var gi=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=pr(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(Pt(f))try{f()}catch(g){o=g instanceof ic?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=pr(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{mp(d)}catch(g){o=o??[],g instanceof ic?o=di(di([],pi(o)),pi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new ic(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)mp(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)&&na(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&na(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),dp=gi.EMPTY;function gp(t){return t instanceof gi||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function mp(t){Pt(t)?t():t.unsubscribe()}var yp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},H5={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,di([t,e],pi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function bp(t){H5.setTimeout(function(){throw t})}function oc(){}function ra(t){t()}var ac=function(t){qe(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,gp(n)&&n.add(r)):r.destination=Z5,r}return e.create=function(n,r,i){return new mi(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}(gi),X5=Function.prototype.bind;function sc(t,e){return X5.call(t,e)}var V5=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){ia(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){ia(r)}else ia(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){ia(n)}},t}(),mi=function(t){qe(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Pt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&yp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&sc(n.next,s),error:n.error&&sc(n.error,s),complete:n.complete&&sc(n.complete,s)}):a=n}return o.destination=new V5(a),o}return e}(ac);function ia(t){bp(t)}function j5(t){throw t}var Z5={closed:!0,next:oc,error:j5,complete:oc},uc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function vp(t){return t}function K5(t){return t.length===0?vp:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var _e=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=J5(e)?e:new mi(e,n,r);return ra(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?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=xp(n),new n(function(i,o){var a=new mi({next:function(s){try{e(s)}catch(c){o(c),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[uc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return K5(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=xp(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 xp(t){var e;return(e=t??yp.Promise)!==null&&e!==void 0?e:Promise}function Q5(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function J5(t){return t&&t instanceof ac||Q5(t)&&gp(t)}function t6(t){return Pt(t==null?void 0:t.lift)}function Sn(t){return function(e){if(t6(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 yi(t,e,n,r,i){return new e6(t,e,n,r,i)}var e6=function(t){qe(e,t);function e(n,r,i,o,a,s){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=r?function(u){try{r(u)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(u){try{o(u)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}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}(ac),n6=rc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),bi=function(t){qe(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 _p(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new n6},e.prototype.next=function(n){var r=this;ra(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=pr(r.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(n)}}catch(u){i={error:u}}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;ra(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;ra(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?dp:(this.currentObservers=null,s.push(n),new gi(function(){r.currentObservers=null,na(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 _e;return n.source=this,n},e.create=function(n,r){return new _p(n,r)},e}(_e),_p=function(t){qe(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:dp},e}(bi),cc={now:function(){return(cc.delegate||Date).now()},delegate:void 0},r6=function(t){qe(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=cc);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,c=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+c)),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(),c=0;c<s.length&&!n.closed;c+=o?1:2)n.next(s[c]);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 c=i.now(),u=0,f=1;f<o.length&&o[f]<=c;f+=2)u=f;u&&o.splice(0,u+1)}},e}(bi),i6=function(t){qe(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(gi),wp={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,di([t,e],pi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},o6=function(t){qe(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),wp.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&&wp.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,na(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(i6),Ap=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=cc.now,t}(),a6=function(t){qe(e,t);function e(n,r){r===void 0&&(r=Ap.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}(Ap);new a6(o6);function s6(t){return t&&Pt(t.schedule)}function u6(t){return t[t.length-1]}function Mp(t){return s6(u6(t))?t.pop():void 0}var $p=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Sp(t){return Pt(t==null?void 0:t.then)}function Tp(t){return Pt(t[uc])}function Dp(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Pp(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 c6(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var kp=c6();function Ep(t){return Pt(t==null?void 0:t[kp])}function Lp(t){return W5(this,arguments,function(){var e,n,r,i;return pp(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,dr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,dr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,dr(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 Np(t){return Pt(t==null?void 0:t.getReader)}function sn(t){if(t instanceof _e)return t;if(t!=null){if(Tp(t))return l6(t);if($p(t))return f6(t);if(Sp(t))return h6(t);if(Dp(t))return Rp(t);if(Ep(t))return p6(t);if(Np(t))return d6(t)}throw Pp(t)}function l6(t){return new _e(function(e){var n=t[uc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function f6(t){return new _e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function h6(t){return new _e(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,bp)})}function p6(t){return new _e(function(e){var n,r;try{for(var i=pr(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 Rp(t){return new _e(function(e){g6(t,e).catch(function(n){return e.error(n)})})}function d6(t){return Rp(Lp(t))}function g6(t,e){var n,r,i,o;return Y5(this,void 0,void 0,function(){var a,s;return pp(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=q5(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.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 Tn(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 Cp(t,e){return e===void 0&&(e=0),Sn(function(n,r){n.subscribe(yi(r,function(i){return Tn(r,t,function(){return r.next(i)},e)},function(){return Tn(r,t,function(){return r.complete()},e)},function(i){return Tn(r,t,function(){return r.error(i)},e)}))})}function Ip(t,e){return e===void 0&&(e=0),Sn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function m6(t,e){return sn(t).pipe(Ip(e),Cp(e))}function y6(t,e){return sn(t).pipe(Ip(e),Cp(e))}function b6(t,e){return new _e(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function v6(t,e){return new _e(function(n){var r;return Tn(n,e,function(){r=t[kp](),Tn(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 Pt(r==null?void 0:r.return)&&r.return()}})}function Fp(t,e){if(!t)throw new Error("Iterable cannot be null");return new _e(function(n){Tn(n,e,function(){var r=t[Symbol.asyncIterator]();Tn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function x6(t,e){return Fp(Lp(t),e)}function _6(t,e){if(t!=null){if(Tp(t))return m6(t,e);if($p(t))return b6(t,e);if(Sp(t))return y6(t,e);if(Dp(t))return Fp(t,e);if(Ep(t))return v6(t,e);if(Np(t))return x6(t,e)}throw Pp(t)}function w6(t,e){return e?_6(t,e):sn(t)}rc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function zp(t,e){return Sn(function(n,r){var i=0;n.subscribe(yi(r,function(o){r.next(t.call(e,o,i++))}))})}function A6(t,e,n,r,i,o,a,s){var c=[],u=0,f=0,h=!1,l=function(){h&&!c.length&&!u&&e.complete()},p=function(g){return u<r?d(g):c.push(g)},d=function(g){u++;var m=!1;sn(n(g,f++)).subscribe(yi(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{u--;for(var y=function(){var x=c.shift();a||d(x)};c.length&&u<r;)y();l()}catch(x){e.error(x)}}))};return t.subscribe(yi(e,p,function(){h=!0,l()})),function(){}}function Op(t,e,n){return n===void 0&&(n=1/0),Pt(e)?Op(function(r,i){return zp(function(o,a){return e(r,o,i,a)})(sn(t(r,i)))},n):(typeof e=="number"&&(n=e),Sn(function(r,i){return A6(r,i,t,n)}))}function M6(t){return Op(vp,t)}function $6(){return M6(1)}function Gp(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return $6()(w6(t,Mp(t)))}function S6(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new bi}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,c=s===void 0?!0:s;return function(u){var f,h,l,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),f=l=void 0,d=g=!1},x=function(){var v=f;y(),v==null||v.unsubscribe()};return Sn(function(v,b){p++,!g&&!d&&m();var M=l=l??n();b.add(function(){p--,p===0&&!g&&!d&&(h=lc(x,c))}),M.subscribe(b),!f&&p>0&&(f=new mi({next:function(_){return M.next(_)},error:function(_){g=!0,m(),h=lc(y,i,_),M.error(_)},complete:function(){d=!0,m(),h=lc(y,a),M.complete()}}),sn(v).subscribe(f))})(u)}}function lc(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 mi({next:function(){i.unsubscribe(),t()}});return sn(e.apply(void 0,di([],pi(n)))).subscribe(i)}}function T6(t,e,n){var r,i=!1;return r=t,S6({connector:function(){return new r6(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function D6(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Mp(t);return Sn(function(r,i){(n?Gp(t,r,n):Gp(t,r)).subscribe(i)})}function P6(t){return Sn(function(e,n){sn(t).subscribe(yi(n,function(){return n.complete()},oc)),!n.closed&&e.subscribe(n)})}const fc=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=sr.scaleDomain,scaleRange:i=sr.scaleRange})=>{const o=r[0]??sr.scaleDomain[0],a=r[1]??sr.scaleDomain[1],s=i[0]??sr.scaleRange[0],c=i[1]??sr.scaleRange[1],u=o==="auto"?e:o,f=a==="auto"?t:a;let h=n*s,l=n*c;return fp().domain([u,f]).range([h,l])},Bp=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return N5().domain(t).range(r).padding(n)},k6=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),hp().domain([-0,e+0]).range(i)};function E6({name:t,defaultParams:e,initFn:n}){const r=new bi,i=new bi,o=new WeakMap;let a=()=>{},s,c=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:u=>{c=ec(u,e)},setContext:u=>{s=u,s.observer.fullParams$=i.pipe(P6(r),D6({}),zp(f=>ec(f,c)),T6(1))}}}const oa=()=>function(t,e){return function(n){return class{constructor(){const r=E6({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}}}},vi=oa(),we=oa(),Up=oa(),Yp=oa();function xt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Wp(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function aa(t){let e,n,r;t.length!==2?(e=xt,n=(s,c)=>xt(t(s),c),r=(s,c)=>t(s)-c):(e=t===xt||t===Wp?t:L6,n=t,r=t);function i(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<0?u=h+1:f=h}while(u<f)}return u}function o(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<=0?u=h+1:f=h}while(u<f)}return u}function a(s,c,u=0,f=s.length){const h=i(s,c,u,f-1);return h>u&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:i,center:a,right:o}}function L6(){return 0}function sa(t){return t===null?NaN:+t}function*N6(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 qp=aa(xt),Hp=qp.right,R6=qp.left,C6=aa(sa).center,Dn=Hp;function I6(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=hc(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 Xp=Vp(hc),F6=Vp(z6);function Vp(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),c=r&&t(r),u=i.slice();return s&&c?(gr(s,u,i,o,a),gr(s,i,u,o,a),gr(s,u,i,o,a),mr(c,i,u,o,a),mr(c,u,i,o,a),mr(c,i,u,o,a)):s?(gr(s,i,u,o,a),gr(s,u,i,o,a),gr(s,i,u,o,a)):c&&(mr(c,i,u,o,a),mr(c,u,i,o,a),mr(c,i,u,o,a)),e}}function gr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function mr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function z6(t){const e=hc(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 hc(t){const e=Math.floor(t);if(e===t)return O6(t);const n=t-e,r=2*t+1;return(i,o,a,s,c)=>{if(!((s-=c)>=a))return;let u=e*o[a];const f=c*e,h=f+c;for(let l=a,p=a+f;l<p;l+=c)u+=o[Math.min(s,l)];for(let l=a,p=s;l<=p;l+=c)u+=o[Math.min(s,l+f)],i[l]=(u+n*(o[Math.max(a,l-h)]+o[Math.min(s,l+h)]))/r,u-=o[Math.max(a,l-f)]}}function O6(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const c=a*t;for(let u=i,f=i+c;u<f;u+=a)s+=r[Math.min(o,u)];for(let u=i,f=o;u<=f;u+=a)s+=r[Math.min(o,u+c)],n[u]=s/e,s-=r[Math.max(i,u-c)]}}function ua(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 G6(t){return t.length|0}function B6(t){return!(t>0)}function U6(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function Y6(t){return e=>t(...e)}function W6(...t){const e=typeof t[t.length-1]=="function"&&Y6(t.pop());t=t.map(U6);const n=t.map(G6),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(B6))return o;for(;;){o.push(i.map((s,c)=>t[c][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function q6(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 jp(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 Zp(t,e){const n=jp(t,e);return n&&Math.sqrt(n)}function xi(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 kt{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 H6(t,e){const n=new kt;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 X6(t,e){const n=new kt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class _i extends Map{constructor(e,n=Jp){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(pc(this,e))}has(e){return super.has(pc(this,e))}set(e,n){return super.set(Kp(this,e),n)}delete(e){return super.delete(Qp(this,e))}}class Pn extends Set{constructor(e,n=Jp){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(pc(this,e))}add(e){return super.add(Kp(this,e))}delete(e){return super.delete(Qp(this,e))}}function pc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Kp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Qp({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Jp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function yr(t){return t}function td(t,...e){return br(t,yr,yr,e)}function ed(t,...e){return br(t,Array.from,yr,e)}function nd(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 V6(t,...e){return nd(ed(t,...e),e)}function j6(t,e,...n){return nd(id(t,e,...n),n)}function rd(t,e,...n){return br(t,yr,e,n)}function id(t,e,...n){return br(t,Array.from,e,n)}function Z6(t,...e){return br(t,yr,od,e)}function K6(t,...e){return br(t,Array.from,od,e)}function od(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function br(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new _i,c=r[a++];let u=-1;for(const f of o){const h=c(f,++u,o),l=s.get(h);l?l.push(f):s.set(h,[f])}for(const[f,h]of s)s.set(f,i(h,a));return e(s)}(t,0)}function ad(t,e){return Array.from(e,n=>t[n])}function dc(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=vr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>vr(n[i],n[o]))),ad(t,r)}return t.sort(gc(n))}function gc(t=xt){if(t===xt)return vr;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 vr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function Q6(t,e,n){return(e.length!==2?dc(rd(t,e,n),([r,i],[o,a])=>xt(i,a)||xt(r,o)):dc(td(t,n),([r,i],[o,a])=>e(i,a)||xt(r,o))).map(([r])=>r)}var J6=Array.prototype,t8=J6.slice;function mc(t){return()=>t}const e8=Math.sqrt(50),n8=Math.sqrt(10),r8=Math.sqrt(2);function ca(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>=e8?10:o>=n8?5:o>=r8?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),c=Math.round(e*u),s/u<t&&++s,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),c=Math.round(e/u),s*u<t&&++s,c*u>e&&--c),c<s&&.5<=n&&n<2?ca(t,e,n*2):[s,c,u]}function kn(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?ca(e,t,n):ca(t,e,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)c[u]=(o-u)/-a;else for(let u=0;u<s;++u)c[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)c[u]=(i+u)/-a;else for(let u=0;u<s;++u)c[u]=(i+u)*a;return c}function En(t,e,n){return e=+e,t=+t,n=+n,ca(t,e,n)[2]}function la(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?En(e,t,n):En(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function yc(t,e,n){let r;for(;;){const i=En(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function bc(t){return Math.max(1,Math.ceil(Math.log(ua(t))/Math.LN2)+1)}function sd(){var t=yr,e=xi,n=bc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,c,u=new Array(a);for(o=0;o<a;++o)u[o]=t(i[o],o,i);var f=e(u),h=f[0],l=f[1],p=n(u,h,l);if(!Array.isArray(p)){const v=l,b=+p;if(e===xi&&([h,l]=yc(h,l,b)),p=kn(h,l,b),p[0]<=h&&(c=En(h,l,b)),p[p.length-1]>=l)if(v>=l&&e===xi){const M=En(h,l,b);isFinite(M)&&(M>0?l=(Math.floor(l/M)+1)*M:M<0&&(l=(Math.ceil(l*-M)+1)/-M))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>l;)--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]:l;if(isFinite(c)){if(c>0)for(o=0;o<a;++o)(s=u[o])!=null&&h<=s&&s<=l&&y[Math.min(d,Math.floor((s-h)/c))].push(i[o]);else if(c<0){for(o=0;o<a;++o)if((s=u[o])!=null&&h<=s&&s<=l){const v=Math.floor((h-s)*c);y[Math.min(d,v+(p[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=u[o])!=null&&h<=s&&s<=l&&y[Dn(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:mc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:mc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:mc(Array.isArray(i)?t8.call(i):i),r):n},r}function wi(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 vc(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 fa(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 xc(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 ha(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?vr:gc(i);r>n;){if(r-n>600){const c=r-n+1,u=e-n+1,f=Math.log(c),h=.5*Math.exp(2*f/3),l=.5*Math.sqrt(f*h*(c-h)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(e-u*h/c+l)),d=Math.min(r,Math.floor(e+(c-u)*h/c+l));ha(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(Ai(t,n,e),i(t[r],o)>0&&Ai(t,n,r);a<s;){for(Ai(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ai(t,n,s):(++s,Ai(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ai(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ud(t,e=xt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?xt(a,i)>0:xt(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 Mi(t,e,n){if(t=Float64Array.from(N6(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return fa(t);if(e>=1)return wi(t);var r,i=(r-1)*e,o=Math.floor(i),a=wi(ha(t,o).subarray(0,o+1)),s=fa(t.subarray(o+1));return a+(s-a)*(i-o)}}function cd(t,e,n=sa){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 ld(t,e,n=sa){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,c)=>sa(n(t[c],c,t))),e<=0)return xc(r);if(e>=1)return vc(r);var r,i=Uint32Array.from(t,(s,c)=>c),o=r.length-1,a=Math.floor(o*e);return ha(i,a,0,o,(s,c)=>vr(r[s],r[c])),a=ud(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function i8(t,e,n){const r=ua(t),i=Mi(t,.75)-Mi(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function o8(t,e,n){const r=ua(t),i=Zp(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function a8(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 s8(t,e){return Mi(t,.5,e)}function u8(t,e){return ld(t,.5,e)}function*c8(t){for(const e of t)yield*e}function _c(t){return Array.from(c8(t))}function l8(t,e){const n=new _i;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 f8(t,e=h8){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function h8(t,e){return[t,e]}function un(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 p8(t,e=xt){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=xt);const i=(s,c)=>e(n[s],n[c]);let o,a;return t=Uint32Array.from(n,(s,c)=>c),t.sort(e===xt?(s,c)=>vr(n[s],n[c]):gc(i)),t.forEach((s,c)=>{const u=i(s,o===void 0?s:o);u>=0?((o===void 0||u>0)&&(o=s,a=c),r[s]=a):r[s]=NaN}),r}function d8(t,e=xt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?xt(a,i)<0:xt(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 fd(t,e=xt){if(e.length===1)return xc(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 g8(t,e=xt){if(e.length===1)return vc(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 m8(t,e){const n=fd(t,e);return n<0?void 0:n}const y8=hd(Math.random);function hd(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 b8(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 pd(t){if(!(o=t.length))return[];for(var e=-1,n=fa(t,v8),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 v8(t){return t.length}function x8(){return pd(arguments)}function _8(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 w8(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 A8(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 M8(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 $8(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 S8(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function T8(t,...e){t=new Pn(t);for(const n of e)for(const r of n)t.delete(r);return t}function D8(t,e){const n=e[Symbol.iterator](),r=new Pn;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 P8(t,...e){t=new Pn(t),e=e.map(k8);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function k8(t){return t instanceof Pn?t:new Pn(t)}function dd(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=gd(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const c=gd(a);if(r.add(c),Object.is(o,c))break}}return!0}function gd(t){return t!==null&&typeof t=="object"?t.valueOf():t}function E8(t,e){return dd(e,t)}function L8(...t){const e=new Pn;for(const n of t)for(const r of n)e.add(r);return e}function N8(t){return t}var pa=1,da=2,wc=3,$i=4,md=1e-6;function R8(t){return"translate("+t+",0)"}function C8(t){return"translate(0,"+t+")"}function I8(t){return e=>+t(e)}function F8(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function z8(){return!this.__axis}function ga(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===pa||t===$i?-1:1,f=t===$i||t===da?"x":"y",h=t===pa||t===wc?R8:C8;function l(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):N8),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+c,v=+y[y.length-1]+c,b=(e.bandwidth?F8:I8)(e.copy(),c),M=p.selection?p.selection():p,_=M.selectAll(".domain").data([null]),$=M.selectAll(".tick").data(d,e).order(),D=$.exit(),E=$.enter().append("g").attr("class","tick"),P=$.select("line"),T=$.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),$=$.merge(E),P=P.merge(E.append("line").attr("stroke","currentColor").attr(f+"2",u*o)),T=T.merge(E.append("text").attr("fill","currentColor").attr(f,u*m).attr("dy",t===pa?"0em":t===wc?"0.71em":"0.32em")),p!==M&&(_=_.transition(p),$=$.transition(p),P=P.transition(p),T=T.transition(p),D=D.transition(p).attr("opacity",md).attr("transform",function(C){return isFinite(C=b(C))?h(C+c):this.getAttribute("transform")}),E.attr("opacity",md).attr("transform",function(C){var N=this.parentNode.__axis;return h((N&&isFinite(N=N(C))?N:b(C))+c)})),D.remove(),_.attr("d",t===$i||t===da?a?"M"+u*a+","+x+"H"+c+"V"+v+"H"+u*a:"M"+c+","+x+"V"+v:a?"M"+x+","+u*a+"V"+c+"H"+v+"V"+u*a:"M"+x+","+c+"H"+v),$.attr("opacity",1).attr("transform",function(C){return h(b(C)+c)}),P.attr(f+"2",u*o),T.attr(f,u*m).text(g),M.filter(z8).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===da?"start":t===$i?"end":"middle"),M.each(function(){this.__axis=b})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(i=p,l):i},l.tickSize=function(p){return arguments.length?(o=a=+p,l):o},l.tickSizeInner=function(p){return arguments.length?(o=+p,l):o},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(s=+p,l):s},l.offset=function(p){return arguments.length?(c=+p,l):c},l}function yd(t){return ga(pa,t)}function O8(t){return ga(da,t)}function G8(t){return ga(wc,t)}function Ac(t){return ga($i,t)}var B8={value:()=>{}};function Ln(){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 U8(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=Ln.prototype={constructor:ma,on:function(t,e){var n=this._,r=U8(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=Y8(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]=bd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=bd(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 Y8(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function bd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=B8,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Mc="http://www.w3.org/1999/xhtml";const $c={svg:"http://www.w3.org/2000/svg",xhtml:Mc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Si(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),$c.hasOwnProperty(e)?{space:$c[e],local:t}:t}function W8(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Mc&&e.documentElement.namespaceURI===Mc?e.createElement(t):e.createElementNS(n,t)}}function q8(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ya(t){var e=Si(t);return(e.local?q8:W8)(e)}function H8(){}function ba(t){return t==null?H8:function(){return this.querySelector(t)}}function X8(t){typeof t!="function"&&(t=ba(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),c,u,f=0;f<a;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),s[f]=u);return new Ut(r,this._parents)}function vd(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function V8(){return[]}function Sc(t){return t==null?V8:function(){return this.querySelectorAll(t)}}function j8(t){return function(){return vd(t.apply(this,arguments))}}function Z8(t){typeof t=="function"?t=j8(t):t=Sc(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(r.push(t.call(c,c.__data__,u,a)),i.push(c));return new Ut(r,i)}function Tc(t){return function(){return this.matches(t)}}function xd(t){return function(e){return e.matches(t)}}var K8=Array.prototype.find;function Q8(t){return function(){return K8.call(this.children,t)}}function J8(){return this.firstElementChild}function t4(t){return this.select(t==null?J8:Q8(typeof t=="function"?t:xd(t)))}var e4=Array.prototype.filter;function n4(){return Array.from(this.children)}function r4(t){return function(){return e4.call(this.children,t)}}function i4(t){return this.selectAll(t==null?n4:r4(typeof t=="function"?t:xd(t)))}function o4(t){typeof t!="function"&&(t=Tc(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]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new Ut(r,this._parents)}function _d(t){return new Array(t.length)}function a4(){return new Ut(this._enter||this._groups.map(_d),this._parents)}function va(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}va.prototype={constructor:va,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 s4(t){return function(){return t}}function u4(t,e,n,r,i,o){for(var a=0,s,c=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new va(t,o[a]);for(;a<c;++a)(s=e[a])&&(i[a]=s)}function c4(t,e,n,r,i,o,a){var s,c,u=new Map,f=e.length,h=o.length,l=new Array(f),p;for(s=0;s<f;++s)(c=e[s])&&(l[s]=p=a.call(c,c.__data__,s,e)+"",u.has(p)?i[s]=c:u.set(p,c));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(c=u.get(p))?(r[s]=c,c.__data__=o[s],u.delete(p)):n[s]=new va(t,o[s]);for(s=0;s<f;++s)(c=e[s])&&u.get(l[s])===c&&(i[s]=c)}function l4(t){return t.__data__}function f4(t,e){if(!arguments.length)return Array.from(this,l4);var n=e?c4:u4,r=this._parents,i=this._groups;typeof t!="function"&&(t=s4(t));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],h=i[u],l=h.length,p=h4(t.call(f,f&&f.__data__,u,r)),d=p.length,g=s[u]=new Array(d),m=a[u]=new Array(d),y=c[u]=new Array(l);n(f,h,g,m,y,p,e);for(var x=0,v=0,b,M;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!(M=m[v])&&++v<d;);b._next=M||null}}return a=new Ut(a,r),a._enter=s,a._exit=c,a}function h4(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function p4(){return new Ut(this._exit||this._groups.map(_d),this._parents)}function d4(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 g4(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),c=0;c<a;++c)for(var u=n[c],f=r[c],h=u.length,l=s[c]=new Array(h),p,d=0;d<h;++d)(p=u[d]||f[d])&&(l[d]=p);for(;c<i;++c)s[c]=n[c];return new Ut(s,this._parents)}function m4(){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 y4(t){t||(t=b4);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}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,c=i[o]=new Array(s),u,f=0;f<s;++f)(u=a[f])&&(c[f]=u);c.sort(e)}return new Ut(i,this._parents).order()}function b4(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function v4(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function x4(){return Array.from(this)}function _4(){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 w4(){let t=0;for(const e of this)++t;return t}function A4(){return!this.node()}function M4(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 $4(t){return function(){this.removeAttribute(t)}}function S4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function T4(t,e){return function(){this.setAttribute(t,e)}}function D4(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function P4(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function k4(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 E4(t,e){var n=Si(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?S4:$4:typeof e=="function"?n.local?k4:P4:n.local?D4:T4)(n,e))}function Dc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function L4(t){return function(){this.style.removeProperty(t)}}function N4(t,e,n){return function(){this.style.setProperty(t,e,n)}}function R4(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function C4(t,e,n){return arguments.length>1?this.each((e==null?L4:typeof e=="function"?R4:N4)(t,e,n??"")):Nn(this.node(),t)}function Nn(t,e){return t.style.getPropertyValue(e)||Dc(t).getComputedStyle(t,null).getPropertyValue(e)}function I4(t){return function(){delete this[t]}}function F4(t,e){return function(){this[t]=e}}function z4(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function O4(t,e){return arguments.length>1?this.each((e==null?I4:typeof e=="function"?z4:F4)(t,e)):this.node()[t]}function wd(t){return t.trim().split(/^|\s+/)}function Pc(t){return t.classList||new Ad(t)}function Ad(t){this._node=t,this._names=wd(t.getAttribute("class")||"")}Ad.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 Md(t,e){for(var n=Pc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function $d(t,e){for(var n=Pc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function G4(t){return function(){Md(this,t)}}function B4(t){return function(){$d(this,t)}}function U4(t,e){return function(){(e.apply(this,arguments)?Md:$d)(this,t)}}function Y4(t,e){var n=wd(t+"");if(arguments.length<2){for(var r=Pc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?U4:e?G4:B4)(n,e))}function W4(){this.textContent=""}function q4(t){return function(){this.textContent=t}}function H4(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function X4(t){return arguments.length?this.each(t==null?W4:(typeof t=="function"?H4:q4)(t)):this.node().textContent}function V4(){this.innerHTML=""}function j4(t){return function(){this.innerHTML=t}}function Z4(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function K4(t){return arguments.length?this.each(t==null?V4:(typeof t=="function"?Z4:j4)(t)):this.node().innerHTML}function Q4(){this.nextSibling&&this.parentNode.appendChild(this)}function J4(){return this.each(Q4)}function tA(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function eA(){return this.each(tA)}function nA(t){var e=typeof t=="function"?t:ya(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function rA(){return null}function iA(t,e){var n=typeof t=="function"?t:ya(t),r=e==null?rA:typeof e=="function"?e:ba(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function oA(){var t=this.parentNode;t&&t.removeChild(this)}function aA(){return this.each(oA)}function sA(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function uA(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function cA(t){return this.select(t?uA:sA)}function lA(t){return arguments.length?this.property("__data__",t):this.node().__data__}function fA(t){return function(e){t.call(this,e,this.__data__)}}function hA(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 pA(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 dA(t,e,n){return function(){var r=this.__on,i,o=fA(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 gA(t,e,n){var r=hA(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,f;c<u;++c)for(i=0,f=s[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?dA:pA,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Sd(t,e,n){var r=Dc(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 mA(t,e){return function(){return Sd(this,t,e)}}function yA(t,e){return function(){return Sd(this,t,e.apply(this,arguments))}}function bA(t,e){return this.each((typeof e=="function"?yA:mA)(t,e))}function*vA(){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 kc=[null];function Ut(t,e){this._groups=t,this._parents=e}function Rn(){return new Ut([[document.documentElement]],kc)}function xA(){return this}Ut.prototype=Rn.prototype={constructor:Ut,select:X8,selectAll:Z8,selectChild:t4,selectChildren:i4,filter:o4,data:f4,enter:a4,exit:p4,join:d4,merge:g4,selection:xA,order:m4,sort:y4,call:v4,nodes:x4,node:_4,size:w4,empty:A4,each:M4,attr:E4,style:C4,property:O4,classed:Y4,text:X4,html:K4,raise:J4,lower:eA,append:nA,insert:iA,remove:aA,clone:cA,datum:lA,on:gA,dispatch:bA,[Symbol.iterator]:vA};function K(t){return typeof t=="string"?new Ut([[document.querySelector(t)]],[document.documentElement]):new Ut([[t]],kc)}function _A(t){return K(ya(t).call(document.documentElement))}var wA=0;function Td(){return new Ec}function Ec(){this._="@"+(++wA).toString(36)}Ec.prototype=Td.prototype={constructor:Ec,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 Dd(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ae(t,e){if(t=Dd(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 AA(t,e){return t.target&&(t=Dd(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ae(n,e))}function MA(t){return typeof t=="string"?new Ut([document.querySelectorAll(t)],[document.documentElement]):new Ut([vd(t)],kc)}const $A={passive:!1},Ti={capture:!0,passive:!1};function Lc(t){t.stopImmediatePropagation()}function xr(t){t.preventDefault(),t.stopImmediatePropagation()}function xa(t){var e=t.document.documentElement,n=K(t).on("dragstart.drag",xr,Ti);"onselectstart"in e?n.on("selectstart.drag",xr,Ti):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function _a(t,e){var n=t.document.documentElement,r=K(t).on("dragstart.drag",null);e&&(r.on("click.drag",xr,Ti),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 wa=t=>()=>t;function Nc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:c,dy:u,dispatch:f}){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:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Nc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function SA(t){return!t.ctrlKey&&!t.button}function TA(){return this.parentNode}function DA(t,e){return e??{x:t.x,y:t.y}}function PA(){return navigator.maxTouchPoints||"ontouchstart"in this}function Pd(){var t=SA,e=TA,n=DA,r=PA,i={},o=Ln("start","drag","end"),a=0,s,c,u,f,h=0;function l(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,$A).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,M){if(!(f||!t.call(this,b,M))){var _=v(this,e.call(this,b,M),b,M,"mouse");_&&(K(b.view).on("mousemove.drag",d,Ti).on("mouseup.drag",g,Ti),xa(b.view),Lc(b),u=!1,s=b.clientX,c=b.clientY,_("start",b))}}function d(b){if(xr(b),!u){var M=b.clientX-s,_=b.clientY-c;u=M*M+_*_>h}i.mouse("drag",b)}function g(b){K(b.view).on("mousemove.drag mouseup.drag",null),_a(b.view,u),xr(b),i.mouse("end",b)}function m(b,M){if(t.call(this,b,M)){var _=b.changedTouches,$=e.call(this,b,M),D=_.length,E,P;for(E=0;E<D;++E)(P=v(this,$,b,M,_[E].identifier,_[E]))&&(Lc(b),P("start",b,_[E]))}}function y(b){var M=b.changedTouches,_=M.length,$,D;for($=0;$<_;++$)(D=i[M[$].identifier])&&(xr(b),D("drag",b,M[$]))}function x(b){var M=b.changedTouches,_=M.length,$,D;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),$=0;$<_;++$)(D=i[M[$].identifier])&&(Lc(b),D("end",b,M[$]))}function v(b,M,_,$,D,E){var P=o.copy(),T=ae(E||_,M),C,N,A;if((A=n.call(b,new Nc("beforestart",{sourceEvent:_,target:l,identifier:D,active:a,x:T[0],y:T[1],dx:0,dy:0,dispatch:P}),$))!=null)return C=A.x-T[0]||0,N=A.y-T[1]||0,function S(w,k,L){var R=T,F;switch(w){case"start":i[D]=S,F=a++;break;case"end":delete i[D],--a;case"drag":T=ae(L||k,M),F=a;break}P.call(w,b,new Nc(w,{sourceEvent:k,subject:A,target:l,identifier:D,active:F,x:T[0]+C,y:T[1]+N,dx:T[0]-R[0],dy:T[1]-R[1],dispatch:P}),$)}}return l.filter=function(b){return arguments.length?(t=typeof b=="function"?b:wa(!!b),l):t},l.container=function(b){return arguments.length?(e=typeof b=="function"?b:wa(b),l):e},l.subject=function(b){return arguments.length?(n=typeof b=="function"?b:wa(b),l):n},l.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:wa(!!b),l):r},l.on=function(){var b=o.on.apply(o,arguments);return b===o?l:b},l.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,l):Math.sqrt(h)},l}function _r(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Di(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function cn(){}var Cn=.7,wr=1/Cn,Ar="\\s*([+-]?\\d+)\\s*",Pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kA=/^#([0-9a-f]{3,8})$/,EA=new RegExp(`^rgb\\(${Ar},${Ar},${Ar}\\)$`),LA=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),NA=new RegExp(`^rgba\\(${Ar},${Ar},${Ar},${Pi}\\)$`),RA=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${Pi}\\)$`),CA=new RegExp(`^hsl\\(${Pi},${Ee},${Ee}\\)$`),IA=new RegExp(`^hsla\\(${Pi},${Ee},${Ee},${Pi}\\)$`),kd={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};_r(cn,ln,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ed,formatHex:Ed,formatHex8:FA,formatHsl:zA,formatRgb:Ld,toString:Ld});function Ed(){return this.rgb().formatHex()}function FA(){return this.rgb().formatHex8()}function zA(){return Fd(this).formatHsl()}function Ld(){return this.rgb().formatRgb()}function ln(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=kA.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Nd(e):n===3?new Lt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Aa(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Aa(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=EA.exec(t))?new Lt(e[1],e[2],e[3],1):(e=LA.exec(t))?new Lt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=NA.exec(t))?Aa(e[1],e[2],e[3],e[4]):(e=RA.exec(t))?Aa(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=CA.exec(t))?Id(e[1],e[2]/100,e[3]/100,1):(e=IA.exec(t))?Id(e[1],e[2]/100,e[3]/100,e[4]):kd.hasOwnProperty(t)?Nd(kd[t]):t==="transparent"?new Lt(NaN,NaN,NaN,0):null}function Nd(t){return new Lt(t>>16&255,t>>8&255,t&255,1)}function Aa(t,e,n,r){return r<=0&&(t=e=n=NaN),new Lt(t,e,n,r)}function Rc(t){return t instanceof cn||(t=ln(t)),t?(t=t.rgb(),new Lt(t.r,t.g,t.b,t.opacity)):new Lt}function Mr(t,e,n,r){return arguments.length===1?Rc(t):new Lt(t,e,n,r??1)}function Lt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}_r(Lt,Mr,Di(cn,{brighter(t){return t=t==null?wr:Math.pow(wr,t),new Lt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,t),new Lt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Lt(In(this.r),In(this.g),In(this.b),Ma(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:OA,formatRgb:Cd,toString:Cd}));function Rd(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}`}function OA(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}${Fn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cd(){const t=Ma(this.opacity);return`${t===1?"rgb(":"rgba("}${In(this.r)}, ${In(this.g)}, ${In(this.b)}${t===1?")":`, ${t})`}`}function Ma(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function In(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Fn(t){return t=In(t),(t<16?"0":"")+t.toString(16)}function Id(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 Fd(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof cn||(t=ln(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,c=(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/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new Ae(a,s,c,t.opacity)}function $a(t,e,n,r){return arguments.length===1?Fd(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}_r(Ae,$a,Di(cn,{brighter(t){return t=t==null?wr:Math.pow(wr,t),new Ae(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,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 Lt(Cc(t>=240?t-240:t+120,i,r),Cc(t,i,r),Cc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(zd(this.h),Sa(this.s),Sa(this.l),Ma(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=Ma(this.opacity);return`${t===1?"hsl(":"hsla("}${zd(this.h)}, ${Sa(this.s)*100}%, ${Sa(this.l)*100}%${t===1?")":`, ${t})`}`}}));function zd(t){return t=(t||0)%360,t<0?t+360:t}function Sa(t){return Math.max(0,Math.min(1,t||0))}function Cc(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 Od=Math.PI/180,Gd=180/Math.PI,Ta=18,Bd=.96422,Ud=1,Yd=.82521,Wd=4/29,$r=6/29,qd=3*$r*$r,GA=$r*$r*$r;function Hd(t){if(t instanceof Me)return new Me(t.l,t.a,t.b,t.opacity);if(t instanceof Le)return Vd(t);t instanceof Lt||(t=Rc(t));var e=Oc(t.r),n=Oc(t.g),r=Oc(t.b),i=Ic((.2225045*e+.7168786*n+.0606169*r)/Ud),o,a;return e===n&&n===r?o=a=i:(o=Ic((.4360747*e+.3850649*n+.1430804*r)/Bd),a=Ic((.0139322*e+.0971045*n+.7141733*r)/Yd)),new Me(116*i-16,500*(o-i),200*(i-a),t.opacity)}function BA(t,e){return new Me(t,0,0,e??1)}function Da(t,e,n,r){return arguments.length===1?Hd(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}_r(Me,Da,Di(cn,{brighter(t){return new Me(this.l+Ta*(t??1),this.a,this.b,this.opacity)},darker(t){return new Me(this.l-Ta*(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=Bd*Fc(e),t=Ud*Fc(t),n=Yd*Fc(n),new Lt(zc(3.1338561*e-1.6168667*t-.4906146*n),zc(-.9787684*e+1.9161415*t+.033454*n),zc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Ic(t){return t>GA?Math.pow(t,1/3):t/qd+Wd}function Fc(t){return t>$r?t*t*t:qd*(t-Wd)}function zc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Oc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Xd(t){if(t instanceof Le)return new Le(t.h,t.c,t.l,t.opacity);if(t instanceof Me||(t=Hd(t)),t.a===0&&t.b===0)return new Le(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Gd;return new Le(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function UA(t,e,n,r){return arguments.length===1?Xd(t):new Le(n,e,t,r??1)}function Pa(t,e,n,r){return arguments.length===1?Xd(t):new Le(t,e,n,r??1)}function Le(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Vd(t){if(isNaN(t.h))return new Me(t.l,0,0,t.opacity);var e=t.h*Od;return new Me(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}_r(Le,Pa,Di(cn,{brighter(t){return new Le(this.h,this.c,this.l+Ta*(t??1),this.opacity)},darker(t){return new Le(this.h,this.c,this.l-Ta*(t??1),this.opacity)},rgb(){return Vd(this).rgb()}}));var jd=-.14861,Gc=1.78277,Bc=-.29227,ka=-.90649,ki=1.97294,Zd=ki*ka,Kd=ki*Gc,Qd=Gc*Bc-ka*jd;function YA(t){if(t instanceof zn)return new zn(t.h,t.s,t.l,t.opacity);t instanceof Lt||(t=Rc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Qd*r+Zd*e-Kd*n)/(Qd+Zd-Kd),o=r-i,a=(ki*(n-i)-Bc*o)/ka,s=Math.sqrt(a*a+o*o)/(ki*i*(1-i)),c=s?Math.atan2(a,o)*Gd-120:NaN;return new zn(c<0?c+360:c,s,i,t.opacity)}function $e(t,e,n,r){return arguments.length===1?YA(t):new zn(t,e,n,r??1)}function zn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}_r(zn,$e,Di(cn,{brighter(t){return t=t==null?wr:Math.pow(wr,t),new zn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,t),new zn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Od,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Lt(255*(e+n*(jd*r+Gc*i)),255*(e+n*(Bc*r+ka*i)),255*(e+n*(ki*r)),this.opacity)}}));function Jd(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 tg(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 Jd((n-r/e)*e,a,i,o,s)}}function eg(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 Jd((n-r/e)*e,i,o,a,s)}}const Ea=t=>()=>t;function ng(t,e){return function(n){return t+n*e}}function WA(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 La(t,e){var n=e-t;return n?ng(t,n>180||n<-180?n-360*Math.round(n/360):n):Ea(isNaN(t)?e:t)}function qA(t){return(t=+t)==1?Nt:function(e,n){return n-e?WA(e,n,t):Ea(isNaN(e)?n:e)}}function Nt(t,e){var n=e-t;return n?ng(t,n):Ea(isNaN(t)?e:t)}const Ei=function t(e){var n=qA(e);function r(i,o){var a=n((i=Mr(i)).r,(o=Mr(o)).r),s=n(i.g,o.g),c=n(i.b,o.b),u=Nt(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r}(1);function rg(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=Mr(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(c){return s.r=r(c),s.g=i(c),s.b=o(c),s+""}}}var ig=rg(tg),HA=rg(eg);function Uc(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 og(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function XA(t,e){return(og(e)?Uc:ag)(t,e)}function ag(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]=fn(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 sg(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ce(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ug(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]=fn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Yc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wc=new RegExp(Yc.source,"g");function VA(t){return function(){return t}}function jA(t){return function(e){return t(e)+""}}function qc(t,e){var n=Yc.lastIndex=Wc.lastIndex=0,r,i,o,a=-1,s=[],c=[];for(t=t+"",e=e+"";(r=Yc.exec(t))&&(i=Wc.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,c.push({i:a,x:ce(r,i)})),n=Wc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?jA(c[0].x):VA(e):(e=c.length,function(u){for(var f=0,h;f<e;++f)s[(h=c[f]).i]=h.x(u);return s.join("")})}function fn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ea(e):(n==="number"?ce:n==="string"?(r=ln(e))?(e=r,Ei):qc:e instanceof ln?Ei:e instanceof Date?sg:og(e)?Uc:Array.isArray(e)?ag:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?ug:ce)(t,e)}function ZA(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function KA(t,e){var n=La(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Na(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var cg=180/Math.PI,Hc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lg(t,e,n,r,i,o){var a,s,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*cg,skewX:Math.atan(c)*cg,scaleX:a,scaleY:s}}var Ra;function QA(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Hc:lg(e.a,e.b,e.c,e.d,e.e,e.f)}function JA(t){return t==null||(Ra||(Ra=document.createElementNS("http://www.w3.org/2000/svg","g")),Ra.setAttribute("transform",t),!(t=Ra.transform.baseVal.consolidate()))?Hc:(t=t.matrix,lg(t.a,t.b,t.c,t.d,t.e,t.f))}function fg(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:ce(u,h)},{i:g-2,x:ce(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(u,f,h,l){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ce(u,f)})):f&&h.push(i(h)+"rotate("+f+r)}function s(u,f,h,l){u!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ce(u,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ce(u,h)},{i:g-2,x:ce(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(u,f){var h=[],l=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,h,l),a(u.rotate,f.rotate,h,l),s(u.skewX,f.skewX,h,l),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,h,l),u=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var hg=fg(QA,"px, ","px)","deg)"),pg=fg(JA,", ",")",")"),t7=1e-12;function dg(t){return((t=Math.exp(t))+1/t)/2}function e7(t){return((t=Math.exp(t))-1/t)/2}function n7(t){return((t=Math.exp(2*t))-1)/(t+1)}const gg=function t(e,n,r){function i(o,a){var s=o[0],c=o[1],u=o[2],f=a[0],h=a[1],l=a[2],p=f-s,d=h-c,g=p*p+d*d,m,y;if(g<t7)y=Math.log(l/u)/e,m=function($){return[s+$*p,c+$*d,u*Math.exp(e*$*y)]};else{var x=Math.sqrt(g),v=(l*l-u*u+r*g)/(2*u*n*x),b=(l*l-u*u-r*g)/(2*l*n*x),M=Math.log(Math.sqrt(v*v+1)-v),_=Math.log(Math.sqrt(b*b+1)-b);y=(_-M)/e,m=function($){var D=$*y,E=dg(M),P=u/(n*x)*(E*n7(e*D+M)-e7(M));return[s+P*p,c+P*d,u*E/dg(e*D+M)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return t(a,s,c)},i}(Math.SQRT2,2,4);function mg(t){return function(e,n){var r=t((e=$a(e)).h,(n=$a(n)).h),i=Nt(e.s,n.s),o=Nt(e.l,n.l),a=Nt(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 r7=mg(La);var i7=mg(Nt);function o7(t,e){var n=Nt((t=Da(t)).l,(e=Da(e)).l),r=Nt(t.a,e.a),i=Nt(t.b,e.b),o=Nt(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 yg(t){return function(e,n){var r=t((e=Pa(e)).h,(n=Pa(n)).h),i=Nt(e.c,n.c),o=Nt(e.l,n.l),a=Nt(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 a7=yg(La);var s7=yg(Nt);function bg(t){return function e(n){n=+n;function r(i,o){var a=t((i=$e(i)).h,(o=$e(o)).h),s=Nt(i.s,o.s),c=Nt(i.l,o.l),u=Nt(i.opacity,o.opacity);return function(f){return i.h=a(f),i.s=s(f),i.l=c(Math.pow(f,n)),i.opacity=u(f),i+""}}return r.gamma=e,r}(1)}const u7=bg(La);var Ca=bg(Nt);function vg(t,e){e===void 0&&(e=t,t=fn);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 c7(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Sr=0,Li=0,Ni=0,xg=1e3,Ia,Ri,Fa=0,On=0,za=0,Ci=typeof performance=="object"&&performance.now?performance:Date,_g=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ii(){return On||(_g(l7),On=Ci.now()+za)}function l7(){On=0}function Fi(){this._call=this._time=this._next=null}Fi.prototype=Oa.prototype={constructor:Fi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ii():+n)+(e==null?0:+e),!this._next&&Ri!==this&&(Ri?Ri._next=this:Ia=this,Ri=this),this._call=t,this._time=n,Xc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xc())}};function Oa(t,e,n){var r=new Fi;return r.restart(t,e,n),r}function wg(){Ii(),++Sr;for(var t=Ia,e;t;)(e=On-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Sr}function Ag(){On=(Fa=Ci.now())+za,Sr=Li=0;try{wg()}finally{Sr=0,h7(),On=0}}function f7(){var t=Ci.now(),e=t-Fa;e>xg&&(za-=e,Fa=t)}function h7(){for(var t,e=Ia,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:Ia=n);Ri=t,Xc(r)}function Xc(t){if(!Sr){Li&&(Li=clearTimeout(Li));var e=t-On;e>24?(t<1/0&&(Li=setTimeout(Ag,t-Ci.now()-za)),Ni&&(Ni=clearInterval(Ni))):(Ni||(Fa=Ci.now(),Ni=setInterval(f7,xg)),Sr=1,_g(Ag))}}function Vc(t,e,n){var r=new Fi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function p7(t,e,n){var r=new Fi,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?Ii():+s,r._restart(function c(u){u+=i,r._restart(c,i+=a,s),o(u)},a,s)},r.restart(t,e,n),r)}var d7=Ln("start","end","cancel","interrupt"),g7=[],Mg=0,jc=1,Zc=2,Ga=3,$g=4,Kc=5,Ba=6;function Ua(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;m7(t,n,{name:e,index:r,group:i,on:d7,tween:g7,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Mg})}function Qc(t,e){var n=Se(t,e);if(n.state>Mg)throw new Error("too late; already scheduled");return n}function Ne(t,e){var n=Se(t,e);if(n.state>Ga)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 m7(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Oa(o,0,n.time);function o(u){n.state=jc,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var f,h,l,p;if(n.state!==jc)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===Ga)return Vc(a);p.state===$g?(p.state=Ba,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=Ba,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Vc(function(){n.state===Ga&&(n.state=$g,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Zc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Zc){for(n.state=Ga,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Kc,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===Kc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Ba,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function Gn(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>Zc&&r.state<Kc,r.state=Ba,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function y7(t){return this.each(function(){Gn(this,t)})}function b7(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 v7(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},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}o.tween=i}}function x7(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?b7:v7)(n,t,e))}function Jc(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 Se(i,r).value[e]}}function Sg(t,e){var n;return(typeof e=="number"?ce:e instanceof ln?Ei:(n=ln(e))?(e=n,Ei):qc)(t,e)}function _7(t){return function(){this.removeAttribute(t)}}function w7(t){return function(){this.removeAttributeNS(t.space,t.local)}}function A7(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 M7(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 $7(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function S7(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function T7(t,e){var n=Si(t),r=n==="transform"?pg:Sg;return this.attrTween(t,typeof e=="function"?(n.local?S7:$7)(n,r,Jc(this,"attr."+t,e)):e==null?(n.local?w7:_7)(n):(n.local?M7:A7)(n,r,e))}function D7(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function P7(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function k7(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&P7(t,o)),n}return i._value=e,i}function E7(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&D7(t,o)),n}return i._value=e,i}function L7(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=Si(t);return this.tween(n,(r.local?k7:E7)(r,e))}function N7(t,e){return function(){Qc(this,t).delay=+e.apply(this,arguments)}}function R7(t,e){return e=+e,function(){Qc(this,t).delay=e}}function C7(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?N7:R7)(e,t)):Se(this.node(),e).delay}function I7(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function F7(t,e){return e=+e,function(){Ne(this,t).duration=e}}function z7(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?I7:F7)(e,t)):Se(this.node(),e).duration}function O7(t,e){if(typeof e!="function")throw new Error;return function(){Ne(this,t).ease=e}}function G7(t){var e=this._id;return arguments.length?this.each(O7(e,t)):Se(this.node(),e).ease}function B7(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ne(this,t).ease=n}}function U7(t){if(typeof t!="function")throw new Error;return this.each(B7(this._id,t))}function Y7(t){typeof t!="function"&&(t=Tc(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]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new Re(r,this._parents,this._name,this._id)}function W7(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 c=e[s],u=n[s],f=c.length,h=a[s]=new Array(f),l,p=0;p<f;++p)(l=c[p]||u[p])&&(h[p]=l);for(;s<r;++s)a[s]=e[s];return new Re(a,this._parents,this._name,this._id)}function q7(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 H7(t,e,n){var r,i,o=q7(e)?Qc:Ne;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function X7(t,e){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(t):this.each(H7(n,t,e))}function V7(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function j7(){return this.on("end.remove",V7(this._id))}function Z7(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ba(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],c=s.length,u=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=s[l])&&(h=t.call(f,f.__data__,l,s))&&("__data__"in f&&(h.__data__=f.__data__),u[l]=h,Ua(u[l],e,n,l,u,Se(f,n)));return new Re(o,this._parents,e,n)}function K7(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Sc(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var c=r[s],u=c.length,f,h=0;h<u;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=Se(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&Ua(p,e,n,g,l,d);o.push(l),a.push(f)}return new Re(o,a,e,n)}var Q7=Rn.prototype.constructor;function J7(){return new Q7(this._groups,this._parents)}function tM(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 Tg(t){return function(){this.style.removeProperty(t)}}function eM(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 nM(t,e,n){var r,i,o;return function(){var a=Nn(this,t),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(t),Nn(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s))}}function rM(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var c=Ne(this,t),u=c.on,f=c.value[o]==null?s||(s=Tg(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(a,i=f),c.on=r}}function iM(t,e,n){var r=(t+="")=="transform"?hg:Sg;return e==null?this.styleTween(t,tM(t,r)).on("end.style."+t,Tg(t)):typeof e=="function"?this.styleTween(t,nM(t,r,Jc(this,"style."+t,e))).each(rM(this._id,t)):this.styleTween(t,eM(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 aM(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 sM(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,aM(t,e,n??""))}function uM(t){return function(){this.textContent=t}}function cM(t){return function(){var e=t(this);this.textContent=e??""}}function lM(t){return this.tween("text",typeof t=="function"?cM(Jc(this,"text",t)):uM(t==null?"":t+""))}function fM(t){return function(e){this.textContent=t.call(this,e)}}function hM(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&fM(i)),e}return r._value=t,r}function pM(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,hM(t))}function dM(){for(var t=this._name,e=this._id,n=Pg(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var f=Se(c,e);Ua(c,t,n,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Re(r,this._parents,t,n)}function gM(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var u=Ne(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),u.on=e}),i===0&&o()})}var mM=0;function Re(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Dg(t){return Rn().transition(t)}function Pg(){return++mM}var He=Rn.prototype;Re.prototype=Dg.prototype={constructor:Re,select:Z7,selectAll:K7,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:Y7,merge:W7,selection:J7,transition:dM,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:X7,attr:T7,attrTween:L7,style:iM,styleTween:sM,text:lM,textTween:pM,remove:j7,tween:x7,delay:C7,duration:z7,ease:G7,easeVarying:U7,end:gM,[Symbol.iterator]:He[Symbol.iterator]};const yM=t=>+t;function bM(t){return t*t}function vM(t){return t*(2-t)}function kg(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function xM(t){return t*t*t}function _M(t){return--t*t*t+1}function zi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var tl=3,wM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(tl),AM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(tl),Eg=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}(tl),Lg=Math.PI,Ng=Lg/2;function MM(t){return+t==1?1:1-Math.cos(t*Ng)}function $M(t){return Math.sin(t*Ng)}function Rg(t){return(1-Math.cos(Lg*t))/2}function hn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function SM(t){return hn(1-+t)}function TM(t){return 1-hn(t)}function Cg(t){return((t*=2)<=1?hn(1-t):2-hn(t-1))/2}function DM(t){return 1-Math.sqrt(1-t*t)}function PM(t){return Math.sqrt(1- --t*t)}function Ig(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var el=4/11,kM=6/11,EM=8/11,LM=3/4,NM=9/11,RM=10/11,CM=15/16,IM=21/22,FM=63/64,Ya=1/el/el;function zM(t){return 1-Oi(1-t)}function Oi(t){return(t=+t)<el?Ya*t*t:t<EM?Ya*(t-=kM)*t+LM:t<RM?Ya*(t-=NM)*t+CM:Ya*(t-=IM)*t+FM}function OM(t){return((t*=2)<=1?1-Oi(1-t):Oi(t-1)+1)/2}var nl=1.70158,GM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(nl),BM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(nl),Fg=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}(nl),Tr=2*Math.PI,rl=1,il=.3,UM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tr);function i(o){return e*hn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Tr)},i.period=function(o){return t(e,o)},i}(rl,il),Wa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tr);function i(o){return 1-e*hn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Tr)},i.period=function(o){return t(e,o)},i}(rl,il),YM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tr);function i(o){return((o=o*2-1)<0?e*hn(-o)*Math.sin((r-o)/n):2-e*hn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Tr)},i.period=function(o){return t(e,o)},i}(rl,il),WM={time:null,delay:0,duration:250,ease:zi};function qM(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 HM(t){var e,n;t instanceof Re?(e=t._id,t=t._name):(e=Pg(),(n=WM).time=Ii(),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,c,u=0;u<s;++u)(c=a[u])&&Ua(c,t,e,u,a,n||qM(c,e));return new Re(r,this._parents,t,e)}Rn.prototype.interrupt=y7,Rn.prototype.transition=HM;var XM=[null];function VM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>jc&&r.name===e)return new Re([[t]],XM,e,+i)}return null}const ol=t=>()=>t;function jM(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 ZM(t){t.stopImmediatePropagation()}function al(t){t.preventDefault(),t.stopImmediatePropagation()}var zg={name:"drag"},sl={name:"space"},Dr={name:"handle"},Pr={name:"center"};const{abs:Og,max:Ft,min:zt}=Math;function Gg(t){return[+t[0],+t[1]]}function ul(t){return[Gg(t[0]),Gg(t[1])]}var qa={name:"x",handles:["w","e"].map(Gi),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]]}},Ha={name:"y",handles:["n","s"].map(Gi),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]]}},KM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Gi),input:function(t){return t==null?null:ul(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"},Bg={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Ug={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},QM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},JM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Gi(t){return{type:t}}function t$(t){return!t.ctrlKey&&!t.button}function e$(){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 n$(){return navigator.maxTouchPoints||"ontouchstart"in this}function cl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function r$(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function i$(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function o$(){return ll(qa)}function a$(){return ll(Ha)}function s$(){return ll(KM)}function ll(t){var e=e$,n=t$,r=n$,i=!0,o=Ln("start","brush","end"),a=6,s;function c(m){var y=m.property("__brush",g).selectAll(".overlay").data([Gi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Xe.overlay).merge(y).each(function(){var v=cl(this).extent;K(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([Gi("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(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",l).filter(r).on("touchstart.brush",l).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(m,y,x){m.tween?m.on("start.brush",function(v){f(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){f(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,M=f(v,arguments),_=b.selection,$=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),D=fn(_,$);function E(P){b.selection=P===1&&$===null?null:D(P),u.call(v),M.brush()}return _!==null&&$!==null?E:E(1)}):m.each(function(){var v=this,b=arguments,M=v.__brush,_=t.input(typeof y=="function"?y.apply(v,b):y,M.extent),$=f(v,b).beforestart();Gn(v),M.selection=_===null?null:_,u.call(v),$.start(x).brush(x).end(x)})},c.clear=function(m,y){c.move(m,null,y)};function u(){var m=K(this),y=cl(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 f(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=K(this.that).datum();o.call(m,this.that,new jM(m,{sourceEvent:y,target:c,selection:t.output(this.state.selection),mode:x,dispatch:o}),v)}};function l(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"?zg:i&&m.altKey?Pr:Dr,b=t===Ha?null:QM[x],M=t===qa?null:JM[x],_=cl(y),$=_.extent,D=_.selection,E=$[0][0],P,T,C=$[0][1],N,A,S=$[1][0],w,k,L=$[1][1],R,F,z=0,Y=0,rt,Z=b&&M&&i&&m.shiftKey,J,ht,q=Array.from(m.touches||[m],Q=>{const St=Q.identifier;return Q=ae(Q,y),Q.point0=Q.slice(),Q.identifier=St,Q});Gn(y);var pt=f(y,arguments,!0).beforestart();if(x==="overlay"){D&&(rt=!0);const Q=[q[0],q[1]||q[0]];_.selection=D=[[P=t===Ha?E:zt(Q[0][0],Q[1][0]),N=t===qa?C:zt(Q[0][1],Q[1][1])],[w=t===Ha?S:Ft(Q[0][0],Q[1][0]),R=t===qa?L:Ft(Q[0][1],Q[1][1])]],q.length>1&&$t(m)}else P=D[0][0],N=D[0][1],w=D[1][0],R=D[1][1];T=P,A=N,k=w,F=R;var B=K(y).attr("pointer-events","none"),nt=B.selectAll(".overlay").attr("cursor",Xe[x]);if(m.touches)pt.moved=O,pt.ended=gt;else{var ut=K(m.view).on("mousemove.brush",O,!0).on("mouseup.brush",gt,!0);i&&ut.on("keydown.brush",Jt,!0).on("keyup.brush",te,!0),xa(m.view)}u.call(y),pt.start(m,v.name);function O(Q){for(const St of Q.changedTouches||[Q])for(const To of q)To.identifier===St.identifier&&(To.cur=ae(St,y));if(Z&&!J&&!ht&&q.length===1){const St=q[0];Og(St.cur[0]-St[0])>Og(St.cur[1]-St[1])?ht=!0:J=!0}for(const St of q)St.cur&&(St[0]=St.cur[0],St[1]=St.cur[1]);rt=!0,al(Q),$t(Q)}function $t(Q){const St=q[0],To=St.point0;var _n;switch(z=St[0]-To[0],Y=St[1]-To[1],v){case sl:case zg:{b&&(z=Ft(E-P,zt(S-w,z)),T=P+z,k=w+z),M&&(Y=Ft(C-N,zt(L-R,Y)),A=N+Y,F=R+Y);break}case Dr:{q[1]?(b&&(T=Ft(E,zt(S,q[0][0])),k=Ft(E,zt(S,q[1][0])),b=1),M&&(A=Ft(C,zt(L,q[0][1])),F=Ft(C,zt(L,q[1][1])),M=1)):(b<0?(z=Ft(E-P,zt(S-P,z)),T=P+z,k=w):b>0&&(z=Ft(E-w,zt(S-w,z)),T=P,k=w+z),M<0?(Y=Ft(C-N,zt(L-N,Y)),A=N+Y,F=R):M>0&&(Y=Ft(C-R,zt(L-R,Y)),A=N,F=R+Y));break}case Pr:{b&&(T=Ft(E,zt(S,P-z*b)),k=Ft(E,zt(S,w+z*b))),M&&(A=Ft(C,zt(L,N-Y*M)),F=Ft(C,zt(L,R+Y*M)));break}}k<T&&(b*=-1,_n=P,P=w,w=_n,_n=T,T=k,k=_n,x in Bg&&nt.attr("cursor",Xe[x=Bg[x]])),F<A&&(M*=-1,_n=N,N=R,R=_n,_n=A,A=F,F=_n,x in Ug&&nt.attr("cursor",Xe[x=Ug[x]])),_.selection&&(D=_.selection),J&&(T=D[0][0],k=D[1][0]),ht&&(A=D[0][1],F=D[1][1]),(D[0][0]!==T||D[0][1]!==A||D[1][0]!==k||D[1][1]!==F)&&(_.selection=[[T,A],[k,F]],u.call(y),pt.brush(Q,v.name))}function gt(Q){if(ZM(Q),Q.touches){if(Q.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else _a(Q.view,rt),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);B.attr("pointer-events","all"),nt.attr("cursor",Xe.overlay),_.selection&&(D=_.selection),r$(D)&&(_.selection=null,u.call(y)),pt.end(Q,v.name)}function Jt(Q){switch(Q.keyCode){case 16:{Z=b&&M;break}case 18:{v===Dr&&(b&&(w=k-z*b,P=T+z*b),M&&(R=F-Y*M,N=A+Y*M),v=Pr,$t(Q));break}case 32:{(v===Dr||v===Pr)&&(b<0?w=k-z:b>0&&(P=T-z),M<0?R=F-Y:M>0&&(N=A-Y),v=sl,nt.attr("cursor",Xe.selection),$t(Q));break}default:return}al(Q)}function te(Q){switch(Q.keyCode){case 16:{Z&&(J=ht=Z=!1,$t(Q));break}case 18:{v===Pr&&(b<0?w=k:b>0&&(P=T),M<0?R=F:M>0&&(N=A),v=Dr,$t(Q));break}case 32:{v===sl&&(Q.altKey?(b&&(w=k-z*b,P=T+z*b),M&&(R=F-Y*M,N=A+Y*M),v=Pr):(b<0?w=k:b>0&&(P=T),M<0?R=F:M>0&&(N=A),v=Dr),nt.attr("cursor",Xe[x]),$t(Q));break}default:return}al(Q)}}function p(m){f(this,arguments).moved(m)}function d(m){f(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=ul(e.apply(this,arguments)),m.dim=t,m}return c.extent=function(m){return arguments.length?(e=typeof m=="function"?m:ol(ul(m)),c):e},c.filter=function(m){return arguments.length?(n=typeof m=="function"?m:ol(!!m),c):n},c.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:ol(!!m),c):r},c.handleSize=function(m){return arguments.length?(a=+m,c):a},c.keyModifiers=function(m){return arguments.length?(i=!!m,c):i},c.on=function(){var m=o.on.apply(o,arguments);return m===o?c:m},c}var Yg=Math.abs,kr=Math.cos,Er=Math.sin,Wg=Math.PI,Xa=Wg/2,qg=Wg*2,Hg=Math.max,fl=1e-12;function hl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function u$(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function c$(){return pl(!1,!1)}function l$(){return pl(!1,!0)}function f$(){return pl(!0,!1)}function pl(t,e){var n=0,r=null,i=null,o=null;function a(s){var c=s.length,u=new Array(c),f=hl(0,c),h=new Array(c*c),l=new Array(c),p=0,d;s=Float64Array.from({length:c*c},e?(g,m)=>s[m%c][m/c|0]:(g,m)=>s[m/c|0][m%c]);for(let g=0;g<c;++g){let m=0;for(let y=0;y<c;++y)m+=s[g*c+y]+t*s[y*c+g];p+=u[g]=m}p=Hg(0,qg-n*c)/p,d=p?n:qg/c;{let g=0;r&&f.sort((m,y)=>r(u[m],u[y]));for(const m of f){const y=g;if(t){const x=hl(~c+1,c).filter(v=>v<0?s[~v*c+m]:s[m*c+v]);i&&x.sort((v,b)=>i(v<0?-s[~v*c+m]:s[m*c+v],b<0?-s[~b*c+m]:s[m*c+b]));for(const v of x)if(v<0){const b=h[~v*c+m]||(h[~v*c+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~v*c+m]*p,value:s[~v*c+m]}}else{const b=h[m*c+v]||(h[m*c+v]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*c+v]*p,value:s[m*c+v]}}l[m]={index:m,startAngle:y,endAngle:g,value:u[m]}}else{const x=hl(0,c).filter(v=>s[m*c+v]||s[v*c+m]);i&&x.sort((v,b)=>i(s[m*c+v],s[m*c+b]));for(const v of x){let b;if(m<v?(b=h[m*c+v]||(h[m*c+v]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*c+v]*p,value:s[m*c+v]}):(b=h[v*c+m]||(h[v*c+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*c+v]*p,value:s[m*c+v]},m===v&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const M=b.source;b.source=b.target,b.target=M}}l[m]={index:m,startAngle:y,endAngle:g,value:u[m]}}g+=d}}return h=Object.values(h),h.groups=l,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=Hg(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=u$(s))._=s,a):o&&o._},a}const dl=Math.PI,gl=2*dl,Bn=1e-6,h$=gl-Bn;function Xg(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function p$(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Xg;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 Bi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Xg:p$(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,c=r-e,u=i-n,f=a-e,h=s-n,l=f*f+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(l>Bn)if(!(Math.abs(h*c-u*f)>Bn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=c*c+u*u,m=p*p+d*d,y=Math.sqrt(g),x=Math.sqrt(l),v=o*Math.tan((dl-Math.acos((g+l-m)/(2*y*x)))/2),b=v/x,M=v/y;Math.abs(b-1)>Bn&&this._append`L${e+b*f},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*p>f*d)},${this._x1=e+M*c},${this._y1=n+M*u}`}}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),c=r*Math.sin(i),u=e+s,f=n+c,h=1^a,l=a?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Bn||Math.abs(this._y1-f)>Bn)&&this._append`L${u},${f}`,r&&(l<0&&(l=l%gl+gl),l>h$?this._append`A${r},${r},0,1,${h},${e-s},${n-c}A${r},${r},0,1,${h},${this._x1=u},${this._y1=f}`:l>Bn&&this._append`A${r},${r},0,${+(l>=dl)},${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 ml(){return new Bi}ml.prototype=Bi.prototype;function d$(t=3){return new Bi(+t)}var g$=Array.prototype.slice;function Un(t){return function(){return t}}function m$(t){return t.source}function y$(t){return t.target}function Vg(t){return t.radius}function b$(t){return t.startAngle}function v$(t){return t.endAngle}function x$(){return 0}function _$(){return 10}function jg(t){var e=m$,n=y$,r=Vg,i=Vg,o=b$,a=v$,s=x$,c=null;function u(){var f,h=e.apply(this,arguments),l=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=g$.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-Xa,y=a.apply(this,d)-Xa,x=+i.apply(this,(d[0]=l,d)),v=o.apply(this,d)-Xa,b=a.apply(this,d)-Xa;if(c||(c=f=ml()),p>fl&&(Yg(y-m)>p*2+fl?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,Yg(b-v)>p*2+fl?b>v?(v+=p,b-=p):(v-=p,b+=p):v=b=(v+b)/2),c.moveTo(g*kr(m),g*Er(m)),c.arc(0,0,g,m,y),m!==v||y!==b)if(t){var M=+t.apply(this,arguments),_=x-M,$=(v+b)/2;c.quadraticCurveTo(0,0,_*kr(v),_*Er(v)),c.lineTo(x*kr($),x*Er($)),c.lineTo(_*kr(b),_*Er(b))}else c.quadraticCurveTo(0,0,x*kr(v),x*Er(v)),c.arc(0,0,x,v,b);if(c.quadraticCurveTo(0,0,g*kr(m),g*Er(m)),c.closePath(),f)return c=null,f+""||null}return t&&(u.headRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Un(+f),u):t}),u.radius=function(f){return arguments.length?(r=i=typeof f=="function"?f:Un(+f),u):r},u.sourceRadius=function(f){return arguments.length?(r=typeof f=="function"?f:Un(+f),u):r},u.targetRadius=function(f){return arguments.length?(i=typeof f=="function"?f:Un(+f),u):i},u.startAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Un(+f),u):o},u.endAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Un(+f),u):a},u.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Un(+f),u):s},u.source=function(f){return arguments.length?(e=f,u):e},u.target=function(f){return arguments.length?(n=f,u):n},u.context=function(f){return arguments.length?(c=f??null,u):c},u}function w$(){return jg()}function A$(){return jg(_$)}var M$=Array.prototype,Zg=M$.slice;function $$(t,e){return t-e}function S$(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 pn=t=>()=>t;function T$(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=D$(t,e[n]))return i;return 0}function D$(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 c=t[o],u=c[0],f=c[1],h=t[s],l=h[0],p=h[1];if(P$(c,h,e))return 0;f>r!=p>r&&n<(l-u)*(r-f)/(p-f)+u&&(i=-i)}return i}function P$(t,e,n){var r;return k$(t,e,n)&&E$(t[r=+(t[0]===e[0])],n[r],e[r])}function k$(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function E$(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function L$(){}var Ve=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function yl(){var t=1,e=1,n=bc,r=c;function i(u){var f=n(u);if(Array.isArray(f))f=f.slice().sort($$);else{const h=xi(u,N$);for(f=kn(...yc(h[0],h[1],f),f);f[f.length-1]>=h[1];)f.pop();for(;f[1]<h[0];)f.shift()}return f.map(h=>o(u,h))}function o(u,f){const h=f==null?NaN:+f;if(isNaN(h))throw new Error(`invalid value: ${f}`);var l=[],p=[];return a(u,h,function(d){r(d,u,h),S$(d)>0?l.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=l.length,y;g<m;++g)if(T$((y=l[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:f,coordinates:l}}function a(u,f,h){var l=new Array,p=new Array,d,g,m,y,x,v;for(d=g=-1,y=Yn(u[0],f),Ve[y<<1].forEach(b);++d<t-1;)m=y,y=Yn(u[d+1],f),Ve[m|y<<1].forEach(b);for(Ve[y<<0].forEach(b);++g<e-1;){for(d=-1,y=Yn(u[g*t+t],f),x=Yn(u[g*t],f),Ve[y<<1|x<<2].forEach(b);++d<t-1;)m=y,y=Yn(u[g*t+t+d+1],f),v=x,x=Yn(u[g*t+d+1],f),Ve[m|y<<1|x<<2|v<<3].forEach(b);Ve[y|x<<3].forEach(b)}for(d=-1,x=u[g*t]>=f,Ve[x<<2].forEach(b);++d<t-1;)v=x,x=Yn(u[g*t+d+1],f),Ve[x<<2|v<<3].forEach(b);Ve[x<<3].forEach(b);function b(M){var _=[M[0][0]+d,M[0][1]+g],$=[M[1][0]+d,M[1][1]+g],D=s(_),E=s($),P,T;(P=p[D])?(T=l[E])?(delete p[P.end],delete l[T.start],P===T?(P.ring.push($),h(P.ring)):l[P.start]=p[T.end]={start:P.start,end:T.end,ring:P.ring.concat(T.ring)}):(delete p[P.end],P.ring.push($),p[P.end=E]=P):(P=l[E])?(T=p[D])?(delete l[P.start],delete p[T.end],P===T?(P.ring.push($),h(P.ring)):l[T.start]=p[P.end]={start:T.start,end:P.end,ring:T.ring.concat(P.ring)}):(delete l[P.start],P.ring.unshift(_),l[P.start=D]=P):l[D]=p[E]={start:D,end:E,ring:[_,$]}}}function s(u){return u[0]*2+u[1]*(t+1)*4}function c(u,f,h){u.forEach(function(l){var p=l[0],d=l[1],g=p|0,m=d|0,y=bl(f[m*t+g]);p>0&&p<t&&g===p&&(l[0]=Kg(p,bl(f[m*t+g-1]),y,h)),d>0&&d<e&&m===d&&(l[1]=Kg(d,bl(f[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(u){if(!arguments.length)return[t,e];var f=Math.floor(u[0]),h=Math.floor(u[1]);if(!(f>=0&&h>=0))throw new Error("invalid size");return t=f,e=h,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?pn(Zg.call(u)):pn(u),i):n},i.smooth=function(u){return arguments.length?(r=u?c:L$,i):r===c},i}function N$(t){return isFinite(t)?t:NaN}function Yn(t,e){return t==null?!1:+t>=e}function bl(t){return t==null||isNaN(t=+t)?-1/0:t}function Kg(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 R$(t){return t[0]}function C$(t){return t[1]}function I$(){return 1}function F$(){var t=R$,e=C$,n=I$,r=960,i=500,o=20,a=2,s=o*3,c=r+s*2>>a,u=i+s*2>>a,f=pn(20);function h(x){var v=new Float32Array(c*u),b=Math.pow(2,-a),M=-1;for(const N of x){var _=(t(N,++M,x)+s)*b,$=(e(N,M,x)+s)*b,D=+n(N,M,x);if(D&&_>=0&&_<c&&$>=0&&$<u){var E=Math.floor(_),P=Math.floor($),T=_-E-.5,C=$-P-.5;v[E+P*c]+=(1-T)*(1-C)*D,v[E+1+P*c]+=T*(1-C)*D,v[E+1+(P+1)*c]+=T*C*D,v[E+(P+1)*c]+=(1-T)*C*D}}return Xp({data:v,width:c,height:u},o*b),v}function l(x){var v=h(x),b=f(v),M=Math.pow(2,2*a);return Array.isArray(b)||(b=kn(Number.MIN_VALUE,wi(v)/M,b)),yl().size([c,u]).thresholds(b.map(_=>_*M))(v).map((_,$)=>(_.value=+b[$],p(_)))}l.contours=function(x){var v=h(x),b=yl().size([c,u]),M=Math.pow(2,2*a),_=$=>{$=+$;var D=p(b.contour(v,$*M));return D.value=$,D};return Object.defineProperty(_,"max",{get:()=>wi(v)/M}),_};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,c=r+s*2>>a,u=i+s*2>>a,l}return l.x=function(x){return arguments.length?(t=typeof x=="function"?x:pn(+x),l):t},l.y=function(x){return arguments.length?(e=typeof x=="function"?x:pn(+x),l):e},l.weight=function(x){return arguments.length?(n=typeof x=="function"?x:pn(+x),l):n},l.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()},l.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()},l.thresholds=function(x){return arguments.length?(f=typeof x=="function"?x:Array.isArray(x)?pn(Zg.call(x)):pn(x),l):f},l.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()},l}const je=11102230246251565e-32,Ot=134217729,z$=(3+8*je)*je;function vl(t,e,n,r,i){let o,a,s,c,u=e[0],f=r[0],h=0,l=0;f>u==f>-u?(o=u,u=e[++h]):(o=f,f=r[++l]);let p=0;if(h<t&&l<n)for(f>u==f>-u?(a=u+o,s=o-(a-u),u=e[++h]):(a=f+o,s=o-(a-f),f=r[++l]),o=a,s!==0&&(i[p++]=s);h<t&&l<n;)f>u==f>-u?(a=o+u,c=a-o,s=o-(a-c)+(u-c),u=e[++h]):(a=o+f,c=a-o,s=o-(a-c)+(f-c),f=r[++l]),o=a,s!==0&&(i[p++]=s);for(;h<t;)a=o+u,c=a-o,s=o-(a-c)+(u-c),u=e[++h],o=a,s!==0&&(i[p++]=s);for(;l<n;)a=o+f,c=a-o,s=o-(a-c)+(f-c),f=r[++l],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function O$(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Ui(t){return new Float64Array(t)}const G$=(3+16*je)*je,B$=(2+12*je)*je,U$=(9+64*je)*je*je,Lr=Ui(4),Qg=Ui(8),Jg=Ui(12),t1=Ui(16),Yt=Ui(4);function Y$(t,e,n,r,i,o,a){let s,c,u,f,h,l,p,d,g,m,y,x,v,b,M,_,$,D;const E=t-i,P=n-i,T=e-o,C=r-o;b=E*C,l=Ot*E,p=l-(l-E),d=E-p,l=Ot*C,g=l-(l-C),m=C-g,M=d*m-(b-p*g-d*g-p*m),_=T*P,l=Ot*T,p=l-(l-T),d=T-p,l=Ot*P,g=l-(l-P),m=P-g,$=d*m-(_-p*g-d*g-p*m),y=M-$,h=M-y,Lr[0]=M-(y+h)+(h-$),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Lr[1]=v-(y+h)+(h-_),D=x+y,h=D-x,Lr[2]=x-(D-h)+(y-h),Lr[3]=D;let N=O$(4,Lr),A=B$*a;if(N>=A||-N>=A||(h=t-E,s=t-(E+h)+(h-i),h=n-P,u=n-(P+h)+(h-i),h=e-T,c=e-(T+h)+(h-o),h=r-C,f=r-(C+h)+(h-o),s===0&&c===0&&u===0&&f===0)||(A=U$*a+z$*Math.abs(N),N+=E*f+C*s-(T*u+P*c),N>=A||-N>=A))return N;b=s*C,l=Ot*s,p=l-(l-s),d=s-p,l=Ot*C,g=l-(l-C),m=C-g,M=d*m-(b-p*g-d*g-p*m),_=c*P,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*P,g=l-(l-P),m=P-g,$=d*m-(_-p*g-d*g-p*m),y=M-$,h=M-y,Yt[0]=M-(y+h)+(h-$),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Yt[1]=v-(y+h)+(h-_),D=x+y,h=D-x,Yt[2]=x-(D-h)+(y-h),Yt[3]=D;const S=vl(4,Lr,4,Yt,Qg);b=E*f,l=Ot*E,p=l-(l-E),d=E-p,l=Ot*f,g=l-(l-f),m=f-g,M=d*m-(b-p*g-d*g-p*m),_=T*u,l=Ot*T,p=l-(l-T),d=T-p,l=Ot*u,g=l-(l-u),m=u-g,$=d*m-(_-p*g-d*g-p*m),y=M-$,h=M-y,Yt[0]=M-(y+h)+(h-$),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Yt[1]=v-(y+h)+(h-_),D=x+y,h=D-x,Yt[2]=x-(D-h)+(y-h),Yt[3]=D;const w=vl(S,Qg,4,Yt,Jg);b=s*f,l=Ot*s,p=l-(l-s),d=s-p,l=Ot*f,g=l-(l-f),m=f-g,M=d*m-(b-p*g-d*g-p*m),_=c*u,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*u,g=l-(l-u),m=u-g,$=d*m-(_-p*g-d*g-p*m),y=M-$,h=M-y,Yt[0]=M-(y+h)+(h-$),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Yt[1]=v-(y+h)+(h-_),D=x+y,h=D-x,Yt[2]=x-(D-h)+(y-h),Yt[3]=D;const k=vl(w,Jg,4,Yt,t1);return t1[k-1]}function Va(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),c=a-s,u=Math.abs(a+s);return Math.abs(c)>=G$*u?c:-Y$(t,e,n,r,i,o,u)}const e1=Math.pow(2,-52),ja=new Uint32Array(512);class Za{static from(e,n=V$,r=j$){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 Za(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,c=1/0,u=-1/0,f=-1/0;for(let E=0;E<a;E++){const P=e[2*E],T=e[2*E+1];P<s&&(s=P),T<c&&(c=T),P>u&&(u=P),T>f&&(f=T),this._ids[E]=E}const h=(s+u)/2,l=(c+f)/2;let p,d,g;for(let E=0,P=1/0;E<a;E++){const T=xl(h,l,e[2*E],e[2*E+1]);T<P&&(p=E,P=T)}const m=e[2*p],y=e[2*p+1];for(let E=0,P=1/0;E<a;E++){if(E===p)continue;const T=xl(m,y,e[2*E],e[2*E+1]);T<P&&T>0&&(d=E,P=T)}let x=e[2*d],v=e[2*d+1],b=1/0;for(let E=0;E<a;E++){if(E===p||E===d)continue;const P=H$(m,y,x,v,e[2*E],e[2*E+1]);P<b&&(g=E,b=P)}let M=e[2*g],_=e[2*g+1];if(b===1/0){for(let T=0;T<a;T++)this._dists[T]=e[2*T]-e[0]||e[2*T+1]-e[1];Nr(this._ids,this._dists,0,a-1);const E=new Uint32Array(a);let P=0;for(let T=0,C=-1/0;T<a;T++){const N=this._ids[T],A=this._dists[N];A>C&&(E[P++]=N,C=A)}this.hull=E.subarray(0,P),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Va(m,y,x,v,M,_)<0){const E=d,P=x,T=v;d=g,x=M,v=_,g=E,M=P,_=T}const $=X$(m,y,x,v,M,_);this._cx=$.x,this._cy=$.y;for(let E=0;E<a;E++)this._dists[E]=xl(e[2*E],e[2*E+1],$.x,$.y);Nr(this._ids,this._dists,0,a-1),this._hullStart=p;let D=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(M,_)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let E=0,P,T;E<this._ids.length;E++){const C=this._ids[E],N=e[2*C],A=e[2*C+1];if(E>0&&Math.abs(N-P)<=e1&&Math.abs(A-T)<=e1||(P=N,T=A,C===p||C===d||C===g))continue;let S=0;for(let F=0,z=this._hashKey(N,A);F<this._hashSize&&(S=o[(z+F)%this._hashSize],!(S!==-1&&S!==r[S]));F++);S=n[S];let w=S,k;for(;k=r[w],Va(N,A,e[2*w],e[2*w+1],e[2*k],e[2*k+1])>=0;)if(w=k,w===S){w=-1;break}if(w===-1)continue;let L=this._addTriangle(w,C,r[w],-1,-1,i[w]);i[C]=this._legalize(L+2),i[w]=L,D++;let R=r[w];for(;k=r[R],Va(N,A,e[2*R],e[2*R+1],e[2*k],e[2*k+1])<0;)L=this._addTriangle(R,C,k,i[C],-1,i[R]),i[C]=this._legalize(L+2),r[R]=R,D--,R=k;if(w===S)for(;k=n[w],Va(N,A,e[2*k],e[2*k+1],e[2*w],e[2*w+1])<0;)L=this._addTriangle(k,C,w,-1,i[w],i[k]),this._legalize(L+2),i[k]=L,r[w]=w,D--,w=k;this._hullStart=n[C]=w,r[w]=n[R]=C,r[C]=R,o[this._hashKey(N,A)]=C,o[this._hashKey(e[2*w],e[2*w+1])]=w}this.hull=new Uint32Array(D);for(let E=0,P=this._hullStart;E<D;E++)this.hull[E]=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(W$(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],c=e-e%3;if(a=c+(e+2)%3,s===-1){if(o===0)break;e=ja[--o];continue}const u=s-s%3,f=c+(e+1)%3,h=u+(s+2)%3,l=n[a],p=n[e],d=n[f],g=n[h];if(q$(i[2*l],i[2*l+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]=l;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=u+(s+1)%3;o<ja.length&&(ja[o++]=x)}else{if(o===0)break;e=ja[--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 W$(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function xl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function q$(t,e,n,r,i,o,a,s){const c=t-a,u=e-s,f=n-a,h=r-s,l=i-a,p=o-s,d=c*c+u*u,g=f*f+h*h,m=l*l+p*p;return c*(h*m-g*p)-u*(f*m-g*l)+d*(f*p-h*l)<0}function H$(t,e,n,r,i,o){const a=n-t,s=r-e,c=i-t,u=o-e,f=a*a+s*s,h=c*c+u*u,l=.5/(a*u-s*c),p=(u*f-s*h)*l,d=(a*h-c*f)*l;return p*p+d*d}function X$(t,e,n,r,i,o){const a=n-t,s=r-e,c=i-t,u=o-e,f=a*a+s*s,h=c*c+u*u,l=.5/(a*u-s*c),p=t+(u*f-s*h)*l,d=e+(a*h-c*f)*l;return{x:p,y:d}}function Nr(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;Yi(t,i,o),e[t[n]]>e[t[r]]&&Yi(t,n,r),e[t[o]]>e[t[r]]&&Yi(t,o,r),e[t[n]]>e[t[o]]&&Yi(t,n,o);const s=t[o],c=e[s];for(;;){do o++;while(e[t[o]]<c);do a--;while(e[t[a]]>c);if(a<o)break;Yi(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Nr(t,e,o,r),Nr(t,e,n,a-1)):(Nr(t,e,n,a-1),Nr(t,e,o,r))}}function Yi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function V$(t){return t[0]}function j$(t){return t[1]}const n1=1e-6;class Wn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>n1||Math.abs(this._y1-o)>n1)&&(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 _l{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 r1{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,M=r[g+1]*2,_=r[g+2]*2,$=e[b],D=e[b+1],E=e[M],P=e[M+1],T=e[_],C=e[_+1],N=E-$,A=P-D,S=T-$,w=C-D,k=(N*w-A*S)*2;if(Math.abs(k)<1e-9){if(o===void 0){o=a=0;for(const R of n)o+=e[R*2],a+=e[R*2+1];o/=n.length,a/=n.length}const L=1e9*Math.sign((o-$)*w-(a-D)*S);x=($+T)/2-L*w,v=(D+C)/2+L*S}else{const L=1/k,R=N*N+A*A,F=S*S+w*w;x=$+(w*R-A*F)*L,v=D+(N*F-S*R)*L}s[m]=x,s[m+1]=v}let c=n[n.length-1],u,f=c*4,h,l=e[2*c],p,d=e[2*c+1];i.fill(0);for(let g=0;g<n.length;++g)c=n[g],u=f,h=l,p=d,f=c*4,l=e[2*c],d=e[2*c+1],i[u+2]=i[f]=p-d,i[u+3]=i[f+1]=l-h}render(e){const n=e==null?e=new Wn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let f=0,h=r.length;f<h;++f){const l=r[f];if(l<f)continue;const p=Math.floor(f/3)*2,d=Math.floor(l/3)*2,g=a[p],m=a[p+1],y=a[d],x=a[d+1];this._renderSegment(g,m,y,x,e)}let c,u=o[o.length-1];for(let f=0;f<o.length;++f){c=u,u=o[f];const h=Math.floor(i[u]/3)*2,l=a[h],p=a[h+1],d=c*4,g=this._project(l,p,s[d+2],s[d+3]);g&&this._renderSegment(l,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new Wn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new Wn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new _l;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),c=this._regioncode(r,i);s===0&&c===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,c))&&(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,c=i.length;s<c;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+c-2)%c]&&n[(o+3)%a]===i[(s+c-1)%c]){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 c=a;do{const u=Math.floor(c/3);if(s.push(n[u*2],n[u*2+1]),c=c%3===2?c-2:c+1,o[c]!==e)break;c=i[c]}while(c!==a&&c!==-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],c=n[r-1],u,f=this._regioncode(s,c),h,l=0;for(let p=0;p<r;p+=2)if(o=s,a=c,s=n[p],c=n[p+1],u=f,f=this._regioncode(s,c),u===0&&f===0)h=l,l=0,i?i.push(s,c):i=[s,c];else{let d,g,m,y,x;if(u===0){if((d=this._clipSegment(o,a,s,c,u,f))===null)continue;[g,m,y,x]=d}else{if((d=this._clipSegment(s,c,o,a,f,u))===null)continue;[y,x,g,m]=d,h=l,l=this._edgecode(g,m),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(g,m):i=[g,m]}h=l,l=this._edgecode(y,x),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(y,x):i=[y,x]}if(i)h=l,l=this._edgecode(i[0],i[1]),h&&l&&this._edge(e,h,l,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 c,u,f=o||a;f&8?(c=e+(r-e)*(this.ymax-n)/(i-n),u=this.ymax):f&4?(c=e+(r-e)*(this.ymin-n)/(i-n),u=this.ymin):f&2?(u=n+(i-n)*(this.xmax-e)/(r-e),c=this.xmax):(u=n+(i-n)*(this.xmin-e)/(r-e),c=this.xmin),o?(e=c,n=u,o=this._regioncode(e,n)):(r=c,i=u,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),c;if((c=this._project(s[0],s[1],r,i))&&s.unshift(c[0],c[1]),(c=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(c[0],c[1]),s=this._clipFinite(e,s))for(let u=0,f=s.length,h,l=this._edgecode(s[f-2],s[f-1]);u<f;u+=2)h=l,l=this._edgecode(s[u],s[u+1]),h&&l&&(u=this._edge(e,h,l,s,u),f=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,c;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(c=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(c=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,c=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,c=n+(o=a)*i)}return[s,c]}_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 Z$=2*Math.PI,Rr=Math.pow;function K$(t){return t[0]}function Q$(t){return t[1]}function J$(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 tS(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class wl{static from(e,n=K$,r=Q$,i){return new wl("length"in e?eS(e,n,r,i):Float64Array.from(nS(e,n,r,i)))}constructor(e){this._delaunator=new Za(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&&J$(e)){this.collinear=Int32Array.from({length:n.length/2},(l,p)=>p).sort((l,p)=>n[2*l]-n[2*p]||n[2*l+1]-n[2*p+1]);const c=this.collinear[0],u=this.collinear[this.collinear.length-1],f=[n[2*c],n[2*c+1],n[2*u],n[2*u+1]],h=1e-8*Math.hypot(f[3]-f[1],f[2]-f[0]);for(let l=0,p=n.length/2;l<p;++l){const d=tS(n[2*l],n[2*l+1],h);n[2*l]=d[0],n[2*l+1]=d[1]}this._delaunator=new Za(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 c=0,u=r.length;c<u;++c){const f=o[c%3===2?c-2:c+1];(r[c]===-1||a[f]===-1)&&(a[f]=c)}for(let c=0,u=i.length;c<u;++c)s[i[c]]=c;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 r1(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 c=n[e];if(c===-1)return;let u=c,f=-1;do{if(yield f=a[u],u=u%3===2?u-2:u+1,a[u]!==e)return;if(u=o[u],u===-1){const h=r[(i[e]+1)%r.length];h!==f&&(yield h);return}}while(u!==c)}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:c,points:u}=this;if(i[e]===-1||!u.length)return(e+1)%(u.length>>1);let f=e,h=Rr(n-u[e*2],2)+Rr(r-u[e*2+1],2);const l=i[e];let p=l;do{let d=c[p];const g=Rr(n-u[d*2],2)+Rr(r-u[d*2+1],2);if(g<h&&(h=g,f=d),p=p%3===2?p-2:p+1,c[p]!==e)break;if(p=s[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&Rr(n-u[p*2],2)+Rr(r-u[p*2+1],2)<h)return p;break}}while(p!==l);return f}render(e){const n=e==null?e=new Wn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const c=i[a];if(c<a)continue;const u=o[a]*2,f=o[c]*2;e.moveTo(r[u],r[u+1]),e.lineTo(r[f],r[f+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new Wn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],c=i[o+1];e.moveTo(s+n,c),e.arc(s,c,n,0,Z$)}return r&&r.value()}renderHull(e){const n=e==null?e=new Wn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const c=2*r[s];e.lineTo(i[c],i[c+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new _l;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Wn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,c=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[c],i[c+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 _l;return this.renderTriangle(e,n),n.value()}}function eS(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*nS(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 i1={},Al={},Ml=34,Wi=10,$l=13;function o1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function rS(t,e){var n=o1(t);return function(r,i){return e(n(r),i,t)}}function a1(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 ne(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function iS(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function oS(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":iS(t.getUTCFullYear())+"-"+ne(t.getUTCMonth()+1,2)+"-"+ne(t.getUTCDate(),2)+(i?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"."+ne(i,3)+"Z":r?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"Z":n||e?"T"+ne(e,2)+":"+ne(n,2)+"Z":"")}function Ka(t){var e=new RegExp('["'+t+`
6
+ \r]`),n=t.charCodeAt(0);function r(h,l){var p,d,g=i(h,function(m,y){if(p)return p(m,y-1);d=m,p=l?rS(m,l):o1(m)});return g.columns=d||[],g}function i(h,l){var p=[],d=h.length,g=0,m=0,y,x=d<=0,v=!1;h.charCodeAt(d-1)===Wi&&--d,h.charCodeAt(d-1)===$l&&--d;function b(){if(x)return Al;if(v)return v=!1,i1;var _,$=g,D;if(h.charCodeAt($)===Ml){for(;g++<d&&h.charCodeAt(g)!==Ml||h.charCodeAt(++g)===Ml;);return(_=g)>=d?x=!0:(D=h.charCodeAt(g++))===Wi?v=!0:D===$l&&(v=!0,h.charCodeAt(g)===Wi&&++g),h.slice($+1,_-1).replace(/""/g,'"')}for(;g<d;){if((D=h.charCodeAt(_=g++))===Wi)v=!0;else if(D===$l)v=!0,h.charCodeAt(g)===Wi&&++g;else if(D!==n)continue;return h.slice($,_)}return x=!0,h.slice($,d)}for(;(y=b())!==Al;){for(var M=[];y!==i1&&y!==Al;)M.push(y),y=b();l&&(M=l(M,m++))==null||p.push(M)}return p}function o(h,l){return h.map(function(p){return l.map(function(d){return f(p[d])}).join(t)})}function a(h,l){return l==null&&(l=a1(h)),[l.map(f).join(t)].concat(o(h,l)).join(`
7
+ `)}function s(h,l){return l==null&&(l=a1(h)),o(h,l).join(`
8
8
  `)}function c(h){return h.map(u).join(`
9
- `)}function u(h){return h.map(f).join(t)}function f(h){return h==null?"":h instanceof Date?iS(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:c,formatRow:u,formatValue:f}}var Hn=Ka(","),u1=Hn.parse,oS=Hn.parseRows,aS=Hn.format,sS=Hn.formatBody,uS=Hn.formatRows,cS=Hn.formatRow,lS=Hn.formatValue,qn=Ka(" "),c1=qn.parse,fS=qn.parseRows,hS=qn.format,pS=qn.formatBody,dS=qn.formatRows,gS=qn.formatRow,mS=qn.formatValue;function yS(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})?)?$/))bS&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const bS=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function vS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function xS(t,e){return fetch(t,e).then(vS)}function _S(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function wS(t,e){return fetch(t,e).then(_S)}function AS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Qa(t,e){return fetch(t,e).then(AS)}function l1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Qa(e,n).then(function(i){return t(i,r)})}}function MS(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Ka(t);return Qa(e,n).then(function(o){return i.parse(o,r)})}var $S=l1(u1),SS=l1(c1);function TS(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 PS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function DS(t,e){return fetch(t,e).then(PS)}function Sl(t){return(e,n)=>Qa(e,n).then(r=>new DOMParser().parseFromString(r,t))}const kS=Sl("application/xml");var ES=Sl("text/html"),LS=Sl("image/svg+xml");function NS(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,c=0,u=0;for(o=0;o<a;++o)s=n[o],c+=s.x,u+=s.y;for(c=(c/a-t)*r,u=(u/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=c,s.y-=u}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 RS(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return f1(this.cover(e,n),e,n,t)}function f1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,c=t._y0,u=t._x1,f=t._y1,h,l,p,d,g,m,y,x;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+u)/2))?s=h:u=h,(m=n>=(l=(c+f)/2))?c=l:f=l,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+u)/2))?s=h:u=h,(m=n>=(l=(c+f)/2))?c=l:f=l;while((y=m<<1|g)===(x=(d>=l)<<1|p>=h));return i[x]=o,i[y]=a,t}function CS(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),c=1/0,u=1/0,f=-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<c&&(c=i),i>f&&(f=i),o<u&&(u=o),o>h&&(h=o));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;n<r;++n)f1(this,a[n],s[n],t[n]);return this}function IS(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,c,u;n>t||t>=i||r>e||e>=o;)switch(u=(e<r)<<1|t<n,c=new Array(4),c[u]=s,s=c,a*=2,u){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 FS(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function zS(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 Wt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function OS(t,e,n){var r,i=this._x0,o=this._y0,a,s,c,u,f=this._x1,h=this._y1,l=[],p=this._root,d,g;for(p&&l.push(new Wt(p,i,o,f,h)),n==null?n=1/0:(i=t-n,o=e-n,f=t+n,h=e+n,n*=n);d=l.pop();)if(!(!(p=d.node)||(a=d.x0)>f||(s=d.y0)>h||(c=d.x1)<i||(u=d.y1)<o))if(p.length){var m=(a+c)/2,y=(s+u)/2;l.push(new Wt(p[3],m,y,c,u),new Wt(p[2],a,y,m,u),new Wt(p[1],m,s,c,y),new Wt(p[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(d=l[l.length-1],l[l.length-1]=l[l.length-1-g],l[l.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 M=Math.sqrt(n=b);i=t-M,o=e-M,f=t+M,h=e+M,r=p.data}}return r}function GS(t){if(isNaN(f=+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,c=this._x1,u=this._y1,f,h,l,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=f>=(l=(a+c)/2))?a=l:c=l,(g=h>=(p=(s+u)/2))?s=p:u=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 BS(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function US(){return this._root}function YS(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function WS(t){var e=[],n,r=this._root,i,o,a,s,c;for(r&&e.push(new Wt(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,c=n.y1)&&r.length){var u=(o+s)/2,f=(a+c)/2;(i=r[3])&&e.push(new Wt(i,u,f,s,c)),(i=r[2])&&e.push(new Wt(i,o,f,u,c)),(i=r[1])&&e.push(new Wt(i,u,a,s,f)),(i=r[0])&&e.push(new Wt(i,o,a,u,f))}return this}function HS(t){var e=[],n=[],r;for(this._root&&e.push(new Wt(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,c=r.x1,u=r.y1,f=(a+c)/2,h=(s+u)/2;(o=i[0])&&e.push(new Wt(o,a,s,f,h)),(o=i[1])&&e.push(new Wt(o,f,s,c,h)),(o=i[2])&&e.push(new Wt(o,a,h,f,u)),(o=i[3])&&e.push(new Wt(o,f,h,c,u))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function qS(t){return t[0]}function XS(t){return arguments.length?(this._x=t,this):this._x}function VS(t){return t[1]}function jS(t){return arguments.length?(this._y=t,this):this._y}function Ja(t,e,n){var r=new Tl(e??qS,n??VS,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Tl(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 h1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ht=Ja.prototype=Tl.prototype;Ht.copy=function(){var t=new Tl(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=h1(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]=h1(r));return t},Ht.add=RS,Ht.addAll=CS,Ht.cover=IS,Ht.data=FS,Ht.extent=zS,Ht.find=OS,Ht.remove=GS,Ht.removeAll=BS,Ht.root=US,Ht.size=YS,Ht.visit=WS,Ht.visitAfter=HS,Ht.x=XS,Ht.y=jS;function Et(t){return function(){return t}}function dn(t){return(t()-.5)*1e-6}function ZS(t){return t.x+t.vx}function KS(t){return t.y+t.vy}function p1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Et(t==null?1:+t));function a(){for(var u,f=e.length,h,l,p,d,g,m,y=0;y<o;++y)for(h=Ja(e,ZS,KS).visitAfter(s),u=0;u<f;++u)l=e[u],g=n[l.index],m=g*g,p=l.x+l.vx,d=l.y+l.vy,h.visit(x);function x(v,b,M,_,T){var P=v.data,E=v.r,k=g+E;if(P){if(P.index>l.index){var S=p-P.x-P.vx,C=d-P.y-P.vy,N=S*S+C*C;N<k*k&&(S===0&&(S=dn(r),N+=S*S),C===0&&(C=dn(r),N+=C*C),N=(k-(N=Math.sqrt(N)))/N*i,l.vx+=(S*=N)*(k=(E*=E)/(m+E)),l.vy+=(C*=N)*k,P.vx-=S*(k=1-k),P.vy-=C*k)}return}return b>p+k||_<p-k||M>d+k||T<d-k}}function s(u){if(u.data)return u.r=n[u.data.index];for(var f=u.r=0;f<4;++f)u[f]&&u[f].r>u.r&&(u.r=u[f].r)}function c(){if(e){var u,f=e.length,h;for(n=new Array(f),u=0;u<f;++u)h=e[u],n[h.index]=+t(h,u,e)}}return a.initialize=function(u,f){e=u,r=f,c()},a.iterations=function(u){return arguments.length?(o=+u,a):o},a.strength=function(u){return arguments.length?(i=+u,a):i},a.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Et(+u),c(),a):t},a}function QS(t){return t.index}function d1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function JS(t){var e=QS,n=h,r,i=Et(30),o,a,s,c,u,f=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function l(m){for(var y=0,x=t.length;y<f;++y)for(var v=0,b,M,_,T,P,E,k;v<x;++v)b=t[v],M=b.source,_=b.target,T=_.x+_.vx-M.x-M.vx||dn(u),P=_.y+_.vy-M.y-M.vy||dn(u),E=Math.sqrt(T*T+P*P),E=(E-o[v])/E*m*r[v],T*=E,P*=E,_.vx-=T*(k=c[v]),_.vy-=P*k,M.vx+=T*(k=1-k),M.vy+=P*k}function p(){if(a){var m,y=a.length,x=t.length,v=new Map(a.map((M,_)=>[e(M,_,a),M])),b;for(m=0,s=new Array(y);m<x;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=d1(v,b.source)),typeof b.target!="object"&&(b.target=d1(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,c=new Array(x);m<x;++m)b=t[m],c[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 l.initialize=function(m,y){a=m,u=y,p()},l.links=function(m){return arguments.length?(t=m,p(),l):t},l.id=function(m){return arguments.length?(e=m,l):e},l.iterations=function(m){return arguments.length?(f=+m,l):f},l.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Et(+m),d(),l):n},l.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Et(+m),g(),l):i},l}const t9=1664525,e9=1013904223,g1=4294967296;function n9(){let t=1;return()=>(t=(t9*t+e9)%g1)/g1}function r9(t){return t.x}function i9(t){return t.y}var o9=10,a9=Math.PI*(3-Math.sqrt(5));function m1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,c=Oa(h),u=Ln("tick","end"),f=n9();t==null&&(t=[]);function h(){l(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function l(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=o9*Math.sqrt(.5+g),v=g*a9;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,f),g}return p(),e={tick:l,restart:function(){return c.restart(h),e},stop:function(){return c.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?(f=g,s.forEach(d),e):f},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,M,_,T,P;for(y==null?y=1/0:y*=y,x=0;x<v;++x)T=t[x],b=g-T.x,M=m-T.y,_=b*b+M*M,_<y&&(P=T,y=_);return P},on:function(g,m){return arguments.length>1?(u.on(g,m),e):u.on(g)}}}function y1(){var t,e,n,r,i=Et(-30),o,a=1,s=1/0,c=.81;function u(p){var d,g=t.length,m=Ja(t,r9,i9).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(l)}function f(){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 l(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/c<b)return b<s&&(y===0&&(y=dn(n),b+=y*y),x===0&&(x=dn(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=dn(n),b+=y*y),x===0&&(x=dn(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 u.initialize=function(p,d){t=p,n=d,f()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Et(+p),f(),u):i},u.distanceMin=function(p){return arguments.length?(a=p*p,u):Math.sqrt(a)},u.distanceMax=function(p){return arguments.length?(s=p*p,u):Math.sqrt(s)},u.theta=function(p){return arguments.length?(c=p*p,u):Math.sqrt(c)},u}function s9(t,e,n){var r,i=Et(.1),o,a;typeof t!="function"&&(t=Et(+t)),e==null&&(e=0),n==null&&(n=0);function s(u){for(var f=0,h=r.length;f<h;++f){var l=r[f],p=l.x-e||1e-6,d=l.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[f]-g)*o[f]*u/g;l.vx+=p*m,l.vy+=d*m}}function c(){if(r){var u,f=r.length;for(o=new Array(f),a=new Array(f),u=0;u<f;++u)a[u]=+t(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,c()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Et(+u),c(),s):i},s.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Et(+u),c(),s):t},s.x=function(u){return arguments.length?(e=+u,s):e},s.y=function(u){return arguments.length?(n=+u,s):n},s}function b1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var c=0,u=n.length,f;c<u;++c)f=n[c],f.vx+=(i[c]-f.x)*r[c]*s}function a(){if(n){var s,c=n.length;for(r=new Array(c),i=new Array(c),s=0;s<c;++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:Et(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function v1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var c=0,u=n.length,f;c<u;++c)f=n[c],f.vy+=(i[c]-f.y)*r[c]*s}function a(){if(n){var s,c=n.length;for(r=new Array(c),i=new Array(c),s=0;s<c;++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:Et(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function u9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ts(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 Cr(t){return t=ts(Math.abs(t)),t?t[1]:NaN}function c9(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function l9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var f9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ir(t){if(!(e=f9.exec(t)))throw new Error("invalid format: "+t);var e;return new es({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]})}Ir.prototype=es.prototype;function es(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+""}es.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 h9(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 x1;function p9(t,e){var n=ts(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(x1=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")+ts(t,Math.max(0,e+o-1))[0]}function _1(t,e){var n=ts(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 w1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:u9,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)=>_1(t*100,e),r:_1,s:p9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function A1(t){return t}var M1=Array.prototype.map,$1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function S1(t){var e=t.grouping===void 0||t.thousands===void 0?A1:c9(M1.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?A1:l9(M1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(h){h=Ir(h);var l=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,M=h.type;M==="n"?(x=!0,M="g"):w1[M]||(v===void 0&&(v=12),b=!0,M="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():"",T=g==="$"?r:/[%p]/.test(M)?a:"",P=w1[M],E=/[defgprs%]/.test(M);v=v===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function k(S){var C=_,N=T,A,$,w;if(M==="c")N=P(S)+N,S="";else{S=+S;var D=S<0||1/S<0;if(S=isNaN(S)?c:P(Math.abs(S),v),b&&(S=h9(S)),D&&+S==0&&d!=="+"&&(D=!1),C=(D?d==="("?d:s:d==="-"||d==="("?"":d)+C,N=(M==="s"?$1[8+x1/3]:"")+N+(D&&d==="("?")":""),E){for(A=-1,$=S.length;++A<$;)if(w=S.charCodeAt(A),48>w||w>57){N=(w===46?i+S.slice(A+1):S.slice(A))+N,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var L=C.length+S.length+N.length,R=L<y?new Array(y-L+1).join(l):"";switch(x&&m&&(S=e(R+S,R.length?y-N.length:1/0),R=""),p){case"<":S=C+S+N+R;break;case"=":S=C+R+S+N;break;case"^":S=R.slice(0,L=R.length>>1)+C+S+N+R.slice(L);break;default:S=R+C+S+N;break}return o(S)}return k.toString=function(){return h+""},k}function f(h,l){var p=u((h=Ir(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Cr(l)/3)))*3,g=Math.pow(10,-d),m=$1[8+d/3];return function(y){return p(g*y)+m}}return{format:u,formatPrefix:f}}var ns,Hi,Pl;T1({thousands:",",grouping:[3],currency:["$",""]});function T1(t){return ns=S1(t),Hi=ns.format,Pl=ns.formatPrefix,ns}function P1(t){return Math.max(0,-Cr(Math.abs(t)))}function D1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Cr(e)/3)))*3-Cr(Math.abs(t)))}function k1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Cr(e)-Cr(t))+1}var V=1e-6,qi=1e-12,st=Math.PI,At=st/2,rs=st/4,qt=st*2,yt=180/st,j=st/180,ct=Math.abs,Fr=Math.atan,Xt=Math.atan2,X=Math.cos,is=Math.ceil,E1=Math.exp,Dl=Math.hypot,os=Math.log,kl=Math.pow,q=Math.sin,le=Math.sign||function(t){return t>0?1:t<0?-1:0},Rt=Math.sqrt,El=Math.tan;function L1(t){return t>1?0:t<-1?st:Math.acos(t)}function Vt(t){return t>1?At:t<-1?-At:Math.asin(t)}function N1(t){return(t=q(t/2))*t}function _t(){}function as(t,e){t&&C1.hasOwnProperty(t.type)&&C1[t.type](t,e)}var R1={Feature:function(t,e){as(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)as(n[r].geometry,e)}},C1={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){Ll(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ll(n[r],e,0)},Polygon:function(t,e){I1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)I1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)as(n[r],e)}};function Ll(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 I1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ll(t[n],e,1);e.polygonEnd()}function Te(t,e){t&&R1.hasOwnProperty(t.type)?R1[t.type](t,e):as(t,e)}var ss=new kt,us=new kt,F1,z1,Nl,Rl,Cl,Ce={point:_t,lineStart:_t,lineEnd:_t,polygonStart:function(){ss=new kt,Ce.lineStart=d9,Ce.lineEnd=g9},polygonEnd:function(){var t=+ss;us.add(t<0?qt+t:t),this.lineStart=this.lineEnd=this.point=_t},sphere:function(){us.add(qt)}};function d9(){Ce.point=m9}function g9(){O1(F1,z1)}function m9(t,e){Ce.point=O1,F1=t,z1=e,t*=j,e*=j,Nl=t,Rl=X(e=e/2+rs),Cl=q(e)}function O1(t,e){t*=j,e*=j,e=e/2+rs;var n=t-Nl,r=n>=0?1:-1,i=r*n,o=X(e),a=q(e),s=Cl*a,c=Rl*o+s*X(i),u=s*r*q(i);ss.add(Xt(u,c)),Nl=t,Rl=o,Cl=a}function y9(t){return us=new kt,Te(t,Ce),us*2}function cs(t){return[Xt(t[1],t[0]),Vt(t[2])]}function Xn(t){var e=t[0],n=t[1],r=X(n);return[r*X(e),r*q(e),q(n)]}function ls(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function zr(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 Il(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function fs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function hs(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 wt,re,Mt,se,Vn,G1,B1,Or,Xi,gn,Ze,Ke={point:Fl,lineStart:Y1,lineEnd:W1,polygonStart:function(){Ke.point=H1,Ke.lineStart=b9,Ke.lineEnd=v9,Xi=new kt,Ce.polygonStart()},polygonEnd:function(){Ce.polygonEnd(),Ke.point=Fl,Ke.lineStart=Y1,Ke.lineEnd=W1,ss<0?(wt=-(Mt=180),re=-(se=90)):Xi>V?se=90:Xi<-V&&(re=-90),Ze[0]=wt,Ze[1]=Mt},sphere:function(){wt=-(Mt=180),re=-(se=90)}};function Fl(t,e){gn.push(Ze=[wt=t,Mt=t]),e<re&&(re=e),e>se&&(se=e)}function U1(t,e){var n=Xn([t*j,e*j]);if(Or){var r=zr(Or,n),i=[r[1],-r[0],0],o=zr(i,r);hs(o),o=cs(o);var a=t-Vn,s=a>0?1:-1,c=o[0]*yt*s,u,f=ct(a)>180;f^(s*Vn<c&&c<s*t)?(u=o[1]*yt,u>se&&(se=u)):(c=(c+360)%360-180,f^(s*Vn<c&&c<s*t)?(u=-o[1]*yt,u<re&&(re=u)):(e<re&&(re=e),e>se&&(se=e))),f?t<Vn?ue(wt,t)>ue(wt,Mt)&&(Mt=t):ue(t,Mt)>ue(wt,Mt)&&(wt=t):Mt>=wt?(t<wt&&(wt=t),t>Mt&&(Mt=t)):t>Vn?ue(wt,t)>ue(wt,Mt)&&(Mt=t):ue(t,Mt)>ue(wt,Mt)&&(wt=t)}else gn.push(Ze=[wt=t,Mt=t]);e<re&&(re=e),e>se&&(se=e),Or=n,Vn=t}function Y1(){Ke.point=U1}function W1(){Ze[0]=wt,Ze[1]=Mt,Ke.point=Fl,Or=null}function H1(t,e){if(Or){var n=t-Vn;Xi.add(ct(n)>180?n+(n>0?360:-360):n)}else G1=t,B1=e;Ce.point(t,e),U1(t,e)}function b9(){Ce.lineStart()}function v9(){H1(G1,B1),Ce.lineEnd(),ct(Xi)>V&&(wt=-(Mt=180)),Ze[0]=wt,Ze[1]=Mt,Or=null}function ue(t,e){return(e-=t)<0?e+360:e}function x9(t,e){return t[0]-e[0]}function q1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function _9(t){var e,n,r,i,o,a,s;if(se=Mt=-(wt=re=1/0),gn=[],Te(t,Ke),n=gn.length){for(gn.sort(x9),e=1,r=gn[0],o=[r];e<n;++e)i=gn[e],q1(r,i[0])||q1(r,i[1])?(ue(r[0],i[1])>ue(r[0],r[1])&&(r[1]=i[1]),ue(i[0],r[1])>ue(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=ue(r[1],i[0]))>a&&(a=s,wt=i[0],Mt=r[1])}return gn=Ze=null,wt===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[wt,re],[Mt,se]]}var Vi,ps,ds,gs,ms,ys,bs,vs,zl,Ol,Gl,X1,V1,jt,Zt,Kt,Pe={sphere:_t,point:Bl,lineStart:j1,lineEnd:Z1,polygonStart:function(){Pe.lineStart=M9,Pe.lineEnd=$9},polygonEnd:function(){Pe.lineStart=j1,Pe.lineEnd=Z1}};function Bl(t,e){t*=j,e*=j;var n=X(e);ji(n*X(t),n*q(t),q(e))}function ji(t,e,n){++Vi,ds+=(t-ds)/Vi,gs+=(e-gs)/Vi,ms+=(n-ms)/Vi}function j1(){Pe.point=w9}function w9(t,e){t*=j,e*=j;var n=X(e);jt=n*X(t),Zt=n*q(t),Kt=q(e),Pe.point=A9,ji(jt,Zt,Kt)}function A9(t,e){t*=j,e*=j;var n=X(e),r=n*X(t),i=n*q(t),o=q(e),a=Xt(Rt((a=Zt*o-Kt*i)*a+(a=Kt*r-jt*o)*a+(a=jt*i-Zt*r)*a),jt*r+Zt*i+Kt*o);ps+=a,ys+=a*(jt+(jt=r)),bs+=a*(Zt+(Zt=i)),vs+=a*(Kt+(Kt=o)),ji(jt,Zt,Kt)}function Z1(){Pe.point=Bl}function M9(){Pe.point=S9}function $9(){K1(X1,V1),Pe.point=Bl}function S9(t,e){X1=t,V1=e,t*=j,e*=j,Pe.point=K1;var n=X(e);jt=n*X(t),Zt=n*q(t),Kt=q(e),ji(jt,Zt,Kt)}function K1(t,e){t*=j,e*=j;var n=X(e),r=n*X(t),i=n*q(t),o=q(e),a=Zt*o-Kt*i,s=Kt*r-jt*o,c=jt*i-Zt*r,u=Dl(a,s,c),f=Vt(u),h=u&&-f/u;zl.add(h*a),Ol.add(h*s),Gl.add(h*c),ps+=f,ys+=f*(jt+(jt=r)),bs+=f*(Zt+(Zt=i)),vs+=f*(Kt+(Kt=o)),ji(jt,Zt,Kt)}function T9(t){Vi=ps=ds=gs=ms=ys=bs=vs=0,zl=new kt,Ol=new kt,Gl=new kt,Te(t,Pe);var e=+zl,n=+Ol,r=+Gl,i=Dl(e,n,r);return i<qi&&(e=ys,n=bs,r=vs,ps<V&&(e=ds,n=gs,r=ms),i=Dl(e,n,r),i<qi)?[NaN,NaN]:[Xt(n,e)*yt,Vt(r/i)*yt]}function Gr(t){return function(){return t}}function Ul(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 Yl(t,e){return ct(t)>st&&(t-=Math.round(t/qt)*qt),[t,e]}Yl.invert=Yl;function Wl(t,e,n){return(t%=qt)?e||n?Ul(J1(t),tm(e,n)):J1(t):e||n?tm(e,n):Yl}function Q1(t){return function(e,n){return e+=t,ct(e)>st&&(e-=Math.round(e/qt)*qt),[e,n]}}function J1(t){var e=Q1(t);return e.invert=Q1(-t),e}function tm(t,e){var n=X(t),r=q(t),i=X(e),o=q(e);function a(s,c){var u=X(c),f=X(s)*u,h=q(s)*u,l=q(c),p=l*n+f*r;return[Xt(h*i-p*o,f*n-l*r),Vt(p*i+h*o)]}return a.invert=function(s,c){var u=X(c),f=X(s)*u,h=q(s)*u,l=q(c),p=l*i-h*o;return[Xt(h*i+l*o,f*n+p*r),Vt(p*n-f*r)]},a}function em(t){t=Wl(t[0]*j,t[1]*j,t.length>2?t[2]*j:0);function e(n){return n=t(n[0]*j,n[1]*j),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*j,n[1]*j),n[0]*=yt,n[1]*=yt,n},e}function nm(t,e,n,r,i,o){if(n){var a=X(e),s=q(e),c=r*n;i==null?(i=e+r*qt,o=e-c/2):(i=rm(a,i),o=rm(a,o),(r>0?i<o:i>o)&&(i+=r*qt));for(var u,f=i;r>0?f>o:f<o;f-=c)u=cs([a,-s*X(f),-s*q(f)]),t.point(u[0],u[1])}}function rm(t,e){e=Xn(e),e[0]-=t,hs(e);var n=L1(-e[1]);return((-e[2]<0?-n:n)+qt-V)%qt}function P9(){var t=Gr([0,0]),e=Gr(90),n=Gr(2),r,i,o={point:a};function a(c,u){r.push(c=i(c,u)),c[0]*=yt,c[1]*=yt}function s(){var c=t.apply(this,arguments),u=e.apply(this,arguments)*j,f=n.apply(this,arguments)*j;return r=[],i=Wl(-c[0]*j,-c[1]*j,0).invert,nm(o,u,f,1),c={type:"Polygon",coordinates:[r]},r=i=null,c}return s.center=function(c){return arguments.length?(t=typeof c=="function"?c:Gr([+c[0],+c[1]]),s):t},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Gr(+c),s):e},s.precision=function(c){return arguments.length?(n=typeof c=="function"?c:Gr(+c),s):n},s}function im(){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 xs(t,e){return ct(t[0]-e[0])<V&&ct(t[1]-e[1])<V}function _s(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 om(t,e,n,r,i){var o=[],a=[],s,c;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],y=d[g],x;if(xs(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*V}o.push(x=new _s(m,d,null,!0)),a.push(x.o=new _s(m,null,x,!1)),o.push(x=new _s(y,d,null,!1)),a.push(x.o=new _s(y,null,x,!0))}}),!!o.length){for(a.sort(e),am(o),am(a),s=0,c=a.length;s<c;++s)a[s].e=n=!n;for(var u=o[0],f,h;;){for(var l=u,p=!0;l.v;)if((l=l.n)===u)return;f=l.z,i.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(s=0,c=f.length;s<c;++s)i.point((h=f[s])[0],h[1]);else r(l.x,l.n.x,1,i);l=l.n}else{if(p)for(f=l.p.z,s=f.length-1;s>=0;--s)i.point((h=f[s])[0],h[1]);else r(l.x,l.p.x,-1,i);l=l.p}l=l.o,f=l.z,p=!p}while(!l.v);i.lineEnd()}}}function am(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 Hl(t){return ct(t[0])<=st?t[0]:le(t[0])*((ct(t[0])+st)%qt-st)}function sm(t,e){var n=Hl(e),r=e[1],i=q(r),o=[q(n),-X(n),0],a=0,s=0,c=new kt;i===1?r=At+V:i===-1&&(r=-At-V);for(var u=0,f=t.length;u<f;++u)if(l=(h=t[u]).length)for(var h,l,p=h[l-1],d=Hl(p),g=p[1]/2+rs,m=q(g),y=X(g),x=0;x<l;++x,d=b,m=_,y=T,p=v){var v=h[x],b=Hl(v),M=v[1]/2+rs,_=q(M),T=X(M),P=b-d,E=P>=0?1:-1,k=E*P,S=k>st,C=m*_;if(c.add(Xt(C*E*q(k),y*T+C*X(k))),a+=S?P+E*qt:P,S^d>=n^b>=n){var N=zr(Xn(p),Xn(v));hs(N);var A=zr(o,N);hs(A);var $=(S^P>=0?-1:1)*Vt(A[2]);(r>$||r===$&&(N[0]||N[1]))&&(s+=S^P>=0?1:-1)}}return(a<-V||a<V&&c<-qi)^s&1}function um(t,e,n,r){return function(i){var o=e(i),a=im(),s=e(a),c=!1,u,f,h,l={point:p,lineStart:g,lineEnd:m,polygonStart:function(){l.point=y,l.lineStart=x,l.lineEnd=v,f=[],u=[]},polygonEnd:function(){l.point=p,l.lineStart=g,l.lineEnd=m,f=_c(f);var b=sm(u,r);f.length?(c||(i.polygonStart(),c=!0),om(f,k9,b,n,i)):b&&(c||(i.polygonStart(),c=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&(i.polygonEnd(),c=!1),f=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(b,M){t(b,M)&&i.point(b,M)}function d(b,M){o.point(b,M)}function g(){l.point=d,o.lineStart()}function m(){l.point=p,o.lineEnd()}function y(b,M){h.push([b,M]),s.point(b,M)}function x(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),M=a.result(),_,T=M.length,P,E,k;if(h.pop(),u.push(h),h=null,!!T){if(b&1){if(E=M[0],(P=E.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),_=0;_<P;++_)i.point((k=E[_])[0],k[1]);i.lineEnd()}return}T>1&&b&2&&M.push(M.pop().concat(M.shift())),f.push(M.filter(D9))}}return l}}function D9(t){return t.length>1}function k9(t,e){return((t=t.x)[0]<0?t[1]-At-V:At-t[1])-((e=e.x)[0]<0?e[1]-At-V:At-e[1])}const ql=um(function(){return!0},E9,N9,[-st,-At]);function E9(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?st:-st,c=ct(o-e);ct(c-st)<V?(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&&c>=st&&(ct(e-r)<V&&(e-=r*V),ct(o-s)<V&&(o-=s*V),n=L9(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 L9(t,e,n,r){var i,o,a=q(t-n);return ct(a)>V?Fr((q(e)*(o=X(r))*q(n)-q(r)*(i=X(e))*q(t))/(i*o*a)):(e+r)/2}function N9(t,e,n,r){var i;if(t==null)i=n*At,r.point(-st,i),r.point(0,i),r.point(st,i),r.point(st,0),r.point(st,-i),r.point(0,-i),r.point(-st,-i),r.point(-st,0),r.point(-st,i);else if(ct(t[0]-e[0])>V){var o=t[0]<e[0]?st:-st;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function cm(t){var e=X(t),n=2*j,r=e>0,i=ct(e)>V;function o(f,h,l,p){nm(p,t,n,l,f,h)}function a(f,h){return X(f)*X(h)>e}function s(f){var h,l,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,y){var x=[m,y],v,b=a(m,y),M=r?b?0:u(m,y):b?u(m+(m<0?st:-st),y):0;if(!h&&(d=p=b)&&f.lineStart(),b!==p&&(v=c(h,x),(!v||xs(h,v)||xs(x,v))&&(x[2]=1)),b!==p)g=0,b?(f.lineStart(),v=c(x,h),f.point(v[0],v[1])):(v=c(h,x),f.point(v[0],v[1],2),f.lineEnd()),h=v;else if(i&&h&&r^b){var _;!(M&l)&&(_=c(x,h,!0))&&(g=0,r?(f.lineStart(),f.point(_[0][0],_[0][1]),f.point(_[1][0],_[1][1]),f.lineEnd()):(f.point(_[1][0],_[1][1]),f.lineEnd(),f.lineStart(),f.point(_[0][0],_[0][1],3)))}b&&(!h||!xs(h,x))&&f.point(x[0],x[1]),h=x,p=b,l=M},lineEnd:function(){p&&f.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function c(f,h,l){var p=Xn(f),d=Xn(h),g=[1,0,0],m=zr(p,d),y=ls(m,m),x=m[0],v=y-x*x;if(!v)return!l&&f;var b=e*y/v,M=-e*x/v,_=zr(g,m),T=fs(g,b),P=fs(m,M);Il(T,P);var E=_,k=ls(T,E),S=ls(E,E),C=k*k-S*(ls(T,T)-1);if(!(C<0)){var N=Rt(C),A=fs(E,(-k-N)/S);if(Il(A,T),A=cs(A),!l)return A;var $=f[0],w=h[0],D=f[1],L=h[1],R;w<$&&(R=$,$=w,w=R);var F=w-$,z=ct(F-st)<V,Y=z||F<V;if(!z&&L<D&&(R=D,D=L,L=R),Y?z?D+L>0^A[1]<(ct(A[0]-$)<V?D:L):D<=A[1]&&A[1]<=L:F>st^($<=A[0]&&A[0]<=w)){var rt=fs(E,(-k+N)/S);return Il(rt,T),[A,cs(rt)]}}}function u(f,h){var l=r?t:st-t,p=0;return f<-l?p|=1:f>l&&(p|=2),h<-l?p|=4:h>l&&(p|=8),p}return um(a,s,o,r?[0,-t]:[-st,t-st])}function R9(t,e,n,r,i,o){var a=t[0],s=t[1],c=e[0],u=e[1],f=0,h=1,l=c-a,p=u-s,d;if(d=n-a,!(!l&&d>0)){if(d/=l,l<0){if(d<f)return;d<h&&(h=d)}else if(l>0){if(d>h)return;d>f&&(f=d)}if(d=i-a,!(!l&&d<0)){if(d/=l,l<0){if(d>h)return;d>f&&(f=d)}else if(l>0){if(d<f)return;d<h&&(h=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<f)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>f&&(f=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>f&&(f=d)}else if(p>0){if(d<f)return;d<h&&(h=d)}return f>0&&(t[0]=a+f*l,t[1]=s+f*p),h<1&&(e[0]=a+h*l,e[1]=s+h*p),!0}}}}}var Zi=1e9,ws=-Zi;function As(t,e,n,r){function i(u,f){return t<=u&&u<=n&&e<=f&&f<=r}function o(u,f,h,l){var p=0,d=0;if(u==null||(p=a(u,h))!==(d=a(f,h))||c(u,f)<0^h>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+h+4)%4)!==d);else l.point(f[0],f[1])}function a(u,f){return ct(u[0]-t)<V?f>0?0:3:ct(u[0]-n)<V?f>0?2:1:ct(u[1]-e)<V?f>0?1:0:f>0?3:2}function s(u,f){return c(u.x,f.x)}function c(u,f){var h=a(u,1),l=a(f,1);return h!==l?h-l:h===0?f[1]-u[1]:h===1?u[0]-f[0]:h===2?u[1]-f[1]:f[0]-u[0]}return function(u){var f=u,h=im(),l,p,d,g,m,y,x,v,b,M,_,T={point:P,lineStart:C,lineEnd:N,polygonStart:k,polygonEnd:S};function P($,w){i($,w)&&f.point($,w)}function E(){for(var $=0,w=0,D=p.length;w<D;++w)for(var L=p[w],R=1,F=L.length,z=L[0],Y,rt,Z=z[0],J=z[1];R<F;++R)Y=Z,rt=J,z=L[R],Z=z[0],J=z[1],rt<=r?J>r&&(Z-Y)*(r-rt)>(J-rt)*(t-Y)&&++$:J<=r&&(Z-Y)*(r-rt)<(J-rt)*(t-Y)&&--$;return $}function k(){f=h,l=[],p=[],_=!0}function S(){var $=E(),w=_&&$,D=(l=_c(l)).length;(w||D)&&(u.polygonStart(),w&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),D&&om(l,s,$,o,u),u.polygonEnd()),f=u,l=p=d=null}function C(){T.point=A,p&&p.push(d=[]),M=!0,b=!1,x=v=NaN}function N(){l&&(A(g,m),y&&b&&h.rejoin(),l.push(h.result())),T.point=P,b&&f.lineEnd()}function A($,w){var D=i($,w);if(p&&d.push([$,w]),M)g=$,m=w,y=D,M=!1,D&&(f.lineStart(),f.point($,w));else if(D&&b)f.point($,w);else{var L=[x=Math.max(ws,Math.min(Zi,x)),v=Math.max(ws,Math.min(Zi,v))],R=[$=Math.max(ws,Math.min(Zi,$)),w=Math.max(ws,Math.min(Zi,w))];R9(L,R,t,e,n,r)?(b||(f.lineStart(),f.point(L[0],L[1])),f.point(R[0],R[1]),D||f.lineEnd(),_=!1):D&&(f.lineStart(),f.point($,w),_=!1)}x=$,v=w,b=D}return T}}function C9(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=As(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 Xl,Vl,Ms,$s,Br={sphere:_t,point:_t,lineStart:I9,lineEnd:_t,polygonStart:_t,polygonEnd:_t};function I9(){Br.point=z9,Br.lineEnd=F9}function F9(){Br.point=Br.lineEnd=_t}function z9(t,e){t*=j,e*=j,Vl=t,Ms=q(e),$s=X(e),Br.point=O9}function O9(t,e){t*=j,e*=j;var n=q(e),r=X(e),i=ct(t-Vl),o=X(i),a=q(i),s=r*a,c=$s*n-Ms*r*o,u=Ms*n+$s*r*o;Xl.add(Xt(Rt(s*s+c*c),u)),Vl=t,Ms=n,$s=r}function lm(t){return Xl=new kt,Te(t,Br),+Xl}var jl=[null,null],G9={type:"LineString",coordinates:jl};function Ss(t,e){return jl[0]=t,jl[1]=e,lm(G9)}var fm={Feature:function(t,e){return Ts(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ts(n[r].geometry,e))return!0;return!1}},hm={Sphere:function(){return!0},Point:function(t,e){return pm(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(pm(n[r],e))return!0;return!1},LineString:function(t,e){return dm(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(dm(n[r],e))return!0;return!1},Polygon:function(t,e){return gm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(gm(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ts(n[r],e))return!0;return!1}};function Ts(t,e){return t&&hm.hasOwnProperty(t.type)?hm[t.type](t,e):!1}function pm(t,e){return Ss(t,e)===0}function dm(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Ss(t[o],e),r===0||o>0&&(i=Ss(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<qi*i))return!0;n=r}return!1}function gm(t,e){return!!sm(t.map(B9),mm(e))}function B9(t){return t=t.map(mm),t.pop(),t}function mm(t){return[t[0]*j,t[1]*j]}function U9(t,e){return(t&&fm.hasOwnProperty(t.type)?fm[t.type]:Ts)(t,e)}function ym(t,e,n){var r=un(t,e-V,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function bm(t,e,n){var r=un(t,e-V,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function vm(){var t,e,n,r,i,o,a,s,c=10,u=c,f=90,h=360,l,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return un(is(r/f)*f,n,f).map(d).concat(un(is(s/h)*h,a,h).map(g)).concat(un(is(e/c)*c,t,c).filter(function(v){return ct(v%f)>V}).map(l)).concat(un(is(o/u)*u,i,u).filter(function(v){return ct(v%h)>V}).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?(f=+v[0],h=+v[1],y):[f,h]},y.stepMinor=function(v){return arguments.length?(c=+v[0],u=+v[1],y):[c,u]},y.precision=function(v){return arguments.length?(m=+v,l=ym(o,i,90),p=bm(e,t,m),d=ym(s,a,90),g=bm(r,n,m),y):m},y.extentMajor([[-180,-90+V],[180,90-V]]).extentMinor([[-180,-80-V],[180,80+V]])}function Y9(){return vm()()}function W9(t,e){var n=t[0]*j,r=t[1]*j,i=e[0]*j,o=e[1]*j,a=X(r),s=q(r),c=X(o),u=q(o),f=a*X(n),h=a*q(n),l=c*X(i),p=c*q(i),d=2*Vt(Rt(N1(o-r)+a*c*N1(i-n))),g=q(d),m=d?function(y){var x=q(y*=d)/g,v=q(d-y)/g,b=v*f+x*l,M=v*h+x*p,_=v*s+x*u;return[Xt(M,b)*yt,Xt(_,Rt(b*b+M*M))*yt]}:function(){return[n*yt,r*yt]};return m.distance=d,m}const Ki=t=>t;var Zl=new kt,Kl=new kt,xm,_m,Ql,Jl,Qe={point:_t,lineStart:_t,lineEnd:_t,polygonStart:function(){Qe.lineStart=H9,Qe.lineEnd=X9},polygonEnd:function(){Qe.lineStart=Qe.lineEnd=Qe.point=_t,Zl.add(ct(Kl)),Kl=new kt},result:function(){var t=Zl/2;return Zl=new kt,t}};function H9(){Qe.point=q9}function q9(t,e){Qe.point=wm,xm=Ql=t,_m=Jl=e}function wm(t,e){Kl.add(Jl*t-Ql*e),Ql=t,Jl=e}function X9(){wm(xm,_m)}var Ur=1/0,Ps=Ur,Qi=-Ur,Ds=Qi,ks={point:V9,lineStart:_t,lineEnd:_t,polygonStart:_t,polygonEnd:_t,result:function(){var t=[[Ur,Ps],[Qi,Ds]];return Qi=Ds=-(Ps=Ur=1/0),t}};function V9(t,e){t<Ur&&(Ur=t),t>Qi&&(Qi=t),e<Ps&&(Ps=e),e>Ds&&(Ds=e)}var tf=0,ef=0,Ji=0,Es=0,Ls=0,Yr=0,nf=0,rf=0,to=0,Am,Mm,Ie,Fe,fe={point:jn,lineStart:$m,lineEnd:Sm,polygonStart:function(){fe.lineStart=K9,fe.lineEnd=Q9},polygonEnd:function(){fe.point=jn,fe.lineStart=$m,fe.lineEnd=Sm},result:function(){var t=to?[nf/to,rf/to]:Yr?[Es/Yr,Ls/Yr]:Ji?[tf/Ji,ef/Ji]:[NaN,NaN];return tf=ef=Ji=Es=Ls=Yr=nf=rf=to=0,t}};function jn(t,e){tf+=t,ef+=e,++Ji}function $m(){fe.point=j9}function j9(t,e){fe.point=Z9,jn(Ie=t,Fe=e)}function Z9(t,e){var n=t-Ie,r=e-Fe,i=Rt(n*n+r*r);Es+=i*(Ie+t)/2,Ls+=i*(Fe+e)/2,Yr+=i,jn(Ie=t,Fe=e)}function Sm(){fe.point=jn}function K9(){fe.point=J9}function Q9(){Tm(Am,Mm)}function J9(t,e){fe.point=Tm,jn(Am=Ie=t,Mm=Fe=e)}function Tm(t,e){var n=t-Ie,r=e-Fe,i=Rt(n*n+r*r);Es+=i*(Ie+t)/2,Ls+=i*(Fe+e)/2,Yr+=i,i=Fe*t-Ie*e,nf+=i*(Ie+t),rf+=i*(Fe+e),to+=i*3,jn(Ie=t,Fe=e)}function Pm(t){this._context=t}Pm.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:_t};var of=new kt,af,Dm,km,eo,no,ro={point:_t,lineStart:function(){ro.point=tT},lineEnd:function(){af&&Em(Dm,km),ro.point=_t},polygonStart:function(){af=!0},polygonEnd:function(){af=null},result:function(){var t=+of;return of=new kt,t}};function tT(t,e){ro.point=Em,Dm=eo=t,km=no=e}function Em(t,e){eo-=t,no-=e,of.add(Rt(eo*eo+no*no)),eo=t,no=e}let Lm,Ns,Nm,Rm;class Cm{constructor(e){this._append=e==null?Im:eT(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!==Nm||this._append!==Ns){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`,Nm=r,Ns=this._append,Rm=this._,this._=i}this._+=Rm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Im(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function eT(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Im;if(e!==Lm){const n=10**e;Lm=e,Ns=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 Ns}function nT(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(Qe)),Qe.result()},a.measure=function(s){return Te(s,i(ro)),ro.result()},a.bounds=function(s){return Te(s,i(ks)),ks.result()},a.centroid=function(s){return Te(s,i(fe)),fe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,Ki):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new Cm(n)):new Pm(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 c=Math.floor(s);if(!(c>=0))throw new RangeError(`invalid digits: ${s}`);n=c}return e===null&&(o=new Cm(n)),a},a.projection(t).digits(n).context(e)}function rT(t){return{stream:io(t)}}function io(t){return function(e){var n=new sf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function sf(){}sf.prototype={constructor:sf,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 uf(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(ks)),e(ks.result()),r!=null&&t.clipExtent(r),t}function Rs(t,e,n){return uf(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,c=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,c])},n)}function cf(t,e,n){return Rs(t,[[0,0],e],n)}function lf(t,e,n){return uf(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 ff(t,e,n){return uf(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 Fm=16,iT=X(30*j);function zm(t,e){return+e?aT(t,e):oT(t)}function oT(t){return io({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function aT(t,e){function n(r,i,o,a,s,c,u,f,h,l,p,d,g,m){var y=u-r,x=f-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+l,M=s+p,_=c+d,T=Rt(b*b+M*M+_*_),P=Vt(_/=T),E=ct(ct(_)-1)<V||ct(o-h)<V?(o+h)/2:Xt(M,b),k=t(E,P),S=k[0],C=k[1],N=S-r,A=C-i,$=x*N-y*A;($*$/v>e||ct((y*N+x*A)/v-.5)>.3||a*l+s*p+c*d<iT)&&(n(r,i,o,a,s,c,S,C,E,b/=T,M/=T,_,g,m),m.point(S,C),n(S,C,E,b,M,_,u,f,h,l,p,d,g,m))}}return function(r){var i,o,a,s,c,u,f,h,l,p,d,g,m={point:y,lineStart:x,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=M},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y(P,E){P=t(P,E),r.point(P[0],P[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v(P,E){var k=Xn([P,E]),S=t(P,E);n(h,l,f,p,d,g,h=S[0],l=S[1],f=P,p=k[0],d=k[1],g=k[2],Fm,r),r.point(h,l)}function b(){m.point=y,r.lineEnd()}function M(){x(),m.point=_,m.lineEnd=T}function _(P,E){v(i=P,E),o=h,a=l,s=p,c=d,u=g,m.point=v}function T(){n(h,l,f,p,d,g,o,a,i,s,c,u,Fm,r),m.lineEnd=b,b()}return m}}var sT=io({point:function(t,e){this.stream.point(t*j,e*j)}});function uT(t){return io({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function cT(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 Om(t,e,n,r,i,o){if(!o)return cT(t,e,n,r,i);var a=X(o),s=q(o),c=a*t,u=s*t,f=a/t,h=s/t,l=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(g,m){return g*=r,m*=i,[c*g-u*m+e,n-u*g-c*m]}return d.invert=function(g,m){return[r*(f*g-h*m+l),i*(p-h*g-f*m)]},d}function ze(t){return hf(function(){return t})()}function hf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,c=0,u=0,f,h=0,l=1,p=1,d=null,g=ql,m=null,y,x,v,b=Ki,M=.5,_,T,P,E,k;function S($){return P($[0]*j,$[1]*j)}function C($){return $=P.invert($[0],$[1]),$&&[$[0]*yt,$[1]*yt]}S.stream=function($){return E&&k===$?E:E=sT(uT(f)(g(_(b(k=$)))))},S.preclip=function($){return arguments.length?(g=$,d=void 0,A()):g},S.postclip=function($){return arguments.length?(b=$,m=y=x=v=null,A()):b},S.clipAngle=function($){return arguments.length?(g=+$?cm(d=$*j):(d=null,ql),A()):d*yt},S.clipExtent=function($){return arguments.length?(b=$==null?(m=y=x=v=null,Ki):As(m=+$[0][0],y=+$[0][1],x=+$[1][0],v=+$[1][1]),A()):m==null?null:[[m,y],[x,v]]},S.scale=function($){return arguments.length?(n=+$,N()):n},S.translate=function($){return arguments.length?(r=+$[0],i=+$[1],N()):[r,i]},S.center=function($){return arguments.length?(o=$[0]%360*j,a=$[1]%360*j,N()):[o*yt,a*yt]},S.rotate=function($){return arguments.length?(s=$[0]%360*j,c=$[1]%360*j,u=$.length>2?$[2]%360*j:0,N()):[s*yt,c*yt,u*yt]},S.angle=function($){return arguments.length?(h=$%360*j,N()):h*yt},S.reflectX=function($){return arguments.length?(l=$?-1:1,N()):l<0},S.reflectY=function($){return arguments.length?(p=$?-1:1,N()):p<0},S.precision=function($){return arguments.length?(_=zm(T,M=$*$),A()):Rt(M)},S.fitExtent=function($,w){return Rs(S,$,w)},S.fitSize=function($,w){return cf(S,$,w)},S.fitWidth=function($,w){return lf(S,$,w)},S.fitHeight=function($,w){return ff(S,$,w)};function N(){var $=Om(n,0,0,l,p,h).apply(null,e(o,a)),w=Om(n,r-$[0],i-$[1],l,p,h);return f=Wl(s,c,u),T=Ul(e,w),P=Ul(f,T),_=zm(T,M),A()}function A(){return E=k=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&C,N()}}function pf(t){var e=0,n=st/3,r=hf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*j,n=o[1]*j):[e*yt,n*yt]},i}function lT(t){var e=X(t);function n(r,i){return[r*e,q(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function Gm(t,e){var n=q(t),r=(n+q(e))/2;if(ct(r)<V)return lT(t);var i=1+n*(2*r-n),o=Rt(i)/r;function a(s,c){var u=Rt(i-2*r*q(c))/r;return[u*q(s*=r),o-u*X(s)]}return a.invert=function(s,c){var u=o-c,f=Xt(s,ct(u))*le(u);return u*r<0&&(f-=st*le(s)*le(u)),[f/r,Vt((i-(s*s+u*u)*r*r)/(2*r))]},a}function Cs(){return pf(Gm).scale(155.424).center([0,33.6442])}function Bm(){return Cs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function fT(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 hT(){var t,e,n=Bm(),r,i=Cs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Cs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,c,u={point:function(l,p){c=[l,p]}};function f(l){var p=l[0],d=l[1];return c=null,r.point(p,d),c||(o.point(p,d),c)||(s.point(p,d),c)}f.invert=function(l){var p=n.scale(),d=n.translate(),g=(l[0]-d[0])/p,m=(l[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(l)},f.stream=function(l){return t&&e===l?t:t=fT([n.stream(e=l),i.stream(l),a.stream(l)])},f.precision=function(l){return arguments.length?(n.precision(l),i.precision(l),a.precision(l),h()):n.precision()},f.scale=function(l){return arguments.length?(n.scale(l),i.scale(l*.35),a.scale(l),f.translate(n.translate())):n.scale()},f.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),d=+l[0],g=+l[1];return r=n.translate(l).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(u),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+V,g+.12*p+V],[d-.214*p-V,g+.234*p-V]]).stream(u),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+V,g+.166*p+V],[d-.115*p-V,g+.234*p-V]]).stream(u),h()},f.fitExtent=function(l,p){return Rs(f,l,p)},f.fitSize=function(l,p){return cf(f,l,p)},f.fitWidth=function(l,p){return lf(f,l,p)},f.fitHeight=function(l,p){return ff(f,l,p)};function h(){return t=e=null,f}return f.scale(1070)}function Um(t){return function(e,n){var r=X(e),i=X(n),o=t(r*i);return o===1/0?[2,0]:[o*i*q(e),o*q(n)]}}function oo(t){return function(e,n){var r=Rt(e*e+n*n),i=t(r),o=q(i),a=X(i);return[Xt(e*o,r*a),Vt(r&&n*o/r)]}}var df=Um(function(t){return Rt(2/(1+t))});df.invert=oo(function(t){return 2*Vt(t/2)});function pT(){return ze(df).scale(124.75).clipAngle(180-.001)}var gf=Um(function(t){return(t=L1(t))&&t/q(t)});gf.invert=oo(function(t){return t});function dT(){return ze(gf).scale(79.4188).clipAngle(180-.001)}function ao(t,e){return[t,os(El((At+e)/2))]}ao.invert=function(t,e){return[t,2*Fr(E1(e))-At]};function gT(){return Ym(ao).scale(961/qt)}function Ym(t){var e=ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,c,u;e.scale=function(h){return arguments.length?(r(h),f()):r()},e.translate=function(h){return arguments.length?(i(h),f()):i()},e.center=function(h){return arguments.length?(n(h),f()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=c=u=null:(a=+h[0][0],s=+h[0][1],c=+h[1][0],u=+h[1][1]),f()):a==null?null:[[a,s],[c,u]]};function f(){var h=st*r(),l=e(em(e.rotate()).invert([0,0]));return o(a==null?[[l[0]-h,l[1]-h],[l[0]+h,l[1]+h]]:t===ao?[[Math.max(l[0]-h,a),s],[Math.min(l[0]+h,c),u]]:[[a,Math.max(l[1]-h,s)],[c,Math.min(l[1]+h,u)]])}return f()}function Is(t){return El((At+t)/2)}function Wm(t,e){var n=X(t),r=t===e?q(t):os(n/X(e))/os(Is(e)/Is(t)),i=n*kl(Is(t),r)/r;if(!r)return ao;function o(a,s){i>0?s<-At+V&&(s=-At+V):s>At-V&&(s=At-V);var c=i/kl(Is(s),r);return[c*q(r*a),i-c*X(r*a)]}return o.invert=function(a,s){var c=i-s,u=le(r)*Rt(a*a+c*c),f=Xt(a,ct(c))*le(c);return c*r<0&&(f-=st*le(a)*le(c)),[f/r,2*Fr(kl(i/u,1/r))-At]},o}function mT(){return pf(Wm).scale(109.5).parallels([30,30])}function so(t,e){return[t,e]}so.invert=so;function yT(){return ze(so).scale(152.63)}function Hm(t,e){var n=X(t),r=t===e?q(t):(n-X(e))/(e-t),i=n/r+t;if(ct(r)<V)return so;function o(a,s){var c=i-s,u=r*a;return[c*q(u),i-c*X(u)]}return o.invert=function(a,s){var c=i-s,u=Xt(a,ct(c))*le(c);return c*r<0&&(u-=st*le(a)*le(c)),[u/r,i-le(r)*Rt(a*a+c*c)]},o}function bT(){return pf(Hm).scale(131.154).center([0,13.9389])}var uo=1.340264,co=-.081106,lo=893e-6,fo=.003796,Fs=Rt(3)/2,vT=12;function mf(t,e){var n=Vt(Fs*q(e)),r=n*n,i=r*r*r;return[t*X(n)/(Fs*(uo+3*co*r+i*(7*lo+9*fo*r))),n*(uo+co*r+i*(lo+fo*r))]}mf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,c;o<vT&&(s=n*(uo+co*r+i*(lo+fo*r))-e,c=uo+3*co*r+i*(7*lo+9*fo*r),n-=a=s/c,r=n*n,i=r*r*r,!(ct(a)<qi));++o);return[Fs*t*(uo+3*co*r+i*(7*lo+9*fo*r))/X(n),Vt(q(n)/Fs)]};function xT(){return ze(mf).scale(177.158)}function yf(t,e){var n=X(e),r=X(t)*n;return[n*q(t)/r,q(e)/r]}yf.invert=oo(Fr);function _T(){return ze(yf).scale(144.049).clipAngle(60)}function wT(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,c=null,u,f,h,l=1,p=1,d=io({point:function(b,M){var _=v([b,M]);this.stream.point(_[0],_[1])}}),g=Ki,m,y;function x(){return l=t*r,p=t*i,m=y=null,v}function v(b){var M=b[0]*l,_=b[1]*p;if(o){var T=_*a-M*s;M=M*a+_*s,_=T}return[M+e,_+n]}return v.invert=function(b){var M=b[0]-e,_=b[1]-n;if(o){var T=_*a+M*s;M=M*a-_*s,_=T}return[M/l,_/p]},v.stream=function(b){return m&&y===b?m:m=d(g(y=b))},v.postclip=function(b){return arguments.length?(g=b,c=u=f=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(c=u=f=h=null,Ki):As(c=+b[0][0],u=+b[0][1],f=+b[1][0],h=+b[1][1]),x()):c==null?null:[[c,u],[f,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*j,s=q(o),a=X(o),x()):o*yt},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,M){return Rs(v,b,M)},v.fitSize=function(b,M){return cf(v,b,M)},v.fitWidth=function(b,M){return lf(v,b,M)},v.fitHeight=function(b,M){return ff(v,b,M)},v}function bf(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)))]}bf.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(ct(i)>V&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function AT(){return ze(bf).scale(175.295)}function vf(t,e){return[X(e)*q(t),q(e)]}vf.invert=oo(Vt);function MT(){return ze(vf).scale(249.5).clipAngle(90+V)}function xf(t,e){var n=X(e),r=1+X(t)*n;return[n*q(t)/r,q(e)/r]}xf.invert=oo(function(t){return 2*Fr(t)});function $T(){return ze(xf).scale(250).clipAngle(142)}function _f(t,e){return[os(El((At+e)/2)),-t]}_f.invert=function(t,e){return[-e,2*Fr(E1(t))-At]};function ST(){var t=Ym(_f),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 TT(t,e){return t.parent===e.parent?1:2}function PT(t){return t.reduce(DT,0)/t.length}function DT(t,e){return t+e.x}function kT(t){return 1+t.reduce(ET,0)}function ET(t,e){return Math.max(t,e.y)}function LT(t){for(var e;e=t.children;)t=e[0];return t}function NT(t){for(var e;e=t.children;)t=e[e.length-1];return t}function RT(){var t=TT,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(l){var p=l.children;p?(l.x=PT(p),l.y=kT(p)):(l.x=a?s+=t(l,a):0,l.y=0,a=l)});var c=LT(o),u=NT(o),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return o.eachAfter(r?function(l){l.x=(l.x-o.x)*e,l.y=(o.y-l.y)*n}:function(l){l.x=(l.x-f)/(h-f)*e,l.y=(1-(o.y?l.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 CT(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 IT(){return this.eachAfter(CT)}function FT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function zT(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 OT(t,e){for(var n=this,r=[n],i=[],o,a,s,c=-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,++c,this);return this}function GT(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 UT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function YT(t){for(var e=this,n=WT(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 WT(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 HT(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function qT(){return Array.from(this)}function XT(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function VT(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*jT(){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 wf(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=QT)):e===void 0&&(e=KT);for(var n=new Zn(t),r,i=[n],o,a,s,c;r=i.pop();)if((a=e(r.data))&&(c=(a=Array.from(a)).length))for(r.children=a,s=c-1;s>=0;--s)i.push(o=a[s]=new Zn(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(qm)}function ZT(){return wf(this).eachBefore(JT)}function KT(t){return t.children}function QT(t){return Array.isArray(t)?t[1]:null}function JT(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qm(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Zn(t){this.data=t,this.depth=this.height=0,this.parent=null}Zn.prototype=wf.prototype={constructor:Zn,count:IT,each:FT,eachAfter:OT,eachBefore:zT,find:GT,sum:BT,sort:UT,path:YT,ancestors:HT,descendants:qT,leaves:XT,links:VT,copy:ZT,[Symbol.iterator]:jT};function zs(t){return t==null?null:Xm(t)}function Xm(t){if(typeof t!="function")throw new Error;return t}function Kn(){return 0}function Wr(t){return function(){return t}}const tP=1664525,eP=1013904223,Vm=4294967296;function Af(){let t=1;return()=>(t=(tP*t+eP)%Vm)/Vm}function nP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function rP(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 iP(t){return jm(t,Af())}function jm(t,e){for(var n=0,r=(t=rP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&Zm(a,o)?++n:(a=aP(i=oP(i,o)),n=0);return a}function oP(t,e){var n,r;if(Mf(e,t))return[e];for(n=0;n<t.length;++n)if(Os(e,t[n])&&Mf(ho(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(Os(ho(t[n],t[r]),e)&&Os(ho(t[n],e),t[r])&&Os(ho(t[r],e),t[n])&&Mf(Km(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Os(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 Zm(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 Mf(t,e){for(var n=0;n<e.length;++n)if(!Zm(t,e[n]))return!1;return!0}function aP(t){switch(t.length){case 1:return sP(t[0]);case 2:return ho(t[0],t[1]);case 3:return Km(t[0],t[1],t[2])}}function sP(t){return{x:t.x,y:t.y,r:t.r}}function ho(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,c=o-n,u=a-r,f=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+o+c/h*f)/2,y:(r+a+u/h*f)/2,r:(h+i+s)/2}}function Km(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,c=e.r,u=n.x,f=n.y,h=n.r,l=r-a,p=r-u,d=i-s,g=i-f,m=c-o,y=h-o,x=r*r+i*i-o*o,v=x-a*a-s*s+c*c,b=x-u*u-f*f+h*h,M=p*d-l*g,_=(d*b-g*v)/(M*2)-r,T=(g*m-d*y)/M,P=(p*v-l*b)/(M*2)-i,E=(l*y-p*m)/M,k=T*T+E*E-1,S=2*(o+_*T+P*E),C=_*_+P*P-o*o,N=-(Math.abs(k)>1e-6?(S+Math.sqrt(S*S-4*k*C))/(2*k):C/S);return{x:r+_+T*N,y:i+P+E*N,r:N}}function Qm(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,c,u=r*r+a*a;u?(o=e.r+n.r,o*=o,c=t.r+n.r,c*=c,o>c?(i=(u+c-o)/(2*u),s=Math.sqrt(Math.max(0,c/u-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(u+o-c)/(2*u),s=Math.sqrt(Math.max(0,o/u-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 Jm(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 ty(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 Gs(t){this._=t,this.next=null,this.previous=null}function ey(t,e){if(!(o=(t=nP(t)).length))return 0;var n,r,i,o,a,s,c,u,f,h,l;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;Qm(r,n,i=t[2]),n=new Gs(n),r=new Gs(r),i=new Gs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<o;++c){Qm(n._,r._,i=t[c]),i=new Gs(i),u=r.next,f=n.previous,h=r._.r,l=n._.r;do if(h<=l){if(Jm(u._,i._)){r=u,n.next=r,r.previous=n,--c;continue t}h+=u._.r,u=u.next}else{if(Jm(f._,i._)){n=f,n.next=r,r.previous=n,--c;continue t}l+=f._.r,f=f.previous}while(u!==f.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=ty(n);(i=i.next)!==r;)(s=ty(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=jm(n,e),c=0;c<o;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function uP(t){return ey(t,Af()),t}function cP(t){return Math.sqrt(t.value)}function lP(){var t=null,e=1,n=1,r=Kn;function i(o){const a=Af();return o.x=e/2,o.y=n/2,t?o.eachBefore(ny(t)).eachAfter($f(r,.5,a)).eachBefore(ry(1)):o.eachBefore(ny(cP)).eachAfter($f(Kn,1,a)).eachAfter($f(r,o.r/Math.min(e,n),a)).eachBefore(ry(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=zs(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:Wr(+o),i):r},i}function ny(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function $f(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,c;if(s)for(o=0;o<a;++o)i[o].r+=s;if(c=ey(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=c+s}}}function ry(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 iy(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 po(t,e,n,r,i){for(var o=t.children,a,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function fP(){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(iy),a}function o(a,s){return function(c){c.children&&po(c,c.x0,a*(c.depth+1)/s,c.x1,a*(c.depth+2)/s);var u=c.x0,f=c.y0,h=c.x1-n,l=c.y1-n;h<u&&(u=h=(u+h)/2),l<f&&(f=l=(f+l)/2),c.x0=u,c.y0=f,c.x1=h,c.y1=l}}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 hP={depth:-1},oy={},Sf={};function pP(t){return t.id}function dP(t){return t.parentId}function gP(){var t=pP,e=dP,n;function r(i){var o=Array.from(i),a=t,s=e,c,u,f,h,l,p,d,g,m=new Map;if(n!=null){const y=o.map((b,M)=>mP(n(b,M,i))),x=y.map(ay),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(ay(b)),o.push(Sf));a=(b,M)=>y[M],s=(b,M)=>x[M]}for(f=0,c=o.length;f<c;++f)u=o[f],p=o[f]=new Zn(u),(d=a(u,f,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?oy:p)),(d=s(u,f,i))!=null&&(d+="")&&(p.parent=d);for(f=0;f<c;++f)if(p=o[f],d=p.parent){if(l=m.get(d),!l)throw new Error("missing: "+d);if(l===oy)throw new Error("ambiguous: "+d);l.children?l.children.push(p):l.children=[p],p.parent=l}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Sf&&h.children.length===1;)h=h.children[0],--c;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Sf);--y)p.data=null}if(h.parent=hP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--c}).eachBefore(qm),h.parent=null,c>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=zs(i),r):t},r.parentId=function(i){return arguments.length?(e=zs(i),r):e},r.path=function(i){return arguments.length?(n=zs(i),r):n},r}function mP(t){t=`${t}`;let e=t.length;return Tf(t,e-1)&&!Tf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function ay(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Tf(t,e););return t.slice(0,e)}function Tf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function yP(t,e){return t.parent===e.parent?1:2}function Pf(t){var e=t.children;return e?e[0]:t.t}function Df(t){var e=t.children;return e?e[e.length-1]:t.t}function bP(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 vP(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 xP(t,e,n){return t.a.parent===e.parent?t.a:n}function Bs(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}Bs.prototype=Object.create(Zn.prototype);function _P(t){for(var e=new Bs(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 Bs(o[a],a)),i.parent=n;return(e.parent=new Bs(null,0)).children=[e],e}function wP(){var t=yP,e=1,n=1,r=null;function i(u){var f=_P(u);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(a),r)u.eachBefore(c);else{var h=u,l=u,p=u;u.eachBefore(function(x){x.x<h.x&&(h=x),x.x>l.x&&(l=x),x.depth>p.depth&&(p=x)});var d=h===l?1:t(h,l)/2,g=d-h.x,m=e/(l.x+d+g),y=n/(p.depth||1);u.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*y})}return u}function o(u){var f=u.children,h=u.parent.children,l=u.i?h[u.i-1]:null;if(f){vP(u);var p=(f[0].z+f[f.length-1].z)/2;l?(u.z=l.z+t(u._,l._),u.m=u.z-p):u.z=p}else l&&(u.z=l.z+t(u._,l._));u.parent.A=s(u,l,u.parent.A||h[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,f,h){if(f){for(var l=u,p=u,d=f,g=l.parent.children[0],m=l.m,y=p.m,x=d.m,v=g.m,b;d=Df(d),l=Pf(l),d&&l;)g=Pf(g),p=Df(p),p.a=u,b=d.z+x-l.z-m+t(d._,l._),b>0&&(bP(xP(d,u,h),u,b),m+=b,y+=b),x+=d.m,m+=l.m,v+=g.m,y+=p.m;d&&!Df(p)&&(p.t=d,p.m+=x-y),l&&!Pf(g)&&(g.t=l,g.m+=m-v,h=u)}return h}function c(u){u.x*=e,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(t=u,i):t},i.size=function(u){return arguments.length?(r=!1,e=+u[0],n=+u[1],i):r?null:[e,n]},i.nodeSize=function(u){return arguments.length?(r=!0,e=+u[0],n=+u[1],i):r?[e,n]:null},i}function Us(t,e,n,r,i){for(var o=t.children,a,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var sy=(1+Math.sqrt(5))/2;function uy(t,e,n,r,i,o){for(var a=[],s=e.children,c,u,f=0,h=0,l=s.length,p,d,g=e.value,m,y,x,v,b,M,_;f<l;){p=i-n,d=o-r;do m=s[h++].value;while(!m&&h<l);for(y=x=m,M=Math.max(d/p,p/d)/(g*t),_=m*m*M,b=Math.max(x/_,_/y);h<l;++h){if(m+=u=s[h].value,u<y&&(y=u),u>x&&(x=u),_=m*m*M,v=Math.max(x/_,_/y),v>b){m-=u;break}b=v}a.push(c={value:m,dice:p<d,children:s.slice(f,h)}),c.dice?po(c,n,r,i,g?r+=d*m/g:o):Us(c,n,r,g?n+=p*m/g:i,o),g-=m,f=h}return a}const cy=function t(e){function n(r,i,o,a,s){uy(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(sy);function AP(){var t=cy,e=!1,n=1,r=1,i=[0],o=Kn,a=Kn,s=Kn,c=Kn,u=Kn;function f(l){return l.x0=l.y0=0,l.x1=n,l.y1=r,l.eachBefore(h),i=[0],e&&l.eachBefore(iy),l}function h(l){var p=i[l.depth],d=l.x0+p,g=l.y0+p,m=l.x1-p,y=l.y1-p;m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),l.x0=d,l.y0=g,l.x1=m,l.y1=y,l.children&&(p=i[l.depth+1]=o(l)/2,d+=u(l)-p,g+=a(l)-p,m-=s(l)-p,y-=c(l)-p,m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),t(l,d,g,m,y))}return f.round=function(l){return arguments.length?(e=!!l,f):e},f.size=function(l){return arguments.length?(n=+l[0],r=+l[1],f):[n,r]},f.tile=function(l){return arguments.length?(t=Xm(l),f):t},f.padding=function(l){return arguments.length?f.paddingInner(l).paddingOuter(l):f.paddingInner()},f.paddingInner=function(l){return arguments.length?(o=typeof l=="function"?l:Wr(+l),f):o},f.paddingOuter=function(l){return arguments.length?f.paddingTop(l).paddingRight(l).paddingBottom(l).paddingLeft(l):f.paddingTop()},f.paddingTop=function(l){return arguments.length?(a=typeof l=="function"?l:Wr(+l),f):a},f.paddingRight=function(l){return arguments.length?(s=typeof l=="function"?l:Wr(+l),f):s},f.paddingBottom=function(l){return arguments.length?(c=typeof l=="function"?l:Wr(+l),f):c},f.paddingLeft=function(l){return arguments.length?(u=typeof l=="function"?l:Wr(+l),f):u},f}function MP(t,e,n,r,i){var o=t.children,a,s=o.length,c,u=new Array(s+1);for(u[0]=c=a=0;a<s;++a)u[a+1]=c+=o[a].value;f(0,s,t.value,e,n,r,i);function f(h,l,p,d,g,m,y){if(h>=l-1){var x=o[h];x.x0=d,x.y0=g,x.x1=m,x.y1=y;return}for(var v=u[h],b=p/2+v,M=h+1,_=l-1;M<_;){var T=M+_>>>1;u[T]<b?M=T+1:_=T}b-u[M-1]<u[M]-b&&h+1<M&&--M;var P=u[M]-v,E=p-P;if(m-d>y-g){var k=p?(d*E+m*P)/p:m;f(h,M,P,d,g,k,y),f(M,l,E,k,g,m,y)}else{var S=p?(g*E+y*P)/p:y;f(h,M,P,d,g,m,S),f(M,l,E,d,S,m,y)}}}function $P(t,e,n,r,i){(t.depth&1?Us:po)(t,e,n,r,i)}const SP=function t(e){function n(r,i,o,a,s){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,h,l=-1,p,d=c.length,g=r.value;++l<d;){for(u=c[l],f=u.children,h=u.value=0,p=f.length;h<p;++h)u.value+=f[h].value;u.dice?po(u,i,o,a,g?o+=(s-o)*u.value/g:s):Us(u,i,o,g?i+=(a-i)*u.value/g:a,s),g-=u.value}else r._squarify=c=uy(e,r,i,o,a,s),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(sy);function TP(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 PP(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,c=0;++e<n;)o=a,a=t[e],c+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return c*=3,[r/c,i/c]}function DP(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function kP(t,e){return t[0]-e[0]||t[1]-e[1]}function ly(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&DP(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function EP(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(kP),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=ly(r),a=ly(i),s=a[0]===o[0],c=a[a.length-1]===o[o.length-1],u=[];for(e=o.length-1;e>=0;--e)u.push(t[r[o[e]][2]]);for(e=+s;e<a.length-c;++e)u.push(t[r[a[e]][2]]);return u}function LP(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],c,u,f=!1,h=0;h<n;++h)r=t[h],c=r[0],u=r[1],u>o!=s>o&&i<(a-c)*(o-u)/(s-u)+c&&(f=!f),a=c,s=u;return f}function NP(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],c=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,c+=Math.hypot(i,o);return c}const It=Math.random,RP=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}(It),CP=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}(It),kf=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}(It),IP=function t(e){var n=kf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(It),fy=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}(It),FP=function t(e){var n=fy.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}(It),zP=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(It),OP=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}(It),GP=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}(It),hy=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}(It),Ef=function t(e){var n=kf.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)),c=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var u=n(),f=1+s*u;while(f<=0);f*=f*f;var h=1-e()}while(h>=1-.0331*u*u*u*u&&Math.log(h)>=.5*u*u+a*(1-f+Math.log(f)));return a*f*c()*o}}return r.source=t,r}(It),py=function t(e){var n=Ef.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var c=a();return c===0?0:c/(c+s())}}return r.source=t,r}(It),dy=function t(e){var n=hy.source(e),r=py.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,c=o,u=a;c*u>16&&c*(1-u)>16;){var f=Math.floor((c+1)*u),h=r(f,c-f+1)();h<=u?(s+=f,c-=f,u=(u-h)/(1-h)):(c=f-1,u/=h)}for(var l=u<.5,p=l?u:1-u,d=n(p),g=d(),m=0;g<=c;++m)g+=d();return s+(l?m:c-m)}}return i.source=t,i}(It),BP=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}(It),UP=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}(It),YP=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}(It),WP=function t(e){var n=Ef.source(e),r=dy.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var c=Math.floor(.875*s),u=n(c)();if(u>s)return a+r(c-1,s/u)();a+=c,s-=u}for(var f=-Math.log1p(-e()),h=0;f<=s;++h)f-=Math.log1p(-e());return a+h}}return i.source=t,i}(It),HP=1664525,qP=1013904223,gy=1/4294967296;function XP(t=Math.random()){let e=(0<=t&&t<1?t/gy:Math.abs(t))|0;return()=>(e=HP*e+qP|0,gy*(e>>>0))}function he(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Je(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 Lf=Symbol("implicit");function Nf(){var t=new _i,e=[],n=[],r=Lf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Lf)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 _i;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 Nf(e,n).unknown(r)},he.apply(i,arguments),i}function Rf(){var t=Nf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,c=0,u=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+u*2),s&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),s&&(d=Math.round(d),a=Math.round(a));var m=un(l).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(s=!!l,h()):s},t.padding=function(l){return arguments.length?(c=Math.min(1,u=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(u=+l,h()):u},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return Rf(e(),[r,i]).round(s).paddingInner(c).paddingOuter(u).align(f)},he.apply(h(),arguments)}function my(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return my(e())},t}function Cf(){return my(Rf.apply(null,arguments).paddingInner(1))}function VP(t){return function(){return t}}function Ys(t){return+t}var yy=[0,1];function Qt(t){return t}function If(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:VP(isNaN(e)?NaN:.5)}function jP(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function ZP(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=If(i,r),o=n(a,o)):(r=If(r,i),o=n(o,a)),function(s){return o(r(s))}}function KP(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]=If(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var c=Pn(t,s,1,r)-1;return o[c](i[c](s))}}function go(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ws(){var t=yy,e=yy,n=fn,r,i,o,a=Qt,s,c,u;function f(){var l=Math.min(t.length,e.length);return a!==Qt&&(a=jP(t[0],t[l-1])),s=l>2?KP:ZP,c=u=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=s(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((u||(u=s(e,t.map(r),ce)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,Ys),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=Na,f()},h.clamp=function(l){return arguments.length?(a=l?!0:Qt,f()):a!==Qt},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function Ff(){return Ws()(Qt,Qt)}function by(t,e,n,r){var i=la(t,e,n),o;switch(r=Ir(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=D1(i,a))&&(r.precision=o),Pl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=k1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=P1(i))&&(r.precision=o-(r.type==="%")*2);break}}return Hi(r)}function mn(t){var e=t.domain;return t.ticks=function(n){var r=e();return kn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return by(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],c,u,f=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);f-- >0;){if(u=En(a,s,n),u===c)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;c=u}return t},t}function zf(){var t=Ff();return t.copy=function(){return go(t,zf())},he.apply(t,arguments),mn(t)}function vy(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,Ys),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return vy(t).unknown(e)},t=arguments.length?Array.from(t,Ys):[0,1],mn(n)}function xy(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 _y(t){return Math.log(t)}function wy(t){return Math.exp(t)}function QP(t){return-Math.log(-t)}function JP(t){return-Math.exp(-t)}function tD(t){return isFinite(t)?+("1e"+t):t<0?0:t}function eD(t){return t===10?tD:t===Math.E?Math.exp:e=>Math.pow(t,e)}function nD(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 Ay(t){return(e,n)=>-t(-e,n)}function Of(t){const e=t(_y,wy),n=e.domain;let r=10,i,o;function a(){return i=nD(r),o=eD(r),n()[0]<0?(i=Ay(i),o=Ay(o),t(QP,JP)):t(_y,wy),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 c=n();let u=c[0],f=c[c.length-1];const h=f<u;h&&([u,f]=[f,u]);let l=i(u),p=i(f),d,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&p-l<m){if(l=Math.floor(l),p=Math.ceil(p),u>0){for(;l<=p;++l)for(d=1;d<r;++d)if(g=l<0?d/o(-l):d*o(l),!(g<u)){if(g>f)break;y.push(g)}}else for(;l<=p;++l)for(d=r-1;d>=1;--d)if(g=l>0?d/o(-l):d*o(l),!(g<u)){if(g>f)break;y.push(g)}y.length*2<m&&(y=kn(u,f,m))}else y=kn(l,p,Math.min(p-l,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Ir(c)).precision==null&&(c.trim=!0),c=Hi(c)),s===1/0)return c;const u=Math.max(1,r*s/e.ticks().length);return f=>{let h=f/o(Math.round(i(f)));return h*r<r-.5&&(h*=r),h<=u?c(f):""}},e.nice=()=>n(xy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function My(){const t=Of(Ws()).domain([1,10]);return t.copy=()=>go(t,My()).base(t.base()),he.apply(t,arguments),t}function $y(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Sy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Gf(t){var e=1,n=t($y(e),Sy(e));return n.constant=function(r){return arguments.length?t($y(e=+r),Sy(e)):e},mn(n)}function Ty(){var t=Gf(Ws());return t.copy=function(){return go(t,Ty()).constant(t.constant())},he.apply(t,arguments)}function Py(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function rD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function iD(t){return t<0?-t*t:t*t}function Bf(t){var e=t(Qt,Qt),n=1;function r(){return n===1?t(Qt,Qt):n===.5?t(rD,iD):t(Py(n),Py(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},mn(e)}function Hs(){var t=Bf(Ws());return t.copy=function(){return go(t,Hs()).exponent(t.exponent())},he.apply(t,arguments),t}function oD(){return Hs.apply(null,arguments).exponent(.5)}function Dy(t){return Math.sign(t)*t*t}function aD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function ky(){var t=Ff(),e=[0,1],n=!1,r;function i(o){var a=aD(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Dy(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,Ys)).map(Dy)),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 ky(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},he.apply(i,arguments),mn(i)}function Ey(){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]=ld(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[Pn(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(xt),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 Ey().domain(t).range(e).unknown(r)},he.apply(o,arguments)}function Ly(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[Pn(r,c,0,n)]:o}function s(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,s()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,s()):i.slice()},a.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Ly().domain([t,e]).range(i).unknown(o)},he.apply(mn(a),arguments)}function Ny(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[Pn(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 Ny().domain(t).range(e).unknown(n)},he.apply(i,arguments)}const Uf=new Date,Yf=new Date;function Tt(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 c=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return c;let u;do c.push(u=new Date(+o)),e(o,s),t(o);while(u<o&&o<a);return c},i.filter=o=>Tt(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)=>(Uf.setTime(+o),Yf.setTime(+a),t(Uf),t(Yf),Math.floor(n(Uf,Yf))),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 Hr=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Hr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Hr);const Ry=Hr.range,tn=1e3,pe=tn*60,en=pe*60,nn=en*24,Wf=nn*7,Cy=nn*30,Hf=nn*365,rn=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*tn)},(t,e)=>(e-t)/tn,t=>t.getUTCSeconds()),Iy=rn.range,qs=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*tn)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getMinutes()),sD=qs.range,Xs=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getUTCMinutes()),uD=Xs.range,Vs=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*tn-t.getMinutes()*pe)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getHours()),cD=Vs.range,js=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getUTCHours()),lD=js.range,qr=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pe)/nn,t=>t.getDate()-1),fD=qr.range,mo=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/nn,t=>t.getUTCDate()-1),hD=mo.range,qf=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/nn,t=>Math.floor(t/nn)),pD=qf.range;function Qn(t){return Tt(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())*pe)/Wf)}const Xr=Qn(0),yo=Qn(1),Fy=Qn(2),zy=Qn(3),Jn=Qn(4),Oy=Qn(5),Gy=Qn(6),By=Xr.range,dD=yo.range,gD=Fy.range,mD=zy.range,yD=Jn.range,bD=Oy.range,vD=Gy.range;function tr(t){return Tt(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)/Wf)}const Vr=tr(0),bo=tr(1),Uy=tr(2),Yy=tr(3),er=tr(4),Wy=tr(5),Hy=tr(6),qy=Vr.range,xD=bo.range,_D=Uy.range,wD=Yy.range,AD=er.range,MD=Wy.range,$D=Hy.range,Zs=Tt(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()),SD=Zs.range,Ks=Tt(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()),TD=Ks.range,Oe=Tt(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());Oe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(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 PD=Oe.range,Ge=Tt(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());Ge.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(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 DD=Ge.range;function Xy(t,e,n,r,i,o){const a=[[rn,1,tn],[rn,5,5*tn],[rn,15,15*tn],[rn,30,30*tn],[o,1,pe],[o,5,5*pe],[o,15,15*pe],[o,30,30*pe],[i,1,en],[i,3,3*en],[i,6,6*en],[i,12,12*en],[r,1,nn],[r,2,2*nn],[n,1,Wf],[e,1,Cy],[e,3,3*Cy],[t,1,Hf]];function s(u,f,h){const l=f<u;l&&([u,f]=[f,u]);const p=h&&typeof h.range=="function"?h:c(u,f,h),d=p?p.range(u,+f+1):[];return l?d.reverse():d}function c(u,f,h){const l=Math.abs(f-u)/h,p=aa(([,,m])=>m).right(a,l);if(p===a.length)return t.every(la(u/Hf,f/Hf,h));if(p===0)return Hr.every(Math.max(la(u,f,h),1));const[d,g]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return d.every(g)}return[s,c]}const[Vy,jy]=Xy(Ge,Ks,Vr,qf,js,Xs),[Zy,Ky]=Xy(Oe,Zs,Xr,qr,Vs,qs);function Xf(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 Vf(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 vo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Qy(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,c=t.shortMonths,u=xo(i),f=_o(i),h=xo(o),l=_o(o),p=xo(a),d=_o(a),g=xo(s),m=_o(s),y=xo(c),x=_o(c),v={a:D,A:L,b:R,B:F,c:null,d:ib,e:ib,f:QD,g:uk,G:lk,H:jD,I:ZD,j:KD,L:ob,m:JD,M:tk,p:z,q:Y,Q:fb,s:hb,S:ek,u:nk,U:rk,V:ik,w:ok,W:ak,x:null,X:null,y:sk,Y:ck,Z:fk,"%":lb},b={a:rt,A:Z,b:J,B:ht,c:null,d:sb,e:sb,f:gk,g:$k,G:Tk,H:hk,I:pk,j:dk,L:ub,m:mk,M:yk,p:H,q:pt,Q:fb,s:hb,S:bk,u:vk,U:xk,V:_k,w:wk,W:Ak,x:null,X:null,y:Mk,Y:Sk,Z:Pk,"%":lb},M={a:k,A:S,b:C,B:N,c:A,d:nb,e:nb,f:HD,g:eb,G:tb,H:rb,I:rb,j:BD,L:WD,m:GD,M:UD,p:E,q:OD,Q:XD,s:VD,S:YD,u:RD,U:CD,V:ID,w:ND,W:FD,x:$,X:w,y:eb,Y:tb,Z:zD,"%":qD};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 _(B,nt){return function(ut){var O=[],$t=-1,gt=0,Jt=B.length,te,Q,St;for(ut instanceof Date||(ut=new Date(+ut));++$t<Jt;)B.charCodeAt($t)===37&&(O.push(B.slice(gt,$t)),(Q=Jy[te=B.charAt(++$t)])!=null?te=B.charAt(++$t):Q=te==="e"?" ":"0",(St=nt[te])&&(te=St(ut,Q)),O.push(te),gt=$t+1);return O.push(B.slice(gt,$t)),O.join("")}}function T(B,nt){return function(ut){var O=vo(1900,void 0,1),$t=P(O,B,ut+="",0),gt,Jt;if($t!=ut.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(nt&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(gt=Vf(vo(O.y,0,1)),Jt=gt.getUTCDay(),gt=Jt>4||Jt===0?bo.ceil(gt):bo(gt),gt=mo.offset(gt,(O.V-1)*7),O.y=gt.getUTCFullYear(),O.m=gt.getUTCMonth(),O.d=gt.getUTCDate()+(O.w+6)%7):(gt=Xf(vo(O.y,0,1)),Jt=gt.getDay(),gt=Jt>4||Jt===0?yo.ceil(gt):yo(gt),gt=qr.offset(gt,(O.V-1)*7),O.y=gt.getFullYear(),O.m=gt.getMonth(),O.d=gt.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),Jt="Z"in O?Vf(vo(O.y,0,1)).getUTCDay():Xf(vo(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(Jt+5)%7:O.w+O.U*7-(Jt+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Vf(O)):Xf(O)}}function P(B,nt,ut,O){for(var $t=0,gt=nt.length,Jt=ut.length,te,Q;$t<gt;){if(O>=Jt)return-1;if(te=nt.charCodeAt($t++),te===37){if(te=nt.charAt($t++),Q=M[te in Jy?nt.charAt($t++):te],!Q||(O=Q(B,ut,O))<0)return-1}else if(te!=ut.charCodeAt(O++))return-1}return O}function E(B,nt,ut){var O=u.exec(nt.slice(ut));return O?(B.p=f.get(O[0].toLowerCase()),ut+O[0].length):-1}function k(B,nt,ut){var O=p.exec(nt.slice(ut));return O?(B.w=d.get(O[0].toLowerCase()),ut+O[0].length):-1}function S(B,nt,ut){var O=h.exec(nt.slice(ut));return O?(B.w=l.get(O[0].toLowerCase()),ut+O[0].length):-1}function C(B,nt,ut){var O=y.exec(nt.slice(ut));return O?(B.m=x.get(O[0].toLowerCase()),ut+O[0].length):-1}function N(B,nt,ut){var O=g.exec(nt.slice(ut));return O?(B.m=m.get(O[0].toLowerCase()),ut+O[0].length):-1}function A(B,nt,ut){return P(B,e,nt,ut)}function $(B,nt,ut){return P(B,n,nt,ut)}function w(B,nt,ut){return P(B,r,nt,ut)}function D(B){return a[B.getDay()]}function L(B){return o[B.getDay()]}function R(B){return c[B.getMonth()]}function F(B){return s[B.getMonth()]}function z(B){return i[+(B.getHours()>=12)]}function Y(B){return 1+~~(B.getMonth()/3)}function rt(B){return a[B.getUTCDay()]}function Z(B){return o[B.getUTCDay()]}function J(B){return c[B.getUTCMonth()]}function ht(B){return s[B.getUTCMonth()]}function H(B){return i[+(B.getUTCHours()>=12)]}function pt(B){return 1+~~(B.getUTCMonth()/3)}return{format:function(B){var nt=_(B+="",v);return nt.toString=function(){return B},nt},parse:function(B){var nt=T(B+="",!1);return nt.toString=function(){return B},nt},utcFormat:function(B){var nt=_(B+="",b);return nt.toString=function(){return B},nt},utcParse:function(B){var nt=T(B+="",!0);return nt.toString=function(){return B},nt}}}var Jy={"-":"",_:" ",0:"0"},Ct=/^\s*\d+/,kD=/^%/,ED=/[\\^$*+?|[\]().{}]/g;function dt(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 LD(t){return t.replace(ED,"\\$&")}function xo(t){return new RegExp("^(?:"+t.map(LD).join("|")+")","i")}function _o(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function ND(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function RD(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function CD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function ID(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function FD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function tb(t,e,n){var r=Ct.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function eb(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function zD(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 OD(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function GD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function nb(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function BD(t,e,n){var r=Ct.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function rb(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function UD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function YD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function WD(t,e,n){var r=Ct.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function HD(t,e,n){var r=Ct.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function qD(t,e,n){var r=kD.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function XD(t,e,n){var r=Ct.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function VD(t,e,n){var r=Ct.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ib(t,e){return dt(t.getDate(),e,2)}function jD(t,e){return dt(t.getHours(),e,2)}function ZD(t,e){return dt(t.getHours()%12||12,e,2)}function KD(t,e){return dt(1+qr.count(Oe(t),t),e,3)}function ob(t,e){return dt(t.getMilliseconds(),e,3)}function QD(t,e){return ob(t,e)+"000"}function JD(t,e){return dt(t.getMonth()+1,e,2)}function tk(t,e){return dt(t.getMinutes(),e,2)}function ek(t,e){return dt(t.getSeconds(),e,2)}function nk(t){var e=t.getDay();return e===0?7:e}function rk(t,e){return dt(Xr.count(Oe(t)-1,t),e,2)}function ab(t){var e=t.getDay();return e>=4||e===0?Jn(t):Jn.ceil(t)}function ik(t,e){return t=ab(t),dt(Jn.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function ok(t){return t.getDay()}function ak(t,e){return dt(yo.count(Oe(t)-1,t),e,2)}function sk(t,e){return dt(t.getFullYear()%100,e,2)}function uk(t,e){return t=ab(t),dt(t.getFullYear()%100,e,2)}function ck(t,e){return dt(t.getFullYear()%1e4,e,4)}function lk(t,e){var n=t.getDay();return t=n>=4||n===0?Jn(t):Jn.ceil(t),dt(t.getFullYear()%1e4,e,4)}function fk(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+dt(e/60|0,"0",2)+dt(e%60,"0",2)}function sb(t,e){return dt(t.getUTCDate(),e,2)}function hk(t,e){return dt(t.getUTCHours(),e,2)}function pk(t,e){return dt(t.getUTCHours()%12||12,e,2)}function dk(t,e){return dt(1+mo.count(Ge(t),t),e,3)}function ub(t,e){return dt(t.getUTCMilliseconds(),e,3)}function gk(t,e){return ub(t,e)+"000"}function mk(t,e){return dt(t.getUTCMonth()+1,e,2)}function yk(t,e){return dt(t.getUTCMinutes(),e,2)}function bk(t,e){return dt(t.getUTCSeconds(),e,2)}function vk(t){var e=t.getUTCDay();return e===0?7:e}function xk(t,e){return dt(Vr.count(Ge(t)-1,t),e,2)}function cb(t){var e=t.getUTCDay();return e>=4||e===0?er(t):er.ceil(t)}function _k(t,e){return t=cb(t),dt(er.count(Ge(t),t)+(Ge(t).getUTCDay()===4),e,2)}function wk(t){return t.getUTCDay()}function Ak(t,e){return dt(bo.count(Ge(t)-1,t),e,2)}function Mk(t,e){return dt(t.getUTCFullYear()%100,e,2)}function $k(t,e){return t=cb(t),dt(t.getUTCFullYear()%100,e,2)}function Sk(t,e){return dt(t.getUTCFullYear()%1e4,e,4)}function Tk(t,e){var n=t.getUTCDay();return t=n>=4||n===0?er(t):er.ceil(t),dt(t.getUTCFullYear()%1e4,e,4)}function Pk(){return"+0000"}function lb(){return"%"}function fb(t){return+t}function hb(t){return Math.floor(+t/1e3)}var jr,jf,pb,Qs,Zf;db({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 db(t){return jr=Qy(t),jf=jr.format,pb=jr.parse,Qs=jr.utcFormat,Zf=jr.utcParse,jr}var gb="%Y-%m-%dT%H:%M:%S.%LZ";function Dk(t){return t.toISOString()}var kk=Date.prototype.toISOString?Dk:Qs(gb);const Ek=kk;function Lk(t){var e=new Date(t);return isNaN(e)?null:e}var Nk=+new Date("2000-01-01T00:00:00.000Z")?Lk:Zf(gb);const Rk=Nk;function Ck(t){return new Date(t)}function Ik(t){return t instanceof Date?+t:+new Date(+t)}function Kf(t,e,n,r,i,o,a,s,c,u){var f=Ff(),h=f.invert,l=f.domain,p=u(".%L"),d=u(":%S"),g=u("%I:%M"),m=u("%I %p"),y=u("%a %d"),x=u("%b %d"),v=u("%B"),b=u("%Y");function M(_){return(c(_)<_?p:s(_)<_?d:a(_)<_?g:o(_)<_?m:r(_)<_?i(_)<_?y:x:n(_)<_?v:b)(_)}return f.invert=function(_){return new Date(h(_))},f.domain=function(_){return arguments.length?l(Array.from(_,Ik)):l().map(Ck)},f.ticks=function(_){var T=l();return t(T[0],T[T.length-1],_??10)},f.tickFormat=function(_,T){return T==null?M:u(T)},f.nice=function(_){var T=l();return(!_||typeof _.range!="function")&&(_=e(T[0],T[T.length-1],_??10)),_?l(xy(T,_)):f},f.copy=function(){return go(f,Kf(t,e,n,r,i,o,a,s,c,u))},f}function Fk(){return he.apply(Kf(Zy,Ky,Oe,Zs,Xr,qr,Vs,qs,rn,jf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zk(){return he.apply(Kf(Vy,jy,Ge,Ks,Vr,mo,js,Xs,rn,Qs).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Js(){var t=0,e=1,n,r,i,o,a=Qt,s=!1,c;function u(h){return h==null||isNaN(h=+h)?c:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}u.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),u):[t,e]},u.clamp=function(h){return arguments.length?(s=!!h,u):s},u.interpolator=function(h){return arguments.length?(a=h,u):a};function f(h){return function(l){var p,d;return arguments.length?([p,d]=l,a=h(p,d),u):[a(0),a(1)]}}return u.range=f(fn),u.rangeRound=f(Na),u.unknown=function(h){return arguments.length?(c=h,u):c},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),u}}function yn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function mb(){var t=mn(Js()(Qt));return t.copy=function(){return yn(t,mb())},Je.apply(t,arguments)}function yb(){var t=Of(Js()).domain([1,10]);return t.copy=function(){return yn(t,yb()).base(t.base())},Je.apply(t,arguments)}function bb(){var t=Gf(Js());return t.copy=function(){return yn(t,bb()).constant(t.constant())},Je.apply(t,arguments)}function Qf(){var t=Bf(Js());return t.copy=function(){return yn(t,Qf()).exponent(t.exponent())},Je.apply(t,arguments)}function Ok(){return Qf.apply(null,arguments).exponent(.5)}function vb(){var t=[],e=Qt;function n(r){if(r!=null&&!isNaN(r=+r))return e((Pn(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(xt),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)=>Mi(t,o/r))},n.copy=function(){return vb(e).domain(t)},Je.apply(n,arguments)}function tu(){var t=0,e=.5,n=1,r=1,i,o,a,s,c,u=Qt,f,h=!1,l;function p(g){return isNaN(g=+g)?l:(g=.5+((g=+f(g))-o)*(r*g<r*o?s:c),u(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=f(t=+t),o=f(e=+e),a=f(n=+n),s=i===o?0:.5/(o-i),c=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?(u=g,p):u};function d(g){return function(m){var y,x,v;return arguments.length?([y,x,v]=m,u=xg(g,[y,x,v]),p):[u(0),u(.5),u(1)]}}return p.range=d(fn),p.rangeRound=d(Na),p.unknown=function(g){return arguments.length?(l=g,p):l},function(g){return f=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function xb(){var t=mn(tu()(Qt));return t.copy=function(){return yn(t,xb())},Je.apply(t,arguments)}function _b(){var t=Of(tu()).domain([.1,1,10]);return t.copy=function(){return yn(t,_b()).base(t.base())},Je.apply(t,arguments)}function wb(){var t=Gf(tu());return t.copy=function(){return yn(t,wb()).constant(t.constant())},Je.apply(t,arguments)}function Jf(){var t=Bf(tu());return t.copy=function(){return yn(t,Jf()).exponent(t.exponent())},Je.apply(t,arguments)}function Gk(){return Jf.apply(null,arguments).exponent(.5)}function ot(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 Bk=ot("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Uk=ot("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Yk=ot("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Wk=ot("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),Hk=ot("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),qk=ot("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Xk=ot("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Vk=ot("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),jk=ot("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Zk=ot("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Kk=ot("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>og(t[t.length-1]);var Ab=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ot);const Qk=bt(Ab);var Mb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ot);const Jk=bt(Mb);var $b=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ot);const tE=bt($b);var Sb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ot);const eE=bt(Sb);var Tb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ot);const nE=bt(Tb);var Pb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ot);const rE=bt(Pb);var Db=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ot);const iE=bt(Db);var kb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ot);const oE=bt(kb);var Eb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ot);const aE=bt(Eb);var Lb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ot);const sE=bt(Lb);var Nb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ot);const uE=bt(Nb);var Rb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ot);const cE=bt(Rb);var Cb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ot);const lE=bt(Cb);var Ib=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ot);const fE=bt(Ib);var Fb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ot);const hE=bt(Fb);var zb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ot);const pE=bt(zb);var Ob=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ot);const dE=bt(Ob);var Gb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ot);const gE=bt(Gb);var Bb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ot);const mE=bt(Bb);var Ub=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ot);const yE=bt(Ub);var Yb=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ot);const bE=bt(Yb);var Wb=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ot);const vE=bt(Wb);var Hb=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ot);const xE=bt(Hb);var qb=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ot);const _E=bt(qb);var Xb=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ot);const wE=bt(Xb);var Vb=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ot);const AE=bt(Vb);var jb=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ot);const ME=bt(jb);function $E(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=Ca($e(300,.5,0),$e(-240,.5,1));var TE=Ca($e(-100,.75,.35),$e(80,1.5,.8)),PE=Ca($e(260,.75,.35),$e(80,1.5,.8)),eu=$e();function DE(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return eu.h=360*t-100,eu.s=1.5-1.5*e,eu.l=.8-.9*e,eu+""}var nu=Mr(),kE=Math.PI/3,EE=Math.PI*2/3;function LE(t){var e;return t=(.5-t)*Math.PI,nu.r=255*(e=Math.sin(t))*e,nu.g=255*(e=Math.sin(t+kE))*e,nu.b=255*(e=Math.sin(t+EE))*e,nu+""}function NE(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 ru(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const RE=ru(ot("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var CE=ru(ot("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),IE=ru(ot("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),FE=ru(ot("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function it(t){return function(){return t}}const Zb=Math.abs,Gt=Math.atan2,on=Math.cos,zE=Math.max,Zr=Math.min,ie=Math.sin,vt=Math.sqrt,Bt=1e-12,bn=Math.PI,iu=bn/2,vn=2*bn;function OE(t){return t>1?0:t<-1?bn:Math.acos(t)}function Kb(t){return t>=1?iu:t<=-1?-iu:Math.asin(t)}function wo(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 Bi(e)}function GE(t){return t.innerRadius}function BE(t){return t.outerRadius}function UE(t){return t.startAngle}function YE(t){return t.endAngle}function WE(t){return t&&t.padAngle}function HE(t,e,n,r,i,o,a,s){var c=n-t,u=r-e,f=a-i,h=s-o,l=h*c-f*u;if(!(l*l<Bt))return l=(f*(e-o)-h*(t-i))/l,[t+l*c,e+l*u]}function ou(t,e,n,r,i,o,a){var s=t-n,c=e-r,u=(a?o:-o)/vt(s*s+c*c),f=u*c,h=-u*s,l=t+f,p=e+h,d=n+f,g=r+h,m=(l+d)/2,y=(p+g)/2,x=d-l,v=g-p,b=x*x+v*v,M=i-o,_=l*g-d*p,T=(v<0?-1:1)*vt(zE(0,M*M*b-_*_)),P=(_*v-x*T)/b,E=(-_*x-v*T)/b,k=(_*v+x*T)/b,S=(-_*x+v*T)/b,C=P-m,N=E-y,A=k-m,$=S-y;return C*C+N*N>A*A+$*$&&(P=k,E=S),{cx:P,cy:E,x01:-f,y01:-h,x11:P*(i/M-1),y11:E*(i/M-1)}}function Qb(){var t=GE,e=BE,n=it(0),r=null,i=UE,o=YE,a=WE,s=null,c=wo(u);function u(){var f,h,l=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-iu,g=o.apply(this,arguments)-iu,m=Zb(g-d),y=g>d;if(s||(s=f=c()),p<l&&(h=p,p=l,l=h),!(p>Bt))s.moveTo(0,0);else if(m>vn-Bt)s.moveTo(p*on(d),p*ie(d)),s.arc(0,0,p,d,g,!y),l>Bt&&(s.moveTo(l*on(g),l*ie(g)),s.arc(0,0,l,g,d,y));else{var x=d,v=g,b=d,M=g,_=m,T=m,P=a.apply(this,arguments)/2,E=P>Bt&&(r?+r.apply(this,arguments):vt(l*l+p*p)),k=Zr(Zb(p-l)/2,+n.apply(this,arguments)),S=k,C=k,N,A;if(E>Bt){var $=Kb(E/l*ie(P)),w=Kb(E/p*ie(P));(_-=$*2)>Bt?($*=y?1:-1,b+=$,M-=$):(_=0,b=M=(d+g)/2),(T-=w*2)>Bt?(w*=y?1:-1,x+=w,v-=w):(T=0,x=v=(d+g)/2)}var D=p*on(x),L=p*ie(x),R=l*on(M),F=l*ie(M);if(k>Bt){var z=p*on(v),Y=p*ie(v),rt=l*on(b),Z=l*ie(b),J;if(m<bn)if(J=HE(D,L,rt,Z,z,Y,R,F)){var ht=D-J[0],H=L-J[1],pt=z-J[0],B=Y-J[1],nt=1/ie(OE((ht*pt+H*B)/(vt(ht*ht+H*H)*vt(pt*pt+B*B)))/2),ut=vt(J[0]*J[0]+J[1]*J[1]);S=Zr(k,(l-ut)/(nt-1)),C=Zr(k,(p-ut)/(nt+1))}else S=C=0}T>Bt?C>Bt?(N=ou(rt,Z,D,L,p,C,y),A=ou(z,Y,R,F,p,C,y),s.moveTo(N.cx+N.x01,N.cy+N.y01),C<k?s.arc(N.cx,N.cy,C,Gt(N.y01,N.x01),Gt(A.y01,A.x01),!y):(s.arc(N.cx,N.cy,C,Gt(N.y01,N.x01),Gt(N.y11,N.x11),!y),s.arc(0,0,p,Gt(N.cy+N.y11,N.cx+N.x11),Gt(A.cy+A.y11,A.cx+A.x11),!y),s.arc(A.cx,A.cy,C,Gt(A.y11,A.x11),Gt(A.y01,A.x01),!y))):(s.moveTo(D,L),s.arc(0,0,p,x,v,!y)):s.moveTo(D,L),!(l>Bt)||!(_>Bt)?s.lineTo(R,F):S>Bt?(N=ou(R,F,z,Y,l,-S,y),A=ou(D,L,rt,Z,l,-S,y),s.lineTo(N.cx+N.x01,N.cy+N.y01),S<k?s.arc(N.cx,N.cy,S,Gt(N.y01,N.x01),Gt(A.y01,A.x01),!y):(s.arc(N.cx,N.cy,S,Gt(N.y01,N.x01),Gt(N.y11,N.x11),!y),s.arc(0,0,l,Gt(N.cy+N.y11,N.cx+N.x11),Gt(A.cy+A.y11,A.cx+A.x11),y),s.arc(A.cx,A.cy,S,Gt(A.y11,A.x11),Gt(A.y01,A.x01),!y))):s.arc(0,0,l,M,b,y)}if(s.closePath(),f)return s=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-bn/2;return[on(h)*f,ie(h)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:it(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:it(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:it(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:it(+f),u):r},u.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:it(+f),u):i},u.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:it(+f),u):o},u.padAngle=function(f){return arguments.length?(a=typeof f=="function"?f:it(+f),u):a},u.context=function(f){return arguments.length?(s=f??null,u):s},u}var qE=Array.prototype.slice;function au(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Jb(t){this._context=t}Jb.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 su(t){return new Jb(t)}function th(t){return t[0]}function eh(t){return t[1]}function uu(t,e){var n=it(!0),r=null,i=su,o=null,a=wo(s);t=typeof t=="function"?t:t===void 0?th:it(t),e=typeof e=="function"?e:e===void 0?eh:it(e);function s(c){var u,f=(c=au(c)).length,h,l=!1,p;for(r==null&&(o=i(p=a())),u=0;u<=f;++u)!(u<f&&n(h=c[u],u,c))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(h,u,c),+e(h,u,c));if(p)return o=null,p+""||null}return s.x=function(c){return arguments.length?(t=typeof c=="function"?c:it(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:it(+c),s):e},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:it(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),s):r},s}function t2(t,e,n){var r=null,i=it(!0),o=null,a=su,s=null,c=wo(u);t=typeof t=="function"?t:t===void 0?th:it(+t),e=typeof e=="function"?e:it(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?eh:it(+n);function u(h){var l,p,d,g=(h=au(h)).length,m,y=!1,x,v=new Array(g),b=new Array(g);for(o==null&&(s=a(x=c())),l=0;l<=g;++l){if(!(l<g&&i(m=h[l],l,h))===y)if(y=!y)p=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=l-1;d>=p;--d)s.point(v[d],b[d]);s.lineEnd(),s.areaEnd()}y&&(v[l]=+t(m,l,h),b[l]=+e(m,l,h),s.point(r?+r(m,l,h):v[l],n?+n(m,l,h):b[l]))}if(x)return s=null,x+""||null}function f(){return uu().defined(i).curve(a).context(o)}return u.x=function(h){return arguments.length?(t=typeof h=="function"?h:it(+h),r=null,u):t},u.x0=function(h){return arguments.length?(t=typeof h=="function"?h:it(+h),u):t},u.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:it(+h),u):r},u.y=function(h){return arguments.length?(e=typeof h=="function"?h:it(+h),n=null,u):e},u.y0=function(h){return arguments.length?(e=typeof h=="function"?h:it(+h),u):e},u.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:it(+h),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(h){return arguments.length?(i=typeof h=="function"?h:it(!!h),u):i},u.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),u):a},u.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),u):o},u}function XE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function VE(t){return t}function e2(){var t=VE,e=XE,n=null,r=it(0),i=it(vn),o=it(0);function a(s){var c,u=(s=au(s)).length,f,h,l=0,p=new Array(u),d=new Array(u),g=+r.apply(this,arguments),m=Math.min(vn,Math.max(-vn,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/u,o.apply(this,arguments)),v=x*(m<0?-1:1),b;for(c=0;c<u;++c)(b=d[p[c]=c]=+t(s[c],c,s))>0&&(l+=b);for(e!=null?p.sort(function(M,_){return e(d[M],d[_])}):n!=null&&p.sort(function(M,_){return n(s[M],s[_])}),c=0,h=l?(m-u*v)/l:0;c<u;++c,g=y)f=p[c],b=d[f],y=g+(b>0?b*h:0)+v,d[f]={data:s[f],index:c,value:b,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:it(+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:it(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:it(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:it(+s),a):o},a}var n2=nh(su);function r2(t){this._curve=t}r2.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 nh(t){function e(n){return new r2(t(n))}return e._curve=t,e}function Ao(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(nh(n)):e()._curve},t}function i2(){return Ao(uu().curve(n2))}function o2(){var t=t2().curve(n2),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 Ao(n())},delete t.lineX0,t.lineEndAngle=function(){return Ao(r())},delete t.lineX1,t.lineInnerRadius=function(){return Ao(i())},delete t.lineY0,t.lineOuterRadius=function(){return Ao(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(nh(a)):e()._curve},t}function Mo(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class a2{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 jE{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=Mo(this._x0,this._y0),i=Mo(this._x0,this._y0=(this._y0+n)/2),o=Mo(e,this._y0),a=Mo(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function s2(t){return new a2(t,!0)}function u2(t){return new a2(t,!1)}function ZE(t){return new jE(t)}function KE(t){return t.source}function QE(t){return t.target}function cu(t){let e=KE,n=QE,r=th,i=eh,o=null,a=null,s=wo(c);function c(){let u;const f=qE.call(arguments),h=e.apply(this,f),l=n.apply(this,f);if(o==null&&(a=t(u=s())),a.lineStart(),f[0]=h,a.point(+r.apply(this,f),+i.apply(this,f)),f[0]=l,a.point(+r.apply(this,f),+i.apply(this,f)),a.lineEnd(),u)return a=null,u+""||null}return c.source=function(u){return arguments.length?(e=u,c):e},c.target=function(u){return arguments.length?(n=u,c):n},c.x=function(u){return arguments.length?(r=typeof u=="function"?u:it(+u),c):r},c.y=function(u){return arguments.length?(i=typeof u=="function"?u:it(+u),c):i},c.context=function(u){return arguments.length?(u==null?o=a=null:a=t(o=u),c):o},c}function JE(){return cu(s2)}function tL(){return cu(u2)}function eL(){const t=cu(ZE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const nL=vt(3),c2={draw(t,e){const n=vt(e+Zr(e/28,.75))*.59436,r=n/2,i=r*nL;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},lu={draw(t,e){const n=vt(e/bn);t.moveTo(n,0),t.arc(0,0,n,0,vn)}},l2={draw(t,e){const n=vt(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()}},f2=vt(1/3),rL=f2*2,h2={draw(t,e){const n=vt(e/rL),r=n*f2;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},p2={draw(t,e){const n=vt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},d2={draw(t,e){const n=vt(e-Zr(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},g2={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},m2={draw(t,e){const n=vt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},iL=.8908130915292852,y2=ie(bn/10)/ie(7*bn/10),oL=ie(vn/10)*y2,aL=-on(vn/10)*y2,b2={draw(t,e){const n=vt(e*iL),r=oL*n,i=aL*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=vn*o/5,s=on(a),c=ie(a);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},rh=vt(3),v2={draw(t,e){const n=-vt(e/(rh*3));t.moveTo(0,n*2),t.lineTo(-rh*n,-n),t.lineTo(rh*n,-n),t.closePath()}},sL=vt(3),x2={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*sL/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},de=-.5,ge=vt(3)/2,ih=1/vt(12),uL=(ih/2+1)*3,_2={draw(t,e){const n=vt(e/uL),r=n/2,i=n*ih,o=r,a=n*ih+n,s=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,c),t.lineTo(de*r-ge*i,ge*r+de*i),t.lineTo(de*o-ge*a,ge*o+de*a),t.lineTo(de*s-ge*c,ge*s+de*c),t.lineTo(de*r+ge*i,de*i-ge*r),t.lineTo(de*o+ge*a,de*a-ge*o),t.lineTo(de*s+ge*c,de*c-ge*s),t.closePath()}},oh={draw(t,e){const n=vt(e-Zr(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},w2=[lu,l2,h2,g2,b2,v2,_2],cL=[lu,d2,oh,x2,c2,m2,p2];function lL(t,e){let n=null,r=wo(i);t=typeof t=="function"?t:it(t||lu),e=typeof e=="function"?e:it(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:it(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:it(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function xn(){}function fu(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 hu(t){this._context=t}hu.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:fu(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:fu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function fL(t){return new hu(t)}function A2(t){this._context=t}A2.prototype={areaStart:xn,areaEnd:xn,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:fu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function hL(t){return new A2(t)}function M2(t){this._context=t}M2.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:fu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function pL(t){return new M2(t)}function $2(t,e){this._basis=new hu(t),this._beta=e}$2.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,c;++s<=n;)c=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+c*o),this._beta*e[s]+(1-this._beta)*(i+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const dL=function t(e){function n(r){return e===1?new hu(r):new $2(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function pu(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 ah(t,e){this._context=t,this._k=(1-e)/6}ah.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:pu(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:pu(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 gL=function t(e){function n(r){return new ah(r,e)}return n.tension=function(r){return t(+r)},n}(0);function sh(t,e){this._context=t,this._k=(1-e)/6}sh.prototype={areaStart:xn,areaEnd:xn,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:pu(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 mL=function t(e){function n(r){return new sh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function uh(t,e){this._context=t,this._k=(1-e)/6}uh.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:pu(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 yL=function t(e){function n(r){return new uh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function ch(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,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Bt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/f,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function S2(t,e){this._context=t,this._alpha=e}S2.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:ch(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 bL=function t(e){function n(r){return e?new S2(r,e):new ah(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function T2(t,e){this._context=t,this._alpha=e}T2.prototype={areaStart:xn,areaEnd:xn,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:ch(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 vL=function t(e){function n(r){return e?new T2(r,e):new sh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function P2(t,e){this._context=t,this._alpha=e}P2.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:ch(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 xL=function t(e){function n(r){return e?new P2(r,e):new uh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function D2(t){this._context=t}D2.prototype={areaStart:xn,areaEnd:xn,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 _L(t){return new D2(t)}function k2(t){return t<0?-1:1}function E2(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(k2(o)+k2(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function L2(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function lh(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 du(t){this._context=t}du.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:lh(this,this._t0,L2(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,lh(this,L2(this,n=E2(this,t,e)),n);break;default:lh(this,this._t0,n=E2(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function N2(t){this._context=new R2(t)}(N2.prototype=Object.create(du.prototype)).point=function(t,e){du.prototype.point.call(this,e,t)};function R2(t){this._context=t}R2.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function wL(t){return new du(t)}function AL(t){return new N2(t)}function C2(t){this._context=t}C2.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=I2(t),i=I2(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 I2(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 ML(t){return new C2(t)}function gu(t,e){this._context=t,this._t=e}gu.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 $L(t){return new gu(t,.5)}function SL(t){return new gu(t,0)}function TL(t){return new gu(t,1)}function Kr(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 Qr(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function PL(t,e){return t[e]}function DL(t){const e=[];return e.key=t,e}function kL(){var t=it([]),e=Qr,n=Kr,r=PL;function i(o){var a=Array.from(t.apply(this,arguments),DL),s,c=a.length,u=-1,f;for(const h of o)for(s=0,++u;s<c;++s)(a[s][u]=[0,+r(h,a[s].key,u,o)]).data=h;for(s=0,f=au(e(a));s<c;++s)a[f[s]].index=s;return n(a,f),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:it(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:it(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?Qr:typeof o=="function"?o:it(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??Kr,i):n},i}function EL(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}Kr(t,e)}}function LL(t,e){if((c=t.length)>0)for(var n,r=0,i,o,a,s,c,u=t[e[0]].length;r<u;++r)for(a=s=0,n=0;n<c;++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 NL(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}Kr(t,e)}}function RL(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,c=0,u=0;s<a;++s){for(var f=t[e[s]],h=f[r][1]||0,l=f[r-1][1]||0,p=(h-l)/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}c+=h,u+=p*h}i[r-1][1]+=i[r-1][0]=n,c&&(n-=u/c)}i[r-1][1]+=i[r-1][0]=n,Kr(t,e)}}function F2(t){var e=t.map(CL);return Qr(t).sort(function(n,r){return e[n]-e[r]})}function CL(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 z2(t){var e=t.map(O2);return Qr(t).sort(function(n,r){return e[n]-e[r]})}function O2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function IL(t){return z2(t).reverse()}function FL(t){var e=t.length,n,r,i=t.map(O2),o=F2(t),a=0,s=0,c=[],u=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],c.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(c)}function zL(t){return Qr(t).reverse()}const mu=t=>()=>t;function OL(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 Be(t,e,n){this.k=t,this.x=e,this.y=n}Be.prototype={constructor:Be,scale:function(t){return t===1?this:new Be(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Be(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 yu=new Be(1,0,0);G2.prototype=Be.prototype;function G2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return yu;return t.__zoom}function fh(t){t.stopImmediatePropagation()}function $o(t){t.preventDefault(),t.stopImmediatePropagation()}function GL(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function BL(){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 B2(){return this.__zoom||yu}function UL(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function YL(){return navigator.maxTouchPoints||"ontouchstart"in this}function WL(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 U2(){var t=GL,e=BL,n=WL,r=UL,i=YL,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=mg,u=Ln("start","zoom","end"),f,h,l,p=500,d=150,g=0,m=10;function y(A){A.property("__zoom",B2).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",k).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,$,w,D){var L=A.selection?A.selection():A;L.property("__zoom",B2),A!==L?M(A,$,w,D):L.interrupt().each(function(){_(this,arguments).event(D).start().zoom(null,typeof $=="function"?$.apply(this,arguments):$).end()})},y.scaleBy=function(A,$,w,D){y.scaleTo(A,function(){var L=this.__zoom.k,R=typeof $=="function"?$.apply(this,arguments):$;return L*R},w,D)},y.scaleTo=function(A,$,w,D){y.transform(A,function(){var L=e.apply(this,arguments),R=this.__zoom,F=w==null?b(L):typeof w=="function"?w.apply(this,arguments):w,z=R.invert(F),Y=typeof $=="function"?$.apply(this,arguments):$;return n(v(x(R,Y),F,z),L,a)},w,D)},y.translateBy=function(A,$,w,D){y.transform(A,function(){return n(this.__zoom.translate(typeof $=="function"?$.apply(this,arguments):$,typeof w=="function"?w.apply(this,arguments):w),e.apply(this,arguments),a)},null,D)},y.translateTo=function(A,$,w,D,L){y.transform(A,function(){var R=e.apply(this,arguments),F=this.__zoom,z=D==null?b(R):typeof D=="function"?D.apply(this,arguments):D;return n(yu.translate(z[0],z[1]).scale(F.k).translate(typeof $=="function"?-$.apply(this,arguments):-$,typeof w=="function"?-w.apply(this,arguments):-w),R,a)},D,L)};function x(A,$){return $=Math.max(o[0],Math.min(o[1],$)),$===A.k?A:new Be($,A.x,A.y)}function v(A,$,w){var D=$[0]-w[0]*A.k,L=$[1]-w[1]*A.k;return D===A.x&&L===A.y?A:new Be(A.k,D,L)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function M(A,$,w,D){A.on("start.zoom",function(){_(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(D).end()}).tween("zoom",function(){var L=this,R=arguments,F=_(L,R).event(D),z=e.apply(L,R),Y=w==null?b(z):typeof w=="function"?w.apply(L,R):w,rt=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),Z=L.__zoom,J=typeof $=="function"?$.apply(L,R):$,ht=c(Z.invert(Y).concat(rt/Z.k),J.invert(Y).concat(rt/J.k));return function(H){if(H===1)H=J;else{var pt=ht(H),B=rt/pt[2];H=new Be(B,Y[0]-pt[0]*B,Y[1]-pt[1]*B)}F.zoom(null,H)}})}function _(A,$,w){return!w&&A.__zooming||new T(A,$)}function T(A,$){this.that=A,this.args=$,this.active=0,this.sourceEvent=null,this.extent=e.apply(A,$),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,$){return this.mouse&&A!=="mouse"&&(this.mouse[1]=$.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=$.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=$.invert(this.touch1[0])),this.that.__zoom=$,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var $=K(this.that).datum();u.call(A,this.that,new OL(A,{sourceEvent:this.sourceEvent,target:y,type:A,transform:this.that.__zoom,dispatch:u}),$)}};function P(A,...$){if(!t.apply(this,arguments))return;var w=_(this,$).event(A),D=this.__zoom,L=Math.max(o[0],Math.min(o[1],D.k*Math.pow(2,r.apply(this,arguments)))),R=ae(A);if(w.wheel)(w.mouse[0][0]!==R[0]||w.mouse[0][1]!==R[1])&&(w.mouse[1]=D.invert(w.mouse[0]=R)),clearTimeout(w.wheel);else{if(D.k===L)return;w.mouse=[R,D.invert(R)],Gn(this),w.start()}$o(A),w.wheel=setTimeout(F,d),w.zoom("mouse",n(v(x(D,L),w.mouse[0],w.mouse[1]),w.extent,a));function F(){w.wheel=null,w.end()}}function E(A,...$){if(l||!t.apply(this,arguments))return;var w=A.currentTarget,D=_(this,$,!0).event(A),L=K(A.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",rt,!0),R=ae(A,w),F=A.clientX,z=A.clientY;xa(A.view),fh(A),D.mouse=[R,this.__zoom.invert(R)],Gn(this),D.start();function Y(Z){if($o(Z),!D.moved){var J=Z.clientX-F,ht=Z.clientY-z;D.moved=J*J+ht*ht>g}D.event(Z).zoom("mouse",n(v(D.that.__zoom,D.mouse[0]=ae(Z,w),D.mouse[1]),D.extent,a))}function rt(Z){L.on("mousemove.zoom mouseup.zoom",null),_a(Z.view,D.moved),$o(Z),D.event(Z).end()}}function k(A,...$){if(t.apply(this,arguments)){var w=this.__zoom,D=ae(A.changedTouches?A.changedTouches[0]:A,this),L=w.invert(D),R=w.k*(A.shiftKey?.5:2),F=n(v(x(w,R),D,L),e.apply(this,$),a);$o(A),s>0?K(this).transition().duration(s).call(M,F,D,A):K(this).call(y.transform,F,D,A)}}function S(A,...$){if(t.apply(this,arguments)){var w=A.touches,D=w.length,L=_(this,$,A.changedTouches.length===D).event(A),R,F,z,Y;for(fh(A),F=0;F<D;++F)z=w[F],Y=ae(z,this),Y=[Y,this.__zoom.invert(Y),z.identifier],L.touch0?!L.touch1&&L.touch0[2]!==Y[2]&&(L.touch1=Y,L.taps=0):(L.touch0=Y,R=!0,L.taps=1+!!f);f&&(f=clearTimeout(f)),R&&(L.taps<2&&(h=Y[0],f=setTimeout(function(){f=null},p)),Gn(this),L.start())}}function C(A,...$){if(this.__zooming){var w=_(this,$).event(A),D=A.changedTouches,L=D.length,R,F,z,Y;for($o(A),R=0;R<L;++R)F=D[R],z=ae(F,this),w.touch0&&w.touch0[2]===F.identifier?w.touch0[0]=z:w.touch1&&w.touch1[2]===F.identifier&&(w.touch1[0]=z);if(F=w.that.__zoom,w.touch1){var rt=w.touch0[0],Z=w.touch0[1],J=w.touch1[0],ht=w.touch1[1],H=(H=J[0]-rt[0])*H+(H=J[1]-rt[1])*H,pt=(pt=ht[0]-Z[0])*pt+(pt=ht[1]-Z[1])*pt;F=x(F,Math.sqrt(H/pt)),z=[(rt[0]+J[0])/2,(rt[1]+J[1])/2],Y=[(Z[0]+ht[0])/2,(Z[1]+ht[1])/2]}else if(w.touch0)z=w.touch0[0],Y=w.touch0[1];else return;w.zoom("touch",n(v(F,z,Y),w.extent,a))}}function N(A,...$){if(this.__zooming){var w=_(this,$).event(A),D=A.changedTouches,L=D.length,R,F;for(fh(A),l&&clearTimeout(l),l=setTimeout(function(){l=null},p),R=0;R<L;++R)F=D[R],w.touch0&&w.touch0[2]===F.identifier?delete w.touch0:w.touch1&&w.touch1[2]===F.identifier&&delete w.touch1;if(w.touch1&&!w.touch0&&(w.touch0=w.touch1,delete w.touch1),w.touch0)w.touch0[1]=this.__zoom.invert(w.touch0[0]);else if(w.end(),w.taps===2&&(F=ae(F,this),Math.hypot(h[0]-F[0],h[1]-F[1])<m)){var z=K(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return y.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:mu(+A),y):r},y.filter=function(A){return arguments.length?(t=typeof A=="function"?A:mu(!!A),y):t},y.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:mu(!!A),y):i},y.extent=function(A){return arguments.length?(e=typeof A=="function"?A:mu([[+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?(c=A,y):c},y.on=function(){var A=u.on.apply(u,arguments);return A===u?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 Y2=Object.freeze(Object.defineProperty({__proto__:null,Adder:kt,Delaunay:wl,FormatSpecifier:es,InternMap:_i,InternSet:Dn,Node:Zn,Path:Bi,Voronoi:i1,ZoomTransform:Be,active:XM,arc:Qb,area:t2,areaRadial:o2,ascending:xt,autoType:yS,axisBottom:O8,axisLeft:Ac,axisRight:z8,axisTop:bd,bin:ud,bisect:Pn,bisectCenter:R6,bisectLeft:N6,bisectRight:Xp,bisector:aa,blob:xS,blur:C6,blur2:Vp,blurImage:I6,brush:a$,brushSelection:r$,brushX:i$,brushY:o$,buffer:wS,chord:u$,chordDirected:l$,chordTranspose:c$,cluster:RT,color:ln,contourDensity:I$,contours:yl,count:ua,create:x7,creator:ya,cross:Y6,csv:$S,csvFormat:aS,csvFormatBody:sS,csvFormatRow:cS,csvFormatRows:uS,csvFormatValue:lS,csvParse:u1,csvParseRows:oS,cubehelix:$e,cumsum:W6,curveBasis:fL,curveBasisClosed:hL,curveBasisOpen:pL,curveBumpX:s2,curveBumpY:u2,curveBundle:dL,curveCardinal:gL,curveCardinalClosed:mL,curveCardinalOpen:yL,curveCatmullRom:bL,curveCatmullRomClosed:vL,curveCatmullRomOpen:xL,curveLinear:su,curveLinearClosed:_L,curveMonotoneX:wL,curveMonotoneY:AL,curveNatural:ML,curveStep:$L,curveStepAfter:TL,curveStepBefore:SL,descending:Hp,deviation:Kp,difference:S8,disjoint:T8,dispatch:Ln,drag:kd,dragDisable:xa,dragEnable:_a,dsv:MS,dsvFormat:Ka,easeBack:zg,easeBackIn:OM,easeBackInOut:zg,easeBackOut:GM,easeBounce:Oi,easeBounceIn:FM,easeBounceInOut:zM,easeBounceOut:Oi,easeCircle:Fg,easeCircleIn:TM,easeCircleInOut:Fg,easeCircleOut:PM,easeCubic:zi,easeCubicIn:vM,easeCubicInOut:zi,easeCubicOut:xM,easeElastic:Wa,easeElasticIn:BM,easeElasticInOut:UM,easeElasticOut:Wa,easeExp:Ig,easeExpIn:$M,easeExpInOut:Ig,easeExpOut:SM,easeLinear:mM,easePoly:Lg,easePolyIn:_M,easePolyInOut:Lg,easePolyOut:wM,easeQuad:Eg,easeQuadIn:yM,easeQuadInOut:Eg,easeQuadOut:bM,easeSin:Cg,easeSinIn:AM,easeSinInOut:Cg,easeSinOut:MM,every:x8,extent:xi,fcumsum:q6,filter:w8,flatGroup:X6,flatRollup:V6,forceCenter:NS,forceCollide:p1,forceLink:JS,forceManyBody:y1,forceRadial:s9,forceSimulation:m1,forceX:b1,forceY:v1,get format(){return Hi},formatDefaultLocale:T1,formatLocale:S1,get formatPrefix(){return Pl},formatSpecifier:Ir,fsum:H6,geoAlbers:Bm,geoAlbersUsa:hT,geoArea:y9,geoAzimuthalEqualArea:pT,geoAzimuthalEqualAreaRaw:df,geoAzimuthalEquidistant:dT,geoAzimuthalEquidistantRaw:gf,geoBounds:_9,geoCentroid:T9,geoCircle:P9,geoClipAntimeridian:ql,geoClipCircle:cm,geoClipExtent:C9,geoClipRectangle:As,geoConicConformal:mT,geoConicConformalRaw:Wm,geoConicEqualArea:Cs,geoConicEqualAreaRaw:Gm,geoConicEquidistant:bT,geoConicEquidistantRaw:Hm,geoContains:U9,geoDistance:Ss,geoEqualEarth:xT,geoEqualEarthRaw:mf,geoEquirectangular:yT,geoEquirectangularRaw:so,geoGnomonic:_T,geoGnomonicRaw:yf,geoGraticule:vm,geoGraticule10:Y9,geoIdentity:wT,geoInterpolate:W9,geoLength:lm,geoMercator:gT,geoMercatorRaw:ao,geoNaturalEarth1:AT,geoNaturalEarth1Raw:bf,geoOrthographic:MT,geoOrthographicRaw:vf,geoPath:nT,geoProjection:ze,geoProjectionMutator:hf,geoRotation:em,geoStereographic:$T,geoStereographicRaw:xf,geoStream:Te,geoTransform:rT,geoTransverseMercator:ST,geoTransverseMercatorRaw:_f,gray:G7,greatest:cd,greatestIndex:d8,group:ed,groupSort:K6,groups:nd,hcl:Da,hierarchy:wf,histogram:ud,hsl:$a,html:ES,image:TS,index:j6,indexes:Z6,interpolate:fn,interpolateArray:q7,interpolateBasis:eg,interpolateBasisClosed:ng,interpolateBlues:vE,interpolateBrBG:Qk,interpolateBuGn:sE,interpolateBuPu:uE,interpolateCividis:$E,interpolateCool:PE,interpolateCubehelix:sA,interpolateCubehelixDefault:SE,interpolateCubehelixLong:Ca,interpolateDate:ug,interpolateDiscrete:j7,interpolateGnBu:cE,interpolateGreens:xE,interpolateGreys:_E,interpolateHcl:oA,interpolateHclLong:aA,interpolateHsl:nA,interpolateHslLong:rA,interpolateHue:Z7,interpolateInferno:IE,interpolateLab:iA,interpolateMagma:CE,interpolateNumber:ce,interpolateNumberArray:Uc,interpolateObject:cg,interpolateOrRd:lE,interpolateOranges:ME,interpolatePRGn:Jk,interpolatePiYG:tE,interpolatePlasma:FE,interpolatePuBu:hE,interpolatePuBuGn:fE,interpolatePuOr:eE,interpolatePuRd:pE,interpolatePurples:wE,interpolateRainbow:DE,interpolateRdBu:nE,interpolateRdGy:rE,interpolateRdPu:dE,interpolateRdYlBu:iE,interpolateRdYlGn:oE,interpolateReds:AE,interpolateRgb:Ei,interpolateRgbBasis:og,interpolateRgbBasisClosed:H7,interpolateRound:Na,interpolateSinebow:LE,interpolateSpectral:aE,interpolateString:Hc,interpolateTransformCss:pg,interpolateTransformSvg:dg,interpolateTurbo:NE,interpolateViridis:RE,interpolateWarm:TE,interpolateYlGn:mE,interpolateYlGnBu:gE,interpolateYlOrBr:yE,interpolateYlOrRd:bE,interpolateZoom:mg,interrupt:Gn,intersection:P8,interval:hA,isoFormat:Ek,isoParse:Rk,json:DS,lab:Pa,lch:B7,least:p8,leastIndex:hd,line:uu,lineRadial:i2,link:cu,linkHorizontal:JE,linkRadial:eL,linkVertical:tL,local:Pd,map:A8,matcher:Tc,max:wi,maxIndex:vc,mean:o8,median:a8,medianIndex:s8,merge:_c,min:fa,minIndex:xc,mode:c8,namespace:Si,namespaces:$c,nice:yc,now:Ii,pack:lP,packEnclose:iP,packSiblings:uP,pairs:l8,partition:fP,path:ml,pathRound:p$,permute:sd,pie:e2,piecewise:xg,pointRadial:Mo,pointer:ae,pointers:w7,polygonArea:TP,polygonCentroid:PP,polygonContains:LP,polygonHull:EP,polygonLength:NP,precisionFixed:P1,precisionPrefix:D1,precisionRound:k1,quadtree:Ja,quantile:Mi,quantileIndex:fd,quantileSorted:ld,quantize:uA,quickselect:ha,radialArea:o2,radialLine:i2,randomBates:FP,randomBernoulli:GP,randomBeta:py,randomBinomial:dy,randomCauchy:UP,randomExponential:zP,randomGamma:Ef,randomGeometric:hy,randomInt:CP,randomIrwinHall:fy,randomLcg:XP,randomLogNormal:IP,randomLogistic:YP,randomNormal:kf,randomPareto:OP,randomPoisson:WP,randomUniform:RP,randomWeibull:BP,range:un,rank:h8,reduce:M8,reverse:$8,rgb:Mr,ribbon:_$,ribbonArrow:w$,rollup:id,rollups:od,scaleBand:Rf,scaleDiverging:xb,scaleDivergingLog:_b,scaleDivergingPow:Jf,scaleDivergingSqrt:Gk,scaleDivergingSymlog:wb,scaleIdentity:vy,scaleImplicit:Lf,scaleLinear:zf,scaleLog:My,scaleOrdinal:Nf,scalePoint:Cf,scalePow:Hs,scaleQuantile:Ey,scaleQuantize:Ly,scaleRadial:ky,scaleSequential:mb,scaleSequentialLog:yb,scaleSequentialPow:Qf,scaleSequentialQuantile:vb,scaleSequentialSqrt:Ok,scaleSequentialSymlog:bb,scaleSqrt:oD,scaleSymlog:Ty,scaleThreshold:Ny,scaleTime:Fk,scaleUtc:zk,scan:g8,schemeAccent:Uk,schemeBlues:Wb,schemeBrBG:Ab,schemeBuGn:Lb,schemeBuPu:Nb,schemeCategory10:Bk,schemeDark2:Yk,schemeGnBu:Rb,schemeGreens:Hb,schemeGreys:qb,schemeObservable10:Wk,schemeOrRd:Cb,schemeOranges:jb,schemePRGn:Mb,schemePaired:Hk,schemePastel1:qk,schemePastel2:Xk,schemePiYG:$b,schemePuBu:Fb,schemePuBuGn:Ib,schemePuOr:Sb,schemePuRd:zb,schemePurples:Xb,schemeRdBu:Tb,schemeRdGy:Pb,schemeRdPu:Ob,schemeRdYlBu:Db,schemeRdYlGn:kb,schemeReds:Vb,schemeSet1:Vk,schemeSet2:jk,schemeSet3:Zk,schemeSpectral:Eb,schemeTableau10:Kk,schemeYlGn:Bb,schemeYlGnBu:Gb,schemeYlOrBr:Ub,schemeYlOrRd:Yb,select:K,selectAll:A7,selection:Rn,selector:ba,selectorAll:Sc,shuffle:m8,shuffler:pd,some:_8,sort:dc,stack:kL,stackOffsetDiverging:LL,stackOffsetExpand:EL,stackOffsetNone:Kr,stackOffsetSilhouette:NL,stackOffsetWiggle:RL,stackOrderAppearance:F2,stackOrderAscending:z2,stackOrderDescending:IL,stackOrderInsideOut:FL,stackOrderNone:Qr,stackOrderReverse:zL,stratify:gP,style:Nn,subset:k8,sum:y8,superset:gd,svg:LS,symbol:lL,symbolAsterisk:c2,symbolCircle:lu,symbolCross:l2,symbolDiamond:h2,symbolDiamond2:p2,symbolPlus:d2,symbolSquare:g2,symbolSquare2:m2,symbolStar:b2,symbolTimes:oh,symbolTriangle:v2,symbolTriangle2:x2,symbolWye:_2,symbolX:oh,symbols:w2,symbolsFill:w2,symbolsStroke:cL,text:Qa,thresholdFreedmanDiaconis:r8,thresholdScott:i8,thresholdSturges:bc,tickFormat:by,tickIncrement:En,tickStep:la,ticks:kn,timeDay:qr,timeDays:fD,get timeFormat(){return jf},timeFormatDefaultLocale:db,timeFormatLocale:Qy,timeFriday:Oy,timeFridays:bD,timeHour:Vs,timeHours:cD,timeInterval:Tt,timeMillisecond:Hr,timeMilliseconds:Ry,timeMinute:qs,timeMinutes:sD,timeMonday:yo,timeMondays:dD,timeMonth:Zs,timeMonths:SD,get timeParse(){return pb},timeSaturday:Gy,timeSaturdays:vD,timeSecond:rn,timeSeconds:Iy,timeSunday:Xr,timeSundays:By,timeThursday:Jn,timeThursdays:yD,timeTickInterval:Ky,timeTicks:Zy,timeTuesday:Fy,timeTuesdays:gD,timeWednesday:zy,timeWednesdays:mD,timeWeek:Xr,timeWeeks:By,timeYear:Oe,timeYears:PD,timeout:Vc,timer:Oa,timerFlush:Ag,transition:Dg,transpose:dd,tree:wP,treemap:AP,treemapBinary:MP,treemapDice:po,treemapResquarify:SP,treemapSlice:Us,treemapSliceDice:$P,treemapSquarify:cy,tsv:SS,tsvFormat:hS,tsvFormatBody:pS,tsvFormatRow:gS,tsvFormatRows:dS,tsvFormatValue:mS,tsvParse:c1,tsvParseRows:fS,union:E8,unixDay:qf,unixDays:pD,utcDay:mo,utcDays:hD,get utcFormat(){return Qs},utcFriday:Wy,utcFridays:MD,utcHour:js,utcHours:lD,utcMillisecond:Hr,utcMilliseconds:Ry,utcMinute:Xs,utcMinutes:uD,utcMonday:bo,utcMondays:xD,utcMonth:Ks,utcMonths:TD,get utcParse(){return Zf},utcSaturday:Hy,utcSaturdays:$D,utcSecond:rn,utcSeconds:Iy,utcSunday:Vr,utcSundays:qy,utcThursday:er,utcThursdays:AD,utcTickInterval:jy,utcTicks:Vy,utcTuesday:Uy,utcTuesdays:_D,utcWednesday:Yy,utcWednesdays:wD,utcWeek:Vr,utcWeeks:qy,utcYear:Ge,utcYears:DD,variance:Zp,window:Pc,xml:kS,zip:v8,zoom:U2,zoomIdentity:yu,zoomTransform:G2},Symbol.toStringTag,{value:"Module"}));function W2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function HL(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 Jr(t){return t.substring(0,4)!=="ease"?zi:Y2[t]??zi}function bu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=zf().domain([0,1]).range([0,t/2]),a=o(n);return Qb().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const vu=(t,e)=>e instanceof Function?e(t):Hi(e)(t);function H2(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 q2(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 qL(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return q2(e)}function Pt(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 XL(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]}function hh({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 ft(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function ti(t,e){const r=Math.random().toString(36).substr(2,5);return ft(t,e,r)}function X2({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r}){const i=new lt,o=new at(a=>{W({dataFormatter:t,computedData:n}).pipe(I(i),U(async s=>s)).subscribe(s=>{const u=s.computedData[0]?s.computedData[0].length-1:0,f=s.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.groupAxis.scalePadding:s.dataFormatter.groupAxis.scaleDomain[0]-s.dataFormatter.groupAxis.scalePadding,h=s.dataFormatter.groupAxis.scaleDomain[1]==="auto"?u+s.dataFormatter.groupAxis.scalePadding:s.dataFormatter.groupAxis.scaleDomain[1]+s.dataFormatter.groupAxis.scalePadding,p=(s.dataFormatter.grid.seriesType==="row"?(s.computedData[0]??[]).map(d=>d.groupLabel):s.computedData.map(d=>d[0].groupLabel)).filter((d,g)=>g>=f&&g<=h);a.next(p)})});return new at(a=>{W({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(I(i),U(async s=>s)).subscribe(s=>{const c=s.dataFormatter.valueAxis.position==="right"||s.dataFormatter.valueAxis.position==="bottom",u=D6({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:c}),f=l=>s.dataFormatter.groupAxis.position==="bottom"||s.dataFormatter.groupAxis.position==="top"?l.offsetX-s.fullChartParams.padding.left:l.offsetY-s.fullChartParams.padding.top,h=l=>{const p=f(l),d=u(p);return{groupIndex:d,groupLabel:s.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})}const V2="Lines",VL=ft(V2,"g"),jL=ft(V2,"path");function ZL(t="curveLinear"){return uu().x(e=>e.axisX).y(e=>e.axisY).curve(Y2[t])}function KL(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 QL({selection:t,segmentData:e,linePath:n,params:r}){return t.selectAll("path").data(e,(o,a)=>o.length?`${o[0].id}_${o[o.length-1].id}`:a).join(o=>o.append("path").classed(jL,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),o=>o,o=>o.remove()).attr("stroke-width",r.lineWidth).attr("stroke",(o,a)=>o[0]&&o[0].color).attr("d",o=>n(o))}function JL({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?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function tN({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)=>{K(a[o]).selectAll("rect").data([i]).join(s=>{const c=s.append("rect");return c.transition().duration(n).ease(Jr(r)).tween("tween",(u,f,h)=>l=>{const p=u.width*l;c.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),c},s=>s.attr("x",0).attr("y",0).attr("width",c=>c.width).attr("height",c=>c.height),s=>s.remove())})}const j2=(t,{selection:e,computedData$:n,SeriesDataMap$:r,GroupDataMap$:i,fullParams$:o,fullDataFormatter$:a,fullChartParams$:s,gridAxesTransform$:c,gridGraphicTransform$:u,gridAxesSize$:f,gridHighlight$:h,event$:l})=>{const p=new lt,d=ti(t,"clipPath-box"),g=e.append("g").attr("clip-path",`url(#${d})`),m=g.append("defs"),y=g.append("g"),x=new lt;c.pipe(I(p),G(S=>S.value),tt()).subscribe(S=>{g.style("transform",S)}),u.pipe(I(p),G(S=>S.value),tt()).subscribe(S=>{y.transition().duration(50).style("transform",S)});const v=new at(S=>{const C=o.pipe(I(p)).subscribe(N=>{if(!N)return;const A=ZL(N.lineCurve);S.next(A)});return()=>{C.unsubscribe()}}),b=new at(S=>{n.pipe(I(p),U(async C=>C)).subscribe(C=>{const N=C[0]&&C[0][0]?C.map(A=>A[0].seriesLabel):[];S.next(N)})}),M=s.pipe(G(S=>S.transitionDuration),tt()),_=s.pipe(G(S=>S.transitionEase),tt());W({seriesLabels:b,axisSize:f,transitionDuration:M,transitionEase:_}).pipe(I(p),U(async S=>S)).subscribe(S=>{const N=[{id:d,width:S.axisSize.width,height:S.axisSize.height}].concat(S.seriesLabels.map(A=>({id:`orbcharts__clipPath_${A}`,width:S.axisSize.width,height:S.axisSize.height})));tN({defsSelection:m,clipPathData:N,transitionDuration:S.transitionDuration,transitionEase:S.transitionEase})});const T=n.pipe(G(S=>{const C=new Map;return S.flat().forEach(N=>C.set(N.id,N)),C})),P=X2({fullDataFormatter$:a,gridAxesSize$:f,computedData$:n,fullChartParams$:s}),E=s.pipe(I(p),G(S=>S.highlightTarget),tt());W({seriesLabels:b,computedData:n,SeriesDataMap:r,GroupDataMap:i,linePath:v,params:o,highlightTarget:E,gridGroupPositionFn:P}).pipe(I(p),U(async S=>S)).subscribe(S=>{const C=y.selectAll("g").data(S.seriesLabels,($,w)=>$),N=C.enter().append("g").classed(VL,!0);C.exit().remove();const A=C.merge(N).attr("clip-path",($,w)=>`url(#orbcharts__clipPath_${$})`);A.each(($,w,D)=>{const L=KL(S.computedData[w]??[]);QL({selection:K(D[w]),linePath:S.linePath,segmentData:L,params:S.params}).on("mouseover",(F,z)=>{F.stopPropagation();const Y=z[0]?z[0].seriesLabel:"",{groupIndex:rt,groupLabel:Z}=S.gridGroupPositionFn(F),H=S.GroupDataMap.get(Z).find(pt=>pt.seriesLabel===Y)??z[0];l.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:S.highlightTarget,datum:H,series:S.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:S.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:F,data:S.computedData})}).on("mousemove",(F,z)=>{F.stopPropagation();const Y=z[0]?z[0].seriesLabel:"",{groupIndex:rt,groupLabel:Z}=S.gridGroupPositionFn(F),H=S.GroupDataMap.get(Z).find(pt=>pt.seriesLabel===Y)??z[0];l.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:S.highlightTarget,datum:H,series:S.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:S.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:F,data:S.computedData})}).on("mouseout",(F,z)=>{F.stopPropagation();const Y=z[0]?z[0].seriesLabel:"",{groupIndex:rt,groupLabel:Z}=S.gridGroupPositionFn(F),H=S.GroupDataMap.get(Z).find(pt=>pt.seriesLabel===Y)??z[0];l.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:S.highlightTarget,datum:H,series:S.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:S.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:F,data:S.computedData})}).on("click",(F,z)=>{F.stopPropagation();const Y=z[0]?z[0].seriesLabel:"",{groupIndex:rt,groupLabel:Z}=S.gridGroupPositionFn(F),H=S.GroupDataMap.get(Z).find(pt=>pt.seriesLabel===Y)??z[0];l.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:S.highlightTarget,datum:H,series:S.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:S.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:F,data:S.computedData})})}),x.next(A)});const k=h.subscribe();return s.pipe(I(p),Lo(S=>S.highlightTarget==="series"),U(S=>W({graphicSelection:x,highlight:h,DataMap:T,fullChartParams:s}).pipe(I(p),U(async C=>C)))).subscribe(S=>{const C=S.DataMap.get(S.highlight[0]);JL({selection:S.graphicSelection,seriesLabel:C&&C.seriesLabel?C.seriesLabel:null,fullChartParams:S.fullChartParams})}),()=>{p.next(void 0),k.unsubscribe()}},Z2="Lines",eN=we(Z2,rr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=j2(Z2,{selection:t,computedData$:n.computedData$,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$,event$:r.event$});return()=>{i.next(void 0),o()}}),K2="Bars",Q2=ft(K2,"g"),J2=ft(K2,"rect"),tv=.3;function nN({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 rN(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Cf().domain(e).range([-i/2+r,i/2-r])}function iN(t,e){return t<=1?0:e/(t-1)*tv}function oN(t,e){return t<=1?e:e*(1-tv)}function aN({selection:t,data:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:c,delayGroup:u,transitionItem:f}){const h=s/2;return t.selectAll(`g.${Q2}`).data(e,(d,g)=>r[g]).join(d=>d.append("g").classed(Q2,!0).attr("cursor","pointer"),d=>d,d=>d.remove()).attr("transform",(d,g)=>`translate(${d[0]?d[0].axisX:0}, 0)`).each((d,g,m)=>{K(m[g]).selectAll("rect").data(d,y=>y.id).join(y=>y.append("rect").classed(J2,!0).attr("height",x=>0),y=>y,y=>y.remove()).attr("fill",y=>y.color).attr("y",y=>y.axisY<n?y.axisY:n).attr("x",y=>i(y.seriesLabel)).attr("width",s).attr("transform",`translate(${-h}, 0)`).attr("rx",c[0]).attr("ry",c[1]).transition().duration(f).ease(Jr(a.transitionEase)).delay((y,x)=>y.groupIndex*u).attr("height",y=>Math.abs(y.axisYFromZero))}).selectAll(`rect.${J2}`)}function sN({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)=>{K(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 uN({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)?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const ev=(t,{selection:e,computedData$:n,visibleComputedData$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullChartParams$:s,gridAxesTransform$:c,gridGraphicTransform$:u,gridAxesSize$:f,gridHighlight$:h,event$:l})=>{const p=new lt,d=ti(t,"clipPath-box"),g=e.append("g").attr("clip-path",`url(#${d})`),m=g.append("defs"),y=g.append("g"),x=new lt;c.pipe(I(p),G($=>$.value),tt()).subscribe($=>{g.style("transform",$)}),u.pipe(I(p),G($=>$.value),tt()).subscribe($=>{y.transition().duration(50).style("transform",$)});const v=r.pipe(G($=>$[0]&&$[0][0]?$[0][0].axisY-$[0][0].axisYFromZero:0),tt()),b=new at($=>{W({computedData:n,visibleComputedData:r,params:a,gridAxesSize:f}).pipe(U(async w=>w)).subscribe(w=>{const D=w.params.barWidth?w.params.barWidth:nN({axisWidth:w.gridAxesSize.width,groupAmount:w.computedData[0]?w.computedData[0].length:0,barAmountOfGroup:w.visibleComputedData.length,barPadding:w.params.barPadding,barGroupPadding:w.params.barGroupPadding});$.next(D)})}).pipe(I(p),tt()),M=W({gridGraphicTransform:u,barWidth:b,params:a}).pipe(I(p),U(async $=>$),G($=>{const w=$.barWidth/2,D=$.params.barRadius===!0?w:$.params.barRadius===!1?0:typeof $.params.barRadius=="number"?$.params.barRadius:0,L=D==0?0:D/$.gridGraphicTransform.scale[0],R=D==0?0:D/$.gridGraphicTransform.scale[1];return[L,R]})),_=r.pipe(I(p),G($=>{const w=new Set;return $.forEach(D=>{D.forEach(L=>{w.add(L.seriesLabel)})}),Array.from(w)})),T=r.pipe(I(p),G($=>{const w=new Set;return $.forEach(D=>{D.forEach(L=>{w.add(L.groupLabel)})}),Array.from(w)})),P=new at($=>{W({seriesLabels:_,barWidth:b,params:a}).pipe(I(p),U(async w=>w)).subscribe(w=>{const D=rN(w.barWidth,w.seriesLabels,w.params);$.next(D)})}),E=s.pipe(I(p),G($=>$.transitionDuration),tt()),k=new at($=>{W({groupLabels:T,transitionDuration:E}).pipe(U(async w=>w)).subscribe(w=>{const D=iN(w.groupLabels.length,w.transitionDuration);$.next(D)})}).pipe(I(p),tt()),S=new at($=>{W({groupLabels:T,transitionDuration:E}).pipe(U(async w=>w)).subscribe(w=>{const D=oN(w.groupLabels.length,w.transitionDuration);$.next(D)})}).pipe(I(p),tt()),C=r.pipe(I(p),G($=>{const w=$.length,D=$.reduce((R,F)=>Math.max(R,F.length),0),L=new Array(D).fill(null).map(()=>new Array(w).fill(null));for(let R=0;R<w;R++)for(let F=0;F<D;F++)L[F][R]=$[R][F];return L}));f.pipe(I(p)).subscribe($=>{const w=[{id:d,width:$.width,height:$.height}];sN({defsSelection:m,clipPathData:w})});const N=s.pipe(I(p),G($=>$.highlightTarget),tt());W({computedData:n,barData$:C,zeroY:v,groupLabels:T,barScale:P,params:a,chartParams:s,highlightTarget:N,barWidth:b,transformedBarRadius:M,delayGroup:k,transitionItem:S,SeriesDataMap:i,GroupDataMap:o}).pipe(I(p),U(async $=>$)).subscribe($=>{const w=aN({selection:y,data:$.barData$,zeroY:$.zeroY,groupLabels:$.groupLabels,barScale:$.barScale,params:$.params,chartParams:$.chartParams,barWidth:$.barWidth,transformedBarRadius:$.transformedBarRadius,delayGroup:$.delayGroup,transitionItem:$.transitionItem});w.on("mouseover",(D,L)=>{D.stopPropagation(),l.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:$.highlightTarget,datum:L,series:$.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:$.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:D,data:$.computedData})}).on("mousemove",(D,L)=>{D.stopPropagation(),l.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:$.highlightTarget,datum:L,series:$.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:$.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:D,data:$.computedData})}).on("mouseout",(D,L)=>{D.stopPropagation(),l.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:$.highlightTarget,datum:L,series:$.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:$.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:D,data:$.computedData})}).on("click",(D,L)=>{D.stopPropagation(),l.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:$.highlightTarget,datum:L,series:$.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:$.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:D,data:$.computedData})}),x.next(w)});const A=h.subscribe();return W({barSelection:x,highlight:h,fullChartParams:s}).pipe(I(p),U(async $=>$)).subscribe($=>{uN({selection:$.barSelection,ids:$.highlight,fullChartParams:$.fullChartParams})}),()=>{p.next(void 0),A.unsubscribe()}},nv="Bars",cN=we(nv,Sh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=ev(nv,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,event$:n.event$});return()=>{i.next(void 0),o()}}),rv="BarStack",iv=ft(rv,"g"),ov=ft(rv,"g-content"),av=.3;function lN({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function fN(t,e){return t<=1?0:e/(t-1)*av}function hN(t,e){return t<=1?e:e*(1-av)}function pN({selection:t,data:e,zeroY:n,groupLabels:r,params:i,chartParams:o,barWidth:a,transformedBarRadius:s,delayGroup:c,transitionItem:u}){const f=a/2;return t.selectAll(`g.${iv}`).data(e,(p,d)=>r[d]).join(p=>p.append("g").classed(iv,!0).attr("cursor","pointer"),p=>p,p=>p.remove()).attr("transform",(p,d)=>`translate(${p[0]?p[0].axisX:0}, 0)`).each((p,d,g)=>{K(g[d]).selectAll("g").data(p,m=>m.id).join(m=>m.append("g").classed(ov,!0),m=>m,m=>m.remove()).each((m,y,x)=>{K(x[y]).selectAll("rect").data([m],v=>v.id).join(v=>v.append("rect").attr("y",b=>n).attr("height",b=>0),v=>v,v=>v.remove()).attr("rx",s[0]).attr("ry",s[1]).attr("fill",v=>v.color).attr("transform",`translate(${-f}, 0)`).attr("x",v=>0).attr("width",a).transition().duration(u).ease(Jr(o.transitionEase)).delay((v,b)=>v.groupIndex*c).attr("y",v=>v._barStartY).attr("height",v=>Math.abs(v._barHeight))})}).selectAll(`g.${ov}`)}function dN({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)=>{K(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 gN({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)?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const mN=(t,{selection:e,computedData$:n,visibleComputedData$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:c,gridAxesTransform$:u,gridGraphicTransform$:f,gridAxesSize$:h,gridHighlight$:l,event$:p})=>{const d=new lt,g=ti(t,"clipPath-box"),m=e.append("g").attr("clip-path",`url(#${g})`),y=m.append("defs"),x=m.append("g"),v=new lt;u.pipe(I(d),G(w=>w.value),tt()).subscribe(w=>{m.style("transform",w)}),f.pipe(I(d),U(async w=>w.value),tt()).subscribe(w=>{x.transition().duration(50).style("transform",w)});const b=r.pipe(G(w=>w[0]&&w[0][0]?w[0][0].axisY-w[0][0].axisYFromZero:0),tt()),M=new at(w=>{W({computedData:n,params:a,axisSize:h}).pipe(U(async D=>D)).subscribe(D=>{const L=D.params.barWidth?D.params.barWidth:lN({axisWidth:D.axisSize.width,groupAmount:D.computedData[0]?D.computedData[0].length:0,barGroupPadding:D.params.barGroupPadding});w.next(L)})}).pipe(I(d),tt()),_=W({gridGraphicTransform:f,barWidth:M,params:a}).pipe(I(d),U(async w=>w),G(w=>{const D=w.barWidth/2,L=w.params.barRadius===!0?D:w.params.barRadius===!1?0:typeof w.params.barRadius=="number"?w.params.barRadius:0,R=L==0?0:L/w.gridGraphicTransform.scale[0],F=L==0?0:L/w.gridGraphicTransform.scale[1];return[R,F]})),T=r.pipe(I(d),G(w=>{const D=new Set;return w.forEach(L=>{L.forEach(R=>{D.add(R.groupLabel)})}),Array.from(D)})),P=c.pipe(I(d),G(w=>w.transitionDuration),tt()),E=new at(w=>{W({groupLabels:T,transitionDuration:P}).pipe(U(async D=>D)).subscribe(D=>{const L=fN(D.groupLabels.length,D.transitionDuration);w.next(L)})}).pipe(I(d),tt()),k=new at(w=>{W({groupLabels:T,transitionDuration:P}).pipe(U(async D=>D)).subscribe(D=>{const L=hN(D.groupLabels.length,D.transitionDuration);w.next(L)})}).pipe(I(d),tt()),S=r.pipe(I(d),G(w=>{console.log("visibleComputedData",w);const D=w.length,L=w.reduce((F,z)=>Math.max(F,z.length),0),R=new Array(L).fill(null).map(()=>new Array(D).fill(null));for(let F=0;F<D;F++)for(let z=0;z<L;z++)R[z][F]=w[F][z];return R})),C=W({transposedVisibleData:S,dataFormatter:s}).pipe(I(d),U(async w=>w),G(w=>{const L=w.transposedVisibleData.length-1,R=w.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-w.dataFormatter.groupAxis.scalePadding:w.dataFormatter.groupAxis.scaleDomain[0]-w.dataFormatter.groupAxis.scalePadding,F=w.dataFormatter.groupAxis.scaleDomain[1]==="auto"?L+w.dataFormatter.groupAxis.scalePadding:w.dataFormatter.groupAxis.scaleDomain[1]+w.dataFormatter.groupAxis.scalePadding,z=w.transposedVisibleData.map(Y=>Y.filter((rt,Z)=>rt.groupIndex>=R&&rt.groupIndex<=F));if(z.flat().length){const Y=z.flat().map(ht=>ht.axisYFromZero),rt=Math.max(...Y),Z=z.map(ht=>ht.reduce((H,pt)=>H+pt.axisYFromZero,0)),J=Math.max(...Z);return rt/J}else return 1})),N=W({transposedVisibleData:S,yRatio:C,zeroY:b}).pipe(I(d),G(w=>(console.log(w.transposedVisibleData),w.transposedVisibleData.map(D=>{let L=w.zeroY;return D.map(R=>{const F=L,z=R.axisYFromZero*w.yRatio;return L=L+z,{...R,_barStartY:F,_barHeight:z}})}))));h.pipe(I(d)).subscribe(w=>{const D=[{id:g,width:w.width,height:w.height}];dN({defsSelection:y,clipPathData:D})});const A=c.pipe(I(d),G(w=>w.highlightTarget),tt());W({graphicData:N,zeroY:b,groupLabels:T,params:a,chartParams:c,highlightTarget:A,barWidth:M,transformedBarRadius:_,delayGroup:E,transitionItem:k,SeriesDataMap:i,GroupDataMap:o}).pipe(I(d),U(async w=>w)).subscribe(w=>{const D=pN({selection:x,data:w.graphicData,zeroY:w.zeroY,groupLabels:w.groupLabels,params:w.params,chartParams:w.chartParams,barWidth:w.barWidth,transformedBarRadius:w.transformedBarRadius,delayGroup:w.delayGroup,transitionItem:w.transitionItem});D.on("mouseover",(L,R)=>{L.stopPropagation(),p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:w.highlightTarget,datum:R,series:w.SeriesDataMap.get(R.seriesLabel),seriesIndex:R.seriesIndex,seriesLabel:R.seriesLabel,groups:w.GroupDataMap.get(R.groupLabel),groupIndex:R.groupIndex,groupLabel:R.groupLabel,event:L,data:w.graphicData})}).on("mousemove",(L,R)=>{L.stopPropagation(),p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:w.highlightTarget,datum:R,series:w.SeriesDataMap.get(R.seriesLabel),seriesIndex:R.seriesIndex,seriesLabel:R.seriesLabel,groups:w.GroupDataMap.get(R.groupLabel),groupIndex:R.groupIndex,groupLabel:R.groupLabel,event:L,data:w.graphicData})}).on("mouseout",(L,R)=>{L.stopPropagation(),p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:w.highlightTarget,datum:R,series:w.SeriesDataMap.get(R.seriesLabel),seriesIndex:R.seriesIndex,seriesLabel:R.seriesLabel,groups:w.GroupDataMap.get(R.groupLabel),groupIndex:R.groupIndex,groupLabel:R.groupLabel,event:L,data:w.graphicData})}).on("click",(L,R)=>{L.stopPropagation(),p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:w.highlightTarget,datum:R,series:w.SeriesDataMap.get(R.seriesLabel),seriesIndex:R.seriesIndex,seriesLabel:R.seriesLabel,groups:w.GroupDataMap.get(R.groupLabel),groupIndex:R.groupIndex,groupLabel:R.groupLabel,event:L,data:w.graphicData})}),v.next(D)});const $=l.subscribe();return W({barSelection:v,highlight:l,fullChartParams:c}).pipe(I(d),U(async w=>w)).subscribe(w=>{gN({selection:w.barSelection,ids:w.highlight,fullChartParams:w.fullChartParams})}),()=>{d.next(void 0),$.unsubscribe()}},sv="BarStack",yN=we(sv,Th)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=mN(sv,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,event$:n.event$});return()=>{i.next(void 0),o()}}),uv="BaseBarsTriangle",cv=ft(uv,"g"),lv=ft(uv,"g-content"),fv=.3;function bN({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const o=(t/e-i)/n-r;return o>1?o:1}function vN(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Cf().domain(e).range([-i/2+r,i/2-r])}function xN(t,e){return t<=1?0:e/(t-1)*fv}function _N(t,e){return t<=1?e:e*(1-fv)}function wN({selection:t,barData:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:s,delayGroup:c,transitionItem:u}){const f=t.selectAll(`g.${cv}`).data(e,(g,m)=>r[m]),h=f.enter().append("g").classed(cv,!0).attr("cursor","pointer");f.exit().remove();const l=f.merge(h);h.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`),f.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`);const p=s/2;return l.each((g,m,y)=>{const x=K(y[m]).selectAll("g").data(g,b=>b.id),v=x.enter().append("g").classed(lv,!0);v.append("path").style("vector-effect","non-scaling-stroke").attr("height",b=>0).attr("d",b=>{const M=i(b.seriesLabel),_=n,T=_;return`M${M-s/2},${_} L${M},${T} ${M+s/2},${_}`}),x.merge(v).select("path").style("fill",b=>`url(#${b.linearGradientId})`).attr("stroke",b=>b.color).attr("transform",`translate(${-p}, 0)`).transition().duration(u).ease(Jr(a.transitionEase)).delay((b,M)=>b.groupIndex*c).attr("transform",`translate(${-p}, 0)`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("d",b=>{const M=i(b.seriesLabel),_=n,T=b.axisY;return`M${M},${_} L${M+s/2},${T} ${M+s},${_}`}),x.exit().remove()}),l.selectAll(`g.${lv}`)}function AN({defsSelection:t,barData:e,params:n}){const r=t.selectAll("linearGradient").data(e[0]??[],o=>o.seriesLabel),i=r.enter().append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad");r.merge(i).attr("id",(o,a)=>o.linearGradientId).html((o,a)=>`
9
+ `)}function u(h){return h.map(f).join(t)}function f(h){return h==null?"":h instanceof Date?oS(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:c,formatRow:u,formatValue:f}}var qn=Ka(","),s1=qn.parse,aS=qn.parseRows,sS=qn.format,uS=qn.formatBody,cS=qn.formatRows,lS=qn.formatRow,fS=qn.formatValue,Hn=Ka(" "),u1=Hn.parse,hS=Hn.parseRows,pS=Hn.format,dS=Hn.formatBody,gS=Hn.formatRows,mS=Hn.formatRow,yS=Hn.formatValue;function bS(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})?)?$/))vS&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const vS=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function xS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function _S(t,e){return fetch(t,e).then(xS)}function wS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function AS(t,e){return fetch(t,e).then(wS)}function MS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Qa(t,e){return fetch(t,e).then(MS)}function c1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Qa(e,n).then(function(i){return t(i,r)})}}function $S(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Ka(t);return Qa(e,n).then(function(o){return i.parse(o,r)})}var SS=c1(s1),TS=c1(u1);function DS(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 PS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function kS(t,e){return fetch(t,e).then(PS)}function Sl(t){return(e,n)=>Qa(e,n).then(r=>new DOMParser().parseFromString(r,t))}const ES=Sl("application/xml");var LS=Sl("text/html"),NS=Sl("image/svg+xml");function RS(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,c=0,u=0;for(o=0;o<a;++o)s=n[o],c+=s.x,u+=s.y;for(c=(c/a-t)*r,u=(u/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=c,s.y-=u}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 CS(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return l1(this.cover(e,n),e,n,t)}function l1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,c=t._y0,u=t._x1,f=t._y1,h,l,p,d,g,m,y,x;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+u)/2))?s=h:u=h,(m=n>=(l=(c+f)/2))?c=l:f=l,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+u)/2))?s=h:u=h,(m=n>=(l=(c+f)/2))?c=l:f=l;while((y=m<<1|g)===(x=(d>=l)<<1|p>=h));return i[x]=o,i[y]=a,t}function IS(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),c=1/0,u=1/0,f=-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<c&&(c=i),i>f&&(f=i),o<u&&(u=o),o>h&&(h=o));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;n<r;++n)l1(this,a[n],s[n],t[n]);return this}function FS(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,c,u;n>t||t>=i||r>e||e>=o;)switch(u=(e<r)<<1|t<n,c=new Array(4),c[u]=s,s=c,a*=2,u){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 zS(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function OS(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 Wt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function GS(t,e,n){var r,i=this._x0,o=this._y0,a,s,c,u,f=this._x1,h=this._y1,l=[],p=this._root,d,g;for(p&&l.push(new Wt(p,i,o,f,h)),n==null?n=1/0:(i=t-n,o=e-n,f=t+n,h=e+n,n*=n);d=l.pop();)if(!(!(p=d.node)||(a=d.x0)>f||(s=d.y0)>h||(c=d.x1)<i||(u=d.y1)<o))if(p.length){var m=(a+c)/2,y=(s+u)/2;l.push(new Wt(p[3],m,y,c,u),new Wt(p[2],a,y,m,u),new Wt(p[1],m,s,c,y),new Wt(p[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(d=l[l.length-1],l[l.length-1]=l[l.length-1-g],l[l.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 M=Math.sqrt(n=b);i=t-M,o=e-M,f=t+M,h=e+M,r=p.data}}return r}function BS(t){if(isNaN(f=+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,c=this._x1,u=this._y1,f,h,l,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=f>=(l=(a+c)/2))?a=l:c=l,(g=h>=(p=(s+u)/2))?s=p:u=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 US(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function YS(){return this._root}function WS(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function qS(t){var e=[],n,r=this._root,i,o,a,s,c;for(r&&e.push(new Wt(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,c=n.y1)&&r.length){var u=(o+s)/2,f=(a+c)/2;(i=r[3])&&e.push(new Wt(i,u,f,s,c)),(i=r[2])&&e.push(new Wt(i,o,f,u,c)),(i=r[1])&&e.push(new Wt(i,u,a,s,f)),(i=r[0])&&e.push(new Wt(i,o,a,u,f))}return this}function HS(t){var e=[],n=[],r;for(this._root&&e.push(new Wt(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,c=r.x1,u=r.y1,f=(a+c)/2,h=(s+u)/2;(o=i[0])&&e.push(new Wt(o,a,s,f,h)),(o=i[1])&&e.push(new Wt(o,f,s,c,h)),(o=i[2])&&e.push(new Wt(o,a,h,f,u)),(o=i[3])&&e.push(new Wt(o,f,h,c,u))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function XS(t){return t[0]}function VS(t){return arguments.length?(this._x=t,this):this._x}function jS(t){return t[1]}function ZS(t){return arguments.length?(this._y=t,this):this._y}function Ja(t,e,n){var r=new Tl(e??XS,n??jS,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Tl(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 f1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=Ja.prototype=Tl.prototype;qt.copy=function(){var t=new Tl(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=f1(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]=f1(r));return t},qt.add=CS,qt.addAll=IS,qt.cover=FS,qt.data=zS,qt.extent=OS,qt.find=GS,qt.remove=BS,qt.removeAll=US,qt.root=YS,qt.size=WS,qt.visit=qS,qt.visitAfter=HS,qt.x=VS,qt.y=ZS;function Et(t){return function(){return t}}function dn(t){return(t()-.5)*1e-6}function KS(t){return t.x+t.vx}function QS(t){return t.y+t.vy}function h1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Et(t==null?1:+t));function a(){for(var u,f=e.length,h,l,p,d,g,m,y=0;y<o;++y)for(h=Ja(e,KS,QS).visitAfter(s),u=0;u<f;++u)l=e[u],g=n[l.index],m=g*g,p=l.x+l.vx,d=l.y+l.vy,h.visit(x);function x(v,b,M,_,$){var D=v.data,E=v.r,P=g+E;if(D){if(D.index>l.index){var T=p-D.x-D.vx,C=d-D.y-D.vy,N=T*T+C*C;N<P*P&&(T===0&&(T=dn(r),N+=T*T),C===0&&(C=dn(r),N+=C*C),N=(P-(N=Math.sqrt(N)))/N*i,l.vx+=(T*=N)*(P=(E*=E)/(m+E)),l.vy+=(C*=N)*P,D.vx-=T*(P=1-P),D.vy-=C*P)}return}return b>p+P||_<p-P||M>d+P||$<d-P}}function s(u){if(u.data)return u.r=n[u.data.index];for(var f=u.r=0;f<4;++f)u[f]&&u[f].r>u.r&&(u.r=u[f].r)}function c(){if(e){var u,f=e.length,h;for(n=new Array(f),u=0;u<f;++u)h=e[u],n[h.index]=+t(h,u,e)}}return a.initialize=function(u,f){e=u,r=f,c()},a.iterations=function(u){return arguments.length?(o=+u,a):o},a.strength=function(u){return arguments.length?(i=+u,a):i},a.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Et(+u),c(),a):t},a}function JS(t){return t.index}function p1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function t9(t){var e=JS,n=h,r,i=Et(30),o,a,s,c,u,f=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function l(m){for(var y=0,x=t.length;y<f;++y)for(var v=0,b,M,_,$,D,E,P;v<x;++v)b=t[v],M=b.source,_=b.target,$=_.x+_.vx-M.x-M.vx||dn(u),D=_.y+_.vy-M.y-M.vy||dn(u),E=Math.sqrt($*$+D*D),E=(E-o[v])/E*m*r[v],$*=E,D*=E,_.vx-=$*(P=c[v]),_.vy-=D*P,M.vx+=$*(P=1-P),M.vy+=D*P}function p(){if(a){var m,y=a.length,x=t.length,v=new Map(a.map((M,_)=>[e(M,_,a),M])),b;for(m=0,s=new Array(y);m<x;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=p1(v,b.source)),typeof b.target!="object"&&(b.target=p1(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,c=new Array(x);m<x;++m)b=t[m],c[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 l.initialize=function(m,y){a=m,u=y,p()},l.links=function(m){return arguments.length?(t=m,p(),l):t},l.id=function(m){return arguments.length?(e=m,l):e},l.iterations=function(m){return arguments.length?(f=+m,l):f},l.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Et(+m),d(),l):n},l.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Et(+m),g(),l):i},l}const e9=1664525,n9=1013904223,d1=4294967296;function r9(){let t=1;return()=>(t=(e9*t+n9)%d1)/d1}function i9(t){return t.x}function o9(t){return t.y}var a9=10,s9=Math.PI*(3-Math.sqrt(5));function g1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,c=Oa(h),u=Ln("tick","end"),f=r9();t==null&&(t=[]);function h(){l(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function l(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=a9*Math.sqrt(.5+g),v=g*s9;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,f),g}return p(),e={tick:l,restart:function(){return c.restart(h),e},stop:function(){return c.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?(f=g,s.forEach(d),e):f},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,M,_,$,D;for(y==null?y=1/0:y*=y,x=0;x<v;++x)$=t[x],b=g-$.x,M=m-$.y,_=b*b+M*M,_<y&&(D=$,y=_);return D},on:function(g,m){return arguments.length>1?(u.on(g,m),e):u.on(g)}}}function m1(){var t,e,n,r,i=Et(-30),o,a=1,s=1/0,c=.81;function u(p){var d,g=t.length,m=Ja(t,i9,o9).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(l)}function f(){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 l(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/c<b)return b<s&&(y===0&&(y=dn(n),b+=y*y),x===0&&(x=dn(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=dn(n),b+=y*y),x===0&&(x=dn(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 u.initialize=function(p,d){t=p,n=d,f()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Et(+p),f(),u):i},u.distanceMin=function(p){return arguments.length?(a=p*p,u):Math.sqrt(a)},u.distanceMax=function(p){return arguments.length?(s=p*p,u):Math.sqrt(s)},u.theta=function(p){return arguments.length?(c=p*p,u):Math.sqrt(c)},u}function u9(t,e,n){var r,i=Et(.1),o,a;typeof t!="function"&&(t=Et(+t)),e==null&&(e=0),n==null&&(n=0);function s(u){for(var f=0,h=r.length;f<h;++f){var l=r[f],p=l.x-e||1e-6,d=l.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[f]-g)*o[f]*u/g;l.vx+=p*m,l.vy+=d*m}}function c(){if(r){var u,f=r.length;for(o=new Array(f),a=new Array(f),u=0;u<f;++u)a[u]=+t(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,c()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Et(+u),c(),s):i},s.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Et(+u),c(),s):t},s.x=function(u){return arguments.length?(e=+u,s):e},s.y=function(u){return arguments.length?(n=+u,s):n},s}function y1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var c=0,u=n.length,f;c<u;++c)f=n[c],f.vx+=(i[c]-f.x)*r[c]*s}function a(){if(n){var s,c=n.length;for(r=new Array(c),i=new Array(c),s=0;s<c;++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:Et(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function b1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var c=0,u=n.length,f;c<u;++c)f=n[c],f.vy+=(i[c]-f.y)*r[c]*s}function a(){if(n){var s,c=n.length;for(r=new Array(c),i=new Array(c),s=0;s<c;++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:Et(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function c9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ts(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 Cr(t){return t=ts(Math.abs(t)),t?t[1]:NaN}function l9(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function f9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var h9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ir(t){if(!(e=h9.exec(t)))throw new Error("invalid format: "+t);var e;return new es({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]})}Ir.prototype=es.prototype;function es(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+""}es.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 p9(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 v1;function d9(t,e){var n=ts(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(v1=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")+ts(t,Math.max(0,e+o-1))[0]}function x1(t,e){var n=ts(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 _1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:c9,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)=>x1(t*100,e),r:x1,s:d9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function w1(t){return t}var A1=Array.prototype.map,M1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $1(t){var e=t.grouping===void 0||t.thousands===void 0?w1:l9(A1.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?w1:f9(A1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(h){h=Ir(h);var l=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,M=h.type;M==="n"?(x=!0,M="g"):_1[M]||(v===void 0&&(v=12),b=!0,M="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():"",$=g==="$"?r:/[%p]/.test(M)?a:"",D=_1[M],E=/[defgprs%]/.test(M);v=v===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function P(T){var C=_,N=$,A,S,w;if(M==="c")N=D(T)+N,T="";else{T=+T;var k=T<0||1/T<0;if(T=isNaN(T)?c:D(Math.abs(T),v),b&&(T=p9(T)),k&&+T==0&&d!=="+"&&(k=!1),C=(k?d==="("?d:s:d==="-"||d==="("?"":d)+C,N=(M==="s"?M1[8+v1/3]:"")+N+(k&&d==="("?")":""),E){for(A=-1,S=T.length;++A<S;)if(w=T.charCodeAt(A),48>w||w>57){N=(w===46?i+T.slice(A+1):T.slice(A))+N,T=T.slice(0,A);break}}}x&&!m&&(T=e(T,1/0));var L=C.length+T.length+N.length,R=L<y?new Array(y-L+1).join(l):"";switch(x&&m&&(T=e(R+T,R.length?y-N.length:1/0),R=""),p){case"<":T=C+T+N+R;break;case"=":T=C+R+T+N;break;case"^":T=R.slice(0,L=R.length>>1)+C+T+N+R.slice(L);break;default:T=R+C+T+N;break}return o(T)}return P.toString=function(){return h+""},P}function f(h,l){var p=u((h=Ir(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Cr(l)/3)))*3,g=Math.pow(10,-d),m=M1[8+d/3];return function(y){return p(g*y)+m}}return{format:u,formatPrefix:f}}var ns,qi,Dl;S1({thousands:",",grouping:[3],currency:["$",""]});function S1(t){return ns=$1(t),qi=ns.format,Dl=ns.formatPrefix,ns}function T1(t){return Math.max(0,-Cr(Math.abs(t)))}function D1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Cr(e)/3)))*3-Cr(Math.abs(t)))}function P1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Cr(e)-Cr(t))+1}var V=1e-6,Hi=1e-12,st=Math.PI,At=st/2,rs=st/4,Ht=st*2,yt=180/st,j=st/180,ct=Math.abs,Fr=Math.atan,Xt=Math.atan2,X=Math.cos,is=Math.ceil,k1=Math.exp,Pl=Math.hypot,os=Math.log,kl=Math.pow,H=Math.sin,le=Math.sign||function(t){return t>0?1:t<0?-1:0},Rt=Math.sqrt,El=Math.tan;function E1(t){return t>1?0:t<-1?st:Math.acos(t)}function Vt(t){return t>1?At:t<-1?-At:Math.asin(t)}function L1(t){return(t=H(t/2))*t}function _t(){}function as(t,e){t&&R1.hasOwnProperty(t.type)&&R1[t.type](t,e)}var N1={Feature:function(t,e){as(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)as(n[r].geometry,e)}},R1={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){Ll(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ll(n[r],e,0)},Polygon:function(t,e){C1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)C1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)as(n[r],e)}};function Ll(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 C1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ll(t[n],e,1);e.polygonEnd()}function Te(t,e){t&&N1.hasOwnProperty(t.type)?N1[t.type](t,e):as(t,e)}var ss=new kt,us=new kt,I1,F1,Nl,Rl,Cl,Ce={point:_t,lineStart:_t,lineEnd:_t,polygonStart:function(){ss=new kt,Ce.lineStart=g9,Ce.lineEnd=m9},polygonEnd:function(){var t=+ss;us.add(t<0?Ht+t:t),this.lineStart=this.lineEnd=this.point=_t},sphere:function(){us.add(Ht)}};function g9(){Ce.point=y9}function m9(){z1(I1,F1)}function y9(t,e){Ce.point=z1,I1=t,F1=e,t*=j,e*=j,Nl=t,Rl=X(e=e/2+rs),Cl=H(e)}function z1(t,e){t*=j,e*=j,e=e/2+rs;var n=t-Nl,r=n>=0?1:-1,i=r*n,o=X(e),a=H(e),s=Cl*a,c=Rl*o+s*X(i),u=s*r*H(i);ss.add(Xt(u,c)),Nl=t,Rl=o,Cl=a}function b9(t){return us=new kt,Te(t,Ce),us*2}function cs(t){return[Xt(t[1],t[0]),Vt(t[2])]}function Xn(t){var e=t[0],n=t[1],r=X(n);return[r*X(e),r*H(e),H(n)]}function ls(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function zr(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 Il(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function fs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function hs(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 wt,re,Mt,se,Vn,O1,G1,Or,Xi,gn,Ze,Ke={point:Fl,lineStart:U1,lineEnd:Y1,polygonStart:function(){Ke.point=W1,Ke.lineStart=v9,Ke.lineEnd=x9,Xi=new kt,Ce.polygonStart()},polygonEnd:function(){Ce.polygonEnd(),Ke.point=Fl,Ke.lineStart=U1,Ke.lineEnd=Y1,ss<0?(wt=-(Mt=180),re=-(se=90)):Xi>V?se=90:Xi<-V&&(re=-90),Ze[0]=wt,Ze[1]=Mt},sphere:function(){wt=-(Mt=180),re=-(se=90)}};function Fl(t,e){gn.push(Ze=[wt=t,Mt=t]),e<re&&(re=e),e>se&&(se=e)}function B1(t,e){var n=Xn([t*j,e*j]);if(Or){var r=zr(Or,n),i=[r[1],-r[0],0],o=zr(i,r);hs(o),o=cs(o);var a=t-Vn,s=a>0?1:-1,c=o[0]*yt*s,u,f=ct(a)>180;f^(s*Vn<c&&c<s*t)?(u=o[1]*yt,u>se&&(se=u)):(c=(c+360)%360-180,f^(s*Vn<c&&c<s*t)?(u=-o[1]*yt,u<re&&(re=u)):(e<re&&(re=e),e>se&&(se=e))),f?t<Vn?ue(wt,t)>ue(wt,Mt)&&(Mt=t):ue(t,Mt)>ue(wt,Mt)&&(wt=t):Mt>=wt?(t<wt&&(wt=t),t>Mt&&(Mt=t)):t>Vn?ue(wt,t)>ue(wt,Mt)&&(Mt=t):ue(t,Mt)>ue(wt,Mt)&&(wt=t)}else gn.push(Ze=[wt=t,Mt=t]);e<re&&(re=e),e>se&&(se=e),Or=n,Vn=t}function U1(){Ke.point=B1}function Y1(){Ze[0]=wt,Ze[1]=Mt,Ke.point=Fl,Or=null}function W1(t,e){if(Or){var n=t-Vn;Xi.add(ct(n)>180?n+(n>0?360:-360):n)}else O1=t,G1=e;Ce.point(t,e),B1(t,e)}function v9(){Ce.lineStart()}function x9(){W1(O1,G1),Ce.lineEnd(),ct(Xi)>V&&(wt=-(Mt=180)),Ze[0]=wt,Ze[1]=Mt,Or=null}function ue(t,e){return(e-=t)<0?e+360:e}function _9(t,e){return t[0]-e[0]}function q1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function w9(t){var e,n,r,i,o,a,s;if(se=Mt=-(wt=re=1/0),gn=[],Te(t,Ke),n=gn.length){for(gn.sort(_9),e=1,r=gn[0],o=[r];e<n;++e)i=gn[e],q1(r,i[0])||q1(r,i[1])?(ue(r[0],i[1])>ue(r[0],r[1])&&(r[1]=i[1]),ue(i[0],r[1])>ue(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=ue(r[1],i[0]))>a&&(a=s,wt=i[0],Mt=r[1])}return gn=Ze=null,wt===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[wt,re],[Mt,se]]}var Vi,ps,ds,gs,ms,ys,bs,vs,zl,Ol,Gl,H1,X1,jt,Zt,Kt,De={sphere:_t,point:Bl,lineStart:V1,lineEnd:j1,polygonStart:function(){De.lineStart=$9,De.lineEnd=S9},polygonEnd:function(){De.lineStart=V1,De.lineEnd=j1}};function Bl(t,e){t*=j,e*=j;var n=X(e);ji(n*X(t),n*H(t),H(e))}function ji(t,e,n){++Vi,ds+=(t-ds)/Vi,gs+=(e-gs)/Vi,ms+=(n-ms)/Vi}function V1(){De.point=A9}function A9(t,e){t*=j,e*=j;var n=X(e);jt=n*X(t),Zt=n*H(t),Kt=H(e),De.point=M9,ji(jt,Zt,Kt)}function M9(t,e){t*=j,e*=j;var n=X(e),r=n*X(t),i=n*H(t),o=H(e),a=Xt(Rt((a=Zt*o-Kt*i)*a+(a=Kt*r-jt*o)*a+(a=jt*i-Zt*r)*a),jt*r+Zt*i+Kt*o);ps+=a,ys+=a*(jt+(jt=r)),bs+=a*(Zt+(Zt=i)),vs+=a*(Kt+(Kt=o)),ji(jt,Zt,Kt)}function j1(){De.point=Bl}function $9(){De.point=T9}function S9(){Z1(H1,X1),De.point=Bl}function T9(t,e){H1=t,X1=e,t*=j,e*=j,De.point=Z1;var n=X(e);jt=n*X(t),Zt=n*H(t),Kt=H(e),ji(jt,Zt,Kt)}function Z1(t,e){t*=j,e*=j;var n=X(e),r=n*X(t),i=n*H(t),o=H(e),a=Zt*o-Kt*i,s=Kt*r-jt*o,c=jt*i-Zt*r,u=Pl(a,s,c),f=Vt(u),h=u&&-f/u;zl.add(h*a),Ol.add(h*s),Gl.add(h*c),ps+=f,ys+=f*(jt+(jt=r)),bs+=f*(Zt+(Zt=i)),vs+=f*(Kt+(Kt=o)),ji(jt,Zt,Kt)}function D9(t){Vi=ps=ds=gs=ms=ys=bs=vs=0,zl=new kt,Ol=new kt,Gl=new kt,Te(t,De);var e=+zl,n=+Ol,r=+Gl,i=Pl(e,n,r);return i<Hi&&(e=ys,n=bs,r=vs,ps<V&&(e=ds,n=gs,r=ms),i=Pl(e,n,r),i<Hi)?[NaN,NaN]:[Xt(n,e)*yt,Vt(r/i)*yt]}function Gr(t){return function(){return t}}function Ul(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 Yl(t,e){return ct(t)>st&&(t-=Math.round(t/Ht)*Ht),[t,e]}Yl.invert=Yl;function Wl(t,e,n){return(t%=Ht)?e||n?Ul(Q1(t),J1(e,n)):Q1(t):e||n?J1(e,n):Yl}function K1(t){return function(e,n){return e+=t,ct(e)>st&&(e-=Math.round(e/Ht)*Ht),[e,n]}}function Q1(t){var e=K1(t);return e.invert=K1(-t),e}function J1(t,e){var n=X(t),r=H(t),i=X(e),o=H(e);function a(s,c){var u=X(c),f=X(s)*u,h=H(s)*u,l=H(c),p=l*n+f*r;return[Xt(h*i-p*o,f*n-l*r),Vt(p*i+h*o)]}return a.invert=function(s,c){var u=X(c),f=X(s)*u,h=H(s)*u,l=H(c),p=l*i-h*o;return[Xt(h*i+l*o,f*n+p*r),Vt(p*n-f*r)]},a}function tm(t){t=Wl(t[0]*j,t[1]*j,t.length>2?t[2]*j:0);function e(n){return n=t(n[0]*j,n[1]*j),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*j,n[1]*j),n[0]*=yt,n[1]*=yt,n},e}function em(t,e,n,r,i,o){if(n){var a=X(e),s=H(e),c=r*n;i==null?(i=e+r*Ht,o=e-c/2):(i=nm(a,i),o=nm(a,o),(r>0?i<o:i>o)&&(i+=r*Ht));for(var u,f=i;r>0?f>o:f<o;f-=c)u=cs([a,-s*X(f),-s*H(f)]),t.point(u[0],u[1])}}function nm(t,e){e=Xn(e),e[0]-=t,hs(e);var n=E1(-e[1]);return((-e[2]<0?-n:n)+Ht-V)%Ht}function P9(){var t=Gr([0,0]),e=Gr(90),n=Gr(2),r,i,o={point:a};function a(c,u){r.push(c=i(c,u)),c[0]*=yt,c[1]*=yt}function s(){var c=t.apply(this,arguments),u=e.apply(this,arguments)*j,f=n.apply(this,arguments)*j;return r=[],i=Wl(-c[0]*j,-c[1]*j,0).invert,em(o,u,f,1),c={type:"Polygon",coordinates:[r]},r=i=null,c}return s.center=function(c){return arguments.length?(t=typeof c=="function"?c:Gr([+c[0],+c[1]]),s):t},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Gr(+c),s):e},s.precision=function(c){return arguments.length?(n=typeof c=="function"?c:Gr(+c),s):n},s}function rm(){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 xs(t,e){return ct(t[0]-e[0])<V&&ct(t[1]-e[1])<V}function _s(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 im(t,e,n,r,i){var o=[],a=[],s,c;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],y=d[g],x;if(xs(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*V}o.push(x=new _s(m,d,null,!0)),a.push(x.o=new _s(m,null,x,!1)),o.push(x=new _s(y,d,null,!1)),a.push(x.o=new _s(y,null,x,!0))}}),!!o.length){for(a.sort(e),om(o),om(a),s=0,c=a.length;s<c;++s)a[s].e=n=!n;for(var u=o[0],f,h;;){for(var l=u,p=!0;l.v;)if((l=l.n)===u)return;f=l.z,i.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(s=0,c=f.length;s<c;++s)i.point((h=f[s])[0],h[1]);else r(l.x,l.n.x,1,i);l=l.n}else{if(p)for(f=l.p.z,s=f.length-1;s>=0;--s)i.point((h=f[s])[0],h[1]);else r(l.x,l.p.x,-1,i);l=l.p}l=l.o,f=l.z,p=!p}while(!l.v);i.lineEnd()}}}function om(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 ql(t){return ct(t[0])<=st?t[0]:le(t[0])*((ct(t[0])+st)%Ht-st)}function am(t,e){var n=ql(e),r=e[1],i=H(r),o=[H(n),-X(n),0],a=0,s=0,c=new kt;i===1?r=At+V:i===-1&&(r=-At-V);for(var u=0,f=t.length;u<f;++u)if(l=(h=t[u]).length)for(var h,l,p=h[l-1],d=ql(p),g=p[1]/2+rs,m=H(g),y=X(g),x=0;x<l;++x,d=b,m=_,y=$,p=v){var v=h[x],b=ql(v),M=v[1]/2+rs,_=H(M),$=X(M),D=b-d,E=D>=0?1:-1,P=E*D,T=P>st,C=m*_;if(c.add(Xt(C*E*H(P),y*$+C*X(P))),a+=T?D+E*Ht:D,T^d>=n^b>=n){var N=zr(Xn(p),Xn(v));hs(N);var A=zr(o,N);hs(A);var S=(T^D>=0?-1:1)*Vt(A[2]);(r>S||r===S&&(N[0]||N[1]))&&(s+=T^D>=0?1:-1)}}return(a<-V||a<V&&c<-Hi)^s&1}function sm(t,e,n,r){return function(i){var o=e(i),a=rm(),s=e(a),c=!1,u,f,h,l={point:p,lineStart:g,lineEnd:m,polygonStart:function(){l.point=y,l.lineStart=x,l.lineEnd=v,f=[],u=[]},polygonEnd:function(){l.point=p,l.lineStart=g,l.lineEnd=m,f=_c(f);var b=am(u,r);f.length?(c||(i.polygonStart(),c=!0),im(f,E9,b,n,i)):b&&(c||(i.polygonStart(),c=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&(i.polygonEnd(),c=!1),f=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(b,M){t(b,M)&&i.point(b,M)}function d(b,M){o.point(b,M)}function g(){l.point=d,o.lineStart()}function m(){l.point=p,o.lineEnd()}function y(b,M){h.push([b,M]),s.point(b,M)}function x(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),M=a.result(),_,$=M.length,D,E,P;if(h.pop(),u.push(h),h=null,!!$){if(b&1){if(E=M[0],(D=E.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),_=0;_<D;++_)i.point((P=E[_])[0],P[1]);i.lineEnd()}return}$>1&&b&2&&M.push(M.pop().concat(M.shift())),f.push(M.filter(k9))}}return l}}function k9(t){return t.length>1}function E9(t,e){return((t=t.x)[0]<0?t[1]-At-V:At-t[1])-((e=e.x)[0]<0?e[1]-At-V:At-e[1])}const Hl=sm(function(){return!0},L9,R9,[-st,-At]);function L9(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?st:-st,c=ct(o-e);ct(c-st)<V?(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&&c>=st&&(ct(e-r)<V&&(e-=r*V),ct(o-s)<V&&(o-=s*V),n=N9(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 N9(t,e,n,r){var i,o,a=H(t-n);return ct(a)>V?Fr((H(e)*(o=X(r))*H(n)-H(r)*(i=X(e))*H(t))/(i*o*a)):(e+r)/2}function R9(t,e,n,r){var i;if(t==null)i=n*At,r.point(-st,i),r.point(0,i),r.point(st,i),r.point(st,0),r.point(st,-i),r.point(0,-i),r.point(-st,-i),r.point(-st,0),r.point(-st,i);else if(ct(t[0]-e[0])>V){var o=t[0]<e[0]?st:-st;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function um(t){var e=X(t),n=2*j,r=e>0,i=ct(e)>V;function o(f,h,l,p){em(p,t,n,l,f,h)}function a(f,h){return X(f)*X(h)>e}function s(f){var h,l,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,y){var x=[m,y],v,b=a(m,y),M=r?b?0:u(m,y):b?u(m+(m<0?st:-st),y):0;if(!h&&(d=p=b)&&f.lineStart(),b!==p&&(v=c(h,x),(!v||xs(h,v)||xs(x,v))&&(x[2]=1)),b!==p)g=0,b?(f.lineStart(),v=c(x,h),f.point(v[0],v[1])):(v=c(h,x),f.point(v[0],v[1],2),f.lineEnd()),h=v;else if(i&&h&&r^b){var _;!(M&l)&&(_=c(x,h,!0))&&(g=0,r?(f.lineStart(),f.point(_[0][0],_[0][1]),f.point(_[1][0],_[1][1]),f.lineEnd()):(f.point(_[1][0],_[1][1]),f.lineEnd(),f.lineStart(),f.point(_[0][0],_[0][1],3)))}b&&(!h||!xs(h,x))&&f.point(x[0],x[1]),h=x,p=b,l=M},lineEnd:function(){p&&f.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function c(f,h,l){var p=Xn(f),d=Xn(h),g=[1,0,0],m=zr(p,d),y=ls(m,m),x=m[0],v=y-x*x;if(!v)return!l&&f;var b=e*y/v,M=-e*x/v,_=zr(g,m),$=fs(g,b),D=fs(m,M);Il($,D);var E=_,P=ls($,E),T=ls(E,E),C=P*P-T*(ls($,$)-1);if(!(C<0)){var N=Rt(C),A=fs(E,(-P-N)/T);if(Il(A,$),A=cs(A),!l)return A;var S=f[0],w=h[0],k=f[1],L=h[1],R;w<S&&(R=S,S=w,w=R);var F=w-S,z=ct(F-st)<V,Y=z||F<V;if(!z&&L<k&&(R=k,k=L,L=R),Y?z?k+L>0^A[1]<(ct(A[0]-S)<V?k:L):k<=A[1]&&A[1]<=L:F>st^(S<=A[0]&&A[0]<=w)){var rt=fs(E,(-P+N)/T);return Il(rt,$),[A,cs(rt)]}}}function u(f,h){var l=r?t:st-t,p=0;return f<-l?p|=1:f>l&&(p|=2),h<-l?p|=4:h>l&&(p|=8),p}return sm(a,s,o,r?[0,-t]:[-st,t-st])}function C9(t,e,n,r,i,o){var a=t[0],s=t[1],c=e[0],u=e[1],f=0,h=1,l=c-a,p=u-s,d;if(d=n-a,!(!l&&d>0)){if(d/=l,l<0){if(d<f)return;d<h&&(h=d)}else if(l>0){if(d>h)return;d>f&&(f=d)}if(d=i-a,!(!l&&d<0)){if(d/=l,l<0){if(d>h)return;d>f&&(f=d)}else if(l>0){if(d<f)return;d<h&&(h=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<f)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>f&&(f=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>f&&(f=d)}else if(p>0){if(d<f)return;d<h&&(h=d)}return f>0&&(t[0]=a+f*l,t[1]=s+f*p),h<1&&(e[0]=a+h*l,e[1]=s+h*p),!0}}}}}var Zi=1e9,ws=-Zi;function As(t,e,n,r){function i(u,f){return t<=u&&u<=n&&e<=f&&f<=r}function o(u,f,h,l){var p=0,d=0;if(u==null||(p=a(u,h))!==(d=a(f,h))||c(u,f)<0^h>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+h+4)%4)!==d);else l.point(f[0],f[1])}function a(u,f){return ct(u[0]-t)<V?f>0?0:3:ct(u[0]-n)<V?f>0?2:1:ct(u[1]-e)<V?f>0?1:0:f>0?3:2}function s(u,f){return c(u.x,f.x)}function c(u,f){var h=a(u,1),l=a(f,1);return h!==l?h-l:h===0?f[1]-u[1]:h===1?u[0]-f[0]:h===2?u[1]-f[1]:f[0]-u[0]}return function(u){var f=u,h=rm(),l,p,d,g,m,y,x,v,b,M,_,$={point:D,lineStart:C,lineEnd:N,polygonStart:P,polygonEnd:T};function D(S,w){i(S,w)&&f.point(S,w)}function E(){for(var S=0,w=0,k=p.length;w<k;++w)for(var L=p[w],R=1,F=L.length,z=L[0],Y,rt,Z=z[0],J=z[1];R<F;++R)Y=Z,rt=J,z=L[R],Z=z[0],J=z[1],rt<=r?J>r&&(Z-Y)*(r-rt)>(J-rt)*(t-Y)&&++S:J<=r&&(Z-Y)*(r-rt)<(J-rt)*(t-Y)&&--S;return S}function P(){f=h,l=[],p=[],_=!0}function T(){var S=E(),w=_&&S,k=(l=_c(l)).length;(w||k)&&(u.polygonStart(),w&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),k&&im(l,s,S,o,u),u.polygonEnd()),f=u,l=p=d=null}function C(){$.point=A,p&&p.push(d=[]),M=!0,b=!1,x=v=NaN}function N(){l&&(A(g,m),y&&b&&h.rejoin(),l.push(h.result())),$.point=D,b&&f.lineEnd()}function A(S,w){var k=i(S,w);if(p&&d.push([S,w]),M)g=S,m=w,y=k,M=!1,k&&(f.lineStart(),f.point(S,w));else if(k&&b)f.point(S,w);else{var L=[x=Math.max(ws,Math.min(Zi,x)),v=Math.max(ws,Math.min(Zi,v))],R=[S=Math.max(ws,Math.min(Zi,S)),w=Math.max(ws,Math.min(Zi,w))];C9(L,R,t,e,n,r)?(b||(f.lineStart(),f.point(L[0],L[1])),f.point(R[0],R[1]),k||f.lineEnd(),_=!1):k&&(f.lineStart(),f.point(S,w),_=!1)}x=S,v=w,b=k}return $}}function I9(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=As(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 Xl,Vl,Ms,$s,Br={sphere:_t,point:_t,lineStart:F9,lineEnd:_t,polygonStart:_t,polygonEnd:_t};function F9(){Br.point=O9,Br.lineEnd=z9}function z9(){Br.point=Br.lineEnd=_t}function O9(t,e){t*=j,e*=j,Vl=t,Ms=H(e),$s=X(e),Br.point=G9}function G9(t,e){t*=j,e*=j;var n=H(e),r=X(e),i=ct(t-Vl),o=X(i),a=H(i),s=r*a,c=$s*n-Ms*r*o,u=Ms*n+$s*r*o;Xl.add(Xt(Rt(s*s+c*c),u)),Vl=t,Ms=n,$s=r}function cm(t){return Xl=new kt,Te(t,Br),+Xl}var jl=[null,null],B9={type:"LineString",coordinates:jl};function Ss(t,e){return jl[0]=t,jl[1]=e,cm(B9)}var lm={Feature:function(t,e){return Ts(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ts(n[r].geometry,e))return!0;return!1}},fm={Sphere:function(){return!0},Point:function(t,e){return hm(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(hm(n[r],e))return!0;return!1},LineString:function(t,e){return pm(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(pm(n[r],e))return!0;return!1},Polygon:function(t,e){return dm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(dm(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ts(n[r],e))return!0;return!1}};function Ts(t,e){return t&&fm.hasOwnProperty(t.type)?fm[t.type](t,e):!1}function hm(t,e){return Ss(t,e)===0}function pm(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Ss(t[o],e),r===0||o>0&&(i=Ss(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Hi*i))return!0;n=r}return!1}function dm(t,e){return!!am(t.map(U9),gm(e))}function U9(t){return t=t.map(gm),t.pop(),t}function gm(t){return[t[0]*j,t[1]*j]}function Y9(t,e){return(t&&lm.hasOwnProperty(t.type)?lm[t.type]:Ts)(t,e)}function mm(t,e,n){var r=un(t,e-V,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function ym(t,e,n){var r=un(t,e-V,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function bm(){var t,e,n,r,i,o,a,s,c=10,u=c,f=90,h=360,l,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return un(is(r/f)*f,n,f).map(d).concat(un(is(s/h)*h,a,h).map(g)).concat(un(is(e/c)*c,t,c).filter(function(v){return ct(v%f)>V}).map(l)).concat(un(is(o/u)*u,i,u).filter(function(v){return ct(v%h)>V}).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?(f=+v[0],h=+v[1],y):[f,h]},y.stepMinor=function(v){return arguments.length?(c=+v[0],u=+v[1],y):[c,u]},y.precision=function(v){return arguments.length?(m=+v,l=mm(o,i,90),p=ym(e,t,m),d=mm(s,a,90),g=ym(r,n,m),y):m},y.extentMajor([[-180,-90+V],[180,90-V]]).extentMinor([[-180,-80-V],[180,80+V]])}function W9(){return bm()()}function q9(t,e){var n=t[0]*j,r=t[1]*j,i=e[0]*j,o=e[1]*j,a=X(r),s=H(r),c=X(o),u=H(o),f=a*X(n),h=a*H(n),l=c*X(i),p=c*H(i),d=2*Vt(Rt(L1(o-r)+a*c*L1(i-n))),g=H(d),m=d?function(y){var x=H(y*=d)/g,v=H(d-y)/g,b=v*f+x*l,M=v*h+x*p,_=v*s+x*u;return[Xt(M,b)*yt,Xt(_,Rt(b*b+M*M))*yt]}:function(){return[n*yt,r*yt]};return m.distance=d,m}const Ki=t=>t;var Zl=new kt,Kl=new kt,vm,xm,Ql,Jl,Qe={point:_t,lineStart:_t,lineEnd:_t,polygonStart:function(){Qe.lineStart=H9,Qe.lineEnd=V9},polygonEnd:function(){Qe.lineStart=Qe.lineEnd=Qe.point=_t,Zl.add(ct(Kl)),Kl=new kt},result:function(){var t=Zl/2;return Zl=new kt,t}};function H9(){Qe.point=X9}function X9(t,e){Qe.point=_m,vm=Ql=t,xm=Jl=e}function _m(t,e){Kl.add(Jl*t-Ql*e),Ql=t,Jl=e}function V9(){_m(vm,xm)}var Ur=1/0,Ds=Ur,Qi=-Ur,Ps=Qi,ks={point:j9,lineStart:_t,lineEnd:_t,polygonStart:_t,polygonEnd:_t,result:function(){var t=[[Ur,Ds],[Qi,Ps]];return Qi=Ps=-(Ds=Ur=1/0),t}};function j9(t,e){t<Ur&&(Ur=t),t>Qi&&(Qi=t),e<Ds&&(Ds=e),e>Ps&&(Ps=e)}var tf=0,ef=0,Ji=0,Es=0,Ls=0,Yr=0,nf=0,rf=0,to=0,wm,Am,Ie,Fe,fe={point:jn,lineStart:Mm,lineEnd:$m,polygonStart:function(){fe.lineStart=Q9,fe.lineEnd=J9},polygonEnd:function(){fe.point=jn,fe.lineStart=Mm,fe.lineEnd=$m},result:function(){var t=to?[nf/to,rf/to]:Yr?[Es/Yr,Ls/Yr]:Ji?[tf/Ji,ef/Ji]:[NaN,NaN];return tf=ef=Ji=Es=Ls=Yr=nf=rf=to=0,t}};function jn(t,e){tf+=t,ef+=e,++Ji}function Mm(){fe.point=Z9}function Z9(t,e){fe.point=K9,jn(Ie=t,Fe=e)}function K9(t,e){var n=t-Ie,r=e-Fe,i=Rt(n*n+r*r);Es+=i*(Ie+t)/2,Ls+=i*(Fe+e)/2,Yr+=i,jn(Ie=t,Fe=e)}function $m(){fe.point=jn}function Q9(){fe.point=tT}function J9(){Sm(wm,Am)}function tT(t,e){fe.point=Sm,jn(wm=Ie=t,Am=Fe=e)}function Sm(t,e){var n=t-Ie,r=e-Fe,i=Rt(n*n+r*r);Es+=i*(Ie+t)/2,Ls+=i*(Fe+e)/2,Yr+=i,i=Fe*t-Ie*e,nf+=i*(Ie+t),rf+=i*(Fe+e),to+=i*3,jn(Ie=t,Fe=e)}function Tm(t){this._context=t}Tm.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,Ht);break}}},result:_t};var of=new kt,af,Dm,Pm,eo,no,ro={point:_t,lineStart:function(){ro.point=eT},lineEnd:function(){af&&km(Dm,Pm),ro.point=_t},polygonStart:function(){af=!0},polygonEnd:function(){af=null},result:function(){var t=+of;return of=new kt,t}};function eT(t,e){ro.point=km,Dm=eo=t,Pm=no=e}function km(t,e){eo-=t,no-=e,of.add(Rt(eo*eo+no*no)),eo=t,no=e}let Em,Ns,Lm,Nm;class Rm{constructor(e){this._append=e==null?Cm:nT(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!==Lm||this._append!==Ns){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`,Lm=r,Ns=this._append,Nm=this._,this._=i}this._+=Nm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Cm(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function nT(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Cm;if(e!==Em){const n=10**e;Em=e,Ns=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 Ns}function rT(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(Qe)),Qe.result()},a.measure=function(s){return Te(s,i(ro)),ro.result()},a.bounds=function(s){return Te(s,i(ks)),ks.result()},a.centroid=function(s){return Te(s,i(fe)),fe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,Ki):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new Rm(n)):new Tm(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 c=Math.floor(s);if(!(c>=0))throw new RangeError(`invalid digits: ${s}`);n=c}return e===null&&(o=new Rm(n)),a},a.projection(t).digits(n).context(e)}function iT(t){return{stream:io(t)}}function io(t){return function(e){var n=new sf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function sf(){}sf.prototype={constructor:sf,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 uf(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(ks)),e(ks.result()),r!=null&&t.clipExtent(r),t}function Rs(t,e,n){return uf(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,c=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,c])},n)}function cf(t,e,n){return Rs(t,[[0,0],e],n)}function lf(t,e,n){return uf(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 ff(t,e,n){return uf(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 Im=16,oT=X(30*j);function Fm(t,e){return+e?sT(t,e):aT(t)}function aT(t){return io({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function sT(t,e){function n(r,i,o,a,s,c,u,f,h,l,p,d,g,m){var y=u-r,x=f-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+l,M=s+p,_=c+d,$=Rt(b*b+M*M+_*_),D=Vt(_/=$),E=ct(ct(_)-1)<V||ct(o-h)<V?(o+h)/2:Xt(M,b),P=t(E,D),T=P[0],C=P[1],N=T-r,A=C-i,S=x*N-y*A;(S*S/v>e||ct((y*N+x*A)/v-.5)>.3||a*l+s*p+c*d<oT)&&(n(r,i,o,a,s,c,T,C,E,b/=$,M/=$,_,g,m),m.point(T,C),n(T,C,E,b,M,_,u,f,h,l,p,d,g,m))}}return function(r){var i,o,a,s,c,u,f,h,l,p,d,g,m={point:y,lineStart:x,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=M},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y(D,E){D=t(D,E),r.point(D[0],D[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v(D,E){var P=Xn([D,E]),T=t(D,E);n(h,l,f,p,d,g,h=T[0],l=T[1],f=D,p=P[0],d=P[1],g=P[2],Im,r),r.point(h,l)}function b(){m.point=y,r.lineEnd()}function M(){x(),m.point=_,m.lineEnd=$}function _(D,E){v(i=D,E),o=h,a=l,s=p,c=d,u=g,m.point=v}function $(){n(h,l,f,p,d,g,o,a,i,s,c,u,Im,r),m.lineEnd=b,b()}return m}}var uT=io({point:function(t,e){this.stream.point(t*j,e*j)}});function cT(t){return io({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function lT(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 zm(t,e,n,r,i,o){if(!o)return lT(t,e,n,r,i);var a=X(o),s=H(o),c=a*t,u=s*t,f=a/t,h=s/t,l=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(g,m){return g*=r,m*=i,[c*g-u*m+e,n-u*g-c*m]}return d.invert=function(g,m){return[r*(f*g-h*m+l),i*(p-h*g-f*m)]},d}function ze(t){return hf(function(){return t})()}function hf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,c=0,u=0,f,h=0,l=1,p=1,d=null,g=Hl,m=null,y,x,v,b=Ki,M=.5,_,$,D,E,P;function T(S){return D(S[0]*j,S[1]*j)}function C(S){return S=D.invert(S[0],S[1]),S&&[S[0]*yt,S[1]*yt]}T.stream=function(S){return E&&P===S?E:E=uT(cT(f)(g(_(b(P=S)))))},T.preclip=function(S){return arguments.length?(g=S,d=void 0,A()):g},T.postclip=function(S){return arguments.length?(b=S,m=y=x=v=null,A()):b},T.clipAngle=function(S){return arguments.length?(g=+S?um(d=S*j):(d=null,Hl),A()):d*yt},T.clipExtent=function(S){return arguments.length?(b=S==null?(m=y=x=v=null,Ki):As(m=+S[0][0],y=+S[0][1],x=+S[1][0],v=+S[1][1]),A()):m==null?null:[[m,y],[x,v]]},T.scale=function(S){return arguments.length?(n=+S,N()):n},T.translate=function(S){return arguments.length?(r=+S[0],i=+S[1],N()):[r,i]},T.center=function(S){return arguments.length?(o=S[0]%360*j,a=S[1]%360*j,N()):[o*yt,a*yt]},T.rotate=function(S){return arguments.length?(s=S[0]%360*j,c=S[1]%360*j,u=S.length>2?S[2]%360*j:0,N()):[s*yt,c*yt,u*yt]},T.angle=function(S){return arguments.length?(h=S%360*j,N()):h*yt},T.reflectX=function(S){return arguments.length?(l=S?-1:1,N()):l<0},T.reflectY=function(S){return arguments.length?(p=S?-1:1,N()):p<0},T.precision=function(S){return arguments.length?(_=Fm($,M=S*S),A()):Rt(M)},T.fitExtent=function(S,w){return Rs(T,S,w)},T.fitSize=function(S,w){return cf(T,S,w)},T.fitWidth=function(S,w){return lf(T,S,w)},T.fitHeight=function(S,w){return ff(T,S,w)};function N(){var S=zm(n,0,0,l,p,h).apply(null,e(o,a)),w=zm(n,r-S[0],i-S[1],l,p,h);return f=Wl(s,c,u),$=Ul(e,w),D=Ul(f,$),_=Fm($,M),A()}function A(){return E=P=null,T}return function(){return e=t.apply(this,arguments),T.invert=e.invert&&C,N()}}function pf(t){var e=0,n=st/3,r=hf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*j,n=o[1]*j):[e*yt,n*yt]},i}function fT(t){var e=X(t);function n(r,i){return[r*e,H(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function Om(t,e){var n=H(t),r=(n+H(e))/2;if(ct(r)<V)return fT(t);var i=1+n*(2*r-n),o=Rt(i)/r;function a(s,c){var u=Rt(i-2*r*H(c))/r;return[u*H(s*=r),o-u*X(s)]}return a.invert=function(s,c){var u=o-c,f=Xt(s,ct(u))*le(u);return u*r<0&&(f-=st*le(s)*le(u)),[f/r,Vt((i-(s*s+u*u)*r*r)/(2*r))]},a}function Cs(){return pf(Om).scale(155.424).center([0,33.6442])}function Gm(){return Cs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function hT(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 pT(){var t,e,n=Gm(),r,i=Cs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Cs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,c,u={point:function(l,p){c=[l,p]}};function f(l){var p=l[0],d=l[1];return c=null,r.point(p,d),c||(o.point(p,d),c)||(s.point(p,d),c)}f.invert=function(l){var p=n.scale(),d=n.translate(),g=(l[0]-d[0])/p,m=(l[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(l)},f.stream=function(l){return t&&e===l?t:t=hT([n.stream(e=l),i.stream(l),a.stream(l)])},f.precision=function(l){return arguments.length?(n.precision(l),i.precision(l),a.precision(l),h()):n.precision()},f.scale=function(l){return arguments.length?(n.scale(l),i.scale(l*.35),a.scale(l),f.translate(n.translate())):n.scale()},f.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),d=+l[0],g=+l[1];return r=n.translate(l).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(u),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+V,g+.12*p+V],[d-.214*p-V,g+.234*p-V]]).stream(u),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+V,g+.166*p+V],[d-.115*p-V,g+.234*p-V]]).stream(u),h()},f.fitExtent=function(l,p){return Rs(f,l,p)},f.fitSize=function(l,p){return cf(f,l,p)},f.fitWidth=function(l,p){return lf(f,l,p)},f.fitHeight=function(l,p){return ff(f,l,p)};function h(){return t=e=null,f}return f.scale(1070)}function Bm(t){return function(e,n){var r=X(e),i=X(n),o=t(r*i);return o===1/0?[2,0]:[o*i*H(e),o*H(n)]}}function oo(t){return function(e,n){var r=Rt(e*e+n*n),i=t(r),o=H(i),a=X(i);return[Xt(e*o,r*a),Vt(r&&n*o/r)]}}var df=Bm(function(t){return Rt(2/(1+t))});df.invert=oo(function(t){return 2*Vt(t/2)});function dT(){return ze(df).scale(124.75).clipAngle(180-.001)}var gf=Bm(function(t){return(t=E1(t))&&t/H(t)});gf.invert=oo(function(t){return t});function gT(){return ze(gf).scale(79.4188).clipAngle(180-.001)}function ao(t,e){return[t,os(El((At+e)/2))]}ao.invert=function(t,e){return[t,2*Fr(k1(e))-At]};function mT(){return Um(ao).scale(961/Ht)}function Um(t){var e=ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,c,u;e.scale=function(h){return arguments.length?(r(h),f()):r()},e.translate=function(h){return arguments.length?(i(h),f()):i()},e.center=function(h){return arguments.length?(n(h),f()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=c=u=null:(a=+h[0][0],s=+h[0][1],c=+h[1][0],u=+h[1][1]),f()):a==null?null:[[a,s],[c,u]]};function f(){var h=st*r(),l=e(tm(e.rotate()).invert([0,0]));return o(a==null?[[l[0]-h,l[1]-h],[l[0]+h,l[1]+h]]:t===ao?[[Math.max(l[0]-h,a),s],[Math.min(l[0]+h,c),u]]:[[a,Math.max(l[1]-h,s)],[c,Math.min(l[1]+h,u)]])}return f()}function Is(t){return El((At+t)/2)}function Ym(t,e){var n=X(t),r=t===e?H(t):os(n/X(e))/os(Is(e)/Is(t)),i=n*kl(Is(t),r)/r;if(!r)return ao;function o(a,s){i>0?s<-At+V&&(s=-At+V):s>At-V&&(s=At-V);var c=i/kl(Is(s),r);return[c*H(r*a),i-c*X(r*a)]}return o.invert=function(a,s){var c=i-s,u=le(r)*Rt(a*a+c*c),f=Xt(a,ct(c))*le(c);return c*r<0&&(f-=st*le(a)*le(c)),[f/r,2*Fr(kl(i/u,1/r))-At]},o}function yT(){return pf(Ym).scale(109.5).parallels([30,30])}function so(t,e){return[t,e]}so.invert=so;function bT(){return ze(so).scale(152.63)}function Wm(t,e){var n=X(t),r=t===e?H(t):(n-X(e))/(e-t),i=n/r+t;if(ct(r)<V)return so;function o(a,s){var c=i-s,u=r*a;return[c*H(u),i-c*X(u)]}return o.invert=function(a,s){var c=i-s,u=Xt(a,ct(c))*le(c);return c*r<0&&(u-=st*le(a)*le(c)),[u/r,i-le(r)*Rt(a*a+c*c)]},o}function vT(){return pf(Wm).scale(131.154).center([0,13.9389])}var uo=1.340264,co=-.081106,lo=893e-6,fo=.003796,Fs=Rt(3)/2,xT=12;function mf(t,e){var n=Vt(Fs*H(e)),r=n*n,i=r*r*r;return[t*X(n)/(Fs*(uo+3*co*r+i*(7*lo+9*fo*r))),n*(uo+co*r+i*(lo+fo*r))]}mf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,c;o<xT&&(s=n*(uo+co*r+i*(lo+fo*r))-e,c=uo+3*co*r+i*(7*lo+9*fo*r),n-=a=s/c,r=n*n,i=r*r*r,!(ct(a)<Hi));++o);return[Fs*t*(uo+3*co*r+i*(7*lo+9*fo*r))/X(n),Vt(H(n)/Fs)]};function _T(){return ze(mf).scale(177.158)}function yf(t,e){var n=X(e),r=X(t)*n;return[n*H(t)/r,H(e)/r]}yf.invert=oo(Fr);function wT(){return ze(yf).scale(144.049).clipAngle(60)}function AT(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,c=null,u,f,h,l=1,p=1,d=io({point:function(b,M){var _=v([b,M]);this.stream.point(_[0],_[1])}}),g=Ki,m,y;function x(){return l=t*r,p=t*i,m=y=null,v}function v(b){var M=b[0]*l,_=b[1]*p;if(o){var $=_*a-M*s;M=M*a+_*s,_=$}return[M+e,_+n]}return v.invert=function(b){var M=b[0]-e,_=b[1]-n;if(o){var $=_*a+M*s;M=M*a-_*s,_=$}return[M/l,_/p]},v.stream=function(b){return m&&y===b?m:m=d(g(y=b))},v.postclip=function(b){return arguments.length?(g=b,c=u=f=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(c=u=f=h=null,Ki):As(c=+b[0][0],u=+b[0][1],f=+b[1][0],h=+b[1][1]),x()):c==null?null:[[c,u],[f,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*j,s=H(o),a=X(o),x()):o*yt},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,M){return Rs(v,b,M)},v.fitSize=function(b,M){return cf(v,b,M)},v.fitWidth=function(b,M){return lf(v,b,M)},v.fitHeight=function(b,M){return ff(v,b,M)},v}function bf(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)))]}bf.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(ct(i)>V&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function MT(){return ze(bf).scale(175.295)}function vf(t,e){return[X(e)*H(t),H(e)]}vf.invert=oo(Vt);function $T(){return ze(vf).scale(249.5).clipAngle(90+V)}function xf(t,e){var n=X(e),r=1+X(t)*n;return[n*H(t)/r,H(e)/r]}xf.invert=oo(function(t){return 2*Fr(t)});function ST(){return ze(xf).scale(250).clipAngle(142)}function _f(t,e){return[os(El((At+e)/2)),-t]}_f.invert=function(t,e){return[-e,2*Fr(k1(t))-At]};function TT(){var t=Um(_f),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 DT(t,e){return t.parent===e.parent?1:2}function PT(t){return t.reduce(kT,0)/t.length}function kT(t,e){return t+e.x}function ET(t){return 1+t.reduce(LT,0)}function LT(t,e){return Math.max(t,e.y)}function NT(t){for(var e;e=t.children;)t=e[0];return t}function RT(t){for(var e;e=t.children;)t=e[e.length-1];return t}function CT(){var t=DT,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(l){var p=l.children;p?(l.x=PT(p),l.y=ET(p)):(l.x=a?s+=t(l,a):0,l.y=0,a=l)});var c=NT(o),u=RT(o),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return o.eachAfter(r?function(l){l.x=(l.x-o.x)*e,l.y=(o.y-l.y)*n}:function(l){l.x=(l.x-f)/(h-f)*e,l.y=(1-(o.y?l.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 IT(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 FT(){return this.eachAfter(IT)}function zT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function OT(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 GT(t,e){for(var n=this,r=[n],i=[],o,a,s,c=-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,++c,this);return this}function BT(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function UT(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 YT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function WT(t){for(var e=this,n=qT(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 qT(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 HT(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function XT(){return Array.from(this)}function VT(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function jT(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*ZT(){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 wf(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=JT)):e===void 0&&(e=QT);for(var n=new Zn(t),r,i=[n],o,a,s,c;r=i.pop();)if((a=e(r.data))&&(c=(a=Array.from(a)).length))for(r.children=a,s=c-1;s>=0;--s)i.push(o=a[s]=new Zn(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(qm)}function KT(){return wf(this).eachBefore(tD)}function QT(t){return t.children}function JT(t){return Array.isArray(t)?t[1]:null}function tD(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qm(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Zn(t){this.data=t,this.depth=this.height=0,this.parent=null}Zn.prototype=wf.prototype={constructor:Zn,count:FT,each:zT,eachAfter:GT,eachBefore:OT,find:BT,sum:UT,sort:YT,path:WT,ancestors:HT,descendants:XT,leaves:VT,links:jT,copy:KT,[Symbol.iterator]:ZT};function zs(t){return t==null?null:Hm(t)}function Hm(t){if(typeof t!="function")throw new Error;return t}function Kn(){return 0}function Wr(t){return function(){return t}}const eD=1664525,nD=1013904223,Xm=4294967296;function Af(){let t=1;return()=>(t=(eD*t+nD)%Xm)/Xm}function rD(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function iD(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 oD(t){return Vm(t,Af())}function Vm(t,e){for(var n=0,r=(t=iD(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&jm(a,o)?++n:(a=sD(i=aD(i,o)),n=0);return a}function aD(t,e){var n,r;if(Mf(e,t))return[e];for(n=0;n<t.length;++n)if(Os(e,t[n])&&Mf(ho(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(Os(ho(t[n],t[r]),e)&&Os(ho(t[n],e),t[r])&&Os(ho(t[r],e),t[n])&&Mf(Zm(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Os(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 jm(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 Mf(t,e){for(var n=0;n<e.length;++n)if(!jm(t,e[n]))return!1;return!0}function sD(t){switch(t.length){case 1:return uD(t[0]);case 2:return ho(t[0],t[1]);case 3:return Zm(t[0],t[1],t[2])}}function uD(t){return{x:t.x,y:t.y,r:t.r}}function ho(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,c=o-n,u=a-r,f=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+o+c/h*f)/2,y:(r+a+u/h*f)/2,r:(h+i+s)/2}}function Zm(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,c=e.r,u=n.x,f=n.y,h=n.r,l=r-a,p=r-u,d=i-s,g=i-f,m=c-o,y=h-o,x=r*r+i*i-o*o,v=x-a*a-s*s+c*c,b=x-u*u-f*f+h*h,M=p*d-l*g,_=(d*b-g*v)/(M*2)-r,$=(g*m-d*y)/M,D=(p*v-l*b)/(M*2)-i,E=(l*y-p*m)/M,P=$*$+E*E-1,T=2*(o+_*$+D*E),C=_*_+D*D-o*o,N=-(Math.abs(P)>1e-6?(T+Math.sqrt(T*T-4*P*C))/(2*P):C/T);return{x:r+_+$*N,y:i+D+E*N,r:N}}function Km(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,c,u=r*r+a*a;u?(o=e.r+n.r,o*=o,c=t.r+n.r,c*=c,o>c?(i=(u+c-o)/(2*u),s=Math.sqrt(Math.max(0,c/u-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(u+o-c)/(2*u),s=Math.sqrt(Math.max(0,o/u-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 Qm(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 Jm(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 Gs(t){this._=t,this.next=null,this.previous=null}function ty(t,e){if(!(o=(t=rD(t)).length))return 0;var n,r,i,o,a,s,c,u,f,h,l;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;Km(r,n,i=t[2]),n=new Gs(n),r=new Gs(r),i=new Gs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<o;++c){Km(n._,r._,i=t[c]),i=new Gs(i),u=r.next,f=n.previous,h=r._.r,l=n._.r;do if(h<=l){if(Qm(u._,i._)){r=u,n.next=r,r.previous=n,--c;continue t}h+=u._.r,u=u.next}else{if(Qm(f._,i._)){n=f,n.next=r,r.previous=n,--c;continue t}l+=f._.r,f=f.previous}while(u!==f.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=Jm(n);(i=i.next)!==r;)(s=Jm(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Vm(n,e),c=0;c<o;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function cD(t){return ty(t,Af()),t}function lD(t){return Math.sqrt(t.value)}function fD(){var t=null,e=1,n=1,r=Kn;function i(o){const a=Af();return o.x=e/2,o.y=n/2,t?o.eachBefore(ey(t)).eachAfter($f(r,.5,a)).eachBefore(ny(1)):o.eachBefore(ey(lD)).eachAfter($f(Kn,1,a)).eachAfter($f(r,o.r/Math.min(e,n),a)).eachBefore(ny(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=zs(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:Wr(+o),i):r},i}function ey(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function $f(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,c;if(s)for(o=0;o<a;++o)i[o].r+=s;if(c=ty(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=c+s}}}function ny(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 ry(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 po(t,e,n,r,i){for(var o=t.children,a,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function hD(){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(ry),a}function o(a,s){return function(c){c.children&&po(c,c.x0,a*(c.depth+1)/s,c.x1,a*(c.depth+2)/s);var u=c.x0,f=c.y0,h=c.x1-n,l=c.y1-n;h<u&&(u=h=(u+h)/2),l<f&&(f=l=(f+l)/2),c.x0=u,c.y0=f,c.x1=h,c.y1=l}}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 pD={depth:-1},iy={},Sf={};function dD(t){return t.id}function gD(t){return t.parentId}function mD(){var t=dD,e=gD,n;function r(i){var o=Array.from(i),a=t,s=e,c,u,f,h,l,p,d,g,m=new Map;if(n!=null){const y=o.map((b,M)=>yD(n(b,M,i))),x=y.map(oy),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(oy(b)),o.push(Sf));a=(b,M)=>y[M],s=(b,M)=>x[M]}for(f=0,c=o.length;f<c;++f)u=o[f],p=o[f]=new Zn(u),(d=a(u,f,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?iy:p)),(d=s(u,f,i))!=null&&(d+="")&&(p.parent=d);for(f=0;f<c;++f)if(p=o[f],d=p.parent){if(l=m.get(d),!l)throw new Error("missing: "+d);if(l===iy)throw new Error("ambiguous: "+d);l.children?l.children.push(p):l.children=[p],p.parent=l}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Sf&&h.children.length===1;)h=h.children[0],--c;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Sf);--y)p.data=null}if(h.parent=pD,h.eachBefore(function(y){y.depth=y.parent.depth+1,--c}).eachBefore(qm),h.parent=null,c>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=zs(i),r):t},r.parentId=function(i){return arguments.length?(e=zs(i),r):e},r.path=function(i){return arguments.length?(n=zs(i),r):n},r}function yD(t){t=`${t}`;let e=t.length;return Tf(t,e-1)&&!Tf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function oy(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Tf(t,e););return t.slice(0,e)}function Tf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function bD(t,e){return t.parent===e.parent?1:2}function Df(t){var e=t.children;return e?e[0]:t.t}function Pf(t){var e=t.children;return e?e[e.length-1]:t.t}function vD(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 xD(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 _D(t,e,n){return t.a.parent===e.parent?t.a:n}function Bs(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}Bs.prototype=Object.create(Zn.prototype);function wD(t){for(var e=new Bs(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 Bs(o[a],a)),i.parent=n;return(e.parent=new Bs(null,0)).children=[e],e}function AD(){var t=bD,e=1,n=1,r=null;function i(u){var f=wD(u);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(a),r)u.eachBefore(c);else{var h=u,l=u,p=u;u.eachBefore(function(x){x.x<h.x&&(h=x),x.x>l.x&&(l=x),x.depth>p.depth&&(p=x)});var d=h===l?1:t(h,l)/2,g=d-h.x,m=e/(l.x+d+g),y=n/(p.depth||1);u.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*y})}return u}function o(u){var f=u.children,h=u.parent.children,l=u.i?h[u.i-1]:null;if(f){xD(u);var p=(f[0].z+f[f.length-1].z)/2;l?(u.z=l.z+t(u._,l._),u.m=u.z-p):u.z=p}else l&&(u.z=l.z+t(u._,l._));u.parent.A=s(u,l,u.parent.A||h[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,f,h){if(f){for(var l=u,p=u,d=f,g=l.parent.children[0],m=l.m,y=p.m,x=d.m,v=g.m,b;d=Pf(d),l=Df(l),d&&l;)g=Df(g),p=Pf(p),p.a=u,b=d.z+x-l.z-m+t(d._,l._),b>0&&(vD(_D(d,u,h),u,b),m+=b,y+=b),x+=d.m,m+=l.m,v+=g.m,y+=p.m;d&&!Pf(p)&&(p.t=d,p.m+=x-y),l&&!Df(g)&&(g.t=l,g.m+=m-v,h=u)}return h}function c(u){u.x*=e,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(t=u,i):t},i.size=function(u){return arguments.length?(r=!1,e=+u[0],n=+u[1],i):r?null:[e,n]},i.nodeSize=function(u){return arguments.length?(r=!0,e=+u[0],n=+u[1],i):r?[e,n]:null},i}function Us(t,e,n,r,i){for(var o=t.children,a,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var ay=(1+Math.sqrt(5))/2;function sy(t,e,n,r,i,o){for(var a=[],s=e.children,c,u,f=0,h=0,l=s.length,p,d,g=e.value,m,y,x,v,b,M,_;f<l;){p=i-n,d=o-r;do m=s[h++].value;while(!m&&h<l);for(y=x=m,M=Math.max(d/p,p/d)/(g*t),_=m*m*M,b=Math.max(x/_,_/y);h<l;++h){if(m+=u=s[h].value,u<y&&(y=u),u>x&&(x=u),_=m*m*M,v=Math.max(x/_,_/y),v>b){m-=u;break}b=v}a.push(c={value:m,dice:p<d,children:s.slice(f,h)}),c.dice?po(c,n,r,i,g?r+=d*m/g:o):Us(c,n,r,g?n+=p*m/g:i,o),g-=m,f=h}return a}const uy=function t(e){function n(r,i,o,a,s){sy(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(ay);function MD(){var t=uy,e=!1,n=1,r=1,i=[0],o=Kn,a=Kn,s=Kn,c=Kn,u=Kn;function f(l){return l.x0=l.y0=0,l.x1=n,l.y1=r,l.eachBefore(h),i=[0],e&&l.eachBefore(ry),l}function h(l){var p=i[l.depth],d=l.x0+p,g=l.y0+p,m=l.x1-p,y=l.y1-p;m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),l.x0=d,l.y0=g,l.x1=m,l.y1=y,l.children&&(p=i[l.depth+1]=o(l)/2,d+=u(l)-p,g+=a(l)-p,m-=s(l)-p,y-=c(l)-p,m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),t(l,d,g,m,y))}return f.round=function(l){return arguments.length?(e=!!l,f):e},f.size=function(l){return arguments.length?(n=+l[0],r=+l[1],f):[n,r]},f.tile=function(l){return arguments.length?(t=Hm(l),f):t},f.padding=function(l){return arguments.length?f.paddingInner(l).paddingOuter(l):f.paddingInner()},f.paddingInner=function(l){return arguments.length?(o=typeof l=="function"?l:Wr(+l),f):o},f.paddingOuter=function(l){return arguments.length?f.paddingTop(l).paddingRight(l).paddingBottom(l).paddingLeft(l):f.paddingTop()},f.paddingTop=function(l){return arguments.length?(a=typeof l=="function"?l:Wr(+l),f):a},f.paddingRight=function(l){return arguments.length?(s=typeof l=="function"?l:Wr(+l),f):s},f.paddingBottom=function(l){return arguments.length?(c=typeof l=="function"?l:Wr(+l),f):c},f.paddingLeft=function(l){return arguments.length?(u=typeof l=="function"?l:Wr(+l),f):u},f}function $D(t,e,n,r,i){var o=t.children,a,s=o.length,c,u=new Array(s+1);for(u[0]=c=a=0;a<s;++a)u[a+1]=c+=o[a].value;f(0,s,t.value,e,n,r,i);function f(h,l,p,d,g,m,y){if(h>=l-1){var x=o[h];x.x0=d,x.y0=g,x.x1=m,x.y1=y;return}for(var v=u[h],b=p/2+v,M=h+1,_=l-1;M<_;){var $=M+_>>>1;u[$]<b?M=$+1:_=$}b-u[M-1]<u[M]-b&&h+1<M&&--M;var D=u[M]-v,E=p-D;if(m-d>y-g){var P=p?(d*E+m*D)/p:m;f(h,M,D,d,g,P,y),f(M,l,E,P,g,m,y)}else{var T=p?(g*E+y*D)/p:y;f(h,M,D,d,g,m,T),f(M,l,E,d,T,m,y)}}}function SD(t,e,n,r,i){(t.depth&1?Us:po)(t,e,n,r,i)}const TD=function t(e){function n(r,i,o,a,s){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,h,l=-1,p,d=c.length,g=r.value;++l<d;){for(u=c[l],f=u.children,h=u.value=0,p=f.length;h<p;++h)u.value+=f[h].value;u.dice?po(u,i,o,a,g?o+=(s-o)*u.value/g:s):Us(u,i,o,g?i+=(a-i)*u.value/g:a,s),g-=u.value}else r._squarify=c=sy(e,r,i,o,a,s),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(ay);function DD(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 PD(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,c=0;++e<n;)o=a,a=t[e],c+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return c*=3,[r/c,i/c]}function kD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function ED(t,e){return t[0]-e[0]||t[1]-e[1]}function cy(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&kD(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function LD(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(ED),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=cy(r),a=cy(i),s=a[0]===o[0],c=a[a.length-1]===o[o.length-1],u=[];for(e=o.length-1;e>=0;--e)u.push(t[r[o[e]][2]]);for(e=+s;e<a.length-c;++e)u.push(t[r[a[e]][2]]);return u}function ND(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],c,u,f=!1,h=0;h<n;++h)r=t[h],c=r[0],u=r[1],u>o!=s>o&&i<(a-c)*(o-u)/(s-u)+c&&(f=!f),a=c,s=u;return f}function RD(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],c=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,c+=Math.hypot(i,o);return c}const It=Math.random,CD=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}(It),ID=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}(It),kf=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}(It),FD=function t(e){var n=kf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(It),ly=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}(It),zD=function t(e){var n=ly.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}(It),OD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(It),GD=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}(It),BD=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}(It),fy=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}(It),Ef=function t(e){var n=kf.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)),c=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var u=n(),f=1+s*u;while(f<=0);f*=f*f;var h=1-e()}while(h>=1-.0331*u*u*u*u&&Math.log(h)>=.5*u*u+a*(1-f+Math.log(f)));return a*f*c()*o}}return r.source=t,r}(It),hy=function t(e){var n=Ef.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var c=a();return c===0?0:c/(c+s())}}return r.source=t,r}(It),py=function t(e){var n=fy.source(e),r=hy.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,c=o,u=a;c*u>16&&c*(1-u)>16;){var f=Math.floor((c+1)*u),h=r(f,c-f+1)();h<=u?(s+=f,c-=f,u=(u-h)/(1-h)):(c=f-1,u/=h)}for(var l=u<.5,p=l?u:1-u,d=n(p),g=d(),m=0;g<=c;++m)g+=d();return s+(l?m:c-m)}}return i.source=t,i}(It),UD=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}(It),YD=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}(It),WD=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}(It),qD=function t(e){var n=Ef.source(e),r=py.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var c=Math.floor(.875*s),u=n(c)();if(u>s)return a+r(c-1,s/u)();a+=c,s-=u}for(var f=-Math.log1p(-e()),h=0;f<=s;++h)f-=Math.log1p(-e());return a+h}}return i.source=t,i}(It),HD=1664525,XD=1013904223,dy=1/4294967296;function VD(t=Math.random()){let e=(0<=t&&t<1?t/dy:Math.abs(t))|0;return()=>(e=HD*e+XD|0,dy*(e>>>0))}function he(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Je(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 Lf=Symbol("implicit");function Nf(){var t=new _i,e=[],n=[],r=Lf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Lf)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 _i;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 Nf(e,n).unknown(r)},he.apply(i,arguments),i}function Rf(){var t=Nf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,c=0,u=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+u*2),s&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),s&&(d=Math.round(d),a=Math.round(a));var m=un(l).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(s=!!l,h()):s},t.padding=function(l){return arguments.length?(c=Math.min(1,u=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(u=+l,h()):u},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return Rf(e(),[r,i]).round(s).paddingInner(c).paddingOuter(u).align(f)},he.apply(h(),arguments)}function gy(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return gy(e())},t}function Cf(){return gy(Rf.apply(null,arguments).paddingInner(1))}function jD(t){return function(){return t}}function Ys(t){return+t}var my=[0,1];function Qt(t){return t}function If(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:jD(isNaN(e)?NaN:.5)}function ZD(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function KD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=If(i,r),o=n(a,o)):(r=If(r,i),o=n(o,a)),function(s){return o(r(s))}}function QD(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]=If(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var c=Dn(t,s,1,r)-1;return o[c](i[c](s))}}function go(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ws(){var t=my,e=my,n=fn,r,i,o,a=Qt,s,c,u;function f(){var l=Math.min(t.length,e.length);return a!==Qt&&(a=ZD(t[0],t[l-1])),s=l>2?QD:KD,c=u=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=s(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((u||(u=s(e,t.map(r),ce)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,Ys),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=Na,f()},h.clamp=function(l){return arguments.length?(a=l?!0:Qt,f()):a!==Qt},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function Ff(){return Ws()(Qt,Qt)}function yy(t,e,n,r){var i=la(t,e,n),o;switch(r=Ir(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=D1(i,a))&&(r.precision=o),Dl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=P1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=T1(i))&&(r.precision=o-(r.type==="%")*2);break}}return qi(r)}function mn(t){var e=t.domain;return t.ticks=function(n){var r=e();return kn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return yy(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],c,u,f=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);f-- >0;){if(u=En(a,s,n),u===c)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;c=u}return t},t}function zf(){var t=Ff();return t.copy=function(){return go(t,zf())},he.apply(t,arguments),mn(t)}function by(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,Ys),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return by(t).unknown(e)},t=arguments.length?Array.from(t,Ys):[0,1],mn(n)}function vy(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 xy(t){return Math.log(t)}function _y(t){return Math.exp(t)}function JD(t){return-Math.log(-t)}function tP(t){return-Math.exp(-t)}function eP(t){return isFinite(t)?+("1e"+t):t<0?0:t}function nP(t){return t===10?eP:t===Math.E?Math.exp:e=>Math.pow(t,e)}function rP(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 wy(t){return(e,n)=>-t(-e,n)}function Of(t){const e=t(xy,_y),n=e.domain;let r=10,i,o;function a(){return i=rP(r),o=nP(r),n()[0]<0?(i=wy(i),o=wy(o),t(JD,tP)):t(xy,_y),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 c=n();let u=c[0],f=c[c.length-1];const h=f<u;h&&([u,f]=[f,u]);let l=i(u),p=i(f),d,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&p-l<m){if(l=Math.floor(l),p=Math.ceil(p),u>0){for(;l<=p;++l)for(d=1;d<r;++d)if(g=l<0?d/o(-l):d*o(l),!(g<u)){if(g>f)break;y.push(g)}}else for(;l<=p;++l)for(d=r-1;d>=1;--d)if(g=l>0?d/o(-l):d*o(l),!(g<u)){if(g>f)break;y.push(g)}y.length*2<m&&(y=kn(u,f,m))}else y=kn(l,p,Math.min(p-l,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Ir(c)).precision==null&&(c.trim=!0),c=qi(c)),s===1/0)return c;const u=Math.max(1,r*s/e.ticks().length);return f=>{let h=f/o(Math.round(i(f)));return h*r<r-.5&&(h*=r),h<=u?c(f):""}},e.nice=()=>n(vy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Ay(){const t=Of(Ws()).domain([1,10]);return t.copy=()=>go(t,Ay()).base(t.base()),he.apply(t,arguments),t}function My(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function $y(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Gf(t){var e=1,n=t(My(e),$y(e));return n.constant=function(r){return arguments.length?t(My(e=+r),$y(e)):e},mn(n)}function Sy(){var t=Gf(Ws());return t.copy=function(){return go(t,Sy()).constant(t.constant())},he.apply(t,arguments)}function Ty(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function iP(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function oP(t){return t<0?-t*t:t*t}function Bf(t){var e=t(Qt,Qt),n=1;function r(){return n===1?t(Qt,Qt):n===.5?t(iP,oP):t(Ty(n),Ty(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},mn(e)}function qs(){var t=Bf(Ws());return t.copy=function(){return go(t,qs()).exponent(t.exponent())},he.apply(t,arguments),t}function aP(){return qs.apply(null,arguments).exponent(.5)}function Dy(t){return Math.sign(t)*t*t}function sP(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Py(){var t=Ff(),e=[0,1],n=!1,r;function i(o){var a=sP(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Dy(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,Ys)).map(Dy)),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 Py(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},he.apply(i,arguments),mn(i)}function ky(){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]=cd(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[Dn(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(xt),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 ky().domain(t).range(e).unknown(r)},he.apply(o,arguments)}function Ey(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[Dn(r,c,0,n)]:o}function s(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,s()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,s()):i.slice()},a.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Ey().domain([t,e]).range(i).unknown(o)},he.apply(mn(a),arguments)}function Ly(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[Dn(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 Ly().domain(t).range(e).unknown(n)},he.apply(i,arguments)}const Uf=new Date,Yf=new Date;function Tt(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 c=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return c;let u;do c.push(u=new Date(+o)),e(o,s),t(o);while(u<o&&o<a);return c},i.filter=o=>Tt(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)=>(Uf.setTime(+o),Yf.setTime(+a),t(Uf),t(Yf),Math.floor(n(Uf,Yf))),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=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);qr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):qr);const Ny=qr.range,tn=1e3,pe=tn*60,en=pe*60,nn=en*24,Wf=nn*7,Ry=nn*30,qf=nn*365,rn=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*tn)},(t,e)=>(e-t)/tn,t=>t.getUTCSeconds()),Cy=rn.range,Hs=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*tn)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getMinutes()),uP=Hs.range,Xs=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getUTCMinutes()),cP=Xs.range,Vs=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*tn-t.getMinutes()*pe)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getHours()),lP=Vs.range,js=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getUTCHours()),fP=js.range,Hr=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pe)/nn,t=>t.getDate()-1),hP=Hr.range,mo=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/nn,t=>t.getUTCDate()-1),pP=mo.range,Hf=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/nn,t=>Math.floor(t/nn)),dP=Hf.range;function Qn(t){return Tt(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())*pe)/Wf)}const Xr=Qn(0),yo=Qn(1),Iy=Qn(2),Fy=Qn(3),Jn=Qn(4),zy=Qn(5),Oy=Qn(6),Gy=Xr.range,gP=yo.range,mP=Iy.range,yP=Fy.range,bP=Jn.range,vP=zy.range,xP=Oy.range;function tr(t){return Tt(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)/Wf)}const Vr=tr(0),bo=tr(1),By=tr(2),Uy=tr(3),er=tr(4),Yy=tr(5),Wy=tr(6),qy=Vr.range,_P=bo.range,wP=By.range,AP=Uy.range,MP=er.range,$P=Yy.range,SP=Wy.range,Zs=Tt(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()),TP=Zs.range,Ks=Tt(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()),DP=Ks.range,Oe=Tt(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());Oe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(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 PP=Oe.range,Ge=Tt(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());Ge.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(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 kP=Ge.range;function Hy(t,e,n,r,i,o){const a=[[rn,1,tn],[rn,5,5*tn],[rn,15,15*tn],[rn,30,30*tn],[o,1,pe],[o,5,5*pe],[o,15,15*pe],[o,30,30*pe],[i,1,en],[i,3,3*en],[i,6,6*en],[i,12,12*en],[r,1,nn],[r,2,2*nn],[n,1,Wf],[e,1,Ry],[e,3,3*Ry],[t,1,qf]];function s(u,f,h){const l=f<u;l&&([u,f]=[f,u]);const p=h&&typeof h.range=="function"?h:c(u,f,h),d=p?p.range(u,+f+1):[];return l?d.reverse():d}function c(u,f,h){const l=Math.abs(f-u)/h,p=aa(([,,m])=>m).right(a,l);if(p===a.length)return t.every(la(u/qf,f/qf,h));if(p===0)return qr.every(Math.max(la(u,f,h),1));const[d,g]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return d.every(g)}return[s,c]}const[Xy,Vy]=Hy(Ge,Ks,Vr,Hf,js,Xs),[jy,Zy]=Hy(Oe,Zs,Xr,Hr,Vs,Hs);function Xf(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 Vf(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 vo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ky(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,c=t.shortMonths,u=xo(i),f=_o(i),h=xo(o),l=_o(o),p=xo(a),d=_o(a),g=xo(s),m=_o(s),y=xo(c),x=_o(c),v={a:k,A:L,b:R,B:F,c:null,d:rb,e:rb,f:JP,g:ck,G:fk,H:ZP,I:KP,j:QP,L:ib,m:tk,M:ek,p:z,q:Y,Q:lb,s:fb,S:nk,u:rk,U:ik,V:ok,w:ak,W:sk,x:null,X:null,y:uk,Y:lk,Z:hk,"%":cb},b={a:rt,A:Z,b:J,B:ht,c:null,d:ab,e:ab,f:mk,g:Sk,G:Dk,H:pk,I:dk,j:gk,L:sb,m:yk,M:bk,p:q,q:pt,Q:lb,s:fb,S:vk,u:xk,U:_k,V:wk,w:Ak,W:Mk,x:null,X:null,y:$k,Y:Tk,Z:Pk,"%":cb},M={a:P,A:T,b:C,B:N,c:A,d:eb,e:eb,f:HP,g:tb,G:Jy,H:nb,I:nb,j:UP,L:qP,m:BP,M:YP,p:E,q:GP,Q:VP,s:jP,S:WP,u:CP,U:IP,V:FP,w:RP,W:zP,x:S,X:w,y:tb,Y:Jy,Z:OP,"%":XP};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 _(B,nt){return function(ut){var O=[],$t=-1,gt=0,Jt=B.length,te,Q,St;for(ut instanceof Date||(ut=new Date(+ut));++$t<Jt;)B.charCodeAt($t)===37&&(O.push(B.slice(gt,$t)),(Q=Qy[te=B.charAt(++$t)])!=null?te=B.charAt(++$t):Q=te==="e"?" ":"0",(St=nt[te])&&(te=St(ut,Q)),O.push(te),gt=$t+1);return O.push(B.slice(gt,$t)),O.join("")}}function $(B,nt){return function(ut){var O=vo(1900,void 0,1),$t=D(O,B,ut+="",0),gt,Jt;if($t!=ut.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(nt&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(gt=Vf(vo(O.y,0,1)),Jt=gt.getUTCDay(),gt=Jt>4||Jt===0?bo.ceil(gt):bo(gt),gt=mo.offset(gt,(O.V-1)*7),O.y=gt.getUTCFullYear(),O.m=gt.getUTCMonth(),O.d=gt.getUTCDate()+(O.w+6)%7):(gt=Xf(vo(O.y,0,1)),Jt=gt.getDay(),gt=Jt>4||Jt===0?yo.ceil(gt):yo(gt),gt=Hr.offset(gt,(O.V-1)*7),O.y=gt.getFullYear(),O.m=gt.getMonth(),O.d=gt.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),Jt="Z"in O?Vf(vo(O.y,0,1)).getUTCDay():Xf(vo(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(Jt+5)%7:O.w+O.U*7-(Jt+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Vf(O)):Xf(O)}}function D(B,nt,ut,O){for(var $t=0,gt=nt.length,Jt=ut.length,te,Q;$t<gt;){if(O>=Jt)return-1;if(te=nt.charCodeAt($t++),te===37){if(te=nt.charAt($t++),Q=M[te in Qy?nt.charAt($t++):te],!Q||(O=Q(B,ut,O))<0)return-1}else if(te!=ut.charCodeAt(O++))return-1}return O}function E(B,nt,ut){var O=u.exec(nt.slice(ut));return O?(B.p=f.get(O[0].toLowerCase()),ut+O[0].length):-1}function P(B,nt,ut){var O=p.exec(nt.slice(ut));return O?(B.w=d.get(O[0].toLowerCase()),ut+O[0].length):-1}function T(B,nt,ut){var O=h.exec(nt.slice(ut));return O?(B.w=l.get(O[0].toLowerCase()),ut+O[0].length):-1}function C(B,nt,ut){var O=y.exec(nt.slice(ut));return O?(B.m=x.get(O[0].toLowerCase()),ut+O[0].length):-1}function N(B,nt,ut){var O=g.exec(nt.slice(ut));return O?(B.m=m.get(O[0].toLowerCase()),ut+O[0].length):-1}function A(B,nt,ut){return D(B,e,nt,ut)}function S(B,nt,ut){return D(B,n,nt,ut)}function w(B,nt,ut){return D(B,r,nt,ut)}function k(B){return a[B.getDay()]}function L(B){return o[B.getDay()]}function R(B){return c[B.getMonth()]}function F(B){return s[B.getMonth()]}function z(B){return i[+(B.getHours()>=12)]}function Y(B){return 1+~~(B.getMonth()/3)}function rt(B){return a[B.getUTCDay()]}function Z(B){return o[B.getUTCDay()]}function J(B){return c[B.getUTCMonth()]}function ht(B){return s[B.getUTCMonth()]}function q(B){return i[+(B.getUTCHours()>=12)]}function pt(B){return 1+~~(B.getUTCMonth()/3)}return{format:function(B){var nt=_(B+="",v);return nt.toString=function(){return B},nt},parse:function(B){var nt=$(B+="",!1);return nt.toString=function(){return B},nt},utcFormat:function(B){var nt=_(B+="",b);return nt.toString=function(){return B},nt},utcParse:function(B){var nt=$(B+="",!0);return nt.toString=function(){return B},nt}}}var Qy={"-":"",_:" ",0:"0"},Ct=/^\s*\d+/,EP=/^%/,LP=/[\\^$*+?|[\]().{}]/g;function dt(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 NP(t){return t.replace(LP,"\\$&")}function xo(t){return new RegExp("^(?:"+t.map(NP).join("|")+")","i")}function _o(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function RP(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function CP(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function IP(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function FP(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function zP(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Jy(t,e,n){var r=Ct.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function tb(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function OP(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 GP(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function BP(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function eb(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function UP(t,e,n){var r=Ct.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function nb(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function YP(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function WP(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function qP(t,e,n){var r=Ct.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function HP(t,e,n){var r=Ct.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function XP(t,e,n){var r=EP.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function VP(t,e,n){var r=Ct.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jP(t,e,n){var r=Ct.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function rb(t,e){return dt(t.getDate(),e,2)}function ZP(t,e){return dt(t.getHours(),e,2)}function KP(t,e){return dt(t.getHours()%12||12,e,2)}function QP(t,e){return dt(1+Hr.count(Oe(t),t),e,3)}function ib(t,e){return dt(t.getMilliseconds(),e,3)}function JP(t,e){return ib(t,e)+"000"}function tk(t,e){return dt(t.getMonth()+1,e,2)}function ek(t,e){return dt(t.getMinutes(),e,2)}function nk(t,e){return dt(t.getSeconds(),e,2)}function rk(t){var e=t.getDay();return e===0?7:e}function ik(t,e){return dt(Xr.count(Oe(t)-1,t),e,2)}function ob(t){var e=t.getDay();return e>=4||e===0?Jn(t):Jn.ceil(t)}function ok(t,e){return t=ob(t),dt(Jn.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function ak(t){return t.getDay()}function sk(t,e){return dt(yo.count(Oe(t)-1,t),e,2)}function uk(t,e){return dt(t.getFullYear()%100,e,2)}function ck(t,e){return t=ob(t),dt(t.getFullYear()%100,e,2)}function lk(t,e){return dt(t.getFullYear()%1e4,e,4)}function fk(t,e){var n=t.getDay();return t=n>=4||n===0?Jn(t):Jn.ceil(t),dt(t.getFullYear()%1e4,e,4)}function hk(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+dt(e/60|0,"0",2)+dt(e%60,"0",2)}function ab(t,e){return dt(t.getUTCDate(),e,2)}function pk(t,e){return dt(t.getUTCHours(),e,2)}function dk(t,e){return dt(t.getUTCHours()%12||12,e,2)}function gk(t,e){return dt(1+mo.count(Ge(t),t),e,3)}function sb(t,e){return dt(t.getUTCMilliseconds(),e,3)}function mk(t,e){return sb(t,e)+"000"}function yk(t,e){return dt(t.getUTCMonth()+1,e,2)}function bk(t,e){return dt(t.getUTCMinutes(),e,2)}function vk(t,e){return dt(t.getUTCSeconds(),e,2)}function xk(t){var e=t.getUTCDay();return e===0?7:e}function _k(t,e){return dt(Vr.count(Ge(t)-1,t),e,2)}function ub(t){var e=t.getUTCDay();return e>=4||e===0?er(t):er.ceil(t)}function wk(t,e){return t=ub(t),dt(er.count(Ge(t),t)+(Ge(t).getUTCDay()===4),e,2)}function Ak(t){return t.getUTCDay()}function Mk(t,e){return dt(bo.count(Ge(t)-1,t),e,2)}function $k(t,e){return dt(t.getUTCFullYear()%100,e,2)}function Sk(t,e){return t=ub(t),dt(t.getUTCFullYear()%100,e,2)}function Tk(t,e){return dt(t.getUTCFullYear()%1e4,e,4)}function Dk(t,e){var n=t.getUTCDay();return t=n>=4||n===0?er(t):er.ceil(t),dt(t.getUTCFullYear()%1e4,e,4)}function Pk(){return"+0000"}function cb(){return"%"}function lb(t){return+t}function fb(t){return Math.floor(+t/1e3)}var jr,jf,hb,Qs,Zf;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 jr=Ky(t),jf=jr.format,hb=jr.parse,Qs=jr.utcFormat,Zf=jr.utcParse,jr}var db="%Y-%m-%dT%H:%M:%S.%LZ";function kk(t){return t.toISOString()}var Ek=Date.prototype.toISOString?kk:Qs(db);const Lk=Ek;function Nk(t){var e=new Date(t);return isNaN(e)?null:e}var Rk=+new Date("2000-01-01T00:00:00.000Z")?Nk:Zf(db);const Ck=Rk;function Ik(t){return new Date(t)}function Fk(t){return t instanceof Date?+t:+new Date(+t)}function Kf(t,e,n,r,i,o,a,s,c,u){var f=Ff(),h=f.invert,l=f.domain,p=u(".%L"),d=u(":%S"),g=u("%I:%M"),m=u("%I %p"),y=u("%a %d"),x=u("%b %d"),v=u("%B"),b=u("%Y");function M(_){return(c(_)<_?p:s(_)<_?d:a(_)<_?g:o(_)<_?m:r(_)<_?i(_)<_?y:x:n(_)<_?v:b)(_)}return f.invert=function(_){return new Date(h(_))},f.domain=function(_){return arguments.length?l(Array.from(_,Fk)):l().map(Ik)},f.ticks=function(_){var $=l();return t($[0],$[$.length-1],_??10)},f.tickFormat=function(_,$){return $==null?M:u($)},f.nice=function(_){var $=l();return(!_||typeof _.range!="function")&&(_=e($[0],$[$.length-1],_??10)),_?l(vy($,_)):f},f.copy=function(){return go(f,Kf(t,e,n,r,i,o,a,s,c,u))},f}function zk(){return he.apply(Kf(jy,Zy,Oe,Zs,Xr,Hr,Vs,Hs,rn,jf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ok(){return he.apply(Kf(Xy,Vy,Ge,Ks,Vr,mo,js,Xs,rn,Qs).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Js(){var t=0,e=1,n,r,i,o,a=Qt,s=!1,c;function u(h){return h==null||isNaN(h=+h)?c:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}u.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),u):[t,e]},u.clamp=function(h){return arguments.length?(s=!!h,u):s},u.interpolator=function(h){return arguments.length?(a=h,u):a};function f(h){return function(l){var p,d;return arguments.length?([p,d]=l,a=h(p,d),u):[a(0),a(1)]}}return u.range=f(fn),u.rangeRound=f(Na),u.unknown=function(h){return arguments.length?(c=h,u):c},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),u}}function yn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function gb(){var t=mn(Js()(Qt));return t.copy=function(){return yn(t,gb())},Je.apply(t,arguments)}function mb(){var t=Of(Js()).domain([1,10]);return t.copy=function(){return yn(t,mb()).base(t.base())},Je.apply(t,arguments)}function yb(){var t=Gf(Js());return t.copy=function(){return yn(t,yb()).constant(t.constant())},Je.apply(t,arguments)}function Qf(){var t=Bf(Js());return t.copy=function(){return yn(t,Qf()).exponent(t.exponent())},Je.apply(t,arguments)}function Gk(){return Qf.apply(null,arguments).exponent(.5)}function bb(){var t=[],e=Qt;function n(r){if(r!=null&&!isNaN(r=+r))return e((Dn(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(xt),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)=>Mi(t,o/r))},n.copy=function(){return bb(e).domain(t)},Je.apply(n,arguments)}function tu(){var t=0,e=.5,n=1,r=1,i,o,a,s,c,u=Qt,f,h=!1,l;function p(g){return isNaN(g=+g)?l:(g=.5+((g=+f(g))-o)*(r*g<r*o?s:c),u(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=f(t=+t),o=f(e=+e),a=f(n=+n),s=i===o?0:.5/(o-i),c=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?(u=g,p):u};function d(g){return function(m){var y,x,v;return arguments.length?([y,x,v]=m,u=vg(g,[y,x,v]),p):[u(0),u(.5),u(1)]}}return p.range=d(fn),p.rangeRound=d(Na),p.unknown=function(g){return arguments.length?(l=g,p):l},function(g){return f=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function vb(){var t=mn(tu()(Qt));return t.copy=function(){return yn(t,vb())},Je.apply(t,arguments)}function xb(){var t=Of(tu()).domain([.1,1,10]);return t.copy=function(){return yn(t,xb()).base(t.base())},Je.apply(t,arguments)}function _b(){var t=Gf(tu());return t.copy=function(){return yn(t,_b()).constant(t.constant())},Je.apply(t,arguments)}function Jf(){var t=Bf(tu());return t.copy=function(){return yn(t,Jf()).exponent(t.exponent())},Je.apply(t,arguments)}function Bk(){return Jf.apply(null,arguments).exponent(.5)}function ot(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 Uk=ot("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Yk=ot("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Wk=ot("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),qk=ot("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),Hk=ot("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Xk=ot("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Vk=ot("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),jk=ot("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Zk=ot("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Kk=ot("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Qk=ot("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>ig(t[t.length-1]);var wb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ot);const Jk=bt(wb);var Ab=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ot);const tE=bt(Ab);var Mb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ot);const eE=bt(Mb);var $b=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ot);const nE=bt($b);var Sb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ot);const rE=bt(Sb);var Tb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ot);const iE=bt(Tb);var Db=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ot);const oE=bt(Db);var Pb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ot);const aE=bt(Pb);var kb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ot);const sE=bt(kb);var Eb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ot);const uE=bt(Eb);var Lb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ot);const cE=bt(Lb);var Nb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ot);const lE=bt(Nb);var Rb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ot);const fE=bt(Rb);var Cb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ot);const hE=bt(Cb);var Ib=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ot);const pE=bt(Ib);var Fb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ot);const dE=bt(Fb);var zb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ot);const gE=bt(zb);var Ob=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ot);const mE=bt(Ob);var Gb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ot);const yE=bt(Gb);var Bb=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ot);const bE=bt(Bb);var Ub=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ot);const vE=bt(Ub);var Yb=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ot);const xE=bt(Yb);var Wb=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ot);const _E=bt(Wb);var qb=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ot);const wE=bt(qb);var Hb=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ot);const AE=bt(Hb);var Xb=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ot);const ME=bt(Xb);var Vb=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ot);const $E=bt(Vb);function SE(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 TE=Ca($e(300,.5,0),$e(-240,.5,1));var DE=Ca($e(-100,.75,.35),$e(80,1.5,.8)),PE=Ca($e(260,.75,.35),$e(80,1.5,.8)),eu=$e();function kE(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return eu.h=360*t-100,eu.s=1.5-1.5*e,eu.l=.8-.9*e,eu+""}var nu=Mr(),EE=Math.PI/3,LE=Math.PI*2/3;function NE(t){var e;return t=(.5-t)*Math.PI,nu.r=255*(e=Math.sin(t))*e,nu.g=255*(e=Math.sin(t+EE))*e,nu.b=255*(e=Math.sin(t+LE))*e,nu+""}function RE(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function ru(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const CE=ru(ot("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var IE=ru(ot("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),FE=ru(ot("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),zE=ru(ot("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function it(t){return function(){return t}}const jb=Math.abs,Gt=Math.atan2,on=Math.cos,OE=Math.max,Zr=Math.min,ie=Math.sin,vt=Math.sqrt,Bt=1e-12,bn=Math.PI,iu=bn/2,vn=2*bn;function GE(t){return t>1?0:t<-1?bn:Math.acos(t)}function Zb(t){return t>=1?iu:t<=-1?-iu:Math.asin(t)}function wo(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 Bi(e)}function BE(t){return t.innerRadius}function UE(t){return t.outerRadius}function YE(t){return t.startAngle}function WE(t){return t.endAngle}function qE(t){return t&&t.padAngle}function HE(t,e,n,r,i,o,a,s){var c=n-t,u=r-e,f=a-i,h=s-o,l=h*c-f*u;if(!(l*l<Bt))return l=(f*(e-o)-h*(t-i))/l,[t+l*c,e+l*u]}function ou(t,e,n,r,i,o,a){var s=t-n,c=e-r,u=(a?o:-o)/vt(s*s+c*c),f=u*c,h=-u*s,l=t+f,p=e+h,d=n+f,g=r+h,m=(l+d)/2,y=(p+g)/2,x=d-l,v=g-p,b=x*x+v*v,M=i-o,_=l*g-d*p,$=(v<0?-1:1)*vt(OE(0,M*M*b-_*_)),D=(_*v-x*$)/b,E=(-_*x-v*$)/b,P=(_*v+x*$)/b,T=(-_*x+v*$)/b,C=D-m,N=E-y,A=P-m,S=T-y;return C*C+N*N>A*A+S*S&&(D=P,E=T),{cx:D,cy:E,x01:-f,y01:-h,x11:D*(i/M-1),y11:E*(i/M-1)}}function Kb(){var t=BE,e=UE,n=it(0),r=null,i=YE,o=WE,a=qE,s=null,c=wo(u);function u(){var f,h,l=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-iu,g=o.apply(this,arguments)-iu,m=jb(g-d),y=g>d;if(s||(s=f=c()),p<l&&(h=p,p=l,l=h),!(p>Bt))s.moveTo(0,0);else if(m>vn-Bt)s.moveTo(p*on(d),p*ie(d)),s.arc(0,0,p,d,g,!y),l>Bt&&(s.moveTo(l*on(g),l*ie(g)),s.arc(0,0,l,g,d,y));else{var x=d,v=g,b=d,M=g,_=m,$=m,D=a.apply(this,arguments)/2,E=D>Bt&&(r?+r.apply(this,arguments):vt(l*l+p*p)),P=Zr(jb(p-l)/2,+n.apply(this,arguments)),T=P,C=P,N,A;if(E>Bt){var S=Zb(E/l*ie(D)),w=Zb(E/p*ie(D));(_-=S*2)>Bt?(S*=y?1:-1,b+=S,M-=S):(_=0,b=M=(d+g)/2),($-=w*2)>Bt?(w*=y?1:-1,x+=w,v-=w):($=0,x=v=(d+g)/2)}var k=p*on(x),L=p*ie(x),R=l*on(M),F=l*ie(M);if(P>Bt){var z=p*on(v),Y=p*ie(v),rt=l*on(b),Z=l*ie(b),J;if(m<bn)if(J=HE(k,L,rt,Z,z,Y,R,F)){var ht=k-J[0],q=L-J[1],pt=z-J[0],B=Y-J[1],nt=1/ie(GE((ht*pt+q*B)/(vt(ht*ht+q*q)*vt(pt*pt+B*B)))/2),ut=vt(J[0]*J[0]+J[1]*J[1]);T=Zr(P,(l-ut)/(nt-1)),C=Zr(P,(p-ut)/(nt+1))}else T=C=0}$>Bt?C>Bt?(N=ou(rt,Z,k,L,p,C,y),A=ou(z,Y,R,F,p,C,y),s.moveTo(N.cx+N.x01,N.cy+N.y01),C<P?s.arc(N.cx,N.cy,C,Gt(N.y01,N.x01),Gt(A.y01,A.x01),!y):(s.arc(N.cx,N.cy,C,Gt(N.y01,N.x01),Gt(N.y11,N.x11),!y),s.arc(0,0,p,Gt(N.cy+N.y11,N.cx+N.x11),Gt(A.cy+A.y11,A.cx+A.x11),!y),s.arc(A.cx,A.cy,C,Gt(A.y11,A.x11),Gt(A.y01,A.x01),!y))):(s.moveTo(k,L),s.arc(0,0,p,x,v,!y)):s.moveTo(k,L),!(l>Bt)||!(_>Bt)?s.lineTo(R,F):T>Bt?(N=ou(R,F,z,Y,l,-T,y),A=ou(k,L,rt,Z,l,-T,y),s.lineTo(N.cx+N.x01,N.cy+N.y01),T<P?s.arc(N.cx,N.cy,T,Gt(N.y01,N.x01),Gt(A.y01,A.x01),!y):(s.arc(N.cx,N.cy,T,Gt(N.y01,N.x01),Gt(N.y11,N.x11),!y),s.arc(0,0,l,Gt(N.cy+N.y11,N.cx+N.x11),Gt(A.cy+A.y11,A.cx+A.x11),y),s.arc(A.cx,A.cy,T,Gt(A.y11,A.x11),Gt(A.y01,A.x01),!y))):s.arc(0,0,l,M,b,y)}if(s.closePath(),f)return s=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-bn/2;return[on(h)*f,ie(h)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:it(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:it(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:it(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:it(+f),u):r},u.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:it(+f),u):i},u.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:it(+f),u):o},u.padAngle=function(f){return arguments.length?(a=typeof f=="function"?f:it(+f),u):a},u.context=function(f){return arguments.length?(s=f??null,u):s},u}var XE=Array.prototype.slice;function au(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Qb(t){this._context=t}Qb.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 su(t){return new Qb(t)}function th(t){return t[0]}function eh(t){return t[1]}function uu(t,e){var n=it(!0),r=null,i=su,o=null,a=wo(s);t=typeof t=="function"?t:t===void 0?th:it(t),e=typeof e=="function"?e:e===void 0?eh:it(e);function s(c){var u,f=(c=au(c)).length,h,l=!1,p;for(r==null&&(o=i(p=a())),u=0;u<=f;++u)!(u<f&&n(h=c[u],u,c))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(h,u,c),+e(h,u,c));if(p)return o=null,p+""||null}return s.x=function(c){return arguments.length?(t=typeof c=="function"?c:it(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:it(+c),s):e},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:it(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),s):r},s}function Jb(t,e,n){var r=null,i=it(!0),o=null,a=su,s=null,c=wo(u);t=typeof t=="function"?t:t===void 0?th:it(+t),e=typeof e=="function"?e:it(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?eh:it(+n);function u(h){var l,p,d,g=(h=au(h)).length,m,y=!1,x,v=new Array(g),b=new Array(g);for(o==null&&(s=a(x=c())),l=0;l<=g;++l){if(!(l<g&&i(m=h[l],l,h))===y)if(y=!y)p=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=l-1;d>=p;--d)s.point(v[d],b[d]);s.lineEnd(),s.areaEnd()}y&&(v[l]=+t(m,l,h),b[l]=+e(m,l,h),s.point(r?+r(m,l,h):v[l],n?+n(m,l,h):b[l]))}if(x)return s=null,x+""||null}function f(){return uu().defined(i).curve(a).context(o)}return u.x=function(h){return arguments.length?(t=typeof h=="function"?h:it(+h),r=null,u):t},u.x0=function(h){return arguments.length?(t=typeof h=="function"?h:it(+h),u):t},u.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:it(+h),u):r},u.y=function(h){return arguments.length?(e=typeof h=="function"?h:it(+h),n=null,u):e},u.y0=function(h){return arguments.length?(e=typeof h=="function"?h:it(+h),u):e},u.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:it(+h),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(h){return arguments.length?(i=typeof h=="function"?h:it(!!h),u):i},u.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),u):a},u.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),u):o},u}function VE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function jE(t){return t}function t2(){var t=jE,e=VE,n=null,r=it(0),i=it(vn),o=it(0);function a(s){var c,u=(s=au(s)).length,f,h,l=0,p=new Array(u),d=new Array(u),g=+r.apply(this,arguments),m=Math.min(vn,Math.max(-vn,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/u,o.apply(this,arguments)),v=x*(m<0?-1:1),b;for(c=0;c<u;++c)(b=d[p[c]=c]=+t(s[c],c,s))>0&&(l+=b);for(e!=null?p.sort(function(M,_){return e(d[M],d[_])}):n!=null&&p.sort(function(M,_){return n(s[M],s[_])}),c=0,h=l?(m-u*v)/l:0;c<u;++c,g=y)f=p[c],b=d[f],y=g+(b>0?b*h:0)+v,d[f]={data:s[f],index:c,value:b,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:it(+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:it(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:it(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:it(+s),a):o},a}var e2=nh(su);function n2(t){this._curve=t}n2.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 nh(t){function e(n){return new n2(t(n))}return e._curve=t,e}function Ao(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(nh(n)):e()._curve},t}function r2(){return Ao(uu().curve(e2))}function i2(){var t=Jb().curve(e2),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 Ao(n())},delete t.lineX0,t.lineEndAngle=function(){return Ao(r())},delete t.lineX1,t.lineInnerRadius=function(){return Ao(i())},delete t.lineY0,t.lineOuterRadius=function(){return Ao(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(nh(a)):e()._curve},t}function Mo(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class o2{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 ZE{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=Mo(this._x0,this._y0),i=Mo(this._x0,this._y0=(this._y0+n)/2),o=Mo(e,this._y0),a=Mo(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function a2(t){return new o2(t,!0)}function s2(t){return new o2(t,!1)}function KE(t){return new ZE(t)}function QE(t){return t.source}function JE(t){return t.target}function cu(t){let e=QE,n=JE,r=th,i=eh,o=null,a=null,s=wo(c);function c(){let u;const f=XE.call(arguments),h=e.apply(this,f),l=n.apply(this,f);if(o==null&&(a=t(u=s())),a.lineStart(),f[0]=h,a.point(+r.apply(this,f),+i.apply(this,f)),f[0]=l,a.point(+r.apply(this,f),+i.apply(this,f)),a.lineEnd(),u)return a=null,u+""||null}return c.source=function(u){return arguments.length?(e=u,c):e},c.target=function(u){return arguments.length?(n=u,c):n},c.x=function(u){return arguments.length?(r=typeof u=="function"?u:it(+u),c):r},c.y=function(u){return arguments.length?(i=typeof u=="function"?u:it(+u),c):i},c.context=function(u){return arguments.length?(u==null?o=a=null:a=t(o=u),c):o},c}function tL(){return cu(a2)}function eL(){return cu(s2)}function nL(){const t=cu(KE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const rL=vt(3),u2={draw(t,e){const n=vt(e+Zr(e/28,.75))*.59436,r=n/2,i=r*rL;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},lu={draw(t,e){const n=vt(e/bn);t.moveTo(n,0),t.arc(0,0,n,0,vn)}},c2={draw(t,e){const n=vt(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()}},l2=vt(1/3),iL=l2*2,f2={draw(t,e){const n=vt(e/iL),r=n*l2;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},h2={draw(t,e){const n=vt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},p2={draw(t,e){const n=vt(e-Zr(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},d2={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},g2={draw(t,e){const n=vt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},oL=.8908130915292852,m2=ie(bn/10)/ie(7*bn/10),aL=ie(vn/10)*m2,sL=-on(vn/10)*m2,y2={draw(t,e){const n=vt(e*oL),r=aL*n,i=sL*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=vn*o/5,s=on(a),c=ie(a);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},rh=vt(3),b2={draw(t,e){const n=-vt(e/(rh*3));t.moveTo(0,n*2),t.lineTo(-rh*n,-n),t.lineTo(rh*n,-n),t.closePath()}},uL=vt(3),v2={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*uL/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},de=-.5,ge=vt(3)/2,ih=1/vt(12),cL=(ih/2+1)*3,x2={draw(t,e){const n=vt(e/cL),r=n/2,i=n*ih,o=r,a=n*ih+n,s=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,c),t.lineTo(de*r-ge*i,ge*r+de*i),t.lineTo(de*o-ge*a,ge*o+de*a),t.lineTo(de*s-ge*c,ge*s+de*c),t.lineTo(de*r+ge*i,de*i-ge*r),t.lineTo(de*o+ge*a,de*a-ge*o),t.lineTo(de*s+ge*c,de*c-ge*s),t.closePath()}},oh={draw(t,e){const n=vt(e-Zr(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},_2=[lu,c2,f2,d2,y2,b2,x2],lL=[lu,p2,oh,v2,u2,g2,h2];function fL(t,e){let n=null,r=wo(i);t=typeof t=="function"?t:it(t||lu),e=typeof e=="function"?e:it(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:it(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:it(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function xn(){}function fu(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 hu(t){this._context=t}hu.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:fu(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:fu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function hL(t){return new hu(t)}function w2(t){this._context=t}w2.prototype={areaStart:xn,areaEnd:xn,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:fu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function pL(t){return new w2(t)}function A2(t){this._context=t}A2.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:fu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function dL(t){return new A2(t)}function M2(t,e){this._basis=new hu(t),this._beta=e}M2.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,c;++s<=n;)c=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+c*o),this._beta*e[s]+(1-this._beta)*(i+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const gL=function t(e){function n(r){return e===1?new hu(r):new M2(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function pu(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 ah(t,e){this._context=t,this._k=(1-e)/6}ah.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:pu(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:pu(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 mL=function t(e){function n(r){return new ah(r,e)}return n.tension=function(r){return t(+r)},n}(0);function sh(t,e){this._context=t,this._k=(1-e)/6}sh.prototype={areaStart:xn,areaEnd:xn,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:pu(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 yL=function t(e){function n(r){return new sh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function uh(t,e){this._context=t,this._k=(1-e)/6}uh.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:pu(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 bL=function t(e){function n(r){return new uh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function ch(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,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Bt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/f,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function $2(t,e){this._context=t,this._alpha=e}$2.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:ch(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 vL=function t(e){function n(r){return e?new $2(r,e):new ah(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function S2(t,e){this._context=t,this._alpha=e}S2.prototype={areaStart:xn,areaEnd:xn,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:ch(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 xL=function t(e){function n(r){return e?new S2(r,e):new sh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function T2(t,e){this._context=t,this._alpha=e}T2.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:ch(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 _L=function t(e){function n(r){return e?new T2(r,e):new uh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function D2(t){this._context=t}D2.prototype={areaStart:xn,areaEnd:xn,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 wL(t){return new D2(t)}function P2(t){return t<0?-1:1}function k2(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(P2(o)+P2(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function E2(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function lh(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 du(t){this._context=t}du.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:lh(this,this._t0,E2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,lh(this,E2(this,n=k2(this,t,e)),n);break;default:lh(this,this._t0,n=k2(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function L2(t){this._context=new N2(t)}(L2.prototype=Object.create(du.prototype)).point=function(t,e){du.prototype.point.call(this,e,t)};function N2(t){this._context=t}N2.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 AL(t){return new du(t)}function ML(t){return new L2(t)}function R2(t){this._context=t}R2.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=C2(t),i=C2(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 C2(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 $L(t){return new R2(t)}function gu(t,e){this._context=t,this._t=e}gu.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 SL(t){return new gu(t,.5)}function TL(t){return new gu(t,0)}function DL(t){return new gu(t,1)}function Kr(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 Qr(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function PL(t,e){return t[e]}function kL(t){const e=[];return e.key=t,e}function EL(){var t=it([]),e=Qr,n=Kr,r=PL;function i(o){var a=Array.from(t.apply(this,arguments),kL),s,c=a.length,u=-1,f;for(const h of o)for(s=0,++u;s<c;++s)(a[s][u]=[0,+r(h,a[s].key,u,o)]).data=h;for(s=0,f=au(e(a));s<c;++s)a[f[s]].index=s;return n(a,f),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:it(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:it(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?Qr:typeof o=="function"?o:it(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??Kr,i):n},i}function LL(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}Kr(t,e)}}function NL(t,e){if((c=t.length)>0)for(var n,r=0,i,o,a,s,c,u=t[e[0]].length;r<u;++r)for(a=s=0,n=0;n<c;++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 RL(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}Kr(t,e)}}function CL(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,c=0,u=0;s<a;++s){for(var f=t[e[s]],h=f[r][1]||0,l=f[r-1][1]||0,p=(h-l)/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}c+=h,u+=p*h}i[r-1][1]+=i[r-1][0]=n,c&&(n-=u/c)}i[r-1][1]+=i[r-1][0]=n,Kr(t,e)}}function I2(t){var e=t.map(IL);return Qr(t).sort(function(n,r){return e[n]-e[r]})}function IL(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 F2(t){var e=t.map(z2);return Qr(t).sort(function(n,r){return e[n]-e[r]})}function z2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function FL(t){return F2(t).reverse()}function zL(t){var e=t.length,n,r,i=t.map(z2),o=I2(t),a=0,s=0,c=[],u=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],c.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(c)}function OL(t){return Qr(t).reverse()}const mu=t=>()=>t;function GL(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 Be(t,e,n){this.k=t,this.x=e,this.y=n}Be.prototype={constructor:Be,scale:function(t){return t===1?this:new Be(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Be(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 yu=new Be(1,0,0);O2.prototype=Be.prototype;function O2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return yu;return t.__zoom}function fh(t){t.stopImmediatePropagation()}function $o(t){t.preventDefault(),t.stopImmediatePropagation()}function BL(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function UL(){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 G2(){return this.__zoom||yu}function YL(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function WL(){return navigator.maxTouchPoints||"ontouchstart"in this}function qL(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 B2(){var t=BL,e=UL,n=qL,r=YL,i=WL,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=gg,u=Ln("start","zoom","end"),f,h,l,p=500,d=150,g=0,m=10;function y(A){A.property("__zoom",G2).on("wheel.zoom",D,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",P).filter(i).on("touchstart.zoom",T).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,S,w,k){var L=A.selection?A.selection():A;L.property("__zoom",G2),A!==L?M(A,S,w,k):L.interrupt().each(function(){_(this,arguments).event(k).start().zoom(null,typeof S=="function"?S.apply(this,arguments):S).end()})},y.scaleBy=function(A,S,w,k){y.scaleTo(A,function(){var L=this.__zoom.k,R=typeof S=="function"?S.apply(this,arguments):S;return L*R},w,k)},y.scaleTo=function(A,S,w,k){y.transform(A,function(){var L=e.apply(this,arguments),R=this.__zoom,F=w==null?b(L):typeof w=="function"?w.apply(this,arguments):w,z=R.invert(F),Y=typeof S=="function"?S.apply(this,arguments):S;return n(v(x(R,Y),F,z),L,a)},w,k)},y.translateBy=function(A,S,w,k){y.transform(A,function(){return n(this.__zoom.translate(typeof S=="function"?S.apply(this,arguments):S,typeof w=="function"?w.apply(this,arguments):w),e.apply(this,arguments),a)},null,k)},y.translateTo=function(A,S,w,k,L){y.transform(A,function(){var R=e.apply(this,arguments),F=this.__zoom,z=k==null?b(R):typeof k=="function"?k.apply(this,arguments):k;return n(yu.translate(z[0],z[1]).scale(F.k).translate(typeof S=="function"?-S.apply(this,arguments):-S,typeof w=="function"?-w.apply(this,arguments):-w),R,a)},k,L)};function x(A,S){return S=Math.max(o[0],Math.min(o[1],S)),S===A.k?A:new Be(S,A.x,A.y)}function v(A,S,w){var k=S[0]-w[0]*A.k,L=S[1]-w[1]*A.k;return k===A.x&&L===A.y?A:new Be(A.k,k,L)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function M(A,S,w,k){A.on("start.zoom",function(){_(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(k).end()}).tween("zoom",function(){var L=this,R=arguments,F=_(L,R).event(k),z=e.apply(L,R),Y=w==null?b(z):typeof w=="function"?w.apply(L,R):w,rt=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),Z=L.__zoom,J=typeof S=="function"?S.apply(L,R):S,ht=c(Z.invert(Y).concat(rt/Z.k),J.invert(Y).concat(rt/J.k));return function(q){if(q===1)q=J;else{var pt=ht(q),B=rt/pt[2];q=new Be(B,Y[0]-pt[0]*B,Y[1]-pt[1]*B)}F.zoom(null,q)}})}function _(A,S,w){return!w&&A.__zooming||new $(A,S)}function $(A,S){this.that=A,this.args=S,this.active=0,this.sourceEvent=null,this.extent=e.apply(A,S),this.taps=0}$.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,S){return this.mouse&&A!=="mouse"&&(this.mouse[1]=S.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=S.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=S.invert(this.touch1[0])),this.that.__zoom=S,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var S=K(this.that).datum();u.call(A,this.that,new GL(A,{sourceEvent:this.sourceEvent,target:y,type:A,transform:this.that.__zoom,dispatch:u}),S)}};function D(A,...S){if(!t.apply(this,arguments))return;var w=_(this,S).event(A),k=this.__zoom,L=Math.max(o[0],Math.min(o[1],k.k*Math.pow(2,r.apply(this,arguments)))),R=ae(A);if(w.wheel)(w.mouse[0][0]!==R[0]||w.mouse[0][1]!==R[1])&&(w.mouse[1]=k.invert(w.mouse[0]=R)),clearTimeout(w.wheel);else{if(k.k===L)return;w.mouse=[R,k.invert(R)],Gn(this),w.start()}$o(A),w.wheel=setTimeout(F,d),w.zoom("mouse",n(v(x(k,L),w.mouse[0],w.mouse[1]),w.extent,a));function F(){w.wheel=null,w.end()}}function E(A,...S){if(l||!t.apply(this,arguments))return;var w=A.currentTarget,k=_(this,S,!0).event(A),L=K(A.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",rt,!0),R=ae(A,w),F=A.clientX,z=A.clientY;xa(A.view),fh(A),k.mouse=[R,this.__zoom.invert(R)],Gn(this),k.start();function Y(Z){if($o(Z),!k.moved){var J=Z.clientX-F,ht=Z.clientY-z;k.moved=J*J+ht*ht>g}k.event(Z).zoom("mouse",n(v(k.that.__zoom,k.mouse[0]=ae(Z,w),k.mouse[1]),k.extent,a))}function rt(Z){L.on("mousemove.zoom mouseup.zoom",null),_a(Z.view,k.moved),$o(Z),k.event(Z).end()}}function P(A,...S){if(t.apply(this,arguments)){var w=this.__zoom,k=ae(A.changedTouches?A.changedTouches[0]:A,this),L=w.invert(k),R=w.k*(A.shiftKey?.5:2),F=n(v(x(w,R),k,L),e.apply(this,S),a);$o(A),s>0?K(this).transition().duration(s).call(M,F,k,A):K(this).call(y.transform,F,k,A)}}function T(A,...S){if(t.apply(this,arguments)){var w=A.touches,k=w.length,L=_(this,S,A.changedTouches.length===k).event(A),R,F,z,Y;for(fh(A),F=0;F<k;++F)z=w[F],Y=ae(z,this),Y=[Y,this.__zoom.invert(Y),z.identifier],L.touch0?!L.touch1&&L.touch0[2]!==Y[2]&&(L.touch1=Y,L.taps=0):(L.touch0=Y,R=!0,L.taps=1+!!f);f&&(f=clearTimeout(f)),R&&(L.taps<2&&(h=Y[0],f=setTimeout(function(){f=null},p)),Gn(this),L.start())}}function C(A,...S){if(this.__zooming){var w=_(this,S).event(A),k=A.changedTouches,L=k.length,R,F,z,Y;for($o(A),R=0;R<L;++R)F=k[R],z=ae(F,this),w.touch0&&w.touch0[2]===F.identifier?w.touch0[0]=z:w.touch1&&w.touch1[2]===F.identifier&&(w.touch1[0]=z);if(F=w.that.__zoom,w.touch1){var rt=w.touch0[0],Z=w.touch0[1],J=w.touch1[0],ht=w.touch1[1],q=(q=J[0]-rt[0])*q+(q=J[1]-rt[1])*q,pt=(pt=ht[0]-Z[0])*pt+(pt=ht[1]-Z[1])*pt;F=x(F,Math.sqrt(q/pt)),z=[(rt[0]+J[0])/2,(rt[1]+J[1])/2],Y=[(Z[0]+ht[0])/2,(Z[1]+ht[1])/2]}else if(w.touch0)z=w.touch0[0],Y=w.touch0[1];else return;w.zoom("touch",n(v(F,z,Y),w.extent,a))}}function N(A,...S){if(this.__zooming){var w=_(this,S).event(A),k=A.changedTouches,L=k.length,R,F;for(fh(A),l&&clearTimeout(l),l=setTimeout(function(){l=null},p),R=0;R<L;++R)F=k[R],w.touch0&&w.touch0[2]===F.identifier?delete w.touch0:w.touch1&&w.touch1[2]===F.identifier&&delete w.touch1;if(w.touch1&&!w.touch0&&(w.touch0=w.touch1,delete w.touch1),w.touch0)w.touch0[1]=this.__zoom.invert(w.touch0[0]);else if(w.end(),w.taps===2&&(F=ae(F,this),Math.hypot(h[0]-F[0],h[1]-F[1])<m)){var z=K(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return y.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:mu(+A),y):r},y.filter=function(A){return arguments.length?(t=typeof A=="function"?A:mu(!!A),y):t},y.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:mu(!!A),y):i},y.extent=function(A){return arguments.length?(e=typeof A=="function"?A:mu([[+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?(c=A,y):c},y.on=function(){var A=u.on.apply(u,arguments);return A===u?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 U2=Object.freeze(Object.defineProperty({__proto__:null,Adder:kt,Delaunay:wl,FormatSpecifier:es,InternMap:_i,InternSet:Pn,Node:Zn,Path:Bi,Voronoi:r1,ZoomTransform:Be,active:VM,arc:Kb,area:Jb,areaRadial:i2,ascending:xt,autoType:bS,axisBottom:G8,axisLeft:Ac,axisRight:O8,axisTop:yd,bin:sd,bisect:Dn,bisectCenter:C6,bisectLeft:R6,bisectRight:Hp,bisector:aa,blob:_S,blur:I6,blur2:Xp,blurImage:F6,brush:s$,brushSelection:i$,brushX:o$,brushY:a$,buffer:AS,chord:c$,chordDirected:f$,chordTranspose:l$,cluster:CT,color:ln,contourDensity:F$,contours:yl,count:ua,create:_A,creator:ya,cross:W6,csv:SS,csvFormat:sS,csvFormatBody:uS,csvFormatRow:lS,csvFormatRows:cS,csvFormatValue:fS,csvParse:s1,csvParseRows:aS,cubehelix:$e,cumsum:q6,curveBasis:hL,curveBasisClosed:pL,curveBasisOpen:dL,curveBumpX:a2,curveBumpY:s2,curveBundle:gL,curveCardinal:mL,curveCardinalClosed:yL,curveCardinalOpen:bL,curveCatmullRom:vL,curveCatmullRomClosed:xL,curveCatmullRomOpen:_L,curveLinear:su,curveLinearClosed:wL,curveMonotoneX:AL,curveMonotoneY:ML,curveNatural:$L,curveStep:SL,curveStepAfter:DL,curveStepBefore:TL,descending:Wp,deviation:Zp,difference:T8,disjoint:D8,dispatch:Ln,drag:Pd,dragDisable:xa,dragEnable:_a,dsv:$S,dsvFormat:Ka,easeBack:Fg,easeBackIn:GM,easeBackInOut:Fg,easeBackOut:BM,easeBounce:Oi,easeBounceIn:zM,easeBounceInOut:OM,easeBounceOut:Oi,easeCircle:Ig,easeCircleIn:DM,easeCircleInOut:Ig,easeCircleOut:PM,easeCubic:zi,easeCubicIn:xM,easeCubicInOut:zi,easeCubicOut:_M,easeElastic:Wa,easeElasticIn:UM,easeElasticInOut:YM,easeElasticOut:Wa,easeExp:Cg,easeExpIn:SM,easeExpInOut:Cg,easeExpOut:TM,easeLinear:yM,easePoly:Eg,easePolyIn:wM,easePolyInOut:Eg,easePolyOut:AM,easeQuad:kg,easeQuadIn:bM,easeQuadInOut:kg,easeQuadOut:vM,easeSin:Rg,easeSinIn:MM,easeSinInOut:Rg,easeSinOut:$M,every:_8,extent:xi,fcumsum:X6,filter:A8,flatGroup:V6,flatRollup:j6,forceCenter:RS,forceCollide:h1,forceLink:t9,forceManyBody:m1,forceRadial:u9,forceSimulation:g1,forceX:y1,forceY:b1,get format(){return qi},formatDefaultLocale:S1,formatLocale:$1,get formatPrefix(){return Dl},formatSpecifier:Ir,fsum:H6,geoAlbers:Gm,geoAlbersUsa:pT,geoArea:b9,geoAzimuthalEqualArea:dT,geoAzimuthalEqualAreaRaw:df,geoAzimuthalEquidistant:gT,geoAzimuthalEquidistantRaw:gf,geoBounds:w9,geoCentroid:D9,geoCircle:P9,geoClipAntimeridian:Hl,geoClipCircle:um,geoClipExtent:I9,geoClipRectangle:As,geoConicConformal:yT,geoConicConformalRaw:Ym,geoConicEqualArea:Cs,geoConicEqualAreaRaw:Om,geoConicEquidistant:vT,geoConicEquidistantRaw:Wm,geoContains:Y9,geoDistance:Ss,geoEqualEarth:_T,geoEqualEarthRaw:mf,geoEquirectangular:bT,geoEquirectangularRaw:so,geoGnomonic:wT,geoGnomonicRaw:yf,geoGraticule:bm,geoGraticule10:W9,geoIdentity:AT,geoInterpolate:q9,geoLength:cm,geoMercator:mT,geoMercatorRaw:ao,geoNaturalEarth1:MT,geoNaturalEarth1Raw:bf,geoOrthographic:$T,geoOrthographicRaw:vf,geoPath:rT,geoProjection:ze,geoProjectionMutator:hf,geoRotation:tm,geoStereographic:ST,geoStereographicRaw:xf,geoStream:Te,geoTransform:iT,geoTransverseMercator:TT,geoTransverseMercatorRaw:_f,gray:BA,greatest:ud,greatestIndex:g8,group:td,groupSort:Q6,groups:ed,hcl:Pa,hierarchy:wf,histogram:sd,hsl:$a,html:LS,image:DS,index:Z6,indexes:K6,interpolate:fn,interpolateArray:XA,interpolateBasis:tg,interpolateBasisClosed:eg,interpolateBlues:xE,interpolateBrBG:Jk,interpolateBuGn:uE,interpolateBuPu:cE,interpolateCividis:SE,interpolateCool:PE,interpolateCubehelix:u7,interpolateCubehelixDefault:TE,interpolateCubehelixLong:Ca,interpolateDate:sg,interpolateDiscrete:ZA,interpolateGnBu:lE,interpolateGreens:_E,interpolateGreys:wE,interpolateHcl:a7,interpolateHclLong:s7,interpolateHsl:r7,interpolateHslLong:i7,interpolateHue:KA,interpolateInferno:FE,interpolateLab:o7,interpolateMagma:IE,interpolateNumber:ce,interpolateNumberArray:Uc,interpolateObject:ug,interpolateOrRd:fE,interpolateOranges:$E,interpolatePRGn:tE,interpolatePiYG:eE,interpolatePlasma:zE,interpolatePuBu:pE,interpolatePuBuGn:hE,interpolatePuOr:nE,interpolatePuRd:dE,interpolatePurples:AE,interpolateRainbow:kE,interpolateRdBu:rE,interpolateRdGy:iE,interpolateRdPu:gE,interpolateRdYlBu:oE,interpolateRdYlGn:aE,interpolateReds:ME,interpolateRgb:Ei,interpolateRgbBasis:ig,interpolateRgbBasisClosed:HA,interpolateRound:Na,interpolateSinebow:NE,interpolateSpectral:sE,interpolateString:qc,interpolateTransformCss:hg,interpolateTransformSvg:pg,interpolateTurbo:RE,interpolateViridis:CE,interpolateWarm:DE,interpolateYlGn:yE,interpolateYlGnBu:mE,interpolateYlOrBr:bE,interpolateYlOrRd:vE,interpolateZoom:gg,interrupt:Gn,intersection:P8,interval:p7,isoFormat:Lk,isoParse:Ck,json:kS,lab:Da,lch:UA,least:d8,leastIndex:fd,line:uu,lineRadial:r2,link:cu,linkHorizontal:tL,linkRadial:nL,linkVertical:eL,local:Td,map:M8,matcher:Tc,max:wi,maxIndex:vc,mean:a8,median:s8,medianIndex:u8,merge:_c,min:fa,minIndex:xc,mode:l8,namespace:Si,namespaces:$c,nice:yc,now:Ii,pack:fD,packEnclose:oD,packSiblings:cD,pairs:f8,partition:hD,path:ml,pathRound:d$,permute:ad,pie:t2,piecewise:vg,pointRadial:Mo,pointer:ae,pointers:AA,polygonArea:DD,polygonCentroid:PD,polygonContains:ND,polygonHull:LD,polygonLength:RD,precisionFixed:T1,precisionPrefix:D1,precisionRound:P1,quadtree:Ja,quantile:Mi,quantileIndex:ld,quantileSorted:cd,quantize:c7,quickselect:ha,radialArea:i2,radialLine:r2,randomBates:zD,randomBernoulli:BD,randomBeta:hy,randomBinomial:py,randomCauchy:YD,randomExponential:OD,randomGamma:Ef,randomGeometric:fy,randomInt:ID,randomIrwinHall:ly,randomLcg:VD,randomLogNormal:FD,randomLogistic:WD,randomNormal:kf,randomPareto:GD,randomPoisson:qD,randomUniform:CD,randomWeibull:UD,range:un,rank:p8,reduce:$8,reverse:S8,rgb:Mr,ribbon:w$,ribbonArrow:A$,rollup:rd,rollups:id,scaleBand:Rf,scaleDiverging:vb,scaleDivergingLog:xb,scaleDivergingPow:Jf,scaleDivergingSqrt:Bk,scaleDivergingSymlog:_b,scaleIdentity:by,scaleImplicit:Lf,scaleLinear:zf,scaleLog:Ay,scaleOrdinal:Nf,scalePoint:Cf,scalePow:qs,scaleQuantile:ky,scaleQuantize:Ey,scaleRadial:Py,scaleSequential:gb,scaleSequentialLog:mb,scaleSequentialPow:Qf,scaleSequentialQuantile:bb,scaleSequentialSqrt:Gk,scaleSequentialSymlog:yb,scaleSqrt:aP,scaleSymlog:Sy,scaleThreshold:Ly,scaleTime:zk,scaleUtc:Ok,scan:m8,schemeAccent:Yk,schemeBlues:Yb,schemeBrBG:wb,schemeBuGn:Eb,schemeBuPu:Lb,schemeCategory10:Uk,schemeDark2:Wk,schemeGnBu:Nb,schemeGreens:Wb,schemeGreys:qb,schemeObservable10:qk,schemeOrRd:Rb,schemeOranges:Vb,schemePRGn:Ab,schemePaired:Hk,schemePastel1:Xk,schemePastel2:Vk,schemePiYG:Mb,schemePuBu:Ib,schemePuBuGn:Cb,schemePuOr:$b,schemePuRd:Fb,schemePurples:Hb,schemeRdBu:Sb,schemeRdGy:Tb,schemeRdPu:zb,schemeRdYlBu:Db,schemeRdYlGn:Pb,schemeReds:Xb,schemeSet1:jk,schemeSet2:Zk,schemeSet3:Kk,schemeSpectral:kb,schemeTableau10:Qk,schemeYlGn:Gb,schemeYlGnBu:Ob,schemeYlOrBr:Bb,schemeYlOrRd:Ub,select:K,selectAll:MA,selection:Rn,selector:ba,selectorAll:Sc,shuffle:y8,shuffler:hd,some:w8,sort:dc,stack:EL,stackOffsetDiverging:NL,stackOffsetExpand:LL,stackOffsetNone:Kr,stackOffsetSilhouette:RL,stackOffsetWiggle:CL,stackOrderAppearance:I2,stackOrderAscending:F2,stackOrderDescending:FL,stackOrderInsideOut:zL,stackOrderNone:Qr,stackOrderReverse:OL,stratify:mD,style:Nn,subset:E8,sum:b8,superset:dd,svg:NS,symbol:fL,symbolAsterisk:u2,symbolCircle:lu,symbolCross:c2,symbolDiamond:f2,symbolDiamond2:h2,symbolPlus:p2,symbolSquare:d2,symbolSquare2:g2,symbolStar:y2,symbolTimes:oh,symbolTriangle:b2,symbolTriangle2:v2,symbolWye:x2,symbolX:oh,symbols:_2,symbolsFill:_2,symbolsStroke:lL,text:Qa,thresholdFreedmanDiaconis:i8,thresholdScott:o8,thresholdSturges:bc,tickFormat:yy,tickIncrement:En,tickStep:la,ticks:kn,timeDay:Hr,timeDays:hP,get timeFormat(){return jf},timeFormatDefaultLocale:pb,timeFormatLocale:Ky,timeFriday:zy,timeFridays:vP,timeHour:Vs,timeHours:lP,timeInterval:Tt,timeMillisecond:qr,timeMilliseconds:Ny,timeMinute:Hs,timeMinutes:uP,timeMonday:yo,timeMondays:gP,timeMonth:Zs,timeMonths:TP,get timeParse(){return hb},timeSaturday:Oy,timeSaturdays:xP,timeSecond:rn,timeSeconds:Cy,timeSunday:Xr,timeSundays:Gy,timeThursday:Jn,timeThursdays:bP,timeTickInterval:Zy,timeTicks:jy,timeTuesday:Iy,timeTuesdays:mP,timeWednesday:Fy,timeWednesdays:yP,timeWeek:Xr,timeWeeks:Gy,timeYear:Oe,timeYears:PP,timeout:Vc,timer:Oa,timerFlush:wg,transition:Dg,transpose:pd,tree:AD,treemap:MD,treemapBinary:$D,treemapDice:po,treemapResquarify:TD,treemapSlice:Us,treemapSliceDice:SD,treemapSquarify:uy,tsv:TS,tsvFormat:pS,tsvFormatBody:dS,tsvFormatRow:mS,tsvFormatRows:gS,tsvFormatValue:yS,tsvParse:u1,tsvParseRows:hS,union:L8,unixDay:Hf,unixDays:dP,utcDay:mo,utcDays:pP,get utcFormat(){return Qs},utcFriday:Yy,utcFridays:$P,utcHour:js,utcHours:fP,utcMillisecond:qr,utcMilliseconds:Ny,utcMinute:Xs,utcMinutes:cP,utcMonday:bo,utcMondays:_P,utcMonth:Ks,utcMonths:DP,get utcParse(){return Zf},utcSaturday:Wy,utcSaturdays:SP,utcSecond:rn,utcSeconds:Cy,utcSunday:Vr,utcSundays:qy,utcThursday:er,utcThursdays:MP,utcTickInterval:Vy,utcTicks:Xy,utcTuesday:By,utcTuesdays:wP,utcWednesday:Uy,utcWednesdays:AP,utcWeek:Vr,utcWeeks:qy,utcYear:Ge,utcYears:kP,variance:jp,window:Dc,xml:ES,zip:x8,zoom:B2,zoomIdentity:yu,zoomTransform:O2},Symbol.toStringTag,{value:"Module"}));function Y2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function HL(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 Jr(t){return t.substring(0,4)!=="ease"?zi:U2[t]??zi}function bu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=zf().domain([0,1]).range([0,t/2]),a=o(n);return Kb().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const vu=(t,e)=>e instanceof Function?e(t):qi(e)(t);function W2(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 q2(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 XL(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return q2(e)}function Dt(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 VL(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]}function hh({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 ft(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function ti(t,e){const r=Math.random().toString(36).substr(2,5);return ft(t,e,r)}function H2({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r}){const i=new lt,o=new at(a=>{W({dataFormatter:t,computedData:n}).pipe(I(i),U(async s=>s)).subscribe(s=>{const u=s.computedData[0]?s.computedData[0].length-1:0,f=s.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.groupAxis.scalePadding:s.dataFormatter.groupAxis.scaleDomain[0]-s.dataFormatter.groupAxis.scalePadding,h=s.dataFormatter.groupAxis.scaleDomain[1]==="auto"?u+s.dataFormatter.groupAxis.scalePadding:s.dataFormatter.groupAxis.scaleDomain[1]+s.dataFormatter.groupAxis.scalePadding,p=(s.dataFormatter.grid.seriesType==="row"?(s.computedData[0]??[]).map(d=>d.groupLabel):s.computedData.map(d=>d[0].groupLabel)).filter((d,g)=>g>=f&&g<=h);a.next(p)})});return new at(a=>{W({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(I(i),U(async s=>s)).subscribe(s=>{const c=s.dataFormatter.valueAxis.position==="right"||s.dataFormatter.valueAxis.position==="bottom",u=k6({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:c}),f=l=>s.dataFormatter.groupAxis.position==="bottom"||s.dataFormatter.groupAxis.position==="top"?l.offsetX-s.fullChartParams.padding.left:l.offsetY-s.fullChartParams.padding.top,h=l=>{const p=f(l),d=u(p);return{groupIndex:d,groupLabel:s.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})}const X2="Lines",jL=ft(X2,"g"),ZL=ft(X2,"path");function KL(t="curveLinear"){return uu().x(e=>e.axisX).y(e=>e.axisY).curve(U2[t])}function QL(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 JL({selection:t,segmentData:e,linePath:n,params:r}){return t.selectAll("path").data(e,(o,a)=>o.length?`${o[0].id}_${o[o.length-1].id}`:a).join(o=>o.append("path").classed(ZL,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),o=>o,o=>o.remove()).attr("stroke-width",r.lineWidth).attr("stroke",(o,a)=>o[0]&&o[0].color).attr("d",o=>n(o))}function tN({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?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function eN({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)=>{K(a[o]).selectAll("rect").data([i]).join(s=>{const c=s.append("rect");return c.transition().duration(n).ease(Jr(r)).tween("tween",(u,f,h)=>l=>{const p=u.width*l;c.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),c},s=>s.attr("x",0).attr("y",0).attr("width",c=>c.width).attr("height",c=>c.height),s=>s.remove())})}const V2=(t,{selection:e,computedData$:n,SeriesDataMap$:r,GroupDataMap$:i,fullParams$:o,fullDataFormatter$:a,fullChartParams$:s,gridAxesTransform$:c,gridGraphicTransform$:u,gridAxesSize$:f,gridHighlight$:h,event$:l})=>{const p=new lt,d=ti(t,"clipPath-box"),g=e.append("g").attr("clip-path",`url(#${d})`),m=g.append("defs"),y=g.append("g"),x=new lt;c.pipe(I(p),G(T=>T.value),tt()).subscribe(T=>{g.style("transform",T)}),u.pipe(I(p),G(T=>T.value),tt()).subscribe(T=>{y.transition().duration(50).style("transform",T)});const v=new at(T=>{const C=o.pipe(I(p)).subscribe(N=>{if(!N)return;const A=KL(N.lineCurve);T.next(A)});return()=>{C.unsubscribe()}}),b=new at(T=>{n.pipe(I(p),U(async C=>C)).subscribe(C=>{const N=C[0]&&C[0][0]?C.map(A=>A[0].seriesLabel):[];T.next(N)})}),M=s.pipe(G(T=>T.transitionDuration),tt()),_=s.pipe(G(T=>T.transitionEase),tt());W({seriesLabels:b,axisSize:f,transitionDuration:M,transitionEase:_}).pipe(I(p),U(async T=>T)).subscribe(T=>{const N=[{id:d,width:T.axisSize.width,height:T.axisSize.height}].concat(T.seriesLabels.map(A=>({id:`orbcharts__clipPath_${A}`,width:T.axisSize.width,height:T.axisSize.height})));eN({defsSelection:m,clipPathData:N,transitionDuration:T.transitionDuration,transitionEase:T.transitionEase})});const $=n.pipe(G(T=>{const C=new Map;return T.flat().forEach(N=>C.set(N.id,N)),C})),D=H2({fullDataFormatter$:a,gridAxesSize$:f,computedData$:n,fullChartParams$:s}),E=s.pipe(I(p),G(T=>T.highlightTarget),tt());W({seriesLabels:b,computedData:n,SeriesDataMap:r,GroupDataMap:i,linePath:v,params:o,highlightTarget:E,gridGroupPositionFn:D}).pipe(I(p),U(async T=>T)).subscribe(T=>{const C=y.selectAll("g").data(T.seriesLabels,(S,w)=>S),N=C.enter().append("g").classed(jL,!0);C.exit().remove();const A=C.merge(N).attr("clip-path",(S,w)=>`url(#orbcharts__clipPath_${S})`);A.each((S,w,k)=>{const L=QL(T.computedData[w]??[]);JL({selection:K(k[w]),linePath:T.linePath,segmentData:L,params:T.params}).on("mouseover",(F,z)=>{F.stopPropagation();const Y=z[0]?z[0].seriesLabel:"",{groupIndex:rt,groupLabel:Z}=T.gridGroupPositionFn(F),q=T.GroupDataMap.get(Z).find(pt=>pt.seriesLabel===Y)??z[0];l.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:T.highlightTarget,datum:q,series:T.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:T.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:F,data:T.computedData})}).on("mousemove",(F,z)=>{F.stopPropagation();const Y=z[0]?z[0].seriesLabel:"",{groupIndex:rt,groupLabel:Z}=T.gridGroupPositionFn(F),q=T.GroupDataMap.get(Z).find(pt=>pt.seriesLabel===Y)??z[0];l.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:T.highlightTarget,datum:q,series:T.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:T.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:F,data:T.computedData})}).on("mouseout",(F,z)=>{F.stopPropagation();const Y=z[0]?z[0].seriesLabel:"",{groupIndex:rt,groupLabel:Z}=T.gridGroupPositionFn(F),q=T.GroupDataMap.get(Z).find(pt=>pt.seriesLabel===Y)??z[0];l.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:T.highlightTarget,datum:q,series:T.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:T.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:F,data:T.computedData})}).on("click",(F,z)=>{F.stopPropagation();const Y=z[0]?z[0].seriesLabel:"",{groupIndex:rt,groupLabel:Z}=T.gridGroupPositionFn(F),q=T.GroupDataMap.get(Z).find(pt=>pt.seriesLabel===Y)??z[0];l.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:T.highlightTarget,datum:q,series:T.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:T.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:F,data:T.computedData})})}),x.next(A)});const P=h.subscribe();return s.pipe(I(p),Lo(T=>T.highlightTarget==="series"),U(T=>W({graphicSelection:x,highlight:h,DataMap:$,fullChartParams:s}).pipe(I(p),U(async C=>C)))).subscribe(T=>{const C=T.DataMap.get(T.highlight[0]);tN({selection:T.graphicSelection,seriesLabel:C&&C.seriesLabel?C.seriesLabel:null,fullChartParams:T.fullChartParams})}),()=>{p.next(void 0),P.unsubscribe()}},j2="Lines",nN=we(j2,rr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=V2(j2,{selection:t,computedData$:n.computedData$,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$,event$:r.event$});return()=>{i.next(void 0),o()}}),Z2="Bars",K2=ft(Z2,"g"),Q2=ft(Z2,"rect"),J2=.3;function rN({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 iN(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Cf().domain(e).range([-i/2+r,i/2-r])}function oN(t,e){return t<=1?0:e/(t-1)*J2}function aN(t,e){return t<=1?e:e*(1-J2)}function sN({selection:t,data:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:c,delayGroup:u,transitionItem:f}){const h=s/2;return t.selectAll(`g.${K2}`).data(e,(d,g)=>r[g]).join(d=>d.append("g").classed(K2,!0).attr("cursor","pointer"),d=>d,d=>d.remove()).attr("transform",(d,g)=>`translate(${d[0]?d[0].axisX:0}, 0)`).each((d,g,m)=>{K(m[g]).selectAll("rect").data(d,y=>y.id).join(y=>y.append("rect").classed(Q2,!0).attr("height",x=>0),y=>y,y=>y.remove()).attr("fill",y=>y.color).attr("y",y=>y.axisY<n?y.axisY:n).attr("x",y=>i(y.seriesLabel)).attr("width",s).attr("transform",`translate(${-h}, 0)`).attr("rx",c[0]).attr("ry",c[1]).transition().duration(f).ease(Jr(a.transitionEase)).delay((y,x)=>y.groupIndex*u).attr("height",y=>Math.abs(y.axisYFromZero))}).selectAll(`rect.${Q2}`)}function uN({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)=>{K(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 cN({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)?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const tv=(t,{selection:e,computedData$:n,visibleComputedData$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullChartParams$:s,gridAxesTransform$:c,gridGraphicTransform$:u,gridAxesSize$:f,gridHighlight$:h,event$:l})=>{const p=new lt,d=ti(t,"clipPath-box"),g=e.append("g").attr("clip-path",`url(#${d})`),m=g.append("defs"),y=g.append("g"),x=new lt;c.pipe(I(p),G(S=>S.value),tt()).subscribe(S=>{g.style("transform",S)}),u.pipe(I(p),G(S=>S.value),tt()).subscribe(S=>{y.transition().duration(50).style("transform",S)});const v=r.pipe(G(S=>S[0]&&S[0][0]?S[0][0].axisY-S[0][0].axisYFromZero:0),tt()),b=new at(S=>{W({computedData:n,visibleComputedData:r,params:a,gridAxesSize:f}).pipe(U(async w=>w)).subscribe(w=>{const k=w.params.barWidth?w.params.barWidth:rN({axisWidth:w.gridAxesSize.width,groupAmount:w.computedData[0]?w.computedData[0].length:0,barAmountOfGroup:w.visibleComputedData.length,barPadding:w.params.barPadding,barGroupPadding:w.params.barGroupPadding});S.next(k)})}).pipe(I(p),tt()),M=W({gridGraphicTransform:u,barWidth:b,params:a}).pipe(I(p),U(async S=>S),G(S=>{const w=S.barWidth/2,k=S.params.barRadius===!0?w:S.params.barRadius===!1?0:typeof S.params.barRadius=="number"?S.params.barRadius:0,L=k==0?0:k/S.gridGraphicTransform.scale[0],R=k==0?0:k/S.gridGraphicTransform.scale[1];return[L,R]})),_=r.pipe(I(p),G(S=>{const w=new Set;return S.forEach(k=>{k.forEach(L=>{w.add(L.seriesLabel)})}),Array.from(w)})),$=r.pipe(I(p),G(S=>{const w=new Set;return S.forEach(k=>{k.forEach(L=>{w.add(L.groupLabel)})}),Array.from(w)})),D=new at(S=>{W({seriesLabels:_,barWidth:b,params:a}).pipe(I(p),U(async w=>w)).subscribe(w=>{const k=iN(w.barWidth,w.seriesLabels,w.params);S.next(k)})}),E=s.pipe(I(p),G(S=>S.transitionDuration),tt()),P=new at(S=>{W({groupLabels:$,transitionDuration:E}).pipe(U(async w=>w)).subscribe(w=>{const k=oN(w.groupLabels.length,w.transitionDuration);S.next(k)})}).pipe(I(p),tt()),T=new at(S=>{W({groupLabels:$,transitionDuration:E}).pipe(U(async w=>w)).subscribe(w=>{const k=aN(w.groupLabels.length,w.transitionDuration);S.next(k)})}).pipe(I(p),tt()),C=r.pipe(I(p),G(S=>{const w=S.length,k=S.reduce((R,F)=>Math.max(R,F.length),0),L=new Array(k).fill(null).map(()=>new Array(w).fill(null));for(let R=0;R<w;R++)for(let F=0;F<k;F++)L[F][R]=S[R][F];return L}));f.pipe(I(p)).subscribe(S=>{const w=[{id:d,width:S.width,height:S.height}];uN({defsSelection:m,clipPathData:w})});const N=s.pipe(I(p),G(S=>S.highlightTarget),tt());W({computedData:n,barData$:C,zeroY:v,groupLabels:$,barScale:D,params:a,chartParams:s,highlightTarget:N,barWidth:b,transformedBarRadius:M,delayGroup:P,transitionItem:T,SeriesDataMap:i,GroupDataMap:o}).pipe(I(p),U(async S=>S)).subscribe(S=>{const w=sN({selection:y,data:S.barData$,zeroY:S.zeroY,groupLabels:S.groupLabels,barScale:S.barScale,params:S.params,chartParams:S.chartParams,barWidth:S.barWidth,transformedBarRadius:S.transformedBarRadius,delayGroup:S.delayGroup,transitionItem:S.transitionItem});w.on("mouseover",(k,L)=>{k.stopPropagation(),l.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:S.highlightTarget,datum:L,series:S.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:S.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:k,data:S.computedData})}).on("mousemove",(k,L)=>{k.stopPropagation(),l.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:S.highlightTarget,datum:L,series:S.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:S.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:k,data:S.computedData})}).on("mouseout",(k,L)=>{k.stopPropagation(),l.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:S.highlightTarget,datum:L,series:S.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:S.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:k,data:S.computedData})}).on("click",(k,L)=>{k.stopPropagation(),l.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:S.highlightTarget,datum:L,series:S.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:S.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:k,data:S.computedData})}),x.next(w)});const A=h.subscribe();return W({barSelection:x,highlight:h,fullChartParams:s}).pipe(I(p),U(async S=>S)).subscribe(S=>{cN({selection:S.barSelection,ids:S.highlight,fullChartParams:S.fullChartParams})}),()=>{p.next(void 0),A.unsubscribe()}},ev="Bars",lN=we(ev,Sh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=tv(ev,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,event$:n.event$});return()=>{i.next(void 0),o()}}),nv="BarStack",rv=ft(nv,"g"),iv=ft(nv,"g-content"),ov=.3;function fN({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function hN(t,e){return t<=1?0:e/(t-1)*ov}function pN(t,e){return t<=1?e:e*(1-ov)}function dN({selection:t,data:e,zeroY:n,groupLabels:r,params:i,chartParams:o,barWidth:a,transformedBarRadius:s,delayGroup:c,transitionItem:u}){const f=a/2;return t.selectAll(`g.${rv}`).data(e,(p,d)=>r[d]).join(p=>p.append("g").classed(rv,!0).attr("cursor","pointer"),p=>p,p=>p.remove()).attr("transform",(p,d)=>`translate(${p[0]?p[0].axisX:0}, 0)`).each((p,d,g)=>{K(g[d]).selectAll("g").data(p,m=>m.id).join(m=>m.append("g").classed(iv,!0),m=>m,m=>m.remove()).each((m,y,x)=>{K(x[y]).selectAll("rect").data([m],v=>v.id).join(v=>v.append("rect").attr("y",b=>n).attr("height",b=>0),v=>v,v=>v.remove()).attr("rx",s[0]).attr("ry",s[1]).attr("fill",v=>v.color).attr("transform",`translate(${-f}, 0)`).attr("x",v=>0).attr("width",a).transition().duration(u).ease(Jr(o.transitionEase)).delay((v,b)=>v.groupIndex*c).attr("y",v=>v._barStartY).attr("height",v=>Math.abs(v._barHeight))})}).selectAll(`g.${iv}`)}function gN({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)=>{K(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 mN({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)?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const yN=(t,{selection:e,computedData$:n,visibleComputedData$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:c,gridAxesTransform$:u,gridGraphicTransform$:f,gridAxesSize$:h,gridHighlight$:l,event$:p})=>{const d=new lt,g=ti(t,"clipPath-box"),m=e.append("g").attr("clip-path",`url(#${g})`),y=m.append("defs"),x=m.append("g"),v=new lt;u.pipe(I(d),G(w=>w.value),tt()).subscribe(w=>{m.style("transform",w)}),f.pipe(I(d),U(async w=>w.value),tt()).subscribe(w=>{x.transition().duration(50).style("transform",w)});const b=r.pipe(G(w=>w[0]&&w[0][0]?w[0][0].axisY-w[0][0].axisYFromZero:0),tt()),M=new at(w=>{W({computedData:n,params:a,axisSize:h}).pipe(U(async k=>k)).subscribe(k=>{const L=k.params.barWidth?k.params.barWidth:fN({axisWidth:k.axisSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barGroupPadding:k.params.barGroupPadding});w.next(L)})}).pipe(I(d),tt()),_=W({gridGraphicTransform:f,barWidth:M,params:a}).pipe(I(d),U(async w=>w),G(w=>{const k=w.barWidth/2,L=w.params.barRadius===!0?k:w.params.barRadius===!1?0:typeof w.params.barRadius=="number"?w.params.barRadius:0,R=L==0?0:L/w.gridGraphicTransform.scale[0],F=L==0?0:L/w.gridGraphicTransform.scale[1];return[R,F]})),$=r.pipe(I(d),G(w=>{const k=new Set;return w.forEach(L=>{L.forEach(R=>{k.add(R.groupLabel)})}),Array.from(k)})),D=c.pipe(I(d),G(w=>w.transitionDuration),tt()),E=new at(w=>{W({groupLabels:$,transitionDuration:D}).pipe(U(async k=>k)).subscribe(k=>{const L=hN(k.groupLabels.length,k.transitionDuration);w.next(L)})}).pipe(I(d),tt()),P=new at(w=>{W({groupLabels:$,transitionDuration:D}).pipe(U(async k=>k)).subscribe(k=>{const L=pN(k.groupLabels.length,k.transitionDuration);w.next(L)})}).pipe(I(d),tt()),T=r.pipe(I(d),G(w=>{console.log("visibleComputedData",w);const k=w.length,L=w.reduce((F,z)=>Math.max(F,z.length),0),R=new Array(L).fill(null).map(()=>new Array(k).fill(null));for(let F=0;F<k;F++)for(let z=0;z<L;z++)R[z][F]=w[F][z];return R})),C=W({transposedVisibleData:T,dataFormatter:s}).pipe(I(d),U(async w=>w),G(w=>{const L=w.transposedVisibleData.length-1,R=w.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-w.dataFormatter.groupAxis.scalePadding:w.dataFormatter.groupAxis.scaleDomain[0]-w.dataFormatter.groupAxis.scalePadding,F=w.dataFormatter.groupAxis.scaleDomain[1]==="auto"?L+w.dataFormatter.groupAxis.scalePadding:w.dataFormatter.groupAxis.scaleDomain[1]+w.dataFormatter.groupAxis.scalePadding,z=w.transposedVisibleData.map(Y=>Y.filter((rt,Z)=>rt.groupIndex>=R&&rt.groupIndex<=F));if(z.flat().length){const Y=z.flat().map(ht=>ht.axisYFromZero),rt=Math.max(...Y),Z=z.map(ht=>ht.reduce((q,pt)=>q+pt.axisYFromZero,0)),J=Math.max(...Z);return rt/J}else return 1})),N=W({transposedVisibleData:T,yRatio:C,zeroY:b}).pipe(I(d),G(w=>(console.log(w.transposedVisibleData),w.transposedVisibleData.map(k=>{let L=w.zeroY;return k.map(R=>{const F=L,z=R.axisYFromZero*w.yRatio;return L=L+z,{...R,_barStartY:F,_barHeight:z}})}))));h.pipe(I(d)).subscribe(w=>{const k=[{id:g,width:w.width,height:w.height}];gN({defsSelection:y,clipPathData:k})});const A=c.pipe(I(d),G(w=>w.highlightTarget),tt());W({graphicData:N,zeroY:b,groupLabels:$,params:a,chartParams:c,highlightTarget:A,barWidth:M,transformedBarRadius:_,delayGroup:E,transitionItem:P,SeriesDataMap:i,GroupDataMap:o}).pipe(I(d),U(async w=>w)).subscribe(w=>{const k=dN({selection:x,data:w.graphicData,zeroY:w.zeroY,groupLabels:w.groupLabels,params:w.params,chartParams:w.chartParams,barWidth:w.barWidth,transformedBarRadius:w.transformedBarRadius,delayGroup:w.delayGroup,transitionItem:w.transitionItem});k.on("mouseover",(L,R)=>{L.stopPropagation(),p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:w.highlightTarget,datum:R,series:w.SeriesDataMap.get(R.seriesLabel),seriesIndex:R.seriesIndex,seriesLabel:R.seriesLabel,groups:w.GroupDataMap.get(R.groupLabel),groupIndex:R.groupIndex,groupLabel:R.groupLabel,event:L,data:w.graphicData})}).on("mousemove",(L,R)=>{L.stopPropagation(),p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:w.highlightTarget,datum:R,series:w.SeriesDataMap.get(R.seriesLabel),seriesIndex:R.seriesIndex,seriesLabel:R.seriesLabel,groups:w.GroupDataMap.get(R.groupLabel),groupIndex:R.groupIndex,groupLabel:R.groupLabel,event:L,data:w.graphicData})}).on("mouseout",(L,R)=>{L.stopPropagation(),p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:w.highlightTarget,datum:R,series:w.SeriesDataMap.get(R.seriesLabel),seriesIndex:R.seriesIndex,seriesLabel:R.seriesLabel,groups:w.GroupDataMap.get(R.groupLabel),groupIndex:R.groupIndex,groupLabel:R.groupLabel,event:L,data:w.graphicData})}).on("click",(L,R)=>{L.stopPropagation(),p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:w.highlightTarget,datum:R,series:w.SeriesDataMap.get(R.seriesLabel),seriesIndex:R.seriesIndex,seriesLabel:R.seriesLabel,groups:w.GroupDataMap.get(R.groupLabel),groupIndex:R.groupIndex,groupLabel:R.groupLabel,event:L,data:w.graphicData})}),v.next(k)});const S=l.subscribe();return W({barSelection:v,highlight:l,fullChartParams:c}).pipe(I(d),U(async w=>w)).subscribe(w=>{mN({selection:w.barSelection,ids:w.highlight,fullChartParams:w.fullChartParams})}),()=>{d.next(void 0),S.unsubscribe()}},av="BarStack",bN=we(av,Th)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=yN(av,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,event$:n.event$});return()=>{i.next(void 0),o()}}),sv="BaseBarsTriangle",uv=ft(sv,"g"),cv=ft(sv,"g-content"),lv=.3;function vN({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const o=(t/e-i)/n-r;return o>1?o:1}function xN(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Cf().domain(e).range([-i/2+r,i/2-r])}function _N(t,e){return t<=1?0:e/(t-1)*lv}function wN(t,e){return t<=1?e:e*(1-lv)}function AN({selection:t,barData:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:s,delayGroup:c,transitionItem:u}){const f=t.selectAll(`g.${uv}`).data(e,(g,m)=>r[m]),h=f.enter().append("g").classed(uv,!0).attr("cursor","pointer");f.exit().remove();const l=f.merge(h);h.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`),f.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`);const p=s/2;return l.each((g,m,y)=>{const x=K(y[m]).selectAll("g").data(g,b=>b.id),v=x.enter().append("g").classed(cv,!0);v.append("path").style("vector-effect","non-scaling-stroke").attr("height",b=>0).attr("d",b=>{const M=i(b.seriesLabel),_=n,$=_;return`M${M-s/2},${_} L${M},${$} ${M+s/2},${_}`}),x.merge(v).select("path").style("fill",b=>`url(#${b.linearGradientId})`).attr("stroke",b=>b.color).attr("transform",`translate(${-p}, 0)`).transition().duration(u).ease(Jr(a.transitionEase)).delay((b,M)=>b.groupIndex*c).attr("transform",`translate(${-p}, 0)`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("d",b=>{const M=i(b.seriesLabel),_=n,$=b.axisY;return`M${M},${_} L${M+s/2},${$} ${M+s},${_}`}),x.exit().remove()}),l.selectAll(`g.${cv}`)}function MN({defsSelection:t,barData:e,params:n}){const r=t.selectAll("linearGradient").data(e[0]??[],o=>o.seriesLabel),i=r.enter().append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad");r.merge(i).attr("id",(o,a)=>o.linearGradientId).html((o,a)=>`
10
10
  <stop offset="0%" stop-color="${o.color}" stop-opacity="${n.linearGradientOpacity[0]}"/>
11
11
  <stop offset="100%" stop-color="${o.color}" stop-opacity="${n.linearGradientOpacity[1]}"/>
12
- `),r.exit().remove()}function MN({defsSelection:t,clipPathData:e}){const n=t.selectAll("clipPath").data(e),r=n.enter().append("clipPath");n.merge(r).attr("id",i=>i.id),n.exit().remove(),n.merge(r).each((i,o,a)=>{const s=K(a[o]).selectAll("rect").data([i]),c=s.enter().append("rect");s.merge(c).attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s.exit().remove()})}function $N({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)?K(a[o]).style("opacity",1):K(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const SN=(t,{selection:e,computedData$:n,SeriesDataMap$:r,GroupDataMap$:i,fullParams$:o,fullChartParams$:a,gridAxesTransform$:s,gridGraphicTransform$:c,gridAxesSize$:u,gridHighlight$:f,event$:h})=>{const l=new lt,p=ti(t,"clipPath-box"),d=e.append("g").attr("clip-path",`url(#${p})`),g=d.append("defs"),m=d.append("g"),y=new lt;s.pipe(I(l),G(A=>A.value),tt()).subscribe(A=>{d.style("transform",A)}),c.pipe(I(l),U(async A=>A.value),tt()).subscribe(A=>{m.transition().duration(50).style("transform",A)});const x=n.pipe(G(A=>A[0]&&A[0][0]?A[0][0].axisY-A[0][0].axisYFromZero:0),tt()),v=new at(A=>{W({computedData:n,params:o,axisSize:u}).pipe(U(async $=>$)).subscribe($=>{const w=bN({axisWidth:$.axisSize.width,groupAmount:$.computedData[0]?$.computedData[0].length:0,barAmountOfGroup:$.computedData.length,barPadding:$.params.barPadding,barGroupPadding:$.params.barGroupPadding});A.next(w)})}).pipe(I(l),tt()),b=n.pipe(I(l),G(A=>A.map(($,w)=>$[0]?$[0].seriesLabel:String(w)))),M=n.pipe(I(l),G(A=>A[0]?A[0].map($=>$.groupLabel):[])),_=new at(A=>{W({seriesLabels:b,barWidth:v,params:o}).pipe(I(l),U(async $=>$)).subscribe($=>{const w=vN($.barWidth,$.seriesLabels,$.params);A.next(w)})}),T=a.pipe(I(l),G(A=>A.transitionDuration),tt()),P=new at(A=>{W({groupLabels:M,transitionDuration:T}).pipe(U(async $=>$)).subscribe($=>{const w=xN($.groupLabels.length,$.transitionDuration);A.next(w)})}).pipe(I(l),tt()),E=new at(A=>{W({groupLabels:M,transitionDuration:T}).pipe(U(async $=>$)).subscribe($=>{const w=_N($.groupLabels.length,$.transitionDuration);A.next(w)})}).pipe(I(l),tt()),S=n.pipe(I(l),G(A=>{const $=A.length,w=A.reduce((L,R)=>Math.max(L,R.length),0),D=new Array(w).fill(null).map(()=>new Array($).fill(null));for(let L=0;L<$;L++)for(let R=0;R<w;R++)D[R][L]=A[L][R];return D})).pipe(I(l),G(A=>{const $=A.length?A[0].map(w=>ti(t,`lineargradient-${w.seriesLabel}`)):[];return A.map(w=>w.map((D,L)=>({linearGradientId:$[L],...D})))}));u.pipe(I(l)).subscribe(A=>{const $=[{id:p,width:A.width,height:A.height}];MN({defsSelection:g,clipPathData:$})});const C=a.pipe(I(l),G(A=>A.highlightTarget),tt());W({barData:S,computedData:n,zeroY:x,groupLabels:M,barScale:_,params:o,chartParams:a,highlightTarget:C,barWidth:v,delayGroup:P,transitionItem:E,SeriesDataMap:r,GroupDataMap:i}).pipe(I(l),U(async A=>A)).subscribe(A=>{const $=wN({selection:m,barData:A.barData,zeroY:A.zeroY,groupLabels:A.groupLabels,barScale:A.barScale,params:A.params,chartParams:A.chartParams,barWidth:A.barWidth,delayGroup:A.delayGroup,transitionItem:A.transitionItem});AN({defsSelection:g,barData:A.barData,params:A.params}),$.on("mouseover",(w,D)=>{w.stopPropagation(),h.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:D,series:A.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,groups:A.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:w,data:A.computedData})}).on("mousemove",(w,D)=>{w.stopPropagation(),h.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,datum:D,series:A.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,groups:A.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:w,data:A.computedData})}).on("mouseout",(w,D)=>{w.stopPropagation(),h.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:D,series:A.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,groups:A.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:w,data:A.computedData})}).on("click",(w,D)=>{w.stopPropagation(),h.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:D,series:A.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,groups:A.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:w,data:A.computedData})}),y.next($)});const N=f.subscribe();return W({pathSelection:y,highlight:f,fullChartParams:a}).pipe(I(l),U(async A=>A)).subscribe(A=>{$N({selection:A.pathSelection,ids:A.highlight,fullChartParams:A.fullChartParams})}),()=>{l.next(void 0),N.unsubscribe()}},hv="BarsTriangle",TN=we(hv,Ph)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=SN(hv,{selection:t,computedData$:r.computedData$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,event$:n.event$});return()=>{i.next(void 0),o()}}),xu="Dots",PN=ft(xu,"g"),DN=ft(xu,"circle");function kN({selection:t,data:e,fullParams:n,fullChartParams:r,graphicOppositeScale:i}){const o=c=>{const u=c.size();return r.transitionDuration/u};let a=0;return t.selectAll("g").data(e,c=>c.id).join(c=>(a=o(c),c.append("g").classed(PN,!0)),c=>c,c=>c.remove()).attr("transform",c=>`translate(${c.axisX}, ${c.axisY})`).each((c,u,f)=>{K(f[u]).selectAll("circle").data([c]).join(h=>h.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(DN,!0).attr("opacity",0).transition().delay((l,p)=>u*a).attr("opacity",1),h=>h.transition().duration(50).attr("opacity",1),h=>h.remove()).attr("r",n.radius).attr("fill",(h,l)=>hh({datum:h,colorType:n.fillColorType,fullChartParams:r})).attr("stroke",(h,l)=>hh({datum:h,colorType:n.strokeColorType,fullChartParams:r})).attr("stroke-width",n.strokeWidth).attr("transform",`scale(${i[0]}, ${i[1]})`)})}function EN({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)?K(a[o]).style("opacity",1).transition("highlight").duration(200):K(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function LN({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)=>{K(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 NN=we(xu,Mh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=ti(xu,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),s=a.append("defs"),c=a.append("g"),u=new lt;r.gridAxesTransform$.pipe(I(i),G(d=>d.value),tt()).subscribe(d=>{a.style("transform",d)}),r.gridGraphicTransform$.pipe(I(i),U(async d=>d.value),tt()).subscribe(d=>{c.transition().duration(50).style("transform",d)});const f=r.gridGraphicTransform$.pipe(I(i),G(d=>[1/d.scale[0],1/d.scale[1]]));r.gridAxesSize$.pipe(I(i),U(async d=>d)).subscribe(d=>{const g=[{id:o,width:d.width,height:d.height}];LN({defsSelection:s,clipPathData:g})});const h=r.fullChartParams$.pipe(I(i),G(d=>d.highlightTarget),tt());W({computedData:r.computedData$,visibleComputedData:r.visibleComputedData$,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$,graphicOppositeScale:f,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$,highlightTarget:h}).pipe(I(i),U(async d=>d)).subscribe(d=>{const g=kN({selection:c,data:d.visibleComputedData.flat(),fullParams:d.fullParams,fullChartParams:d.fullChartParams,graphicOppositeScale:d.graphicOppositeScale});g.on("mouseover",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}).on("mousemove",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:d.highlightTarget,data:d.computedData,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m})}).on("mouseout",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}).on("click",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}),u.next(g)});const l=r.gridHighlight$.subscribe(),p=r.fullParams$.pipe(I(i),G(d=>d.onlyShowHighlighted),tt());return r.fullChartParams$.pipe(I(i),U(d=>W({graphicSelection:u,highlight:r.gridHighlight$,onlyShowHighlighted:p,fullChartParams:r.fullChartParams$}).pipe(I(i),U(async g=>g)))).subscribe(d=>{EN({selection:d.graphicSelection,ids:d.highlight,onlyShowHighlighted:d.onlyShowHighlighted,fullChartParams:d.fullChartParams})}),()=>{l.unsubscribe(),i.next(void 0)}}),RN={listRectWidth:14,listRectHeight:14,listRectRadius:0},ph=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=ft(t,"root-position"),s=ft(t,"legend-card"),c=ft(t,"legend-list"),u=ft(t,"legend-item"),f=new lt,h=r.pipe(I(f),G(_=>_.position==="bottom"||_.position==="top"?"row":"column")),l=W({fullParams:r,layout:i}).pipe(I(f),U(async _=>_),G(_=>{const T=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-T:_.layout.rootHeight-T})),d=W({layout:i,fullParams:r}).pipe(I(f),U(async _=>_),G(_=>{let T=0,P=0;return _.fullParams.position==="bottom"?(P=_.layout.rootHeight,_.fullParams.justify==="start"?T=0:_.fullParams.justify==="center"?T=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(T=_.layout.rootWidth)):_.fullParams.position==="right"?(T=_.layout.rootWidth,_.fullParams.justify==="start"?P=0:_.fullParams.justify==="center"?P=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(P=_.layout.rootHeight)):_.fullParams.position==="top"?(P=0,_.fullParams.justify==="start"?T=0:_.fullParams.justify==="center"?T=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(T=_.layout.rootWidth)):_.fullParams.position==="left"&&(T=0,_.fullParams.justify==="start"?P=0:_.fullParams.justify==="center"?P=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(P=_.layout.rootHeight)),{x:T,y:P}})).pipe(I(f),G(_=>e.selectAll(`g.${a}`).data([_]).join(T=>T.append("g").classed(a,!0).attr("transform",P=>`translate(${P.x}, ${P.y})`),T=>T.transition().attr("transform",P=>`translate(${P.x}, ${P.y})`),T=>T.remove()))),g=r.pipe(I(f),G(_=>_.seriesList[0]?_.seriesList[0]:RN)),m=W({fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:h,lineMaxSize:l,defaultListStyle:g}).pipe(I(f),U(async _=>_),G(_=>_.seriesLabels.reduce((T,P,E)=>{const k=H2(P,_.fullChartParams.styles.textSize),S=_.fullChartParams.styles.textSize*1.5+k,C=XL(E,_.fullChartParams),N=T[0]&&T[0][0]?T[T.length-1][T[T.length-1].length-1]:null,{translateX:A,translateY:$,lineIndex:w,itemIndex:D}=((R,F,z)=>{let Y=0,rt=0,Z=0,J=0;if(R.lineDirection==="column"){let ht=z?z.translateY+R.fullChartParams.styles.textSize+R.fullParams.gap:0;if(ht+R.fullChartParams.styles.textSize>R.lineMaxSize){Z=z.lineIndex+1,J=0,rt=0;const H=F[F.length-1].reduce((pt,B)=>B.itemWidth>pt?B.itemWidth:pt,0);Y=z.translateX+H+R.fullParams.gap}else Z=z?z.lineIndex:0,J=z?z.itemIndex+1:0,rt=ht,Y=z?z.translateX:0}else{let ht=z?z.translateX+z.itemWidth+R.fullParams.gap:0;ht+S>R.lineMaxSize?(Z=z.lineIndex+1,J=0,Y=0):(Z=z?z.lineIndex:0,J=z?z.itemIndex+1:0,Y=ht),rt=(R.fullChartParams.styles.textSize+R.fullParams.gap)*Z}return{translateX:Y,translateY:rt,lineIndex:Z,itemIndex:J}})(_,T,N);T[w]||(T[w]=[]);const L=_.fullParams.seriesList[D]?_.fullParams.seriesList[D]:_.defaultListStyle;return T[w].push({id:P,seriesLabel:P,seriesIndex:E,lineIndex:w,itemIndex:D,text:P,itemWidth:S,translateX:A,translateY:$,color:C,listRectWidth:L.listRectWidth,listRectHeight:L.listRectHeight,listRectRadius:L.listRectRadius}),T},[]))),y=W({fullParams:r,fullChartParams:o,lineDirection:h,lengendItems:m}).pipe(I(f),U(async _=>_),G(_=>{const{width:T,height:P}=((E,k)=>{let S=0,C=0;if(!k.length||!k[0].length)return{width:S,height:C};const N=k[0][k[0].length-1];return E.lineDirection==="column"?(S=k.reduce((A,$)=>{const w=$.reduce((D,L)=>L.itemWidth>D?L.itemWidth:D,0);return A+w},0),S+=E.fullParams.gap*(k.length-1),C=N.translateY+E.fullChartParams.styles.textSize):(S=N.translateX+N.itemWidth,C=E.fullChartParams.styles.textSize*k.length+E.fullParams.gap*(k.length-1)),{width:S,height:C}})(_,_.lengendItems);return{direction:_.lineDirection,width:T,height:P,translateX:_.fullParams.gap,translateY:_.fullParams.gap}})),x=W({fullParams:r,lengendList:y}).pipe(I(f),U(async _=>_),G(_=>{const T=_.lengendList.width+_.fullParams.gap*2,P=_.lengendList.height+_.fullParams.gap*2;let E=0,k=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(E=_.fullParams.padding,k=_.fullParams.padding):_.fullParams.justify==="center"?(E=_.fullParams.padding,k=-P/2):_.fullParams.justify==="end"&&(E=_.fullParams.padding,k=-P-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(E=-T-_.fullParams.padding,k=_.fullParams.padding):_.fullParams.justify==="center"?(E=-T-_.fullParams.padding,k=-P/2):_.fullParams.justify==="end"&&(E=-T-_.fullParams.padding,k=-P-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(E=_.fullParams.padding,k=_.fullParams.padding):_.fullParams.justify==="center"?(E=-T/2,k=_.fullParams.padding):_.fullParams.justify==="end"&&(E=-T-_.fullParams.padding,k=_.fullParams.padding):_.fullParams.justify==="start"?(E=_.fullParams.padding,k=-P-_.fullParams.padding):_.fullParams.justify==="center"?(E=-T/2,k=-P-_.fullParams.padding):_.fullParams.justify==="end"&&(E=-T-_.fullParams.padding,k=-P-_.fullParams.padding),{width:T,height:P,translateX:E,translateY:k}})),v=W({rootPositionSelection:d,fullParams:r,fullChartParams:o,legendCard:x}).pipe(I(f),U(async _=>_),G(_=>_.rootPositionSelection.selectAll("g").data([_.legendCard]).join(T=>T.append("g").classed(s,!0).attr("transform",P=>`translate(${P.translateX}, ${P.translateY})`),T=>T.transition().attr("transform",P=>`translate(${P.translateX}, ${P.translateY})`),T=>T.remove()).each((T,P,E)=>{K(E[P]).selectAll("rect").data([T]).join("rect").attr("width",k=>k.width).attr("height",k=>k.height).attr("fill",Pt(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Pt(_.fullParams.backgroundStroke,_.fullChartParams))}))),b=W({lengendCardSelection:v,fullParams:r,lengendList:y}).pipe(I(f),U(async _=>_),G(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join(T=>T.append("g").classed(c,!0).attr("transform",P=>`translate(${P.translateX}, ${P.translateY})`),T=>T.transition().attr("transform",P=>`translate(${P.translateX}, ${P.translateY})`),T=>T.remove())));return W({lengendListSelection:b,fullParams:r,fullChartParams:o,lengendItems:m}).pipe(I(f),U(async _=>_),G(_=>{const T=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${u}`).data(T).join(P=>P.append("g").classed(u,!0).attr("cursor","default"),P=>P,P=>P.remove()).attr("transform",(P,E)=>`translate(${P.translateX}, ${P.translateY})`).each((P,E,k)=>{const S=_.fullChartParams.styles.textSize/2,C=-P.listRectWidth/2,N=-P.listRectHeight/2;K(k[E]).selectAll("rect").data([P]).join("rect").attr("x",S).attr("y",S).attr("width",A=>A.listRectWidth).attr("height",A=>A.listRectHeight).attr("transform",A=>`translate(${C}, ${N})`).attr("fill",A=>A.color).attr("rx",A=>A.listRectRadius),K(k[E]).selectAll("text").data([P]).join(A=>A.append("text").attr("dominant-baseline","hanging"),A=>A,A=>A.remove()).attr("x",_.fullChartParams.styles.textSize*1.5).attr("font-size",_.fullChartParams.styles.textSize).text(A=>A.text)})})).subscribe(),()=>{f.next(void 0)}},pv="GridLegend",CN=we(pv,Lh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new lt,o=n.SeriesDataMap$.pipe(I(i),G(c=>Array.from(c.keys()))),a=n.fullParams$.pipe(I(i),G(c=>{const u=[{listRectWidth:c.listRectWidth,listRectHeight:c.listRectHeight,listRectRadius:c.listRectRadius}];return{...c,seriesList:u}})),s=ph(pv,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),dh="GroupAxis",dv=ft(dh,"xAxis"),gv=ft(dh,"groupingLabel"),gh=6;function IN({selection:t,params:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:s,contentTransform:c}){const u=t.selectAll(`g.${dv}`).data([e]).join("g").classed(dv,!0);t.selectAll(`g.${gv}`).data([e]).join("g").classed(gv,!0).each((l,p,d)=>{K(d[p]).selectAll("text").data([l]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Pt(e.labelColorType,a)).style("transform",c).text(g=>o.groupAxis.label)}).attr("transform",l=>`translate(${i.width+l.tickPadding+e.labelOffset[0]}, ${-l.tickPadding-gh-e.labelOffset[1]})`);const f=bd(s).scale(s).tickSize(e.tickFullLine==!0?-i.height:gh).tickSizeOuter(0).tickFormat(l=>vu(l,e.tickFormat)).tickPadding(e.tickPadding),h=u.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Pt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Pt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),u.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Pt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`0 -${e.tickPadding+gh}`).style("transform",c),u}const FN=we(dh,Dh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g");n.gridAxesTransform$.pipe(I(i),G(f=>f.value),tt()).subscribe(f=>{o.style("transform",f).attr("opacity",0).transition().attr("opacity",1)});const a=W({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(I(i),U(async f=>{const h=f.gridAxesOppositeTransform.rotate+f.fullParams.tickTextRotate;return`translate(${f.gridAxesOppositeTransform.translate[0]}px, ${f.gridAxesOppositeTransform.translate[1]}px) rotate(${h}deg) rotateX(${f.gridAxesOppositeTransform.rotateX}deg) rotateY(${f.gridAxesOppositeTransform.rotateY}deg)`}),tt()),s=new at(f=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(I(i),U(async h=>h)).subscribe(h=>{const p=h.computedData[0]?h.computedData[0].length-1:0,d=h.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[0]-h.fullDataFormatter.groupAxis.scalePadding,g=h.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?p+h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[1]+h.fullDataFormatter.groupAxis.scalePadding,m=h.computedData[0]?h.computedData[0].length:0;let y=h.fullDataFormatter.grid.seriesType==="row"?(h.computedData[0]??[]).map(M=>M.groupLabel):h.computedData.map(M=>M[0].groupLabel);const x=new Array(m).fill(0).map((M,_)=>y[_]!=null?y[_]:String(_)).filter((M,_)=>_>=d&&_<=g),v=h.fullDataFormatter.groupAxis.scalePadding,b=Up({axisLabels:x,axisWidth:h.gridAxesSize.width,padding:v});f.next(b)})}),c=n.fullDataFormatter$.pipe(I(i),G(f=>{let h="middle",l="hanging";return f.groupAxis.position==="bottom"?(h="middle",l="hanging"):f.groupAxis.position==="top"?(h="middle",l="auto"):f.groupAxis.position==="left"?(h="end",l="middle"):f.groupAxis.position==="right"&&(h="start",l="middle"),{textAnchor:h,dominantBaseline:l}})),u=n.fullDataFormatter$.pipe(I(i),G(f=>{let h="start",l="hanging";return f.groupAxis.position==="bottom"?l="hanging":f.groupAxis.position==="top"?l="auto":f.groupAxis.position==="left"?h="end":f.groupAxis.position==="right"&&(h="start"),f.valueAxis.position==="left"?h="start":f.valueAxis.position==="right"?h="end":f.valueAxis.position==="bottom"?l="auto":f.valueAxis.position==="top"&&(l="hanging"),{textAnchor:h,dominantBaseline:l}}));return W({params:n.fullParams$,tickTextAlign:c,axisLabelAlign:u,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,chartParams:n.fullChartParams$,groupScale:s,contentTransform:a}).pipe(I(i),U(async f=>f)).subscribe(f=>{IN({selection:o,params:f.params,tickTextAlign:f.tickTextAlign,axisLabelAlign:f.axisLabelAlign,gridAxesSize:f.gridAxesSize,fullDataFormatter:f.fullDataFormatter,chartParams:f.chartParams,groupScale:f.groupScale,contentTransform:f.contentTransform})}),()=>{i.next(void 0)}}),mh="ValueAxis",mv=ft(mh,"g"),yv=ft(mh,"text"),bv=6;function zN({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,contentTransform:c,minAndMax:u}){const f=t.selectAll(`g.${mv}`).data([e]).join("g").classed(mv,!0);t.selectAll(`g.${yv}`).data([e]).join("g").classed(yv,!0).each((g,m,y)=>{K(y[m]).selectAll("text").data([g]).join(x=>x.append("text").style("font-weight","bold"),x=>x,x=>x.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Pt(e.labelColorType,a)).style("transform",c).text(x=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=u[1]-u[0],l=Ac(s).scale(s).ticks(h>e.ticks?e.ticks:u[0]===0&&u[1]===0?1:Math.ceil(h)).tickFormat(g=>vu(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:bv).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Pt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Pt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Pt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+bv} 0`).style("transform",c),f}const ON=we(mh,_u)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g");n.gridAxesTransform$.pipe(I(i),G(h=>h.value),tt()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=W({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(I(i),U(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),tt()),s=new at(h=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(I(i),U(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((v,b)=>v.filter((M,_)=>_>=g&&_<=m)),x=qL(y.flat());h.next(x)})}),c=new at(h=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:s}).pipe(I(i),U(async l=>l)).subscribe(l=>{const p=fc({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),u=n.fullDataFormatter$.pipe(I(i),G(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(I(i),G(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return W({fullParams:n.fullParams$,tickTextAlign:u,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:s}).pipe(I(i),U(async h=>h)).subscribe(h=>{zN({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),yh="ValueStackAxis",vv=ft(yh,"g"),xv=ft(yh,"text"),_v=6;function GN({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,contentTransform:c,minAndMax:u}){const f=t.selectAll(`g.${vv}`).data([e]).join("g").classed(vv,!0);t.selectAll(`g.${xv}`).data([e]).join("g").classed(xv,!0).each((g,m,y)=>{K(y[m]).selectAll("text").data([g]).join(x=>x.append("text").style("font-weight","bold"),x=>x,x=>x.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Pt(e.labelColorType,a)).style("transform",c).text(x=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=u[1]-u[0],l=Ac(s).scale(s).ticks(h>e.ticks?e.ticks:u[0]===0&&u[1]===0?1:Math.ceil(h)).tickFormat(g=>vu(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:_v).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Pt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Pt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Pt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+_v} 0`).style("transform",c),f}const BN=we(yh,kh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g");n.gridAxesTransform$.pipe(I(i),G(h=>h.value),tt()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=W({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(I(i),U(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),tt()),s=new at(h=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(I(i),U(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((b,M)=>b.filter((_,T)=>T>=g&&T<=m)),x=new Array(y[0]?y[0].length:0).fill(null).map((b,M)=>y.reduce((_,T)=>{if(T&&T[M]){const P=T[M].value==null||T[M].visible==!1?0:T[M].value;return _+P}return _},0)),v=q2(x);h.next(v)})}),c=new at(h=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:s}).pipe(I(i),U(async l=>l)).subscribe(l=>{const p=fc({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),u=n.fullDataFormatter$.pipe(I(i),G(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(I(i),G(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return W({fullParams:n.fullParams$,tickTextAlign:u,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:s}).pipe(I(i),U(async h=>h)).subscribe(h=>{GN({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),wv="ScalingArea",UN=ft(wv,"rect"),YN=we(wv,Eh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new lt,a=e.insert("rect","g").classed(UN,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(u=>{a.attr("width",u.width).attr("height",u.height).attr("x",u.left).attr("y",u.top)});const c=r.computedData$.pipe(G(u=>u[0]?u[0].length-1:0),tt());return W({initGroupAxis:r.fullDataFormatter$.pipe(G(u=>u.groupAxis),ri()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:c,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),U(async u=>u)).subscribe(u=>{const h=u.groupMaxIndex,l=u.initGroupAxis.scaleDomain[0]==="auto"?0-u.initGroupAxis.scalePadding:u.initGroupAxis.scaleDomain[0]-u.initGroupAxis.scalePadding,p=u.initGroupAxis.scaleDomain[1]==="auto"?h+u.initGroupAxis.scalePadding:u.initGroupAxis.scaleDomain[1]+u.initGroupAxis.scalePadding,d=u.fullDataFormatter.valueAxis.position==="left"||u.fullDataFormatter.valueAxis.position==="top"?[0,1]:[1,0],m=fc({maxValue:u.groupMaxIndex,minValue:0,axisWidth:u.axisSize.width,scaleDomain:[l,p],scaleRange:d}).copy(),y=U2().on("zoom",function(v){const b=v.transform,M=T=>{const P=Math.round(T);return Math.min(h,Math.max(0,P))},_=u.fullDataFormatter.groupAxis.position==="bottom"||u.fullDataFormatter.groupAxis.position==="top"?b.rescaleX(m).domain().map(M):b.rescaleY(m).domain().map(M);_[0]<=0&&_[1]>=h?b.k<s.k&&(b.k=s.k,b.x=s.x,b.y=s.y):_[1]-_[0]<=1&&b.k>s.k&&(b.k=s.k,b.x=s.x,b.y=s.y),s.k=b.k,s.x=b.x,s.y=b.y,i.dataFormatter$.next({...u.fullDataFormatter,groupAxis:{...u.fullDataFormatter.groupAxis,scaleDomain:_}})});e.call(y)}),()=>{o.next(void 0),a.remove()}});function WN(t,e){let n=new at(()=>{});return t.each(function(){const r=Cu(this,e);n=Iu(n,r)}),n}const bh="GroupArea",vh=ft(bh,"label-box");function HN({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function qN({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ft(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",u=>Pt(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),c=a.merge(s);return a.exit().remove(),s.attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),a.transition().duration(50).attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),c}function XN(t){t.selectAll("line").data([]).exit().remove()}function VN({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:vu(t,n.labelTextFormat)}]:[]}function jN({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesOppositeTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${vh}`).data(e),s=a.enter().append("g").classed(vh,!0).style("cursor","pointer"),c=s.merge(a);return s.attr("transform",(u,f)=>`translate(${u.x}, ${u.y})`),a.transition().duration(50).attr("transform",(u,f)=>`translate(${u.x}, ${u.y})`),a.exit().remove(),c.each((u,f,h)=>{const l=H2(u.text,r.styles.textSize)+12,p=-l/2,d=K(h[f]).selectAll("rect").data([u]),g=d.enter().append("rect").attr("height",`${o}px`).attr("fill",x=>Pt(n.labelColorType,r)).attr("x",p).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");d.merge(g).attr("width",x=>`${l}px`).style("transform",i),d.exit().remove();const m=K(h[f]).selectAll("text").data([u]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(x=>x.text).style("transform",i).attr("fill",x=>Pt(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",p+6),m.exit().remove()}),c}function ZN(t){t.selectAll(`g.${vh}`).data([]).exit().remove()}const KN=we(bh,$h)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new lt,a=e.insert("rect","g").classed(ft(bh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.rootWidth).attr("height",l.rootHeight)}),i.gridAxesTransform$.pipe(I(o),G(l=>l.value),tt()).subscribe(l=>{s.style("transform",l)});const c=new at(l=>{W({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(o),U(async p=>p)).subscribe(p=>{const g=p.computedData[0]?p.computedData[0].length-1:0,m=p.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[0]-p.fullDataFormatter.groupAxis.scalePadding,y=p.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?g+p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[1]+p.fullDataFormatter.groupAxis.scalePadding,x=p.computedData[0]?p.computedData[0].length:0;let v=p.fullDataFormatter.grid.seriesType==="row"?(p.computedData[0]??[]).map(T=>T.groupLabel):p.computedData.map(T=>T[0].groupLabel);const b=new Array(x).fill(0).map((T,P)=>v[P]!=null?v[P]:String(P)).filter((T,P)=>P>=m&&P<=y),M=p.fullDataFormatter.groupAxis.scalePadding,_=Up({axisLabels:b,axisWidth:p.gridAxesSize.width,padding:M});l.next(_)})}),u=X2({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),f=i.fullChartParams$.pipe(I(o),G(l=>l.highlightTarget),tt());return W({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:u,groupScale:c}).pipe(I(o),U(async l=>l)).subscribe(l=>{e.on("mouseover",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mousemove",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mouseout",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("click",(p,d)=>{p.stopPropagation();const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})})}),W({event:r.event$.pipe(Lo(l=>l.eventName==="mouseover"||l.eventName==="mousemove")),computedData:i.computedData$,groupScale:c,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,gridAxesOppositeTransform:i.gridAxesOppositeTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:u}).pipe(I(o),U(async l=>l)).subscribe(l=>{const p=l.groupScale(l.event.groupLabel)??0,d=HN({groupLabel:l.event.groupLabel,axisX:p,axisHeight:l.gridAxesSize.height,fullParams:l.fullParams});qN({selection:s,pluginName:n,lineData:d,fullParams:l.fullParams,fullChartParams:l.fullChartParams});const g=VN({groupLabel:l.event.groupLabel,axisX:p,fullParams:l.fullParams});jN({selection:s,labelData:g,fullParams:l.fullParams,fullChartParams:l.fullChartParams,gridAxesOppositeTransformValue:l.gridAxesOppositeTransform.value}).on("mouseover",(y,x)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})}).on("mousemove",(y,x)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})}).on("mouseout",(y,x)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})}).on("click",(y,x)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})})}),WN(a,"mouseout").pipe(I(o)).subscribe(l=>{console.log("rootMouseout"),XN(s),ZN(s)}),()=>{o.next(void 0),a.remove()}}),Av={bars:{barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},lines:{lineCurve:"curveLinear",lineWidth:2}},Mv={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}]},So="BarsAndLines",QN=ft(So,"bars"),JN=ft(So,"lines"),tR=Yp(So,Av)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=t.append("g").attr("class",QN),a=t.append("g").attr("class",JN);let s=()=>{},c=()=>{};const u=r.computedData$.pipe(G(d=>d[0]||[])),f=r.computedData$.pipe(G(d=>d[1]||[])),h=r.fullParams$.pipe(G(d=>d.bars)),l=r.fullParams$.pipe(G(d=>d.lines)),p=r.fullDataFormatter$.pipe(G(d=>d.multiGrid[1]));return r.multiGrid$.subscribe(d=>{d[0]?s=ev(So,{selection:o,computedData$:u,visibleComputedData$:d[0].visibleComputedData$,SeriesDataMap$:d[0].SeriesDataMap$,GroupDataMap$:d[0].GroupDataMap$,fullParams$:h,fullChartParams$:r.fullChartParams$,gridAxesTransform$:d[0].gridAxesTransform$,gridGraphicTransform$:d[0].gridGraphicTransform$,gridAxesSize$:d[0].gridAxesSize$,gridHighlight$:d[0].gridHighlight$,event$:n.event$}):s(),d[1]?c=j2(So,{selection:a,computedData$:f,SeriesDataMap$:d[1].SeriesDataMap$,GroupDataMap$:d[1].GroupDataMap$,fullParams$:l,fullDataFormatter$:p,fullChartParams$:r.fullChartParams$,gridAxesTransform$:d[1].gridAxesTransform$,gridGraphicTransform$:d[1].gridGraphicTransform$,gridAxesSize$:d[1].gridAxesSize$,gridHighlight$:d[1].gridHighlight$,event$:n.event$}):c()}),()=>{i.next(void 0),s(),c()}}),$v="MultiGridLegend",eR=Yp($v,Mv)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new lt,o=n.multiGrid$.pipe(I(i),G(u=>u.map((h,l)=>h.SeriesDataMap$.pipe(G(p=>Array.from(p.keys()))))),U(u=>W(u)),G(u=>u.flat())),a=W({fullParams:n.fullParams$,multiGrid:n.multiGrid$,computedData:n.computedData$}).pipe(I(i),U(async u=>u),G(u=>u.computedData.map((f,h)=>{const l=u.fullParams.gridList[h]?u.fullParams.gridList[h]:{listRectWidth:u.fullParams.listRectWidth,listRectHeight:u.fullParams.listRectHeight,listRectRadius:u.fullParams.listRectRadius};return f.map(p=>l)}).flat())),s=W({fullParams:n.fullParams$,seriesList:a}).pipe(I(i),G(u=>({...u.fullParams,seriesList:u.seriesList}))),c=ph($v,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),c()}}),Sv={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},Tv={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.map(r=>r.value).join(",");return[e,n]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.groups.map(r=>r.value).join(",");return[e,n]}return[]},svgRenderFn:null},nR=Wp("Container",Sv)(({selection:t})=>function(){}),xh="Tooltip",Pv=ft(xh,"g"),rR=ft(xh,"box");function iR(t,e){const n=e.textSize*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 oR({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,c=i?[i]:[],u=i?[o]:[],h=t.selectAll(`g.${Pv}`).data(c).join(b=>b.append("g").classed(Pv,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${rR}`).data(u).join(b=>b.append("g").classed(ft(e,"box"),!0)),l=h.selectAll("rect").data(u).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(c).join(b=>b.append("g").classed(ft(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));c.length&&HL(p,c[0]);const d=p!=null&&p.node()?W2(p):{width:0,height:0};l.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=h!=null&&h.node()?W2(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 aR=Wp(xh,Tv)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new lt,s=o.event$.pipe(I(a),Lo(d=>d.eventName==="mouseover"||d.eventName==="mousemove")),c=o.event$.pipe(I(a),Lo(d=>d.eventName==="mouseout")),u=W({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(I(a),U(async d=>d),G(d=>({backgroundColor:Pt(d.fullParams.backgroundColorType,d.fullChartParams),backgroundOpacity:d.fullParams.backgroundOpacity,strokeColor:Pt(d.fullParams.strokeColorType,d.fullChartParams),offset:d.fullParams.offset,padding:d.fullParams.padding,textSize:d.fullChartParams.styles.textSize,textColor:Pt(d.fullParams.textColorType,d.fullChartParams)}))),f=W({fullParams:i.fullParams$,tooltipStyle:u}).pipe(I(a),U(async d=>d),G(d=>d.fullParams.svgRenderFn?d.fullParams.svgRenderFn:g=>{const m=d.fullParams.textRenderFn(g);return iR(m,d.tooltipStyle)})),h=W({event:s,contentRenderFn:f}).pipe(I(a),U(async d=>d),G(d=>d.contentRenderFn(d.event))),l=c.pipe(I(a),G(d=>"")),p=Iu(s,c).pipe(I(a),G(d=>d.event));return W({svgString:Iu(h,l),event:p,layout:i.layout$,tooltipStyle:u}).pipe(I(a),U(async d=>d)).subscribe(d=>{oR({rootSelection:e,pluginName:n,rootWidth:d.layout.rootWidth,rootHeight:d.layout.rootHeight,svgString:d.svgString,tooltipStyle:d.tooltipStyle,event:d.event})}),function(){a.next(void 0)}}),Dv={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},kv={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},Ev={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??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"}]},Lv={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},Nv={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};function sR(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 c(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 u(p){const d=c(p.trim());return Math.sqrt(d*r)}function f(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 M=(g.text?g.text+x:"")+p[v],_=c(M);(m+_)/2<d?(g.width=m=_,g.text=M):(m=c(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 l(p,d){o>0&&(d=s(d,o));const g=a(d),m=u(d),y=f(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),M=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(_,T)=>(T-y.length/2+.8)*r).text(_=>_.text);return b.exit().remove(),b.merge(M)}return l(t,e)}let nr;function uR(t,e){return m1().velocityDecay(e.force.velocityDecay).force("collision",p1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",y1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function cR({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function lR({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(p=>p.value!=null&&p.visible!=!1),s=Math.max(...a.map(p=>p.value)),c=a.reduce((p,d)=>p+(d.value??0),0)/a.length,u=cR({data:a,bubbleGroupR:o,maxValue:s,avgValue:c}),f=i==="area"?.5:1,h=Hs().domain([0,s]).range([0,u]).exponent(f);return a.map(p=>{const d=p,g=e.get(p.id);g?(d.x=g.x,d.y=g.y):(d.x=Math.random()*n,d.y=Math.random()*r);const m=h(d.value??0);return d.r=m,d._originR=m,d})}function Rv({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,s,c)=>{const u=K(c[s]);let f=!0;a.label.length<=n.bubbleText.lineLengthMin&&(f=!1),u.call(sR,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:f})}),o}function fR({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 hR(){return kd().on("start",(t,e)=>{t.active||nr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||nr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function Cv({fullParams:t,graphicWidth:e,graphicHeight:n}){nr.force("x",b1().strength(t.force.strength).x(0)).force("y",v1().strength(t.force.strength).y(0)),nr.alpha(1).restart()}function pR({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=K(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Wa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const dR=vi("Bubbles",Dv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g"),a=new lt;let s=new Map;n.layout$.pipe(ri()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(I(i)).subscribe(l=>{t.transition().attr("transform",`translate(${l.width/2}, ${l.height/2})`)})});const c=n.fullParams$.pipe(I(i),G(h=>h.bubbleScaleType),tt()),u=new at(h=>{W({layout:n.layout$,computedData:n.computedData$,scaleType:c}).pipe(I(i),U(async l=>l)).subscribe(l=>{const p=lR({data:l.computedData,LastBubbleDataMap:s,graphicWidth:l.layout.width,graphicHeight:l.layout.height,scaleType:l.scaleType});h.next(p)})});u.subscribe(h=>{s=new Map(h.map(l=>[l.id,l]))});const f=n.fullChartParams$.pipe(I(i),G(h=>h.highlightTarget),tt());return W({layout:n.layout$,computedData:n.computedData$,bubblesData:u,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:f}).pipe(I(i),U(async h=>h)).subscribe(h=>{const l=Rv({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});nr=uR(l,h.fullParams),l.on("mouseover",(p,d)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).call(hR()),nr.nodes(h.bubblesData),Cv({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(l)}),W({bubblesSelection:a,bubblesData:u,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(I(i),U(async h=>h)).subscribe(h=>{pR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(fR({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),Rv({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),Cv({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),nr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function Iv({computedDataSeries:t,startAngle:e,endAngle:n}){return e2().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}const Fv="Pie",gR=ft(Fv,"path");function mR({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,c)=>{const u=r[c]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+u.startAngle*(1-o),endAngle:s.endAngle*o+u.endAngle*(1-o),value:s.value*o+u.value*(1-o)}});return _h(a,i.startAngle,i.endAngle,1)}:o=>_h(n,i.startAngle,i.endAngle,o)}function _h(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 zv({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(gR,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(s,c)=>s.data.color).attr("d",(s,c)=>n(s)),o.remove(),a}function yR({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 c=K(s[a]);e.includes(o.data.id)?c.style("opacity",1).transition("highlight").ease(Wa).duration(500).attr("d",u=>i(u)):c.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",u=>r(u))})}const bR=vi(Fv,kv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g"),a=new lt;let s=[],c=[];n.layout$.pipe(ri()).subscribe(d=>{t.attr("transform",`translate(${d.width/2}, ${d.height/2})`),n.layout$.pipe(I(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const u=n.layout$.pipe(I(i),G(d=>d.width<d.height?d.width:d.height)),f=new at(d=>{W({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(I(i),U(async g=>g)).subscribe(g=>{const m=Iv({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});d.next(m)})}),h=new at(d=>{W({shorterSideWith:u,fullParams:n.fullParams$}).pipe(I(i),U(async g=>g)).subscribe(g=>{const m=bu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),l=new at(d=>{W({shorterSideWith:u,fullParams:n.fullParams$}).pipe(I(i),U(async g=>g)).subscribe(g=>{const m=bu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),p=n.fullChartParams$.pipe(I(i),G(d=>d.highlightTarget),tt());return W({pieData:f,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:l,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:p}).pipe(I(i),U(async d=>d)).subscribe(d=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(d.pieData,v=>v.data.id),m=g.enter(),y=g.exit();const x=mR({enter:m,exit:y,data:d.pieData,lastData:s,fullParams:d.fullParams});o.transition("graphicMove").duration(d.fullChartParams.transitionDuration).ease(Jr(d.fullChartParams.transitionEase)).tween("move",(v,b)=>M=>{c=x(M),zv({selection:o,renderData:c,arc:d.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData})}).on("end",(v,b)=>{c=_h(d.pieData,d.fullParams.startAngle,d.fullParams.endAngle,1);const M=zv({selection:o,renderData:c,arc:d.arc});a.next(M),s=Object.assign([],d.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData}),M.on("mouseover",(_,T)=>{_.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:d.highlightTarget,datum:T.data,series:d.SeriesDataMap.get(T.data.seriesLabel),seriesIndex:T.data.seriesIndex,seriesLabel:T.data.seriesLabel,event:_,data:d.computedData})}).on("mousemove",(_,T)=>{_.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:d.highlightTarget,datum:T.data,series:d.SeriesDataMap.get(T.data.seriesLabel),seriesIndex:T.data.seriesIndex,seriesLabel:T.data.seriesLabel,event:_,data:d.computedData})}).on("mouseout",(_,T)=>{_.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:d.highlightTarget,datum:T.data,series:d.SeriesDataMap.get(T.data.seriesLabel),seriesIndex:T.data.seriesIndex,seriesLabel:T.data.seriesLabel,event:_,data:d.computedData})}).on("click",(_,T)=>{_.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:d.highlightTarget,datum:T.data,series:d.SeriesDataMap.get(T.data.seriesLabel),seriesIndex:T.data.seriesIndex,seriesLabel:T.data.seriesLabel,event:_,data:d.computedData})})})}),W({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:l}).pipe(I(i),U(async d=>d)).subscribe(d=>{yR({pathSelection:d.pathSelection,ids:d.highlight,fullChartParams:d.fullChartParams,arc:d.arc,arcMouseover:d.arcMouseover})}),()=>{i.next(void 0)}}),Ov="PieEventTexts",Gv=ft(Ov,"text");function wh(t,e){const n=t.selectAll(`text.${Gv}`).data(e),r=n.enter().append("text").classed(Gv,!0),i=n.merge(r);return i.each((o,a,s)=>{const c=K(s[a]).text(o.text);Object.keys(o.attr).forEach(u=>{c.attr(u,o.attr[u])}),Object.keys(o.style).forEach(u=>{c.style(u,o.style[u])})}),n.exit().remove(),i}function Ah({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,c)=>({text:s,attr:i[c],style:o[c]}))}const vR=vi(Ov,Ev)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g");let a;n.layout$.pipe(ri()).subscribe(c=>{t.attr("transform",`translate(${c.width/2}, ${c.height/2})`),n.layout$.pipe(I(i)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})});const s=n.fullChartParams$.pipe(I(i),G(c=>c.highlightTarget),tt());return W({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(I(i),U(async c=>c)).subscribe(c=>{o.transition().duration(c.fullChartParams.transitionDuration).ease(Jr(c.fullChartParams.transitionEase)).tween("move",(u,f)=>h=>{const l=Ah({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:u,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});wh(o,l)}).on("end",(u,f)=>{const h=Ah({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:u,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});wh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(l=>{const p=Ah({eventData:l,eventName:l.eventName,t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});wh(o,p)})})}),()=>{i.next(void 0)}}),Bv="PieLabels",xR=ft(Bv,"text");function _R(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[c,u]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:c*r,mouseoverY:u*r}}).filter(i=>i.pieDatum.data.visible)}function wR(t,e,n,r){let i=t.selectAll("text").data(e,c=>c.pieDatum.id),o=i.enter().append("text").classed(xR,!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",c=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(c=>n.labelFn(c.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(c,u)=>hh({datum:c.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",c=>"translate("+c.x+","+c.y+")"),a.remove(),s}function AR({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=K(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+")")})}const MR=vi(Bv,Lv)(({selection:t,observer:e,subject:n})=>{const r=new lt,i=t.append("g");let o=new lt,a=[];return e.layout$.pipe(ri()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(I(r)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})}),W({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(r),U(async s=>s)).subscribe(s=>{const c=s.layout.width<s.layout.height?s.layout.width:s.layout.height,u=bu({axisWidth:c,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),f=bu({axisWidth:c,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=Iv({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=_R(h,u,f,s.fullParams.labelCentroid);const l=wR(i,a,s.fullParams,s.fullChartParams);o.next(l)}),W({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(I(r),U(async s=>s)).subscribe(s=>{AR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),Uv="SeriesLegend",$R=vi(Uv,Nv)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new lt,o=n.SeriesDataMap$.pipe(I(i),G(c=>Array.from(c.keys()))),a=n.fullParams$.pipe(I(i),G(c=>{const u=[{listRectWidth:c.listRectWidth,listRectHeight:c.listRectHeight,listRectRadius:c.listRectRadius}];return{...c,seriesList:u}})),s=ph(Uv,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}});et.BarStack=yN,et.Bars=cN,et.BarsAndLines=tR,et.BarsTriangle=TN,et.Bubbles=dR,et.CONTAINER_PLUGIN_PARAMS=Sv,et.Container=nR,et.DEFAULT_BARS_AND_LINES_PARAMS=Av,et.DEFAULT_BARS_PARAMS=Sh,et.DEFAULT_BARS_TRIANGLE_PARAMS=Ph,et.DEFAULT_BAR_STACK_PARAMS=Th,et.DEFAULT_BUBBLES_PARAMS=Dv,et.DEFAULT_DOTS_PARAMS=Mh,et.DEFAULT_GRID_LEGEND_PARAMS=Lh,et.DEFAULT_GROUPING_AXIS_PARAMS=Dh,et.DEFAULT_GROUP_AREA_PARAMS=$h,et.DEFAULT_LINES_PARAMS=rr,et.DEFAULT_MULTI_GRID_LEGEND_PARAMS=Mv,et.DEFAULT_PIE_EVENT_TEXTS_PARAMS=Ev,et.DEFAULT_PIE_LABELS_PARAMS=Lv,et.DEFAULT_PIE_PARAMS=kv,et.DEFAULT_SCALING_AREA_PARAMS=Eh,et.DEFAULT_SERIES_LEGEND_PARAMS=Nv,et.DEFAULT_VALUE_AXIS_PARAMS=_u,et.DEFAULT_VALUE_STACK_AXIS_PARAMS=kh,et.Dots=NN,et.GridLegend=CN,et.GroupArea=KN,et.GroupAxis=FN,et.Lines=eN,et.MultiGridLegend=eR,et.Pie=bR,et.PieEventTexts=vR,et.PieLabels=MR,et.ScalingArea=YN,et.SeriesLegend=$R,et.TOOLTIP_PARAMS=Tv,et.Tooltip=aR,et.ValueAxis=ON,et.ValueStackAxis=BN,Object.defineProperty(et,Symbol.toStringTag,{value:"Module"})});
12
+ `),r.exit().remove()}function $N({defsSelection:t,clipPathData:e}){const n=t.selectAll("clipPath").data(e),r=n.enter().append("clipPath");n.merge(r).attr("id",i=>i.id),n.exit().remove(),n.merge(r).each((i,o,a)=>{const s=K(a[o]).selectAll("rect").data([i]),c=s.enter().append("rect");s.merge(c).attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s.exit().remove()})}function SN({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)?K(a[o]).style("opacity",1):K(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const TN=(t,{selection:e,computedData$:n,SeriesDataMap$:r,GroupDataMap$:i,fullParams$:o,fullChartParams$:a,gridAxesTransform$:s,gridGraphicTransform$:c,gridAxesSize$:u,gridHighlight$:f,event$:h})=>{const l=new lt,p=ti(t,"clipPath-box"),d=e.append("g").attr("clip-path",`url(#${p})`),g=d.append("defs"),m=d.append("g"),y=new lt;s.pipe(I(l),G(A=>A.value),tt()).subscribe(A=>{d.style("transform",A)}),c.pipe(I(l),U(async A=>A.value),tt()).subscribe(A=>{m.transition().duration(50).style("transform",A)});const x=n.pipe(G(A=>A[0]&&A[0][0]?A[0][0].axisY-A[0][0].axisYFromZero:0),tt()),v=new at(A=>{W({computedData:n,params:o,axisSize:u}).pipe(U(async S=>S)).subscribe(S=>{const w=vN({axisWidth:S.axisSize.width,groupAmount:S.computedData[0]?S.computedData[0].length:0,barAmountOfGroup:S.computedData.length,barPadding:S.params.barPadding,barGroupPadding:S.params.barGroupPadding});A.next(w)})}).pipe(I(l),tt()),b=n.pipe(I(l),G(A=>A.map((S,w)=>S[0]?S[0].seriesLabel:String(w)))),M=n.pipe(I(l),G(A=>A[0]?A[0].map(S=>S.groupLabel):[])),_=new at(A=>{W({seriesLabels:b,barWidth:v,params:o}).pipe(I(l),U(async S=>S)).subscribe(S=>{const w=xN(S.barWidth,S.seriesLabels,S.params);A.next(w)})}),$=a.pipe(I(l),G(A=>A.transitionDuration),tt()),D=new at(A=>{W({groupLabels:M,transitionDuration:$}).pipe(U(async S=>S)).subscribe(S=>{const w=_N(S.groupLabels.length,S.transitionDuration);A.next(w)})}).pipe(I(l),tt()),E=new at(A=>{W({groupLabels:M,transitionDuration:$}).pipe(U(async S=>S)).subscribe(S=>{const w=wN(S.groupLabels.length,S.transitionDuration);A.next(w)})}).pipe(I(l),tt()),T=n.pipe(I(l),G(A=>{const S=A.length,w=A.reduce((L,R)=>Math.max(L,R.length),0),k=new Array(w).fill(null).map(()=>new Array(S).fill(null));for(let L=0;L<S;L++)for(let R=0;R<w;R++)k[R][L]=A[L][R];return k})).pipe(I(l),G(A=>{const S=A.length?A[0].map(w=>ti(t,`lineargradient-${w.seriesLabel}`)):[];return A.map(w=>w.map((k,L)=>({linearGradientId:S[L],...k})))}));u.pipe(I(l)).subscribe(A=>{const S=[{id:p,width:A.width,height:A.height}];$N({defsSelection:g,clipPathData:S})});const C=a.pipe(I(l),G(A=>A.highlightTarget),tt());W({barData:T,computedData:n,zeroY:x,groupLabels:M,barScale:_,params:o,chartParams:a,highlightTarget:C,barWidth:v,delayGroup:D,transitionItem:E,SeriesDataMap:r,GroupDataMap:i}).pipe(I(l),U(async A=>A)).subscribe(A=>{const S=AN({selection:m,barData:A.barData,zeroY:A.zeroY,groupLabels:A.groupLabels,barScale:A.barScale,params:A.params,chartParams:A.chartParams,barWidth:A.barWidth,delayGroup:A.delayGroup,transitionItem:A.transitionItem});MN({defsSelection:g,barData:A.barData,params:A.params}),S.on("mouseover",(w,k)=>{w.stopPropagation(),h.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:k,series:A.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:A.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:w,data:A.computedData})}).on("mousemove",(w,k)=>{w.stopPropagation(),h.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,datum:k,series:A.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:A.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:w,data:A.computedData})}).on("mouseout",(w,k)=>{w.stopPropagation(),h.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:k,series:A.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:A.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:w,data:A.computedData})}).on("click",(w,k)=>{w.stopPropagation(),h.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:k,series:A.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:A.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:w,data:A.computedData})}),y.next(S)});const N=f.subscribe();return W({pathSelection:y,highlight:f,fullChartParams:a}).pipe(I(l),U(async A=>A)).subscribe(A=>{SN({selection:A.pathSelection,ids:A.highlight,fullChartParams:A.fullChartParams})}),()=>{l.next(void 0),N.unsubscribe()}},fv="BarsTriangle",DN=we(fv,Dh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=TN(fv,{selection:t,computedData$:r.computedData$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,event$:n.event$});return()=>{i.next(void 0),o()}}),hv="Dots",PN=ft(hv,"g"),kN=ft(hv,"circle");function EN({selection:t,data:e,fullParams:n,fullChartParams:r,graphicOppositeScale:i}){const o=c=>{const u=c.size();return r.transitionDuration/u};let a=0;return t.selectAll("g").data(e,c=>c.id).join(c=>(a=o(c),c.append("g").classed(PN,!0)),c=>c,c=>c.remove()).attr("transform",c=>`translate(${c.axisX}, ${c.axisY})`).each((c,u,f)=>{K(f[u]).selectAll("circle").data([c]).join(h=>h.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(kN,!0).attr("opacity",0).transition().delay((l,p)=>u*a).attr("opacity",1),h=>h.transition().duration(50).attr("opacity",1),h=>h.remove()).attr("r",n.radius).attr("fill",(h,l)=>hh({datum:h,colorType:n.fillColorType,fullChartParams:r})).attr("stroke",(h,l)=>hh({datum:h,colorType:n.strokeColorType,fullChartParams:r})).attr("stroke-width",n.strokeWidth).attr("transform",`scale(${i[0]}, ${i[1]})`)})}function LN({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)?K(a[o]).style("opacity",1).transition("highlight").duration(200):K(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function NN({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)=>{K(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 RN=(t,{selection:e,computedData$:n,visibleComputedData$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullChartParams$:s,gridAxesTransform$:c,gridGraphicTransform$:u,gridAxesSize$:f,gridHighlight$:h,event$:l})=>{const p=new lt,d=ti(t,"clipPath-box"),g=e.append("g").attr("clip-path",`url(#${d})`),m=g.append("defs"),y=g.append("g"),x=new lt;c.pipe(I(p),G($=>$.value),tt()).subscribe($=>{g.style("transform",$)}),u.pipe(I(p),U(async $=>$.value),tt()).subscribe($=>{y.transition().duration(50).style("transform",$)});const v=u.pipe(I(p),G($=>[1/$.scale[0],1/$.scale[1]]));f.pipe(I(p),U(async $=>$)).subscribe($=>{const D=[{id:d,width:$.width,height:$.height}];NN({defsSelection:m,clipPathData:D})});const b=s.pipe(I(p),G($=>$.highlightTarget),tt());W({computedData:n,visibleComputedData:r,SeriesDataMap:i,GroupDataMap:o,graphicOppositeScale:v,fullChartParams:s,fullParams:a,highlightTarget:b}).pipe(I(p),U(async $=>$)).subscribe($=>{const D=EN({selection:y,data:$.visibleComputedData.flat(),fullParams:$.fullParams,fullChartParams:$.fullChartParams,graphicOppositeScale:$.graphicOppositeScale});D.on("mouseover",(E,P)=>{E.stopPropagation(),l.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:$.highlightTarget,datum:P,series:$.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:$.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:E,data:$.computedData})}).on("mousemove",(E,P)=>{E.stopPropagation(),l.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:$.highlightTarget,data:$.computedData,datum:P,series:$.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:$.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:E})}).on("mouseout",(E,P)=>{E.stopPropagation(),l.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:$.highlightTarget,datum:P,series:$.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:$.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:E,data:$.computedData})}).on("click",(E,P)=>{E.stopPropagation(),l.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:$.highlightTarget,datum:P,series:$.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:$.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:E,data:$.computedData})}),x.next(D)});const M=h.subscribe(),_=a.pipe(I(p),G($=>$.onlyShowHighlighted),tt());return s.pipe(I(p),U($=>W({graphicSelection:x,highlight:h,onlyShowHighlighted:_,fullChartParams:s}).pipe(I(p),U(async D=>D)))).subscribe($=>{LN({selection:$.graphicSelection,ids:$.highlight,onlyShowHighlighted:$.onlyShowHighlighted,fullChartParams:$.fullChartParams})}),()=>{p.next(void 0),M.unsubscribe()}},pv="Dots",CN=we(pv,Mh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=RN(pv,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,event$:n.event$});return()=>{i.next(void 0),o()}}),IN={listRectWidth:14,listRectHeight:14,listRectRadius:0},ph=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=ft(t,"root-position"),s=ft(t,"legend-card"),c=ft(t,"legend-list"),u=ft(t,"legend-item"),f=new lt,h=r.pipe(I(f),G(_=>_.position==="bottom"||_.position==="top"?"row":"column")),l=W({fullParams:r,layout:i}).pipe(I(f),U(async _=>_),G(_=>{const $=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-$:_.layout.rootHeight-$})),d=W({layout:i,fullParams:r}).pipe(I(f),U(async _=>_),G(_=>{let $=0,D=0;return _.fullParams.position==="bottom"?(D=_.layout.rootHeight,_.fullParams.justify==="start"?$=0:_.fullParams.justify==="center"?$=_.layout.rootWidth/2:_.fullParams.justify==="end"&&($=_.layout.rootWidth)):_.fullParams.position==="right"?($=_.layout.rootWidth,_.fullParams.justify==="start"?D=0:_.fullParams.justify==="center"?D=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(D=_.layout.rootHeight)):_.fullParams.position==="top"?(D=0,_.fullParams.justify==="start"?$=0:_.fullParams.justify==="center"?$=_.layout.rootWidth/2:_.fullParams.justify==="end"&&($=_.layout.rootWidth)):_.fullParams.position==="left"&&($=0,_.fullParams.justify==="start"?D=0:_.fullParams.justify==="center"?D=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(D=_.layout.rootHeight)),{x:$,y:D}})).pipe(I(f),G(_=>e.selectAll(`g.${a}`).data([_]).join($=>$.append("g").classed(a,!0).attr("transform",D=>`translate(${D.x}, ${D.y})`),$=>$.transition().attr("transform",D=>`translate(${D.x}, ${D.y})`),$=>$.remove()))),g=r.pipe(I(f),G(_=>_.seriesList[0]?_.seriesList[0]:IN)),m=W({fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:h,lineMaxSize:l,defaultListStyle:g}).pipe(I(f),U(async _=>_),G(_=>_.seriesLabels.reduce(($,D,E)=>{const P=W2(D,_.fullChartParams.styles.textSize),T=_.fullChartParams.styles.textSize*1.5+P,C=VL(E,_.fullChartParams),N=$[0]&&$[0][0]?$[$.length-1][$[$.length-1].length-1]:null,{translateX:A,translateY:S,lineIndex:w,itemIndex:k}=((R,F,z)=>{let Y=0,rt=0,Z=0,J=0;if(R.lineDirection==="column"){let ht=z?z.translateY+R.fullChartParams.styles.textSize+R.fullParams.gap:0;if(ht+R.fullChartParams.styles.textSize>R.lineMaxSize){Z=z.lineIndex+1,J=0,rt=0;const q=F[F.length-1].reduce((pt,B)=>B.itemWidth>pt?B.itemWidth:pt,0);Y=z.translateX+q+R.fullParams.gap}else Z=z?z.lineIndex:0,J=z?z.itemIndex+1:0,rt=ht,Y=z?z.translateX:0}else{let ht=z?z.translateX+z.itemWidth+R.fullParams.gap:0;ht+T>R.lineMaxSize?(Z=z.lineIndex+1,J=0,Y=0):(Z=z?z.lineIndex:0,J=z?z.itemIndex+1:0,Y=ht),rt=(R.fullChartParams.styles.textSize+R.fullParams.gap)*Z}return{translateX:Y,translateY:rt,lineIndex:Z,itemIndex:J}})(_,$,N);$[w]||($[w]=[]);const L=_.fullParams.seriesList[k]?_.fullParams.seriesList[k]:_.defaultListStyle;return $[w].push({id:D,seriesLabel:D,seriesIndex:E,lineIndex:w,itemIndex:k,text:D,itemWidth:T,translateX:A,translateY:S,color:C,listRectWidth:L.listRectWidth,listRectHeight:L.listRectHeight,listRectRadius:L.listRectRadius}),$},[]))),y=W({fullParams:r,fullChartParams:o,lineDirection:h,lengendItems:m}).pipe(I(f),U(async _=>_),G(_=>{const{width:$,height:D}=((E,P)=>{let T=0,C=0;if(!P.length||!P[0].length)return{width:T,height:C};const N=P[0][P[0].length-1];return E.lineDirection==="column"?(T=P.reduce((A,S)=>{const w=S.reduce((k,L)=>L.itemWidth>k?L.itemWidth:k,0);return A+w},0),T+=E.fullParams.gap*(P.length-1),C=N.translateY+E.fullChartParams.styles.textSize):(T=N.translateX+N.itemWidth,C=E.fullChartParams.styles.textSize*P.length+E.fullParams.gap*(P.length-1)),{width:T,height:C}})(_,_.lengendItems);return{direction:_.lineDirection,width:$,height:D,translateX:_.fullParams.gap,translateY:_.fullParams.gap}})),x=W({fullParams:r,lengendList:y}).pipe(I(f),U(async _=>_),G(_=>{const $=_.lengendList.width+_.fullParams.gap*2,D=_.lengendList.height+_.fullParams.gap*2;let E=0,P=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(E=_.fullParams.padding,P=_.fullParams.padding):_.fullParams.justify==="center"?(E=_.fullParams.padding,P=-D/2):_.fullParams.justify==="end"&&(E=_.fullParams.padding,P=-D-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(E=-$-_.fullParams.padding,P=_.fullParams.padding):_.fullParams.justify==="center"?(E=-$-_.fullParams.padding,P=-D/2):_.fullParams.justify==="end"&&(E=-$-_.fullParams.padding,P=-D-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(E=_.fullParams.padding,P=_.fullParams.padding):_.fullParams.justify==="center"?(E=-$/2,P=_.fullParams.padding):_.fullParams.justify==="end"&&(E=-$-_.fullParams.padding,P=_.fullParams.padding):_.fullParams.justify==="start"?(E=_.fullParams.padding,P=-D-_.fullParams.padding):_.fullParams.justify==="center"?(E=-$/2,P=-D-_.fullParams.padding):_.fullParams.justify==="end"&&(E=-$-_.fullParams.padding,P=-D-_.fullParams.padding),{width:$,height:D,translateX:E,translateY:P}})),v=W({rootPositionSelection:d,fullParams:r,fullChartParams:o,legendCard:x}).pipe(I(f),U(async _=>_),G(_=>_.rootPositionSelection.selectAll("g").data([_.legendCard]).join($=>$.append("g").classed(s,!0).attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),$=>$.transition().attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),$=>$.remove()).each(($,D,E)=>{K(E[D]).selectAll("rect").data([$]).join("rect").attr("width",P=>P.width).attr("height",P=>P.height).attr("fill",Dt(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Dt(_.fullParams.backgroundStroke,_.fullChartParams))}))),b=W({lengendCardSelection:v,fullParams:r,lengendList:y}).pipe(I(f),U(async _=>_),G(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join($=>$.append("g").classed(c,!0).attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),$=>$.transition().attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),$=>$.remove())));return W({lengendListSelection:b,fullParams:r,fullChartParams:o,lengendItems:m}).pipe(I(f),U(async _=>_),G(_=>{const $=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${u}`).data($).join(D=>D.append("g").classed(u,!0).attr("cursor","default"),D=>D,D=>D.remove()).attr("transform",(D,E)=>`translate(${D.translateX}, ${D.translateY})`).each((D,E,P)=>{const T=_.fullChartParams.styles.textSize/2,C=-D.listRectWidth/2,N=-D.listRectHeight/2;K(P[E]).selectAll("rect").data([D]).join("rect").attr("x",T).attr("y",T).attr("width",A=>A.listRectWidth).attr("height",A=>A.listRectHeight).attr("transform",A=>`translate(${C}, ${N})`).attr("fill",A=>A.color).attr("rx",A=>A.listRectRadius),K(P[E]).selectAll("text").data([D]).join(A=>A.append("text").attr("dominant-baseline","hanging"),A=>A,A=>A.remove()).attr("x",_.fullChartParams.styles.textSize*1.5).attr("font-size",_.fullChartParams.styles.textSize).text(A=>A.text)})})).subscribe(),()=>{f.next(void 0)}},dv="GridLegend",FN=we(dv,Lh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new lt,o=n.SeriesDataMap$.pipe(I(i),G(c=>Array.from(c.keys()))),a=n.fullParams$.pipe(I(i),G(c=>{const u=[{listRectWidth:c.listRectWidth,listRectHeight:c.listRectHeight,listRectRadius:c.listRectRadius}];return{...c,seriesList:u}})),s=ph(dv,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),dh="GroupAxis",gv=ft(dh,"xAxis"),mv=ft(dh,"groupingLabel"),gh=6;function zN({selection:t,params:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:s,contentTransform:c}){const u=t.selectAll(`g.${gv}`).data([e]).join("g").classed(gv,!0);t.selectAll(`g.${mv}`).data([e]).join("g").classed(mv,!0).each((l,p,d)=>{K(d[p]).selectAll("text").data([l]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Dt(e.labelColorType,a)).style("transform",c).text(g=>o.groupAxis.label)}).attr("transform",l=>`translate(${i.width+l.tickPadding+e.labelOffset[0]}, ${-l.tickPadding-gh-e.labelOffset[1]})`);const f=yd(s).scale(s).tickSize(e.tickFullLine==!0?-i.height:gh).tickSizeOuter(0).tickFormat(l=>vu(l,e.tickFormat)).tickPadding(e.tickPadding),h=u.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Dt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Dt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),u.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Dt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`0 -${e.tickPadding+gh}`).style("transform",c),u}const ON=we(dh,Ph)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g");n.gridAxesTransform$.pipe(I(i),G(f=>f.value),tt()).subscribe(f=>{o.style("transform",f).attr("opacity",0).transition().attr("opacity",1)});const a=W({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(I(i),U(async f=>{const h=f.gridAxesOppositeTransform.rotate+f.fullParams.tickTextRotate;return`translate(${f.gridAxesOppositeTransform.translate[0]}px, ${f.gridAxesOppositeTransform.translate[1]}px) rotate(${h}deg) rotateX(${f.gridAxesOppositeTransform.rotateX}deg) rotateY(${f.gridAxesOppositeTransform.rotateY}deg)`}),tt()),s=new at(f=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(I(i),U(async h=>h)).subscribe(h=>{const p=h.computedData[0]?h.computedData[0].length-1:0,d=h.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[0]-h.fullDataFormatter.groupAxis.scalePadding,g=h.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?p+h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[1]+h.fullDataFormatter.groupAxis.scalePadding,m=h.computedData[0]?h.computedData[0].length:0;let y=h.fullDataFormatter.grid.seriesType==="row"?(h.computedData[0]??[]).map(M=>M.groupLabel):h.computedData.map(M=>M[0].groupLabel);const x=new Array(m).fill(0).map((M,_)=>y[_]!=null?y[_]:String(_)).filter((M,_)=>_>=d&&_<=g),v=h.fullDataFormatter.groupAxis.scalePadding,b=Bp({axisLabels:x,axisWidth:h.gridAxesSize.width,padding:v});f.next(b)})}),c=n.fullDataFormatter$.pipe(I(i),G(f=>{let h="middle",l="hanging";return f.groupAxis.position==="bottom"?(h="middle",l="hanging"):f.groupAxis.position==="top"?(h="middle",l="auto"):f.groupAxis.position==="left"?(h="end",l="middle"):f.groupAxis.position==="right"&&(h="start",l="middle"),{textAnchor:h,dominantBaseline:l}})),u=n.fullDataFormatter$.pipe(I(i),G(f=>{let h="start",l="hanging";return f.groupAxis.position==="bottom"?l="hanging":f.groupAxis.position==="top"?l="auto":f.groupAxis.position==="left"?h="end":f.groupAxis.position==="right"&&(h="start"),f.valueAxis.position==="left"?h="start":f.valueAxis.position==="right"?h="end":f.valueAxis.position==="bottom"?l="auto":f.valueAxis.position==="top"&&(l="hanging"),{textAnchor:h,dominantBaseline:l}}));return W({params:n.fullParams$,tickTextAlign:c,axisLabelAlign:u,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,chartParams:n.fullChartParams$,groupScale:s,contentTransform:a}).pipe(I(i),U(async f=>f)).subscribe(f=>{zN({selection:o,params:f.params,tickTextAlign:f.tickTextAlign,axisLabelAlign:f.axisLabelAlign,gridAxesSize:f.gridAxesSize,fullDataFormatter:f.fullDataFormatter,chartParams:f.chartParams,groupScale:f.groupScale,contentTransform:f.contentTransform})}),()=>{i.next(void 0)}}),mh="ValueAxis",yv=ft(mh,"g"),bv=ft(mh,"text"),vv=6;function GN({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,contentTransform:c,minAndMax:u}){const f=t.selectAll(`g.${yv}`).data([e]).join("g").classed(yv,!0);t.selectAll(`g.${bv}`).data([e]).join("g").classed(bv,!0).each((g,m,y)=>{K(y[m]).selectAll("text").data([g]).join(x=>x.append("text").style("font-weight","bold"),x=>x,x=>x.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Dt(e.labelColorType,a)).style("transform",c).text(x=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=u[1]-u[0],l=Ac(s).scale(s).ticks(h>e.ticks?e.ticks:u[0]===0&&u[1]===0?1:Math.ceil(h)).tickFormat(g=>vu(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:vv).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Dt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Dt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Dt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+vv} 0`).style("transform",c),f}const BN=we(mh,xu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g");n.gridAxesTransform$.pipe(I(i),G(h=>h.value),tt()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=W({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(I(i),U(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),tt()),s=new at(h=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(I(i),U(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((v,b)=>v.filter((M,_)=>_>=g&&_<=m)),x=XL(y.flat());h.next(x)})}),c=new at(h=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:s}).pipe(I(i),U(async l=>l)).subscribe(l=>{const p=fc({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),u=n.fullDataFormatter$.pipe(I(i),G(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(I(i),G(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return W({fullParams:n.fullParams$,tickTextAlign:u,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:s}).pipe(I(i),U(async h=>h)).subscribe(h=>{GN({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),yh="ValueStackAxis",xv=ft(yh,"g"),_v=ft(yh,"text"),wv=6;function UN({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,contentTransform:c,minAndMax:u}){const f=t.selectAll(`g.${xv}`).data([e]).join("g").classed(xv,!0);t.selectAll(`g.${_v}`).data([e]).join("g").classed(_v,!0).each((g,m,y)=>{K(y[m]).selectAll("text").data([g]).join(x=>x.append("text").style("font-weight","bold"),x=>x,x=>x.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Dt(e.labelColorType,a)).style("transform",c).text(x=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=u[1]-u[0],l=Ac(s).scale(s).ticks(h>e.ticks?e.ticks:u[0]===0&&u[1]===0?1:Math.ceil(h)).tickFormat(g=>vu(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:wv).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Dt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Dt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Dt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+wv} 0`).style("transform",c),f}const YN=we(yh,kh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g");n.gridAxesTransform$.pipe(I(i),G(h=>h.value),tt()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=W({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(I(i),U(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),tt()),s=new at(h=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(I(i),U(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((b,M)=>b.filter((_,$)=>$>=g&&$<=m)),x=new Array(y[0]?y[0].length:0).fill(null).map((b,M)=>y.reduce((_,$)=>{if($&&$[M]){const D=$[M].value==null||$[M].visible==!1?0:$[M].value;return _+D}return _},0)),v=q2(x);h.next(v)})}),c=new at(h=>{W({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:s}).pipe(I(i),U(async l=>l)).subscribe(l=>{const p=fc({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),u=n.fullDataFormatter$.pipe(I(i),G(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(I(i),G(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return W({fullParams:n.fullParams$,tickTextAlign:u,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:s}).pipe(I(i),U(async h=>h)).subscribe(h=>{UN({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),Av="ScalingArea",WN=ft(Av,"rect"),qN=we(Av,Eh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new lt,a=e.insert("rect","g").classed(WN,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(u=>{a.attr("width",u.width).attr("height",u.height).attr("x",u.left).attr("y",u.top)});const c=r.computedData$.pipe(G(u=>u[0]?u[0].length-1:0),tt());return W({initGroupAxis:r.fullDataFormatter$.pipe(G(u=>u.groupAxis),ri()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:c,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),U(async u=>u)).subscribe(u=>{const h=u.groupMaxIndex,l=u.initGroupAxis.scaleDomain[0]==="auto"?0-u.initGroupAxis.scalePadding:u.initGroupAxis.scaleDomain[0]-u.initGroupAxis.scalePadding,p=u.initGroupAxis.scaleDomain[1]==="auto"?h+u.initGroupAxis.scalePadding:u.initGroupAxis.scaleDomain[1]+u.initGroupAxis.scalePadding,d=u.fullDataFormatter.valueAxis.position==="left"||u.fullDataFormatter.valueAxis.position==="top"?[0,1]:[1,0],m=fc({maxValue:u.groupMaxIndex,minValue:0,axisWidth:u.axisSize.width,scaleDomain:[l,p],scaleRange:d}).copy(),y=B2().on("zoom",function(v){const b=v.transform,M=$=>{const D=Math.round($);return Math.min(h,Math.max(0,D))},_=u.fullDataFormatter.groupAxis.position==="bottom"||u.fullDataFormatter.groupAxis.position==="top"?b.rescaleX(m).domain().map(M):b.rescaleY(m).domain().map(M);_[0]<=0&&_[1]>=h?b.k<s.k&&(b.k=s.k,b.x=s.x,b.y=s.y):_[1]-_[0]<=1&&b.k>s.k&&(b.k=s.k,b.x=s.x,b.y=s.y),s.k=b.k,s.x=b.x,s.y=b.y,i.dataFormatter$.next({...u.fullDataFormatter,groupAxis:{...u.fullDataFormatter.groupAxis,scaleDomain:_}})});e.call(y)}),()=>{o.next(void 0),a.remove()}});function HN(t,e){let n=new at(()=>{});return t.each(function(){const r=Ru(this,e);n=Cu(n,r)}),n}const bh="GroupArea",vh=ft(bh,"label-box");function XN({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function VN({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ft(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",u=>Dt(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),c=a.merge(s);return a.exit().remove(),s.attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),a.transition().duration(50).attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),c}function jN(t){t.selectAll("line").data([]).exit().remove()}function ZN({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:vu(t,n.labelTextFormat)}]:[]}function KN({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesOppositeTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${vh}`).data(e),s=a.enter().append("g").classed(vh,!0).style("cursor","pointer"),c=s.merge(a);return s.attr("transform",(u,f)=>`translate(${u.x}, ${u.y})`),a.transition().duration(50).attr("transform",(u,f)=>`translate(${u.x}, ${u.y})`),a.exit().remove(),c.each((u,f,h)=>{const l=W2(u.text,r.styles.textSize)+12,p=-l/2,d=K(h[f]).selectAll("rect").data([u]),g=d.enter().append("rect").attr("height",`${o}px`).attr("fill",x=>Dt(n.labelColorType,r)).attr("x",p).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");d.merge(g).attr("width",x=>`${l}px`).style("transform",i),d.exit().remove();const m=K(h[f]).selectAll("text").data([u]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(x=>x.text).style("transform",i).attr("fill",x=>Dt(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",p+6),m.exit().remove()}),c}function QN(t){t.selectAll(`g.${vh}`).data([]).exit().remove()}const JN=we(bh,$h)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new lt,a=e.insert("rect","g").classed(ft(bh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.rootWidth).attr("height",l.rootHeight)}),i.gridAxesTransform$.pipe(I(o),G(l=>l.value),tt()).subscribe(l=>{s.style("transform",l)});const c=new at(l=>{W({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(o),U(async p=>p)).subscribe(p=>{const g=p.computedData[0]?p.computedData[0].length-1:0,m=p.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[0]-p.fullDataFormatter.groupAxis.scalePadding,y=p.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?g+p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[1]+p.fullDataFormatter.groupAxis.scalePadding,x=p.computedData[0]?p.computedData[0].length:0;let v=p.fullDataFormatter.grid.seriesType==="row"?(p.computedData[0]??[]).map($=>$.groupLabel):p.computedData.map($=>$[0].groupLabel);const b=new Array(x).fill(0).map(($,D)=>v[D]!=null?v[D]:String(D)).filter(($,D)=>D>=m&&D<=y),M=p.fullDataFormatter.groupAxis.scalePadding,_=Bp({axisLabels:b,axisWidth:p.gridAxesSize.width,padding:M});l.next(_)})}),u=H2({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),f=i.fullChartParams$.pipe(I(o),G(l=>l.highlightTarget),tt());return W({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:u,groupScale:c}).pipe(I(o),U(async l=>l)).subscribe(l=>{e.on("mouseover",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mousemove",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mouseout",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("click",(p,d)=>{p.stopPropagation();const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})})}),W({event:r.event$.pipe(Lo(l=>l.eventName==="mouseover"||l.eventName==="mousemove")),computedData:i.computedData$,groupScale:c,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,gridAxesOppositeTransform:i.gridAxesOppositeTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:u}).pipe(I(o),U(async l=>l)).subscribe(l=>{const p=l.groupScale(l.event.groupLabel)??0,d=XN({groupLabel:l.event.groupLabel,axisX:p,axisHeight:l.gridAxesSize.height,fullParams:l.fullParams});VN({selection:s,pluginName:n,lineData:d,fullParams:l.fullParams,fullChartParams:l.fullChartParams});const g=ZN({groupLabel:l.event.groupLabel,axisX:p,fullParams:l.fullParams});KN({selection:s,labelData:g,fullParams:l.fullParams,fullChartParams:l.fullChartParams,gridAxesOppositeTransformValue:l.gridAxesOppositeTransform.value}).on("mouseover",(y,x)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})}).on("mousemove",(y,x)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})}).on("mouseout",(y,x)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})}).on("click",(y,x)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})})}),HN(a,"mouseout").pipe(I(o)).subscribe(l=>{console.log("rootMouseout"),jN(s),QN(s)}),()=>{o.next(void 0),a.remove()}}),Mv={bars:{barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},lines:{lineCurve:"curveLinear",lineWidth:2}},$v={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}]},tR={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""},eR={position:"bottom",scaleDomain:[0,"auto"],scalePadding:.5,label:""},nR={type:"grid",visibleFilter:(t,e,n,r)=>!0,grid:{rowLabels:[],columnLabels:[],seriesType:"row"},valueAxis:{...tR},groupAxis:{...eR}},rR={type:"multiGrid",visibleFilter:(t,e,n,r)=>!0,multiGrid:[{...nR}]},So="BarsAndLines",iR=ft(So,"bars"),oR=ft(So,"lines"),aR=Up(So,Mv)(({selection:t,name:e,subject:n,observer:r})=>{const i=new lt,o=t.append("g").attr("class",iR),a=t.append("g").attr("class",oR);let s=()=>{},c=()=>{};const u=r.computedData$.pipe(I(i),G(g=>g[0]||[])),f=r.computedData$.pipe(I(i),G(g=>g[1]||[])),h=r.fullParams$.pipe(I(i),G(g=>g.bars)),l=r.fullParams$.pipe(I(i),G(g=>g.lines)),p=r.fullDataFormatter$.pipe(I(i),G(g=>g.multiGrid[0]||rR.multiGrid[0])),d=W({fullDataFormatter:r.fullDataFormatter$,defaultFullDataFormatter:p}).pipe(I(i),G(g=>g.fullDataFormatter.multiGrid[1]??g.defaultFullDataFormatter));return r.multiGrid$.subscribe(g=>{g[0]?s=tv(So,{selection:o,computedData$:u,visibleComputedData$:g[0].visibleComputedData$,SeriesDataMap$:g[0].SeriesDataMap$,GroupDataMap$:g[0].GroupDataMap$,fullParams$:h,fullChartParams$:r.fullChartParams$,gridAxesTransform$:g[0].gridAxesTransform$,gridGraphicTransform$:g[0].gridGraphicTransform$,gridAxesSize$:g[0].gridAxesSize$,gridHighlight$:g[0].gridHighlight$,event$:n.event$}):s(),g[1]?c=V2(So,{selection:a,computedData$:f,SeriesDataMap$:g[1].SeriesDataMap$,GroupDataMap$:g[1].GroupDataMap$,fullParams$:l,fullDataFormatter$:d,fullChartParams$:r.fullChartParams$,gridAxesTransform$:g[1].gridAxesTransform$,gridGraphicTransform$:g[1].gridGraphicTransform$,gridAxesSize$:g[1].gridAxesSize$,gridHighlight$:g[1].gridHighlight$,event$:n.event$}):c()}),()=>{i.next(void 0),s(),c()}}),Sv="MultiGridLegend",sR=Up(Sv,$v)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new lt,o=n.multiGrid$.pipe(I(i),G(u=>u.map((h,l)=>h.SeriesDataMap$.pipe(G(p=>Array.from(p.keys()))))),U(u=>W(u)),G(u=>u.flat())),a=W({fullParams:n.fullParams$,multiGrid:n.multiGrid$,computedData:n.computedData$}).pipe(I(i),U(async u=>u),G(u=>u.computedData.map((f,h)=>{const l=ec(u.fullParams.gridList[h]??{},{listRectWidth:u.fullParams.listRectWidth,listRectHeight:u.fullParams.listRectHeight,listRectRadius:u.fullParams.listRectRadius});return f.map(p=>l)}).flat())),s=W({fullParams:n.fullParams$,seriesList:a}).pipe(I(i),U(async u=>u),G(u=>(console.log("fullParams",u),{...u.fullParams,seriesList:u.seriesList})));s.subscribe(u=>{console.log("subscription")});const c=ph(Sv,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),c()}}),Tv={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},Dv={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.map(r=>r.value).join(",");return[e,n]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.groups.map(r=>r.value).join(",");return[e,n]}return[]},svgRenderFn:null},uR=Yp("Container",Tv)(({selection:t})=>function(){}),xh="Tooltip",Pv=ft(xh,"g"),cR=ft(xh,"box");function lR(t,e){const n=e.textSize*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 fR({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,c=i?[i]:[],u=i?[o]:[],h=t.selectAll(`g.${Pv}`).data(c).join(b=>b.append("g").classed(Pv,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${cR}`).data(u).join(b=>b.append("g").classed(ft(e,"box"),!0)),l=h.selectAll("rect").data(u).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(c).join(b=>b.append("g").classed(ft(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));c.length&&HL(p,c[0]);const d=p!=null&&p.node()?Y2(p):{width:0,height:0};l.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=h!=null&&h.node()?Y2(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 hR=Yp(xh,Dv)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new lt,s=o.event$.pipe(I(a),Lo(d=>d.eventName==="mouseover"||d.eventName==="mousemove")),c=o.event$.pipe(I(a),Lo(d=>d.eventName==="mouseout")),u=W({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(I(a),U(async d=>d),G(d=>({backgroundColor:Dt(d.fullParams.backgroundColorType,d.fullChartParams),backgroundOpacity:d.fullParams.backgroundOpacity,strokeColor:Dt(d.fullParams.strokeColorType,d.fullChartParams),offset:d.fullParams.offset,padding:d.fullParams.padding,textSize:d.fullChartParams.styles.textSize,textColor:Dt(d.fullParams.textColorType,d.fullChartParams)}))),f=W({fullParams:i.fullParams$,tooltipStyle:u}).pipe(I(a),U(async d=>d),G(d=>d.fullParams.svgRenderFn?d.fullParams.svgRenderFn:g=>{const m=d.fullParams.textRenderFn(g);return lR(m,d.tooltipStyle)})),h=W({event:s,contentRenderFn:f}).pipe(I(a),U(async d=>d),G(d=>d.contentRenderFn(d.event))),l=c.pipe(I(a),G(d=>"")),p=Cu(s,c).pipe(I(a),G(d=>d.event));return W({svgString:Cu(h,l),event:p,layout:i.layout$,tooltipStyle:u}).pipe(I(a),U(async d=>d)).subscribe(d=>{fR({rootSelection:e,pluginName:n,rootWidth:d.layout.rootWidth,rootHeight:d.layout.rootHeight,svgString:d.svgString,tooltipStyle:d.tooltipStyle,event:d.event})}),function(){a.next(void 0)}}),kv={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},Ev={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},Lv={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??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"}]},Nv={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},Rv={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};function pR(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 c(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 u(p){const d=c(p.trim());return Math.sqrt(d*r)}function f(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 M=(g.text?g.text+x:"")+p[v],_=c(M);(m+_)/2<d?(g.width=m=_,g.text=M):(m=c(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 l(p,d){o>0&&(d=s(d,o));const g=a(d),m=u(d),y=f(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),M=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(_,$)=>($-y.length/2+.8)*r).text(_=>_.text);return b.exit().remove(),b.merge(M)}return l(t,e)}let nr;function dR(t,e){return g1().velocityDecay(e.force.velocityDecay).force("collision",h1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",m1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function gR({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function mR({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(p=>p.value!=null&&p.visible!=!1),s=Math.max(...a.map(p=>p.value)),c=a.reduce((p,d)=>p+(d.value??0),0)/a.length,u=gR({data:a,bubbleGroupR:o,maxValue:s,avgValue:c}),f=i==="area"?.5:1,h=qs().domain([0,s]).range([0,u]).exponent(f);return a.map(p=>{const d=p,g=e.get(p.id);g?(d.x=g.x,d.y=g.y):(d.x=Math.random()*n,d.y=Math.random()*r);const m=h(d.value??0);return d.r=m,d._originR=m,d})}function Cv({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,s,c)=>{const u=K(c[s]);let f=!0;a.label.length<=n.bubbleText.lineLengthMin&&(f=!1),u.call(pR,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:f})}),o}function yR({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 bR(){return Pd().on("start",(t,e)=>{t.active||nr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||nr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function Iv({fullParams:t,graphicWidth:e,graphicHeight:n}){nr.force("x",y1().strength(t.force.strength).x(0)).force("y",b1().strength(t.force.strength).y(0)),nr.alpha(1).restart()}function vR({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=K(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Wa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const xR=vi("Bubbles",kv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g"),a=new lt;let s=new Map;n.layout$.pipe(ri()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(I(i)).subscribe(l=>{t.transition().attr("transform",`translate(${l.width/2}, ${l.height/2})`)})});const c=n.fullParams$.pipe(I(i),G(h=>h.bubbleScaleType),tt()),u=new at(h=>{W({layout:n.layout$,computedData:n.computedData$,scaleType:c}).pipe(I(i),U(async l=>l)).subscribe(l=>{const p=mR({data:l.computedData,LastBubbleDataMap:s,graphicWidth:l.layout.width,graphicHeight:l.layout.height,scaleType:l.scaleType});h.next(p)})});u.subscribe(h=>{s=new Map(h.map(l=>[l.id,l]))});const f=n.fullChartParams$.pipe(I(i),G(h=>h.highlightTarget),tt());return W({layout:n.layout$,computedData:n.computedData$,bubblesData:u,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:f}).pipe(I(i),U(async h=>h)).subscribe(h=>{const l=Cv({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});nr=dR(l,h.fullParams),l.on("mouseover",(p,d)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).call(bR()),nr.nodes(h.bubblesData),Iv({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(l)}),W({bubblesSelection:a,bubblesData:u,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(I(i),U(async h=>h)).subscribe(h=>{vR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(yR({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),Cv({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),Iv({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),nr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function Fv({computedDataSeries:t,startAngle:e,endAngle:n}){return t2().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}const zv="Pie",_R=ft(zv,"path");function wR({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,c)=>{const u=r[c]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+u.startAngle*(1-o),endAngle:s.endAngle*o+u.endAngle*(1-o),value:s.value*o+u.value*(1-o)}});return _h(a,i.startAngle,i.endAngle,1)}:o=>_h(n,i.startAngle,i.endAngle,o)}function _h(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 Ov({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(_R,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(s,c)=>s.data.color).attr("d",(s,c)=>n(s)),o.remove(),a}function AR({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 c=K(s[a]);e.includes(o.data.id)?c.style("opacity",1).transition("highlight").ease(Wa).duration(500).attr("d",u=>i(u)):c.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",u=>r(u))})}const MR=vi(zv,Ev)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g"),a=new lt;let s=[],c=[];n.layout$.pipe(ri()).subscribe(d=>{t.attr("transform",`translate(${d.width/2}, ${d.height/2})`),n.layout$.pipe(I(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const u=n.layout$.pipe(I(i),G(d=>d.width<d.height?d.width:d.height)),f=new at(d=>{W({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(I(i),U(async g=>g)).subscribe(g=>{const m=Fv({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});d.next(m)})}),h=new at(d=>{W({shorterSideWith:u,fullParams:n.fullParams$}).pipe(I(i),U(async g=>g)).subscribe(g=>{const m=bu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),l=new at(d=>{W({shorterSideWith:u,fullParams:n.fullParams$}).pipe(I(i),U(async g=>g)).subscribe(g=>{const m=bu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),p=n.fullChartParams$.pipe(I(i),G(d=>d.highlightTarget),tt());return W({pieData:f,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:l,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:p}).pipe(I(i),U(async d=>d)).subscribe(d=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(d.pieData,v=>v.data.id),m=g.enter(),y=g.exit();const x=wR({enter:m,exit:y,data:d.pieData,lastData:s,fullParams:d.fullParams});o.transition("graphicMove").duration(d.fullChartParams.transitionDuration).ease(Jr(d.fullChartParams.transitionEase)).tween("move",(v,b)=>M=>{c=x(M),Ov({selection:o,renderData:c,arc:d.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData})}).on("end",(v,b)=>{c=_h(d.pieData,d.fullParams.startAngle,d.fullParams.endAngle,1);const M=Ov({selection:o,renderData:c,arc:d.arc});a.next(M),s=Object.assign([],d.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData}),M.on("mouseover",(_,$)=>{_.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:d.highlightTarget,datum:$.data,series:d.SeriesDataMap.get($.data.seriesLabel),seriesIndex:$.data.seriesIndex,seriesLabel:$.data.seriesLabel,event:_,data:d.computedData})}).on("mousemove",(_,$)=>{_.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:d.highlightTarget,datum:$.data,series:d.SeriesDataMap.get($.data.seriesLabel),seriesIndex:$.data.seriesIndex,seriesLabel:$.data.seriesLabel,event:_,data:d.computedData})}).on("mouseout",(_,$)=>{_.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:d.highlightTarget,datum:$.data,series:d.SeriesDataMap.get($.data.seriesLabel),seriesIndex:$.data.seriesIndex,seriesLabel:$.data.seriesLabel,event:_,data:d.computedData})}).on("click",(_,$)=>{_.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:d.highlightTarget,datum:$.data,series:d.SeriesDataMap.get($.data.seriesLabel),seriesIndex:$.data.seriesIndex,seriesLabel:$.data.seriesLabel,event:_,data:d.computedData})})})}),W({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:l}).pipe(I(i),U(async d=>d)).subscribe(d=>{AR({pathSelection:d.pathSelection,ids:d.highlight,fullChartParams:d.fullChartParams,arc:d.arc,arcMouseover:d.arcMouseover})}),()=>{i.next(void 0)}}),Gv="PieEventTexts",Bv=ft(Gv,"text");function wh(t,e){const n=t.selectAll(`text.${Bv}`).data(e),r=n.enter().append("text").classed(Bv,!0),i=n.merge(r);return i.each((o,a,s)=>{const c=K(s[a]).text(o.text);Object.keys(o.attr).forEach(u=>{c.attr(u,o.attr[u])}),Object.keys(o.style).forEach(u=>{c.style(u,o.style[u])})}),n.exit().remove(),i}function Ah({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,c)=>({text:s,attr:i[c],style:o[c]}))}const $R=vi(Gv,Lv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new lt,o=t.append("g");let a;n.layout$.pipe(ri()).subscribe(c=>{t.attr("transform",`translate(${c.width/2}, ${c.height/2})`),n.layout$.pipe(I(i)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})});const s=n.fullChartParams$.pipe(I(i),G(c=>c.highlightTarget),tt());return W({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(I(i),U(async c=>c)).subscribe(c=>{o.transition().duration(c.fullChartParams.transitionDuration).ease(Jr(c.fullChartParams.transitionEase)).tween("move",(u,f)=>h=>{const l=Ah({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:u,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});wh(o,l)}).on("end",(u,f)=>{const h=Ah({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:u,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});wh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(l=>{const p=Ah({eventData:l,eventName:l.eventName,t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});wh(o,p)})})}),()=>{i.next(void 0)}}),Uv="PieLabels",SR=ft(Uv,"text");function TR(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[c,u]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:c*r,mouseoverY:u*r}}).filter(i=>i.pieDatum.data.visible)}function DR(t,e,n,r){let i=t.selectAll("text").data(e,c=>c.pieDatum.id),o=i.enter().append("text").classed(SR,!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",c=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(c=>n.labelFn(c.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(c,u)=>hh({datum:c.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",c=>"translate("+c.x+","+c.y+")"),a.remove(),s}function PR({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=K(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+")")})}const kR=vi(Uv,Nv)(({selection:t,observer:e,subject:n})=>{const r=new lt,i=t.append("g");let o=new lt,a=[];return e.layout$.pipe(ri()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(I(r)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})}),W({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(r),U(async s=>s)).subscribe(s=>{const c=s.layout.width<s.layout.height?s.layout.width:s.layout.height,u=bu({axisWidth:c,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),f=bu({axisWidth:c,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=Fv({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=TR(h,u,f,s.fullParams.labelCentroid);const l=DR(i,a,s.fullParams,s.fullChartParams);o.next(l)}),W({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(I(r),U(async s=>s)).subscribe(s=>{PR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),Yv="SeriesLegend",ER=vi(Yv,Rv)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new lt,o=n.SeriesDataMap$.pipe(I(i),G(c=>Array.from(c.keys()))),a=n.fullParams$.pipe(I(i),G(c=>{const u=[{listRectWidth:c.listRectWidth,listRectHeight:c.listRectHeight,listRectRadius:c.listRectRadius}];return{...c,seriesList:u}})),s=ph(Yv,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}});et.BarStack=bN,et.Bars=lN,et.BarsAndLines=aR,et.BarsTriangle=DN,et.Bubbles=xR,et.CONTAINER_PLUGIN_PARAMS=Tv,et.Container=uR,et.DEFAULT_BARS_AND_LINES_PARAMS=Mv,et.DEFAULT_BARS_PARAMS=Sh,et.DEFAULT_BARS_TRIANGLE_PARAMS=Dh,et.DEFAULT_BAR_STACK_PARAMS=Th,et.DEFAULT_BUBBLES_PARAMS=kv,et.DEFAULT_DOTS_PARAMS=Mh,et.DEFAULT_GRID_LEGEND_PARAMS=Lh,et.DEFAULT_GROUPING_AXIS_PARAMS=Ph,et.DEFAULT_GROUP_AREA_PARAMS=$h,et.DEFAULT_LINES_PARAMS=rr,et.DEFAULT_MULTI_GRID_LEGEND_PARAMS=$v,et.DEFAULT_PIE_EVENT_TEXTS_PARAMS=Lv,et.DEFAULT_PIE_LABELS_PARAMS=Nv,et.DEFAULT_PIE_PARAMS=Ev,et.DEFAULT_SCALING_AREA_PARAMS=Eh,et.DEFAULT_SERIES_LEGEND_PARAMS=Rv,et.DEFAULT_VALUE_AXIS_PARAMS=xu,et.DEFAULT_VALUE_STACK_AXIS_PARAMS=kh,et.Dots=CN,et.GridLegend=FN,et.GroupArea=JN,et.GroupAxis=ON,et.Lines=nN,et.MultiGridLegend=sR,et.Pie=MR,et.PieEventTexts=$R,et.PieLabels=kR,et.ScalingArea=qN,et.SeriesLegend=ER,et.TOOLTIP_PARAMS=Dv,et.Tooltip=hR,et.ValueAxis=BN,et.ValueStackAxis=YN,Object.defineProperty(et,Symbol.toStringTag,{value:"Module"})});