You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
1.1 MiB
107 lines
1.1 MiB
var wr=Math.pow;(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9555],{75788:function(Ye,Ve,mt){"use strict";mt.d(Ve,{P:function(){return Mut}});var kt={};mt.r(kt),mt.d(kt,{area:function(){return TW},bottom:function(){return Fa},bottomLeft:function(){return Fa},bottomRight:function(){return Fa},inside:function(){return Fa},left:function(){return Fa},outside:function(){return kW},right:function(){return Fa},spider:function(){return LW},surround:function(){return IW},top:function(){return Fa},topLeft:function(){return Fa},topRight:function(){return Fa}});var Rt={};mt.r(Rt),mt.d(Rt,{interpolateBlues:function(){return YH},interpolateBrBG:function(){return wH},interpolateBuGn:function(){return RH},interpolateBuPu:function(){return LH},interpolateCividis:function(){return ZH},interpolateCool:function(){return nY},interpolateCubehelixDefault:function(){return tY},interpolateGnBu:function(){return NH},interpolateGreens:function(){return VH},interpolateGreys:function(){return $H},interpolateInferno:function(){return uY},interpolateMagma:function(){return lY},interpolateOrRd:function(){return IH},interpolateOranges:function(){return qH},interpolatePRGn:function(){return SH},interpolatePiYG:function(){return MH},interpolatePlasma:function(){return fY},interpolatePuBu:function(){return DH},interpolatePuBuGn:function(){return jH},interpolatePuOr:function(){return EH},interpolatePuRd:function(){return FH},interpolatePurples:function(){return XH},interpolateRainbow:function(){return rY},interpolateRdBu:function(){return AH},interpolateRdGy:function(){return TH},interpolateRdPu:function(){return BH},interpolateRdYlBu:function(){return PH},interpolateRdYlGn:function(){return CH},interpolateReds:function(){return UH},interpolateSinebow:function(){return oY},interpolateSpectral:function(){return kH},interpolateTurbo:function(){return sY},interpolateViridis:function(){return cY},interpolateWarm:function(){return eY},interpolateYlGn:function(){return GH},interpolateYlGnBu:function(){return zH},interpolateYlOrBr:function(){return WH},interpolateYlOrRd:function(){return HH},schemeAccent:function(){return KW},schemeBlues:function(){return Bw},schemeBrBG:function(){return mw},schemeBuGn:function(){return Aw},schemeBuPu:function(){return Tw},schemeCategory10:function(){return ZW},schemeDark2:function(){return QW},schemeGnBu:function(){return Pw},schemeGreens:function(){return zw},schemeGreys:function(){return Gw},schemeOrRd:function(){return Cw},schemeOranges:function(){return Yw},schemePRGn:function(){return bw},schemePaired:function(){return JW},schemePastel1:function(){return tH},schemePastel2:function(){return eH},schemePiYG:function(){return xw},schemePuBu:function(){return Rw},schemePuBuGn:function(){return kw},schemePuOr:function(){return _w},schemePuRd:function(){return Lw},schemePurples:function(){return Ww},schemeRdBu:function(){return Ow},schemeRdGy:function(){return ww},schemeRdPu:function(){return Nw},schemeRdYlBu:function(){return Sw},schemeRdYlGn:function(){return Mw},schemeReds:function(){return Hw},schemeSet1:function(){return nH},schemeSet2:function(){return rH},schemeSet3:function(){return iH},schemeSpectral:function(){return Ew},schemeTableau10:function(){return aH},schemeYlGn:function(){return jw},schemeYlGnBu:function(){return Iw},schemeYlOrBr:function(){return Dw},schemeYlOrRd:function(){return Fw}});var be={};mt.r(be),mt.d(be,{geoAlbers:function(){return Jk},geoAlbersUsa:function(){return ktt},geoAzimuthalEqualArea:function(){return Rtt},geoAzimuthalEqualAreaRaw:function(){return Mm},geoAzimuthalEquidistant:function(){return Ltt},geoAzimuthalEquidistantRaw:function(){return Em},geoConicConformal:function(){return Itt},geoConicConformalRaw:function(){return n5},geoConicEqualArea:function(){return Wh},geoConicEqualAreaRaw:function(){return Qk},geoConicEquidistant:function(){return Dtt},geoConicEquidistantRaw:function(){return r5},geoEqualEarth:function(){return Btt},geoEqualEarthRaw:function(){return Am},geoEquirectangular:function(){return jtt},geoEquirectangularRaw:function(){return _u},geoGnomonic:function(){return ztt},geoGnomonicRaw:function(){return Tm},geoIdentity:function(){return Gtt},geoMercator:function(){return Ntt},geoMercatorRaw:function(){return xu},geoNaturalEarth1:function(){return Wtt},geoNaturalEarth1Raw:function(){return Pm},geoOrthographic:function(){return Htt},geoOrthographicRaw:function(){return Cm},geoProjection:function(){return Oa},geoProjectionMutator:function(){return wm},geoStereographic:function(){return Ytt},geoStereographicRaw:function(){return km},geoTransverseMercator:function(){return Vtt},geoTransverseMercatorRaw:function(){return Rm}});var We={};mt.r(We),mt.d(We,{frequency:function(){return Xnt},id:function(){return Unt},name:function(){return qnt},weight:function(){return $nt}});var te=mt(50959),ve=mt(10422),re=mt.t(ve,2),Gt=function(){return Gt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Gt.apply(this,arguments)},dt=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},he=function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Zt=Gt({},re),ue=Zt.version,ie=Zt.render,jt=Zt.unmountComponentAtNode,Lt;try{var At=Number((ue||"").split(".")[0]);At>=18&&(Lt=Zt.createRoot)}catch(t){}function Dt(t){var e=Zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&typeof e=="object"&&(e.usingClientEntryPoint=t)}var Se="__rc_react_root__";function ke(t,e){Dt(!0);var n=e[Se]||Lt(e);Dt(!1),n.render(t),e[Se]=n}function Je(t,e){ie(t,e)}function $e(t,e){}function Ze(t,e){if(Lt){ke(t,e);return}Je(t,e)}function un(t){return dt(this,void 0,void 0,function(){return he(this,function(e){return[2,Promise.resolve().then(function(){var n;(n=t[Se])===null||n===void 0||n.unmount(),delete t[Se]})]})})}function Xe(t){jt(t)}function ze(t){}function ln(t){return dt(this,void 0,void 0,function(){return he(this,function(e){return Lt!==void 0?[2,un(t)]:(Xe(t),[2])})})}var Oe=new Map;Oe.set("tooltip",document.createElement("div"));var Me=function(t,e){e===void 0&&(e=!1);var n=null;if(e)n=Oe.get("tooltip");else if(n=document.createElement("div"),t!=null&&t.key){var r=Oe.get(t.key);r?n=r:Oe.set(t.key,n)}return Ze(t,n),n},gn=function(t){var e=t.attachShadow({mode:"open"}),n=document.createElement("div"),r=document.createElement("style");r.innerHTML=`.loading {
|
|
display: inline-block;
|
|
position: relative;
|
|
width: 80px;
|
|
height: 80px;
|
|
}
|
|
.loading div {
|
|
position: absolute;
|
|
top: 33px;
|
|
width: 13px;
|
|
height: 13px;
|
|
border-radius: 50%;
|
|
background: #ccc;
|
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
}
|
|
.loading div:nth-child(1) {
|
|
left: 8px;
|
|
animation: loading1 0.6s infinite;
|
|
}
|
|
.loading div:nth-child(2) {
|
|
left: 8px;
|
|
animation: loading2 0.6s infinite;
|
|
}
|
|
.loading div:nth-child(3) {
|
|
left: 32px;
|
|
animation: loading2 0.6s infinite;
|
|
}
|
|
.loading div:nth-child(4) {
|
|
left: 56px;
|
|
animation: loading3 0.6s infinite;
|
|
}
|
|
@keyframes loading1 {
|
|
0% {
|
|
transform: scale(0);
|
|
}
|
|
100% {
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
@keyframes loading3 {
|
|
0% {
|
|
transform: scale(1);
|
|
}
|
|
100% {
|
|
transform: scale(0);
|
|
}
|
|
}
|
|
@keyframes loading2 {
|
|
0% {
|
|
transform: translate(0, 0);
|
|
}
|
|
100% {
|
|
transform: translate(24px, 0);
|
|
}
|
|
}
|
|
`,n.classList.add("loading"),n.innerHTML="<div></div><div></div><div></div><div></div>",e.appendChild(r),e.appendChild(n)},Fn=function(t){var e=t.loadingTemplate,n=t.theme,r=n===void 0?"light":n,i=te.useRef(null);te.useEffect(function(){!e&&i.current&&gn(i.current)},[]);var a=function(){return e||te.createElement("div",{ref:i})};return te.createElement("div",{className:"charts-loading-container",style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:r==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},a())},Jn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fn=function(t){Jn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={hasError:!1},n.renderError=function(r){var i=n.props.errorTemplate;switch(r){default:return typeof i=="function"?i(r):i||te.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",r.message)}},n}return e.getDerivedStateFromError=function(n){return{hasError:!0,error:n}},e.getDerivedStateFromProps=function(n,r){return r.children!==n.children?{children:n.children,hasError:!1,error:void 0}:null},e.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):te.createElement(te.Fragment,null,this.props.children)},e}(te.Component),yn=typeof global=="object"&&global&&global.Object===Object&&global,vt=yn,Yt=typeof self=="object"&&self&&self.Object===Object&&self,et=vt||Yt||Function("return this")(),at=et,Ot=at.Symbol,gt=Ot,$t=Object.prototype,Ft=$t.hasOwnProperty,ae=$t.toString,X=gt?gt.toStringTag:void 0;function lt(t){var e=Ft.call(t,X),n=t[X];try{t[X]=void 0;var r=!0}catch(a){}var i=ae.call(t);return r&&(e?t[X]=n:delete t[X]),i}var ht=lt,Ut=Object.prototype,Q=Ut.toString;function st(t){return Q.call(t)}var xt=st,H="[object Null]",K="[object Undefined]",ut=gt?gt.toStringTag:void 0;function x(t){return t==null?t===void 0?K:H:ut&&ut in Object(t)?ht(t):xt(t)}var T=x;function W(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var $=W,J="[object AsyncFunction]",ct="[object Function]",yt="[object GeneratorFunction]",St="[object Proxy]";function Et(t){if(!$(t))return!1;var e=T(t);return e==ct||e==yt||e==J||e==St}var _t=Et,zt=function(t){var e=/react|\.jsx|children:\[\(/i;return e.test(t)},Ht=Array.isArray,Ct=Ht;function Wt(){this.__data__=[],this.size=0}var Qt=Wt;function fe(t,e){return t===e||t!==t&&e!==e}var It=fe;function we(t,e){for(var n=t.length;n--;)if(It(t[n][0],e))return n;return-1}var qe=we,Ae=Array.prototype,Ie=Ae.splice;function Le(t){var e=this.__data__,n=qe(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Ie.call(e,n,1),--this.size,!0}var je=Le;function $n(t){var e=this.__data__,n=qe(e,t);return n<0?void 0:e[n][1]}var Xn=$n;function Un(t){return qe(this.__data__,t)>-1}var qn=Un;function or(t,e){var n=this.__data__,r=qe(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var sr=or;function Bn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Bn.prototype.clear=Qt,Bn.prototype.delete=je,Bn.prototype.get=Xn,Bn.prototype.has=qn,Bn.prototype.set=sr;var on=Bn;function Kr(){this.__data__=new on,this.size=0}var wa=Kr;function Sa(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Ts=Sa;function Ma(t){return this.__data__.get(t)}var Gu=Ma;function yp(t){return this.__data__.has(t)}var mp=yp,Io=at["__core-js_shared__"],Ea=Io,jo=function(){var t=/[^.]+$/.exec(Ea&&Ea.keys&&Ea.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function bp(t){return!!jo&&jo in t}var xp=bp,_p=Function.prototype,Op=_p.toString;function wp(t){if(t!=null){try{return Op.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Aa=wp,Sp=/[\\^$.*+?()[\]{}|]/g,Mp=/^\[object .+?Constructor\]$/,zr=Function.prototype,Gr=Object.prototype,L=zr.toString,j=Gr.hasOwnProperty,G=RegExp("^"+L.call(j).replace(Sp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function V(t){if(!$(t)||xp(t))return!1;var e=_t(t)?G:Mp;return e.test(Aa(t))}var nt=V;function it(t,e){return t==null?void 0:t[e]}var q=it;function Z(t,e){var n=q(t,e);return nt(n)?n:void 0}var ft=Z,pt=ft(at,"Map"),Kt=pt,ee=ft(Object,"create"),me=ee;function Jt(){this.__data__=me?me(null):{},this.size=0}var ge=Jt;function de(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Vt=de,Pe="__lodash_hash_undefined__",xe=Object.prototype,Ce=xe.hasOwnProperty;function pe(t){var e=this.__data__;if(me){var n=e[t];return n===Pe?void 0:n}return Ce.call(e,t)?e[t]:void 0}var Te=pe,tn=Object.prototype,Qr=tn.hasOwnProperty;function si(t){var e=this.__data__;return me?e[t]!==void 0:Qr.call(e,t)}var Ir=si,Jr="__lodash_hash_undefined__";function _i(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=me&&e===void 0?Jr:e,this}var tr=_i;function On(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}On.prototype.clear=ge,On.prototype.delete=Vt,On.prototype.get=Te,On.prototype.has=Ir,On.prototype.set=tr;var Do=On;function Ep(){this.size=0,this.__data__={hash:new Do,map:new(Kt||on),string:new Do}}var Fo=Ep;function Xi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ar=Xi;function Bo(t,e){var n=t.__data__;return Ar(e)?n[typeof e=="string"?"string":"hash"]:n.map}var na=Bo;function zo(t){var e=na(this,t).delete(t);return this.size-=e?1:0,e}var ra=zo;function aR(t){return na(this,t).get(t)}var oR=aR;function sR(t){return na(this,t).has(t)}var cR=sR;function lR(t,e){var n=na(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var uR=lR;function Ps(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ps.prototype.clear=Fo,Ps.prototype.delete=ra,Ps.prototype.get=oR,Ps.prototype.has=cR,Ps.prototype.set=uR;var Wu=Ps,fR=200;function dR(t,e){var n=this.__data__;if(n instanceof on){var r=n.__data__;if(!Kt||r.length<fR-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wu(r)}return n.set(t,e),this.size=n.size,this}var hR=dR;function Cs(t){var e=this.__data__=new on(t);this.size=e.size}Cs.prototype.clear=wa,Cs.prototype.delete=Ts,Cs.prototype.get=Gu,Cs.prototype.has=mp,Cs.prototype.set=hR;var ks=Cs,pR="__lodash_hash_undefined__";function vR(t){return this.__data__.set(t,pR),this}var gR=vR;function yR(t){return this.__data__.has(t)}var mR=yR;function Hu(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Wu;++e<n;)this.add(t[e])}Hu.prototype.add=Hu.prototype.push=gR,Hu.prototype.has=mR;var S1=Hu;function bR(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var xR=bR;function _R(t,e){return t.has(e)}var M1=_R,OR=1,wR=2;function SR(t,e,n,r,i,a){var o=n&OR,s=t.length,c=e.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(t),u=a.get(e);if(l&&u)return l==e&&u==t;var f=-1,d=!0,h=n&wR?new S1:void 0;for(a.set(t,e),a.set(e,t);++f<s;){var p=t[f],v=e[f];if(r)var g=o?r(v,p,f,e,t,a):r(p,v,f,t,e,a);if(g!==void 0){if(g)continue;d=!1;break}if(h){if(!xR(e,function(y,m){if(!M1(h,m)&&(p===y||i(p,y,n,r,a)))return h.push(m)})){d=!1;break}}else if(!(p===v||i(p,v,n,r,a))){d=!1;break}}return a.delete(t),a.delete(e),d}var E1=SR,MR=at.Uint8Array,Yu=MR;function ER(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var AR=ER;function TR(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Ap=TR,PR=1,CR=2,kR="[object Boolean]",RR="[object Date]",LR="[object Error]",NR="[object Map]",IR="[object Number]",jR="[object RegExp]",DR="[object Set]",FR="[object String]",BR="[object Symbol]",zR="[object ArrayBuffer]",GR="[object DataView]",A1=gt?gt.prototype:void 0,Tp=A1?A1.valueOf:void 0;function WR(t,e,n,r,i,a,o){switch(n){case GR:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case zR:return!(t.byteLength!=e.byteLength||!a(new Yu(t),new Yu(e)));case kR:case RR:case IR:return It(+t,+e);case LR:return t.name==e.name&&t.message==e.message;case jR:case FR:return t==e+"";case NR:var s=AR;case DR:var c=r&PR;if(s||(s=Ap),t.size!=e.size&&!c)return!1;var l=o.get(t);if(l)return l==e;r|=CR,o.set(t,e);var u=E1(s(t),s(e),r,i,a,o);return o.delete(t),u;case BR:if(Tp)return Tp.call(t)==Tp.call(e)}return!1}var HR=WR;function YR(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Pp=YR;function VR(t,e,n){var r=e(t);return Ct(t)?r:Pp(r,n(t))}var T1=VR;function $R(t,e){for(var n=-1,r=t==null?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}var XR=$R;function UR(){return[]}var P1=UR,qR=Object.prototype,ZR=qR.propertyIsEnumerable,C1=Object.getOwnPropertySymbols,KR=C1?function(t){return t==null?[]:(t=Object(t),XR(C1(t),function(e){return ZR.call(t,e)}))}:P1,Cp=KR;function QR(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var JR=QR;function tL(t){return t!=null&&typeof t=="object"}var ci=tL,eL="[object Arguments]";function nL(t){return ci(t)&&T(t)==eL}var k1=nL,R1=Object.prototype,rL=R1.hasOwnProperty,iL=R1.propertyIsEnumerable,aL=k1(function(){return arguments}())?k1:function(t){return ci(t)&&rL.call(t,"callee")&&!iL.call(t,"callee")},Gc=aL;function oL(){return!1}var sL=oL,L1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,N1=L1&&typeof module=="object"&&module&&!module.nodeType&&module,cL=N1&&N1.exports===L1,I1=cL?at.Buffer:void 0,lL=I1?I1.isBuffer:void 0,uL=lL||sL,Wc=uL,fL=9007199254740991,dL=/^(?:0|[1-9]\d*)$/;function hL(t,e){var n=typeof t;return e=e==null?fL:e,!!e&&(n=="number"||n!="symbol"&&dL.test(t))&&t>-1&&t%1==0&&t<e}var Vu=hL,pL=9007199254740991;function vL(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=pL}var kp=vL,gL="[object Arguments]",yL="[object Array]",mL="[object Boolean]",bL="[object Date]",xL="[object Error]",_L="[object Function]",OL="[object Map]",wL="[object Number]",SL="[object Object]",ML="[object RegExp]",EL="[object Set]",AL="[object String]",TL="[object WeakMap]",PL="[object ArrayBuffer]",CL="[object DataView]",kL="[object Float32Array]",RL="[object Float64Array]",LL="[object Int8Array]",NL="[object Int16Array]",IL="[object Int32Array]",jL="[object Uint8Array]",DL="[object Uint8ClampedArray]",FL="[object Uint16Array]",BL="[object Uint32Array]",Zn={};Zn[kL]=Zn[RL]=Zn[LL]=Zn[NL]=Zn[IL]=Zn[jL]=Zn[DL]=Zn[FL]=Zn[BL]=!0,Zn[gL]=Zn[yL]=Zn[PL]=Zn[mL]=Zn[CL]=Zn[bL]=Zn[xL]=Zn[_L]=Zn[OL]=Zn[wL]=Zn[SL]=Zn[ML]=Zn[EL]=Zn[AL]=Zn[TL]=!1;function zL(t){return ci(t)&&kp(t.length)&&!!Zn[T(t)]}var GL=zL;function WL(t){return function(e){return t(e)}}var Rp=WL,j1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hc=j1&&typeof module=="object"&&module&&!module.nodeType&&module,HL=Hc&&Hc.exports===j1,Lp=HL&&vt.process,YL=function(){try{var t=Hc&&Hc.require&&Hc.require("util").types;return t||Lp&&Lp.binding&&Lp.binding("util")}catch(e){}}(),Rs=YL,D1=Rs&&Rs.isTypedArray,VL=D1?Rp(D1):GL,Np=VL,$L=Object.prototype,XL=$L.hasOwnProperty;function UL(t,e){var n=Ct(t),r=!n&&Gc(t),i=!n&&!r&&Wc(t),a=!n&&!r&&!i&&Np(t),o=n||r||i||a,s=o?JR(t.length,String):[],c=s.length;for(var l in t)(e||XL.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Vu(l,c)))&&s.push(l);return s}var F1=UL,qL=Object.prototype;function ZL(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||qL;return t===n}var $u=ZL;function KL(t,e){return function(n){return t(e(n))}}var B1=KL,QL=B1(Object.keys,Object),JL=QL,tN=Object.prototype,eN=tN.hasOwnProperty;function nN(t){if(!$u(t))return JL(t);var e=[];for(var n in Object(t))eN.call(t,n)&&n!="constructor"&&e.push(n);return e}var rN=nN;function iN(t){return t!=null&&kp(t.length)&&!_t(t)}var Za=iN;function aN(t){return Za(t)?F1(t):rN(t)}var Go=aN;function oN(t){return T1(t,Go,Cp)}var Ip=oN,sN=1,cN=Object.prototype,lN=cN.hasOwnProperty;function uN(t,e,n,r,i,a){var o=n&sN,s=Ip(t),c=s.length,l=Ip(e),u=l.length;if(c!=u&&!o)return!1;for(var f=c;f--;){var d=s[f];if(!(o?d in e:lN.call(e,d)))return!1}var h=a.get(t),p=a.get(e);if(h&&p)return h==e&&p==t;var v=!0;a.set(t,e),a.set(e,t);for(var g=o;++f<c;){d=s[f];var y=t[d],m=e[d];if(r)var b=o?r(m,y,d,e,t,a):r(y,m,d,t,e,a);if(!(b===void 0?y===m||i(y,m,n,r,a):b)){v=!1;break}g||(g=d=="constructor")}if(v&&!g){var _=t.constructor,O=e.constructor;_!=O&&"constructor"in t&&"constructor"in e&&!(typeof _=="function"&&_ instanceof _&&typeof O=="function"&&O instanceof O)&&(v=!1)}return a.delete(t),a.delete(e),v}var fN=uN,dN=ft(at,"DataView"),jp=dN,hN=ft(at,"Promise"),Dp=hN,pN=ft(at,"Set"),Ls=pN,vN=ft(at,"WeakMap"),Yc=vN,z1="[object Map]",gN="[object Object]",G1="[object Promise]",W1="[object Set]",H1="[object WeakMap]",Y1="[object DataView]",yN=Aa(jp),mN=Aa(Kt),bN=Aa(Dp),xN=Aa(Ls),_N=Aa(Yc),Wo=T;(jp&&Wo(new jp(new ArrayBuffer(1)))!=Y1||Kt&&Wo(new Kt)!=z1||Dp&&Wo(Dp.resolve())!=G1||Ls&&Wo(new Ls)!=W1||Yc&&Wo(new Yc)!=H1)&&(Wo=function(t){var e=T(t),n=e==gN?t.constructor:void 0,r=n?Aa(n):"";if(r)switch(r){case yN:return Y1;case mN:return z1;case bN:return G1;case xN:return W1;case _N:return H1}return e});var Vc=Wo,ON=1,V1="[object Arguments]",$1="[object Array]",Xu="[object Object]",wN=Object.prototype,X1=wN.hasOwnProperty;function SN(t,e,n,r,i,a){var o=Ct(t),s=Ct(e),c=o?$1:Vc(t),l=s?$1:Vc(e);c=c==V1?Xu:c,l=l==V1?Xu:l;var u=c==Xu,f=l==Xu,d=c==l;if(d&&Wc(t)){if(!Wc(e))return!1;o=!0,u=!1}if(d&&!u)return a||(a=new ks),o||Np(t)?E1(t,e,n,r,i,a):HR(t,e,c,n,r,i,a);if(!(n&ON)){var h=u&&X1.call(t,"__wrapped__"),p=f&&X1.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,g=p?e.value():e;return a||(a=new ks),i(v,g,n,r,a)}}return d?(a||(a=new ks),fN(t,e,n,r,i,a)):!1}var MN=SN;function U1(t,e,n,r,i){return t===e?!0:t==null||e==null||!ci(t)&&!ci(e)?t!==t&&e!==e:MN(t,e,n,r,U1,i)}var Fp=U1;function EN(t,e){return Fp(t,e)}var q1=EN;function AN(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var TN=AN,PN=function(){try{var t=ft(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Uu=PN;function CN(t,e,n){e=="__proto__"&&Uu?Uu(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var qu=CN,kN=Object.prototype,RN=kN.hasOwnProperty;function LN(t,e,n){var r=t[e];(!(RN.call(t,e)&&It(r,n))||n===void 0&&!(e in t))&&qu(t,e,n)}var Zu=LN;function NN(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var s=e[a],c=r?r(n[s],t[s],s,n,t):void 0;c===void 0&&(c=t[s]),i?qu(n,s,c):Zu(n,s,c)}return n}var Ho=NN;function IN(t,e){return t&&Ho(e,Go(e),t)}var jN=IN;function DN(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var FN=DN,BN=Object.prototype,zN=BN.hasOwnProperty;function GN(t){if(!$(t))return FN(t);var e=$u(t),n=[];for(var r in t)r=="constructor"&&(e||!zN.call(t,r))||n.push(r);return n}var WN=GN;function HN(t){return Za(t)?F1(t,!0):WN(t)}var $c=HN;function YN(t,e){return t&&Ho(e,$c(e),t)}var VN=YN,Z1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,K1=Z1&&typeof module=="object"&&module&&!module.nodeType&&module,$N=K1&&K1.exports===Z1,Q1=$N?at.Buffer:void 0,J1=Q1?Q1.allocUnsafe:void 0;function XN(t,e){if(e)return t.slice();var n=t.length,r=J1?J1(n):new t.constructor(n);return t.copy(r),r}var tb=XN;function UN(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Bp=UN;function qN(t,e){return Ho(t,Cp(t),e)}var ZN=qN,KN=B1(Object.getPrototypeOf,Object),zp=KN,QN=Object.getOwnPropertySymbols,JN=QN?function(t){for(var e=[];t;)Pp(e,Cp(t)),t=zp(t);return e}:P1,eb=JN;function t4(t,e){return Ho(t,eb(t),e)}var e4=t4;function n4(t){return T1(t,$c,eb)}var nb=n4,r4=Object.prototype,i4=r4.hasOwnProperty;function a4(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&i4.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var o4=a4;function s4(t){var e=new t.constructor(t.byteLength);return new Yu(e).set(new Yu(t)),e}var Gp=s4;function c4(t,e){var n=e?Gp(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var l4=c4,u4=/\w*$/;function f4(t){var e=new t.constructor(t.source,u4.exec(t));return e.lastIndex=t.lastIndex,e}var d4=f4,rb=gt?gt.prototype:void 0,ib=rb?rb.valueOf:void 0;function h4(t){return ib?Object(ib.call(t)):{}}var p4=h4;function v4(t,e){var n=e?Gp(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var ab=v4,g4="[object Boolean]",y4="[object Date]",m4="[object Map]",b4="[object Number]",x4="[object RegExp]",_4="[object Set]",O4="[object String]",w4="[object Symbol]",S4="[object ArrayBuffer]",M4="[object DataView]",E4="[object Float32Array]",A4="[object Float64Array]",T4="[object Int8Array]",P4="[object Int16Array]",C4="[object Int32Array]",k4="[object Uint8Array]",R4="[object Uint8ClampedArray]",L4="[object Uint16Array]",N4="[object Uint32Array]";function I4(t,e,n){var r=t.constructor;switch(e){case S4:return Gp(t);case g4:case y4:return new r(+t);case M4:return l4(t,n);case E4:case A4:case T4:case P4:case C4:case k4:case R4:case L4:case N4:return ab(t,n);case m4:return new r;case b4:case O4:return new r(t);case x4:return d4(t);case _4:return new r;case w4:return p4(t)}}var j4=I4,ob=Object.create,D4=function(){function t(){}return function(e){if(!$(e))return{};if(ob)return ob(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Wp=D4;function F4(t){return typeof t.constructor=="function"&&!$u(t)?Wp(zp(t)):{}}var sb=F4,B4="[object Map]";function z4(t){return ci(t)&&Vc(t)==B4}var G4=z4,cb=Rs&&Rs.isMap,W4=cb?Rp(cb):G4,H4=W4,Y4="[object Set]";function V4(t){return ci(t)&&Vc(t)==Y4}var $4=V4,lb=Rs&&Rs.isSet,X4=lb?Rp(lb):$4,U4=X4,q4=1,Z4=2,K4=4,ub="[object Arguments]",Q4="[object Array]",J4="[object Boolean]",tI="[object Date]",eI="[object Error]",fb="[object Function]",nI="[object GeneratorFunction]",rI="[object Map]",iI="[object Number]",db="[object Object]",aI="[object RegExp]",oI="[object Set]",sI="[object String]",cI="[object Symbol]",lI="[object WeakMap]",uI="[object ArrayBuffer]",fI="[object DataView]",dI="[object Float32Array]",hI="[object Float64Array]",pI="[object Int8Array]",vI="[object Int16Array]",gI="[object Int32Array]",yI="[object Uint8Array]",mI="[object Uint8ClampedArray]",bI="[object Uint16Array]",xI="[object Uint32Array]",zn={};zn[ub]=zn[Q4]=zn[uI]=zn[fI]=zn[J4]=zn[tI]=zn[dI]=zn[hI]=zn[pI]=zn[vI]=zn[gI]=zn[rI]=zn[iI]=zn[db]=zn[aI]=zn[oI]=zn[sI]=zn[cI]=zn[yI]=zn[mI]=zn[bI]=zn[xI]=!0,zn[eI]=zn[fb]=zn[lI]=!1;function Ku(t,e,n,r,i,a){var o,s=e&q4,c=e&Z4,l=e&K4;if(n&&(o=i?n(t,r,i,a):n(t)),o!==void 0)return o;if(!$(t))return t;var u=Ct(t);if(u){if(o=o4(t),!s)return Bp(t,o)}else{var f=Vc(t),d=f==fb||f==nI;if(Wc(t))return tb(t,s);if(f==db||f==ub||d&&!i){if(o=c||d?{}:sb(t),!s)return c?e4(t,VN(o,t)):ZN(t,jN(o,t))}else{if(!zn[f])return i?t:{};o=j4(t,f,s)}}a||(a=new ks);var h=a.get(t);if(h)return h;a.set(t,o),U4(t)?t.forEach(function(g){o.add(Ku(g,e,n,g,t,a))}):H4(t)&&t.forEach(function(g,y){o.set(y,Ku(g,e,n,y,t,a))});var p=l?c?nb:Ip:c?$c:Go,v=u?void 0:p(t);return TN(v||t,function(g,y){v&&(y=g,g=t[y]),Zu(o,y,Ku(g,e,n,y,t,a))}),o}var hb=Ku,_I=1,OI=4;function wI(t){return hb(t,_I|OI)}var pb=wI,SI="[object Symbol]";function MI(t){return typeof t=="symbol"||ci(t)&&T(t)==SI}var Xc=MI,EI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,AI=/^\w*$/;function TI(t,e){if(Ct(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Xc(t)?!0:AI.test(t)||!EI.test(t)||e!=null&&t in Object(e)}var Hp=TI,PI="Expected a function";function Yp(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(PI);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Yp.Cache||Wu),n}Yp.Cache=Wu;var CI=Yp,kI=500;function RI(t){var e=CI(t,function(r){return n.size===kI&&n.clear(),r}),n=e.cache;return e}var LI=RI,NI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,II=/\\(\\)?/g,jI=LI(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(NI,function(n,r,i,a){e.push(i?a.replace(II,"$1"):r||n)}),e}),DI=jI;function FI(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Qu=FI,BI=1/0,vb=gt?gt.prototype:void 0,gb=vb?vb.toString:void 0;function yb(t){if(typeof t=="string")return t;if(Ct(t))return Qu(t,yb)+"";if(Xc(t))return gb?gb.call(t):"";var e=t+"";return e=="0"&&1/t==-BI?"-0":e}var Vp=yb;function zI(t){return t==null?"":Vp(t)}var $p=zI;function GI(t,e){return Ct(t)?t:Hp(t,e)?[t]:DI($p(t))}var Ns=GI,WI=1/0;function HI(t){if(typeof t=="string"||Xc(t))return t;var e=t+"";return e=="0"&&1/t==-WI?"-0":e}var Is=HI;function YI(t,e){e=Ns(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Is(e[n++])];return n&&n==r?t:void 0}var Ju=YI;function VI(t,e,n){var r=t==null?void 0:Ju(t,e);return r===void 0?n:r}var vr=VI,Xp=function(){return Xp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Xp.apply(this,arguments)},mb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $I(t,e){var n=(0,te.useRef)(),r=(0,te.useRef)(),i=(0,te.useRef)(null),a=e.onReady,o=e.onEvent,s=function(u,f){var d;u===void 0&&(u="image/png");var h=(d=i.current)===null||d===void 0?void 0:d.getElementsByTagName("canvas")[0];return h==null?void 0:h.toDataURL(u,f)},c=function(u,f,d){u===void 0&&(u="download"),f===void 0&&(f="image/png");var h=u;u.indexOf(".")===-1&&(h="".concat(u,".").concat(f.split("/")[1]));var p=s(f,d),v=document.createElement("a");return v.href=p,v.download=h,document.body.appendChild(v),v.click(),document.body.removeChild(v),v=null,h},l=function(u,f){f===void 0&&(f=!1);var d=Object.keys(u),h=f;d.forEach(function(p){var v=u[p];p==="tooltip"&&(h=!0),_t(v)&&zt("".concat(v))?u[p]=function(){for(var g=[],y=0;y<arguments.length;y++)g[y]=arguments[y];return Me(v.apply(void 0,g),h)}:Ct(v)?v.forEach(function(g){l(g,h)}):$(v)&&l(v,h)})};return(0,te.useEffect)(function(){if(n.current&&!q1(r.current,e)){var u=!1;if(r.current){var f=r.current,d=f.data,h=mb(f,["data"]),p=e.data,v=mb(e,["data"]);u=q1(h,v)}r.current=pb(e),u?n.current.changeData(vr(e,"data")):(l(e),n.current.update(e),n.current.render())}},[e]),(0,te.useEffect)(function(){if(!i.current)return function(){return null};r.current||(r.current=pb(e)),l(e);var u=new t(i.current,Xp({},e));u.toDataURL=s,u.downloadImage=c,u.render(),n.current=u,a&&a(u);var f=function(d){o&&o(u,d)};return u.on("*",f),function(){n.current&&(n.current.destroy(),n.current.off("*",f),n.current=void 0)}},[]),{chart:n,container:i}}var XI="*",UI=function(){function t(){this._events={}}return t.prototype.on=function(e,n,r){return this._events[e]||(this._events[e]=[]),this._events[e].push({callback:n,once:!!r}),this},t.prototype.once=function(e,n){return this.on(e,n,!0)},t.prototype.emit=function(e){for(var n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var a=this._events[e]||[],o=this._events[XI]||[],s=function(c){for(var l=c.length,u=0;u<l;u++)if(c[u]){var f=c[u],d=f.callback,h=f.once;h&&(c.splice(u,1),c.length===0&&delete n._events[e],l--,u--),d.apply(n,r)}};s(a),s(o)},t.prototype.off=function(e,n){if(!e)this._events={};else if(!n)delete this._events[e];else{for(var r=this._events[e]||[],i=r.length,a=0;a<i;a++)r[a].callback===n&&(r.splice(a,1),i--,a--);r.length===0&&delete this._events[e]}return this},t.prototype.getEvents=function(){return this._events},t}(),Up=UI,S=mt(99938),qp=mt(73983),ot=mt(54442),qt=mt(39536),js=mt(31767);function bb(){var t=new js.WT(9);return js.WT!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function qI(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function Cut(t){var e=new glMatrix.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function kut(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function ZI(t,e,n,r,i,a,o,s,c){var l=new js.WT(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=i,l[5]=a,l[6]=o,l[7]=s,l[8]=c,l}function Rut(t,e,n,r,i,a,o,s,c,l){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t}function Lut(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Nut(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function Iut(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=u*o-s*l,d=-u*a+s*c,h=l*a-o*c,p=n*f+r*d+i*h;return p?(p=1/p,t[0]=f*p,t[1]=(-u*r+i*l)*p,t[2]=(s*r-i*o)*p,t[3]=d*p,t[4]=(u*n-i*c)*p,t[5]=(-s*n+i*a)*p,t[6]=h*p,t[7]=(-l*n+r*c)*p,t[8]=(o*n-r*a)*p,t):null}function jut(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8];return t[0]=o*u-s*l,t[1]=i*l-r*u,t[2]=r*s-i*o,t[3]=s*c-a*u,t[4]=n*u-i*c,t[5]=i*a-n*s,t[6]=a*l-o*c,t[7]=r*c-n*l,t[8]=n*o-r*a,t}function Dut(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8];return e*(l*a-o*c)+n*(-l*i+o*s)+r*(c*i-a*s)}function Fut(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=n[0],h=n[1],p=n[2],v=n[3],g=n[4],y=n[5],m=n[6],b=n[7],_=n[8];return t[0]=d*r+h*o+p*l,t[1]=d*i+h*s+p*u,t[2]=d*a+h*c+p*f,t[3]=v*r+g*o+y*l,t[4]=v*i+g*s+y*u,t[5]=v*a+g*c+y*f,t[6]=m*r+b*o+_*l,t[7]=m*i+b*s+_*u,t[8]=m*a+b*c+_*f,t}function But(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=n[0],h=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c,t[6]=d*r+h*o+l,t[7]=d*i+h*s+u,t[8]=d*a+h*c+f,t}function zut(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=Math.sin(n),h=Math.cos(n);return t[0]=h*r+d*o,t[1]=h*i+d*s,t[2]=h*a+d*c,t[3]=h*o-d*r,t[4]=h*s-d*i,t[5]=h*c-d*a,t[6]=l,t[7]=u,t[8]=f,t}function Gut(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Wut(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function Hut(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Yut(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Vut(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function $ut(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,c=i+i,l=n*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*c,v=a*o,g=a*s,y=a*c;return t[0]=1-f-p,t[3]=u-y,t[6]=d+g,t[1]=u+y,t[4]=1-l-p,t[7]=h-v,t[2]=d-g,t[5]=h+v,t[8]=1-l-f,t}function Xut(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],y=e[15],m=n*s-r*o,b=n*c-i*o,_=n*l-a*o,O=r*c-i*s,w=r*l-a*s,M=i*l-a*c,E=u*v-f*p,A=u*g-d*p,P=u*y-h*p,C=f*g-d*v,D=f*y-h*v,N=d*y-h*g,k=m*N-b*D+_*C+O*P-w*A+M*E;return k?(k=1/k,t[0]=(s*N-c*D+l*C)*k,t[1]=(c*P-o*N-l*A)*k,t[2]=(o*D-s*P+l*E)*k,t[3]=(i*D-r*N-a*C)*k,t[4]=(n*N-i*P+a*A)*k,t[5]=(r*P-n*D-a*E)*k,t[6]=(v*M-g*w+y*O)*k,t[7]=(g*_-p*M-y*b)*k,t[8]=(p*w-v*_+y*m)*k,t):null}function Uut(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function qut(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Zut(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Kut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t}function Qut(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function Jut(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t}function tft(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t}function eft(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]}function nft(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],f=e[0],d=e[1],h=e[2],p=e[3],v=e[4],g=e[5],y=e[6],m=e[7],b=e[8];return Math.abs(n-f)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(r-d)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(i-h)<=glMatrix.EPSILON*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-p)<=glMatrix.EPSILON*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(o-v)<=glMatrix.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(s-g)<=glMatrix.EPSILON*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(c-y)<=glMatrix.EPSILON*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(l-m)<=glMatrix.EPSILON*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(u-b)<=glMatrix.EPSILON*Math.max(1,Math.abs(u),Math.abs(b))}var rft=null,ift=null,cr=mt(49953);function br(){var t=new js.WT(4);return js.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function aft(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Ka(t,e,n){n=n*.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function oft(t,e){var n=Math.acos(e[3])*2,r=Math.sin(n/2);return r>glMatrix.EPSILON?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function sft(t,e){var n=ej(t,e);return Math.acos(2*n*n-1)}function Qa(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=n[0],c=n[1],l=n[2],u=n[3];return t[0]=r*u+o*s+i*l-a*c,t[1]=i*u+o*c+a*s-r*l,t[2]=a*u+o*l+r*c-i*s,t[3]=o*u-r*s-i*c-a*l,t}function cft(t,e,n){n*=.5;var r=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=r*c+o*s,t[1]=i*c+a*s,t[2]=a*c-i*s,t[3]=o*c-r*s,t}function lft(t,e,n){n*=.5;var r=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=r*c-a*s,t[1]=i*c+o*s,t[2]=a*c+r*s,t[3]=o*c-i*s,t}function uft(t,e,n){n*=.5;var r=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=r*c+i*s,t[1]=i*c-r*s,t[2]=a*c+o*s,t[3]=o*c-a*s,t}function fft(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function KI(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=Math.sqrt(n*n+r*r+i*i),s=Math.exp(a),c=o>0?s*Math.sin(o)/o:0;return t[0]=n*c,t[1]=r*c,t[2]=i*c,t[3]=s*Math.cos(o),t}function QI(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=Math.sqrt(n*n+r*r+i*i),s=o>0?Math.atan2(o,a)/o:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+a*a),t}function dft(t,e,n){return QI(t,e),tj(t,t,n),KI(t,t),t}function Zp(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=e[3],c=n[0],l=n[1],u=n[2],f=n[3],d,h,p,v,g;return h=i*c+a*l+o*u+s*f,h<0&&(h=-h,c=-c,l=-l,u=-u,f=-f),1-h>js.Ib?(d=Math.acos(h),p=Math.sin(d),v=Math.sin((1-r)*d)/p,g=Math.sin(r*d)/p):(v=1-r,g=r),t[0]=v*i+g*c,t[1]=v*a+g*l,t[2]=v*o+g*u,t[3]=v*s+g*f,t}function hft(t){var e=glMatrix.RANDOM(),n=glMatrix.RANDOM(),r=glMatrix.RANDOM(),i=Math.sqrt(1-e),a=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=a*Math.sin(2*Math.PI*r),t[3]=a*Math.cos(2*Math.PI*r),t}function Kp(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a,s=o?1/o:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=a*s,t}function pft(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function JI(t,e){var n=e[0]+e[4]+e[8],r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[i*3+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[i*3+i]-e[a*3+a]-e[o*3+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[a*3+o]-e[o*3+a])*r,t[a]=(e[a*3+i]+e[i*3+a])*r,t[o]=(e[o*3+i]+e[i*3+o])*r}return t}function tf(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var a=Math.sin(e),o=Math.cos(e),s=Math.sin(n),c=Math.cos(n),l=Math.sin(r),u=Math.cos(r);return t[0]=a*c*u-o*s*l,t[1]=o*s*u+a*c*l,t[2]=o*c*l-a*s*u,t[3]=o*c*u+a*s*l,t}function vft(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var gft=cr.d9,Qp=cr.al,ef=cr.JG,yft=cr.t8,mft=cr.IH,xb=Qa,tj=cr.bA,ej=cr.AK,bft=cr.t7,xft=cr.kE,_ft=null,Oft=cr.we,wft=null,nf=cr.Fv,Sft=cr.I6,Mft=cr.fS,Eft=function(){var t=ot.create(),e=ot.fromValues(1,0,0),n=ot.fromValues(0,1,0);return function(r,i,a){var o=ot.dot(i,a);return o<-.999999?(ot.cross(t,e,i),ot.len(t)<1e-6&&ot.cross(t,n,i),ot.normalize(t,t),Ka(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(ot.cross(t,i,a),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,nf(r,r))}}(),Aft=function(){var t=br(),e=br();return function(n,r,i,a,o,s){return Zp(t,r,o,s),Zp(e,i,a,s),Zp(n,t,e,2*s*(1-s)),n}}(),Tft=function(){var t=bb();return function(e,n,r,i){return t[0]=r[0],t[3]=r[1],t[6]=r[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-n[0],t[5]=-n[1],t[8]=-n[2],nf(e,JI(e,t))}}(),Uc=mt(38015),xr=mt(39696);function li(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ye=mt(58622),rf=mt(98104),er=function(t){return(0,rf.Z)(t,"String")},lr=mt(39083),qc={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function _b(t){return Array.isArray(t)&&t.every(function(e){var n=e[0].toLowerCase();return qc[n]===e.length-1&&"achlmqstvz".includes(n)})}function Ob(t){return _b(t)&&t.every(function(e){var n=e[0];return n===n.toUpperCase()})}function wb(t){return Ob(t)&&t.every(function(e){var n=e[0];return"ACLMQZ".includes(n)})}var Sb={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function Mb(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=qc[n]&&(n==="m"&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e=e==="m"?"l":"L"):t.segments.push([e].concat(r.splice(0,qc[n]))),!!qc[n]););}function nj(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(r===48){t.param=0,t.index+=1;return}if(r===49){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e}function rj(t){return t>=48&&t<=57||t===43||t===45||t===46}function Ds(t){return t>=48&&t<=57}function ij(t){var e=t.max,n=t.pathValue,r=t.index,i=r,a=!1,o=!1,s=!1,c=!1,l;if(i>=e){t.err="[path-util]: Invalid path value at index "+i+', "pathValue" is missing param';return}if(l=n.charCodeAt(i),(l===43||l===45)&&(i+=1,l=n.charCodeAt(i)),!Ds(l)&&l!==46){t.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" is not a number';return}if(l!==46){if(a=l===48,i+=1,l=n.charCodeAt(i),a&&i<e&&l&&Ds(l)){t.err="[path-util]: Invalid path value at index "+r+', "'+n[r]+'" illegal number';return}for(;i<e&&Ds(n.charCodeAt(i));)i+=1,o=!0;l=n.charCodeAt(i)}if(l===46){for(c=!0,i+=1;Ds(n.charCodeAt(i));)i+=1,s=!0;l=n.charCodeAt(i)}if(l===101||l===69){if(c&&!o&&!s){t.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" invalid float exponent';return}if(i+=1,l=n.charCodeAt(i),(l===43||l===45)&&(i+=1),i<e&&Ds(n.charCodeAt(i)))for(;i<e&&Ds(n.charCodeAt(i));)i+=1;else{t.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" invalid integer exponent';return}}t.index=i,t.param=+t.pathValue.slice(r,i)}function aj(t){var e=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&e.includes(t)}function af(t){for(var e=t.pathValue,n=t.max;t.index<n&&aj(e.charCodeAt(t.index));)t.index+=1}function oj(t){switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function sj(t){return(t|32)===97}function cj(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),a=qc[n[r].toLowerCase()];if(t.segmentStart=r,!oj(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,af(t),t.data=[],!a){Mb(t);return}for(;;){for(var o=a;o>0;o-=1){if(sj(i)&&(o===3||o===4)?nj(t):ij(t),t.err.length)return;t.data.push(t.param),af(t),t.index<e&&n.charCodeAt(t.index)===44&&(t.index+=1,af(t))}if(t.index>=t.max||!rj(n.charCodeAt(t.index)))break}Mb(t)}var lj=function(){function t(e){this.pathValue=e,this.segments=[],this.max=e.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return t}();function uj(t){if(_b(t))return[].concat(t);var e=new lj(t);for(af(e);e.index<e.max&&!e.err.length;)cj(e);return e.err?e.err:e.segments}function fj(t){if(Ob(t))return[].concat(t);var e=uj(t),n=0,r=0,i=0,a=0;return e.map(function(o){var s=o.slice(1).map(Number),c=o[0],l=c.toUpperCase();if(c==="M")return n=s[0],r=s[1],i=n,a=r,["M",n,r];var u;if(c!==l)switch(l){case"A":u=[l,s[0],s[1],s[2],s[3],s[4],s[5]+n,s[6]+r];break;case"V":u=[l,s[0]+r];break;case"H":u=[l,s[0]+n];break;default:{var f=s.map(function(h,p){return h+(p%2?r:n)});u=[l].concat(f)}}else u=[l].concat(s);var d=u.length;switch(l){case"Z":n=i,r=a;break;case"H":n=u[1];break;case"V":r=u[1];break;default:n=u[d-2],r=u[d-1],l==="M"&&(i=n,a=r)}return u})}function dj(t,e){var n=t[0],r=e.x1,i=e.y1,a=e.x2,o=e.y2,s=t.slice(1).map(Number),c=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),n==="H")c=["L",t[1],i];else if(n==="V")c=["L",r,t[1]];else if(n==="S"){var l=r*2-a,u=i*2-o;e.x1=l,e.y1=u,c=["C",l,u].concat(s)}else if(n==="T"){var f=r*2-e.qx,d=i*2-e.qy;e.qx=f,e.qy=d,c=["Q",f,d].concat(s)}else if(n==="Q"){var h=s[0],p=s[1];e.qx=h,e.qy=p}return c}function of(t){if(wb(t))return[].concat(t);for(var e=fj(t),n=(0,S.pi)({},Sb),r=0;r<e.length;r+=1){e[r]=dj(e[r],n);var i=e[r],a=i.length;n.x1=+i[a-2],n.y1=+i[a-1],n.x2=+i[a-4]||n.x1,n.y2=+i[a-3]||n.y1}return e}function Ja(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return[r+(a-r)*n,i+(o-i)*n]}function Jp(t,e,n,r,i){var a=li([t,e],[n,r]),o={x:0,y:0};if(typeof i=="number")if(i<=0)o={x:t,y:e};else if(i>=a)o={x:n,y:r};else{var s=Ja([t,e],[n,r],i/a),c=s[0],l=s[1];o={x:c,y:l}}return{length:a,point:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Eb(t,e){var n=t.x,r=t.y,i=e.x,a=e.y,o=n*i+r*a,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2))),c=n*a-r*i<0?-1:1,l=c*Math.acos(o/s);return l}function hj(t,e,n,r,i,a,o,s,c,l){var u=Math.abs,f=Math.sin,d=Math.cos,h=Math.sqrt,p=Math.PI,v=u(n),g=u(r),y=(i%360+360)%360,m=y*(p/180);if(t===s&&e===c)return{x:t,y:e};if(v===0||g===0)return Jp(t,e,s,c,l).point;var b=(t-s)/2,_=(e-c)/2,O={x:d(m)*b+f(m)*_,y:-f(m)*b+d(m)*_},w=Math.pow(O.x,2)/Math.pow(v,2)+Math.pow(O.y,2)/Math.pow(g,2);w>1&&(v*=h(w),g*=h(w));var M=Math.pow(v,2)*Math.pow(g,2)-Math.pow(v,2)*Math.pow(O.y,2)-Math.pow(g,2)*Math.pow(O.x,2),E=Math.pow(v,2)*Math.pow(O.y,2)+Math.pow(g,2)*Math.pow(O.x,2),A=M/E;A=A<0?0:A;var P=(a!==o?1:-1)*h(A),C={x:P*(v*O.y/g),y:P*(-(g*O.x)/v)},D={x:d(m)*C.x-f(m)*C.y+(t+s)/2,y:f(m)*C.x+d(m)*C.y+(e+c)/2},N={x:(O.x-C.x)/v,y:(O.y-C.y)/g},k=Eb({x:1,y:0},N),R={x:(-O.x-C.x)/v,y:(-O.y-C.y)/g},I=Eb(N,R);!o&&I>0?I-=2*p:o&&I<0&&(I+=2*p),I%=2*p;var F=k+I*l,B=v*d(F),z=g*f(F),Y={x:d(m)*B-f(m)*z+D.x,y:f(m)*B+d(m)*z+D.y};return Y}function pj(t,e,n,r,i,a,o,s,c,l,u){var f,d=u.bbox,h=d===void 0?!0:d,p=u.length,v=p===void 0?!0:p,g=u.sampleSize,y=g===void 0?30:g,m=typeof l=="number",b=t,_=e,O=0,w=[b,_,O],M=[b,_],E=0,A={x:0,y:0},P=[{x:b,y:_}];m&&l<=0&&(A={x:b,y:_});for(var C=0;C<=y;C+=1){if(E=C/y,f=hj(t,e,n,r,i,a,o,s,c,E),b=f.x,_=f.y,h&&P.push({x:b,y:_}),v&&(O+=li(M,[b,_])),M=[b,_],m&&O>=l&&l>w[2]){var D=(O-l)/(O-w[2]);A={x:M[0]*(1-D)+w[0]*D,y:M[1]*(1-D)+w[1]*D}}w=[b,_,O]}return m&&l>=O&&(A={x:s,y:c}),{length:O,point:A,min:{x:Math.min.apply(null,P.map(function(N){return N.x})),y:Math.min.apply(null,P.map(function(N){return N.y}))},max:{x:Math.max.apply(null,P.map(function(N){return N.x})),y:Math.max.apply(null,P.map(function(N){return N.y}))}}}function vj(t,e,n,r,i,a,o,s,c){var l=1-c;return{x:Math.pow(l,3)*t+3*Math.pow(l,2)*c*n+3*l*Math.pow(c,2)*i+Math.pow(c,3)*o,y:Math.pow(l,3)*e+3*Math.pow(l,2)*c*r+3*l*Math.pow(c,2)*a+Math.pow(c,3)*s}}function Ab(t,e,n,r,i,a,o,s,c,l){var u,f=l.bbox,d=f===void 0?!0:f,h=l.length,p=h===void 0?!0:h,v=l.sampleSize,g=v===void 0?10:v,y=typeof c=="number",m=t,b=e,_=0,O=[m,b,_],w=[m,b],M=0,E={x:0,y:0},A=[{x:m,y:b}];y&&c<=0&&(E={x:m,y:b});for(var P=0;P<=g;P+=1){if(M=P/g,u=vj(t,e,n,r,i,a,o,s,M),m=u.x,b=u.y,d&&A.push({x:m,y:b}),p&&(_+=li(w,[m,b])),w=[m,b],y&&_>=c&&c>O[2]){var C=(_-c)/(_-O[2]);E={x:w[0]*(1-C)+O[0]*C,y:w[1]*(1-C)+O[1]*C}}O=[m,b,_]}return y&&c>=_&&(E={x:o,y:s}),{length:_,point:E,min:{x:Math.min.apply(null,A.map(function(D){return D.x})),y:Math.min.apply(null,A.map(function(D){return D.y}))},max:{x:Math.max.apply(null,A.map(function(D){return D.x})),y:Math.max.apply(null,A.map(function(D){return D.y}))}}}function gj(t,e,n,r,i,a,o){var s=1-o;return{x:Math.pow(s,2)*t+2*s*o*n+Math.pow(o,2)*i,y:Math.pow(s,2)*e+2*s*o*r+Math.pow(o,2)*a}}function yj(t,e,n,r,i,a,o,s){var c,l=s.bbox,u=l===void 0?!0:l,f=s.length,d=f===void 0?!0:f,h=s.sampleSize,p=h===void 0?10:h,v=typeof o=="number",g=t,y=e,m=0,b=[g,y,m],_=[g,y],O=0,w={x:0,y:0},M=[{x:g,y}];v&&o<=0&&(w={x:g,y});for(var E=0;E<=p;E+=1){if(O=E/p,c=gj(t,e,n,r,i,a,O),g=c.x,y=c.y,u&&M.push({x:g,y}),d&&(m+=li(_,[g,y])),_=[g,y],v&&m>=o&&o>b[2]){var A=(m-o)/(m-b[2]);w={x:_[0]*(1-A)+b[0]*A,y:_[1]*(1-A)+b[1]*A}}b=[g,y,m]}return v&&o>=m&&(w={x:i,y:a}),{length:m,point:w,min:{x:Math.min.apply(null,M.map(function(P){return P.x})),y:Math.min.apply(null,M.map(function(P){return P.y}))},max:{x:Math.max.apply(null,M.map(function(P){return P.x})),y:Math.max.apply(null,M.map(function(P){return P.y}))}}}function Tb(t,e,n){for(var r,i,a,o,s,c,l=of(t),u=typeof e=="number",f,d=[],h,p=0,v=0,g=0,y=0,m,b=[],_=[],O=0,w={x:0,y:0},M=w,E=w,A=w,P=0,C=0,D=l.length;C<D;C+=1)m=l[C],h=m[0],f=h==="M",d=f?d:[p,v].concat(m.slice(1)),f?(g=m[1],y=m[2],w={x:g,y},M=w,O=0,u&&e<.001&&(A=w)):h==="L"?(r=Jp(d[0],d[1],d[2],d[3],(e||0)-P),O=r.length,w=r.min,M=r.max,E=r.point):h==="A"?(i=pj(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-P,n||{}),O=i.length,w=i.min,M=i.max,E=i.point):h==="C"?(a=Ab(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-P,n||{}),O=a.length,w=a.min,M=a.max,E=a.point):h==="Q"?(o=yj(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-P,n||{}),O=o.length,w=o.min,M=o.max,E=o.point):h==="Z"&&(d=[p,v,g,y],s=Jp(d[0],d[1],d[2],d[3],(e||0)-P),O=s.length,w=s.min,M=s.max,E=s.point),u&&P<e&&P+O>=e&&(A=E),_.push(M),b.push(w),P+=O,c=h!=="Z"?m.slice(-2):[g,y],p=c[0],v=c[1];return u&&e>=P&&(A={x:p,y:v}),{length:P,point:A,min:{x:Math.min.apply(null,b.map(function(N){return N.x})),y:Math.min.apply(null,b.map(function(N){return N.y}))},max:{x:Math.max.apply(null,_.map(function(N){return N.x})),y:Math.max.apply(null,_.map(function(N){return N.y}))}}}function mj(t,e){return Tb(t,void 0,(0,S.pi)((0,S.pi)({},e),{bbox:!1,length:!0})).length}var jr=function(t){return Array.isArray?Array.isArray(t):(0,rf.Z)(t,"Array")},sf=function(t){if(jr(t))return t.reduce(function(e,n){return Math.min(e,n)},t[0])},cf=function(t){if(jr(t))return t.reduce(function(e,n){return Math.max(e,n)},t[0])},bj=1e-5;function Zc(t,e,n){return n===void 0&&(n=bj),Math.abs(t-e)<n}var xj=function(t,e){return(t%e+e)%e},Pb=xj;function _j(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}function Oj(t){return wb(t)&&t.every(function(e){var n=e[0];return"MC".includes(n)})}function lf(t,e,n){var r=t*Math.cos(n)-e*Math.sin(n),i=t*Math.sin(n)+e*Math.cos(n);return{x:r,y:i}}function t0(t,e,n,r,i,a,o,s,c,l){var u=t,f=e,d=n,h=r,p=s,v=c,g=Math.PI*120/180,y=Math.PI/180*(+i||0),m=[],b,_,O,w,M;if(l)_=l[0],O=l[1],w=l[2],M=l[3];else{b=lf(u,f,-y),u=b.x,f=b.y,b=lf(p,v,-y),p=b.x,v=b.y;var E=(u-p)/2,A=(f-v)/2,P=E*E/(d*d)+A*A/(h*h);P>1&&(P=Math.sqrt(P),d*=P,h*=P);var C=d*d,D=h*h,N=(a===o?-1:1)*Math.sqrt(Math.abs((C*D-C*A*A-D*E*E)/(C*A*A+D*E*E)));w=N*d*A/h+(u+p)/2,M=N*-h*E/d+(f+v)/2,_=Math.asin(((f-M)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),O=Math.asin(((v-M)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),_=u<w?Math.PI-_:_,O=p<w?Math.PI-O:O,_<0&&(_=Math.PI*2+_),O<0&&(O=Math.PI*2+O),o&&_>O&&(_-=Math.PI*2),!o&&O>_&&(O-=Math.PI*2)}var k=O-_;if(Math.abs(k)>g){var R=O,I=p,F=v;O=_+g*(o&&O>_?1:-1),p=w+d*Math.cos(O),v=M+h*Math.sin(O),m=t0(p,v,d,h,i,0,o,I,F,[O,R,w,M])}k=O-_;var B=Math.cos(_),z=Math.sin(_),Y=Math.cos(O),U=Math.sin(O),tt=Math.tan(k/4),rt=4/3*d*tt,wt=4/3*h*tt,Bt=[u,f],Xt=[u+rt*z,f-wt*B],Tt=[p+rt*U,v-wt*Y],Pt=[p,v];if(Xt[0]=2*Bt[0]-Xt[0],Xt[1]=2*Bt[1]-Xt[1],l)return Xt.concat(Tt,Pt,m);m=Xt.concat(Tt,Pt,m);for(var ce=[],le=0,_e=m.length;le<_e;le+=1)ce[le]=le%2?lf(m[le-1],m[le],y).y:lf(m[le],m[le+1],y).x;return ce}function wj(t,e,n,r,i,a){var o=.3333333333333333,s=2/3;return[o*t+s*n,o*e+s*r,o*i+s*n,o*a+s*r,i,a]}var Cb=function(t,e,n,r){var i=.5,a=Ja([t,e],[n,r],i);return(0,S.ev)((0,S.ev)([],a,!0),[n,r,n,r],!1)};function Sj(t,e){var n=t[0],r=t.slice(1).map(Number),i=r[0],a=r[1],o,s=e.x1,c=e.y1,l=e.x,u=e.y;switch("TQ".includes(n)||(e.qx=null,e.qy=null),n){case"M":return e.x=i,e.y=a,t;case"A":return o=[s,c].concat(r),["C"].concat(t0(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return e.qx=i,e.qy=a,o=[s,c].concat(r),["C"].concat(wj(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(Cb(s,c,i,a));case"Z":return s===l&&c===u?["C",s,c,l,u,l,u]:["C"].concat(Cb(s,c,l,u));default:}return t}function e0(t,e){if(e===void 0&&(e=!1),Oj(t)){var n=[].concat(t);return e?[n,[]]:n}for(var r=of(t),i=(0,S.pi)({},Sb),a=[],o="",s=r.length,c,l,u=[],f=0;f<s;f+=1){r[f]&&(o=r[f][0]),a[f]=o;var d=Sj(r[f],i);r[f]=d,_j(r,a,f),s=r.length,o==="Z"&&u.push(f),c=r[f],l=c.length,i.x1=+c[l-2],i.y1=+c[l-1],i.x2=+c[l-4]||i.x1,i.y2=+c[l-3]||i.y1}return e?[r,u]:r}function Mj(t,e){e===void 0&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),a=t.slice(6,8),o=Ja(n,r,e),s=Ja(r,i,e),c=Ja(i,a,e),l=Ja(o,s,e),u=Ja(s,c,e),f=Ja(l,u,e);return[["C"].concat(o,l,f),["C"].concat(u,c,a)]}function kb(t){return t.map(function(e,n,r){var i=n&&r[n-1].slice(-2).concat(e.slice(1)),a=n?Ab(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0,o;return n?o=a?Mj(i):[e,e]:o=[e],{s:e,ss:o,l:a}})}function Rb(t,e,n){var r=kb(t),i=kb(e),a=r.length,o=i.length,s=r.filter(function(g){return g.l}).length,c=i.filter(function(g){return g.l}).length,l=r.filter(function(g){return g.l}).reduce(function(g,y){var m=y.l;return g+m},0)/s||0,u=i.filter(function(g){return g.l}).reduce(function(g,y){var m=y.l;return g+m},0)/c||0,f=n||Math.max(a,o),d=[l,u],h=[f-a,f-o],p=0,v=[r,i].map(function(g,y){return g.l===f?g.map(function(m){return m.s}):g.map(function(m,b){return p=b&&h[y]&&m.l>=d[y],h[y]-=p?1:0,p?m.ss:[m.s]}).flat()});return v[0].length===v[1].length?v:Rb(v[0],v[1],f)}function Ej(t,e,n,r,i,a,o,s){return 3*((s-e)*(n+i)-(o-t)*(r+a)+r*(t-i)-n*(e-a)+s*(i+t/3)-o*(a+e/3))/20}function Aj(t){var e=0,n=0,r=0;return e0(t).map(function(i){var a;switch(i[0]){case"M":return e=i[1],n=i[2],0;default:var o=i.slice(1),s=o[0],c=o[1],l=o[2],u=o[3],f=o[4],d=o[5];return r=Ej(e,n,s,c,l,u,f,d),a=i.slice(-2),e=a[0],n=a[1],r}}).reduce(function(i,a){return i+a},0)}function Lb(t){return Aj(t)>=0}function Tj(t){var e=t.slice(1).map(function(n,r,i){return r?i[r-1].slice(-2).concat(n.slice(1)):t[0].slice(1).concat(n.slice(1))}).map(function(n){return n.map(function(r,i){return n[n.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map(function(n){return["C"].concat(n.slice(2))}))}function Pj(t){return t.map(function(e){return Array.isArray(e)?[].concat(e):e})}function Cj(t){var e=t.length,n=e-1;return t.map(function(r,i){return t.map(function(a,o){var s=i+o,c;return o===0||t[s]&&t[s][0]==="M"?(c=t[s],["M"].concat(c.slice(-2))):(s>=e&&(s-=n),t[s])})})}function kj(t,e){var n=t.length-1,r=[],i=0,a=0,o=Cj(t);return o.forEach(function(s,c){t.slice(1).forEach(function(l,u){a+=li(t[(c+u)%n].slice(-2),e[u%n].slice(-2))}),r[c]=a,a=0}),i=r.indexOf(Math.min.apply(null,r)),o[i]}var Rj=function(t){return(0,rf.Z)(t,"Boolean")},Nb=Rj,Yo=function(t){var e=typeof t;return t!==null&&e==="object"||e==="function"},Lj=function(t){return t===void 0},nr=Lj;function Nj(t,e,n){return Tb(t,e,(0,S.pi)((0,S.pi)({},n),{bbox:!1,length:!0})).point}var Ij=mt(52617);function Wr(t,e,n,r){var i=t-n,a=e-r;return Math.sqrt(i*i+a*a)}function uf(t,e){var n=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(t),!1)),r=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(e),!1)),i=Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(t),!1)),a=Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(e),!1));return{x:n,y:r,width:i-n,height:a-r}}function Ib(t){return(t+Math.PI*2)%(Math.PI*2)}function jb(t,e){var n=Math.abs(t);return e>0?n:n*-1}function jj(t,e,n,r,i,a){var o=n,s=r;if(o===0||s===0)return{x:t,y:e};for(var c=i-t,l=a-e,u=Math.abs(c),f=Math.abs(l),d=o*o,h=s*s,p=Math.PI/4,v=0,g=0,y=0;y<4;y++){v=o*Math.cos(p),g=s*Math.sin(p);var m=(d-h)*Math.pow(Math.cos(p),3)/o,b=(h-d)*Math.pow(Math.sin(p),3)/s,_=v-m,O=g-b,w=u-m,M=f-b,E=Math.hypot(O,_),A=Math.hypot(M,w),P=E*Math.asin((_*M-O*w)/(E*A)),C=P/Math.sqrt(d+h-v*v-g*g);p+=C,p=Math.min(Math.PI/2,Math.max(0,p))}return{x:t+jb(v,c),y:e+jb(g,l)}}function Dj(t,e,n,r,i,a,o,s){return-1*n*Math.cos(i)*Math.sin(s)-r*Math.sin(i)*Math.cos(s)}function Fj(t,e,n,r,i,a,o,s){return-1*n*Math.sin(i)*Math.sin(s)+r*Math.cos(i)*Math.cos(s)}function Bj(t,e,n){return Math.atan(-e/t*Math.tan(n))}function zj(t,e,n){return Math.atan(e/(t*Math.tan(n)))}function Gj(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Wj(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function Hj(t,e,n,r){var i=Math.atan2(r*t,n*e);return(i+Math.PI*2)%(Math.PI*2)}function Db(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function Fb(t,e,n){var r=Math.cos(n),i=Math.sin(n);return[t*r-e*i,t*i+e*r]}function Yj(t,e,n,r,i,a,o){for(var s=Bj(n,r,i),c=1/0,l=-1/0,u=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var d=s+f;a<o?a<d&&d<o&&u.push(d):o<d&&d<a&&u.push(d)}for(var f=0;f<u.length;f++){var h=Gj(t,e,n,r,i,u[f]);h<c&&(c=h),h>l&&(l=h)}for(var p=zj(n,r,i),v=1/0,g=-1/0,y=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var m=p+f;a<o?a<m&&m<o&&y.push(m):o<m&&m<a&&y.push(m)}for(var f=0;f<y.length;f++){var b=Wj(t,e,n,r,i,y[f]);b<v&&(v=b),b>g&&(g=b)}return{x:c,y:v,width:l-c,height:g-v}}function Pft(t,e,n,r,i,a,o,s,c){var l=Fb(s-t,c-e,-i),u=__read(l,2),f=u[0],d=u[1],h=jj(0,0,n,r,f,d),p=Hj(n,r,h.x,h.y);p<a?h=Db(n,r,a):p>o&&(h=Db(n,r,o));var v=Fb(h.x,h.y,i);return{x:v[0]+t,y:v[1]+e}}function Cft(t,e,n,r,i,a,o,s){var c=(o-a)*s+a,l=Dj(t,e,n,r,i,a,o,c),u=Fj(t,e,n,r,i,a,o,c);return Ib(Math.atan2(u,l))}var Vj=1e-4;function Bb(t,e,n,r,i,a){var o=-1,s=1/0,c=[n,r],l=20;a&&a>200&&(l=a/10);for(var u=1/l,f=u/10,d=0;d<=l;d++){var h=d*u,p=[i.apply(void 0,(0,S.ev)([],(0,S.CR)(t.concat([h])),!1)),i.apply(void 0,(0,S.ev)([],(0,S.CR)(e.concat([h])),!1))],v=Wr(c[0],c[1],p[0],p[1]);v<s&&(o=h,s=v)}if(o===0)return{x:t[0],y:e[0]};if(o===1){var g=t.length;return{x:t[g-1],y:e[g-1]}}s=1/0;for(var d=0;d<32&&!(f<Vj);d++){var y=o-f,m=o+f,p=[i.apply(void 0,(0,S.ev)([],(0,S.CR)(t.concat([y])),!1)),i.apply(void 0,(0,S.ev)([],(0,S.CR)(e.concat([y])),!1))],v=Wr(c[0],c[1],p[0],p[1]);if(y>=0&&v<s)o=y,s=v;else{var b=[i.apply(void 0,(0,S.ev)([],(0,S.CR)(t.concat([m])),!1)),i.apply(void 0,(0,S.ev)([],(0,S.CR)(e.concat([m])),!1))],_=Wr(c[0],c[1],b[0],b[1]);m<=1&&_<s?(o=m,s=_):f*=.5}}return{x:i.apply(void 0,(0,S.ev)([],(0,S.CR)(t.concat([o])),!1)),y:i.apply(void 0,(0,S.ev)([],(0,S.CR)(e.concat([o])),!1))}}function $j(t,e){for(var n=0,r=t.length,i=0;i<r;i++){var a=t[i],o=e[i],s=t[(i+1)%r],c=e[(i+1)%r];n+=Wr(a,o,s,c)}return n/2}function kft(t,e,n,r){return uf([t,n],[e,r])}function zb(t,e,n,r){return Wr(t,e,n,r)}function ia(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function Xj(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);if(o<0)return Wr(t,e,i,a);var s=(n-t)*(n-t)+(r-e)*(r-e);return o>s?Wr(n,r,i,a):Gb(t,e,n,r,i,a)}function Gb(t,e,n,r,i,a){var o=[n-t,r-e];if(Uc.I6(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-e)*(a-e));var s=[-o[1],o[0]];Uc.Fv(s,s);var c=[i-t,a-e];return Math.abs(Uc.AK(c,s))}function Rft(t,e,n,r){return Math.atan2(r-e,n-t)}function Vo(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function Wb(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function Hb(t,e,n,r){var i=-3*t+9*e-9*n+3*r,a=6*t-12*e+6*n,o=3*e-3*t,s=[],c,l,u;if(Zc(i,0))Zc(a,0)||(c=-o/a,c>=0&&c<=1&&s.push(c));else{var f=a*a-4*i*o;Zc(f,0)?s.push(-a/(2*i)):f>0&&(u=Math.sqrt(f),c=(-a+u)/(2*i),l=(-a-u)/(2*i),c>=0&&c<=1&&s.push(c),l>=0&&l<=1&&s.push(l))}return s}function Uj(t,e,n,r,i,a,o,s,c){var l=Vo(t,n,i,o,c),u=Vo(e,r,a,s,c),f=ia(t,e,n,r,c),d=ia(n,r,i,a,c),h=ia(i,a,o,s,c),p=ia(f.x,f.y,d.x,d.y,c),v=ia(d.x,d.y,h.x,h.y,c);return[[t,e,f.x,f.y,p.x,p.y,l,u],[l,u,v.x,v.y,h.x,h.y,o,s]]}function n0(t,e,n,r,i,a,o,s,c){if(c===0)return $j([t,n,i,o],[e,r,a,s]);var l=Uj(t,e,n,r,i,a,o,s,.5),u=__spreadArray(__spreadArray([],__read(l[0]),!1),[c-1],!1),f=__spreadArray(__spreadArray([],__read(l[1]),!1),[c-1],!1);return n0.apply(void 0,__spreadArray([],__read(u),!1))+n0.apply(void 0,__spreadArray([],__read(f),!1))}function qj(t,e,n,r,i,a,o,s){for(var c=[t,o],l=[e,s],u=Hb(t,n,i,o),f=Hb(e,r,a,s),d=0;d<u.length;d++)c.push(Vo(t,n,i,o,u[d]));for(var d=0;d<f.length;d++)l.push(Vo(e,r,a,s,f[d]));return uf(c,l)}function Lft(t,e,n,r,i,a,o,s){return n0(t,e,n,r,i,a,o,s,3)}function Zj(t,e,n,r,i,a,o,s,c,l,u){return Bb([t,n,i,o],[e,r,a,s],c,l,Vo,u)}function Yb(t,e,n,r,i,a,o,s,c,l,u){var f=Zj(t,e,n,r,i,a,o,s,c,l,u);return Wr(f.x,f.y,c,l)}function Nft(t,e,n,r,i,a,o,s,c){return{x:Vo(t,n,i,o,c),y:Vo(e,r,a,s,c)}}function Ift(t,e,n,r,i,a,o,s,c){var l=Wb(t,n,i,o,c),u=Wb(e,r,a,s,c);return Ib(Math.atan2(u,l))}function Vb(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Wr(i[0],i[1],a[0],a[1]),s={from:i,to:a,length:o};n.push(s),e+=o}return{segments:n,totalLength:e}}function $b(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=Wr(r[0],r[1],i[0],i[1])}return e}function Xb(t,e){if(e>1||e<0||t.length<2)return null;var n=Vb(t),r=n.segments,i=n.totalLength;if(i===0)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var c=r[s],l=c.from,u=c.to,f=c.length/i;if(e>=a&&e<=a+f){var d=(e-a)/f;o=ia(l[0],l[1],u[0],u[1],d);break}a+=f}return o}function Ub(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=Vb(t),r=n.segments,i=n.totalLength,a=0,o=0,s=0;s<r.length;s++){var c=r[s],l=c.from,u=c.to,f=c.length/i;if(e>=a&&e<=a+f){o=Math.atan2(u[1]-l[1],u[0]-l[0]);break}a+=f}return o}function qb(t,e,n){for(var r=1/0,i=0;i<t.length-1;i++){var a=t[i],o=t[i+1],s=Xj(a[0],a[1],o[0],o[1],e,n);s<r&&(r=s)}return r}function Kj(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return uf(e,n)}function Qj(t){return $b(t)}function jft(t,e){return Xb(t,e)}function Dft(t,e,n){return qb(t,e,n)}function Fft(t,e){return Ub(t,e)}function ff(t){var e=t.slice(0);return t.length&&e.push(t[0]),e}function Bft(t){return Kj(t)}function zft(t){return $b(ff(t))}function Gft(t,e){return Xb(ff(t),e)}function Wft(t,e,n){return qb(ff(t),e,n)}function Hft(t,e){return Ub(ff(t),e)}function Kc(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Zb(t,e,n){var r=t+n-2*e;if(Zc(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}function Jj(t,e,n,r,i,a,o){var s=Kc(t,n,i,o),c=Kc(e,r,a,o),l=ia(t,e,n,r,o),u=ia(n,r,i,a,o);return[[t,e,l.x,l.y,s,c],[s,c,u.x,u.y,i,a]]}function r0(t,e,n,r,i,a,o){if(o===0)return(Wr(t,e,n,r)+Wr(n,r,i,a)+Wr(t,e,i,a))/2;var s=Jj(t,e,n,r,i,a,.5),c=s[0],l=s[1];return c.push(o-1),l.push(o-1),r0.apply(void 0,__spreadArray([],__read(c),!1))+r0.apply(void 0,__spreadArray([],__read(l),!1))}function t8(t,e,n,r,i,a){var o=Zb(t,n,i)[0],s=Zb(e,r,a)[0],c=[t,i],l=[e,a];return o!==void 0&&c.push(Kc(t,n,i,o)),s!==void 0&&l.push(Kc(e,r,a,s)),uf(c,l)}function Yft(t,e,n,r,i,a){return r0(t,e,n,r,i,a,3)}function e8(t,e,n,r,i,a,o,s){return Bb([t,n,i],[e,r,a],o,s,Kc)}function n8(t,e,n,r,i,a,o,s){var c=e8(t,e,n,r,i,a,o,s);return Wr(c.x,c.y,o,s)}var r8=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof mt.g!="undefined"?mt.g:typeof self!="undefined"?self:{},Kb={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(r8,function(){function n(O,w,M,E,A){r(O,w,M||0,E||O.length-1,A||a)}function r(O,w,M,E,A){for(;E>M;){if(E-M>600){var P=E-M+1,C=w-M+1,D=Math.log(P),N=.5*Math.exp(2*D/3),k=.5*Math.sqrt(D*N*(P-N)/P)*(C-P/2<0?-1:1),R=Math.max(M,Math.floor(w-C*N/P+k)),I=Math.min(E,Math.floor(w+(P-C)*N/P+k));r(O,w,R,I,A)}var F=O[w],B=M,z=E;for(i(O,M,w),A(O[E],F)>0&&i(O,M,E);B<z;){for(i(O,B,z),B++,z--;A(O[B],F)<0;)B++;for(;A(O[z],F)>0;)z--}A(O[M],F)===0?i(O,M,z):(z++,i(O,z,E)),z<=w&&(M=z+1),w<=z&&(E=z-1)}}function i(O,w,M){var E=O[w];O[w]=O[M],O[M]=E}function a(O,w){return O<w?-1:O>w?1:0}var o=function(w){w===void 0&&(w=9),this._maxEntries=Math.max(4,w),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};o.prototype.all=function(){return this._all(this.data,[])},o.prototype.search=function(w){var M=this.data,E=[];if(!m(w,M))return E;for(var A=this.toBBox,P=[];M;){for(var C=0;C<M.children.length;C++){var D=M.children[C],N=M.leaf?A(D):D;m(w,N)&&(M.leaf?E.push(D):y(w,N)?this._all(D,E):P.push(D))}M=P.pop()}return E},o.prototype.collides=function(w){var M=this.data;if(!m(w,M))return!1;for(var E=[];M;){for(var A=0;A<M.children.length;A++){var P=M.children[A],C=M.leaf?this.toBBox(P):P;if(m(w,C)){if(M.leaf||y(w,C))return!0;E.push(P)}}M=E.pop()}return!1},o.prototype.load=function(w){if(!(w&&w.length))return this;if(w.length<this._minEntries){for(var M=0;M<w.length;M++)this.insert(w[M]);return this}var E=this._build(w.slice(),0,w.length-1,0);if(!this.data.children.length)this.data=E;else if(this.data.height===E.height)this._splitRoot(this.data,E);else{if(this.data.height<E.height){var A=this.data;this.data=E,E=A}this._insert(E,this.data.height-E.height-1,!0)}return this},o.prototype.insert=function(w){return w&&this._insert(w,this.data.height-1),this},o.prototype.clear=function(){return this.data=b([]),this},o.prototype.remove=function(w,M){if(!w)return this;for(var E=this.data,A=this.toBBox(w),P=[],C=[],D,N,k;E||P.length;){if(E||(E=P.pop(),N=P[P.length-1],D=C.pop(),k=!0),E.leaf){var R=s(w,E.children,M);if(R!==-1)return E.children.splice(R,1),P.push(E),this._condense(P),this}!k&&!E.leaf&&y(E,A)?(P.push(E),C.push(D),D=0,N=E,E=E.children[0]):N?(D++,E=N.children[D],k=!1):E=null}return this},o.prototype.toBBox=function(w){return w},o.prototype.compareMinX=function(w,M){return w.minX-M.minX},o.prototype.compareMinY=function(w,M){return w.minY-M.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(w){return this.data=w,this},o.prototype._all=function(w,M){for(var E=[];w;)w.leaf?M.push.apply(M,w.children):E.push.apply(E,w.children),w=E.pop();return M},o.prototype._build=function(w,M,E,A){var P=E-M+1,C=this._maxEntries,D;if(P<=C)return D=b(w.slice(M,E+1)),c(D,this.toBBox),D;A||(A=Math.ceil(Math.log(P)/Math.log(C)),C=Math.ceil(P/Math.pow(C,A-1))),D=b([]),D.leaf=!1,D.height=A;var N=Math.ceil(P/C),k=N*Math.ceil(Math.sqrt(C));_(w,M,E,k,this.compareMinX);for(var R=M;R<=E;R+=k){var I=Math.min(R+k-1,E);_(w,R,I,N,this.compareMinY);for(var F=R;F<=I;F+=N){var B=Math.min(F+N-1,I);D.children.push(this._build(w,F,B,A-1))}}return c(D,this.toBBox),D},o.prototype._chooseSubtree=function(w,M,E,A){for(;A.push(M),!(M.leaf||A.length-1===E);){for(var P=1/0,C=1/0,D=void 0,N=0;N<M.children.length;N++){var k=M.children[N],R=h(k),I=v(w,k)-R;I<C?(C=I,P=R<P?R:P,D=k):I===C&&R<P&&(P=R,D=k)}M=D||M.children[0]}return M},o.prototype._insert=function(w,M,E){var A=E?w:this.toBBox(w),P=[],C=this._chooseSubtree(A,this.data,M,P);for(C.children.push(w),u(C,A);M>=0&&P[M].children.length>this._maxEntries;)this._split(P,M),M--;this._adjustParentBBoxes(A,P,M)},o.prototype._split=function(w,M){var E=w[M],A=E.children.length,P=this._minEntries;this._chooseSplitAxis(E,P,A);var C=this._chooseSplitIndex(E,P,A),D=b(E.children.splice(C,E.children.length-C));D.height=E.height,D.leaf=E.leaf,c(E,this.toBBox),c(D,this.toBBox),M?w[M-1].children.push(D):this._splitRoot(E,D)},o.prototype._splitRoot=function(w,M){this.data=b([w,M]),this.data.height=w.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(w,M,E){for(var A,P=1/0,C=1/0,D=M;D<=E-M;D++){var N=l(w,0,D,this.toBBox),k=l(w,D,E,this.toBBox),R=g(N,k),I=h(N)+h(k);R<P?(P=R,A=D,C=I<C?I:C):R===P&&I<C&&(C=I,A=D)}return A||E-M},o.prototype._chooseSplitAxis=function(w,M,E){var A=w.leaf?this.compareMinX:f,P=w.leaf?this.compareMinY:d,C=this._allDistMargin(w,M,E,A),D=this._allDistMargin(w,M,E,P);C<D&&w.children.sort(A)},o.prototype._allDistMargin=function(w,M,E,A){w.children.sort(A);for(var P=this.toBBox,C=l(w,0,M,P),D=l(w,E-M,E,P),N=p(C)+p(D),k=M;k<E-M;k++){var R=w.children[k];u(C,w.leaf?P(R):R),N+=p(C)}for(var I=E-M-1;I>=M;I--){var F=w.children[I];u(D,w.leaf?P(F):F),N+=p(D)}return N},o.prototype._adjustParentBBoxes=function(w,M,E){for(var A=E;A>=0;A--)u(M[A],w)},o.prototype._condense=function(w){for(var M=w.length-1,E=void 0;M>=0;M--)w[M].children.length===0?M>0?(E=w[M-1].children,E.splice(E.indexOf(w[M]),1)):this.clear():c(w[M],this.toBBox)};function s(O,w,M){if(!M)return w.indexOf(O);for(var E=0;E<w.length;E++)if(M(O,w[E]))return E;return-1}function c(O,w){l(O,0,O.children.length,w,O)}function l(O,w,M,E,A){A||(A=b(null)),A.minX=1/0,A.minY=1/0,A.maxX=-1/0,A.maxY=-1/0;for(var P=w;P<M;P++){var C=O.children[P];u(A,O.leaf?E(C):C)}return A}function u(O,w){return O.minX=Math.min(O.minX,w.minX),O.minY=Math.min(O.minY,w.minY),O.maxX=Math.max(O.maxX,w.maxX),O.maxY=Math.max(O.maxY,w.maxY),O}function f(O,w){return O.minX-w.minX}function d(O,w){return O.minY-w.minY}function h(O){return(O.maxX-O.minX)*(O.maxY-O.minY)}function p(O){return O.maxX-O.minX+(O.maxY-O.minY)}function v(O,w){return(Math.max(w.maxX,O.maxX)-Math.min(w.minX,O.minX))*(Math.max(w.maxY,O.maxY)-Math.min(w.minY,O.minY))}function g(O,w){var M=Math.max(O.minX,w.minX),E=Math.max(O.minY,w.minY),A=Math.min(O.maxX,w.maxX),P=Math.min(O.maxY,w.maxY);return Math.max(0,A-M)*Math.max(0,P-E)}function y(O,w){return O.minX<=w.minX&&O.minY<=w.minY&&w.maxX<=O.maxX&&w.maxY<=O.maxY}function m(O,w){return w.minX<=O.maxX&&w.minY<=O.maxY&&w.maxX>=O.minX&&w.maxY>=O.minY}function b(O){return{children:O,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(O,w,M,E,A){for(var P=[w,M];P.length;)if(M=P.pop(),w=P.pop(),!(M-w<=E)){var C=w+Math.ceil((M-w)/E/2)*E;n(O,C,w,M,A),P.push(w,C,C,M)}}return o})})(Kb);var i8=Kb.exports,bt;(function(t){t.GROUP="g",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html",t.MESH="mesh"})(bt||(bt={}));var Fs;(function(t){t[t.ZERO=0]="ZERO",t[t.NEGATIVE_ONE=1]="NEGATIVE_ONE"})(Fs||(Fs={}));var to=function(){function t(){this.plugins=[]}return t.prototype.addRenderingPlugin=function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)},t.prototype.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(n){var r=e.context.renderingPlugins.indexOf(n);r>=0&&e.context.renderingPlugins.splice(r,1)})},t}(),a8=function(){function t(e){this.clipSpaceNearZ=Fs.NEGATIVE_ONE,this.plugins=[],this.config=(0,S.pi)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},e)}return t.prototype.registerPlugin=function(e){var n=this.plugins.findIndex(function(r){return r===e});n===-1&&this.plugins.push(e)},t.prototype.unregisterPlugin=function(e){var n=this.plugins.findIndex(function(r){return r===e});n>-1&&this.plugins.splice(n,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(e){return this.plugins.find(function(n){return n.name===e})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(e){Object.assign(this.config,e)},t}();function Bs(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i0(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function df(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Qb(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function o8(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function s8(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function zs(t){return t===void 0?0:t>360||t<-360?t%360:t}function ti(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=0),Array.isArray(t)&&t.length===3?ot.clone(t):(0,xr.Z)(t)?ot.fromValues(t,e,n):ot.fromValues(t[0],t[1]||e,t[2]||n)}function rr(t){return t*(Math.PI/180)}function ki(t){return t*(180/Math.PI)}function Vft(t){return t=t%400,t<0&&(t+=400),t/400*360}function $ft(t){return t/360}function c8(t){return 360*t}function l8(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n,s=r*r,c=i*i,l=a*a,u=o+s+c+l,f=n*a-r*i;return f>.499995*u?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):f<-.499995*u?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-a*r)),t[1]=Math.atan2(2*(n*a+r*i),1-2*(c+l)),t[2]=Math.atan2(2*(n*r+i*a),1-2*(s+c))),t}function u8(t,e){var n,r,i=Math.PI*.5,a=(0,S.CR)(qt.getScaling(ot.create(),e),3),o=a[0],s=a[1],c=a[2],l=Math.asin(-e[2]/o);return l<i?l>-i?(n=Math.atan2(e[6]/s,e[10]/c),r=Math.atan2(e[1]/o,e[0]/o)):(r=0,n=-Math.atan2(e[4]/s,e[5]/s)):(r=0,n=Math.atan2(e[4]/s,e[5]/s)),t[0]=n,t[1]=l,t[2]=r,t}function a0(t,e){return e.length===16?u8(t,e):l8(t,e)}function f8(t,e,n,r,i){var a=Math.cos(t),o=Math.sin(t);return ZI(r*a,i*o,0,-r*o,i*a,0,e,n,1)}function d8(t,e,n,r,i,a,o,s){s===void 0&&(s=!1);var c=2*a/(n-e),l=2*a/(r-i),u=(n+e)/(n-e),f=(r+i)/(r-i),d,h;return s?(d=-o/(o-a),h=-o*a/(o-a)):(d=-(o+a)/(o-a),h=-2*o*a/(o-a)),t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=u,t[9]=f,t[10]=d,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0,t}function Jb(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i),s=e*i-n*r;s<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a),o&&(r*=1/o,i*=1/o);var c=Math.atan2(n,e),l=ki(c);return[t[6],t[7],a,o,l]}var aa=qt.create(),Ui=qt.create(),Qc=cr.Ue(),Ge=[ot.create(),ot.create(),ot.create()],tx=ot.create();function h8(t,e,n,r,i,a){if(!p8(aa,t)||(qt.copy(Ui,aa),Ui[3]=0,Ui[7]=0,Ui[11]=0,Ui[15]=1,Math.abs(qt.determinant(Ui))<1e-8))return!1;var o=aa[3],s=aa[7],c=aa[11],l=aa[12],u=aa[13],f=aa[14],d=aa[15];if(o!==0||s!==0||c!==0){Qc[0]=o,Qc[1]=s,Qc[2]=c,Qc[3]=d;var h=qt.invert(Ui,Ui);if(!h)return!1;qt.transpose(Ui,Ui),cr.fF(i,Qc,Ui)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=u,e[2]=f,v8(Ge,aa),n[0]=ot.length(Ge[0]),ot.normalize(Ge[0],Ge[0]),r[0]=ot.dot(Ge[0],Ge[1]),o0(Ge[1],Ge[1],Ge[0],1,-r[0]),n[1]=ot.length(Ge[1]),ot.normalize(Ge[1],Ge[1]),r[0]/=n[1],r[1]=ot.dot(Ge[0],Ge[2]),o0(Ge[2],Ge[2],Ge[0],1,-r[1]),r[2]=ot.dot(Ge[1],Ge[2]),o0(Ge[2],Ge[2],Ge[1],1,-r[2]),n[2]=ot.length(Ge[2]),ot.normalize(Ge[2],Ge[2]),r[1]/=n[2],r[2]/=n[2],ot.cross(tx,Ge[1],Ge[2]),ot.dot(Ge[0],tx)<0)for(var p=0;p<3;p++)n[p]*=-1,Ge[p][0]*=-1,Ge[p][1]*=-1,Ge[p][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Ge[0][0]-Ge[1][1]-Ge[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Ge[0][0]+Ge[1][1]-Ge[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Ge[0][0]-Ge[1][1]+Ge[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Ge[0][0]+Ge[1][1]+Ge[2][2],0)),Ge[2][1]>Ge[1][2]&&(a[0]=-a[0]),Ge[0][2]>Ge[2][0]&&(a[1]=-a[1]),Ge[1][0]>Ge[0][1]&&(a[2]=-a[2]),!0}function p8(t,e){var n=e[15];if(n===0)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}function v8(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}function o0(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var Sr=function(){function t(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return t.isEmpty=function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0},t.prototype.update=function(e,n){Bs(this.center,e),Bs(this.halfExtents,n),i0(this.min,this.center,this.halfExtents),df(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(e,n){df(this.center,n,e),Qb(this.center,this.center,.5),i0(this.halfExtents,n,e),Qb(this.halfExtents,this.halfExtents,.5),Bs(this.min,e),Bs(this.max,n)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e)){if(t.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var n=this.center,r=n[0],i=n[1],a=n[2],o=this.halfExtents,s=o[0],c=o[1],l=o[2],u=r-s,f=r+s,d=i-c,h=i+c,p=a-l,v=a+l,g=e.center,y=g[0],m=g[1],b=g[2],_=e.halfExtents,O=_[0],w=_[1],M=_[2],E=y-O,A=y+O,P=m-w,C=m+w,D=b-M,N=b+M;E<u&&(u=E),A>f&&(f=A),P<d&&(d=P),C>h&&(h=C),D<p&&(p=D),N>v&&(v=N),n[0]=(u+f)*.5,n[1]=(d+h)*.5,n[2]=(p+v)*.5,o[0]=(f-u)*.5,o[1]=(h-d)*.5,o[2]=(v-p)*.5,this.min[0]=u,this.min[1]=d,this.min[2]=p,this.max[0]=f,this.max[1]=h,this.max[2]=v}},t.prototype.setFromTransformedAABB=function(e,n){var r=this.center,i=this.halfExtents,a=e.center,o=e.halfExtents,s=n[0],c=n[4],l=n[8],u=n[1],f=n[5],d=n[9],h=n[2],p=n[6],v=n[10],g=Math.abs(s),y=Math.abs(c),m=Math.abs(l),b=Math.abs(u),_=Math.abs(f),O=Math.abs(d),w=Math.abs(h),M=Math.abs(p),E=Math.abs(v);r[0]=n[12]+s*a[0]+c*a[1]+l*a[2],r[1]=n[13]+u*a[0]+f*a[1]+d*a[2],r[2]=n[14]+h*a[0]+p*a[1]+v*a[2],i[0]=g*o[0]+y*o[1]+m*o[2],i[1]=b*o[0]+_*o[1]+O*o[2],i[2]=w*o[0]+M*o[1]+E*o[2],i0(this.min,r,i),df(this.max,r,i)},t.prototype.intersects=function(e){var n=this.getMax(),r=this.getMin(),i=e.getMax(),a=e.getMin();return r[0]<=i[0]&&n[0]>=a[0]&&r[1]<=i[1]&&n[1]>=a[1]&&r[2]<=i[2]&&n[2]>=a[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n=new t,r=o8([0,0,0],this.getMin(),e.getMin()),i=s8([0,0,0],this.getMax(),e.getMax());return n.setMinMax(r,i),n},t.prototype.getNegativeFarPoint=function(e){return e.pnVertexFlag===273?Bs([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]},t.prototype.getPositiveFarPoint=function(e){return e.pnVertexFlag===273?Bs([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]},t}(),g8=function(){function t(e,n){this.distance=e||0,this.normal=n||ot.fromValues(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)},t.prototype.distanceToPoint=function(e){return ot.dot(e,this.normal)-this.distance},t.prototype.normalize=function(){var e=1/ot.len(this.normal);ot.scale(this.normal,this.normal,e),this.distance*=e},t.prototype.intersectsLine=function(e,n,r){var i=this.distanceToPoint(e),a=this.distanceToPoint(n),o=i/(i-a),s=o>=0&&o<=1;return s&&r&&ot.lerp(r,e,n,o),s},t}(),eo;(function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"})(eo||(eo={}));var y8=function(){function t(e){if(this.planes=[],e)this.planes=e;else for(var n=0;n<6;n++)this.planes.push(new g8)}return t.prototype.extractFromVPMatrix=function(e){var n=(0,S.CR)(e,16),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],f=n[8],d=n[9],h=n[10],p=n[11],v=n[12],g=n[13],y=n[14],m=n[15];ot.set(this.planes[0].normal,o-r,u-s,p-f),this.planes[0].distance=m-v,ot.set(this.planes[1].normal,o+r,u+s,p+f),this.planes[1].distance=m+v,ot.set(this.planes[2].normal,o+i,u+c,p+d),this.planes[2].distance=m+g,ot.set(this.planes[3].normal,o-i,u-c,p-d),this.planes[3].distance=m-g,ot.set(this.planes[4].normal,o-a,u-l,p-h),this.planes[4].distance=m-y,ot.set(this.planes[5].normal,o+a,u+l,p+h),this.planes[5].distance=m+y,this.planes.forEach(function(b){b.normalize(),b.updatePNVertexFlag()})},t}(),Pr=function(){function t(e,n){e===void 0&&(e=0),n===void 0&&(n=0),this.x=0,this.y=0,this.x=e,this.y=n}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(e){this.x=e.x,this.y=e.y},t}(),$o=function(){function t(e,n,r,i){this.x=e,this.y=n,this.width=r,this.height=i,this.left=e,this.right=e+r,this.top=n,this.bottom=n+i}return t.prototype.toJSON=function(){},t}(),Pn="Method not implemented.",Gs="Use document.documentElement instead.",m8="Cannot append a destroyed element.",wn;(function(t){t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING"})(wn||(wn={}));var Jc;(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.ROTATIONAL=1]="ROTATIONAL",t[t.TRANSLATIONAL=2]="TRANSLATIONAL",t[t.CINEMATIC=3]="CINEMATIC"})(Jc||(Jc={}));var ui;(function(t){t[t.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",t[t.PERSPECTIVE=1]="PERSPECTIVE"})(ui||(ui={}));var ex={UPDATED:"updated"},nx=2e-4,rx=function(){function t(){this.clipSpaceNearZ=Fs.NEGATIVE_ONE,this.eventEmitter=new qp.Z,this.matrix=qt.create(),this.right=ot.fromValues(1,0,0),this.up=ot.fromValues(0,1,0),this.forward=ot.fromValues(0,0,1),this.position=ot.fromValues(0,0,1),this.focalPoint=ot.fromValues(0,0,0),this.distanceVector=ot.fromValues(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=qt.create(),this.projectionMatrixInverse=qt.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=wn.EXPLORING,this.trackingMode=Jc.DEFAULT,this.projectionMode=ui.PERSPECTIVE,this.frustum=new y8,this.orthoMatrix=qt.create()}return t.prototype.isOrtho=function(){return this.projectionMode===ui.ORTHOGRAPHIC},t.prototype.getProjectionMode=function(){return this.projectionMode},t.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.prototype.getFrustum=function(){return this.frustum},t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getDollyingStep=function(){return this.dollyingStep},t.prototype.getNear=function(){return this.near},t.prototype.getFar=function(){return this.far},t.prototype.getZoom=function(){return this.zoom},t.prototype.getOrthoMatrix=function(){return this.orthoMatrix},t.prototype.getView=function(){return this.view},t.prototype.setEnableUpdate=function(e){this.enableUpdate=e},t.prototype.setType=function(e,n){return this.type=e,this.type===wn.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===wn.TRACKING&&n!==void 0&&this.setTrackingMode(n),this},t.prototype.setProjectionMode=function(e){return this.projectionMode=e,this},t.prototype.setTrackingMode=function(e){if(this.type!==wn.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this},t.prototype.setWorldRotation=function(e){return this.rotateWorld=e,this._getAngles(),this},t.prototype.getViewTransform=function(){return qt.invert(qt.create(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(e,n){var r=qt.fromTranslation(qt.create(),[e,n,0]);this.jitteredProjectionMatrix=qt.multiply(qt.create(),r,this.projectionMatrix)},t.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.prototype.setMatrix=function(e){return this.matrix=e,this._update(),this},t.prototype.setFov=function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this},t.prototype.setAspect=function(e){return this.setPerspective(this.near,this.far,this.fov,e),this},t.prototype.setNear=function(e){return this.projectionMode===ui.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this},t.prototype.setFar=function(e){return this.projectionMode===ui.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this},t.prototype.setViewOffset=function(e,n,r,i,a,o){return this.aspect=e/n,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=a,this.view.height=o,this.projectionMode===ui.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.clearViewOffset=function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===ui.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.setZoom=function(e){return this.zoom=e,this.projectionMode===ui.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===ui.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.prototype.setZoomByViewportPoint=function(e,n){var r=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),i=r.x,a=r.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(i,a),this.setFocalPoint(i,a),this.setZoom(e),this.rotate(0,0,o);var s=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),c=s.x,l=s.y,u=ot.fromValues(c-i,l-a,0),f=ot.dot(u,this.right)/ot.length(this.right),d=ot.dot(u,this.up)/ot.length(this.up);return this.pan(-f,-d),this},t.prototype.setPerspective=function(e,n,r,i){var a;this.projectionMode=ui.PERSPECTIVE,this.fov=r,this.near=e,this.far=n,this.aspect=i;var o=this.near*Math.tan(rr(.5*this.fov))/this.zoom,s=2*o,c=this.aspect*s,l=-.5*c;if(!((a=this.view)===null||a===void 0)&&a.enabled){var u=this.view.fullWidth,f=this.view.fullHeight;l+=this.view.offsetX*c/u,o-=this.view.offsetY*s/f,c*=this.view.width/u,s*=this.view.height/f}return d8(this.projectionMatrix,l,l+c,o,o-s,e,this.far,this.clipSpaceNearZ===Fs.ZERO),qt.scale(this.projectionMatrix,this.projectionMatrix,ot.fromValues(1,-1,1)),qt.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(e,n,r,i,a,o){var s;this.projectionMode=ui.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=r,this.bottom=i,this.near=a,this.far=o;var c=(this.rright-this.left)/(2*this.zoom),l=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,f=(this.top+this.bottom)/2,d=u-c,h=u+c,p=f+l,v=f-l;if(!((s=this.view)===null||s===void 0)&&s.enabled){var g=(this.rright-this.left)/this.view.fullWidth/this.zoom,y=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d+=g*this.view.offsetX,h=d+g*this.view.width,p-=y*this.view.offsetY,v=p-y*this.view.height}return this.clipSpaceNearZ===Fs.NEGATIVE_ONE?qt.ortho(this.projectionMatrix,d,h,v,p,a,o):qt.orthoZO(this.projectionMatrix,d,h,v,p,a,o),qt.scale(this.projectionMatrix,this.projectionMatrix,ot.fromValues(1,-1,1)),qt.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.prototype.setPosition=function(e,n,r){n===void 0&&(n=this.position[1]),r===void 0&&(r=this.position[2]);var i=ti(e,n,r);return this._setPosition(i),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},t.prototype.setFocalPoint=function(e,n,r){n===void 0&&(n=this.focalPoint[1]),r===void 0&&(r=this.focalPoint[2]);var i=ot.fromValues(0,1,0);if(this.focalPoint=ti(e,n,r),this.trackingMode===Jc.CINEMATIC){var a=ot.subtract(ot.create(),this.focalPoint,this.position);e=a[0],n=a[1],r=a[2];var o=ot.length(a),s=ki(Math.asin(n/o)),c=90+ki(Math.atan2(r,e)),l=qt.create();qt.rotateY(l,l,rr(c)),qt.rotateX(l,l,rr(s)),i=ot.transformMat4(ot.create(),[0,1,0],l)}return qt.invert(this.matrix,qt.lookAt(qt.create(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.prototype.getDistance=function(){return this.distance},t.prototype.getDistanceVector=function(){return this.distanceVector},t.prototype.setDistance=function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<nx&&(this.distance=nx),this.dollyingStep=this.distance/100;var n=ot.create();e=this.distance;var r=this.forward,i=this.focalPoint;return n[0]=e*r[0]+i[0],n[1]=e*r[1]+i[1],n[2]=e*r[2]+i[2],this._setPosition(n),this.triggerUpdate(),this},t.prototype.setMaxDistance=function(e){return this.maxDistance=e,this},t.prototype.setMinDistance=function(e){return this.minDistance=e,this},t.prototype.setAzimuth=function(e){return this.azimuth=zs(e),this.computeMatrix(),this._getAxes(),this.type===wn.ORBITING||this.type===wn.EXPLORING?this._getPosition():this.type===wn.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(e){return this.elevation=zs(e),this.computeMatrix(),this._getAxes(),this.type===wn.ORBITING||this.type===wn.EXPLORING?this._getPosition():this.type===wn.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(e){return this.roll=zs(e),this.computeMatrix(),this._getAxes(),this.type===wn.ORBITING||this.type===wn.EXPLORING?this._getPosition():this.type===wn.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getRoll=function(){return this.roll},t.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.prototype.computeMatrix=function(){var e=Ka(br(),[0,0,1],rr(this.roll));qt.identity(this.matrix);var n=Ka(br(),[1,0,0],rr((this.rotateWorld&&this.type!==wn.TRACKING||this.type===wn.TRACKING?1:-1)*this.elevation)),r=Ka(br(),[0,1,0],rr((this.rotateWorld&&this.type!==wn.TRACKING||this.type===wn.TRACKING?1:-1)*this.azimuth)),i=Qa(br(),r,n);i=Qa(br(),i,e);var a=qt.fromQuat(qt.create(),i);this.type===wn.ORBITING||this.type===wn.EXPLORING?(qt.translate(this.matrix,this.matrix,this.focalPoint),qt.multiply(this.matrix,this.matrix,a),qt.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===wn.TRACKING&&(qt.translate(this.matrix,this.matrix,this.position),qt.multiply(this.matrix,this.matrix,a))},t.prototype._setPosition=function(e,n,r){this.position=ti(e,n,r);var i=this.matrix;i[12]=this.position[0],i[13]=this.position[1],i[14]=this.position[2],i[15]=1,this._getOrthoMatrix()},t.prototype._getAxes=function(){ot.copy(this.right,ti(cr.fF(cr.Ue(),[1,0,0,0],this.matrix))),ot.copy(this.up,ti(cr.fF(cr.Ue(),[0,1,0,0],this.matrix))),ot.copy(this.forward,ti(cr.fF(cr.Ue(),[0,0,1,0],this.matrix))),ot.normalize(this.right,this.right),ot.normalize(this.up,this.up),ot.normalize(this.forward,this.forward)},t.prototype._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=ot.length(this.distanceVector);if(i===0){this.elevation=0,this.azimuth=0;return}this.type===wn.TRACKING?(this.elevation=ki(Math.asin(n/i)),this.azimuth=ki(Math.atan2(-e,-r))):this.rotateWorld?(this.elevation=ki(Math.asin(n/i)),this.azimuth=ki(Math.atan2(-e,-r))):(this.elevation=-ki(Math.asin(n/i)),this.azimuth=-ki(Math.atan2(-e,-r)))},t.prototype._getPosition=function(){ot.copy(this.position,ti(cr.fF(cr.Ue(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){ot.transformMat3(this.distanceVector,[0,0,-this.distance],qI(bb(),this.matrix)),ot.add(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=ot.subtract(ot.create(),this.focalPoint,this.position),this.distance=ot.length(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===ui.ORTHOGRAPHIC){var e=this.position,n=Ka(br(),[0,0,1],-this.roll*Math.PI/180);qt.fromRotationTranslationScaleOrigin(this.orthoMatrix,n,ot.fromValues((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),ot.fromValues(this.zoom,this.zoom,1),e)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var e=this.getViewTransform(),n=qt.multiply(qt.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit(ex.UPDATED)}},t.prototype.rotate=function(e,n,r){throw new Error(Pn)},t.prototype.pan=function(e,n){throw new Error(Pn)},t.prototype.dolly=function(e){throw new Error(Pn)},t.prototype.createLandmark=function(e,n){throw new Error(Pn)},t.prototype.gotoLandmark=function(e,n){throw new Error(Pn)},t.prototype.cancelLandmarkAnimation=function(){throw new Error(Pn)},t}();function Hr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=e?e.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=t.apply(this,r);return n.cache=o.set(a,s)||o,s};return n.cache=new(Hr.Cache||Map),n}Hr.Cache=Map;var ne;(function(t){t[t.kUnknown=0]="kUnknown",t[t.kNumber=1]="kNumber",t[t.kPercentage=2]="kPercentage",t[t.kEms=3]="kEms",t[t.kPixels=4]="kPixels",t[t.kRems=5]="kRems",t[t.kDegrees=6]="kDegrees",t[t.kRadians=7]="kRadians",t[t.kGradians=8]="kGradians",t[t.kTurns=9]="kTurns",t[t.kMilliseconds=10]="kMilliseconds",t[t.kSeconds=11]="kSeconds",t[t.kInteger=12]="kInteger"})(ne||(ne={}));var Oi;(function(t){t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUOther=5]="kUOther"})(Oi||(Oi={}));var ix;(function(t){t[t.kAll=0]="kAll",t[t.kNonNegative=1]="kNonNegative",t[t.kInteger=2]="kInteger",t[t.kNonNegativeInteger=3]="kNonNegativeInteger",t[t.kPositiveInteger=4]="kPositiveInteger"})(ix||(ix={}));var s0;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(s0||(s0={}));var c0;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(c0||(c0={}));var b8=[{name:"em",unit_type:ne.kEms},{name:"px",unit_type:ne.kPixels},{name:"deg",unit_type:ne.kDegrees},{name:"rad",unit_type:ne.kRadians},{name:"grad",unit_type:ne.kGradians},{name:"ms",unit_type:ne.kMilliseconds},{name:"s",unit_type:ne.kSeconds},{name:"rem",unit_type:ne.kRems},{name:"turn",unit_type:ne.kTurns}],no;(function(t){t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType"})(no||(no={}));var x8=function(t){return b8.find(function(e){return e.name===t}).unit_type},_8=function(t){return t?t==="number"?ne.kNumber:t==="percent"||t==="%"?ne.kPercentage:x8(t):ne.kUnknown},O8=function(t){switch(t){case ne.kNumber:case ne.kInteger:return Oi.kUNumber;case ne.kPercentage:return Oi.kUPercent;case ne.kPixels:return Oi.kULength;case ne.kMilliseconds:case ne.kSeconds:return Oi.kUTime;case ne.kDegrees:case ne.kRadians:case ne.kGradians:case ne.kTurns:return Oi.kUAngle;default:return Oi.kUOther}},w8=function(t){switch(t){case Oi.kUNumber:return ne.kNumber;case Oi.kULength:return ne.kPixels;case Oi.kUPercent:return ne.kPercentage;case Oi.kUTime:return ne.kSeconds;case Oi.kUAngle:return ne.kDegrees;default:return ne.kUnknown}},ax=function(t){var e=1;switch(t){case ne.kPixels:case ne.kDegrees:case ne.kSeconds:break;case ne.kMilliseconds:e=.001;break;case ne.kRadians:e=180/Math.PI;break;case ne.kGradians:e=.9;break;case ne.kTurns:e=360;break}return e},l0=function(t){switch(t){case ne.kNumber:case ne.kInteger:return"";case ne.kPercentage:return"%";case ne.kEms:return"em";case ne.kRems:return"rem";case ne.kPixels:return"px";case ne.kDegrees:return"deg";case ne.kRadians:return"rad";case ne.kGradians:return"grad";case ne.kMilliseconds:return"ms";case ne.kSeconds:return"s";case ne.kTurns:return"turn"}return""},hf=function(){function t(){}return t.isAngle=function(e){return e===ne.kDegrees||e===ne.kRadians||e===ne.kGradians||e===ne.kTurns},t.isLength=function(e){return e>=ne.kEms&&e<ne.kDegrees},t.isRelativeUnit=function(e){return e===ne.kPercentage||e===ne.kEms||e===ne.kRems},t.isTime=function(e){return e===ne.kSeconds||e===ne.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(s0.kNo,c0.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=no.kUnitType&&this.getType()<=no.kClampType},t}(),S8=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this)||this;return r.colorSpace=n,r}return e.prototype.getType=function(){return no.kColorType},e.prototype.to=function(n){return this},e}(hf),oa;(function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient"})(oa||(oa={}));var pf=function(t){(0,S.ZT)(e,t);function e(n,r){var i=t.call(this)||this;return i.type=n,i.value=r,i}return e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(n,r,i){return i},e.prototype.getType=function(){return no.kColorType},e}(hf),fi=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this)||this;return r.value=n,r}return e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return no.kKeywordType},e.prototype.buildCSSText=function(n,r,i){return i+this.value},e}(hf),M8=Hr(function(t){return t===void 0&&(t=""),t.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}),ox=function(t){return t.split("").map(function(e,n){return e.toUpperCase()===e?"".concat(n!==0?"-":"").concat(e.toLowerCase()):e}).join("")};function E8(t){if(!t)throw new Error}function Ws(t){return typeof t=="function"}function A8(t){return typeof t=="symbol"}var Xft=function(t){return Object.fromEntries(Object.entries(t).filter(function(e){var n=__read(e,2),r=n[1];return r!==void 0}))},T8={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},u0=Hr(function(t){var e=M8(t),n=T8[e];return e=(n==null?void 0:n.alias)||e,e}),P8=function(t,e){e===void 0&&(e="");var n="";return Number.isFinite(t)?(E8(Number.isNaN(t)),n="NaN"):t>0?n="infinity":n="-infinity",n+=e},f0=function(t){return w8(O8(t))},Cn=function(t){(0,S.ZT)(e,t);function e(n,r){r===void 0&&(r=ne.kNumber);var i=t.call(this)||this,a;return typeof r=="string"?a=_8(r):a=r,i.unit=a,i.value=n,i}return e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.equals=function(n){var r=n;return this.value===r.value&&this.unit===r.unit},e.prototype.getType=function(){return no.kUnitType},e.prototype.convertTo=function(n){if(this.unit===n)return new e(this.value,this.unit);var r=f0(this.unit);if(r!==f0(n)||r===ne.kUnknown)return null;var i=ax(this.unit)/ax(n);return new e(this.value*i,n)},e.prototype.buildCSSText=function(n,r,i){var a;switch(this.unit){case ne.kUnknown:break;case ne.kInteger:a=Number(this.value).toFixed(0);break;case ne.kNumber:case ne.kPercentage:case ne.kEms:case ne.kRems:case ne.kPixels:case ne.kDegrees:case ne.kRadians:case ne.kGradians:case ne.kMilliseconds:case ne.kSeconds:case ne.kTurns:{var o=-999999,s=999999,c=this.value,l=l0(this.unit);if(c<o||c>s){var u=l0(this.unit);!Number.isFinite(c)||Number.isNaN(c)?a=P8(c,u):a=c+(u||"")}else a="".concat(c).concat(l)}}return i+=a,i},e}(hf),Cr=new Cn(0,"px");new Cn(1,"px");var Ta=new Cn(0,"deg"),d0=function(t){(0,S.ZT)(e,t);function e(n,r,i,a,o){a===void 0&&(a=1),o===void 0&&(o=!1);var s=t.call(this,"rgb")||this;return s.r=n,s.g=r,s.b=i,s.alpha=a,s.isNone=o,s}return e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(n,r,i){return i+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(S8),In=new fi("unset"),C8=new fi("initial"),k8=new fi("inherit"),h0={"":In,unset:In,initial:C8,inherit:k8},p0=function(t){return h0[t]||(h0[t]=new fi(t)),h0[t]},v0=new d0(0,0,0,0,!0),sx=new d0(0,0,0,0),R8=Hr(function(t,e,n,r){return new d0(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),ir=function(t,e){return e===void 0&&(e=ne.kNumber),new Cn(t,e)},vf=new Cn(50,"%"),g0;(function(t){t[t.Standard=0]="Standard"})(g0||(g0={}));var Hs;(function(t){t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED",t[t.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED"})(Hs||(Hs={}));var cx={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new $o(0,0,0,0)},oe;(function(t){t.COORDINATE="<coordinate>",t.COLOR="<color>",t.PAINT="<paint>",t.NUMBER="<number>",t.ANGLE="<angle>",t.OPACITY_VALUE="<opacity-value>",t.SHADOW_BLUR="<shadow-blur>",t.LENGTH="<length>",t.PERCENTAGE="<percentage>",t.LENGTH_PERCENTAGE="<length> | <percentage>",t.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",t.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",t.LIST_OF_POINTS="<list-of-points>",t.PATH="<path>",t.FILTER="<filter>",t.Z_INDEX="<z-index>",t.OFFSET_DISTANCE="<offset-distance>",t.DEFINED_PATH="<defined-path>",t.MARKER="<marker>",t.TRANSFORM="<transform>",t.TRANSFORM_ORIGIN="<transform-origin>",t.TEXT="<text>",t.TEXT_TRANSFORM="<text-transform>"})(oe||(oe={}));function L8(t){var e=t.type,n=t.value;return e==="hex"?"#".concat(n):e==="literal"?n:e==="rgb"?"rgb(".concat(n.join(","),")"):"rgba(".concat(n.join(","),")")}var N8=function(){var t={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function n(F){throw new Error(e+": "+F)}function r(){var F=i();return e.length>0&&n("Invalid input not EOF"),F}function i(){return b(a)}function a(){return o("linear-gradient",t.linearGradient,c)||o("repeating-linear-gradient",t.repeatingLinearGradient,c)||o("radial-gradient",t.radialGradient,f)||o("repeating-radial-gradient",t.repeatingRadialGradient,f)||o("conic-gradient",t.conicGradient,f)}function o(F,B,z){return s(B,function(Y){var U=z();return U&&(R(t.comma)||n("Missing comma before color stops")),{type:F,orientation:U,colorStops:b(_)}})}function s(F,B){var z=R(F);if(z){R(t.startCall)||n("Missing (");var Y=B(z);return R(t.endCall)||n("Missing )"),Y}}function c(){return l()||u()}function l(){return k("directional",t.sideOrCorner,1)}function u(){return k("angular",t.angleValue,1)}function f(){var F,B=d(),z;return B&&(F=[],F.push(B),z=e,R(t.comma)&&(B=d(),B?F.push(B):e=z)),F}function d(){var F=h()||p();if(F)F.at=g();else{var B=v();if(B){F=B;var z=g();z&&(F.at=z)}else{var Y=y();Y&&(F={type:"default-radial",at:Y})}}return F}function h(){var F=k("shape",/^(circle)/i,0);return F&&(F.style=N()||v()),F}function p(){var F=k("shape",/^(ellipse)/i,0);return F&&(F.style=C()||v()),F}function v(){return k("extent-keyword",t.extentKeywords,1)}function g(){if(k("position",/^at/,0)){var F=y();return F||n("Missing positioning value"),F}}function y(){var F=m();if(F.x||F.y)return{type:"position",value:F}}function m(){return{x:C(),y:C()}}function b(F){var B=F(),z=[];if(B)for(z.push(B);R(t.comma);)B=F(),B?z.push(B):n("One extra comma");return z}function _(){var F=O();return F||n("Expected color definition"),F.length=C(),F}function O(){return M()||A()||E()||w()}function w(){return k("literal",t.literalColor,0)}function M(){return k("hex",t.hexColor,1)}function E(){return s(t.rgbColor,function(){return{type:"rgb",value:b(P)}})}function A(){return s(t.rgbaColor,function(){return{type:"rgba",value:b(P)}})}function P(){return R(t.number)[1]}function C(){return k("%",t.percentageValue,1)||D()||N()}function D(){return k("position-keyword",t.positionKeywords,1)}function N(){return k("px",t.pixelValue,1)||k("em",t.emValue,1)}function k(F,B,z){var Y=R(B);if(Y)return{type:F,value:Y[z]}}function R(F){var B=/^[\n\r\t\s]+/.exec(e);B&&I(B[0].length);var z=F.exec(e);return z&&I(z[0].length),z}function I(F){e=e.substring(F)}return function(F){return e=F,r()}}();function I8(t,e,n){var r=rr(n.value),i=0,a=0,o=i+t/2,s=a+e/2,c=Math.abs(t*Math.cos(r))+Math.abs(e*Math.sin(r)),l=o-Math.cos(r)*c/2,u=s-Math.sin(r)*c/2,f=o+Math.cos(r)*c/2,d=s+Math.sin(r)*c/2;return{x1:l,y1:u,x2:f,y2:d}}function j8(t,e,n,r,i){var a=n.value,o=r.value;n.unit===ne.kPercentage&&(a=n.value/100*t),r.unit===ne.kPercentage&&(o=r.value/100*e);var s=Math.max(li([0,0],[a,o]),li([0,e],[a,o]),li([t,e],[a,o]),li([t,0],[a,o]));return i&&(i instanceof Cn?s=i.value:i instanceof fi&&(i.value==="closest-side"?s=Math.min(a,t-a,o,e-o):i.value==="farthest-side"?s=Math.max(a,t-a,o,e-o):i.value==="closest-corner"&&(s=Math.min(li([0,0],[a,o]),li([0,e],[a,o]),li([t,e],[a,o]),li([t,0],[a,o]))))),{x:a,y:o,r:s}}var D8=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,F8=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,B8=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,lx=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function z8(t){var e,n,r,i=t.length;t[i-1].length=(e=t[i-1].length)!==null&&e!==void 0?e:{type:"%",value:"100"},i>1&&(t[0].length=(n=t[0].length)!==null&&n!==void 0?n:{type:"%",value:"0"});for(var a=0,o=Number(t[0].length.value),s=1;s<i;s++){var c=(r=t[s].length)===null||r===void 0?void 0:r.value;if(!(0,ye.Z)(c)&&!(0,ye.Z)(o)){for(var l=1;l<s-a;l++)t[a+l].length={type:"%",value:"".concat(o+(Number(c)-o)*l/(s-a))};a=s,o=Number(c)}}}var G8={left:270-90,top:0-90,bottom:180-90,right:90-90,"left top":315-90,"top left":315-90,"left bottom":225-90,"bottom left":225-90,"right top":45-90,"top right":45-90,"right bottom":135-90,"bottom right":135-90},W8=Hr(function(t){var e;return t.type==="angular"?e=Number(t.value):e=G8[t.value]||0,ir(e,"deg")}),H8=Hr(function(t){var e=50,n=50,r="%",i="%";if((t==null?void 0:t.type)==="position"){var a=t.value,o=a.x,s=a.y;(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?e=0:o.value==="center"?e=50:o.value==="right"?e=100:o.value==="top"?n=0:o.value==="bottom"&&(n=100)),(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?e=0:s.value==="center"?n=50:s.value==="right"?e=100:s.value==="top"?n=0:s.value==="bottom"&&(n=100)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(r=o==null?void 0:o.type,e=Number(o.value)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(i=s==null?void 0:s.type,n=Number(s.value))}return{cx:ir(e,r),cy:ir(n,i)}}),Y8=Hr(function(t){var e;if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var n=N8(t);return n.map(function(s){var c=s.type,l=s.orientation,u=s.colorStops;z8(u);var f=u.map(function(b){return{offset:ir(Number(b.length.value),"%"),color:L8(b)}});if(c==="linear-gradient")return new pf(oa.LinearGradient,{angle:l?W8(l):Ta,steps:f});if(c==="radial-gradient"&&(l||(l=[{type:"shape",value:"circle"}]),l[0].type==="shape"&&l[0].value==="circle")){var d=H8(l[0].at),h=d.cx,p=d.cy,v=void 0;if(l[0].style){var g=l[0].style,y=g.type,m=g.value;y==="extent-keyword"?v=p0(m):v=ir(m,y)}return new pf(oa.RadialGradient,{cx:h,cy:p,size:v,steps:f})}})}var r=t[0];if(t[1]==="("||t[2]==="("){if(r==="l"){var i=D8.exec(t);if(i){var a=((e=i[2].match(lx))===null||e===void 0?void 0:e.map(function(s){return s.split(":")}))||[];return[new pf(oa.LinearGradient,{angle:ir(parseFloat(i[1]),"deg"),steps:a.map(function(s){var c=(0,S.CR)(s,2),l=c[0],u=c[1];return{offset:ir(Number(l)*100,"%"),color:u}})})]}}else if(r==="r"){var o=V8(t);if(o)if(er(o))t=o;else return[new pf(oa.RadialGradient,o)]}else if(r==="p")return $8(t)}});function V8(t){var e,n=F8.exec(t);if(n){var r=((e=n[4].match(lx))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:ir(50,"%"),cy:ir(50,"%"),steps:r.map(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1];return{offset:ir(Number(o)*100,"%"),color:s}})}}return null}function $8(t){var e=B8.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;case"n":n="no-repeat";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}function Uft(t){return!!t.type&&!!t.value}function tl(t){return t&&!!t.image}function gf(t){return t&&!(0,ye.Z)(t.r)&&!(0,ye.Z)(t.g)&&!(0,ye.Z)(t.b)}var Pa=Hr(function(t){if(tl(t))return(0,S.pi)({repetition:"repeat"},t);if((0,ye.Z)(t)&&(t=""),t==="transparent")return sx;t==="currentColor"&&(t="black");var e=Y8(t);if(e)return e;var n=Ij.ZP(t),r=[0,0,0,0];return n!==null&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),R8.apply(void 0,(0,S.ev)([],(0,S.CR)(r),!1))});function X8(t,e){if(!(!gf(t)||!gf(e)))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(n){var r=n.slice();if(r[3])for(var i=0;i<3;i++)r[i]=Math.round((0,lr.Z)(r[i],0,255));return r[3]=(0,lr.Z)(r[3],0,1),"rgba(".concat(r.join(","),")")}]}function el(t,e){if((0,ye.Z)(e))return ir(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return ir(Number(e),"px");if("deg".search(t)>=0)return ir(Number(e),"deg")}var n=[];e=e.replace(t,function(i){return n.push(i),"U"+i});var r="U("+t.source+")";return n.map(function(i){return ir(Number(e.replace(new RegExp("U"+i,"g"),"").replace(new RegExp(r,"g"),"*0")),i)})[0]}var U8=Hr(function(t){return el(new RegExp("px","g"),t)});Hr(function(t){return el(new RegExp("%","g"),t)});var Ys=function(t){return(0,xr.Z)(t)||isFinite(Number(t))?ir(Number(t)||0,"px"):el(new RegExp("px|%|em|rem","g"),t)},ux=Hr(function(t){return el(new RegExp("deg|rad|grad|turn","g"),t)});function q8(t,e,n,r,i){i===void 0&&(i=0);var a="",o=t.value||0,s=e.value||0,c=f0(t.unit),l=t.convertTo(c),u=e.convertTo(c);return l&&u?(o=l.value,s=u.value,a=l0(t.unit)):(Cn.isLength(t.unit)||Cn.isLength(e.unit))&&(o=Si(t,i,n),s=Si(e,i,n),a="px"),[o,s,function(f){return r&&(f=Math.max(f,0)),f+a}]}function wi(t){var e=0;return t.unit===ne.kDegrees?e=t.value:t.unit===ne.kRadians?e=ki(Number(t.value)):t.unit===ne.kTurns&&(e=c8(Number(t.value))),e}function y0(t,e){var n;return Array.isArray(t)?n=t.map(function(r){return Number(r)}):er(t)?n=t.split(" ").map(function(r){return Number(r)}):(0,xr.Z)(t)&&(n=[t]),e===2?n.length===1?[n[0],n[0]]:[n[0],n[1]]:n.length===1?[n[0],n[0],n[0],n[0]]:n.length===2?[n[0],n[1],n[0],n[1]]:n.length===3?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function fx(t){return er(t)?t.split(" ").map(function(e){return Ys(e)}):t.map(function(e){return Ys(e.toString())})}function Si(t,e,n){if(t.value===0)return 0;if(t.unit===ne.kPixels)return Number(t.value);if(t.unit===ne.kPercentage&&n){var r=n.nodeName===bt.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var Z8=function(t){return el(/deg|rad|grad|turn|px|%/g,t)},K8=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function dx(t){if(t===void 0&&(t=""),t=t.toLowerCase().trim(),t==="none")return[];for(var e=/\s*([\w-]+)\(([^)]*)\)/g,n=[],r,i=0;r=e.exec(t);){if(r.index!==i)return[];if(i=r.index+r[0].length,K8.indexOf(r[1])>-1&&n.push({name:r[1],params:r[2].split(" ").map(function(a){return Z8(a)||Pa(a)})}),e.lastIndex===t.length)return n}return[]}function hx(t){return t.toString()}var Xo=Hr(function(t){return typeof t=="number"?ir(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ir(Number(t)):ir(0)});Hr(function(t){return er(t)?t.split(" ").map(Xo):t.map(Xo)});function m0(t,e){return[t,e,hx]}function b0(t,e){return function(n,r){return[n,r,function(i){return hx((0,lr.Z)(i,t,e))}]}}function px(t,e){if(t.length===e.length)return[t,e,function(n){return n}]}function x0(t){return t.parsedStyle.path.totalLength===0&&(t.parsedStyle.path.totalLength=mj(t.parsedStyle.path.absolutePath)),t.parsedStyle.path.totalLength}function Q8(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e],i=r[0];if(i==="M"&&n){var a=n[0],o=[r[1],r[2]],s=void 0;a==="L"||a==="M"?s=[n[1],n[2]]:(a==="C"||a==="A"||a==="Q")&&(s=[n[n.length-2],n[n.length-1]]),s&&yf(o,s)&&(t.splice(e,1),e--)}}}function J8(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r],a=i[0];if(a==="C"||a==="A"||a==="Q"){e=!0;break}}return e}function t6(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];o==="M"?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):o==="Z"?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}function yf(t,e){return t[0]===e[0]&&t[1]===e[1]}function e6(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,c=o.params,l=o.prePoint,u=void 0;switch(o.command){case"Q":u=t8(l[0],l[1],c[1],c[2],c[3],c[4]);break;case"C":u=qj(l[0],l[1],c[1],c[2],c[3],c[4],c[5],c[6]);break;case"A":var f=o.arcParams;u=Yj(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1]);break}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&(o.command==="L"||o.command==="M")&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(y){return!Number.isNaN(y)&&y!==1/0&&y!==-1/0}),r=r.filter(function(y){return!Number.isNaN(y)&&y!==1/0&&y!==-1/0});var d=sf(n),h=sf(r),p=cf(n),v=cf(r);if(i.length===0)return{x:d,y:h,width:p-d,height:v-h};for(var a=0;a<i.length;a++){var o=i[a],s=o.currentPoint,g=void 0;s[0]===d?(g=mf(o,e),d=d-g.xExtra):s[0]===p&&(g=mf(o,e),p=p+g.xExtra),s[1]===h?(g=mf(o,e),h=h-g.yExtra):s[1]===v&&(g=mf(o,e),v=v+g.yExtra)}return{x:d,y:h,width:p-d,height:v-h}}function mf(t,e){var n=t.prePoint,r=t.currentPoint,i=t.nextPoint,a=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),o=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),s=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),c=Math.acos((a+o-s)/(2*Math.sqrt(a)*Math.sqrt(o)));if(!c||Math.sin(c)===0||Zc(c,0))return{xExtra:0,yExtra:0};var l=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),u=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));l=l>Math.PI/2?Math.PI-l:l,u=u>Math.PI/2?Math.PI-u:u;var f={xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(u-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0};return f}function vx(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var gx=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),i=t.x*e.y-t.y*e.x<0?-1:1,a=i*Math.acos(n/r);return a},yx=function(t,e,n,r,i,a,o,s){e=Math.abs(e),n=Math.abs(n),r=Pb(r,360);var c=rr(r);if(t.x===o.x&&t.y===o.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(e===0||n===0)return{x:0,y:0,ellipticalArcAngle:0};var l=(t.x-o.x)/2,u=(t.y-o.y)/2,f={x:Math.cos(c)*l+Math.sin(c)*u,y:-Math.sin(c)*l+Math.cos(c)*u},d=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);d>1&&(e=Math.sqrt(d)*e,n=Math.sqrt(d)*n);var h=Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2),p=Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2),v=h/p;v=v<0?0:v;var g=(i!==a?1:-1)*Math.sqrt(v),y={x:g*(e*f.y/n),y:g*(-(n*f.x)/e)},m={x:Math.cos(c)*y.x-Math.sin(c)*y.y+(t.x+o.x)/2,y:Math.sin(c)*y.x+Math.cos(c)*y.y+(t.y+o.y)/2},b={x:(f.x-y.x)/e,y:(f.y-y.y)/n},_=gx({x:1,y:0},b),O={x:(-f.x-y.x)/e,y:(-f.y-y.y)/n},w=gx(b,O);!a&&w>0?w-=2*Math.PI:a&&w<0&&(w+=2*Math.PI),w%=2*Math.PI;var M=_+w*s,E=e*Math.cos(M),A=n*Math.sin(M),P={x:Math.cos(c)*E-Math.sin(c)*A+m.x,y:Math.sin(c)*E+Math.cos(c)*A+m.y,ellipticalArcStartAngle:_,ellipticalArcEndAngle:_+w,ellipticalArcAngle:M,ellipticalArcCenter:m,resultantRx:e,resultantRy:n};return P};function n6(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var c=t[s];r=t[s+1];var l=c[0],u={command:l,prePoint:n,params:c,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(l){case"M":i=[c[1],c[2]],a=s;break;case"A":var f=r6(n,c);u.arcParams=f;break}if(l==="Z")n=i,r=t[a+1];else{var d=c.length;n=[c[d-2],c[d-1]]}r&&r[0]==="Z"&&(r=t[a],e[a]&&(e[a].prePoint=n)),u.currentPoint=n,e[a]&&yf(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h=r?[r[r.length-2],r[r.length-1]]:null;u.nextPoint=h;var p=u.prePoint;if(["L","H","V"].includes(l))u.startTangent=[p[0]-n[0],p[1]-n[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]];else if(l==="Q"){var v=[c[1],c[2]];u.startTangent=[p[0]-v[0],p[1]-v[1]],u.endTangent=[n[0]-v[0],n[1]-v[1]]}else if(l==="T"){var g=e[s-1],v=vx(g.currentPoint,p);g.command==="Q"?(u.command="Q",u.startTangent=[p[0]-v[0],p[1]-v[1]],u.endTangent=[n[0]-v[0],n[1]-v[1]]):(u.command="TL",u.startTangent=[p[0]-n[0],p[1]-n[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]])}else if(l==="C"){var y=[c[1],c[2]],m=[c[3],c[4]];u.startTangent=[p[0]-y[0],p[1]-y[1]],u.endTangent=[n[0]-m[0],n[1]-m[1]],u.startTangent[0]===0&&u.startTangent[1]===0&&(u.startTangent=[y[0]-m[0],y[1]-m[1]]),u.endTangent[0]===0&&u.endTangent[1]===0&&(u.endTangent=[m[0]-y[0],m[1]-y[1]])}else if(l==="S"){var g=e[s-1],y=vx(g.currentPoint,p),m=[c[1],c[2]];g.command==="C"?(u.command="C",u.startTangent=[p[0]-y[0],p[1]-y[1]],u.endTangent=[n[0]-m[0],n[1]-m[1]]):(u.command="SQ",u.startTangent=[p[0]-m[0],p[1]-m[1]],u.endTangent=[n[0]-m[0],n[1]-m[1]])}else if(l==="A"){var b=mx(u,0),_=b.x,O=b.y,w=mx(u,1,!1),M=w.x,E=w.y;u.startTangent=[_,O],u.endTangent=[M,E]}e.push(u)}return e}function mx(t,e,n){n===void 0&&(n=!0);var r=t.arcParams,i=r.rx,a=i===void 0?0:i,o=r.ry,s=o===void 0?0:o,c=r.xRotation,l=r.arcFlag,u=r.sweepFlag,f=yx({x:t.prePoint[0],y:t.prePoint[1]},a,s,c,!!l,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},e),d=yx({x:t.prePoint[0],y:t.prePoint[1]},a,s,c,!!l,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),h=d.x-f.x,p=d.y-f.y,v=Math.sqrt(h*h+p*p);return{x:-h/v,y:-p/v}}function bf(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function _0(t,e){return bf(t)*bf(e)?(t[0]*e[0]+t[1]*e[1])/(bf(t)*bf(e)):1}function bx(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(_0(t,e))}function r6(t,e){var n=e[1],r=e[2],i=Pb(rr(e[3]),Math.PI*2),a=e[4],o=e[5],s=t[0],c=t[1],l=e[6],u=e[7],f=Math.cos(i)*(s-l)/2+Math.sin(i)*(c-u)/2,d=-1*Math.sin(i)*(s-l)/2+Math.cos(i)*(c-u)/2,h=f*f/(n*n)+d*d/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var p=n*n*(d*d)+r*r*(f*f),v=p?Math.sqrt((n*n*(r*r)-p)/p):1;a===o&&(v*=-1),isNaN(v)&&(v=0);var g=r?v*n*d/r:0,y=n?v*-r*f/n:0,m=(s+l)/2+Math.cos(i)*g-Math.sin(i)*y,b=(c+u)/2+Math.sin(i)*g+Math.cos(i)*y,_=[(f-g)/n,(d-y)/r],O=[(-1*f-g)/n,(-1*d-y)/r],w=bx([1,0],_),M=bx(_,O);return _0(_,O)<=-1&&(M=Math.PI),_0(_,O)>=1&&(M=0),o===0&&M>0&&(M=M-2*Math.PI),o===1&&M<0&&(M=M+2*Math.PI),{cx:m,cy:b,rx:yf(t,[l,u])?0:n,ry:yf(t,[l,u])?0:r,startAngle:w,endAngle:w+M,xRotation:i,arcFlag:a,sweepFlag:o}}function i6(t,e,n){var r=e.parsedStyle,i=r.defX,a=i===void 0?0:i,o=r.defY,s=o===void 0?0:o;return t.reduce(function(c,l){var u="";if(l[0]==="M"||l[0]==="L"){var f=ot.fromValues(l[1]-a,l[2]-s,0);n&&ot.transformMat4(f,f,n),u="".concat(l[0]).concat(f[0],",").concat(f[1])}else if(l[0]==="Z")u=l[0];else if(l[0]==="C"){var d=ot.fromValues(l[1]-a,l[2]-s,0),h=ot.fromValues(l[3]-a,l[4]-s,0),p=ot.fromValues(l[5]-a,l[6]-s,0);n&&(ot.transformMat4(d,d,n),ot.transformMat4(h,h,n),ot.transformMat4(p,p,n)),u="".concat(l[0]).concat(d[0],",").concat(d[1],",").concat(h[0],",").concat(h[1],",").concat(p[0],",").concat(p[1])}else if(l[0]==="A"){var v=ot.fromValues(l[6]-a,l[7]-s,0);n&&ot.transformMat4(v,v,n),u="".concat(l[0]).concat(l[1],",").concat(l[2],",").concat(l[3],",").concat(l[4],",").concat(l[5],",").concat(v[0],",").concat(v[1])}else if(l[0]==="Q"){var d=ot.fromValues(l[1]-a,l[2]-s,0),h=ot.fromValues(l[3]-a,l[4]-s,0);n&&(ot.transformMat4(d,d,n),ot.transformMat4(h,h,n)),u="".concat(l[0]).concat(l[1],",").concat(l[2],",").concat(l[3],",").concat(l[4],"}")}return c+=u},"")}function a6(t,e,n,r){return[["M",t,e],["L",n,r]]}function xx(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,a=t*i,o=e*i,s=n-t,c=n+t,l=r-e,u=r+e;return[["M",s,r],["C",s,r-o,n-a,l,n,l],["C",n+a,l,c,r-o,c,r],["C",c,r+o,n+a,u,n,u],["C",n-a,u,s,r+o,s,r],["Z"]]}function o6(t,e){var n=t.map(function(r,i){return[i===0?"M":"L",r[0],r[1]]});return e&&n.push(["Z"]),n}function s6(t,e,n,r,i){if(i){var a=(0,S.CR)(i,4),o=a[0],s=a[1],c=a[2],l=a[3],u=t>0?1:-1,f=e>0?1:-1,d=u+f!==0?1:0;return[["M",u*o+n,r],["L",t-u*s+n,r],s?["A",s,s,0,0,d,t+n,f*s+r]:null,["L",t+n,e-f*c+r],c?["A",c,c,0,0,d,t+n-u*c,e+r]:null,["L",n+u*l,e+r],l?["A",l,l,0,0,d,n,e+r-f*l]:null,["L",n,f*o+r],o?["A",o,o,0,0,d,u*o+n,r]:null,["Z"]].filter(function(h){return h})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}function O0(t,e){e===void 0&&(e=t.getLocalTransform());var n=[];switch(t.nodeName){case bt.LINE:var r=t.parsedStyle,i=r.x1,a=i===void 0?0:i,o=r.y1,s=o===void 0?0:o,c=r.x2,l=c===void 0?0:c,u=r.y2,f=u===void 0?0:u;n=a6(a,s,l,f);break;case bt.CIRCLE:{var d=t.parsedStyle,h=d.r,p=h===void 0?0:h,v=d.cx,g=v===void 0?0:v,y=d.cy,m=y===void 0?0:y;n=xx(p,p,g,m);break}case bt.ELLIPSE:{var b=t.parsedStyle,_=b.rx,O=_===void 0?0:_,w=b.ry,M=w===void 0?0:w,E=b.cx,g=E===void 0?0:E,A=b.cy,m=A===void 0?0:A;n=xx(O,M,g,m);break}case bt.POLYLINE:case bt.POLYGON:var P=t.parsedStyle.points;n=o6(P.points,t.nodeName===bt.POLYGON);break;case bt.RECT:var C=t.parsedStyle,D=C.width,N=D===void 0?0:D,k=C.height,R=k===void 0?0:k,I=C.x,F=I===void 0?0:I,B=C.y,z=B===void 0?0:B,Y=C.radius,U=Y&&Y.some(function(rt){return rt!==0});n=s6(N,R,F,z,U&&Y.map(function(rt){return(0,lr.Z)(rt,0,Math.min(Math.abs(N)/2,Math.abs(R)/2))}));break;case bt.PATH:var tt=t.parsedStyle.path.absolutePath;n=(0,S.ev)([],(0,S.CR)(tt),!1);break}if(n.length)return i6(n,t,e)}function qft(t,e,n,r,i,a,o){r===void 0&&(r=0),i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=0);var s=t.map(function(c,l){var u=c[0],f=t[l+1],d=l===0&&(r!==0||i!==0),h=(l===t.length-1||f&&(f[0]==="M"||f[0]==="Z"))&&a!==0&&o!==0;switch(u){case"M":return d?"M ".concat(c[1]-e+r,",").concat(c[2]-n+i," L ").concat(c[1]-e,",").concat(c[2]-n):"M ".concat(c[1]-e,",").concat(c[2]-n);case"L":return"L ".concat(c[1]-e+(h?a:0),",").concat(c[2]-n+(h?o:0));case"Q":return"Q ".concat(c[1]-e," ").concat(c[2]-n,",").concat(c[3]-e," ").concat(c[4]-n)+(h?" L ".concat(c[3]-e+a,",").concat(c[4]-n+o):"");case"C":return"C ".concat(c[1]-e," ").concat(c[2]-n,",").concat(c[3]-e," ").concat(c[4]-n,",").concat(c[5]-e," ").concat(c[6]-n)+(h?" L ".concat(c[5]-e+a,",").concat(c[6]-n+o):"");case"A":return"A ".concat(c[1]," ").concat(c[2]," ").concat(c[3]," ").concat(c[4]," ").concat(c[5]," ").concat(c[6]-e," ").concat(c[7]-n)+(h?" L ".concat(c[6]-e+a,",").concat(c[7]-n+o):"");case"Z":return"Z"}}).join(" ");return~s.indexOf("NaN")?"":s}var _x=function(t){if(t===""||Array.isArray(t)&&t.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=of(t)}catch(d){e=of(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}Q8(e);var n=J8(e),r=t6(e),i=r.polygons,a=r.polylines,o=n6(e),s=e6(o,0),c=s.x,l=s.y,u=s.width,f=s.height;return{absolutePath:e,hasArc:n,segments:o,polygons:i,polylines:a,totalLength:0,rect:{x:Number.isFinite(c)?c:0,y:Number.isFinite(l)?l:0,width:Number.isFinite(u)?u:0,height:Number.isFinite(f)?f:0}}},c6=Hr(_x);function w0(t){return er(t)?c6(t):_x(t)}function l6(t,e,n){var r=t.curve,i=e.curve;(!r||r.length===0)&&(r=e0(t.absolutePath,!1),t.curve=r),(!i||i.length===0)&&(i=e0(e.absolutePath,!1),e.curve=i);var a=[r,i];r.length!==i.length&&(a=Rb(r,i));var o=Lb(a[0])!==Lb(a[1])?Tj(a[0]):Pj(a[0]);return[o,kj(a[1],o),function(s){return s}]}function Ox(t,e){var n;er(t)?n=t.split(" ").map(function(u){var f=(0,S.CR)(u.split(","),2),d=f[0],h=f[1];return[Number(d),Number(h)]}):n=t;var r=[],i=0,a,o,s=Qj(n);n.forEach(function(u,f){n[f+1]&&(a=[0,0],a[0]=i/s,o=zb(u[0],u[1],n[f+1][0],n[f+1][1]),i+=o,a[1]=i/s,r.push(a))});var c=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(n.map(function(u){return u[0]})),!1)),l=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(n.map(function(u){return u[1]})),!1));return e&&(e.parsedStyle.defX=c,e.parsedStyle.defY=l),{points:n,totalLength:s,segments:r}}function u6(t,e){return[t.points,e.points,function(n){return n}]}var ur=null;function di(t){return function(e){var n=0;return t.map(function(r){return r===ur?e[n++]:r})}}function Uo(t){return t}var S0={matrix:["NNNNNN",[ur,ur,0,0,ur,ur,0,0,0,0,1,0,ur,ur,0,1],Uo],matrix3d:["NNNNNNNNNNNNNNNN",Uo],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",di([ur,ur,new Cn(1)]),Uo],scalex:["N",di([ur,new Cn(1),new Cn(1)]),di([ur,new Cn(1)])],scaley:["N",di([new Cn(1),ur,new Cn(1)]),di([new Cn(1),ur])],scalez:["N",di([new Cn(1),new Cn(1),ur])],scale3d:["NNN",Uo],skew:["Aa",null,Uo],skewx:["A",null,di([ur,Ta])],skewy:["A",null,di([Ta,ur])],translate:["Tt",di([ur,ur,Cr]),Uo],translatex:["T",di([ur,Cr,Cr]),di([ur,Cr])],translatey:["T",di([Cr,ur,Cr]),di([Cr,ur])],translatez:["L",di([Cr,Cr,ur])],translate3d:["TTL",Uo]};function xf(t){if(t=(t||"none").toLowerCase().trim(),t==="none")return[];for(var e=/\s*(\w+)\(([^)]*)\)/g,n=[],r,i=0;r=e.exec(t);){if(r.index!==i)return[];i=r.index+r[0].length;var a=r[1],o=S0[a];if(!o)return[];var s=r[2].split(","),c=o[0];if(c.length<s.length)return[];for(var l=[],u=0;u<c.length;u++){var f=s[u],d=c[u],h=void 0;if(f?h={A:function(p){return p.trim()==="0"?Ta:ux(p)},N:Xo,T:Ys,L:U8}[d.toUpperCase()](f):h={a:Ta,n:l[0],t:Cr}[d],h===void 0)return[];l.push(h)}if(n.push({t:a,d:l}),e.lastIndex===t.length)return n}return[]}function f6(t){var e,n,r,i;switch(t.t){case"rotatex":return i=rr(wi(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=rr(wi(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=rr(wi(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=rr(wi(t.d[3]));var a=e*e+n*n+r*r;if(a===0)e=1,n=0,r=0;else if(a!==1){var o=Math.sqrt(a);e/=o,n/=o,r/=o}var s=Math.sin(i/2),c=s*Math.cos(i/2),l=s*s;return[1-2*(n*n+r*r)*l,2*(e*n*l+r*c),2*(e*r*l-n*c),0,2*(e*n*l-r*c),1-2*(e*e+r*r)*l,2*(n*r*l+e*c),0,2*(e*r*l+n*c),2*(n*r*l-e*c),1-2*(e*e+n*n)*l,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var u=rr(wi(t.d[0])),f=rr(wi(t.d[1]));return[1,Math.tan(f),0,0,Math.tan(u),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=rr(wi(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=rr(wi(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return e=Si(t.d[0],0,null)||0,n=Si(t.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n,0,1];case"translatex":return e=Si(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,0,0,1];case"translatey":return n=Si(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,n,0,1];case"translatez":return r=Si(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r,1];case"translate3d":return e=Si(t.d[0],0,null)||0,n=Si(t.d[1],0,null)||0,r=Si(t.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n,r,1];case"perspective":var d=Si(t.d[0],0,null)||0,h=d?-1/d:0;return[1,0,0,0,0,1,0,0,0,0,1,h,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(p){return p.value})}}function d6(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function h6(t){return t.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(f6).reduce(d6)}function wx(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return h8(h6(t),e,n,r,i,a),[[e,n,r,a,i]]}var p6=function(){function t(r,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],o=0;o<4;o++)for(var s=0;s<4;s++)for(var c=0;c<4;c++)a[o][s]+=i[o][c]*r[c][s];return a}function e(r){return r[0][2]==0&&r[0][3]==0&&r[1][2]==0&&r[1][3]==0&&r[2][0]==0&&r[2][1]==0&&r[2][2]==1&&r[2][3]==0&&r[3][2]==0&&r[3][3]==1}function n(r,i,a,o,s){for(var c=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],l=0;l<4;l++)c[l][3]=s[l];for(var l=0;l<3;l++)for(var u=0;u<3;u++)c[3][l]+=r[u]*c[u][l];var f=o[0],d=o[1],h=o[2],p=o[3],v=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];v[0][0]=1-2*(d*d+h*h),v[0][1]=2*(f*d-h*p),v[0][2]=2*(f*h+d*p),v[1][0]=2*(f*d+h*p),v[1][1]=1-2*(f*f+h*h),v[1][2]=2*(d*h-f*p),v[2][0]=2*(f*h-d*p),v[2][1]=2*(d*h+f*p),v[2][2]=1-2*(f*f+d*d),c=t(c,v);var g=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(g[2][1]=a[2],c=t(c,g)),a[1]&&(g[2][1]=0,g[2][0]=a[0],c=t(c,g)),a[0]&&(g[2][0]=0,g[1][0]=a[0],c=t(c,g));for(var l=0;l<3;l++)for(var u=0;u<3;u++)c[l][u]*=i[l];return e(c)?[c[0][0],c[0][1],c[1][0],c[1][1],c[3][0],c[3][1]]:c[0].concat(c[1],c[2],c[3])}return n}();function v6(t){return t.toFixed(6).replace(".000000","")}function M0(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=wx(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=wx(e)),n[0]===null||r[0]===null?[[!1],[!0],function(i){return i?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(i){var a=y6(n[0][3],r[0][3],i[5]),o=p6(i[0],i[1],i[2],a,i[4]),s=o.map(v6).join(",");return s}])}function g6(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}function y6(t,e,n){var r=g6(t,e);r=(0,lr.Z)(r,-1,1);var i=[];if(r===1)i=t;else for(var a=Math.acos(r),o=Math.sin(n*a)*1/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}function E0(t){return t.replace(/[xy]/,"")}function A0(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var m6=function(t,e){return t==="perspective"&&e==="perspective"||(t==="matrix"||t==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function b6(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(w){var M=t[w],E=M.t,A=M.d,P=E.substring(0,5)==="scale"?1:0;e.push({t:E,d:A.map(function(C){return typeof C=="number"?ir(P):ir(P,C.unit)})})},a=0;a<t.length;a++)i(a)}var o=[],s=[],c=[];if(t.length!==e.length){var l=M0(t,e);o=[l[0]],s=[l[1]],c=[["matrix",[l[2]]]]}else for(var a=0;a<t.length;a++){var u=t[a].t,f=e[a].t,d=t[a].d,h=e[a].d,p=S0[u],v=S0[f],g=void 0;if(m6(u,f)){var l=M0([t[a]],[e[a]]);o.push(l[0]),s.push(l[1]),c.push(["matrix",[l[2]]]);continue}else if(u===f)g=u;else if(p[2]&&v[2]&&E0(u)===E0(f))g=E0(u),d=p[2](d),h=v[2](h);else if(p[1]&&v[1]&&A0(u)===A0(f))g=A0(u),d=p[1](d),h=v[1](h);else{var l=M0(t,e);o=[l[0]],s=[l[1]],c=[["matrix",[l[2]]]];break}for(var y=[],m=[],b=[],_=0;_<d.length;_++){var l=q8(d[_],h[_],n,!1,_);y[_]=l[0],m[_]=l[1],b.push(l[2])}o.push(y),s.push(m),c.push([g,b])}if(r){var O=o;o=s,s=O}return[o,s,function(w){return w.map(function(M,E){var A=M.map(function(P,C){return c[E][1][C](P)}).join(",");return c[E][0]==="matrix"&&A.split(",").length===16&&(c[E][0]="matrix3d"),c[E][0]==="matrix3d"&&A.split(",").length===6&&(c[E][0]="matrix"),c[E][0]+"("+A+")"}).join(" ")}]}var Sx=Hr(function(t){if(er(t)){if(t==="text-anchor")return[ir(0,"px"),ir(0,"px")];var e=t.split(" ");return e.length===1&&(e[0]==="top"||e[0]==="bottom"?(e[1]=e[0],e[0]="center"):e[1]="center"),e.length!==2?null:[Ys(Mx(e[0])),Ys(Mx(e[1]))]}else return[ir(t[0]||0,"px"),ir(t[1]||0,"px")]});function Mx(t){return t==="center"?"50%":t==="left"||t==="top"?"0":t==="right"||t==="bottom"?"100%":t}var T0=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:oe.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:oe.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:oe.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:oe.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:oe.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:oe.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:oe.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:oe.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:oe.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:oe.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:oe.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:oe.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:oe.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:oe.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:oe.FILTER},{n:"clipPath",syntax:oe.DEFINED_PATH},{n:"textPath",syntax:oe.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:oe.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===bt.CIRCLE||t===bt.ELLIPSE?"center":t===bt.TEXT?"text-anchor":"left top"},l:!0,syntax:oe.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===bt.CIRCLE||t===bt.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:oe.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:oe.COORDINATE},{n:"cy",int:!0,d:"0",syntax:oe.COORDINATE},{n:"cz",int:!0,d:"0",syntax:oe.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:oe.COORDINATE},{n:"y",int:!0,d:"0",syntax:oe.COORDINATE},{n:"z",int:!0,d:"0",syntax:oe.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:oe.COORDINATE},{n:"y1",int:!0,l:!0,syntax:oe.COORDINATE},{n:"z1",int:!0,l:!0,syntax:oe.COORDINATE},{n:"x2",int:!0,l:!0,syntax:oe.COORDINATE},{n:"y2",int:!0,l:!0,syntax:oe.COORDINATE},{n:"z2",int:!0,l:!0,syntax:oe.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:oe.PATH,p:50},{n:"points",int:!0,l:!0,syntax:oe.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:oe.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:oe.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:oe.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:oe.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:oe.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:oe.NUMBER,d:function(t){return t===bt.PATH||t===bt.POLYGON||t===bt.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:oe.MARKER},{n:"markerEnd",syntax:oe.MARKER},{n:"markerMid",syntax:oe.MARKER},{n:"markerStartOffset",syntax:oe.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:oe.LENGTH,l:!0,int:!0,d:"0"}],Ex=T0.filter(function(t){return!!t.l}).map(function(t){return t.n}),ro={},Vs=new WeakMap,x6=function(t,e){var n=Vs.get(t);return!n||n.length===0?!0:n.includes(e)},_6=function(){function t(e){var n=this;this.runtime=e,T0.forEach(function(r){n.registerMetadata(r)})}return t.prototype.registerMetadata=function(e){(0,S.ev)([e.n],(0,S.CR)(e.a||[]),!1).forEach(function(n){ro[n]=e})},t.prototype.unregisterMetadata=function(e){delete ro[e]},t.prototype.getPropertySyntax=function(e){return this.runtime.CSSPropertySyntaxFactory[e]},t.prototype.processProperties=function(e,n,r){var i=this;if(r===void 0&&(r={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}),!this.runtime.enableCSSParsing){Object.assign(e.attributes,n);var a=Object.keys(n),o=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;e.parsedStyle=Object.assign(e.parsedStyle,n);var c=!!r.forceUpdateGeometry;if(!c){for(var l=0;l<Ex.length;l++)if(Ex[l]in n){c=!0;break}}n.fill&&(e.parsedStyle.fill=Pa(n.fill)),n.stroke&&(e.parsedStyle.stroke=Pa(n.stroke)),n.shadowColor&&(e.parsedStyle.shadowColor=Pa(n.shadowColor)),n.filter&&(e.parsedStyle.filter=dx(n.filter)),(0,ye.Z)(n.radius)||(e.parsedStyle.radius=y0(n.radius,4)),(0,ye.Z)(n.lineDash)||(e.parsedStyle.lineDash=y0(n.lineDash,2)),n.points&&(e.parsedStyle.points=Ox(n.points,e)),n.path===""&&(e.parsedStyle.path=(0,S.pi)({},cx)),n.path&&(e.parsedStyle.path=w0(n.path),e.parsedStyle.defX=e.parsedStyle.path.rect.x,e.parsedStyle.defY=e.parsedStyle.path.rect.y),n.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:n.textTransform},e,null),n.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,n.clipPath,e,this.runtime),n.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",s,n.offsetPath,e,this.runtime),n.anchor&&(e.parsedStyle.anchor=y0(n.anchor,2)),n.transform&&(e.parsedStyle.transform=xf(n.transform)),n.transformOrigin&&(e.parsedStyle.transformOrigin=Sx(n.transformOrigin)),n.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,n.markerStart,n.markerStart,null,null)),n.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,n.markerEnd,n.markerEnd,null,null)),n.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",n.markerMid,n.markerMid,null,null)),((e.nodeName===bt.CIRCLE||e.nodeName===bt.ELLIPSE)&&(!(0,ye.Z)(n.cx)||!(0,ye.Z)(n.cy))||(e.nodeName===bt.RECT||e.nodeName===bt.IMAGE||e.nodeName===bt.GROUP||e.nodeName===bt.HTML||e.nodeName===bt.TEXT||e.nodeName===bt.MESH)&&(!(0,ye.Z)(n.x)||!(0,ye.Z)(n.y)||!(0,ye.Z)(n.z))||e.nodeName===bt.LINE&&(!(0,ye.Z)(n.x1)||!(0,ye.Z)(n.y1)||!(0,ye.Z)(n.z1)||!(0,ye.Z)(n.x2)||!(0,ye.Z)(n.y2)||!(0,ye.Z)(n.z2)))&&this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(e,a),(0,ye.Z)(n.zIndex)||this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(e,a),n.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(e,a),n.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(e,a),(0,ye.Z)(n.offsetDistance)||this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(e,a),n.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(e,a),c&&this.updateGeometry(e);return}var u=r.skipUpdateAttribute,f=r.skipParse,d=r.forceUpdateGeometry,h=r.usedAttributes,p=d,v=Object.keys(n);v.forEach(function(g){var y;u||(e.attributes[g]=n[g]),!p&&(!((y=ro[g])===null||y===void 0)&&y.l)&&(p=!0)}),f||v.forEach(function(g){e.computedStyle[g]=i.parseProperty(g,e.attributes[g],e)}),h!=null&&h.length&&(v=Array.from(new Set(v.concat(h)))),v.forEach(function(g){g in e.computedStyle&&(e.parsedStyle[g]=i.computeProperty(g,e.computedStyle[g],e))}),p&&this.updateGeometry(e),v.forEach(function(g){g in e.parsedStyle&&i.postProcessProperty(g,e,v)}),this.runtime.enableCSSParsing&&e.children.length&&v.forEach(function(g){g in e.parsedStyle&&i.isPropertyInheritable(g)&&e.children.forEach(function(y){y.internalSetAttribute(g,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(e,n,r){var i=ro[e],a=n;if((n===""||(0,ye.Z)(n))&&(n="unset"),n==="unset"||n==="initial"||n==="inherit")a=p0(n);else if(i){var o=i.k,s=i.syntax,c=s&&this.getPropertySyntax(s);o&&o.indexOf(n)>-1?a=p0(n):c&&c.parser&&(a=c.parser(n,r))}return a},t.prototype.computeProperty=function(e,n,r){var i=ro[e],a=r.id==="g-root",o=n;if(i){var s=i.syntax,c=i.inh,l=i.d;if(n instanceof fi){var u=n.value;if(u==="unset"&&(c&&!a?u="inherit":u="initial"),u==="initial")(0,ye.Z)(l)||(n=this.parseProperty(e,Ws(l)?l(r.nodeName):l,r));else if(u==="inherit"){var f=this.tryToResolveProperty(r,e,{inherited:!0});if((0,ye.Z)(f)){this.addUnresolveProperty(r,e);return}else return f}}var d=s&&this.getPropertySyntax(s);if(d&&d.calculator){var h=r.parsedStyle[e];o=d.calculator(e,h,n,r,this.runtime)}else n instanceof fi?o=n.value:o=n}return o},t.prototype.postProcessProperty=function(e,n,r){var i=ro[e];if(i&&i.syntax){var a=i.syntax&&this.getPropertySyntax(i.syntax),o=a;o&&o.postProcessor&&o.postProcessor(n,r)}},t.prototype.addUnresolveProperty=function(e,n){var r=Vs.get(e);r||(Vs.set(e,[]),r=Vs.get(e)),r.indexOf(n)===-1&&r.push(n)},t.prototype.tryToResolveProperty=function(e,n,r){r===void 0&&(r={});var i=r.inherited;if(i&&e.parentElement&&x6(e.parentElement,n)){var a=e.parentElement.parsedStyle[n];return a==="unset"||a==="initial"||a==="inherit"?void 0:a}},t.prototype.recalc=function(e){var n=Vs.get(e);if(n&&n.length){var r={};n.forEach(function(i){r[i]=e.attributes[i]}),this.processProperties(e,r),Vs.delete(e)}},t.prototype.updateGeometry=function(e){var n=e.nodeName,r=this.runtime.geometryUpdaterFactory[n];if(r){var i=e.geometry;i.contentBounds||(i.contentBounds=new Sr),i.renderBounds||(i.renderBounds=new Sr);var a=e.parsedStyle,o=r.update(a,e),s=o.width,c=o.height,l=o.depth,u=l===void 0?0:l,f=o.offsetX,d=f===void 0?0:f,h=o.offsetY,p=h===void 0?0:h,v=o.offsetZ,g=v===void 0?0:v,y=[Math.abs(s)/2,Math.abs(c)/2,u/2],m=a,b=m.stroke,_=m.lineWidth,O=m.increasedLineWidthForHitTesting,w=m.shadowType,M=m.shadowColor,E=m.filter,A=E===void 0?[]:E,P=m.transformOrigin,C=a.anchor;n===bt.TEXT?delete a.anchor:n===bt.MESH&&(a.anchor[2]=.5);var D=[(1-(C&&C[0]||0)*2)*s/2+d,(1-(C&&C[1]||0)*2)*c/2+p,(1-(C&&C[2]||0)*2)*y[2]+g];i.contentBounds.update(D,y);var N=n===bt.POLYLINE||n===bt.POLYGON||n===bt.PATH?Math.SQRT2:.5,k=b&&!b.isNone;if(k){var R=((_||0)+(O||0))*N;y[0]+=R,y[1]+=R}if(i.renderBounds.update(D,y),M&&w&&w!=="inner"){var I=i.renderBounds,F=I.min,B=I.max,z=a,Y=z.shadowBlur,U=z.shadowOffsetX,tt=z.shadowOffsetY,rt=Y||0,wt=U||0,Bt=tt||0,Xt=F[0]-rt+wt,Tt=B[0]+rt+wt,Pt=F[1]-rt+Bt,ce=B[1]+rt+Bt;F[0]=Math.min(F[0],Xt),B[0]=Math.max(B[0],Tt),F[1]=Math.min(F[1],Pt),B[1]=Math.max(B[1],ce),i.renderBounds.setMinMax(F,B)}A.forEach(function(Qe){var dn=Qe.name,xn=Qe.params;if(dn==="blur"){var Vn=xn[0].value;i.renderBounds.update(i.renderBounds.center,df(i.renderBounds.halfExtents,i.renderBounds.halfExtents,[Vn,Vn,0]))}else if(dn==="drop-shadow"){var mr=xn[0].value,bi=xn[1].value,qa=xn[2].value,As=i.renderBounds,oi=As.min,$i=As.max,pn=oi[0]-qa+mr,_n=$i[0]+qa+mr,ar=oi[1]-qa+bi,An=$i[1]+qa+bi;oi[0]=Math.min(oi[0],pn),$i[0]=Math.max($i[0],_n),oi[1]=Math.min(oi[1],ar),$i[1]=Math.max($i[1],An),i.renderBounds.setMinMax(oi,$i)}}),C=a.anchor;var le=s<0,_e=c<0,He=(le?-1:1)*(P?Si(P[0],0,e):0),Be=(_e?-1:1)*(P?Si(P[1],1,e):0);He=He-(le?-1:1)*(C&&C[0]||0)*i.contentBounds.halfExtents[0]*2,Be=Be-(_e?-1:1)*(C&&C[1]||0)*i.contentBounds.halfExtents[1]*2,e.setOrigin(He,Be),this.runtime.sceneGraphService.dirtifyToRoot(e)}},t.prototype.isPropertyInheritable=function(e){var n=ro[e];return n?n.inh:!1},t}(),O6=function(){function t(){this.parser=ux,this.parserWithCSSDisabled=null,this.mixer=m0}return t.prototype.calculator=function(e,n,r,i){return wi(r)},t}(),w6=function(){function t(){}return t.prototype.calculator=function(e,n,r,i,a){return r instanceof fi&&(r=null),a.sceneGraphService.updateDisplayObjectDependency(e,n,r,i),e==="clipPath"&&i.forEach(function(o){o.childNodes.length===0&&a.sceneGraphService.dirtifyToRoot(o)}),r},t}(),S6=function(){function t(){this.parser=Pa,this.parserWithCSSDisabled=Pa,this.mixer=X8}return t.prototype.calculator=function(e,n,r,i){return r instanceof fi?r.value==="none"?v0:sx:r},t}(),M6=function(){function t(){this.parser=dx}return t.prototype.calculator=function(e,n,r){return r instanceof fi?[]:r},t}();function Ax(t){var e=t.parsedStyle.fontSize;return(0,ye.Z)(e)?null:e}var P0=function(){function t(){this.parser=Ys,this.parserWithCSSDisabled=null,this.mixer=m0}return t.prototype.calculator=function(e,n,r,i,a){var o;if((0,xr.Z)(r))return r;if(Cn.isRelativeUnit(r.unit)){var s=a.styleValueRegistry;if(r.unit===ne.kPercentage)return 0;if(r.unit===ne.kEms){if(i.parentNode){var c=Ax(i.parentNode);if(c)return c*=r.value,c;s.addUnresolveProperty(i,e)}else s.addUnresolveProperty(i,e);return 0}else if(r.unit===ne.kRems){if(!((o=i==null?void 0:i.ownerDocument)===null||o===void 0)&&o.documentElement){var c=Ax(i.ownerDocument.documentElement);if(c)return c*=r.value,c;s.addUnresolveProperty(i,e)}else s.addUnresolveProperty(i,e);return 0}}else return r.value},t}(),E6=function(){function t(){this.mixer=px}return t.prototype.parser=function(e){var n=fx((0,xr.Z)(e)?[e]:e),r;return n.length===1?r=[n[0],n[0]]:r=[n[0],n[1]],r},t.prototype.calculator=function(e,n,r){return r.map(function(i){return i.value})},t}(),A6=function(){function t(){this.mixer=px}return t.prototype.parser=function(e){var n=fx((0,xr.Z)(e)?[e]:e),r;return n.length===1?r=[n[0],n[0],n[0],n[0]]:n.length===2?r=[n[0],n[1],n[0],n[1]]:n.length===3?r=[n[0],n[1],n[2],n[1]]:r=[n[0],n[1],n[2],n[3]],r},t.prototype.calculator=function(e,n,r){return r.map(function(i){return i.value})},t}(),nl=qt.create();function C0(t,e){var n=e.parsedStyle.defX||0,r=e.parsedStyle.defY||0;return e.resetLocalTransform(),e.setLocalPosition(n,r),t.forEach(function(i){var a=i.t,o=i.d;if(a==="scale"){var s=(o==null?void 0:o.map(function(m){return m.value}))||[1,1];e.scaleLocal(s[0],s[1],1)}else if(a==="scalex"){var s=(o==null?void 0:o.map(function(b){return b.value}))||[1];e.scaleLocal(s[0],1,1)}else if(a==="scaley"){var s=(o==null?void 0:o.map(function(b){return b.value}))||[1];e.scaleLocal(1,s[0],1)}else if(a==="scalez"){var s=(o==null?void 0:o.map(function(b){return b.value}))||[1];e.scaleLocal(1,1,s[0])}else if(a==="scale3d"){var s=(o==null?void 0:o.map(function(b){return b.value}))||[1,1,1];e.scaleLocal(s[0],s[1],s[2])}else if(a==="translate"){var c=o||[Cr,Cr];e.translateLocal(c[0].value,c[1].value,0)}else if(a==="translatex"){var c=o||[Cr];e.translateLocal(c[0].value,0,0)}else if(a==="translatey"){var c=o||[Cr];e.translateLocal(0,c[0].value,0)}else if(a==="translatez"){var c=o||[Cr];e.translateLocal(0,0,c[0].value)}else if(a==="translate3d"){var c=o||[Cr,Cr,Cr];e.translateLocal(c[0].value,c[1].value,c[2].value)}else if(a==="rotate"){var l=o||[Ta];e.rotateLocal(0,0,wi(l[0]))}else if(a==="rotatex"){var l=o||[Ta];e.rotateLocal(wi(l[0]),0,0)}else if(a==="rotatey"){var l=o||[Ta];e.rotateLocal(0,wi(l[0]),0)}else if(a==="rotatez"){var l=o||[Ta];e.rotateLocal(0,0,wi(l[0]))}else if(a!=="rotate3d")if(a==="skew"){var u=(o==null?void 0:o.map(function(m){return m.value}))||[0,0];e.setLocalSkew(rr(u[0]),rr(u[1]))}else if(a==="skewx"){var u=(o==null?void 0:o.map(function(b){return b.value}))||[0];e.setLocalSkew(rr(u[0]),e.getLocalSkew()[1])}else if(a==="skewy"){var u=(o==null?void 0:o.map(function(b){return b.value}))||[0];e.setLocalSkew(e.getLocalSkew()[0],rr(u[0]))}else if(a==="matrix"){var f=(0,S.CR)(o.map(function(m){return m.value}),6),d=f[0],h=f[1],p=f[2],v=f[3],g=f[4],y=f[5];e.setLocalTransform(qt.set(nl,d,h,0,0,p,v,0,0,0,0,1,0,g+n,y+r,0,1))}else a==="matrix3d"&&(qt.set.apply(qt,(0,S.ev)([nl],(0,S.CR)(o.map(function(m){return m.value})),!1)),nl[12]+=n,nl[13]+=r,e.setLocalTransform(nl))}),e.getLocalTransform()}var T6=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.postProcessor=function(n,r){var i,a,o;switch(n.nodeName){case bt.CIRCLE:case bt.ELLIPSE:var s=n.parsedStyle,c=s.cx,l=s.cy,u=s.cz;(0,ye.Z)(c)||(i=c),(0,ye.Z)(l)||(a=l),(0,ye.Z)(u)||(o=u);break;case bt.LINE:var f=n.parsedStyle,d=f.x1,h=f.x2,p=f.y1,v=f.y2,g=Math.min(d,h),y=Math.min(p,v);i=g,a=y,o=0;break;case bt.RECT:case bt.IMAGE:case bt.GROUP:case bt.HTML:case bt.TEXT:case bt.MESH:(0,ye.Z)(n.parsedStyle.x)||(i=n.parsedStyle.x),(0,ye.Z)(n.parsedStyle.y)||(a=n.parsedStyle.y),(0,ye.Z)(n.parsedStyle.z)||(o=n.parsedStyle.z);break}n.nodeName!==bt.PATH&&n.nodeName!==bt.POLYLINE&&n.nodeName!==bt.POLYGON&&(n.parsedStyle.defX=i||0,n.parsedStyle.defY=a||0);var m=!(0,ye.Z)(i)||!(0,ye.Z)(a)||!(0,ye.Z)(o);if(m&&r.indexOf("transform")===-1){var b=n.parsedStyle.transform;if(b&&b.length)C0(b,n);else{var _=(0,S.CR)(n.getLocalPosition(),3),O=_[0],w=_[1],M=_[2];n.setLocalPosition((0,ye.Z)(i)?O:i,(0,ye.Z)(a)?w:a,(0,ye.Z)(o)?M:o)}}},e}(P0),P6=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){r instanceof fi&&(r=null);var a=r==null?void 0:r.cloneNode(!0);return a&&(a.style.isMarker=!0),a},t}(),C6=function(){function t(){this.mixer=m0,this.parser=Xo,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(e,n,r){return r.value},t}(),k6=function(){function t(){this.parser=Xo,this.parserWithCSSDisabled=null,this.mixer=b0(0,1)}return t.prototype.calculator=function(e,n,r){return r.value},t.prototype.postProcessor=function(e){var n=e.parsedStyle,r=n.offsetPath,i=n.offsetDistance;if(r){var a=r.nodeName;if(a===bt.LINE||a===bt.PATH||a===bt.POLYLINE){var o=r.getPoint(i);o&&(e.parsedStyle.defX=o.x,e.parsedStyle.defY=o.y,e.setLocalPosition(o.x,o.y))}}},t}(),R6=function(){function t(){this.parser=Xo,this.parserWithCSSDisabled=null,this.mixer=b0(0,1)}return t.prototype.calculator=function(e,n,r){return r.value},t}(),L6=function(){function t(){this.parser=w0,this.parserWithCSSDisabled=w0,this.mixer=l6}return t.prototype.calculator=function(e,n,r){return r instanceof fi&&r.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new $o(0,0,0,0)}:r},t.prototype.postProcessor=function(e,n){if(e.parsedStyle.defX=e.parsedStyle.path.rect.x,e.parsedStyle.defY=e.parsedStyle.path.rect.y,e.nodeName===bt.PATH&&n.indexOf("transform")===-1){var r=e.parsedStyle,i=r.defX,a=i===void 0?0:i,o=r.defY,s=o===void 0?0:o;e.setLocalPosition(a,s)}},t}(),N6=function(){function t(){this.parser=Ox,this.mixer=u6}return t.prototype.postProcessor=function(e,n){if((e.nodeName===bt.POLYGON||e.nodeName===bt.POLYLINE)&&n.indexOf("transform")===-1){var r=e.parsedStyle,i=r.defX,a=r.defY;e.setLocalPosition(i,a)}},t}(),I6=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.mixer=b0(0,1/0),n}return e}(P0),j6=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){return r instanceof fi?r.value==="unset"?"":r.value:"".concat(r)},t.prototype.postProcessor=function(e){e.nodeValue="".concat(e.parsedStyle.text)||""},t}(),D6=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){var a=i.getAttribute("text");if(a){var o=a;r.value==="capitalize"?o=a.charAt(0).toUpperCase()+a.slice(1):r.value==="lowercase"?o=a.toLowerCase():r.value==="uppercase"&&(o=a.toUpperCase()),i.parsedStyle.text=o}return r.value},t}(),k0={},F6=0;function B6(t,e){if(t){var n=typeof t=="string"?t:t.id||F6++;k0[n]&&k0[n].destroy(),k0[n]=e}}var rl=typeof window!="undefined"&&typeof window.document!="undefined";function z6(t){return!!t.getAttribute}function G6(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;Tx(t[i],e)<0?n=i+1:r=i}return n}function Tx(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(t)-a.indexOf(e)}}return n-r}function Px(t){var e,n=t;do{var r=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(r)return n;n=n.parentElement}while(n!==null);return null}var Cx="px";function W6(t,e,n){rl&&t.style&&(t.style.width=e+Cx,t.style.height=n+Cx)}function kx(t,e){if(rl)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function H6(t){var e=kx(t,"width");return e==="auto"?t.offsetWidth:parseFloat(e)}function Y6(t){var e=kx(t,"height");return e==="auto"?t.offsetHeight:parseFloat(e)}var V6=1,$6={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},R0=typeof performance=="object"&&performance.now?performance:Date;function qo(t,e,n){var r=!1,i=!1,a=!!e&&!e.isNone,o=!!n&&!n.isNone;return t==="visiblepainted"||t==="painted"||t==="auto"?(r=a,i=o):t==="visiblefill"||t==="fill"?r=!0:t==="visiblestroke"||t==="stroke"?i=!0:(t==="visible"||t==="all")&&(r=!0,i=!0),[r,i]}var X6=1,U6=function(){return X6++},sa=typeof self=="object"&&self.self==self?self:typeof mt.g=="object"&&mt.g.global==mt.g?mt.g:{},q6=Date.now(),Z6=function(){return sa.performance&&typeof sa.performance.now=="function"?sa.performance.now():Date.now()-q6},il={},Rx=Date.now(),K6=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");var e=Date.now(),n=e-Rx,r=n>16?0:16-n,i=U6();return il[i]=t,Object.keys(il).length>1||setTimeout(function(){Rx=e;var a=il;il={},Object.keys(a).forEach(function(o){return a[o](Z6())})},r),i},Q6=function(t){delete il[t]},J6=["","webkit","moz","ms","o"],Lx=function(t){return typeof t!="string"?K6:t===""?sa.requestAnimationFrame:sa[t+"RequestAnimationFrame"]},tD=function(t){return typeof t!="string"?Q6:t===""?sa.cancelAnimationFrame:sa[t+"CancelAnimationFrame"]||sa[t+"CancelRequestAnimationFrame"]},eD=function(t,e){for(var n=0;t[n]!==void 0;){if(e(t[n]))return t[n];n=n+1}},Nx=eD(J6,function(t){return!!Lx(t)}),Ix=Lx(Nx),jx=tD(Nx);sa.requestAnimationFrame=Ix,sa.cancelAnimationFrame=jx;var nD=function(){function t(){this.callbacks=[]}return t.prototype.getCallbacksNum=function(){return this.callbacks.length},t.prototype.tapPromise=function(e,n){this.callbacks.push(n)},t.prototype.promise=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Promise.all(this.callbacks.map(function(r){return r.apply(void 0,(0,S.ev)([],(0,S.CR)(e),!1))}))},t}(),rD=function(){function t(){this.callbacks=[]}return t.prototype.tapPromise=function(e,n){this.callbacks.push(n)},t.prototype.promise=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(0,S.mG)(this,void 0,void 0,function(){var r,i,a,o;return(0,S.Jh)(this,function(s){switch(s.label){case 0:return this.callbacks.length?[4,(o=this.callbacks)[0].apply(o,(0,S.ev)([],(0,S.CR)(e),!1))]:[3,6];case 1:r=s.sent(),i=0,s.label=2;case 2:return i<this.callbacks.length-1?(a=this.callbacks[i],[4,a(r)]):[3,5];case 3:r=s.sent(),s.label=4;case 4:return i++,[3,2];case 5:return[2,r];case 6:return[2,null]}})})},t}(),ei=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(e,n){this.callbacks.push(n)},t.prototype.call=function(){var e=arguments;this.callbacks.forEach(function(n){n.apply(void 0,e)})},t}(),L0=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(e,n){this.callbacks.push(n)},t.prototype.call=function(){if(this.callbacks.length){for(var e=arguments,n=this.callbacks[0].apply(void 0,e),r=0;r<this.callbacks.length-1;r++){var i=this.callbacks[r];n=i(n)}return n}return null},t}(),iD=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],aD=/([\"\'])[^\'\"]+\1/;function oD(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,a=t.fontWeight,o=(0,xr.Z)(e)&&"".concat(e,"px")||"16px",s=n.split(","),c=s.length-1;c>=0;c--){var l=s[c].trim();!aD.test(l)&&iD.indexOf(l)<0&&(l='"'.concat(l,'"')),s[c]=l}return"".concat(r," ").concat(i," ").concat(a," ").concat(o," ").concat(s.join(","))}var sD=function(){function t(){this.parser=xf,this.parserWithCSSDisabled=xf,this.mixer=b6}return t.prototype.calculator=function(e,n,r,i){return r instanceof fi?[]:r},t.prototype.postProcessor=function(e){var n=e.parsedStyle.transform;C0(n,e)},t}(),cD=function(){function t(){this.parser=Sx}return t}(),lD=function(){function t(){this.parser=Xo}return t.prototype.calculator=function(e,n,r,i){return r.value},t.prototype.postProcessor=function(e){if(e.parentNode){var n=e.parentNode,r=n.renderable,i=n.sortable;r&&(r.dirty=!0),i&&(i.dirty=!0,i.dirtyReason=Hs.Z_INDEX_CHANGED)}},t}(),uD=function(){function t(){}return t.prototype.update=function(e,n){var r=e.r,i=r*2,a=r*2;return{width:i,height:a}},t}(),fD=function(){function t(){}return t.prototype.update=function(e,n){var r=e.rx,i=e.ry,a=r*2,o=i*2;return{width:a,height:o}},t}(),dD=function(){function t(){}return t.prototype.update=function(e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=Math.min(n,i),s=Math.max(n,i),c=Math.min(r,a),l=Math.max(r,a),u=s-o,f=l-c;return{width:u,height:f}},t}(),hD=function(){function t(){}return t.prototype.update=function(e){var n=e.path,r=n.rect,i=r.width,a=r.height;return{width:i,height:a}},t}(),pD=function(){function t(){}return t.prototype.update=function(e){if(e.points&&jr(e.points.points)){var n=e.points.points,r=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(n.map(function(l){return l[0]})),!1)),i=Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(n.map(function(l){return l[0]})),!1)),a=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(n.map(function(l){return l[1]})),!1)),o=Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(n.map(function(l){return l[1]})),!1)),s=i-r,c=o-a;return{width:s,height:c}}return{width:0,height:0}},t}(),vD=function(){function t(){}return t.prototype.update=function(e,n){var r=e.img,i=e.width,a=i===void 0?0:i,o=e.height,s=o===void 0?0:o,c=a,l=s;return r&&!er(r)&&(c||(c=r.width,e.width=c),l||(l=r.height,e.height=l)),{width:c,height:l}},t}(),gD=function(){function t(e){this.globalRuntime=e}return t.prototype.isReadyToMeasure=function(e,n){var r=e.text,i=e.textAlign,a=e.textBaseline,o=e.fontSize,s=e.fontStyle,c=e.fontWeight,l=e.fontVariant,u=e.lineWidth;return r&&o&&s&&c&&l&&i&&a&&!(0,ye.Z)(u)},t.prototype.update=function(e,n){var r,i,a=e.text,o=e.textAlign,s=e.lineWidth,c=e.textBaseline,l=e.dx,u=e.dy;if(!this.isReadyToMeasure(e,n))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var f=(((i=(r=n==null?void 0:n.ownerDocument)===null||r===void 0?void 0:r.defaultView)===null||i===void 0?void 0:i.getConfig())||{}).offscreenCanvas,d=this.globalRuntime.textService.measureText(a,e,f);e.metrics=d;var h=d.width,p=d.height,v=d.lineHeight,g=d.fontProperties,y=[h/2,p/2,0],m=[0,1],b=0;o==="center"||o==="middle"?(b=s/2,m=[.5,1]):(o==="right"||o==="end")&&(b=s,m=[1,1]);var _=0;return c==="middle"?_=y[1]:c==="top"||c==="hanging"?_=y[1]*2:c==="alphabetic"?_=this.globalRuntime.enableCSSParsing?v-g.ascent:0:(c==="bottom"||c==="ideographic")&&(_=0),l&&(b+=l),u&&(_+=u),e.anchor=[m[0],m[1],0],{width:y[0]*2,height:y[1]*2,offsetX:b,offsetY:_}},t}();function yD(t){return!!t.type}var _f=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Pr,this.page=new Pr,this.canvas=new Pr,this.viewport=new Pr,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t.prototype.clone=function(){throw new Error(Pn)},t}(),Dx=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.client=new Pr,n.movement=new Pr,n.offset=new Pr,n.global=new Pr,n.screen=new Pr,n}return Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(n){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(n)},e.prototype.initMouseEvent=function(){throw new Error(Pn)},e}(_f),N0=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.width=0,n.height=0,n.isPrimary=!1,n}return e.prototype.getCoalescedEvents=function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]},e.prototype.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(Dx),I0=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(Dx),Rn=function(t){(0,S.ZT)(e,t);function e(n,r){var i=t.call(this,null)||this;return i.type=n,i.detail=r,Object.assign(i,r),i}return e}(_f),Fx=":",Bx=function(){function t(){this.emitter=new qp.Z}return t.prototype.on=function(e,n,r){return this.addEventListener(e,n,r),this},t.prototype.addEventListener=function(e,n,r){var i=Nb(r)&&r||Yo(r)&&r.capture,a=Yo(r)&&r.once,o=Ws(n)?void 0:n,s=!1,c="";if(e.indexOf(Fx)>-1){var l=(0,S.CR)(e.split(Fx),2),u=l[0],f=l[1];e=f,c=u,s=!0}if(e=i?"".concat(e,"capture"):e,n=Ws(n)?n:n.handleEvent,s){var d=n;n=function(){for(var h,p=[],v=0;v<arguments.length;v++)p[v]=arguments[v];((h=p[0].target)===null||h===void 0?void 0:h.name)===c&&d.apply(void 0,(0,S.ev)([],(0,S.CR)(p),!1))}}return a?this.emitter.once(e,n,o):this.emitter.on(e,n,o),this},t.prototype.off=function(e,n,r){return e?this.removeEventListener(e,n,r):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(e,n,r){var i=Nb(r)&&r||Yo(r)&&r.capture,a=Ws(n)?void 0:n;return e=i?"".concat(e,"capture"):e,n=Ws(n)?n:n==null?void 0:n.handleEvent,this.emitter.off(e,n,a),this},t.prototype.emit=function(e,n){this.dispatchEvent(new Rn(e,n))},t.prototype.dispatchEvent=function(e,n){var r,i;if(n===void 0&&(n=!1),!yD(e))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var a;if(this.document?a=this:this.defaultView?a=this.defaultView:a=(r=this.ownerDocument)===null||r===void 0?void 0:r.defaultView,a){if(e.manager=a.getEventService()||null,!e.manager)return!1;e.defaultPrevented=!1,e.path=[],n||(e.target=this),(i=e.manager)===null||i===void 0||i.dispatchEvent(e,e.type,n)}return!e.defaultPrevented},t}(),kr=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.shadow=!1,n.ownerDocument=null,n.isConnected=!1,n.baseURI="",n.childNodes=[],n.nodeType=0,n.nodeName="",n.nodeValue=null,n.parentNode=null,n}return e.isNode=function(n){return!!n.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var n,r,i="";this.nodeName===bt.TEXT&&(i+=this.style.text);try{for(var a=(0,S.XA)(this.childNodes),o=a.next();!o.done;o=a.next()){var s=o.value;s.nodeName===bt.TEXT?i+=s.nodeValue:i+=s.textContent}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},set:function(n){var r=this;this.childNodes.slice().forEach(function(i){r.removeChild(i)}),this.nodeName===bt.TEXT&&(this.style.text="".concat(n))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(n){return n===void 0&&(n={}),this.parentNode?this.parentNode.getRootNode(n):n.composed&&this.host?this.host.getRootNode(n):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(n){throw new Error(Pn)},e.prototype.lookupNamespaceURI=function(n){throw new Error(Pn)},e.prototype.lookupPrefix=function(n){throw new Error(Pn)},e.prototype.normalize=function(){throw new Error(Pn)},e.prototype.isEqualNode=function(n){return this===n},e.prototype.isSameNode=function(n){return this.isEqualNode(n)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(n){var r;if(n===this)return 0;for(var i=n,a=this,o=[i],s=[a];(r=i.parentNode)!==null&&r!==void 0?r:a.parentNode;)i=i.parentNode?(o.push(i.parentNode),i.parentNode):i,a=a.parentNode?(s.push(a.parentNode),a.parentNode):a;if(i!==a)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var c=o.length>s.length?o:s,l=c===o?s:o;if(c[c.length-l.length]===l[0])return c===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=c.length-l.length,f=l.length-1;f>=0;f--){var d=l[f],h=c[u+f];if(h!==d){var p=d.parentNode.childNodes;return p.indexOf(d)<p.indexOf(h)?l===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING:c===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(n){return this.contains(n)},e.prototype.contains=function(n){for(var r=n;r&&this!==r;)r=r.parentNode;return!!r},e.prototype.getAncestor=function(n){for(var r=this;n>0&&r;)r=r.parentNode,n--;return r},e.prototype.forEach=function(n,r){r===void 0&&(r=!1),n(this)||(r?this.childNodes.slice():this.childNodes).forEach(function(i){i.forEach(n)})},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(Bx),mD=2048,bD=function(){function t(e,n){var r=this;this.globalRuntime=e,this.context=n,this.emitter=new qp.Z,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=qt.create(),this.tmpVec3=ot.create(),this.onPointerDown=function(i){var a=r.createPointerEvent(i);if(r.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")r.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var o=a.button===2;r.dispatchEvent(a,o?"rightdown":"mousedown")}var s=r.trackingData(i.pointerId);s.pressTargetsByButton[i.button]=a.composedPath(),r.freeEvent(a)},this.onPointerUp=function(i){var a,o=R0.now(),s=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);if(r.dispatchEvent(s,"pointerup"),s.pointerType==="touch")r.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var c=s.button===2;r.dispatchEvent(s,c?"rightup":"mouseup")}var l=r.trackingData(i.pointerId),u=r.findMountedTarget(l.pressTargetsByButton[i.button]),f=u;if(u&&!s.composedPath().includes(u)){for(var d=u;d&&!s.composedPath().includes(d);){if(s.currentTarget=d,r.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")r.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var c=s.button===2;r.notifyTarget(s,c?"rightupoutside":"mouseupoutside")}kr.isNode(d)&&(d=d.parentNode)}delete l.pressTargetsByButton[i.button],f=d}if(f){var h=r.clonePointerEvent(s,"click");h.target=f,h.path=[],l.clicksByButton[i.button]||(l.clicksByButton[i.button]={clickCount:0,target:h.target,timeStamp:o});var p=l.clicksByButton[i.button];p.target===h.target&&o-p.timeStamp<200?++p.clickCount:p.clickCount=1,p.target=h.target,p.timeStamp=o,h.detail=p.clickCount,!((a=s.detail)===null||a===void 0)&&a.preventClick||(!r.context.config.useNativeClickEvent&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r.dispatchEvent(h,"click"),r.dispatchEvent(h,"pointertap")),r.freeEvent(h)}r.freeEvent(s)},this.onPointerMove=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0),o=a.pointerType==="mouse"||a.pointerType==="pen",s=r.trackingData(i.pointerId),c=r.findMountedTarget(s.overTargets);if(s.overTargets&&c!==a.target){var l=i.type==="mousemove"?"mouseout":"pointerout",u=r.createPointerEvent(i,l,c||void 0);if(r.dispatchEvent(u,"pointerout"),o&&r.dispatchEvent(u,"mouseout"),!a.composedPath().includes(c)){var f=r.createPointerEvent(i,"pointerleave",c||void 0);for(f.eventPhase=f.AT_TARGET;f.target&&!a.composedPath().includes(f.target);)f.currentTarget=f.target,r.notifyTarget(f),o&&r.notifyTarget(f,"mouseleave"),kr.isNode(f.target)&&(f.target=f.target.parentNode);r.freeEvent(f)}r.freeEvent(u)}if(c!==a.target){var d=i.type==="mousemove"?"mouseover":"pointerover",h=r.clonePointerEvent(a,d);r.dispatchEvent(h,"pointerover"),o&&r.dispatchEvent(h,"mouseover");for(var p=c&&kr.isNode(c)&&c.parentNode;p&&p!==(kr.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&p!==a.target;)p=p.parentNode;var v=!p||p===(kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);if(v){var g=r.clonePointerEvent(a,"pointerenter");for(g.eventPhase=g.AT_TARGET;g.target&&g.target!==c&&g.target!==(kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)g.currentTarget=g.target,r.notifyTarget(g),o&&r.notifyTarget(g,"mouseenter"),kr.isNode(g.target)&&(g.target=g.target.parentNode);r.freeEvent(g)}r.freeEvent(h)}r.dispatchEvent(a,"pointermove"),a.pointerType==="touch"&&r.dispatchEvent(a,"touchmove"),o&&(r.dispatchEvent(a,"mousemove"),r.cursor=r.getCursor(a.target)),s.overTargets=a.composedPath(),r.freeEvent(a)},this.onPointerOut=function(i){var a=r.trackingData(i.pointerId);if(a.overTargets){var o=i.pointerType==="mouse"||i.pointerType==="pen",s=r.findMountedTarget(a.overTargets),c=r.createPointerEvent(i,"pointerout",s||void 0);r.dispatchEvent(c),o&&r.dispatchEvent(c,"mouseout");var l=r.createPointerEvent(i,"pointerleave",s||void 0);for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==(kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)l.currentTarget=l.target,r.notifyTarget(l),o&&r.notifyTarget(l,"mouseleave"),kr.isNode(l.target)&&(l.target=l.target.parentNode);a.overTargets=null,r.freeEvent(c),r.freeEvent(l)}r.cursor=null},this.onPointerOver=function(i){var a=r.trackingData(i.pointerId),o=r.createPointerEvent(i),s=o.pointerType==="mouse"||o.pointerType==="pen";r.dispatchEvent(o,"pointerover"),s&&r.dispatchEvent(o,"mouseover"),o.pointerType==="mouse"&&(r.cursor=r.getCursor(o.target));var c=r.clonePointerEvent(o,"pointerenter");for(c.eventPhase=c.AT_TARGET;c.target&&c.target!==(kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)c.currentTarget=c.target,r.notifyTarget(c),s&&r.notifyTarget(c,"mouseenter"),kr.isNode(c.target)&&(c.target=c.target.parentNode);a.overTargets=o.composedPath(),r.freeEvent(o),r.freeEvent(c)},this.onPointerUpOutside=function(i){var a=r.trackingData(i.pointerId),o=r.findMountedTarget(a.pressTargetsByButton[i.button]),s=r.createPointerEvent(i);if(o){for(var c=o;c;)s.currentTarget=c,r.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"||(s.pointerType==="mouse"||s.pointerType==="pen")&&r.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),kr.isNode(c)&&(c=c.parentNode);delete a.pressTargetsByButton[i.button]}r.freeEvent(s)},this.onWheel=function(i){var a=r.createWheelEvent(i);r.dispatchEvent(a),r.freeEvent(a)},this.onClick=function(i){if(r.context.config.useNativeClickEvent){var a=r.createPointerEvent(i);r.dispatchEvent(a),r.freeEvent(a)}},this.onPointerCancel=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);r.dispatchEvent(a),r.freeEvent(a)}}return t.prototype.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},t.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},t.prototype.client2Viewport=function(e){var n=this.context.contextService.getBoundingClientRect();return new Pr(e.x-((n==null?void 0:n.left)||0),e.y-((n==null?void 0:n.top)||0))},t.prototype.viewport2Client=function(e){var n=this.context.contextService.getBoundingClientRect();return new Pr(e.x+((n==null?void 0:n.left)||0),e.y+((n==null?void 0:n.top)||0))},t.prototype.viewport2Canvas=function(e){var n=e.x,r=e.y,i=this.rootTarget.defaultView,a=i.getCamera(),o=this.context.config,s=o.width,c=o.height,l=a.getPerspectiveInverse(),u=a.getWorldTransform(),f=qt.multiply(this.tmpMatrix,u,l),d=ot.set(this.tmpVec3,n/s*2-1,(1-r/c)*2-1,0);return ot.transformMat4(d,d,f),new Pr(d[0],d[1])},t.prototype.canvas2Viewport=function(e){var n=this.rootTarget.defaultView,r=n.getCamera(),i=r.getPerspective(),a=r.getViewTransform(),o=qt.multiply(this.tmpMatrix,i,a),s=ot.set(this.tmpVec3,e.x,e.y,0);ot.transformMat4(this.tmpVec3,this.tmpVec3,o);var c=this.context.config,l=c.width,u=c.height;return new Pr((s[0]+1)/2*l,(1-(s[1]+1)/2)*u)},t.prototype.setPickHandler=function(e){this.pickHandler=e},t.prototype.addEventMapping=function(e,n){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:n,priority:0}),this.mappingTable[e].sort(function(r,i){return r.priority-i.priority})},t.prototype.mapEvent=function(e){if(this.rootTarget){var n=this.mappingTable[e.type];if(n)for(var r=0,i=n.length;r<i;r++)n[r].fn(e);else console.warn("[EventService]: Event mapping not defined for ".concat(e.type))}},t.prototype.dispatchEvent=function(e,n,r){if(!r)e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,n);else{e.eventPhase=e.AT_TARGET;var i=this.rootTarget.defaultView||null;e.currentTarget=i,this.notifyListeners(e,n)}this.emitter.emit(n||e.type,e)},t.prototype.propagate=function(e,n){if(e.target){var r=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(var i=r.length-1;i>=1;i--)if(e.currentTarget=r[i],this.notifyTarget(e,n),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,n),!(e.propagationStopped||e.propagationImmediatelyStopped)){var a=r.indexOf(e.currentTarget);e.eventPhase=e.BUBBLING_PHASE;for(var i=a+1;i<r.length;i++)if(e.currentTarget=r[i],this.notifyTarget(e,n),e.propagationStopped||e.propagationImmediatelyStopped)return}}},t.prototype.propagationPath=function(e){var n=[e],r=this.rootTarget.defaultView||null;if(r&&r===e)return n.unshift(r.document),n;for(var i=0;i<mD&&e!==this.rootTarget;i++)kr.isNode(e)&&e.parentNode&&(n.push(e.parentNode),e=e.parentNode);return r&&n.push(r),n},t.prototype.hitTest=function(e){var n=e.viewportX,r=e.viewportY,i=this.context.config,a=i.width,o=i.height,s=i.disableHitTesting;return n<0||r<0||n>a||r>o?null:!s&&this.pickHandler(e)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(e){var n,r=this.context.contextService.getDomElement(),i=(n=e.nativeEvent)===null||n===void 0?void 0:n.target;if(i){if(i===r)return!0;if(r&&r.contains)return r.contains(i)}return e.nativeEvent.composedPath?e.nativeEvent.composedPath().indexOf(r)>-1:!1},t.prototype.getExistedHTML=function(e){var n,r;if(e.nativeEvent.composedPath)try{for(var i=(0,S.XA)(e.nativeEvent.composedPath()),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.nativeHTMLMap.get(o);if(s)return s}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return null},t.prototype.pickTarget=function(e){return this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY})},t.prototype.createPointerEvent=function(e,n,r,i){var a=this.allocateEvent(N0);this.copyPointerData(e,a),this.copyMouseData(e,a),this.copyData(e,a),a.nativeEvent=e.nativeEvent,a.originalEvent=e;var o=this.getExistedHTML(a);return a.target=r!=null?r:o||this.isNativeEventFromCanvas(a)&&this.pickTarget(a)||i,typeof n=="string"&&(a.type=n),a},t.prototype.createWheelEvent=function(e){var n=this.allocateEvent(I0);this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e;var r=this.getExistedHTML(n);return n.target=r||this.isNativeEventFromCanvas(n)&&this.pickTarget(n),n},t.prototype.trackingData=function(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]},t.prototype.cloneWheelEvent=function(e){var n=this.allocateEvent(I0);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=e.type,n},t.prototype.clonePointerEvent=function(e,n){var r=this.allocateEvent(N0);return r.nativeEvent=e.nativeEvent,r.originalEvent=e.originalEvent,this.copyPointerData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.target=e.target,r.path=e.composedPath().slice(),r.type=n!=null?n:r.type,r},t.prototype.copyPointerData=function(e,n){n.pointerId=e.pointerId,n.width=e.width,n.height=e.height,n.isPrimary=e.isPrimary,n.pointerType=e.pointerType,n.pressure=e.pressure,n.tangentialPressure=e.tangentialPressure,n.tiltX=e.tiltX,n.tiltY=e.tiltY,n.twist=e.twist},t.prototype.copyMouseData=function(e,n){n.altKey=e.altKey,n.button=e.button,n.buttons=e.buttons,n.ctrlKey=e.ctrlKey,n.metaKey=e.metaKey,n.shiftKey=e.shiftKey,n.client.copyFrom(e.client),n.movement.copyFrom(e.movement),n.canvas.copyFrom(e.canvas),n.screen.copyFrom(e.screen),n.global.copyFrom(e.global),n.offset.copyFrom(e.offset)},t.prototype.copyWheelData=function(e,n){n.deltaMode=e.deltaMode,n.deltaX=e.deltaX,n.deltaY=e.deltaY,n.deltaZ=e.deltaZ},t.prototype.copyData=function(e,n){n.isTrusted=e.isTrusted,n.timeStamp=R0.now(),n.type=e.type,n.detail=e.detail,n.view=e.view,n.page.copyFrom(e.page),n.viewport.copyFrom(e.viewport)},t.prototype.allocateEvent=function(e){this.eventPool.has(e)||this.eventPool.set(e,[]);var n=this.eventPool.get(e).pop()||new e(this);return n.eventPhase=n.NONE,n.currentTarget=null,n.path=[],n.target=null,n},t.prototype.freeEvent=function(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var n=e.constructor;this.eventPool.has(n)||this.eventPool.set(n,[]),this.eventPool.get(n).push(e)},t.prototype.notifyTarget=function(e,n){n=n!=null?n:e.type;var r=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?"".concat(n,"capture"):n;this.notifyListeners(e,r),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,n)},t.prototype.notifyListeners=function(e,n){var r=e.currentTarget.emitter,i=r._events[n];if(i)if("fn"in i)i.once&&r.removeListener(n,i.fn,void 0,!0),i.fn.call(e.currentTarget||i.context,e);else for(var a=0;a<i.length&&!e.propagationImmediatelyStopped;a++)i[a].once&&r.removeListener(n,i[a].fn,void 0,!0),i[a].fn.call(e.currentTarget||i[a].context,e)},t.prototype.findMountedTarget=function(e){if(!e)return null;for(var n=e[e.length-1],r=e.length-2;r>=0;r--){var i=e[r];if(i===this.rootTarget||kr.isNode(i)&&i.parentNode===n)n=e[r];else break}return n},t.prototype.getCursor=function(e){for(var n=e;n;){var r=z6(n)&&n.getAttribute("cursor");if(r)return r;n=kr.isNode(n)&&n.parentNode}},t}(),xD=function(){function t(){}return t.prototype.getOrCreateCanvas=function(e,n){if(this.canvas)return this.canvas;if(e||Mt.offscreenCanvas)this.canvas=e||Mt.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,S.pi)({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,S.pi)({willReadFrequently:!0},n)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,S.pi)({willReadFrequently:!0},n))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(e,n){return this.context?this.context:(this.getOrCreateCanvas(e,n),this.context)},t}(),io;(function(t){t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE"})(io||(io={}));var _D=function(){function t(e,n){this.globalRuntime=e,this.context=n,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new ei,initAsync:new nD,dirtycheck:new L0,cull:new L0,beginFrame:new ei,beforeRender:new ei,render:new ei,afterRender:new ei,endFrame:new ei,destroy:new ei,pick:new rD,pickSync:new L0,pointerDown:new ei,pointerUp:new ei,pointerMove:new ei,pointerOut:new ei,pointerOver:new ei,pointerWheel:new ei,pointerCancel:new ei,click:new ei}}return t.prototype.init=function(e){var n=this,r=(0,S.pi)((0,S.pi)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(i){i.apply(r,n.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,e()):this.hooks.initAsync.promise().then(function(){n.inited=!0,e()})},t.prototype.getStats=function(){return this.stats},t.prototype.disableDirtyRectangleRendering=function(){var e=this.context.config.renderer,n=e.getConfig().enableDirtyRectangleRendering;return!n||this.context.renderingContext.renderReasons.has(io.CAMERA_CHANGED)},t.prototype.render=function(e,n){var r=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var i=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(i.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),i.renderReasons.size&&this.inited){i.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var a=i.renderReasons.size===1&&i.renderReasons.has(io.CAMERA_CHANGED),o=!e.disableRenderHooks||!(e.disableRenderHooks&&a);o&&this.renderDisplayObject(i.root,e,i),this.hooks.beginFrame.call(),o&&i.renderListCurrentFrame.forEach(function(s){r.hooks.beforeRender.call(s),r.hooks.render.call(s),r.hooks.afterRender.call(s)}),this.hooks.endFrame.call(),i.renderListCurrentFrame=[],i.renderReasons.clear(),n()}},t.prototype.renderDisplayObject=function(e,n,r){var i=this,a=n.renderer.getConfig(),o=a.enableDirtyCheck,s=a.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(e);var c=e.renderable,l=o?c.dirty||r.dirtyRectangleRenderingDisabled?e:null:e;if(l){var u=s?this.hooks.cull.call(l,this.context.camera):l;u&&(this.stats.rendered++,r.renderListCurrentFrame.push(u))}e.renderable.dirty=!1,e.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var f=e.sortable;f.dirty&&(this.sort(e,f),f.dirty=!1,f.dirtyChildren=[],f.dirtyReason=void 0),(f.sorted||e.childNodes).forEach(function(d){i.renderDisplayObject(d,n,r)})},t.prototype.sort=function(e,n){n.sorted&&n.dirtyReason!==Hs.Z_INDEX_CHANGED?n.dirtyChildren.forEach(function(r){var i=e.childNodes.indexOf(r);if(i===-1){var a=n.sorted.indexOf(r);a>=0&&n.sorted.splice(a,1)}else if(n.sorted.length===0)n.sorted.push(r);else{var o=G6(n.sorted,r);n.sorted.splice(o,0,r)}}):n.sorted=e.childNodes.slice().sort(Tx)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(io.DISPLAY_OBJECT_CHANGED)},t}(),OD=/\[\s*(.*)=(.*)\s*\]/,wD=function(){function t(){}return t.prototype.selectOne=function(e,n){var r=this;if(e.startsWith("."))return n.find(function(s){return((s==null?void 0:s.classList)||[]).indexOf(r.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.find(function(s){return s.id===r.getIdOrClassname(e)});if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,o=i.value;return a?n.find(function(s){return n!==s&&(a==="name"?s.name===o:r.attributeToString(s,a)===o)}):null}else return n.find(function(s){return n!==s&&s.nodeName===e})},t.prototype.selectAll=function(e,n){var r=this;if(e.startsWith("."))return n.findAll(function(s){return n!==s&&((s==null?void 0:s.classList)||[]).indexOf(r.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.findAll(function(s){return n!==s&&s.id===r.getIdOrClassname(e)});if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,o=i.value;return a?n.findAll(function(s){return n!==s&&(a==="name"?s.name===o:r.attributeToString(s,a)===o)}):[]}else return n.findAll(function(s){return n!==s&&s.nodeName===e})},t.prototype.is=function(e,n){if(e.startsWith("."))return n.className===this.getIdOrClassname(e);if(e.startsWith("#"))return n.id===this.getIdOrClassname(e);if(e.startsWith("[")){var r=this.getAttribute(e),i=r.name,a=r.value;return i==="name"?n.name===a:this.attributeToString(n,i)===a}else return n.nodeName===e},t.prototype.getIdOrClassname=function(e){return e.substring(1)},t.prototype.getAttribute=function(e){var n=e.match(OD),r="",i="";return n&&n.length>2&&(r=n[1].replace(/"/g,""),i=n[2].replace(/"/g,"")),{name:r,value:i}},t.prototype.attributeToString=function(e,n){if(!e.getAttribute)return"";var r=e.getAttribute(n);return(0,ye.Z)(r)?"":r.toString?r.toString():""},t}(),ao=function(t){(0,S.ZT)(e,t);function e(n,r,i,a,o,s,c,l){var u=t.call(this,null)||this;return u.relatedNode=r,u.prevValue=i,u.newValue=a,u.attrName=o,u.attrChange=s,u.prevParsedValue=c,u.newParsedValue=l,u.type=n,u}return e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(_f),Re;(function(t){t.REPARENT="reparent",t.DESTROY="destroy",t.ATTR_MODIFIED="DOMAttrModified",t.INSERTED="DOMNodeInserted",t.REMOVED="removed",t.MOUNTED="DOMNodeInsertedIntoDocument",t.UNMOUNTED="DOMNodeRemovedFromDocument",t.BOUNDS_CHANGED="bounds-changed",t.CULLED="culled"})(Re||(Re={}));function zx(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}var SD=new ao(Re.REPARENT,null,"","","",0,"",""),MD=function(){function t(e){var n=this;this.runtime=e,this.pendingEvents=[],this.boundsChangedEvent=new Rn(Re.BOUNDS_CHANGED),this.rotate=function(){var r=br();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=ot.fromValues(a,o,s));var c=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.rotateLocal(i,a);else{var l=br();tf(l,a[0],a[1],a[2]);var u=n.getRotation(i),f=n.getRotation(i.parentNode);ef(r,f),Kp(r,r),Qa(l,r,l),Qa(c.localRotation,l,u),nf(c.localRotation,c.localRotation),n.dirtifyLocal(i,c)}}}(),this.rotateLocal=function(){var r=br();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=ot.fromValues(a,o,s));var c=i.transformable;tf(r,a[0],a[1],a[2]),xb(c.localRotation,c.localRotation,r),n.dirtifyLocal(i,c)}}(),this.setEulerAngles=function(){var r=br();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=ot.fromValues(a,o,s));var c=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.setLocalEulerAngles(i,a);else{tf(c.localRotation,a[0],a[1],a[2]);var l=n.getRotation(i.parentNode);ef(r,Kp(br(),l)),xb(c.localRotation,c.localRotation,r),n.dirtifyLocal(i,c)}}}(),this.translateLocal=function(){return function(r,i,a,o){a===void 0&&(a=0),o===void 0&&(o=0),typeof i=="number"&&(i=ot.fromValues(i,a,o));var s=r.transformable;ot.equals(i,ot.create())||(ot.transformQuat(i,i,s.localRotation),ot.add(s.localPosition,s.localPosition,i),n.dirtifyLocal(r,s))}}(),this.setPosition=function(){var r=qt.create(),i=ot.create();return function(a,o){var s=a.transformable;if(i[0]=o[0],i[1]=o[1],i[2]=o[2]||0,!ot.equals(n.getPosition(a),i)){if(ot.copy(s.position,i),a.parentNode===null||!a.parentNode.transformable)ot.copy(s.localPosition,i);else{var c=a.parentNode.transformable;qt.copy(r,c.worldTransform),qt.invert(r,r),ot.transformMat4(s.localPosition,i,r)}n.dirtifyLocal(a,s)}}}(),this.setLocalPosition=function(){var r=ot.create();return function(i,a){var o=i.transformable;r[0]=a[0],r[1]=a[1],r[2]=a[2]||0,!ot.equals(o.localPosition,r)&&(ot.copy(o.localPosition,r),n.dirtifyLocal(i,o))}}(),this.translate=function(){var r=ot.create(),i=ot.create(),a=ot.create();return function(o,s,c,l){c===void 0&&(c=0),l===void 0&&(l=0),typeof s=="number"&&(s=ot.set(i,s,c,l)),!ot.equals(s,r)&&(ot.add(a,n.getPosition(o),s),n.setPosition(o,a))}}(),this.setRotation=function(){var r=br();return function(i,a,o,s,c){var l=i.transformable;if(typeof a=="number"&&(a=Qp(a,o,s,c)),i.parentNode===null||!i.parentNode.transformable)n.setLocalRotation(i,a);else{var u=n.getRotation(i.parentNode);ef(r,u),Kp(r,r),Qa(l.localRotation,r,a),nf(l.localRotation,l.localRotation),n.dirtifyLocal(i,l)}}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=function(){var r=qt.create(),i=ot.create(),a=Qp(0,0,0,1);return function(o){var s=o.localSkew[0]!==0||o.localSkew[1]!==0;if(s){if(qt.fromRotationTranslationScaleOrigin(o.localTransform,o.localRotation,o.localPosition,ot.fromValues(1,1,1),o.origin),o.localSkew[0]!==0||o.localSkew[1]!==0){var c=qt.identity(r);c[4]=Math.tan(o.localSkew[0]),c[1]=Math.tan(o.localSkew[1]),qt.multiply(o.localTransform,o.localTransform,c)}var l=qt.fromRotationTranslationScaleOrigin(r,a,i,o.localScale,o.origin);qt.multiply(o.localTransform,o.localTransform,l)}else qt.fromRotationTranslationScaleOrigin(o.localTransform,o.localRotation,o.localPosition,o.localScale,o.origin)}}()}return t.prototype.matches=function(e,n){return this.runtime.sceneGraphSelector.is(e,n)},t.prototype.querySelector=function(e,n){return this.runtime.sceneGraphSelector.selectOne(e,n)},t.prototype.querySelectorAll=function(e,n){return this.runtime.sceneGraphSelector.selectAll(e,n)},t.prototype.attach=function(e,n,r){var i,a,o=!1;e.parentNode&&(o=e.parentNode!==n,this.detach(e)),e.parentNode=n,(0,ye.Z)(r)?e.parentNode.childNodes.push(e):e.parentNode.childNodes.splice(r,0,e);var s=n.sortable;(!((i=s==null?void 0:s.sorted)===null||i===void 0)&&i.length||!((a=e.style)===null||a===void 0)&&a.zIndex)&&(s.dirtyChildren.indexOf(e)===-1&&s.dirtyChildren.push(e),s.dirty=!0,s.dirtyReason=Hs.ADDED);var c=e.transformable;c&&this.dirtifyWorld(e,c),c.frozen&&this.unfreezeParentToRoot(e),o&&e.dispatchEvent(SD)},t.prototype.detach=function(e){var n,r;if(e.parentNode){var i=e.transformable,a=e.parentNode.sortable;(!((n=a==null?void 0:a.sorted)===null||n===void 0)&&n.length||!((r=e.style)===null||r===void 0)&&r.zIndex)&&(a.dirtyChildren.indexOf(e)===-1&&a.dirtyChildren.push(e),a.dirty=!0,a.dirtyReason=Hs.REMOVED);var o=e.parentNode.childNodes.indexOf(e);o>-1&&e.parentNode.childNodes.splice(o,1),i&&this.dirtifyWorld(e,i),e.parentNode=null}},t.prototype.getOrigin=function(e){return e.transformable.origin},t.prototype.setOrigin=function(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=0),typeof n=="number"&&(n=[n,r,i]);var a=e.transformable;if(!(n[0]===a.origin[0]&&n[1]===a.origin[1]&&n[2]===a.origin[2])){var o=a.origin;o[0]=n[0],o[1]=n[1],o[2]=n[2]||0,this.dirtifyLocal(e,a)}},t.prototype.setLocalEulerAngles=function(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=0),typeof n=="number"&&(n=ot.fromValues(n,r,i));var a=e.transformable;tf(a.localRotation,n[0],n[1],n[2]),this.dirtifyLocal(e,a)},t.prototype.scaleLocal=function(e,n){var r=e.transformable;ot.multiply(r.localScale,r.localScale,ot.fromValues(n[0],n[1],n[2]||1)),this.dirtifyLocal(e,r)},t.prototype.setLocalScale=function(e,n){var r=e.transformable,i=ot.fromValues(n[0],n[1],n[2]||r.localScale[2]);ot.equals(i,r.localScale)||(ot.copy(r.localScale,i),this.dirtifyLocal(e,r))},t.prototype.setLocalRotation=function(e,n,r,i,a){typeof n=="number"&&(n=Qp(n,r,i,a));var o=e.transformable;ef(o.localRotation,n),this.dirtifyLocal(e,o)},t.prototype.setLocalSkew=function(e,n,r){typeof n=="number"&&(n=Uc.al(n,r));var i=e.transformable;Uc.JG(i.localSkew,n),this.dirtifyLocal(e,i)},t.prototype.dirtifyLocal=function(e,n){n.localDirtyFlag||(n.localDirtyFlag=!0,n.dirtyFlag||this.dirtifyWorld(e,n))},t.prototype.dirtifyWorld=function(e,n){n.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,n),this.dirtifyToRoot(e,!0)},t.prototype.triggerPendingEvents=function(){var e=this,n=new Set,r=function(i,a){i.isConnected&&!n.has(i.entity)&&(e.boundsChangedEvent.detail=a,e.boundsChangedEvent.target=i,i.isMutationObserved?i.dispatchEvent(e.boundsChangedEvent):i.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),n.add(i.entity))};this.pendingEvents.forEach(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1];s.affectChildren?o.forEach(function(c){r(c,s)}):r(o,s)}),this.clearPendingEvents(),n.clear()},t.prototype.clearPendingEvents=function(){this.pendingEvents=[]},t.prototype.dirtifyToRoot=function(e,n){n===void 0&&(n=!1);var r=e;for(r.renderable&&(r.renderable.dirty=!0);r;)zx(r),r=r.parentNode;n&&e.forEach(function(i){zx(i)}),this.informDependentDisplayObjects(e),this.pendingEvents.push([e,{affectChildren:n}])},t.prototype.updateDisplayObjectDependency=function(e,n,r,i){if(n&&n!==r){var a=this.displayObjectDependencyMap.get(n);if(a&&a[e]){var o=a[e].indexOf(i);a[e].splice(o,1)}}if(r){var s=this.displayObjectDependencyMap.get(r);s||(this.displayObjectDependencyMap.set(r,{}),s=this.displayObjectDependencyMap.get(r)),s[e]||(s[e]=[]),s[e].push(i)}},t.prototype.informDependentDisplayObjects=function(e){var n=this,r=this.displayObjectDependencyMap.get(e);r&&Object.keys(r).forEach(function(i){r[i].forEach(function(a){n.dirtifyToRoot(a,!0),a.dispatchEvent(new ao(Re.ATTR_MODIFIED,a,n,n,i,ao.MODIFICATION,n,n)),a.isCustomElement&&a.isConnected&&a.attributeChangedCallback&&a.attributeChangedCallback(i,n,n)})})},t.prototype.getPosition=function(e){var n=e.transformable;return qt.getTranslation(n.position,this.getWorldTransform(e,n))},t.prototype.getRotation=function(e){var n=e.transformable;return qt.getRotation(n.rotation,this.getWorldTransform(e,n))},t.prototype.getScale=function(e){var n=e.transformable;return qt.getScaling(n.scaling,this.getWorldTransform(e,n))},t.prototype.getWorldTransform=function(e,n){return n===void 0&&(n=e.transformable),!n.localDirtyFlag&&!n.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,n)),n.worldTransform},t.prototype.getLocalPosition=function(e){return e.transformable.localPosition},t.prototype.getLocalRotation=function(e){return e.transformable.localRotation},t.prototype.getLocalScale=function(e){return e.transformable.localScale},t.prototype.getLocalSkew=function(e){return e.transformable.localSkew},t.prototype.getLocalTransform=function(e){var n=e.transformable;return n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.localTransform},t.prototype.setLocalTransform=function(e,n){var r=qt.getTranslation(ot.create(),n),i=qt.getRotation(br(),n),a=qt.getScaling(ot.create(),n);this.setLocalScale(e,a),this.setLocalPosition(e,r),this.setLocalRotation(e,i)},t.prototype.resetLocalTransform=function(e){this.setLocalScale(e,[1,1,1]),this.setLocalPosition(e,[0,0,0]),this.setLocalEulerAngles(e,[0,0,0]),this.setLocalSkew(e,[0,0])},t.prototype.getTransformedGeometryBounds=function(e,n,r){n===void 0&&(n=!1);var i=this.getGeometryBounds(e,n);if(Sr.isEmpty(i))return null;var a=r||new Sr;return a.setFromTransformedAABB(i,this.getWorldTransform(e)),a},t.prototype.getGeometryBounds=function(e,n){n===void 0&&(n=!1);var r=e.geometry,i=n?r.renderBounds:r.contentBounds||null;return i||new Sr},t.prototype.getBounds=function(e,n){var r=this;n===void 0&&(n=!1);var i=e.renderable;if(!i.boundsDirty&&!n&&i.bounds)return i.bounds;if(!i.renderBoundsDirty&&n&&i.renderBounds)return i.renderBounds;var a=n?i.renderBounds:i.bounds,o=this.getTransformedGeometryBounds(e,n,a),s=e.childNodes;if(s.forEach(function(u){var f=r.getBounds(u,n);f&&(o?o.add(f):(o=a||new Sr,o.update(f.center,f.halfExtents)))}),n){var c=Px(e);if(c){var l=c.parsedStyle.clipPath.getBounds(n);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new Sr),o&&(n?i.renderBounds=o:i.bounds=o),n?i.renderBoundsDirty=!1:i.boundsDirty=!1,o},t.prototype.getLocalBounds=function(e){if(e.parentNode){var n=qt.create();e.parentNode.transformable&&(n=qt.invert(qt.create(),this.getWorldTransform(e.parentNode)));var r=this.getBounds(e);if(!Sr.isEmpty(r)){var i=new Sr;return i.setFromTransformedAABB(r,n),i}}return this.getBounds(e)},t.prototype.getBoundingClientRect=function(e){var n,r,i,a=this.getGeometryBounds(e);Sr.isEmpty(a)||(i=new Sr,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var o=(r=(n=e.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||r===void 0?void 0:r.getContextService().getBoundingClientRect();if(i){var s=(0,S.CR)(i.getMin(),2),c=s[0],l=s[1],u=(0,S.CR)(i.getMax(),2),f=u[0],d=u[1];return new $o(c+((o==null?void 0:o.left)||0),l+((o==null?void 0:o.top)||0),f-c,d-l)}return new $o((o==null?void 0:o.left)||0,(o==null?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(e,n){var r=this;if(!n.dirtyFlag){n.dirtyFlag=!0,n.frozen=!1,e.childNodes.forEach(function(a){var o=a.transformable;o.dirtyFlag||r.dirtifyWorldInternal(a,o)});var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0)}},t.prototype.syncHierarchy=function(e){var n=e.transformable;if(!n.frozen){n.frozen=!0,(n.localDirtyFlag||n.dirtyFlag)&&this.sync(e,n);for(var r=e.childNodes,i=0;i<r.length;i++)this.syncHierarchy(r[i])}},t.prototype.sync=function(e,n){if(n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.dirtyFlag){var r=e.parentNode,i=r&&r.transformable;r===null||!i?qt.copy(n.worldTransform,n.localTransform):qt.multiply(n.worldTransform,i.worldTransform,n.localTransform),n.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(e){for(var n=e.parentNode;n;){var r=n.transformable;r&&(r.frozen=!1),n=n.parentNode}},t}(),Zo={MetricsString:"|\xC9q\xC5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Gx=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ED=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,AD=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,TD=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,PD=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,CD=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,kD=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,RD=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,LD=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,ND=new RegExp("".concat(ED.source,"|").concat(TD.source,"|").concat(CD.source,"|").concat(RD.source)),ID=new RegExp("".concat(AD.source,"|").concat(PD.source,"|").concat(kD.source,"|").concat(LD.source)),jD=function(){function t(e){var n=this;this.runtime=e,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(r,i){return n.isBreakingSpace(i)?!1:!!(r&&(ID.exec(i)||ND.exec(r)))},this.trimByKinsokuShorui=function(r){var i=(0,S.ev)([],(0,S.CR)(r),!1),a=i[i.length-2];if(!a)return r;var o=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=o+i[i.length-1],i}}return t.prototype.measureFont=function(e,n){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var r={ascent:0,descent:0,fontSize:0},i=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(n),a=this.runtime.offscreenCanvasCreator.getOrCreateContext(n,{willReadFrequently:!0});a.font=e;var o=Zo.MetricsString+Zo.BaselineSymbol,s=Math.ceil(a.measureText(o).width),c=Math.ceil(a.measureText(Zo.BaselineSymbol).width),l=Zo.HeightMultiplier*c;c=c*Zo.BaselineMultiplier|0,i.width=s,i.height=l,a.fillStyle="#f00",a.fillRect(0,0,s,l),a.font=e,a.textBaseline="alphabetic",a.fillStyle="#000",a.fillText(o,0,c);var u=a.getImageData(0,0,s||1,l||1).data,f=u.length,d=s*4,h=0,p=0,v=!1;for(h=0;h<c;++h){for(var g=0;g<d;g+=4)if(u[p+g]!==255){v=!0;break}if(!v)p+=d;else break}for(r.ascent=c-h,p=f-d,v=!1,h=l;h>c;--h){for(var g=0;g<d;g+=4)if(u[p+g]!==255){v=!0;break}if(!v)p-=d;else break}return r.descent=h-c,r.fontSize=r.ascent+r.descent,this.fontMetricsCache[e]=r,r},t.prototype.measureText=function(e,n,r){var i=n.fontSize,a=n.wordWrap,o=n.lineHeight,s=n.lineWidth,c=n.textBaseline,l=n.textAlign,u=n.letterSpacing,f=n.textPath;n.textPathSide,n.textPathStartOffset;var d=n.leading,h=d===void 0?0:d,p=oD(n),v=this.measureFont(p,r);v.fontSize===0&&(v.fontSize=i,v.ascent=i);var g=this.runtime.offscreenCanvasCreator.getOrCreateContext(r);g.font=p,n.isOverflowing=!1;var y=a?this.wordWrap(e,n,r):e,m=y.split(/(?:\r\n|\r|\n)/),b=new Array(m.length),_=0;if(f){f.getTotalLength();for(var O=0;O<m.length;O++)var w=g.measureText(m[O]).width+(m[O].length-1)*u}else{for(var O=0;O<m.length;O++){var M=g.measureText(m[O]).width+(m[O].length-1)*u;b[O]=M,_=Math.max(_,M)}var w=_+s,E=o||v.fontSize+s,A=Math.max(E,v.fontSize+s)+(m.length-1)*(E+h);E+=h;var P=0;return c==="middle"?P=-A/2:c==="bottom"||c==="alphabetic"||c==="ideographic"?P=-A:(c==="top"||c==="hanging")&&(P=0),{font:p,width:w,height:A,lines:m,lineWidths:b,lineHeight:E,maxLineWidth:_,fontProperties:v,lineMetrics:b.map(function(D,N){var k=0;return l==="center"||l==="middle"?k-=D/2:(l==="right"||l==="end")&&(k-=D),new $o(k-s/2,P+N*E,D+s,E)})}}},t.prototype.setGraphemeOnPath=function(){},t.prototype.wordWrap=function(e,n,r){var i=this,a=n.wordWrapWidth,o=a===void 0?0:a,s=n.letterSpacing,c=n.maxLines,l=c===void 0?1/0:c,u=n.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(r),d=o+s,h="";u==="ellipsis"?h="...":u&&u!=="clip"&&(h=u);for(var p=[],v=0,g=0,y={},m=function(R){return i.getFromCache(R,s,y,f)},b=Array.from(h).reduce(function(R,I){return R+m(I)},0),_=Array.from(e),O=0;O<_.length;O++){var w=_[O],M=e[O-1],E=e[O+1],A=m(w);if(this.isNewline(w)){if(v++,v>=l){n.isOverflowing=!0;break}g=0,p[v]="";continue}if(g>0&&g+A>d){if(v+1>=l){if(n.isOverflowing=!0,b>0&&b<=d){for(var P=p[v].length,C=0,D=P,N=0;N<P;N++){var k=m(p[v][N]);if(C+k+b>d){D=N;break}C+=k}p[v]=(p[v]||"").slice(0,D)+h}break}if(v++,g=0,p[v]="",this.isBreakingSpace(w))continue;this.canBreakInLastChar(w)||(p=this.trimToBreakable(p),g=this.sumTextWidthByCache(p[v]||"",y)),this.shouldBreakByKinsokuShorui(w,E)&&(p=this.trimByKinsokuShorui(p),g+=m(M||""))}g+=A,p[v]=(p[v]||"")+w}return p.join(`
|
|
`)},t.prototype.isBreakingSpace=function(e){return typeof e!="string"?!1:Zo.BreakingSpaces.indexOf(e.charCodeAt(0))>=0},t.prototype.isNewline=function(e){return typeof e!="string"?!1:Zo.Newlines.indexOf(e.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(e){var n=(0,S.ev)([],(0,S.CR)(e),!1),r=n[n.length-2],i=this.findBreakableIndex(r);if(i===-1||!r)return n;var a=r.slice(i,i+1),o=this.isBreakingSpace(a),s=i+1,c=i+(o?0:1);return n[n.length-1]+=r.slice(s,r.length),n[n.length-2]=r.slice(0,c),n},t.prototype.canBreakInLastChar=function(e){return!(e&&Gx.test(e))},t.prototype.sumTextWidthByCache=function(e,n){return e.split("").reduce(function(r,i){if(!n[i])throw Error("cannot count the word without cache");return r+n[i]},0)},t.prototype.findBreakableIndex=function(e){for(var n=e.length-1;n>=0;n--)if(!Gx.test(e[n]))return n;return-1},t.prototype.getFromCache=function(e,n,r,i){var a=r[e];if(typeof a!="number"){var o=e.length*n;a=i.measureText(e).width+o,r[e]=a}return a},t}(),Mt={},DD=function(){var t,e=new vD,n=new pD;return t={},t[bt.CIRCLE]=new uD,t[bt.ELLIPSE]=new fD,t[bt.RECT]=e,t[bt.IMAGE]=e,t[bt.GROUP]=e,t[bt.LINE]=new dD,t[bt.TEXT]=new gD(Mt),t[bt.POLYLINE]=n,t[bt.POLYGON]=n,t[bt.PATH]=new hD,t[bt.HTML]=null,t[bt.MESH]=null,t}(),FD=function(){var t,e=new S6,n=new P0;return t={},t[oe.PERCENTAGE]=null,t[oe.NUMBER]=new C6,t[oe.ANGLE]=new O6,t[oe.DEFINED_PATH]=new w6,t[oe.PAINT]=e,t[oe.COLOR]=e,t[oe.FILTER]=new M6,t[oe.LENGTH]=n,t[oe.LENGTH_PERCENTAGE]=n,t[oe.LENGTH_PERCENTAGE_12]=new E6,t[oe.LENGTH_PERCENTAGE_14]=new A6,t[oe.COORDINATE]=new T6,t[oe.OFFSET_DISTANCE]=new k6,t[oe.OPACITY_VALUE]=new R6,t[oe.PATH]=new L6,t[oe.LIST_OF_POINTS]=new N6,t[oe.SHADOW_BLUR]=new I6,t[oe.TEXT]=new j6,t[oe.TEXT_TRANSFORM]=new D6,t[oe.TRANSFORM]=new sD,t[oe.TRANSFORM_ORIGIN]=new cD,t[oe.Z_INDEX]=new lD,t[oe.MARKER]=new P6,t}(),BD=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof mt.g!="undefined"?mt.g:{}};Mt.CameraContribution=rx,Mt.AnimationTimeline=null,Mt.EasingFunction=null,Mt.offscreenCanvasCreator=new xD,Mt.sceneGraphSelector=new wD,Mt.sceneGraphService=new MD(Mt),Mt.textService=new jD(Mt),Mt.geometryUpdaterFactory=DD,Mt.CSSPropertySyntaxFactory=FD,Mt.styleValueRegistry=new _6(Mt),Mt.layoutRegistry=null,Mt.globalThis=BD(),Mt.enableCSSParsing=!0,Mt.enableDataset=!1,Mt.enableStyleSyntax=!0;var Wx=0;function Zft(){Wx=0}var Hx=new ao(Re.INSERTED,null,"","","",0,"",""),Yx=new ao(Re.REMOVED,null,"","","",0,"",""),zD=new Rn(Re.DESTROY),GD=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.entity=Wx++,n.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},n.cullable={strategy:g0.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},n.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},n.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},n.geometry={contentBounds:void 0,renderBounds:void 0},n.rBushNode={aabb:void 0},n.namespaceURI="g",n.scrollLeft=0,n.scrollTop=0,n.clientTop=0,n.clientLeft=0,n.destroyed=!1,n.style={},n.computedStyle=Mt.enableCSSParsing?{anchor:In,opacity:In,fillOpacity:In,strokeOpacity:In,fill:In,stroke:In,transform:In,transformOrigin:In,visibility:In,pointerEvents:In,lineWidth:In,lineCap:In,lineJoin:In,increasedLineWidthForHitTesting:In,fontSize:In,fontFamily:In,fontStyle:In,fontWeight:In,fontVariant:In,textAlign:In,textBaseline:In,textTransform:In,zIndex:In,filter:In,shadowType:In}:null,n.parsedStyle={},n.attributes={},n}return Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(n){this.setAttribute("class",n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(n){return n!==""})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(n){throw new Error(Pn)},e.prototype.appendChild=function(n,r){var i;if(n.destroyed)throw new Error(m8);return Mt.sceneGraphService.attach(n,this,r),!((i=this.ownerDocument)===null||i===void 0)&&i.defaultView&&this.ownerDocument.defaultView.mountChildren(n),Hx.relatedNode=this,n.dispatchEvent(Hx),n},e.prototype.insertBefore=function(n,r){if(!r)this.appendChild(n);else{n.parentElement&&n.parentElement.removeChild(n);var i=this.childNodes.indexOf(r);i===-1?this.appendChild(n):this.appendChild(n,i)}return n},e.prototype.replaceChild=function(n,r){var i=this.childNodes.indexOf(r);return this.removeChild(r),this.appendChild(n,i),r},e.prototype.removeChild=function(n){var r;return Yx.relatedNode=this,n.dispatchEvent(Yx),!((r=n.ownerDocument)===null||r===void 0)&&r.defaultView&&n.ownerDocument.defaultView.unmountChildren(n),Mt.sceneGraphService.detach(n),n},e.prototype.removeChildren=function(){for(var n=this.childNodes.length-1;n>=0;n--){var r=this.childNodes[n];this.removeChild(r)}},e.prototype.destroyChildren=function(){for(var n=this.childNodes.length-1;n>=0;n--){var r=this.childNodes[n];r.childNodes.length&&r.destroyChildren(),r.destroy()}},e.prototype.matches=function(n){return Mt.sceneGraphService.matches(n,this)},e.prototype.getElementById=function(n){return Mt.sceneGraphService.querySelector("#".concat(n),this)},e.prototype.getElementsByName=function(n){return Mt.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)},e.prototype.getElementsByClassName=function(n){return Mt.sceneGraphService.querySelectorAll(".".concat(n),this)},e.prototype.getElementsByTagName=function(n){return Mt.sceneGraphService.querySelectorAll(n,this)},e.prototype.querySelector=function(n){return Mt.sceneGraphService.querySelector(n,this)},e.prototype.querySelectorAll=function(n){return Mt.sceneGraphService.querySelectorAll(n,this)},e.prototype.closest=function(n){var r=this;do{if(Mt.sceneGraphService.matches(n,r))return r;r=r.parentElement}while(r!==null);return null},e.prototype.find=function(n){var r=this,i=null;return this.forEach(function(a){return a!==r&&n(a)?(i=a,!0):!1}),i},e.prototype.findAll=function(n){var r=this,i=[];return this.forEach(function(a){a!==r&&n(a)&&i.push(a)}),i},e.prototype.after=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(this.parentNode){var a=this.parentNode.childNodes.indexOf(this);r.forEach(function(o,s){var c;return(c=n.parentNode)===null||c===void 0?void 0:c.appendChild(o,a+s+1)})}},e.prototype.before=function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(this.parentNode){var a=this.parentNode.childNodes.indexOf(this),o=(0,S.CR)(r),s=o[0],c=o.slice(1);this.parentNode.appendChild(s,a),(n=s).after.apply(n,(0,S.ev)([],(0,S.CR)(c),!1))}},e.prototype.replaceWith=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.after.apply(this,(0,S.ev)([],(0,S.CR)(n),!1)),this.remove()},e.prototype.append=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];r.forEach(function(a){return n.appendChild(a)})},e.prototype.prepend=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];r.forEach(function(a,o){return n.appendChild(a,o)})},e.prototype.replaceChildren=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,(0,S.ev)([],(0,S.CR)(n),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(zD),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return Mt.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return Mt.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return Mt.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return Mt.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return Mt.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(n){if(A8(n))return Mt.enableCSSParsing?null:void 0;var r=this.attributes[n];if(r===void 0){var i=u0(n);return r=this.attributes[i],Mt.enableCSSParsing&&(0,ye.Z)(r)?null:r}else return r},e.prototype.hasAttribute=function(n){return this.getAttributeNames().includes(n)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(n){this.setAttribute(n,null),delete this.attributes[n]},e.prototype.setAttribute=function(n,r,i){this.attributes[n]=r},e.prototype.getAttributeNS=function(n,r){throw new Error(Pn)},e.prototype.getAttributeNode=function(n){throw new Error(Pn)},e.prototype.getAttributeNodeNS=function(n,r){throw new Error(Pn)},e.prototype.hasAttributeNS=function(n,r){throw new Error(Pn)},e.prototype.removeAttributeNS=function(n,r){throw new Error(Pn)},e.prototype.removeAttributeNode=function(n){throw new Error(Pn)},e.prototype.setAttributeNS=function(n,r,i){throw new Error(Pn)},e.prototype.setAttributeNode=function(n){throw new Error(Pn)},e.prototype.setAttributeNodeNS=function(n){throw new Error(Pn)},e.prototype.toggleAttribute=function(n,r){throw new Error(Pn)},e}(kr);function hn(t){return!!(t!=null&&t.nodeName)}var Ca=new ao(Re.ATTR_MODIFIED,null,null,null,null,ao.MODIFICATION,null,null),WD={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},Vx={anchor:[0,0],fill:v0,stroke:v0,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},HD=(0,S.pi)((0,S.pi)({},Vx),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),YD=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],VD=(0,S.ev)((0,S.ev)([],(0,S.CR)(YD),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),$x="data-",Yr=function(t){(0,S.ZT)(e,t);function e(n){var r,i=t.call(this)||this;i.isCustomElement=!1,i.isMutationObserved=!1,i.activeAnimations=[],i.getClip=function(){return this.style.clipPath||null},i.config=n,i.config.interactive=(r=i.config.capture)!==null&&r!==void 0?r:i.config.interactive,i.id=i.config.id||"",i.name=i.config.name||"",(i.config.className||i.config.class)&&(i.className=i.config.className||i.config.class),i.nodeName=i.config.type||bt.GROUP,i.config.style=i.config.style||i.config.attrs||{},Object.assign(i.config.style,i.config.attrs),i.config.visible!=null&&(i.config.style.visibility=i.config.visible===!1?"hidden":"visible"),i.config.interactive!=null&&(i.config.style.pointerEvents=i.config.interactive===!1?"none":"auto"),Object.assign(i.parsedStyle,Mt.enableCSSParsing?Vx:HD,i.config.initialParsedStyle),Mt.enableCSSParsing&&Object.assign(i.attributes,WD),i.initAttributes(i.config.style);var a=Mt.globalThis.Proxy?Mt.globalThis.Proxy:function(){};return Mt.enableDataset&&(i.dataset=new a({},{get:function(o,s){var c="".concat($x).concat(ox(s));return o[c]!==void 0?o[c]:i.getAttribute(c)},set:function(o,s,c){return i.setAttribute("".concat($x).concat(ox(s)),c),!0}})),Mt.enableStyleSyntax&&(i.style=new a({setProperty:function(o,s){i.setAttribute(o,s)},getPropertyValue:function(o){return i.getAttribute(o)},removeProperty:function(o){i.removeAttribute(o)},item:function(){return""}},{get:function(o,s){return o[s]!==void 0?o[s]:i.getAttribute(s)},set:function(o,s,c){return i.setAttribute(s,c),!0}})),i}return e.prototype.destroy=function(){t.prototype.destroy.call(this),this.getAnimations().forEach(function(n){n.cancel()})},e.prototype.cloneNode=function(n,r){var i=(0,S.pi)({},this.attributes);for(var a in i){var o=i[a];hn(o)&&a!=="clipPath"&&a!=="offsetPath"&&a!=="textPath"&&(i[a]=o.cloneNode(n)),r&&(i[a]=r(a,o))}var s=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:i});return s.setLocalTransform(this.getLocalTransform()),n&&this.children.forEach(function(c){if(!c.style.isMarker){var l=c.cloneNode(n);s.appendChild(l)}}),s},e.prototype.initAttributes=function(n){n===void 0&&(n={});var r=this.renderable,i={forceUpdateGeometry:!0};Mt.enableCSSParsing&&(i.usedAttributes=VD);var a={};for(var o in n){var s=u0(o);a[s]=n[o]}Mt.styleValueRegistry.processProperties(this,a,i),r.dirty=!0},e.prototype.setAttribute=function(n,r,i){i===void 0&&(i=!1);var a=u0(n);nr(r)||(i||r!==this.attributes[a])&&(this.internalSetAttribute(a,r),t.prototype.setAttribute.call(this,a,r))},e.prototype.internalSetAttribute=function(n,r,i){var a;i===void 0&&(i={});var o=this.renderable,s=this.attributes[n],c=this.parsedStyle[n];Mt.styleValueRegistry.processProperties(this,(a={},a[n]=r,a),i),o.dirty=!0;var l=this.parsedStyle[n];this.isConnected&&(Ca.relatedNode=this,Ca.prevValue=s,Ca.newValue=r,Ca.attrName=n,Ca.prevParsedValue=c,Ca.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(Ca):(Ca.target=this,this.ownerDocument.defaultView.dispatchEvent(Ca,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(n,s,r,c,l)},e.prototype.getBBox=function(){var n=this.getBounds(),r=(0,S.CR)(n.getMin(),2),i=r[0],a=r[1],o=(0,S.CR)(n.getMax(),2),s=o[0],c=o[1];return new $o(i,a,s-i,c-a)},e.prototype.setOrigin=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Mt.sceneGraphService.setOrigin(this,ti(n,r,i)),this},e.prototype.getOrigin=function(){return Mt.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Mt.sceneGraphService.setPosition(this,ti(n,r,i)),this},e.prototype.setLocalPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Mt.sceneGraphService.setLocalPosition(this,ti(n,r,i)),this},e.prototype.translate=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Mt.sceneGraphService.translate(this,ti(n,r,i)),this},e.prototype.translateLocal=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Mt.sceneGraphService.translateLocal(this,ti(n,r,i)),this},e.prototype.getPosition=function(){return Mt.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return Mt.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(n,r,i){return this.scaleLocal(n,r,i)},e.prototype.scaleLocal=function(n,r,i){return typeof n=="number"&&(r=r||n,i=i||n,n=ti(n,r,i)),Mt.sceneGraphService.scaleLocal(this,n),this},e.prototype.setLocalScale=function(n,r,i){return typeof n=="number"&&(r=r||n,i=i||n,n=ti(n,r,i)),Mt.sceneGraphService.setLocalScale(this,n),this},e.prototype.getLocalScale=function(){return Mt.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return Mt.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var n=(0,S.CR)(a0(ot.create(),Mt.sceneGraphService.getWorldTransform(this)),3),r=n[2];return ki(r)},e.prototype.getLocalEulerAngles=function(){var n=(0,S.CR)(a0(ot.create(),Mt.sceneGraphService.getLocalRotation(this)),3),r=n[2];return ki(r)},e.prototype.setEulerAngles=function(n){return Mt.sceneGraphService.setEulerAngles(this,0,0,n),this},e.prototype.setLocalEulerAngles=function(n){return Mt.sceneGraphService.setLocalEulerAngles(this,0,0,n),this},e.prototype.rotateLocal=function(n,r,i){return(0,ye.Z)(r)&&(0,ye.Z)(i)?Mt.sceneGraphService.rotateLocal(this,0,0,n):Mt.sceneGraphService.rotateLocal(this,n,r,i),this},e.prototype.rotate=function(n,r,i){return(0,ye.Z)(r)&&(0,ye.Z)(i)?Mt.sceneGraphService.rotate(this,0,0,n):Mt.sceneGraphService.rotate(this,n,r,i),this},e.prototype.setRotation=function(n,r,i,a){return Mt.sceneGraphService.setRotation(this,n,r,i,a),this},e.prototype.setLocalRotation=function(n,r,i,a){return Mt.sceneGraphService.setLocalRotation(this,n,r,i,a),this},e.prototype.setLocalSkew=function(n,r){return Mt.sceneGraphService.setLocalSkew(this,n,r),this},e.prototype.getRotation=function(){return Mt.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return Mt.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return Mt.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return Mt.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return Mt.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(n){return Mt.sceneGraphService.setLocalTransform(this,n),this},e.prototype.resetLocalTransform=function(){Mt.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(n,r){var i,a=(i=this.ownerDocument)===null||i===void 0?void 0:i.timeline;return a?a.play(this,n,r):null},e.prototype.isVisible=function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.visibility)==="visible"},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(n){this.style.pointerEvents=n?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.pointerEvents)!=="none"},e.prototype.isCulled=function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})),!1))-1),this},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=(0,S.CR)(r,2),o=a[0],s=a[1];return o?Yo(o)?(Object.keys(o).forEach(function(c){n.setAttribute(c,o[c])}),this):r.length===2?(this.setAttribute(o,s),this):this.attributes[o]:this.attributes},e.prototype.getMatrix=function(n){var r=n||this.getWorldTransform(),i=(0,S.CR)(qt.getTranslation(ot.create(),r),2),a=i[0],o=i[1],s=(0,S.CR)(qt.getScaling(ot.create(),r),2),c=s[0],l=s[1],u=qt.getRotation(br(),r),f=(0,S.CR)(a0(ot.create(),u),3),d=f[0],h=f[2];return f8(d||h,a,o,c,l)},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(n){var r=(0,S.CR)(Jb(n),5),i=r[0],a=r[1],o=r[2],s=r[3],c=r[4];this.setEulerAngles(c).setPosition(i,a).setLocalScale(o,s)},e.prototype.setLocalMatrix=function(n){var r=(0,S.CR)(Jb(n),5),i=r[0],a=r[1],o=r[2],s=r[3],c=r[4];this.setLocalEulerAngles(c).setLocalPosition(i,a).setLocalScale(o,s)},e.prototype.show=function(){Mt.enableCSSParsing?this.style.visibility="visible":this.forEach(function(n){n.style.visibility="visible"})},e.prototype.hide=function(){Mt.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(n){n.style.visibility="hidden"})},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(n){return this.children[n]||null},e.prototype.add=function(n,r){return this.appendChild(n,r)},e.prototype.setClip=function(n){this.style.clipPath=n},e.prototype.set=function(n,r){this.config[n]=r},e.prototype.get=function(n){return this.config[n]},e.prototype.moveTo=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),this.setPosition(n,r,i),this},e.prototype.move=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),this.setPosition(n,r,i),this},e.prototype.setZIndex=function(n){return this.style.zIndex=n,this},e}(GD),Xx={number:function(t){return new Cn(t)},percent:function(t){return new Cn(t,"%")},px:function(t){return new Cn(t,"px")},em:function(t){return new Cn(t,"em")},rem:function(t){return new Cn(t,"rem")},deg:function(t){return new Cn(t,"deg")},grad:function(t){return new Cn(t,"grad")},rad:function(t){return new Cn(t,"rad")},turn:function(t){return new Cn(t,"turn")},s:function(t){return new Cn(t,"s")},ms:function(t){return new Cn(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,a=t.syntax;Mt.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:a})},registerLayout:function(t,e){Mt.layoutRegistry.registerLayout(t,e)}},al=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:bt.CIRCLE,style:Mt.enableCSSParsing?(0,S.pi)({cx:"",cy:"",r:""},r):(0,S.pi)({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:Mt.enableCSSParsing?null:[vf,vf]}},i))||this}return e}(Yr),Of=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,(0,S.pi)({style:Mt.enableCSSParsing?(0,S.pi)({x:"",y:""},i):(0,S.pi)({},i)},a))||this,r.isCustomElement=!0,r}return e}(Yr),j0=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:bt.ELLIPSE,style:Mt.enableCSSParsing?(0,S.pi)({cx:"",cy:"",rx:"",ry:""},r):(0,S.pi)({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:Mt.enableCSSParsing?null:[vf,vf]}},i))||this}return e}(Yr),Dr=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:bt.GROUP,style:Mt.enableCSSParsing?(0,S.pi)({x:"",y:"",width:"",height:""},r):(0,S.pi)({},r)},i))||this}return e}(Yr),wf=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,(0,S.pi)({type:bt.HTML,style:Mt.enableCSSParsing?(0,S.pi)({x:"",y:"",width:"auto",height:"auto",innerHTML:""},i):(0,S.pi)({},i)},a))||this,r.cullable.enable=!1,r}return e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var n=this.parsedStyle,r=n.x,i=n.y,a=n.width,o=n.height;return new $o(r,i,a,o)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var n,r,i=this.getBoundingClientRect(),a=(r=(n=this.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||r===void 0?void 0:r.getContextService().getBoundingClientRect(),o=new Sr,s=i.left-((a==null?void 0:a.left)||0),c=i.top-((a==null?void 0:a.top)||0);return o.setMinMax([s,c,0],[s+i.width,c+i.height,0]),o},e.prototype.getLocalBounds=function(){if(this.parentNode){var n=qt.invert(qt.create(),this.parentNode.getWorldTransform()),r=this.getBounds();if(!Sr.isEmpty(r)){var i=new Sr;return i.setFromTransformedAABB(r,n),i}}return this.getBounds()},e}(Yr),D0=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:bt.IMAGE,style:Mt.enableCSSParsing?(0,S.pi)({x:"",y:"",img:"",width:"",height:""},r):(0,S.pi)({},r)},i))||this}return e}(Yr),ol=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);r=t.call(this,(0,S.pi)({type:bt.LINE,style:(0,S.pi)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a))||this,r.markerStartAngle=0,r.markerEndAngle=0;var o=r.parsedStyle,s=o.markerStart,c=o.markerEnd;return s&&hn(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),c&&hn(c)&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}return e.prototype.attributeChangedCallback=function(n,r,i,a,o){n==="x1"||n==="y1"||n==="x2"||n==="y2"||n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&hn(a)&&(this.markerStartAngle=0,a.remove()),o&&hn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(a&&hn(a)&&(this.markerEndAngle=0,a.remove()),o&&hn(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))},e.prototype.transformMarker=function(n){var r=this.parsedStyle,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,s=r.markerEndOffset,c=r.x1,l=r.x2,u=r.y1,f=r.y2,d=r.defX,h=r.defY,p=n?i:a;if(!(!p||!hn(p))){var v=0,g,y,m,b,_,O;n?(m=c-d,b=u-h,g=l-c,y=f-u,_=o||0,O=this.markerStartAngle):(m=l-d,b=f-h,g=c-l,y=u-f,_=s||0,O=this.markerEndAngle),v=Math.atan2(y,g),p.setLocalEulerAngles(v*180/Math.PI+O),p.setLocalPosition(m+Math.cos(v)*_,b+Math.sin(v)*_)}},e.prototype.getPoint=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle,a=i.x1,o=i.y1,s=i.x2,c=i.y2,l=i.defX,u=i.defY,f=ia(a,o,s,c,n),d=f.x,h=f.y,p=ot.transformMat4(ot.create(),ot.fromValues(d-l,h-u,0),r?this.getWorldTransform():this.getLocalTransform());return new Pr(p[0],p[1])},e.prototype.getPointAtLength=function(n,r){return r===void 0&&(r=!1),this.getPoint(n/this.getTotalLength(),r)},e.prototype.getTotalLength=function(){var n=this.parsedStyle,r=n.x1,i=n.y1,a=n.x2,o=n.y2;return zb(r,i,a,o)},e}(Yr),ni=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);r=t.call(this,(0,S.pi)({type:bt.PATH,style:Mt.enableCSSParsing?(0,S.pi)({path:"",miterLimit:""},i):(0,S.pi)({},i),initialParsedStyle:Mt.enableCSSParsing?null:{miterLimit:4,path:(0,S.pi)({},cx)}},a))||this,r.markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var o=r.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerMid;return s&&hn(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&hn(l)&&r.placeMarkerMid(l),c&&hn(c)&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}return e.prototype.attributeChangedCallback=function(n,r,i,a,o){n==="path"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&hn(a)&&(this.markerStartAngle=0,a.remove()),o&&hn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&hn(a)&&(this.markerEndAngle=0,a.remove()),o&&hn(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)},e.prototype.transformMarker=function(n){var r=this.parsedStyle,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,s=r.markerEndOffset,c=r.defX,l=r.defY,u=n?i:a;if(!(!u||!hn(u))){var f=0,d,h,p,v,g,y;if(n){var m=(0,S.CR)(this.getStartTangent(),2),b=m[0],_=m[1];p=_[0]-c,v=_[1]-l,d=b[0]-_[0],h=b[1]-_[1],g=o||0,y=this.markerStartAngle}else{var O=(0,S.CR)(this.getEndTangent(),2),b=O[0],_=O[1];p=_[0]-c,v=_[1]-l,d=b[0]-_[0],h=b[1]-_[1],g=s||0,y=this.markerEndAngle}f=Math.atan2(h,d),u.setLocalEulerAngles(f*180/Math.PI+y),u.setLocalPosition(p+Math.cos(f)*g,v+Math.sin(f)*g)}},e.prototype.placeMarkerMid=function(n){var r=this.parsedStyle,i=r.path.segments,a=r.defX,o=r.defY;if(this.markerMidList.forEach(function(d){d.remove()}),n&&hn(n))for(var s=1;s<i.length-1;s++){var c=(0,S.CR)(i[s].currentPoint,2),l=c[0],u=c[1],f=s===1?n:n.cloneNode(!0);this.markerMidList.push(f),this.appendChild(f),f.setLocalPosition(l-a,u-o)}},e.prototype.getTotalLength=function(){return x0(this)},e.prototype.getPointAtLength=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle,a=i.defX,o=i.defY,s=i.path.absolutePath,c=Nj(s,n),l=c.x,u=c.y,f=ot.transformMat4(ot.create(),ot.fromValues(l-a,u-o,0),r?this.getWorldTransform():this.getLocalTransform());return new Pr(f[0],f[1])},e.prototype.getPoint=function(n,r){return r===void 0&&(r=!1),this.getPointAtLength(n*x0(this),r)},e.prototype.getStartTangent=function(){var n=this.parsedStyle.path.segments,r=[];if(n.length>1){var i=n[0].currentPoint,a=n[1].currentPoint,o=n[1].startTangent;r=[],o?(r.push([i[0]-o[0],i[1]-o[1]]),r.push([i[0],i[1]])):(r.push([a[0],a[1]]),r.push([i[0],i[1]]))}return r},e.prototype.getEndTangent=function(){var n=this.parsedStyle.path.segments,r=n.length,i=[];if(r>1){var a=n[r-2].currentPoint,o=n[r-1].currentPoint,s=n[r-1].endTangent;i=[],s?(i.push([o[0]-s[0],o[1]-s[1]]),i.push([o[0],o[1]])):(i.push([a[0],a[1]]),i.push([o[0],o[1]]))}return i},e}(Yr),sl=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);r=t.call(this,(0,S.pi)({type:bt.POLYGON,style:Mt.enableCSSParsing?(0,S.pi)({points:"",miterLimit:"",isClosed:!0},i):(0,S.pi)({},i),initialParsedStyle:Mt.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a))||this,r.markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var o=r.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerMid;return s&&hn(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&hn(l)&&r.placeMarkerMid(l),c&&hn(c)&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}return e.prototype.attributeChangedCallback=function(n,r,i,a,o){n==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&hn(a)&&(this.markerStartAngle=0,a.remove()),o&&hn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&hn(a)&&(this.markerEndAngle=0,a.remove()),o&&hn(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)},e.prototype.transformMarker=function(n){var r=this.parsedStyle,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,s=r.markerEndOffset,c=r.points,l=r.defX,u=r.defY,f=(c||{}).points,d=n?i:a;if(!(!d||!hn(d)||!f)){var h=0,p,v,g,y,m,b;if(g=f[0][0]-l,y=f[0][1]-u,n)p=f[1][0]-f[0][0],v=f[1][1]-f[0][1],m=o||0,b=this.markerStartAngle;else{var _=f.length;this.parsedStyle.isClosed?(p=f[_-1][0]-f[0][0],v=f[_-1][1]-f[0][1]):(g=f[_-1][0]-l,y=f[_-1][1]-u,p=f[_-2][0]-f[_-1][0],v=f[_-2][1]-f[_-1][1]),m=s||0,b=this.markerEndAngle}h=Math.atan2(v,p),d.setLocalEulerAngles(h*180/Math.PI+b),d.setLocalPosition(g+Math.cos(h)*m,y+Math.sin(h)*m)}},e.prototype.placeMarkerMid=function(n){var r=this.parsedStyle,i=r.points,a=r.defX,o=r.defY,s=(i||{}).points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],n&&hn(n)&&s)for(var c=1;c<(this.parsedStyle.isClosed?s.length:s.length-1);c++){var l=s[c][0]-a,u=s[c][1]-o,f=c===1?n:n.cloneNode(!0);this.markerMidList.push(f),this.appendChild(f),f.setLocalPosition(l,u)}},e}(Yr),F0=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:bt.POLYLINE,style:Mt.enableCSSParsing?(0,S.pi)({points:"",miterLimit:"",isClosed:!1},r):(0,S.pi)({},r),initialParsedStyle:Mt.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i))||this}return e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPointAtLength=function(n,r){return r===void 0&&(r=!1),this.getPoint(n/this.getTotalLength(),r)},e.prototype.getPoint=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle,a=i.defX,o=i.defY,s=i.points,c=s.points,l=s.segments,u=0,f=0;l.forEach(function(g,y){n>=g[0]&&n<=g[1]&&(u=(n-g[0])/(g[1]-g[0]),f=y)});var d=ia(c[f][0],c[f][1],c[f+1][0],c[f+1][1],u),h=d.x,p=d.y,v=ot.transformMat4(ot.create(),ot.fromValues(h-a,p-o,0),r?this.getWorldTransform():this.getLocalTransform());return new Pr(v[0],v[1])},e.prototype.getStartTangent=function(){var n=this.parsedStyle.points.points,r=[];return r.push([n[1][0],n[1][1]]),r.push([n[0][0],n[0][1]]),r},e.prototype.getEndTangent=function(){var n=this.parsedStyle.points.points,r=n.length-1,i=[];return i.push([n[r-1][0],n[r-1][1]]),i.push([n[r][0],n[r][1]]),i},e}(sl),Ko=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:bt.RECT,style:Mt.enableCSSParsing?(0,S.pi)({x:"",y:"",width:"",height:"",radius:""},r):(0,S.pi)({},r)},i))||this}return e}(Yr),ca=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:bt.TEXT,style:Mt.enableCSSParsing?(0,S.pi)({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},r):(0,S.pi)({fill:"black"},r),initialParsedStyle:Mt.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},i))||this}return e.prototype.getComputedTextLength=function(){var n;return((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var n;return((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(Yr),$D=function(){function t(){this.registry={},this.define(bt.CIRCLE,al),this.define(bt.ELLIPSE,j0),this.define(bt.RECT,Ko),this.define(bt.IMAGE,D0),this.define(bt.LINE,ol),this.define(bt.GROUP,Dr),this.define(bt.PATH,ni),this.define(bt.POLYGON,sl),this.define(bt.POLYLINE,F0),this.define(bt.TEXT,ca),this.define(bt.HTML,wf)}return t.prototype.define=function(e,n){this.registry[e]=n},t.prototype.get=function(e){return this.registry[e]},t}(),XD=function(t){(0,S.ZT)(e,t);function e(){var n=t.call(this)||this;n.defaultView=null,n.ownerDocument=null,n.nodeName="document";try{n.timeline=new Mt.AnimationTimeline(n)}catch(i){}var r={};return T0.forEach(function(i){var a=i.n,o=i.inh,s=i.d;o&&s&&(r[a]=Ws(s)?s(bt.GROUP):s)}),n.documentElement=new Dr({id:"g-root",style:r}),n.documentElement.ownerDocument=n,n.documentElement.parentNode=n,n.childNodes=[n.documentElement],n}return Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(n,r){if(n==="svg")return this.documentElement;var i=this.defaultView.customElements.get(n);i||(console.warn("Unsupported tagName: ",n),i=n==="tspan"?ca:Dr);var a=new i(r);return a.ownerDocument=this,a},e.prototype.createElementNS=function(n,r,i){return this.createElement(r,i)},e.prototype.cloneNode=function(n){throw new Error(Pn)},e.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(n){}},e.prototype.elementsFromBBox=function(n,r,i,a){var o=this.defaultView.context.rBushRoot,s=o.search({minX:n,minY:r,maxX:i,maxY:a}),c=[];return s.forEach(function(l){var u=l.displayObject,f=u.parsedStyle.pointerEvents,d=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(f);(!d||d&&u.isVisible())&&!u.isCulled()&&u.isInteractive()&&c.push(u)}),c.sort(function(l,u){return u.sortable.renderOrder-l.sortable.renderOrder}),c},e.prototype.elementFromPointSync=function(n,r){var i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),c=s.width,l=s.height;if(a<0||o<0||a>c||o>l)return null;var u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,h=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]}).picked;return h&&h[0]||this.documentElement},e.prototype.elementFromPoint=function(n,r){return(0,S.mG)(this,void 0,void 0,function(){var i,a,o,s,c,l,u,f,d,h;return(0,S.Jh)(this,function(p){switch(p.label){case 0:return i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),c=s.width,l=s.height,a<0||o<0||a>c||o>l?[2,null]:(u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]})]);case 1:return h=p.sent().picked,[2,h&&h[0]||this.documentElement]}})})},e.prototype.elementsFromPointSync=function(n,r){var i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),c=s.width,l=s.height;if(a<0||o<0||a>c||o>l)return[];var u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,h=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]}).picked;return h[h.length-1]!==this.documentElement&&h.push(this.documentElement),h},e.prototype.elementsFromPoint=function(n,r){return(0,S.mG)(this,void 0,void 0,function(){var i,a,o,s,c,l,u,f,d,h;return(0,S.Jh)(this,function(p){switch(p.label){case 0:return i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),c=s.width,l=s.height,a<0||o<0||a>c||o>l?[2,[]]:(u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]})]);case 1:return h=p.sent().picked,h[h.length-1]!==this.documentElement&&h.push(this.documentElement),[2,h]}})})},e.prototype.appendChild=function(n,r){throw new Error(Gs)},e.prototype.insertBefore=function(n,r){throw new Error(Gs)},e.prototype.removeChild=function(n,r){throw new Error(Gs)},e.prototype.replaceChild=function(n,r,i){throw new Error(Gs)},e.prototype.append=function(){throw new Error(Gs)},e.prototype.prepend=function(){throw new Error(Gs)},e.prototype.getElementById=function(n){return this.documentElement.getElementById(n)},e.prototype.getElementsByName=function(n){return this.documentElement.getElementsByName(n)},e.prototype.getElementsByTagName=function(n){return this.documentElement.getElementsByTagName(n)},e.prototype.getElementsByClassName=function(n){return this.documentElement.getElementsByClassName(n)},e.prototype.querySelector=function(n){return this.documentElement.querySelector(n)},e.prototype.querySelectorAll=function(n){return this.documentElement.querySelectorAll(n)},e.prototype.find=function(n){return this.documentElement.find(n)},e.prototype.findAll=function(n){return this.documentElement.findAll(n)},e}(kr),UD=function(){function t(e){this.strategies=e}return t.prototype.apply=function(e){var n=e.camera,r=e.renderingService,i=e.renderingContext,a=this.strategies;r.hooks.cull.tap(t.tag,function(o){if(o){var s=o.cullable;return a.length===0?s.visible=i.unculledEntities.indexOf(o.entity)>-1:s.visible=a.every(function(c){return c.isVisible(n,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new Rn(Re.CULLED)),null)}return o}),r.hooks.afterRender.tap(t.tag,function(o){o.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),qD=function(){function t(){var e=this;this.autoPreventDefault=!1,this.rootPointerEvent=new N0(null),this.rootWheelEvent=new I0(null),this.onPointerMove=function(n){var r,i,a,o,s=(o=(a=e.context.renderingContext.root)===null||a===void 0?void 0:a.ownerDocument)===null||o===void 0?void 0:o.defaultView;if(!(s.supportsTouchEvents&&n.pointerType==="touch")){var c=e.normalizeToPointerEvent(n,s);try{for(var l=(0,S.XA)(c),u=l.next();!u.done;u=l.next()){var f=u.value,d=e.bootstrapEvent(e.rootPointerEvent,f,s,n);e.context.eventService.mapEvent(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}e.setCursor(e.context.eventService.cursor)}},this.onClick=function(n){var r,i,a,o,s=(o=(a=e.context.renderingContext.root)===null||a===void 0?void 0:a.ownerDocument)===null||o===void 0?void 0:o.defaultView,c=e.normalizeToPointerEvent(n,s);try{for(var l=(0,S.XA)(c),u=l.next();!u.done;u=l.next()){var f=u.value,d=e.bootstrapEvent(e.rootPointerEvent,f,s,n);e.context.eventService.mapEvent(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}e.setCursor(e.context.eventService.cursor)}}return t.prototype.apply=function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(a){var o=n.context.renderingService.hooks.pickSync.call({position:a,picked:[],topmost:!0}).picked;return o[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(a){var o=n.normalizeWheelEvent(a);n.context.eventService.mapEvent(o)}),r.hooks.pointerDown.tap(t.tag,function(a){var o,s;if(!(i.supportsTouchEvents&&a.pointerType==="touch")){var c=n.normalizeToPointerEvent(a,i);if(n.autoPreventDefault&&c[0].isNormalized){var l=a.cancelable||!("cancelable"in a);l&&a.preventDefault()}try{for(var u=(0,S.XA)(c),f=u.next();!f.done;f=u.next()){var d=f.value,h=n.bootstrapEvent(n.rootPointerEvent,d,i,a);n.context.eventService.mapEvent(h)}}catch(p){o={error:p}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(a){var o,s;if(!(i.supportsTouchEvents&&a.pointerType==="touch")){var c=n.context.contextService.getDomElement(),l="outside";try{l=c&&a.target&&a.target!==c&&c.contains&&!c.contains(a.target)?"outside":""}catch(v){}var u=n.normalizeToPointerEvent(a,i);try{for(var f=(0,S.XA)(u),d=f.next();!d.done;d=f.next()){var h=d.value,p=n.bootstrapEvent(n.rootPointerEvent,h,i,a);p.type+=l,n.context.eventService.mapEvent(p)}}catch(v){o={error:v}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(a){var o,s,c=n.normalizeToPointerEvent(a,i);try{for(var l=(0,S.XA)(c),u=l.next();!u.done;u=l.next()){var f=u.value,d=n.bootstrapEvent(n.rootPointerEvent,f,i,a);n.context.eventService.mapEvent(d)}}catch(h){o={error:h}}finally{try{u&&!u.done&&(s=l.return)&&s.call(l)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)})},t.prototype.getViewportXY=function(e){var n,r,i=e.offsetX,a=e.offsetY,o=e.clientX,s=e.clientY;if(this.context.config.supportsCSSTransform&&!(0,ye.Z)(i)&&!(0,ye.Z)(a))n=i,r=a;else{var c=this.context.eventService.client2Viewport(new Pr(o,s));n=c.x,r=c.y}return{x:n,y:r}},t.prototype.bootstrapEvent=function(e,n,r,i){e.view=r,e.originalEvent=null,e.nativeEvent=i,e.pointerId=n.pointerId,e.width=n.width,e.height=n.height,e.isPrimary=n.isPrimary,e.pointerType=n.pointerType,e.pressure=n.pressure,e.tangentialPressure=n.tangentialPressure,e.tiltX=n.tiltX,e.tiltY=n.tiltY,e.twist=n.twist,this.transferMouseData(e,n);var a=this.getViewportXY(n),o=a.x,s=a.y;e.viewport.x=o,e.viewport.y=s;var c=this.context.eventService.viewport2Canvas(e.viewport),l=c.x,u=c.y;return e.canvas.x=l,e.canvas.y=u,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=i.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=$6[e.type]||e.type),e},t.prototype.normalizeWheelEvent=function(e){var n=this.rootWheelEvent;this.transferMouseData(n,e),n.deltaMode=e.deltaMode,n.deltaX=e.deltaX,n.deltaY=e.deltaY,n.deltaZ=e.deltaZ;var r=this.getViewportXY(e),i=r.x,a=r.y;n.viewport.x=i,n.viewport.y=a;var o=this.context.eventService.viewport2Canvas(n.viewport),s=o.x,c=o.y;return n.canvas.x=s,n.canvas.y=c,n.global.copyFrom(n.canvas),n.offset.copyFrom(n.canvas),n.nativeEvent=e,n.type=e.type,n},t.prototype.transferMouseData=function(e,n){e.isTrusted=n.isTrusted,e.srcElement=n.srcElement,e.timeStamp=R0.now(),e.type=n.type,e.altKey=n.altKey,e.metaKey=n.metaKey,e.shiftKey=n.shiftKey,e.ctrlKey=n.ctrlKey,e.button=n.button,e.buttons=n.buttons,e.client.x=n.clientX,e.client.y=n.clientY,e.movement.x=n.movementX,e.movement.y=n.movementY,e.page.x=n.pageX,e.page.y=n.pageY,e.screen.x=n.screenX,e.screen.y=n.screenY,e.relatedTarget=null},t.prototype.setCursor=function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")},t.prototype.normalizeToPointerEvent=function(e,n){var r=[];if(n.isTouchEvent(e))for(var i=0;i<e.changedTouches.length;i++){var a=e.changedTouches[i];nr(a.button)&&(a.button=0),nr(a.buttons)&&(a.buttons=1),nr(a.isPrimary)&&(a.isPrimary=e.touches.length===1&&e.type==="touchstart"),nr(a.width)&&(a.width=a.radiusX||1),nr(a.height)&&(a.height=a.radiusY||1),nr(a.tiltX)&&(a.tiltX=0),nr(a.tiltY)&&(a.tiltY=0),nr(a.pointerType)&&(a.pointerType="touch"),nr(a.pointerId)&&(a.pointerId=a.identifier||0),nr(a.pressure)&&(a.pressure=a.force||.5),nr(a.twist)&&(a.twist=0),nr(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=e.type,r.push(a)}else if(n.isMouseEvent(e)){var o=e;nr(o.isPrimary)&&(o.isPrimary=!0),nr(o.width)&&(o.width=1),nr(o.height)&&(o.height=1),nr(o.tiltX)&&(o.tiltX=0),nr(o.tiltY)&&(o.tiltY=0),nr(o.pointerType)&&(o.pointerType="mouse"),nr(o.pointerId)&&(o.pointerId=V6),nr(o.pressure)&&(o.pressure=.5),nr(o.twist)&&(o.twist=0),nr(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,r.push(o)}else r.push(e);return r},t.tag="Event",t}(),ZD=[bt.CIRCLE,bt.ELLIPSE,bt.IMAGE,bt.RECT,bt.LINE,bt.POLYLINE,bt.POLYGON,bt.TEXT,bt.PATH,bt.HTML],KD=function(){function t(){}return t.prototype.isVisible=function(e,n){var r,i,a=n.cullable;if(!a.enable)return!0;var o=n.getRenderBounds();if(Sr.isEmpty(o))return!1;var s=e.getFrustum(),c=(i=(r=n.parentNode)===null||r===void 0?void 0:r.cullable)===null||i===void 0?void 0:i.visibilityPlaneMask;return a.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(n,o,c||eo.INDETERMINATE,s.planes),a.visible=a.visibilityPlaneMask!==eo.OUTSIDE,a.visible},t.prototype.computeVisibilityWithPlaneMask=function(e,n,r,i){if(r===eo.OUTSIDE||r===eo.INSIDE)return r;for(var a=eo.INSIDE,o=ZD.indexOf(e.nodeName)>-1,s=0,c=i.length;s<c;++s){var l=1<<s;if(r&l&&!(o&&(s===4||s===5))){var u=i[s],f=u.normal,d=u.distance;if(ot.dot(f,n.getPositiveFarPoint(i[s]))+d<0)return eo.OUTSIDE;ot.dot(f,n.getNegativeFarPoint(i[s]))+d<0&&(a|=l)}}return a},t}(),QD=function(){function t(){this.toSync=new Set}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,a=e.rBushRoot,o=i.root.ownerDocument.defaultView;this.rBush=a;var s=function(f){var d=f.target;d.renderable.dirty=!0,r.dirtify()},c=function(f){var d=f.detail.affectChildren,h=f.target;d&&h.forEach(function(v){n.toSync.add(v)});for(var p=h;p;)p.renderable&&n.toSync.add(p),p=p.parentElement;r.dirtify()},l=function(f){var d=f.target;Mt.enableCSSParsing&&Mt.styleValueRegistry.recalc(d),Mt.sceneGraphService.dirtifyToRoot(d),r.dirtify()},u=function(f){var d=f.target,h=d.rBushNode;h.aabb&&n.rBush.remove(h.aabb),n.toSync.delete(d),Mt.sceneGraphService.dirtifyToRoot(d),r.dirtify()};r.hooks.init.tap(t.tag,function(){o.addEventListener(Re.MOUNTED,l),o.addEventListener(Re.UNMOUNTED,u),o.addEventListener(Re.ATTR_MODIFIED,s),o.addEventListener(Re.BOUNDS_CHANGED,c)}),r.hooks.destroy.tap(t.tag,function(){o.removeEventListener(Re.MOUNTED,l),o.removeEventListener(Re.UNMOUNTED,u),o.removeEventListener(Re.ATTR_MODIFIED,s),o.removeEventListener(Re.BOUNDS_CHANGED,c),n.toSync.clear()}),r.hooks.endFrame.tap(t.tag,function(){n.syncRTree()})},t.prototype.syncRTree=function(){var e=this,n=[];Array.from(this.toSync).filter(function(r){return r.isConnected}).forEach(function(r){var i=r.rBushNode;i&&i.aabb&&e.rBush.remove(i.aabb);var a=r.getRenderBounds();if(a){var o=(0,S.CR)(a.getMin(),2),s=o[0],c=o[1],l=(0,S.CR)(a.getMax(),2),u=l[0],f=l[1];i.aabb||(i.aabb={}),i.aabb.displayObject=r,i.aabb.minX=s,i.aabb.minY=c,i.aabb.maxX=u,i.aabb.maxY=f}i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY)&&n.push(i.aabb)}),this.rBush.load(n),n.length=0,this.toSync.clear()},t.tag="Prepare",t}();function Kft(t){return!!t.document}var hi;(function(t){t.READY="ready",t.BEFORE_RENDER="beforerender",t.RERENDER="rerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize",t.DIRTY_RECTANGLE="dirtyrectangle",t.RENDERER_CHANGED="rendererchanged"})(hi||(hi={}));var Ux=500,JD=.1,t9=1e3,B0=new Rn(Re.MOUNTED),z0=new Rn(Re.UNMOUNTED),e9=new Rn(hi.BEFORE_RENDER),n9=new Rn(hi.RERENDER),r9=new Rn(hi.AFTER_RENDER),qx=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this)||this;r.Element=Yr,r.inited=!1,r.context={},r.document=new XD,r.document.defaultView=r,r.customElements=new $D;var i=n.container,a=n.canvas,o=n.offscreenCanvas,s=n.width,c=n.height,l=n.devicePixelRatio,u=n.renderer,f=n.background,d=n.cursor,h=n.document,p=n.requestAnimationFrame,v=n.cancelAnimationFrame,g=n.createImage,y=n.supportsPointerEvents,m=n.supportsTouchEvents,b=n.supportsCSSTransform,_=n.supportsMutipleCanvasesInOneContainer,O=n.useNativeClickEvent,w=n.alwaysTriggerPointerEventOnCanvas,M=n.isTouchEvent,E=n.isMouseEvent;_||B6(i,r);var A=s,P=c,C=l;return a&&(C=l||rl&&window.devicePixelRatio||1,C=C>=1?Math.ceil(C):1,A=s||H6(a)||a.width/C,P=c||Y6(a)||a.height/C),o&&(Mt.offscreenCanvas=o),r.devicePixelRatio=C,r.requestAnimationFrame=p!=null?p:Ix.bind(Mt.globalThis),r.cancelAnimationFrame=v!=null?v:jx.bind(Mt.globalThis),r.supportsTouchEvents=m!=null?m:"ontouchstart"in Mt.globalThis,r.supportsPointerEvents=y!=null?y:!!Mt.globalThis.PointerEvent,r.isTouchEvent=M!=null?M:function(D){return r.supportsTouchEvents&&D instanceof Mt.globalThis.TouchEvent},r.isMouseEvent=E!=null?E:function(D){return!Mt.globalThis.MouseEvent||D instanceof Mt.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(D instanceof Mt.globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:a,width:A,height:P,renderer:u,offscreenCanvas:o,devicePixelRatio:C,cursor:d||"default",background:f||"transparent",createImage:g,document:h,supportsCSSTransform:b,useNativeClickEvent:O,alwaysTriggerPointerEventOnCanvas:w}),r.initDefaultCamera(A,P,u.clipSpaceNearZ),r.initRenderer(u,!0),r}return e.prototype.initRenderingContext=function(n){this.context.config=n,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(n,r,i){var a=this,o=new Mt.CameraContribution;o.clipSpaceNearZ=i,o.setType(wn.EXPLORING,Jc.DEFAULT).setPosition(n/2,r/2,Ux).setFocalPoint(n/2,r/2,0).setOrthographic(n/-2,n/2,r/2,r/-2,JD,t9),o.canvas=this,o.eventEmitter.on(ex.UPDATED,function(){a.context.renderingContext.renderReasons.add(io.CAMERA_CHANGED)}),this.context.camera=o},e.prototype.getConfig=function(){return this.context.config},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.context.camera},e.prototype.getContextService=function(){return this.context.contextService},e.prototype.getEventService=function(){return this.context.eventService},e.prototype.getRenderingService=function(){return this.context.renderingService},e.prototype.getRenderingContext=function(){return this.context.renderingContext},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var n=this;return this.readyPromise||(this.readyPromise=new Promise(function(r){n.resolveReadyPromise=function(){r(n)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(n,r){if(n===void 0&&(n=!0),r===void 0&&(r=!1),r||this.dispatchEvent(new Rn(hi.BEFORE_DESTROY)),this.frameId){var i=this.getConfig().cancelAnimationFrame||cancelAnimationFrame;i(this.frameId)}var a=this.getRoot();this.unmountChildren(a),n&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),n&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),r||this.dispatchEvent(new Rn(hi.AFTER_DESTROY))},e.prototype.changeSize=function(n,r){this.resize(n,r)},e.prototype.resize=function(n,r){var i=this.context.config;i.width=n,i.height=r,this.getContextService().resize(n,r);var a=this.context.camera,o=a.getProjectionMode();a.setPosition(n/2,r/2,Ux).setFocalPoint(n/2,r/2,0),o===ui.ORTHOGRAPHIC?a.setOrthographic(n/-2,n/2,r/2,r/-2,a.getNear(),a.getFar()):a.setAspect(n/r),this.dispatchEvent(new Rn(hi.RESIZE,{width:n,height:r}))},e.prototype.appendChild=function(n,r){return this.document.documentElement.appendChild(n,r)},e.prototype.insertBefore=function(n,r){return this.document.documentElement.insertBefore(n,r)},e.prototype.removeChild=function(n){return this.document.documentElement.removeChild(n)},e.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},e.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.prototype.render=function(){var n=this;this.dispatchEvent(e9);var r=this.getRenderingService();r.render(this.getConfig(),function(){n.dispatchEvent(n9)}),this.dispatchEvent(r9)},e.prototype.run=function(){var n=this,r=function(){n.render(),n.frameId=n.requestAnimationFrame(r)};r()},e.prototype.initRenderer=function(n,r){var i=this;if(r===void 0&&(r=!1),!n)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new i8,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new qD,new QD,new UD([new KD])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService((0,S.pi)((0,S.pi)({},Mt),this.context)),this.context.renderingService=new _D(Mt,this.context),this.context.eventService=new bD(Mt,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(n,r,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(n,r)})},e.prototype.initRenderingService=function(n,r,i){var a=this;r===void 0&&(r=!1),i===void 0&&(i=!1),this.context.renderingService.init(function(){a.inited=!0,r?(i?a.requestAnimationFrame(function(){a.dispatchEvent(new Rn(hi.READY))}):a.dispatchEvent(new Rn(hi.READY)),a.readyPromise&&a.resolveReadyPromise()):a.dispatchEvent(new Rn(hi.RENDERER_CHANGED)),r||a.getRoot().forEach(function(o){var s=o.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}),a.mountChildren(a.getRoot()),n.getConfig().enableAutoRendering&&a.run()})},e.prototype.loadRendererContainerModule=function(n){var r=this,i=n.getPlugins();i.forEach(function(a){a.context=r.context,a.init(Mt)})},e.prototype.setRenderer=function(n){var r=this.getConfig();if(r.renderer!==n){var i=r.renderer;r.renderer=n,this.destroy(!1,!0),(0,S.ev)([],(0,S.CR)(i==null?void 0:i.getPlugins()),!1).reverse().forEach(function(a){a.destroy(Mt)}),this.initRenderer(n)}},e.prototype.setCursor=function(n){var r=this.getConfig();r.cursor=n,this.getContextService().applyCursorStyle(n)},e.prototype.unmountChildren=function(n){var r=this;n.childNodes.forEach(function(i){r.unmountChildren(i)}),this.inited&&(n.isMutationObserved?n.dispatchEvent(z0):(z0.target=n,this.dispatchEvent(z0,!0)),n!==this.document.documentElement&&(n.ownerDocument=null),n.isConnected=!1),n.isCustomElement&&n.disconnectedCallback&&n.disconnectedCallback()},e.prototype.mountChildren=function(n){var r=this;this.inited?n.isConnected||(n.ownerDocument=this.document,n.isConnected=!0,n.isMutationObserved?n.dispatchEvent(B0):(B0.target=n,this.dispatchEvent(B0,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",n.nodeName),n.childNodes.forEach(function(i){r.mountChildren(i)}),n.isCustomElement&&n.connectedCallback&&n.connectedCallback()},e.prototype.client2Viewport=function(n){return this.getEventService().client2Viewport(n)},e.prototype.viewport2Client=function(n){return this.getEventService().viewport2Client(n)},e.prototype.viewport2Canvas=function(n){return this.getEventService().viewport2Canvas(n)},e.prototype.canvas2Viewport=function(n){return this.getEventService().canvas2Viewport(n)},e.prototype.getPointByClient=function(n,r){return this.client2Viewport({x:n,y:r})},e.prototype.getClientByPoint=function(n,r){return this.viewport2Client({x:n,y:r})},e}(Bx),i9=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.landmarks=[],n}return e.prototype.rotate=function(n,r,i){if(this.relElevation=zs(r),this.relAzimuth=zs(n),this.relRoll=zs(i),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===wn.EXPLORING){var a=Ka(br(),[1,0,0],rr((this.rotateWorld?1:-1)*this.relElevation)),o=Ka(br(),[0,1,0],rr((this.rotateWorld?1:-1)*this.relAzimuth)),s=Ka(br(),[0,0,1],rr(this.relRoll)),c=Qa(br(),o,a);c=Qa(br(),c,s);var l=qt.fromQuat(qt.create(),c);qt.translate(this.matrix,this.matrix,[0,0,-this.distance]),qt.multiply(this.matrix,this.matrix,l),qt.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===wn.ORBITING||this.type===wn.EXPLORING?this._getPosition():this.type===wn.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(n,r){var i=ti(n,r,0),a=ot.clone(this.position);return ot.add(a,a,ot.scale(ot.create(),this.right,i[0])),ot.add(a,a,ot.scale(ot.create(),this.up,i[1])),this._setPosition(a),this.triggerUpdate(),this},e.prototype.dolly=function(n){var r=this.forward,i=ot.clone(this.position),a=n*this.dollyingStep,o=this.distance+n*this.dollyingStep;return a=Math.max(Math.min(o,this.maxDistance),this.minDistance)-this.distance,i[0]+=a*r[0],i[1]+=a*r[1],i[2]+=a*r[2],this._setPosition(i),this.type===wn.ORBITING||this.type===wn.EXPLORING?this._getDistance():this.type===wn.TRACKING&&ot.add(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this},e.prototype.cancelLandmarkAnimation=function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},e.prototype.createLandmark=function(n,r){var i,a,o,s;r===void 0&&(r={});var c=r.position,l=c===void 0?this.position:c,u=r.focalPoint,f=u===void 0?this.focalPoint:u,d=r.roll,h=r.zoom,p=new Mt.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],(i=l[1])!==null&&i!==void 0?i:this.position[1],(a=l[2])!==null&&a!==void 0?a:this.position[2]),p.setFocalPoint(f[0],(o=f[1])!==null&&o!==void 0?o:this.focalPoint[1],(s=f[2])!==null&&s!==void 0?s:this.focalPoint[2]),p.setRoll(d!=null?d:this.roll),p.setZoom(h!=null?h:this.zoom);var v={name:n,matrix:qt.clone(p.getWorldTransform()),right:ot.clone(p.right),up:ot.clone(p.up),forward:ot.clone(p.forward),position:ot.clone(p.getPosition()),focalPoint:ot.clone(p.getFocalPoint()),distanceVector:ot.clone(p.getDistanceVector()),distance:p.getDistance(),dollyingStep:p.getDollyingStep(),azimuth:p.getAzimuth(),elevation:p.getElevation(),roll:p.getRoll(),relAzimuth:p.relAzimuth,relElevation:p.relElevation,relRoll:p.relRoll,zoom:p.getZoom()};return this.landmarks.push(v),v},e.prototype.gotoLandmark=function(n,r){var i=this;r===void 0&&(r={});var a=er(n)?this.landmarks.find(function(P){return P.name===n}):n;if(a){var o=(0,xr.Z)(r)?{duration:r}:r,s=o.easing,c=s===void 0?"linear":s,l=o.duration,u=l===void 0?100:l,f=o.easingFunction,d=f===void 0?void 0:f,h=o.onfinish,p=h===void 0?void 0:h,v=o.onframe,g=v===void 0?void 0:v,y=.01;if(u===0){this.syncFromLandmark(a),p&&p();return}this.cancelLandmarkAnimation();var m=a.position,b=a.focalPoint,_=a.zoom,O=a.roll,w=d||Mt.EasingFunction(c),M,E=function(){i.setFocalPoint(b),i.setPosition(m),i.setRoll(O),i.setZoom(_),i.computeMatrix(),i.triggerUpdate(),p&&p()},A=function(P){M===void 0&&(M=P);var C=P-M;if(C>u){E();return}var D=w(C/u),N=ot.create(),k=ot.create(),R=1,I=0;ot.lerp(N,i.focalPoint,b,D),ot.lerp(k,i.position,m,D),I=i.roll*(1-D)+O*D,R=i.zoom*(1-D)+_*D,i.setFocalPoint(N),i.setPosition(k),i.setRoll(I),i.setZoom(R);var F=ot.dist(N,b)+ot.dist(k,m);if(F<=y&&_==null&&O==null){E();return}i.computeMatrix(),i.triggerUpdate(),C<u&&(g&&g(D),i.landmarkAnimationID=i.canvas.requestAnimationFrame(A))};this.canvas.requestAnimationFrame(A)}},e.prototype.syncFromLandmark=function(n){this.matrix=qt.copy(this.matrix,n.matrix),this.right=ot.copy(this.right,n.right),this.up=ot.copy(this.up,n.up),this.forward=ot.copy(this.forward,n.forward),this.position=ot.copy(this.position,n.position),this.focalPoint=ot.copy(this.focalPoint,n.focalPoint),this.distanceVector=ot.copy(this.distanceVector,n.distanceVector),this.azimuth=n.azimuth,this.elevation=n.elevation,this.roll=n.roll,this.relAzimuth=n.relAzimuth,this.relElevation=n.relElevation,this.relRoll=n.relRoll,this.dollyingStep=n.dollyingStep,this.distance=n.distance,this.zoom=n.zoom},e}(rx);Mt.CameraContribution=i9;var Zx=function(){function t(e,n){this.type=e,this.target=n,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),a9=0,$s=new WeakMap,o9=function(){function t(e,n,r){this.observer=e,this.target=n,this.options=r,this.transientObservedNodes=[]}return t.prototype.enqueue=function(e){var n=this.observer.records,r=n.length;if(n.length>0){var i=n[r-1],a=u9(i,e);if(a){n[r-1]=a;return}}else d9(this.observer);n[r]=e},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(e){var n=this.options;n.attributes&&e.addEventListener(Re.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(Re.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(Re.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(Re.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(Re.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(Re.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(n){this.removeListeners_(n);for(var r=$s.get(n),i=0;i<r.length;i++)if(r[i]===this){r.splice(i,1);break}},this)},t.prototype.handleEvent=function(e){e.stopImmediatePropagation();var n,r;switch(e.type){case Re.ATTR_MODIFIED:var i=e.attrName,a=e.relatedNode.namespaceURI;r=e.target,n=Kx("attributes",r),n.attributeName=i,n.attributeNamespace=a;var o=e.attrChange===ao.ADDITION?null:e.prevValue;Qx(r,function(d){if(d.attributes&&!(d.attributeFilter&&d.attributeFilter.length&&d.attributeFilter.indexOf(i)===-1&&d.attributeFilter.indexOf(a)===-1))return d.attributeOldValue?s9(o):n});break;case Re.REMOVED:case Re.INSERTED:r=e.relatedNode;var s=e.target,c=void 0,l=void 0;e.type===Re.INSERTED?(c=[s],l=[]):(c=[],l=[s]);var u=s.previousSibling,f=s.nextSibling;n=Kx("childList",r),n.addedNodes=c,n.removedNodes=l,n.previousSibling=u,n.nextSibling=f,Qx(r,function(d){if(d.childList)return n})}c9()},t}(),Qft=function(){function t(e){this.callback=e,this.nodes=[],this.records=[],this.uid=a9++}return t.prototype.observe=function(e,n){if(!n.childList&&!n.attributes&&!n.characterData||n.attributeOldValue&&!n.attributes||n.attributeFilter&&n.attributeFilter.length&&!n.attributes||n.characterDataOldValue&&!n.characterData)throw new SyntaxError;var r=$s.get(e);r||$s.set(e,r=[]);for(var i,a=0;a<r.length;a++)if(r[a].observer===this){i=r[a],i.removeListeners(),i.options=n;break}i||(i=new o9(this,e,n),r.push(i),this.nodes.push(e)),i.addListeners()},t.prototype.disconnect=function(){var e=this;this.nodes.forEach(function(n){for(var r=$s.get(n),i=0;i<r.length;i++){var a=r[i];if(a.observer===e){a.removeListeners(),r.splice(i,1);break}}},this),this.records=[]},t.prototype.takeRecords=function(){var e=this.records;return this.records=[],e},t}(),Sf,ka;function Kx(t,e){return Sf=new Zx(t,e)}function s9(t){return ka||(ka=Zx.copy(Sf),ka.oldValue=t,ka)}function c9(){Sf=ka=void 0}function l9(t){return t===ka||t===Sf}function u9(t,e){return t===e?t:ka&&l9(t)?ka:null}function f9(t){t.nodes.forEach(function(e){var n=$s.get(e);n&&n.forEach(function(r){r.observer===t&&r.removeTransientObservers()})})}function Qx(t,e){for(var n=t;n;n=n.parentNode){var r=$s.get(n);if(r)for(var i=0;i<r.length;i++){var a=r[i],o=a.options;if(!(n!==t&&!o.subtree)){var s=e(o);s&&a.enqueue(s)}}}}var G0=!1,W0=[];function d9(t){W0.push(t),G0||(G0=!0,typeof Mt.globalThis!="undefined"?Mt.globalThis.setTimeout(H0):H0())}function H0(){G0=!1;var t=W0;W0=[],t.sort(function(n,r){return n.uid-r.uid});var e=!1;t.forEach(function(n){var r=n.takeRecords();f9(n),r.length&&(n.callback(r,n),e=!0)}),e&&H0()}var Y0=function(t){(0,S.ZT)(e,t);function e(n,r,i,a){var o=t.call(this,n)||this;return o.currentTime=i,o.timelineTime=a,o.target=r,o.type="finish",o.bubbles=!1,o.currentTarget=r,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=i,o.timelineTime=a,o}return e}(_f),h9=0,p9=function(){function t(e,n){var r;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=e,e.animation=this,this.timeline=n,this.id="".concat(h9++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((r=this.effect)===null||r===void 0?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var e=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(n,r){e.resolveReadyPromise=function(){n(e)},e.rejectReadyPromise=function(){r(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var e=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(n,r){e.resolveFinishedPromise=function(){n(e)},e.rejectFinishedPromise=function(){r(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){var n;e=Number(e),!isNaN(e)&&(this.timeline.restart(),!this._paused&&this._startTime!==null&&(this._startTime=Number((n=this.timeline)===null||n===void 0?void 0:n.currentTime)-e/this.playbackRate),this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(e){if(e!==null){if(this.updatePromises(),e=Number(e),isNaN(e)||this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var n=this.currentTime;this._playbackRate=e,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),n!==null&&(this.currentTime=n),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||this.playState==="running"||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var e=this.oldPlayState,n=this.pending?"pending":this.playState;return this.readyPromise&&n!==e&&(n==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):e==="pending"?this.resolveReadyPromise():n==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&n!==e&&(n==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):n==="finished"?this.resolveFinishedPromise():e==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=n,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){var e=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var n=new Y0(null,this,this.currentTime,null);setTimeout(function(){e.oncancel(n)})}},t.prototype.reverse=function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),e!==null&&(this.currentTime=e),this.updatePromises()},t.prototype.updatePlaybackRate=function(e){this.playbackRate=e},t.prototype.targetAnimations=function(){var e,n=(e=this.effect)===null||e===void 0?void 0:e.target;return n.getAnimations()},t.prototype.markTarget=function(){var e=this.targetAnimations();e.indexOf(this)===-1&&e.push(this)},t.prototype.unmarkTarget=function(){var e=this.targetAnimations(),n=e.indexOf(this);n!==-1&&e.splice(n,1)},t.prototype.tick=function(e,n){!this._idle&&!this._paused&&(this._startTime===null?n&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),n&&(this.currentTimePending=!1,this.fireEvents(e))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")},t.prototype.persist=function(){throw new Error(Pn)},t.prototype.addEventListener=function(e,n,r){throw new Error(Pn)},t.prototype.removeEventListener=function(e,n,r){throw new Error(Pn)},t.prototype.dispatchEvent=function(e){throw new Error(Pn)},t.prototype.commitStyles=function(){throw new Error(Pn)},t.prototype.ensureAlive=function(){var e,n;this.playbackRate<0&&this.currentTime===0?this._inEffect=!!(!((e=this.effect)===null||e===void 0)&&e.update(-1)):this._inEffect=!!(!((n=this.effect)===null||n===void 0)&&n.update(this.currentTime)),!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(e,n){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!n&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(e){var n=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var r=new Y0(null,this,this.currentTime,e);setTimeout(function(){n.onfinish&&n.onfinish(r)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var i=new Y0(null,this,this.currentTime,e);this.onframe(i)}this._finishedFlag=!1}},t}(),v9=4,g9=.001,y9=1e-7,m9=10,cl=11,Mf=1/(cl-1),b9=typeof Float32Array=="function",Jx=function(t,e){return 1-3*e+3*t},t_=function(t,e){return 3*e-6*t},e_=function(t){return 3*t},Ef=function(t,e,n){return((Jx(e,n)*t+t_(e,n))*t+e_(e))*t},n_=function(t,e,n){return 3*Jx(e,n)*t*t+2*t_(e,n)*t+e_(e)},x9=function(t,e,n,r,i){var a,o,s=0;do o=e+(n-e)/2,a=Ef(o,r,i)-t,a>0?n=o:e=o;while(Math.abs(a)>y9&&++s<m9);return o},_9=function(t,e,n,r){for(var i=0;i<v9;++i){var a=n_(e,n,r);if(a===0)return e;var o=Ef(e,n,r)-t;e-=o/a}return e},V0=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(s){return s};for(var i=b9?new Float32Array(cl):new Array(cl),a=0;a<cl;++a)i[a]=Ef(a*Mf,t,n);var o=function(s){for(var c=0,l=1,u=cl-1;l!==u&&i[l]<=s;++l)c+=Mf;--l;var f=(s-i[l])/(i[l+1]-i[l]),d=c+f*Mf,h=n_(d,t,n);return h>=g9?_9(s,d,t,n):h===0?d:x9(s,c,c+Mf,t,n)};return function(s){return s===0||s===1?s:Ef(o(s),e,r)}},O9=function(t){return t=t.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},Af=function(t){return Math.pow(t,2)},Tf=function(t){return Math.pow(t,3)},Pf=function(t){return Math.pow(t,4)},Cf=function(t){return Math.pow(t,5)},kf=function(t){return Math.pow(t,6)},Rf=function(t){return 1-Math.cos(t*Math.PI/2)},Lf=function(t){return 1-Math.sqrt(1-t*t)},Nf=function(t){return t*t*(3*t-2)},If=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((e*3-2)/22-t,2)},jf=function(t,e){e===void 0&&(e=[]);var n=(0,S.CR)(e,2),r=n[0],i=r===void 0?1:r,a=n[1],o=a===void 0?.5:a,s=(0,lr.Z)(Number(i),1,10),c=(0,lr.Z)(Number(o),.1,2);return t===0||t===1?t:-s*Math.pow(2,10*(t-1))*Math.sin((t-1-c/(Math.PI*2)*Math.asin(1/s))*(Math.PI*2)/c)},ll=function(t,e,n){e===void 0&&(e=[]);var r=(0,S.CR)(e,4),i=r[0],a=i===void 0?1:i,o=r[1],s=o===void 0?100:o,c=r[2],l=c===void 0?10:c,u=r[3],f=u===void 0?0:u;a=(0,lr.Z)(a,.1,1e3),s=(0,lr.Z)(s,.1,1e3),l=(0,lr.Z)(l,.1,1e3),f=(0,lr.Z)(f,.1,1e3);var d=Math.sqrt(s/a),h=l/(2*Math.sqrt(s*a)),p=h<1?d*Math.sqrt(1-h*h):0,v=1,g=h<1?(h*d+-f)/p:-f+d,y=n?n*t/1e3:t;return h<1?y=Math.exp(-y*h*d)*(v*Math.cos(p*y)+g*Math.sin(p*y)):y=(v+g*y)*Math.exp(-y*d),t===0||t===1?t:1-y},$0=function(t,e){e===void 0&&(e=[]);var n=(0,S.CR)(e,2),r=n[0],i=r===void 0?10:r,a=n[1],o=a=="start"?Math.ceil:Math.floor;return o((0,lr.Z)(t,0,1)*i)/i},r_=function(t,e){e===void 0&&(e=[]);var n=(0,S.CR)(e,4),r=n[0],i=n[1],a=n[2],o=n[3];return V0(r,i,a,o)(t)},Df=V0(.42,0,1,1),Ri=function(t){return function(e,n,r){return n===void 0&&(n=[]),1-t(1-e,n,r)}},Li=function(t){return function(e,n,r){return n===void 0&&(n=[]),e<.5?t(e*2,n,r)/2:1-t(e*-2+2,n,r)/2}},Ni=function(t){return function(e,n,r){return n===void 0&&(n=[]),e<.5?(1-t(1-e*2,n,r))/2:(t(e*2-1,n,r)+1)/2}},i_={steps:$0,"step-start":function(t){return $0(t,[1,"start"])},"step-end":function(t){return $0(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":r_,ease:function(t){return r_(t,[.25,.1,.25,1])},in:Df,out:Ri(Df),"in-out":Li(Df),"out-in":Ni(Df),"in-quad":Af,"out-quad":Ri(Af),"in-out-quad":Li(Af),"out-in-quad":Ni(Af),"in-cubic":Tf,"out-cubic":Ri(Tf),"in-out-cubic":Li(Tf),"out-in-cubic":Ni(Tf),"in-quart":Pf,"out-quart":Ri(Pf),"in-out-quart":Li(Pf),"out-in-quart":Ni(Pf),"in-quint":Cf,"out-quint":Ri(Cf),"in-out-quint":Li(Cf),"out-in-quint":Ni(Cf),"in-expo":kf,"out-expo":Ri(kf),"in-out-expo":Li(kf),"out-in-expo":Ni(kf),"in-sine":Rf,"out-sine":Ri(Rf),"in-out-sine":Li(Rf),"out-in-sine":Ni(Rf),"in-circ":Lf,"out-circ":Ri(Lf),"in-out-circ":Li(Lf),"out-in-circ":Ni(Lf),"in-back":Nf,"out-back":Ri(Nf),"in-out-back":Li(Nf),"out-in-back":Ni(Nf),"in-bounce":If,"out-bounce":Ri(If),"in-out-bounce":Li(If),"out-in-bounce":Ni(If),"in-elastic":jf,"out-elastic":Ri(jf),"in-out-elastic":Li(jf),"out-in-elastic":Ni(jf),spring:ll,"spring-in":ll,"spring-out":Ri(ll),"spring-in-out":Li(ll),"spring-out-in":Ni(ll)},w9=function(t){return O9(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},S9=function(t){return i_[w9(t)]||i_.linear},M9=function(t){return t},E9=1,A9=.5,a_=0;function o_(t,e){return function(n){if(n>=1)return 1;var r=1/t;return n+=e*r,n-n%r}}var Ff="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",T9=new RegExp("cubic-bezier\\("+Ff+","+Ff+","+Ff+","+Ff+"\\)"),P9=/steps\(\s*(\d+)\s*\)/,C9=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function X0(t){var e=T9.exec(t);if(e)return V0.apply(void 0,(0,S.ev)([],(0,S.CR)(e.slice(1).map(Number)),!1));var n=P9.exec(t);if(n)return o_(Number(n[1]),a_);var r=C9.exec(t);return r?o_(Number(r[1]),{start:E9,middle:A9,end:a_}[r[2]]):S9(t)}function k9(t){return Math.abs(R9(t)/(t.playbackRate||1))}function R9(t){var e;return t.duration===0||t.iterations===0?0:(t.duration==="auto"?0:Number(t.duration))*((e=t.iterations)!==null&&e!==void 0?e:1)}var s_=0,U0=1,Bf=2,c_=3;function L9(t,e,n){if(e===null)return s_;var r=n.endTime;return e<Math.min(n.delay,r)?U0:e>=Math.min(n.delay+t+n.endDelay,r)?Bf:c_}function N9(t,e,n,r,i){switch(r){case U0:return e==="backwards"||e==="both"?0:null;case c_:return n-i;case Bf:return e==="forwards"||e==="both"?t:null;case s_:return null}}function I9(t,e,n,r,i){var a=i;return t===0?e!==U0&&(a+=n):a+=r/t,a}function j9(t,e,n,r,i,a){var o=t===1/0?e%1:t%1;return o===0&&n===Bf&&r!==0&&(i!==0||a===0)&&(o=1),o}function D9(t,e,n,r){return t===Bf&&e===1/0?1/0:n===1?Math.floor(r)-1:Math.floor(r)}function F9(t,e,n){var r=t;if(t!=="normal"&&t!=="reverse"){var i=e;t==="alternate-reverse"&&(i+=1),r="normal",i!==1/0&&i%2!==0&&(r="reverse")}return r==="normal"?n:1-n}function B9(t,e,n){var r=L9(t,e,n),i=N9(t,n.fill,e,r,n.delay);if(i===null)return null;var a=n.duration==="auto"?0:n.duration,o=I9(a,r,n.iterations,i,n.iterationStart),s=j9(o,n.iterationStart,r,n.iterations,i,a),c=D9(r,n.iterations,s,o),l=F9(n.direction,c,s);return n.currentIteration=c,n.progress=l,n.easingFunction(l)}function z9(t,e,n){var r=G9(t,e),i=W9(r,n);return function(a,o){if(o!==null)i.filter(function(c){return o>=c.applyFrom&&o<c.applyTo}).forEach(function(c){var l=o-c.startOffset,u=c.endOffset-c.startOffset,f=u===0?0:c.easingFunction(l/u);a.setAttribute(c.property,c.interpolation(f))});else for(var s in r)l_(s)&&a.setAttribute(s,null)}}function l_(t){return t!=="offset"&&t!=="easing"&&t!=="composite"&&t!=="computedOffset"}function G9(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(l_(i)){var a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:X0(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(a)}return n}function W9(t,e){var n=[];for(var r in t)for(var i=t[r],a=0;a<i.length-1;a++){var o=a,s=a+1,c=i[o].computedOffset,l=i[s].computedOffset,u=c,f=l;a===0&&(u=-1/0,l===0&&(s=o)),a===i.length-2&&(f=1/0,c===1&&(o=s)),n.push({applyFrom:u,applyTo:f,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:r,interpolation:H9(r,i[o].value,i[s].value,e)})}return n.sort(function(d,h){return d.startOffset-h.startOffset}),n}var u_=function(t,e,n){return function(r){var i=f_(t,e,r);return!Mt.enableCSSParsing&&(0,xr.Z)(i)?i:n(i)}};function H9(t,e,n,r){var i=ro[t];if(i&&i.syntax&&i.int){var a=Mt.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var o=void 0,s=void 0;if(Mt.enableCSSParsing){var c=Mt.styleValueRegistry.parseProperty(t,e,r),l=Mt.styleValueRegistry.parseProperty(t,n,r);o=Mt.styleValueRegistry.computeProperty(t,c,r),s=Mt.styleValueRegistry.computeProperty(t,l,r)}else{var u=a.parserWithCSSDisabled;o=u?u(e,r):e,s=u?u(n,r):n}var f=a.mixer(o,s,r);if(f){var d=u_.apply(void 0,(0,S.ev)([],(0,S.CR)(f),!1));return function(h){return h===0?e:h===1?n:d(h)}}}}return u_(!1,!0,function(h){return h?n:e})}function f_(t,e,n){if(typeof t=="number"&&typeof e=="number")return t*(1-n)+e*n;if(typeof t=="boolean"&&typeof e=="boolean"||typeof t=="string"&&typeof e=="string")return n<.5?t:e;if(Array.isArray(t)&&Array.isArray(e)){for(var r=t.length,i=e.length,a=Math.max(r,i),o=[],s=0;s<a;s++)o.push(f_(t[s<r?s:r-1],e[s<i?s:i-1],n));return o}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var Y9=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=M9,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(e){this.easingFunction=X0(e),this._easing=e},enumerable:!1,configurable:!0}),t}();function V9(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,a=0;a<i;a++){if(!e[a]){var o={};"offset"in t&&(o.offset=Number(t.offset)),"easing"in t&&(o.easing=t.easing),"composite"in t&&(o.composite=t.composite),e[a]=o}r[a]!==void 0&&r[a]!==null&&(e[a][n]=r[a])}}return e.sort(function(s,c){return(s.computedOffset||0)-(c.computedOffset||0)}),e}function d_(t,e){if(t===null)return[];Array.isArray(t)||(t=V9(t));for(var n=t.map(function(c){var l={};e!=null&&e.composite&&(l.composite="auto");for(var u in c){var f=c[u];if(u==="offset"){if(f!==null){if(f=Number(f),!isFinite(f))throw new Error("Keyframe offsets must be numbers.");if(f<0||f>1)throw new Error("Keyframe offsets must be between 0 and 1.");l.computedOffset=f}}else if(u==="composite"&&["replace","add","accumulate","auto"].indexOf(f)===-1)throw new Error("".concat(f," compositing is not supported"));l[u]=f}return l.offset===void 0&&(l.offset=null),l.easing===void 0&&(l.easing=(e==null?void 0:e.easing)||"linear"),l.composite===void 0&&(l.composite="auto"),l}),r=!0,i=-1/0,a=0;a<n.length;a++){var o=n[a].offset;if((0,ye.Z)(o))r=!1;else{if(o<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=o}}n=n.filter(function(c){return Number(c.offset)>=0&&Number(c.offset)<=1});function s(){var c,l,u=n.length;n[u-1].computedOffset=Number((c=n[u-1].offset)!==null&&c!==void 0?c:1),u>1&&(n[0].computedOffset=Number((l=n[0].offset)!==null&&l!==void 0?l:0));for(var f=0,d=Number(n[0].computedOffset),h=1;h<u;h++){var p=n[h].computedOffset;if(!(0,ye.Z)(p)&&!(0,ye.Z)(d)){for(var v=1;v<h-f;v++)n[f+v].computedOffset=d+(Number(p)-d)*v/(h-f);f=h,d=Number(p)}}}return r||s(),n}var $9="backwards|forwards|both|none".split("|"),X9="reverse|alternate|alternate-reverse".split("|");function U9(t,e){var n=new Y9;return e&&(n.fill="both",n.duration="auto"),typeof t=="number"&&!isNaN(t)?n.duration=t:t!==void 0&&Object.keys(t).forEach(function(r){if(t[r]!==void 0&&t[r]!==null&&t[r]!=="auto"){if((typeof n[r]=="number"||r==="duration")&&(typeof t[r]!="number"||isNaN(t[r]))||r==="fill"&&$9.indexOf(t[r])===-1||r==="direction"&&X9.indexOf(t[r])===-1)return;n[r]=t[r]}}),n}function q9(t,e){return t=Z9(t!=null?t:{duration:"auto"}),U9(t,e)}function Z9(t){return typeof t=="number"&&(isNaN(t)?t={duration:"auto"}:t={duration:t}),t}var K9=function(){function t(e,n,r){var i=this;this.composite="replace",this.iterationComposite="replace",this.target=e,this.timing=q9(r,!1),this.timing.effect=this,this.timing.activeDuration=k9(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=d_(n,this.timing),this.interpolations=z9(this.normalizedKeyframes,this.timing,this.target);var a=Mt.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(o,s){return s==="duration"?o.duration==="auto"?0:o.duration:s==="fill"?o.fill==="auto"?"none":o.fill:s==="localTime"?i.animation&&i.animation.currentTime||null:s==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:o.currentIteration||0:s==="progress"?!i.animation||i.animation.playState!=="running"?null:o.progress||0:o[s]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(e){return e===null?!1:(this.timeFraction=B9(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(e){this.normalizedKeyframes=d_(e)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(r){n.timing[r]=e[r]})},t}();function h_(t,e){return Number(t.id)-Number(e.id)}var Q9=function(){function t(e){var n=this;this.document=e,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(r){n.currentTime=r,n.discardAnimations(),n.animations.length===0?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(r){var i=n.rafCallbacks;n.rafCallbacks=[],r<Number(n.currentTime)&&(r=Number(n.currentTime)),n.animations.sort(h_),n.animations=n.tick(r,!0,n.animations)[0],i.forEach(function(a){a[1](r)}),n.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(e,n,r){var i=new K9(e,n,r),a=new p9(i,this);return this.animations.push(a),this.restartWebAnimationsNextTick(),a.updatePromises(),a.play(),a.updatePromises(),a},t.prototype.applyDirtiedAnimation=function(e){var n=this;if(!this.inTick){e.markTarget();var r=e.targetAnimations();r.sort(h_);var i=this.tick(Number(this.currentTime),!1,r.slice())[1];i.forEach(function(a){var o=n.animations.indexOf(a);o!==-1&&n.animations.splice(o,1)}),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach(function(e){e==null||e.applyInterpolations()}),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(e){return e.updatePromises()})},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(e){return e.playState!=="finished"&&e.playState!=="idle"})},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(e){var n=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([n,e]),n},t.prototype.requestAnimationFrame=function(e){var n=this;return this.rAF(function(r){n.updateAnimationsPromises(),e(r),n.updateAnimationsPromises()})},t.prototype.tick=function(e,n,r){var i,a,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var s=[],c=[],l=[],u=[];return r.forEach(function(f){f.tick(e,n),f._inEffect?(c.push(f.effect),f.markTarget()):(s.push(f.effect),f.unmarkTarget()),f._needsTick&&(o.ticking=!0);var d=f._inEffect||f._needsTick;f._inTimeline=d,d?l.push(f):u.push(f)}),(i=this.pendingEffects).push.apply(i,(0,S.ev)([],(0,S.CR)(s),!1)),(a=this.pendingEffects).push.apply(a,(0,S.ev)([],(0,S.CR)(c),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[l,u]},t}();Mt.EasingFunction=X0,Mt.AnimationTimeline=Q9;const p_="main-layer",q0="label-layer",Ra="element",Z0="view",zf="plot",v_="component",K0="label",g_="area",Jft="mask",y_={};function m_(t,e){Object.assign(y_,{[t]:e})}function J9(t,e){var n=e.r;t.arc(n,n,n,0,Math.PI*2,!1)}function t7(t,e){var n=e.rx,r=e.ry,i=n,a=r;if(t.ellipse)t.ellipse(i,a,i,a,0,0,Math.PI*2,!1);else{var o=i>a?i:a,s=i>a?1:i/a,c=i>a?a/i:1;t.save(),t.scale(s,c),t.arc(o,o,o,0,Math.PI*2)}}function e7(t,e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=e.defX,s=o===void 0?0:o,c=e.defY,l=c===void 0?0:c,u=e.markerStart,f=e.markerEnd,d=e.markerStartOffset,h=e.markerEndOffset,p=0,v=0,g=0,y=0,m=0,b,_;u&&hn(u)&&d&&(b=i-n,_=a-r,m=Math.atan2(_,b),p=Math.cos(m)*(d||0),v=Math.sin(m)*(d||0)),f&&hn(f)&&h&&(b=n-i,_=r-a,m=Math.atan2(_,b),g=Math.cos(m)*(h||0),y=Math.sin(m)*(h||0)),t.moveTo(n-s+p,r-l+v),t.lineTo(i-s+g,a-l+y)}function n7(t,e){var n=e.defX,r=n===void 0?0:n,i=e.defY,a=i===void 0?0:i,o=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.path,f=u.absolutePath,d=u.segments,h=0,p=0,v=0,g=0,y=0,m,b;if(o&&hn(o)&&c){var _=(0,S.CR)(o.parentNode.getStartTangent(),2),O=_[0],w=_[1];m=O[0]-w[0],b=O[1]-w[1],y=Math.atan2(b,m),h=Math.cos(y)*(c||0),p=Math.sin(y)*(c||0)}if(s&&hn(s)&&l){var M=(0,S.CR)(s.parentNode.getEndTangent(),2),O=M[0],w=M[1];m=O[0]-w[0],b=O[1]-w[1],y=Math.atan2(b,m),v=Math.cos(y)*(l||0),g=Math.sin(y)*(l||0)}for(var E=0;E<f.length;E++){var A=f[E],P=A[0],C=f[E+1],D=E===0&&(h!==0||p!==0),N=(E===f.length-1||C&&(C[0]==="M"||C[0]==="Z"))&&v!==0&&g!==0;switch(P){case"M":D?(t.moveTo(A[1]-r+h,A[2]-a+p),t.lineTo(A[1]-r,A[2]-a)):t.moveTo(A[1]-r,A[2]-a);break;case"L":N?t.lineTo(A[1]-r+v,A[2]-a+g):t.lineTo(A[1]-r,A[2]-a);break;case"Q":t.quadraticCurveTo(A[1]-r,A[2]-a,A[3]-r,A[4]-a),N&&t.lineTo(A[3]-r+v,A[4]-a+g);break;case"C":t.bezierCurveTo(A[1]-r,A[2]-a,A[3]-r,A[4]-a,A[5]-r,A[6]-a),N&&t.lineTo(A[5]-r+v,A[6]-a+g);break;case"A":{var k=d[E].arcParams,R=k.cx,I=k.cy,F=k.rx,B=k.ry,z=k.startAngle,Y=k.endAngle,U=k.xRotation,tt=k.sweepFlag;if(t.ellipse)t.ellipse(R-r,I-a,F,B,U,z,Y,!!(1-tt));else{var rt=F>B?F:B,wt=F>B?1:F/B,Bt=F>B?B/F:1;t.translate(R-r,I-a),t.rotate(U),t.scale(wt,Bt),t.arc(0,0,rt,z,Y,!!(1-tt)),t.scale(1/wt,1/Bt),t.rotate(-U),t.translate(-(R-r),-(I-a))}N&&t.lineTo(A[6]-r+v,A[7]-a+g);break}case"Z":t.closePath();break}}}function r7(t,e){var n=e.defX,r=n===void 0?0:n,i=e.defY,a=i===void 0?0:i,o=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.points.points,f=u.length,d=u[0][0]-r,h=u[0][1]-a,p=u[f-1][0]-r,v=u[f-1][1]-a,g=0,y=0,m=0,b=0,_=0,O,w;o&&hn(o)&&c&&(O=u[1][0]-u[0][0],w=u[1][1]-u[0][1],_=Math.atan2(w,O),g=Math.cos(_)*(c||0),y=Math.sin(_)*(c||0)),s&&hn(s)&&l&&(O=u[f-1][0]-u[0][0],w=u[f-1][1]-u[0][1],_=Math.atan2(w,O),m=Math.cos(_)*(l||0),b=Math.sin(_)*(l||0)),t.moveTo(d+(g||m),h+(y||b));for(var M=1;M<f-1;M++){var E=u[M];t.lineTo(E[0]-r,E[1]-a)}t.lineTo(p,v)}function i7(t,e){var n=e.defX,r=n===void 0?0:n,i=e.defY,a=i===void 0?0:i,o=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.points.points,f=u.length,d=u[0][0]-r,h=u[0][1]-a,p=u[f-1][0]-r,v=u[f-1][1]-a,g=0,y=0,m=0,b=0,_=0,O,w;o&&hn(o)&&c&&(O=u[1][0]-u[0][0],w=u[1][1]-u[0][1],_=Math.atan2(w,O),g=Math.cos(_)*(c||0),y=Math.sin(_)*(c||0)),s&&hn(s)&&l&&(O=u[f-2][0]-u[f-1][0],w=u[f-2][1]-u[f-1][1],_=Math.atan2(w,O),m=Math.cos(_)*(l||0),b=Math.sin(_)*(l||0)),t.moveTo(d+g,h+y);for(var M=1;M<f-1;M++){var E=u[M];t.lineTo(E[0]-r,E[1]-a)}t.lineTo(p+m,v+b)}function a7(t,e){var n=e.radius,r=e.width,i=e.height,a=r,o=i,s=n&&n.some(function(g){return g!==0});if(!s)t.rect(0,0,a,o);else{var c=r>0?1:-1,l=i>0?1:-1,u=c+l===0,f=(0,S.CR)(n.map(function(g){return(0,lr.Z)(g,0,Math.min(Math.abs(a)/2,Math.abs(o)/2))}),4),d=f[0],h=f[1],p=f[2],v=f[3];t.moveTo(c*d,0),t.lineTo(a-c*h,0),h!==0&&t.arc(a-c*h,l*h,h,-l*Math.PI/2,c>0?0:Math.PI,u),t.lineTo(a,o-l*p),p!==0&&t.arc(a-c*p,o-l*p,p,c>0?0:Math.PI,l>0?Math.PI/2:1.5*Math.PI,u),t.lineTo(c*v,o),v!==0&&t.arc(c*v,o-l*v,v,l>0?Math.PI/2:-Math.PI/2,c>0?Math.PI:0,u),t.lineTo(0,l*d),d!==0&&t.arc(c*d,l*d,d,c>0?Math.PI:0,l>0?Math.PI*1.5:Math.PI/2,u)}}var o7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="canvas-path-generator",n}return e.prototype.init=function(){var n,r=(n={},n[bt.CIRCLE]=J9,n[bt.ELLIPSE]=t7,n[bt.RECT]=a7,n[bt.LINE]=e7,n[bt.POLYLINE]=i7,n[bt.POLYGON]=r7,n[bt.PATH]=n7,n[bt.TEXT]=void 0,n[bt.GROUP]=void 0,n[bt.IMAGE]=void 0,n[bt.HTML]=void 0,n[bt.MESH]=void 0,n);this.context.pathGeneratorFactory=r},e.prototype.destroy=function(){delete this.context.pathGeneratorFactory},e}(to),s7=ot.create(),c7=ot.create(),l7=ot.create(),u7=qt.create(),f7=function(){function t(){var e=this;this.isHit=function(n,r,i,a){var o=e.context.pointInPathPickerFactory[n.nodeName];if(o){var s=qt.invert(u7,i),c=ot.transformMat4(c7,ot.set(l7,r[0],r[1],0),s),l=n.getGeometryBounds().halfExtents,u=n.parsedStyle.anchor;if(c[0]+=(u&&u[0]||0)*l[0]*2,c[1]+=(u&&u[1]||0)*l[1]*2,o(n,new Pr(c[0],c[1]),a,e.isPointInPath,e.context,e.runtime))return!0}return!1},this.isPointInPath=function(n,r){var i=e.runtime.offscreenCanvasCreator.getOrCreateContext(e.context.config.offscreenCanvas),a=e.context.pathGeneratorFactory[n.nodeName];return a&&(i.beginPath(),a(i,n.parsedStyle),i.closePath()),i.isPointInPath(r.x,r.y)}}return t.prototype.apply=function(e,n){var r=this,i,a=e.renderingService,o=e.renderingContext;this.context=e,this.runtime=n;var s=(i=o.root)===null||i===void 0?void 0:i.ownerDocument;a.hooks.pick.tapPromise(t.tag,function(c){return(0,S.mG)(r,void 0,void 0,function(){return(0,S.Jh)(this,function(l){return[2,this.pick(s,c)]})})}),a.hooks.pickSync.tap(t.tag,function(c){return r.pick(s,c)})},t.prototype.pick=function(e,n){var r,i,a=n.topmost,o=n.position,s=o.x,c=o.y,l=ot.set(s7,s,c,0),u=e.elementsFromBBox(l[0],l[1],l[0],l[1]),f=[];try{for(var d=(0,S.XA)(u),h=d.next();!h.done;h=d.next()){var p=h.value,v=p.getWorldTransform(),g=this.isHit(p,l,v,!1);if(g){var y=Px(p);if(y){var m=y.parsedStyle.clipPath,b=this.isHit(m,l,m.getWorldTransform(),!0);if(b){if(a)return n.picked=[p],n;f.push(p)}}else{if(a)return n.picked=[p],n;f.push(p)}}}}catch(_){r={error:_}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}return n.picked=f,n},t.tag="CanvasPicker",t}();function d7(t,e,n){var r=t.parsedStyle,i=r.r,a=r.fill,o=r.stroke,s=r.lineWidth,c=r.increasedLineWidthForHitTesting,l=r.pointerEvents,u=((s||0)+(c||0))/2,f=Wr(i,i,e.x,e.y),d=(0,S.CR)(qo(l,a,o),2),h=d[0],p=d[1];return h&&p||n?f<=i+u:h?f<=i:p?f>=i-u&&f<=i+u:!1}function Gf(t,e,n,r){return t/(n*n)+e/(r*r)}function h7(t,e,n){var r=t.parsedStyle,i=r.rx,a=r.ry,o=r.fill,s=r.stroke,c=r.lineWidth,l=r.increasedLineWidthForHitTesting,u=r.pointerEvents,f=e.x,d=e.y,h=(0,S.CR)(qo(u,o,s),2),p=h[0],v=h[1],g=((c||0)+(l||0))/2,y=(f-i)*(f-i),m=(d-a)*(d-a);return p&&v||n?Gf(y,m,i+g,a+g)<=1:p?Gf(y,m,i,a)<=1:v?Gf(y,m,i-g,a-g)>=1&&Gf(y,m,i+g,a+g)<=1:!1}function Qo(t,e,n,r,i,a){return i>=t&&i<=t+n&&a>=e&&a<=e+r}function p7(t,e,n,r,i,a,o){var s=i/2;return Qo(t-s,e-s,n,i,a,o)||Qo(t+n-s,e-s,i,r,a,o)||Qo(t+s,e+r-s,n,i,a,o)||Qo(t-s,e+s,i,r,a,o)}function Wf(t,e,n,r,i,a,o,s){var c=(Math.atan2(s-e,o-t)+Math.PI*2)%(Math.PI*2),l={x:t+n*Math.cos(c),y:e+n*Math.sin(c)};return Wr(l.x,l.y,o,s)<=a/2}function oo(t,e,n,r,i,a,o){var s=Math.min(t,n),c=Math.max(t,n),l=Math.min(e,r),u=Math.max(e,r),f=i/2;return a>=s-f&&a<=c+f&&o>=l-f&&o<=u+f?Gb(t,e,n,r,a,o)<=i/2:!1}function b_(t,e,n,r,i){var a=t.length;if(a<2)return!1;for(var o=0;o<a-1;o++){var s=t[o][0],c=t[o][1],l=t[o+1][0],u=t[o+1][1];if(oo(s,c,l,u,e,n,r))return!0}if(i){var f=t[0],d=t[a-1];if(oo(f[0],f[1],d[0],d[1],e,n,r))return!0}return!1}var v7=1e-6;function Q0(t){return Math.abs(t)<v7?0:t<0?-1:1}function g7(t,e,n){return(n[0]-t[0])*(e[1]-t[1])===(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function x_(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a=0;a<i;a++){var o=t[a],s=t[(a+1)%i];if(g7(o,s,[e,n]))return!0;Q0(o[1]-n)>0!=Q0(s[1]-n)>0&&Q0(e-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function __(t,e,n){for(var r=!1,i=0;i<t.length;i++){var a=t[i];if(r=x_(a,e,n),r)break}return r}function y7(t,e,n){var r=t.parsedStyle,i=r.x1,a=r.y1,o=r.x2,s=r.y2,c=r.lineWidth,l=r.increasedLineWidthForHitTesting,u=r.defX,f=u===void 0?0:u,d=r.defY,h=d===void 0?0:d,p=r.pointerEvents,v=r.fill,g=r.stroke,y=(0,S.CR)(qo(p,v,g),2),m=y[1];return!m&&!n||!c?!1:oo(i,a,o,s,(c||0)+(l||0),e.x+f,e.y+h)}function m7(t,e,n,r,i){for(var a=!1,o=e/2,s=0;s<t.length;s++){var c=t[s],l=c.currentPoint,u=c.params,f=c.prePoint,d=c.box;if(!(d&&!Qo(d.x-o,d.y-o,d.width+e,d.height+e,n,r)))switch(c.command){case"L":case"Z":if(a=oo(f[0],f[1],l[0],l[1],e,n,r),a)return!0;break;case"Q":var h=n8(f[0],f[1],u[1],u[2],u[3],u[4],n,r);if(a=h<=e/2,a)return!0;break;case"C":var p=Yb(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i);if(a=p<=e/2,a)return!0;break;case"A":c.cubicParams||(c.cubicParams=t0(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var v=c.cubicParams,g=f,y=0;y<v.length;y+=6){var m=Yb(g[0],g[1],v[y],v[y+1],v[y+2],v[y+3],v[y+4],v[y+5],n,r,i);if(g=[v[y+4],v[y+5]],a=m<=e/2,a)return!0}break}}return a}function b7(t,e,n,r,i,a){var o=t.parsedStyle,s=o.lineWidth,c=o.increasedLineWidthForHitTesting,l=o.stroke,u=o.fill,f=o.defX,d=f===void 0?0:f,h=o.defY,p=h===void 0?0:h,v=o.path,g=o.pointerEvents,y=v.segments,m=v.hasArc,b=v.polylines,_=v.polygons,O=(0,S.CR)(qo(g,(_==null?void 0:_.length)&&u,l),2),w=O[0],M=O[1],E=x0(t),A=!1;return w||n?(m?A=r(t,e):A=__(_,e.x+d,e.y+p)||__(b,e.x+d,e.y+p),A):((M||n)&&(A=m7(y,(s||0)+(c||0),e.x+d,e.y+p,E)),A)}function x7(t,e,n){var r=t.parsedStyle,i=r.stroke,a=r.fill,o=r.lineWidth,s=r.increasedLineWidthForHitTesting,c=r.points,l=r.defX,u=l===void 0?0:l,f=r.defY,d=f===void 0?0:f,h=r.pointerEvents,p=(0,S.CR)(qo(h,a,i),2),v=p[0],g=p[1],y=!1;return(g||n)&&(y=b_(c.points,(o||0)+(s||0),e.x+u,e.y+d,!0)),!y&&(v||n)&&(y=x_(c.points,e.x+u,e.y+d)),y}function _7(t,e,n){var r=t.parsedStyle,i=r.lineWidth,a=r.increasedLineWidthForHitTesting,o=r.points,s=r.defX,c=s===void 0?0:s,l=r.defY,u=l===void 0?0:l,f=r.pointerEvents,d=r.fill,h=r.stroke,p=(0,S.CR)(qo(f,d,h),2),v=p[1];return!v&&!n||!i?!1:b_(o.points,(i||0)+(a||0),e.x+c,e.y+u,!1)}function O7(t,e,n,r,i){var a=t.parsedStyle,o=a.radius,s=a.fill,c=a.stroke,l=a.lineWidth,u=a.increasedLineWidthForHitTesting,f=a.width,d=a.height,h=a.pointerEvents,p=(0,S.CR)(qo(h,s,c),2),v=p[0],g=p[1],y=o&&o.some(function(O){return O!==0}),m=(l||0)+(u||0);if(y){var _=!1;return(g||n)&&(_=w7(0,0,f,d,o.map(function(O){return(0,lr.Z)(O,0,Math.min(Math.abs(f)/2,Math.abs(d)/2))}),m,e.x,e.y)),!_&&(v||n)&&(_=r(t,e)),_}else{var b=m/2;if(v&&g||n)return Qo(0-b,0-b,f+b,d+b,e.x,e.y);if(v)return Qo(0,0,f,d,e.x,e.y);if(g)return p7(0,0,f,d,m,e.x,e.y)}return!1}function w7(t,e,n,r,i,a,o,s){var c=(0,S.CR)(i,4),l=c[0],u=c[1],f=c[2],d=c[3];return oo(t+l,e,t+n-u,e,a,o,s)||oo(t+n,e+u,t+n,e+r-f,a,o,s)||oo(t+n-f,e+r,t+d,e+r,a,o,s)||oo(t,e+r-d,t,e+l,a,o,s)||Wf(t+n-u,e+u,u,1.5*Math.PI,2*Math.PI,a,o,s)||Wf(t+n-f,e+r-f,f,0,.5*Math.PI,a,o,s)||Wf(t+d,e+r-d,d,.5*Math.PI,Math.PI,a,o,s)||Wf(t+l,e+l,l,Math.PI,1.5*Math.PI,a,o,s)}function S7(t,e,n,r,i,a){var o=t.parsedStyle,s=o.pointerEvents,c=o.width,l=o.height;if(s==="non-transparent-pixel"){var u=i.config.offscreenCanvas,f=a.offscreenCanvasCreator.getOrCreateCanvas(u),d=a.offscreenCanvasCreator.getOrCreateContext(u,{willReadFrequently:!0});f.width=c,f.height=l,i.defaultStyleRendererFactory[bt.IMAGE].render(d,t.parsedStyle,t,void 0,void 0,void 0);var h=d.getImageData(e.x,e.y,1,1).data;return h.every(function(p){return p!==0})}return!0}var M7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="canvas-picker",n}return e.prototype.init=function(){var n,r=function(){return!0},i=(n={},n[bt.CIRCLE]=d7,n[bt.ELLIPSE]=h7,n[bt.RECT]=O7,n[bt.LINE]=y7,n[bt.POLYLINE]=_7,n[bt.POLYGON]=x7,n[bt.PATH]=b7,n[bt.TEXT]=r,n[bt.GROUP]=null,n[bt.IMAGE]=S7,n[bt.HTML]=null,n[bt.MESH]=null,n);this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new f7)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(to),E7=function(){function t(e){this.canvasRendererPluginOptions=e,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=qt.create(),this.dprMatrix=qt.create(),this.tmpMat4=qt.create(),this.vec3a=ot.create(),this.vec3b=ot.create(),this.vec3c=ot.create(),this.vec3d=ot.create()}return t.prototype.apply=function(e,n){var r=this;this.context=e;var i=e.config,a=e.camera,o=e.renderingService,s=e.renderingContext,c=e.rBushRoot,l=e.pathGeneratorFactory;this.rBush=c,this.pathGeneratorFactory=l;var u=e.contextService,f=s.root.ownerDocument.defaultView,d=function(v){var g=v.target,y=g.rBushNode;y.aabb&&r.removedRBushNodeAABBs.push(y.aabb)},h=function(v){var g=v.target,y=g.rBushNode;y.aabb&&r.removedRBushNodeAABBs.push(y.aabb)};o.hooks.init.tap(t.tag,function(){f.addEventListener(Re.UNMOUNTED,d),f.addEventListener(Re.CULLED,h);var v=u.getDPR(),g=i.width,y=i.height,m=u.getContext();r.clearRect(m,0,0,g*v,y*v,i.background)}),o.hooks.destroy.tap(t.tag,function(){f.removeEventListener(Re.UNMOUNTED,d),f.removeEventListener(Re.CULLED,h),r.renderQueue=[],r.removedRBushNodeAABBs=[],r.restoreStack=[]}),o.hooks.beginFrame.tap(t.tag,function(){var v=u.getContext(),g=u.getDPR(),y=i.width,m=i.height,b=r.canvasRendererPluginOptions,_=b.dirtyObjectNumThreshold,O=b.dirtyObjectRatioThreshold,w=o.getStats(),M=w.total,E=w.rendered,A=E/M;r.clearFullScreen=o.disableDirtyRectangleRendering()||E>_&&A>O,v&&(v.resetTransform?v.resetTransform():v.setTransform(1,0,0,1,0,0),r.clearFullScreen&&r.clearRect(v,0,0,y*g,m*g,i.background))});var p=function(v,g){v.isVisible()&&!v.isCulled()&&(r.renderDisplayObject(v,g,r.context,r.restoreStack,n),r.saveDirtyAABB(v));var y=v.sortable.sorted||v.childNodes;y.forEach(function(m){p(m,g)})};o.hooks.endFrame.tap(t.tag,function(){var v=u.getContext(),g=u.getDPR();if(qt.fromScaling(r.dprMatrix,[g,g,1]),qt.multiply(r.vpMatrix,r.dprMatrix,a.getOrthoMatrix()),r.clearFullScreen)p(s.root,v);else{var y=r.safeMergeAABB.apply(r,(0,S.ev)([r.mergeDirtyAABBs(r.renderQueue)],(0,S.CR)(r.removedRBushNodeAABBs.map(function(U){var tt=U.minX,rt=U.minY,wt=U.maxX,Bt=U.maxY,Xt=new Sr;return Xt.setMinMax([tt,rt,0],[wt,Bt,0]),Xt})),!1));if(r.removedRBushNodeAABBs=[],Sr.isEmpty(y)){r.renderQueue=[];return}var m=r.convertAABB2Rect(y),b=m.x,_=m.y,O=m.width,w=m.height,M=ot.transformMat4(r.vec3a,[b,_,0],r.vpMatrix),E=ot.transformMat4(r.vec3b,[b+O,_,0],r.vpMatrix),A=ot.transformMat4(r.vec3c,[b,_+w,0],r.vpMatrix),P=ot.transformMat4(r.vec3d,[b+O,_+w,0],r.vpMatrix),C=Math.min(M[0],E[0],P[0],A[0]),D=Math.min(M[1],E[1],P[1],A[1]),N=Math.max(M[0],E[0],P[0],A[0]),k=Math.max(M[1],E[1],P[1],A[1]),R=Math.floor(C),I=Math.floor(D),F=Math.ceil(N-C),B=Math.ceil(k-D);v.save(),r.clearRect(v,R,I,F,B,i.background),v.beginPath(),v.rect(R,I,F,B),v.clip(),v.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]);var z=i.renderer.getConfig().enableDirtyRectangleRenderingDebug;z&&f.dispatchEvent(new Rn(hi.DIRTY_RECTANGLE,{dirtyRect:{x:R,y:I,width:F,height:B}}));var Y=r.searchDirtyObjects(y);Y.sort(function(U,tt){return U.sortable.renderOrder-tt.sortable.renderOrder}).forEach(function(U){U&&U.isVisible()&&!U.isCulled()&&r.renderDisplayObject(U,v,r.context,r.restoreStack,n)}),v.restore(),r.renderQueue.forEach(function(U){r.saveDirtyAABB(U)}),r.renderQueue=[]}r.restoreStack.forEach(function(){v.restore()}),r.restoreStack=[]}),o.hooks.render.tap(t.tag,function(v){r.clearFullScreen||r.renderQueue.push(v)})},t.prototype.clearRect=function(e,n,r,i,a,o){e.clearRect(n,r,i,a),o&&(e.fillStyle=o,e.fillRect(n,r,i,a))},t.prototype.renderDisplayObject=function(e,n,r,i,a){var o=e.nodeName,s=i[i.length-1];s&&!(e.compareDocumentPosition(s)&kr.DOCUMENT_POSITION_CONTAINS)&&(n.restore(),i.pop());var c=this.context.styleRendererFactory[o],l=this.pathGeneratorFactory[o],u=e.parsedStyle.clipPath;if(u){this.applyWorldTransform(n,u);var f=this.pathGeneratorFactory[u.nodeName];f&&(n.save(),i.push(e),n.beginPath(),f(n,u.parsedStyle),n.closePath(),n.clip())}c&&(this.applyWorldTransform(n,e),n.save(),this.applyAttributesToContext(n,e)),l&&(n.beginPath(),l(n,e.parsedStyle),e.nodeName!==bt.LINE&&e.nodeName!==bt.PATH&&e.nodeName!==bt.POLYLINE&&n.closePath()),c&&(c.render(n,e.parsedStyle,e,r,this,a),n.restore()),e.renderable.dirty=!1},t.prototype.convertAABB2Rect=function(e){var n=e.getMin(),r=e.getMax(),i=Math.floor(n[0]),a=Math.floor(n[1]),o=Math.ceil(r[0]),s=Math.ceil(r[1]),c=o-i,l=s-a;return{x:i,y:a,width:c,height:l}},t.prototype.mergeDirtyAABBs=function(e){var n=new Sr;return e.forEach(function(r){var i=r.getRenderBounds();n.add(i);var a=r.renderable.dirtyRenderBounds;a&&n.add(a)}),n},t.prototype.searchDirtyObjects=function(e){var n=(0,S.CR)(e.getMin(),2),r=n[0],i=n[1],a=(0,S.CR)(e.getMax(),2),o=a[0],s=a[1],c=this.rBush.search({minX:r,minY:i,maxX:o,maxY:s});return c.map(function(l){var u=l.displayObject;return u})},t.prototype.saveDirtyAABB=function(e){var n=e.renderable;n.dirtyRenderBounds||(n.dirtyRenderBounds=new Sr);var r=e.getRenderBounds();r&&n.dirtyRenderBounds.update(r.center,r.halfExtents)},t.prototype.applyAttributesToContext=function(e,n){var r=n.parsedStyle,i=r.stroke,a=r.fill,o=r.opacity,s=r.lineDash,c=r.lineDashOffset;s&&e.setLineDash(s),(0,ye.Z)(c)||(e.lineDashOffset=c),(0,ye.Z)(o)||(e.globalAlpha*=o),!(0,ye.Z)(i)&&!Array.isArray(i)&&!i.isNone&&(e.strokeStyle=n.attributes.stroke),!(0,ye.Z)(a)&&!Array.isArray(a)&&!a.isNone&&(e.fillStyle=n.attributes.fill)},t.prototype.applyWorldTransform=function(e,n,r){var i=0,a=0,o=(n.parsedStyle||{}).anchor,s=o&&o[0]||0,c=o&&o[1]||0;if(s!==0||c!==0){var l=n.geometry.contentBounds,u=l&&l.halfExtents[0]*2||0,f=l&&l.halfExtents[1]*2||0;i=-(s*u),a=-(c*f)}r?(qt.copy(this.tmpMat4,n.getLocalTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,qt.translate(this.tmpMat4,this.tmpMat4,this.vec3a),qt.multiply(this.tmpMat4,r,this.tmpMat4),qt.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(qt.copy(this.tmpMat4,n.getWorldTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,qt.translate(this.tmpMat4,this.tmpMat4,this.vec3a),qt.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)),e.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},t.prototype.safeMergeAABB=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=new Sr;return e.forEach(function(i){r.add(i)}),r},t.tag="CanvasRenderer",t}(),so=function(){function t(e){this.imagePool=e}return t.prototype.render=function(e,n,r,i,a,o){var s=n.fill,c=n.fillRule,l=n.opacity,u=n.fillOpacity,f=n.stroke,d=n.strokeOpacity,h=n.lineWidth,p=n.lineCap,v=n.lineJoin,g=n.shadowType,y=n.shadowColor,m=n.shadowBlur,b=n.filter,_=n.miterLimit,O=!(0,ye.Z)(s)&&!s.isNone,w=!(0,ye.Z)(f)&&!f.isNone&&h>0,M=s.alpha===0,E=!!(b&&b.length),A=!(0,ye.Z)(y)&&m>0,P=r.nodeName,C=g==="inner",D=w&&A&&(P===bt.PATH||P===bt.LINE||P===bt.POLYLINE||M||C);O&&(e.globalAlpha=l*u,D||Hf(r,e,A),this.fill(e,r,s,c,i,a,o),D||this.clearShadowAndFilter(e,E,A)),w&&(e.globalAlpha=l*d,e.lineWidth=h,(0,ye.Z)(_)||(e.miterLimit=_),(0,ye.Z)(p)||(e.lineCap=p),(0,ye.Z)(v)||(e.lineJoin=v),D&&(C&&(e.globalCompositeOperation="source-atop"),Hf(r,e,!0),C&&(this.stroke(e,r,f,i,a,o),e.globalCompositeOperation="source-over",this.clearShadowAndFilter(e,E,!0))),this.stroke(e,r,f,i,a,o))},t.prototype.clearShadowAndFilter=function(e,n,r){if(r&&(e.shadowColor="transparent",e.shadowBlur=0),n){var i=e.filter;!(0,ye.Z)(i)&&i.indexOf("drop-shadow")>-1&&(e.filter=i.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},t.prototype.fill=function(e,n,r,i,a,o,s){var c=this;Array.isArray(r)?r.forEach(function(l){e.fillStyle=c.getColor(l,n,e),i?e.fill(i):e.fill()}):(tl(r)&&(e.fillStyle=this.getPattern(r,n,e,a,o,s)),i?e.fill(i):e.fill())},t.prototype.stroke=function(e,n,r,i,a,o){var s=this;Array.isArray(r)?r.forEach(function(c){e.strokeStyle=s.getColor(c,n,e),e.stroke()}):(tl(r)&&(e.strokeStyle=this.getPattern(r,n,e,i,a,o)),e.stroke())},t.prototype.getPattern=function(e,n,r,i,a,o){var s,c;if(e.image.nodeName==="rect"){var l=e.image.parsedStyle,u=l.width,f=l.height;c=i.contextService.getDPR();var d=i.config.offscreenCanvas;s=o.offscreenCanvasCreator.getOrCreateCanvas(d),s.width=u*c,s.height=f*c;var h=o.offscreenCanvasCreator.getOrCreateContext(d),p=[];e.image.forEach(function(g){a.renderDisplayObject(g,h,i,p,o)}),p.forEach(function(){h.restore()})}var v=this.imagePool.getOrCreatePatternSync(e,r,s,c,function(){n.renderable.dirty=!0,i.renderingService.dirtify()});return v},t.prototype.getColor=function(e,n,r){var i;if(e.type===oa.LinearGradient||e.type===oa.RadialGradient){var a=n.getGeometryBounds(),o=a&&a.halfExtents[0]*2||1,s=a&&a.halfExtents[1]*2||1;i=this.imagePool.getOrCreateGradient((0,S.pi)((0,S.pi)({type:e.type},e.value),{width:o,height:s}),r)}return i},t}();function Hf(t,e,n){var r=t.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,c=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=a.toString(),e.shadowBlur=o||0,e.shadowOffsetX=s||0,e.shadowOffsetY=c||0)}var A7=function(){function t(e){this.imagePool=e}return t.prototype.render=function(e,n,r){var i=n.width,a=n.height,o=n.img,s=n.shadowColor,c=n.shadowBlur,l,u=i,f=a;if(er(o)?l=this.imagePool.getImageSync(o):(u||(u=o.width),f||(f=o.height),l=o),l){var d=!(0,ye.Z)(s)&&c>0;Hf(r,e,d);try{e.drawImage(l,0,0,u,f)}catch(h){}}},t}(),T7=function(){function t(){}return t.prototype.render=function(e,n,r,i,a,o){var s=n,c=s.lineWidth,l=s.textAlign,u=s.textBaseline,f=s.lineJoin,d=s.miterLimit,h=s.letterSpacing,p=s.stroke,v=s.fill,g=s.fillOpacity,y=s.strokeOpacity,m=s.opacity,b=s.metrics,_=s.dx,O=s.dy,w=s.shadowColor,M=s.shadowBlur,E=b.font,A=b.lines,P=b.height,C=b.lineHeight,D=b.lineMetrics;e.font=E,e.lineWidth=c,e.textAlign=l==="middle"?"center":l;var N=u;!o.enableCSSParsing&&N==="alphabetic"&&(N="bottom"),e.lineJoin=f,(0,ye.Z)(d)||(e.miterLimit=d);var k=0;u==="middle"?k=-P/2-C/2:u==="bottom"||u==="alphabetic"||u==="ideographic"?k=-P:(u==="top"||u==="hanging")&&(k=-C);var R=_||0;k+=O||0,A.length===1&&(N==="bottom"?(N="middle",k-=.5*P):N==="top"&&(N="middle",k+=.5*P)),e.textBaseline=N;var I=!(0,ye.Z)(w)&&M>0;Hf(r,e,I);for(var F=0;F<A.length;F++){var B=c/2+R;k+=C,!(0,ye.Z)(p)&&!p.isNone&&c&&this.drawLetterSpacing(e,A[F],D[F],l,B,k,h,g,y,m,!0),(0,ye.Z)(v)||this.drawLetterSpacing(e,A[F],D[F],l,B,k,h,g,y,m)}},t.prototype.drawLetterSpacing=function(e,n,r,i,a,o,s,c,l,u,f){if(f===void 0&&(f=!1),s===0){f?this.strokeText(e,n,a,o,l):this.fillText(e,n,a,o,c,u);return}var d=e.textAlign;e.textAlign="left";var h=a;i==="center"||i==="middle"?h=a-r.width/2:(i==="right"||i==="end")&&(h=a-r.width);for(var p=Array.from(n),v=e.measureText(n).width,g=0,y=0;y<p.length;++y){var m=p[y];f?this.strokeText(e,m,h,o,l):this.fillText(e,m,h,o,c,u),g=e.measureText(n.substring(y+1)).width,h+=v-g+s,v=g}e.textAlign=d},t.prototype.fillText=function(e,n,r,i,a,o){var s,c=!(0,ye.Z)(a)&&a!==1;c&&(s=e.globalAlpha,e.globalAlpha=a*o),e.fillText(n,r,i),c&&(e.globalAlpha=s)},t.prototype.strokeText=function(e,n,r,i,a){var o,s=!(0,ye.Z)(a)&&a!==1;s&&(o=e.globalAlpha,e.globalAlpha=a),e.strokeText(n,r,i),s&&(e.globalAlpha=o)},t}(),tdt=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(so),edt=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(so),ndt=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(so),rdt=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(so),idt=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(so),adt=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(so),odt=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(so),P7=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=t.call(this)||this;return r.options=n,r.name="canvas-renderer",r}return e.prototype.init=function(){var n,r=(0,S.pi)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),i=this.context.imagePool,a=new so(i),o=(n={},n[bt.CIRCLE]=a,n[bt.ELLIPSE]=a,n[bt.RECT]=a,n[bt.IMAGE]=new A7(i),n[bt.TEXT]=new T7,n[bt.LINE]=a,n[bt.POLYLINE]=a,n[bt.POLYGON]=a,n[bt.PATH]=a,n[bt.GROUP]=void 0,n[bt.HTML]=void 0,n[bt.MESH]=void 0,n);this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new E7(r))},e.prototype.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(to),C7=function(){function t(){}return t.prototype.apply=function(e,n){var r=this,i=e.renderingService,a=e.renderingContext,o=e.config;this.context=e;var s=a.root.ownerDocument.defaultView,c=function(w){i.hooks.pointerMove.call(w)},l=function(w){i.hooks.pointerUp.call(w)},u=function(w){i.hooks.pointerDown.call(w)},f=function(w){i.hooks.pointerOver.call(w)},d=function(w){i.hooks.pointerOut.call(w)},h=function(w){i.hooks.pointerCancel.call(w)},p=function(w){i.hooks.pointerWheel.call(w)},v=function(w){i.hooks.click.call(w)},g=function(w){n.globalThis.document.addEventListener("pointermove",c,!0),w.addEventListener("pointerdown",u,!0),w.addEventListener("pointerleave",d,!0),w.addEventListener("pointerover",f,!0),n.globalThis.addEventListener("pointerup",l,!0),n.globalThis.addEventListener("pointercancel",h,!0)},y=function(w){w.addEventListener("touchstart",u,!0),w.addEventListener("touchend",l,!0),w.addEventListener("touchmove",c,!0),w.addEventListener("touchcancel",h,!0)},m=function(w){n.globalThis.document.addEventListener("mousemove",c,!0),w.addEventListener("mousedown",u,!0),w.addEventListener("mouseout",d,!0),w.addEventListener("mouseover",f,!0),n.globalThis.addEventListener("mouseup",l,!0)},b=function(w){n.globalThis.document.removeEventListener("pointermove",c,!0),w.removeEventListener("pointerdown",u,!0),w.removeEventListener("pointerleave",d,!0),w.removeEventListener("pointerover",f,!0),n.globalThis.removeEventListener("pointerup",l,!0)},_=function(w){w.removeEventListener("touchstart",u,!0),w.removeEventListener("touchend",l,!0),w.removeEventListener("touchmove",c,!0),w.removeEventListener("touchcancel",h,!0)},O=function(w){n.globalThis.document.removeEventListener("mousemove",c,!0),w.removeEventListener("mousedown",u,!0),w.removeEventListener("mouseout",d,!0),w.removeEventListener("mouseover",f,!0),n.globalThis.removeEventListener("mouseup",l,!0)};i.hooks.init.tap(t.tag,function(){var w=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(w.style.msContentZooming="none",w.style.msTouchAction="none"):s.supportsPointerEvents&&(w.style.touchAction="none"),s.supportsPointerEvents?g(w):m(w),s.supportsTouchEvents&&y(w),o.useNativeClickEvent&&w.addEventListener("click",v,!0),w.addEventListener("wheel",p,{passive:!0,capture:!0})}),i.hooks.destroy.tap(t.tag,function(){var w=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(w.style.msContentZooming="",w.style.msTouchAction=""):s.supportsPointerEvents&&(w.style.touchAction=""),s.supportsPointerEvents?b(w):O(w),s.supportsTouchEvents&&_(w),o.useNativeClickEvent&&w.removeEventListener("click",v,!0),w.removeEventListener("wheel",p,!0)})},t.tag="DOMInteraction",t}(),k7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="dom-interaction",n}return e.prototype.init=function(){this.addRenderingPlugin(new C7)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(to),R7="g-canvas-camera",L7=function(){function t(){this.displayObjectHTMLElementMap=new WeakMap}return t.prototype.joinTransformMatrix=function(e){return"matrix(".concat([e[0],e[1],e[4],e[5],e[12],e[13]].join(","),")")},t.prototype.apply=function(e,n){var r=this,i=e.camera,a=e.renderingContext,o=e.renderingService;this.context=e;var s=a.root.ownerDocument.defaultView,c=s.context.eventService.nativeHTMLMap,l=function(v,g){g.style.transform=r.joinTransformMatrix(v.getWorldTransform())},u=function(v){var g=v.target;if(g.nodeName===bt.HTML){r.$camera||(r.$camera=r.createCamera(i));var y=r.getOrCreateEl(g);if(r.$camera.appendChild(y),n.enableCSSParsing){var m=g.ownerDocument.documentElement.attributes;Object.keys(m).forEach(function(b){y.style[b]=m[b]})}Object.keys(g.attributes).forEach(function(b){r.updateAttribute(b,g)}),l(g,y),c.set(y,g)}},f=function(v){var g=v.target;if(g.nodeName===bt.HTML&&r.$camera){var y=r.getOrCreateEl(g);y&&(y.remove(),c.delete(y))}},d=function(v){var g=v.target;if(g.nodeName===bt.HTML){var y=v.attrName;r.updateAttribute(y,g)}},h=function(v){var g=v.target;if(g.nodeName===bt.HTML){var y=r.getOrCreateEl(g);l(g,y)}},p=function(){if(r.$camera){var v=r.context.config,g=v.width,y=v.height;r.$camera.style.width="".concat(g||0,"px"),r.$camera.style.height="".concat(y||0,"px")}};o.hooks.init.tap(t.tag,function(){s.addEventListener(hi.RESIZE,p),s.addEventListener(Re.MOUNTED,u),s.addEventListener(Re.UNMOUNTED,f),s.addEventListener(Re.ATTR_MODIFIED,d),s.addEventListener(Re.BOUNDS_CHANGED,h)}),o.hooks.endFrame.tap(t.tag,function(){r.$camera&&a.renderReasons.has(io.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(i.getOrthoMatrix()))}),o.hooks.destroy.tap(t.tag,function(){r.$camera&&r.$camera.remove(),s.removeEventListener(hi.RESIZE,p),s.removeEventListener(Re.MOUNTED,u),s.removeEventListener(Re.UNMOUNTED,f),s.removeEventListener(Re.ATTR_MODIFIED,d),s.removeEventListener(Re.BOUNDS_CHANGED,h)})},t.prototype.createCamera=function(e){var n=this.context.config,r=n.document,i=n.width,a=n.height,o=this.context.contextService.getDomElement(),s=o.parentNode;if(s){var c=R7,l=s.querySelector("#"+c);if(!l){var u=(r||document).createElement("div");l=u,u.id=c,u.style.position="absolute",u.style.left="".concat(o.offsetLeft||0,"px"),u.style.top="".concat(o.offsetTop||0,"px"),u.style.transformOrigin="left top",u.style.transform=this.joinTransformMatrix(e.getOrthoMatrix()),u.style.overflow="hidden",u.style.pointerEvents="none",u.style.width="".concat(i||0,"px"),u.style.height="".concat(a||0,"px"),s.appendChild(u)}return l}return null},t.prototype.getOrCreateEl=function(e){var n=this.context.config.document,r=this.displayObjectHTMLElementMap.get(e);return r||(r=(n||document).createElement("div"),e.parsedStyle.$el=r,this.displayObjectHTMLElementMap.set(e,r),e.id&&(r.id=e.id),e.name&&r.setAttribute("name",e.name),e.className&&(r.className=e.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(e.getWorldTransform())),r},t.prototype.updateAttribute=function(e,n){var r=this.getOrCreateEl(n);switch(e){case"innerHTML":var i=n.parsedStyle.innerHTML;er(i)?r.innerHTML=i:(r.innerHTML="",r.appendChild(i));break;case"transformOrigin":var a=n.parsedStyle.transformOrigin;r.style["transform-origin"]="".concat(a[0].value," ").concat(a[1].value);break;case"width":if(this.context.enableCSSParsing){var o=n.computedStyleMap().get("width");r.style.width=o.toString()}else{var o=n.parsedStyle.width;r.style.width=(0,xr.Z)(o)?"".concat(o,"px"):o.toString()}break;case"height":if(this.context.enableCSSParsing){var s=n.computedStyleMap().get("height");r.style.height=s.toString()}else{var s=n.parsedStyle.height;r.style.height=(0,xr.Z)(s)?"".concat(s,"px"):s.toString()}break;case"zIndex":var c=n.parsedStyle.zIndex;r.style["z-index"]="".concat(c);break;case"visibility":var l=n.parsedStyle.visibility;r.style.visibility=l;break;case"pointerEvents":var u=n.parsedStyle.pointerEvents;r.style.pointerEvents=u;break;case"opacity":var f=n.parsedStyle.opacity;r.style.opacity="".concat(f);break;case"fill":var d=n.parsedStyle.fill,h="";gf(d)?d.isNone?h="transparent":h=n.getAttribute("fill"):Array.isArray(d)?h=n.getAttribute("fill"):tl(d),r.style.background=h;break;case"stroke":var p=n.parsedStyle.stroke,v="";gf(p)?p.isNone?v="transparent":v=n.getAttribute("stroke"):Array.isArray(p)?v=n.getAttribute("stroke"):tl(p),r.style["border-color"]=v,r.style["border-style"]="solid";break;case"lineWidth":var g=n.parsedStyle.lineWidth;r.style["border-width"]="".concat(g||0,"px");break;case"lineDash":r.style["border-style"]="dashed";break;case"filter":var y=n.style.filter;r.style.filter=y;break;default:e!=="x"&&e!=="y"&&!(0,ye.Z)(n.style[e])&&n.style[e]!==""&&(r.style[e]=n.style[e])}},t.tag="HTMLRendering",t}(),N7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="html-renderer",n}return e.prototype.init=function(){this.addRenderingPlugin(new L7)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(to),I7=function(){function t(e){this.canvasConfig=e,this.imageCache={},this.gradientCache={},this.patternCache={}}return t.prototype.getImageSync=function(e,n){return this.imageCache[e]?n&&n(this.imageCache[e]):this.getOrCreateImage(e).then(function(r){n&&n(r)}),this.imageCache[e]},t.prototype.getOrCreateImage=function(e){var n=this;if(this.imageCache[e])return Promise.resolve(this.imageCache[e]);var r=this.canvasConfig.createImage;return new Promise(function(i,a){var o;r?o=r(e):rl&&(o=new window.Image),o&&(o.onload=function(){n.imageCache[e]=o,i(o)},o.onerror=function(s){a(s)},o.crossOrigin="Anonymous",o.src=e)})},t.prototype.getOrCreatePatternSync=function(e,n,r,i,a){var o=this.generatePatternKey(e);if(o&&this.patternCache[o])return this.patternCache[o];var s=e.image,c=e.repetition,l=e.transform,u,f=!1;er(s)?u=this.getImageSync(s,a):r?(u=r,f=!0):u=s;var d=u&&n.createPattern(u,c);if(d){var h=void 0;l?h=C0(xf(l),new Yr({})):h=qt.identity(qt.create()),f&&qt.scale(h,h,[1/i,1/i,1]),d.setTransform({a:h[0],b:h[1],c:h[4],d:h[5],e:h[12],f:h[13]})}return o&&d&&(this.patternCache[o]=d),d},t.prototype.getOrCreateGradient=function(e,n){var r=this.generateGradientKey(e),i=e.type,a=e.steps,o=e.width,s=e.height,c=e.angle,l=e.cx,u=e.cy,f=e.size;if(this.gradientCache[r])return this.gradientCache[r];var d=null;if(i===oa.LinearGradient){var h=I8(o,s,c),p=h.x1,v=h.y1,g=h.x2,y=h.y2;d=n.createLinearGradient(p,v,g,y)}else if(i===oa.RadialGradient){var m=j8(o,s,l,u,f),b=m.x,_=m.y,O=m.r;d=n.createRadialGradient(b,_,0,b,_,O)}return d&&(a.forEach(function(w){var M=w.offset,E=w.color;M.unit===ne.kPercentage&&(d==null||d.addColorStop(M.value/100,E.toString()))}),this.gradientCache[r]=d),this.gradientCache[r]},t.prototype.generateGradientKey=function(e){var n=e.type,r=e.width,i=e.height,a=e.steps,o=e.angle,s=e.cx,c=e.cy,l=e.size;return"gradient-".concat(n,"-").concat((o==null?void 0:o.toString())||0,"-").concat((s==null?void 0:s.toString())||0,"-").concat((c==null?void 0:c.toString())||0,"-").concat((l==null?void 0:l.toString())||0,"-").concat(r,"-").concat(i,"-").concat(a.map(function(u){var f=u.offset,d=u.color;return"".concat(f).concat(d)}).join("-"))},t.prototype.generatePatternKey=function(e){var n=e.image,r=e.repetition;if(er(n))return"pattern-".concat(n,"-").concat(r);if(n.nodeName==="rect")return"pattern-".concat(n.entity,"-").concat(r)},t}(),j7=function(){function t(){}return t.prototype.apply=function(e){var n=e.renderingService,r=e.renderingContext,i=e.imagePool,a=r.root.ownerDocument.defaultView,o=function(l,u,f){var d=l.parsedStyle,h=d.width,p=d.height;h&&!p?l.setAttribute("height",f/u*h):!h&&p&&l.setAttribute("width",u/f*p)},s=function(l){var u=l.target,f=u.nodeName,d=u.attributes;if(f===bt.IMAGE){var h=d.img,p=d.keepAspectRatio;er(h)&&i.getImageSync(h,function(v){var g=v.width,y=v.height;p&&o(u,g,y),u.renderable.dirty=!0,n.dirtify()})}},c=function(l){var u=l.target,f=l.attrName,d=l.newValue;u.nodeName===bt.IMAGE&&f==="img"&&er(d)&&i.getOrCreateImage(d).then(function(h){var p=h.width,v=h.height;u.attributes.keepAspectRatio&&o(u,p,v),u.renderable.dirty=!0,n.dirtify()})};n.hooks.init.tap(t.tag,function(){a.addEventListener(Re.MOUNTED,s),a.addEventListener(Re.ATTR_MODIFIED,c)}),n.hooks.destroy.tap(t.tag,function(){a.removeEventListener(Re.MOUNTED,s),a.removeEventListener(Re.ATTR_MODIFIED,c)})},t.tag="LoadImage",t}(),D7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="image-loader",n}return e.prototype.init=function(){this.context.imagePool=new I7(this.context.config),this.addRenderingPlugin(new j7)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(to),F7=function(){function t(e){this.renderingContext=e.renderingContext,this.canvasConfig=e.config}return t.prototype.init=function(){var e=this.canvasConfig,n=e.container,r=e.canvas;if(r)this.$canvas=r,n&&r.parentElement!==n&&n.appendChild(r),this.$container=r.parentElement,this.canvasConfig.container=this.$container;else if(n&&(this.$container=er(n)?document.getElementById(n):n,this.$container)){var i=document.createElement("canvas");this.$container.appendChild(i),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=i}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)},t.prototype.getContext=function(){return this.context},t.prototype.getDomElement=function(){return this.$canvas},t.prototype.getDPR=function(){return this.dpr},t.prototype.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},t.prototype.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},t.prototype.resize=function(e,n){var r=this.canvasConfig.devicePixelRatio,i=r||rl&&window.devicePixelRatio||1;i=i>=1?Math.ceil(i):1,this.dpr=i,this.$canvas&&(this.$canvas.width=this.dpr*e,this.$canvas.height=this.dpr*n,W6(this.$canvas,e,n)),this.renderingContext.renderReasons.add(io.CAMERA_CHANGED)},t.prototype.applyCursorStyle=function(e){this.$container&&this.$container.style&&(this.$container.style.cursor=e)},t.prototype.toDataURL=function(e){return e===void 0&&(e={}),(0,S.mG)(this,void 0,void 0,function(){var n,r;return(0,S.Jh)(this,function(i){return n=e.type,r=e.encoderOptions,[2,this.context.canvas.toDataURL(n,r)]})})},t}(),B7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="canvas-context-register",n}return e.prototype.init=function(){this.context.ContextService=F7},e.prototype.destroy=function(){delete this.context.ContextService},e}(to),O_=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n)||this;return r.registerPlugin(new B7),r.registerPlugin(new D7),r.registerPlugin(new o7),r.registerPlugin(new P7),r.registerPlugin(new k7),r.registerPlugin(new M7),r.registerPlugin(new N7),r}return e}(a8),z7=function(){function t(e){this.dragndropPluginOptions=e}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,a=i.root.ownerDocument,o=a.defaultView,s=function(c){var l=c.target,u=l===a,f=u&&n.dragndropPluginOptions.isDocumentDraggable?a:l.closest&&l.closest("[draggable=true]");if(f){var d=!1,h=c.timeStamp,p=[c.clientX,c.clientY],v=null,g=[c.clientX,c.clientY],y=function(b){return(0,S.mG)(n,void 0,void 0,function(){var _,O,w,M,E,A;return(0,S.Jh)(this,function(P){switch(P.label){case 0:if(!d){if(_=b.timeStamp-h,O=li([b.clientX,b.clientY],p),_<=this.dragndropPluginOptions.dragstartTimeThreshold||O<=this.dragndropPluginOptions.dragstartDistanceThreshold)return[2];b.type="dragstart",f.dispatchEvent(b),d=!0}return b.type="drag",b.dx=b.clientX-g[0],b.dy=b.clientY-g[1],f.dispatchEvent(b),g=[b.clientX,b.clientY],u?[3,2]:(w=this.dragndropPluginOptions.overlap==="pointer"?[b.canvasX,b.canvasY]:l.getBounds().center,[4,a.elementsFromPoint(w[0],w[1])]);case 1:M=P.sent(),E=M[M.indexOf(l)+1],A=(E==null?void 0:E.closest("[droppable=true]"))||(this.dragndropPluginOptions.isDocumentDroppable?a:null),v!==A&&(v&&(b.type="dragleave",b.target=v,v.dispatchEvent(b)),A&&(b.type="dragenter",b.target=A,A.dispatchEvent(b)),v=A,v&&(b.type="dragover",b.target=v,v.dispatchEvent(b))),P.label=2;case 2:return[2]}})})};o.addEventListener("pointermove",y);var m=function(b){if(d){b.detail={preventClick:!0};var _=b.clone();v&&(_.type="drop",_.target=v,v.dispatchEvent(_)),_.type="dragend",f.dispatchEvent(_),d=!1}o.removeEventListener("pointermove",y)};l.addEventListener("pointerup",m,{once:!0}),l.addEventListener("pointerupoutside",m,{once:!0})}};r.hooks.init.tap(t.tag,function(){o.addEventListener("pointerdown",s)}),r.hooks.destroy.tap(t.tag,function(){o.removeEventListener("pointerdown",s)})},t.tag="Dragndrop",t}(),w_=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=t.call(this)||this;return r.options=n,r.name="dragndrop",r}return e.prototype.init=function(){this.addRenderingPlugin(new z7((0,S.pi)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e.prototype.setOptions=function(n){Object.assign(this.plugins[0].dragndropPluginOptions,n)},e}(to);function G7(t,e,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,n||t.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,e),s&&t.apply(i,a)}}var S_=G7,W7=function(t){return typeof t=="object"&&t!==null},J0=W7,H7=function(t){if(!J0(t)||!(0,rf.Z)(t,"Object"))return!1;if(Object.getPrototypeOf(t)===null)return!0;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},co=H7,Y7=5;function V7(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(t==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}function M_(t,e,n,r){n=n||0,r=r||Y7;for(var i in e)if(V7(e,i)){var a=e[i];a!==null&&co(a)?(co(t[i])||(t[i]={}),n<r?M_(t[i],a,n+1,r):t[i]=e[i]):jr(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var $7=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)M_(t,e[r]);return t},Nt=$7;class X7 extends Map{constructor(e,n=T_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(tv(this,e))}has(e){return super.has(tv(this,e))}set(e,n){return super.set(E_(this,e),n)}delete(e){return super.delete(A_(this,e))}}class sdt extends null{constructor(e,n=T_){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(tv(this,e))}add(e){return super.add(E_(this,e))}delete(e){return super.delete(A_(this,e))}}function tv({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function E_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function A_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function T_(t){return t!==null&&typeof t=="object"?t.valueOf():t}function ul(t){return t}function Kn(t,...e){return Xs(t,ul,ul,e)}function Yf(t,...e){return Xs(t,Array.from,ul,e)}function P_(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([a,o])=>[...i,a,o]));return t}function cdt(t,...e){return P_(Yf(t,...e),e)}function ldt(t,e,...n){return P_(nv(t,e,...n),n)}function ev(t,e,...n){return Xs(t,ul,e,n)}function nv(t,e,...n){return Xs(t,Array.from,e,n)}function udt(t,...e){return Xs(t,identity,C_,e)}function fdt(t,...e){return Xs(t,Array.from,C_,e)}function C_(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Xs(t,e,n,r){return function i(a,o){if(o>=r.length)return n(a);const s=new X7,c=r[o++];let l=-1;for(const u of a){const f=c(u,++l,a),d=s.get(f);d?d.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,i(f,o));return e(s)}(t,0)}var k_=function(t){return(0,ye.Z)(t)?"":t.toString()},U7=function(t){var e=k_(t);return e.charAt(0).toLowerCase()+e.substring(1)},R_=U7,q7=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};function Jo(t){return t}function rv(t){return t.reduce((e,n)=>(r,...i)=>n(e(r,...i),...i),Jo)}function Z7(t){return t.reduce((e,n)=>r=>q7(this,void 0,void 0,function*(){const i=yield e(r);return n(i)}),Jo)}function iv(t){return t.replace(/( |^)[a-z]/g,e=>e.toUpperCase())}function Us(t=""){throw new Error(t)}function av(t,e){const{attributes:n}=e,r=new Set(["id","className"]);for(const[i,a]of Object.entries(n))r.has(i)||(i==="transform"&&t.attr(i,""),t.attr(i,a))}function Ln(t){return t!=null&&!Number.isNaN(t)}function ddt(t,e){return t+(e-t)*Math.random()}function K7(t){const e=new Map;return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}function Q7(t,e){const{transform:n}=t.style,i=(a=>a==="none"||a===void 0)(n)?"":n;t.style.transform=`${i} ${e}`.trimStart()}function se(t,e){return L_(t,e)||{}}function L_(t,e){const n=Object.entries(t||{}).filter(([r])=>r.startsWith(e)).map(([r,i])=>[R_(r.replace(e,"").trim()),i]).filter(([r])=>!!r);return n.length===0?null:Object.fromEntries(n)}function hdt(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[`${e}${upperFirst(n)}`,r]))}function J7(t,e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.find(r=>n.startsWith(r))))}function ov(t,...e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.every(r=>!n.startsWith(r))))}function N_(t,e){if(t===void 0)return null;if(typeof t=="number")return t;const n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function fl(t){return typeof t=="object"&&!(t instanceof Date)&&t!==null&&!Array.isArray(t)}function La(t){return t===null||t===!1}function I_(t,e,n=5,r=0){if(!(r>=n)){for(const i of Object.keys(e)){const a=e[i];!co(a)||!co(t[i])?t[i]=a:I_(t[i],a,n,r+1)}return t}}function Ne(t){return new _r([t],null,t,t.ownerDocument)}class _r{constructor(e=null,n=null,r=null,i=null,a=[null,null,null,null,null],o=[],s=[]){this._elements=Array.from(e),this._data=n,this._parent=r,this._document=i,this._enter=a[0],this._update=a[1],this._exit=a[2],this._merge=a[3],this._split=a[4],this._transitions=o,this._facetElements=s}selectAll(e){const n=typeof e=="string"?this._parent.querySelectorAll(e):e;return new _r(n,null,this._elements[0],this._document)}selectFacetAll(e){const n=typeof e=="string"?this._parent.querySelectorAll(e):e;return new _r(this._elements,null,this._parent,this._document,void 0,void 0,n)}select(e){const n=typeof e=="string"?this._parent.querySelectorAll(e)[0]||null:e;return new _r([n],null,n,this._document)}append(e){const n=typeof e=="function"?e:()=>this.createElement(e),r=[];if(this._data!==null){for(let i=0;i<this._data.length;i++){const a=this._data[i],[o,s]=Array.isArray(a)?a:[a,null],c=n(o,i);c.__data__=o,s!==null&&(c.__fromElements__=s),this._parent.appendChild(c),r.push(c)}return new _r(r,null,this._parent,this._document)}else{for(let i=0;i<this._elements.length;i++){const a=this._elements[i],o=a.__data__,s=n(o,i);a.appendChild(s),r.push(s)}return new _r(r,null,r[0],this._document)}}maybeAppend(e,n,r){const i=this._elements[0],a=i.getElementById(e);if(a)return new _r([a],null,this._parent,this._document);const o=typeof n=="string"?this.createElement(n):n();return o.id=e,r&&(o.className=r),i.appendChild(o),new _r([o],null,this._parent,this._document)}data(e,n=i=>i,r=()=>null){const i=[],a=[],o=new Set(this._elements),s=[],c=new Set,l=new Map(this._elements.map((h,p)=>[n(h.__data__,p),h])),u=new Map(this._facetElements.map((h,p)=>[n(h.__data__,p),h])),f=Kn(this._elements,h=>r(h.__data__));for(let h=0;h<e.length;h++){const p=e[h],v=n(p,h),g=r(p,h);if(l.has(v)){const y=l.get(v);y.__data__=p,y.__facet__=!1,a.push(y),o.delete(y),l.delete(v)}else if(u.has(v)){const y=u.get(v);y.__data__=p,y.__facet__=!0,a.push(y),u.delete(v)}else if(f.has(v)){const y=f.get(v);s.push([p,y]);for(const m of y)o.delete(m);f.delete(v)}else if(l.has(g)){const y=l.get(g);y.__toData__?y.__toData__.push(p):y.__toData__=[p],c.add(y),o.delete(y)}else i.push(p)}const d=[new _r([],i,this._parent,this._document),new _r(a,null,this._parent,this._document),new _r(o,null,this._parent,this._document),new _r([],s,this._parent,this._document),new _r(c,null,this._parent,this._document)];return new _r(this._elements,null,this._parent,this._document,d)}merge(e){const n=[...this._elements,...e._elements],r=[...this._transitions,...e._transitions];return new _r(n,null,this._parent,this._document,void 0,r)}createElement(e){if(this._document)return this._document.createElement(e,{});const n=_r.registry[e];return n?new n:Us(`Unknown node type: ${e}`)}join(e=o=>o,n=o=>o,r=o=>o.remove(),i=o=>o,a=o=>o.remove()){const o=e(this._enter),s=n(this._update),c=r(this._exit),l=i(this._merge),u=a(this._split);return s.merge(o).merge(c).merge(l).merge(u)}remove(){for(let e=0;e<this._elements.length;e++){const n=this._transitions[e];if(n){const r=Array.isArray(n)?n:[n];Promise.all(r.map(i=>i.finished)).then(()=>{this._elements[e].remove()})}else this._elements[e].remove()}return new _r([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let n=0;n<this._elements.length;n++){const r=this._elements[n],i=r.__data__;e(i,n,r)}return this}attr(e,n){const r=typeof n!="function"?()=>n:n;return this.each(function(i,a,o){n!==void 0&&(o[e]=r(i,a,o))})}style(e,n){const r=typeof n!="function"?()=>n:n;return this.each(function(i,a,o){n!==void 0&&(o.style[e]=r(i,a,o))})}transition(e){const n=typeof e!="function"?()=>e:e,{_transitions:r}=this;return this.each(function(i,a,o){r[a]=n(i,a,o)})}on(e,n){return this.each(function(r,i,a){a.addEventListener(e,n)}),this}call(e,...n){return e(this,...n),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}_r.registry={g:Dr,rect:Ko,circle:al,path:ni,text:ca,ellipse:j0,image:D0,line:ol,polygon:sl,polyline:F0,html:wf};const Sn={BEFORE_RENDER:"beforerender",AFTER_RENDER:"afterrender",BEFORE_PAINT:"beforepaint",AFTER_PAINT:"afterpaint",BEFORE_CHANGE_DATA:"beforechangedata",AFTER_CHANGE_DATA:"afterchangedata",BEFORE_CLEAR:"beforeclear",AFTER_CLEAR:"afterclear",BEFORE_DESTROY:"beforedestroy",AFTER_DESTROY:"afterdestroy",BEFORE_CHANGE_SIZE:"beforechangesize",AFTER_CHANGE_SIZE:"afterchangesize",POINTER_TAP:"pointertap",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_OVER:"pointerover",POINTER_OUT:"pointerout",POINTER_MOVE:"pointermove",POINTER_ENTER:"pointerenter",POINTER_LEAVE:"pointerleave",POINTER_UPOUTSIDE:"pointerupoutside",DRAG_START:"dragstart",DRAG:"drag",DRAG_END:"dragend",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"DROP",CLICK:"click",DBLCLICK:"dblclick"};var tF=function(t){var e=k_(t);return e.charAt(0).toUpperCase()+e.substring(1)},lo=tF;function eF(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Vf(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 nF(t){return t=Vf(Math.abs(t)),t?t[1]:NaN}function rF(t,e){return function(n,r){for(var i=n.length,a=[],o=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function iF(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var aF=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sv(t){if(!(e=aF.exec(t)))throw new Error("invalid format: "+t);var e;return new cv({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]})}sv.prototype=cv.prototype;function cv(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+""}cv.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 oF(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 j_;function sF(t,e){var n=Vf(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(j_=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Vf(t,Math.max(0,e+a-1))[0]}function D_(t,e){var n=Vf(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")}var F_={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:eF,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>D_(t*100,e),r:D_,s:sF,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function B_(t){return t}var z_=Array.prototype.map,G_=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function cF(t){var e=t.grouping===void 0||t.thousands===void 0?B_:rF(z_.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?B_:iF(z_.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function l(f){f=sv(f);var d=f.fill,h=f.align,p=f.sign,v=f.symbol,g=f.zero,y=f.width,m=f.comma,b=f.precision,_=f.trim,O=f.type;O==="n"?(m=!0,O="g"):F_[O]||(b===void 0&&(b=12),_=!0,O="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var w=v==="$"?n:v==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",M=v==="$"?r:/[%p]/.test(O)?o:"",E=F_[O],A=/[defgprs%]/.test(O);b=b===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function P(C){var D=w,N=M,k,R,I;if(O==="c")N=E(C)+N,C="";else{C=+C;var F=C<0||1/C<0;if(C=isNaN(C)?c:E(Math.abs(C),b),_&&(C=oF(C)),F&&+C==0&&p!=="+"&&(F=!1),D=(F?p==="("?p:s:p==="-"||p==="("?"":p)+D,N=(O==="s"?G_[8+j_/3]:"")+N+(F&&p==="("?")":""),A){for(k=-1,R=C.length;++k<R;)if(I=C.charCodeAt(k),48>I||I>57){N=(I===46?i+C.slice(k+1):C.slice(k))+N,C=C.slice(0,k);break}}}m&&!g&&(C=e(C,1/0));var B=D.length+C.length+N.length,z=B<y?new Array(y-B+1).join(d):"";switch(m&&g&&(C=e(z+C,z.length?y-N.length:1/0),z=""),h){case"<":C=D+C+N+z;break;case"=":C=D+z+C+N;break;case"^":C=z.slice(0,B=z.length>>1)+D+C+N+z.slice(B);break;default:C=z+D+C+N;break}return a(C)}return P.toString=function(){return f+""},P}function u(f,d){var h=l((f=sv(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(nF(d)/3)))*3,v=Math.pow(10,-p),g=G_[8+p/3];return function(y){return h(v*y)+g}}return{format:l,formatPrefix:u}}var $f,uo,lF;uF({thousands:",",grouping:[3],currency:["$",""]});function uF(t){return $f=cF(t),uo=$f.format,lF=$f.formatPrefix,$f}function fo(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function ts(t){return t.map((e,n)=>n)}function pdt(t){const e=t.length,n=t[0].length,r=new Array(n).fill(0).map(()=>new Array(e));for(let i=0;i<n;i++)for(let a=0;a<e;a++)r[i][a]=t[a][i];return r}function fF(t){return t[0]}function W_(t){return t[t.length-1]}function vdt(t){return!t.some(Array.isArray)}function dF(t){return Array.from(new Set(t))}function H_(t,e){const n=[[],[]];return t.forEach(r=>{n[e(r)?0:1].push(r)}),n}function Y_(t,e=t.length){if(e===1)return t.map(r=>[r]);const n=[];for(let r=0;r<t.length;r++){const i=t.slice(r+1);Y_(i,e-1).forEach(o=>{n.push([t[r],...o])})}return n}function hF(t){if(t.length===1)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...Y_(t,n));return e}var pF=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},dl=pF,lv=function(t,e){if(t===e)return!0;if(!t||!e||er(t)||er(e))return!1;if(dl(t)||dl(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=lv(t[r],e[r]),!!n);r++);return n}if(J0(t)||J0(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var n=!0,r=0;r<i.length&&(n=lv(t[i[r]],e[i[r]]),!!n);r++);return n}return!1},V_=lv;function Ii(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 Mn(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 gdt(t){return t*Math.PI/180}function ydt(t){return t*180/Math.PI}function vF(t,e){return t=t%(2*Math.PI),e=e%(2*Math.PI),t<0&&(t=2*Math.PI+t),e<0&&(e=2*Math.PI+e),t>=e&&(e=e+2*Math.PI),{startAngle:t,endAngle:e}}const $_=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1},n=Object.assign(Object.assign({},e),t);return Object.assign(Object.assign({},n),vF(n.startAngle,n.endAngle))},hl=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=$_(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};hl.props={};const X_=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},uv=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=X_(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...hl({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};uv.props={};function Xf(t,e,n){return Math.max(e,Math.min(t,n))}function Uf(t,e=10){return typeof t!="number"||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(e))}const gF=[["legendCategory",[[["color","discrete"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","discrete"]],[["color","discrete"],["opacity","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"]],[["color","discrete"],["opacity","constant"],["size","constant"]],[["color","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"]],[["color","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["shape","discrete"]],[["color","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"]],[["color","discrete"],["opacity","constant"]],[["color","discrete"],["shape","constant"]],[["color","constant"],["shape","discrete"]],[["color","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"]],[["color","discrete"]]]],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]],[["size","continuous"],["opacity","continuous"]],[["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",[[["color","distribution"],["opacity","continuous"]],[["color","distribution"]]]],["legendContinuous",[[["color","continuous"],["opacity","continuous"]],[["color","continuous"]],[["opacity","continuous"]]]]];var U_=mt(16290);function Gn(t){const{transformations:e}=t.getOptions();return e.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function Nn(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="polar")}function pl(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="reflect")&&e.some(([n])=>n.startsWith("transpose"))}function q_(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="helix")}function vl(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="parallel")}function Z_(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="fisheye")}function yF(t){return vl(t)&&Nn(t)}function qs(t){return q_(t)||Nn(t)}function K_(t){return Nn(t)&&Gn(t)}function mdt(t){return Nn(t)||vl(t)||pl(t)||K_(t)}function mF(t){if(qs(t)){const[e,n]=t.getSize(),r=t.getOptions().transformations.find(i=>i[0]==="polar");if(r)return Math.max(e,n)/2*r[4]}return 0}function qf(t){const{transformations:e}=t.getOptions(),[,,,n,r]=e.find(i=>i[0]==="polar");return[+n,+r]}function fv(t,e=!0){const{transformations:n}=t.getOptions(),[,r,i]=n.find(a=>a[0]==="polar");return e?[+r*180/Math.PI,+i*180/Math.PI]:[r,i]}function bF(t,e){const{transformations:n}=t.getOptions(),[,...r]=n.find(i=>i[0]===e);return r}function Q_(t,e){e(t),t.children&&t.children.forEach(function(n){n&&Q_(n,e)})}function gl(t){Zf(t,!0)}function ho(t){Zf(t,!1)}function Zf(t,e){var n=e?"visible":"hidden";Q_(t,function(r){r.attr("visibility",n)})}function xF(t){return typeof t=="boolean"?!1:"enter"in t&&"update"in t&&"exit"in t}function J_(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(r){var i=(0,S.CR)(r,1),a=i[0];return!e.includes(a)}));return Object.fromEntries(e.map(function(r){return xF(t)?t[r]===!1?[r,!1]:[r,(0,S.pi)((0,S.pi)({},t[r]),n)]:[r,n]}))}function Zs(t,e){t?t.finished.then(e):e()}function _F(t,e){t.length===0?e():Promise.all(t.map(function(n){return n==null?void 0:n.finished})).then(e)}function t2(t,e){"update"in t?t.update(e):t.attr(e)}function e2(t,e,n){if(e.length===0)return null;if(!n){var r=e.slice(-1)[0];return t2(t,{style:r}),null}return t.animate(e,n)}function OF(t,e){return!(t.nodeName!=="text"||e.nodeName!=="text"||t.attributes.text!==e.attributes.text)}function wF(t,e,n,r){if(r===void 0&&(r="destroy"),OF(t,e))return t.remove(),[null];var i=function(){r==="destroy"?t.destroy():r==="hide"&&ho(t),e.isVisible()&&gl(e)};if(!n)return i(),[null];var a=n.duration,o=a===void 0?0:a,s=n.delay,c=s===void 0?0:s,l=Math.ceil(+o/2),u=+o/4,f=function(C){if(C.nodeName==="circle"){var D=(0,S.CR)(C.getLocalPosition(),2),N=D[0],k=D[1],R=C.attr("r");return[N-R,k-R]}return C.getLocalPosition()},d=(0,S.CR)(f(t),2),h=d[0],p=d[1],v=(0,S.CR)(f(e),2),g=v[0],y=v[1],m=(0,S.CR)([(h+g)/2-h,(p+y)/2-p],2),b=m[0],_=m[1],O=t.style.opacity,w=O===void 0?1:O,M=e.style.opacity,E=M===void 0?1:M,A=t.animate([{opacity:w,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(b,", ").concat(_,")")}],(0,S.pi)((0,S.pi)({fill:"both"},n),{duration:c+l+u})),P=e.animate([{opacity:0,transform:"translate(".concat(-b,", ").concat(-_,")"),offset:.01},{opacity:E,transform:"translate(0, 0)"}],(0,S.pi)((0,S.pi)({fill:"both"},n),{duration:l+u,delay:c+l-u}));return Zs(P,i),[A,P]}function qi(t,e,n){var r={},i={};return Object.entries(e).forEach(function(a){var o=(0,S.CR)(a,2),s=o[0],c=o[1];if(!(0,ye.Z)(c)){var l=t.style[s]||t.parsedStyle[s]||0;l!==c&&(r[s]=l,i[s]=c)}}),n?e2(t,[r,i],(0,S.pi)({fill:"both"},n)):(t2(t,i),null)}var SF=5,n2=function(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r=SF),Object.entries(e).forEach(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1],c=t;Object.prototype.hasOwnProperty.call(e,o)&&(s?co(s)?(co(t[o])||(c[o]={}),n<r?n2(t[o],s,n+1,r):c[o]=e[o]):jr(s)?(c[o]=[],c[o]=c[o].concat(s)):c[o]=s:c[o]=s)})},Na=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)n2(t,e[r]);return t},MF=function(t){(0,S.ZT)(e,t);function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,(0,S.ev)([],(0,S.CR)(n),!1))||this;return i.addEventListener(Re.INSERTED,function(){ho(i)}),i}return e}(Dr);function r2(t){var e=t.appendChild(new MF({class:"offscreen"}));return ho(e),e}function EF(t){for(var e=t;e;){if(e.className==="offscreen")return!0;e=e.parent}return!1}function AF(){Zf(this,this.attributes.visibility!=="hidden")}var Rr=function(t){(0,S.ZT)(e,t);function e(n,r){r===void 0&&(r={});var i=t.call(this,Na({},{style:r},n))||this;return i.initialized=!1,i._defaultOptions=r,i}return Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=r2(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},e.prototype.attributeChangedCallback=function(n){n==="visibility"&&AF.call(this)},e.prototype.update=function(n,r){var i;return this.attr(Na({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(n,r){},e}(Of);function pi(t,e,n,r,i){return r===void 0&&(r=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),t?n(e):(r&&i(e),null)}function TF(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}var dv=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({style:(0,S.pi)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},r)},i))||this}return Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=r2(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},e}(ca);function PF(t,e){var n=new Map;return t.forEach(function(r){var i=e(r);n.has(i)||n.set(i,[]),n.get(i).push(r)}),n}function CF(t){throw new Error(t)}var kF=function(){function t(i,a,o,s,c,l,u){i===void 0&&(i=null),a===void 0&&(a=null),o===void 0&&(o=null),s===void 0&&(s=null),c===void 0&&(c=[null,null,null,null,null]),l===void 0&&(l=[]),u===void 0&&(u=[]),e.add(this),this._elements=Array.from(i),this._data=a,this._parent=o,this._document=s,this._enter=c[0],this._update=c[1],this._exit=c[2],this._merge=c[3],this._split=c[4],this._transitions=l,this._facetElements=u}t.prototype.selectAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new n(a,null,this._elements[0],this._document)},t.prototype.selectFacetAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new n(this._elements,null,this._parent,this._document,void 0,void 0,a)},t.prototype.select=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i)[0]||null:i;return new n([a],null,a,this._document)},t.prototype.append=function(i){var a=this,o=typeof i=="function"?i:function(){return a.createElement(i)},s=[];if(this._data!==null){for(var c=0;c<this._data.length;c++){var l=this._data[c],u=(0,S.CR)(Array.isArray(l)?l:[l,null],2),f=u[0],d=u[1],h=o(f,c);h.__data__=f,d!==null&&(h.__fromElements__=d),this._parent.appendChild(h),s.push(h)}return new n(s,null,this._parent,this._document)}for(var c=0;c<this._elements.length;c++){var p=this._elements[c],f=p.__data__,h=o(f,c);p.appendChild(h),s.push(h)}return new n(s,null,s[0],this._document)},t.prototype.maybeAppend=function(i,a){var o=(0,S.Q_)(this,e,"m",r).call(this,i[0]==="#"?i:"#".concat(i),a);return o.attr("id",i),o},t.prototype.maybeAppendByClassName=function(i,a){var o=i.toString(),s=(0,S.Q_)(this,e,"m",r).call(this,o[0]==="."?o:".".concat(o),a);return s.attr("className",o),s},t.prototype.maybeAppendByName=function(i,a){var o=(0,S.Q_)(this,e,"m",r).call(this,'[name="'.concat(i,'"]'),a);return o.attr("name",i),o},t.prototype.data=function(i,a,o){var s,c;a===void 0&&(a=function(P){return P}),o===void 0&&(o=function(){return null});for(var l=[],u=[],f=new Set(this._elements),d=[],h=new Set,p=new Map(this._elements.map(function(P,C){return[a(P.__data__,C),P]})),v=new Map(this._facetElements.map(function(P,C){return[a(P.__data__,C),P]})),g=PF(this._elements,function(P){return o(P.__data__)}),y=0;y<i.length;y++){var m=i[y],b=a(m,y),_=o(m,y);if(p.has(b)){var O=p.get(b);O.__data__=m,O.__facet__=!1,u.push(O),f.delete(O),p.delete(b)}else if(v.has(b)){var O=v.get(b);O.__data__=m,O.__facet__=!0,u.push(O),v.delete(b)}else if(g.has(b)){var w=g.get(b);d.push([m,w]);try{for(var M=(s=void 0,(0,S.XA)(w)),E=M.next();!E.done;E=M.next()){var O=E.value;f.delete(O)}}catch(P){s={error:P}}finally{try{E&&!E.done&&(c=M.return)&&c.call(M)}finally{if(s)throw s.error}}g.delete(b)}else if(p.has(_)){var O=p.get(_);O.__toData__?O.__toData__.push(m):O.__toData__=[m],h.add(O),f.delete(O)}else l.push(m)}var A=[new n([],l,this._parent,this._document),new n(u,null,this._parent,this._document),new n(f,null,this._parent,this._document),new n([],d,this._parent,this._document),new n(h,null,this._parent,this._document)];return new n(this._elements,null,this._parent,this._document,A)},t.prototype.merge=function(i){var a=(0,S.ev)((0,S.ev)([],(0,S.CR)(this._elements),!1),(0,S.CR)(i._elements),!1),o=(0,S.ev)((0,S.ev)([],(0,S.CR)(this._transitions),!1),(0,S.CR)(i._transitions),!1);return new n(a,null,this._parent,this._document,void 0,o)},t.prototype.createElement=function(i){if(this._document)return this._document.createElement(i,{});var a=n.registry[i];return a?new a:CF("Unknown node type: ".concat(i))},t.prototype.join=function(i,a,o,s,c){i===void 0&&(i=function(p){return p}),a===void 0&&(a=function(p){return p}),o===void 0&&(o=function(p){return p.remove()}),s===void 0&&(s=function(p){return p}),c===void 0&&(c=function(p){return p.remove()});var l=i(this._enter),u=a(this._update),f=o(this._exit),d=s(this._merge),h=c(this._split);return u.merge(l).merge(f).merge(d).merge(h)},t.prototype.remove=function(){for(var i=function(s){var c=a._elements[s],l=a._transitions[s];l?l.then(function(){return c.remove()}):c.remove()},a=this,o=0;o<this._elements.length;o++)i(o);return new n([],null,this._parent,this._document,void 0,this._transitions)},t.prototype.each=function(i){for(var a=0;a<this._elements.length;a++){var o=this._elements[a],s=o.__data__;i.call(o,s,a)}return this},t.prototype.attr=function(i,a){var o=typeof a!="function"?function(){return a}:a;return this.each(function(s,c){a!==void 0&&(this[i]=o.call(this,s,c))})},t.prototype.style=function(i,a,o){o===void 0&&(o=!0);var s=typeof a!="function"||!o?function(){return a}:a;return this.each(function(c,l){a!==void 0&&(this.style[i]=s.call(this,c,l))})},t.prototype.styles=function(i,a){return i===void 0&&(i={}),a===void 0&&(a=!0),this.each(function(o,s){var c=this;Object.entries(i).forEach(function(l){var u=(0,S.CR)(l,2),f=u[0],d=u[1],h=typeof d!="function"||!a?function(){return d}:d;d!==void 0&&c.attr(f,h.call(c,o,s))})})},t.prototype.update=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,c){i&&this.update&&this.update(o.call(this,s,c))})},t.prototype.maybeUpdate=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,c){i&&this.update&&this.update(o.call(this,s,c))})},t.prototype.transition=function(i){var a=this._transitions;return this.each(function(o,s){a[s]=i.call(this,o,s)})},t.prototype.on=function(i,a){return this.each(function(){this.addEventListener(i,a)}),this},t.prototype.call=function(i){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];return i.call.apply(i,(0,S.ev)([this._parent,this],(0,S.CR)(a),!1)),this},t.prototype.node=function(){return this._elements[0]},t.prototype.nodes=function(){return this._elements},t.prototype.transitions=function(){return this._transitions.filter(function(i){return!!i})},t.prototype.parent=function(){return this._parent};var e,n,r;return n=t,e=new WeakSet,r=function(a,o){var s=this._elements[0],c=s.querySelector(a);if(c)return new n([c],null,this._parent,this._document);var l=typeof o=="string"?this.createElement(o):o();return s.appendChild(l),new n([l],null,this._parent,this._document)},t.registry={g:Dr,rect:Ko,circle:al,path:ni,text:dv,ellipse:j0,image:D0,line:ol,polygon:sl,polyline:F0,html:wf},t}();function Ue(t){return new kF([t],null,t,t.ownerDocument)}function RF(t,e,n){return t.querySelector(e)?Ue(t).select(e):Ue(t).append(n)}var ji=function(t,e){var n=function(i){return"".concat(e,"-").concat(i)},r=Object.fromEntries(Object.entries(t).map(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1],c=n(s);return[o,{name:c,class:".".concat(c),id:"#".concat(c),toString:function(){return c}}]}));return Object.assign(r,{prefix:n}),r},hv={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new ni({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]},bdt=Nt({},hv,{style:{type:"arc"}}),xdt=Nt({},hv,{style:{}}),Tn=ji({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis"),vi=function(t){return typeof t=="function"};function Ia(t,e){return[t[0]*e,t[1]*e]}function yl(t,e){return[t[0]+e[0],t[1]+e[1]]}function pv(t,e){return[t[0]-e[0],t[1]-e[1]]}function es(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function ns(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function ml(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function i2(t){if(t[0]===0&&t[1]===0)return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function _dt(t,e,n){var r=__read(t,2),i=r[0],a=r[1],o=__read(e,2),s=o[0],c=o[1],l=i-s,u=a-c,f=Math.sin(n),d=Math.cos(n);return[l*d-u*f+s,l*f+u*d+c]}function LF(t,e){return e?[t[1],-t[0]]:[-t[1],t[0]]}function Ks(t){return t*Math.PI/180}function a2(t){return Number((t*180/Math.PI).toPrecision(5))}function vv(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function NF(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}function IF(t,e){return"".concat(e).concat(vv(t))}function o2(t,e,n){var r;n===void 0&&(n=!0);var i=e||((r=t.match(/^([a-z][a-z0-9]+)/))===null||r===void 0?void 0:r[0])||"",a=t.replace(new RegExp("^(".concat(i,")")),"");return n?NF(a):a}function jF(t,e){Object.entries(e).forEach(function(n){var r=(0,S.CR)(n,2),i=r[0],a=r[1];(0,S.ev)([t],(0,S.CR)(t.querySelectorAll(i)),!1).filter(function(o){return o.matches(i)}).forEach(function(o){if(o){var s=o;s.style.cssText+=Object.entries(a).reduce(function(c,l){return"".concat(c).concat(l.join(":"),";")},"")}})})}var Kf=function(t,e){if(!(t!=null&&t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function en(t,e,n){n===void 0&&(n=!1);var r={};return Object.entries(t).forEach(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1];if(!(o==="className"||o==="class")){if(Kf(o,"show")&&Kf(o2(o,"show"),e)!==n)o===IF(e,"show")?r[o]=s:r[o.replace(new RegExp(vv(e)),"")]=s;else if(!Kf(o,"show")&&Kf(o,e)!==n){var c=o2(o,e);c==="filter"&&typeof s=="function"||(r[c]=s)}}}),r}function la(t,e){return Object.entries(t).reduce(function(n,r){var i=(0,S.CR)(r,2),a=i[0],o=i[1];return a.startsWith("show")?n["show".concat(e).concat(a.slice(4))]=o:n["".concat(e).concat(vv(a))]=o,n},{})}function ja(t,e){e===void 0&&(e=["x","y","class","className"]);var n=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},i={};return Object.entries(t).forEach(function(a){var o=(0,S.CR)(a,2),s=o[0],c=o[1];e.includes(s)||(n.indexOf(s)!==-1?i[s]=c:r[s]=c)}),[r,i]}function Di(t,e){return vi(t)?t.apply(void 0,(0,S.ev)([],(0,S.CR)(e),!1)):t}function Qf(t,e){return t.style.opacity||(t.style.opacity=1),qi(t,{opacity:0},e)}var DF=["$el","anchor","cx","cy","d","defX","defY","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function FF(t){return DF.includes(t)}function s2(t){var e={};for(var n in t)FF(n)&&(e[n]=t[n]);return e}var Qs=ji({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function c2(t){return t.reduce(function(e,n,r){return e.push((0,S.ev)([r===0?"M":"L"],(0,S.CR)(n),!1)),e},[])}function BF(t,e,n){var r=e.connect,i=r===void 0?"line":r,a=e.center;if(i==="line")return c2(t);if(!a)return[];var o=ml(t[0],a),s=n?0:1;return t.reduce(function(c,l,u){return u===0?c.push((0,S.ev)(["M"],(0,S.CR)(l),!1)):c.push((0,S.ev)(["A",o,o,0,0,s],(0,S.CR)(l),!1)),c},[])}function gv(t,e,n){return e.type==="surround"?BF(t,e,n):c2(t)}function zF(t,e,n){var r=n.type,i=n.connect,a=n.center,o=n.closed,s=o?[["Z"]]:[],c=(0,S.CR)([gv(t,n),gv(e.slice().reverse(),n,!0)],2),l=c[0],u=c[1],f=(0,S.CR)([t[0],e.slice(-1)[0]],2),d=f[0],h=f[1],p=function(m,b){return[l,m,u,b,s].flat()};if(i==="line"||r==="surround")return p([(0,S.ev)(["L"],(0,S.CR)(h),!1)],[(0,S.ev)(["L"],(0,S.CR)(d),!1)]);if(!a)throw new Error("Arc grid need to specified center");var v=(0,S.CR)([ml(h,a),ml(d,a)],2),g=v[0],y=v[1];return p([(0,S.ev)(["A",g,g,0,0,1],(0,S.CR)(h),!1),(0,S.ev)(["L"],(0,S.CR)(h),!1)],[(0,S.ev)(["A",y,y,0,0,0],(0,S.CR)(d),!1),(0,S.ev)(["L"],(0,S.CR)(d),!1)])}function GF(t,e,n,r){var i=n.animate,a=n.isBillboard,o=e.map(function(s,c){return{id:s.id||"grid-line-".concat(c),path:gv(s.points,n)}});return t.selectAll(Qs.line.class).data(o,function(s){return s.id}).join(function(s){return s.append("path").each(function(c,l){var u=Di(s2((0,S.pi)({path:c.path},r)),[c,l,o]);this.attr((0,S.pi)({class:Qs.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},u))})},function(s){return s.transition(function(c,l){var u=Di(s2((0,S.pi)({path:c.path},r)),[c,l,o]);return qi(this,u,i.update)})},function(s){return s.transition(function(){var c=this,l=Qf(this,i.exit);return Zs(l,function(){return c.remove()}),l})}).transitions()}function WF(t,e,n){var r=n.animate,i=n.connect,a=n.areaFill;if(e.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=function(p){return o[p%o.length]},c=[],l=0;l<e.length-1;l++){var u=(0,S.CR)([e[l].points,e[l+1].points],2),f=u[0],d=u[1],h=zF(f,d,n);c.push({path:h,fill:s(l)})}return t.selectAll(Qs.region.class).data(c,function(p,v){return v}).join(function(p){return p.append("path").each(function(v,g){var y=Di(v,[v,g,c]);this.attr(y)}).attr("className",Qs.region.name)},function(p){return p.transition(function(v,g){var y=Di(v,[v,g,c]);return qi(this,y,r.update)})},function(p){return p.transition(function(){var v=this,g=Qf(this,r.exit);return Zs(g,function(){return v.remove()}),g})}).transitions()}function HF(t){var e=t.data,n=e===void 0?[]:e,r=t.closed;return r?n.map(function(i){var a=i.points,o=(0,S.CR)(a,1),s=o[0];return(0,S.pi)((0,S.pi)({},i),{points:(0,S.ev)((0,S.ev)([],(0,S.CR)(a),!1),[s],!1)})}):n}var YF=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(n,r){var i=n.type,a=n.center,o=n.areaFill,s=n.closed,c=(0,S._T)(n,["type","center","areaFill","closed"]),l=HF(n),u=Ue(r).maybeAppendByClassName(Qs.lineGroup,"g"),f=Ue(r).maybeAppendByClassName(Qs.regionGroup,"g"),d=GF(u,l,n,c),h=WF(f,l,n);return(0,S.ev)((0,S.ev)([],(0,S.CR)(d),!1),(0,S.CR)(h),!1)},e}(Rr),Fi=function(t,e,n){for(var r=0,i=er(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?n:t},VF=function(t,e){return function(n){return t*(1-n)+e*n}};function $F(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0;return function(i){var a=new Array(r),o=new Array(n),s=0;for(s=0;s<r;++s)a[s]=yv(t[s],e[s]);for(;s<n;++s)o[s]=e[s];for(s=0;s<r;++s)o[s]=a[s](i);return o}}function XF(t,e){t===void 0&&(t={}),e===void 0&&(e={});var n={},r={};return Object.entries(e).forEach(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1];o in t?n[o]=yv(t[o],s):r[o]=s}),function(i){return Object.entries(n).forEach(function(a){var o=(0,S.CR)(a,2),s=o[0],c=o[1];return r[s]=c(i)}),r}}function yv(t,e){return typeof t=="number"&&typeof e=="number"?VF(t,e):Array.isArray(t)&&Array.isArray(e)?$F(t,e):typeof t=="object"&&typeof e=="object"?XF(t,e):function(n){return t}}function UF(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,a=i===void 0?0:i,o=yv(e,n),s=Math.ceil(+a/16),c=new Array(s).fill(0).map(function(l,u,f){return{__keyframe_data__:o(u/(f.length-1))}});return t.animate(c,(0,S.pi)({fill:"both"},r))}function rs(t){return typeof t=="function"?t():er(t)||(0,xr.Z)(t)?new dv({style:{text:String(t)}}):t}function mv(t,e,n){n===void 0&&(n=!1);var r=t.getBBox(),i=r.width,a=r.height,o=e/Math.max(i,a);return n&&t.scale(o),o}function l2(t,e){var n={},r=Array.isArray(e)?e:[e];for(var i in t)r.includes(i)||(n[i]=t[i]);return n}function u2(t,e){return Object.fromEntries(Object.entries(t).map(function(n){var r=(0,S.CR)(n,2),i=r[0],a=r[1];return[i,Di(a,e)]}))}function Odt(t){if(t.type==="linear"){var e=t.startPos,n=t.endPos;return __spreadArray(__spreadArray([],__read(e),!1),__read(n),!1)}var r=t.startAngle,i=t.endAngle,a=t.center,o=t.radius;return __spreadArray(__spreadArray([r,i],__read(a),!1),[o],!1)}function bv(t,e){return e&&vi(e)?t.filter(e):t}function f2(t,e){var n=e.startAngle,r=e.endAngle;return(r-n)*t+n}function Jf(t,e){if(e.type==="linear"){var n=(0,S.CR)(e.startPos,2),r=n[0],i=n[1],a=(0,S.CR)(e.endPos,2),o=a[0],s=a[1],c=(0,S.CR)([o-r,s-i],2),l=c[0],u=c[1];return i2([l,u])}var f=Ks(f2(t,e));return[-Math.sin(f),Math.cos(f)]}function xv(t,e,n){var r=Jf(t,n);return LF(r,e!=="positive")}function bl(t,e){return xv(t,e.labelDirection,e)}function qF(t,e){var n=(0,S.CR)(e.startPos,2),r=n[0],i=n[1],a=(0,S.CR)(e.endPos,2),o=a[0],s=a[1],c=(0,S.CR)([o-r,s-i],2),l=c[0],u=c[1];return[r+l*t,i+u*t]}function ZF(t,e){var n=e.radius,r=(0,S.CR)(e.center,2),i=r[0],a=r[1],o=Ks(f2(t,e));return[i+n*Math.cos(o),a+n*Math.sin(o)]}function td(t,e){return e.type==="linear"?qF(t,e):ZF(t,e)}function d2(t){return Jf(0,t)[1]===0}function h2(t){return Jf(0,t)[0]===0}function p2(t,e){return e-t===360}function v2(t,e,n,r,i){var a=e-t,o=(0,S.CR)([i,i],2),s=o[0],c=o[1],l=(0,S.CR)([Ks(t),Ks(e)],2),u=l[0],f=l[1],d=function(P){return[n+i*Math.cos(P),r+i*Math.sin(P)]},h=(0,S.CR)(d(u),2),p=h[0],v=h[1],g=(0,S.CR)(d(f),2),y=g[0],m=g[1];if(p2(t,e)){var b=(f+u)/2,_=(0,S.CR)(d(b),2),O=_[0],w=_[1];return[["M",p,v],["A",s,c,0,1,0,O,w],["A",s,c,0,1,0,y,m]]}var M=a>180?1:0,E=t>e?0:1,A=!1;return A?"M".concat(n,",").concat(r,",L").concat(p,",").concat(v,",A").concat(s,",").concat(c,",0,").concat(M,",").concat(E,",").concat(y,",").concat(m,",L").concat(n,",").concat(r):"M".concat(p,",").concat(v,",A").concat(s,",").concat(c,",0,").concat(M,",").concat(E,",").concat(y,",").concat(m)}function KF(t){var e=t.attributes,n=e.startAngle,r=e.endAngle,i=e.center,a=e.radius;return(0,S.ev)((0,S.ev)([n,r],(0,S.CR)(i),!1),[a],!1)}function QF(t,e,n,r){var i=e.startAngle,a=e.endAngle,o=e.center,s=e.radius;return t.selectAll(Tn.line.class).data([{path:v2.apply(void 0,(0,S.ev)((0,S.ev)([i,a],(0,S.CR)(o),!1),[s],!1))}],function(c,l){return l}).join(function(c){return c.append("path").attr("className",Tn.line.name).styles(e).styles({path:function(l){return l.path}})},function(c){return c.transition(function(){var l=this,u=UF(this,KF(this),(0,S.ev)((0,S.ev)([i,a],(0,S.CR)(o),!1),[s],!1),r.update);if(u){var f=function(){var d=Fi(l.attributes,"__keyframe_data__");l.style.path=v2.apply(void 0,(0,S.ev)([],(0,S.CR)(d),!1))};u.onframe=f,u.onfinish=f}return u}).styles(e)},function(c){return c.remove()}).styles(n).transitions()}function JF(t,e){var n=e.truncRange,r=e.truncShape,i=e.lineExtension}function tB(t,e,n){n===void 0&&(n=[0,0]);var r=(0,S.CR)([t,e,n],3),i=(0,S.CR)(r[0],2),a=i[0],o=i[1],s=(0,S.CR)(r[1],2),c=s[0],l=s[1],u=(0,S.CR)(r[2],2),f=u[0],d=u[1],h=(0,S.CR)([c-a,l-o],2),p=h[0],v=h[1],g=Math.sqrt(Math.pow(p,2)+Math.pow(v,2)),y=(0,S.CR)([-f/g,d/g],2),m=y[0],b=y[1];return[m*p,m*v,b*p,b*v]}function g2(t){var e=(0,S.CR)(t,2),n=(0,S.CR)(e[0],2),r=n[0],i=n[1],a=(0,S.CR)(e[1],2),o=a[0],s=a[1];return{x1:r,y1:i,x2:o,y2:s}}function eB(t,e,n,r){var i=e.showTrunc,a=e.startPos,o=e.endPos,s=e.truncRange,c=e.lineExtension,l=(0,S.CR)([a,o],2),u=(0,S.CR)(l[0],2),f=u[0],d=u[1],h=(0,S.CR)(l[1],2),p=h[0],v=h[1],g=(0,S.CR)(c?tB(a,o,c):new Array(4).fill(0),4),y=g[0],m=g[1],b=g[2],_=g[3],O=function(B){return t.selectAll(Tn.line.class).data(B,function(z,Y){return Y}).join(function(z){return z.append("line").attr("className",function(Y){return"".concat(Tn.line.name," ").concat(Y.className)}).styles(n).transition(function(Y){return qi(this,g2(Y.line),!1)})},function(z){return z.styles(n).transition(function(Y){var U=Y.line;return qi(this,g2(U),r.update)})},function(z){return z.remove()}).transitions()};if(!i||!s)return O([{line:[[f+y,d+m],[p+b,v+_]],className:Tn.line.name}]);var w=(0,S.CR)(s,2),M=w[0],E=w[1],A=p-f,P=v-d,C=(0,S.CR)([f+A*M,d+P*M],2),D=C[0],N=C[1],k=(0,S.CR)([f+A*E,d+P*E],2),R=k[0],I=k[1],F=O([{line:[[f+y,d+m],[D,N]],className:Tn.lineFirst.name},{line:[[R,I],[p+b,v+_]],className:Tn.lineSecond.name}]);return JF(t,e),F}function nB(t,e,n,r){var i=n.showArrow,a=n.showTrunc,o=n.lineArrow,s=n.lineArrowOffset,c=n.lineArrowSize,l;if(e==="arc"?l=t.select(Tn.line.class):a?l=t.select(Tn.lineSecond.class):l=t.select(Tn.line.class),!i||!o||n.type==="arc"&&p2(n.startAngle,n.endAngle)){var u=l.node();u&&(u.style.markerEnd=void 0);return}var f=rs(o);f.attr(r),mv(f,c,!0),l.style("markerEnd",f).style("markerEndOffset",-s)}function rB(t,e,n){var r=e.type,i,a=en(e,"line");return r==="linear"?i=eB(t,e,l2(a,"arrow"),n):i=QF(t,e,l2(a,"arrow"),n),nB(t,r,e,a),i}function iB(t,e){return xv(t,e.gridDirection,e)}function y2(t){var e=t.type,n=t.gridCenter;return e==="linear"?n:n||t.center}function aB(t,e){var n=e.gridLength;return t.map(function(r,i){var a=r.value,o=(0,S.CR)(td(a,e),2),s=o[0],c=o[1],l=(0,S.CR)(Ia(iB(a,e),n),2),u=l[0],f=l[1];return{id:i,points:[[s,c],[s+u,c+f]]}})}function oB(t,e){var n=e.gridControlAngles,r=y2(e);if(!r)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(!n||n.length===0)throw new Error("Invalid gridControlAngles");var i=(0,S.CR)(r,2),a=i[0],o=i[1];return t.map(function(s,c){var l=s.value,u=(0,S.CR)(td(l,e),2),f=u[0],d=u[1],h=(0,S.CR)([f-a,d-o],2),p=h[0],v=h[1],g=[];return n.forEach(function(y){var m=Ks(y),b=(0,S.CR)([Math.cos(m),Math.sin(m)],2),_=b[0],O=b[1],w=p*_-v*O+a,M=p*O+v*_+o;g.push([w,M])}),{points:g,id:c}})}function sB(t,e,n,r){var i=en(n,"grid"),a=i.type,o=i.areaFill,s=y2(n),c=bv(e,n.gridFilter),l=a==="segment"?aB(c,n):oB(c,n),u=(0,S.pi)((0,S.pi)({},i),{center:s,areaFill:vi(o)?c.map(function(f,d){return Di(o,[f,d,c])}):o,animate:r,data:l});return t.selectAll(Tn.grid.class).data([1]).join(function(f){return f.append(function(){return new YF({style:u})}).attr("className",Tn.grid.name)},function(f){return f.transition(function(){return this.update(u)})},function(f){return f.remove()}).transitions()}function Fr(t,e,n,r,i){return r===void 0&&(r=!0),i===void 0&&(i=!1),r&&t===e||i&&t===n?!0:t>e&&t<n}function _v(t){var e,n,r,i=t||1;function a(s,c){++e>i&&(r=n,o(1),++e),n[s]=c}function o(s){e=0,n=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return n[s]!==void 0||r[s]!==void 0},get:function(s){var c=n[s];if(c!==void 0)return c;if((c=r[s])!==void 0)return a(s,c),c},set:function(s,c){n[s]!==void 0?n[s]=c:a(s,c)}}}var cB=function(t,e,n){if(n===void 0&&(n=128),!vi(t))throw new TypeError("Expected a function");var r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var o=e?e.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);var c=t.apply(this,i);return s.set(o,c),c};return r.cache=_v(n),r},ed,Ov;function wdt(t){Ov=t}var lB=cB(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return Ov?Ov(t,n):(ed||(ed=Mt.offscreenCanvasCreator.getOrCreateContext(void 0)),ed.font=[a,o,i,"".concat(n,"px"),r].join(" "),ed.measureText(t).width)},function(t,e){return[t,Object.values(e||m2(t)).join()].join("")},4096),m2=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,a=t.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function b2(t){return t.nodeName==="text"?t:t.nodeName==="g"&&t.children.length===1&&t.children[0].nodeName==="text"?t.children[0]:null}function x2(t,e){var n=b2(t);n&&n.attr(e)}function wv(t,e,n){n===void 0&&(n="..."),x2(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function uB(t,e,n,r){n===void 0&&(n=2),r===void 0&&(r="top"),x2(t,{wordWrap:!0,wordWrapWidth:e,maxLines:n,textBaseline:r})}function fB(t,e,n){var r=t.getBBox(),i=r.width,a=r.height,o=(0,S.CR)([e,n].map(function(l,u){var f;return l.includes("%")?parseFloat(((f=l.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||f===void 0?void 0:f[0])||"0")/100*(u===0?i:a):l}),2),s=o[0],c=o[1];return[s,c]}function nd(t,e){if(e)try{var n=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,r=e.replace(n,function(i,a,o){return"translate(".concat(fB(t,a,o),")")});t.attr("transform",r)}catch(i){}}var _2=function(t){return t!==void 0&&t!=null&&!Number.isNaN(t)};function Br(t){if((0,xr.Z)(t))return[t,t,t,t];if(jr(t)){var e=t.length;if(e===1)return[t[0],t[0],t[0],t[0]];if(e===2)return[t[0],t[1],t[0],t[1]];if(e===3)return[t[0],t[1],t[2],t[1]];if(e===4)return t}return[0,0,0,0]}var Sv=function(){function t(e,n,r,i){this.set(e,n,r,i)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(e,n,r){var i=this,a=i.x1,o=i.y1,s=i.x2,c=i.y2,l=Math.cos(e),u=Math.sin(e),f=n-n*l+r*u,d=r-n*u-r*l,h=[[l*a-u*c+f,u*a+l*c+d],[l*s-u*c+f,u*s+l*c+d],[l*a-u*o+f,u*a+l*o+d],[l*s-u*o+f,u*s+l*o+d]];return h},t.prototype.set=function(e,n,r,i){return r<e?(this.x2=e,this.x1=r):(this.x1=e,this.x2=r),i<n?(this.y2=n,this.y1=i):(this.y1=n,this.y2=i),this},t.prototype.defined=function(e){return this[e]!==Number.MAX_VALUE&&this[e]!==-Number.MAX_VALUE},t}();function rd(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=(0,S.CR)(r.min,2),a=i[0],o=i[1],s=(0,S.CR)(r.max,2),c=s[0],l=s[1],u=Mv(t),f=u.width,d=u.height,h=d,p=0,v=0,g=a,y=o,m=b2(t);if(m){h-=1.5;var b=m.style.textAlign,_=m.style.textBaseline;b==="center"?g=(a+c)/2:(b==="right"||b==="end")&&(g=c),_==="middle"?y=(o+l)/2:_==="bottom"&&(y=l)}var O=(0,S.CR)(Br(e),4),w=O[0],M=w===void 0?0:w,E=O[1],A=E===void 0?0:E,P=O[2],C=P===void 0?M:P,D=O[3],N=D===void 0?A:D,k=new Sv((p+=a)-N,(v+=o)-M,p+f+A,v+h+C);return t.setEulerAngles(n),k.rotatedPoints(Ks(n),g,y)}function Mv(t){return t.__bbox__?t.__bbox__:t.getBBox()}function xl(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function _l(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return r===0?0:r<0?2:1}function dB(t,e){var n=_l(t[0],t[1],e[0]),r=_l(t[0],t[1],e[1]),i=_l(e[0],e[1],t[0]),a=_l(e[0],e[1],t[1]);return!!(n!==r&&i!==a||n===0&&xl(t,e[0])||r===0&&xl(t,e[1])||i===0&&xl(e,t[0])||a===0&&xl(e,t[1]))}function hB(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],i=0,a=0;do{var o=[t[a],t[(a+1)%n]];if(dB(o,r)){if(_l(o[0],e,o[1])===0)return xl(o,e);i++}a=(a+1)%n}while(a!==0);return!!(i&1)}function pB(t,e){return e.every(function(n){return hB(t,n)})}function vB(t,e,n){var r=t.x1,i=t.x2,a=t.y1,o=t.y2,s=[[r,a],[i,a],[i,o],[r,o]],c=rd(e,n);return pB(s,c)}function O2(t,e){var n=(0,S.CR)(t,4),r=n[0],i=n[1],a=n[2],o=n[3],s=(0,S.CR)(e,4),c=s[0],l=s[1],u=s[2],f=s[3],d=a-r,h=o-i,p=u-c,v=f-l,g=d*v-p*h;if(g===0)return!1;var y=g>0,m=r-c,b=i-l,_=d*b-h*m;if(_<0===y)return!1;var O=p*b-v*m;return!(O<0===y||_>g===y||O>g===y)}function w2(t,e){var n=[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]];return n.some(function(r){return O2(e,r)})}var Sdt={lineToLine:O2,intersectBoxLine:w2,getBounds:rd};function gB(t,e,n){var r,i,a=rd(t,n).flat(1),o=rd(e,n).flat(1),s=[[a[0],a[1],a[2],a[3]],[a[0],a[1],a[4],a[5]],[a[4],a[5],a[6],a[7]],[a[2],a[3],a[6],a[7]]];try{for(var c=(0,S.XA)(s),l=c.next();!l.done;l=c.next()){var u=l.value;if(w2(o,u))return!0}}catch(f){r={error:f}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return!1}function yB(t,e){var n=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if(n==="arc"){var a=t.center,o=t.radius,s=(0,S.CR)(a,2),c=s[0],l=s[1],u=r==="negative"?0:i,f=-o-u,d=o+u,h=(0,S.CR)(Br(e),4),p=h[0],v=h[1],g=h[2],y=h[3];return new Sv(c+f-y,l+f-p,c+d+v,l+d+g)}var m=(0,S.CR)(t.startPos,2),b=m[0],_=m[1],O=(0,S.CR)(t.endPos,2),w=O[0],M=O[1],E=(0,S.CR)(h2(t)?[-e,0,e,0]:[0,e,0,-e],4),A=E[0],P=E[1],C=E[2],D=E[3],N=bl(0,t),k=Ia(N,i),R=new Sv(b,_,w,M);return R.x1+=D,R.y1+=A,R.x2+=P+k[0],R.y2+=C+k[1],R}function id(t,e,n){var r,i,a=e.crossPadding,o=new Set,s=null,c=yB(e,a),l=function(p){return c?vB(c,p):!0},u=function(p,v){return p?!gB(p,v,Br(n)):!0};try{for(var f=(0,S.XA)(t),d=f.next();!d.done;d=f.next()){var h=d.value;l(h)?!s||u(s,h)?s=h:(o.add(s),o.add(h)):o.add(h)}}catch(p){r={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}return Array.from(o)}function Ev(t,e){return e===void 0&&(e={}),(0,ye.Z)(t)?0:typeof t=="number"?t:Math.floor(lB(t,e))}function mB(t,e,n,r){if(!(t.length<=1)){var i=e.suffix,a=i===void 0?"...":i,o=e.minLength,s=e.maxLength,c=s===void 0?1/0:s,l=e.step,u=l===void 0?" ":l,f=e.margin,d=f===void 0?[0,0,0,0]:f,h=m2(r.getTextShape(t[0])),p=Ev(u,h),v=o?Ev(o,h):p,g=Ev(c,h);((0,ye.Z)(g)||g===1/0)&&(g=Math.max.apply(null,t.map(function(k){return Mv(k).width})));for(var y=t.slice(),m=(0,S.CR)(d,4),b=m[0],_=b===void 0?0:b,O=m[1],w=O===void 0?0:O,M=m[2],E=M===void 0?_:M,A=m[3],P=A===void 0?w:A,C=function(k){if(y.forEach(function(R){r.ellipsis(r.getTextShape(R),k,a)}),y=id(t,n,d),y.length<1)return{value:void 0}},D=g;D>v+p;D-=p){var N=C(D);if(typeof N=="object")return N.value}}}function Mdt(t){var e=t&&t.getRenderBounds();if(!e)return{width:0,height:0};var n=e.getMax(),r=e.getMin();return{width:n[0]-r[0],height:n[1]-r[1]}}function S2(t){var e=t.getLocalBounds(),n=e.min,r=e.max,i=(0,S.CR)([n,r],2),a=(0,S.CR)(i[0],2),o=a[0],s=a[1],c=(0,S.CR)(i[1],2),l=c[0],u=c[1];return{x:o,y:s,width:l-o,height:u-s,left:o,bottom:u,top:s,right:l}}function Edt(t,e){var n=select(t).append("text").node();return n.attr(__assign(__assign({},e),{visibility:"hidden"})),n}function bB(t,e){var n=(0,S.CR)(t,2),r=n[0],i=n[1],a=(0,S.CR)(e,2),o=a[0],s=a[1];return r!==o&&i===s}function Adt(t,e){var n=__read(t,2),r=n[0],i=n[1],a=__read(e,2),o=a[0],s=a[1];return r===o&&i!==s}function xB(t,e){var n,r,i=e.attributes;try{for(var a=(0,S.XA)(Object.entries(i)),o=a.next();!o.done;o=a.next()){var s=(0,S.CR)(o.value,2),c=s[0],l=s[1];c!=="id"&&c!=="className"&&t.attr(c,l)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}var _B={parity:function(t,e){var n=e.seq,r=n===void 0?2:n;return t.filter(function(i,a){return a%r?(ho(i),!1):!0})}},OB=function(t){return t.filter(_2)};function wB(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||i===2&&a&&o)){var s=_B.parity,c=function(b){return b.forEach(r.show),b},l=2,u=t.slice(),f=t.slice(),d=Math.min.apply(Math,(0,S.ev)([1],(0,S.CR)(t.map(function(b){return Mv(b).width})),!1));if(n.type==="linear"&&(d2(n)||h2(n))){var h=S2(t[0]).left,p=S2(t[i-1]).right,v=Math.abs(p-h)||1;l=Math.max(Math.floor(i*d/v),l)}var g,y;for(a&&(g=u.splice(0,1)[0]),o&&(y=u.splice(-1,1)[0],u.reverse()),c(u);l<t.length&&id(OB(y?(0,S.ev)((0,S.ev)([y],(0,S.CR)(f),!1),[g],!1):(0,S.ev)([g],(0,S.CR)(f),!1)),n,e==null?void 0:e.margin).length;){if(y&&!g&&l%2===0){var m=u.splice(0,1);m.forEach(r.hide)}else if(y&&g){var m=u.splice(0,1);m.forEach(r.hide)}f=s(c(u),{seq:l}),l++}}}function SB(t,e,n,r){var i,a,o=e.optionalAngles,s=o===void 0?[0,45,90]:o,c=e.margin,l=e.recoverWhenFailed,u=l===void 0?!0:l,f=t.map(function(y){return y.getLocalEulerAngles()}),d=function(){return id(t,n,c).length<1},h=function(y){return t.forEach(function(m,b){var _=Array.isArray(y)?y[b]:y;r.rotate(m,+_)})};try{for(var p=(0,S.XA)(s),v=p.next();!v.done;v=p.next()){var g=v.value;if(h(g),d())return}}catch(y){i={error:y}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}u&&h(f)}function MB(t){var e=t.type,n=t.labelDirection;return e==="linear"&&d2(t)?n==="negative"?"bottom":"top":"middle"}function EB(t,e,n,r){var i=e.wordWrapWidth,a=i===void 0?50:i,o=e.maxLines,s=o===void 0?3:o,c=e.recoverWhenFailed,l=c===void 0?!0:c,u=e.margin,f=u===void 0?[0,0,0,0]:u,d=t.map(function(m){return m.attr("maxLines")||1}),h=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(d),!1)),p=function(){return id(t,n,f).length<1},v=MB(n),g=function(m){return t.forEach(function(b,_){var O=Array.isArray(m)?m[_]:m;r.wrap(b,a,O,v)})};if(!(h>s)){for(var y=h;y<=s;y++)if(g(y),p())return;l&&g(d)}}var AB=new Map([["hide",wB],["rotate",SB],["ellipsis",mB],["wrap",EB]]);function TB(t,e,n){return e.labelOverlap.length<1?!1:n==="hide"?!EF(t[0]):n==="rotate"?!t.some(function(r){var i;return!!(!((i=r.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):n==="ellipsis"||n==="wrap"?t.filter(function(r){return r.querySelector("text")}).length>1:!0}function PB(t,e,n){var r=e.labelOverlap,i=r===void 0?[]:r;i.length&&i.forEach(function(a){var o=a.type,s=AB.get(o);TB(t,e,o)&&(s==null||s(t,a,e,n))})}function CB(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(r){return r==="positive"?-1:1};return t.reduce(function(r,i){return r*n(i)},1)}function M2(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function Av(t,e){var n=(0,S.CR)(t,2),r=n[0],i=n[1],a=(0,S.CR)(e,2),o=a[0],s=a[1],c=(0,S.CR)([r*o+i*s,r*s-i*o],2),l=c[0],u=c[1];return Math.atan2(u,l)}function kB(t){var e=(t+360)%180;return Fr(e,-90,90)||(e+=180),e}function RB(t,e,n){var r,i=n.labelAlign,a=(r=e.style.transform)===null||r===void 0?void 0:r.includes("rotate");if(a)return e.getLocalEulerAngles();var o=0,s=bl(t.value,n),c=Jf(t.value,n);return i==="horizontal"?0:(i==="perpendicular"?o=Av([1,0],s):o=Av([c[0]<0?-1:1,0],c),kB(a2(o)))}function E2(t,e,n){var r=n.type,i=n.labelAlign,a=bl(t,n),o=M2(e),s=M2(a2(Av([1,0],a))),c="center",l="middle";return r==="linear"?[90,270].includes(s)&&o===0?(c="center",l=a[1]===1?"top":"bottom"):!(s%180)&&[90,270].includes(o)?c="center":s===0?(Fr(o,0,90,!1,!0)||Fr(o,0,90)||Fr(o,270,360))&&(c="start"):s===90?Fr(o,0,90,!1,!0)?c="start":(Fr(o,90,180)||Fr(o,270,360))&&(c="end"):s===270?Fr(o,0,90,!1,!0)?c="end":(Fr(o,90,180)||Fr(o,270,360))&&(c="start"):s===180&&(o===90?c="start":(Fr(o,0,90)||Fr(o,270,360))&&(c="end")):i==="parallel"?Fr(s,0,180,!0)?l="top":l="bottom":i==="horizontal"?Fr(s,90,270,!1)?c="end":(Fr(s,270,360,!1)||Fr(s,0,90))&&(c="start"):i==="perpendicular"&&(Fr(s,90,270)?c="end":c="start"),{textAlign:c,textBaseline:l}}function LB(t,e,n){e.setLocalEulerAngles(t);var r=e.__data__.value,i=E2(r,t,n),a=e.querySelector(Tn.labelItem.class);a&&T2(a,i)}function A2(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,c=e.indexOf(t),l=Di(s,[t,c,e]),u=(0,S.CR)([bl(t.value,n),CB(o,a)],2),f=u[0],d=u[1],h=d===1?Di(r?i:0,[t,c,e]):0,p=(0,S.CR)(yl(Ia(f,l+h),td(t.value,n)),2),v=p[0],g=p[1];return{x:v,y:g}}function NB(t,e,n,r){var i=r.labelFormatter,a=vi(i)?function(){return rs(Di(i,[t,e,n,bl(t.value,r)]))}:function(){return rs(t.label||"")};return a}function T2(t,e){t.nodeName==="text"&&t.attr(e)}function P2(t){PB(this.node().childNodes,t,{hide:ho,show:gl,rotate:function(e,n){LB(+n,e,t)},ellipsis:function(e,n,r){e&&wv(e,n||1/0,r)},wrap:function(e,n,r){e&&uB(e,n,r)},getTextShape:function(e){return e.querySelector("text")}})}function C2(t,e,n,r,i){var a=n.indexOf(e),o=Ue(t).append(NB(e,a,n,i)).attr("className",Tn.labelItem.name).node(),s=(0,S.CR)(ja(u2(r,[e,a,n])),2),c=s[0],l=s[1],u=l.transform,f=(0,S._T)(l,["transform"]);nd(t,u);var d=RB(e,t,i);return t.setLocalEulerAngles(+d),T2(o,(0,S.pi)((0,S.pi)({},E2(e.value,d,i)),c)),nd(t,u),t.attr(f),o}function IB(t,e,n,r){var i=bv(e,n.labelFilter),a=en(n,"label");return t.selectAll(Tn.label.class).data(i,function(o,s){return s}).join(function(o){return o.append("g").attr("className",Tn.label.name).transition(function(s){return C2(this,s,e,a,n),this.attr(A2(s,e,n)),this.__bbox__=s.bbox,null}).call(function(){return P2.call(t,n)})},function(o){return o.transition(function(s){var c=this.querySelector(Tn.labelItem.class),l=C2(this,s,e,a,n),u=wF(c,l,r.update),f=qi(this,A2(s,e,n),r.update);return this.__bbox__=s.bbox,(0,S.ev)((0,S.ev)([],(0,S.CR)(u),!1),[f],!1)}).call(function(s){var c=Fi(s,"_transitions").flat().filter(_2);_F(c,function(){return P2.call(t,n)})})},function(o){return o.transition(function(){var s=this,c=Qf(this.childNodes[0],r.exit);return Zs(c,function(){return Ue(s).remove()}),c})}).transitions()}function k2(t,e){return xv(t,e.tickDirection,e)}function jB(t,e){var n=(0,S.CR)(t,2),r=n[0],i=n[1];return[[0,0],[r*e,i*e]]}function DB(t,e,n,r,i){var a=i.tickLength,o=(0,S.CR)(jB(r,Di(a,[t,e,n])),2),s=(0,S.CR)(o[0],2),c=s[0],l=s[1],u=(0,S.CR)(o[1],2),f=u[0],d=u[1];return{x1:c,x2:f,y1:l,y2:d}}function FB(t,e,n,r,i){var a=i.tickFormatter,o=k2(e.value,i),s="line";return vi(a)&&(s=function(){return Di(a,[e,n,r,o])}),t.append(s).attr("className",Tn.tickItem.name)}function BB(t,e,n,r,i,a,o){var s=k2(t.value,a),c=DB(t,e,n,s,a),l=c.x1,u=c.x2,f=c.y1,d=c.y2,h=(0,S.CR)(ja(u2(o,[t,e,n,s])),2),p=h[0],v=h[1];r.node().nodeName==="line"&&r.styles((0,S.pi)({x1:l,x2:u,y1:f,y2:d},p)),i.attr(v),r.styles(p)}function R2(t,e,n,r,i,a){var o=FB(Ue(this),t,e,n,r);BB(t,e,n,o,this,r,i);var s=(0,S.CR)(td(t.value,r),2),c=s[0],l=s[1];return qi(this,{x:c,y:l},a)}function zB(t,e,n,r){var i=bv(e,n.tickFilter),a=en(n,"tick");return t.selectAll(Tn.tick.class).data(i,function(o){return o.id||o.label}).join(function(o){return o.append("g").attr("className",Tn.tick.name).transition(function(s,c){return R2.call(this,s,c,i,n,a,!1)})},function(o){return o.transition(function(s,c){return this.removeChildren(),R2.call(this,s,c,i,n,a,r.update)})},function(o){return o.transition(function(){var s=this,c=Qf(this.childNodes[0],r.exit);return Zs(c,function(){return s.remove()}),c})}).transitions()}var Wn=function(){function t(e,n,r,i){e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=e,this.y=n,this.width=r,this.height=i}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(e,n){return e>=this.left&&e<=this.right&&n>=this.top&&n<=this.bottom},t}();function Tdt(t){var e=t.getRenderBounds(),n=__read(e.min,2),r=n[0],i=n[1],a=__read(e.max,2),o=a[0],s=a[1],c=o-r,l=s-i;return new Wn(r,i,c,l)}var L2=ji({text:"text"},"title");function ad(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(e){return e[0]}):t.length>2?[t[0]]:t.split("")}function GB(t,e){var n=t.attributes,r=n.position,i=n.spacing,a=n.inset,o=n.text,s=t.getBBox(),c=e.getBBox(),l=ad(r),u=(0,S.CR)(Br(o?i:0),4),f=u[0],d=u[1],h=u[2],p=u[3],v=(0,S.CR)(Br(a),4),g=v[0],y=v[1],m=v[2],b=v[3],_=(0,S.CR)([p+d,f+h],2),O=_[0],w=_[1],M=(0,S.CR)([b+y,g+m],2),E=M[0],A=M[1];if(l[0]==="l")return new Wn(s.x,s.y,c.width+s.width+O+E,Math.max(c.height+A,s.height));if(l[0]==="t")return new Wn(s.x,s.y,Math.max(c.width+E,s.width),c.height+s.height+w+A);var P=(0,S.CR)([e.attributes.width||c.width,e.attributes.height||c.height],2),C=P[0],D=P[1];return new Wn(c.x,c.y,C+s.width+O+E,D+s.height+w+A)}function WB(t,e){var n=Object.entries(e).reduce(function(r,i){var a=(0,S.CR)(i,2),o=a[0],s=a[1],c=t.node().attr(o);return c||(r[o]=s),r},{});t.styles(n)}function HB(t){var e,n,r,i,a=t,o=a.width,s=a.height,c=a.position,l=(0,S.CR)([+o/2,+s/2],2),u=l[0],f=l[1],d=(0,S.CR)([+u,+f,"center","middle"],4),h=d[0],p=d[1],v=d[2],g=d[3],y=ad(c);return y.includes("l")&&(e=(0,S.CR)([0,"start"],2),h=e[0],v=e[1]),y.includes("r")&&(n=(0,S.CR)([+o,"end"],2),h=n[0],v=n[1]),y.includes("t")&&(r=(0,S.CR)([0,"top"],2),p=r[0],g=r[1]),y.includes("b")&&(i=(0,S.CR)([+s,"bottom"],2),p=i[0],g=i[1]),{x:h,y:p,textAlign:v,textBaseline:g}}var N2=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return e.prototype.getAvailableSpace=function(){var n=this,r=this.attributes,i=r.width,a=r.height,o=r.position,s=r.spacing,c=r.inset,l=n.querySelector(L2.text.class);if(!l)return new Wn(0,0,+i,+a);var u=l.getBBox(),f=u.width,d=u.height,h=(0,S.CR)(Br(s),4),p=h[0],v=h[1],g=h[2],y=h[3],m=(0,S.CR)([0,0,+i,+a],4),b=m[0],_=m[1],O=m[2],w=m[3],M=ad(o);if(M.includes("i"))return new Wn(b,_,O,w);M.forEach(function(I,F){var B,z,Y,U;I==="t"&&(B=(0,S.CR)(F===0?[d+g,+a-d-g]:[0,+a],2),_=B[0],w=B[1]),I==="r"&&(z=(0,S.CR)([+i-f-y],1),O=z[0]),I==="b"&&(Y=(0,S.CR)([+a-d-p],1),w=Y[0]),I==="l"&&(U=(0,S.CR)(F===0?[f+v,+i-f-v]:[0,+i],2),b=U[0],O=U[1])});var E=(0,S.CR)(Br(c),4),A=E[0],P=E[1],C=E[2],D=E[3],N=(0,S.CR)([D+P,A+C],2),k=N[0],R=N[1];return new Wn(b+D,_+A,O-k,w-R)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new Wn(0,0,0,0)},e.prototype.render=function(n,r){var i=this,a=n.width,o=n.height,s=n.position,c=n.spacing,l=(0,S._T)(n,["width","height","position","spacing"]),u=(0,S.CR)(ja(l),1),f=u[0],d=HB(n),h=d.x,p=d.y,v=d.textAlign,g=d.textBaseline;pi(!!l.text,Ue(r),function(y){i.title=y.maybeAppendByClassName(L2.text,"text").styles(f).call(WB,{x:h,y:p,textAlign:v,textBaseline:g}).node()})},e}(Rr);function YB(t,e,n){var r=n.titlePosition,i=r===void 0?"lb":r,a=n.titleSpacing,o=ad(i),s=t.node().getLocalBounds(),c=(0,S.CR)(s.min,2),l=c[0],u=c[1],f=(0,S.CR)(s.halfExtents,2),d=f[0],h=f[1],p=(0,S.CR)(e.node().getLocalBounds().halfExtents,2),v=p[0],g=p[1],y=(0,S.CR)([l+d,u+h],2),m=y[0],b=y[1],_=(0,S.CR)(Br(a),4),O=_[0],w=_[1],M=_[2],E=_[3];if(["start","end"].includes(i)&&n.type==="linear"){var A=n.startPos,P=n.endPos,C=(0,S.CR)(i==="start"?[A,P]:[P,A],2),D=C[0],N=C[1],k=i2([-N[0]+D[0],-N[1]+D[1]]),R=(0,S.CR)(Ia(k,O),2),I=R[0],F=R[1];return{x:D[0]+I,y:D[1]+F}}return o.includes("t")&&(b-=h+g+O),o.includes("r")&&(m+=d+v+w),o.includes("l")&&(m-=d+v*2+E),o.includes("b")&&(b+=h+g*2+M),{x:m,y:b}}function VB(t,e,n){var r=t.cloneNode(!0);r.style.transform="scale(1, 1)",r.style.transform="none";var i=r.getBBox().height;if(e==="vertical"){if(n==="left")return"rotate(-90) translate(0, ".concat(i/2,")");if(n==="right")return"rotate(-90) translate(0, -".concat(i/2,")")}return""}function I2(t,e,n,r,i){var a=en(r,"title"),o=(0,S.CR)(ja(a),2),s=o[0],c=o[1],l=c.transform,u=(0,S._T)(c,["transform"]);t.styles(s),e.styles(u);var f=l||VB(t.node(),s.direction,s.position);nd(t.node(),f);var d=YB(Ue(n._offscreen||n.querySelector(Tn.mainGroup.class)),e,r),h=d.x,p=d.y,v=qi(e.node(),{x:h,y:p},i);return nd(t.node(),f),v}function $B(t,e,n,r){var i=n.titleText;return t.selectAll(Tn.title.class).data([{title:i}].filter(function(a){return!!a.title}),function(a,o){return a.title}).join(function(a){return a.append(function(){return rs(i)}).attr("className",Tn.title.name).transition(function(){return I2(Ue(this),t,e,n,r.enter)})},function(a){return a.transition(function(){return I2(Ue(this),t,e,n,r.update)})},function(a){return a.remove()}).transitions()}function j2(t,e,n,r){var i=t.showLine,a=t.showTick,o=t.showLabel,s=e.maybeAppendByClassName(Tn.lineGroup,"g"),c=pi(i,s,function(h){return rB(h,t,r)})||[],l=e.maybeAppendByClassName(Tn.tickGroup,"g"),u=pi(a,l,function(h){return zB(h,n,t,r)})||[],f=e.maybeAppendByClassName(Tn.labelGroup,"g"),d=pi(o,f,function(h){return IB(h,n,t,r)})||[];return(0,S.ev)((0,S.ev)((0,S.ev)([],(0,S.CR)(c),!1),(0,S.CR)(u),!1),(0,S.CR)(d),!1).filter(function(h){return!!h})}var Tv=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,hv)||this}return e.prototype.render=function(n,r,i){var a=this,o=n.titleText,s=n.data,c=n.animate,l=n.showTitle,u=n.showGrid,f=n.dataThreshold,d=n.truncRange,h=TF(s,f).filter(function(O){var w=O.value;return!(d&&w>d[0]&&w<d[1])}),p=J_(i===void 0?c:i),v=Ue(r).maybeAppendByClassName(Tn.gridGroup,"g"),g=pi(u,v,function(O){return sB(O,h,n,p)})||[],y=Ue(r).maybeAppendByClassName(Tn.mainGroup,"g");o&&(!this.initialized&&p.enter||this.initialized&&p.update)&&j2(n,Ue(this.offscreenGroup),h,J_(!1));var m=j2(n,Ue(y.node()),h,p),b=Ue(r).maybeAppendByClassName(Tn.titleGroup,"g"),_=pi(l,b,function(O){return $B(O,a,n,p)})||[];return(0,S.ev)((0,S.ev)((0,S.ev)([],(0,S.CR)(g),!1),(0,S.CR)(m),!1),(0,S.CR)(_),!1).flat().filter(function(O){return!!O})},e}(Rr),XB={}.toString,UB=function(t,e){return XB.call(t)==="[object "+e+"]"},Ol=UB,Pv=function(t){return Ol(t,"Function")},D2=function(t){return Array.isArray?Array.isArray(t):Ol(t,"Array")},qB=function(t){var e=typeof t;return t!==null&&e==="object"||e==="function"};function ZB(t,e){if(t){var n;if(D2(t))for(var r=0,i=t.length;r<i&&(n=e(t[r],r),n!==!1);r++);else if(qB(t)){for(var a in t)if(t.hasOwnProperty(a)&&(n=e(t[a],a),n===!1))break}}}var F2=ZB,Pdt=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return F2(t,function(n,r){Pv(t)&&r==="prototype"||e.push(r)}),e},Cdt=null;function kdt(t,e){var n=keys(e),r=n.length;if(isNil(t))return!r;for(var i=0;i<r;i+=1){var a=n[i];if(e[a]!==t[a]||!(a in t))return!1}return!0}var Rdt=null,KB=function(t){return typeof t=="object"&&t!==null},QB=KB,JB=function(t){if(!QB(t)||!Ol(t,"Object"))return!1;if(Object.getPrototypeOf(t)===null)return!0;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},B2=JB;function Ldt(t,e){if(!isArray(t))return null;var n;if(isFunction(e)&&(n=e),isPlainObject(e)&&(n=function(i){return isMatch(i,e)}),n){for(var r=0;r<t.length;r+=1)if(n(t[r]))return t[r]}return null}var Ndt=null,Idt=function(t,e){for(var n=null,r=0;r<t.length;r++){var i=t[r],a=i[e];if(!isNil(a)){isArray(a)?n=a[0]:n=a;break}}return n},jdt=null,Ddt=function(t){if(!isArray(t))return[];for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);return e},Fdt=null,tz=function(t,e){if(e===void 0&&(e=[]),!isArray(t))e.push(t);else for(var n=0;n<t.length;n+=1)tz(t[n],e);return e},Bdt=null,zdt=function(t){if(isArray(t))return t.reduce(function(e,n){return Math.max(e,n)},t[0])},Gdt=function(t){if(isArray(t))return t.reduce(function(e,n){return Math.min(e,n)},t[0])},Wdt=function(t){var e=t.filter(function(o){return!isNaN(o)});if(!e.length)return{min:0,max:0};if(isArray(t[0])){for(var n=[],r=0;r<t.length;r++)n=n.concat(t[r]);e=n}var i=getMax(e),a=getMin(e);return{min:a,max:i}},Hdt=null,z2=Array.prototype,ez=z2.splice,nz=z2.indexOf,Ydt=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++)for(var i=e[r],a=-1;(a=nz.call(t,i))>-1;)ez.call(t,a,1);return t},Vdt=null,rz=Array.prototype.splice,$dt=function(e,n){if(!isArrayLike(e))return[];for(var r=e?n.length:0,i=r-1;r--;){var a=void 0,o=n[r];(r===i||o!==a)&&(a=o,rz.call(e,o,1))}return e},Xdt=null,Udt=function(t,e,n){if(!isArray(t)&&!isPlainObject(t))return t;var r=n;return each(t,function(i,a){r=e(r,i,a)}),r},qdt=null,Zdt=function(t,e){var n=[];if(!isArrayLike(t))return n;for(var r=-1,i=[],a=t.length;++r<a;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return pullAt(t,i),n},Kdt=null,iz=function(t){return Ol(t,"String")};function Qdt(t,e){var n;if(isFunction(e))n=function(i,a){return e(i)-e(a)};else{var r=[];isString(e)?r.push(e):isArray(e)&&(r=e),n=function(i,a){for(var o=0;o<r.length;o+=1){var s=r[o];if(i[s]>a[s])return 1;if(i[s]<a[s])return-1}return 0}}return t.sort(n),t}var Jdt=null,tht=function(t,e){for(var n=[],r={},i=0;i<t.length;i++){var a=t[i],o=a[e];if(!isNil(o)){isArray(o)||(o=[o]);for(var s=0;s<o.length;s++){var c=o[s];r[c]||(n.push(c),r[c]=!0)}}}return n};function eht(t,e){return isArray(t)||isString(t)?t[0]===e:!1}var nht=null;function rht(t,e){return isArray(t)||isString(t)?t[t.length-1]===e:!1}var iht=null,az=Object.prototype.hasOwnProperty;function aht(t,e){if(!e||!isArray(t))return{};for(var n={},r=isFunction(e)?e:function(s){return s[e]},i,a=0;a<t.length;a++){var o=t[a];i=r(o),az.call(n,i)?n[i].push(o):n[i]=[o]}return n}var oht=null;function sht(t,e){if(!e)return{0:t};if(!isFunction(e)){var n=isArray(e)?e:e.replace(/\s+/g,"").split("*");e=function(r){for(var i="_",a=0,o=n.length;a<o;a++)i+=r[n[a]]&&r[n[a]].toString();return i}}return groupBy(t,e)}var cht=function(t,e){if(!e)return[t];var n=groupToMap(t,e),r=[];for(var i in n)r.push(n[i]);return r},G2={};function lht(t){var e=G2[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,G2[t]=e}return e}var uht=null;function fht(t){var e=0,n=0,r=0,i=0;return isArray(t)?t.length===1?e=n=r=i=t[0]:t.length===2?(e=r=t[0],n=i=t[1]):t.length===3?(e=t[0],n=i=t[1],r=t[2]):(e=t[0],n=t[1],r=t[2],i=t[3]):e=n=r=i=t,{r1:e,r2:n,r3:r,r4:i}}var dht=null,oz=function(t){return Ol(t,"Number")},Js=oz,hht=function(t){return isNumber(t)&&t%1!==0},pht=null,vht=function(t){return isNumber(t)&&t%2===0},ght=null,yht=Number.isInteger?Number.isInteger:function(t){return Js(t)&&t%1===0},mht=null,bht=function(t){return isNumber(t)&&t<0},xht=null,_ht=function(t){return isNumber(t)&&t%2!==0},Oht=null,wht=function(t){return isNumber(t)&&t>0},Sht=null,Mht=function(t,e){if(isArray(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=isFunction(e)?e(a):a[e];o>r&&(n=a,r=o)}return n}},Eht=function(t,e){if(isArray(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=isFunction(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},sz=180/Math.PI,Aht=function(t){return sz*t},Tht=null,cz=Math.PI/180,Pht=function(t){return cz*t},Cht=null,kht=null,lz=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return F2(t,function(n,r){Pv(t)&&r==="prototype"||e.push(n)}),e},uz=lz,Rht=function(t,e){return contains(values(t),e)},fz={}.toString,Lht=function(t){return fz.call(t).replace(/^\[object /,"").replace(/]$/,"")},Nht=null,Iht=function(t){return isType(t,"Arguments")},jht=null,Dht=function(t){return isType(t,"Boolean")},Fht=null,Bht=function(t){return isType(t,"Date")},zht=null,Ght=function(t){return isType(t,"Error")},Wht=null;function Hht(t){return isNumber(t)&&isFinite(t)}var dz=function(t){return t===null},hz=dz,pz=Object.prototype,Yht=function(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||pz;return t===n},Vht=null,$ht=function(t){return isType(t,"RegExp")},Xht=null,vz=function(t){return t===void 0},gz=vz,Uht=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t[0],r=1;r<t.length;r++){var i=t[r];isFunction(i)&&(i=i.prototype),mix(n.prototype,i)}},qht=null,W2=function(t){if(typeof t!="object"||t===null)return t;var e;if(isArray(t)){e=[];for(var n=0,r=t.length;n<r;n++)typeof t[n]=="object"&&t[n]!=null?e[n]=W2(t[n]):e[n]=t[n]}else{e={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?e[i]=W2(t[i]):e[i]=t[i]}return e},Zht=null,yz=function(t,e){if(!Pv(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=e?e.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=t.apply(this,r);return o.set(a,s),s};return n.cache=new Map,n},mz=5;function H2(t,e,n,r){n=n||0,r=r||mz;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i];a!==null&&B2(a)?(B2(t[i])||(t[i]={}),n<r?H2(t[i],a,n+1,r):t[i]=e[i]):D2(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var bz=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)H2(t,e[r]);return t},Y2=bz,Kht=function(t,e,n,r){isFunction(e)||(n=e,e=t,t=function(){});var i=Object.create?function(o,s){return Object.create(o,{constructor:{value:s}})}:function(o,s){function c(){}c.prototype=o;var l=new c;return l.constructor=s,l},a=i(e.prototype,t);return t.prototype=mix(a,t.prototype),t.superclass=i(e.prototype,e),mix(a,n),mix(t,r),t},Qht=null,xz=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},V2=xz,_z=function(t,e){if(!V2(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},$2=_z,Oz=Object.prototype.hasOwnProperty;function Jht(t){if(isNil(t))return!0;if(isArrayLike(t))return!t.length;var e=getType(t);if(e==="Map"||e==="Set")return!t.size;if(isPrototype(t))return!Object.keys(t).length;for(var n in t)if(Oz.call(t,n))return!1;return!0}var tpt=null,X2=function(t,e){if(t===e)return!0;if(!t||!e||isString(t)||isString(e))return!1;if(isArrayLike(t)||isArrayLike(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=X2(t[r],e[r]),!!n);r++);return n}if(isObjectLike(t)||isObjectLike(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var n=!0,r=0;r<i.length&&(n=X2(t[i[r]],e[i[r]]),!!n);r++);return n}return!1},ept=null,npt=function(t,e,n){return isFunction(n)?!!n(t,e):isEqual(t,e)},rpt=function(t,e,n){for(var r=0,i=isString(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?n:t},ipt=function(t,e,n){var r=t,i=isString(e)?e.split("."):e;return i.forEach(function(a,o){o<i.length-1?(isObject(r[a])||(r[a]=isNumber(i[o+1])?[]:{}),r=r[a]):r[a]=n}),t},wz=Object.prototype.hasOwnProperty,apt=function(t,e){if(t===null||!isPlainObject(t))return{};var n={};return each(e,function(r){wz.call(t,r)&&(n[r]=t[r])}),n},opt=function(t,e){return reduce(t,function(n,r,i){return e.includes(i)||(n[i]=r),n},{})},od={},spt=function(t){return t=t||"g",od[t]?od[t]+=1:od[t]=1,t+od[t]},is=function(t){return t},Sz=function(t){return t==null},Mz=Sz;function U2(t){return Mz(t)?0:V2(t)?t.length:Object.keys(t).length}var sd,cpt=yz(function(t,e){e===void 0&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return sd||(sd=document.createElement("canvas").getContext("2d")),sd.font=[a,o,i,n+"px",r].join(" "),sd.measureText(iz(t)?t:"").width},function(t,e){return e===void 0&&(e={}),(0,S.pr)([t],uz(e)).join("")}),lpt=function(t,e,n,r){r===void 0&&(r="...");var i=16,a=measureTextWidth(r,n),o=isString(t)?t:toString(t),s=e,c=[],l,u;if(measureTextWidth(t,n)<=e)return t;for(;l=o.substr(0,i),u=measureTextWidth(l,n),!(u+a>s&&u>s);)if(c.push(l),s-=u,o=o.substr(i),!o)return c.join("");for(;l=o.substr(0,1),u=measureTextWidth(l,n),!(u+a>s);)if(c.push(l),s-=u,o=o.substr(1),!o)return c.join("");return""+c.join("")+r},upt=function(){function t(){this.map={}}return t.prototype.has=function(e){return this.map[e]!==void 0},t.prototype.get=function(e,n){var r=this.map[e];return r===void 0?n:r},t.prototype.set=function(e,n){this.map[e]=n},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(e){delete this.map[e]},t.prototype.size=function(){return Object.keys(this.map).length},t}(),fpt=null;class wl{constructor(e){this.options=Y2({},this.getDefaultOptions()),this.update(e)}getOptions(){return this.options}update(e={}){this.options=Y2({},this.options,e),this.rescale(e)}rescale(e){}}function cd(t,e){return e-t?n=>(n-t)/(e-t):n=>.5}function tc(t,...e){return e.reduce((n,r)=>i=>n(r(i)),t)}function Cv(t,e,n,r,i){let a=n||0,o=r||t.length;const s=i||(c=>c);for(;a<o;){const c=Math.floor((a+o)/2);s(t[c])>e?o=c:a=c+1}return a}var Ez=mt(2489),Az=mt.n(Ez);function kv(t,e,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Tz(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(n===0)return[r*255,r*255,r*255,i];const a=r<.5?r*(1+n):r+n-r*n,o=2*r-a,s=kv(o,a,e+1/3),c=kv(o,a,e),l=kv(o,a,e-1/3);return[s*255,c*255,l*255,i]}function q2(t){const e=Az().get(t);if(!e)return null;const{model:n,value:r}=e;return n==="rgb"?r:n==="hsl"?Tz(r):null}const ec=(t,e)=>n=>t*(1-n)+e*n,Pz=(t,e)=>{const n=q2(t),r=q2(e);return n===null||r===null?n?()=>t:()=>e:i=>{const a=new Array(4);for(let u=0;u<4;u+=1){const f=n[u],d=r[u];a[u]=f*(1-i)+d*i}const[o,s,c,l]=a;return`rgba(${Math.round(o)}, ${Math.round(s)}, ${Math.round(c)}, ${l})`}},Sl=(t,e)=>typeof t=="number"&&typeof e=="number"?ec(t,e):typeof t=="string"&&typeof e=="string"?Pz(t,e):()=>t,Cz=(t,e)=>{const n=ec(t,e);return r=>Math.round(n(r))};function ld(t){return!gz(t)&&!hz(t)&&!Number.isNaN(t)}const Rv=Math.sqrt(50),Lv=Math.sqrt(10),Nv=Math.sqrt(2);function ud(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/wr(10,i);return i>=0?(a>=Rv?10:a>=Lv?5:a>=Nv?2:1)*wr(10,i):-wr(10,-i)/(a>=Rv?10:a>=Lv?5:a>=Nv?2:1)}function Z2(t,e,n){const r=Math.abs(e-t)/Math.max(0,n);let i=wr(10,Math.floor(Math.log(r)/Math.LN10));const a=r/i;return a>=Rv?i*=10:a>=Lv?i*=5:a>=Nv&&(i*=2),e<t?-i:i}const K2=(t,e,n=5)=>{const r=[t,e];let i=0,a=r.length-1,o=r[i],s=r[a],c;return s<o&&([o,s]=[s,o],[i,a]=[a,i]),c=ud(o,s,n),c>0?(o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c,c=ud(o,s,n)):c<0&&(o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c,c=ud(o,s,n)),c>0?(r[i]=Math.floor(o/c)*c,r[a]=Math.ceil(s/c)*c):c<0&&(r[i]=Math.ceil(o*c)/c,r[a]=Math.floor(s*c)/c),r};function kz(t,e){const n=e<t?e:t,r=t>e?t:e;return i=>Math.min(Math.max(n,i),r)}const Rz=(t,e,n)=>{const[r,i]=t,[a,o]=e;let s,c;return r<i?(s=cd(r,i),c=n(a,o)):(s=cd(i,r),c=n(o,a)),tc(c,s)},Lz=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=t[0]>t[r],s=o?[...t].reverse():t,c=o?[...e].reverse():e;for(let l=0;l<r;l+=1)i[l]=cd(s[l],s[l+1]),a[l]=n(c[l],c[l+1]);return l=>{const u=Cv(t,l,1,r)-1,f=i[u],d=a[u];return tc(d,f)(l)}},Q2=(t,e,n,r)=>(Math.min(t.length,e.length)>2?Lz:Rz)(t,e,r?Cz:n);class fd extends wl{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:ec,tickCount:5}}map(e){return ld(e)?this.output(e):this.options.unknown}invert(e){return ld(e)?this.input(e):this.options.unknown}nice(){if(!this.options.nice)return;const[e,n,r,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(e,n,r,...i)}getTicks(){const{tickMethod:e}=this.options,[n,r,i,...a]=this.getTickMethodOptions();return e(n,r,i,...a)}getTickMethodOptions(){const{domain:e,tickCount:n}=this.options,r=e[0],i=e[e.length-1];return[r,i,n]}chooseNice(){return K2}rescale(){this.nice();const[e,n]=this.chooseTransforms();this.composeOutput(e,this.chooseClamp(e)),this.composeInput(e,n,this.chooseClamp(n))}chooseClamp(e){const{clamp:n,range:r}=this.options,i=this.options.domain.map(e),a=Math.min(i.length,r.length);return n?kz(i[0],i[a-1]):is}composeOutput(e,n){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=Q2(r.map(e),i,o,a);this.output=tc(s,n,e)}composeInput(e,n,r){const{domain:i,range:a}=this.options,o=Q2(a,i.map(e),ec);this.input=tc(n,r,o)}}const as=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&n>0)return[a];let s=ud(a,o,n);if(s===0||!Number.isFinite(s))return[];if(s>0){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let c=0;c<r;c+=1)i[c]=(a+c)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let c=0;c<r;c+=1)i[c]=(a+c)/s}return i};class Vr extends fd{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Sl,tickMethod:as,tickCount:5}}chooseTransforms(){return[is,is]}clone(){return new Vr(this.options)}}function Nz(t,e){if(t){var n;if(jr(t))for(var r=0,i=t.length;r<i&&(n=e(t[r],r),n!==!1);r++);else if(Yo(t)){for(var a in t)if(t.hasOwnProperty(a)&&(n=e(t[a],a),n===!1))break}}}var Iv=Nz,Iz=function(t,e,n){if(!jr(t)&&!co(t))return t;var r=n;return Iv(t,function(i,a){r=e(r,i,a)}),r},J2=Iz,tO=function(t,e){return J2(t,function(n,r,i){return e.includes(i)||(n[i]=r),n},{})};function Da(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 a of t)(a=e(a,++i,t))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}function eO(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,c=o.y,l=o.width,u=o.height,f=(0,S.CR)([s+l,c+u],2),d=f[0],h=f[1];s<e&&(e=s),c<n&&(n=c),d>r&&(r=d),h>i&&(i=h)}return new Wn(e,n,r-e,i-n)}var jz=function(t,e,n){var r=t.width,i=t.height,a=n.flexDirection,o=a===void 0?"row":a,s=n.flexWrap,c=s===void 0?"nowrap":s,l=n.justifyContent,u=l===void 0?"flex-start":l,f=n.alignContent,d=f===void 0?"flex-start":f,h=n.alignItems,p=h===void 0?"flex-start":h,v=o==="row",g=o==="row"||o==="column",y=v?g?[1,0]:[-1,0]:g?[0,1]:[0,-1],m=(0,S.CR)([0,0],2),b=m[0],_=m[1],O=e.map(function(N){var k,R=N.width,I=N.height,F=(0,S.CR)([b,_],2),B=F[0],z=F[1];return k=(0,S.CR)([b+R*y[0],_+I*y[1]],2),b=k[0],_=k[1],new Wn(B,z,R,I)}),w=eO(O),M={"flex-start":0,"flex-end":v?r-w.width:i-w.height,center:v?(r-w.width)/2:(i-w.height)/2},E=O.map(function(N){var k=N.x,R=N.y,I=Wn.fromRect(N);return I.x=v?k+M[u]:k,I.y=v?R:R+M[u],I}),A=eO(E),P=function(N){var k=(0,S.CR)(v?["height",i]:["width",r],2),R=k[0],I=k[1];switch(p){case"flex-start":return 0;case"flex-end":return I-N[R];case"center":return I/2-N[R]/2;default:return 0}},C=E.map(function(N){var k=N.x,R=N.y,I=Wn.fromRect(N);return I.x=v?k:k+P(I),I.y=v?R+P(I):R,I}),D=C.map(function(N){var k,R,I=Wn.fromRect(N);return I.x+=(k=t.x)!==null&&k!==void 0?k:0,I.y+=(R=t.y)!==null&&R!==void 0?R:0,I});return D},Dz=function(t,e,n){return[]},Fz=function(t,e,n){if(e.length===0)return[];var r={flex:jz,grid:Dz},i=n.display in r?r[n.display]:null;return(i==null?void 0:i.call(null,t,e,n))||[]},Bz=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n)||this;r.layoutEvents=[Re.BOUNDS_CHANGED,Re.INSERTED,Re.REMOVED],r.$margin=Br(0),r.$padding=Br(0);var i=n.style||{},a=i.margin,o=a===void 0?0:a,s=i.padding,c=s===void 0?0:s;return r.margin=o,r.padding=c,r.isMutationObserved=!0,r.bindEvents(),r}return Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(n){this.$margin=Br(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(n){this.$padding=Br(n)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var n=this.attributes,r=n.x,i=r===void 0?0:r,a=n.y,o=a===void 0?0:a,s=n.width,c=n.height,l=(0,S.CR)(this.$margin,4),u=l[0],f=l[1],d=l[2],h=l[3];return new Wn(i-h,o-u,s+h+f,c+u+d)},e.prototype.appendChild=function(n,r){return n.isMutationObserved=!0,t.prototype.appendChild.call(this,n,r),n},e.prototype.getAvailableSpace=function(){var n=this.attributes,r=n.width,i=n.height,a=(0,S.CR)(this.$padding,4),o=a[0],s=a[1],c=a[2],l=a[3],u=(0,S.CR)(this.$margin,4),f=u[0],d=u[3];return new Wn(l+d,o+f,r-l-s,i-o-c)},e.prototype.layout=function(){if(!(!this.attributes.display||!this.isConnected)&&!this.children.some(function(r){return!r.isConnected}))try{var n=Fz(this.getAvailableSpace(),this.children.map(function(r){return r.getBBox()}),this.attributes);this.children.forEach(function(r,i){var a=n[i],o=a.x,s=a.y;r.attr({x:o,y:s})})}catch(r){}},e.prototype.bindEvents=function(){var n=this;this.layoutEvents.forEach(function(r){n.addEventListener(r,function(i){i.target.isMutationObserved=!0,n.layout()})})},e.prototype.attributeChangedCallback=function(n,r,i){n==="margin"?this.margin=i:n==="padding"&&(this.padding=i),this.layout()},e}(Dr),zz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Gz(t){return class extends Of{constructor(e){super(e),this.descriptor=t}connectedCallback(){var e,n;(n=(e=this.descriptor).render)===null||n===void 0||n.call(e,this.attributes,this)}update(e={}){var n,r;this.attr(Nt({},this.attributes,e)),(r=(n=this.descriptor).render)===null||r===void 0||r.call(n,this.attributes,this)}}}function nO(t,e,n){return t.querySelector(e)?Ne(t).select(e):Ne(t).append(n)}function dd(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function rO(t,e){const n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};let{flexDirection:r,justifyContent:i,alignItems:a}=n;const o={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return t in o&&([r,i,a]=o[t]),Object.assign({display:"flex",flexDirection:r,justifyContent:i,alignItems:a},e)}class iO extends Bz{get child(){var e;return(e=this.children)===null||e===void 0?void 0:e[0]}update(e){var n;this.attr(e);const{subOptions:r}=e;(n=this.child)===null||n===void 0||n.update(r)}}class Wz extends iO{update(e){var n;const{subOptions:r}=e;this.attr(e),(n=this.child)===null||n===void 0||n.update(r)}}function ua(t,e){var n;return(n=t.filter(r=>r.getOptions().name===e))===null||n===void 0?void 0:n[0]}function Hz(t){return t==="horizontal"||t===0}function Yz(t){return t==="vertical"||t===-Math.PI/2}function aO(t,e,n){const{bbox:r}=t,{position:i="top",size:a,length:o}=e,s=["top","bottom","center"].includes(i),[c,l]=s?[r.height,r.width]:[r.width,r.height],{defaultSize:u,defaultLength:f}=n.props,d=a||u||c,h=o||f||l,p=s?"horizontal":"vertical",[v,g]=s?[h,d]:[d,h];return{orientation:p,width:v,height:g,size:d,length:h}}function Vz(t){return t.find(e=>e.getOptions().domain.length>0).getOptions().domain}function hd(t){const e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=zz(t,["style"]),i={};return Object.entries(r).forEach(([a,o])=>{e.includes(a)?i[`show${lo(a)}`]=o:i[a]=o}),Object.assign(Object.assign({},i),n)}var oO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function sO(t,e){const{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function cO(t){const{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function $z(t,e){const{width:n,height:r}=e.getOptions();return i=>{if(!Z_(e))return i;const a=t==="bottom"?[i,1]:[0,i],o=e.map(a);if(t==="bottom"){const s=o[0];return new Vr({domain:[0,n],range:[0,1]}).map(s)}else if(t==="left"){const s=o[1];return new Vr({domain:[0,r],range:[0,1]}).map(s)}return i}}function Xz(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;const[r,i]=Da(e,o=>+o),{tickCount:a}=t.getOptions();return n(r,i,a)}function Uz(t,e){if(Nn(e))return h=>h;const n=e.getOptions(),{innerWidth:r,innerHeight:i,insetTop:a,insetBottom:o,insetLeft:s,insetRight:c}=n,[l,u,f]=t==="left"||t==="right"?[a,o,i]:[s,c,r],d=new Vr({domain:[0,1],range:[l/f,1-u/f]});return h=>d.map(h)}function lO(t,e,n,r,i,a,o,s){var c;(n!==void 0||a!==void 0)&&t.update(Object.assign(Object.assign({},n&&{tickCount:n}),a&&{tickMethod:a}));const l=Xz(t,e,a),u=i?l.filter(i):l,f=y=>y instanceof Date?String(y):typeof y=="object"&&y?y:String(y),d=r||((c=t.getFormatter)===null||c===void 0?void 0:c.call(t))||f,h=Uz(o,s),p=$z(o,s),v=y=>["top","bottom","center","outer"].includes(y),g=y=>["left","right"].includes(y);return Nn(s)||Gn(s)?u.map((y,m,b)=>{var _,O;const w=((_=t.getBandWidth)===null||_===void 0?void 0:_.call(t,y))/2||0,M=h(t.map(y)+w);return{value:pl(s)&&o==="center"||Gn(s)&&((O=t.getTicks)===null||O===void 0?void 0:O.call(t))&&v(o)||Gn(s)&&g(o)?1-M:M,label:f(d(Uf(y),m,b)),id:String(m)}}):u.map((y,m,b)=>{var _;const O=((_=t.getBandWidth)===null||_===void 0?void 0:_.call(t,y))/2||0,w=p(h(t.map(y)+O));return{value:g(o)?1-w:w,label:f(d(Uf(y),m,b)),id:String(m)}})}function qz(t,e,n="xy"){const[r,i,a]=cO(e);return n==="xy"?t.includes("bottom")||t.includes("top")?i:r:n==="xz"?t.includes("bottom")||t.includes("top")?a:r:t.includes("bottom")||t.includes("top")?i:a}function Zz(t=[],e){if(t.length>0)return t;const{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:a}=e,o=[],s=(c,l)=>{l&&o.push(Object.assign(Object.assign({},c),l))};return s({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),s({type:"ellipsis",minLength:20},i),s({type:"hide"},r),s({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},a),o}function Kz(t,e,n,r,i){const{x:a,y:o,width:s,height:c}=e,l=[a+s/2,o+c/2],u=Math.min(s,c)/2,[f,d]=fv(i),[h,p]=cO(i),v=Math.min(h,p)/2,g={center:l,radius:u,startAngle:f,endAngle:d,gridLength:(r-n)*v};if(t==="inner"){const{insetLeft:y,insetTop:m}=i.getOptions();return Object.assign(Object.assign({},g),{center:[l[0]-y,l[1]-m],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},g),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}function Qz(t,e,n){return K_(e)||vl(e)?!1:t===void 0?!!n.getTicks:t}function Jz(t){const{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}function tG(t,e,n,r,i){const{x:a,y:o,width:s,height:c}=n;if(t==="bottom")return{startPos:[a,o],endPos:[a+s,o]};if(t==="left")return{startPos:[a+s,o+c],endPos:[a+s,o]};if(t==="right")return{startPos:[a,o+c],endPos:[a,o]};if(t==="top")return{startPos:[a,o+c],endPos:[a+s,o+c]};if(t==="center"){if(e==="vertical")return{startPos:[a,o],endPos:[a,o+c]};if(e==="horizontal")return{startPos:[a,o],endPos:[a+s,o]};if(typeof e=="number"){const[l,u]=r.getCenter(),[f,d]=qf(r),[h,p]=fv(r),v=Math.min(s,c)/2,{insetLeft:g,insetTop:y}=r.getOptions(),m=f*v,b=d*v,[_,O]=[l+a-g,u+o-y],[w,M]=[Math.cos(e),Math.sin(e)],E=[_+b*w,O+b*M],A=[_+m*w,O+m*M],P=()=>{const{domain:D}=i.getOptions();return D.length},C=Nn(r)&&i?P():3;return{startPos:E,endPos:A,gridClosed:Math.abs(p-h-360)<1e-6,gridCenter:[_,O],gridControlAngles:new Array(C).fill(0).map((D,N,k)=>(p-h)/C*N)}}}return{}}const eG=t=>{const{order:e,size:n,position:r,orientation:i,labelFormatter:a,tickFilter:o,tickCount:s,tickMethod:c,important:l={},style:u={},indexBBox:f,title:d,grid:h=!1}=t,p=oO(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[v],value:g,coordinate:y,theme:m})=>{const{bbox:b}=g,{domain:_}=v.getOptions(),O=lO(v,_,s,a,o,c,r,y),w=f?O.map((N,k)=>{const R=f.get(k);return!R||R[0]!==N.label?N:Object.assign(Object.assign({},N),{bbox:R[1]})}):O,[M,E]=qf(y),A=Kz(r,b,M,E,y),{axis:P,axisArc:C={}}=m,D=hd(Nt({},P,C,A,Object.assign(Object.assign({type:"arc",data:w,titleText:dd(d),grid:h},p),l)));return new Tv({style:tO(D,["transform"])})}};function nG(t,e,n,r,i,a){const o=n.axis,s=["top","right","bottom","left"].includes(i)?n[`axis${iv(i)}`]:n.axisLinear,c=t.getOptions().name,l=n[`axis${lo(c)}`]||{};return Object.assign({},o,s,l)}function rG(t,e,n,r,i,a){const o=nG(t,e,n,r,i,a);return i==="center"?Object.assign(Object.assign(Object.assign(Object.assign({},o),{labelDirection:r==="right"?"negative":"positive"}),r==="center"?{labelTransform:"translate(50%,0)"}:null),{tickDirection:r==="right"?"negative":"positive",labelSpacing:r==="center"?0:4,titleSpacing:Yz(a)?10:0,tick:r==="center"?!1:void 0}):o}const iG=t=>{const{direction:e="left",important:n={},labelFormatter:r,order:i,orientation:a,actualPosition:o,position:s,size:c,style:l={},title:u,tickCount:f,tickFilter:d,tickMethod:h,transform:p,indexBBox:v}=t,g=oO(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:y,value:m,coordinate:b,theme:_})=>{const{bbox:O}=m,[w]=y,{domain:M,xScale:E}=w.getOptions(),A=rG(w,b,_,e,s,a),P=Object.assign(Object.assign(Object.assign({},A),l),g),C=qz(o||s,b,t.plane),D=tG(s,a,O,b,E),N=Jz(b),k=lO(w,M,f,r,d,h,s,b),R=v?k.map((B,z)=>{const Y=v.get(z);return!Y||Y[0]!==B.label?B:Object.assign(Object.assign({},B),{bbox:Y[1]})}):k,I=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},P),{type:"linear",data:R,crossSize:c,titleText:dd(u),labelOverlap:Zz(p,P),grid:Qz(P.grid,b,w),gridLength:C,line:!0,indexBBox:v}),P.line?null:{lineOpacity:0}),D),N),n);return I.labelOverlap.find(B=>B.type==="hide")&&(I.crossSize=!1),new Tv({className:"axis",style:hd(I)})}},uO=t=>e=>{const{labelFormatter:n,labelFilter:r=()=>!0}=e;return i=>{var a;const{scales:[o]}=i,s=((a=o.getTicks)===null||a===void 0?void 0:a.call(o))||o.getOptions().domain,c=typeof n=="string"?uo(n):n,l=(f,d,h)=>r(s[d],d,s),u=Object.assign(Object.assign({},e),{labelFormatter:c,labelFilter:l,scale:o});return t(u)(i)}},po=uO(iG),fO=uO(eG);po.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},fO.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var aG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function oG(t){const e=t%(Math.PI*2);return e===Math.PI/2?{titleTransform:"translate(0, 50%)"}:e>-Math.PI/2&&e<Math.PI/2?{titleTransform:"translate(50%, 0)"}:e>Math.PI/2&&e<Math.PI*3/2?{titleTransform:"translate(-50%, 0)"}:{}}function sG(t,e,n,r){const{radar:i}=t,[a]=r,o=a.getOptions().name,[s,c]=fv(n),{axisRadar:l={}}=e;return Object.assign(Object.assign({},l),{grid:o==="position",gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((u,f)=>(c-s)/i.count*f)})}const dO=t=>{const{important:e={}}=t,n=aG(t,["important"]);return r=>{const{theme:i,coordinate:a,scales:o}=r;return po(Object.assign(Object.assign(Object.assign({},n),oG(t.orientation)),{important:Object.assign(Object.assign({},sG(t,i,a,o)),e)}))(r)}};dO.props=Object.assign(Object.assign({},po.props),{defaultPosition:"center"});function pd(t,e){return+t.toPrecision(e)}function dpt(t){return t.toLocaleString()}function hpt(t){return t.toExponential()}function ppt(t,e){return e===void 0&&(e=0),Math.abs(t)<1e3?String(t):"".concat(pd(t/1e3,e).toLocaleString(),"K")}var vpt=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},gpt=function(t,e,n){return t>0&&Number.isFinite(t)?e:n},ypt=function(t,e){return t*e},mpt=function(t,e){return t/2+(e||0)/2};function vd(t){var e=t.canvas,n=t.touches,r=t.offsetX,i=t.offsetY;if(e){var a=e.x,o=e.y;return[a,o]}if(n){var s=n[0],c=s.clientX,l=s.clientY;return[c,l]}return r&&i?[r,i]:[0,0]}var cG={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},jv=ji({background:"background",labelGroup:"label-group",label:"label"},"indicator"),lG=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,cG)||this;return r.point=[0,0],r.group=r.appendChild(new Dr({})),r.isMutationObserved=!0,r}return e.prototype.renderBackground=function(){if(this.label){var n=this.attributes,r=n.position,i=n.padding,a=(0,S.CR)(Br(i),4),o=a[0],s=a[1],c=a[2],l=a[3],u=this.label.node().getLocalBounds(),f=u.min,d=u.max,h=new Wn(f[0]-l,f[1]-o,d[0]+s-f[0]+l,d[1]+c-f[1]+o),p=this.getPath(r,h),v=en(this.attributes,"background");this.background=Ue(this.group).maybeAppendByClassName(jv.background,"path").styles((0,S.pi)((0,S.pi)({},v),{path:p})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var n=this.attributes,r=n.formatter,i=n.labelText,a=en(this.attributes,"label"),o=(0,S.CR)(ja(a),2),s=o[0],c=o[1],l=s.text,u=(0,S._T)(s,["text"]);if(this.label=Ue(this.group).maybeAppendByClassName(jv.labelGroup,"g").styles(c),!!i){var f=this.label.maybeAppendByClassName(jv.label,function(){return rs(r(i))}).style("text",r(i).toString());f.selectAll("text").styles(u)}},e.prototype.adjustLayout=function(){var n=(0,S.CR)(this.point,2),r=n[0],i=n[1];this.group.attr("x",-r).attr("y",-i)},e.prototype.getPath=function(n,r){var i=this.attributes.radius,a=r.x,o=r.y,s=r.width,c=r.height,l=[["M",a+i,o],["L",a+s-i,o],["A",i,i,0,0,1,a+s,o+i],["L",a+s,o+c-i],["A",i,i,0,0,1,a+s-i,o+c],["L",a+i,o+c],["A",i,i,0,0,1,a,o+c-i],["L",a,o+i],["A",i,i,0,0,1,a+i,o],["Z"]],u={top:4,right:6,bottom:0,left:2},f=u[n],d=this.createCorner([l[f].slice(-2),l[f+1].slice(-2)]);return l.splice.apply(l,(0,S.ev)([f+1,1],(0,S.CR)(d),!1)),l[0][0]="M",l},e.prototype.createCorner=function(n,r){r===void 0&&(r=10);var i=.8,a=bB.apply(void 0,(0,S.ev)([],(0,S.CR)(n),!1)),o=(0,S.CR)(n,2),s=(0,S.CR)(o[0],2),c=s[0],l=s[1],u=(0,S.CR)(o[1],2),f=u[0],d=u[1],h=(0,S.CR)(a?[f-c,[c,f]]:[d-l,[l,d]],2),p=h[0],v=(0,S.CR)(h[1],2),g=v[0],y=v[1],m=p/2,b=p/Math.abs(p),_=r*b,O=_/2,w=_*Math.sqrt(3)/2*i,M=(0,S.CR)([g,g+m-O,g+m,g+m+O,y],5),E=M[0],A=M[1],P=M[2],C=M[3],D=M[4];return a?(this.point=[P,l-w],[["L",E,l],["L",A,l],["L",P,l-w],["L",C,l],["L",D,l]]):(this.point=[c+w,P],[["L",c,E],["L",c,A],["L",c+w,P],["L",c,C],["L",c,D]])},e.prototype.applyVisibility=function(){var n=this.attributes.visibility;n==="hidden"?ho(this):gl(this)},e.prototype.bindEvents=function(){this.label.on(Re.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(Rr),hO={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},pO={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},vO={orientation:"horizontal",showLabel:!0,type:"start"},fa=ji({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),vo=ji({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),uG=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(n,r){var i=n.size,a=i===void 0?10:i,o=n.radius,s=o===void 0?a/4:o,c=n.orientation,l=(0,S._T)(n,["size","radius","orientation"]),u=a,f=u*2.4,d=Ue(r).maybeAppendByClassName(vo.iconRect,"rect").styles((0,S.pi)((0,S.pi)({},l),{width:u,height:f,radius:s,x:-u/2,y:-f/2})),h=1/3*u,p=2/3*u,v=1/4*f,g=3/4*f;d.maybeAppendByClassName("".concat(vo.iconLine,"-1"),"line").styles((0,S.pi)({x1:h,x2:h,y1:v,y2:g},l)),d.maybeAppendByClassName("".concat(vo.iconLine,"-2"),"line").styles((0,S.pi)({x1:p,x2:p,y1:v,y2:g},l)),d.node().setOrigin(u/2,f/2),c==="vertical"?r.setLocalEulerAngles(90):r.setLocalEulerAngles(0)},e}(Rr),gO=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,vO)||this}return e.prototype.renderLabel=function(n){var r=this,i=this.attributes.showLabel,a=en(this.attributes,"label"),o=a.transform,s=(0,S._T)(a,["transform"]),c=(0,S.CR)(ja(s,[]),2),l=c[0],u=c[1],f=Ue(n).maybeAppendByClassName(vo.labelGroup,"g").styles(u),d=(0,S.pi)((0,S.pi)({},pO),l),h=d.text,p=(0,S._T)(d,["text"]);pi(!!i,f,function(v){r.label=v.maybeAppendByClassName(vo.label,"text").styles((0,S.pi)((0,S.pi)({},p),{transform:o,text:"".concat(h)})),r.label.on("mousedown",function(g){g.stopPropagation()}),r.label.on("touchstart",function(g){g.stopPropagation()})})},e.prototype.renderIcon=function(n){var r=this.attributes,i=r.orientation,a=r.type,o=(0,S.pi)((0,S.pi)({orientation:i},hO),en(this.attributes,"icon")),s=this.attributes.iconShape,c=s===void 0?function(){return new uG({style:o})}:s,l=Ue(n).maybeAppendByClassName(vo.iconGroup,"g");l.selectAll(vo.icon.class).data([c]).join(function(u){return u.append(typeof c=="string"?c:function(){return c(a)}).attr("className",vo.icon.name)},function(u){return u.update(o)},function(u){return u.remove()})},e.prototype.render=function(n,r){this.renderIcon(r),this.renderLabel(r)},e}(Rr),yO=function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]},fG=yO,dG=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},hG=function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},pG=function(t,e,n){var r=n*Math.sin(.3333333333333333*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},vG=function(t,e,n){var r=n*Math.sin(.3333333333333333*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},gG=function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},yG=function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},mO=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},mG=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},bG=function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},xG=function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},_G=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},bO=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},OG=bO,wG=function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]},SG=function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]},MG=function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]},EG=function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]};function AG(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]}var TG=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]};function PG(t){var e="default";if(Yo(t)&&t instanceof Image)e="image";else if(vi(t))e="symbol";else if(er(t)){var n=new RegExp("data:(image|text)");t.match(n)?e="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?e="url":e="symbol"}return e}function CG(t){var e=PG(t);return["base64","url","image"].includes(e)?"image":t&&e==="symbol"?"path":null}var kn=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(n,r){var i=n.symbol,a=n.size,o=a===void 0?16:a,s=(0,S._T)(n,["symbol","size"]),c=CG(i);pi(!!c,Ue(r),function(l){l.maybeAppendByClassName("marker",c).attr("className","marker ".concat(c,"-marker")).call(function(u){if(c==="image"){var f=o*2;u.styles({img:i,width:f,height:f,x:-o,y:-o})}else{var f=o/2,d=vi(i)?i:e.getSymbol(i);u.styles((0,S.pi)({path:d==null?void 0:d(0,0,f)},s))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(n,r){e.MARKER_SYMBOL_MAP.set(n,r)},e.getSymbol=function(n){return e.MARKER_SYMBOL_MAP.get(n)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(Rr);kn.registerSymbol("cross",mG),kn.registerSymbol("hyphen",_G),kn.registerSymbol("line",mO),kn.registerSymbol("plus",xG),kn.registerSymbol("tick",bG),kn.registerSymbol("circle",yO),kn.registerSymbol("point",fG),kn.registerSymbol("bowtie",yG),kn.registerSymbol("hexagon",gG),kn.registerSymbol("square",dG),kn.registerSymbol("diamond",hG),kn.registerSymbol("triangle",pG),kn.registerSymbol("triangle-down",vG),kn.registerSymbol("line",mO),kn.registerSymbol("dot",bO),kn.registerSymbol("dash",OG),kn.registerSymbol("smooth",wG),kn.registerSymbol("hv",SG),kn.registerSymbol("vh",MG),kn.registerSymbol("hvh",EG),kn.registerSymbol("vhv",AG);function kG(t,e,n){var r=Math.round((t-n)/e);return n+r*e}function RG(t,e,n){var r=1.4,i=r*n;return[["M",t-n,e-i],["L",t+n,e-i],["L",t+n,e+i],["L",t-n,e+i],["Z"]]}var xO=1.4,_O=.4;function LG(t,e,n){var r=n,i=r*xO,a=r/2,o=r/6,s=t+i*_O;return[["M",t,e],["L",s,e+a],["L",t+i,e+a],["L",t+i,e-a],["L",s,e-a],["Z"],["M",s,e+o],["L",t+i-2,e+o],["M",s,e-o],["L",t+i-2,e-o]]}function NG(t,e,n){var r=n,i=r*xO,a=r/2,o=r/6,s=e+i*_O;return[["M",t,e],["L",t-a,s],["L",t-a,e+i],["L",t+a,e+i],["L",t+a,s],["Z"],["M",t-o,s],["L",t-o,e+i-2],["M",t+o,s],["L",t+o,e+i-2]]}kn.registerSymbol("hiddenHandle",RG),kn.registerSymbol("verticalHandle",LG),kn.registerSymbol("horizontalHandle",NG);var bpt=function(t,e,n){return t===void 0&&(t="horizontal"),t==="horizontal"?e:n};function IG(t,e,n,r){var i;r===void 0&&(r=4);var a=(0,S.CR)(t,2),o=a[0],s=a[1],c=(0,S.CR)(e,2),l=c[0],u=c[1],f=(0,S.CR)(n,2),d=f[0],h=f[1],p=(0,S.CR)([l,u],2),v=p[0],g=p[1],y=g-v;return v>g&&(i=(0,S.CR)([g,v],2),v=i[0],g=i[1]),y>s-o?[o,s]:v<o?d===o&&h===g?[o,g]:[o,y+o]:g>s?h===s&&d===v?[v,s]:[s-y,s]:[v,g]}function da(t,e,n){return t===void 0&&(t="horizontal"),t==="horizontal"?e:n}var Ml=ji({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),OO={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},jG=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,OO)||this}return e.prototype.render=function(n,r){var i=Ue(r).maybeAppendByClassName(Ml.markerGroup,"g");this.renderMarker(i);var a=Ue(r).maybeAppendByClassName(Ml.labelGroup,"g");this.renderLabel(a)},e.prototype.renderMarker=function(n){var r=this,i=this.attributes,a=i.orientation,o=i.markerSymbol,s=o===void 0?da(a,"horizontalHandle","verticalHandle"):o;pi(!!s,n,function(c){var l=en(r.attributes,"marker"),u=(0,S.pi)({symbol:s},l);r.marker=c.maybeAppendByClassName(Ml.marker,function(){return new kn({style:u})}).update(u)})},e.prototype.renderLabel=function(n){var r=this,i=this.attributes,a=i.showLabel,o=i.orientation,s=i.spacing,c=s===void 0?0:s,l=i.formatter;pi(a,n,function(u){var f,d=en(r.attributes,"label"),h=d.text,p=(0,S._T)(d,["text"]),v=((f=u.select(Ml.marker.class))===null||f===void 0?void 0:f.node().getBBox())||{},g=v.width,y=g===void 0?0:g,m=v.height,b=m===void 0?0:m,_=(0,S.CR)(da(o,[0,b+c,"center","top"],[y+c,0,"start","middle"]),4),O=_[0],w=_[1],M=_[2],E=_[3];u.maybeAppendByClassName(Ml.label,"text").styles((0,S.pi)((0,S.pi)({},p),{x:O,y:w,text:l(h).toString(),textAlign:M,textBaseline:E}))})},e}(Rr),wO={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},DG=Na({},wO,{}),FG=Na({},wO,la(OO,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),BG=.01,xpt=.5,Lr=ji({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend");function zG(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(e>=r&&e<=i)return[r,i]}return[e,e]}function GG(t,e,n){var r=Array.from(e),i=t.length;return new Array(i).fill(0).reduce(function(a,o,s){var c=r[s%r.length];return a+=" ".concat(t[s],":").concat(c).concat(s<i-1?" ".concat(t[s+1],":").concat(c):"")},"l(".concat(n==="horizontal"?"0":"270",")"))}function SO(t,e){var n=(0,S.CR)(zG(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var El=ji({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function MO(t){var e=t.orientation,n=t.size,r=t.length;return da(e,[r,n],[n,r])}function EO(t){var e=t.type,n=(0,S.CR)(MO(t),2),r=n[0],i=n[1];return e==="size"?[["M",0,i],["L",0+r,0],["L",0+r,i],["Z"]]:[["M",0,i],["L",0,0],["L",0+r,0],["L",0+r,i],["Z"]]}function WG(t){return EO(t)}function HG(t){var e=t.orientation,n=t.color,r=t.block,i=t.partition,a;if(vi(n)){var o=20;a=new Array(o).fill(0).map(function(l,u,f){return n(u/(f.length-1))})}else a=n;var s=a.length,c=a.map(function(l){return Pa(l).toString()});return s?s===1?c[0]:r?GG(i,c,e):c.reduce(function(l,u,f){return l+=" ".concat(f/(s-1),":").concat(u)},"l(".concat(da(e,"0","270"),")")):""}function YG(t){var e=t.orientation,n=t.range;if(!n)return[];var r=(0,S.CR)(MO(t),2),i=r[0],a=r[1],o=(0,S.CR)(n,2),s=o[0],c=o[1],l=da(e,s*i,0),u=da(e,0,s*a),f=da(e,c*i,i),d=da(e,a,c*a);return[["M",l,u],["L",l,d],["L",f,d],["L",f,u],["Z"]]}function VG(t,e){var n=en(e,"track");t.maybeAppendByClassName(El.track,"path").styles((0,S.pi)({path:EO(e)},n))}function $G(t,e){var n=en(e,"selection"),r=HG(e),i=t.maybeAppendByClassName(El.selection,"path").styles((0,S.pi)({path:WG(e),fill:r},n)),a=i.maybeAppendByClassName(El.clipPath,"path").styles({path:YG(e)}).node();i.style("clip-path",a)}var XG=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return e.prototype.render=function(n,r){var i=Ue(r).maybeAppendByClassName(El.trackGroup,"g");VG(i,n);var a=Ue(r).maybeAppendByClassName(El.selectionGroup,"g");$G(a,n)},e}(Rr);function UG(t){return{min:Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(t.map(function(e){return e.value})),!1)),max:Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(t.map(function(e){return e.value})),!1))}}var qG=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,FG)||this;return r.eventToOffsetScale=new Vr({}),r.innerRibbonScale=new Vr({}),r.cacheLabelBBox=null,r.cacheHandleBBox=null,r.onHovering=function(i){var a=r.attributes,o=a.data,s=a.block;i.stopPropagation();var c=r.getValueByCanvasPoint(i);if(s){var l=SO(o.map(function(f){var d=f.value;return d}),c).range;r.showIndicator((l[0]+l[1])/2,"".concat(l[0],"-").concat(l[1])),r.dispatchIndicated(c,l)}else{var u=r.getTickValue(c);r.showIndicator(u),r.dispatchIndicated(u)}},r.onDragStart=function(i){return function(a){a.stopPropagation(),r.attributes.slidable&&(r.target=i,r.prevValue=r.getTickValue(r.getValueByCanvasPoint(a)),document.addEventListener("mousemove",r.onDragging),document.addEventListener("touchmove",r.onDragging),document.addEventListener("mouseleave",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("touchend",r.onDragEnd))}},r.onDragging=function(i){var a=r.target;r.updateMouse();var o=(0,S.CR)(r.selection,2),s=o[0],c=o[1],l=r.getTickValue(r.getValueByCanvasPoint(i)),u=l-r.prevValue;a==="start"?s!==l&&r.updateSelection(l,c):a==="end"?c!==l&&r.updateSelection(s,l):a==="ribbon"&&u!==0&&(r.prevValue=l,r.updateSelection(u,u,!0))},r.onDragEnd=function(){r.style.cursor="pointer",document.removeEventListener("mousemove",r.onDragging),document.removeEventListener("touchmove",r.onDragging),document.removeEventListener("mouseup",r.onDragEnd),document.removeEventListener("touchend",r.onDragEnd)},r}return Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var n=this.attributes,r=n.width,i=n.height;return new Wn(0,0,r,i)},e.prototype.render=function(n,r){var i=this,a=n.showLabel;this.renderTitle(Ue(r));var o=this.availableSpace,s=o.x,c=o.y,l=Ue(r).maybeAppendByClassName(Lr.contentGroup,"g").styles({x:s,y:c}),u=l.maybeAppendByClassName(Lr.labelGroup,"g").styles({zIndex:1});pi(!!a,u,function(d){i.renderLabel(d)});var f=l.maybeAppendByClassName(Lr.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(Lr.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(f),this.renderIndicator(l),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var n=this.attributes,r=n.data,i=n.domain;return i?{min:i[0],max:i[1]}:UG(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var n=this.range,r=n.min,i=n.max;return this.innerRibbonScale.update({domain:[r,i],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var n=(0,S.CR)(this.selection,2),r=n[0],i=n[1],a=this.ribbonScale;return[a.map(r),a.map(i)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var n=this.range,r=n.min,i=n.max,a=this.attributes.defaultValue,o=a===void 0?[r,i]:a,s=(0,S.CR)(o,2),c=s[0],l=s[1];return[c,l]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(n,r){return da(this.attributes.orientation,typeof n=="function"?n():n,typeof r=="function"?r():r)},e.prototype.renderTitle=function(n){var r=this.attributes,i=r.showTitle,a=r.titleText,o=r.width,s=r.height,c=en(this.attributes,"title"),l=(0,S.pi)((0,S.pi)({},c),{width:o,height:s,text:a}),u=this;n.selectAll(Lr.title.class).data(i?[a]:[]).join(function(f){return f.append(function(){return new N2({style:l})}).attr("className",Lr.title.name).each(function(){u.title=this})},function(f){return f.update(l)},function(f){return f.each(function(){u.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var n=this.attributes,r=n.width,i=n.height;return new Wn(0,0,r,i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){var n=this.attributes.showTick;return n?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var n=this.attributes,r=n.orientation,i=n.labelDirection,a={vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}};return a[r][i]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){var n,r=this.attributes.showLabel;if(!r)return new Wn(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var i=((n=this.label.querySelector(Tn.labelGroup.class))===null||n===void 0?void 0:n.children.slice(-1)[0]).getBBox(),a=i.width,o=i.height;return this.cacheLabelBBox=new Wn(0,0,a,o),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var n=this.attributes,r=n.showLabel,i=n.labelSpacing,a=i===void 0?0:i;if(!r)return{width:0,height:0,size:0,length:0};var o=this.labelBBox,s=o.width,c=o.height,l=this.ifHorizontal(c,s)+a+this.labelFixedSpacing,u=this.ifHorizontal(s,c);return{width:s,height:c,size:l,length:u}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var n=this.attributes,r=n.showHandle,i=n.ribbonSize,a=this.availableSpace,o=a.width,s=a.height,c=this.labelShape,l=c.size,u=c.length,f=(0,S.CR)(this.ifHorizontal([s,o],[o,s]),2),d=f[0],h=f[1],p=r?this.handleShape:{size:0,length:0},v=p.size,g=p.length,y=this.handleOffsetRatio,m=0,b=this.labelPosition;i?m=i:["bottom","right"].includes(b)?m=Math.min(d-l,(d-v)/y):d*(1-y)>v?m=Math.max(d-l,0):m=Math.max((d-l-v)/y,0);var _=Math.max(g,u),O=h-_,w=(0,S.CR)(this.ifHorizontal([O,m],[m,O]),2),M=w[0],E=w[1],A=["top","left"].includes(b)?l:0,P=(0,S.CR)(this.ifHorizontal([_/2,A],[A,_/2]),2),C=P[0],D=P[1];return new Wn(C,D,M,E)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var n=this.ribbonBBox,r=n.width,i=n.height;return this.ifHorizontal({size:i,length:r},{size:r,length:i})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(n){var r=this.attributes,i=r.data,a=r.type,o=r.orientation,s=r.color,c=r.block,l=en(this.attributes,"ribbon"),u=this.range,f=u.min,d=u.max,h=this.ribbonBBox,p=h.x,v=h.y,g=this.ribbonShape,y=g.length,m=g.size,b=Na({x:p,y:v,length:y,size:m,type:a,orientation:o,color:s,block:c,partition:i.map(function(_){return(_.value-f)/(d-f)}),range:this.ribbonRange},l);this.ribbon=n.maybeAppendByClassName(Lr.ribbon,function(){return new XG({style:b})}).update(b)},e.prototype.getHandleClassName=function(n){return"".concat(Lr.prefix("".concat(n,"-handle")))},e.prototype.renderHandles=function(){var n=this.attributes,r=n.showHandle,i=n.orientation,a=en(this.attributes,"handle"),o=(0,S.CR)(this.selection,2),s=o[0],c=o[1],l=(0,S.pi)((0,S.pi)({},a),{orientation:i}),u=a.shape,f=u===void 0?"slider":u,d=f==="basic"?jG:gO,h=this;this.handlesGroup.selectAll(Lr.handle.class).data(r?[{value:s,type:"start"},{value:c,type:"end"}]:[],function(p){return p.type}).join(function(p){return p.append(function(){return new d({style:l})}).attr("className",function(v){var g=v.type;return"".concat(Lr.handle," ").concat(h.getHandleClassName(g))}).each(function(v){var g=v.type,y=v.value;this.update({labelText:y});var m="".concat(g,"Handle");h[m]=this,this.addEventListener("pointerdown",h.onDragStart(g))})},function(p){return p.update(l).each(function(v){var g=v.value;this.update({labelText:g})})},function(p){return p.each(function(v){var g=v.type,y="".concat(g,"Handle");h[y]=void 0}).remove()})},e.prototype.adjustHandles=function(){var n=(0,S.CR)(this.selection,2),r=n[0],i=n[1];this.setHandlePosition("start",r),this.setHandlePosition("end",i)},e.prototype.adjustTitle=function(){var n=this.attributes,r=n.titlePosition,i=n.orientation,a=(0,S.CR)(this.getElementsByClassName(Lr.title.name),1),o=a[0],s=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(!(!o||!s)&&!(r!=="top-left"||i!=="horizontal")){var c=(0,S.CR)(s.getLocalBounds().min,1),l=c[0],u=(0,S.CR)(o.getLocalBounds().min,1),f=u[0],d=l-f;o.style.x=+(this.style.x||0)+d}},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new Wn(0,0,0,0);var n=this.startHandle.getBBox(),r=n.width,i=n.height,a=this.endHandle.getBBox(),o=a.width,s=a.height,c=(0,S.CR)([Math.max(r,o),Math.max(i,s)],2),l=c[0],u=c[1];return this.cacheHandleBBox=new Wn(0,0,l,u),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var n=this.handleBBox,r=n.width,i=n.height,a=(0,S.CR)(this.ifHorizontal([i,r],[r,i]),2),o=a[0],s=a[1];return{width:r,height:i,size:o,length:s}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(n,r){var i=this.attributes.handleFormatter,a=this.ribbonBBox,o=a.x,s=a.y,c=this.ribbonShape.size,l=this.getOffset(r),u=(0,S.CR)(this.ifHorizontal([o+l,s+c*this.handleOffsetRatio],[o+c*this.handleOffsetRatio,s+l]),2),f=u[0],d=u[1],h=this.handlesGroup.select(".".concat(this.getHandleClassName(n))).node();h==null||h.update({x:f,y:d,formatter:i})},e.prototype.renderIndicator=function(n){var r=en(this.attributes,"indicator");this.indicator=n.maybeAppendByClassName(Lr.indicator,function(){return new lG({})}).update(r)},Object.defineProperty(e.prototype,"labelData",{get:function(){var n=this,r=this.attributes.data;return r.reduce(function(i,a,o,s){var c,l,u=(c=a==null?void 0:a.id)!==null&&c!==void 0?c:o.toString();if(i.push((0,S.pi)((0,S.pi)({},a),{id:u,index:o,type:"value",label:(l=a==null?void 0:a.label)!==null&&l!==void 0?l:a.value.toString(),value:n.ribbonScale.map(a.value)})),o<s.length-1){var f=s[o+1],d=(0,S.CR)([a.value,f.value],2),h=d[0],p=d[1],v=(h+p)/2;i.push((0,S.pi)((0,S.pi)({},a),{id:u,index:o,type:"range",range:[h,p],label:[h,p].join("~"),value:n.ribbonScale.map(v)}))}return i},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var n=(0,S.CR)(["center","middle"],2),r=n[0],i=n[1],a=this.labelPosition;return a==="top"?i="bottom":a==="bottom"?i="top":a==="left"?r="end":a==="right"&&(r="start"),{labelTextAlign:r,labelTextBaseline:i}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(n){var r=this.attributes,i=r.showTick,a=i===void 0?!1:i,o=r.labelFilter,s=r.labelFormatter,c=en(this.attributes,"tick"),l=en(this.attributes,"label"),u=l.align,f=Na((0,S.pi)({showLine:!1,showGrid:!1,showTick:a,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),la(c,"tick"),la(l,"label"),{data:this.labelData}),d={tickFilter:function(p,v,g){return(p==null?void 0:p.type)!=="value"?!1:o?o(p,p.index,g.filter(function(y){return y.type!=="value"})):!0},labelFilter:function(p,v,g){return(p==null?void 0:p.type)!==u?!1:o?o(p,p.index,g.filter(function(y){return y.type===u})):!0},labelFormatter:s},h=(0,S.pi)((0,S.pi)((0,S.pi)({},f),d),{labelOverlap:[{type:"hide"}]});this.label=n.maybeAppendByClassName(Lr.label,function(){return new Tv({style:h})}).node(),this.label.update(h,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var n=this.attributes,r=n.showTick,i=n.labelDirection,a=n.labelSpacing,o=n.tickLength,s=this.ribbonShape.size,c=this.labelPosition,l=this.labelFixedSpacing,u=(0,S.CR)([0,0,0],3),f=u[0],d=u[1],h=u[2],p=o!=null?o:s;return r?(h=p,d=l,i==="positive"?c==="right"?(f=p,h=p):c==="bottom"&&(f=h):i==="negative"&&(c==="top"||c==="left")&&(f=s)):i==="positive"?c==="right"?d=p:c==="bottom"&&(f=s+l,d=a):i==="negative"&&(c==="left"||c==="top")&&(d=a),{offset:f,spacing:a,tickLength:h}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){var n=this.attributes.showLabel;if(n){var r=this.ribbonBBox,i=r.x,a=r.y,o=r.width,s=r.height,c=this.labelAxisStyle,l=c.offset,u=c.spacing,f=c.tickLength,d=(0,S.CR)(this.ifHorizontal([[i,a+l],[i+o,a+l]],[[i+l,a+s],[i+l,a]]),2),h=d[0],p=d[1];this.label.update({startPos:h,endPos:p,tickLength:f,labelSpacing:u},!1)}},e.prototype.bindEvents=function(){this.style.cursor="pointer",this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},e.prototype.showIndicator=function(n,r){r===void 0&&(r="".concat(n));var i=this.attributes.showIndicator;if(!i||typeof n!="number"){this.hideIndicator();return}var a=this.range,o=a.min,s=a.max,c=this.ribbonBBox,l=c.x,u=c.y,f=(0,lr.Z)(n,o,s),d=this.getOffset(f),h=this.ifHorizontal([d+l,u],[l,d+u]);this.indicator.update({x:h[0],y:h[1],position:this.ifHorizontal("top","left"),labelText:r}),gl(this.indicator.node())},e.prototype.hideIndicator=function(){ho(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(n,r){this.updateSelection(n,r)},e.prototype.updateSelection=function(n,r,i){var a;i===void 0&&(i=!1);var o=(0,S.CR)(this.selection,2),s=o[0],c=o[1],l=(0,S.CR)([n,r],2),u=l[0],f=l[1];i&&(u+=s,f+=c);var d=this.range,h=d.min,p=d.max;a=(0,S.CR)(IG([h,p],[u,f],this.selection),2),u=a[0],f=a[1],this.update({defaultValue:[u,f]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var n=this.attributes.step,r=n===void 0?1:n,i=this.range,a=i.min,o=i.max;return nr(r)?pd((o-a)*BG,0):r},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(n){var r=this.attributes,i=r.data,a=r.block,o=this.range.min;return a?SO(i.map(function(s){var c=s.value;return c}),n).tick:kG(n,this.step,o)},e.prototype.getValueByCanvasPoint=function(n,r){r===void 0&&(r=!1);var i=this.range,a=i.min,o=i.max,s=(0,S.CR)(this.ribbon.node().getPosition(),2),c=s[0],l=s[1],u=this.ifHorizontal(c,l),f=this.ifHorizontal.apply(this,(0,S.ev)([],(0,S.CR)(vd(n)),!1)),d=f-u,h=(0,lr.Z)(this.getOffset(d,!0),a,o);return h},e.prototype.getOffset=function(n,r){r===void 0&&(r=!1);var i=this.range,a=i.min,o=i.max,s=this.ribbonShape.length,c=this.eventToOffsetScale;return c.update({domain:[a,o],range:[0,s]}),r?c.invert(n):c.map(n)},e.prototype.dispatchSelection=function(){var n=new Rn("valuechange",{detail:{value:this.selection}});this.dispatchEvent(n)},e.prototype.dispatchIndicated=function(n,r){var i=new Rn("indicate",{detail:{value:n,range:r}});this.dispatchEvent(i)},e}(Rr);class Al extends wl{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:as}}map(e){const[n]=this.options.range;return n!==void 0?n:this.options.unknown}invert(e){const[n]=this.options.range;return e===n&&n!==void 0?this.options.domain:[]}getTicks(){const{tickMethod:e,domain:n,tickCount:r}=this.options,[i,a]=n;return!Js(i)||!Js(a)?[]:e(i,a,r)}clone(){return new Al(this.options)}}class nc extends wl{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(e){super(e)}map(e){if(!ld(e))return this.options.unknown;const n=Cv(this.thresholds,e,0,this.n);return this.options.range[n]}invert(e){const{range:n}=this.options,r=n.indexOf(e),i=this.thresholds;return[i[r-1],i[r]]}clone(){return new nc(this.options)}rescale(){const{domain:e,range:n}=this.options;this.n=Math.min(e.length,n.length-1),this.thresholds=e}}function Tl(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const ZG=[1,5,2,2.5,4,3],_pt=null,AO=Number.EPSILON*100;function KG(t,e){return(t%e+e)%e}function QG(t){return Math.round(t*1e12)/1e12}function JG(t,e,n,r,i,a){const o=U2(e),s=$2(e,t);let c=0;const l=KG(r,a);return(l<AO||a-l<AO)&&r<=0&&i>=0&&(c=1),1-s/(o-1)-n+c}function tW(t,e,n){const r=U2(e),i=$2(e,t),a=1;return 1-i/(r-1)-n+a}function eW(t,e,n,r,i,a){const o=(t-1)/(a-i),s=(e-1)/(Math.max(a,r)-Math.min(n,i));return 2-Math.max(o/s,s/o)}function nW(t,e){return t>=e?2-(t-1)/(e-1):1}function rW(t,e,n,r){const i=e-t;return 1-.5*(wr(e-r,2)+wr(t-n,2))/wr(.1*i,2)}function iW(t,e,n){const r=e-t;if(n>r){const i=(n-r)/2;return 1-wr(i,2)/wr(.1*r,2)}return 1}function aW(){return 1}const Dv=(t,e,n=5,r=!0,i=ZG,a=[.25,.2,.5,.05])=>{const o=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||typeof t!="number"||typeof e!="number"||!o)return[];if(e-t<1e-15||o===1)return[t];const s={score:-2,lmin:0,lmax:0,lstep:0};let c=1;for(;c<1/0;){for(let p=0;p<i.length;p+=1){const v=i[p],g=tW(v,i,c);if(a[0]*g+a[1]+a[2]+a[3]<s.score){c=1/0;break}let y=2;for(;y<1/0;){const m=nW(y,o);if(a[0]*g+a[1]+a[2]*m+a[3]<s.score)break;const b=(e-t)/(y+1)/c/v;let _=Math.ceil(Math.log10(b));for(;_<1/0;){const O=c*v*wr(10,_),w=iW(t,e,O*(y-1));if(a[0]*g+a[1]*w+a[2]*m+a[3]<s.score)break;const M=Math.floor(e/O)*c-(y-1)*c,E=Math.ceil(t/O)*c;if(M<=E){const A=E-M;for(let P=0;P<=A;P+=1){const D=(M+P)*(O/c),N=D+O*(y-1),k=O,R=JG(v,i,c,D,N,k),I=rW(t,e,D,N),F=eW(y,o,t,e,D,N),B=aW(),z=a[0]*R+a[1]*I+a[2]*F+a[3]*B;z>s.score&&(!r||D<=t&&N>=e)&&(s.lmin=D,s.lmax=N,s.lstep=k,s.score=z)}}_+=1}y+=1}}c+=1}const l=Tl(s.lmax),u=Tl(s.lmin),f=Tl(s.lstep),d=Math.floor(QG((l-u)/f))+1,h=new Array(d);h[0]=Tl(u);for(let p=1;p<d;p+=1)h[p]=Tl(h[p-1]+f);return h};class gd extends nc{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Dv}}constructor(e){super(e)}nice(){const{nice:e}=this.options;if(e){const[n,r,i]=this.getTickMethodOptions();this.options.domain=K2(n,r,i)}}getTicks(){const{tickMethod:e}=this.options,[n,r,i]=this.getTickMethodOptions();return e(n,r,i)}getTickMethodOptions(){const{domain:e,tickCount:n}=this.options,r=e[0],i=e[e.length-1];return[r,i,n]}rescale(){this.nice();const{range:e,domain:n}=this.options,[r,i]=n;this.n=e.length-1,this.thresholds=new Array(this.n);for(let a=0;a<this.n;a+=1)this.thresholds[a]=((a+1)*i-(a-this.n)*r)/(this.n+1)}invert(e){const[n,r]=super.invert(e),[i,a]=this.options.domain;return n===void 0&&r===void 0?[n,r]:[n||i,r||a]}getThresholds(){return this.thresholds}clone(){return new gd(this.options)}}function oW(t,e){const n=t.length;if(!n)return;if(n<2)return t[n-1];const r=(n-1)*e,i=Math.floor(r),a=t[i],o=t[i+1];return a+(o-a)*(r-i)}function sW(t,e,n=!1){const r=t;n||r.sort((a,o)=>a-o);const i=[];for(let a=1;a<e;a+=1)i.push(oW(r,a/e));return i}class yd extends nc{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Dv}}constructor(e){super(e)}rescale(){const{domain:e,range:n}=this.options;this.n=n.length-1,this.thresholds=sW(e,this.n+1,!1)}invert(e){const[n,r]=super.invert(e),{domain:i}=this.options,a=i[0],o=i[i.length-1];return n===void 0&&r===void 0?[n,r]:[n||a,r||o]}getThresholds(){return this.thresholds}clone(){return new yd(this.options)}getTicks(){const{tickCount:e,domain:n,tickMethod:r}=this.options,i=n.length-1,a=n[0],o=n[i];return r(a,o,e)}}var cW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function lW(t,e,n){return t.size=e,Hz(n)?t.height=e:t.width=e,t}function uW(t,e,n){const{size:r}=e,i=aO(t,e,n);return lW(i,r,i.orientation)}function fW(t){return e=>({value:e/t,label:String(e)})}function dW(t,e,n,r,i){const a=e.thresholds,o=fW(r);return Object.assign(Object.assign({},t),{color:i,data:[n,...a,r].map(o)})}function hW(t,e,n){const i=[-1/0,...e.thresholds,1/0].map((a,o)=>({value:o,label:a}));return Object.assign(Object.assign({},t),{data:i,color:n,labelFilter:(a,o)=>o>0&&o<i.length-1})}function Fv(t){const{domain:e}=t.getOptions(),[n,r]=[e[0],W_(e)];return[n,r]}function pW(t,e){const n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[Pa(e).toString()]})),r}function vW(t,e,n,r,i,a){const{length:o}=t,s=n||r,c=i.color?a.legendContinuous.ribbonFill||"black":a.color,l=e||pW(s,c),[u,f]=Fv(l),[d,h]=Fv([e,n,r].filter(p=>p!==void 0).find(p=>!(p instanceof Al)));return Object.assign(Object.assign({},t),{domain:[d,h],data:l.getTicks().map(p=>({value:p})),color:new Array(Math.floor(o)).fill(0).map((p,v)=>{const g=(f-u)/(o-1)*v+u,y=l.map(g)||c,m=r?r.map(g):1;return y.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(b,_,O,w)=>`rgba(${_}, ${O}, ${w}, ${m})`)})})}function gW(t,e,n,r,i,a){const o=ua(t,"color"),s=uW(n,r,i);if(o instanceof nc){const{range:u}=o.getOptions(),[f,d]=Fv(o);return o instanceof gd||o instanceof yd?dW(s,o,f,d,u):hW(s,o,u)}const c=ua(t,"size"),l=ua(t,"opacity");return vW(s,o,c,l,e,a)}const go=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:s,style:c,crossPadding:l,padding:u}=t,f=cW(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:d,value:h,theme:p,scale:v})=>{const{bbox:g}=h,{x:y,y:m,width:b,height:_}=g,O=rO(a,n),{legendContinuous:w={}}=p,M=hd(Object.assign({},w,Object.assign(Object.assign({titleText:dd(s),labelAlign:"value",labelFormatter:typeof e=="string"?A=>uo(e)(A.label):e},gW(d,v,h,t,go,p)),c),f)),E=new iO({style:Object.assign(Object.assign({x:y,y:m,width:b,height:_},O),{subOptions:M})});return E.appendChild(new qG({className:"legend-continuous",style:M})),E}};go.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const TO=t=>(...e)=>go(Object.assign({},{block:!0},t))(...e);TO.props=Object.assign(Object.assign({},go.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const Bv=t=>e=>{const{scales:n}=e,r=ua(n,"size");return go(Object.assign({},{type:"size",data:r.getTicks().map((i,a)=>({value:i,label:String(i)}))},t))(e)};Bv.props=Object.assign(Object.assign({},go.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const PO=t=>Bv(Object.assign({},{block:!0},t));PO.props=Object.assign(Object.assign({},go.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var yW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const CO=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:i,paddingLeft:a,paddingRight:o,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,margin:v,marginLeft:g,marginBottom:y,marginTop:m,marginRight:b,data:_,coordinate:O,theme:w,component:M,interaction:E,x:A,y:P,z:C,key:D,frame:N,labelTransform:k,parentKey:R,clip:I,viewStyle:F,title:B}=e,z=yW(e,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:A,y:P,z:C,key:D,width:n,height:r,depth:i,padding:l,paddingLeft:a,paddingRight:o,paddingTop:s,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,paddingBottom:c,theme:w,coordinate:O,component:M,interaction:E,frame:N,labelTransform:k,margin:v,marginLeft:g,marginBottom:y,marginTop:m,marginRight:b,parentKey:R,clip:I,style:F},!t&&{title:B}),{marks:[Object.assign(Object.assign(Object.assign({},z),{key:`${D}-0`,data:_}),t&&{title:B})]})]};CO.props={};var mW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function rc(t){return(e,...n)=>Nt({},t(e,...n),e)}function ic(t){return(e,...n)=>Nt({},e,t(e,...n))}function zv(t,e){if(!t)return e;if(Array.isArray(t))return t;const{value:n=e}=t,r=mW(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}var Gv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const kO=()=>t=>{const{children:e}=t,n=Gv(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:c=[]}=n,l=Gv(n,["data","scale","axis","legend","encode","transform"]),u=e.map(f=>{var{data:d,scale:h={},axis:p={},legend:v={},encode:g={},transform:y=[]}=f,m=Gv(f,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:zv(d,r),scale:Nt({},i,h),encode:Nt({},s,g),transform:[...c,...y],axis:p&&a?Nt({},a,p):!1,legend:v&&o?Nt({},o,v):!1},m)});return[Object.assign(Object.assign({},l),{marks:u,type:"standardView"})]};kO.props={};function fr([t,e],[n,r]){return[t-n,e-r]}function md([t,e],[n,r]){return[t+n,e+r]}function Qn([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Bi([t,e]){return Math.atan2(e,t)}function ac([t,e]){return Bi([t,e])+Math.PI/2}function RO(t,e){const n=Bi(t),r=Bi(e);return n<r?r-n:Math.PI*2-(n-r)}function Wv(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(const[s,c]of t)e=Math.min(s,e),n=Math.max(s,n),r=Math.min(c,r),i=Math.max(c,i);const a=n-e,o=i-r;return[e,r,a,o]}function LO([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Ee(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function bW(t,e){return e.forEach((n,r)=>r===0?t.moveTo(n[0],n[1]):t.lineTo(n[0],n[1])),t.closePath(),t}function xW(t,e,n){const{arrowSize:r}=n,i=typeof r=="string"?+parseFloat(r)/100*Qn(t,e):r,a=Math.PI/6,o=Math.atan2(e[1]-t[1],e[0]-t[0]),s=Math.PI/2-o-a,c=[e[0]-i*Math.sin(s),e[1]-i*Math.cos(s)],l=o-a,u=[e[0]-i*Math.cos(l),e[1]-i*Math.sin(l)];return[c,u]}function Pl(t,e,n,r,i){const a=Bi(fr(r,e))+Math.PI,o=Bi(fr(r,n))+Math.PI;return t.arc(r[0],r[1],i,a,o,o-a<0),t}function NO(t,e,n,r="y",i="between",a=!1){const o=(g,y)=>g==="y"||g===!0?y?180:90:y?90:0,s=r==="y"||r===!0?n:e,c=o(r,a),l=ts(s),[u,f]=Da(l,g=>s[g]),d=new Vr({domain:[u,f],range:[0,100]}),h=g=>d.map(s[g]),p={between:g=>`${t[g]} ${h(g)}%`,start:g=>g===0?`${t[g]} ${h(g)}%`:`${t[g-1]} ${h(g)}%, ${t[g]} ${h(g)}%`,end:g=>g===t.length-1?`${t[g]} ${h(g)}%`:`${t[g]} ${h(g)}%, ${t[g+1]} ${h(g)}%`},v=l.sort((g,y)=>h(g)-h(y)).map(p[i]||p.between).join(",");return`linear-gradient(${c}deg, ${v})`}function bd(t){const[e,n,r,i]=t;return[i,e,n,r]}function os(t,e,n){const[r,i,,a]=Gn(t)?bd(e):e,[o,s]=n,c=t.getCenter(),l=ac(fr(r,c)),u=ac(fr(i,c)),f=u===l&&o!==s?u+Math.PI*2:u;return{startAngle:l,endAngle:f-l>=0?f:Math.PI*2+f,innerRadius:Qn(a,c),outerRadius:Qn(r,c)}}function Opt(t){const e="connect";return Object.fromEntries(Object.entries(t).filter(([n])=>n.startsWith(e)).map(([n,r])=>[lowerFirst(n.replace(e,"").trim()),r]).filter(([n])=>n!==void 0))}function IO(t){const{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function jO(t,e){if(!Nn(t))return"";const n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function DO(t){if(t.length===1)return t[0];const[[e,n,r=0],[i,a,o=0]]=t;return[(e+i)/2,(n+a)/2,(r+o)/2]}function FO(t){return t.replace(/-(\w)/g,function(e,n){return n.toUpperCase()})}function _W(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}var wpt=Array.prototype.slice;function BO(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Hn(t){return function(){return t}}function zO(t){this._context=t}zO.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 Cl(t){return new zO(t)}const Hv=Math.PI,Yv=2*Hv,ss=1e-6,OW=Yv-ss;function GO(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function wW(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return GO;const n=wr(10,e);return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class xd{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?GO:wW(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,a,o){this._append`C${+e},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(e,n,r,i,a){if(e=+e,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=r-e,l=i-n,u=o-e,f=s-n,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(d>ss)if(!(Math.abs(f*c-l*u)>ss)||!a)this._append`L${this._x1=e},${this._y1=n}`;else{let h=r-o,p=i-s,v=c*c+l*l,g=h*h+p*p,y=Math.sqrt(v),m=Math.sqrt(d),b=a*Math.tan((Hv-Math.acos((v+d-g)/(2*y*m)))/2),_=b/m,O=b/y;Math.abs(_-1)>ss&&this._append`L${e+_*u},${n+_*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=e+O*c},${this._y1=n+O*l}`}}arc(e,n,r,i,a,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=e+s,u=n+c,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>ss||Math.abs(this._y1-u)>ss)&&this._append`L${l},${u}`,r&&(d<0&&(d=d%Yv+Yv),d>OW?this._append`A${r},${r},0,1,${f},${e-s},${n-c}A${r},${r},0,1,${f},${this._x1=l},${this._y1=u}`:d>ss&&this._append`A${r},${r},0,${+(d>=Hv)},${f},${this._x1=e+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}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 zi(){return new xd}zi.prototype=xd.prototype;function Spt(t=3){return new xd(+t)}function Vv(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 xd(e)}function WO(t){return t[0]}function HO(t){return t[1]}function yo(t,e){var n=Hn(!0),r=null,i=Cl,a=null,o=Vv(s);t=typeof t=="function"?t:t===void 0?WO:Hn(t),e=typeof e=="function"?e:e===void 0?HO:Hn(e);function s(c){var l,u=(c=BO(c)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&n(f=c[l],l,c))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(f,l,c),+e(f,l,c));if(h)return a=null,h+""||null}return s.x=function(c){return arguments.length?(t=typeof c=="function"?c:Hn(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:Hn(+c),s):e},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Hn(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),s):r},s}function oc(t){const e=typeof t=="function"?t:t.render;return class extends Of{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var $v=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function SW(t){const{min:[e,n],max:[r,i]}=t.getLocalBounds();let a=0,o=0;return e>0&&(a=e),r<0&&(a=r),n>0&&(o=n),i<0&&(o=i),[a,o]}function MW(t,e=[]){const[n=0,r=0,i=n,a=r]=e,o=t.parentNode,s=o.getEulerAngles();o.setEulerAngles(0);const{min:c,halfExtents:l}=t.getLocalBounds(),[u,f]=c,[d,h]=l;return o.setEulerAngles(s),{x:u-a,y:f-n,width:d*2+a+r,height:h*2+n+i}}const EW=(t,e,n)=>{const r=Qn(t,e),i=Qn(e,n),a=Qn(n,t);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(a,2))/(2*r*i)};function AW(t,e,n,r){const[[i,a],[o,s]]=e,[c,l]=SW(t);if(i===o&&a===s)return yo()([[0,0],[c,l]]);const u=[[i-o,a-s]].concat(n.length?n:[[0,0]]),f=[r[0]-o,r[1]-s],[d,h]=u;if(EW(f,d,h)>0){const p=(()=>{const{min:v,max:g}=t.getLocalBounds(),y=d[0]+(d[1]-f[1])*(d[1]-0)/(d[0]-f[0]);return g[0]<f[0]?Math.min(g[0],y):Math.max(v[0],y)})();u.splice(1,1,[p,0])}return yo()(u)}const YO=oc(t=>{const e=t.attributes,{className:n,class:r,transform:i,rotate:a,labelTransform:o,labelTransformOrigin:s,x:c,y:l,x0:u=c,y0:f=l,text:d,background:h,connector:p,startMarker:v,endMarker:g,coordCenter:y,innerHTML:m}=e,b=$v(e,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if([c,l,u,f].some(I=>!(0,xr.Z)(I))){t.children.forEach(I=>I.remove());return}const _=se(b,"background"),{padding:O}=_,w=$v(_,["padding"]),M=se(b,"connector"),{points:E=[]}=M,A=$v(M,["points"]),P=[[+u,+f],[+c,+l]];let C;m?C=Ne(t).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",m).call(Ee,Object.assign({transform:o,transformOrigin:s},b)).node():C=Ne(t).maybeAppend("text","text").style("zIndex",0).style("text",d).call(Ee,Object.assign({textBaseline:"middle",transform:o,transformOrigin:s},b)).node();const D=Ne(t).maybeAppend("background","rect").style("zIndex",-1).call(Ee,MW(C,O)).call(Ee,h?w:{}).node(),N=AW(D,P,E,y),k=v&&new kn({id:"startMarker",style:Object.assign({x:0,y:0},se(b,"startMarker"))}),R=g&&new kn({id:"endMarker",style:Object.assign({x:0,y:0},se(b,"endMarker"))});Ne(t).maybeAppend("connector","path").style("zIndex",0).style("path",N).style("markerStart",k).style("markerEnd",R).call(Ee,p?A:{})});function sc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(n<a||n===void 0&&a>=a)&&(n=a,r=i);else for(let a of t)(a=e(a,++i,t))!=null&&(n<a||n===void 0&&a>=a)&&(n=a,r=i);return r}function TW(t,e,n,r){const i=e.length/2,a=e.slice(0,i),o=e.slice(i);let s=sc(a,(h,p)=>Math.abs(h[1]-o[p][1]));s=Math.max(Math.min(s,i-2),1);const c=h=>[a[h][0],(a[h][1]+o[h][1])/2],l=c(s),u=c(s-1),f=c(s+1),d=Bi(fr(f,u))/Math.PI*180;return{x:l[0],y:l[1],transform:`rotate(${d})`,textAlign:"center",textBaseline:"middle"}}function VO(t,e,n,r){const{bounds:i}=n,[[a,o],[s,c]]=i,l=s-a,u=c-o,f=d=>{const{x:h,y:p}=d,v=N_(n.x,l),g=N_(n.y,u);return Object.assign(Object.assign({},d),{x:(v||h)+a,y:(g||p)+o})};return f(t==="left"?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:t==="right"?{x:l,y:u/2,textAnchor:"end",textBaseline:"middle"}:t==="top"?{x:l/2,y:0,textAnchor:"center",textBaseline:"top"}:t==="bottom"?{x:l/2,y:u,textAnchor:"center",textBaseline:"bottom"}:t==="top-left"?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:t==="top-right"?{x:l,y:0,textAnchor:"end",textBaseline:"top"}:t==="bottom-left"?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:t==="bottom-right"?{x:l,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:l/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function $O(t,e,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s}=n,c=r.getCenter(),l=os(r,e,[i,a]),{innerRadius:u,outerRadius:f,startAngle:d,endAngle:h}=l,p=t==="inside"?(d+h)/2:h,v=Xv(p,o,s),g=(()=>{const[y,m]=e,b=u+(f-u)*.5,[_,O]=t==="inside"?kl(c,p,b):LO(y,m);return{x:_,y:O}})();return Object.assign(Object.assign({},g),{textAlign:t==="inside"?"center":"start",textBaseline:"middle",rotate:v})}function kl(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function Xv(t,e,n){if(!e)return 0;const r=n?0:Math.sin(t)<0?90:-90;return t/Math.PI*180+r}function PW(t,e,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,radius:c=.5,offset:l=0}=n,u=os(r,e,[i,a]),{startAngle:f,endAngle:d}=u,h=r.getCenter(),p=(f+d)/2,g={textAlign:"center",textBaseline:"middle",rotate:Xv(p,o,s)},{innerRadius:y,outerRadius:m}=u,_=y+(m-y)*c+l,[O,w]=kl(h,p,_);return Object.assign({x:O,y:w},g)}function XO(t){return t===void 0?null:t}function UO(t,e,n,r){const{bounds:i}=n,[a]=i;return{x:XO(a[0]),y:XO(a[1])}}function Fa(t,e,n,r){const{bounds:i}=n;return i.length===1?UO(t,e,n,r):(pl(r)?$O:qs(r)?PW:VO)(t,e,n,r)}function CW(t,e,n,r,i){const[a,o]=kl(t,e,n),[s,c]=kl(t,e,r),l=Math.sin(e)>0?1:-1;return[[a,o],[s,c],[s+l*i,c]]}function qO(t,e,n){const r=os(n,t,[e.y,e.y1]),{innerRadius:i,outerRadius:a}=r;return i+(a-i)}function ZO(t,e,n){const r=os(n,t,[e.y,e.y1]),{startAngle:i,endAngle:a}=r;return(i+a)/2}function Uv(t,e,n,r){const{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:c=o,connectorLength2:l=0,connectorDistance:u=0}=n,f=r.getCenter(),d=ZO(e,n,r),h=Math.sin(d)>0?1:-1,p=Xv(d,i,a),v={textAlign:h>0||pl(r)?"start":"end",textBaseline:"middle",rotate:p},g=qO(e,n,r),y=g+(s?c:o),[[m,b],[_,O],[w,M]]=CW(f,d,g,y,s?l:0),E=s?+u*h:0,A=w+E,P=M,C={connector:s,connectorPoints:[[_-A,O-P],[w-A,M-P]]};return Object.assign(Object.assign({x0:m,y0:b,x:w+E,y:M},v),C)}function kW(t,e,n,r){const{bounds:i}=n;return i.length===1?UO(t,e,n,r):(pl(r)?$O:qs(r)?Uv:VO)(t,e,n,r)}var RW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function LW(t,e,n,r){if(!qs(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=RW(Uv("outside",e,n,r),[]),c=r.getCenter(),l=qO(e,n,r),u=ZO(e,n,r),f=l+i+a,d=Math.sin(u)>0?1:-1,h=c[0]+(f+ +o)*d,{x:p}=s,v=h-p;return s.x+=v,s.connectorPoints[0][0]-=v,s}var NW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function IW(t,e,n,r){if(!qs(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=NW(Uv("outside",e,n,r),[]),{x0:c,y0:l}=s,u=r.getCenter(),d=mF(r)+i,h=ac([c-u[0],l-u[1]]),p=Math.sin(h)>0?1:-1,[v,g]=kl(u,h,d);return s.x=v+(a+o)*p,s.y=g,s}var KO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function jW(t,e){return t!==void 0?t:qs(e)?"inside":Gn(e)?"right":"top"}function DW(t,e,n,r,i){const{position:a}=e,{render:o}=i,s=jW(a,n),l=r[o?"htmlLabel":s==="inside"?"innerLabel":"label"],u=Object.assign({},l,e),f=kt[FO(s)];if(!f)throw new Error(`Unknown position: ${s}`);return Object.assign(Object.assign({},l),f(s,t,u,n,i))}const QO=(t,e)=>{const{coordinate:n,theme:r}=e,{render:i}=t;return(a,o)=>{const{text:s,x:c,y:l,transform:u="",transformOrigin:f,className:d=""}=o,h=KO(o,["text","x","y","transform","transformOrigin","className"]),p=DW(a,o,n,r,t),{rotate:v=0,transform:g=""}=p,y=KO(p,["rotate","transform"]);return Ne(new YO).call(Ee,y).style("text",`${s}`).style("className",`${d} g2-label`).style("innerHTML",i?i(s,o.datum,o.index):void 0).style("labelTransform",`${g} rotate(${+v}) ${u}`.trim()).style("labelTransformOrigin",f).style("coordCenter",n.getCenter()).call(Ee,h).node()}};QO.props={defaultMarker:"point"};function JO(t,e){const{__data__:n}=t,{markKey:r,index:i,seriesIndex:a}=n,{markState:o}=e,s=Array.from(o.keys()).find(c=>c.key===r);if(s)return a?a.map(c=>s.data[c]):s.data[i]}function qv(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function FW(t){return qv(t,e=>e.className==="component")}function BW(t){return qv(t,e=>e.className==="element")}function zW(t){return qv(t,e=>e.className==="label")}function Nr(t,e,n,r=i=>!0){return i=>{if(!r(i))return;n.emit(`plot:${t}`,i);const{target:a}=i;if(!a)return;const{className:o}=a;if(o==="plot")return;const s=BW(a),c=FW(a),l=zW(a),u=s||c||l;if(!u)return;const{className:f,markType:d}=u,h=Object.assign(Object.assign({},i),{nativeEvent:!0});f==="element"?(h.data={data:JO(u,e)},n.emit(`element:${t}`,h),n.emit(`${d}:${t}`,h)):f==="label"?(h.data={data:u.attributes.datum},n.emit(`label:${t}`,h),n.emit(`${o}:${t}`,h)):(n.emit(`component:${t}`,h),n.emit(`${o}:${t}`,h))}}function tw(){return(t,e,n)=>{const{container:r,view:i}=t,a=Nr(Sn.CLICK,i,n,M=>M.detail===1),o=Nr(Sn.DBLCLICK,i,n,M=>M.detail===2),s=Nr(Sn.POINTER_TAP,i,n),c=Nr(Sn.POINTER_DOWN,i,n),l=Nr(Sn.POINTER_UP,i,n),u=Nr(Sn.POINTER_OVER,i,n),f=Nr(Sn.POINTER_OUT,i,n),d=Nr(Sn.POINTER_MOVE,i,n),h=Nr(Sn.POINTER_ENTER,i,n),p=Nr(Sn.POINTER_LEAVE,i,n),v=Nr(Sn.POINTER_UPOUTSIDE,i,n),g=Nr(Sn.DRAG_START,i,n),y=Nr(Sn.DRAG,i,n),m=Nr(Sn.DRAG_END,i,n),b=Nr(Sn.DRAG_ENTER,i,n),_=Nr(Sn.DRAG_LEAVE,i,n),O=Nr(Sn.DRAG_OVER,i,n),w=Nr(Sn.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",d),r.addEventListener("pointerenter",h),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",v),r.addEventListener("dragstart",g),r.addEventListener("drag",y),r.addEventListener("dragend",m),r.addEventListener("dragenter",b),r.addEventListener("dragleave",_),r.addEventListener("dragover",O),r.addEventListener("drop",w),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",d),r.removeEventListener("pointerenter",h),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",v),r.removeEventListener("dragstart",g),r.removeEventListener("drag",y),r.removeEventListener("dragend",m),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",_),r.removeEventListener("dragover",O),r.removeEventListener("drop",w)}}}tw.props={reapplyWhenUpdate:!0};function GW(){return{"component.axisRadar":dO,"component.axisLinear":po,"component.axisArc":fO,"component.legendContinuousBlock":TO,"component.legendContinuousBlockSize":PO,"component.legendContinuousSize":Bv,"interaction.event":tw,"composition.mark":CO,"composition.view":kO,"shape.label.label":QO}}var WW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Yn(t,e){const n=Object.assign(Object.assign({},GW()),e),r=a=>{if(typeof a!="string")return a;const o=`${t}.${a}`;return n[o]||Us(`Unknown Component: ${o}`)};return[(a,o)=>{const{type:s}=a,c=WW(a,["type"]);s||Us("Plot type is required!");const l=r(s);return l==null?void 0:l(c,o)},r]}function ew(t){const{canvas:e,group:n}=t;return(e==null?void 0:e.document)||(n==null?void 0:n.ownerDocument)||Us("Cannot find library document")}var nw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function HW(t,e,n){const[r]=Yn("coordinate",n),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=qW(u),d=f[0].type==="cartesian3D",h=Object.assign(Object.assign({},t),{x:o,y:s,width:a-o-c,height:i-l-s,transformations:f.flatMap(r)});return d?new U_.Coordinate3D(h):new U_.Coordinate(h)}function rw(t,e){const{coordinate:n={}}=t,r=nw(t,["coordinate"]),{type:i,transform:a=[]}=n,o=nw(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},r),{coordinates:a});const[,s]=Yn("coordinate",e),{transform:c=!1}=s(i).props||{};if(c)throw new Error(`Unknown coordinate: ${i}.`);return Object.assign(Object.assign({},r),{coordinates:[Object.assign({type:i},o),...a]})}function Zi(t,e){return t.filter(n=>n.type===e)}function cs(t){return Zi(t,"polar").length>0}function YW(t){return Zi(t,"helix").length>0}function cc(t){return Zi(t,"transpose").length%2===1}function VW(t){return Zi(t,"parallel").length>0}function iw(t){return Zi(t,"theta").length>0}function $W(t){return Zi(t,"reflect").length>0}function Rl(t){return Zi(t,"radial").length>0}function XW(t){return Zi(t,"radar").length>0}function UW(t){return Zi(t,"reflectY").length>0}function qW(t){return t.find(e=>e.type==="cartesian"||e.type==="cartesian3D")?t:[...t,{type:"cartesian"}]}function nn(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}var ZW=nn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),KW=nn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),QW=nn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),JW=nn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),tH=nn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),eH=nn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),nH=nn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),rH=nn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),iH=nn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),aH=nn("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function _d(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Zv(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function lc(){}var ls=.7,uc=1/ls,fc="\\s*([+-]?\\d+)\\s*",Ll="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ha="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oH=/^#([0-9a-f]{3,8})$/,sH=new RegExp("^rgb\\(".concat(fc,",").concat(fc,",").concat(fc,"\\)$")),cH=new RegExp("^rgb\\(".concat(ha,",").concat(ha,",").concat(ha,"\\)$")),lH=new RegExp("^rgba\\(".concat(fc,",").concat(fc,",").concat(fc,",").concat(Ll,"\\)$")),uH=new RegExp("^rgba\\(".concat(ha,",").concat(ha,",").concat(ha,",").concat(Ll,"\\)$")),fH=new RegExp("^hsl\\(".concat(Ll,",").concat(ha,",").concat(ha,"\\)$")),dH=new RegExp("^hsla\\(".concat(Ll,",").concat(ha,",").concat(ha,",").concat(Ll,"\\)$")),aw={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};_d(lc,Kv,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ow,formatHex:ow,formatHex8:hH,formatHsl:pH,formatRgb:sw,toString:sw});function ow(){return this.rgb().formatHex()}function hH(){return this.rgb().formatHex8()}function pH(){return hw(this).formatHsl()}function sw(){return this.rgb().formatRgb()}function Kv(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=oH.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?cw(e):n===3?new $r(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Od(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Od(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=sH.exec(t))?new $r(e[1],e[2],e[3],1):(e=cH.exec(t))?new $r(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=lH.exec(t))?Od(e[1],e[2],e[3],e[4]):(e=uH.exec(t))?Od(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=fH.exec(t))?dw(e[1],e[2]/100,e[3]/100,1):(e=dH.exec(t))?dw(e[1],e[2]/100,e[3]/100,e[4]):aw.hasOwnProperty(t)?cw(aw[t]):t==="transparent"?new $r(NaN,NaN,NaN,0):null}function cw(t){return new $r(t>>16&255,t>>8&255,t&255,1)}function Od(t,e,n,r){return r<=0&&(t=e=n=NaN),new $r(t,e,n,r)}function lw(t){return t instanceof lc||(t=Kv(t)),t?(t=t.rgb(),new $r(t.r,t.g,t.b,t.opacity)):new $r}function Nl(t,e,n,r){return arguments.length===1?lw(t):new $r(t,e,n,r==null?1:r)}function $r(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}_d($r,Nl,Zv(lc,{brighter:function(e){return e=e==null?uc:Math.pow(uc,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?ls:Math.pow(ls,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},clamp:function(){return new $r(us(this.r),us(this.g),us(this.b),wd(this.opacity))},displayable:function(){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:uw,formatHex:uw,formatHex8:vH,formatRgb:fw,toString:fw}));function uw(){return"#".concat(fs(this.r)).concat(fs(this.g)).concat(fs(this.b))}function vH(){return"#".concat(fs(this.r)).concat(fs(this.g)).concat(fs(this.b)).concat(fs((isNaN(this.opacity)?1:this.opacity)*255))}function fw(){var t=wd(this.opacity);return"".concat(t===1?"rgb(":"rgba(").concat(us(this.r),", ").concat(us(this.g),", ").concat(us(this.b)).concat(t===1?")":", ".concat(t,")"))}function wd(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function us(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function fs(t){return t=us(t),(t<16?"0":"")+t.toString(16)}function dw(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ki(t,e,n,r)}function hw(t){if(t instanceof Ki)return new Ki(t.h,t.s,t.l,t.opacity);if(t instanceof lc||(t=Kv(t)),!t)return new Ki;if(t instanceof Ki)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(e===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-e)/s+2:o=(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Ki(o,s,c,t.opacity)}function gH(t,e,n,r){return arguments.length===1?hw(t):new Ki(t,e,n,r==null?1:r)}function Ki(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}_d(Ki,gH,Zv(lc,{brighter:function(e){return e=e==null?uc:Math.pow(uc,e),new Ki(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ls:Math.pow(ls,e),new Ki(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*n,a=2*r-i;return new $r(Qv(e>=240?e-240:e+120,a,i),Qv(e,a,i),Qv(e<120?e+240:e-120,a,i),this.opacity)},clamp:function(){return new Ki(pw(this.h),Sd(this.s),Sd(this.l),wd(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=wd(this.opacity);return"".concat(e===1?"hsl(":"hsla(").concat(pw(this.h),", ").concat(Sd(this.s)*100,"%, ").concat(Sd(this.l)*100,"%").concat(e===1?")":", ".concat(e,")"))}}));function pw(t){return t=(t||0)%360,t<0?t+360:t}function Sd(t){return Math.max(0,Math.min(1,t||0))}function Qv(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function vw(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function yH(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],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return vw((n-r/e)*e,o,i,a,s)}}function mH(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return vw((n-r/e)*e,i,a,o,s)}}var Jv=function(t){return function(){return t}};function gw(t,e){return function(n){return t+n*e}}function bH(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 xH(t,e){var n=e-t;return n?gw(t,n>180||n<-180?n-360*Math.round(n/360):n):Jv(isNaN(t)?e:t)}function _H(t){return(t=+t)==1?dc:function(e,n){return n-e?bH(e,n,t):Jv(isNaN(e)?n:e)}}function dc(t,e){var n=e-t;return n?gw(t,n):Jv(isNaN(t)?e:t)}var Mpt=function t(e){var n=_H(e);function r(i,a){var o=n((i=Nl(i)).r,(a=Nl(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),l=dc(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=t,r}(1);function yw(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Nl(e[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=t(r),i=t(i),a=t(a),s.opacity=1,function(c){return s.r=r(c),s.g=i(c),s.b=a(c),s+""}}}var OH=yw(yH),Ept=yw(mH),jn=t=>OH(t[t.length-1]),mw=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(nn),wH=jn(mw),bw=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(nn),SH=jn(bw),xw=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(nn),MH=jn(xw),_w=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(nn),EH=jn(_w),Ow=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(nn),AH=jn(Ow),ww=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(nn),TH=jn(ww),Sw=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(nn),PH=jn(Sw),Mw=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(nn),CH=jn(Mw),Ew=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(nn),kH=jn(Ew),Aw=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(nn),RH=jn(Aw),Tw=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(nn),LH=jn(Tw),Pw=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(nn),NH=jn(Pw),Cw=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(nn),IH=jn(Cw),kw=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(nn),jH=jn(kw),Rw=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(nn),DH=jn(Rw),Lw=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(nn),FH=jn(Lw),Nw=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(nn),BH=jn(Nw),Iw=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(nn),zH=jn(Iw),jw=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(nn),GH=jn(jw),Dw=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(nn),WH=jn(Dw),Fw=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(nn),HH=jn(Fw),Bw=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(nn),YH=jn(Bw),zw=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(nn),VH=jn(zw),Gw=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(nn),$H=jn(Gw),Ww=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(nn),XH=jn(Ww),Hw=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(nn),UH=jn(Hw),Yw=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(nn),qH=jn(Yw);function ZH(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)))))))+")"}var KH=Math.PI/180,QH=180/Math.PI,Vw=-.14861,tg=1.78277,eg=-.29227,Md=-.90649,Il=1.97294,$w=Il*Md,Xw=Il*tg,Uw=tg*eg-Md*Vw;function JH(t){if(t instanceof ds)return new ds(t.h,t.s,t.l,t.opacity);t instanceof $r||(t=lw(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Uw*r+$w*e-Xw*n)/(Uw+$w-Xw),a=r-i,o=(Il*(n-i)-eg*a)/Md,s=Math.sqrt(o*o+a*a)/(Il*i*(1-i)),c=s?Math.atan2(o,a)*QH-120:NaN;return new ds(c<0?c+360:c,s,i,t.opacity)}function pa(t,e,n,r){return arguments.length===1?JH(t):new ds(t,e,n,r==null?1:r)}function ds(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}_d(ds,pa,Zv(lc,{brighter:function(e){return e=e==null?uc:Math.pow(uc,e),new ds(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ls:Math.pow(ls,e),new ds(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*KH,n=+this.l,r=isNaN(this.s)?0:this.s*n*(1-n),i=Math.cos(e),a=Math.sin(e);return new $r(255*(n+r*(Vw*i+tg*a)),255*(n+r*(eg*i+Md*a)),255*(n+r*(Il*i)),this.opacity)}}));function qw(t){return function e(n){n=+n;function r(i,a){var o=t((i=pa(i)).h,(a=pa(a)).h),s=dc(i.s,a.s),c=dc(i.l,a.l),l=dc(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=c(Math.pow(u,n)),i.opacity=l(u),i+""}}return r.gamma=e,r}(1)}var Apt=qw(xH),ng=qw(dc),tY=ng(pa(300,.5,0),pa(-240,.5,1)),eY=ng(pa(-100,.75,.35),pa(80,1.5,.8)),nY=ng(pa(260,.75,.35),pa(80,1.5,.8)),Ed=pa();function rY(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Ed.h=360*t-100,Ed.s=1.5-1.5*e,Ed.l=.8-.9*e,Ed+""}var Ad=Nl(),iY=Math.PI/3,aY=Math.PI*2/3;function oY(t){var e;return t=(.5-t)*Math.PI,Ad.r=255*(e=Math.sin(t))*e,Ad.g=255*(e=Math.sin(t+iY))*e,Ad.b=255*(e=Math.sin(t+aY))*e,Ad+""}function sY(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 Td(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var cY=Td(nn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),lY=Td(nn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),uY=Td(nn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),fY=Td(nn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function dY(t,e,n,r,i,a){const{guide:o={}}=n,s=_Y(t,e,n);if(typeof s!="string")return n;const c=OY(s,t,e,n),l=mY(s,c,n);return Object.assign(Object.assign(Object.assign({},n),SY(s,t,e,n,r)),{domain:l,range:wY(s,t,e,n,l,i,a),expectedDomain:c,guide:o,name:t,type:s})}function hY(t,e){const n={};for(const r of t){const{values:i,name:a}=r,o=e[a];for(const s of i){const{name:c,value:l}=s;n[c]=l.map(u=>o.map(u))}}return n}function pY(t,e){var n;const{components:r=[]}=e,i=["scale","encode","axis","legend","data","transform"],a=Array.from(new Set(t.flatMap(s=>s.channels.map(c=>c.scale)))),o=new Map(a.map(s=>[s.name,s]));for(const s of r){const c=yY(s);for(const l of c){const u=o.get(l),f=((n=s.scale)===null||n===void 0?void 0:n[l])||{},{independent:d=!1}=f;if(u&&!d){const{guide:h}=u,p=typeof h=="boolean"?{}:h;u.guide=Nt({},p,s),Object.assign(u,f)}else{const h=Object.assign(Object.assign({},f),{expectedDomain:f.domain,name:l,guide:tO(s,i)});a.push(h)}}}return a}function vY(t){if(!t||!Array.isArray(t))return[Jo,Jo];let e,n;return[a=>{var o;e=a.map.bind(a),n=(o=a.invert)===null||o===void 0?void 0:o.bind(a);const s=t.filter(([d])=>typeof d=="function"),c=t.filter(([d])=>typeof d!="function"),l=new Map(c);if(a.map=d=>{for(const[h,p]of s)if(h(d))return p;return l.has(d)?l.get(d):e(d)},!n)return a;const u=new Map(c.map(([d,h])=>[h,d])),f=new Map(s.map(([d,h])=>[h,d]));return a.invert=d=>f.has(d)?d:u.has(d)?u.get(d):n(d),a},a=>(e!==null&&(a.map=e),n!==null&&(a.invert=n),a)]}function Zw(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:i}=r.getOptions();if(!(i in t))t[i]=r;else{const a=n.filter(c=>c.startsWith(i)).map(c=>+(c.replace(i,"")||0)),o=Mn(a)+1,s=`${i}${o}`;t[s]=r,r.getOptions().key=s}}return t}function Kw(t,e){const[n]=Yn("scale",e),{relations:r}=t,[i]=vY(r),a=n(t);return i(a)}function gY(t){const e=t.flatMap(n=>Array.from(n.values())).flatMap(n=>n.channels.map(r=>r.scale));Qw(e,"x"),Qw(e,"y")}function yY(t){const{channels:e=[],type:n,scale:r={}}=t,i=["shape","color","opacity","size"];return e.length!==0?e:n==="axisX"?["x"]:n==="axisY"?["y"]:n==="legends"?Object.keys(r).filter(a=>i.includes(a)):[]}function Qw(t,e){const n=t.filter(({name:a,facet:o=!0})=>o&&a===e),r=n.flatMap(a=>a.domain),i=n.every(Jw)?Da(r):n.every(tS)?Array.from(new Set(r)):null;if(i!==null)for(const a of n)a.domain=i}function mY(t,e,n){const{ratio:r}=n;return r==null?e:Jw({type:t})?bY(e,r,t):tS({type:t})?xY(e,r):e}function bY(t,e,n){const r=t.map(Number),i=new Vr({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return n==="time"?t.map(a=>new Date(i.map(a))):t.map(a=>i.map(a))}function xY(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}function Jw(t){const{type:e}=t;return typeof e!="string"?!1:["linear","log","pow","time"].includes(e)}function tS(t){const{type:e}=t;return typeof e!="string"?!1:["band","point","ordinal"].includes(e)}function _Y(t,e,n){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=n;return r!==void 0?r:IY(e)?"identity":typeof a=="string"?"linear":(i||a||[]).length>2?rg(t,s):i!==void 0?aS([i])?rg(t,s):oS(e)?"time":nS(t,a,o):aS(e)?rg(t,s):oS(e)?"time":nS(t,a,o)}function OY(t,e,n,r){const{domain:i}=r;if(i!==void 0)return i;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return rS(kY(n,r),r);case"band":case"ordinal":case"point":return iS(n);case"quantile":return RY(n);case"sequential":return rS(LY(n),r);default:return[]}}function wY(t,e,n,r,i,a,o){const{range:s}=r;if(typeof s=="string")return MY(s);if(s!==void 0)return s;const{rangeMin:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const u=eS(n,r,i,a,o),[f,d]=NY(e,u);return[c||f,l||d]}case"band":case"point":return[c||(e==="size"?5:0),l||(e==="size"?10:1)];case"ordinal":return eS(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function SY(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return TY(i,r);case"band":case"point":return PY(t,e,i,r);case"sequential":return AY(r);default:return r}}function eS(t,e,n,r,i){const[a]=Yn("palette",i),{category10:o,category20:s}=r,c=dF(t.flat()).length<=o.length?o:s,{palette:l=c,offset:u}=e;if(Array.isArray(l))return l;try{return a({type:l})}catch(f){const d=EY(l,n,u);if(d)return d;throw new Error(`Unknown Component: ${l} `)}}function MY(t){return t.split("-")}function EY(t,e,n=r=>r){if(!t)return null;const r=lo(t),i=Rt[`scheme${r}`],a=Rt[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const o=i[e.length];if(o)return o}return e.map((o,s)=>a(n(s/e.length)))}function AY(t){const{palette:e="ylGnBu",offset:n}=t,r=lo(e),i=Rt[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?a=>i(n(a)):i}}function TY(t,e){const{interpolate:n=Sl,nice:r=!1,tickCount:i=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:i})}function PY(t,e,n,r){if(r.padding!==void 0||r.paddingInner!==void 0||r.paddingOuter!==void 0)return Object.assign(Object.assign({},r),{unknown:NaN});const i=CY(t,e,n),{paddingInner:a=i,paddingOuter:o=i}=r;return Object.assign(Object.assign({},r),{paddingInner:a,paddingOuter:o,padding:i,unknown:NaN})}function CY(t,e,n){return e==="enterDelay"||e==="enterDuration"||e==="size"?0:t==="band"?iw(n)?0:.1:t==="point"?.5:0}function rg(t,e){return e||(jY(t)?"point":"ordinal")}function nS(t,e,n){return n||(t!=="color"||e?"linear":"sequential")}function rS(t,e){if(t.length===0)return t;const{domainMin:n,domainMax:r}=e,[i,a]=t;return[n!=null?n:i,r!=null?r:a]}function kY(t,e){const{zero:n=!1}=e;let r=1/0,i=-1/0;for(const a of t)for(const o of a)Ln(o)&&(r=Math.min(r,+o),i=Math.max(i,+o));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}function iS(t){return Array.from(new Set(t.flat()))}function RY(t){return iS(t).sort()}function LY(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)Ln(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}function NY(t,e){return t==="enterDelay"?[0,1e3]:t=="enterDuration"?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:t==="color"?[fF(e),W_(e)]:t==="opacity"?[0,1]:t==="size"?[1,10]:[0,1]}function aS(t){return ig(t,e=>{const n=typeof e;return n==="string"||n==="boolean"})}function oS(t){return ig(t,e=>e instanceof Date)}function IY(t){return ig(t,fl)}function ig(t,e){for(const n of t)if(n.some(e))return!0;return!1}function jY(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}function DY(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t==="enterDelay"||t==="enterDuration"||t==="updateDelay"||t==="updateDuration"||t==="exitDelay"||t==="exitDuration"}function FY(t){if(!t||!t.type)return!1;if(typeof t.type=="function")return!0;const{type:e,domain:n,range:r,interpolator:i}=t,a=n&&n.length>0,o=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&a&&o||["sequential"].includes(e)&&a&&(o||i)||["constant","identity"].includes(e)&&o)}const BY={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},zY={threshold:"threshold",quantize:"quantize",quantile:"quantile"},GY={ordinal:"ordinal",band:"band",point:"point"},WY={constant:"constant"};var mo=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function HY(t,e,n){const{coordinates:r=[],title:i}=e,[,a]=Yn("component",n),o=t.filter(({guide:u})=>u!==null),s=[],c=JY(e,t,n);if(s.push(...c),i){const{props:u}=a("title"),{defaultPosition:f,defaultOrientation:d,defaultOrder:h,defaultSize:p,defaultCrossPadding:v}=u,g=typeof i=="string"?{title:i}:i;s.push(Object.assign({type:"title",position:f,orientation:d,order:h,crossPadding:v[0],defaultSize:p},g))}return UY(o,r).forEach(([u,f])=>{const{props:d}=a(u),{defaultPosition:h,defaultPlane:p="xy",defaultOrientation:v,defaultSize:g,defaultOrder:y,defaultLength:m,defaultPadding:b=[0,0],defaultCrossPadding:_=[0,0]}=d,O=Nt({},...f),{guide:w,field:M}=O,E=Array.isArray(w)?w:[w];for(const A of E){const[P,C]=KY(u,h,v,A,f,o,r);if(!P&&!C)continue;const D=P==="left"||P==="right",N=D?b[1]:b[0],k=D?_[1]:_[0],{size:R,order:I=y,length:F=m,padding:B=N,crossPadding:z=k}=A;s.push(Object.assign(Object.assign({title:M},A),{defaultSize:g,length:F,position:P,plane:p,orientation:C,padding:B,order:I,crossPadding:z,size:R,type:u,scales:f}))}}),s}function sS(t,e,n,r,i){const[a]=Yn("component",r),{scaleInstances:o,scale:s,bbox:c}=t,l=mo(t,["scaleInstances","scale","bbox"]),u={bbox:c,library:r};return a(l)({coordinate:e,library:r,markState:i,scales:o,theme:n,value:u,scale:s})}function YY(t){return t.map(e=>{const n=Nt(e,e.style);return delete n.style,n})}function Tpt(t){return t.flatMap(e=>e.type=="group"?e.children:e)}function cS(t,e){const n=["left","right","bottom","top"];return Yf(t,({type:a,position:o,group:s})=>n.includes(o)?s===void 0?a.startsWith("legend")?`legend-${o}`:Symbol("independent"):s==="independent"?Symbol("independent"):s:Symbol("independent")).flatMap(([,a])=>{if(a.length===1)return a[0];if(e!==void 0){const u=a.filter(v=>v.length!==void 0).map(v=>v.length),f=Ii(u);if(f>e)return a.forEach(v=>v.group=Symbol("independent")),a;const d=e-f,h=a.length-u.length,p=d/h;a.forEach(v=>{v.length===void 0&&(v.length=p)})}const o=Mn(a,u=>u.size),s=Mn(a,u=>u.order),c=Mn(a,u=>u.crossPadding),l=a[0].position;return{type:"group",size:o,order:s,position:l,children:a,crossPadding:c}})}function VY(t,e){const n=["shape","size","color","opacity"],r=(d,h)=>d==="constant"&&h==="size",i=t.filter(({type:d,name:h})=>typeof d=="string"&&n.includes(h)&&!r(d,h)),a=i.filter(({type:d})=>d==="constant"),o=i.filter(({type:d})=>d!=="constant"),c=Yf(o,d=>d.field?d.field:Symbol("independent")).map(([d,h])=>[d,[...h,...a]]).filter(([,d])=>d.some(h=>h.type!=="constant")),l=new Map(c);if(l.size===0)return[];const u=d=>d.sort(([h],[p])=>h.localeCompare(p));return Array.from(l).map(([,d])=>{const p=hF(d).sort((v,g)=>g.length-v.length).map(v=>({combination:v,option:v.map(g=>[g.name,$Y(g)])}));for(const{option:v,combination:g}of p)if(!v.every(y=>y[1]==="constant")&&v.every(y=>y[1]==="discrete"||y[1]==="constant"))return["legendCategory",g];for(const[v,g]of gF)for(const{option:y,combination:m}of p)if(g.some(b=>V_(u(b),u(y))))return[v,m];return null}).filter(Ln)}function $Y(t){const{type:e}=t;return typeof e!="string"?null:e in BY?"continuous":e in GY?"discrete":e in zY?"distribution":e in WY?"constant":null}function XY(t,e){return t.map(n=>{const{name:r}=n;if(YW(e)||iw(e)||cc(e)&&(cs(e)||Rl(e)))return null;if(r.startsWith("x"))return cs(e)?["axisArc",[n]]:Rl(e)?["axisLinear",[n]]:[cc(e)?"axisY":"axisX",[n]];if(r.startsWith("y"))return cs(e)?["axisLinear",[n]]:Rl(e)?["axisArc",[n]]:[cc(e)?"axisX":"axisY",[n]];if(r.startsWith("z"))return["axisZ",[n]];if(r.startsWith("position")){if(XW(e))return["axisRadar",[n]];if(!cs(e))return["axisY",[n]]}return null}).filter(Ln)}function UY(t,e){const n=t.filter(r=>FY(r));return[...VY(n,e),...XY(n,e)]}function ag(t){const e=Zi(t,"polar");if(e.length){const r=e[e.length-1],{startAngle:i,endAngle:a}=$_(r);return[i,a]}const n=Zi(t,"radial");if(n.length){const r=n[n.length-1],{startAngle:i,endAngle:a}=X_(r);return[i,a]}return[-Math.PI/2,Math.PI/2*3]}function qY(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}function ZY(t,e,n,r,i){const{name:a}=n[0];if(t==="axisRadar"){const o=r.filter(f=>f.name.startsWith("position")),s=qY(a);if(a===o.slice(-1)[0].name||s===null)return[null,null];const[c,l]=ag(i);return["center",(l-c)/(o.length-1)*s+c]}if(t==="axisY"&&VW(i))return cc(i)?["center","horizontal"]:["center","vertical"];if(t==="axisLinear"){const[o]=ag(i);return["center",o]}return t==="axisArc"?e[0]==="inner"?["inner",null]:["outer",null]:cs(i)?["center",null]:Rl(i)?["center",null]:t==="axisX"&&$W(i)||t==="axisX"&&UW(i)?["top",null]:e}function KY(t,e,n,r,i,a,o){const[s]=ag(o),c=[r.position||e,s!=null?s:n];return typeof t=="string"&&t.startsWith("axis")?ZY(t,c,i,a,o):typeof t=="string"&&t.startsWith("legend")&&cs(o)&&r.position==="center"?["center","vertical"]:c}function QY(t,e,n=[]){return t==="x"?cc(n)?`${e}Y`:`${e}X`:t==="y"?cc(n)?`${e}X`:`${e}Y`:null}function JY(t,e,n){const[,r]=Yn("component",n),{coordinates:i}=t;function a(o,s,c,l){const u=QY(s,o,i);if(!l||!u)return;const{props:f}=r(u),{defaultPosition:d,defaultSize:h,defaultOrder:p,defaultCrossPadding:[v]}=f;return Object.assign(Object.assign({position:d,defaultSize:h,order:p,type:u,crossPadding:v},l),{scales:[c]})}return e.filter(o=>o.slider||o.scrollbar).flatMap(o=>{const{slider:s,scrollbar:c,name:l}=o;return[a("slider",l,o,s),a("scrollbar",l,o,c)]}).filter(o=>!!o)}function lS(t,e,n,r,i,a){const{type:o}=t;if(!["left","right","bottom","top"].includes(r)||typeof o!="string")return;const c=o;return(()=>c.startsWith("axis")?iV:c.startsWith("group")?tV:c.startsWith("legendContinuous")?aV:c==="legendCategory"?oV:c.startsWith("slider")?rV:c==="title"?nV:c.startsWith("scrollbar")?eV:()=>{})()(t,e,n,r,i,a)}function tV(t,e,n,r,i,a){const{children:o}=t,s=Mn(o,l=>l.crossPadding);o.forEach(l=>l.crossPadding=s),o.forEach(l=>lS(l,e,n,r,i,a));const c=Mn(o,l=>l.size);t.size=c,o.forEach(l=>l.size=c)}function eV(t,e,n,r,i,a){const{trackSize:o=6}=Nt({},i.scrollbar,t);t.size=o}function nV(t,e,n,r,i,a){const o=Nt({},i.title,t),{title:s,subtitle:c,spacing:l=0}=o,u=mo(o,["title","subtitle","spacing"]);if(s){const f=se(u,"title"),d=Rd(s,f);t.size=d.height}if(c){const f=se(u,"subtitle"),d=Rd(c,f);t.size+=l+d.height}}function rV(t,e,n,r,i,a){const o=()=>{const{slider:u}=i;return Nt({},u,t)},{trackSize:s,handleIconSize:c}=o(),l=Math.max(s,c*2.4);t.size=l}function iV(t,e,n,r,i,a){t.transform=t.transform||[{type:"hide"}];const o=r==="left"||r==="right",s=uS(t,r,i),{tickLength:c=0,labelSpacing:l=0,titleSpacing:u=0,labelAutoRotate:f}=s,d=mo(s,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),h=Pd(t,a),p=Cd(d,h),v=c+l;if(p&&p.length){const y=Mn(p,b=>b.width),m=Mn(p,b=>b.height);if(o)t.size=y+v;else{const{tickFilter:b,labelTransform:_}=t;lV(h,p,e,n,b)&&!_&&f!==!1&&f!==null?(t.labelTransform="rotate(90)",t.size=y+v):t.size=m+v}}else t.size=c;const g=kd(d);g&&(o?t.size+=u+g.width:t.size+=u+g.height)}function aV(t,e,n,r,i,a){const s=(()=>{const{legendContinuous:_}=i;return Nt({},_,t)})(),{labelSpacing:c=0,titleSpacing:l=0}=s,u=mo(s,["labelSpacing","titleSpacing"]),f=r==="left"||r==="right",d=se(u,"ribbon"),{size:h}=d,p=se(u,"handleIcon"),{size:v}=p,g=Math.max(h,v*2.4);t.size=g;const y=Pd(t,a),m=Cd(u,y);if(m){const _=f?"width":"height",O=Mn(m,w=>w[_]);t.size+=O+c}const b=kd(u);b&&(f?t.size=Math.max(t.size,b.width):t.size+=l+b.height)}function oV(t,e,n,r,i,a){const s=(()=>{const{legendCategory:k}=i,{title:R}=t,[I,F]=Array.isArray(R)?[R,void 0]:[void 0,R];return Nt({title:I},k,Object.assign(Object.assign({},t),{title:F}))})(),{itemSpacing:c,itemMarkerSize:l,titleSpacing:u,rowPadding:f,colPadding:d,maxCols:h=1/0,maxRows:p=1/0}=s,v=mo(s,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:y}=t,m=k=>Math.min(k,p),b=k=>Math.min(k,h),_=r==="left"||r==="right",O=y===void 0?e+(_?0:n[0]+n[1]):y,w=kd(v),M=Pd(t,a),E=Cd(v,M,"itemLabel"),A=Math.max(E[0].height,l)+f,P=(k,R=0)=>l+k+c[0]+R;_?(()=>{let k=-1/0,R=0,I=1,F=0,B=-1/0,z=-1/0;const Y=w?w.height:0,U=O-Y;for(const{width:tt}of E){const rt=P(tt,d);k=Math.max(k,rt),R+A>U?(I++,B=Math.max(B,F),z=Math.max(z,R),F=1,R=A):(R+=A,F++)}I<=1&&(B=F,z=R),t.size=k*b(I),t.length=z+Y,Nt(t,{cols:b(I),gridRow:B})})():typeof g=="number"?(()=>{const k=Math.ceil(E.length/g),R=Mn(E,I=>P(I.width))*g;t.size=A*m(k)-f,t.length=Math.min(R,O)})():(()=>{let k=1,R=0,I=-1/0;for(const{width:F}of E){const B=P(F,d);R+B>O?(I=Math.max(I,R),R=B,k++):R+=B}k===1&&(I=R),t.size=A*m(k)-f,t.length=I})(),w&&(_?t.size=Math.max(t.size,w.width):t.size+=u+w.height)}function Pd(t,e){const[n]=Yn("scale",e),{scales:r,tickCount:i,tickMethod:a}=t,o=r.find(s=>s.type!=="constant"&&s.type!=="identity");return i!==void 0&&(o.tickCount=i),a!==void 0&&(o.tickMethod=a),n(o)}function Cd(t,e,n="label"){const{labelFormatter:r,tickFilter:i,label:a=!0}=t,o=mo(t,["labelFormatter","tickFilter","label"]);if(!a)return null;const s=sV(e,r,i),c=se(o,n),l=s.map((d,h)=>Object.fromEntries(Object.entries(c).map(([p,v])=>[p,typeof v=="function"?v(d,h):v]))),u=s.map((d,h)=>{const p=l[h];return Rd(d,p)});if(!l.some(d=>d.transform)){const d=s.map((h,p)=>p);t.indexBBox=new Map(d.map(h=>[h,[s[h],u[h]]]))}return u}function kd(t){const e=l=>l===!1||l===null,{title:n}=t,r=mo(t,["title"]);if(e(n)||n===void 0)return null;const i=se(r,"title"),{direction:a,transform:o}=i,s=Array.isArray(n)?n.join(","):n;return typeof s!="string"?null:Rd(s,Object.assign(Object.assign({},i),{transform:o||(a==="vertical"?"rotate(-90)":"")}))}function uS(t,e,n){const{title:r}=t,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${iv(e)}`]:s}=n;return Nt({title:i},o,s,Object.assign(Object.assign({},t),{title:a}))}function fS(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function sV(t,e,n){const i=fS(t,n).map(o=>typeof o=="number"?Uf(o):o),a=e?typeof e=="string"?uo(e):e:t.getFormatter?t.getFormatter():o=>`${o}`;return i.map(a)}function cV(t,e){return t.getBandWidth?t.getBandWidth(e)/2:0}function lV(t,e,n,r,i){if(Ii(e,h=>h.width)>n)return!0;const o=t.clone();o.update({range:[0,n]});const s=fS(t,i),c=s.map(h=>o.map(h)+cV(o,h)),l=s.map((h,p)=>p),u=-r[0],f=n+r[1],d=(h,p)=>{const{width:v}=p;return[h-v/2,h+v/2]};for(let h=0;h<l.length;h++){const p=c[h],[v,g]=d(p,e[h]);if(v<u||g>f)return!0;const y=c[h+1];if(y){const[m]=d(y,e[h+1]);if(g>m)return!0}}return!1}function Rd(t,e){const n=uV(t),{filter:r}=e,i=mo(e,["filter"]);return n.attr(Object.assign(Object.assign({},i),{visibility:"none"})),n.getBBox()}function uV(t){return t instanceof Yr?t:new ca({style:{text:`${t}`}})}function Mi(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 dr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function fV(t){const e=t.find(({type:n})=>n==="axisZ");if(e){const n=t.find(({type:i})=>i==="axisX");n.plane="xy";const r=t.find(({type:i})=>i==="axisY");r.plane="xy",e.plane="yz",e.origin=[n.bbox.x,n.bbox.y,0],e.eulerAngles=[0,-90,0],e.bbox.x=n.bbox.x,e.bbox.y=n.bbox.y,t.push(Object.assign(Object.assign({},n),{plane:"xz",showLabel:!1,showTitle:!1,origin:[n.bbox.x,n.bbox.y,0],eulerAngles:[-90,0,0]})),t.push(Object.assign(Object.assign({},r),{plane:"yz",showLabel:!1,showTitle:!1,origin:[r.bbox.x+r.bbox.width,r.bbox.y,0],eulerAngles:[0,-90,0]})),t.push(Object.assign(Object.assign({},e),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]}))}}function dV(t,e,n,r){var i,a;const{width:o,height:s,depth:c,x:l=0,y:u=0,z:f=0,inset:d=(i=n.inset)!==null&&i!==void 0?i:0,insetLeft:h=d,insetTop:p=d,insetBottom:v=d,insetRight:g=d,margin:y=(a=n.margin)!==null&&a!==void 0?a:0,marginLeft:m=y,marginBottom:b=y,marginTop:_=y,marginRight:O=y,padding:w=n.padding,paddingBottom:M=w,paddingLeft:E=w,paddingRight:A=w,paddingTop:P=w}=pV(t,e,n,r),C=1/4,D=(le,_e,He,Be,Qe)=>{const{marks:dn}=e;if(dn.length===0)return[Be,Qe];if(le-Be-Qe-le*C>0)return[Be,Qe];const mr=le*(1-C);return[_e==="auto"?mr*Be/(Be+Qe):Be,He==="auto"?mr*Qe/(Be+Qe):Qe]},N=le=>le==="auto"?20:le!=null?le:20,k=N(P),R=N(M),I=dS(t,s-k-R,[k+_,R+b],["left","right"],e,n,r),{paddingLeft:F,paddingRight:B}=I,z=o-m-O,[Y,U]=D(z,E,A,F,B),tt=z-Y-U,rt=dS(t,tt,[Y+m,U+O],["bottom","top"],e,n,r),{paddingTop:wt,paddingBottom:Bt}=rt,Xt=s-b-_,[Tt,Pt]=D(Xt,M,P,Bt,wt),ce=Xt-Tt-Pt;return{width:o,height:s,depth:c,insetLeft:h,insetTop:p,insetBottom:v,insetRight:g,innerWidth:tt,innerHeight:ce,paddingLeft:Y,paddingRight:U,paddingTop:Pt,paddingBottom:Tt,marginLeft:m,marginBottom:b,marginTop:_,marginRight:O,x:l,y:u,z:f}}function hV(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:d=c,inset:h=0,insetLeft:p=h,insetRight:v=h,insetTop:g=h,insetBottom:y=h}=t,m=O=>O==="auto"?20:O,b=n-m(i)-m(a)-l-u-p-v,_=e-m(o)-m(s)-f-d-g-y;return{width:b,height:_}}function pV(t,e,n,r){const{coordinates:i}=e;if(!cs(i)&&!Rl(i))return e;const a=t.filter(y=>typeof y.type=="string"&&y.type.startsWith("axis"));if(a.length===0)return e;const o=a.map(y=>{const m=y.type==="axisArc"?"arc":"linear";return uS(y,m,n)}),s=Mn(o,y=>{var m;return(m=y.labelSpacing)!==null&&m!==void 0?m:0}),c=a.flatMap((y,m)=>{const b=o[m],_=Pd(y,r);return Cd(b,_)}).filter(Ln),l=Mn(c,y=>y.height)+s,u=a.flatMap((y,m)=>{const b=o[m];return kd(b)}).filter(y=>y!==null),f=u.length===0?0:Mn(u,y=>y.height),{inset:d=l,insetLeft:h=d,insetBottom:p=d,insetTop:v=d+f,insetRight:g=d}=e;return Object.assign(Object.assign({},e),{insetLeft:h,insetBottom:p,insetTop:v,insetRight:g})}function dS(t,e,n,r,i,a,o){const s=Kn(t,p=>p.position),{padding:c=a.padding,paddingLeft:l=c,paddingRight:u=c,paddingBottom:f=c,paddingTop:d=c}=i,h={paddingBottom:f,paddingLeft:l,paddingTop:d,paddingRight:u};for(const p of r){const v=`padding${iv(FO(p))}`,g=s.get(p)||[],y=h[v],m=A=>{A.size===void 0&&(A.size=A.defaultSize)},b=A=>{A.type==="group"?(A.children.forEach(m),A.size=Mn(A.children,P=>P.size)):A.size=A.defaultSize},_=A=>{A.size||(y!=="auto"?b(A):(lS(A,e,n,p,a,o),m(A)))},O=A=>{A.type.startsWith("axis")&&A.labelAutoHide===void 0&&(A.labelAutoHide=!0)},w=p==="bottom"||p==="top",M=Mi(g,A=>A.order),E=g.filter(A=>A.type.startsWith("axis")&&A.order==M);if(E.length&&(E[0].crossPadding=0),typeof y=="number")g.forEach(m),g.forEach(O);else if(g.length===0)h[v]=0;else{const A=w?e+n[0]+n[1]:e,P=cS(g,A);P.forEach(_);const C=P.reduce((D,{size:N,crossPadding:k=12})=>D+N+k,0);h[v]=C}}return h}function vV(t,e,n){const r=Kn(t,w=>`${w.plane||"xy"}-${w.position}`),{paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:v,insetRight:g,insetTop:y,height:m,width:b,depth:_}=n,O={xy:og({width:b,height:m,paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:v,insetRight:g,insetTop:y}),yz:og({width:_,height:m,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:_,innerHeight:m,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:og({width:b,height:_,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:_,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[w,M]of r.entries()){const[E,A]=w.split("-"),P=O[E][A],[C,D]=H_(M,N=>typeof N.type!="string"?!1:!!(A==="center"||N.type.startsWith("axis")&&["inner","outer"].includes(A)));C.length&&gV(C,e,P,A),D.length&&MV(M,e,P)}}function og({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a,marginLeft:o,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:d,insetLeft:h,insetRight:p,insetTop:v}){const g=n+o,y=i+s,m=r+l,b=a+c,_=t-o-l,O=[g+h,y+v,f-h-p,u-v-d,"center",null,null];return{top:[g,0,f,y,"vertical",!0,dr,o,_],right:[t-m,y,m,u,"horizontal",!1,dr],bottom:[g,e-b,f,b,"vertical",!1,dr,o,_],left:[0,y,g,u,"horizontal",!0,dr],"top-left":[g,0,f,y,"vertical",!0,dr],"top-right":[g,0,f,y,"vertical",!0,dr],"bottom-left":[g,e-b,f,b,"vertical",!1,dr],"bottom-right":[g,e-b,f,b,"vertical",!1,dr],center:O,inner:O,outer:O}}function gV(t,e,n,r){const[i,a]=H_(t,o=>!!(typeof o.type=="string"&&o.type.startsWith("axis")));yV(i,e,n,r),EV(a,e,n)}function yV(t,e,n,r){r==="center"?yF(e)?SV(t,e,n,r):Nn(e)?xV(t,e,n):vl(e)&&_V(t,e,n,t[0].orientation):r==="inner"?mV(t,e,n):r==="outer"&&bV(t,e,n)}function mV(t,e,n){const[r,i,,a]=n,[o,s]=e.getCenter(),[c]=qf(e),l=a/2,u=c*l,f=o-u,d=s-u;for(let h=0;h<t.length;h++){const p=t[h];p.bbox={x:r+f,y:i+d,width:u*2,height:u*2}}}function bV(t,e,n){const[r,i,a,o]=n;for(const s of t)s.bbox={x:r,y:i,width:a,height:o}}function xV(t,e,n){const[r,i,a,o]=n;for(const s of t)s.bbox={x:r,y:i,width:a,height:o}}function _V(t,e,n,r){r==="horizontal"?wV(t,e,n):r==="vertical"&&OV(t,e,n)}function OV(t,e,n){const[r,i,,a]=n,o=new Array(t.length).fill(0),c=e.map(o).filter((l,u)=>u%2===0).map(l=>l+r);for(let l=0;l<t.length;l++){const u=t[l],f=c[l],d=c[l+1]-f;u.bbox={x:f,y:i,width:d,height:a}}}function wV(t,e,n){const[r,i,a]=n,o=new Array(t.length).fill(0),c=e.map(o).filter((l,u)=>u%2===1).map(l=>l+i);for(let l=0;l<t.length;l++){const u=t[l],f=c[l],d=c[l+1]-f;u.bbox={x:r,y:f,width:a,height:d}}}function SV(t,e,n,r){const[i,a,o,s]=n;for(const c of t)c.bbox={x:i,y:a,width:o,height:s},c.radar={index:t.indexOf(c),count:t.length}}function MV(t,e,n){const[r,i,a,o,s,c,l,u,f]=n,[d,h,p,v,g,y,m,b]=s==="vertical"?["y",i,"x",r,"height",o,"width",a]:["x",r,"y",i,"width",a,"height",o];t.sort((A,P)=>l==null?void 0:l(A.order,P.order));const _=A=>A==="title"||A==="group"||A.startsWith("legend"),O=(A,P,C)=>C===void 0?P:_(A)?C:P,w=(A,P,C)=>C===void 0?P:_(A)?C:P,M=c?h+y:h;for(let A=0,P=M;A<t.length;A++){const C=t[A],{crossPadding:D=0,type:N}=C,{size:k}=C;C.bbox={[d]:c?P-k-D:P+D,[p]:w(N,v,u),[g]:k,[m]:O(N,b,f)},P+=(k+D)*(c?-1:1)}const E=t.filter(A=>A.type==="group");for(const A of E){const{bbox:P,children:C}=A,D=P[m],N=D/C.length,k=C.reduce((z,Y)=>{var U;const tt=(U=Y.layout)===null||U===void 0?void 0:U.justifyContent;return tt||z},"flex-start"),R=C.map((z,Y)=>{const{length:U=N,padding:tt=0}=z;return U+(Y===C.length-1?0:tt)}),I=Ii(R),F=D-I,B=k==="flex-start"?0:k==="center"?F/2:F;for(let z=0,Y=P[p]+B;z<C.length;z++){const U=C[z],{padding:tt=0}=U,rt=z===C.length-1?0:tt;U.bbox={[g]:P[g],[d]:P[d],[p]:Y,[m]:R[z]-rt},Nt(U,{layout:{justifyContent:k}}),Y+=R[z]}}}function EV(t,e,n){if(t.length===0)return;const[r,i,a,o]=n,[s]=qf(e),c=o/2*s/Math.sqrt(2),l=r+a/2,u=i+o/2;for(let f=0;f<t.length;f++){const d=t[f];d.bbox={x:l-c,y:u-c,width:c*2,height:c*2}}}function va(t,e,n={},r=!1){if(La(t)||Array.isArray(t)&&r)return t;const i=se(t,e);return Nt(n,i)}function sg(t,e={}){return La(t)||Array.isArray(t)||!hS(t)?t:Nt(e,t)}function hS(t){if(Object.keys(t).length===0)return!0;const{title:e,items:n}=t;return e!==void 0||n!==void 0}function ga(t,e){return typeof t=="object"?se(t,e):t}var AV=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},hc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function TV(t,e,n){const{encode:r={},scale:i={},transform:a=[]}=e,o=hc(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},o),{encode:r,scale:i,transform:a})]}function pS(t,e,n){return AV(this,void 0,void 0,function*(){const{library:r}=n,{data:i}=e,[a]=Yn("data",r),o=GV(i),{transform:s=[]}=o,u=[hc(o,["transform"]),...s].map(a),f=yield Z7(u)(i),d=i&&!Array.isArray(i)&&!Array.isArray(f)?{value:f}:f;return[Array.isArray(f)?ts(f):[],Object.assign(Object.assign({},e),{data:d})]})}function PV(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i={};for(const[a,o]of Object.entries(r))if(Array.isArray(o))for(let s=0;s<o.length;s++){const c=`${a}${s===0?"":s}`;i[c]=o[s]}else i[a]=o;return[t,Object.assign(Object.assign({},e),{encode:i})]}function CV(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const a=fo(r,o=>FV(o)?o:{type:BV(i,o),value:o});return[t,Object.assign(Object.assign({},e),{encode:a})]}function kV(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i=fo(r,(a,o)=>{const{type:s}=a;return s!=="constant"||DY(o)?a:Object.assign(Object.assign({},a),{constant:!0})});return[t,Object.assign(Object.assign({},e),{encode:i})]}function RV(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const{library:a}=n,o=YV(a),s=fo(r,c=>o(i,c));return[t,Object.assign(Object.assign({},e),{encode:s})]}function LV(t,e,n){const{tooltip:r={}}=e;return La(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:fl(r)&&hS(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function NV(t,e,n){const{data:r,encode:i,tooltip:a={}}=e;if(La(a))return[t,e];const o=f=>{if(!f)return f;if(typeof f=="string")return t.map(d=>({name:f,value:r[d][f]}));if(fl(f)){const{field:d,channel:h,color:p,name:v=d,valueFormatter:g=w=>w}=f,y=typeof g=="string"?uo(g):g,m=h&&i[h],b=m&&i[h].field,_=v||b||h,O=[];for(const w of t){const M=d?r[w][d]:m?i[h].value[w]:null;O[w]={name:_,color:p,value:y(M)}}return O}if(typeof f=="function"){const d=[];for(const h of t){const p=f(r[h],h,r,i);fl(p)?d[h]=p:d[h]={value:p}}return d}return f},{title:s,items:c=[]}=a,l=hc(a,["title","items"]),u=Object.assign({title:o(s),items:Array.isArray(c)?c.map(o):[]},l);return[t,Object.assign(Object.assign({},e),{tooltip:u})]}function IV(t,e,n){const{encode:r}=e,i=hc(e,["encode"]);if(!r)return[t,e];const a=Object.entries(r),o=a.filter(([,c])=>{const{value:l}=c;return Array.isArray(l[0])}).flatMap(([c,l])=>{const u=[[c,new Array(t.length).fill(void 0)]],{value:f}=l,d=hc(l,["value"]);for(let h=0;h<f.length;h++){const p=f[h];if(Array.isArray(p))for(let v=0;v<p.length;v++){const g=u[v]||[`${c}${v}`,new Array(t).fill(void 0)];g[1][h]=p[v],u[v]=g}}return u.map(([h,p])=>[h,Object.assign({type:"column",value:p},d)])}),s=Object.fromEntries([...a,...o]);return[t,Object.assign(Object.assign({},i),{encode:s})]}function jV(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(l,u)=>{if(typeof l=="boolean")return l?{}:null;const f=l[u];return f===void 0||f?f:null},c=typeof r=="object"?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return Nt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(c.map(l=>{const u=s(o,l);return[l,Object.assign({guide:s(r,l),slider:s(a,l),scrollbar:u},u&&{ratio:u.ratio===void 0?.5:u.ratio})]}))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function DV(t,e,n){const{animate:r}=e;return r||r===void 0?[t,e]:(Nt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e])}function FV(t){if(typeof t!="object"||t instanceof Date||t===null)return!1;const{type:e}=t;return Ln(e)}function BV(t,e){return typeof e=="function"?"transform":typeof e=="string"&&zV(t,e)?"field":"constant"}function zV(t,e){return Array.isArray(t)?t.some(n=>n[e]!==void 0):!1}function GV(t){if((0,xr.Z)(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};const{type:e="inline"}=t,n=hc(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}var vS=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},WV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function HV(t,e,n){return vS(this,void 0,void 0,function*(){const r={library:n},[i,a]=yield VV(t,e,r),{encode:o,scale:s,data:c,tooltip:l}=a;if(Array.isArray(c)===!1)return null;const{channels:u}=e,f=nv(Object.entries(o).filter(([,h])=>Ln(h)),h=>h.map(([p,v])=>Object.assign({name:p},v)),([h])=>{var p;const v=(p=/([^\d]+)\d*$/.exec(h))===null||p===void 0?void 0:p[1],g=u.find(y=>y.name===v);return g!=null&&g.independent?h:v}),d=u.filter(h=>{const{name:p,required:v}=h;if(f.find(([g])=>g===p))return!0;if(v)throw new Error(`Missing encoding for channel: ${p}.`);return!1}).flatMap(h=>{const{name:p,scale:v,scaleKey:g,range:y,quantitative:m,ordinal:b}=h;return f.filter(([O])=>O.startsWith(p)).map(([O,w],M)=>{const E=w.some(F=>F.visual),A=w.some(F=>F.constant),P=s[O]||{},{independent:C=!1,key:D=g||O,type:N=A?"constant":E?"identity":v}=P,k=WV(P,["independent","key","type"]),R=N==="constant",I=R?void 0:y;return{name:O,values:w,scaleKey:C||R?Symbol("independent"):D,scale:Object.assign(Object.assign({type:N,range:I},k),{quantitative:m,ordinal:b})}})});return[a,Object.assign(Object.assign({},e),{index:i,channels:d,tooltip:l})]})}function YV(t){const[e]=Yn("encode",t);return(n,r)=>r===void 0||n===void 0?null:Object.assign(Object.assign({},r),{type:"column",value:e(r)(n),field:$V(r)})}function VV(t,e,n){return vS(this,void 0,void 0,function*(){const{library:r}=n,[i]=Yn("transform",r),{preInference:a=[],postInference:o=[]}=e,{transform:s=[]}=t,c=[TV,pS,PV,CV,kV,RV,IV,DV,jV,LV,...a.map(i),...s.map(i),...o.map(i),NV];let l=[],u=t;for(const f of c)[l,u]=yield f(l,u,n);return[l,u]})}function $V(t){const{type:e,value:n}=t;return e==="field"&&typeof n=="string"?n:null}var Ba=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},bo=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function cg(t,e,n,r){var i,a;return Ba(this,void 0,void 0,function*(){const[o]=Yn("composition",n),[s]=Yn("interaction",n),c=new Set(Object.keys(n).map(k=>{var R;return(R=/mark\.(.*)/.exec(k))===null||R===void 0?void 0:R[1]}).filter(Ln)),l=new Set(Object.keys(n).map(k=>{var R;return(R=/component\.(.*)/.exec(k))===null||R===void 0?void 0:R[1]}).filter(Ln)),u=k=>{const{type:R}=k;if(typeof R=="function"){const{props:I={}}=R,{composite:F=!0}=I;if(F)return"mark"}return typeof R!="string"?R:c.has(R)||l.has(R)?"mark":R},f=k=>u(k)==="mark",d=k=>u(k)==="standardView",h=k=>{const{type:R}=k;return typeof R!="string"?!1:!!l.has(R)},p=k=>{if(d(k))return[k];const R=u(k);return o({type:R,static:h(k)})(k)},v=[],g=new Map,y=new Map,m=[t],b=[];for(;m.length;){const k=m.shift();if(d(k)){const R=y.get(k),[I,F]=R?bS(R,k,n):yield yS(k,n);g.set(I,k),v.push(I);const B=F.flatMap(p).map(z=>rw(z,n));if(m.push(...B),B.every(d)){const z=yield Promise.all(B.map(Y=>mS(Y,n)));gY(z);for(let Y=0;Y<B.length;Y++){const U=B[Y],tt=z[Y];y.set(U,tt)}}}else{const R=f(k)?k:yield wS(k,n),I=p(R);Array.isArray(I)?m.push(...I):typeof I=="function"&&b.push(I())}}r.emitter.emit(Sn.BEFORE_PAINT);const _=new Map,O=new Map,w=[];e.selectAll(ya(Z0)).data(v,k=>k.key).join(k=>k.append("g").attr("className",Z0).attr("id",R=>R.key).call(gS).each(function(R,I,F){ug(R,Ne(F),w,n,r),_.set(R,F)}),k=>k.call(gS).each(function(R,I,F){ug(R,Ne(F),w,n,r),O.set(R,F)}),k=>k.each(function(R,I,F){const B=F.nameInteraction.values();for(const z of B)z.destroy()}).remove());const M=k=>Array.from(k.entries()).map(([R,I])=>{const F=new Map,B=(U,tt=rt=>rt)=>F.set(U,tt),z=g.get(R),Y=UV(Ne(I),z,n,r);return{view:R,container:I,options:z,setState:B,update:U=>Ba(this,void 0,void 0,function*(){const rt=rv(Array.from(F.values()))(z);return yield Y(rt,U)})}}),E=M(_);for(const k of E){const{options:R}=k,I=new Map;k.container.nameInteraction=I;for(const F of Ld(R)){const[B,z]=F;if(z){const U=lg(k.view,B,z,s)(k,E,r.emitter);I.set(B,{destroy:U})}}}const A=M(O);for(const k of A){const{options:R,container:I}=k,F=I.nameInteraction;for(const B of Ld(R)){const[z,Y]=B,U=F.get(z);if(U&&((i=U.destroy)===null||i===void 0||i.call(U)),Y){const rt=lg(k.view,z,Y,s)(k,A,r.emitter);F.set(z,{destroy:rt})}}}const{width:P,height:C}=t,D=[];for(const k of b){const R=new Promise(I=>Ba(this,void 0,void 0,function*(){for(const F of k){const B=Object.assign({width:P,height:C},F);yield cg(B,e,n,r)}I()}));D.push(R)}r.views=v,(a=r.animations)===null||a===void 0||a.forEach(k=>k==null?void 0:k.cancel()),r.animations=w,r.emitter.emit(Sn.AFTER_PAINT);const N=w.filter(Ln).map(l$).map(k=>k.finished);return Promise.all([...N,...D])})}function gS(t){t.style("transform",e=>`translate(${e.layout.x}, ${e.layout.y})`)}function XV(t){const[,e]=Yn("interaction",t);return n=>{const[r,i]=n;try{return[r,e(r)]}catch(a){return[r,i.type]}}}function UV(t,e,n,r){const i=XV(n),a=c=>c[1]&&c[1].props&&c[1].props.reapplyWhenUpdate,s=Ld(e).map(i).filter(a).map(c=>c[0]);return(c,l)=>Ba(this,void 0,void 0,function*(){const u=[],[f,d]=yield yS(c,n);ug(f,t,u,n,r);for(const h of s.filter(p=>p!==l))qV(h,t,c,f,n,r);for(const h of d)cg(h,t,n,r);return{options:c,view:f}})}function qV(t,e,n,r,i,a){var o;const[s]=Yn("interaction",i),l=e.node().nameInteraction,u=Ld(n).find(([v])=>v===t),f=l.get(t);if(!f||((o=f.destroy)===null||o===void 0||o.call(f),!u[1]))return;const d=lg(r,t,u[1],s),h={options:n,view:r,container:e.node(),update:v=>Promise.resolve(v)},p=d(h,[],a.emitter);l.set(t,{destroy:p})}function yS(t,e){return Ba(this,void 0,void 0,function*(){const n=yield KV(t,e),r=ZV(n);t.interaction=r.interaction,t.coordinate=r.coordinate,t.marks=[...r.marks,...r.components];const i=rw(r,e),a=yield mS(i,e);return bS(a,i,e)})}function ZV(t){const{coordinate:e={},interaction:n={},style:r={},marks:i}=t,a=bo(t,["coordinate","interaction","style","marks"]),o=i.map(d=>d.coordinate||{}),s=i.map(d=>d.interaction||{}),c=i.map(d=>d.viewStyle||{}),l=[...o,e].reduceRight((d,h)=>Nt(d,h),{}),u=[n,...s].reduce((d,h)=>Nt(d,h),{}),f=[...c,r].reduce((d,h)=>Nt(d,h),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:l,interaction:u,style:f})}function KV(t,e){return Ba(this,void 0,void 0,function*(){const[n,r]=Yn("mark",e),i=new Set(Object.keys(e).map(d=>{var h;return(h=/component\.(.*)/.exec(d))===null||h===void 0?void 0:h[1]}).filter(Ln)),{marks:a}=t,o=[],s=[],c=[...a],{width:l,height:u}=hV(t),f={options:t,width:l,height:u};for(;c.length;){const[d]=c.splice(0,1),h=yield wS(d,e),{type:p=Us("G2Mark type is required."),key:v}=h;if(i.has(p))s.push(h);else{const{props:g={}}=r(p),{composite:y=!0}=g;if(!y)o.push(h);else{const{data:m}=h,b=Object.assign(Object.assign({},h),{data:m&&(Array.isArray(m)?m:m.value)}),_=yield n(b,f),O=Array.isArray(_)?_:[_];c.unshift(...O.map((w,M)=>Object.assign(Object.assign({},w),{key:`${v}-${M}`})))}}}return Object.assign(Object.assign({},t),{marks:o,components:s})})}function mS(t,e){return Ba(this,void 0,void 0,function*(){const[n]=Yn("theme",e),[,r]=Yn("mark",e),{theme:i,marks:a,coordinates:o=[]}=t,s=n(OS(i)),c=new Map;for(const u of a){const{type:f}=u,{props:d={}}=r(f),h=yield HV(u,d,e);if(h){const[p,v]=h;c.set(p,v)}}const l=Kn(Array.from(c.values()).flatMap(u=>u.channels),({scaleKey:u})=>u);for(const u of l.values()){const f=u.reduce((b,{scale:_})=>Nt(b,_),{}),{scaleKey:d}=u[0],{values:h}=u[0],p=Array.from(new Set(h.map(b=>b.field).filter(Ln))),v=Nt({guide:{title:p.length===0?void 0:p},field:p[0]},f),{name:g}=u[0],y=u.flatMap(({values:b})=>b.map(_=>_.value)),m=Object.assign(Object.assign({},dY(g,y,v,o,s,e)),{key:d});u.forEach(b=>b.scale=m)}return c})}function lg(t,e,n,r){const i=t.theme,a=typeof e=="string"?i[e]||{}:{};return r(Nt(a,Object.assign({type:e},n)))}function bS(t,e,n){const[r]=Yn("mark",n),[i]=Yn("theme",n),[a]=Yn("labelTransform",n),{key:o,frame:s=!1,theme:c,clip:l,style:u={},labelTransform:f=[]}=e,d=i(OS(c)),h=Array.from(t.values()),p=pY(h,e),v=YY(HY(h$(Array.from(p),h,t),e,n)),g=dV(v,e,d,n),y=HW(g,e,n),m=s?Nt({mainLineWidth:1,mainStroke:"#000"},u):u;vV(cS(v),y,g),fV(v);const b={};for(const w of v){const{scales:M=[]}=w,E=[];for(const A of M){const{name:P}=A,C=Kw(A,n);E.push(C),P==="y"&&C.update(Object.assign(Object.assign({},C.getOptions()),{xScale:b.x})),Zw(b,{[P]:C})}w.scaleInstances=E}const _=[];for(const[w,M]of t.entries()){const{children:E,dataDomain:A,modifier:P,key:C}=w,{index:D,channels:N,tooltip:k}=M,R=Object.fromEntries(N.map(({name:Pt,scale:ce})=>[Pt,ce])),I=fo(R,Pt=>Kw(Pt,n));Zw(b,I);const F=hY(N,I),B=r(w),[z,Y,U]=t$(B(D,I,F,y)),tt=A||z.length,rt=P?P(Y,tt,g):[],wt=Pt=>{var ce,le;return(le=(ce=k.title)===null||ce===void 0?void 0:ce[Pt])===null||le===void 0?void 0:le.value},Bt=Pt=>k.items.map(ce=>ce[Pt]),Xt=z.map((Pt,ce)=>{const le=Object.assign({points:Y[ce],transform:rt[ce],index:Pt,markKey:C,viewKey:o},k&&{title:wt(Pt),items:Bt(Pt)});for(const[_e,He]of Object.entries(F))le[_e]=He[Pt],U&&(le[`series${lo(_e)}`]=U[ce].map(Be=>He[Be]));return U&&(le.seriesIndex=U[ce]),U&&k&&(le.seriesItems=U[ce].map(_e=>Bt(_e)),le.seriesTitle=U[ce].map(_e=>wt(_e))),le});M.data=Xt,M.index=z;const Tt=E==null?void 0:E(Xt,I,g);_.push(...Tt||[])}return[{layout:g,theme:d,coordinate:y,markState:t,key:o,clip:l,scale:b,style:m,components:v,labelTransform:rv(f.map(a))},_]}function ug(t,e,n,r,i){return Ba(this,void 0,void 0,function*(){const{components:a,theme:o,layout:s,markState:c,coordinate:l,key:u,style:f,clip:d,scale:h}=t,{x:p,y:v,width:g,height:y}=s,m=bo(s,["x","y","width","height"]),b=["view","plot","main","content"],_=b.map((B,z)=>z),O=["a","margin","padding","inset"],w=b.map(B=>L_(Object.assign({},o.view,f),B)),M=O.map(B=>se(m,B)),E=B=>B.style("x",z=>N[z].x).style("y",z=>N[z].y).style("width",z=>N[z].width).style("height",z=>N[z].height).each(function(z,Y,U){p$(Ne(U),w[z])});let A=0,P=0,C=g,D=y;const N=_.map(B=>{const z=M[B],{left:Y=0,top:U=0,bottom:tt=0,right:rt=0}=z;return A+=Y,P+=U,C-=Y+rt,D-=U+tt,{x:A,y:P,width:C,height:D}});e.selectAll(ya(g_)).data(_.filter(B=>Ln(w[B])),B=>b[B]).join(B=>B.append("rect").attr("className",g_).style("zIndex",-2).call(E),B=>B.call(E),B=>B.remove());const k=i$(c),R=k?{duration:k[1]}:!1;for(const[,B]of Yf(a,z=>`${z.type}-${z.position}`))B.forEach((z,Y)=>z.index=Y);const I=e.selectAll(ya(v_)).data(a,B=>`${B.type}-${B.position}-${B.index}`).join(B=>B.append("g").style("zIndex",({zIndex:z})=>z||-1).attr("className",v_).append(z=>sS(Nt({animate:R,scale:h},z),l,o,r,c)),B=>B.transition(function(z,Y,U){const{preserve:tt=!1}=z;if(tt)return;const rt=sS(Nt({animate:R,scale:h},z),l,o,r,c),{attributes:wt}=rt,[Bt]=U.childNodes;return Bt.update(wt,!1)})).transitions();n.push(...I.flat().filter(Ln));const F=e.selectAll(ya(zf)).data([s],()=>u).join(B=>B.append("rect").style("zIndex",0).style("fill","transparent").attr("className",zf).call(SS).call(ES,Array.from(c.keys())).call(AS,d),B=>B.call(ES,Array.from(c.keys())).call(z=>k?d$(z,k):SS(z)).call(AS,d)).transitions();n.push(...F.flat());for(const[B,z]of c.entries()){const{data:Y}=z,{key:U,class:tt,type:rt}=B,wt=e.select(`#${U}`),Bt=s$(B,z,t,r,i),Xt=c$(B,z,t,r),Tt=u$(B,z,t,r),Pt=f$(B,z,t,r),ce=a$(e,wt,tt,"element"),le=wt.selectAll(ya(Ra)).selectFacetAll(ce).data(Y,_e=>_e.key,_e=>_e.groupKey).join(_e=>_e.append(Bt).attr("className",Ra).attr("markType",rt).transition(function(He,Be,Qe){return Xt(He,[Qe])}),_e=>_e.call(He=>{const Be=He.parent(),Qe=K7(dn=>{const[xn,Vn]=dn.getBounds().min;return[xn,Vn]});He.transition(function(dn,xn,Vn){o$(Vn,Be,Qe);const mr=Bt(dn,xn),bi=Tt(dn,[Vn],[mr]);return bi!==null||(Vn.nodeName===mr.nodeName&&mr.nodeName!=="g"?av(Vn,mr):(Vn.parentNode.replaceChild(mr,Vn),mr.className=Ra,mr.markType=rt,mr.__data__=Vn.__data__)),bi}).attr("markType",rt).attr("className",Ra)}),_e=>_e.each(function(He,Be,Qe){Qe.__removed__=!0}).transition(function(He,Be,Qe){return Pt(He,[Qe])}).remove(),_e=>_e.append(Bt).attr("className",Ra).attr("markType",rt).transition(function(He,Be,Qe){const{__fromElements__:dn}=Qe,xn=Tt(He,dn,[Qe]);return new _r(dn,null,Qe.parentNode).transition(xn).remove(),xn}),_e=>_e.transition(function(He,Be,Qe){const xn=new _r([],Qe.__toData__,Qe.parentNode).append(Bt).attr("className",Ra).attr("markType",rt).nodes();return Tt(He,[Qe],xn)}).remove()).transitions();n.push(...le.flat())}QV(t,e,n,r,i)})}function QV(t,e,n,r,i){const[a]=Yn("labelTransform",r),{markState:o,labelTransform:s}=t,c=e.select(ya(q0)).node(),l=new Map,u=new Map,f=Array.from(o.entries()).flatMap(([v,g])=>{const{labels:y=[],key:m}=v,b=r$(v,g,t,r,i),_=e.select(`#${m}`).selectAll(ya(Ra)).nodes().filter(O=>!O.__removed__);return y.flatMap((O,w)=>{const{transform:M=[]}=O,E=bo(O,["transform"]);return _.flatMap(A=>{const P=JV(E,w,A);return P.forEach(C=>{l.set(C,b),u.set(C,O)}),P})})}),d=Ne(c).selectAll(ya(K0)).data(f,v=>v.key).join(v=>v.append(g=>l.get(g)(g)).attr("className",K0),v=>v.each(function(g,y,m){const _=l.get(g)(g);av(m,_)}),v=>v.remove()).nodes(),h=Kn(d,v=>u.get(v.__data__)),{coordinate:p}=t;for(const[v,g]of h){const{transform:y=[]}=v;rv(y.map(a))(g,p)}s&&s(d,p)}function JV(t,e,n){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=n.__data__,c=n$(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${o}-${e}`,bounds:c,index:s,points:a,dependentElement:n})];const l=e$(t),u=r.map((f,d)=>Object.assign(Object.assign({},t),{key:`${i[d]}-${e}`,bounds:[a[d]],index:f,points:a,dependentElement:n}));return l?l(u):u}function t$([t,e,n]){if(n)return[t,e,n];const r=[],i=[];for(let a=0;a<t.length;a++){const o=t[a],s=e[a];s.every(([c,l])=>Ln(c)&&Ln(l))&&(r.push(o),i.push(s))}return[r,i]}function e$(t){const{selector:e}=t;if(!e)return null;if(typeof e=="function")return e;if(e==="first")return n=>[n[0]];if(e==="last")return n=>[n[n.length-1]];throw new Error(`Unknown selector: ${e}`)}function n$(t){const e=t.cloneNode(),n=t.getAnimations();e.style.visibility="hidden",n.forEach(o=>{const s=o.effect.getKeyframes();e.attr(s[s.length-1])}),t.parentNode.appendChild(e);const r=e.getLocalBounds();e.destroy();const{min:i,max:a}=r;return[i,a]}function r$(t,e,n,r,i){const[a]=Yn("shape",r),{data:o}=t,{data:s,defaultLabelShape:c}=e,l=s.map(h=>h.points),{theme:u,coordinate:f}=n,d=Object.assign(Object.assign({},i),{document:ew(i),theme:u,coordinate:f});return h=>{const{index:p,points:v}=h,g=o[p],{formatter:y=R=>`${R}`,transform:m,style:b,render:_}=h,O=bo(h,["formatter","transform","style","render"]),w=fo(Object.assign(Object.assign({},O),b),R=>xS(R,g,p,o)),{shape:M=c,text:E}=w,A=bo(w,["shape","text"]),P=typeof y=="string"?uo(y):y,C=Object.assign(Object.assign({},A),{text:P(E,g,p,o),datum:g}),D=Object.assign({type:`label.${M}`,render:_},A),N=a(D,d),k=_S(u,"label",M,"label");return N(v,C,k,l)}}function xS(t,e,n,r){return typeof t=="function"?t(e,n,r):typeof t!="string"?t:e[t]!==void 0?e[t]:t}function i$(t){let e=-1/0,n=1/0;for(const[r,i]of t){const{animate:a={}}=r,{data:o}=i,{enter:s={},update:c={},exit:l={}}=a,{type:u,duration:f=300,delay:d=0}=c,{type:h,duration:p=300,delay:v=0}=s,{type:g,duration:y=300,delay:m=0}=l;for(const b of o){const{updateType:_=u,updateDuration:O=f,updateDelay:w=d,enterType:M=h,enterDuration:E=p,enterDelay:A=v,exitDuration:P=y,exitDelay:C=m,exitType:D=g}=b;(_===void 0||_)&&(e=Math.max(e,O+w),n=Math.min(n,w)),(D===void 0||D)&&(e=Math.max(e,P+C),n=Math.min(n,C)),(M===void 0||M)&&(e=Math.max(e,E+A),n=Math.min(n,A))}}return e===-1/0?null:[n,e-n]}function a$(t,e,n,r){return t.node().parentElement.findAll(a=>a.style.facet!==void 0&&a.style.facet===n&&a!==e.node()).flatMap(a=>a.getElementsByClassName(r))}function o$(t,e,n){if(!t.__facet__)return;const r=t.parentNode.parentNode,i=e.parentNode,[a,o]=n(r),[s,c]=n(i),l=`translate(${a-s}, ${o-c})`;Q7(t,l),e.append(t)}function s$(t,e,n,r,i){const[a]=Yn("shape",r),{data:o}=t,{defaultShape:s,data:c,shape:l}=e,u=c.map(g=>g.points),{theme:f,coordinate:d}=n,{type:h,style:p={}}=t,v=Object.assign(Object.assign({},i),{document:ew(i),coordinate:d,theme:f});return g=>{const{shape:y=s}=p,{shape:m=y,points:b,seriesIndex:_,index:O}=g,w=bo(g,["shape","points","seriesIndex","index"]),M=Object.assign(Object.assign({},w),{index:O}),E=_?_.map(N=>o[N]):o[O],A=_||O,P=fo(p,N=>xS(N,E,A,o)),C=l[m]?l[m](P,v):a(Object.assign(Object.assign({},P),{type:MS(t,m)}),v),D=_S(f,h,m,s);return C(b,M,D,u)}}function _S(t,e,n,r){if(typeof e!="string")return;const{color:i}=t,a=t[e]||{},o=a[n]||a[r];return Object.assign({color:i},o)}function fg(t,e,n,r,i){var a,o;const[,s]=Yn("shape",i),[c]=Yn("animation",i),{defaultShape:l,shape:u}=n,{theme:f,coordinate:d}=r,p=`default${lo(t)}Animation`,{[p]:v}=((a=u[l])===null||a===void 0?void 0:a.props)||s(MS(e,l)).props,{[t]:g={}}=f,y=((o=e.animate)===null||o===void 0?void 0:o[t])||{},m={coordinate:d};return(b,_,O)=>{const{[`${t}Type`]:w,[`${t}Delay`]:M,[`${t}Duration`]:E,[`${t}Easing`]:A}=b,P=Object.assign({type:w||v},y);if(!P.type)return null;const N=c(P,m)(_,O,Nt(g,{delay:M,duration:E,easing:A}));return Array.isArray(N)?N:[N]}}function c$(t,e,n,r){return fg("enter",t,e,n,r)}function l$(t){return t.finished.then(()=>{t.cancel()}),t}function u$(t,e,n,r){return fg("update",t,e,n,r)}function f$(t,e,n,r){return fg("exit",t,e,n,r)}function OS(t={}){if(typeof t=="string")return{type:t};const{type:e="light"}=t,n=bo(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function Ld(t){const e={event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},{interaction:n={}}=t;return Object.entries(Nt(e,n)).reverse()}function wS(t,e){return Ba(this,void 0,void 0,function*(){const n={library:e},{data:r}=t,i=bo(t,["data"]);if(r==null)return t;const[,{data:a}]=yield pS([],{data:r},n);return Object.assign({data:a},i)})}function SS(t){t.style("x",e=>e.paddingLeft+e.marginLeft).style("y",e=>e.paddingTop+e.marginTop).style("width",e=>e.innerWidth).style("height",e=>e.innerHeight)}function d$(t,e){const[n,r]=e;t.transition(function(i,a,o){const{x:s,y:c,width:l,height:u}=o.style,{paddingLeft:f,paddingTop:d,innerWidth:h,innerHeight:p,marginLeft:v,marginTop:g}=i,y=[{x:s,y:c,width:l,height:u},{x:f+v,y:d+g,width:h,height:p}];return o.animate(y,{delay:n,duration:r,fill:"both"})})}function MS(t,e){const{type:n}=t;return typeof e=="string"?`${n}.${e}`:e}function ES(t,e){const n=a=>a.class!==void 0?`${a.class}`:"";t.nodes().length===0||(t.selectAll(ya(p_)).data(e,a=>a.key).join(a=>a.append("g").attr("className",p_).attr("id",o=>o.key).style("facet",n).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.style("facet",n).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.remove()),t.select(ya(q0)).node())||t.append("g").attr("className",q0).style("zIndex",0)}function ya(...t){return t.map(e=>`.${e}`).join("")}function AS(t,e){t.node()&&t.style("clipPath",n=>{if(!e)return null;const{paddingTop:r,paddingLeft:i,marginLeft:a,marginTop:o,innerWidth:s,innerHeight:c}=n;return new Ko({style:{x:i+a,y:r+o,width:s,height:c}})})}function h$(t,e,n){var r;for(const[l]of n.entries())if(l.type==="cell")return t.filter(u=>u.name!=="shape");if(e.length!==1||t.some(l=>l.name==="shape"))return t;const{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;const o={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},c={field:((r=t.find(l=>l.name==="color"))===null||r===void 0?void 0:r.field)||null,name:"shape",type:"constant",domain:[],range:[o[i]]};return[...t,c]}function p$(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function TS(t){const e=Nt({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),i=[e];for(;i.length;){const a=i.shift();if(a.key===void 0){const s=n.get(a),c=r.get(a),l=s===null?"0":`${s.key}-${c}`;a.key=l}const{children:o=[]}=a;if(Array.isArray(o))for(let s=0;s<o.length;s++){const c=Nt({},o[s]);o[s]=c,n.set(c,a),r.set(c,s),i.push(c)}}return e}function v$(t,e){const n=new O_;return n.registerPlugin(new w_),new qx({width:t,height:e,container:document.createElement("div"),renderer:n})}function g$(t,e={},n=()=>{},r=i=>{throw i}){const{width:i=640,height:a=480,depth:o=0}=t,s=TS(t),{canvas:c=v$(i,a),emitter:l=new Up,library:u}=e;e.canvas=c,e.emitter=l;const{width:f,height:d}=c.getConfig();(f!==i||d!==a)&&c.resize(i,a),l.emit(Sn.BEFORE_RENDER);const h=Ne(c.document.documentElement);return c.ready.then(()=>cg(Object.assign(Object.assign({},s),{width:i,height:a,depth:o}),h,u,e)).then(()=>{if(o){const[p,v]=c.document.documentElement.getPosition();c.document.documentElement.setPosition(p,v,-o/2)}c.requestAnimationFrame(()=>{l.emit(Sn.AFTER_RENDER),n==null||n()})}).catch(p=>{r==null||r(p)}),m$(c.getConfig().container)}function Ppt(t,e={},n=()=>{},r=i=>{throw i}){var i;const{width:a=640,height:o=480}=t,s=TS(t),{group:c=new Group,emitter:l=new EventEmitter,library:u}=e;c!=null&&c.parentElement||error("renderToMountedElement can't render chart to unmounted group.");const f=select(c);return e.group=c,e.emitter=l,e.canvas=e.canvas||((i=c==null?void 0:c.ownerDocument)===null||i===void 0?void 0:i.defaultView),l.emit(ChartEvent.BEFORE_RENDER),plot(Object.assign(Object.assign({},s),{width:a,height:o}),f,u,e).then(()=>{var d;(d=e.canvas)===null||d===void 0||d.requestAnimationFrame(()=>{l.emit(ChartEvent.AFTER_RENDER),n==null||n()})}).catch(d=>{r==null||r(d)}),c}function PS(t,e={},n=!1){const{canvas:r,emitter:i}=e;r&&(y$(r),n?r.destroy():r.destroyChildren()),i.off()}function y$(t){const e=t.getRoot().querySelectorAll(`.${Z0}`);e==null||e.forEach(n=>{const{nameInteraction:r=new Map}=n;(r==null?void 0:r.size)>0&&Array.from(r==null?void 0:r.values()).forEach(i=>{i==null||i.destroy()})})}function m$(t){return typeof t=="string"?document.getElementById(t):t}const pc=t=>t?parseInt(t):0;function b$(t){const e=getComputedStyle(t),n=t.clientWidth||pc(e.width),r=t.clientHeight||pc(e.height),i=pc(e.paddingLeft)+pc(e.paddingRight),a=pc(e.paddingTop)+pc(e.paddingBottom);return{width:n-i,height:r-a}}function Cpt(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:c=0,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:d=c,inset:h=0,insetLeft:p=h,insetRight:v=h,insetTop:g=h,insetBottom:y=h}=t,m=O=>O==="auto"?20:O,b=n-m(i)-m(a)-l-u-p-v,_=e-m(o)-m(s)-f-d-g-y;return{width:b,height:_}}function dg(t,e){const n=[t];for(;n.length;){const r=n.shift();e&&e(r);const i=r.children||[];for(const a of i)n.push(a)}}class hg{constructor(e={},n){this.parentNode=null,this.children=[],this.index=0,this.type=n,this.value=e}map(e=n=>n){const n=e(this.value);return this.value=n,this}attr(e,n){return arguments.length===1?this.value[e]:this.map(r=>(r[e]=n,r))}append(e){const n=new e({});return n.children=[],this.push(n),n}push(e){return e.parentNode=this,e.index=this.children.length,this.children.push(e),this}remove(){const e=this.parentNode;if(e){const{children:n}=e,r=n.findIndex(i=>i===this);n.splice(r,1)}return this}getNodeByKey(e){let n=null;return dg(this,i=>{e===i.attr("key")&&(n=i)}),n}getNodesByType(e){const n=[];return dg(this,i=>{e===i.type&&n.push(i)}),n}getNodeByType(e){let n=null;return dg(this,r=>{n||e===r.type&&(n=r)}),n}call(e,...n){return e(this.map(),...n),this}getRoot(){let e=this;for(;e&&e.parentNode;)e=e.parentNode;return e}}var CS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const pg=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"],kS="__remove__",RS="__callback__",LS=1,NS=1;function x$(t){if(t===void 0){const e=document.createElement("div");return e[kS]=!0,e}return typeof t=="string"?document.getElementById(t):t}function _$(t){const e=t.parentNode;e&&e.removeChild(t)}function O$(t){if(t.type!==null)return t;const e=t.children[t.children.length-1];for(const n of pg)e.attr(n,t.attr(n));return e}function IS(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function vg(t,e){const{width:n=640,height:r=480,autoFit:i,depth:a=0}=t;let o=n,s=r;if(i){const{width:c,height:l}=b$(e);o=c||o,s=l||s}return{width:Math.max((0,xr.Z)(o)?o:LS,LS),height:Math.max((0,xr.Z)(s)?s:NS,NS),depth:a}}function w$(t){const e=O$(t),n=[e],r=new Map;for(r.set(e,IS(e));n.length;){const i=n.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===RS)a.children=s.value;else{const c=IS(s),{children:l=[]}=a;l.push(c),n.push(s),r.set(s,c),a.children=l}}return r.get(e)}function S$(t,e){return typeof t=="function"?!0:new Set(Object.keys(e)).has(t)}function M$(t,e){return typeof t!="function"&&new Set(Object.keys(e)).has(t)}function E$(t,e,n,r,i){const{type:a}=t,{type:o=n||a}=e;if(M$(o,i)){for(const s of pg)t.attr(s)!==void 0&&e[s]===void 0&&(e[s]=t.attr(s));return e}if(S$(o,r)){const s={type:"view"},c=Object.assign({},e);for(const l of pg)c[l]!==void 0&&(s[l]=c[l],delete c[l]);return Object.assign(Object.assign({},s),{children:[c]})}return e}function A$(t,e,n){if(typeof t=="function")return e.mark;const i=Object.assign(Object.assign({},e),n)[t];if(!i)throw new Error(`Unknown mark: ${t}.`);return i}function T$(t,e,n){if(typeof t=="function"){const c=new hg;return c.value=t,c.type=RS,c}const{type:r,children:i}=t,a=CS(t,["type","children"]),o=A$(r,e,n),s=new o;return s.value=a,s.type=r,s}function P$(t,e){const{type:n,children:r}=e,i=CS(e,["type","children"]);t.type===n||n===void 0?I_(t.value,i):typeof n=="string"&&(t.type=n,t.value=i)}function C$(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[a,o]=i.shift(),s=T$(o,n,r);Array.isArray(a.children)&&a.push(s);const{children:c}=o;if(Array.isArray(c))for(const l of c)i.push([s,l]);else typeof c=="function"&&i.push([s,c])}}function k$(t,e,n,r,i){const a=E$(t,e,n,r,i),o=[[null,t,a]];for(;o.length;){const[s,c,l]=o.shift();if(!c)C$(s,l,r,i);else if(!l)c.remove();else{P$(c,l);const{children:u}=l,{children:f}=c;if(Array.isArray(u)&&Array.isArray(f)){const d=Math.max(u.length,f.length);for(let h=0;h<d;h++){const p=u[h],v=f[h];o.push([c,v,p])}}else typeof u=="function"&&o.push([c,null,u])}}}function R$(){let t,e;return[new Promise((r,i)=>{e=r,t=i}),e,t]}const L$={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function N$(t,e){var n;return(n=t.style[e])!==null&&n!==void 0?n:L$[e]}function gg(t,e,n,r){t.style[e]=n,r&&t.children.forEach(i=>gg(i,e,n,r))}function yg(t){gg(t,"visibility","hidden",!0)}function mg(t){gg(t,"visibility","visible",!0)}function I$(t,e,{key:n=e}){t.prototype[e]=function(r){return arguments.length===0?this.attr(n):this.attr(n,r)}}function j$(t,e,{key:n=e}){t.prototype[e]=function(r){if(arguments.length===0)return this.attr(n);if(Array.isArray(r))return this.attr(n,r);const i=[...this.attr(n)||[],r];return this.attr(n,i)}}function D$(t,e,{key:n=e}){t.prototype[e]=function(r,i){if(arguments.length===0)return this.attr(n);if(arguments.length===1&&typeof r!="string")return this.attr(n,r);const a=this.attr(n)||{};return a[r]=arguments.length===1?!0:i,this.attr(n,a)}}function F$(t,e,n){t.prototype[e]=function(r){if(arguments.length===0)return this.attr(e);if(Array.isArray(r))return this.attr(e,{items:r});if(fl(r)&&(r.title!==void 0||r.items!==void 0))return this.attr(e,r);if(r===null||r===!1)return this.attr(e,r);const i=this.attr(e)||{},{items:a=[]}=i;return a.push(r),i.items=a,this.attr(e,i)}}function B$(t,e,{ctor:n}){t.prototype[e]=function(r){const i=this.append(n);return e==="mark"&&(i.type=r),i}}function z$(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function Nd(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:i}=r;i==="value"?I$(e,n,r):i==="array"?j$(e,n,r):i==="object"?D$(e,n,r):i==="node"?B$(e,n,r):i==="container"?z$(e,n,r):i==="mix"&&F$(e,n,r)}return e}}function jS(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{type:"node",ctor:n}]))}const DS={encode:{type:"object"},scale:{type:"object"},data:{type:"value"},transform:{type:"array"},style:{type:"object"},animate:{type:"object"},coordinate:{type:"object"},interaction:{type:"object"},label:{type:"array",key:"labels"},axis:{type:"object"},legend:{type:"object"},slider:{type:"object"},scrollbar:{type:"object"},state:{type:"object"},layout:{type:"object"},theme:{type:"object"},title:{type:"value"}},G$=Object.assign(Object.assign({},DS),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),W$=Object.assign(Object.assign({},DS),{labelTransform:{type:"array"}});var H$=function(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let Id=class extends hg{changeData(e){var n;const r=this.getRoot();if(r)return this.attr("data",e),!((n=this.children)===null||n===void 0)&&n.length&&this.children.forEach(i=>{i.attr("data",e)}),r==null?void 0:r.render()}getView(){const e=this.getRoot(),{views:n}=e.getContext();if(n!=null&&n.length)return n.find(r=>r.key===this._key)}getScale(){var e;return(e=this.getView())===null||e===void 0?void 0:e.scale}getScaleByChannel(e){const n=this.getScale();if(n)return n[e]}getCoordinate(){var e;return(e=this.getView())===null||e===void 0?void 0:e.coordinate}getTheme(){var e;return(e=this.getView())===null||e===void 0?void 0:e.theme}getGroup(){const e=this._key;return e?this.getRoot().getContext().canvas.getRoot().getElementById(e):void 0}show(){const e=this.getGroup();e&&!e.isVisible()&&mg(e)}hide(){const e=this.getGroup();e&&e.isVisible()&&yg(e)}};Id=H$([Nd(W$)],Id);var Y$=function(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let bg=class extends hg{changeData(e){const n=this.getRoot();if(n)return this.attr("data",e),n==null?void 0:n.render()}getMark(){var e;const n=(e=this.getRoot())===null||e===void 0?void 0:e.getView();if(!n)return;const{markState:r}=n,i=Array.from(r.keys()).find(a=>a.key===this.attr("key"));return r.get(i)}getScale(){var e;const n=(e=this.getRoot())===null||e===void 0?void 0:e.getView();if(n)return n==null?void 0:n.scale}getScaleByChannel(e){var n,r;const i=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(i)return(r=i==null?void 0:i.scale)===null||r===void 0?void 0:r[e]}getGroup(){const e=this.attr("key");return e?this.getRoot().getContext().canvas.getRoot().getElementById(e):void 0}};bg=Y$([Nd(G$)],bg);var V$=function(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},$$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const X$="G2_CHART_KEY";class U$ extends Id{constructor(e){const{container:n,canvas:r,renderer:i,plugins:a,lib:o}=e,s=$$(e,["container","canvas","renderer","plugins","lib"]);super(s,"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=S_(()=>{this.forceFit()},300),this._renderer=i||new O_,this._plugins=a||[],this._container=x$(n),this._emitter=new Up,this._context={library:Object.assign(Object.assign({},o),y_),emitter:this._emitter,canvas:r},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._context.canvas.getConfig().supportsCSSTransform=!0,this._bindAutoFit(),this._rendering=!0;const e=new Promise((a,o)=>g$(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[n,r,i]=R$();return e.then(r).catch(i).then(()=>this._renderTrailing()),n}options(e){if(arguments.length===0)return w$(this);const{type:n}=e;return n&&(this._previousDefinedType=n),k$(this,e,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(e,n,r){return this._emitter.on(e,n,r),this}once(e,n){return this._emitter.once(e,n),this}emit(e,...n){return this._emitter.emit(e,...n),this}off(e,n){return this._emitter.off(e,n),this}clear(){const e=this.options();this.emit(Sn.BEFORE_CLEAR),this._reset(),PS(e,this._context,!1),this.emit(Sn.AFTER_CLEAR)}destroy(){const e=this.options();this.emit(Sn.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),PS(e,this._context,!0),this._container[kS]&&_$(this._container),this.emit(Sn.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:e,height:n}=vg(this.options(),this._container);if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(Sn.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(Sn.AFTER_CHANGE_SIZE)}),r}changeSize(e,n){if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(Sn.BEFORE_CHANGE_SIZE),this.attr("width",e),this.attr("height",n);const r=this.render();return r.then(()=>{this.emit(Sn.AFTER_CHANGE_SIZE)}),r}_create(){const{library:e}=this._context,n=a=>a.startsWith("mark.")||a==="component.axisX"||a==="component.axisY"||a==="component.legends",r=["mark.mark",...Object.keys(e).filter(n)];this._marks={};for(const a of r){const o=a.split(".").pop();class s extends bg{constructor(){super({},o)}}this._marks[o]=s,this[o]=function(c){const l=this.append(s);return o==="mark"&&(l.type=c),l}}const i=["composition.view",...Object.keys(e).filter(a=>a.startsWith("composition.")&&a!=="composition.mark")];this._compositions=Object.fromEntries(i.map(a=>{const o=a.split(".").pop();let s=class extends Id{constructor(){super({},o)}};return s=V$([Nd(jS(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))Nd(jS(this._compositions))(a);for(const a of i){const o=a.split(".").pop();this[o]=function(){const s=this._compositions[o];return this.type=null,this.append(s)}}}_reset(){const e=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([n])=>n.startsWith("margin")||n.startsWith("padding")||n.startsWith("inset")||e.includes(n))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{const e=this._trailingResolve.bind(this);this._trailingResolve=null,e(this)}).catch(e=>{const n=this._trailingReject.bind(this);this._trailingReject=null,n(e)}))}_createResolve(e){return()=>{this._rendering=!1,e(this)}}_createReject(e){return n=>{this._rendering=!1,e(n)}}_computedOptions(){const e=this.options(),{key:n=X$}=e,{width:r,height:i,depth:a}=vg(e,this._container);return this._width=r,this._height=i,this._key=n,Object.assign(Object.assign({key:this._key},e),{width:r,height:i,depth:a})}_createCanvas(){const{width:e,height:n}=vg(this.options(),this._container);this._plugins.push(new w_),this._plugins.forEach(r=>this._renderer.registerPlugin(r)),this._context.canvas=new qx({container:this._container,width:e,height:n,renderer:this._renderer})}_addToTrailing(){var e;return(e=this._trailingResolve)===null||e===void 0||e.call(this,this),this._trailing=!0,new Promise((r,i)=>{this._trailingResolve=r,this._trailingReject=i})}_bindAutoFit(){const e=this.options(),{autoFit:n}=e;if(this._hasBindAutoFit){n||this._unbindAutoFit();return}n&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}function q$(t,e){class n extends t{constructor(i){super(Object.assign(Object.assign({},i),{lib:e}))}}return n}Mt.enableCSSParsing=!1;var Z$=Object.prototype.hasOwnProperty,FS=function(t,e){if(t===null||!co(t))return{};var n={};return Iv(e,function(r){Z$.call(t,r)&&(n[r]=t[r])}),n};function BS(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 jl(t,e,n,r,i){for(var a=t.children,o,s=-1,c=a.length,l=t.value&&(r-e)/t.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function K$(){var t=1,e=1,n=0,r=!1;function i(o){var s=o.height+1;return o.x0=o.y0=n,o.x1=t,o.y1=e/s,o.eachBefore(a(e,s)),r&&o.eachBefore(BS),o}function a(o,s){return function(c){c.children&&jl(c,c.x0,o*(c.depth+1)/s,c.x1,o*(c.depth+2)/s);var l=c.x0,u=c.y0,f=c.x1-n,d=c.y1-n;f<l&&(l=f=(l+f)/2),d<u&&(u=d=(u+d)/2),c.x0=l,c.y0=u,c.x1=f,c.y1=d}}return i.round=function(o){return arguments.length?(r=!!o,i):r},i.size=function(o){return arguments.length?(t=+o[0],e=+o[1],i):[t,e]},i.padding=function(o){return arguments.length?(n=+o,i):n},i}var Q$=mt(82092);function J$(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 tX(){return this.eachAfter(J$)}var xg=mt(335);function eX(t,e){var n=-1,r=xg(this),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;t.call(e,a,++n,this)}}catch(o){r.e(o)}finally{r.f()}return this}function nX(t,e){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(t.call(e,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function rX(t,e){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function iX(t,e){var n=-1,r=xg(this),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;if(t.call(e,a,++n,this))return a}}catch(o){r.e(o)}finally{r.f()}}function aX(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 oX(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function sX(t){for(var e=this,n=cX(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 cX(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 lX(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function uX(){return Array.from(this)}function fX(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function dX(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}var zS=mt(90228),hX=zS().mark(GS);function GS(){var t,e,n,r,i,a;return zS().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:t=this,n=[t];case 1:e=n.reverse(),n=[];case 2:if(!(t=e.pop())){s.next=8;break}return s.next=5,t;case 5:if(r=t.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);s.next=2;break;case 8:if(n.length){s.next=1;break}case 9:case"end":return s.stop()}},hX,this)}function vc(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=gX)):e===void 0&&(e=vX);for(var n=new gc(t),r,i=[n],a,o,s,c;r=i.pop();)if((o=e(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new gc(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(WS)}function pX(){return vc(this).eachBefore(yX)}function vX(t){return t.children}function gX(t){return Array.isArray(t)?t[1]:null}function yX(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function WS(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function gc(t){this.data=t,this.depth=this.height=0,this.parent=null}gc.prototype=vc.prototype=Q$({constructor:gc,count:tX,each:eX,eachAfter:rX,eachBefore:nX,find:iX,sum:aX,sort:oX,path:sX,ancestors:lX,descendants:uX,leaves:fX,links:dX,copy:pX},Symbol.iterator,GS);var mX=function(t,e){if(!dl(t))return t;for(var n=[],r=0;r<t.length;r++){var i=t[r];e(i,r)&&n.push(i)}return n},bX=mX;function _g(t,e){for(var n in e)e.hasOwnProperty(n)&&n!=="constructor"&&e[n]!==void 0&&(t[n]=e[n])}function xX(t,e,n,r){return e&&_g(t,e),n&&_g(t,n),r&&_g(t,r),t}function _X(t){return(0,ye.Z)(t)?0:dl(t)?t.length:Object.keys(t).length}const OX={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},wX="nodeIndex",Dl="childNodeCount",SX="nodeAncestor",Og="Invalid field: it must be a string!";function MX(t,e){const{field:n,fields:r}=t;if(er(n))return n;if(jr(n))return console.warn(Og),n[0];if(console.warn(`${Og} will try to get fields instead.`),er(r))return r;if(jr(r)&&r.length)return r[0];if(e)return e;throw new TypeError(Og)}function EX(t){const e=[];if(t&&t.each){let n,r;t.each(i=>{var a,o;i.parent!==n?(n=i.parent,r=0):r+=1;const s=bX((((a=i.ancestors)===null||a===void 0?void 0:a.call(i))||[]).map(c=>e.find(l=>l.name===c.name)||c),({depth:c})=>c>0&&c<i.depth);i[SX]=s,i[Dl]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[wX]=r,e.push(i)})}else t&&t.eachNode&&t.eachNode(n=>{e.push(n)});return e}function AX(t,e){e=xX({},OX,e);const n=e.as;if(!jr(n)||n.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');let r;try{r=MX(e)}catch(c){console.warn(c)}const a=(c=>K$().size(e.size).round(e.round).padding(e.padding)(vc(c).sum(l=>_X(l.children)?e.ignoreParentValue?0:l[r]-J2(l.children,(u,f)=>u+f[r],0):l[r]).sort(e.sort)))(t),o=n[0],s=n[1];return a.each(c=>{var l,u;c[o]=[c.x0,c.x1,c.x1,c.x0],c[s]=[c.y1,c.y1,c.y0,c.y0],c.name=c.name||((l=c.data)===null||l===void 0?void 0:l.name)||((u=c.data)===null||u===void 0?void 0:u.label),c.data.name=c.name,["x0","x1","y0","y1"].forEach(f=>{n.indexOf(f)===-1&&delete c[f]})}),EX(a)}var TX=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const yc="sunburst",wg="markType",kpt="value",HS="path",jd="ancestor-node";function PX(t){const{data:e,encode:n}=t,{color:r,value:i}=n,o=AX(e,{field:i,type:"hierarchy.partition",as:["x","y"]}),s=[];return o.forEach(c=>{var l,u,f,d;if(c.depth===0)return null;let h=c.data.name;const p=[h];let v=Object.assign({},c);for(;v.depth>1;)h=`${(l=v.parent.data)===null||l===void 0?void 0:l.name} / ${h}`,p.unshift((u=v.parent.data)===null||u===void 0?void 0:u.name),v=v.parent;const g=Object.assign(Object.assign(Object.assign({},FS(c.data,[i])),{[HS]:h,[jd]:v.data.name}),c);r&&r!==jd&&(g[r]=c.data[r]||((d=(f=c.parent)===null||f===void 0?void 0:f.data)===null||d===void 0?void 0:d[r])),s.push(g)}),s.map(c=>Object.assign(Object.assign({},c),{x:c.x.slice(0,2),y:[c.y[2],c.y[0]],fillOpacity:Math.pow(.85,c.depth)}))}const YS={id:yc,encode:{x:"x",y:"y",key:HS,color:jd,value:"value"},axis:{x:!1,y:!1},style:{[wg]:yc,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[Dl]:Dl,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},VS=t=>{const{encode:e,data:n=[],legend:r}=t,i=TX(t,["encode","data","legend"]),a=Object.assign(Object.assign({},i.coordinate),{innerRadius:Math.max(Fi(i,["coordinate","innerRadius"],.2),1e-5)}),o=Object.assign(Object.assign({},YS.encode),e),{value:s}=o,c=PX({encode:o,data:n});return[Nt({},YS,Object.assign(Object.assign({type:"rect",data:c,encode:o,tooltip:{title:"path",items:[l=>({name:s,value:l[s]})]}},i),{coordinate:a}))]};VS.props={};var CX=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return Iv(t,function(n,r){vi(t)&&r==="prototype"||e.push(r)}),e},kX=CX,RX=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};const LX=t=>t.querySelectorAll(".element").filter(e=>Fi(e,["style",wg])===yc);function NX(t){return Ne(t).select(`.${zf}`).node()}const IX={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function jX(t={}){const{breadCrumb:e={},fixedColor:n=!0}=t,r=Nt({},IX,e);return i=>{const{update:a,setState:o,container:s,view:c,options:l}=i,u=NX(s),f=l.marks.find(({id:m})=>m===yc),{state:d}=f,h=new Dr;u.appendChild(h);const p=(m,b)=>RX(this,void 0,void 0,function*(){if(h.removeChildren(),m){const _=new ca({style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});h.appendChild(_);let O="";const w=m==null?void 0:m.split(" / ");let M=r.style.y,E=h.getBBox().width;const A=u.getBBox().width,P=w.map((C,D)=>{const N=new ca({style:Object.assign(Object.assign({x:E,text:" / "},r.style),{y:M})});h.appendChild(N),E+=N.getBBox().width,O=`${O}${C} / `;const k=new ca({name:O.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:C,x:E,depth:D+1},r.style),{y:M})});return h.appendChild(k),E+=k.getBBox().width,E>A&&(M=h.getBBox().height,E=0,N.attr({x:E,y:M}),E+=N.getBBox().width,k.attr({x:E,y:M}),E+=k.getBBox().width),k});[_,...P].forEach((C,D)=>{if(D===P.length)return;const N=Object.assign({},C.attributes);C.attr("cursor","pointer"),C.addEventListener("mouseenter",()=>{C.attr(r.active)}),C.addEventListener("mouseleave",()=>{C.attr(N)}),C.addEventListener("click",()=>{p(C.name,Fi(C,["style","depth"]))})})}o("drillDown",_=>{const{marks:O}=_,w=O.map(M=>{if(M.id!==yc&&M.type!=="rect")return M;const{data:E}=M,A=Object.fromEntries(["color"].map(C=>[C,{domain:c.scale[C].getOptions().domain}])),P=E.filter(C=>{const D=C.path;return n&&(C[jd]=D.split(" / ")[b]),m?new RegExp(`^${m}.+`).test(D):!0});return Nt({},M,n?{data:P}:{data:P,scale:A})});return Object.assign(Object.assign({},_),{marks:w})}),yield a()}),v=m=>{const b=m.target;if(Fi(b,["style",wg])!==yc||Fi(b,["markType"])!=="rect"||!Fi(b,["style",Dl]))return;const _=Fi(b,["__data__","key"]),O=Fi(b,["style","depth"]);b.style.cursor="pointer",p(_,O)};u.addEventListener("click",v);const g=kX(Object.assign(Object.assign({},d.active),d.inactive)),y=()=>{LX(u).forEach(b=>{const _=Fi(b,["style",Dl]);if(Fi(b,["style","cursor"])!=="pointer"&&_){b.style.cursor="pointer";const w=FS(b.attributes,g);b.addEventListener("mouseenter",()=>{b.attr(d.active)}),b.addEventListener("mouseleave",()=>{b.attr(Nt(w,d.inactive))})}})};return u.addEventListener("mousemove",y),()=>{h.remove(),u.removeEventListener("click",v),u.removeEventListener("mousemove",y)}}}Mt.enableCSSParsing=!1;function DX(){return{"interaction.drillDown":jX,"mark.sunburst":VS}}const $S=()=>[["cartesian"]];$S.props={};const Sg=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];Sg.props={transform:!0};const FX=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},XS=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=FX(t);return[...Sg(),...hl({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};XS.props={};const Mg=()=>[["parallel",0,1,0,1]];Mg.props={};const US=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];US.props={transform:!0};const qS=t=>{const{startAngle:e=-Math.PI/2,endAngle:n=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=t;return[...Mg(),...hl({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};qS.props={};const ZS=({value:t})=>e=>e.map(()=>t);ZS.props={};const KS=({value:t})=>e=>e.map(n=>n[t]);KS.props={};const QS=({value:t})=>e=>e.map(t);QS.props={};const JS=({value:t})=>()=>t;JS.props={};function Dn(t,e){if(t!==null)return{type:"column",value:t,field:e}}function Dd(t,e){const n=Dn(t,e);return Object.assign(Object.assign({},n),{inferred:!0})}function Fd(t,e){if(t!==null)return{type:"column",value:t,field:e,visual:!0}}function BX(t,e){const n=Dn(t,e);return Object.assign(Object.assign({},n),{constant:!1})}function xo(t,e){const n=[];for(const r of t)n[r]=e;return n}function cn(t,e){const n=t[e];if(!n)return[null,null];const{value:r,field:i=null}=n;return[r,i]}function Fl(t,...e){for(const n of e)if(typeof n=="string"){const[r,i]=cn(t,n);if(r!==null)return[r,i]}else return[n,null];return[null,null]}function Bl(t){return t instanceof Date?!1:typeof t=="object"}const zl=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;return r!==void 0?[t,e]:[t,Nt({},e,{encode:{y1:Dd(xo(t,0))}})]};zl.props={};const hs=()=>(t,e)=>{const{encode:n}=e,{x:r}=n;return r!==void 0?[t,e]:[t,Nt({},e,{encode:{x:Dd(xo(t,0))},scale:{x:{guide:null}}})]};hs.props={};const tM=Math.abs,Xr=Math.atan2,ps=Math.cos,zX=Math.max,Eg=Math.min,ma=Math.sin,mc=Math.sqrt,Ur=1e-12,Gl=Math.PI,Bd=Gl/2,GX=2*Gl;function WX(t){return t>1?0:t<-1?Gl:Math.acos(t)}function eM(t){return t>=1?Bd:t<=-1?-Bd:Math.asin(t)}function HX(t){return t.innerRadius}function YX(t){return t.outerRadius}function VX(t){return t.startAngle}function $X(t){return t.endAngle}function XX(t){return t&&t.padAngle}function UX(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,f=s-a,d=f*c-u*l;if(!(d*d<Ur))return d=(u*(e-a)-f*(t-i))/d,[t+d*c,e+d*l]}function zd(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/mc(s*s+c*c),u=l*c,f=-l*s,d=t+u,h=e+f,p=n+u,v=r+f,g=(d+p)/2,y=(h+v)/2,m=p-d,b=v-h,_=m*m+b*b,O=i-a,w=d*v-p*h,M=(b<0?-1:1)*mc(zX(0,O*O*_-w*w)),E=(w*b-m*M)/_,A=(-w*m-b*M)/_,P=(w*b+m*M)/_,C=(-w*m+b*M)/_,D=E-g,N=A-y,k=P-g,R=C-y;return D*D+N*N>k*k+R*R&&(E=P,A=C),{cx:E,cy:A,x01:-u,y01:-f,x11:E*(i/O-1),y11:A*(i/O-1)}}function Gd(){var t=HX,e=YX,n=Hn(0),r=null,i=VX,a=$X,o=XX,s=null,c=Vv(l);function l(){var u,f,d=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-Bd,v=a.apply(this,arguments)-Bd,g=tM(v-p),y=v>p;if(s||(s=u=c()),h<d&&(f=h,h=d,d=f),!(h>Ur))s.moveTo(0,0);else if(g>GX-Ur)s.moveTo(h*ps(p),h*ma(p)),s.arc(0,0,h,p,v,!y),d>Ur&&(s.moveTo(d*ps(v),d*ma(v)),s.arc(0,0,d,v,p,y));else{var m=p,b=v,_=p,O=v,w=g,M=g,E=o.apply(this,arguments)/2,A=E>Ur&&(r?+r.apply(this,arguments):mc(d*d+h*h)),P=Eg(tM(h-d)/2,+n.apply(this,arguments)),C=P,D=P,N,k;if(A>Ur){var R=eM(A/d*ma(E)),I=eM(A/h*ma(E));(w-=R*2)>Ur?(R*=y?1:-1,_+=R,O-=R):(w=0,_=O=(p+v)/2),(M-=I*2)>Ur?(I*=y?1:-1,m+=I,b-=I):(M=0,m=b=(p+v)/2)}var F=h*ps(m),B=h*ma(m),z=d*ps(O),Y=d*ma(O);if(P>Ur){var U=h*ps(b),tt=h*ma(b),rt=d*ps(_),wt=d*ma(_),Bt;if(g<Gl)if(Bt=UX(F,B,rt,wt,U,tt,z,Y)){var Xt=F-Bt[0],Tt=B-Bt[1],Pt=U-Bt[0],ce=tt-Bt[1],le=1/ma(WX((Xt*Pt+Tt*ce)/(mc(Xt*Xt+Tt*Tt)*mc(Pt*Pt+ce*ce)))/2),_e=mc(Bt[0]*Bt[0]+Bt[1]*Bt[1]);C=Eg(P,(d-_e)/(le-1)),D=Eg(P,(h-_e)/(le+1))}else C=D=0}M>Ur?D>Ur?(N=zd(rt,wt,F,B,h,D,y),k=zd(U,tt,z,Y,h,D,y),s.moveTo(N.cx+N.x01,N.cy+N.y01),D<P?s.arc(N.cx,N.cy,D,Xr(N.y01,N.x01),Xr(k.y01,k.x01),!y):(s.arc(N.cx,N.cy,D,Xr(N.y01,N.x01),Xr(N.y11,N.x11),!y),s.arc(0,0,h,Xr(N.cy+N.y11,N.cx+N.x11),Xr(k.cy+k.y11,k.cx+k.x11),!y),s.arc(k.cx,k.cy,D,Xr(k.y11,k.x11),Xr(k.y01,k.x01),!y))):(s.moveTo(F,B),s.arc(0,0,h,m,b,!y)):s.moveTo(F,B),!(d>Ur)||!(w>Ur)?s.lineTo(z,Y):C>Ur?(N=zd(z,Y,U,tt,d,-C,y),k=zd(F,B,rt,wt,d,-C,y),s.lineTo(N.cx+N.x01,N.cy+N.y01),C<P?s.arc(N.cx,N.cy,C,Xr(N.y01,N.x01),Xr(k.y01,k.x01),!y):(s.arc(N.cx,N.cy,C,Xr(N.y01,N.x01),Xr(N.y11,N.x11),!y),s.arc(0,0,d,Xr(N.cy+N.y11,N.cx+N.x11),Xr(k.cy+k.y11,k.cx+k.x11),y),s.arc(k.cx,k.cy,C,Xr(k.y11,k.x11),Xr(k.y01,k.x01),!y))):s.arc(0,0,d,O,_,y)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Gl/2;return[ps(f)*u,ma(f)*u]},l.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Hn(+u),l):t},l.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Hn(+u),l):e},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:Hn(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Hn(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:Hn(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Hn(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Hn(+u),l):o},l.context=function(u){return arguments.length?(s=u==null?null:u,l):s},l}var Wd=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function nM(t,e,n,r,i={}){const{inset:a=0,radius:o=0,insetLeft:s=a,insetTop:c=a,insetRight:l=a,insetBottom:u=a,radiusBottomLeft:f=o,radiusBottomRight:d=o,radiusTopLeft:h=o,radiusTopRight:p=o,minWidth:v=-1/0,maxWidth:g=1/0,minHeight:y=-1/0}=i,m=Wd(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!Nn(r)&&!q_(r)){const E=!!Gn(r),[A,,P]=E?bd(e):e,[C,D]=A,[N,k]=fr(P,A),R=N>0?C:C+N,I=k>0?D:D+k,F=Math.abs(N),B=Math.abs(k),z=R+s,Y=I+c,U=F-(s+l),tt=B-(c+u),rt=E?Xf(U,y,1/0):Xf(U,v,g),wt=E?Xf(tt,v,g):Xf(tt,y,1/0),Bt=E?z:z-(rt-U)/2,Xt=E?Y-(wt-tt)/2:Y-(wt-tt);return Ne(t.createElement("rect",{})).style("x",Bt).style("y",Xt).style("width",rt).style("height",wt).style("radius",[h,p,d,f]).call(Ee,m).node()}const{y:b,y1:_}=n,O=r.getCenter(),w=os(r,e,[b,_]),M=Gd().cornerRadius(o).padAngle(a*Math.PI/180);return Ne(t.createElement("path",{})).style("path",M(w)).style("transform",`translate(${O[0]}, ${O[1]})`).style("radius",o).style("inset",a).call(Ee,m).node()}const Wl=(t,e)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:a=!0}=t,o=Wd(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:c}=e;return(l,u,f)=>{const{color:d,radius:h=0}=f,p=Wd(f,["color","radius"]),v=p.lineWidth||1,{stroke:g,radius:y=h,radiusTopLeft:m=y,radiusTopRight:b=y,radiusBottomRight:_=y,radiusBottomLeft:O=y,innerRadius:w=0,innerRadiusTopLeft:M=w,innerRadiusTopRight:E=w,innerRadiusBottomRight:A=w,innerRadiusBottomLeft:P=w,lineWidth:C=n==="stroke"||g?v:0,inset:D=0,insetLeft:N=D,insetRight:k=D,insetBottom:R=D,insetTop:I=D,minWidth:F,maxWidth:B,minHeight:z}=o,Y=Wd(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:U=d,opacity:tt}=u,rt=[i?m:M,i?b:E,a?_:A,a?O:P],wt=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];Gn(s)&&wt.push(wt.shift());const Bt=Object.assign(Object.assign({radius:y},Object.fromEntries(wt.map((Xt,Tt)=>[Xt,rt[Tt]]))),{inset:D,insetLeft:N,insetRight:k,insetBottom:R,insetTop:I,minWidth:F,maxWidth:B,minHeight:z});return Ne(nM(c,l,u,s,Bt)).call(Ee,p).style("fill","transparent").style(n,U).style(IO(t),tt).style("lineWidth",C).style("stroke",g===void 0?U:g).call(Ee,Y).node()}};Wl.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const vs=(t,e)=>Wl(Object.assign({colorAttribute:"fill"},t),e);vs.props=Object.assign(Object.assign({},Wl.props),{defaultMarker:"square"});const Hd=(t,e)=>Wl(Object.assign({colorAttribute:"stroke"},t),e);Hd.props=Object.assign(Object.assign({},Wl.props),{defaultMarker:"hollowSquare"});function bc(){}function rM(t){this._context=t}rM.prototype={areaStart:bc,areaEnd:bc,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 Ag(t){return new rM(t)}var iM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function qX(t,e,n){const[r,i,a,o]=t;if(Gn(n)){const l=[e?e[0][0]:i[0],i[1]],u=[e?e[3][0]:a[0],a[1]];return[r,l,u,o]}const s=[i[0],e?e[0][1]:i[1]],c=[a[0],e?e[3][1]:a[1]];return[r,s,c,o]}const Tg=(t,e)=>{const{adjustPoints:n=qX}=t,r=iM(t,["adjustPoints"]),{coordinate:i,document:a}=e;return(o,s,c,l)=>{const{index:u}=s,{color:f}=c,d=iM(c,["color"]),h=l[u+1],p=n(o,h,i),v=!!Gn(i),[g,y,m,b]=v?bd(p):p,{color:_=f,opacity:O}=s,w=yo().curve(Ag)([g,y,m,b]);return Ne(a.createElement("path",{})).call(Ee,d).style("path",w).style("fill",_).style("fillOpacity",O).call(Ee,r).node()}};Tg.props={defaultMarker:"square"};function ZX(t,e,n){const[r,i,a,o]=t;if(Gn(n)){const l=[e?e[0][0]:(i[0]+a[0])/2,i[1]],u=[e?e[3][0]:(i[0]+a[0])/2,a[1]];return[r,l,u,o]}const s=[i[0],e?e[0][1]:(i[1]+a[1])/2],c=[a[0],e?e[3][1]:(i[1]+a[1])/2];return[r,s,c,o]}const aM=(t,e)=>Tg(Object.assign({adjustPoints:ZX},t),e);aM.props={defaultMarker:"square"};function Yd(t){return t==null?null:oM(t)}function oM(t){if(typeof t!="function")throw new Error;return t}var KX={depth:-1},sM={},Pg={};function QX(t){return t.id}function JX(t){return t.parentId}function Cg(){var t=QX,e=JX,n;function r(i){var a=Array.from(i),o=t,s=e,c,l,u,f,d,h,p,v,g=new Map;if(n!=null){var y=a.map(function(E,A){return tU(n(E,A,i))}),m=y.map(cM),b=new Set(y).add(""),_=xg(m),O;try{for(_.s();!(O=_.n()).done;){var w=O.value;b.has(w)||(b.add(w),y.push(w),m.push(cM(w)),a.push(Pg))}}catch(E){_.e(E)}finally{_.f()}o=function(A,P){return y[P]},s=function(A,P){return m[P]}}for(u=0,c=a.length;u<c;++u)l=a[u],h=a[u]=new gc(l),(p=o(l,u,i))!=null&&(p+="")&&(v=h.id=p,g.set(v,g.has(v)?sM:h)),(p=s(l,u,i))!=null&&(p+="")&&(h.parent=p);for(u=0;u<c;++u)if(h=a[u],p=h.parent){if(d=g.get(p),!d)throw new Error("missing: "+p);if(d===sM)throw new Error("ambiguous: "+p);d.children?d.children.push(h):d.children=[h],h.parent=d}else{if(f)throw new Error("multiple roots");f=h}if(!f)throw new Error("no root");if(n!=null){for(;f.data===Pg&&f.children.length===1;)f=f.children[0],--c;for(var M=a.length-1;M>=0&&(h=a[M],h.data===Pg);--M)h.data=null}if(f.parent=KX,f.eachBefore(function(E){E.depth=E.parent.depth+1,--c}).eachBefore(WS),f.parent=null,c>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(t=Yd(i),r):t},r.parentId=function(i){return arguments.length?(e=Yd(i),r):e},r.path=function(i){return arguments.length?(n=Yd(i),r):n},r}function tU(t){t="".concat(t);var e=t.length;return kg(t,e-1)&&!kg(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:"/".concat(t)}function cM(t){var e=t.length;if(e<2)return"";for(;--e>1&&!kg(t,e););return t.slice(0,e)}function kg(t,e){if(t[e]==="/"){for(var n=0;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function Hl(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function eU(t){const e=t.getFullYear(),n=Hl(t.getMonth()+1),r=Hl(t.getDate()),i=`${e}-${n}-${r}`,a=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return a||o||s?`${i} ${Hl(a)}:${Hl(o)}:${Hl(s)}`:i}const Vd=(t={})=>{const{channel:e="x"}=t;return(n,r)=>{const{encode:i}=r,{tooltip:a}=r;if(La(a))return[n,r];const{title:o}=a;if(o!==void 0)return[n,r];const s=Object.keys(i).filter(l=>l.startsWith(e)).filter(l=>!i[l].inferred).map(l=>cn(i,l)).filter(([l])=>l).map(l=>l[0]);if(s.length===0)return[n,r];const c=[];for(const l of n)c[l]={value:s.map(u=>u[l]instanceof Date?eU(u[l]):u[l]).join(", ")};return[n,Nt({},r,{tooltip:{title:c}})]}};Vd.props={};const $d=t=>{const{channel:e}=t;return(n,r)=>{const{encode:i,tooltip:a}=r;if(La(a))return[n,r];const{items:o=[]}=a;if(!o||o.length>0)return[n,r];const c=(Array.isArray(e)?e:[e]).flatMap(l=>Object.keys(i).filter(u=>u.startsWith(l)).map(u=>{const{field:f,value:d,inferred:h=!1,aggregate:p}=i[u];return h?null:p&&d?{channel:u}:f?{field:f}:d?{channel:u}:null}).filter(u=>u!==null));return[n,Nt({},r,{tooltip:{items:c}})]}};$d.props={};var nU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const lM=()=>(t,e)=>{const{encode:n}=e,{key:r}=n,i=nU(n,["key"]);if(r!==void 0)return[t,e];const a=Object.values(i).map(({value:s})=>s),o=t.map(s=>a.filter(Array.isArray).map(c=>c[s]).join("-"));return[t,Nt({},e,{encode:{key:Dn(o)}})]};lM.props={};function uM(t={}){const{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function ri(t={}){return[...uM(t),{name:"title",scale:"identity"}]}function Rpt(){return[{type:MaybeTitle,channel:"color"},{type:MaybeTooltip,channel:["x","y","z"]}]}function _o(){return[{type:Vd,channel:"color"},{type:$d,channel:["x","y"]}]}function xc(){return[{type:Vd,channel:"x"},{type:$d,channel:["y"]}]}function rU(){return[{type:Vd,channel:"color"},{type:$d,channel:["position"]}]}function _c(t={}){return uM(t)}function gr(){return[{type:lM}]}function Or(){return[]}function Rg(t,e){return t.getBandWidth(t.invert(e))}function gs(t,e,n={}){const{x:r,y:i,series:a}=e,{x:o,y:s,series:c}=t,{style:{bandOffset:l=c?0:.5,bandOffsetX:u=l,bandOffsetY:f=l}={}}=n,d=!!(o!=null&&o.getBandWidth),h=!!(s!=null&&s.getBandWidth),p=!!(c!=null&&c.getBandWidth);return!d&&!h?v=>v:(v,g)=>{const y=d?Rg(o,r[g]):0,m=h?Rg(s,i[g]):0,_=p&&a?(()=>(Rg(c,a[g])/2+ +a[g])*y)():0,[O,w]=v;return[O+u*y+_,w+f*m]}}function Xd(t){return parseFloat(t)/100}function Lg(t,e,n,r){const{x:i,y:a}=n,{innerWidth:o,innerHeight:s}=r.getOptions(),c=Array.from(t,l=>{const u=i[l],f=a[l],d=typeof u=="string"?Xd(u)*o:+u,h=typeof f=="string"?Xd(f)*s:+f;return[[d,h]]});return[t,c]}function ba(t){return typeof t=="function"?t:e=>e[t]}function Ng(t,e){return Array.from(t,ba(e))}function Ig(t,e){const{source:n=u=>u.source,target:r=u=>u.target,value:i=u=>u.value}=e,{links:a,nodes:o}=t,s=Ng(a,n),c=Ng(a,r),l=Ng(a,i);return{links:a.map((u,f)=>({target:c[f],source:s[f],value:l[f]})),nodes:o||Array.from(new Set([...s,...c]),u=>({key:u}))}}function iU(t,e){return Array.isArray(t)?typeof e=="function"?Cg().path(e)(t):Cg()(t):vc(t)}function fM(t,e){return t.getBandWidth(t.invert(e))}const dM={rect:vs,hollow:Hd,funnel:Tg,pyramid:aM},hM=()=>(t,e,n,r)=>{const{x:i,y:a,y1:o,series:s,size:c}=n,l=e.x,u=e.series,[f]=r.getSize(),d=c?c.map(v=>+v/f):null,h=c?(v,g,y)=>{const m=v+g/2,b=d[y];return[m-b/2,m+b/2]}:(v,g,y)=>[v,v+g],p=Array.from(t,v=>{const g=fM(l,i[v]),y=u?fM(u,s==null?void 0:s[v]):1,m=g*y,b=(+(s==null?void 0:s[v])||0)*g,_=+i[v]+b,[O,w]=h(_,m,v),M=+a[v],E=+o[v];return[[O,M],[w,M],[w,E],[O,E]].map(N=>r.map(N))});return[t,p]};hM.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:dM,channels:[...ri({shapes:Object.keys(dM)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...gr(),{type:zl},{type:hs}],postInference:[...Or(),...xc()],interaction:{shareTooltip:!0}};const pM={rect:vs,hollow:Hd},vM=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n,c=Array.from(t,l=>{const u=[+i[l],+o[l]],f=[+a[l],+o[l]],d=[+a[l],+s[l]],h=[+i[l],+s[l]];return[u,f,d,h].map(p=>r.map(p))});return[t,c]};vM.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:pM,channels:[...ri({shapes:Object.keys(pM)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr(),{type:zl}],postInference:[...Or(),...xc()],interaction:{shareTooltip:!0}};var gM=jg(Cl);function yM(t){this._curve=t}yM.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 jg(t){function e(n){return new yM(t(n))}return e._curve=t,e}function Yl(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(jg(n)):e()._curve},t}function aU(){return Yl(yo().curve(gM))}var mM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const oU=oc(t=>{const{d1:e,d2:n,style1:r,style2:i}=t.attributes,a=t.ownerDocument;Ne(t).maybeAppend("line",()=>a.createElement("path",{})).style("d",e).call(Ee,r),Ne(t).maybeAppend("line1",()=>a.createElement("path",{})).style("d",n).call(Ee,i)});function sU(t,e){const n=[],r=[];let i=!1,a=null;for(const o of t)!e(o[0])||!e(o[1])?i=!0:(n.push(o),i&&(i=!1,r.push([a,o])),a=o);return[n,r]}const Gi=(t,e)=>{const{curve:n,gradient:r=!1,gradientColor:i="between",defined:a=u=>!Number.isNaN(u)&&u!==void 0&&u!==null,connect:o=!1}=t,s=mM(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:c,document:l}=e;return(u,f,d)=>{const{color:h,lineWidth:p}=d,v=mM(d,["color","lineWidth"]),{color:g=h,size:y=p,seriesColor:m,seriesX:b,seriesY:_}=f,O=jO(c,f),w=Gn(c),M=r&&m?NO(m,b,_,r,i,w):g,E=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},v),M&&{stroke:M}),y&&{lineWidth:y}),O&&{transform:O}),s);let A;if(Nn(c)){const R=c.getCenter();A=I=>aU().angle((F,B)=>ac(fr(I[B],R))).radius((F,B)=>Qn(I[B],R)).defined(([F,B])=>a(F)&&a(B)).curve(n)(I)}else A=yo().x(R=>R[0]).y(R=>R[1]).defined(([R,I])=>a(R)&&a(I)).curve(n);const[P,C]=sU(u,a),D=se(E,"connect"),N=!!C.length;if(!N||o&&!Object.keys(D).length)return Ne(l.createElement("path",{})).style("d",A(P)||[]).call(Ee,E).node();if(N&&!o)return Ne(l.createElement("path",{})).style("d",A(u)).call(Ee,E).node();const k=R=>R.map(A).join(",");return Ne(new oU).style("style1",Object.assign(Object.assign({},E),D)).style("style2",E).style("d1",k(C)).style("d2",A(u)).node()}};Gi.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const bM=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=Nn(n)?Ag:Cl;return Gi(Object.assign({curve:i},t),e)(...r)}};bM.props=Object.assign(Object.assign({},Gi.props),{defaultMarker:"line"});function Dg(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 Fg(t,e){this._context=t,this._k=(1-e)/6}Fg.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:Dg(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:Dg(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}};var Lpt=function t(e){function n(r){return new Fg(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Bg(t,e){this._context=t,this._k=(1-e)/6}Bg.prototype={areaStart:bc,areaEnd:bc,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:Dg(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}};var Npt=function t(e){function n(r){return new Bg(r,e)}return n.tension=function(r){return t(+r)},n}(0);function xM(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Ur){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>Ur){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function _M(t,e){this._context=t,this._alpha=e}_M.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:xM(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}};var Ipt=function t(e){function n(r){return e?new _M(r,e):new Fg(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function OM(t,e){this._context=t,this._alpha=e}OM.prototype={areaStart:bc,areaEnd:bc,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:xM(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}};var wM=function t(e){function n(r){return e?new OM(r,e):new Bg(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function SM(t){return t<0?-1:1}function MM(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(SM(a)+SM(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function EM(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function zg(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Ud(t){this._context=t}Ud.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:zg(this,this._t0,EM(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,zg(this,EM(this,n=MM(this,t,e)),n);break;default:zg(this,this._t0,n=MM(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function AM(t){this._context=new TM(t)}(AM.prototype=Object.create(Ud.prototype)).point=function(t,e){Ud.prototype.point.call(this,e,t)};function TM(t){this._context=t}TM.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,a){this._context.bezierCurveTo(e,t,r,n,a,i)}};function PM(t){return new Ud(t)}function CM(t){return new AM(t)}var cU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const kM=(t,e)=>{const n=cU(t,[]),{coordinate:r}=e;return(...i)=>{const a=Nn(r)?wM:Gn(r)?CM:PM;return Gi(Object.assign({curve:a},n),e)(...i)}};kM.props=Object.assign(Object.assign({},Gi.props),{defaultMarker:"smooth"});function qd(t,e){this._context=t,this._t=e}qd.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 RM(t){return new qd(t,.5)}function LM(t){return new qd(t,0)}function NM(t){return new qd(t,1)}const IM=(t,e)=>Gi(Object.assign({curve:NM},t),e);IM.props=Object.assign(Object.assign({},Gi.props),{defaultMarker:"hv"});const jM=(t,e)=>Gi(Object.assign({curve:LM},t),e);jM.props=Object.assign(Object.assign({},Gi.props),{defaultMarker:"vh"});const DM=(t,e)=>Gi(Object.assign({curve:RM},t),e);DM.props=Object.assign(Object.assign({},Gi.props),{defaultMarker:"hvh"});var lU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function uU(t,e,n,r,i){const a=fr(n,e),o=Bi(a),s=o+Math.PI/2,c=[r/2*Math.cos(s),r/2*Math.sin(s)],l=[i/2*Math.cos(s),i/2*Math.sin(s)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],f=[r/2*Math.cos(o),r/2*Math.sin(o)],d=md(e,c),h=md(n,l),p=md(h,u),v=md(n,u),g=fr(v,l),y=fr(n,l),m=fr(e,c),b=fr(m,f),_=fr(e,f),O=fr(d,f);t.moveTo(...d),t.lineTo(...h),t.arcTo(...p,...v,i/2),t.arcTo(...g,...y,i/2),t.lineTo(...m),t.arcTo(...b,..._,r/2),t.arcTo(...O,...d,r/2),t.closePath()}const FM=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{seriesSize:o,color:s}=i,{color:c}=a,l=lU(a,["color"]),u=zi();for(let f=0;f<r.length-1;f++){const d=r[f],h=r[f+1],p=o[f],v=o[f+1];[...d,...h].every(Ln)&&uU(u,d,h,p,v)}return Ne(n.createElement("path",{})).call(Ee,l).style("fill",s||c).style("d",u.toString()).call(Ee,t).node()}};FM.props=Object.assign(Object.assign({},Gi.props),{defaultMarker:"line"});const BM=()=>(t,e)=>{const{style:n={},encode:r}=e,{series:i}=r,{gradient:a}=n;return!a||i?[t,e]:[t,Nt({},e,{encode:{series:Fd(xo(t,void 0))}})]};BM.props={};const Gg=()=>(t,e)=>{const{encode:n}=e,{series:r,color:i}=n;if(r!==void 0||i===void 0)return[t,e];const[a,o]=cn(n,"color");return[t,Nt({},e,{encode:{series:Dn(a,o)}})]};Gg.props={};const zM={line:bM,smooth:kM,hv:IM,vh:jM,hvh:DM,trail:FM},fU=(t,e,n,r)=>{var i,a;const{series:o,x:s,y:c}=n,{x:l,y:u}=e;if(s===void 0||c===void 0)throw new Error("Missing encode for x or y channel.");const f=o?Array.from(Kn(t,g=>o[g]).values()):[t],d=f.map(g=>g[0]).filter(g=>g!==void 0),h=(((i=l==null?void 0:l.getBandWidth)===null||i===void 0?void 0:i.call(l))||0)/2,p=(((a=u==null?void 0:u.getBandWidth)===null||a===void 0?void 0:a.call(u))||0)/2,v=Array.from(f,g=>g.map(y=>r.map([+s[y]+h,+c[y]+p])));return[d,v,f]},dU=(t,e,n,r)=>{const i=Object.entries(n).filter(([o])=>o.startsWith("position")).map(([,o])=>o);if(i.length===0)throw new Error("Missing encode for position channel.");const a=Array.from(t,o=>{const s=i.map(u=>+u[o]),c=r.map(s),l=[];for(let u=0;u<c.length;u+=2)l.push([c[u],c[u+1]]);return l});return[t,a]},GM=()=>(t,e,n,r)=>(vl(r)?dU:fU)(t,e,n,r);GM.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:zM,channels:[...ri({shapes:Object.keys(zM)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...gr(),{type:BM},{type:Gg}],postInference:[...Or(),...xc(),...rU()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var hU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Wg=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]];Wg.style=["fill"];const WM=Wg.bind(void 0);WM.style=["stroke","lineWidth"];const Zd=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];Zd.style=["fill"];const HM=Zd.bind(void 0);HM.style=["fill"];const YM=Zd.bind(void 0);YM.style=["stroke","lineWidth"];const Hg=(t,e,n)=>{const r=n*.618;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};Hg.style=["fill"];const VM=Hg.bind(void 0);VM.style=["stroke","lineWidth"];const Yg=(t,e,n)=>{const r=n*Math.sin(.3333333333333333*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};Yg.style=["fill"];const $M=Yg.bind(void 0);$M.style=["stroke","lineWidth"];const Vg=(t,e,n)=>{const r=n*Math.sin(.3333333333333333*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};Vg.style=["fill"];const XM=Vg.bind(void 0);XM.style=["stroke","lineWidth"];const $g=(t,e,n)=>{const r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]};$g.style=["fill"];const UM=$g.bind(void 0);UM.style=["stroke","lineWidth"];const Xg=(t,e,n)=>{const r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]};Xg.style=["fill"];const qM=Xg.bind(void 0);qM.style=["stroke","lineWidth"];const ZM=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];ZM.style=["stroke","lineWidth"];const KM=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];KM.style=["stroke","lineWidth"];const QM=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]];QM.style=["stroke","lineWidth"];const JM=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];JM.style=["stroke","lineWidth"];const tE=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];tE.style=["stroke","lineWidth"];const Ug=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];Ug.style=["stroke","lineWidth"];const eE=Ug.bind(void 0);eE.style=["stroke","lineWidth"];const nE=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]];nE.style=["stroke","lineWidth"];const rE=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]];rE.style=["stroke","lineWidth"];const iE=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]];iE.style=["stroke","lineWidth"];const aE=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]];aE.style=["stroke","lineWidth"];const oE=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];oE.style=["stroke","lineWidth"];const Oc=new Map([["bowtie",Xg],["cross",KM],["dash",eE],["diamond",Hg],["dot",Ug],["hexagon",$g],["hollowBowtie",qM],["hollowDiamond",VM],["hollowHexagon",UM],["hollowPoint",WM],["hollowSquare",YM],["hollowTriangle",$M],["hollowTriangleDown",XM],["hv",rE],["hvh",aE],["hyphen",tE],["line",ZM],["plus",JM],["point",Wg],["rect",HM],["smooth",nE],["square",Zd],["tick",QM],["triangleDown",Vg],["triangle",Yg],["vh",iE],["vhv",oE]]);function pU(t,e){var{d:n,fill:r,strokeWidth:i,path:a,stroke:o,lineWidth:s,color:c}=e,l=hU(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const u=Oc.get(t)||Oc.get("point");return(...f)=>new ni({style:Object.assign(Object.assign({},l),{path:u(...f),stroke:u.style.includes("stroke")?c||o:"",fill:u.style.includes("fill")?c||r:"",lineWidth:u.style.includes("lineWidth")?s||s||2:0})})}function jpt(t,e){Oc.set(t,e)}function Dpt(t){Oc.delete(t)}var vU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gU(t,e,n,r){if(e.length===1)return;const{size:i}=n;if(t==="fixed")return i;if(t==="normal"||Z_(r)){const[[a,o],[s,c]]=e,l=Math.abs((s-a)/2),u=Math.abs((c-o)/2);return Math.max(0,(l+u)/2)}return i}const an=(t,e)=>{const{colorAttribute:n,symbol:r,mode:i="auto"}=t,a=vU(t,["colorAttribute","symbol","mode"]),o=Oc.get(r)||Oc.get("point"),{coordinate:s,document:c}=e;return(l,u,f)=>{const{lineWidth:d,color:h}=f,p=a.stroke?d||1:d,{color:v=h,transform:g,opacity:y}=u,[m,b]=DO(l),O=gU(i,l,u,s)||a.r||f.r;return Ne(c.createElement("path",{})).call(Ee,f).style("fill","transparent").style("d",o(m,b,O)).style("lineWidth",p).style("transform",g).style("stroke",v).style(IO(t),y).style(n,v).call(Ee,a).node()}};an.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const sE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);sE.props=Object.assign({defaultMarker:"hollowPoint"},an.props);const cE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);cE.props=Object.assign({defaultMarker:"hollowDiamond"},an.props);const lE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);lE.props=Object.assign({defaultMarker:"hollowHexagon"},an.props);const uE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);uE.props=Object.assign({defaultMarker:"hollowSquare"},an.props);const fE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);fE.props=Object.assign({defaultMarker:"hollowTriangleDown"},an.props);const dE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);dE.props=Object.assign({defaultMarker:"hollowTriangle"},an.props);const hE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);hE.props=Object.assign({defaultMarker:"hollowBowtie"},an.props);const pE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);pE.props=Object.assign({defaultMarker:"point"},an.props);const vE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);vE.props=Object.assign({defaultMarker:"plus"},an.props);const gE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);gE.props=Object.assign({defaultMarker:"diamond"},an.props);const yE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);yE.props=Object.assign({defaultMarker:"square"},an.props);const mE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);mE.props=Object.assign({defaultMarker:"triangle"},an.props);const bE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);bE.props=Object.assign({defaultMarker:"hexagon"},an.props);const xE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);xE.props=Object.assign({defaultMarker:"cross"},an.props);const _E=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);_E.props=Object.assign({defaultMarker:"bowtie"},an.props);const OE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);OE.props=Object.assign({defaultMarker:"hyphen"},an.props);const wE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);wE.props=Object.assign({defaultMarker:"line"},an.props);const SE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);SE.props=Object.assign({defaultMarker:"tick"},an.props);const ME=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);ME.props=Object.assign({defaultMarker:"triangleDown"},an.props);const Kd=()=>(t,e)=>{const{encode:n}=e,{y:r}=n;return r!==void 0?[t,e]:[t,Nt({},e,{encode:{y:Dd(xo(t,0))},scale:{y:{guide:null}}})]};Kd.props={};const EE=()=>(t,e)=>{const{encode:n}=e,{size:r}=n;return r!==void 0?[t,e]:[t,Nt({},e,{encode:{size:Fd(xo(t,3))}})]};EE.props={};const AE={hollow:sE,hollowDiamond:cE,hollowHexagon:lE,hollowSquare:uE,hollowTriangleDown:fE,hollowTriangle:dE,hollowBowtie:hE,point:pE,plus:vE,diamond:gE,square:yE,triangle:mE,hexagon:bE,cross:xE,bowtie:_E,hyphen:OE,line:wE,tick:SE,triangleDown:ME},TE=t=>(e,n,r,i)=>{const{x:a,y:o,x1:s,y1:c,size:l,dx:u,dy:f}=r,[d,h]=i.getSize(),p=gs(n,r,t),v=y=>{const m=+((u==null?void 0:u[y])||0),b=+((f==null?void 0:f[y])||0),_=s?(+a[y]+ +s[y])/2:+a[y],O=c?(+o[y]+ +c[y])/2:+o[y],w=_+m,M=O+b;return[w,M]},g=l?Array.from(e,y=>{const[m,b]=v(y),_=+l[y],O=_/d,w=_/h,M=[m-O,b-w],E=[m+O,b+w];return[i.map(p(M,y)),i.map(p(E,y))]}):Array.from(e,y=>[i.map(p(v(y),y))]);return[e,g]};TE.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:AE,channels:[...ri({shapes:Object.keys(AE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...gr(),{type:hs},{type:Kd}],postInference:[...Or(),{type:EE},..._o()]};const PE=(t,e)=>{const{coordinate:n}=e;return(r,i,a)=>{const{color:o,text:s="",fontSize:c,rotate:l=0,transform:u=""}=i,f={text:String(s),stroke:o,fill:o,fontSize:c},[[d,h]]=r;return Ne(new YO).style("x",d).style("y",h).call(Ee,a).style("transform",`${u}rotate(${+l})`).style("coordCenter",n.getCenter()).call(Ee,f).call(Ee,t).node()}};PE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var qg=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function yU(t){const e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[s,c]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,s,c],["L",a,o],["Z"]]}function mU(t){const{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}const bU=oc(t=>{const e=t.attributes,{class:n,x:r,y:i}=e,a=qg(e,["class","x","y"]),o=se(a,"marker"),{size:s=24}=o,c=()=>yU(s/2),l=Ne(t).maybeAppend("marker",()=>new kn({})).call(d=>d.node().update(Object.assign({symbol:c},o))).node(),[u,f]=mU(l);Ne(t).maybeAppend("text","text").style("x",u).style("y",f).call(Ee,a)}),CE=(t,e)=>{const n=qg(t,[]);return(r,i,a)=>{const{color:o}=a,s=qg(a,["color"]),{color:c=o,text:l=""}=i,u={text:String(l),stroke:c,fill:c},[[f,d]]=r;return Ne(new bU).call(Ee,s).style("x",f).style("y",d).call(Ee,u).call(Ee,n).node()}};CE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Qd=()=>(t,e)=>{const{data:n}=e;if(!Array.isArray(n)||n.some(Bl))return[t,e];const r=Array.isArray(n[0])?n:[n],i=r.map(o=>o[0]),a=r.map(o=>o[1]);return[t,Nt({},e,{encode:{x:Dn(i),y:Dn(a)}})]};Qd.props={};var kE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Jd=()=>(t,e)=>{const{data:n,style:r={}}=e,i=kE(e,["data","style"]),{x:a,y:o}=r,s=kE(r,["x","y"]);if(a==null||o==null)return[t,e];const c=a||0,l=o||0;return[[0],Nt({},i,{data:[0],cartesian:!0,encode:{x:Dn([c]),y:Dn([l])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};Jd.props={};const RE={text:PE,badge:CE},LE=t=>{const{cartesian:e=!1}=t;return e?Lg:(n,r,i,a)=>{const{x:o,y:s}=i,c=gs(r,i,t),l=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(c(f,u))]});return[n,l]}};LE.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:RE,channels:[...ri({shapes:Object.keys(RE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...gr(),{type:Qd},{type:Jd}],postInference:[...Or(),..._o()]};const Zg=()=>(t,e)=>[t,Nt({scale:{x:{padding:0},y:{padding:0}}},e)];Zg.props={};const NE={cell:vs,hollow:Hd},IE=()=>(t,e,n,r)=>{const{x:i,y:a}=n,o=e.x,s=e.y,c=Array.from(t,l=>{const u=o.getBandWidth(o.invert(+i[l])),f=s.getBandWidth(s.invert(+a[l])),d=+i[l],h=+a[l],p=[d,h],v=[d+u,h],g=[d+u,h+f],y=[d,h+f];return[p,v,g,y].map(m=>r.map(m))});return[t,c]};IE.props={defaultShape:"cell",defaultLabelShape:"label",shape:NE,composite:!1,channels:[...ri({shapes:Object.keys(NE)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...gr(),{type:hs},{type:Kd},{type:Zg}],postInference:[...Or(),..._o()]};function Kg(t,e,n){var r=null,i=Hn(!0),a=null,o=Cl,s=null,c=Vv(l);t=typeof t=="function"?t:t===void 0?WO:Hn(+t),e=typeof e=="function"?e:Hn(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?HO:Hn(+n);function l(f){var d,h,p,v=(f=BO(f)).length,g,y=!1,m,b=new Array(v),_=new Array(v);for(a==null&&(s=o(m=c())),d=0;d<=v;++d){if(!(d<v&&i(g=f[d],d,f))===y)if(y=!y)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(b[p],_[p]);s.lineEnd(),s.areaEnd()}y&&(b[d]=+t(g,d,f),_[d]=+e(g,d,f),s.point(r?+r(g,d,f):b[d],n?+n(g,d,f):_[d]))}if(m)return s=null,m+""||null}function u(){return yo().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:Hn(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:Hn(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Hn(+f),l):r},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:Hn(+f),n=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:Hn(+f),l):e},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Hn(+f),l):n},l.lineX0=l.lineY0=function(){return u().x(t).y(e)},l.lineY1=function(){return u().x(t).y(n)},l.lineX1=function(){return u().x(r).y(e)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Hn(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}function xU(){var t=Kg().curve(gM),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=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 Yl(n())},delete t.lineX0,t.lineEndAngle=function(){return Yl(r())},delete t.lineX1,t.lineInnerRadius=function(){return Yl(i())},delete t.lineY0,t.lineOuterRadius=function(){return Yl(a())},delete t.lineY1,t.curve=function(o){return arguments.length?e(jg(o)):e()._curve},t}var _U=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function OU(t,e){const n=[],r=[],i=[];let a=!1,o=null;const s=t.length/2;for(let c=0;c<s;c++){const l=t[c],u=t[c+s];if([...l,...u].some(f=>!e(f)))a=!0;else{if(n.push(l),r.push(u),a&&o){a=!1;const[f,d]=o;i.push([f,l,d,u])}o=[l,u]}}return[n.concat(r),i]}const jE=oc(t=>{const{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,a=t.ownerDocument;Ne(t).maybeAppend("connect-path",()=>a.createElement("path",{})).style("d",n).call(Ee,i),Ne(t).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",e).call(Ee,r)}),Qi=(t,e)=>{const{curve:n,gradient:r=!1,defined:i=l=>!Number.isNaN(l)&&l!==void 0&&l!==null,connect:a=!1}=t,o=_U(t,["curve","gradient","defined","connect"]),{coordinate:s,document:c}=e;return(l,u,f)=>{const{color:d}=f,{color:h=d,seriesColor:p,seriesX:v,seriesY:g}=u,y=Gn(s),m=jO(s,u),b=r&&p?NO(p,v,g,r,void 0,y):h,_=Object.assign(Object.assign(Object.assign(Object.assign({},f),{stroke:b,fill:b}),m&&{transform:m}),o),[O,w]=OU(l,i),M=se(_,"connect"),E=!!w.length,A=P=>Ne(c.createElement("path",{})).style("d",P||"").call(Ee,_).node();if(Nn(s)){const P=C=>{const D=s.getCenter(),N=C.slice(0,C.length/2),k=C.slice(C.length/2);return xU().angle((R,I)=>ac(fr(N[I],D))).outerRadius((R,I)=>Qn(N[I],D)).innerRadius((R,I)=>Qn(k[I],D)).defined((R,I)=>[...N[I],...k[I]].every(i)).curve(n)(k)};return!E||a&&!Object.keys(M).length?A(P(O)):E&&!a?A(P(l)):Ne(new jE).style("areaStyle",_).style("connectStyle",Object.assign(Object.assign({},M),o)).style("areaPath",P(l)).style("connectPath",w.map(P).join("")).node()}else{const P=C=>{const D=C.slice(0,C.length/2),N=C.slice(C.length/2);return y?Kg().y((k,R)=>D[R][1]).x1((k,R)=>D[R][0]).x0((k,R)=>N[R][0]).defined((k,R)=>[...D[R],...N[R]].every(i)).curve(n)(D):Kg().x((k,R)=>D[R][0]).y1((k,R)=>D[R][1]).y0((k,R)=>N[R][1]).defined((k,R)=>[...D[R],...N[R]].every(i)).curve(n)(D)};return!E||a&&!Object.keys(M).length?A(P(O)):E&&!a?A(P(l)):Ne(new jE).style("areaStyle",_).style("connectStyle",Object.assign(Object.assign({},M),o)).style("areaPath",P(l)).style("connectPath",w.map(P).join("")).node()}}};Qi.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const DE=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=Nn(n)?Ag:Cl;return Qi(Object.assign({curve:i},t),e)(...r)}};DE.props=Object.assign(Object.assign({},Qi.props),{defaultMarker:"square"});var wU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const FE=(t,e)=>{const n=wU(t,[]),{coordinate:r}=e;return(...i)=>{const a=Nn(r)?wM:Gn(r)?CM:PM;return Qi(Object.assign({curve:a},n),e)(...i)}};FE.props=Object.assign(Object.assign({},Qi.props),{defaultMarker:"smooth"});const BE=(t,e)=>(...n)=>Qi(Object.assign({curve:RM},t),e)(...n);BE.props=Object.assign(Object.assign({},Qi.props),{defaultMarker:"hvh"});const zE=(t,e)=>(...n)=>Qi(Object.assign({curve:LM},t),e)(...n);zE.props=Object.assign(Object.assign({},Qi.props),{defaultMarker:"vh"});const GE=(t,e)=>(...n)=>Qi(Object.assign({curve:NM},t),e)(...n);GE.props=Object.assign(Object.assign({},Qi.props),{defaultMarker:"hv"});const WE={area:DE,smooth:FE,hvh:BE,vh:zE,hv:GE},HE=()=>(t,e,n,r)=>{var i,a;const{x:o,y:s,y1:c,series:l}=n,{x:u,y:f}=e,d=l?Array.from(Kn(t,y=>l[y]).values()):[t],h=d.map(y=>y[0]).filter(y=>y!==void 0),p=(((i=u==null?void 0:u.getBandWidth)===null||i===void 0?void 0:i.call(u))||0)/2,v=(((a=f==null?void 0:f.getBandWidth)===null||a===void 0?void 0:a.call(f))||0)/2,g=Array.from(d,y=>{const m=y.length,b=new Array(m*2);for(let _=0;_<y.length;_++){const O=y[_];b[_]=r.map([+o[O]+p,+s[O]+v]),b[m+_]=r.map([+o[O]+p,+c[O]+v])}return b});return[h,g,d]};HE.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:WE,channels:[...ri({shapes:Object.keys(WE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...gr(),{type:Gg},{type:zl},{type:Zg}],postInference:[...Or(),...xc()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const YE=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;if(r)return[t,e];const[i]=cn(n,"y");return[t,Nt({},e,{encode:{y1:Dn([...i])}})]};YE.props={};const VE=()=>(t,e)=>{const{encode:n}=e,{x1:r}=n;if(r)return[t,e];const[i]=cn(n,"x");return[t,Nt({},e,{encode:{x1:Dn([...i])}})]};VE.props={};var $E=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Qg=(t,e)=>{const{arrow:n=!0,arrowSize:r="40%"}=t,i=$E(t,["arrow","arrowSize"]),{document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=$E(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=zi();if(v.moveTo(...h),v.lineTo(...p),n){const[g,y]=xW(h,p,{arrowSize:r});v.moveTo(...p),v.lineTo(...g),v.moveTo(...p),v.lineTo(...y)}return Ne(a.createElement("path",{})).call(Ee,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Ee,i).node()}};Qg.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const XE=(t,e)=>{const{arrow:n=!1}=t;return(...r)=>Qg(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};XE.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var UE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const qE=(t,e)=>{const n=UE(t,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=UE(s,["color"]),{color:u=c,transform:f}=o,[d,h]=a,p=zi();if(p.moveTo(d[0],d[1]),Nn(r)){const v=r.getCenter();p.quadraticCurveTo(v[0],v[1],h[0],h[1])}else{const v=LO(d,h),g=Qn(d,h)/2;Pl(p,d,h,v,g)}return Ne(i.createElement("path",{})).call(Ee,l).style("d",p.toString()).style("stroke",u).style("transform",f).call(Ee,n).node()}};qE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var ZE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const KE=(t,e)=>{const n=ZE(t,[]),{document:r}=e;return(i,a,o)=>{const{color:s}=o,c=ZE(o,["color"]),{color:l=s,transform:u}=a,[f,d]=i,h=zi();return h.moveTo(f[0],f[1]),h.bezierCurveTo(f[0]/2+d[0]/2,f[1],f[0]/2+d[0]/2,d[1],d[0],d[1]),Ne(r.createElement("path",{})).call(Ee,c).style("d",h.toString()).style("stroke",l).style("transform",u).call(Ee,n).node()}};KE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var QE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function SU(t,e,n,r){const i=zi();if(Nn(n)){const a=n.getCenter(),o=Qn(t,a),c=(Qn(e,a)-o)*r+o;return i.moveTo(t[0],t[1]),Pl(i,t,e,a,c),i.lineTo(e[0],e[1]),i}return Gn(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1]),i.lineTo(e[0],e[1]),i):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],e[1]),i)}const JE=(t,e)=>{const{cornerRatio:n=1/3}=t,r=QE(t,["cornerRatio"]),{coordinate:i,document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=QE(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=SU(h,p,i,n);return Ne(a.createElement("path",{})).call(Ee,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Ee,r).node()}};JE.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const tA={link:XE,arc:qE,smooth:KE,vhv:JE},Jg=t=>(e,n,r,i)=>{const{x:a,y:o,x1:s=a,y1:c=o}=r,l=gs(n,r,t),u=e.map(f=>[i.map(l([+a[f],+o[f]],f)),i.map(l([+s[f],+c[f]],f))]);return[e,u]};Jg.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:tA,channels:[...ri({shapes:Object.keys(tA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr(),{type:YE},{type:VE}],postInference:[...Or(),..._o()]};var MU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const eA=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=MU(o,["color"]),{color:l=s,src:u="",size:f=32,transform:d=""}=a;let{width:h=f,height:p=f}=t;const[[v,g]]=i,[y,m]=n.getSize();h=typeof h=="string"?Xd(h)*y:h,p=typeof p=="string"?Xd(p)*m:p;const b=v-Number(h)/2,_=g-Number(p)/2;return Ne(r.createElement("image",{})).call(Ee,c).style("x",b).style("y",_).style("img",u).style("stroke",l).style("transform",d).call(Ee,t).style("width",h).style("height",p).node()}};eA.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nA={image:eA},rA=t=>{const{cartesian:e}=t;return e?Lg:(n,r,i,a)=>{const{x:o,y:s}=i,c=gs(r,i,t),l=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(c(f,u))]});return[n,l]}};rA.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:nA,channels:[...ri({shapes:Object.keys(nA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...gr(),{type:Qd},{type:Jd}],postInference:[...Or(),..._o()]};var EU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function AU(t,e){const n=zi();if(Nn(e)){const r=e.getCenter(),i=[...t,t[0]],a=i.map(o=>Qn(o,r));return i.forEach((o,s)=>{if(s===0){n.moveTo(o[0],o[1]);return}const c=a[s],l=t[s-1],u=a[s-1];u!==void 0&&Math.abs(c-u)<1e-10?Pl(n,l,o,r,c):n.lineTo(o[0],o[1])}),n.closePath(),n}return bW(n,t)}const iA=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=EU(o,["color"]),{color:l=s,transform:u}=a,f=AU(i,n);return Ne(r.createElement("path",{})).call(Ee,c).style("d",f.toString()).style("stroke",l).style("fill",l).style("transform",u).call(Ee,t).node()}};iA.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var aA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function TU(t,e){const[n,r,i,a]=t,o=zi();if(Nn(e)){const s=e.getCenter(),c=Qn(s,n);return o.moveTo(n[0],n[1]),o.quadraticCurveTo(s[0],s[1],i[0],i[1]),Pl(o,i,a,s,c),o.quadraticCurveTo(s[0],s[1],r[0],r[1]),Pl(o,r,n,s,c),o.closePath(),o}return o.moveTo(n[0],n[1]),o.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(n[0],n[1]),o.closePath(),o}const oA=(t,e)=>{const n=aA(t,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=aA(s,["color"]),{color:u=c,transform:f}=o,d=TU(a,r);return Ne(i.createElement("path",{})).call(Ee,l).style("d",d.toString()).style("fill",u||c).style("stroke",u||c).style("transform",f).call(Ee,n).node()}};oA.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const sA={polygon:iA,ribbon:oA},cA=()=>(t,e,n,r)=>{const i=Object.entries(n).filter(([s])=>s.startsWith("x")).map(([,s])=>s),a=Object.entries(n).filter(([s])=>s.startsWith("y")).map(([,s])=>s),o=t.map(s=>{const c=[];for(let l=0;l<i.length;l++){const u=i[l][s];if(u===void 0)break;const f=a[l][s];c.push(r.map([+u,+f]))}return c});return[t,o]};cA.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:sA,channels:[...ri({shapes:Object.keys(sA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr()],postInference:[...Or(),..._o()]};var PU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function CU(t,e){const n=zi();if(!Nn(e))n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);else{const r=e.getCenter(),[i,a]=r,o=Bi(fr(t[0],r)),s=Bi(fr(t[1],r)),c=Qn(r,t[2]),l=Qn(r,t[3]),u=Qn(r,t[8]),f=Qn(r,t[10]),d=Qn(r,t[11]);n.moveTo(...t[0]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,a,l,o,s),n.lineTo(...t[6]),n.arc(i,a,f,s,o,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,a,u,o,s),n.arc(i,a,u,s,o,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,a,d,o,s),n.arc(i,a,d,s,o,!0)}return n}const lA=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s,transform:c}=a,{color:l,fill:u=l,stroke:f=l}=o,d=PU(o,["color","fill","stroke"]),h=CU(i,n);return Ne(r.createElement("path",{})).call(Ee,d).style("d",h.toString()).style("stroke",f).style("fill",s||u).style("transform",c).call(Ee,t).node()}};lA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var kU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function RU(t,e,n=4){const r=zi();if(!Nn(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,Math.PI*2),r.closePath(),r;const i=e.getCenter(),[a,o]=i,s=Qn(i,t[3]),c=Qn(i,t[8]),l=Qn(i,t[10]),u=Bi(fr(t[2],i)),f=Math.asin(n/c),d=u-f,h=u+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.arc(a,o,s,d,h),r.lineTo(Math.cos(h)*l+a,Math.sin(h)*l+o),r.arc(a,o,l,h,d,!0),r.lineTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);const p=(d+h)/2;return r.moveTo(Math.cos(p)*(c+n/2)+a,Math.sin(p)*(c+n/2)+o),r.arc(Math.cos(p)*c+a,Math.sin(p)*c+o,n/2,p,Math.PI*2+p),r.closePath(),r}const uA=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s,transform:c}=a,l=4,{color:u,fill:f=u,stroke:d=u}=o,h=kU(o,["color","fill","stroke"]),p=RU(i,n,l);return Ne(r.createElement("path",{})).call(Ee,h).style("d",p.toString()).style("stroke",d).style("fill",s||f).style("transform",c).call(Ee,t).node()}};uA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const fA={box:lA,violin:uA},dA=()=>(t,e,n,r)=>{const{x:i,y:a,y1:o,y2:s,y3:c,y4:l,series:u}=n,f=e.x,d=e.series,h=Array.from(t,p=>{const v=f.getBandWidth(f.invert(+i[p])),g=d?d.getBandWidth(d.invert(+(u==null?void 0:u[p]))):1,y=v*g,m=(+(u==null?void 0:u[p])||0)*v,b=+i[p]+m+y/2,[_,O,w,M,E]=[+a[p],+o[p],+s[p],+c[p],+l[p]];return[[b-y/2,E],[b+y/2,E],[b,E],[b,M],[b-y/2,M],[b+y/2,M],[b+y/2,O],[b-y/2,O],[b-y/2,w],[b+y/2,w],[b,O],[b,_],[b-y/2,_],[b+y/2,_]].map(P=>r.map(P))});return[t,h]};dA.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:fA,channels:[...ri({shapes:Object.keys(fA)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...gr(),{type:hs}],postInference:[...Or(),...xc()],interaction:{shareTooltip:!0}};const hA={vector:Qg},pA=()=>(t,e,n,r)=>{const{x:i,y:a,size:o,rotate:s}=n,[c,l]=r.getSize(),u=t.map(f=>{const d=+s[f]/180*Math.PI,h=+o[f],p=h/c,v=h/l,g=p*Math.cos(d),y=-v*Math.sin(d);return[r.map([+i[f]-g/2,+a[f]-y/2]),r.map([+i[f]+g/2,+a[f]+y/2])]});return[t,u]};pA.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:hA,channels:[...ri({shapes:Object.keys(hA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...gr()],postInference:[...Or(),..._o()]};var vA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function LU(t,e,n){return t.createElement("path",{style:Object.assign({path:`M ${e},${e} L -${e},0 L ${e},-${e} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},n)})}function NU(t,e){if(!Nn(e))return yo().x(r=>r[0]).y(r=>r[1])(t);const n=e.getCenter();return Gd()({startAngle:0,endAngle:Math.PI*2,outerRadius:Qn(t[0],n),innerRadius:Qn(t[1],n)})}function IU(t,e){if(!Nn(t))return e;const[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}const ty=(t,e)=>{const{arrow:n,arrowSize:r=4}=t,i=vA(t,["arrow","arrowSize"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,lineWidth:f}=l,d=vA(l,["color","lineWidth"]),{color:h=u,size:p=f}=c,v=n?LU(o,r,Object.assign({fill:i.stroke||h,stroke:i.stroke||h},se(i,"arrow"))):null,g=NU(s,a),y=IU(a,c.transform);return Ne(o.createElement("path",{})).call(Ee,d).style("d",g).style("stroke",h).style("lineWidth",p).style("transform",y).style("markerEnd",v).call(Ee,i).node()}};ty.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const gA=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(Bl)?[t,e]:[t,Nt({},e,{encode:{x:Dn(n)}})]};gA.props={};const yA={line:ty},mA=t=>(e,n,r,i)=>{const{x:a}=r,o=gs(n,r,Nt({style:{bandOffset:0}},t)),s=Array.from(e,c=>{const l=[a[c],1],u=[a[c],0];return[l,u].map(f=>i.map(o(f,c)))});return[e,s]};mA.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:yA,channels:[..._c({shapes:Object.keys(yA)}),{name:"x",required:!0}],preInference:[...gr(),{type:gA}],postInference:[...Or()]};const bA=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(Bl)?[t,e]:[t,Nt({},e,{encode:{y:Dn(n)}})]};bA.props={};const xA={line:ty},_A=t=>(e,n,r,i)=>{const{y:a}=r,o=gs(n,r,Nt({style:{bandOffset:0}},t)),s=Array.from(e,c=>{const l=[0,a[c]],u=[1,a[c]];return[l,u].map(f=>i.map(o(f,c)))});return[e,s]};_A.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:xA,channels:[..._c({shapes:Object.keys(xA)}),{name:"y",required:!0}],preInference:[...gr(),{type:bA}],postInference:[...Or()]};var OA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function jU(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}function DU(t){return yo().x(e=>e[0]).y(e=>e[1])(t)}function FU(t,e,n,r,i=0){const[[a,o],[s,c]]=e;if(Gn(t)){const d=a+n,h=s+r,p=d+i;return[[d,o],[p,o],[p,c],[h,c]]}const l=o-n,u=c-r,f=l-i;return[[a,l],[a,f],[s,f],[s,u]]}const wA=(t,e)=>{const{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:a,endMarker:o=!0}=t,s=OA(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:c}=e;return(l,u,f)=>{const{color:d,connectLength1:h}=f,p=OA(f,["color","connectLength1"]),{color:v,transform:g}=u,y=FU(c,l,r,i,a!=null?a:h),m=se(Object.assign(Object.assign({},s),f),"endMarker");return Ne(new ni).call(Ee,p).style("path",DU(y)).style("stroke",v||d).style("transform",g).style("markerEnd",o?new kn({className:"marker",style:Object.assign(Object.assign({},m),{symbol:jU})}):null).call(Ee,s).node()}};wA.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const SA={connector:wA},MA=(...t)=>Jg(...t);MA.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:SA,channels:[..._c({shapes:Object.keys(SA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr()],postInference:[...Or()]};function EA(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[`${t}1`]:a}=n;return o=>{var s;const c=((s=r.getBandWidth)===null||s===void 0?void 0:s.call(r,r.invert(+a[o])))||0;return[i[o],a[o]+c]}}function ey(t={}){const{extendX:e=!1,extendY:n=!1}=t;return(r,i,a,o)=>{const s=EA("x",e,a,i.x),c=EA("y",n,a,i.y),l=Array.from(r,u=>{const[f,d]=s(u),[h,p]=c(u);return[[f,h],[d,h],[d,p],[f,p]].map(b=>o.map(b))});return[r,l]}}const AA={range:vs},TA=()=>ey();TA.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:AA,channels:[..._c({shapes:Object.keys(AA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr()],postInference:[...Or()]};const PA=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(Bl))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,Nt({},e,{encode:{x:Dn(r(n,0)),x1:Dn(r(n,1))}})]}return[t,e]};PA.props={};const CA={range:vs},kA=()=>ey({extendY:!0});kA.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:CA,channels:[..._c({shapes:Object.keys(CA)}),{name:"x",required:!0}],preInference:[...gr(),{type:PA}],postInference:[...Or()]};const RA=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(Bl))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,Nt({},e,{encode:{y:Dn(r(n,0)),y1:Dn(r(n,1))}})]}return[t,e]};RA.props={};const LA={range:vs},NA=()=>ey({extendX:!0});NA.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:LA,channels:[..._c({shapes:Object.keys(LA)}),{name:"y",required:!0}],preInference:[...gr(),{type:RA}],postInference:[...Or()]};var IA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const ny=(t,e)=>{const{arrow:n,colorAttribute:r}=t,i=IA(t,["arrow","colorAttribute"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,stroke:f}=l,d=IA(l,["color","stroke"]),{d:h,color:p=u}=c,[v,g]=a.getSize();return Ne(o.createElement("path",{})).call(Ee,d).style("d",typeof h=="function"?h({width:v,height:g}):h).style(r,p).call(Ee,i).node()}};ny.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const jA=(t,e)=>ny(Object.assign({colorAttribute:"fill"},t),e);jA.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const DA=(t,e)=>ny(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);DA.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const FA={path:jA,hollow:DA},BA=t=>(e,n,r,i)=>[e,e.map(()=>[[0,0]])];BA.props={defaultShape:"path",defaultLabelShape:"label",shape:FA,composite:!1,channels:[...ri({shapes:Object.keys(FA)}),{name:"d",scale:"identity"}],preInference:[...gr()],postInference:[...Or()]};var BU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const zA=(t,e)=>{const{render:n}=t,r=BU(t,["render"]);return i=>{const[[a,o]]=i;return n(Object.assign(Object.assign({},r),{x:a,y:o}),e)}};zA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const GA=()=>(t,e)=>{const{style:n={}}=e;return[t,Nt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,r])=>typeof r=="function").map(([r,i])=>[r,()=>i])))})]};GA.props={};const zU={shape:zA},WA=t=>{const{cartesian:e}=t;return e?Lg:(n,r,i,a)=>{const{x:o,y:s}=i,c=gs(r,i,t),l=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(c(f,u))]});return[n,l]}};WA.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:zU,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr(),{type:Qd},{type:Jd},{type:GA}]};var GU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const HA=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{transform:o}=i,{color:s}=a,c=GU(a,["color"]),{color:l=s}=i,[u,...f]=r,d=zi();return d.moveTo(...u),f.forEach(([h,p])=>{d.lineTo(h,p)}),d.closePath(),Ne(n.createElement("path",{})).call(Ee,c).style("d",d.toString()).style("stroke",l||s).style("fill",l||s).style("fillOpacity",.4).style("transform",o).call(Ee,t).node()}};HA.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const YA={density:HA},VA=()=>(t,e,n,r)=>{const{x:i,series:a}=n,o=Object.entries(n).filter(([f])=>f.startsWith("y")).map(([,f])=>f),s=Object.entries(n).filter(([f])=>f.startsWith("size")).map(([,f])=>f);if(i===void 0||o===void 0||s===void 0)throw new Error("Missing encode for x or y or size channel.");const c=e.x,l=e.series,u=Array.from(t,f=>{const d=c.getBandWidth(c.invert(+i[f])),h=l?l.getBandWidth(l.invert(+(a==null?void 0:a[f]))):1,p=d*h,v=(+(a==null?void 0:a[f])||0)*d,g=+i[f]+v+p/2;return[...o.map((m,b)=>[g+ +s[b][f]/t.length,+o[b][f]]),...o.map((m,b)=>[g-+s[b][f]/t.length,+o[b][f]]).reverse()].map(m=>r.map(m))});return[t,u]};VA.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:YA,channels:[...ri({shapes:Object.keys(YA)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...gr(),{type:zl},{type:hs}],postInference:[...Or(),...xc()],interaction:{shareTooltip:!0}};const Fpt=_v(3);function WU(t,e=(...r)=>`${r[0]}`,n=16){const r=_v(n);return(...i)=>{const a=e(...i);let o=r.get(a);return r.has(a)?r.get(a):(o=t(...i),r.set(a,o),o)}}function HU(t){return typeof t=="string"?t.split(" ").map(e=>{const[n,r]=e.split(":");return[+n,r]}):t}function th(t,e,n){const r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}const YU=WU((t,e,n)=>{const r=th(n,t*2,t*2),i=r.getContext("2d"),a=t,o=t;if(e===1)i.beginPath(),i.arc(a,o,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{const s=i.createRadialGradient(a,o,t*e,a,o,t);s.addColorStop(0,"rgba(0,0,0,1)"),s.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=s,i.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);function VU(t,e){const r=th(e,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return HU(t).forEach(([a,o])=>{i.addColorStop(a,o)}),r.fillStyle=i,r.fillRect(0,0,256,1),r.getImageData(0,0,256,1).data}function $U(t,e,n,r,i,a){const{blur:o}=i;let s=r.length;for(;s--;){const{x:c,y:l,value:u,radius:f}=r[s],d=Math.min(u,n),h=c-f,p=l-f,v=YU(f,1-o,a),g=(d-e)/(n-e);t.globalAlpha=Math.max(g,.001),t.drawImage(v,h,p)}return t}function XU(t,e,n,r,i){const{minOpacity:a,opacity:o,maxOpacity:s,useGradientOpacity:c}=i,l=0,u=0,f=e,d=n,h=t.getImageData(l,u,f,d),p=h.data,v=p.length;for(let g=3;g<v;g+=4){const y=p[g],m=y*4;if(!m)continue;const b=o||Math.max(0,Math.min(s,Math.max(a,y)));p[g-3]=r[m],p[g-2]=r[m+1],p[g-1]=r[m+2],p[g]=c?r[m+3]:b}return h}function UU(t,e,n,r,i,a,o){const s=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},a);s.minOpacity*=255,s.opacity*=255,s.maxOpacity*=255;const l=th(o,t,e).getContext("2d"),u=VU(s.gradient,o);l.clearRect(0,0,t,e),$U(l,n,r,i,s,o);const f=XU(l,t,e,u,s),h=th(o,t,e).getContext("2d");return h.putImageData(f,0,0),h}var qU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ZU(t,e){return Object.keys(t).reduce((n,r)=>{const i=t[r];return e(i,r)||(n[r]=i),n},{})}const $A=(t,e)=>{const{gradient:n,opacity:r,maxOpacity:i,minOpacity:a,blur:o,useGradientOpacity:s}=t,c=qU(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:l,createCanvas:u,document:f}=e;return(d,h,p)=>{const{transform:v}=h,[g,y]=l.getSize(),m=d.map(M=>({x:M[0],y:M[1],value:M[2],radius:M[3]})),b=Mi(d,M=>M[2]),_=Mn(d,M=>M[2]),w=g&&y?UU(g,y,b,_,m,ZU({gradient:n,opacity:r,minOpacity:a,maxOpacity:i,blur:o,useGradientOpacity:s},M=>M===void 0),u):{canvas:null};return Ne(f.createElement("image",{})).call(Ee,p).style("x",0).style("y",0).style("width",g).style("height",y).style("src",w.canvas).style("transform",v).call(Ee,c).node()}};$A.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const XA={heatmap:$A},UA=t=>(e,n,r,i)=>{const{x:a,y:o,size:s,color:c}=r,l=Array.from(e,u=>{const f=s?+s[u]:40;return[...i.map([+a[u],+o[u]]),c[u],f]});return[[0],[l]]};UA.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:XA,channels:[...ri({shapes:Object.keys(XA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...gr(),{type:hs},{type:Kd}],postInference:[...Or(),..._o()]};const qA=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];qA.props={};const ZA=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];ZA.props={};const KA=t=>new Vr(t);KA.props={};const eh=Symbol("defaultUnknown");function QA(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function JA(t){const{value:e,from:n,to:r,mapper:i,notFoundReturn:a}=t;let o=i.get(e);if(o===void 0){if(a!==eh)return a;o=n.push(e)-1,i.set(e,o)}return r[o%r.length]}function tT(t){return t instanceof Date?e=>`${e}`:typeof t=="object"?e=>JSON.stringify(e):e=>e}class nh extends wl{getDefaultOptions(){return{domain:[],range:[],unknown:eh}}constructor(e){super(e)}map(e){return this.domainIndexMap.size===0&&QA(this.domainIndexMap,this.getDomain(),this.domainKey),JA({value:this.domainKey(e),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(e){return this.rangeIndexMap.size===0&&QA(this.rangeIndexMap,this.getRange(),this.rangeKey),JA({value:this.rangeKey(e),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(e){const[n]=this.options.domain,[r]=this.options.range;if(this.domainKey=tT(n),this.rangeKey=tT(r),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!e||e.range)&&this.rangeIndexMap.clear(),(!e||e.domain||e.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new nh(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:e,compare:n}=this.options;return this.sortedDomain=n?[...e].sort(n):e,this.sortedDomain}}const eT=t=>new nh(t);eT.props={};function nT({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function KU({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function QU({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function JU(t){return typeof t=="object"?t.valueOf():t}class rT extends Map{constructor(e){if(super(),this.map=new Map,this.initKey=JU,e!==null)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(nT({map:this.map,initKey:this.initKey},e))}has(e){return super.has(nT({map:this.map,initKey:this.initKey},e))}set(e,n){return super.set(KU({map:this.map,initKey:this.initKey},e),n)}delete(e){return super.delete(QU({map:this.map,initKey:this.initKey},e))}}function tq(t){const e=Math.min(...t);return t.map(n=>n/e)}function eq(t,e){const n=t.length,r=e-n;return r>0?[...t,...new Array(r).fill(1)]:r<0?t.slice(0,e):t}function nq(t){return Math.round(t*1e12)/1e12}function rq(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t,c=e.length,l=eq(a,c),[u,f]=n,d=f-u,h=2/c*r+1-1/c*i,p=d/h,v=p*i/c,g=p-c*v,y=tq(l),m=y.reduce((D,N)=>D+N),b=g/m,_=new rT(e.map((D,N)=>{const k=y[N]*b;return[D,o?Math.floor(k):k]})),O=new rT(e.map((D,N)=>{const R=y[N]*b+v;return[D,o?Math.floor(R):R]})),w=Array.from(O.values()).reduce((D,N)=>D+N),E=(d-(w-w/c*i))*s,A=u+E;let P=o?Math.round(A):A;const C=new Array(c);for(let D=0;D<c;D+=1){C[D]=nq(P);const N=e[D];P+=O.get(N)}return{valueBandWidth:_,valueStep:O,adjustedRange:C}}function iq(t){var e;const{domain:n}=t,r=n.length;if(r===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((e=t.flex)===null||e===void 0)&&e.length))return rq(t);const{range:a,paddingOuter:o,paddingInner:s,round:c,align:l}=t;let u,f,d=a[0];const p=a[1]-d,v=o*2,g=r-s;u=p/Math.max(1,v+g),c&&(u=Math.floor(u)),d+=(p-u*(r-s))*l,f=u*(1-s),c&&(d=Math.round(d),f=Math.round(f));const y=new Array(r).fill(0).map((m,b)=>d+b*u);return{valueStep:u,valueBandWidth:f,adjustedRange:y}}class Oo extends nh{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:eh,flex:[]}}constructor(e){super(e)}clone(){return new Oo(this.options)}getStep(e){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:e===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(e)}getBandWidth(e){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:e===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(e)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:e,paddingInner:n}=this.options;return e>0?e:n}getPaddingOuter(){const{padding:e,paddingOuter:n}=this.options;return e>0?e:n}rescale(){super.rescale();const{align:e,domain:n,range:r,round:i,flex:a}=this.options,{adjustedRange:o,valueBandWidth:s,valueStep:c}=iq({align:e,range:r,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:n});this.valueStep=c,this.valueBandWidth=s,this.adjustedRange=o}}const iT=t=>new Oo(t);iT.props={};class rh extends wl{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Dv}}map(e){return ld(e)?e:this.options.unknown}invert(e){return this.map(e)}clone(){return new rh(this.options)}getTicks(){const{domain:e,tickCount:n,tickMethod:r}=this.options,[i,a]=e;return!Js(i)||!Js(a)?[]:r(i,a,n)}}const aT=t=>new rh(t);aT.props={};class ry extends Oo{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:eh,paddingInner:1,paddingOuter:0}}constructor(e){super(e)}getPaddingInner(){return 1}clone(){return new ry(this.options)}update(e){super.update(e)}getPaddingOuter(){return this.options.padding}}const oT=t=>new ry(t);oT.props={};var sT=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,wo="\\d\\d?",So="\\d\\d",aq="\\d{3}",oq="\\d{4}",Vl="[^\\s]+",cT=/\[([^]*?)\]/gm;function lT(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var uT=function(t){return function(e,n){var r=n[t].map(function(a){return a.toLowerCase()}),i=r.indexOf(e.toLowerCase());return i>-1?i:null}};function ys(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];for(var o in a)t[o]=a[o]}return t}var fT=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dT=["January","February","March","April","May","June","July","August","September","October","November","December"],sq=lT(dT,3),cq=lT(fT,3),hT={dayNamesShort:cq,dayNames:fT,monthNamesShort:sq,monthNames:dT,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},ih=ys({},hT),lq=function(t){return ih=ys(ih,t)},pT=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},gi=function(t,e){for(e===void 0&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},uq={D:function(t){return String(t.getDate())},DD:function(t){return gi(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return gi(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return gi(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return gi(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return gi(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return gi(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return gi(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return gi(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return gi(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return gi(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return gi(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+gi(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+gi(Math.floor(Math.abs(e)/60),2)+":"+gi(Math.abs(e)%60,2)}},vT=function(t){return+t-1},gT=[null,wo],yT=[null,Vl],mT=["isPm",Vl,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],bT=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var n=+e[1]*60+parseInt(e[2],10);return e[0]==="+"?n:-n}return 0}],fq={D:["day",wo],DD:["day",So],Do:["day",wo+Vl,function(t){return parseInt(t,10)}],M:["month",wo,vT],MM:["month",So,vT],YY:["year",So,function(t){var e=new Date,n=+(""+e.getFullYear()).substr(0,2);return+(""+(+t>68?n-1:n)+t)}],h:["hour",wo,void 0,"isPm"],hh:["hour",So,void 0,"isPm"],H:["hour",wo],HH:["hour",So],m:["minute",wo],mm:["minute",So],s:["second",wo],ss:["second",So],YYYY:["year",oq],S:["millisecond","\\d",function(t){return+t*100}],SS:["millisecond",So,function(t){return+t*10}],SSS:["millisecond",aq],d:gT,dd:gT,ddd:yT,dddd:yT,MMM:["month",Vl,uT("monthNamesShort")],MMMM:["month",Vl,uT("monthNames")],a:mT,A:mT,ZZ:bT,Z:bT},ah={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},dq=function(t){return ys(ah,t)},xT=function(t,e,n){if(e===void 0&&(e=ah.default),n===void 0&&(n={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");e=ah[e]||e;var r=[];e=e.replace(cT,function(a,o){return r.push(o),"@@@"});var i=ys(ys({},ih),n);return e=e.replace(sT,function(a){return uq[a](t,i)}),e.replace(/@@@/g,function(){return r.shift()})};function hq(t,e,n){if(n===void 0&&(n={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=ah[e]||e,t.length>1e3)return null;var r=new Date,i={year:r.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},a=[],o=[],s=e.replace(cT,function(_,O){return o.push(pT(O)),"@@@"}),c={},l={};s=pT(s).replace(sT,function(_){var O=fq[_],w=O[0],M=O[1],E=O[3];if(c[w])throw new Error("Invalid format. "+w+" specified twice in format");return c[w]=!0,E&&(l[E]=!0),a.push(O),"("+M+")"}),Object.keys(l).forEach(function(_){if(!c[_])throw new Error("Invalid format. "+_+" is required in specified format")}),s=s.replace(/@@@/g,function(){return o.shift()});var u=t.match(new RegExp(s,"i"));if(!u)return null;for(var f=ys(ys({},ih),n),d=1;d<u.length;d++){var h=a[d-1],p=h[0],v=h[2],g=v?v(u[d],f):+u[d];if(g==null)return null;i[p]=g}i.isPm===1&&i.hour!=null&&+i.hour!=12?i.hour=+i.hour+12:i.isPm===0&&+i.hour==12&&(i.hour=0);var y;if(i.timezoneOffset==null){y=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var m=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],d=0,b=m.length;d<b;d++)if(c[m[d][0]]&&i[m[d][0]]!==y[m[d][1]]())return null}else if(y=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return y}var Bpt={format:xT,parse:hq,defaultI18n:hT,setGlobalDateI18n:lq,setGlobalDateMasks:dq},zpt=null;const $l=1e3,Xl=$l*60,Ul=Xl*60,ms=Ul*24,ql=ms*7,_T=ms*30,OT=ms*365;function qr(t,e,n,r){const i=(l,u)=>{const f=h=>r(h)%u===0;let d=u;for(;d&&!f(l);)n(l,-1),d-=1;return l},a=(l,u)=>{u&&i(l,u),e(l)},o=(l,u)=>{const f=new Date(+l);return a(f,u),f},s=(l,u)=>{const f=new Date(+l-1);return a(f,u),n(f,u),a(f),f};return{ceil:s,floor:o,range:(l,u,f,d)=>{const h=[],p=Math.floor(f),v=d?s(l,f):s(l);for(let g=v;g<u;n(g,p),a(g))h.push(new Date(+g));return h},duration:t}}const pq=qr(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),vq=qr($l,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+$l*e)},t=>t.getSeconds()),gq=qr(Xl,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Xl*e)},t=>t.getMinutes()),yq=qr(Ul,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Ul*e)},t=>t.getHours()),mq=qr(ms,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ms*e)},t=>t.getDate()-1),wT=qr(_T,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),bq=qr(ql,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{const e=wT.floor(t),n=new Date(+t);return Math.floor((+n-+e)/ql)}),xq=qr(OT,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear()),ST={millisecond:pq,second:vq,minute:gq,hour:yq,day:mq,week:bq,month:wT,year:xq},_q=qr(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Oq=qr($l,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+$l*e)},t=>t.getUTCSeconds()),wq=qr(Xl,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Xl*e)},t=>t.getUTCMinutes()),Sq=qr(Ul,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Ul*e)},t=>t.getUTCHours()),Mq=qr(ms,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ms*e)},t=>t.getUTCDate()-1),MT=qr(_T,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),Eq=qr(ql,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ql*e)},t=>{const e=MT.floor(t),n=new Date(+t);return Math.floor((+n-+e)/ql)}),Aq=qr(OT,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear()),ET={millisecond:_q,second:Oq,minute:wq,hour:Sq,day:Mq,week:Eq,month:MT,year:Aq};function Tq(t){const e=t?ET:ST,{year:n,month:r,week:i,day:a,hour:o,minute:s,second:c,millisecond:l}=e;return{tickIntervals:[[c,1],[c,5],[c,15],[c,30],[s,1],[s,5],[s,15],[s,30],[o,1],[o,3],[o,6],[o,12],[a,1],[a,2],[i,1],[r,1],[r,3],[n,1]],year:n,millisecond:l}}function AT(t,e,n,r,i){const a=+t,o=+e,{tickIntervals:s,year:c,millisecond:l}=Tq(i),u=([g,y])=>g.duration*y,f=r?(o-a)/r:n||5,d=r||(o-a)/f,h=s.length,p=Cv(s,d,0,h,u);let v;if(p===h){const g=Z2(a/c.duration,o/c.duration,f);v=[c,g]}else if(p){const g=d/u(s[p-1])<u(s[p])/d,[y,m]=g?s[p-1]:s[p],b=r?Math.ceil(r/y.duration):m;v=[y,b]}else{const g=Math.max(Z2(a,o,f),1);v=[l,g]}return v}const Pq=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=AT(o,s,n,r,i),u=c.range(o,new Date(+s+1),l,!0);return a?u.reverse():u},Cq=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=AT(o,s,n,r,i),u=[c.floor(o,l),c.ceil(s,l)];return a?u.reverse():u};function kq(t,e){const{second:n,minute:r,hour:i,day:a,week:o,month:s,year:c}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":a.floor(t)<t?"hh A":s.floor(t)<t?o.floor(t)<t?"MMM DD":"ddd DD":c.floor(t)<t?"MMMM":"YYYY"}function Rq(t){const e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class iy extends fd{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:Pq,interpolate:ec,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return Cq}getTickMethodOptions(){const{domain:e,tickCount:n,tickInterval:r,utc:i}=this.options,a=e[0],o=e[e.length-1];return[a,o,n,r,i]}getFormatter(){const{mask:e,utc:n}=this.options,r=n?ET:ST,i=n?Rq:is;return a=>xT(i(a),e||kq(a,r))}clone(){return new iy(this.options)}}const TT=t=>new iy(t);TT.props={};const PT=t=>e=>-t(-e),ay=(t,e)=>{const n=Math.log(t),r=t===Math.E?Math.log:t===10?Math.log10:t===2?Math.log2:i=>Math.log(i)/n;return e?PT(r):r},oy=(t,e)=>{const n=t===Math.E?Math.exp:r=>wr(t,r);return e?PT(n):n},Lq=(t,e,n,r=10)=>{const i=t<0,a=oy(r,i),o=ay(r,i),s=e<t,c=s?e:t,l=s?t:e;let u=o(c),f=o(l),d=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){const h=a(u);for(let p=r-1;p>=1;p-=1){const v=h*p;if(v>l)break;v>=c&&d.push(v)}}else for(;u<=f;u+=1){const h=a(u);for(let p=1;p<r;p+=1){const v=h*p;if(v>l)break;v>=c&&d.push(v)}}d.length*2<n&&(d=as(c,l,n))}else{const h=n===-1?f-u:Math.min(f-u,n);d=as(u,f,h).map(a)}return s?d.reverse():d},Nq=(t,e,n,r)=>{const i=t<0,a=ay(r,i),o=oy(r,i),s=t>e,c=s?e:t,l=s?t:e,u=[o(Math.floor(a(c))),o(Math.ceil(a(l)))];return s?u.reverse():u};class sy extends fd{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Sl,tickMethod:Lq,tickCount:5}}chooseNice(){return Nq}getTickMethodOptions(){const{domain:e,tickCount:n,base:r}=this.options,i=e[0],a=e[e.length-1];return[i,a,n,r]}chooseTransforms(){const{base:e,domain:n}=this.options,r=n[0]<0;return[ay(e,r),oy(e,r)]}clone(){return new sy(this.options)}}const CT=t=>new sy(t);CT.props={};const Iq=t=>e=>e<0?-wr(-e,t):wr(e,t),jq=t=>e=>e<0?-wr(-e,1/t):wr(e,1/t),Dq=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class oh extends fd{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Sl,tickMethod:as,tickCount:5}}constructor(e){super(e)}chooseTransforms(){const{exponent:e}=this.options;if(e===1)return[is,is];const n=e===.5?Dq:Iq(e),r=jq(e);return[n,r]}clone(){return new oh(this.options)}}const kT=t=>new oh(t);kT.props={};class cy extends oh{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Sl,tickMethod:as,tickCount:5,exponent:.5}}constructor(e){super(e)}update(e){super.update(e)}clone(){return new cy(this.options)}}const RT=t=>new cy(t);RT.props={};const LT=t=>new nc(t);LT.props={};const NT=t=>new yd(t);NT.props={};const IT=t=>new gd(t);IT.props={};const Fq=t=>e=>{const n=t(e);return Js(n)?Math.round(n):n};function Bq(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();const[r]=this.chooseTransforms();this.composeOutput(r,this.chooseClamp(r))},n.prototype.initRange=function(){const{interpolator:r}=this.options;this.options.range=t(r)},n.prototype.composeOutput=function(r,i){const{domain:a,interpolator:o,round:s}=this.getOptions(),c=e(a.map(r)),l=s?Fq(o):o;this.output=tc(l,c,i,r)},n.prototype.invert=void 0}}var zq=function(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},ly;function Gq(t){return[t(0),t(1)]}const Wq=t=>{const[e,n]=t;return tc(ec(0,1),cd(e,n))};let uy=ly=class extends Vr{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:is,tickMethod:as,tickCount:5}}constructor(e){super(e)}clone(){return new ly(this.options)}};uy=ly=zq([Bq(Gq,Wq)],uy);const jT=t=>new uy(t);jT.props={};const DT=t=>new Al(t);DT.props={};function fy({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:i,padding1:a,padding2:o,padding3:s,alpha90:c,alpha65:l,alpha45:u,alpha25:f,alpha10:d,category10:h,category20:p,sizeDefault:v=1,padding:g="auto",margin:y=16}){return{padding:g,margin:y,size:v,color:t,category10:h,category20:p,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:i,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:e,gridStrokeOpacity:d,labelAlign:"horizontal",labelFill:e,labelOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:a,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:u,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:u,titleFill:e,titleOpacity:c,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:e,itemLabelFillOpacity:c,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[a,a],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:a,colPadding:o,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:u,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:3,tick:!0,tickLength:12,ribbonSize:12,ribbonFill:"#aaa",handle:!0,handleLabel:!1,handleShape:"slider",handleIconSize:12/1.8,indicator:!1,titleFontSize:12,titleSpacing:4,titleFontWeight:"normal",titleFillOpacity:c,tickStroke:e,tickStrokeOpacity:u},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:n,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[0,0,0,0],trackSize:6,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{spacing:8,titleFill:e,titleFillOpacity:c,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:l,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}}}const Hq=fy({colorBlack:"#1D2129",colorWhite:"#ffffff",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),dy=t=>Nt({},Hq,t);dy.props={};const FT=t=>Nt({},dy(),{category10:"category10",category20:"category20"},t);FT.props={};const Yq=fy({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"#141414",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.25}),BT=t=>Nt({},Yq,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{".g2-tooltip":{background:"#1f1f1f",opacity:.95},".g2-tooltip-title":{color:"#A6A6A6"},".g2-tooltip-list-item-name-label":{color:"#A6A6A6"},".g2-tooltip-list-item-value":{color:"#A6A6A6"}}}},t),zT=t=>Object.assign({},BT(),{category10:"category10",category20:"category20"},t);zT.props={};const Vq=fy({colorBlack:"#000",colorWhite:"#fff",colorStroke:"#888",colorDefault:"#4e79a7",colorBackground:"transparent",category10:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],category20:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),GT=t=>Nt({},Vq,{text:{text:{fontSize:10}},axis:{gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelOpacity:1,labelStrokeOpacity:1,labelFontSize:10,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickStrokeOpacity:1,titleOpacity:1,titleStrokeOpacity:1,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},axisLeft:{gridFilter:(e,n)=>n!==0},axisRight:{gridFilter:(e,n)=>n!==0},legendCategory:{itemLabelFillOpacity:1,itemLabelFontSize:10,itemValueFillOpacity:1,itemValueFontSize:10,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},legendContinuous:{handleLabelFontSize:10,labelFillOpacity:.45,labelFontSize:10},label:{fontSize:10},innerLabel:{fontSize:10},htmlLabel:{fontSize:10},slider:{handleLabelFontSize:10,trackFillOpacity:.05}},t);GT.props={};const WT=t=>(...e)=>{const n=po(Object.assign({},{crossPadding:50},t))(...e);return sO(n,t),n};WT.props=Object.assign(Object.assign({},po.props),{defaultPosition:"bottom"});function Ypt(){}const HT=t=>(...e)=>{const n=po(Object.assign({},{crossPadding:10},t))(...e);return sO(n,t),n};HT.props=Object.assign(Object.assign({},po.props),{defaultPosition:"left"});var hy=function(){},$q=function(t,e,n){var r=t,i=er(e)?e.split("."):e;return i.forEach(function(a,o){o<i.length-1?(Yo(r[a])||(r[a]=(0,xr.Z)(i[o+1])?[]:{}),r=r[a]):r[a]=n}),t};function Xq(t,e){return t.reduce(function(n,r){return(n[r[e]]=n[r[e]]||[]).push(r),n},{})}function Uq(t){var e;return((e=t[0])===null||e===void 0?void 0:e.map(function(n,r){return t.map(function(i){return i[r]})}))||[]}var Wi=ji({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),qq=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:TG(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(i,a){return"".concat(i,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return r.playState="idle",r.contentGroup=r.appendChild(new Dr({class:Wi.contentGroup.name})),r.playWindow=r.contentGroup.appendChild(new Dr({class:Wi.playWindow.name})),r.innerCurrPage=r.defaultPage,r}return Object.defineProperty(e.prototype,"defaultPage",{get:function(){var n=this.attributes.defaultPage;return(0,lr.Z)(n,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var n=this.pageViews,r=(0,S.CR)(Uq(n.map(function(f){var d=f.getBBox(),h=d.width,p=d.height;return[h,p]})).map(function(f){return Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(f),!1))}),2),i=r[0],a=r[1],o=this.attributes,s=o.pageWidth,c=s===void 0?i:s,l=o.pageHeight,u=l===void 0?a:l;return{pageWidth:c,pageHeight:u}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var n=t.prototype.getBBox.call(this),r=n.x,i=n.y,a=this.controllerShape,o=this.pageShape,s=o.pageWidth,c=o.pageHeight;return new Wn(r,i,s+a.width,c)},e.prototype.goTo=function(n){var r=this,i=this.attributes.animate,a=this,o=a.currPage,s=a.playState,c=a.playWindow,l=a.pageViews;if(s!=="idle"||n<0||l.length<=0||n>=l.length)return null;l[o].setLocalPosition(0,0),this.prepareFollowingPage(n);var u=(0,S.CR)(this.getFollowingPageDiff(n),2),f=u[0],d=u[1];this.playState="running";var h=e2(c,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-f,", ").concat(-d,")")}],i);return Zs(h,function(){r.innerCurrPage=n,r.playState="idle",r.setVisiblePages([n]),r.updatePageInfo()}),h},e.prototype.prev=function(){var n=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!n&&i<=0)return null;var a=n?(i-1+r)%r:(0,lr.Z)(i-1,0,r);return this.goTo(a)},e.prototype.next=function(){var n=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!n&&i>=r-1)return null;var a=n?(i+1)%r:(0,lr.Z)(i+1,0,r);return this.goTo(a)},e.prototype.renderClipPath=function(n){var r=this.pageShape,i=r.pageWidth,a=r.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=n.maybeAppendByClassName(Wi.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(r,i){n.includes(i)?gl(r):ho(r)})},e.prototype.adjustControllerLayout=function(){var n=this,r=n.prevBtnGroup,i=n.nextBtnGroup,a=n.pageInfoGroup,o=this.attributes,s=o.orientation,c=o.controllerPadding,l=a.getBBox(),u=l.width,f=l.height,d=(0,S.CR)(s==="horizontal"?[-180,0]:[-90,90],2),h=d[0],p=d[1];r.setLocalEulerAngles(h),i.setLocalEulerAngles(p);var v=r.getBBox(),g=v.width,y=v.height,m=i.getBBox(),b=m.width,_=m.height,O=Math.max(g,u,b),w=s==="horizontal"?{offset:[[0,0],[g/2+c,0],[g+u+c*2,0]],textAlign:"start"}:{offset:[[O/2,-y-c],[O/2,0],[O/2,_+c]],textAlign:"center"},M=(0,S.CR)(w.offset,3),E=(0,S.CR)(M[0],2),A=E[0],P=E[1],C=(0,S.CR)(M[1],2),D=C[0],N=C[1],k=(0,S.CR)(M[2],2),R=k[0],I=k[1],F=w.textAlign,B=a.querySelector("text");B&&(B.style.textAlign=F),r.setLocalPosition(A,P),a.setLocalPosition(D,N),i.setLocalPosition(R,I)},e.prototype.updatePageInfo=function(){var n,r=this,i=r.currPage,a=r.pageViews,o=r.attributes.formatter;a.length<2||((n=this.pageInfoGroup.querySelector(Wi.pageInfo.class))===null||n===void 0||n.attr("text",o(i+1,a.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(n){var r=this.currPage;if(r===n)return[0,0];var i=this.attributes.orientation,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,c=n<r?-1:1;return i==="horizontal"?[c*o,0]:[0,c*s]},e.prototype.prepareFollowingPage=function(n){var r=this,i=r.currPage,a=r.pageViews;if(this.setVisiblePages([n,i]),n!==i){var o=(0,S.CR)(this.getFollowingPageDiff(n),2),s=o[0],c=o[1];a[n].setLocalPosition(s,c)}},e.prototype.renderController=function(n){var r=this,i=this.attributes.controllerSpacing,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,c=this.pageViews.length>=2,l=n.maybeAppendByClassName(Wi.controller,"g");if(Zf(l.node(),c),!!c){var u=en(this.attributes,"button"),f=en(this.attributes,"pageNum"),d=(0,S.CR)(ja(u),2),h=d[0],p=d[1],v=h.size,g=(0,S._T)(h,["size"]),y=!l.select(Wi.prevBtnGroup.class).node(),m=l.maybeAppendByClassName(Wi.prevBtnGroup,"g").styles(p);this.prevBtnGroup=m.node();var b=m.maybeAppendByClassName(Wi.prevBtn,"path"),_=l.maybeAppendByClassName(Wi.nextBtnGroup,"g").styles(p);this.nextBtnGroup=_.node();var O=_.maybeAppendByClassName(Wi.nextBtn,"path");[b,O].forEach(function(M){M.styles((0,S.pi)((0,S.pi)({},g),{transformOrigin:"center"})),mv(M.node(),v,!0)});var w=l.maybeAppendByClassName(Wi.pageInfoGroup,"g");this.pageInfoGroup=w.node(),w.maybeAppendByClassName(Wi.pageInfo,"text").styles(f),this.updatePageInfo(),l.node().setLocalPosition(o+i,s/2),y&&(this.prevBtnGroup.addEventListener("click",function(){r.prev()}),this.nextBtnGroup.addEventListener("click",function(){r.next()}))}},e.prototype.render=function(n,r){var i=Ue(r);this.renderClipPath(i),this.renderController(i),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var n=this,r=S_(function(){return n.render(n.attributes,n)},50);this.playWindow.addEventListener(Re.INSERTED,r),this.playWindow.addEventListener(Re.REMOVED,r)},e}(Rr),Ei=ji({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item");function Zq(t){var e=t.querySelector(Ei.marker.class);return e?e.style:{}}var Kq=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,{span:[1,1],marker:function(){return new al({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return Object.defineProperty(e.prototype,"showValue",{get:function(){var n=this.attributes.valueText;return n?typeof n=="string"||typeof n=="number"?n!=="":typeof n=="function"?!0:n.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var n=this.labelGroup,r=this.valueGroup,i=this.attributes.markerSize,a=n.node().getBBox(),o=a.width,s=a.height,c=r.node().getBBox(),l=c.width,u=c.height;return{markerWidth:i,labelWidth:o,valueWidth:l,height:Math.max(i,s,u)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var n=this.attributes.span;if(!n)return[1,1];var r=(0,S.CR)(Br(n),2),i=r[0],a=r[1],o=this.showValue?a:0,s=i+o;return[i/s,o/s]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var n,r=this.attributes,i=r.markerSize,a=r.width,o=this.actualSpace,s=o.markerWidth,c=o.height,l=this.actualSpace,u=l.labelWidth,f=l.valueWidth,d=(0,S.CR)(this.spacing,2),h=d[0],p=d[1];if(a){var v=a-i-h-p,g=(0,S.CR)(this.span,2),y=g[0],m=g[1];n=(0,S.CR)([y*v,m*v],2),u=n[0],f=n[1]}var b=s+u+f+h+p;return{width:b,height:c,markerWidth:s,labelWidth:u,valueWidth:f}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var n=this.attributes.spacing;if(!n)return[0,0];var r=(0,S.CR)(Br(n),2),i=r[0],a=r[1];return this.showValue?[i,a]:[i,0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var n=this.shape,r=n.markerWidth,i=n.labelWidth,a=n.valueWidth,o=n.width,s=n.height,c=(0,S.CR)(this.spacing,2),l=c[0],u=c[1];return{height:s,width:o,markerWidth:r,labelWidth:i,valueWidth:a,position:[r/2,r+l,r+i+l+u]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var n=Zq(this.markerGroup.node()),r=this.attributes,i=r.markerSize,a=r.markerStrokeWidth,o=a===void 0?n.strokeWidth:a,s=r.markerLineWidth,c=s===void 0?n.lineWidth:s,l=r.markerStroke,u=l===void 0?n.stroke:l,f=+(o||c||(u?1:0))*Math.sqrt(2),d=this.markerGroup.node().getBBox(),h=d.width,p=d.height;return(1-f/Math.max(h,p))*i},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(n){var r=this,i=this.attributes.marker,a=en(this.attributes,"marker");this.markerGroup=n.maybeAppendByClassName(Ei.markerGroup,"g").style("zIndex",0),pi(!!i,this.markerGroup,function(){var o=r.markerGroup.node(),s=o.getElementsByClassName(Ei.marker.name)[0],c=i();s?c.nodeName===s.nodeName?(xB(s,c),Ue(s).styles(a)):(s.remove(),Ue(c).attr("className",Ei.marker.name).styles(a),o.appendChild(c)):(Ue(c).attr("className",Ei.marker.name).styles(a),o.appendChild(c)),r.markerGroup.node().scale(1/r.markerGroup.node().getScale()[0]),mv(r.markerGroup.node(),r.scaleSize,!0)})},e.prototype.renderLabel=function(n){var r=en(this.attributes,"label"),i=r.text,a=(0,S._T)(r,["text"]);this.labelGroup=n.maybeAppendByClassName(Ei.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(Ei.label,function(){return rs(i)}).styles(a)},e.prototype.renderValue=function(n){var r=this,i=en(this.attributes,"value"),a=i.text,o=(0,S._T)(i,["text"]);this.valueGroup=n.maybeAppendByClassName(Ei.valueGroup,"g").style("zIndex",0),pi(this.showValue,this.valueGroup,function(){r.valueGroup.maybeAppendByClassName(Ei.value,function(){return rs(a)}).styles(o)})},e.prototype.renderBackground=function(n){var r=this.shape,i=r.width,a=r.height,o=en(this.attributes,"background");this.background=n.maybeAppendByClassName(Ei.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Ei.background,"rect").styles((0,S.pi)({width:i,height:a},o))},e.prototype.adjustLayout=function(){var n=this.layout,r=n.labelWidth,i=n.valueWidth,a=n.height,o=(0,S.CR)(n.position,3),s=o[0],c=o[1],l=o[2],u=a/2;this.markerGroup.styles({x:s,y:u}),this.labelGroup.styles({x:c,y:u}),wv(this.labelGroup.select(Ei.label.class).node(),Math.ceil(r)),this.showValue&&(this.valueGroup.styles({x:l,y:u}),wv(this.valueGroup.select(Ei.value.class).node(),Math.ceil(i)))},e.prototype.render=function(n,r){var i=Ue(r);this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},e}(Rr),bs=ji({page:"item-page",navigator:"navigator",item:"item"},"items"),YT=function(t,e,n){return n===void 0&&(n=!0),t?e(t):n},Qq=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:hy,mouseenter:hy,mouseleave:hy})||this;return r.navigatorShape=[0,0],r}return Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var n=this.attributes,r=n.gridRow,i=n.gridCol,a=n.data;if(!r&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return r&&i?[r,i]:r?[r,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var n=this.attributes,r=n.data,i=n.layout,a=en(this.attributes,"item"),o=r.map(function(s,c){var l=s.id,u=l===void 0?c:l,f=s.label,d=s.value;return{id:"".concat(u),index:c,style:(0,S.pi)({layout:i,labelText:f,valueText:d},Object.fromEntries(Object.entries(a).map(function(h){var p=(0,S.CR)(h,2),v=p[0],g=p[1];return[v,Di(g,[s,c,r])]})))}});return o},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var n=this,r=this.attributes,i=r.orientation,a=r.width,o=r.rowPadding,s=r.colPadding,c=(0,S.CR)(this.navigatorShape,1),l=c[0],u=(0,S.CR)(this.grid,2),f=u[0],d=u[1],h=d*f,p=0;return this.pageViews.children.map(function(v,g){var y,m,b=Math.floor(g/h),_=g%h,O=n.ifHorizontal(d,f),w=[Math.floor(_/O),_%O];i==="vertical"&&w.reverse();var M=(0,S.CR)(w,2),E=M[0],A=M[1],P=(a-l-(d-1)*s)/d,C=v.getBBox().height,D=(0,S.CR)([0,0],2),N=D[0],k=D[1];return i==="horizontal"?(y=(0,S.CR)([p,E*(C+o)],2),N=y[0],k=y[1],p=A===d-1?0:p+P+s):(m=(0,S.CR)([A*(P+s),p],2),N=m[0],k=m[1],p=E===f-1?0:p+C+o),{page:b,index:g,row:E,col:A,pageIndex:_,width:P,height:C,x:N,y:k}})},e.prototype.getFlexLayout=function(){var n=this.attributes,r=n.width,i=n.height,a=n.rowPadding,o=n.colPadding,s=(0,S.CR)(this.navigatorShape,1),c=s[0],l=(0,S.CR)(this.grid,2),u=l[0],f=l[1],d=(0,S.CR)([r-c,i],2),h=d[0],p=d[1],v=(0,S.CR)([0,0,0,0,0,0,0,0],8),g=v[0],y=v[1],m=v[2],b=v[3],_=v[4],O=v[5],w=v[6],M=v[7];return this.pageViews.children.map(function(E,A){var P,C,D,N,k=E.getBBox(),R=k.width,I=k.height,F=w===0?0:o,B=w+F+R;if(B<=h&&YT(_,function(Y){return Y<f}))return P=(0,S.CR)([w+F,M,B],3),g=P[0],y=P[1],w=P[2],{width:R,height:I,x:g,y,page:m,index:A,pageIndex:b++,row:O,col:_++};C=(0,S.CR)([O+1,0,0,M+I+a],4),O=C[0],_=C[1],w=C[2],M=C[3];var z=M+I;return z<=p&&YT(O,function(Y){return Y<u})?(D=(0,S.CR)([w,M,R],3),g=D[0],y=D[1],w=D[2],{width:R,height:I,x:g,y,page:m,index:A,pageIndex:b++,row:O,col:_++}):(N=(0,S.CR)([0,0,R,0,m+1,0,0,0],8),g=N[0],y=N[1],w=N[2],M=N[3],m=N[4],b=N[5],O=N[6],_=N[7],{width:R,height:I,x:g,y,page:m,index:A,pageIndex:b++,row:O,col:_++})})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var n=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,r=n.call(this);return r.slice(-1)[0].page>0?(this.navigatorShape=[55,0],n.call(this)):r},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(n,r){var i=this.attributes.orientation;return da(i,n,r)},e.prototype.flattenPage=function(n){n.querySelectorAll(bs.item.class).forEach(function(r){n.appendChild(r)}),n.querySelectorAll(bs.page.class).forEach(function(r){var i=n.removeChild(r);i.destroy()})},e.prototype.renderItems=function(n){var r=this.attributes,i=r.click,a=r.mouseenter,o=r.mouseleave;this.flattenPage(n);var s=this.dispatchCustomEvent.bind(this);Ue(n).selectAll(bs.item.class).data(this.renderData,function(c){return c.id}).join(function(c){return c.append(function(l){var u=l.style;return new Kq({style:u})}).attr("className",bs.item.name).on("click",function(){i==null||i(this),s("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),s("itemMouseenter",{item:this})}).on("pointerleave",function(){o==null||o(this),s("itemMouseleave",{item:this})})},function(c){return c.each(function(l){var u=l.style;this.update(u)})},function(c){return c.remove()})},e.prototype.relayoutNavigator=function(){var n,r=this.attributes,i=r.layout,a=r.width,o=((n=this.pageViews.children[0])===null||n===void 0?void 0:n.getBBox().height)||0,s=(0,S.CR)(this.navigatorShape,2),c=s[0],l=s[1];this.navigator.update(i==="grid"?{pageWidth:a-c,pageHeight:o-l}:{})},e.prototype.adjustLayout=function(){var n=this,r=Object.entries(Xq(this.itemsLayout,"page")).map(function(a){var o=(0,S.CR)(a,2),s=o[0],c=o[1];return{page:s,layouts:c}}),i=(0,S.ev)([],(0,S.CR)(this.navigator.getContainer().children),!1);r.forEach(function(a){var o=a.layouts,s=n.pageViews.appendChild(new Dr({className:bs.page.name}));o.forEach(function(c){var l=c.x,u=c.y,f=c.index,d=c.width,h=c.height,p=i[f];s.appendChild(p),$q(p,"__layout__",c),p.update({x:l,y:u,width:d,height:h})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(n){var r=this.attributes.orientation,i=en(this.attributes,"nav"),a=Na({orientation:r},i),o=this;return n.selectAll(bs.navigator.class).data(["nav"]).join(function(s){return s.append(function(){return new qq({style:a})}).attr("className",bs.navigator.name).each(function(){o.navigator=this})},function(s){return s.each(function(){this.update(a)})},function(s){return s.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(n,r){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(Ue(r));this.renderItems(a.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(n,r){var i=new Rn(n,{detail:r});this.dispatchEvent(i)},e}(Rr),Jq=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,DG)||this}return e.prototype.renderTitle=function(n,r,i){var a=this.attributes,o=a.showTitle,s=a.titleText,c=en(this.attributes,"title"),l=(0,S.CR)(ja(c),2),u=l[0],f=l[1];this.titleGroup=n.maybeAppendByClassName(Lr.titleGroup,"g").styles(f);var d=(0,S.pi)((0,S.pi)({width:r,height:i},u),{text:o?s:""});this.title=this.titleGroup.maybeAppendByClassName(Lr.title,function(){return new N2({style:d})}).update(d)},e.prototype.renderItems=function(n,r){var i=r.x,a=r.y,o=r.width,s=r.height,c=en(this.attributes,"title",!0),l=(0,S.CR)(ja(c),2),u=l[0],f=l[1],d=(0,S.pi)((0,S.pi)({},u),{width:o,height:s,x:0,y:0});this.itemsGroup=n.maybeAppendByClassName(Lr.itemsGroup,"g").styles((0,S.pi)({x:i,y:a},f));var h=this;this.itemsGroup.selectAll(Lr.items.class).data(["items"]).join(function(p){return p.append(function(){return new Qq({style:d})}).attr("className",Lr.items.name).each(function(){h.items=Ue(this)})},function(p){return p.update(d)},function(p){return p.remove()})},e.prototype.adjustLayout=function(){var n=this.attributes.showTitle;if(n){var r=this.title.node().getAvailableSpace(),i=r.x,a=r.y;this.itemsGroup.node().setLocalPosition(i,a)}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var n=this.attributes,r=n.showTitle,i=n.width,a=n.height;return r?this.title.node().getAvailableSpace():new Wn(0,0,i,a)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var n,r,i=(n=this.title)===null||n===void 0?void 0:n.node(),a=(r=this.items)===null||r===void 0?void 0:r.node();return!i||!a?t.prototype.getBBox.call(this):GB(i,a)},e.prototype.render=function(n,r){var i=n.width,a=n.height,o=Ue(r);this.renderTitle(o,i,a),this.renderItems(o,this.availableSpace),this.adjustLayout()},e}(Rr);function tZ(t){if(dl(t)){var e=t;return e[e.length-1]}}var eZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function nZ(t,e){const n=ua(t,"shape"),r=ua(t,"color"),i=n?n.clone():null,a=[];for(const[s,c]of e){const l=s.type,f=((r==null?void 0:r.getOptions().domain.length)>0?r==null?void 0:r.getOptions().domain:c.data).map((d,h)=>{var p;return i?i.map(d||"point"):((p=s==null?void 0:s.style)===null||p===void 0?void 0:p.shape)||c.defaultShape||"point"});typeof l=="string"&&a.push([l,f])}if(a.length===0)return["point",["point"]];if(a.length===1||!n)return a[0];const{range:o}=n.getOptions();return a.map(([s,c])=>{let l=0;for(let u=0;u<a.length;u++){const f=o[u%o.length];c[u]===f&&l++}return[l/c.length,[s,c]]}).sort((s,c)=>c[0]-s[0])[0][1]}function rZ(t,e){const{scales:n,library:r,markState:i}=e,[a,o]=nZ(n,i),{itemMarker:s,itemMarkerSize:c}=t,l=(d,h)=>{var p,v,g;const y=((g=(v=(p=r[`mark.${a}`])===null||p===void 0?void 0:p.props)===null||v===void 0?void 0:v.shape[d])===null||g===void 0?void 0:g.props.defaultMarker)||tZ(d.split(".")),m=typeof c=="function"?c(h):c;return()=>pU(y,{color:h.color})(0,0,m)},u=d=>`${o[d]}`;return ua(n,"shape")&&!s?(d,h)=>l(u(h),d):typeof s=="function"?(d,h)=>{const p=s(d.id,h);return typeof p=="string"?l(p,d):p}:(d,h)=>l(s||u(h),d)}function iZ(t){const e=ua(t,"opacity");if(e){const{range:n}=e.getOptions();return(r,i)=>n[i]}}function aZ(t,e){const n=ua(t,"size");return n instanceof rh?n.map(NaN)*2:e}function oZ(t,e){const{labelFormatter:n=d=>`${d}`}=t,{scales:r,theme:i}=e,a=i.legendCategory.itemMarkerSize,o=aZ(r,a),s={itemMarker:rZ(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:iZ(r)},c=typeof n=="string"?uo(n):n,l=ua(r,"color"),u=Vz(r),f=l?d=>l.map(d):()=>e.theme.color;return Object.assign(Object.assign({},s),{data:u.map(d=>({id:d,label:c(d),color:f(d)}))})}function sZ(t,e,n){const{position:r}=e;if(r==="center"){const{bbox:o}=t,{width:s,height:c}=o;return{width:s,height:c}}const{width:i,height:a}=aO(t,e,n);return{width:i,height:a}}const py=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:s,cols:c,itemMarker:l}=t,u=eZ(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=u;return d=>{const{value:h,theme:p}=d,{bbox:v}=h,{width:g,height:y}=sZ(h,t,py),m=rO(a,n),b=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(a)?"vertical":"horizontal",width:g,height:y,layout:c!==void 0?"grid":"flex"},c!==void 0&&{gridCol:c}),f!==void 0&&{gridRow:f}),{titleText:dd(s)}),oZ(t,d)),{legendCategory:_={}}=p,O=hd(Object.assign({},_,b,u)),w=new Wz({style:Object.assign(Object.assign({x:v.x,y:v.y,width:v.width,height:v.height},m),{subOptions:O})});return w.appendChild(new Jq({className:"legend-category",style:O})),w}};py.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const VT=t=>()=>new Dr;VT.props={};var cZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $T(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}const lZ=Gz({render(t,e){const{width:n,title:r,subtitle:i,spacing:a=2,align:o="left"}=t,s=cZ(t,["width","title","subtitle","spacing","align"]),c=se(s,"title"),l=se(s,"subtitle"),f=nO(e,".title","text").attr("className","title").call(Ee,Object.assign(Object.assign(Object.assign({},$T(0,0,n,o)),{fontSize:14,textBaseline:"top",text:r}),c)).node().getLocalBounds();nO(e,".sub-title","text").attr("className","sub-title").call(d=>{if(!i)return d.node().remove();d.node().attr(Object.assign(Object.assign(Object.assign({},$T(0,f.max[1]+a,n,o)),{fontSize:12,textBaseline:"top",text:i}),l))})}}),XT=t=>({value:e,theme:n})=>{const{x:r,y:i,width:a,height:o}=e.bbox;return new lZ({style:Nt({},n.title,Object.assign({x:r,y:i,width:a,height:o},t))})};XT.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};var vy=function(t){if(typeof t!="object"||t===null)return t;var e;if(jr(t)){e=[];for(var n=0,r=t.length;n<r;n++)typeof t[n]=="object"&&t[n]!=null?e[n]=vy(t[n]):e[n]=t[n]}else{e={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?e[i]=vy(t[i]):e[i]=t[i]}return e},gy=vy,uZ=function(t){(0,S.ZT)(e,t);function e(n){var r=this,i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,Nt({},{type:"column"},(0,S.pi)({style:i},a)))||this,r.columnsGroup=new Dr({name:"columns"}),r.appendChild(r.columnsGroup),r.render(),r}return e.prototype.render=function(){var n=this.attributes.columns;Ue(this.columnsGroup).selectAll(".column").data(n.flat()).join(function(r){return r.append("rect").attr("className","column").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.attr(i)})},function(r){return r.remove()})},e.prototype.update=function(n){this.attr(Na({},this.attributes,n)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(Yr),fZ=function(t){(0,S.ZT)(e,t);function e(n){var r=this,i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,Nt({},{type:"lines"},(0,S.pi)({style:i},a)))||this,r.linesGroup=r.appendChild(new Dr),r.areasGroup=r.appendChild(new Dr),r.render(),r}return e.prototype.render=function(){var n=this.attributes,r=n.lines,i=n.areas;r&&this.renderLines(r),i&&this.renderAreas(i)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(n){this.attr(Na({},this.attributes,n)),this.render()},e.prototype.renderLines=function(n){Ue(this.linesGroup).selectAll(".line").data(n).join(function(r){return r.append("path").attr("className","line").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.attr(i)})},function(r){return r.remove()})},e.prototype.renderAreas=function(n){Ue(this.linesGroup).selectAll(".area").data(n).join(function(r){return r.append("path").attr("className","area").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.style(i)})},function(r){return r.remove()})},e}(Yr);function dZ(t,e,n,r){var i,a=[],o=!!r,s,c,l=[1/0,1/0],u=[-1/0,-1/0],f,d,h;if(o){i=(0,S.CR)(r,2),l=i[0],u=i[1];for(var p=0,v=t.length;p<v;p+=1){var g=t[p];l=es(l,g),u=ns(u,g)}}for(var p=0,y=t.length;p<y;p+=1){var g=t[p];if(p===0&&!n)h=g;else if(p===y-1&&!n)d=g,a.push(h),a.push(d);else{var m=[p?p-1:y-1,p-1][n?0:1];s=t[m],c=t[n?(p+1)%y:p+1];var b=[0,0];b=pv(c,s),b=Ia(b,e);var _=ml(g,s),O=ml(g,c),w=_+O;w!==0&&(_/=w,O/=w);var M=Ia(b,-_),E=Ia(b,O);d=yl(g,M),f=yl(g,E),f=es(f,ns(c,g)),f=ns(f,es(c,g)),M=pv(f,g),M=Ia(M,-_/O),d=yl(g,M),d=es(d,ns(s,g)),d=ns(d,es(s,g)),E=pv(g,d),E=Ia(E,O/_),f=yl(g,E),o&&(d=ns(d,l),d=es(d,u),f=ns(f,l),f=es(f,u)),a.push(h),a.push(d),h=f}}return n&&a.push(a.shift()),a}function hZ(t,e,n){var r;e===void 0&&(e=!1),n===void 0&&(n=[[0,0],[1,1]]);for(var i=!!e,a=[],o=0,s=t.length;o<s;o+=2)a.push([t[o],t[o+1]]);for(var c=dZ(a,.4,i,n),l=a.length,u=[],f,d,h,o=0;o<l-1;o+=1)f=c[o*2],d=c[o*2+1],h=a[o+1],u.push(["C",f[0],f[1],d[0],d[1],h[0],h[1]]);return i&&(f=c[l],d=c[l+1],r=(0,S.CR)(a,1),h=r[0],u.push(["C",f[0],f[1],d[0],d[1],h[0],h[1]])),u}function pZ(t,e){var n,r=e.x,i=e.y,a=(0,S.CR)(i.getOptions().range||[0,0],2),o=a[0],s=a[1];return s>o&&(n=(0,S.CR)([o,s],2),s=n[0],o=n[1]),t.map(function(c){var l=c.map(function(u,f){return[r.map(f),(0,lr.Z)(i.map(u),s,o)]});return l})}function Zl(t,e){e===void 0&&(e=!1);var n=e?t.length-1:0,r=t.map(function(i,a){return(0,S.ev)([a===n?"M":"L"],(0,S.CR)(i),!1)});return e?r.reverse():r}function sh(t,e){if(e===void 0&&(e=!1),t.length<=2)return Zl(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];V_(a,n.slice(-2))||n.push.apply(n,(0,S.ev)([],(0,S.CR)(a),!1))}var o=hZ(n,!1);return e?o.unshift((0,S.ev)(["M"],(0,S.CR)(t[r-1]),!1)):o.unshift((0,S.ev)(["M"],(0,S.CR)(t[0]),!1)),o}function yy(t,e,n){var r=gy(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}function vZ(t,e,n,r){return t.map(function(i){return yy(e?sh(i):Zl(i),n,r)})}function gZ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=Zl(a),s=void 0;if(i===0)s=yy(o,e,n);else{var c=t[i-1],l=Zl(c,!0);l[0][0]="L",s=(0,S.ev)((0,S.ev)((0,S.ev)([],(0,S.CR)(o),!1),(0,S.CR)(l),!1),[["Z"]],!1)}r.push(s)}return r}function yZ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=sh(a),s=void 0;if(i===0)s=yy(o,e,n);else{var c=t[i-1],l=sh(c,!0),u=a[0];l[0][0]="L",s=(0,S.ev)((0,S.ev)((0,S.ev)([],(0,S.CR)(o),!1),(0,S.CR)(l),!1),[(0,S.ev)(["M"],(0,S.CR)(u),!1),["Z"]],!1)}r.push(s)}return r}var mZ=function(t,e){if(jr(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=vi(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},bZ=function(t,e){if(jr(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=vi(e)?e(a):a[e];o>r&&(n=a,r=o)}return n}};function UT(t){return t.length===0?[0,0]:[sf(mZ(t,function(e){return sf(e)||0})),cf(bZ(t,function(e){return cf(e)||0}))]}function qT(t){for(var e=gy(t),n=e[0].length,r=(0,S.CR)([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],a=r[1],o=0;o<e.length;o+=1)for(var s=e[o],c=0;c<n;c+=1)s[c]>=0?(s[c]+=i[c],i[c]=s[c]):(s[c]+=a[c],a[c]=s[c]);return e}var xZ=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(e.prototype,"rawData",{get:function(){var n=this.attributes.data;if(!n||(n==null?void 0:n.length)===0)return[[]];var r=gy(n);return(0,xr.Z)(r[0])?[r]:r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?qT(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var n=this.scales.y,r=(0,S.CR)(n.getOptions().domain||[0,0],2),i=r[0],a=r[1];return a<0?n.map(a):n.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var n=this.attributes,r=n.width,i=n.height;return{width:r,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var n=this,r=this.attributes,i=r.type,a=r.isStack,o=r.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var s=en(this.attributes,"area"),c=en(this.attributes,"line"),l=this.containerShape.width,u=this.data;if(u[0].length===0)return{lines:[],areas:[]};var f=this.scales,d=f.x,h=f.y,p=pZ(u,{type:"line",x:d,y:h}),v=[];if(s){var g=this.baseline;a?v=o?yZ(p,l,g):gZ(p,l,g):v=vZ(p,o,l,g)}return{lines:p.map(function(y,m){return(0,S.pi)({stroke:n.getColor(m),path:o?sh(y):Zl(y)},c)}),areas:v.map(function(y,m){return(0,S.pi)({path:y,fill:n.getColor(m)},s)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var n=this,r=en(this.attributes,"column"),i=this.attributes,a=i.isStack,o=i.type,s=i.scale;if(o!=="column")throw new Error("columnsStyle can only be used in column type");var c=this.containerShape.height,l=this.rawData;if(!l)return{columns:[]};a&&(l=qT(l));var u=this.createScales(l),f=u.x,d=u.y,h=(0,S.CR)(UT(l),2),p=h[0],v=h[1],g=new Vr({domain:[0,v-(p>0?0:p)],range:[0,c*s]}),y=f.getBandWidth(),m=this.rawData;return{columns:l.map(function(b,_){return b.map(function(O,w){var M=y/l.length,E=function(){return{x:f.map(w)+M*_,y:O>=0?d.map(O):d.map(0),width:M,height:g.map(Math.abs(O))}},A=function(){return{x:f.map(w),y:d.map(O),width:y,height:g.map(m[_][w])}};return(0,S.pi)((0,S.pi)({fill:n.getColor(_)},r),a?A():E())})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(n,r){RF(r,".container","rect").attr("className","container").node();var i=n.type,a="spark".concat(i),o=i==="line"?this.linesStyle:this.columnsStyle;Ue(r).selectAll(".spark").data([i]).join(function(s){return s.append(function(c){return c==="line"?new fZ({className:a,style:o}):new uZ({className:a,style:o})}).attr("className","spark ".concat(a))},function(s){return s.update(o)},function(s){return s.remove()})},e.prototype.getColor=function(n){var r=this.attributes.color;return jr(r)?r[n%r.length]:vi(r)?r.call(null,n):r},e.prototype.createScales=function(n){var r,i,a=this.attributes,o=a.type,s=a.scale,c=a.range,l=c===void 0?[]:c,u=a.spacing,f=this.containerShape,d=f.width,h=f.height,p=(0,S.CR)(UT(n),2),v=p[0],g=p[1],y=new Vr({domain:[(r=l[0])!==null&&r!==void 0?r:v,(i=l[1])!==null&&i!==void 0?i:g],range:[h,h*(1-s)]});return o==="line"?{type:o,x:new Vr({domain:[0,n[0].length-1],range:[0,d]}),y}:{type:o,x:new Oo({domain:n[0].map(function(m,b){return b}),range:[0,d],paddingInner:u,paddingOuter:u/2,align:.5}),y}},e.tag="sparkline",e}(Rr),ZT=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,(0,S.pi)((0,S.pi)((0,S.pi)({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(i){return i.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},la(vO,"handle")),la(hO,"handleIcon")),la(pO,"handleLabel")))||this;return r.range=[0,1],r.onDragStart=function(i){return function(a){a.stopPropagation(),r.target=i,r.prevPos=r.getOrientVal(vd(a));var o=r.availableSpace,s=o.x,c=o.y,l=r.getBBox(),u=l.x,f=l.y;r.selectionStartPos=r.getRatio(r.prevPos-r.getOrientVal([s,c])-r.getOrientVal([+u,+f])),r.selectionWidth=0,document.addEventListener("pointermove",r.onDragging),document.addEventListener("pointerup",r.onDragEnd)}},r.onDragging=function(i){var a=r.attributes,o=a.slidable,s=a.brushable,c=a.type;i.stopPropagation();var l=r.getOrientVal(vd(i)),u=l-r.prevPos;if(u){var f=r.getRatio(u);switch(r.target){case"start":o&&r.setValuesOffset(f);break;case"end":o&&r.setValuesOffset(0,f);break;case"selection":o&&r.setValuesOffset(f,f);break;case"track":if(!s)return;r.selectionWidth+=f,c==="range"?r.innerSetValues([r.selectionStartPos,r.selectionStartPos+r.selectionWidth].sort(),!0):r.innerSetValues([0,r.selectionStartPos+r.selectionWidth],!0);break;default:break}r.prevPos=l}},r.onDragEnd=function(){document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointerup",r.onDragEnd),r.target="",r.updateHandlesPosition(!1)},r.onValueChange=function(i){var a=r.attributes,o=a.onChange,s=a.type,c=s==="range"?i:i[1],l=s==="range"?r.getValues():r.getValues()[1],u=new Rn("valuechange",{detail:{oldValue:c,value:l}});r.dispatchEvent(u),o==null||o(l)},r.selectionStartPos=0,r.selectionWidth=0,r.prevPos=0,r.target="",r}return Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(n){this.attributes.values=this.clampValues(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){var n=this.attributes.orientation;if(n!=="horizontal")return null;var r=en(this.attributes,"sparkline");return(0,S.pi)((0,S.pi)({zIndex:0},this.availableSpace),r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var n=this.attributes,r=n.trackLength,i=n.trackSize,a=(0,S.CR)(this.getOrientVal([[r,i],[i,r]]),2),o=a[0],s=a[1];return{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var n=this.attributes.padding,r=(0,S.CR)(Br(n),4),i=r[0],a=r[1],o=r[2],s=r[3],c=this.shape,l=c.width,u=c.height;return{x:s,y:i,width:l-(s+a),height:u-(i+o)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(n,r){n===void 0&&(n=[0,0]),r===void 0&&(r=!1),this.attributes.values=n;var i=r===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},e.prototype.updateSelectionArea=function(n){var r=this.calcSelectionArea();this.foregroundGroup.selectAll(fa.selection.class).each(function(i,a){qi(this,r[a],n)})},e.prototype.updateHandlesPosition=function(n){this.attributes.showHandle&&(this.startHandle&&qi(this.startHandle,this.getHandleStyle("start"),n),this.endHandle&&qi(this.endHandle,this.getHandleStyle("end"),n))},e.prototype.innerSetValues=function(n,r){n===void 0&&(n=[0,0]),r===void 0&&(r=!1);var i=this.values,a=this.clampValues(n);this.attributes.values=a,this.setValues(a),r&&this.onValueChange(i)},e.prototype.renderTrack=function(n){var r=en(this.attributes,"track");this.trackShape=Ue(n).maybeAppendByClassName(fa.track,"rect").styles((0,S.pi)((0,S.pi)({},this.shape),r))},e.prototype.renderBrushArea=function(n){var r=this.attributes.brushable;this.brushArea=Ue(n).maybeAppendByClassName(fa.brushArea,"rect").styles((0,S.pi)({fill:"transparent",cursor:r?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(n){var r=this,i=this.attributes.orientation,a=Ue(n).maybeAppendByClassName(fa.sparklineGroup,"g");pi(i==="horizontal",a,function(o){var s=r.sparklineStyle;o.maybeAppendByClassName(fa.sparkline,function(){return new xZ({style:s})}).update(s)})},e.prototype.renderHandles=function(){var n=this,r,i=this.attributes,a=i.showHandle,o=i.type,s=o==="range"?["start","end"]:["end"],c=a?s:[],l=this;(r=this.foregroundGroup)===null||r===void 0||r.selectAll(fa.handle.class).data(c.map(function(u){return{type:u}}),function(u){return u.type}).join(function(u){return u.append(function(f){var d=f.type;return new gO({style:n.getHandleStyle(d)})}).each(function(f){var d=f.type;this.attr("class","".concat(fa.handle.name," ").concat(d,"-handle"));var h="".concat(d,"Handle");l[h]=this,this.addEventListener("pointerdown",l.onDragStart(d))})},function(u){return u.each(function(f){var d=f.type;this.update(l.getHandleStyle(d))})},function(u){return u.each(function(f){var d=f.type,h="".concat(d,"Handle");l[h]=void 0}).remove()})},e.prototype.renderSelection=function(n){var r=this.attributes,i=r.type,a=r.selectionType;this.foregroundGroup=Ue(n).maybeAppendByClassName(fa.foreground,"g");var o=en(this.attributes,"selection"),s=function(l){return l.style("visibility",function(u){return u.show?"visible":"hidden"}).style("cursor",function(u){return a==="select"?"grab":a==="invert"?"crosshair":"default"}).styles(o)},c=this;this.foregroundGroup.selectAll(fa.selection.class).data(i==="value"?[]:this.calcSelectionArea().map(function(l,u){return{style:(0,S.pi)({},l),index:u,show:a==="select"?u===1:u!==1}}),function(l){return l.index}).join(function(l){return l.append("rect").attr("className",fa.selection.name).call(s).each(function(u,f){var d=this;f===1?(c.selectionShape=Ue(this),this.on("pointerdown",function(h){d.attr("cursor","grabbing"),c.onDragStart("selection")(h)}),c.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),c.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),c.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){d.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){d.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){d.attr("cursor","pointer")})):this.on("pointerdown",c.onDragStart("track"))})},function(l){return l.call(s)},function(l){return l.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(n,r){this.renderTrack(r),this.renderSparkline(r),this.renderBrushArea(r),this.renderSelection(r)},e.prototype.clampValues=function(n,r){var i;r===void 0&&(r=4);var a=(0,S.CR)(this.range,2),o=a[0],s=a[1],c=(0,S.CR)(this.getValues().map(function(g){return pd(g,r)}),2),l=c[0],u=c[1],f=Array.isArray(n)?n:[l,n!=null?n:u],d=(0,S.CR)((f||[l,u]).map(function(g){return pd(g,r)}),2),h=d[0],p=d[1];if(this.attributes.type==="value")return[0,(0,lr.Z)(p,o,s)];h>p&&(i=(0,S.CR)([p,h],2),h=i[0],p=i[1]);var v=p-h;return v>s-o?[o,s]:h<o?l===o&&u===p?[o,p]:[o,v+o]:p>s?u===s&&l===h?[h,s]:[s-v,s]:[h,p]},e.prototype.calcSelectionArea=function(n){var r=(0,S.CR)(this.clampValues(n),2),i=r[0],a=r[1],o=this.availableSpace,s=o.x,c=o.y,l=o.width,u=o.height;return this.getOrientVal([[{y:c,height:u,x:s,width:i*l},{y:c,height:u,x:i*l+s,width:(a-i)*l},{y:c,height:u,x:a*l,width:(1-a)*l}],[{x:s,width:l,y:c,height:i*u},{x:s,width:l,y:i*u+c,height:(a-i)*u},{x:s,width:l,y:a*u,height:(1-a)*u}]])},e.prototype.calcHandlePosition=function(n){var r=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,o=i.y,s=i.width,c=i.height,l=(0,S.CR)(this.clampValues(),2),u=l[0],f=l[1],d=n==="start"?-r:r,h=(n==="start"?u:f)*this.getOrientVal([s,c])+d;return{x:a+this.getOrientVal([h,s/2]),y:o+this.getOrientVal([c/2,h])}},e.prototype.inferTextStyle=function(n){var r=this.attributes.orientation;return r==="horizontal"?{}:n==="start"?{transform:"rotate(90)",textAlign:"start"}:n==="end"?{transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(n){var r,i=this.attributes,a=i.type,o=i.orientation,s=i.formatter,c=i.autoFitLabel,l=en(this.attributes,"handle"),u=en(l,"label"),f=l.spacing,d=this.getHandleSize(),h=this.clampValues(),p=n==="start"?h[0]:h[1],v=s(p),g=new dv({style:(0,S.pi)((0,S.pi)((0,S.pi)({},u),this.inferTextStyle(n)),{text:v})}),y=g.getBBox(),m=y.width,b=y.height;if(g.destroy(),!c){if(a==="value")return{text:v,x:0,y:-b-f};var _=f+d+(o==="horizontal"?m/2:0);return r={text:v},r[o==="horizontal"?"x":"y"]=n==="start"?-_:_,r}var O=0,w=0,M=this.availableSpace,E=M.width,A=M.height,P=this.calcSelectionArea()[1],C=P.x,D=P.y,N=P.width,k=P.height,R=f+d;if(o==="horizontal"){var I=R+m/2;if(n==="start"){var F=C-R-m;O=F>0?-I:I}else{var B=E-C-N-R>m;O=B?I:-I}}else{var z=R,Y=b+R;n==="start"?w=D-d>b?-Y:z:w=A-(D+k)-d>b?Y:-z}return{x:O,y:w,text:v}},e.prototype.getHandleLabelStyle=function(n){var r=en(this.attributes,"handleLabel");return(0,S.pi)((0,S.pi)((0,S.pi)({},r),this.calcHandleText(n)),this.inferTextStyle(n))},e.prototype.getHandleIconStyle=function(){var n=this.attributes.handleIconShape,r=en(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return(0,S.pi)({cursor:i,shape:n,size:a},r)},e.prototype.getHandleStyle=function(n){var r=this.attributes,i=r.showLabel,a=r.showLabelOnInteraction,o=r.orientation,s=this.calcHandlePosition(n),c=this.calcHandleText(n),l=i;return!i&&a&&(this.target?l=!0:l=!1),(0,S.pi)((0,S.pi)((0,S.pi)((0,S.pi)({},la(this.getHandleIconStyle(),"icon")),la((0,S.pi)((0,S.pi)({},this.getHandleLabelStyle(n)),c),"label")),s),{orientation:o,showLabel:l,type:n,zIndex:3})},e.prototype.getHandleSize=function(){var n=this.attributes,r=n.handleIconSize,i=n.width,a=n.height;return r||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},e.prototype.getOrientVal=function(n){var r=(0,S.CR)(n,2),i=r[0],a=r[1],o=this.attributes.orientation;return o==="horizontal"?i:a},e.prototype.setValuesOffset=function(n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=this.attributes.type,o=(0,S.CR)(this.getValues(),2),s=o[0],c=o[1],l=a==="range"?n:0,u=[s+l,c+r].sort();i?this.setValues(u):this.innerSetValues(u,!0)},e.prototype.getRatio=function(n){var r=this.availableSpace,i=r.width,a=r.height;return n/this.getOrientVal([i,a])},e.prototype.dispatchCustomEvent=function(n,r,i){var a=this;n.on(r,function(o){o.stopPropagation(),a.dispatchEvent(new Rn(i,{detail:o}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var n=this.brushArea;this.dispatchCustomEvent(n,"click","trackClick"),this.dispatchCustomEvent(n,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(n,"pointerleave","trackMouseleave"),n.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(n){var r=this.attributes.scrollable;if(r){var i=n.deltaX,a=n.deltaY,o=a||i,s=this.getRatio(o);this.setValuesOffset(s,s,!0)}},e.tag="slider",e}(Rr);function _Z(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wc(t){let e,n,r;t.length!==2?(e=dr,n=(s,c)=>dr(t(s),c),r=(s,c)=>t(s)-c):(e=t===dr||t===_Z?t:OZ,n=t,r=t);function i(s,c,l=0,u=s.length){if(l<u){if(e(c,c)!==0)return u;do{const f=l+u>>>1;n(s[f],c)<0?l=f+1:u=f}while(l<u)}return l}function a(s,c,l=0,u=s.length){if(l<u){if(e(c,c)!==0)return u;do{const f=l+u>>>1;n(s[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function o(s,c,l=0,u=s.length){const f=i(s,c,l,u-1);return f>l&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:i,center:o,right:a}}function OZ(){return 0}function my(t){return t===null?NaN:+t}function*wZ(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 KT=wc(dr),SZ=KT.right,MZ=KT.left,EZ=wc(my).center;var AZ=SZ;function TZ(t,e){return Array.from(e,n=>t[n])}function za(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,a)=>a);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,a)=>{for(const o of e){const s=Kl(o[i],o[a]);if(s)return s}})):(n=t.map(n),r.sort((i,a)=>Kl(n[i],n[a]))),TZ(t,r)}return t.sort(QT(n))}function QT(t=dr){if(t===dr)return Kl;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 Kl(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function PZ(t,e,n){return Math.min(n,Math.max(e,t))}function Ql(t){return!!t.getBandWidth}function Sc(t,e,n){if(!Ql(t))return t.invert(e);const{adjustedRange:r}=t,{domain:i}=t.getOptions(),a=n?-1:0,o=t.getStep(),s=n?r:r.map(u=>u+o),c=MZ(s,e),l=PZ(c+a,0,i.length-1);return i[l]}function Mo(t,e,n){if(!e)return t.getOptions().domain;if(!Ql(t)){const c=za(e);if(!n)return c;const[l]=c,{range:u}=t.getOptions(),[f,d]=u,h=f>d?-1:1,p=t.invert(t.map(l)+h*n);return[l,p]}const{domain:r}=t.getOptions(),i=e[0],a=r.indexOf(i);if(n){const c=a+Math.round(r.length*n);return r.slice(a,c)}const o=e[e.length-1],s=r.indexOf(o);return r.slice(a,s+1)}function ch(t,e,n,r,i,a){const{x:o,y:s}=i,c=(h,p)=>{const[v,g]=a.invert(h);return[Sc(o,v,p),Sc(s,g,p)]},l=c([t,e],!0),u=c([n,r],!1),f=Mo(o,[l[0],u[0]]),d=Mo(s,[l[1],u[1]]);return[f,d]}function lh(t,e){const[n,r]=t,i=a=>a.getStep?a.getStep():0;return[e.map(n),e.map(r)+i(e)]}function CZ(t,e,n){const{x:r,y:i}=e,[a,o]=t,s=lh(a,r),c=lh(o,i),l=[s[0],c[0]],u=[s[1],c[1]],[f,d]=n.map(l),[h,p]=n.map(u);return[f,d,h,p]}var kZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function RZ(t,e,n){const{x:r,y:i,width:a,height:o}=t;if(e==="left")return[r+a-n,i];if(e==="right")return[r,i];if(e==="bottom")return[r,i];if(e==="top")return[r,i+o-n]}const Jl=t=>{const{orientation:e,labelFormatter:n,size:r,style:i={},position:a}=t,o=kZ(t,["orientation","labelFormatter","size","style","position"]);return s=>{var c;const{scales:[l],value:u,theme:f,coordinate:d}=s,{bbox:h}=u,{width:p,height:v}=h,{slider:g={}}=f,y=((c=l.getFormatter)===null||c===void 0?void 0:c.call(l))||(E=>E+""),m=typeof n=="string"?uo(n):n,b=e==="horizontal",_=Gn(d)&&b,{trackSize:O=g.trackSize}=i,[w,M]=RZ(h,a,O);return new ZT({className:"slider",style:Object.assign({},g,Object.assign(Object.assign({x:w,y:M,trackLength:b?p:v,orientation:e,formatter:E=>{const A=m||y,P=_?1-E:E,C=Sc(l,P,!0);return A(C)},sparklineData:NZ(t,s)},i),o))})}};function LZ(t,e){const[n]=Array.from(t.entries()).filter(([i])=>i.type==="line"||i.type==="area").map(([i])=>{const{encode:a,slider:o}=i;if(o!=null&&o.x&&Object.keys(o.x).length===0){const s=c=>{const l=a[c];return[c,l?l.value:void 0]};return Object.fromEntries(e.map(s))}});if(!(n!=null&&n.series))return n==null?void 0:n.y;const r=n.series.reduce((i,a,o)=>(i[a]=i[a]||[],i[a].push(n.y[o]),i),{});return Object.values(r)}function NZ(t,e){const{markState:n}=e;return jr(t.sparklineData)?t.sparklineData:LZ(n,["y","series"])}Jl.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const JT=t=>Jl(Object.assign(Object.assign({},t),{orientation:"horizontal"}));JT.props=Object.assign(Object.assign({},Jl.props),{defaultPosition:"bottom"});const tP=t=>Jl(Object.assign(Object.assign({},t),{orientation:"vertical"}));tP.props=Object.assign(Object.assign({},Jl.props),{defaultPosition:"left"});var IZ=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return r.range=[0,1],r.onValueChange=function(i){var a=r.attributes.value;if(i!==a){var o={detail:{oldValue:i,value:a}};r.dispatchEvent(new Rn("scroll",o)),r.dispatchEvent(new Rn("valuechange",o))}},r.onTrackClick=function(i){var a=r.attributes.slidable;if(a){var o=(0,S.CR)(r.getLocalPosition(),2),s=o[0],c=o[1],l=(0,S.CR)(r.padding,4),u=l[0],f=l[3],d=r.getOrientVal([s+f,c+u]),h=r.getOrientVal(vd(i)),p=(h-d)/r.trackLength;r.setValue(p,!0)}},r.onThumbMouseenter=function(i){r.dispatchEvent(new Rn("thumbMouseenter",{detail:i.detail}))},r.onTrackMouseenter=function(i){r.dispatchEvent(new Rn("trackMouseenter",{detail:i.detail}))},r.onThumbMouseleave=function(i){r.dispatchEvent(new Rn("thumbMouseleave",{detail:i.detail}))},r.onTrackMouseleave=function(i){r.dispatchEvent(new Rn("trackMouseleave",{detail:i.detail}))},r}return Object.defineProperty(e.prototype,"padding",{get:function(){var n=this.attributes.padding;return Br(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var n=this.attributes.value,r=(0,S.CR)(this.range,2),i=r[0],a=r[1];return(0,lr.Z)(n,i,a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var n=this.attributes,r=n.viewportLength,i=n.trackLength,a=i===void 0?r:i;return a},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var n=this.attributes.trackSize,r=this.trackLength,i=(0,S.CR)(this.padding,4),a=i[0],o=i[1],s=i[2],c=i[3],l=(0,S.CR)(this.getOrientVal([[r,n],[n,r]]),2),u=l[0],f=l[1];return{x:c,y:a,width:+u-(c+o),height:+f-(a+s)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var n=this.attributes,r=n.isRound,i=n.trackSize;return r?i/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var n=this.attributes,r=n.isRound,i=n.thumbRadius;if(!r)return 0;var a=this.availableSpace,o=a.width,s=a.height;return i||this.getOrientVal([s,o])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(n){n===void 0&&(n=this.value);var r=this.attributes,i=r.viewportLength,a=r.contentLength,o=i/a,s=(0,S.CR)(this.range,2),c=s[0],l=s[1],u=n*(l-c-o);return[u,u+o]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(n){var r=this.attributes,i=r.orientation,a=r.trackSize,o=r.padding,s=r.slidable,c=en(this.attributes,"track"),l=en(this.attributes,"thumb"),u=(0,S.pi)((0,S.pi)({brushable:!1,orientation:i,padding:o,selectionRadius:this.thumbRadius,showHandle:!1,slidable:s,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:a,values:this.getValues()},la(c,"track")),la(l,"selection"));this.slider=Ue(n).maybeAppendByClassName("scrollbar",function(){return new ZT({style:u})}).update(u).node()},e.prototype.render=function(n,r){this.renderSlider(r)},e.prototype.setValue=function(n,r){r===void 0&&(r=!1);var i=this.attributes.value,a=(0,S.CR)(this.range,2),o=a[0],s=a[1];this.slider.setValues(this.getValues((0,lr.Z)(n,o,s)),r),this.onValueChange(i)},e.prototype.bindEvents=function(){var n=this;this.slider.addEventListener("trackClick",function(r){r.stopPropagation(),n.onTrackClick(r.detail)}),this.onHover()},e.prototype.getOrientVal=function(n){var r=this.attributes.orientation;return r==="horizontal"?n[0]:n[1]},e.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},e.tag="scrollbar",e}(Rr),jZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const tu=t=>{const{orientation:e,labelFormatter:n,style:r}=t,i=jZ(t,["orientation","labelFormatter","style"]);return({scales:[a],value:o,theme:s})=>{const{bbox:c}=o,{x:l,y:u,width:f,height:d}=c,{scrollbar:h={}}=s,{ratio:p,range:v}=a.getOptions(),g=e==="horizontal"?f:d,y=g/p,[m,b]=v,_=b>m?0:1;return new IZ({className:"g2-scrollbar",style:Object.assign({},h,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:u,trackLength:g,value:_}),i),{orientation:e,contentLength:y,viewportLength:g}))})}};tu.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const eP=t=>tu(Object.assign(Object.assign({},t),{orientation:"horizontal"}));eP.props=Object.assign(Object.assign({},tu.props),{defaultPosition:"bottom"});const nP=t=>tu(Object.assign(Object.assign({},t),{orientation:"vertical"}));nP.props=Object.assign(Object.assign({},tu.props),{defaultPosition:"left"});const by=(t,e)=>{const{coordinate:r}=e;return(i,a,o)=>{const[s]=i,{transform:c="",fillOpacity:l=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=Gn(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:l,strokeOpacity:u,opacity:f,offset:.01},{transform:`${c} scale(1, 1)`.trimStart(),transformOrigin:d,fillOpacity:l,strokeOpacity:u,opacity:f}];return s.animate(p,Object.assign(Object.assign({},o),t))}},DZ=(t,e)=>{const{coordinate:r}=e;return(i,a,o)=>{const[s]=i,{transform:c="",fillOpacity:l=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=Gn(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${c} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:l,strokeOpacity:u,opacity:f,offset:.99},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),t))}},rP=(t,e)=>{const{coordinate:r}=e;return Xx.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:oe.NUMBER}),(i,a,o)=>{const[s]=i,c=u=>{const{__data__:f,style:d}=u,{radius:h=0,inset:p=0,fillOpacity:v=1,strokeOpacity:g=1,opacity:y=1}=d,{points:m,y:b,y1:_}=f,O=os(r,m,[b,_]),{innerRadius:w,outerRadius:M}=O,E=Gd().cornerRadius(h).padAngle(p*Math.PI/180),A=new ni({}),P=r.getCenter(),C=k=>{A.attr({d:E(k),transform:`translate(${P[0]}, ${P[1]})`});const R=O0(A);return A.style.transform="",R},D=[{scaleInYRadius:w+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:w+1e-4,fillOpacity:v,strokeOpacity:g,opacity:y,offset:.01},{scaleInYRadius:M,fillOpacity:v,strokeOpacity:g,opacity:y}],N=u.animate(D,Object.assign(Object.assign({},o),t));return N.onframe=function(){u.style.path=C(Object.assign(Object.assign({},O),{outerRadius:Number(u.style.scaleInYRadius)}))},N.onfinish=function(){u.style.path=C(Object.assign(Object.assign({},O),{outerRadius:M}))},N},l=u=>{const{style:f}=u,{transform:d="",fillOpacity:h=1,strokeOpacity:p=1,opacity:v=1}=f,[g,y]=Gn(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],m=[{transform:`${d} ${y}`.trimStart(),transformOrigin:g,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${d} ${y}`.trimStart(),transformOrigin:g,fillOpacity:h,strokeOpacity:p,opacity:v,offset:.01},{transform:`${d} scale(1, 1)`.trimStart(),transformOrigin:g,fillOpacity:h,strokeOpacity:p,opacity:v}];return u.animate(m,Object.assign(Object.assign({},o),t))};return Nn(r)?c(s):l(s)}},FZ=(t,e)=>{const{coordinate:r}=e;return(i,a,o)=>{const[s]=i,{transform:c="",fillOpacity:l=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=Gn(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],p=[{transform:`${c} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:l,strokeOpacity:u,opacity:f,offset:.99},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),t))}},iP=(t,e)=>{Xx.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:oe.NUMBER});const{coordinate:r}=e;return(i,a,o)=>{const[s]=i;if(!Nn(r))return by(t,e)(i,a,o);const c=r.getCenter(),{__data__:l,style:u}=s,{radius:f=0,inset:d=0,fillOpacity:h=1,strokeOpacity:p=1,opacity:v=1}=u,{points:g,y,y1:m}=l,b=Gd().cornerRadius(f).padAngle(d*Math.PI/180),_=os(r,g,[y,m]),{startAngle:O,endAngle:w}=_,M=new ni({}),E=C=>{M.attr({d:b(C),transform:`translate(${c[0]}, ${c[1]})`});const D=O0(M);return M.style.transform="",D},A=[{waveInArcAngle:O+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:O+1e-4,fillOpacity:h,strokeOpacity:p,opacity:v,offset:.01},{waveInArcAngle:w,fillOpacity:h,strokeOpacity:p,opacity:v}],P=s.animate(A,Object.assign(Object.assign({},o),t));return P.onframe=function(){s.style.path=E(Object.assign(Object.assign({},_),{endAngle:Number(s.style.waveInArcAngle)}))},P.onfinish=function(){s.style.path=E(Object.assign(Object.assign({},_),{endAngle:w}))},P}};iP.props={};const aP=t=>(e,n,r)=>{const[i]=e,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,c=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}];return i.animate(c,Object.assign(Object.assign({},r),t))};aP.props={};const oP=t=>(e,n,r)=>{const[i]=e,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,c=[{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(c,Object.assign(Object.assign({},r),t))};oP.props={};const BZ=t=>(n,r,i)=>{const[a]=n,{transform:o="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=a.style,u="center center",f=[{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l}];return a.animate(f,Object.assign(Object.assign({},i),t))},zZ=t=>(n,r,i)=>{const[a]=n,{transform:o="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=a.style,u="center center",f=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.99},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return a.animate(f,Object.assign(Object.assign({},i),t))},sP=t=>(e,n,r)=>{var i,a;const[o]=e,s=((a=(i=o).getTotalLength)===null||a===void 0?void 0:a.call(i))||0,c=[{lineDash:[0,s]},{lineDash:[s,0]}];return o.animate(c,Object.assign(Object.assign({},r),t))};sP.props={};function Mc(t,e){const n={};for(const r of e){const i=t.style[r];i&&(n[r]=i)}return n}const Ec=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function xy(t){const{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[a,o]=n,s=o-i,c=a-r;return[r,i,c,s]}function GZ(t){const[e,n,r,i]=t;return`
|
|
M ${e} ${n}
|
|
L ${e+r} ${n}
|
|
L ${e+r} ${n+i}
|
|
L ${e} ${n+i}
|
|
Z
|
|
`}function WZ(t,e){const[n,r,i,a]=xy(t),o=a/i,s=Math.ceil(Math.sqrt(e/o)),c=Math.ceil(e/s),l=[],u=a/c;let f=0,d=e;for(;d>0;){const h=Math.min(d,s),p=i/h;for(let v=0;v<h;v++){const g=n+v*p,y=r+f*u;l.push(GZ([g,y,p,u]))}d-=h,f+=1}return l}function HZ(t="pack"){return typeof t=="function"?t:WZ}function YZ(t,e,n){const[r,i,a,o]=xy(t),{transform:s}=t.style,{transform:c}=e.style;cP(e,t);const[l,u,f,d]=xy(e),h=r-l,p=i-u,v=a/f,g=o/d,y=[Object.assign({transform:`${s?s+" ":""}translate(${h}, ${p}) scale(${v}, ${g})`},Mc(t,Ec)),Object.assign({transform:`${c?c+" ":""}translate(0, 0) scale(1, 1)`},Mc(e,Ec))];return e.animate(y,n)}function cP(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function VZ(t,e){const{nodeName:n}=t;if(n==="path")return t;const r=new ni({style:Object.assign(Object.assign({},Mc(t,Ec)),{d:e})});return cP(r,t),r}function lP(t,e){const n=t.indexOf(e),r=t.lastIndexOf(e);return n===r}function $Z(t){return!lP(t,"m")||!lP(t,"M")}function uP(t){const e=O0(t);if(e&&!$Z(e))return e}function _y(t,e,n,r){const{nodeName:i}=e,{nodeName:a}=n,o=uP(e),s=uP(n);if(i===a&&i!=="path"||(o===void 0||s===void 0))return YZ(e,n,r);const u=VZ(t,o),f=[Object.assign({path:o},Mc(e,Ec)),Object.assign({path:s},Mc(n,Ec))],d=u.animate(f,r);return d.onfinish=()=>{u.style.transform="none",av(u,n)},u.style.transform="none",d}function XZ(t,e,n,r){t.style.visibility="hidden";const i=r(t,e.length);return e.map((a,o)=>{const s=new ni({style:Object.assign({path:i[o]},Mc(t,Ec))});return _y(a,s,a,n)})}function UZ(t,e,n,r){const i=r(e,t.length),{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=e.style,c=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:a,strokeOpacity:o,opacity:s}],l=e.animate(c,n);return[...t.map((f,d)=>{const h=new ni({style:{path:i[d],fill:e.style.fill}});return _y(f,f,h,n)}),l]}const fP=t=>(e,n,r)=>{const i=HZ(t.split),a=Object.assign(Object.assign({},r),t),{length:o}=e,{length:s}=n;if(o===1&&s===1||o>1&&s>1){const[c]=e,[l]=n;return _y(c,c,l,a)}if(o===1&&s>1){const[c]=e;return XZ(c,n,a,i)}if(o>1&&s===1){const[c]=n;return UZ(e,c,a,i)}return null};fP.props={};const dP=(t,e)=>(n,r,i)=>{const[a]=n,{height:o,width:s}=a.getBoundingClientRect(),c=new ni({style:{path:`M0,0L${s},0L${s},${o}L0,${o}Z`}});return a.appendChild(c),a.style.clipPath=c,by(t,e)([c],r,i)};dP.props={};const hP=(t,e)=>(n,r,i)=>{const[a]=n,{height:o,width:s}=a.getBoundingClientRect(),c=new ni({style:{path:`M0,0L${s},0L${s},${o}L0,${o}Z`}});return a.appendChild(c),a.style.clipPath=c,rP(t,e)([c],r,i)};hP.props={};var eu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Eo(t){return Ne(t).selectAll(`.${Ra}`).nodes().filter(e=>!e.__removed__)}function pP(t,e){return Oy(t,e).flatMap(({container:n})=>Eo(n))}function Oy(t,e){return e.filter(n=>n!==t&&n.options.parentKey===t.options.key)}function Ga(t){return Ne(t).select(`.${zf}`).node()}function vP(t){if(t.nodeName!=="rect")return t.getRenderBounds();const{x:e,y:n,width:r,height:i}=t.style;return{min:[e,n],max:[e+r,n+i]}}function wy(t,e){const{offsetX:n,offsetY:r}=e,i=vP(t),{min:[a,o],max:[s,c]}=i,l=n<a||n>s,u=r<o||r>c;return l||u?null:[n-a,r-o]}function Sy(t,e){const{offsetX:n,offsetY:r}=e,[i,a,o,s]=qZ(t);return[Math.min(o,Math.max(i,n))-i,Math.min(s,Math.max(a,r))-a]}function qZ(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return[n,r,i,a]}function gP(t){return e=>e.__data__.color}function My(t){return e=>e.__data__.x}function xs(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap(r=>Array.from(r.markState.keys()).map(a=>[uh(r.key,a.key),a.data])));return r=>{const{index:i,markKey:a,viewKey:o}=r.__data__;return n.get(uh(o,a))[i]}}function Wa(t,e=(r,i)=>r,n=(r,i,a)=>r.setAttribute(i,a)){const r="__states__",i="__ordinal__",a=u=>{const{[r]:f=[],[i]:d={}}=u,h=f.reduce((p,v)=>Object.assign(Object.assign({},p),t[v]),d);if(Object.keys(h).length!==0){for(const[p,v]of Object.entries(h)){const g=N$(u,p),y=e(v,u);n(u,p,y),p in d||(d[p]=g)}u[i]=d}},o=u=>{u[r]||(u[r]=[])};return{setState:(u,...f)=>{o(u),u[r]=[...f],a(u)},removeState:(u,...f)=>{o(u);for(const d of f){const h=u[r].indexOf(d);h!==-1&&u[r].splice(h,1)}a(u)},hasState:(u,f)=>(o(u),u[r].indexOf(f)!==-1)}}function ZZ(t){return t===void 0?!0:typeof t!="object"?!1:Object.keys(t).length===0}function uh(t,e){return`${t},${e}`}function Ac(t,e){const r=(Array.isArray(t)?t:[t]).flatMap(a=>a.marks.map(o=>[uh(a.key,o.key),o.state])),i={};for(const a of e){const[o,s]=Array.isArray(a)?a:[a,{}];i[o]=r.reduce((c,l)=>{const[u,f={}]=l,d=ZZ(f[o])?s:f[o];for(const[h,p]of Object.entries(d)){const v=c[h],g=(y,m,b,_)=>{const O=uh(_.__data__.viewKey,_.__data__.markKey);return u!==O?v==null?void 0:v(y,m,b,_):typeof p!="function"?p:p(y,m,b,_)};c[h]=g}return c},{})}return i}function nu(t,e){const n=new Map(t.map((i,a)=>[i,a])),r=e?t.map(e):t;return(i,a)=>{if(typeof i!="function")return i;const o=n.get(a),s=e?e(a):a;return i(s,o,r,a)}}function yP(t){var{link:e=!1,valueof:n=(u,f)=>u,coordinate:r}=t,i=eu(t,["link","valueof","coordinate"]);const a="element-link";if(!e)return[()=>{},()=>{}];const o=u=>u.__data__.points,s=(u,f)=>{const[,d,h]=u,[p,,,v]=f;return[d,p,v,h]};return[u=>{var f;if(u.length<=1)return;const d=za(u,(h,p)=>{const{x:v}=h.__data__,{x:g}=p.__data__;return v-g});for(let h=1;h<d.length;h++){const p=zi(),v=d[h-1],g=d[h],[y,m,b,_]=s(o(v),o(g));p.moveTo(...y),p.lineTo(...m),p.lineTo(...b),p.lineTo(..._),p.closePath();const O=fo(i,A=>n(A,v)),{fill:w=v.getAttribute("fill")}=O,M=eu(O,["fill"]),E=new ni({className:a,style:Object.assign({d:p.toString(),fill:w,zIndex:-2},M)});(f=v.link)===null||f===void 0||f.remove(),v.parentNode.appendChild(E),v.link=E}},u=>{var f;(f=u.link)===null||f===void 0||f.remove(),u.link=null}]}function mP(t,e,n){const r=i=>{const{transform:a}=t.style;return a?`${a} ${i}`:i};if(Nn(n)){const{points:i}=t.__data__,[a,o]=Gn(n)?bd(i):i,s=n.getCenter(),c=fr(a,s),l=fr(o,s),u=Bi(c),f=RO(c,l),d=u+f/2,h=e*Math.cos(d),p=e*Math.sin(d);return r(`translate(${h}, ${p})`)}return Gn(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function bP(t){var{document:e,background:n,scale:r,coordinate:i,valueof:a}=t,o=eu(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(y,m,b)=>{const _=y.invert(m),O=m+y.getBandWidth(_)/2,w=y.getStep(_)/2,M=w*b;return[O-w+M,O+w-M]},l=(y,m)=>{const{x:b}=r;if(!Ql(b))return[0,1];const{__data__:_}=y,{x:O}=_,[w,M]=c(b,O,m);return[w,M]},u=(y,m)=>{const{y:b}=r;if(!Ql(b))return[0,1];const{__data__:_}=y,{y:O}=_,[w,M]=c(b,O,m);return[w,M]},f=(y,m)=>{const{padding:b}=m,[_,O]=l(y,b),[w,M]=u(y,b),E=[[_,w],[O,w],[O,M],[_,M]].map(D=>i.map(D)),{__data__:A}=y,{y:P,y1:C}=A;return nM(e,E,{y:P,y1:C},i,m)},d=(y,m)=>{const{transform:b="scale(1.2, 1.2)",transformOrigin:_="center center",stroke:O=""}=m,w=eu(m,["transform","transformOrigin","stroke"]),M=Object.assign({transform:b,transformOrigin:_,stroke:O},w),E=y.cloneNode(!0);for(const[A,P]of Object.entries(M))E.style[A]=P;return E},h=()=>{const{x:y,y:m}=r;return[y,m].some(Ql)};return[y=>{y.background&&y.background.remove();const m=fo(o,D=>a(D,y)),{fill:b="#CCD6EC",fillOpacity:_=.3,zIndex:O=-2,padding:w=.001,strokeWidth:M=0}=m,E=eu(m,["fill","fillOpacity","zIndex","padding","strokeWidth"]),A=Object.assign(Object.assign({},E),{fill:b,fillOpacity:_,zIndex:O,padding:w,strokeWidth:M}),C=(h()?f:d)(y,A);C.className=s,y.parentNode.parentNode.appendChild(C),y.background=C},y=>{var m;(m=y.background)===null||m===void 0||m.remove(),y.background=null},y=>y.className===s]}function Ao(t,e){const r=t.getRootNode().defaultView.getContextService().getDomElement();r!=null&&r.style&&(t.cursor=r.style.cursor,r.style.cursor=e)}function KZ(t){Ao(t,t.cursor)}function Ey(t,e,n){return t.find(r=>Object.entries(e).every(([i,a])=>n(r)[i]===a))}var QZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function JZ(t,{elements:e,datum:n,groupKey:r=f=>f,link:i=!1,background:a=!1,delay:o=60,scale:s,coordinate:c,emitter:l,state:u={}}){var f;const d=e(t),h=new Set(d),p=Kn(d,r),v=nu(d,n),[g,y]=yP(Object.assign({elements:d,valueof:v,link:i,coordinate:c},se(u.active,"link"))),[m,b,_]=bP(Object.assign({document:t.ownerDocument,scale:s,coordinate:c,background:a,valueof:v},se(u.active,"background"))),O=Nt(u,{active:Object.assign({},((f=u.active)===null||f===void 0?void 0:f.offset)&&{transform:(...F)=>{const B=u.active.offset(...F),[,z]=F;return mP(d[z],B,c)}})}),{setState:w,removeState:M,hasState:E}=Wa(O,v);let A;const P=F=>{const{target:B,nativeEvent:z=!0}=F;if(!h.has(B))return;A&&clearTimeout(A);const Y=r(B),U=p.get(Y),tt=new Set(U);for(const rt of d)tt.has(rt)?E(rt,"active")||w(rt,"active"):(w(rt,"inactive"),y(rt)),rt!==B&&b(rt);m(B),g(U),z&&l.emit("element:highlight",{nativeEvent:z,data:{data:n(B),group:U.map(n)}})},C=()=>{A&&clearTimeout(A),A=setTimeout(()=>{D(),A=null},o)},D=(F=!0)=>{for(const B of d)M(B,"active","inactive"),b(B),y(B);F&&l.emit("element:unhighlight",{nativeEvent:F})},N=F=>{const{target:B}=F;a&&!_(B)||!a&&!h.has(B)||(o>0?C():D())},k=()=>{D()};t.addEventListener("pointerover",P),t.addEventListener("pointerout",N),t.addEventListener("pointerleave",k);const R=F=>{const{nativeEvent:B}=F;B||D(!1)},I=F=>{const{nativeEvent:B}=F;if(B)return;const{data:z}=F.data,Y=Ey(d,z,n);Y&&P({target:Y,nativeEvent:!1})};return l.on("element:highlight",I),l.on("element:unhighlight",R),()=>{t.removeEventListener("pointerover",P),t.removeEventListener("pointerout",N),t.removeEventListener("pointerleave",k),l.off("element:highlight",I),l.off("element:unhighlight",R);for(const F of d)b(F),y(F)}}function fh(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,a=QZ(t,["delay","createGroup","background","link"]);return(o,s,c)=>{const{container:l,view:u,options:f}=o,{scale:d,coordinate:h}=u,p=Ga(l);return JZ(p,Object.assign({elements:Eo,datum:xs(u),groupKey:n?n(u):void 0,coordinate:h,scale:d,state:Ac(f,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:e,emitter:c},a))}}fh.props={reapplyWhenUpdate:!0};function xP(t){return fh(Object.assign(Object.assign({},t),{createGroup:My}))}xP.props={reapplyWhenUpdate:!0};function _P(t){return fh(Object.assign(Object.assign({},t),{createGroup:gP}))}_P.props={reapplyWhenUpdate:!0};var tK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function eK(t,{elements:e,datum:n,groupKey:r=f=>f,link:i=!1,single:a=!1,coordinate:o,background:s=!1,scale:c,emitter:l,state:u={}}){var f;const d=e(t),h=new Set(d),p=Kn(d,r),v=nu(d,n),[g,y]=yP(Object.assign({link:i,elements:d,valueof:v,coordinate:o},se(u.selected,"link"))),[m,b]=bP(Object.assign({document:t.ownerDocument,background:s,coordinate:o,scale:c,valueof:v},se(u.selected,"background"))),_=Nt(u,{selected:Object.assign({},((f=u.selected)===null||f===void 0?void 0:f.offset)&&{transform:(...k)=>{const R=u.selected.offset(...k),[,I]=k;return mP(d[I],R,o)}})}),{setState:O,removeState:w,hasState:M}=Wa(_,v),E=(k=!0)=>{for(const R of d)w(R,"selected","unselected"),y(R),b(R);k&&l.emit("element:unselect",{nativeEvent:!0})},A=(k,R,I=!0)=>{if(M(R,"selected"))E();else{const F=r(R),B=p.get(F),z=new Set(B);for(const Y of d)z.has(Y)?O(Y,"selected"):(O(Y,"unselected"),y(Y)),Y!==R&&b(Y);if(g(B),m(R),!I)return;l.emit("element:select",Object.assign(Object.assign({},k),{nativeEvent:I,data:{data:[n(R),...B.map(n)]}}))}},P=(k,R,I=!0)=>{const F=r(R),B=p.get(F),z=new Set(B);if(M(R,"selected")){if(!d.some(U=>!z.has(U)&&M(U,"selected")))return E();for(const U of B)O(U,"unselected"),y(U),b(U)}else{const Y=B.some(U=>M(U,"selected"));for(const U of d)z.has(U)?O(U,"selected"):M(U,"selected")||O(U,"unselected");!Y&&i&&g(B),m(R)}I&&l.emit("element:select",Object.assign(Object.assign({},k),{nativeEvent:I,data:{data:d.filter(Y=>M(Y,"selected")).map(n)}}))},C=k=>{const{target:R,nativeEvent:I=!0}=k;return h.has(R)?a?A(k,R,I):P(k,R,I):E()};t.addEventListener("click",C);const D=k=>{const{nativeEvent:R,data:I}=k;if(R)return;const F=a?I.data.slice(0,1):I.data;for(const B of F){const z=Ey(d,B,n);C({target:z,nativeEvent:!1})}},N=()=>{E(!1)};return l.on("element:select",D),l.on("element:unselect",N),()=>{for(const k of d)y(k);t.removeEventListener("click",C),l.off("element:select",D),l.off("element:unselect",N)}}function dh(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=tK(t,["createGroup","background","link"]);return(a,o,s)=>{const{container:c,view:l,options:u}=a,{coordinate:f,scale:d}=l,h=Ga(c);return eK(h,Object.assign({elements:Eo,datum:xs(l),groupKey:e?e(l):void 0,coordinate:f,scale:d,state:Ac(u,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:s},i))}}dh.props={reapplyWhenUpdate:!0};function OP(t){return dh(Object.assign(Object.assign({},t),{createGroup:My}))}OP.props={reapplyWhenUpdate:!0};function wP(t){return dh(Object.assign(Object.assign({},t),{createGroup:gP}))}wP.props={reapplyWhenUpdate:!0};var _s=function(t,e,n){var r,i,a,o,s=0;n||(n={});var c=function(){s=n.leading===!1?0:Date.now(),r=null,o=t.apply(i,a),r||(i=a=null)},l=function(){var u=Date.now();!s&&n.leading===!1&&(s=u);var f=e-(u-s);return i=this,a=arguments,f<=0||f>e?(r&&(clearTimeout(r),r=null),s=u,o=t.apply(i,a),r||(i=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(c,f)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l};function nK(t){const{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(a=>a.type==="fisheye");if(r)return r;const i={type:"fisheye"};return n.push(i),e.transform=n,t.coordinate=e,i}function rK({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,c=Ga(s),l=_s(u=>{const f=wy(c,u);if(!f){o("fisheye"),a();return}o("fisheye",d=>{const h=Nt({},d,{interaction:{tooltip:{preserve:!0}}});for(const y of h.marks)y.animate=!1;const[p,v]=f,g=nK(h);return g.focusX=p,g.focusY=v,g.visual=!0,h}),a()},t,{leading:e,trailing:n});return c.addEventListener("pointerenter",l),c.addEventListener("pointermove",l),c.addEventListener("pointerleave",l),()=>{c.removeEventListener("pointerenter",l),c.removeEventListener("pointermove",l),c.removeEventListener("pointerleave",l)}}}var iK=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},aK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function oK(t){const{transform:e=[]}=t,n=e.find(i=>i.type==="normalizeY");if(n)return n;const r={type:"normalizeY"};return e.push(r),t.transform=e,r}function sK(t,e,n){const[r]=Array.from(t.entries()).filter(([i])=>i.type===e).map(([i])=>{const{encode:a}=i,o=s=>{const c=a[s];return[s,c?c.value:void 0]};return Object.fromEntries(n.map(o))});return r}function SP(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=o=>`${o}`}=t,a=aK(t,["wait","leading","trailing","labelFormatter"]);return o=>{const{view:s,container:c,update:l,setState:u}=o,{markState:f,scale:d,coordinate:h}=s,p=sK(f,"line",["x","y","series"]);if(!p)return;const{y:v,x:g,series:y=[]}=p,m=v.map((F,B)=>B),b=za(m.map(F=>g[F])),_=Ga(c),O=c.getElementsByClassName(Ra),w=c.getElementsByClassName(K0),E=Kn(w,F=>F.__data__.key.split("-")[0]),A=new ol({style:Object.assign({x1:0,y1:0,x2:0,y2:_.getAttribute("height"),stroke:"black",lineWidth:1},se(a,"rule"))}),P=new ca({style:Object.assign({x:0,y:_.getAttribute("height"),text:"",fontSize:10},se(a,"label"))});A.append(P),_.appendChild(A);const C=(F,B,z)=>{const[Y]=F.invert(z),U=B.invert(Y);return b[EZ(b,U)]},D=(F,B)=>{A.setAttribute("x1",F[0]),A.setAttribute("x2",F[0]),P.setAttribute("text",i(B))};let N;const k=F=>iK(this,void 0,void 0,function*(){const{x:B}=d,z=C(h,B,F);D(F,z),u("chartIndex",U=>{const tt=Nt({},U),rt=tt.marks.find(Pt=>Pt.type==="line"),Bt=Mn(ev(m,Pt=>Mn(Pt,ce=>+v[ce])/Mi(Pt,ce=>+v[ce]),Pt=>y[Pt]).values()),Xt=[1/Bt,Bt];Nt(rt,{scale:{y:{domain:Xt}}});const Tt=oK(rt);Tt.groupBy="color",Tt.basis=(Pt,ce)=>{const le=Pt[wc(_e=>g[+_e]).center(Pt,z)];return ce[le]};for(const Pt of tt.marks)Pt.animate=!1;return tt}),N=(yield l("chartIndex")).view}),R=F=>{const{scale:B,coordinate:z}=N,{x:Y,y:U}=B,tt=C(z,Y,F);D(F,tt);for(const rt of O){const{seriesIndex:wt,key:Bt}=rt.__data__,Xt=wt[wc(Be=>g[+Be]).center(wt,tt)],Tt=[0,U.map(1)],Pt=[0,U.map(v[Xt]/v[wt[0]])],[,ce]=z.map(Tt),[,le]=z.map(Pt),_e=ce-le;rt.setAttribute("transform",`translate(0, ${_e})`);const He=E.get(Bt)||[];for(const Be of He)Be.setAttribute("dy",_e)}},I=_s(F=>{const B=wy(_,F);B&&R(B)},e,{leading:n,trailing:r});return k([0,0]),_.addEventListener("pointerenter",I),_.addEventListener("pointermove",I),_.addEventListener("pointerleave",I),()=>{A.remove(),_.removeEventListener("pointerenter",I),_.removeEventListener("pointermove",I),_.removeEventListener("pointerleave",I)}}}SP.props={reapplyWhenUpdate:!0};function ru(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 a of t)(a=e(a,++i,t))!=null&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function hh(t,e){let n,r=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(n>a||n===void 0&&a>=a)&&(n=a,r=i);else for(let a of t)(a=e(a,++i,t))!=null&&(n>a||n===void 0&&a>=a)&&(n=a,r=i);return r}function MP(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}function cK(t,e){return!t||!e?t:t.replace(/\\?\{([^{}]+)\}/g,function(n,r){return n.charAt(0)==="\\"?n.slice(1):e[r]===void 0?"":e[r]})}var lK=cK;function Ay(t){return t===void 0&&(t=""),{CONTAINER:"".concat(t,"tooltip"),TITLE:"".concat(t,"tooltip-title"),LIST:"".concat(t,"tooltip-list"),LIST_ITEM:"".concat(t,"tooltip-list-item"),NAME:"".concat(t,"tooltip-list-item-name"),MARKER:"".concat(t,"tooltip-list-item-marker"),NAME_LABEL:"".concat(t,"tooltip-list-item-name-label"),VALUE:"".concat(t,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(t,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(t,"tooltip-crosshair-y")}}var EP={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function uK(t){var e;t===void 0&&(t="");var n=Ay(t);return e={},e[".".concat(n.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},e[".".concat(n.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(n.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(n.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(n.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(n.NAME)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(n.NAME_LABEL)]=(0,S.pi)({flex:1},EP),e[".".concat(n.VALUE)]=(0,S.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},EP),e[".".concat(n.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(n.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e}var fK=function(t){(0,S.ZT)(e,t);function e(n){var r=this,i,a,o=(a=(i=n.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,s=Ay(o);return r=t.call(this,n,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(s.CONTAINER,'"></div>'),title:'<div class="'.concat(s.TITLE,'"></div>'),item:'<li class="'.concat(s.LIST_ITEM,`" data-index={index}>
|
|
<span class="`).concat(s.NAME,`">
|
|
<span class="`).concat(s.MARKER,`" style="background:{color}"></span>
|
|
<span class="`).concat(s.NAME_LABEL,`" title="{name}">{name}</span>
|
|
</span>
|
|
<span class="`).concat(s.VALUE,`" title="{value}">{value}</span>
|
|
</li>`)},style:uK(o)})||this,r.timestamp=-1,r.prevCustomContentKey=r.attributes.contentKey,r.initShape(),r.render(r.attributes,r),r}return Object.defineProperty(e.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.element},Object.defineProperty(e.prototype,"elementSize",{get:function(){var n=this.element.offsetWidth,r=this.element.offsetHeight;return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var n=this.attributes,r=n.data,i=n.template;return r.map(function(a,o){var s=a.name,c=s===void 0?"":s,l=a.color,u=l===void 0?"black":l,f=a.index,d=(0,S._T)(a,["name","color","index"]),h=(0,S.pi)({name:c,color:u,index:f!=null?f:o},d);return MP(lK(i.item,h))})},enumerable:!1,configurable:!0}),e.prototype.render=function(n,r){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var n;(n=this.element)===null||n===void 0||n.remove(),t.prototype.destroy.call(this)},e.prototype.show=function(n,r){var i=this;if(n!==void 0&&r!==void 0){var a=this.element.style.visibility==="hidden",o=function(){i.attributes.x=n!=null?n:i.attributes.x,i.attributes.y=r!=null?r:i.attributes.y,i.updatePosition()};a?this.closeTransition(o):o()}this.element.style.visibility="visible"},e.prototype.hide=function(n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=this.attributes.enterable;i&&this.isCursorEntered(n,r)||(this.element.style.visibility="hidden")},e.prototype.initShape=function(){var n=this.attributes.template;this.element=MP(n.container),this.id&&this.element.setAttribute("id",this.id)},e.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var n=this.attributes.content;n&&(typeof n=="string"?this.element.innerHTML=n:this.element.replaceChildren(n))}},e.prototype.renderHTMLTooltipElement=function(){var n,r,i=this.attributes,a=i.template,o=i.title,s=i.enterable,c=i.style,l=i.content,u=Ay(a.prefixCls),f=this.element;if(this.element.style.pointerEvents=s?"auto":"none",l)this.renderCustomContent();else{o?(f.innerHTML=a.title,f.getElementsByClassName(u.TITLE)[0].innerHTML=o):(r=(n=f.getElementsByClassName(u.TITLE))===null||n===void 0?void 0:n[0])===null||r===void 0||r.remove();var d=this.HTMLTooltipItemsElements,h=document.createElement("ul");h.className=u.LIST,h.replaceChildren.apply(h,(0,S.ev)([],(0,S.CR)(d),!1));var p=this.element.querySelector(".".concat(u.LIST));p?p.replaceWith(h):f.appendChild(h)}jF(f,c)},e.prototype.getRelativeOffsetFromCursor=function(n){var r=this.attributes,i=r.position,a=r.offset,o=n||i,s=o.split("-"),c={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},l=this.elementSize,u=l.width,f=l.height,d=[-u/2,-f/2];return s.forEach(function(h){var p=(0,S.CR)(d,2),v=p[0],g=p[1],y=(0,S.CR)(c[h],2),m=y[0],b=y[1];d=[v+(u/2+a[0])*m,g+(f/2+a[1])*b]}),d},e.prototype.setOffsetPosition=function(n){var r=(0,S.CR)(n,2),i=r[0],a=r[1],o=this.attributes,s=o.x,c=s===void 0?0:s,l=o.y,u=l===void 0?0:l,f=o.container,d=f.x,h=f.y;this.element.style.left="".concat(+c+d+i,"px"),this.element.style.top="".concat(+u+h+a,"px")},e.prototype.updatePosition=function(){var n=this.attributes.showDelay,r=n===void 0?60:n,i=Date.now();this.timestamp>0&&i-this.timestamp<r||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},e.prototype.autoPosition=function(n){var r=(0,S.CR)(n,2),i=r[0],a=r[1],o=this.attributes,s=o.x,c=o.y,l=o.bounding,u=o.position;if(!l)return[i,a];var f=this.element,d=f.offsetWidth,h=f.offsetHeight,p=(0,S.CR)([+s+i,+c+a],2),v=p[0],g=p[1],y={left:"right",right:"left",top:"bottom",bottom:"top"},m=l.x,b=l.y,_=l.width,O=l.height,w={left:v<m,right:v+d>m+_,top:g<b,bottom:g+h>b+O},M=[];u.split("-").forEach(function(A){w[A]?M.push(y[A]):M.push(A)});var E=M.join("-");return this.getRelativeOffsetFromCursor(E)},e.prototype.isCursorEntered=function(n,r){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,o=i.y,s=i.width,c=i.height;return new Wn(a,o,s,c).isPointIn(n,r)}return!1},e.prototype.closeTransition=function(n){var r=this,i=this.element.style.transition;this.element.style.transition="none",n(),setTimeout(function(){r.element.style.transition=i},10)},e.tag="tooltip",e}(Rr),iu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ph(t,e){return e?typeof e=="string"?document.querySelector(e):e:t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function dK(t){const e=t.getBounds(),{min:[n,r],max:[i,a]}=e;return{x:n,y:r,width:i-n,height:a-r}}function hK(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}function pK(t,e,n,r,i,a,o,s={}){const c={".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},l=new fK({className:"tooltip",style:{x:e,y:n,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:Nt(c,s)}});return t.appendChild(l.HTMLTooltipElement),l}function AP({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:c=!1,css:l,mount:u,bounding:f}){const d=ph(t,u),h=ph(t),p=o?h:t,v=f||dK(t),g=hK(h,d),{tooltipElement:y=pK(d,n,r,s,c,v,g,l)}=p,{items:m,title:b=""}=e;y.update(Object.assign({x:n,y:r,data:m,title:b,position:s,enterable:c},i!==void 0&&{content:i(a,{items:m,title:b})})),p.tooltipElement=y}function To({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const a=ph(t),o=e?a:t,{tooltipElement:s}=o;s&&s.hide(i==null?void 0:i.clientX,i==null?void 0:i.clientY)}function Ty({root:t,single:e}){const n=ph(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0)}function TP(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:e===void 0?"undefined":e})}function vK(t){const{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(Ln).map(a=>{var{color:o=PP(t)}=a,s=iu(a,["color"]);return Object.assign(Object.assign({},s),{color:o})}).map(TP);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}function gK(t,e){const{color:n,series:r,facet:i=!1}=t,{color:a,series:o}=e,s=c=>c&&c.invert&&!(c instanceof Oo)&&!(c instanceof Al);if(s(r))return r.clone().invert(o);if(o&&r instanceof Oo&&r.invert(o)!==a&&!i)return r.invert(o);if(s(n)){const c=n.invert(a);return Array.isArray(c)?null:c}return null}function PP(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=e&&e!=="transparent"?e:n}=r;return i}function CP(t,e=n=>n){const n=new Map(t.map(r=>[e(r),r]));return Array.from(n.values())}function kP(t,e,n,r=t.map(a=>a.__data__),i={}){const a=c=>c instanceof Date?+c:c,o=CP(r.map(c=>c.title),a).filter(Ln),s=r.flatMap((c,l)=>{const u=t[l],{items:f=[],title:d}=c,h=f.filter(Ln),p=n!==void 0?n:f.length<=1;return h.map(v=>{var{color:g=PP(u)||i.color,name:y}=v,m=iu(v,["color","name"]);const b=gK(e,c),_=p?b||y:y||b;return Object.assign(Object.assign({},m),{color:g,name:_||d})})}).map(TP);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:CP(s,c=>`(${a(c.name)}, ${a(c.value)}, ${a(c.color)})`)})}function yK(t,e,n){var{plotWidth:r,plotHeight:i,mainWidth:a,mainHeight:o,startX:s,startY:c,transposed:l,polar:u,insetLeft:f,insetTop:d}=n,h=iu(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},h),v=e.map(A=>A[1]),g=e.map(A=>A[0]),y=ru(v),m=ru(g),b=()=>{if(u){const A=Math.min(a,o)/2,P=s+f+a/2,C=c+d+o/2,D=Bi(fr([m,y],[P,C])),N=P+A*Math.cos(D),k=C+A*Math.sin(D);return[P,N,C,k]}return l?[s,s+r,y+c,y+c]:[m+s,m+s,c,c+i]},[_,O,w,M]=b(),E=()=>{const A=new ol({style:Object.assign({x1:_,x2:O,y1:w,y2:M},p)});return t.appendChild(A),A};if(g.length>0){const A=t.ruleY||E();A.style.x1=_,A.style.x2=O,A.style.y1=w,A.style.y2=M,t.ruleY=A}}function RP(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function mK(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach(a=>a.remove());const i=e.filter(a=>{const[{x:o,y:s}]=a;return Ln(o)&&Ln(s)}).map(a=>{const[{color:o,element:s},c]=a,l=o||s.style.fill||s.style.stroke||r.color;return new al({style:Object.assign({cx:c[0],cy:c[1],fill:l,r:4,stroke:"#fff",strokeWidth:2},n)})});for(const a of i)t.appendChild(a);t.markers=i}function LP(t){t.markers&&(t.markers.forEach(e=>e.remove()),t.markers=[])}function NP(t,e){return Array.from(t.values()).some(n=>{var r;return(r=n.interaction)===null||r===void 0?void 0:r[e]})}function Py(t,e){return t===void 0?e:t}function IP(t){const{title:e,items:n}=t;return n.length===0&&e===void 0}function bK(t){return Array.from(t.values()).some(e=>{var n;return((n=e.interaction)===null||n===void 0?void 0:n.seriesTooltip)&&e.tooltip})}function jP(t,e){var{elements:n,sort:r,filter:i,scale:a,coordinate:o,crosshairs:s,render:c,groupName:l,emitter:u,wait:f=50,leading:d=!0,trailing:h=!1,startX:p=0,startY:v=0,body:g=!0,single:y=!0,position:m,enterable:b,mount:_,bounding:O,theme:w,disableNative:M=!1,marker:E=!0,preserve:A=!1,style:P={},css:C={}}=e,D=iu(e,["elements","sort","filter","scale","coordinate","crosshairs","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","disableNative","marker","preserve","style","css"]);const N=n(t),k=Gn(o),R=Nn(o),I=Nt(P,D),{innerWidth:F,innerHeight:B,width:z,height:Y,insetLeft:U,insetTop:tt}=o.getOptions(),rt=[],wt=[];for(const pn of N){const{__data__:_n}=pn,{seriesX:ar,title:An,items:Mr}=_n;ar?rt.push(pn):(An||Mr)&&wt.push(pn)}const Xt=!!(k?a.y:a.x).getBandWidth&&wt.length>0;rt.sort((pn,_n)=>{const ar=k?0:1,An=Mr=>Mr.getBounds().min[ar];return k?An(_n)-An(pn):An(pn)-An(_n)});const Tt=pn=>{const _n=k?1:0,{min:ar,max:An}=pn.getLocalBounds();return za([ar[_n],An[_n]])};wt.sort((pn,_n)=>{const[ar,An]=Tt(pn),[Mr,Tr]=Tt(_n),xi=(ar+An)/2,Ci=(Mr+Tr)/2;return k?Ci-xi:xi-Ci});const Pt=new Map(rt.map(pn=>{const{__data__:_n}=pn,{seriesX:ar}=_n,An=ar.map((Tr,xi)=>xi),Mr=za(An,Tr=>ar[+Tr]);return[pn,[Mr,ar]]})),{x:ce}=a,le=ce!=null&&ce.getBandWidth?ce.getBandWidth()/2:0,_e=pn=>{const[_n]=o.invert(pn);return _n-le},He=(pn,_n,ar)=>{const An=_e(pn),Mr=ar.filter(Ln),[Tr,xi]=za([Mr[0],Mr[Mr.length-1]]),Ci=Tr===xi;if(!Xt&&(An<Tr||An>xi)&&!Ci)return null;const ea=wc(_1=>ar[+_1]).center,No=ea(_n,An);return _n[No]},Be=(pn,_n)=>{const An=pn[k?1:0],Mr=_n.filter(Ci=>{const[ea,No]=Tt(Ci);return An>=ea&&An<=No});if(!Xt||Mr.length>0)return Mr;const Tr=wc(Ci=>{const[ea,No]=Tt(Ci);return(ea+No)/2}).center,xi=Tr(_n,An);return[_n[xi]].filter(Ln)},Qe=(pn,_n)=>{const{__data__:ar}=pn;return Object.fromEntries(Object.entries(ar).filter(([An])=>An.startsWith("series")&&An!=="series").map(([An,Mr])=>{const Tr=Mr[_n];return[R_(An.replace("series","")),Tr]}))},dn=_s(pn=>{const _n=wy(t,pn);if(!_n)return;const ar=vP(t),An=ar.min[0],Mr=ar.min[1],Tr=[_n[0]-p,_n[1]-v];if(!Tr)return;const xi=Be(Tr,wt),Ci=[],ea=[];for(const Er of rt){const[zu,w1]=Pt.get(Er),rR=He(Tr,zu,w1);if(rR!==null){Ci.push(Er);const iR=Qe(Er,rR),{x:Aut,y:Tut}=iR,Put=o.map([(Aut||0)+le,Tut||0]);ea.push([Object.assign(Object.assign({},iR),{element:Er}),Put])}}const No=Array.from(new Set(ea.map(Er=>Er[0].x))),_1=No[hh(No,Er=>Math.abs(Er-_e(Tr)))],O1=ea.filter(Er=>Er[0].x===_1),Eut=[...O1.map(Er=>Er[0]),...xi.map(Er=>Er.__data__)],nR=[...Ci,...xi],Bu=kP(nR,a,l,Eut,w);if(r&&Bu.items.sort((Er,zu)=>r(Er)-r(zu)),i&&(Bu.items=Bu.items.filter(i)),nR.length===0||IP(Bu)){xn(pn);return}if(g&&AP({root:t,data:Bu,x:_n[0]+An,y:_n[1]+Mr,render:c,event:pn,single:y,position:m,enterable:b,mount:_,bounding:O,css:C}),s){const Er=O1.map(w1=>w1[1]),zu=se(I,"crosshairs");yK(t,Er,Object.assign(Object.assign({},zu),{plotWidth:F,plotHeight:B,mainWidth:z,mainHeight:Y,insetLeft:U,insetTop:tt,startX:p,startY:v,transposed:k,polar:R}))}if(E){const Er=se(I,"marker");mK(t,{data:O1,style:Er,theme:w})}u.emit("tooltip:show",Object.assign(Object.assign({},pn),{nativeEvent:!0,data:{data:{x:Sc(a.x,_e(Tr),!0)}}}))},f,{leading:d,trailing:h}),xn=pn=>{To({root:t,single:y,emitter:u,event:pn}),s&&RP(t),E&&LP(t)},Vn=()=>{Ty({root:t,single:y}),s&&RP(t),E&&LP(t)},mr=({nativeEvent:pn,data:_n})=>{if(pn)return;const{x:ar}=_n.data,{x:An}=a,Mr=An.map(ar),[Tr,xi]=o.map([Mr,.5]),{min:[Ci,ea]}=t.getRenderBounds();dn({offsetX:Tr+Ci,offsetY:xi+ea})},bi=()=>{To({root:t,single:y,emitter:u,nativeEvent:!1})},qa=()=>{$i(),Vn()},As=()=>{oi()},oi=()=>{M||(t.addEventListener("pointerenter",dn),t.addEventListener("pointermove",dn),t.addEventListener("pointerleave",xn))},$i=()=>{M||(t.removeEventListener("pointerenter",dn),t.removeEventListener("pointermove",dn),t.removeEventListener("pointerleave",xn))};return oi(),u.on("tooltip:show",mr),u.on("tooltip:hide",bi),u.on("tooltip:disable",qa),u.on("tooltip:enable",As),()=>{$i(),u.off("tooltip:show",mr),u.off("tooltip:hide",bi),u.off("tooltip:disable",qa),u.off("tooltip:enable",As),A?To({root:t,single:y,emitter:u,nativeEvent:!1}):Vn()}}function xK(t,{elements:e,scale:n,render:r,groupName:i,sort:a,filter:o,emitter:s,wait:c=50,leading:l=!0,trailing:u=!1,groupKey:f=A=>A,single:d=!0,position:h,enterable:p,datum:v,view:g,mount:y,bounding:m,theme:b,shared:_=!1,body:O=!0,disableNative:w=!1,preserve:M=!1,css:E={}}){const A=e(t),P=new Set(A),C=Kn(A,f),D=_s(Y=>{const{target:U}=Y;if(!P.has(U)){To({root:t,single:d,emitter:s,event:Y});return}const tt=f(U),rt=C.get(tt),wt=rt.length===1&&!_?vK(rt[0]):kP(rt,n,i,void 0,b);if(a&&wt.items.sort((Tt,Pt)=>a(Tt)-a(Pt)),o&&(wt.items=wt.items.filter(o)),IP(wt)){To({root:t,single:d,emitter:s,event:Y});return}const{offsetX:Bt,offsetY:Xt}=Y;O&&AP({root:t,data:wt,x:Bt,y:Xt,render:r,event:Y,single:d,position:h,enterable:p,mount:y,bounding:m,css:E}),s.emit("tooltip:show",Object.assign(Object.assign({},Y),{nativeEvent:!0,data:{data:JO(U,g)}}))},c,{leading:l,trailing:u}),N=Y=>{To({root:t,single:d,emitter:s,event:Y})},k=()=>{w||(t.addEventListener("pointermove",D),t.addEventListener("pointerleave",N))},R=()=>{w||(t.removeEventListener("pointermove",D),t.removeEventListener("pointerleave",N))},I=({nativeEvent:Y,data:U})=>{if(Y)return;const tt=Ey(A,U.data,v);if(!tt)return;const rt=tt.getBBox(),{x:wt,y:Bt,width:Xt,height:Tt}=rt;D({target:tt,offsetX:wt+Xt/2,offsetY:Bt+Tt/2})},F=({nativeEvent:Y}={})=>{Y||To({root:t,single:d,emitter:s,nativeEvent:!1})},B=()=>{R(),Ty({root:t,single:d})},z=()=>{k()};return s.on("tooltip:show",I),s.on("tooltip:hide",F),s.on("tooltip:enable",z),s.on("tooltip:disable",B),k(),()=>{R(),s.off("tooltip:show",I),s.off("tooltip:hide",F),M?To({root:t,single:d,emitter:s,nativeEvent:!1}):Ty({root:t,single:d})}}function DP(t){const{shared:e,crosshairs:n,series:r,name:i,item:a=()=>({}),facet:o=!1}=t,s=iu(t,["shared","crosshairs","series","name","item","facet"]);return(c,l,u)=>{const{container:f,view:d}=c,{scale:h,markState:p,coordinate:v,theme:g}=d,y=NP(p,"seriesTooltip"),m=NP(p,"crosshairs"),b=Ga(f),_=Py(r,y);if(_&&bK(p)&&!o)return jP(b,Object.assign(Object.assign({},s),{theme:g,elements:Eo,scale:h,coordinate:v,crosshairs:Py(n,m),item:a,emitter:u}));if(_&&o){const O=l.filter(C=>C!==c&&C.options.parentKey===c.options.key),w=pP(c,l),M=O[0].view.scale,E=b.getBounds(),A=E.min[0],P=E.min[1];return Object.assign(M,{facet:!0}),jP(b.parentNode.parentNode,Object.assign(Object.assign({},s),{theme:g,elements:()=>w,scale:M,coordinate:v,crosshairs:Py(n,m),item:a,startX:A,startY:P,emitter:u}))}return xK(b,Object.assign(Object.assign({},s),{datum:xs(d),elements:Eo,scale:h,coordinate:v,groupKey:e?My(d):void 0,item:a,emitter:u,view:d,theme:g,shared:e}))}}DP.props={reapplyWhenUpdate:!0};var vh=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};const FP="legend-category",_K="legend-continuous",OK="items-item",wK="legend-category-item-marker",SK="legend-category-item-label";function BP(t){return t.getElementsByClassName(wK)[0]}function zP(t){return t.getElementsByClassName(SK)[0]}function GP(t){return t.getElementsByClassName(OK)}function WP(t){return t.getElementsByClassName(FP)}function MK(t){return t.getElementsByClassName(_K)}function Cy(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function Vpt(t){let e=t;for(;e&&!e.attr("class").startsWith("legend");)e=e.children[0];return e.attributes}function EK(t,{legends:e,marker:n,label:r,datum:i,filter:a,emitter:o,channel:s,state:c={}}){const l=new Map,u=new Map,f=new Map,{unselected:d={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=c,h={unselected:se(d,"marker")},p={unselected:se(d,"label")},{setState:v,removeState:g}=Wa(h,void 0),{setState:y,removeState:m}=Wa(p,void 0),b=Array.from(e(t));let _=b.map(i);const O=()=>{for(const E of b){const A=i(E),P=n(E),C=r(E);_.includes(A)?(g(P,"unselected"),m(C,"unselected")):(v(P,"unselected"),y(C,"unselected"))}};for(const E of b){const A=()=>{Ao(t,"pointer")},P=()=>{KZ(t)},C=D=>vh(this,void 0,void 0,function*(){const N=i(E),k=_.indexOf(N);k===-1?_.push(N):_.splice(k,1),_.length===0&&_.push(...b.map(i)),yield a(_),O();const{nativeEvent:R=!0}=D;R&&(_.length===b.length?o.emit("legend:reset",{nativeEvent:R}):o.emit("legend:filter",Object.assign(Object.assign({},D),{nativeEvent:R,data:{channel:s,values:_}})))});E.addEventListener("click",C),E.addEventListener("pointerenter",A),E.addEventListener("pointerout",P),l.set(E,C),u.set(E,A),f.set(E,P)}const w=E=>vh(this,void 0,void 0,function*(){const{nativeEvent:A}=E;if(A)return;const{data:P}=E,{channel:C,values:D}=P;C===s&&(_=D,yield a(_),O())}),M=E=>vh(this,void 0,void 0,function*(){const{nativeEvent:A}=E;A||(_=b.map(i),yield a(_),O())});return o.on("legend:filter",w),o.on("legend:reset",M),()=>{for(const E of b)E.removeEventListener("click",l.get(E)),E.removeEventListener("pointerenter",u.get(E)),E.removeEventListener("pointerout",f.get(E)),o.off("legend:filter",w),o.off("legend:reset",M)}}function AK(t,{legend:e,filter:n,emitter:r,channel:i}){const a=({detail:{value:o}})=>{n(o),r.emit({nativeEvent:!0,data:{channel:i,values:o}})};return e.addEventListener("valuechange",a),()=>{e.removeEventListener("valuechange",a)}}function HP(t,{legend:e,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:s=!1}){return vh(this,void 0,void 0,function*(){const{view:c,update:l,setState:u}=t;u(e,f=>{const{marks:d}=f,h=d.map(p=>{if(p.type==="legends")return p;const{transform:v=[]}=p,g=v.findIndex(({type:b})=>b.startsWith("group")||b.startsWith("bin")),y=[...v];y.splice(g+1,0,{type:"filter",[n]:{value:r,ordinal:i}});const m=Object.fromEntries(a.map(b=>[b,{domain:c.scale[b].getOptions().domain}]));return Nt({},p,Object.assign(Object.assign({transform:y,scale:m},!i&&{animate:!1}),{legend:s?!1:Object.fromEntries(o.map(b=>[b,{preserve:!0}]))}))});return Object.assign(Object.assign({},f),{marks:h})}),yield l()})}function TK(t,e){for(const n of t)HP(n,Object.assign(Object.assign({},e),{facet:!0}))}function PK(){return(t,e,n)=>{const{container:r}=t,i=e.filter(f=>f!==t),a=i.length>0,o=f=>Cy(f).scales.map(d=>d.name),s=[...WP(r),...MK(r)],c=s.flatMap(o),l=a?_s(TK,50,{trailing:!0}):_s(HP,50,{trailing:!0}),u=s.map(f=>{const{name:d,domain:h}=Cy(f).scales[0],p=o(f),v={legend:f,channel:d,channels:p,allChannels:c};return f.className===FP?EK(r,{legends:GP,marker:BP,label:zP,datum:g=>{const{__data__:y}=g,{index:m}=y;return h[m]},filter:g=>{const y=Object.assign(Object.assign({},v),{value:g,ordinal:!0});l(a?i:t,y)},state:f.attributes.state,channel:d,emitter:n}):AK(r,{legend:f,filter:g=>{const y=Object.assign(Object.assign({},v),{value:g,ordinal:!1});l(a?i:t,y)},emitter:n,channel:d})});return()=>{u.forEach(f=>f())}}}function CK(){return(t,e,n)=>{const{container:r,view:i,options:a}=t,o=WP(r),s=Eo(r),c=h=>Cy(h).scales[0].name,l=h=>{const{scale:{[h]:p}}=i;return p},u=Ac(a,["active","inactive"]),f=nu(s,xs(i)),d=[];for(const h of o){const p=Y=>{const{data:U}=h.attributes,{__data__:tt}=Y,{index:rt}=tt;return U[rt].label},v=c(h),g=GP(h),y=l(v),m=Kn(s,Y=>y.invert(Y.__data__[v])),{state:b={}}=h.attributes,{inactive:_={}}=b,{setState:O,removeState:w}=Wa(u,f),M={inactive:se(_,"marker")},E={inactive:se(_,"label")},{setState:A,removeState:P}=Wa(M),{setState:C,removeState:D}=Wa(E),N=Y=>{for(const U of g){const tt=BP(U),rt=zP(U);U===Y||Y===null?(P(tt,"inactive"),D(rt,"inactive")):(A(tt,"inactive"),C(rt,"inactive"))}},k=(Y,U)=>{const tt=p(U),rt=new Set(m.get(tt));for(const Bt of s)rt.has(Bt)?O(Bt,"active"):O(Bt,"inactive");N(U);const{nativeEvent:wt=!0}=Y;wt&&n.emit("legend:highlight",Object.assign(Object.assign({},Y),{nativeEvent:wt,data:{channel:v,value:tt}}))},R=new Map;for(const Y of g){const U=tt=>{k(tt,Y)};Y.addEventListener("pointerover",U),R.set(Y,U)}const I=Y=>{for(const tt of s)w(tt,"inactive","active");N(null);const{nativeEvent:U=!0}=Y;U&&n.emit("legend:unhighlight",{nativeEvent:U})},F=Y=>{const{nativeEvent:U,data:tt}=Y;if(U)return;const{channel:rt,value:wt}=tt;if(rt!==v)return;const Bt=g.find(Xt=>p(Xt)===wt);Bt&&k({nativeEvent:!1},Bt)},B=Y=>{const{nativeEvent:U}=Y;U||I({nativeEvent:!1})};h.addEventListener("pointerleave",I),n.on("legend:highlight",F),n.on("legend:unhighlight",B);const z=()=>{h.removeEventListener(I),n.off("legend:highlight",F),n.off("legend:unhighlight",B);for(const[Y,U]of R)Y.removeEventListener(U)};d.push(z)}return()=>d.forEach(h=>h())}}var Ai=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function kK(t,e){const[n,r,i,a]=t,[o,s,c,l]=e;return!(o>i||c<n||s>a||l<r)}function RK(t,e,n,r,i){const[a,o,s,c]=i;return[Math.max(a,Math.min(t,n)),Math.max(o,Math.min(e,r)),Math.min(s,Math.max(t,n)),Math.min(c,Math.max(e,r))]}function LK(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function Ha(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const YP=oc(t=>{const e=t.attributes,{x:n,y:r,width:i,height:a,class:o,renders:s={},handleSize:c=10,document:l}=e,u=Ai(e,["x","y","width","height","class","renders","handleSize","document"]);if(!l||i===void 0||a===void 0||n===void 0||r===void 0)return;const f=c/2,d=(wt,Bt,Xt)=>{wt.handle||(wt.handle=Xt.createElement("rect"),wt.append(wt.handle));const{handle:Tt}=wt;return Tt.attr(Bt),Tt},h=se(ov(u,"handleNW","handleNE"),"handleN"),{render:p=d}=h,v=Ai(h,["render"]),g=se(u,"handleE"),{render:y=d}=g,m=Ai(g,["render"]),b=se(ov(u,"handleSE","handleSW"),"handleS"),{render:_=d}=b,O=Ai(b,["render"]),w=se(u,"handleW"),{render:M=d}=w,E=Ai(w,["render"]),A=se(u,"handleNW"),{render:P=d}=A,C=Ai(A,["render"]),D=se(u,"handleNE"),{render:N=d}=D,k=Ai(D,["render"]),R=se(u,"handleSE"),{render:I=d}=R,F=Ai(R,["render"]),B=se(u,"handleSW"),{render:z=d}=B,Y=Ai(B,["render"]),U=(wt,Bt)=>{const{id:Xt}=wt,Tt=wt.attributes,{x:Pt,y:ce}=Tt,le=Ai(Tt,["x","y"]),_e=Bt(wt,Object.assign({x:0,y:0},le),l);_e.id=Xt,_e.style.draggable=!0},tt=wt=>()=>{const Bt=oc(Xt=>U(Xt,wt));return new Bt({})},rt=Ne(t).attr("className",o).style("x",n).style("y",r).style("draggable",!0);rt.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(Ha,Object.assign({width:i,height:a},ov(u,"handle"))),rt.maybeAppend("handle-n",tt(p)).style("x",f).style("y",-f).style("width",i-c).style("height",c).style("fill","transparent").call(Ha,v),rt.maybeAppend("handle-e",tt(y)).style("x",i-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(Ha,m),rt.maybeAppend("handle-s",tt(_)).style("x",f).style("y",a-f).style("width",i-c).style("height",c).style("fill","transparent").call(Ha,O),rt.maybeAppend("handle-w",tt(M)).style("x",-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(Ha,E),rt.maybeAppend("handle-nw",tt(P)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Ha,C),rt.maybeAppend("handle-ne",tt(N)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Ha,k),rt.maybeAppend("handle-se",tt(I)).style("x",i-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(Ha,F),rt.maybeAppend("handle-sw",tt(z)).style("x",-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(Ha,Y)});function ky(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:s=LK(t),brushRegion:c=(Tt,Pt,ce,le,_e)=>[Tt,Pt,ce,le],reverse:l=!1,fill:u="#777",fillOpacity:f="0.3",stroke:d="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=e,p=Ai(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let v=null,g=null,y=null,m=null,b=null,_=!1;const[O,w,M,E]=s;Ao(t,"crosshair"),t.style.draggable=!0;const A=(Tt,Pt,ce)=>{if(a(ce),m&&m.remove(),b&&b.remove(),v=[Tt,Pt],l)return P();C()},P=()=>{b=new ni({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:d,pointerEvents:"none"})}),m=new YP({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(m)},C=()=>{m=new YP({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:d,draggable:!0}),className:"mask"}),t.appendChild(m)},D=(Tt=!0)=>{m&&m.remove(),b&&b.remove(),v=null,g=null,y=null,_=!1,m=null,b=null,r(Tt)},N=(Tt,Pt,ce=!0)=>{const[le,_e,He,Be]=RK(Tt[0],Tt[1],Pt[0],Pt[1],s),[Qe,dn,xn,Vn]=c(le,_e,He,Be,s);return l?R(Qe,dn,xn,Vn):k(Qe,dn,xn,Vn),n(Qe,dn,xn,Vn,ce),[Qe,dn,xn,Vn]},k=(Tt,Pt,ce,le)=>{m.style.x=Tt,m.style.y=Pt,m.style.width=ce-Tt,m.style.height=le-Pt},R=(Tt,Pt,ce,le)=>{b.style.d=`
|
|
M${O},${w}L${M},${w}L${M},${E}L${O},${E}Z
|
|
M${Tt},${Pt}L${Tt},${le}L${ce},${le}L${ce},${Pt}Z
|
|
`,m.style.x=Tt,m.style.y=Pt,m.style.width=ce-Tt,m.style.height=le-Pt},I=Tt=>{const Pt=(dn,xn,Vn,mr,bi)=>dn+xn<mr?mr-xn:dn+Vn>bi?bi-Vn:dn,ce=Tt[0]-y[0],le=Tt[1]-y[1],_e=Pt(ce,v[0],g[0],O,M),He=Pt(le,v[1],g[1],w,E),Be=[v[0]+_e,v[1]+He],Qe=[g[0]+_e,g[1]+He];N(Be,Qe)},F={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},B=Tt=>Y(Tt)||z(Tt),z=Tt=>{const{id:Pt}=Tt;return h.indexOf(Pt)===-1?!1:new Set(Object.keys(F)).has(Pt)},Y=Tt=>Tt===m.getElementById("selection"),U=Tt=>{const{target:Pt}=Tt,[ce,le]=Sy(t,Tt);if(!m||!B(Pt)){A(ce,le,Tt),_=!0;return}B(Pt)&&(y=[ce,le])},tt=Tt=>{const{target:Pt}=Tt,ce=Sy(t,Tt);if(!v)return;if(!y)return N(v,ce);if(Y(Pt))return I(ce);const[le,_e]=[ce[0]-y[0],ce[1]-y[1]],{id:He}=Pt;if(F[He]){const[Be,Qe,dn,xn]=F[He].vector;return N([v[0]+le*Be,v[1]+_e*Qe],[g[0]+le*dn,g[1]+_e*xn])}},rt=Tt=>{if(y){y=null;const{x:He,y:Be,width:Qe,height:dn}=m.style;v=[He,Be],g=[He+Qe,Be+dn],o(He,Be,He+Qe,Be+dn,Tt);return}g=Sy(t,Tt);const[Pt,ce,le,_e]=N(v,g);_=!1,i(Pt,ce,le,_e,Tt)},wt=Tt=>{const{target:Pt}=Tt;m&&!B(Pt)&&D()},Bt=Tt=>{const{target:Pt}=Tt;!m||!B(Pt)||_?Ao(t,"crosshair"):Y(Pt)?Ao(t,"move"):z(Pt)&&Ao(t,F[Pt.id].cursor)},Xt=()=>{Ao(t,"default")};return t.addEventListener("dragstart",U),t.addEventListener("drag",tt),t.addEventListener("dragend",rt),t.addEventListener("click",wt),t.addEventListener("pointermove",Bt),t.addEventListener("pointerleave",Xt),{mask:m,move(Tt,Pt,ce,le,_e=!0){m||A(Tt,Pt,{}),v=[Tt,Pt],g=[ce,le],N([Tt,Pt],[ce,le],_e)},remove(Tt=!0){m&&D(Tt)},destroy(){m&&D(!1),Ao(t,"default"),t.removeEventListener("dragstart",U),t.removeEventListener("drag",tt),t.removeEventListener("dragend",rt),t.removeEventListener("click",wt),t.removeEventListener("pointermove",Bt),t.removeEventListener("pointerleave",Xt)}}}function Ry(t,e,n){return e.filter(r=>{if(r===t)return!1;const{interaction:i={}}=r.options;return Object.values(i).find(a=>a.brushKey===n)})}function NK(t,e,n){return Ry(t,e,n).map(r=>Ga(r.container))}function IK(t,e,n){return Ry(t,e,n).map(r=>r.options)}function VP(t,e){var{elements:n,selectedHandles:r,siblings:i=tt=>[],datum:a,brushRegion:o,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:d=tt=>tt,bboxOf:h=tt=>{const{x:rt,y:wt,width:Bt,height:Xt}=tt.style;return{x:rt,y:wt,width:Bt,height:Xt}},state:p={},emitter:v}=e,g=Ai(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const y=n(t),m=i(t),b=m.flatMap(n),_=nu(y,a),O=se(g,"mask"),{setState:w,removeState:M}=Wa(p,_),E=new Map,{width:A,height:P,x:C=0,y:D=0}=h(t),N=s||[0,0,A,P],k=()=>{for(const tt of[...y,...b])M(tt,"active","inactive")},R=(tt,rt,wt,Bt)=>{var Xt;for(const Pt of m)(Xt=Pt.brush)===null||Xt===void 0||Xt.remove();const Tt=new Set;for(const Pt of y){const{min:ce,max:le}=Pt.getLocalBounds(),[_e,He]=ce,[Be,Qe]=le;kK([_e,He,Be,Qe],[tt,rt,wt,Bt])?(w(Pt,"active"),Tt.add(d(Pt))):w(Pt,"inactive")}for(const Pt of b)Tt.has(d(Pt))?w(Pt,"active"):w(Pt,"inactive")},I=()=>{for(const tt of y)M(tt,"inactive");for(const tt of E.values())tt.remove();E.clear()},F=(tt,rt,wt,Bt)=>{const Xt=Tt=>{const Pt=Tt.cloneNode();return Pt.__data__=Tt.__data__,Tt.parentNode.appendChild(Pt),E.set(Tt,Pt),Pt};for(const Tt of y){const Pt=E.get(Tt)||Xt(Tt);Pt.style.clipPath=new Ko({style:{x:tt+C,y:rt+D,width:wt-tt,height:Bt-rt}}),w(Tt,"inactive"),w(Pt,"active")}},B=ky(t,Object.assign(Object.assign({},O),{extent:N,brushRegion:o,reverse:c,selectedHandles:r,brushended:tt=>{const rt=f?I:k;tt&&v.emit("brush:remove",{nativeEvent:!0}),rt()},brushed:(tt,rt,wt,Bt,Xt)=>{const Tt=ch(tt,rt,wt,Bt,l,u);Xt&&v.emit("brush:highlight",{nativeEvent:!0,data:{selection:Tt}}),(f?F:R)(tt,rt,wt,Bt)},brushcreated:(tt,rt,wt,Bt,Xt)=>{const Tt=ch(tt,rt,wt,Bt,l,u);v.emit("brush:end",Object.assign(Object.assign({},Xt),{nativeEvent:!0,data:{selection:Tt}}))},brushupdated:(tt,rt,wt,Bt,Xt)=>{const Tt=ch(tt,rt,wt,Bt,l,u);v.emit("brush:end",Object.assign(Object.assign({},Xt),{nativeEvent:!0,data:{selection:Tt}}))},brushstarted:tt=>{v.emit("brush:start",tt)}})),z=({nativeEvent:tt,data:rt})=>{if(tt)return;const{selection:wt}=rt,[Bt,Xt,Tt,Pt]=CZ(wt,l,u);B.move(Bt,Xt,Tt,Pt,!1)};v.on("brush:highlight",z);const Y=({nativeEvent:tt}={})=>{tt||B.remove(!1)};v.on("brush:remove",Y);const U=B.destroy.bind(B);return B.destroy=()=>{v.off("brush:highlight",z),v.off("brush:remove",Y),U()},B}function Ly(t){var{facet:e,brushKey:n}=t,r=Ai(t,["facet","brushKey"]);return(i,a,o)=>{const{container:s,view:c,options:l}=i,u=Ga(s),f={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},d=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:p}=c;if(e){const g=u.getBounds(),y=g.min[0],m=g.min[1],b=g.max[0],_=g.max[1];return VP(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>pP(i,a),datum:xs(Oy(i,a).map(O=>O.view)),brushRegion:(O,w,M,E)=>[O,w,M,E],extent:[y,m,b,_],state:Ac(Oy(i,a).map(O=>O.options),d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r))}const v=VP(u,Object.assign(Object.assign({elements:Eo,key:g=>g.__data__.key,siblings:()=>NK(i,a,n),datum:xs([c,...Ry(i,a,n).map(g=>g.view)]),brushRegion:(g,y,m,b)=>[g,y,m,b],extent:void 0,state:Ac([l,...IK(i,a,n)],d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r));return u.brush=v,()=>v.destroy()}}function Ny(t,e,n,r,i){const[,a,,o]=i;return[t,a,n,o]}function jK(t){return Ly(Object.assign(Object.assign({},t),{brushRegion:Ny,selectedHandles:["handle-e","handle-w"]}))}function Iy(t,e,n,r,i){const[a,,o]=i;return[a,e,o,r]}function DK(t){return Ly(Object.assign(Object.assign({},t),{brushRegion:Iy,selectedHandles:["handle-n","handle-s"]}))}var jy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const FK="axis",BK="axis-line",zK="axis-main-group",$P="axis-hot-area";function GK(t){return t.getElementsByClassName(FK)}function XP(t){return t.getElementsByClassName(BK)[0]}function WK(t){return t.getElementsByClassName(zK)[0]}function UP(t){return WK(t).getLocalBounds()}function HK(t,e){var{cross:n,offsetX:r,offsetY:i}=e,a=jy(e,["cross","offsetX","offsetY"]);const o=UP(t),s=XP(t),[c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=(f-l)*2;return{brushRegion:Iy,hotZone:new Ko({className:$P,style:Object.assign({x:n?l:c-h/2,width:n?h/2:h,y:u,height:d-u},a)}),extent:n?(p,v,g,y)=>[-1/0,v,1/0,y]:(p,v,g,y)=>[Math.floor(l-r),v,Math.ceil(f-r),y]}}function YK(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,a=jy(e,["offsetY","offsetX","cross"]);const o=UP(t),s=XP(t),[,c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=d-u;return{brushRegion:Ny,hotZone:new Ko({className:$P,style:Object.assign({x:l,width:f-l,y:i?u:c-h,height:i?h:h*2},a)}),extent:i?(p,v,g,y)=>[p,-1/0,g,1/0]:(p,v,g,y)=>[p,Math.floor(u-n),g,Math.ceil(d-n)]}}function VK(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:c,reverse:l=!1,state:u={},emitter:f,coordinate:d}=e,h=jy(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),v=n(t),g=nu(p,o),{setState:y,removeState:m}=Wa(u,g),b=new Map,_=se(h,"mask"),O=z=>Array.from(b.values()).every(([Y,U,tt,rt])=>z.some(([wt,Bt])=>wt>=Y&&wt<=tt&&Bt>=U&&Bt<=rt)),w=v.map(z=>z.attributes.scale),M=z=>z.length>2?[z[0],z[z.length-1]]:z,E=new Map,A=()=>{E.clear();for(let z=0;z<v.length;z++){const Y=w[z],{domain:U}=Y.getOptions();E.set(z,M(U))}};A();const P=(z,Y)=>{const U=[];for(const rt of p){const wt=i(rt);O(wt)?(y(rt,"active"),U.push(rt)):y(rt,"inactive")}if(E.set(z,D(U,z)),!Y)return;const tt=()=>{if(!N)return Array.from(E.values());const rt=[];for(const[wt,Bt]of E){const Xt=w[wt],{name:Tt}=Xt.getOptions();Tt==="x"?rt[0]=Bt:rt[1]=Bt}return rt};f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:tt()}})},C=z=>{for(const Y of p)m(Y,"active","inactive");A(),z&&f.emit("brushAxis:remove",{nativeEvent:!0})},D=(z,Y)=>{const U=w[Y],{name:tt}=U.getOptions(),rt=z.map(wt=>{const Bt=wt.__data__;return U.invert(Bt[tt])});return M(Mo(U,rt))},N=v.some(a)&&v.some(z=>!a(z)),k=[];for(let z=0;z<v.length;z++){const Y=v[z],U=a(Y)?YK:HK,{hotZone:tt,brushRegion:rt,extent:wt}=U(Y,{offsetY:s,offsetX:c,cross:N,zIndex:999,fill:"transparent"});Y.parentNode.appendChild(tt);const Bt=ky(tt,Object.assign(Object.assign({},_),{reverse:l,brushRegion:rt,brushended(Xt){b.delete(Y),Array.from(b.entries()).length===0?C(Xt):P(z,Xt)},brushed(Xt,Tt,Pt,ce,le){b.set(Y,wt(Xt,Tt,Pt,ce)),P(z,le)}}));k.push(Bt)}const R=(z={})=>{const{nativeEvent:Y}=z;Y||k.forEach(U=>U.remove(!1))},I=(z,Y,U)=>{const[tt,rt]=z,wt=Tt=>Tt.getStep?Tt.getStep():0,Bt=F(tt,Y,U),Xt=F(rt,Y,U)+wt(Y);return a(U)?[Bt,-1/0,Xt,1/0]:[-1/0,Bt,1/0,Xt]},F=(z,Y,U)=>{const{height:tt,width:rt}=d.getOptions(),wt=Y.clone();return a(U)?wt.update({range:[0,rt]}):wt.update({range:[tt,0]}),wt.map(z)},B=z=>{const{nativeEvent:Y}=z;if(Y)return;const{selection:U}=z.data;for(let tt=0;tt<k.length;tt++){const rt=U[tt],wt=k[tt],Bt=v[tt];if(rt){const Xt=w[tt];wt.move(...I(rt,Xt,Bt),!1)}else wt.remove(!1)}};return f.on("brushAxis:remove",R),f.on("brushAxis:highlight",B),()=>{k.forEach(z=>z.destroy()),f.off("brushAxis:remove",R),f.off("brushAxis:highlight",B)}}function $K(t){return(e,n,r)=>{const{container:i,view:a,options:o}=e,s=Ga(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=a;return VK(i,Object.assign({elements:Eo,axes:GK,offsetY:l,offsetX:c,points:f=>f.__data__.points,horizontal:f=>{const{startPos:[d,h],endPos:[p,v]}=f.attributes;return d!==p&&h===v},datum:xs(a),state:Ac(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var XK=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},qP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function UK(t=300){let e=null;return n=>{const{timeStamp:r}=n;return e!==null&&r-e<t?(e=r,!0):(e=r,!1)}}function qK(t,e){var{filter:n,reset:r,brushRegion:i,extent:a,reverse:o,emitter:s,scale:c,coordinate:l,selection:u,series:f=!1}=e,d=qP(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]);const h=se(d,"mask"),{width:p,height:v}=t.getBBox(),g=a||[0,0,p,v],y=UK(),m=ky(t,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:o,brushcreated:b}));t.addEventListener("click",_);function b(w,M,E,A,P){P.nativeEvent=!0,n(u(w,M,E,A),P),m.remove()}function _(w){y(w)&&(w.nativeEvent=!0,r(w))}const O=({nativeEvent:w,data:M})=>{if(w)return;const{selection:E}=M;n(E,{nativeEvent:!1})};return s.on("brush:filter",O),()=>{m.destroy(),s.off("brush:filter",O),t.removeEventListener("click",_)}}function Dy(t){var{hideX:e=!0,hideY:n=!0}=t,r=qP(t,["hideX","hideY"]);return(i,a,o)=>{const{container:s,view:c,options:l,update:u,setState:f}=i,d=Ga(s),h={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1};let p=!1,v=!1,g=c;const{scale:y,coordinate:m}=c;return qK(d,Object.assign(Object.assign({brushRegion:(b,_,O,w)=>[b,_,O,w],selection:(b,_,O,w)=>{const{scale:M,coordinate:E}=g;return ch(b,_,O,w,M,E)},filter:(b,_)=>XK(this,void 0,void 0,function*(){if(v)return;v=!0;const[O,w]=b;f("brushFilter",E=>{const{marks:A}=E,P=A.map(C=>Nt({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},C,{scale:{x:{domain:O,nice:!1},y:{domain:w,nice:!1}}}));return Object.assign(Object.assign({},l),{marks:P,clip:!0})}),o.emit("brush:filter",Object.assign(Object.assign({},_),{data:{selection:[O,w]}})),g=(yield u()).view,v=!1,p=!0}),reset:b=>{if(v||!p)return;const{scale:_}=c,{x:O,y:w}=_,M=O.getOptions().domain,E=w.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},b),{data:{selection:[M,E]}})),p=!1,g=c,f("brushFilter"),u()},extent:void 0,emitter:o,scale:y,coordinate:m},h),r))}}function ZK(t){return Dy(Object.assign(Object.assign({hideX:!0},t),{brushRegion:Ny}))}function KK(t){return Dy(Object.assign(Object.assign({hideY:!0},t),{brushRegion:Iy}))}var QK=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};const JK="slider";function tQ(t,e,n,r=!1,i="x",a="y"){const{marks:o}=t,s=o.map(c=>{var l,u;return Nt({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},c,{scale:e,[n]:Object.assign(Object.assign({},((l=c[n])===null||l===void 0?void 0:l[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),((u=c[n])===null||u===void 0?void 0:u[a])&&{[a]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:s,clip:!0,animate:!1})}function eQ(t,e,n){const[r,i]=t,a=n?c=>1-c:c=>c,o=Sc(e,a(r),!0),s=Sc(e,a(i),!1);return Mo(e,[o,s])}function gh(t){return[t[0],t[t.length-1]]}function ZP({initDomain:t={},className:e=JK,prefix:n="slider",setValue:r=(c,l)=>c.setValues(l),hasState:i=!1,wait:a=50,leading:o=!0,trailing:s=!1}){return(c,l,u)=>{const{container:f,view:d,update:h,setState:p}=c,v=f.getElementsByClassName(e);if(!v.length)return()=>{};let g=!1;const{scale:y,coordinate:m,layout:b}=d,{paddingLeft:_,paddingTop:O,paddingBottom:w,paddingRight:M}=b,{x:E,y:A}=y,P=Gn(m),C=R=>{const I=R==="vertical"?"y":"x",F=R==="vertical"?"x":"y";return P?[F,I]:[I,F]},D=new Map,N=new Set,k={x:t.x||E.getOptions().domain,y:t.y||A.getOptions().domain};for(const R of v){const{orientation:I}=R.attributes,[F,B]=C(I),z=`${n}${lo(F)}:filter`,Y=F==="x",{ratio:U}=E.getOptions(),{ratio:tt}=A.getOptions(),rt=Xt=>{if(Xt.data){const{selection:_e}=Xt.data,[He=gh(k.x),Be=gh(k.y)]=_e;return Y?[Mo(E,He,U),Mo(A,Be,tt)]:[Mo(A,Be,tt),Mo(E,He,U)]}const{value:Tt}=Xt.detail,Pt=y[F],ce=eQ(Tt,Pt,P&&I==="horizontal"),le=k[B];return[ce,le]},wt=_s(Xt=>QK(this,void 0,void 0,function*(){if(g)return;g=!0;const{nativeEvent:Tt=!0}=Xt,[Pt,ce]=rt(Xt);if(k[F]=Pt,k[B]=ce,Tt){const le=Y?Pt:ce,_e=Y?ce:Pt;u.emit(z,Object.assign(Object.assign({},Xt),{nativeEvent:Tt,data:{selection:[gh(le),gh(_e)]}}))}p(R,le=>Object.assign(Object.assign({},tQ(le,{[F]:{domain:Pt,nice:!1}},n,i,F,B)),{paddingLeft:_,paddingTop:O,paddingBottom:w,paddingRight:M})),yield h(),g=!1}),a,{leading:o,trailing:s}),Bt=Xt=>{const{nativeEvent:Tt}=Xt;if(Tt)return;const{data:Pt}=Xt,{selection:ce}=Pt,[le,_e]=ce;R.dispatchEvent(new Rn("valuechange",{data:Pt,nativeEvent:!1}));const He=Y?lh(le,E):lh(_e,A);r(R,He)};u.on(z,Bt),R.addEventListener("valuechange",wt),D.set(R,wt),N.add([z,Bt])}return h(),()=>{for(const[R,I]of D)R.removeEventListener("valuechange",I);for(const[R,I]of N)u.off(R,I)}}}const KP="g2-scrollbar";function nQ(t={}){return(e,n,r)=>{const{view:i,container:a}=e;if(!a.getElementsByClassName(KP).length)return()=>{};const{scale:s}=i,{x:c,y:l}=s,u={x:[...c.getOptions().domain],y:[...l.getOptions().domain]};return c.update({domain:c.getOptions().expectedDomain}),l.update({domain:l.getOptions().expectedDomain}),ZP(Object.assign(Object.assign({},t),{initDomain:u,className:KP,prefix:"scrollbar",hasState:!0,setValue:(d,h)=>d.setValue(h[0])}))(e,n,r)}}var rQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function iQ(t,e,n){return`<${t} style="${Object.entries(n).map(([r,i])=>`${_W(r)}:${i}`).join(";")}">${e}</${t}>`}const aQ={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function QP(t){return t.nodeName!=="text"?!1:!!t.isOverflowing()}function JP(t){var{offsetX:e=8,offsetY:n=8}=t,r=rQ(t,["offsetX","offsetY"]);return i=>{const{container:a}=i,[o,s]=a.getBounds().min,c=se(r,"tip"),l=new Set,u=d=>{const{target:h}=d;if(!QP(h)){d.stopPropagation();return}const{offsetX:p,offsetY:v}=d,g=p+e-o,y=v+n-s;if(h.tip){h.tip.style.x=g,h.tip.style.y=y;return}const{text:m}=h.style,b=new wf({className:"poptip",style:{innerHTML:iQ("div",m,Object.assign(Object.assign({},aQ),c)),x:g,y}});a.appendChild(b),h.tip=b,l.add(b)},f=d=>{const{target:h}=d;if(!QP(h)){d.stopPropagation();return}h.tip&&(h.tip.remove(),h.tip=null,l.delete(h.tip))};return a.addEventListener("pointerover",u),a.addEventListener("pointerout",f),()=>{a.removeEventListener("pointerover",u),a.removeEventListener("pointerout",f),l.forEach(d=>d.remove())}}}JP.props={reapplyWhenUpdate:!0};var oQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const tC=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(s=>{var{data:c,x:l,y:u,width:f,height:d}=s,h=oQ(s,["data","x","y","width","height"]);return Object.assign(Object.assign({},h),{data:zv(c,o),x:l!=null?l:n,y:u!=null?u:r,width:f!=null?f:i,height:d!=null?d:a})})};tC.props={};var sQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const eC=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{direction:n="row",ratio:r=e.map(()=>1),padding:i=0,data:a}=t,[o,s,c,l]=n==="col"?["y","height","width","x"]:["x","width","height","y"],u=r.reduce((v,g)=>v+g),f=t[s]-i*(e.length-1),d=r.map(v=>f*(v/u)),h=[];let p=t[o]||0;for(let v=0;v<d.length;v+=1){const g=e[v],{data:y}=g,m=sQ(g,["data"]),b=zv(y,a);h.push(Object.assign({[o]:p,[s]:d[v],[l]:t[l]||0,[c]:t[c],data:b},m)),p+=d[v]+i}return h};eC.props={};class au{constructor(e){this.$value=e}static of(e){return new au(e)}call(e,...n){return this.$value=e(this.$value,...n),this}value(){return this.$value}}var cQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const lQ=rc(t=>{const{encode:e,data:n,scale:r,shareSize:i=!1}=t,{x:a,y:o}=e,s=(c,l)=>{var u;if(c===void 0||!i)return{};const f=Kn(n,p=>p[c]),d=((u=r==null?void 0:r[l])===null||u===void 0?void 0:u.domain)||Array.from(f.keys()),h=d.map(p=>f.has(p)?f.get(p).length:1);return{domain:d,flex:h}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:a===void 0?null:{position:"top"}},a===void 0&&{paddingInner:0}),s(a,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:o===void 0?null:{position:"right"}},o===void 0&&{paddingInner:0}),s(o,"y"))}}}),Fy=rc(t=>{const{data:e,scale:n}=t,r=[t];let i,a,o;for(;r.length;){const f=r.shift(),{children:d,encode:h={},scale:p={},legend:v={}}=f,{color:g}=h,{color:y}=p,{color:m}=v;g!==void 0&&(i=g),y!==void 0&&(a=y),m!==void 0&&(o=m),Array.isArray(d)&&r.push(...d)}const s=()=>{var f;const d=(f=n==null?void 0:n.color)===null||f===void 0?void 0:f.domain;if(d!==void 0)return[d];if(i===void 0)return[void 0];const h=typeof i=="function"?i:v=>v[i],p=e.map(h);return p.some(v=>typeof v=="number")?[Da(p)]:[Array.from(new Set(p)),"ordinal"]},c=typeof i=="string"?i:"",[l,u]=s();return{encode:{color:i},scale:{color:Nt({},a,{domain:l,type:u})},legend:{color:Nt({title:c},o)}}}),By=rc(()=>({animate:{enterType:"fadeIn"}})),zy=ic(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),Gy=ic(()=>({type:"cell"})),nC=ic(t=>{const{data:e}=t;return{data:{type:"inline",value:e,transform:[{type:"custom",callback:()=>{const{data:r,encode:i}=t,{x:a,y:o}=i,s=a?Array.from(new Set(r.map(u=>u[a]))):[],c=o?Array.from(new Set(r.map(u=>u[o]))):[];return(()=>{if(s.length&&c.length){const u=[];for(const f of s)for(const d of c)u.push({[a]:f,[o]:d});return u}if(s.length)return s.map(u=>({[a]:u}));if(c.length)return c.map(u=>({[o]:u}))})()}}]}}}),rC=ic((t,e=uQ,n=fQ,r=dQ,i={})=>{const{data:a,encode:o,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:d}=t,{value:h}=a,{x:p,y:v}=o,{color:g}=c,{domain:y}=g;return{children:(b,_,O)=>{const{x:w,y:M}=_,{paddingLeft:E,paddingTop:A,marginLeft:P,marginTop:C}=O,{domain:D}=w.getOptions(),{domain:N}=M.getOptions(),k=ts(b),R=b.map(e),I=b.map(({x:tt,y:rt})=>[w.invert(tt),M.invert(rt)]),B=I.map(([tt,rt])=>wt=>{const{[p]:Bt,[v]:Xt}=wt;return(p!==void 0?Bt===tt:!0)&&(v!==void 0?Xt===rt:!0)}).map(tt=>h.filter(tt)),z=f?Mn(B,tt=>tt.length):void 0,Y=I.map(([tt,rt])=>({columnField:p,columnIndex:D.indexOf(tt),columnValue:tt,columnValuesLength:D.length,rowField:v,rowIndex:N.indexOf(rt),rowValue:rt,rowValuesLength:N.length})),U=Y.map(tt=>Array.isArray(s)?s:[s(tt)].flat(1));return k.flatMap(tt=>{const[rt,wt,Bt,Xt]=R[tt],Tt=Y[tt],Pt=B[tt];return U[tt].map(le=>{var _e,He,{scale:Be,key:Qe,facet:dn=!0,axis:xn={},legend:Vn={}}=le,mr=cQ(le,["scale","key","facet","axis","legend"]);const bi=((_e=Be==null?void 0:Be.y)===null||_e===void 0?void 0:_e.guide)||xn.y,qa=((He=Be==null?void 0:Be.x)===null||He===void 0?void 0:He.guide)||xn.x,As={x:{tickCount:p?5:void 0},y:{tickCount:v?5:void 0}},oi=dn?Pt:Pt.length===0?[]:h,$i={color:{domain:y}},pn={x:iC(qa,n)(Tt,oi),y:iC(bi,r)(Tt,oi)};return Object.assign(Object.assign({key:`${Qe}-${tt}`,data:oi,margin:0,x:rt+E+l+P,y:wt+A+u+C,parentKey:d,width:Bt,height:Xt,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!oi.length,dataDomain:z,scale:Nt(As,Be,$i),axis:Nt({},xn,pn),legend:!1},mr),i)})})}}});function uQ(t){const{points:e}=t;return Wv(e)}function yh(t,e){return e.length?Nt({title:!1,tick:null,label:null},t):Nt({title:!1,tick:null,label:null,grid:null},t)}function fQ(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=e;if(r!==i-1)return yh(t,n);const s=a!==o-1?!1:void 0,c=n.length?void 0:null;return Nt({title:s,grid:c},t)}}function dQ(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(i!==0)return yh(t,n);const a=r!==0?!1:void 0,o=n.length?void 0:null;return Nt({title:a,grid:o},t)}}function iC(t,e){return typeof t=="function"?t:t===null||t===!1?()=>null:e(t)}const aC=()=>t=>[au.of(t).call(Gy).call(Fy).call(By).call(lQ).call(zy).call(nC).call(rC).value()];aC.props={};var Wy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const hQ=rc(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),pQ=ic(t=>{const{data:e,children:n,x:r=0,y:i=0,key:a}=t;return{children:(s,c,l)=>{const{x:u,y:f}=c,{paddingLeft:d,paddingTop:h,marginLeft:p,marginTop:v}=l,{domain:g}=u.getOptions(),{domain:y}=f.getOptions(),m=ts(s),b=s.map(({points:M})=>Wv(M)),_=s.map(({x:M,y:E})=>[u.invert(M),f.invert(E)]),O=_.map(([M,E])=>({columnField:M,columnIndex:g.indexOf(M),columnValue:M,columnValuesLength:g.length,rowField:E,rowIndex:y.indexOf(E),rowValue:E,rowValuesLength:y.length})),w=O.map(M=>Array.isArray(n)?n:[n(M)].flat(1));return m.flatMap(M=>{const[E,A,P,C]=b[M],[D,N]=_[M],k=O[M];return w[M].map(I=>{var F,B;const{scale:z,key:Y,encode:U,axis:tt,interaction:rt}=I,wt=Wy(I,["scale","key","encode","axis","interaction"]),Bt=(F=z==null?void 0:z.y)===null||F===void 0?void 0:F.guide,Xt=(B=z==null?void 0:z.x)===null||B===void 0?void 0:B.guide,Tt={x:{facet:!1},y:{facet:!1}},Pt={x:gQ(Xt)(k,e),y:yQ(Bt)(k,e)},ce={x:{tickCount:5},y:{tickCount:5}};return Object.assign({data:e,parentKey:a,key:`${Y}-${M}`,x:E+d+r+p,y:A+h+i+v,width:P,height:C,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:Nt(Tt,z),axis:Nt(ce,tt,Pt),legend:!1,encode:Nt({},U,{x:D,y:N}),interaction:Nt({},rt,{legendFilter:!1})},wt)})})}}}),vQ=ic(t=>{const{encode:e}=t,n=Wy(t,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=e,o=Wy(e,["position","x","y"]),s=[];for(const c of[i].flat(1))for(const l of[a].flat(1))s.push({$x:c,$y:l});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},[i].flat(1).length===1&&{x:{paddingInner:0}}),[a].flat(1).length===1&&{y:{paddingInner:0}})})});function gQ(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return yh(t,n)}}function yQ(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{columnIndex:r}=e;if(r!==0)return yh(t,n)}}const mQ=()=>t=>[au.of(t).call(Gy).call(Fy).call(pQ).call(vQ).call(By).call(zy).call(hQ).value()];var bQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const xQ=rc(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),_Q=rc(t=>({coordinate:{type:"polar"}})),OQ=t=>{const{encode:e}=t,n=bQ(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function oC(t){return e=>null}function wQ(t){const{points:e}=t,[n,r,i,a]=e,o=Qn(n,a),s=fr(n,a),c=fr(r,i),l=RO(s,c),u=1/Math.sin(l/2),f=o/(1+u),d=f*Math.sqrt(2),[h,p]=i,g=ac(s)+l/2,y=f*u,m=h+y*Math.sin(g),b=p-y*Math.cos(g);return[m-d/2,b-d/2,d,d]}const SQ=()=>t=>[au.of(t).call(Gy).call(OQ).call(Fy).call(_Q).call(nC).call(rC,wQ,oC,oC,{frame:!1}).call(By).call(zy).call(xQ).value()];function MQ(t,e,n){const i=n,a=[0,i],o=[-i+1,-0+1];if(t==="normal")return a;if(t==="reverse")return o;if(t==="alternate")return e%2===0?a:o;if(t==="reverse-alternate")return e%2===0?o:a}function EQ(t,e,n){const r=[t];for(;r.length;){const i=r.pop();i.animate=Nt({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},i.animate||{});const{children:a}=i;Array.isArray(a)&&r.push(...a)}return t}const sC=()=>t=>{const{children:e=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:a="ease-in-out-sine"}=t,o=e.length;if(!Array.isArray(e)||o===0)return[];const{key:s}=e[0],c=e.map(l=>Object.assign(Object.assign({},l),{key:s})).map(l=>EQ(l,n,a));return function*(){let l=0,u;for(;r==="infinite"||l<r;){const[f,d]=MQ(i,l,o);for(let h=f;h<d;h+=1){const p=Math.abs(h);u!==p&&(yield c[p]),u=p}l++}}};sC.props={};function Po(t,e,n){const{encode:r}=n;if(t===null)return[e];const i=AQ(t).map(o=>{var s;return[o,(s=cn(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>Ln(o)),a=o=>i.map(([,s])=>s[o]).join("-");return Array.from(Kn(e,a).values())}function cC(t){return Array.isArray(t)?CQ(t):typeof t=="function"?PQ(t):t==="series"?TQ:t==="value"?kQ:t==="sum"?RQ:t==="maxIndex"?LQ:()=>null}function lC(t,e){for(const n of t)n.sort(e)}function uC(t,e){return(e==null?void 0:e.domain)||Array.from(new Set(t))}function AQ(t){return Array.isArray(t)?t:[t]}function TQ(t,e,n){return ou(r=>n[r])}function PQ(t){return(e,n,r)=>ou(i=>t(e[i]))}function CQ(t){return(e,n,r)=>(i,a)=>t.reduce((o,s)=>o!==0?o:dr(e[i][s],e[a][s]),0)}function kQ(t,e,n){return ou(r=>e[r])}function RQ(t,e,n){const r=ts(t),i=Array.from(Kn(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((c,l)=>c+ +e[l])]));return ou(o=>a.get(n[o]))}function LQ(t,e,n){const r=ts(t),i=Array.from(Kn(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,sc(s,c=>e[c])]));return ou(o=>a.get(n[o]))}function ou(t){return(e,n)=>dr(t(e),t(n))}const fC=(t={})=>{const{groupBy:e="x",orderBy:n=null,reverse:r=!1,y:i="y",y1:a="y1",series:o=!0}=t;return(s,c)=>{const{data:l,encode:u,style:f={}}=c,[d,h]=cn(u,"y"),[p,v]=cn(u,"y1"),[g]=o?Fl(u,"series","color"):cn(u,"color"),y=Po(e,s,c),b=cC(n)(l,d,g);b&&lC(y,b);const _=new Array(s.length),O=new Array(s.length),w=new Array(s.length),M=[],E=[];for(const N of y){r&&N.reverse();const k=p?+p[N[0]]:0,R=[],I=[];for(const rt of N){const wt=w[rt]=+d[rt]-k;wt<0?I.push(rt):wt>=0&&R.push(rt)}const F=R.length>0?R:I,B=I.length>0?I:R;let z=R.length-1,Y=0;for(;z>0&&d[F[z]]===0;)z--;for(;Y<B.length-1&&d[B[Y]]===0;)Y++;M.push(F[z]),E.push(B[Y]);let U=k;for(const rt of I.reverse()){const wt=w[rt];U=_[rt]=(O[rt]=U)+wt}let tt=k;for(const rt of R){const wt=w[rt];wt>0?tt=_[rt]=(O[rt]=tt)+wt:_[rt]=O[rt]=tt}}const A=new Set(M),P=new Set(E),C=i==="y"?_:O,D=a==="y"?_:O;return[s,Nt({},c,{encode:{y0:Dd(d,h),y:Dn(C,h),y1:Dn(D,v)},style:Object.assign({first:(N,k)=>A.has(k),last:(N,k)=>P.has(k)},f)})]}};fC.props={};function dC(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 NQ(t,e){let n=0,r,i=0,a=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(r=o-i,i+=r/++n,a+=r*(o-i));else{let o=-1;for(let s of t)(s=e(s,++o,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,a+=r*(s-i))}if(n>1)return a/(n-1)}function hC(t,e){const n=NQ(t,e);return n&&Math.sqrt(n)}function IQ(t,e,n){const r=dC(t),i=hC(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}var pC=Array.prototype,jQ=pC.slice,$pt=pC.map;function Hy(t){return()=>t}const DQ=Math.sqrt(50),FQ=Math.sqrt(10),BQ=Math.sqrt(2);function mh(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=DQ?10:a>=FQ?5:a>=BQ?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(t*l),c=Math.round(e*l),s/l<t&&++s,c/l>e&&--c,l=-l):(l=Math.pow(10,i)*o,s=Math.round(t/l),c=Math.round(e/l),s*l<t&&++s,c*l>e&&--c),c<s&&.5<=n&&n<2?mh(t,e,n*2):[s,c,l]}function zQ(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,a,o]=r?mh(e,t,n):mh(t,e,n);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(i+l)/-o;else for(let l=0;l<s;++l)c[l]=(i+l)*o;return c}function su(t,e,n){return e=+e,t=+t,n=+n,mh(t,e,n)[2]}function Xpt(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?su(e,t,n):su(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function GQ(t,e,n){let r;for(;;){const i=su(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 WQ(t){return Math.max(1,Math.ceil(Math.log(dC(t))/Math.LN2)+1)}function HQ(){var t=ul,e=Da,n=WQ;function r(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,c,l=new Array(o);for(a=0;a<o;++a)l[a]=t(i[a],a,i);var u=e(l),f=u[0],d=u[1],h=n(l,f,d);if(!Array.isArray(h)){const b=d,_=+h;if(e===Da&&([f,d]=GQ(f,d,_)),h=zQ(f,d,_),h[0]<=f&&(c=su(f,d,_)),h[h.length-1]>=d)if(b>=d&&e===Da){const O=su(f,d,_);isFinite(O)&&(O>0?d=(Math.floor(d/O)+1)*O:O<0&&(d=(Math.ceil(d*-O)+1)/-O))}else h.pop()}for(var p=h.length,v=0,g=p;h[v]<=f;)++v;for(;h[g-1]>d;)--g;(v||g<p)&&(h=h.slice(v,g),p=g-v);var y=new Array(p+1),m;for(a=0;a<=p;++a)m=y[a]=[],m.x0=a>0?h[a-1]:f,m.x1=a<p?h[a]:d;if(isFinite(c)){if(c>0)for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[Math.min(p,Math.floor((s-f)/c))].push(i[a]);else if(c<0){for(a=0;a<o;++a)if((s=l[a])!=null&&f<=s&&s<=d){const b=Math.floor((f-s)*c);y[Math.min(p,b+(h[b]<=s))].push(i[a])}}}else for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[AZ(h,s,0,p)].push(i[a]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Hy(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Hy([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Hy(Array.isArray(i)?jQ.call(i):i),r):n},r}function Yy(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?Kl:QT(i);r>n;){if(r-n>600){const c=r-n+1,l=e-n+1,u=Math.log(c),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),h=Math.max(n,Math.floor(e-l*f/c+d)),p=Math.min(r,Math.floor(e+(c-l)*f/c+d));Yy(t,e,h,p,i)}const a=t[e];let o=n,s=r;for(cu(t,n,e),i(t[r],a)>0&&cu(t,n,r);o<s;){for(cu(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[n],a)===0?cu(t,n,s):(++s,cu(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function cu(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function YQ(t,e=dr){let n,r=!1;if(e.length===1){let i;for(const a of t){const o=e(a);(r?dr(o,i)>0:dr(o,o)===0)&&(n=a,i=o,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function bh(t,e,n){if(t=Float64Array.from(wZ(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Mi(t);if(e>=1)return Mn(t);var r,i=(r-1)*e,a=Math.floor(i),o=Mn(Yy(t,a).subarray(0,a+1)),s=Mi(t.subarray(a+1));return o+(s-o)*(i-a)}}function Upt(t,e,n=number){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,a=Math.floor(i),o=+n(t[a],a,t),s=+n(t[a+1],a+1,t);return o+(s-o)*(i-a)}}function VQ(t,e,n=my){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,c)=>my(n(t[c],c,t))),e<=0)return hh(r);if(e>=1)return sc(r);var r,i=Uint32Array.from(t,(s,c)=>c),a=r.length-1,o=Math.floor(a*e);return Yy(i,o,0,a,(s,c)=>Kl(r[s],r[c])),o=YQ(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function Vy(t,e){return bh(t,.5,e)}function $Q(t,e){return VQ(t,.5,e)}var XQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Co(t){return e=>e===null?t:`${t} of ${e}`}function UQ(t){if(typeof t=="function")return[t,null];const n={mean:qQ,max:KQ,count:JQ,first:eJ,last:nJ,sum:tJ,min:QQ,median:ZQ}[t];if(!n)throw new Error(`Unknown reducer: ${t}.`);return n()}function qQ(){const t=(n,r)=>ru(n,i=>+r[i]),e=Co("mean");return[t,e]}function ZQ(){const t=(n,r)=>Vy(n,i=>+r[i]),e=Co("median");return[t,e]}function KQ(){const t=(n,r)=>Mn(n,i=>+r[i]),e=Co("max");return[t,e]}function QQ(){const t=(n,r)=>Mi(n,i=>+r[i]),e=Co("min");return[t,e]}function JQ(){const t=(n,r)=>n.length,e=Co("count");return[t,e]}function tJ(){const t=(n,r)=>Ii(n,i=>+r[i]),e=Co("sum");return[t,e]}function eJ(){const t=(n,r)=>r[n[0]],e=Co("first");return[t,e]}function nJ(){const t=(n,r)=>r[n[n.length-1]],e=Co("last");return[t,e]}const $y=(t={})=>{const{groupBy:e}=t,n=XQ(t,["groupBy"]);return(r,i)=>{const{data:a,encode:o}=i,s=e(r,i);if(!s)return[r,i];const c=(h,p)=>{if(h)return h;const{from:v}=p;if(!v)return h;const[,g]=cn(o,v);return g},l=Object.entries(n).map(([h,p])=>{const[v,g]=UQ(p),[y,m]=cn(o,h),b=c(m,p),_=s.map(O=>v(O,y!=null?y:a));return[h,Object.assign(Object.assign({},BX(_,(g==null?void 0:g(b))||b)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,v]=cn(o,h),g=s.map(y=>p[y[0]]);return[h,Dn(g,v)]}),f=s.map(h=>a[h[0]]);return[ts(s),Nt({},i,{data:f,encode:Object.fromEntries([...u,...l])})]}};$y.props={};var rJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const vC="thresholds";function iJ(t){const[e,n]=Da(t);return Math.min(200,IQ(t,e,n))}const Xy=(t={})=>{const{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=rJ(t,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:c}=s,l=n.map(p=>{const[v]=cn(c,p);return v}),u=se(r,vC),f=o.filter(p=>l.every(v=>Ln(v[p]))),d=[...e.map(p=>{const[v]=cn(c,p);return v}).filter(Ln).map(p=>v=>p[v]),...n.map((p,v)=>{const g=l[v],y=u[p]||iJ(g),m=HQ().thresholds(y).value(_=>+g[_])(f),b=new Map(m.flatMap(_=>{const{x0:O,x1:w}=_,M=`${O},${w}`;return _.map(E=>[E,M])}));return i[p]=b,_=>b.get(_)})],h=p=>d.map(v=>v(p)).join("-");return Array.from(Kn(f,h).values())};return $y(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(vC)))),Object.fromEntries(n.flatMap(o=>{const s=([l])=>+i[o].get(l).split(",")[0],c=([l])=>+i[o].get(l).split(",")[1];return c.from=o,[[o,s],[`${o}1`,c]]}))),{groupBy:a}))};Xy.props={};const gC=(t={})=>{const{thresholds:e}=t;return Xy(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};gC.props={};var aJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const yC=(t={})=>{const{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t,a=aJ(t,["groupBy","reverse","orderBy","padding"]);return(o,s)=>{const{data:c,encode:l,scale:u}=s,{series:f}=u,[d]=cn(l,"y"),[h]=Fl(l,"series","color"),p=uC(h,f),v=Po(e,o,s),y=cC(r)(c,d,h);y&&lC(v,y);const m=new Array(o.length);for(const b of v){n&&b.reverse();for(let _=0;_<b.length;_++)m[b[_]]=p[_]}return[o,Nt({},s,{scale:{series:{domain:p,paddingInner:i}},encode:{series:Dn(m)}})]}};yC.props={};function xh(t,e,n){if(t===null)return[-.5,.5];const r=uC(t,e),a=new Oo({domain:r,range:[0,1],padding:n}).getBandWidth();return[-a/2,a/2]}function _h(t,e,n){return e*(1-t)+n*t}const mC=(t={})=>{const{padding:e=0,paddingX:n=e,paddingY:r=e,random:i=Math.random}=t;return(a,o)=>{const{encode:s,scale:c}=o,{x:l,y:u}=c,[f]=cn(s,"x"),[d]=cn(s,"y"),h=xh(f,l,n),p=xh(d,u,r),v=a.map(()=>_h(i(),...p)),g=a.map(()=>_h(i(),...h));return[a,Nt({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:Dn(v),dx:Dn(g)}})]}};mC.props={};const bC=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[c]=cn(a,"x"),l=xh(c,s,e),u=r.map(()=>_h(n(),...l));return[r,Nt({scale:{x:{padding:.5}}},i,{encode:{dx:Dn(u)}})]}};bC.props={};const xC=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[c]=cn(a,"y"),l=xh(c,s,e),u=r.map(()=>_h(n(),...l));return[r,Nt({scale:{y:{padding:.5}}},i,{encode:{dy:Dn(u)}})]}};xC.props={};var oJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const _C=(t={})=>{const{groupBy:e="x"}=t;return(n,r)=>{const{encode:i}=r,{x:a}=i,o=oJ(i,["x"]),s=Object.entries(o).filter(([d])=>d.startsWith("y")).map(([d])=>[d,cn(i,d)[0]]),c=s.map(([d])=>[d,new Array(n.length)]),l=Po(e,n,r),u=new Array(l.length);for(let d=0;d<l.length;d++){const p=l[d].flatMap(y=>s.map(([,m])=>+m[y])),[v,g]=Da(p);u[d]=(v+g)/2}const f=Math.max(...u);for(let d=0;d<l.length;d++){const h=f-u[d],p=l[d];for(const v of p)for(let g=0;g<s.length;g++){const[,y]=s[g],[,m]=c[g];m[v]=+y[v]+h}}return[n,Nt({},r,{encode:Object.fromEntries(c.map(([d,h])=>[d,Dn(h,cn(i,d)[1])]))})]}};_C.props={};const OC=(t={})=>{const{groupBy:e="x",series:n=!0}=t;return(r,i)=>{const{encode:a}=i,[o]=cn(a,"y"),[s,c]=cn(a,"y1"),[l]=n?Fl(a,"series","color"):cn(a,"color"),u=Po(e,r,i),f=new Array(r.length);for(const d of u){const h=d.map(p=>+o[p]);for(let p=0;p<d.length;p++){const v=d[p],g=Math.max(...h.filter((y,m)=>m!==p));f[v]=o[v]>g?g:o[v]}}return[r,Nt({},i,{encode:{y1:Dn(f,c)}})]}};OC.props={};const wC=t=>{const{groupBy:e=["x"],reducer:n=(o,s)=>s[o[0]],orderBy:r=null,reverse:i=!1,duration:a}=t;return(o,s)=>{const{encode:c}=s,u=(Array.isArray(e)?e:[e]).map(g=>[g,cn(c,g)[0]]);if(u.length===0)return[o,s];let f=[o];for(const[,g]of u){const y=[];for(const m of f){const b=Array.from(Kn(m,_=>g[_]).values());y.push(...b)}f=y}if(r){const[g]=cn(c,r);g&&f.sort((y,m)=>n(y,g)-n(m,g)),i&&f.reverse()}const d=(a||3e3)/f.length,[h]=a?[xo(o,d)]:Fl(c,"enterDuration",xo(o,d)),[p]=Fl(c,"enterDelay",xo(o,0)),v=new Array(o.length);for(let g=0,y=0;g<f.length;g++){const m=f[g],b=Mn(m,_=>+h[_]);for(const _ of m)v[_]=+p[_]+y;y+=b}return[o,Nt({},s,{encode:{enterDuration:Fd(h),enterDelay:Fd(v)}})]}};wC.props={};var sJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function cJ(t){return typeof t=="function"?t:{min:(n,r)=>Mi(n,i=>r[+i]),max:(n,r)=>Mn(n,i=>r[+i]),first:(n,r)=>r[n[0]],last:(n,r)=>r[n[n.length-1]],mean:(n,r)=>ru(n,i=>r[+i]),median:(n,r)=>Vy(n,i=>r[+i]),sum:(n,r)=>Ii(n,i=>r[+i]),deviation:(n,r)=>hC(n,i=>r[+i])}[t]||Mn}const SC=(t={})=>{const{groupBy:e="x",basis:n="max"}=t;return(r,i)=>{const{encode:a,tooltip:o}=i,{x:s}=a,c=sJ(a,["x"]),l=Object.entries(c).filter(([v])=>v.startsWith("y")).map(([v])=>[v,cn(a,v)[0]]),[,u]=l.find(([v])=>v==="y"),f=l.map(([v])=>[v,new Array(r.length)]),d=Po(e,r,i),h=cJ(n);for(const v of d){const g=h(v,u);for(const y of v)for(let m=0;m<l.length;m++){const[,b]=l[m],[,_]=f[m];_[y]=+b[y]/g}}const p=La(o)||(o==null?void 0:o.items)&&(o==null?void 0:o.items.length)!==0;return[r,Nt({},i,Object.assign({encode:Object.fromEntries(f.map(([v,g])=>[v,Dn(g,cn(a,v)[1])]))},!p&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};SC.props={};function MC(t,e){return[t[0]]}function lJ(t,e){const n=t.length-1;return[t[n]]}function uJ(t,e){const n=sc(t,r=>e[r]);return[t[n]]}function fJ(t,e){const n=hh(t,r=>e[r]);return[t[n]]}function dJ(t){return typeof t=="function"?t:{first:MC,last:lJ,max:uJ,min:fJ}[t]||MC}const Oh=(t={})=>{const{groupBy:e="series",channel:n,selector:r}=t;return(i,a)=>{const{encode:o}=a,s=Po(e,i,a),[c]=cn(o,n),l=dJ(r);return[s.flatMap(u=>l(u,c)),a]}};Oh.props={};var hJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const EC=(t={})=>{const{selector:e}=t,n=hJ(t,["selector"]);return Oh(Object.assign({channel:"x",selector:e},n))};EC.props={};var pJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const AC=(t={})=>{const{selector:e}=t,n=pJ(t,["selector"]);return Oh(Object.assign({channel:"y",selector:e},n))};AC.props={};var vJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const lu=(t={})=>{const{channels:e=["x","y"]}=t,n=vJ(t,["channels"]),r=(i,a)=>Po(e,i,a);return $y(Object.assign(Object.assign({},n),{groupBy:r}))};lu.props={};const TC=(t={})=>lu(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));TC.props={};const PC=(t={})=>lu(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));PC.props={};const CC=(t={})=>lu(Object.assign(Object.assign({},t),{channels:["color"]}));CC.props={};function gJ(t,e,n){return(e.length!==2?za(ev(t,e,n),([r,i],[a,o])=>dr(i,o)||dr(r,a)):za(Kn(t,n),([r,i],[a,o])=>e(i,o)||dr(r,a))).map(([r])=>r)}var kC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function yJ(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=cn(n,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>Mn(o,s=>+a[s]);if(i==="min")return o=>Mi(o,s=>+a[s]);if(i==="sum")return o=>Ii(o,s=>+a[s]);if(i==="median")return o=>Vy(o,s=>+a[s]);if(i==="mean")return o=>ru(o,s=>+a[s]);if(i==="first")return o=>a[o[0]];if(i==="last")return o=>a[o[o.length-1]];throw new Error(`Unknown reducer: ${i}`)}function mJ(t,e,n){const{reverse:r,channel:i}=n,{encode:a}=e,[o]=cn(a,i),s=za(t,c=>o[c]);return r&&s.reverse(),[s,e]}function bJ(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(i=>r.has(e[i]))}function xJ(t,e,n){var r;const{reverse:i,slice:a,channel:o}=n,s=kC(n,["reverse","slice","channel"]),{encode:c,scale:l={}}=e,u=(r=l[o])===null||r===void 0?void 0:r.domain,[f]=cn(c,o),d=yJ(o,s,c),h=bJ(t,f,u),p=gJ(h,d,y=>f[y]);i&&p.reverse();const v=typeof a=="number"?[0,a]:a,g=a?p.slice(...v):p;return[t,Nt(e,{scale:{[o]:{domain:g}}})]}const wh=(t={})=>{const{reverse:e=!1,slice:n,channel:r,ordinal:i=!0}=t,a=kC(t,["reverse","slice","channel","ordinal"]);return(o,s)=>i?xJ(o,s,Object.assign({reverse:e,slice:n,channel:r},a)):mJ(o,s,Object.assign({reverse:e,slice:n,channel:r},a))};wh.props={};const RC=(t={})=>wh(Object.assign(Object.assign({},t),{channel:"x"}));RC.props={};const LC=(t={})=>wh(Object.assign(Object.assign({},t),{channel:"y"}));LC.props={};const NC=(t={})=>wh(Object.assign(Object.assign({},t),{channel:"color"}));NC.props={};function _J(t,e){return typeof e=="string"?t.map(n=>n[e]):t.map(e)}function OJ(t,e){if(typeof t=="function")return n=>t(n,e);if(t==="sum")return n=>Ii(n,r=>+e[r]);throw new Error(`Unknown reducer: ${t}`)}const IC=(t={})=>{const{field:e,channel:n="y",reducer:r="sum"}=t;return(i,a)=>{const{data:o,encode:s}=a,[c]=cn(s,"x"),l=e?_J(o,e):cn(s,n)[0],u=OJ(r,l),f=nv(i,u,d=>c[d]).map(d=>d[1]);return[i,Nt({},a,{scale:{x:{flex:f}}})]}};IC.props={};function wJ(t){const{padding:e=0,direction:n="col"}=t;return(r,i,a)=>{const o=r.length;if(o===0)return[];const{innerWidth:s,innerHeight:c}=a,l=c/s;let u=Math.ceil(Math.sqrt(i/l)),f=s/u,d=Math.ceil(i/u),h=d*f;for(;h>c;)u=u+1,f=s/u,d=Math.ceil(i/u),h=d*f;const p=c-d*f,v=d<=1?0:p/(d-1),[g,y]=d<=1?[(s-o*f)/(o-1),(c-f)/2]:[0,0];return r.map((m,b)=>{const[_,O,w,M]=Wv(m),E=n==="col"?b%u:Math.floor(b/d),A=n==="col"?Math.floor(b/u):b%d,P=E*f,C=(d-A-1)*f+p,D=(f-e)/w,N=(f-e)/M,k=P-_+g*E+1/2*e,R=C-O-v*A-y+1/2*e;return`translate(${k}, ${R}) scale(${D}, ${N})`})}}const jC=t=>(e,n)=>[e,Nt({},n,{modifier:wJ(t),axis:!1})];jC.props={};function SJ(t,e,n,r){const i=t.length;if(r>=i||r===0)return t;const a=h=>e[t[h]]*1,o=h=>n[t[h]]*1,s=[],c=(i-2)/(r-2);let l=0,u,f,d;s.push(l);for(let h=0;h<r-2;h++){let p=0,v=0,g=Math.floor((h+1)*c)+1,y=Math.floor((h+2)*c)+1;y=Math.min(y,i);const m=y-g;for(;g<y;g++)p+=a(g),v+=o(g);p/=m,v/=m;let b=Math.floor((h+0)*c)+1;const _=Math.floor((h+1)*c)+1,O=[a(l),o(l)];for(u=f=-1;b<_;b++)f=Math.abs((O[0]-p)*(a(b)-O[1])-(O[0]-o(b))*(v-O[0]))*.5,f>u&&(u=f,d=b);s.push(d),l=d}return s.push(i-1),s.map(h=>t[h])}function MJ(t){if(typeof t=="function")return t;if(t==="lttb")return SJ;const e={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[hh(r,o=>a[o])]],max:(r,i,a)=>[r[sc(r,o=>a[o])]],median:(r,i,a)=>[r[$Q(r,o=>a[o])]]},n=e[t]||e.median;return(r,i,a,o)=>{const s=Math.max(1,Math.floor(r.length/o));return EJ(r,s).flatMap(l=>n(l,i,a))}}function EJ(t,e){const n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}const DC=(t={})=>{const{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,i=MJ(e);return(a,o)=>{const{encode:s}=o,c=Po(r,a,o),[l]=cn(s,"x"),[u]=cn(s,"y");return[c.flatMap(f=>i(f,l,u,n)),o]}};DC.props={};function AJ(t){return typeof t=="object"?[t.value,t.ordinal]:[t,!0]}const FC=(t={})=>(e,n)=>{const{encode:r,data:i}=n,a=Object.entries(t).map(([u,f])=>{const[d]=cn(r,u);if(!d)return null;const[h,p=!0]=AJ(f);if(typeof h=="function")return v=>h(d[v]);if(p){const v=Array.isArray(h)?h:[h];return v.length===0?null:g=>v.includes(d[g])}else{const[v,g]=h;return y=>d[y]>=v&&d[y]<=g}}).filter(Ln);if(a.length===0)return[e,n];const o=u=>a.every(f=>f(u)),s=e.filter(o),c=s.map((u,f)=>f),l=Object.entries(r).map(([u,f])=>[u,Object.assign(Object.assign({},f),{value:c.map(d=>f.value[s[d]]).filter(d=>d!==void 0)})]);return[c,Nt({},n,{encode:Object.fromEntries(l),data:s.map(u=>i[u])})]};FC.props={};var BC={},Uy={},qy=34,uu=10,Zy=13;function zC(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function TJ(t,e){var n=zC(t);return function(r,i){return e(n(r),i,t)}}function GC(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 yi(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function PJ(t){return t<0?"-"+yi(-t,6):t>9999?"+"+yi(t,6):yi(t,4)}function CJ(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":PJ(t.getUTCFullYear(),4)+"-"+yi(t.getUTCMonth()+1,2)+"-"+yi(t.getUTCDate(),2)+(i?"T"+yi(e,2)+":"+yi(n,2)+":"+yi(r,2)+"."+yi(i,3)+"Z":r?"T"+yi(e,2)+":"+yi(n,2)+":"+yi(r,2)+"Z":n||e?"T"+yi(e,2)+":"+yi(n,2)+"Z":"")}function kJ(t){var e=new RegExp('["'+t+`
|
|
\r]`),n=t.charCodeAt(0);function r(f,d){var h,p,v=i(f,function(g,y){if(h)return h(g,y-1);p=g,h=d?TJ(g,d):zC(g)});return v.columns=p||[],v}function i(f,d){var h=[],p=f.length,v=0,g=0,y,m=p<=0,b=!1;f.charCodeAt(p-1)===uu&&--p,f.charCodeAt(p-1)===Zy&&--p;function _(){if(m)return Uy;if(b)return b=!1,BC;var w,M=v,E;if(f.charCodeAt(M)===qy){for(;v++<p&&f.charCodeAt(v)!==qy||f.charCodeAt(++v)===qy;);return(w=v)>=p?m=!0:(E=f.charCodeAt(v++))===uu?b=!0:E===Zy&&(b=!0,f.charCodeAt(v)===uu&&++v),f.slice(M+1,w-1).replace(/""/g,'"')}for(;v<p;){if((E=f.charCodeAt(w=v++))===uu)b=!0;else if(E===Zy)b=!0,f.charCodeAt(v)===uu&&++v;else if(E!==n)continue;return f.slice(M,w)}return m=!0,f.slice(M,p)}for(;(y=_())!==Uy;){for(var O=[];y!==BC&&y!==Uy;)O.push(y),y=_();d&&(O=d(O,g++))==null||h.push(O)}return h}function a(f,d){return f.map(function(h){return d.map(function(p){return u(h[p])}).join(t)})}function o(f,d){return d==null&&(d=GC(f)),[d.map(u).join(t)].concat(a(f,d)).join(`
|
|
`)}function s(f,d){return d==null&&(d=GC(f)),a(f,d).join(`
|
|
`)}function c(f){return f.map(l).join(`
|
|
`)}function l(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?CJ(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:c,formatRow:l,formatValue:u}}function RJ(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})?)?$/))LJ&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const LJ=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var NJ=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};const WC=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>NJ(void 0,void 0,void 0,function*(){const a=yield fetch(e);if(n==="csv"){const o=yield a.text();return kJ(r).parse(o,i?RJ:Jo)}else if(n==="json")return yield a.json();throw new Error(`Unknown format: ${n}.`)})};WC.props={};const HC=t=>{const{value:e}=t;return()=>e};HC.props={};function IJ(t,e){return t.map(n=>{if(Array.isArray(n)){const[r,i=e]=n;return[r,i]}return[n,e]})}const YC=t=>{const{fields:e=[]}=t,n=IJ(e,!0);return r=>{const i=(a,o)=>n.reduce((s,[c,l=!0])=>s!==0?s:l?a[c]<o[c]?-1:+(a[c]!==o[c]):a[c]>o[c]?-1:+(a[c]!==o[c]),0);return[...r].sort(i)}};YC.props={};function qpt(t){return t!=null&&!Number.isNaN(t)}const VC=t=>{const{callback:e}=t;return n=>Array.isArray(n)?[...n].sort(e):n};VC.props={};function jJ(t){return t!=null&&!Number.isNaN(t)}const $C=t=>{const{callback:e=jJ}=t;return n=>n.filter(e)};$C.props={};function DJ(t,e=[]){return e.reduce((n,r)=>(r in t&&(n[r]=t[r]),n),{})}const XC=t=>{const{fields:e}=t;return n=>n.map(r=>DJ(r,e))};XC.props={};function FJ(t){return Object.keys(t).length===0}const UC=t=>e=>{if(!t||FJ(t))return e;const n=r=>Object.entries(r).reduce((i,[a,o])=>(i[t[a]||a]=o,i),{});return e.map(n)};UC.props={};function BJ(t){return!t||Object.keys(t).length===0}const qC=t=>{const{fields:e,key:n="key",value:r="value"}=t;return i=>BJ(e)?i:i.flatMap(a=>e.map(o=>Object.assign(Object.assign({},a),{[n]:o,[r]:a[o]})))};qC.props={};const ZC=t=>{const{start:e,end:n}=t;return r=>r.slice(e,n)};ZC.props={};const KC=t=>{const{callback:e=Jo}=t;return n=>e(n)};KC.props={};const QC=t=>{const{callback:e=Jo}=t;return n=>Array.isArray(n)?n.map(e):n};QC.props={};function JC(t){return typeof t=="string"?e=>e[t]:t}const tk=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:a=NaN}=t,[o,s]=n,c=JC(s),l=JC(o),u=ev(e,([f])=>f,f=>c(f));return f=>f.map(d=>{const h=u.get(l(d));return Object.assign(Object.assign({},d),r.reduce((p,v,g)=>(p[i[g]]=h?h[v]:a,p),{}))})};tk.props={};var zJ=mt(78434),GJ=mt.n(zJ);function Zpt(t){return t!=null&&!Number.isNaN(t)}const ek=t=>{const{field:e,groupBy:n,as:r=["y","size"],min:i,max:a,size:o=10,width:s}=t,[c,l]=r;return u=>Array.from(Kn(u,d=>n.map(h=>d[h]).join("-")).values()).map(d=>{const h=GJ().create(d.map(g=>g[e]),{min:i,max:a,size:o,width:s}),p=h.map(g=>g.x),v=h.map(g=>g.y);return Object.assign(Object.assign({},d[0]),{[c]:p,[l]:v})})};ek.props={};const nk=()=>t=>(console.log("G2 data section:",t),t);nk.props={};function Ky(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function rk(t,e){const[n,r]=t,[i,a]=e;return n>=i[0]&&n<=a[0]&&r>=i[1]&&r<=a[1]}function WJ(t,e){const[n,r]=t;return!(rk(n,e)&&rk(r,e))}function HJ(t,e){const[n,r]=t,[i,a]=e;return n[0]<a[0]&&r[0]>i[0]&&n[1]<a[1]&&r[1]>i[1]}const YJ=t=>{const{priority:e}=t;return n=>{const r=[];return e&&n.sort(e),n.forEach(i=>{mg(i);const a=i.getLocalBounds();r.some(s=>HJ(Ky(a),Ky(s.getLocalBounds())))?yg(i):r.push(i)}),n}};function VJ([t,e],[n,r]){return r>t&&e>n}function Sh(){const t=new Map;return[r=>t.get(r),(r,i)=>t.set(r,i)]}function $J(t){const e=t.cloneNode(!0),n=e.getElementById("connector");n&&e.removeChild(n);const{min:r,max:i}=e.getRenderBounds();return e.destroy(),{min:r,max:i}}const XJ=t=>{const{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return i=>{const a=i.length;if(a<=1)return i;const[o,s]=Sh(),[c,l]=Sh(),[u,f]=Sh(),[d,h]=Sh();for(const p of i){const{min:v,max:g}=$J(p),[y,m]=v,[b,_]=g;s(p,m),l(p,m),f(p,_-m),h(p,[y,b])}for(let p=0;p<e;p++){i.sort((g,y)=>dr(c(g),c(y)));let v=0;for(let g=0;g<a-1;g++){const y=i[g];let m=g+1,b;for(;(b=i[m])&&!VJ(d(y),d(b));)m+=1;if(b){const _=c(y),O=u(y),w=c(b),M=w-(_+O);if(M<r){const E=(r-M)/2;v=Math.max(v,E),l(y,_-E),l(b,w+E)}}}if(v<n)break}for(const p of i)p.style.y+=c(p)-o(p);return i}},UJ=()=>t=>(t.forEach(e=>{mg(e);const n=e.attr("bounds"),r=e.getLocalBounds();WJ(Ky(r),n)&&yg(e)}),t);function qJ(t){return typeof t=="object"?t:Pa(t)}function Qy(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function ik(t,e,n){return .2126*Qy(t)+.7152*Qy(e)+.0722*Qy(n)}function ak(t,e){const{r:n,g:r,b:i}=t,{r:a,g:o,b:s}=e,c=ik(n,r,i),l=ik(a,o,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function ZJ(t,e){const n=sc(e,r=>ak(t,qJ(r)));return e[n]}const KJ=t=>{const{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return r=>(r.forEach(i=>{const a=i.attr("dependentElement").parsedStyle.fill,o=i.parsedStyle.fill;ak(o,a)<e&&i.attr("fill",ZJ(a,n))}),r)};function QJ(){return{"data.fetch":WC,"data.inline":HC,"data.sortBy":YC,"data.sort":VC,"data.filter":$C,"data.pick":XC,"data.rename":UC,"data.fold":qC,"data.slice":ZC,"data.custom":KC,"data.map":QC,"data.join":tk,"data.kde":ek,"data.log":nk,"transform.stackY":fC,"transform.binX":gC,"transform.bin":Xy,"transform.dodgeX":yC,"transform.jitter":mC,"transform.jitterX":bC,"transform.jitterY":xC,"transform.symmetryY":_C,"transform.diffY":OC,"transform.stackEnter":wC,"transform.normalizeY":SC,"transform.select":Oh,"transform.selectX":EC,"transform.selectY":AC,"transform.groupX":TC,"transform.groupY":PC,"transform.groupColor":CC,"transform.group":lu,"transform.sortX":RC,"transform.sortY":LC,"transform.sortColor":NC,"transform.flexX":IC,"transform.pack":jC,"transform.sample":DC,"transform.filter":FC,"coordinate.cartesian":$S,"coordinate.polar":hl,"coordinate.transpose":Sg,"coordinate.theta":XS,"coordinate.parallel":Mg,"coordinate.fisheye":US,"coordinate.radial":uv,"coordinate.radar":qS,"encode.constant":ZS,"encode.field":KS,"encode.transform":QS,"encode.column":JS,"mark.interval":hM,"mark.rect":vM,"mark.line":GM,"mark.point":TE,"mark.text":LE,"mark.cell":IE,"mark.area":HE,"mark.link":Jg,"mark.image":rA,"mark.polygon":cA,"mark.box":dA,"mark.vector":pA,"mark.lineX":mA,"mark.lineY":_A,"mark.connector":MA,"mark.range":TA,"mark.rangeX":kA,"mark.rangeY":NA,"mark.path":BA,"mark.shape":WA,"mark.density":VA,"mark.heatmap":UA,"palette.category10":qA,"palette.category20":ZA,"scale.linear":KA,"scale.ordinal":eT,"scale.band":iT,"scale.identity":aT,"scale.point":oT,"scale.time":TT,"scale.log":CT,"scale.pow":kT,"scale.sqrt":RT,"scale.threshold":LT,"scale.quantile":NT,"scale.quantize":IT,"scale.sequential":jT,"scale.constant":DT,"theme.classic":FT,"theme.classicDark":zT,"theme.academy":GT,"theme.light":dy,"theme.dark":BT,"component.axisX":WT,"component.axisY":HT,"component.legendCategory":py,"component.legendContinuous":go,"component.legends":VT,"component.title":XT,"component.sliderX":JT,"component.sliderY":tP,"component.scrollbarX":eP,"component.scrollbarY":nP,"animation.scaleInX":by,"animation.scaleOutX":DZ,"animation.scaleInY":rP,"animation.scaleOutY":FZ,"animation.waveIn":iP,"animation.fadeIn":aP,"animation.fadeOut":oP,"animation.zoomIn":BZ,"animation.zoomOut":zZ,"animation.pathIn":sP,"animation.morphing":fP,"animation.growInX":dP,"animation.growInY":hP,"interaction.elementHighlight":fh,"interaction.elementHighlightByX":xP,"interaction.elementHighlightByColor":_P,"interaction.elementSelect":dh,"interaction.elementSelectByX":OP,"interaction.elementSelectByColor":wP,"interaction.fisheye":rK,"interaction.chartIndex":SP,"interaction.tooltip":DP,"interaction.legendFilter":PK,"interaction.legendHighlight":CK,"interaction.brushHighlight":Ly,"interaction.brushXHighlight":jK,"interaction.brushYHighlight":DK,"interaction.brushAxisHighlight":$K,"interaction.brushFilter":Dy,"interaction.brushXFilter":ZK,"interaction.brushYFilter":KK,"interaction.sliderFilter":ZP,"interaction.scrollbarFilter":nQ,"interaction.poptip":JP,"composition.spaceLayer":tC,"composition.spaceFlex":eC,"composition.facetRect":aC,"composition.repeatMatrix":mQ,"composition.facetCircle":SQ,"composition.timingKeyframe":sC,"labelTransform.overlapHide":YJ,"labelTransform.overlapDodgeY":XJ,"labelTransform.overflowHide":UJ,"labelTransform.contrastReverse":KJ}}var fu=t=>t;function Mh(t,e){t&&sk.hasOwnProperty(t.type)&&sk[t.type](t,e)}var ok={Feature:function(t,e){Mh(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Mh(n[r].geometry,e)}},sk={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){Jy(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Jy(n[r],e,0)},Polygon:function(t,e){ck(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ck(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Mh(n[r],e)}};function Jy(t,e,n){var r=-1,i=t.length-n,a;for(e.lineStart();++r<i;)a=t[r],e.point(a[0],a[1],a[2]);e.lineEnd()}function ck(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Jy(t[n],e,1);e.polygonEnd()}function Tc(t,e){t&&ok.hasOwnProperty(t.type)?ok[t.type](t,e):Mh(t,e)}class Ya{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 a=n[i],o=e+a,s=Math.abs(e)<Math.abs(a)?e-(o-a):a-(o-e);s&&(n[r++]=s),e=o}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,a,o=0;if(n>0){for(o=e[--n];n>0&&(r=o,i=e[--n],o=r+i,a=i-(o-r),!a););n>0&&(a<0&&e[n-1]<0||a>0&&e[n-1]>0)&&(i=a*2,r=o+i,i==r-o&&(o=r))}return o}}function Kpt(t,e){const n=new Ya;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 Qpt(t,e){const n=new Ya;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}var De=1e-6,lk=1e-12,sn=Math.PI,yr=sn/2,uk=sn/4,Ti=sn*2,Zr=180/sn,hr=sn/180,mn=Math.abs,Pc=Math.atan,Va=Math.atan2,rn=Math.cos,Eh=Math.ceil,fk=Math.exp,Jpt=Math.floor,t0t=Math.hypot,Ah=Math.log,tm=Math.pow,Ke=Math.sin,Hi=Math.sign||function(t){return t>0?1:t<0?-1:0},mi=Math.sqrt,em=Math.tan;function dk(t){return t>1?0:t<-1?sn:Math.acos(t)}function Yi(t){return t>1?yr:t<-1?-yr:Math.asin(t)}function e0t(t){return(t=Ke(t/2))*t}function Vi(){}var nm=new Ya,rm=new Ya,hk,pk,im,am,ko={point:Vi,lineStart:Vi,lineEnd:Vi,polygonStart:function(){ko.lineStart=JJ,ko.lineEnd=ett},polygonEnd:function(){ko.lineStart=ko.lineEnd=ko.point=Vi,nm.add(mn(rm)),rm=new Ya},result:function(){var t=nm/2;return nm=new Ya,t}};function JJ(){ko.point=ttt}function ttt(t,e){ko.point=vk,hk=im=t,pk=am=e}function vk(t,e){rm.add(am*t-im*e),im=t,am=e}function ett(){vk(hk,pk)}var gk=ko,Cc=1/0,Th=Cc,du=-Cc,Ph=du,ntt={point:rtt,lineStart:Vi,lineEnd:Vi,polygonStart:Vi,polygonEnd:Vi,result:function(){var t=[[Cc,Th],[du,Ph]];return du=Ph=-(Th=Cc=1/0),t}};function rtt(t,e){t<Cc&&(Cc=t),t>du&&(du=t),e<Th&&(Th=e),e>Ph&&(Ph=e)}var Ch=ntt,om=0,sm=0,hu=0,kh=0,Rh=0,kc=0,cm=0,lm=0,pu=0,yk,mk,xa,_a,Ji={point:Os,lineStart:bk,lineEnd:xk,polygonStart:function(){Ji.lineStart=ott,Ji.lineEnd=stt},polygonEnd:function(){Ji.point=Os,Ji.lineStart=bk,Ji.lineEnd=xk},result:function(){var t=pu?[cm/pu,lm/pu]:kc?[kh/kc,Rh/kc]:hu?[om/hu,sm/hu]:[NaN,NaN];return om=sm=hu=kh=Rh=kc=cm=lm=pu=0,t}};function Os(t,e){om+=t,sm+=e,++hu}function bk(){Ji.point=itt}function itt(t,e){Ji.point=att,Os(xa=t,_a=e)}function att(t,e){var n=t-xa,r=e-_a,i=mi(n*n+r*r);kh+=i*(xa+t)/2,Rh+=i*(_a+e)/2,kc+=i,Os(xa=t,_a=e)}function xk(){Ji.point=Os}function ott(){Ji.point=ctt}function stt(){_k(yk,mk)}function ctt(t,e){Ji.point=_k,Os(yk=xa=t,mk=_a=e)}function _k(t,e){var n=t-xa,r=e-_a,i=mi(n*n+r*r);kh+=i*(xa+t)/2,Rh+=i*(_a+e)/2,kc+=i,i=_a*t-xa*e,cm+=i*(xa+t),lm+=i*(_a+e),pu+=i*3,Os(xa=t,_a=e)}var Ok=Ji;function wk(t){this._context=t}wk.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,Ti);break}}},result:Vi};var um=new Ya,fm,Sk,Mk,vu,gu,Lh={point:Vi,lineStart:function(){Lh.point=ltt},lineEnd:function(){fm&&Ek(Sk,Mk),Lh.point=Vi},polygonStart:function(){fm=!0},polygonEnd:function(){fm=null},result:function(){var t=+um;return um=new Ya,t}};function ltt(t,e){Lh.point=Ek,Sk=vu=t,Mk=gu=e}function Ek(t,e){vu-=t,gu-=e,um.add(mi(vu*vu+gu*gu)),vu=t,gu=e}var Ak=Lh;let Tk,Nh,Pk,Ck;class kk{constructor(e){this._append=e==null?Rk:utt(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!==Pk||this._append!==Nh){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`,Pk=r,Nh=this._append,Ck=this._,this._=i}this._+=Ck;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Rk(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function utt(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Rk;if(e!==Tk){const n=wr(10,e);Tk=e,Nh=function(i){let a=1;this._+=i[0];for(const o=i.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+i[a]}}return Nh}function Lk(t,e){let n=3,r=4.5,i,a;function o(s){return s&&(typeof r=="function"&&a.pointRadius(+r.apply(this,arguments)),Tc(s,i(a))),a.result()}return o.area=function(s){return Tc(s,i(gk)),gk.result()},o.measure=function(s){return Tc(s,i(Ak)),Ak.result()},o.bounds=function(s){return Tc(s,i(Ch)),Ch.result()},o.centroid=function(s){return Tc(s,i(Ok)),Ok.result()},o.projection=function(s){return arguments.length?(i=s==null?(t=null,fu):(t=s).stream,o):t},o.context=function(s){return arguments.length?(a=s==null?(e=null,new kk(n)):new wk(e=s),typeof r!="function"&&a.pointRadius(r),o):e},o.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(a.pointRadius(+s),+s),o):r},o.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&&(a=new kk(n)),o},o.projection(t).digits(n).context(e)}function Rc(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,a=new Array(i);++r<i;)a[r]=t+r*n;return a}function Nk(t,e,n){var r=Rc(t,e-De,n).concat(e);return function(i){return r.map(function(a){return[i,a]})}}function Ik(t,e,n){var r=Rc(t,e-De,n).concat(e);return function(i){return r.map(function(a){return[a,i]})}}function ftt(){var t,e,n,r,i,a,o,s,c=10,l=c,u=90,f=360,d,h,p,v,g=2.5;function y(){return{type:"MultiLineString",coordinates:m()}}function m(){return Rc(Eh(r/u)*u,n,u).map(p).concat(Rc(Eh(s/f)*f,o,f).map(v)).concat(Rc(Eh(e/c)*c,t,c).filter(function(b){return mn(b%u)>De}).map(d)).concat(Rc(Eh(a/l)*l,i,l).filter(function(b){return mn(b%f)>De}).map(h))}return y.lines=function(){return m().map(function(b){return{type:"LineString",coordinates:b}})},y.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(v(o).slice(1),p(n).reverse().slice(1),v(s).reverse().slice(1))]}},y.extent=function(b){return arguments.length?y.extentMajor(b).extentMinor(b):y.extentMinor()},y.extentMajor=function(b){return arguments.length?(r=+b[0][0],n=+b[1][0],s=+b[0][1],o=+b[1][1],r>n&&(b=r,r=n,n=b),s>o&&(b=s,s=o,o=b),y.precision(g)):[[r,s],[n,o]]},y.extentMinor=function(b){return arguments.length?(e=+b[0][0],t=+b[1][0],a=+b[0][1],i=+b[1][1],e>t&&(b=e,e=t,t=b),a>i&&(b=a,a=i,i=b),y.precision(g)):[[e,a],[t,i]]},y.step=function(b){return arguments.length?y.stepMajor(b).stepMinor(b):y.stepMinor()},y.stepMajor=function(b){return arguments.length?(u=+b[0],f=+b[1],y):[u,f]},y.stepMinor=function(b){return arguments.length?(c=+b[0],l=+b[1],y):[c,l]},y.precision=function(b){return arguments.length?(g=+b,d=Nk(a,i,90),h=Ik(e,t,g),p=Nk(s,o,90),v=Ik(r,n,g),y):g},y.extentMajor([[-180,-90+De],[180,90-De]]).extentMinor([[-180,-80-De],[180,80+De]])}function dtt(){return ftt()()}function jk(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:Vi,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ih(t,e){return mn(t[0]-e[0])<De&&mn(t[1]-e[1])<De}function jh(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 Dk(t,e,n,r,i){var a=[],o=[],s,c;if(t.forEach(function(p){if(!((v=p.length-1)<=0)){var v,g=p[0],y=p[v],m;if(Ih(g,y)){if(!g[2]&&!y[2]){for(i.lineStart(),s=0;s<v;++s)i.point((g=p[s])[0],g[1]);i.lineEnd();return}y[0]+=2*De}a.push(m=new jh(g,p,null,!0)),o.push(m.o=new jh(g,null,m,!1)),a.push(m=new jh(y,p,null,!1)),o.push(m.o=new jh(y,null,m,!0))}}),!!a.length){for(o.sort(e),Fk(a),Fk(o),s=0,c=o.length;s<c;++s)o[s].e=n=!n;for(var l=a[0],u,f;;){for(var d=l,h=!0;d.v;)if((d=d.n)===l)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(h)for(s=0,c=u.length;s<c;++s)i.point((f=u[s])[0],f[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(h)for(u=d.p.z,s=u.length-1;s>=0;--s)i.point((f=u[s])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,u=d.z,h=!h}while(!d.v);i.lineEnd()}}}function Fk(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 dm(t){return[Va(t[1],t[0]),Yi(t[2])]}function Lc(t){var e=t[0],n=t[1],r=rn(n);return[r*rn(e),r*Ke(e),Ke(n)]}function Dh(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Fh(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 hm(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Bh(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function pm(t){var e=mi(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function vm(t){return mn(t[0])<=sn?t[0]:Hi(t[0])*((mn(t[0])+sn)%Ti-sn)}function htt(t,e){var n=vm(e),r=e[1],i=Ke(r),a=[Ke(n),-rn(n),0],o=0,s=0,c=new Ya;i===1?r=yr+De:i===-1&&(r=-yr-De);for(var l=0,u=t.length;l<u;++l)if(d=(f=t[l]).length)for(var f,d,h=f[d-1],p=vm(h),v=h[1]/2+uk,g=Ke(v),y=rn(v),m=0;m<d;++m,p=_,g=w,y=M,h=b){var b=f[m],_=vm(b),O=b[1]/2+uk,w=Ke(O),M=rn(O),E=_-p,A=E>=0?1:-1,P=A*E,C=P>sn,D=g*w;if(c.add(Va(D*A*Ke(P),y*M+D*rn(P))),o+=C?E+A*Ti:E,C^p>=n^_>=n){var N=Fh(Lc(h),Lc(b));pm(N);var k=Fh(a,N);pm(k);var R=(C^E>=0?-1:1)*Yi(k[2]);(r>R||r===R&&(N[0]||N[1]))&&(s+=C^E>=0?1:-1)}}return(o<-De||o<De&&c<-lk)^s&1}function*ptt(t){for(const e of t)yield*e}function Bk(t){return Array.from(ptt(t))}function zk(t,e,n,r){return function(i){var a=e(i),o=jk(),s=e(o),c=!1,l,u,f,d={point:h,lineStart:v,lineEnd:g,polygonStart:function(){d.point=y,d.lineStart=m,d.lineEnd=b,u=[],l=[]},polygonEnd:function(){d.point=h,d.lineStart=v,d.lineEnd=g,u=Bk(u);var _=htt(l,r);u.length?(c||(i.polygonStart(),c=!0),Dk(u,gtt,_,n,i)):_&&(c||(i.polygonStart(),c=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&(i.polygonEnd(),c=!1),u=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(_,O){t(_,O)&&i.point(_,O)}function p(_,O){a.point(_,O)}function v(){d.point=p,a.lineStart()}function g(){d.point=h,a.lineEnd()}function y(_,O){f.push([_,O]),s.point(_,O)}function m(){s.lineStart(),f=[]}function b(){y(f[0][0],f[0][1]),s.lineEnd();var _=s.clean(),O=o.result(),w,M=O.length,E,A,P;if(f.pop(),l.push(f),f=null,!!M){if(_&1){if(A=O[0],(E=A.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),w=0;w<E;++w)i.point((P=A[w])[0],P[1]);i.lineEnd()}return}M>1&&_&2&&O.push(O.pop().concat(O.shift())),u.push(O.filter(vtt))}}return d}}function vtt(t){return t.length>1}function gtt(t,e){return((t=t.x)[0]<0?t[1]-yr-De:yr-t[1])-((e=e.x)[0]<0?e[1]-yr-De:yr-e[1])}var Gk=zk(function(){return!0},ytt,btt,[-sn,-yr]);function ytt(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(a,o){var s=a>0?sn:-sn,c=mn(a-e);mn(c-sn)<De?(t.point(e,n=(n+o)/2>0?yr:-yr),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),i=0):r!==s&&c>=sn&&(mn(e-r)<De&&(e-=r*De),mn(a-s)<De&&(a-=s*De),n=mtt(e,n,a,o),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=a,n=o),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function mtt(t,e,n,r){var i,a,o=Ke(t-n);return mn(o)>De?Pc((Ke(e)*(a=rn(r))*Ke(n)-Ke(r)*(i=rn(e))*Ke(t))/(i*a*o)):(e+r)/2}function btt(t,e,n,r){var i;if(t==null)i=n*yr,r.point(-sn,i),r.point(0,i),r.point(sn,i),r.point(sn,0),r.point(sn,-i),r.point(0,-i),r.point(-sn,-i),r.point(-sn,0),r.point(-sn,i);else if(mn(t[0]-e[0])>De){var a=t[0]<e[0]?sn:-sn;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}function Wk(t,e,n,r,i,a){if(n){var o=rn(e),s=Ke(e),c=r*n;i==null?(i=e+r*Ti,a=e-c/2):(i=Hk(o,i),a=Hk(o,a),(r>0?i<a:i>a)&&(i+=r*Ti));for(var l,u=i;r>0?u>a:u<a;u-=c)l=dm([o,-s*rn(u),-s*Ke(u)]),t.point(l[0],l[1])}}function Hk(t,e){e=Lc(e),e[0]-=t,pm(e);var n=dk(-e[1]);return((-e[2]<0?-n:n)+Ti-De)%Ti}function n0t(){var t=constant([0,0]),e=constant(90),n=constant(6),r,i,a={point:o};function o(c,l){r.push(c=i(c,l)),c[0]*=degrees,c[1]*=degrees}function s(){var c=t.apply(this,arguments),l=e.apply(this,arguments)*radians,u=n.apply(this,arguments)*radians;return r=[],i=rotateRadians(-c[0]*radians,-c[1]*radians,0).invert,Wk(a,l,u,1),c={type:"Polygon",coordinates:[r]},r=i=null,c}return s.center=function(c){return arguments.length?(t=typeof c=="function"?c:constant([+c[0],+c[1]]),s):t},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:constant(+c),s):e},s.precision=function(c){return arguments.length?(n=typeof c=="function"?c:constant(+c),s):n},s}function xtt(t){var e=rn(t),n=6*hr,r=e>0,i=mn(e)>De;function a(u,f,d,h){Wk(h,t,n,d,u,f)}function o(u,f){return rn(u)*rn(f)>e}function s(u){var f,d,h,p,v;return{lineStart:function(){p=h=!1,v=1},point:function(g,y){var m=[g,y],b,_=o(g,y),O=r?_?0:l(g,y):_?l(g+(g<0?sn:-sn),y):0;if(!f&&(p=h=_)&&u.lineStart(),_!==h&&(b=c(f,m),(!b||Ih(f,b)||Ih(m,b))&&(m[2]=1)),_!==h)v=0,_?(u.lineStart(),b=c(m,f),u.point(b[0],b[1])):(b=c(f,m),u.point(b[0],b[1],2),u.lineEnd()),f=b;else if(i&&f&&r^_){var w;!(O&d)&&(w=c(m,f,!0))&&(v=0,r?(u.lineStart(),u.point(w[0][0],w[0][1]),u.point(w[1][0],w[1][1]),u.lineEnd()):(u.point(w[1][0],w[1][1]),u.lineEnd(),u.lineStart(),u.point(w[0][0],w[0][1],3)))}_&&(!f||!Ih(f,m))&&u.point(m[0],m[1]),f=m,h=_,d=O},lineEnd:function(){h&&u.lineEnd(),f=null},clean:function(){return v|(p&&h)<<1}}}function c(u,f,d){var h=Lc(u),p=Lc(f),v=[1,0,0],g=Fh(h,p),y=Dh(g,g),m=g[0],b=y-m*m;if(!b)return!d&&u;var _=e*y/b,O=-e*m/b,w=Fh(v,g),M=Bh(v,_),E=Bh(g,O);hm(M,E);var A=w,P=Dh(M,A),C=Dh(A,A),D=P*P-C*(Dh(M,M)-1);if(!(D<0)){var N=mi(D),k=Bh(A,(-P-N)/C);if(hm(k,M),k=dm(k),!d)return k;var R=u[0],I=f[0],F=u[1],B=f[1],z;I<R&&(z=R,R=I,I=z);var Y=I-R,U=mn(Y-sn)<De,tt=U||Y<De;if(!U&&B<F&&(z=F,F=B,B=z),tt?U?F+B>0^k[1]<(mn(k[0]-R)<De?F:B):F<=k[1]&&k[1]<=B:Y>sn^(R<=k[0]&&k[0]<=I)){var rt=Bh(A,(-P+N)/C);return hm(rt,M),[k,dm(rt)]}}}function l(u,f){var d=r?t:sn-t,h=0;return u<-d?h|=1:u>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return zk(o,s,a,r?[0,-t]:[-sn,t-sn])}function _tt(t,e,n,r,i,a){var o=t[0],s=t[1],c=e[0],l=e[1],u=0,f=1,d=c-o,h=l-s,p;if(p=n-o,!(!d&&p>0)){if(p/=d,d<0){if(p<u)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>u&&(u=p)}if(p=i-o,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>u&&(u=p)}else if(d>0){if(p<u)return;p<f&&(f=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>u&&(u=p)}if(p=a-s,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<f&&(f=p)}return u>0&&(t[0]=o+u*d,t[1]=s+u*h),f<1&&(e[0]=o+f*d,e[1]=s+f*h),!0}}}}}var yu=1e9,zh=-yu;function Yk(t,e,n,r){function i(l,u){return t<=l&&l<=n&&e<=u&&u<=r}function a(l,u,f,d){var h=0,p=0;if(l==null||(h=o(l,f))!==(p=o(u,f))||c(l,u)<0^f>0)do d.point(h===0||h===3?t:n,h>1?r:e);while((h=(h+f+4)%4)!==p);else d.point(u[0],u[1])}function o(l,u){return mn(l[0]-t)<De?u>0?0:3:mn(l[0]-n)<De?u>0?2:1:mn(l[1]-e)<De?u>0?1:0:u>0?3:2}function s(l,u){return c(l.x,u.x)}function c(l,u){var f=o(l,1),d=o(u,1);return f!==d?f-d:f===0?u[1]-l[1]:f===1?l[0]-u[0]:f===2?l[1]-u[1]:u[0]-l[0]}return function(l){var u=l,f=jk(),d,h,p,v,g,y,m,b,_,O,w,M={point:E,lineStart:D,lineEnd:N,polygonStart:P,polygonEnd:C};function E(R,I){i(R,I)&&u.point(R,I)}function A(){for(var R=0,I=0,F=h.length;I<F;++I)for(var B=h[I],z=1,Y=B.length,U=B[0],tt,rt,wt=U[0],Bt=U[1];z<Y;++z)tt=wt,rt=Bt,U=B[z],wt=U[0],Bt=U[1],rt<=r?Bt>r&&(wt-tt)*(r-rt)>(Bt-rt)*(t-tt)&&++R:Bt<=r&&(wt-tt)*(r-rt)<(Bt-rt)*(t-tt)&&--R;return R}function P(){u=f,d=[],h=[],w=!0}function C(){var R=A(),I=w&&R,F=(d=Bk(d)).length;(I||F)&&(l.polygonStart(),I&&(l.lineStart(),a(null,null,1,l),l.lineEnd()),F&&Dk(d,s,R,a,l),l.polygonEnd()),u=l,d=h=p=null}function D(){M.point=k,h&&h.push(p=[]),O=!0,_=!1,m=b=NaN}function N(){d&&(k(v,g),y&&_&&f.rejoin(),d.push(f.result())),M.point=E,_&&u.lineEnd()}function k(R,I){var F=i(R,I);if(h&&p.push([R,I]),O)v=R,g=I,y=F,O=!1,F&&(u.lineStart(),u.point(R,I));else if(F&&_)u.point(R,I);else{var B=[m=Math.max(zh,Math.min(yu,m)),b=Math.max(zh,Math.min(yu,b))],z=[R=Math.max(zh,Math.min(yu,R)),I=Math.max(zh,Math.min(yu,I))];_tt(B,z,t,e,n,r)?(_||(u.lineStart(),u.point(B[0],B[1])),u.point(z[0],z[1]),F||u.lineEnd(),w=!1):F&&(u.lineStart(),u.point(R,I),w=!1)}m=R,b=I,_=F}return M}}function gm(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 ym(t,e){return mn(t)>sn&&(t-=Math.round(t/Ti)*Ti),[t,e]}ym.invert=ym;function Vk(t,e,n){return(t%=Ti)?e||n?gm(Xk(t),Uk(e,n)):Xk(t):e||n?Uk(e,n):ym}function $k(t){return function(e,n){return e+=t,mn(e)>sn&&(e-=Math.round(e/Ti)*Ti),[e,n]}}function Xk(t){var e=$k(t);return e.invert=$k(-t),e}function Uk(t,e){var n=rn(t),r=Ke(t),i=rn(e),a=Ke(e);function o(s,c){var l=rn(c),u=rn(s)*l,f=Ke(s)*l,d=Ke(c),h=d*n+u*r;return[Va(f*i-h*a,u*n-d*r),Yi(h*i+f*a)]}return o.invert=function(s,c){var l=rn(c),u=rn(s)*l,f=Ke(s)*l,d=Ke(c),h=d*i-f*a;return[Va(f*i+d*a,u*n+h*r),Yi(h*n-u*r)]},o}function Ott(t){t=Vk(t[0]*hr,t[1]*hr,t.length>2?t[2]*hr:0);function e(n){return n=t(n[0]*hr,n[1]*hr),n[0]*=Zr,n[1]*=Zr,n}return e.invert=function(n){return n=t.invert(n[0]*hr,n[1]*hr),n[0]*=Zr,n[1]*=Zr,n},e}function r0t(t){return{stream:mu(t)}}function mu(t){return function(e){var n=new mm;for(var r in t)n[r]=t[r];return n.stream=e,n}}function mm(){}mm.prototype={constructor:mm,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 bm(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Tc(n,t.stream(Ch)),e(Ch.result()),r!=null&&t.clipExtent(r),t}function Gh(t,e,n){return bm(t,function(r){var i=e[1][0]-e[0][0],a=e[1][1]-e[0][1],o=Math.min(i/(r[1][0]-r[0][0]),a/(r[1][1]-r[0][1])),s=+e[0][0]+(i-o*(r[1][0]+r[0][0]))/2,c=+e[0][1]+(a-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([s,c])},n)}function xm(t,e,n){return Gh(t,[[0,0],e],n)}function _m(t,e,n){return bm(t,function(r){var i=+e,a=i/(r[1][0]-r[0][0]),o=(i-a*(r[1][0]+r[0][0]))/2,s=-a*r[0][1];t.scale(150*a).translate([o,s])},n)}function Om(t,e,n){return bm(t,function(r){var i=+e,a=i/(r[1][1]-r[0][1]),o=-a*r[0][0],s=(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])},n)}var qk=16,wtt=rn(30*hr);function Zk(t,e){return+e?Mtt(t,e):Stt(t)}function Stt(t){return mu({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function Mtt(t,e){function n(r,i,a,o,s,c,l,u,f,d,h,p,v,g){var y=l-r,m=u-i,b=y*y+m*m;if(b>4*e&&v--){var _=o+d,O=s+h,w=c+p,M=mi(_*_+O*O+w*w),E=Yi(w/=M),A=mn(mn(w)-1)<De||mn(a-f)<De?(a+f)/2:Va(O,_),P=t(A,E),C=P[0],D=P[1],N=C-r,k=D-i,R=m*N-y*k;(R*R/b>e||mn((y*N+m*k)/b-.5)>.3||o*d+s*h+c*p<wtt)&&(n(r,i,a,o,s,c,C,D,A,_/=M,O/=M,w,v,g),g.point(C,D),n(C,D,A,_,O,w,l,u,f,d,h,p,v,g))}}return function(r){var i,a,o,s,c,l,u,f,d,h,p,v,g={point:y,lineStart:m,lineEnd:_,polygonStart:function(){r.polygonStart(),g.lineStart=O},polygonEnd:function(){r.polygonEnd(),g.lineStart=m}};function y(E,A){E=t(E,A),r.point(E[0],E[1])}function m(){f=NaN,g.point=b,r.lineStart()}function b(E,A){var P=Lc([E,A]),C=t(E,A);n(f,d,u,h,p,v,f=C[0],d=C[1],u=E,h=P[0],p=P[1],v=P[2],qk,r),r.point(f,d)}function _(){g.point=y,r.lineEnd()}function O(){m(),g.point=w,g.lineEnd=M}function w(E,A){b(i=E,A),a=f,o=d,s=h,c=p,l=v,g.point=b}function M(){n(f,d,u,h,p,v,a,o,i,s,c,l,qk,r),g.lineEnd=_,_()}return g}}var Ett=mu({point:function(t,e){this.stream.point(t*hr,e*hr)}});function Att(t){return mu({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function Ttt(t,e,n,r,i){function a(o,s){return o*=r,s*=i,[e+t*o,n-t*s]}return a.invert=function(o,s){return[(o-e)/t*r,(n-s)/t*i]},a}function Kk(t,e,n,r,i,a){if(!a)return Ttt(t,e,n,r,i);var o=rn(a),s=Ke(a),c=o*t,l=s*t,u=o/t,f=s/t,d=(s*n-o*e)/t,h=(s*e+o*n)/t;function p(v,g){return v*=r,g*=i,[c*v-l*g+e,n-l*v-c*g]}return p.invert=function(v,g){return[r*(u*v-f*g+d),i*(h-f*v-u*g)]},p}function Oa(t){return wm(function(){return t})()}function wm(t){var e,n=150,r=480,i=250,a=0,o=0,s=0,c=0,l=0,u,f=0,d=1,h=1,p=null,v=Gk,g=null,y,m,b,_=fu,O=.5,w,M,E,A,P;function C(R){return E(R[0]*hr,R[1]*hr)}function D(R){return R=E.invert(R[0],R[1]),R&&[R[0]*Zr,R[1]*Zr]}C.stream=function(R){return A&&P===R?A:A=Ett(Att(u)(v(w(_(P=R)))))},C.preclip=function(R){return arguments.length?(v=R,p=void 0,k()):v},C.postclip=function(R){return arguments.length?(_=R,g=y=m=b=null,k()):_},C.clipAngle=function(R){return arguments.length?(v=+R?xtt(p=R*hr):(p=null,Gk),k()):p*Zr},C.clipExtent=function(R){return arguments.length?(_=R==null?(g=y=m=b=null,fu):Yk(g=+R[0][0],y=+R[0][1],m=+R[1][0],b=+R[1][1]),k()):g==null?null:[[g,y],[m,b]]},C.scale=function(R){return arguments.length?(n=+R,N()):n},C.translate=function(R){return arguments.length?(r=+R[0],i=+R[1],N()):[r,i]},C.center=function(R){return arguments.length?(a=R[0]%360*hr,o=R[1]%360*hr,N()):[a*Zr,o*Zr]},C.rotate=function(R){return arguments.length?(s=R[0]%360*hr,c=R[1]%360*hr,l=R.length>2?R[2]%360*hr:0,N()):[s*Zr,c*Zr,l*Zr]},C.angle=function(R){return arguments.length?(f=R%360*hr,N()):f*Zr},C.reflectX=function(R){return arguments.length?(d=R?-1:1,N()):d<0},C.reflectY=function(R){return arguments.length?(h=R?-1:1,N()):h<0},C.precision=function(R){return arguments.length?(w=Zk(M,O=R*R),k()):mi(O)},C.fitExtent=function(R,I){return Gh(C,R,I)},C.fitSize=function(R,I){return xm(C,R,I)},C.fitWidth=function(R,I){return _m(C,R,I)},C.fitHeight=function(R,I){return Om(C,R,I)};function N(){var R=Kk(n,0,0,d,h,f).apply(null,e(a,o)),I=Kk(n,r-R[0],i-R[1],d,h,f);return u=Vk(s,c,l),M=gm(e,I),E=gm(u,M),w=Zk(M,O),k()}function k(){return A=P=null,C}return function(){return e=t.apply(this,arguments),C.invert=e.invert&&D,N()}}function Sm(t){var e=0,n=sn/3,r=wm(t),i=r(e,n);return i.parallels=function(a){return arguments.length?r(e=a[0]*hr,n=a[1]*hr):[e*Zr,n*Zr]},i}function Ptt(t){var e=rn(t);function n(r,i){return[r*e,Ke(i)/e]}return n.invert=function(r,i){return[r/e,Yi(i*e)]},n}function Qk(t,e){var n=Ke(t),r=(n+Ke(e))/2;if(mn(r)<De)return Ptt(t);var i=1+n*(2*r-n),a=mi(i)/r;function o(s,c){var l=mi(i-2*r*Ke(c))/r;return[l*Ke(s*=r),a-l*rn(s)]}return o.invert=function(s,c){var l=a-c,u=Va(s,mn(l))*Hi(l);return l*r<0&&(u-=sn*Hi(s)*Hi(l)),[u/r,Yi((i-(s*s+l*l)*r*r)/(2*r))]},o}function Wh(){return Sm(Qk).scale(155.424).center([0,33.6442])}function Jk(){return Wh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ctt(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 ktt(){var t,e,n=Jk(),r,i=Wh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=Wh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,c,l={point:function(d,h){c=[d,h]}};function u(d){var h=d[0],p=d[1];return c=null,r.point(h,p),c||(a.point(h,p),c)||(s.point(h,p),c)}u.invert=function(d){var h=n.scale(),p=n.translate(),v=(d[0]-p[0])/h,g=(d[1]-p[1])/h;return(g>=.12&&g<.234&&v>=-.425&&v<-.214?i:g>=.166&&g<.234&&v>=-.214&&v<-.115?o:n).invert(d)},u.stream=function(d){return t&&e===d?t:t=Ctt([n.stream(e=d),i.stream(d),o.stream(d)])},u.precision=function(d){return arguments.length?(n.precision(d),i.precision(d),o.precision(d),f()):n.precision()},u.scale=function(d){return arguments.length?(n.scale(d),i.scale(d*.35),o.scale(d),u.translate(n.translate())):n.scale()},u.translate=function(d){if(!arguments.length)return n.translate();var h=n.scale(),p=+d[0],v=+d[1];return r=n.translate(d).clipExtent([[p-.455*h,v-.238*h],[p+.455*h,v+.238*h]]).stream(l),a=i.translate([p-.307*h,v+.201*h]).clipExtent([[p-.425*h+De,v+.12*h+De],[p-.214*h-De,v+.234*h-De]]).stream(l),s=o.translate([p-.205*h,v+.212*h]).clipExtent([[p-.214*h+De,v+.166*h+De],[p-.115*h-De,v+.234*h-De]]).stream(l),f()},u.fitExtent=function(d,h){return Gh(u,d,h)},u.fitSize=function(d,h){return xm(u,d,h)},u.fitWidth=function(d,h){return _m(u,d,h)},u.fitHeight=function(d,h){return Om(u,d,h)};function f(){return t=e=null,u}return u.scale(1070)}function t5(t){return function(e,n){var r=rn(e),i=rn(n),a=t(r*i);return a===1/0?[2,0]:[a*i*Ke(e),a*Ke(n)]}}function bu(t){return function(e,n){var r=mi(e*e+n*n),i=t(r),a=Ke(i),o=rn(i);return[Va(e*a,r*o),Yi(r&&n*a/r)]}}var Mm=t5(function(t){return mi(2/(1+t))});Mm.invert=bu(function(t){return 2*Yi(t/2)});function Rtt(){return Oa(Mm).scale(124.75).clipAngle(180-.001)}var Em=t5(function(t){return(t=dk(t))&&t/Ke(t)});Em.invert=bu(function(t){return t});function Ltt(){return Oa(Em).scale(79.4188).clipAngle(180-.001)}function xu(t,e){return[t,Ah(em((yr+e)/2))]}xu.invert=function(t,e){return[t,2*Pc(fk(e))-yr]};function Ntt(){return e5(xu).scale(961/Ti)}function e5(t){var e=Oa(t),n=e.center,r=e.scale,i=e.translate,a=e.clipExtent,o=null,s,c,l;e.scale=function(f){return arguments.length?(r(f),u()):r()},e.translate=function(f){return arguments.length?(i(f),u()):i()},e.center=function(f){return arguments.length?(n(f),u()):n()},e.clipExtent=function(f){return arguments.length?(f==null?o=s=c=l=null:(o=+f[0][0],s=+f[0][1],c=+f[1][0],l=+f[1][1]),u()):o==null?null:[[o,s],[c,l]]};function u(){var f=sn*r(),d=e(Ott(e.rotate()).invert([0,0]));return a(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:t===xu?[[Math.max(d[0]-f,o),s],[Math.min(d[0]+f,c),l]]:[[o,Math.max(d[1]-f,s)],[c,Math.min(d[1]+f,l)]])}return u()}function Hh(t){return em((yr+t)/2)}function n5(t,e){var n=rn(t),r=t===e?Ke(t):Ah(n/rn(e))/Ah(Hh(e)/Hh(t)),i=n*tm(Hh(t),r)/r;if(!r)return xu;function a(o,s){i>0?s<-yr+De&&(s=-yr+De):s>yr-De&&(s=yr-De);var c=i/tm(Hh(s),r);return[c*Ke(r*o),i-c*rn(r*o)]}return a.invert=function(o,s){var c=i-s,l=Hi(r)*mi(o*o+c*c),u=Va(o,mn(c))*Hi(c);return c*r<0&&(u-=sn*Hi(o)*Hi(c)),[u/r,2*Pc(tm(i/l,1/r))-yr]},a}function Itt(){return Sm(n5).scale(109.5).parallels([30,30])}function _u(t,e){return[t,e]}_u.invert=_u;function jtt(){return Oa(_u).scale(152.63)}function r5(t,e){var n=rn(t),r=t===e?Ke(t):(n-rn(e))/(e-t),i=n/r+t;if(mn(r)<De)return _u;function a(o,s){var c=i-s,l=r*o;return[c*Ke(l),i-c*rn(l)]}return a.invert=function(o,s){var c=i-s,l=Va(o,mn(c))*Hi(c);return c*r<0&&(l-=sn*Hi(o)*Hi(c)),[l/r,i-Hi(r)*mi(o*o+c*c)]},a}function Dtt(){return Sm(r5).scale(131.154).center([0,13.9389])}var Ou=1.340264,wu=-.081106,Su=893e-6,Mu=.003796,Yh=mi(3)/2,Ftt=12;function Am(t,e){var n=Yi(Yh*Ke(e)),r=n*n,i=r*r*r;return[t*rn(n)/(Yh*(Ou+3*wu*r+i*(7*Su+9*Mu*r))),n*(Ou+wu*r+i*(Su+Mu*r))]}Am.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,a=0,o,s,c;a<Ftt&&(s=n*(Ou+wu*r+i*(Su+Mu*r))-e,c=Ou+3*wu*r+i*(7*Su+9*Mu*r),n-=o=s/c,r=n*n,i=r*r*r,!(mn(o)<lk));++a);return[Yh*t*(Ou+3*wu*r+i*(7*Su+9*Mu*r))/rn(n),Yi(Ke(n)/Yh)]};function Btt(){return Oa(Am).scale(177.158)}function Tm(t,e){var n=rn(e),r=rn(t)*n;return[n*Ke(t)/r,Ke(e)/r]}Tm.invert=bu(Pc);function ztt(){return Oa(Tm).scale(144.049).clipAngle(60)}function Gtt(){var t=1,e=0,n=0,r=1,i=1,a=0,o,s,c=null,l,u,f,d=1,h=1,p=mu({point:function(_,O){var w=b([_,O]);this.stream.point(w[0],w[1])}}),v=fu,g,y;function m(){return d=t*r,h=t*i,g=y=null,b}function b(_){var O=_[0]*d,w=_[1]*h;if(a){var M=w*o-O*s;O=O*o+w*s,w=M}return[O+e,w+n]}return b.invert=function(_){var O=_[0]-e,w=_[1]-n;if(a){var M=w*o+O*s;O=O*o-w*s,w=M}return[O/d,w/h]},b.stream=function(_){return g&&y===_?g:g=p(v(y=_))},b.postclip=function(_){return arguments.length?(v=_,c=l=u=f=null,m()):v},b.clipExtent=function(_){return arguments.length?(v=_==null?(c=l=u=f=null,fu):Yk(c=+_[0][0],l=+_[0][1],u=+_[1][0],f=+_[1][1]),m()):c==null?null:[[c,l],[u,f]]},b.scale=function(_){return arguments.length?(t=+_,m()):t},b.translate=function(_){return arguments.length?(e=+_[0],n=+_[1],m()):[e,n]},b.angle=function(_){return arguments.length?(a=_%360*hr,s=Ke(a),o=rn(a),m()):a*Zr},b.reflectX=function(_){return arguments.length?(r=_?-1:1,m()):r<0},b.reflectY=function(_){return arguments.length?(i=_?-1:1,m()):i<0},b.fitExtent=function(_,O){return Gh(b,_,O)},b.fitSize=function(_,O){return xm(b,_,O)},b.fitWidth=function(_,O){return _m(b,_,O)},b.fitHeight=function(_,O){return Om(b,_,O)},b}function Pm(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)))]}Pm.invert=function(t,e){var n=e,r=25,i;do{var a=n*n,o=a*a;n-=i=(n*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-e)/(1.007226+a*(.015085*3+o*(-.044475*7+.028874*9*a-.005916*11*o)))}while(mn(i)>De&&--r>0);return[t/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function Wtt(){return Oa(Pm).scale(175.295)}function Cm(t,e){return[rn(e)*Ke(t),Ke(e)]}Cm.invert=bu(Yi);function Htt(){return Oa(Cm).scale(249.5).clipAngle(90+De)}function km(t,e){var n=rn(e),r=1+rn(t)*n;return[n*Ke(t)/r,Ke(e)/r]}km.invert=bu(function(t){return 2*Pc(t)});function Ytt(){return Oa(km).scale(250).clipAngle(142)}function Rm(t,e){return[Ah(em((yr+e)/2)),-t]}Rm.invert=function(t,e){return[-e,2*Pc(fk(t))-yr]};function Vtt(){var t=e5(Rm),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)}var $tt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Xtt(t){if(typeof t=="function")return t;const e=`geo${lo(t)}`,n=be[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}function Utt(t){return{type:"FeatureCollection",features:t.flatMap(e=>qtt(e).features)}}function qtt(t){const e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"};if(!t||!t.type)return null;const n=e[t.type];if(!n)return null;if(n==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]};if(n==="feature")return{type:"FeatureCollection",features:[t]};if(n==="featureCollection")return t}function Ztt(t,e){var n;for(const[r,i]of Object.entries(e))(n=t[r])===null||n===void 0||n.call(t,i)}function Ktt(t,e,n,r){const i=()=>{const s=e.filter(i5);return s.find(l=>l.sphere)?{type:"Sphere"}:Utt(s.filter(l=>!l.sphere).flatMap(l=>l.data.value))},{outline:a=i()}=r,{size:o="fitExtent"}=r;if(o==="fitExtent")return Qtt(t,a,n);if(o==="fitWidth")return Jtt(t,a,n)}function Qtt(t,e,n){const{x:r,y:i,width:a,height:o}=n;t.fitExtent([[r,i],[a,o]],e)}function Jtt(t,e,n){const{width:r,height:i}=n,[[a,o],[s,c]]=Lk(t.fitWidth(r,e)).bounds(e),l=Math.ceil(c-o),u=Math.min(Math.ceil(s-a),l),f=t.scale()*(u-1)/u,[d,h]=t.translate(),p=h+(i-l)/2;t.scale(f).translate([d,p]).precision(.2)}function tet(t){const{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});const{type:n}=e;return n==="graticule10"?Object.assign(Object.assign({},t),{data:{value:[dtt()]}}):n==="sphere"?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function i5(t){return t.type==="geoPath"}const a5=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,i=$tt(n,["type"]),a=Xtt(r),o=e.map(tet);let s;function c(){return[["custom",(f,d,h,p)=>{const v=a();Ktt(v,o,{x:f,y:d,width:h,height:p},i),Ztt(v,i),s=Lk(v);const y=new Vr({domain:[f,f+h]}),m=new Vr({domain:[d,d+p]}),b=O=>{const w=v(O);if(!w)return[null,null];const[M,E]=w;return[y.map(M),m.map(E)]},_=O=>{if(!O)return null;const[w,M]=O,E=[y.invert(w),m.invert(M)];return v.invert(E)};return{transform:O=>b(O),untransform:O=>_(O)}}]]}function l(f){const{style:d,tooltip:h={}}=f;return Object.assign(Object.assign({},f),{type:"path",tooltip:sg(h,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},d),{d:p=>s(p)||[]})})}const u=f=>i5(f)?l(f):f;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:c},children:o.flatMap(u)})]};a5.props={};var eet=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const o5=()=>t=>{const{type:e,data:n,scale:r,encode:i,style:a,animate:o,key:s,state:c}=t,l=eet(t,["type","data","scale","encode","style","animate","key","state"]);return[Object.assign(Object.assign({type:"geoView"},l),{children:[{type:"geoPath",key:`${s}-0`,data:{value:n},scale:r,encode:i,style:a,animate:o,state:c}]})]};o5.props={};function net(){return{"composition.geoView":a5,"composition.geoPath":o5}}function ret(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return s5(this.cover(e,n),e,n,t)}function s5(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a=t._root,o={data:r},s=t._x0,c=t._y0,l=t._x1,u=t._y1,f,d,h,p,v,g,y,m;if(!a)return t._root=o,t;for(;a.length;)if((v=e>=(f=(s+l)/2))?s=f:l=f,(g=n>=(d=(c+u)/2))?c=d:u=d,i=a,!(a=a[y=g<<1|v]))return i[y]=o,t;if(h=+t._x.call(null,a.data),p=+t._y.call(null,a.data),e===h&&n===p)return o.next=a,i?i[y]=o:t._root=o,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(v=e>=(f=(s+l)/2))?s=f:l=f,(g=n>=(d=(c+u)/2))?c=d:u=d;while((y=g<<1|v)===(m=(p>=d)<<1|h>=f));return i[m]=a,i[y]=o,t}function iet(t){var e,n,r=t.length,i,a,o=new Array(r),s=new Array(r),c=1/0,l=1/0,u=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(a=+this._y.call(null,e))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>f&&(f=a));if(c>u||l>f)return this;for(this.cover(c,l).cover(u,f),n=0;n<r;++n)s5(this,o[n],s[n],t[n]);return this}function aet(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o=i-n||1,s=this._root,c,l;n>t||t>=i||r>e||e>=a;)switch(l=(e<r)<<1|t<n,c=new Array(4),c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function oet(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function set(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 ii(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function cet(t,e,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,f=this._y1,d=[],h=this._root,p,v;for(h&&d.push(new ii(h,i,a,u,f)),n==null?n=1/0:(i=t-n,a=e-n,u=t+n,f=e+n,n*=n);p=d.pop();)if(!(!(h=p.node)||(o=p.x0)>u||(s=p.y0)>f||(c=p.x1)<i||(l=p.y1)<a))if(h.length){var g=(o+c)/2,y=(s+l)/2;d.push(new ii(h[3],g,y,c,l),new ii(h[2],o,y,g,l),new ii(h[1],g,s,c,y),new ii(h[0],o,s,g,y)),(v=(e>=y)<<1|t>=g)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=p)}else{var m=t-+this._x.call(null,h.data),b=e-+this._y.call(null,h.data),_=m*m+b*b;if(_<n){var O=Math.sqrt(n=_);i=t-O,a=e-O,u=t+O,f=e+O,r=h.data}}return r}function uet(t){if(isNaN(u=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,f,d,h,p,v,g,y;if(!n)return this;if(n.length)for(;;){if((p=u>=(d=(o+c)/2))?o=d:c=d,(v=f>=(h=(s+l)/2))?s=h:l=h,e=n,!(n=n[g=v<<1|p]))return this;if(!n.length)break;(e[g+1&3]||e[g+2&3]||e[g+3&3])&&(r=e,y=g)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):e?(a?e[g]=a:delete e[g],(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=a,this)}function fet(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function det(){return this._root}function het(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function pet(t){var e=[],n,r=this._root,i,a,o,s,c;for(r&&e.push(new ii(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,a=n.x0,o=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(a+s)/2,u=(o+c)/2;(i=r[3])&&e.push(new ii(i,l,u,s,c)),(i=r[2])&&e.push(new ii(i,a,u,l,c)),(i=r[1])&&e.push(new ii(i,l,o,s,u)),(i=r[0])&&e.push(new ii(i,a,o,l,u))}return this}function vet(t){var e=[],n=[],r;for(this._root&&e.push(new ii(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(o+c)/2,f=(s+l)/2;(a=i[0])&&e.push(new ii(a,o,s,u,f)),(a=i[1])&&e.push(new ii(a,u,s,c,f)),(a=i[2])&&e.push(new ii(a,o,f,u,l)),(a=i[3])&&e.push(new ii(a,u,f,c,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function get(t){return t[0]}function yet(t){return arguments.length?(this._x=t,this):this._x}function met(t){return t[1]}function bet(t){return arguments.length?(this._y=t,this):this._y}function c5(t,e,n){var r=new Lm(e==null?get:e,n==null?met:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Lm(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function l5(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var ai=c5.prototype=Lm.prototype;ai.copy=function(){var t=new Lm(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=l5(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]=l5(r));return t},ai.add=ret,ai.addAll=iet,ai.cover=aet,ai.data=oet,ai.extent=set,ai.find=cet,ai.remove=uet,ai.removeAll=fet,ai.root=det,ai.size=het,ai.visit=pet,ai.visitAfter=vet,ai.x=yet,ai.y=bet;function Pi(t){return function(){return t}}function Nc(t){return(t()-.5)*1e-6}var xet={value:function(){}};function u5(){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 Vh(n)}function Vh(t){this._=t}function _et(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}})}Vh.prototype=u5.prototype={constructor:Vh,on:function(e,n){var r=this._,i=_et(e+"",r),a,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((a=(e=i[o]).type)&&(a=Oet(r[a],e.name)))return a;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<s;)if(a=(e=i[o]).type)r[a]=f5(r[a],e.name,n);else if(n==null)for(a in r)r[a]=f5(r[a],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new Vh(e)},call:function(e,n){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,o;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,o=i.length;a<o;++a)i[a].value.apply(n,r)}};function Oet(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function f5(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=xet,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var wet=u5,Ic=0,Eu=0,Au=0,d5=1e3,$h,Tu,Xh=0,ws=0,Uh=0,Pu=typeof performance=="object"&&performance.now?performance:Date,h5=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function p5(){return ws||(h5(Met),ws=Pu.now()+Uh)}function Met(){ws=0}function Nm(){this._call=this._time=this._next=null}Nm.prototype=v5.prototype={constructor:Nm,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?p5():+n)+(e==null?0:+e),!this._next&&Tu!==this&&(Tu?Tu._next=this:$h=this,Tu=this),this._call=t,this._time=n,Im()},stop:function(){this._call&&(this._call=null,this._time=1/0,Im())}};function v5(t,e,n){var r=new Nm;return r.restart(t,e,n),r}function Eet(){p5(),++Ic;for(var t=$h,e;t;)(e=ws-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ic}function g5(){ws=(Xh=Pu.now())+Uh,Ic=Eu=0;try{Eet()}finally{Ic=0,Tet(),ws=0}}function Aet(){var t=Pu.now(),e=t-Xh;e>d5&&(Uh-=e,Xh=t)}function Tet(){for(var t,e=$h,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:$h=n);Tu=t,Im(r)}function Im(t){if(!Ic){Eu&&(Eu=clearTimeout(Eu));var e=t-ws;e>24?(t<1/0&&(Eu=setTimeout(g5,t-Pu.now()-Uh)),Au&&(Au=clearInterval(Au))):(Au||(Xh=Pu.now(),Au=setInterval(Aet,d5)),Ic=1,h5(g5))}}const Pet=1664525,Cet=1013904223,y5=4294967296;function ket(){let t=1;return()=>(t=(Pet*t+Cet)%y5)/y5}function Ret(t){return t.x}function Let(t){return t.y}var Net=10,Iet=Math.PI*(3-Math.sqrt(5));function jet(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,c=v5(f),l=wet("tick","end"),u=ket();t==null&&(t=[]);function f(){d(),l.call("tick",e),n<r&&(c.stop(),l.call("end",e))}function d(v){var g,y=t.length,m;v===void 0&&(v=1);for(var b=0;b<v;++b)for(n+=(a-n)*i,s.forEach(function(_){_(n)}),g=0;g<y;++g)m=t[g],m.fx==null?m.x+=m.vx*=o:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=o:(m.y=m.fy,m.vy=0);return e}function h(){for(var v=0,g=t.length,y;v<g;++v){if(y=t[v],y.index=v,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var m=Net*Math.sqrt(.5+v),b=v*Iet;y.x=m*Math.cos(b),y.y=m*Math.sin(b)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(v){return v.initialize&&v.initialize(t,u),v}return h(),e={tick:d,restart:function(){return c.restart(f),e},stop:function(){return c.stop(),e},nodes:function(v){return arguments.length?(t=v,h(),s.forEach(p),e):t},alpha:function(v){return arguments.length?(n=+v,e):n},alphaMin:function(v){return arguments.length?(r=+v,e):r},alphaDecay:function(v){return arguments.length?(i=+v,e):+i},alphaTarget:function(v){return arguments.length?(a=+v,e):a},velocityDecay:function(v){return arguments.length?(o=1-v,e):1-o},randomSource:function(v){return arguments.length?(u=v,s.forEach(p),e):u},force:function(v,g){return arguments.length>1?(g==null?s.delete(v):s.set(v,p(g)),e):s.get(v)},find:function(v,g,y){var m=0,b=t.length,_,O,w,M,E;for(y==null?y=1/0:y*=y,m=0;m<b;++m)M=t[m],_=v-M.x,O=g-M.y,w=_*_+O*O,w<y&&(E=M,y=w);return E},on:function(v,g){return arguments.length>1?(l.on(v,g),e):l.on(v)}}}function Det(){var t,e,n,r,i=Pi(-30),a,o=1,s=1/0,c=.81;function l(h){var p,v=t.length,g=c5(t,Ret,Let).visitAfter(f);for(r=h,p=0;p<v;++p)e=t[p],g.visit(d)}function u(){if(t){var h,p=t.length,v;for(a=new Array(p),h=0;h<p;++h)v=t[h],a[v.index]=+i(v,h,t)}}function f(h){var p=0,v,g,y=0,m,b,_;if(h.length){for(m=b=_=0;_<4;++_)(v=h[_])&&(g=Math.abs(v.value))&&(p+=v.value,y+=g,m+=g*v.x,b+=g*v.y);h.x=m/y,h.y=b/y}else{v=h,v.x=v.data.x,v.y=v.data.y;do p+=a[v.data.index];while(v=v.next)}h.value=p}function d(h,p,v,g){if(!h.value)return!0;var y=h.x-e.x,m=h.y-e.y,b=g-p,_=y*y+m*m;if(b*b/c<_)return _<s&&(y===0&&(y=Nc(n),_+=y*y),m===0&&(m=Nc(n),_+=m*m),_<o&&(_=Math.sqrt(o*_)),e.vx+=y*h.value*r/_,e.vy+=m*h.value*r/_),!0;if(h.length||_>=s)return;(h.data!==e||h.next)&&(y===0&&(y=Nc(n),_+=y*y),m===0&&(m=Nc(n),_+=m*m),_<o&&(_=Math.sqrt(o*_)));do h.data!==e&&(b=a[h.data.index]*r/_,e.vx+=y*b,e.vy+=m*b);while(h=h.next)}return l.initialize=function(h,p){t=h,n=p,u()},l.strength=function(h){return arguments.length?(i=typeof h=="function"?h:Pi(+h),u(),l):i},l.distanceMin=function(h){return arguments.length?(o=h*h,l):Math.sqrt(o)},l.distanceMax=function(h){return arguments.length?(s=h*h,l):Math.sqrt(s)},l.theta=function(h){return arguments.length?(c=h*h,l):Math.sqrt(c)},l}function Fet(t){return t.index}function m5(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Bet(t){var e=Fet,n=f,r,i=Pi(30),a,o,s,c,l,u=1;t==null&&(t=[]);function f(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function d(g){for(var y=0,m=t.length;y<u;++y)for(var b=0,_,O,w,M,E,A,P;b<m;++b)_=t[b],O=_.source,w=_.target,M=w.x+w.vx-O.x-O.vx||Nc(l),E=w.y+w.vy-O.y-O.vy||Nc(l),A=Math.sqrt(M*M+E*E),A=(A-a[b])/A*g*r[b],M*=A,E*=A,w.vx-=M*(P=c[b]),w.vy-=E*P,O.vx+=M*(P=1-P),O.vy+=E*P}function h(){if(o){var g,y=o.length,m=t.length,b=new Map(o.map((O,w)=>[e(O,w,o),O])),_;for(g=0,s=new Array(y);g<m;++g)_=t[g],_.index=g,typeof _.source!="object"&&(_.source=m5(b,_.source)),typeof _.target!="object"&&(_.target=m5(b,_.target)),s[_.source.index]=(s[_.source.index]||0)+1,s[_.target.index]=(s[_.target.index]||0)+1;for(g=0,c=new Array(m);g<m;++g)_=t[g],c[g]=s[_.source.index]/(s[_.source.index]+s[_.target.index]);r=new Array(m),p(),a=new Array(m),v()}}function p(){if(o)for(var g=0,y=t.length;g<y;++g)r[g]=+n(t[g],g,t)}function v(){if(o)for(var g=0,y=t.length;g<y;++g)a[g]=+i(t[g],g,t)}return d.initialize=function(g,y){o=g,l=y,h()},d.links=function(g){return arguments.length?(t=g,h(),d):t},d.id=function(g){return arguments.length?(e=g,d):e},d.iterations=function(g){return arguments.length?(u=+g,d):u},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Pi(+g),p(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Pi(+g),v(),d):i},d}function zet(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var a,o=n.length,s,c=0,l=0;for(a=0;a<o;++a)s=n[a],c+=s.x,l+=s.y;for(c=(c/o-t)*r,l=(l/o-e)*r,a=0;a<o;++a)s=n[a],s.x-=c,s.y-=l}return i.initialize=function(a){n=a},i.x=function(a){return arguments.length?(t=+a,i):t},i.y=function(a){return arguments.length?(e=+a,i):e},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function Get(t){var e=Pi(.1),n,r,i;typeof t!="function"&&(t=Pi(t==null?0:+t));function a(s){for(var c=0,l=n.length,u;c<l;++c)u=n[c],u.vx+=(i[c]-u.x)*r[c]*s}function o(){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 a.initialize=function(s){n=s,o()},a.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Pi(+s),o(),a):e},a.x=function(s){return arguments.length?(t=typeof s=="function"?s:Pi(+s),o(),a):t},a}function Wet(t){var e=Pi(.1),n,r,i;typeof t!="function"&&(t=Pi(t==null?0:+t));function a(s){for(var c=0,l=n.length,u;c<l;++c)u=n[c],u.vy+=(i[c]-u.y)*r[c]*s}function o(){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 a.initialize=function(s){n=s,o()},a.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Pi(+s),o(),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:Pi(+s),o(),a):t},a}var Het=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Yet={joint:!0},Vet={type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},$et={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},Xet={text:""};function Uet(t,e,n){const{nodes:r,links:i}=t,{joint:a,nodeStrength:o,linkStrength:s}=e,{nodeKey:c=p=>p.id,linkKey:l=p=>p.id}=n,u=Det(),f=Bet(i).id(ba(l));typeof o=="function"&&u.strength(o),typeof s=="function"&&f.strength(s);const d=jet(r).force("link",f).force("charge",u);a?d.force("center",zet()):d.force("x",Get()).force("y",Wet()),d.stop();const h=Math.ceil(Math.log(d.alphaMin())/Math.log(1-d.alphaDecay()));for(let p=0;p<h;p++)d.tick();return{nodesData:r,linksData:i}}const b5=t=>{const{data:e,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,{nodeKey:u=w=>w.id,linkKey:f=w=>w.id}=n,d=Het(n,["nodeKey","linkKey"]),h=Object.assign({nodeKey:u,linkKey:f},d),p=se(h,"node"),v=se(h,"link"),{links:g,nodes:y}=Ig(e,h),{nodesData:m,linksData:b}=Uet({links:g,nodes:y},Nt({},Yet,a),h),_=va(l,"link",{items:[w=>({name:"source",value:ba(f)(w.source)}),w=>({name:"target",value:ba(f)(w.target)})]}),O=va(l,"node",{items:[w=>({name:"key",value:ba(u)(w)})]},!0);return[Nt({},Vet,{data:b,encode:v,labels:s,style:se(i,"link"),tooltip:_,animate:ga(c,"link")}),Nt({},$et,{data:m,encode:Object.assign({},p),scale:r,style:se(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},Xet),se(i,"label")),...o],animate:ga(c,"link")})]};b5.props={};function qet(t,e){return t.parent===e.parent?1:2}function jm(t){var e=t.children;return e?e[0]:t.t}function Dm(t){var e=t.children;return e?e[e.length-1]:t.t}function Zet(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 Ket(t){for(var e=0,n=0,r=t.children,i=r.length,a;--i>=0;)a=r[i],a.z+=e,a.m+=e,e+=a.s+(n+=a.c)}function Qet(t,e,n){return t.a.parent===e.parent?t.a:n}function qh(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}qh.prototype=Object.create(gc.prototype);function Jet(t){for(var e=new qh(t,0),n,r=[e],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=new Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new qh(a[o],o)),i.parent=n;return(e.parent=new qh(null,0)).children=[e],e}function tnt(){var t=qet,e=1,n=1,r=null;function i(l){var u=Jet(l);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(o),r)l.eachBefore(c);else{var f=l,d=l,h=l;l.eachBefore(function(m){m.x<f.x&&(f=m),m.x>d.x&&(d=m),m.depth>h.depth&&(h=m)});var p=f===d?1:t(f,d)/2,v=p-f.x,g=e/(d.x+p+v),y=n/(h.depth||1);l.eachBefore(function(m){m.x=(m.x+v)*g,m.y=m.depth*y})}return l}function a(l){var u=l.children,f=l.parent.children,d=l.i?f[l.i-1]:null;if(u){Ket(l);var h=(u[0].z+u[u.length-1].z)/2;d?(l.z=d.z+t(l._,d._),l.m=l.z-h):l.z=h}else d&&(l.z=d.z+t(l._,d._));l.parent.A=s(l,d,l.parent.A||f[0])}function o(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,u,f){if(u){for(var d=l,h=l,p=u,v=d.parent.children[0],g=d.m,y=h.m,m=p.m,b=v.m,_;p=Dm(p),d=jm(d),p&&d;)v=jm(v),h=Dm(h),h.a=l,_=p.z+m-d.z-g+t(p._,d._),_>0&&(Zet(Qet(p,l,f),l,_),g+=_,y+=_),m+=p.m,g+=d.m,b+=v.m,y+=h.m;p&&!Dm(h)&&(h.t=p,h.m+=m-y),d&&!jm(v)&&(v.t=d,v.m+=g-b,f=l)}return f}function c(l){l.x*=e,l.y=l.depth*n}return i.separation=function(l){return arguments.length?(t=l,i):t},i.size=function(l){return arguments.length?(r=!1,e=+l[0],n=+l[1],i):r?null:[e,n]},i.nodeSize=function(l){return arguments.length?(r=!0,e=+l[0],n=+l[1],i):r?[e,n]:null},i}function ent(t,e){return t.parent===e.parent?1:2}function nnt(t){return t.reduce(rnt,0)/t.length}function rnt(t,e){return t+e.x}function int(t){return 1+t.reduce(ant,0)}function ant(t,e){return Math.max(t,e.y)}function ont(t){for(var e;e=t.children;)t=e[0];return t}function snt(t){for(var e;e=t.children;)t=e[e.length-1];return t}function cnt(){var t=ent,e=1,n=1,r=!1;function i(a){var o,s=0;a.eachAfter(function(d){var h=d.children;h?(d.x=nnt(h),d.y=int(h)):(d.x=o?s+=t(d,o):0,d.y=0,o=d)});var c=ont(a),l=snt(a),u=c.x-t(c,l)/2,f=l.x+t(l,c)/2;return a.eachAfter(r?function(d){d.x=(d.x-a.x)*e,d.y=(a.y-d.y)*n}:function(d){d.x=(d.x-u)/(f-u)*e,d.y=(1-(a.y?d.y/a.y:1))*n})}return i.separation=function(a){return arguments.length?(t=a,i):t},i.size=function(a){return arguments.length?(r=!1,e=+a[0],n=+a[1],i):r?null:[e,n]},i.nodeSize=function(a){return arguments.length?(r=!0,e=+a[0],n=+a[1],i):r?[e,n]:null},i}const x5=t=>e=>n=>{const{field:r="value",nodeSize:i,separation:a,sortBy:o,as:s=["x","y"]}=e,[c,l]=s,u=vc(n,p=>p.children).sum(p=>p[r]).sort(o),f=t();f.size([1,1]),i&&f.nodeSize(i),a&&f.separation(a),f(u);const d=[];u.each(p=>{p[c]=p.x,p[l]=p.y,p.name=p.data.name,d.push(p)});const h=u.links();return h.forEach(p=>{p[c]=[p.source[c],p.target[c]],p[l]=[p.source[l],p.target[l]]}),{nodes:d,edges:h}},_5=t=>x5(cnt)(t);_5.props={};const O5=t=>x5(tnt)(t);O5.props={};const lnt={sortBy:(t,e)=>e.value-t.value},unt={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},fnt={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},dnt={text:"",fontSize:10},w5=t=>{const{data:e,encode:n={},scale:r={},style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,u=n==null?void 0:n.value,{nodes:f,edges:d}=O5(Object.assign(Object.assign(Object.assign({},lnt),a),{field:u}))(e),h=va(l,"node",{title:"name",items:["value"]},!0),p=va(l,"link",{title:"",items:[v=>({name:"source",value:v.source.name}),v=>({name:"target",value:v.target.name})]});return[Nt({},fnt,{data:d,encode:se(n,"link"),scale:se(r,"link"),labels:s,style:Object.assign({stroke:"#999"},se(i,"link")),tooltip:p,animate:ga(c,"link")}),Nt({},unt,{data:f,scale:se(r,"node"),encode:se(n,"node"),labels:[Object.assign(Object.assign({},dnt),se(i,"label")),...o],style:Object.assign({},se(i,"node")),tooltip:h,animate:ga(c,"node")})]};w5.props={};function Ss(){return 0}function jc(t){return function(){return t}}var hnt=1664525,pnt=1013904223,S5=4294967296;function vnt(){var t=1;return function(){return(t=(hnt*t+pnt)%S5)/S5}}var gnt=mt(31759);function ynt(t){return gnt(t)==="object"&&"length"in t?t:Array.from(t)}function mnt(t,e){for(var n=t.length,r,i;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function i0t(t){return M5(t,lcg())}function M5(t,e){for(var n=0,r=(t=mnt(Array.from(t),e)).length,i=[],a,o;n<r;)a=t[n],o&&E5(o,a)?++n:(o=xnt(i=bnt(i,a)),n=0);return o}function bnt(t,e){var n,r;if(Fm(e,t))return[e];for(n=0;n<t.length;++n)if(Zh(e,t[n])&&Fm(Cu(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(Zh(Cu(t[n],t[r]),e)&&Zh(Cu(t[n],e),t[r])&&Zh(Cu(t[r],e),t[n])&&Fm(A5(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Zh(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 E5(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 Fm(t,e){for(var n=0;n<e.length;++n)if(!E5(t,e[n]))return!1;return!0}function xnt(t){switch(t.length){case 1:return _nt(t[0]);case 2:return Cu(t[0],t[1]);case 3:return A5(t[0],t[1],t[2])}}function _nt(t){return{x:t.x,y:t.y,r:t.r}}function Cu(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,l=o-r,u=s-i,f=Math.sqrt(c*c+l*l);return{x:(n+a+c/f*u)/2,y:(r+o+l/f*u)/2,r:(f+i+s)/2}}function A5(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,l=n.x,u=n.y,f=n.r,d=r-o,h=r-l,p=i-s,v=i-u,g=c-a,y=f-a,m=r*r+i*i-a*a,b=m-o*o-s*s+c*c,_=m-l*l-u*u+f*f,O=h*p-d*v,w=(p*_-v*b)/(O*2)-r,M=(v*g-p*y)/O,E=(h*b-d*_)/(O*2)-i,A=(d*y-h*g)/O,P=M*M+A*A-1,C=2*(a+w*M+E*A),D=w*w+E*E-a*a,N=-(Math.abs(P)>1e-6?(C+Math.sqrt(C*C-4*P*D))/(2*P):D/C);return{x:r+w+M*N,y:i+E+A*N,r:N}}function T5(t,e,n){var r=t.x-e.x,i,a,o=t.y-e.y,s,c,l=r*r+o*o;l?(a=e.r+n.r,a*=a,c=t.r+n.r,c*=c,a>c?(i=(l+c-a)/(2*l),s=Math.sqrt(Math.max(0,c/l-i*i)),n.x=t.x-i*r-s*o,n.y=t.y-i*o+s*r):(i=(l+a-c)/(2*l),s=Math.sqrt(Math.max(0,a/l-i*i)),n.x=e.x+i*r-s*o,n.y=e.y+i*o+s*r)):(n.x=e.x+n.r,n.y=e.y)}function P5(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 C5(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Kh(t){this._=t,this.next=null,this.previous=null}function k5(t,e){if(!(a=(t=ynt(t)).length))return 0;var n,r,i,a,o,s,c,l,u,f,d;if(n=t[0],n.x=0,n.y=0,!(a>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;T5(r,n,i=t[2]),n=new Kh(n),r=new Kh(r),i=new Kh(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<a;++c){T5(n._,r._,i=t[c]),i=new Kh(i),l=r.next,u=n.previous,f=r._.r,d=n._.r;do if(f<=d){if(P5(l._,i._)){r=l,n.next=r,r.previous=n,--c;continue t}f+=l._.r,l=l.next}else{if(P5(u._,i._)){n=u,n.next=r,r.previous=n,--c;continue t}d+=u._.r,u=u.previous}while(l!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=C5(n);(i=i.next)!==r;)(s=C5(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=M5(n,e),c=0;c<a;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function a0t(t){return k5(t,lcg()),t}function Ont(t){return Math.sqrt(t.value)}function wnt(){var t=null,e=1,n=1,r=Ss;function i(a){var o=vnt();return a.x=e/2,a.y=n/2,t?a.eachBefore(R5(t)).eachAfter(Bm(r,.5,o)).eachBefore(L5(1)):a.eachBefore(R5(Ont)).eachAfter(Bm(Ss,1,o)).eachAfter(Bm(r,a.r/Math.min(e,n),o)).eachBefore(L5(Math.min(e,n)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(t=Yd(a),i):t},i.size=function(a){return arguments.length?(e=+a[0],n=+a[1],i):[e,n]},i.padding=function(a){return arguments.length?(r=typeof a=="function"?a:jc(+a),i):r},i}function R5(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Bm(t,e,n){return function(r){if(i=r.children){var i,a,o=i.length,s=t(r)*e||0,c;if(s)for(a=0;a<o;++a)i[a].r+=s;if(c=k5(i,n),s)for(a=0;a<o;++a)i[a].r-=s;r.r=c+s}}}function L5(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)}}var Snt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Mnt=(t,e)=>({size:[t,e],padding:0,sort:(n,r)=>r.value-n.value}),Ent=(t,e,n)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:n.color?void 0:r=>r.height===0?"#ddd":"#fff",stroke:n.color?void 0:r=>r.height===0?"":"#000"}}),Ant={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.r*2},Tnt={title:t=>t.data.name,items:[{field:"value"}]},Pnt=(t,e,n)=>{const{value:r}=n,i=jr(t)?Cg().path(e.path)(t):vc(t);return r?i.sum(a=>ba(r)(a)).sort(e.sort):i.count(),wnt().size(e.size).padding(e.padding)(i),i.descendants()},N5=(t,e)=>{const{width:n,height:r}=e,{data:i,encode:a={},scale:o={},style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=Snt(t,["data","encode","scale","style","layout","labels","tooltip"]),d=Ent(n,r,a),h=Pnt(i,Nt({},Mnt(n,r),c),Nt({},d.encode,a)),p=se(s,"label");return Nt({},d,Object.assign(Object.assign({data:h,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},Ant),p),...l]},f),{tooltip:sg(u,Tnt),axis:!1}))};N5.props={};function Cnt(t){return t.target.depth}function knt(t){return t.depth}function Rnt(t,e){return e-1-t.height}function Qh(t,e){return t.sourceLinks.length?t.depth:e-1}function Lnt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Mi(t.sourceLinks,Cnt)-1:0}function Jh(t){return function(){return t}}function I5(t,e){return tp(t.source,e.source)||t.index-e.index}function j5(t,e){return tp(t.target,e.target)||t.index-e.index}function tp(t,e){return t.y0-e.y0}function zm(t){return t.value}function Nnt(t){return t.index}function Int(t){return t.nodes}function jnt(t){return t.links}function D5(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function F5({nodes:t}){for(const e of t){let n=e.y0,r=n;for(const i of e.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of e.targetLinks)i.y1=r+i.width/2,r+=i.width}}function Dnt(){let t=0,e=0,n=1,r=1,i=24,a=8,o,s=Nnt,c=Qh,l,u,f,d=Int,h=jnt,p=6;function v(I){const F={nodes:d(I),links:h(I)};return g(F),y(F),m(F),b(F),w(F),F5(F),F}v.update=function(I){return F5(I),I},v.nodeId=function(I){return arguments.length?(s=typeof I=="function"?I:Jh(I),v):s},v.nodeAlign=function(I){return arguments.length?(c=typeof I=="function"?I:Jh(I),v):c},v.nodeDepth=function(I){return arguments.length?(l=I,v):l},v.nodeSort=function(I){return arguments.length?(u=I,v):u},v.nodeWidth=function(I){return arguments.length?(i=+I,v):i},v.nodePadding=function(I){return arguments.length?(a=o=+I,v):a},v.nodes=function(I){return arguments.length?(d=typeof I=="function"?I:Jh(I),v):d},v.links=function(I){return arguments.length?(h=typeof I=="function"?I:Jh(I),v):h},v.linkSort=function(I){return arguments.length?(f=I,v):f},v.size=function(I){return arguments.length?(t=e=0,n=+I[0],r=+I[1],v):[n-t,r-e]},v.extent=function(I){return arguments.length?(t=+I[0][0],n=+I[1][0],e=+I[0][1],r=+I[1][1],v):[[t,e],[n,r]]},v.iterations=function(I){return arguments.length?(p=+I,v):p};function g({nodes:I,links:F}){I.forEach((z,Y)=>{z.index=Y,z.sourceLinks=[],z.targetLinks=[]});const B=new Map(I.map(z=>[s(z),z]));if(F.forEach((z,Y)=>{z.index=Y;let{source:U,target:tt}=z;typeof U!="object"&&(U=z.source=D5(B,U)),typeof tt!="object"&&(tt=z.target=D5(B,tt)),U.sourceLinks.push(z),tt.targetLinks.push(z)}),f!=null)for(const{sourceLinks:z,targetLinks:Y}of I)z.sort(f),Y.sort(f)}function y({nodes:I}){for(const F of I)F.value=F.fixedValue===void 0?Math.max(Ii(F.sourceLinks,zm),Ii(F.targetLinks,zm)):F.fixedValue}function m({nodes:I}){const F=I.length;let B=new Set(I),z=new Set,Y=0;for(;B.size;){if(B.forEach(U=>{U.depth=Y;for(const{target:tt}of U.sourceLinks)z.add(tt)}),++Y>F)throw new Error("circular link");B=z,z=new Set}if(l){const U=Math.max(Mn(I,rt=>rt.depth)+1,0);let tt;for(let rt=0;rt<I.length;rt++)tt=I[rt],tt.depth=l.call(null,tt,U)}}function b({nodes:I}){const F=I.length;let B=new Set(I),z=new Set,Y=0;for(;B.size;){if(B.forEach(U=>{U.height=Y;for(const{source:tt}of U.targetLinks)z.add(tt)}),++Y>F)throw new Error("circular link");B=z,z=new Set}}function _({nodes:I}){const F=Math.max(Mn(I,Y=>Y.depth)+1,0),B=(n-t-i)/(F-1),z=new Array(F).fill(0).map(()=>[]);for(const Y of I){const U=Math.max(0,Math.min(F-1,Math.floor(c.call(null,Y,F))));Y.layer=U,Y.x0=t+U*B,Y.x1=Y.x0+i,z[U]?z[U].push(Y):z[U]=[Y]}if(u)for(const Y of z)Y.sort(u);return z}function O(I){const F=Mi(I,B=>(r-e-(B.length-1)*o)/Ii(B,zm));for(const B of I){let z=e;for(const Y of B){Y.y0=z,Y.y1=z+Y.value*F,z=Y.y1+o;for(const U of Y.sourceLinks)U.width=U.value*F}z=(r-z+o)/(B.length+1);for(let Y=0;Y<B.length;++Y){const U=B[Y];U.y0+=z*(Y+1),U.y1+=z*(Y+1)}N(B)}}function w(I){const F=_(I);o=Math.min(a,(r-e)/(Mn(F,B=>B.length)-1)),O(F);for(let B=0;B<p;++B){const z=Math.pow(.99,B),Y=Math.max(1-z,(B+1)/p);E(F,z,Y),M(F,z,Y)}}function M(I,F,B){for(let z=1,Y=I.length;z<Y;++z){const U=I[z];for(const tt of U){let rt=0,wt=0;for(const{source:Xt,value:Tt}of tt.targetLinks){const Pt=Tt*(tt.layer-Xt.layer);rt+=k(Xt,tt)*Pt,wt+=Pt}if(!(wt>0))continue;const Bt=(rt/wt-tt.y0)*F;tt.y0+=Bt,tt.y1+=Bt,D(tt)}u===void 0&&U.sort(tp),U.length&&A(U,B)}}function E(I,F,B){for(let z=I.length,Y=z-2;Y>=0;--Y){const U=I[Y];for(const tt of U){let rt=0,wt=0;for(const{target:Xt,value:Tt}of tt.sourceLinks){const Pt=Tt*(Xt.layer-tt.layer);rt+=R(tt,Xt)*Pt,wt+=Pt}if(!(wt>0))continue;const Bt=(rt/wt-tt.y0)*F;tt.y0+=Bt,tt.y1+=Bt,D(tt)}u===void 0&&U.sort(tp),U.length&&A(U,B)}}function A(I,F){const B=I.length>>1,z=I[B];C(I,z.y0-o,B-1,F),P(I,z.y1+o,B+1,F),C(I,r,I.length-1,F),P(I,e,0,F)}function P(I,F,B,z){for(;B<I.length;++B){const Y=I[B],U=(F-Y.y0)*z;U>1e-6&&(Y.y0+=U,Y.y1+=U),F=Y.y1+o}}function C(I,F,B,z){for(;B>=0;--B){const Y=I[B],U=(Y.y1-F)*z;U>1e-6&&(Y.y0-=U,Y.y1-=U),F=Y.y0-o}}function D({sourceLinks:I,targetLinks:F}){if(f===void 0){for(const{source:{sourceLinks:B}}of F)B.sort(j5);for(const{target:{targetLinks:B}}of I)B.sort(I5)}}function N(I){if(f===void 0)for(const{sourceLinks:F,targetLinks:B}of I)F.sort(j5),B.sort(I5)}function k(I,F){let B=I.y0-(I.sourceLinks.length-1)*o/2;for(const{target:z,width:Y}of I.sourceLinks){if(z===F)break;B+=Y+o}for(const{source:z,width:Y}of F.targetLinks){if(z===I)break;B-=Y}return B}function R(I,F){let B=F.y0-(F.targetLinks.length-1)*o/2;for(const{source:z,width:Y}of F.targetLinks){if(z===I)break;B+=Y+o}for(const{target:z,width:Y}of I.sourceLinks){if(z===F)break;B-=Y}return B}return v}const Fnt={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},Bnt={left:knt,right:Rnt,center:Lnt,justify:Qh};function znt(t){const e=typeof t;return e==="string"?Bnt[t]||Qh:e==="function"?t:Qh}const B5=t=>e=>{const{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:a,nodePadding:o,nodeDepth:s,nodes:c,links:l,linkSort:u,iterations:f}=Object.assign({},Fnt,t),d=Dnt().nodeSort(r).linkSort(u).links(l).nodes(c).nodeWidth(a).nodePadding(o).nodeDepth(s).nodeAlign(znt(i)).iterations(f).extent([[0,0],[1,1]]);typeof n=="function"&&d.nodeId(n);const h=d(e),{nodes:p,links:v}=h,g=p.map(m=>{const{x0:b,x1:_,y0:O,y1:w}=m;return Object.assign(Object.assign({},m),{x:[b,_,_,b],y:[O,O,w,w]})}),y=v.map(m=>{const{source:b,target:_}=m,O=b.x1,w=_.x0,M=m.width/2;return Object.assign(Object.assign({},m),{x:[O,O,w,w],y:[m.y0+M,m.y0-M,m.y1+M,m.y1-M]})});return{nodes:g,links:y}};B5.props={};var Gnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Wnt={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},Hnt={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},Ynt={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},Vnt={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},z5=t=>{const{data:e,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,{links:u,nodes:f}=Ig(e,n),d=se(n,"node"),h=se(n,"link"),{key:p=A=>A.key,color:v=p}=d,{links:g,nodes:y}=B5(Object.assign(Object.assign(Object.assign({},Wnt),{nodeId:ba(p)}),a))({links:u,nodes:f}),m=se(i,"label"),{text:b=p,spacing:_=5}=m,O=Gnt(m,["text","spacing"]),w=ba(p),M=va(l,"node",{title:w,items:[{field:"value"}]},!0),E=va(l,"link",{title:"",items:[A=>({name:"source",value:w(A.source)}),A=>({name:"target",value:w(A.target)})]});return[Nt({},Hnt,{data:y,encode:Object.assign(Object.assign({},d),{color:v}),scale:r,style:se(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},Vnt),{text:b,dx:A=>A.x[0]<.5?_:-_}),O),...o],tooltip:M,animate:ga(c,"node"),axis:!1}),Nt({},Ynt,{data:g,encode:h,labels:s,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},se(i,"link")),tooltip:E,animate:ga(c,"link")})]};z5.props={};function $nt(t,e){return e.value-t.value}function Xnt(t,e){return e.frequency-t.frequency}function Unt(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function qnt(t,e){return`${t.name}`.localeCompare(`${e.name}`)}const Znt={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function Knt(t){const{y:e,thickness:n,weight:r,marginRatio:i,id:a,source:o,target:s,sourceWeight:c,targetWeight:l,sortBy:u}=Object.assign(Object.assign({},Znt),t);function f(g){const y=g.nodes.map(b=>Object.assign({},b)),m=g.edges.map(b=>Object.assign({},b));return d(y,m),h(y,m),p(y,m),v(y,m),{nodes:y,edges:m}}function d(g,y){y.forEach(_=>{_.source=o(_),_.target=s(_),_.sourceWeight=c(_),_.targetWeight=l(_)});const m=Kn(y,_=>_.source),b=Kn(y,_=>_.target);return g.forEach(_=>{_.id=a(_);const O=m.has(_.id)?m.get(_.id):[],w=b.has(_.id)?b.get(_.id):[];_.frequency=O.length+w.length,_.value=Ii(O,M=>M.sourceWeight)+Ii(w,M=>M.targetWeight)}),{nodes:g,edges:y}}function h(g,y){const m=typeof u=="function"?u:We[u];m&&g.sort(m)}function p(g,y){const m=g.length;if(!m)throw Us("Invalid nodes: it's empty!");if(!r){const O=1/m;return g.forEach((w,M)=>{w.x=(M+.5)*O,w.y=e}),{nodes:g,edges:y}}const b=i/(2*m),_=g.reduce((O,w)=>O+=w.value,0);return g.reduce((O,w)=>{w.weight=w.value/_,w.width=w.weight*(1-i),w.height=n;const M=b+O,E=M+w.width,A=e-n/2,P=A+n;return w.x=[M,E,E,M],w.y=[A,A,P,P],O+w.width+2*b},0),{nodes:g,edges:y}}function v(g,y){const m=new Map(g.map(O=>[O.id,O]));if(!r)return y.forEach(O=>{const w=o(O),M=s(O),E=m.get(w),A=m.get(M);E&&A&&(O.x=[E.x,A.x],O.y=[E.y,A.y])}),{nodes:g,edges:y};y.forEach(O=>{O.x=[0,0,0,0],O.y=[e,e,e,e]});const b=Kn(y,O=>O.source),_=Kn(y,O=>O.target);g.forEach(O=>{const{edges:w,width:M,x:E,y:A,value:P,id:C}=O,D=b.get(C)||[],N=_.get(C)||[];let k=0;D.map(R=>{const I=R.sourceWeight/P*M;R.x[0]=E[0]+k,R.x[1]=E[0]+k+I,k+=I}),N.forEach(R=>{const I=R.targetWeight/P*M;R.x[3]=E[0]+k,R.x[2]=E[0]+k+I,k+=I})})}return f}const Gm=t=>e=>Knt(t)(e);Gm.props={};var G5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Wm={y:0,thickness:.05,marginRatio:.1,id:t=>t.key,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},Qnt={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},Jnt={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},trt={position:"outside",fontSize:10},W5=(t,e)=>{const{data:n,encode:r={},scale:i,style:a={},layout:o={},nodeLabels:s=[],linkLabels:c=[],animate:l={},tooltip:u={}}=t,{nodes:f,links:d}=Ig(n,r),h=se(r,"node"),p=se(r,"link"),{key:v=R=>R.key,color:g=v}=h,{linkEncodeColor:y=R=>R.source}=p,{nodeWidthRatio:m=Wm.thickness,nodePaddingRatio:b=Wm.marginRatio}=o,_=G5(o,["nodeWidthRatio","nodePaddingRatio"]),{nodes:O,edges:w}=Gm(Object.assign(Object.assign(Object.assign(Object.assign({},Wm),{id:ba(v),thickness:m,marginRatio:b}),_),{weight:!0}))({nodes:f,edges:d}),M=se(a,"label"),{text:E=v}=M,A=G5(M,["text"]),P=va(u,"node",{title:"",items:[R=>({name:R.key,value:R.value})]},!0),C=va(u,"link",{title:"",items:[R=>({name:`${R.source} -> ${R.target}`,value:R.value})]}),{height:D,width:N}=e,k=Math.min(D,N);return[Nt({},Jnt,{data:w,encode:Object.assign(Object.assign({},p),{color:y}),labels:c,style:Object.assign({fill:y?void 0:"#aaa"},se(a,"link")),tooltip:C,animate:ga(l,"link")}),Nt({},Qnt,{data:O,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:se(a,"node"),coordinate:{type:"polar",outerRadius:(k-20)/k,startAngle:-Math.PI*2,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},trt),{text:E}),A),...s],tooltip:P,animate:ga(l,"node"),axis:!1})]};W5.props={};function ert(t,e,n,r,i){var a=t.children,o,s=a.length,c,l=new Array(s+1);for(l[0]=c=o=0;o<s;++o)l[o+1]=c+=a[o].value;u(0,s,t.value,e,n,r,i);function u(f,d,h,p,v,g,y){if(f>=d-1){var m=a[f];m.x0=p,m.y0=v,m.x1=g,m.y1=y;return}for(var b=l[f],_=h/2+b,O=f+1,w=d-1;O<w;){var M=O+w>>>1;l[M]<_?O=M+1:w=M}_-l[O-1]<l[O]-_&&f+1<O&&--O;var E=l[O]-b,A=h-E;if(g-p>y-v){var P=h?(p*A+g*E)/h:g;u(f,O,E,p,v,P,y),u(O,d,A,P,v,g,y)}else{var C=h?(v*A+y*E)/h:y;u(f,O,E,p,v,g,C),u(O,d,A,p,C,g,y)}}}function ep(t,e,n,r,i){for(var a=t.children,o,s=-1,c=a.length,l=t.value&&(i-n)/t.value;++s<c;)o=a[s],o.x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}function nrt(t,e,n,r,i){(t.depth&1?ep:jl)(t,e,n,r,i)}var H5=(1+Math.sqrt(5))/2;function Y5(t,e,n,r,i,a){for(var o=[],s=e.children,c,l,u=0,f=0,d=s.length,h,p,v=e.value,g,y,m,b,_,O,w;u<d;){h=i-n,p=a-r;do g=s[f++].value;while(!g&&f<d);for(y=m=g,O=Math.max(p/h,h/p)/(v*t),w=g*g*O,_=Math.max(m/w,w/y);f<d;++f){if(g+=l=s[f].value,l<y&&(y=l),l>m&&(m=l),w=g*g*O,b=Math.max(m/w,w/y),b>_){g-=l;break}_=b}o.push(c={value:g,dice:h<p,children:s.slice(u,f)}),c.dice?jl(c,n,r,i,v?r+=p*g/v:a):ep(c,n,r,v?n+=h*g/v:i,a),v-=g,u=f}return o}var V5=function t(e){function n(r,i,a,o,s){Y5(e,r,i,a,o,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(H5),rrt=function t(e){function n(r,i,a,o,s){if((c=r._squarify)&&c.ratio===e)for(var c,l,u,f,d=-1,h,p=c.length,v=r.value;++d<p;){for(l=c[d],u=l.children,f=l.value=0,h=u.length;f<h;++f)l.value+=u[f].value;l.dice?jl(l,i,a,o,v?a+=(s-a)*l.value/v:s):ep(l,i,a,v?i+=(o-i)*l.value/v:o,s),v-=l.value}else r._squarify=c=Y5(e,r,i,a,o,s),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(H5);function irt(){var t=V5,e=!1,n=1,r=1,i=[0],a=Ss,o=Ss,s=Ss,c=Ss,l=Ss;function u(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],e&&d.eachBefore(BS),d}function f(d){var h=i[d.depth],p=d.x0+h,v=d.y0+h,g=d.x1-h,y=d.y1-h;g<p&&(p=g=(p+g)/2),y<v&&(v=y=(v+y)/2),d.x0=p,d.y0=v,d.x1=g,d.y1=y,d.children&&(h=i[d.depth+1]=a(d)/2,p+=l(d)-h,v+=o(d)-h,g-=s(d)-h,y-=c(d)-h,g<p&&(p=g=(p+g)/2),y<v&&(v=y=(v+y)/2),t(d,p,v,g,y))}return u.round=function(d){return arguments.length?(e=!!d,u):e},u.size=function(d){return arguments.length?(n=+d[0],r=+d[1],u):[n,r]},u.tile=function(d){return arguments.length?(t=oM(d),u):t},u.padding=function(d){return arguments.length?u.paddingInner(d).paddingOuter(d):u.paddingInner()},u.paddingInner=function(d){return arguments.length?(a=typeof d=="function"?d:jc(+d),u):a},u.paddingOuter=function(d){return arguments.length?u.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):u.paddingTop()},u.paddingTop=function(d){return arguments.length?(o=typeof d=="function"?d:jc(+d),u):o},u.paddingRight=function(d){return arguments.length?(s=typeof d=="function"?d:jc(+d),u):s},u.paddingBottom=function(d){return arguments.length?(c=typeof d=="function"?d:jc(+d),u):c},u.paddingLeft=function(d){return arguments.length?(l=typeof d=="function"?d:jc(+d),u):l},u}var art=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ort(t,e){const n={treemapBinary:ert,treemapDice:jl,treemapSlice:ep,treemapSliceDice:nrt,treemapSquarify:V5,treemapResquarify:rrt},r=t==="treemapSquarify"?n[t].ratio(e):n[t];if(!r)throw new TypeError("Invalid tile method!");return r}function srt(t,e,n){const{value:r}=n,i=ort(e.tile,e.ratio),a=iU(t,e.path);return r?a.sum(o=>e.ignoreParentValue&&o.children?0:ba(r)(o)).sort(e.sort):a.count(),irt().tile(i).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(a),a.descendants().map(o=>Object.assign(o,{x:[o.x0,o.x1],y:[o.y0,o.y1]})).filter(typeof e.layer=="function"?e.layer:o=>o.height===e.layer)}const crt=(t,e)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(n,r)=>r.value-n.value,layer:0}),lrt=(t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",color:n=>n.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}}),urt={fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},frt={title:t=>t.data.name,items:[{field:"value"}]},$5=(t,e)=>{const{width:n,height:r}=e,{data:i,encode:a={},scale:o,style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=art(t,["data","encode","scale","style","layout","labels","tooltip"]),d=srt(i,Nt({},crt(n,r),c),a),h=se(s,"label");return Nt({},lrt(n,r),Object.assign(Object.assign({data:d,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},urt),h),...l]},f),{tooltip:sg(u,frt),axis:!1}))};$5.props={};function drt(){return{"data.arc":Gm,"data.cluster":_5,"mark.forceGraph":b5,"mark.tree":w5,"mark.pack":N5,"mark.sankey":z5,"mark.chord":W5,"mark.treemap":$5}}var X5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function hrt(t,e){return Mi(t,n=>e[n])}function prt(t,e){return Mn(t,n=>e[n])}function U5(t,e){const n=Hm(t,e)*2.5-Ym(t,e)*1.5;return Mi(t,r=>e[r]>=n?e[r]:NaN)}function Hm(t,e){return bh(t,.25,n=>e[n])}function vrt(t,e){return bh(t,.5,n=>e[n])}function Ym(t,e){return bh(t,.75,n=>e[n])}function q5(t,e){const n=Ym(t,e)*2.5-Hm(t,e)*1.5;return Mn(t,r=>e[r]<=n?e[r]:NaN)}function grt(){return(t,e)=>{const{encode:n}=e,{y:r,x:i}=n,{value:a}=r,{value:o}=i;return[Array.from(Kn(t,l=>o[+l]).values()).flatMap(l=>{const u=U5(l,a),f=q5(l,a);return l.filter(d=>a[d]<u||a[d]>f)}),e]}}const Z5=t=>{const{data:e,encode:n,style:r={},tooltip:i={},transform:a,animate:o}=t,s=X5(t,["data","encode","style","tooltip","transform","animate"]),{point:c=!0}=r,l=X5(r,["point"]),{y:u}=n,f={y:u,y1:u,y2:u,y3:u,y4:u},d={y1:Hm,y2:vrt,y3:Ym},h=va(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),p=va(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!c)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:hrt},d),{y4:prt})],encode:Object.assign(Object.assign({},n),f),style:l,tooltip:h},s);const v=se(l,"box"),g=se(l,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:U5},d),{y4:q5})],encode:Object.assign(Object.assign({},n),f),style:v,tooltip:h,animate:ga(o,"box")},s),{type:"point",data:e,transform:[{type:grt}],encode:n,style:Object.assign({},g),tooltip:p,animate:ga(o,"point")}]};Z5.props={};var np=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const yrt=(t,e)=>{const{shape:n,radius:r}=t,i=np(t,["shape","radius"]),a=se(i,"pointer"),o=se(i,"pin"),{shape:s}=a,c=np(a,["shape"]),{shape:l}=o,u=np(o,["shape"]),{coordinate:f,theme:d}=e;return(h,p)=>{const v=h.map(k=>f.invert(k)),[g,y,m]=bF(f,"polar"),b=f.clone(),{color:_}=p,O=uv({startAngle:g,endAngle:y,innerRadius:m,outerRadius:r});O.push(["cartesian"]),b.update({transformations:O});const w=v.map(k=>b.map(k)),[M,E]=DO(w),[A,P]=f.getCenter(),C=Object.assign(Object.assign({x1:M,y1:E,x2:A,y2:P,stroke:_},c),i),D=Object.assign(Object.assign({cx:A,cy:P,stroke:_},u),i),N=Ne(new Dr);return La(s)||(typeof s=="function"?N.append(()=>s(w,p,b,d)):N.append("line").call(Ee,C).node()),La(l)||(typeof l=="function"?N.append(()=>l(w,p,b,d)):N.append("circle").call(Ee,D).node()),N.node()}},K5={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-11/10*Math.PI,endAngle:1/10*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},mrt={style:{shape:yrt,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},brt={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};function xrt(t){if((0,xr.Z)(t)){const e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}function _rt(t,e){const{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=xrt(t),s=a||r,c=a?1:i,l=Object.assign({y:{domain:[0,c]}},e);return o.length?{targetData:[{x:n,y:s,color:"target"}],totalData:o.map((u,f)=>({x:n,y:f>=1?u-o[f-1]:u,color:f})),target:s,total:c,scale:l}:{targetData:[{x:n,y:s,color:"target"}],totalData:[{x:n,y:s,color:"target"},{x:n,y:c-s,color:"total"}],target:s,total:c,scale:l}}function Ort(t,{target:e,total:n}){const{content:r}=t;return r?r(e,n):e.toString()}const Q5=t=>{const{data:e={},scale:n={},style:r={},animate:i={},transform:a=[]}=t,o=np(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:c,target:l,total:u,scale:f}=_rt(e,n),d=se(r,"text"),h=J7(r,["pointer","pin"]);return[Nt({},K5,Object.assign({type:"interval",transform:[{type:"stackY"}],data:c,scale:f,style:se(r,"arc"),animate:typeof i=="object"?se(i,"arc"):i},o)),Nt({},K5,mrt,Object.assign({type:"point",data:s,scale:f,style:h,animate:typeof i=="object"?se(i,"indicator"):i},o)),Nt({},brt,{style:Object.assign({text:Ort(d,{target:l,total:u})},d),animate:typeof i=="object"?se(i,"text"):i})]};Q5.props={};const Vm=Math.PI/180,ku=64,rp=2048;function wrt(t){return t.text}function Srt(){return"serif"}function J5(){return"normal"}function Mrt(t){return t.value}function Ert(){return~~(Math.random()*2)*90}function Art(){return 1}function Trt(){}function Prt(t,e,n,r){if(e.sprite)return;const i=t.context,a=t.ratio;i.clearRect(0,0,(ku<<5)/a,rp/a);let o=0,s=0,c=0;const l=n.length;for(--r;++r<l;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/a)+"px "+e.font;let d=i.measureText(e.text+"m").width*a,h=e.size<<1;if(e.rotate){const p=Math.sin(e.rotate*Vm),v=Math.cos(e.rotate*Vm),g=d*v,y=d*p,m=h*v,b=h*p;d=Math.max(Math.abs(g+b),Math.abs(g-b))+31>>5<<5,h=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else d=d+31>>5<<5;if(h>c&&(c=h),o+d>=ku<<5&&(o=0,s+=c,c=0),s+h>=rp)break;i.translate((o+(d>>1))/a,(s+(h>>1))/a),e.rotate&&i.rotate(e.rotate*Vm),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=d,e.height=h,e.xoff=o,e.yoff=s,e.x1=d>>1,e.y1=h>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,o+=d}const u=i.getImageData(0,0,(ku<<5)/a,rp/a).data,f=[];for(;--r>=0;){if(e=n[r],!e.hasText)continue;const d=e.width,h=d>>5;let p=e.y1-e.y0;for(let y=0;y<p*h;y++)f[y]=0;if(o=e.xoff,o==null)return;s=e.yoff;let v=0,g=-1;for(let y=0;y<p;y++){for(let m=0;m<d;m++){const b=h*y+(m>>5),_=u[(s+y)*(ku<<5)+(o+m)<<2]?1<<31-m%32:0;f[b]|=_,v|=_}v?g=y:(e.y0++,p--,y--,s++)}e.y1=e.y0+g,e.sprite=f.slice(0,(e.y1-e.y0)*h)}}function Crt(t,e,n){n>>=5;const r=t.sprite,i=t.width>>5,a=t.x-(i<<4),o=a&127,s=32-o,c=t.y1-t.y0;let l=(t.y+t.y0)*n+(a>>5),u;for(let f=0;f<c;f++){u=0;for(let d=0;d<=i;d++)if((u<<s|(d<i?(u=r[f*i+d])>>>o:0))&e[l+d])return!0;l+=n}return!1}function krt(t,e){const n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function Rrt(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function t3(t){const e=t[0]/t[1];return function(n){return[e*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function Lrt(t){const n=4*t[0]/t[1];let r=0,i=0;return function(a){const o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4;break}return[r,i]}}function e3(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Nrt(){return document.createElement("canvas")}function Ro(t){return typeof t=="function"?t:function(){return t}}const Irt={archimedean:t3,rectangular:Lrt};function jrt(){let t=[256,256],e=wrt,n=Srt,r=Mrt,i=J5,a=Ert,o=Art,s=t3,c=Math.random,l=Trt,u=[],f=null,d=1/0;const h=J5,p=Nrt,v={};v.start=function(){const[m,b]=t,_=g(p()),O=v.board?v.board:e3((t[0]>>5)*t[1]),w=u.length,M=[],E=u.map(function(D,N,k){return D.text=e.call(this,D,N,k),D.font=n.call(this,D,N,k),D.style=h.call(this,D,N,k),D.weight=i.call(this,D,N,k),D.rotate=a.call(this,D,N,k),D.size=~~r.call(this,D,N,k),D.padding=o.call(this,D,N,k),D}).sort(function(D,N){return N.size-D.size});let A=-1,P=v.board?[{x:0,y:0},{x:m,y:b}]:void 0;f&&clearInterval(f),f=setInterval(C,0),C();function C(){const D=Date.now();for(;Date.now()-D<d&&++A<w;){const N=E[A];N.x=m*(c()+.5)>>1,N.y=b*(c()+.5)>>1,Prt(_,N,E,A),N.hasText&&y(O,N,P)&&(l.call(null,"word",{cloud:v,word:N}),M.push(N),P?v.hasImage||krt(P,N):P=[{x:N.x+N.x0,y:N.y+N.y0},{x:N.x+N.x1,y:N.y+N.y1}],N.x-=t[0]>>1,N.y-=t[1]>>1)}v._tags=M,v._bounds=P,A>=w&&(v.stop(),l.call(null,"end",{cloud:v,words:M,bounds:P}))}return v},v.stop=function(){return f&&(clearInterval(f),f=null),v};function g(m){m.width=m.height=1;const b=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(ku<<5)/b,m.height=rp/b;const _=m.getContext("2d");return _.fillStyle=_.strokeStyle="red",_.textAlign="center",{context:_,ratio:b}}function y(m,b,_){const O=b.x,w=b.y,M=Math.sqrt(t[0]*t[0]+t[1]*t[1]),E=s(t),A=c()<.5?1:-1;let P,C=-A,D,N;for(;(P=E(C+=A))&&(D=~~P[0],N=~~P[1],!(Math.min(Math.abs(D),Math.abs(N))>=M));)if(b.x=O+D,b.y=w+N,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>t[0]||b.y+b.y1>t[1])&&(!_||!Crt(b,m,t[0]))&&(!_||Rrt(b,_))){const k=b.sprite,R=b.width>>5,I=t[0]>>5,F=b.x-(R<<4),B=F&127,z=32-B,Y=b.y1-b.y0;let U,tt=(b.y+b.y0)*I+(F>>5);for(let rt=0;rt<Y;rt++){U=0;for(let wt=0;wt<=R;wt++)m[tt+wt]|=U<<z|(wt<R?(U=k[rt*R+wt])>>>B:0);tt+=I}return delete b.sprite,!0}return!1}return v.createMask=m=>{const b=document.createElement("canvas"),[_,O]=t;if(!_||!O)return;const w=_>>5,M=e3((_>>5)*O);b.width=_,b.height=O;const E=b.getContext("2d");E.drawImage(m,0,0,m.width,m.height,0,0,_,O);const A=E.getImageData(0,0,_,O).data;for(let P=0;P<O;P++)for(let C=0;C<_;C++){const D=w*P+(C>>5),N=P*_+C<<2,R=A[N]>=250&&A[N+1]>=250&&A[N+2]>=250?1<<31-C%32:0;M[D]|=R}v.board=M,v.hasImage=!0},v.timeInterval=function(m){d=m==null?1/0:m},v.words=function(m){u=m},v.size=function(m=[]){t=[+m[0],+m[1]]},v.text=function(m){e=Ro(m)},v.font=function(m){n=Ro(m)},v.fontWeight=function(m){i=Ro(m)},v.rotate=function(m){a=Ro(m)},v.spiral=function(m){s=Irt[m]||m},v.fontSize=function(m){r=Ro(m)},v.padding=function(m){o=Ro(m)},v.random=function(m){c=Ro(m)},v.on=function(m){l=Ro(m)},v}var Drt=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};function Frt(t,e){return{set(n,r,i){if(e[n]===void 0)return this;const a=r?r.call(null,e[n]):e[n];return i?i.call(null,a):typeof t[n]=="function"?t[n](a):t[n]=a,this},setAsync(n,r,i){return Drt(this,void 0,void 0,function*(){if(e[n]===void 0)return this;const a=r?yield r.call(null,e[n]):e[n];return i?i.call(null,a):typeof t[n]=="function"?t[n](a):t[n]=a,this})}}}var Brt=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},zrt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Grt={size:[500,500],fontSize:[14,28]};function Wrt(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement){e(t);return}if(typeof t=="string"){const r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()};return}n()})}function Hrt(t,e){if(typeof t=="function")return t;if(Array.isArray(t)){const[n,r]=t;if(!e)return()=>(r+n)/2;const[i,a]=e;return a===i?()=>(r+n)/2:({value:o})=>(r-n)/(a-i)*(o-i)+n}return()=>t}const n3=t=>e=>Brt(void 0,void 0,void 0,function*(){const n=Object.assign({},Grt,t),r=jrt();yield Frt(r,n).set("fontSize",y=>{const m=e.map(b=>b.value);return Hrt(y,[Mi(m),Mn(m)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",Wrt,r.createMask),r.words([...e]);const i=r.start(),[a,o]=n.size,s=[{x:0,y:0},{x:a,y:o}],{_bounds:c=s,_tags:l,hasImage:u}=i,f=l.map(y=>{var{x:m,y:b}=y,_=zrt(y,["x","y"]);return Object.assign(Object.assign({},_),{x:m+a/2,y:b+o/2})}),[{x:d,y:h},{x:p,y:v}]=c,g={text:"",value:0,opacity:0,fontSize:0};return f.push(Object.assign(Object.assign({},g),{x:u?0:d,y:u?0:h}),Object.assign(Object.assign({},g),{x:u?a:p,y:u?o:v})),f});n3.props={};var Yrt=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},Vrt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $rt(t,e){const{text:n="text",value:r="value"}=e;return t.map(i=>Object.assign(Object.assign({},i),{text:i[n],value:i[r]}))}const Xrt=(t,e)=>({size:[t,e]}),Urt=(t,e)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),r3=(t,e)=>Yrt(void 0,void 0,void 0,function*(){const{width:n,height:r}=e,{data:i,encode:a={},scale:o,style:s={},layout:c={}}=t,l=Vrt(t,["data","encode","scale","style","layout"]),u=$rt(i,a),f=yield n3(Object.assign(Object.assign({},Xrt(n,r)),c))(u);return Nt({},Urt(n,r),Object.assign(Object.assign({data:f,encode:a,scale:o,style:s},l),{axis:!1}))});r3.props={};const i3=5e3;function a3(t,e,n){return t+(e-t)*n}function qrt(t,e,n,r){return e===0?[[t+1/2*n/Math.PI/2,r/2],[t+1/2*n/Math.PI,r],[t+n/4,r]]:e===1?[[t+1/2*n/Math.PI/2*(Math.PI-2),r],[t+1/2*n/Math.PI/2*(Math.PI-1),r/2],[t+n/4,0]]:e===2?[[t+1/2*n/Math.PI/2,-r/2],[t+1/2*n/Math.PI,-r],[t+n/4,-r]]:[[t+1/2*n/Math.PI/2*(Math.PI-2),-r],[t+1/2*n/Math.PI/2*(Math.PI-1),-r/2],[t+n/4,0]]}function Zrt(t,e,n,r,i,a,o){const s=Math.ceil(2*t/n*4)*4,c=[];let l=r;for(;l<-Math.PI*2;)l+=Math.PI*2;for(;l>0;)l-=Math.PI*2;l=l/Math.PI/2*n;const u=a-t+l-t*2;c.push(["M",u,e]);let f=0;for(let d=0;d<s;++d){const h=d%4,p=qrt(d*n/4,h,n,i);c.push(["C",p[0][0]+u,-p[0][1]+e,p[1][0]+u,-p[1][1]+e,p[2][0]+u,-p[2][1]+e]),d===s-1&&(f=p[2][0])}return c.push(["L",f+u,o+t]),c.push(["L",u,o+t]),c.push(["Z"]),c}function Krt(t,e,n,r,i,a,o,s,c,l,u){const{fill:f,fillOpacity:d,opacity:h}=i;for(let p=0;p<r;p++){const v=r<=1?1:p/(r-1),g=Zrt(s,o+s*n,c,0,s/40,t,e),y=u.createElement("path",{style:{path:g,fill:f,opacity:a3(.2,.9,v)*Number(h||d)}});a.appendChild(y);try{if(l===!1)return;const m=[{transform:"translate(0, 0)"},{transform:`translate(${c*2}px, 0)`}];y.animate(m,{duration:a3(.5*i3,i3,v)*2,iterations:1/0})}catch(m){console.warn("off-screen group animate error!")}}}function Qrt(t,e,n){return`
|
|
M ${t} ${e-n}
|
|
a ${n} ${n} 0 1 0 0 ${n*2}
|
|
a ${n} ${n} 0 1 0 0 ${-n*2}
|
|
Z
|
|
`}function Jrt(t,e,n){const i=n*.618;return`
|
|
M ${t-i} ${e-n}
|
|
L ${t+i} ${e-n}
|
|
L ${t+i} ${e+n}
|
|
L ${t-i} ${e+n}
|
|
Z
|
|
`}function tit(t,e,n){return`
|
|
M ${t} ${e-n}
|
|
L ${t+n} ${e}
|
|
L ${t} ${e+n}
|
|
L ${t-n} ${e}
|
|
Z
|
|
`}function eit(t,e,n){return`
|
|
M ${t} ${e-n}
|
|
L ${t+n} ${e+n}
|
|
L ${t-n} ${e+n}
|
|
Z
|
|
`}function nit(t,e,n){const r=n*4/3,i=Math.max(r,n*2),a=r/2,o=t,s=a+e-i/2,c=Math.asin(a/((i-a)*.85)),l=Math.sin(c)*a,u=Math.cos(c)*a,f=o-u,d=s+l,h=t,p=s+a/Math.sin(c);return`
|
|
M ${f} ${d}
|
|
A ${a} ${a} 0 1 1 ${f+u*2} ${d}
|
|
Q ${h} ${p} ${t} ${e+i/2}
|
|
Q ${h} ${p} ${f} ${d}
|
|
Z
|
|
`}const o3={pin:nit,rect:Jrt,circle:Qrt,diamond:tit,triangle:eit};var s3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const rit=(t="circle")=>o3[t]||o3.circle,c3=(t,e)=>{if(!e)return;const{coordinate:n}=e,{liquidOptions:r,styleOptions:i}=t,{liquidShape:a,percent:o}=r,{background:s,outline:c={},wave:l={}}=i,u=s3(i,["background","outline","wave"]),{border:f=2,distance:d=0}=c,h=s3(c,["border","distance"]),{length:p=192,count:v=3}=l;return(g,y,m)=>{const{document:b}=e.canvas,{color:_,fillOpacity:O}=m,w=Object.assign(Object.assign({fill:_},m),u),M=b.createElement("g",{}),[E,A]=n.getCenter(),P=n.getSize(),C=Math.min(...P)/2,N=(vi(a)?a:rit(a))(E,A,C,...P);if(Object.keys(s).length){const I=b.createElement("path",{style:Object.assign({path:N,fill:"#fff"},s)});M.appendChild(I)}if(o>0){const I=b.createElement("path",{style:{path:N}});M.appendChild(I),M.style.clipPath=I,Krt(E,A,1-o,v,w,M,I.getBBox().y,C*2,p,!0,b)}const k=b.createElement("path",{style:{path:N,fill:"transparent",lineWidth:f+2*d,stroke:"#fff"}}),R=b.createElement("path",{style:Object.assign(Object.assign(Object.assign({path:N,stroke:_,strokeOpacity:O,lineWidth:f},w),h),{fill:"transparent"})});return M.appendChild(k),M.appendChild(R),M}};c3.props={};var iit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const ait={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:c3},animate:{enter:{type:"fadeIn"}}},oit={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},l3=t=>{const{data:e={},style:n={},animate:r}=t,i=iit(t,["data","style","animate"]),a=Math.max(0,(0,xr.Z)(e)?e:e==null?void 0:e.percent),o=[{percent:a,type:"liquid"}],s=Object.assign(Object.assign({},se(n,"text")),se(n,"content")),c=se(n,"outline"),l=se(n,"wave"),u=se(n,"background");return[Nt({},ait,Object.assign({type:"interval",data:o,style:{liquidOptions:{percent:a,liquidShape:n==null?void 0:n.shape},styleOptions:Object.assign(Object.assign({},n),{outline:c,wave:l,background:u})},animate:r},i)),Nt({},oit,{style:Object.assign({text:`${Uf(a*100)} %`},s),animate:r})]};l3.props={};var $a=mt(52827);const u3=1e-10;function f3(t,e){const n=cit(t),r=n.filter(function(c){return sit(c,t)});let i=0,a=0,o;const s=[];if(r.length>1){const c=lit(r);for(o=0;o<r.length;++o){const u=r[o];u.angle=Math.atan2(u.x-c.x,u.y-c.y)}r.sort(function(u,f){return f.angle-u.angle});let l=r[r.length-1];for(o=0;o<r.length;++o){const u=r[o];a+=(l.x+u.x)*(u.y-l.y);const f={x:(u.x+l.x)/2,y:(u.y+l.y)/2};let d=null;for(let h=0;h<u.parentIndex.length;++h)if(l.parentIndex.indexOf(u.parentIndex[h])>-1){const p=t[u.parentIndex[h]],v=Math.atan2(u.x-p.x,u.y-p.y),g=Math.atan2(l.x-p.x,l.y-p.y);let y=g-v;y<0&&(y+=2*Math.PI);const m=g-y/2;let b=Ru(f,{x:p.x+p.radius*Math.sin(m),y:p.y+p.radius*Math.cos(m)});b>p.radius*2&&(b=p.radius*2),(d===null||d.width>b)&&(d={circle:p,width:b,p1:u,p2:l})}d!==null&&(s.push(d),i+=$m(d.circle.radius,d.width),l=u)}}else{let c=t[0];for(o=1;o<t.length;++o)t[o].radius<c.radius&&(c=t[o]);let l=!1;for(o=0;o<t.length;++o)if(Ru(t[o],c)>Math.abs(c.radius-t[o].radius)){l=!0;break}l?i=a=0:(i=c.radius*c.radius*Math.PI,s.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-u3,y:c.y+c.radius},width:c.radius*2}))}return a/=2,e&&(e.area=i+a,e.arcArea=i,e.polygonArea=a,e.arcs=s,e.innerPoints=r,e.intersectionPoints=n),i+a}function sit(t,e){for(let n=0;n<e.length;++n)if(Ru(t,e[n])>e[n].radius+u3)return!1;return!0}function cit(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const i=h3(t[n],t[r]);for(let a=0;a<i.length;++a){const o=i[a];o.parentIndex=[n,r],e.push(o)}}return e}function $m(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function Ru(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function d3(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const r=t-(n*n-e*e+t*t)/(2*n),i=e-(n*n-t*t+e*e)/(2*n);return $m(t,r)+$m(e,i)}function h3(t,e){const n=Ru(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];const a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=t.x+a*(e.x-t.x)/n,c=t.y+a*(e.y-t.y)/n,l=-(e.y-t.y)*(o/n),u=-(e.x-t.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function lit(t){const e={x:0,y:0};for(let n=0;n<t.length;++n)e.x+=t[n].x,e.y+=t[n].y;return e.x/=t.length,e.y/=t.length,e}function uit(t,e){e=e||{},e.maxIterations=e.maxIterations||500;const n=e.initialLayout||pit,r=e.lossFunction||Um;t=fit(t);const i=n(t,e),a=[],o=[];let s;for(s in i)i.hasOwnProperty(s)&&(a.push(i[s].x),a.push(i[s].y),o.push(s));const l=(0,$a.nelderMead)(function(u){const f={};for(let d=0;d<o.length;++d){const h=o[d];f[h]={x:u[2*d],y:u[2*d+1],radius:i[h].radius}}return r(f,t)},a,e).x;for(let u=0;u<o.length;++u)s=o[u],i[s].x=l[2*u],i[s].y=l[2*u+1];return i}const p3=1e-10;function Xm(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+p3?Math.abs(t-e):(0,$a.bisect)(function(r){return d3(t,e,r)-n},0,t+e)}function fit(t){t=t.slice();const e=[],n={};let r,i,a,o;for(r=0;r<t.length;++r){const s=t[r];s.sets.length==1?e.push(s.sets[0]):s.sets.length==2&&(a=s.sets[0],o=s.sets[1],n[[a,o]]=!0,n[[o,a]]=!0)}for(e.sort((s,c)=>s>c?1:-1),r=0;r<e.length;++r)for(a=e[r],i=r+1;i<e.length;++i)o=e[i],[a,o]in n||t.push({sets:[a,o],size:0});return t}function dit(t,e,n){const r=(0,$a.zerosM)(e.length,e.length),i=(0,$a.zerosM)(e.length,e.length);return t.filter(function(a){return a.sets.length==2}).map(function(a){const o=n[a.sets[0]],s=n[a.sets[1]],c=Math.sqrt(e[o].size/Math.PI),l=Math.sqrt(e[s].size/Math.PI),u=Xm(c,l,a.size);r[o][s]=r[s][o]=u;let f=0;a.size+1e-10>=Math.min(e[o].size,e[s].size)?f=1:a.size<=1e-10&&(f=-1),i[o][s]=i[s][o]=f}),{distances:r,constraints:i}}function hit(t,e,n,r){let i=0,a;for(a=0;a<e.length;++a)e[a]=0;for(a=0;a<n.length;++a){const o=t[2*a],s=t[2*a+1];for(let c=a+1;c<n.length;++c){const l=t[2*c],u=t[2*c+1],f=n[a][c],d=r[a][c],h=(l-o)*(l-o)+(u-s)*(u-s),p=Math.sqrt(h),v=h-f*f;d>0&&p<=f||d<0&&p>=f||(i+=2*v*v,e[2*a]+=4*v*(o-l),e[2*a+1]+=4*v*(s-u),e[2*c]+=4*v*(l-o),e[2*c+1]+=4*v*(u-s))}}return i}function pit(t,e){let n=git(t,e);const r=e.lossFunction||Um;if(t.length>=8){const i=vit(t,e),a=r(i,t),o=r(n,t);a+1e-8<o&&(n=i)}return n}function vit(t,e){e=e||{};const n=e.restarts||10,r=[],i={};let a;for(a=0;a<t.length;++a){const v=t[a];v.sets.length==1&&(i[v.sets[0]]=r.length,r.push(v))}const o=dit(t,r,i);let s=o.distances;const c=o.constraints,l=(0,$a.norm2)(s.map($a.norm2))/s.length;s=s.map(function(v){return v.map(function(g){return g/l})});const u=function(v,g){return hit(v,g,s,c)};let f,d;for(a=0;a<n;++a){const v=(0,$a.zeros)(s.length*2).map(Math.random);d=(0,$a.conjugateGradient)(u,v,e),(!f||d.fx<f.fx)&&(f=d)}const h=f.x,p={};for(a=0;a<r.length;++a){const v=r[a];p[v.sets[0]]={x:h[2*a]*l,y:h[2*a+1]*l,radius:Math.sqrt(v.size/Math.PI)}}if(e.history)for(a=0;a<e.history.length;++a)(0,$a.scale)(e.history[a].x,l);return p}function git(t,e){const n=e&&e.lossFunction?e.lossFunction:Um,r={},i={};let a;for(let f=0;f<t.length;++f){const d=t[f];d.sets.length==1&&(a=d.sets[0],r[a]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:d.size,radius:Math.sqrt(d.size/Math.PI)},i[a]=[])}t=t.filter(function(f){return f.sets.length==2});for(let f=0;f<t.length;++f){const d=t[f];let h=d.hasOwnProperty("weight")?d.weight:1;const p=d.sets[0],v=d.sets[1];d.size+p3>=Math.min(r[p].size,r[v].size)&&(h=0),i[p].push({set:v,size:d.size,weight:h}),i[v].push({set:p,size:d.size,weight:h})}const o=[];for(a in i)if(i.hasOwnProperty(a)){let f=0;for(let d=0;d<i[a].length;++d)f+=i[a][d].size*i[a][d].weight;o.push({set:a,size:f})}function s(f,d){return d.size-f.size}o.sort(s);const c={};function l(f){return f.set in c}function u(f,d){r[d].x=f.x,r[d].y=f.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let f=1;f<o.length;++f){const d=o[f].set,h=i[d].filter(l);if(a=r[d],h.sort(s),h.length===0)throw"ERROR: missing pairwise overlap information";const p=[];for(let y=0;y<h.length;++y){const m=r[h[y].set],b=Xm(a.radius,m.radius,h[y].size);p.push({x:m.x+b,y:m.y}),p.push({x:m.x-b,y:m.y}),p.push({y:m.y+b,x:m.x}),p.push({y:m.y-b,x:m.x});for(let _=y+1;_<h.length;++_){const O=r[h[_].set],w=Xm(a.radius,O.radius,h[_].size),M=h3({x:m.x,y:m.y,radius:b},{x:O.x,y:O.y,radius:w});for(let E=0;E<M.length;++E)p.push(M[E])}}let v=1e50,g=p[0];for(let y=0;y<p.length;++y){r[d].x=p[y].x,r[d].y=p[y].y;const m=n(r,t);m<v&&(v=m,g=p[y])}u(g,d)}return r}function Um(t,e){let n=0;function r(i){return i.map(function(a){return t[a]})}for(let i=0;i<e.length;++i){const a=e[i];let o;if(a.sets.length==1)continue;if(a.sets.length==2){const c=t[a.sets[0]],l=t[a.sets[1]];o=d3(c.radius,l.radius,Ru(c,l))}else o=f3(r(a.sets));const s=a.hasOwnProperty("weight")?a.weight:1;n+=s*(o-a.size)*(o-a.size)}return n}function yit(t,e,n){n===null?t.sort(function(i,a){return a.radius-i.radius}):t.sort(n);let r;if(t.length>0){const i=t[0].x,a=t[0].y;for(r=0;r<t.length;++r)t[r].x-=i,t[r].y-=a}if(t.length==2&&distance(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-e;let a,o;const s=Math.cos(i),c=Math.sin(i);for(r=0;r<t.length;++r)a=t[r].x,o=t[r].y,t[r].x=s*a-c*o,t[r].y=c*a+s*o}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-e;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const a=t[1].y/(1e-10+t[1].x);for(r=0;r<t.length;++r){const o=(t[r].x+a*t[r].y)/(1+a*a);t[r].x=2*o-t[r].x,t[r].y=2*o*a-t[r].y}}}}function mit(t){t.map(function(o){o.parent=o});function e(o){return o.parent!==o&&(o.parent=e(o.parent)),o.parent}function n(o,s){const c=e(o),l=e(s);c.parent=l}for(let o=0;o<t.length;++o)for(let s=o+1;s<t.length;++s){const c=t[o].radius+t[s].radius;distance(t[o],t[s])+1e-10<c&&n(t[s],t[o])}const r={};let i;for(let o=0;o<t.length;++o)i=e(t[o]).parent.setid,i in r||(r[i]=[]),r[i].push(t[o]);t.map(function(o){delete o.parent});const a=[];for(i in r)r.hasOwnProperty(i)&&a.push(r[i]);return a}function qm(t){const e=function(n){const r=Math.max.apply(null,t.map(function(a){return a[n]+a.radius})),i=Math.min.apply(null,t.map(function(a){return a[n]-a.radius}));return{max:r,min:i}};return{xRange:e("x"),yRange:e("y")}}function o0t(t,e,n){e===null&&(e=Math.PI/2);let r=[],i,a;for(a in t)if(t.hasOwnProperty(a)){const d=t[a];r.push({x:d.x,y:d.y,radius:d.radius,setid:a})}const o=mit(r);for(i=0;i<o.length;++i){yit(o[i],e,n);const d=qm(o[i]);o[i].size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),o[i].bounds=d}o.sort(function(d,h){return h.size-d.size}),r=o[0];let s=r.bounds;const c=(s.xRange.max-s.xRange.min)/50;function l(d,h,p){if(!d)return;const v=d.bounds;let g,y,m;h?g=s.xRange.max-v.xRange.min+c:(g=s.xRange.max-v.xRange.max,m=(v.xRange.max-v.xRange.min)/2-(s.xRange.max-s.xRange.min)/2,m<0&&(g+=m)),p?y=s.yRange.max-v.yRange.min+c:(y=s.yRange.max-v.yRange.max,m=(v.yRange.max-v.yRange.min)/2-(s.yRange.max-s.yRange.min)/2,m<0&&(y+=m));for(let b=0;b<d.length;++b)d[b].x+=g,d[b].y+=y,r.push(d[b])}let u=1;for(;u<o.length;)l(o[u],!0,!1),l(o[u+1],!1,!0),l(o[u+2],!0,!0),u+=3,s=qm(r);const f={};for(i=0;i<r.length;++i)f[r[i].setid]=r[i];return f}function bit(t,e,n,r){const i=[],a=[];for(const v in t)t.hasOwnProperty(v)&&(a.push(v),i.push(t[v]));e-=2*r,n-=2*r;const o=qm(i),s=o.xRange,c=o.yRange;if(s.max==s.min||c.max==c.min)return console.log("not scaling solution: zero size detected"),t;const l=e/(s.max-s.min),u=n/(c.max-c.min),f=Math.min(u,l),d=(e-(s.max-s.min)*f)/2,h=(n-(c.max-c.min)*f)/2,p={};for(let v=0;v<i.length;++v){const g=i[v];p[a[v]]={radius:f*g.radius,x:r+d+(g.x-s.min)*f,y:r+h+(g.y-c.min)*f}}return p}function xit(t,e,n){const r=[],i=t-n,a=e;return r.push("M",i,a),r.push("A",n,n,0,1,0,i+2*n,a),r.push("A",n,n,0,1,0,i,a),r.join(" ")}function _it(t){const e={};f3(t,e);const n=e.arcs;if(n.length===0)return"M 0 0";if(n.length==1){const r=n[0].circle;return xit(r.x,r.y,r.radius)}else{const r=[`
|
|
M`,n[0].p2.x,n[0].p2.y];for(let i=0;i<n.length;++i){const a=n[i],o=a.circle.radius,s=a.width>o;r.push(`
|
|
A`,o,o,0,s?1:0,1,a.p1.x,a.p1.y)}return r.join(" ")}}const v3=t=>{const{sets:e="sets",size:n="size",as:r=["key","path"],padding:i=0}=t,[a,o]=r;return s=>{const c=s.map(f=>Object.assign(Object.assign({},f),{sets:f[e],size:f[n],[a]:f.sets.join("&")}));c.sort((f,d)=>f.sets.length-d.sets.length);const l=uit(c);let u;return c.map(f=>{const d=f[e],h=({width:p,height:v})=>{u=u||bit(l,p,v,i);const g=d.map(m=>u[m]);let y=_it(g);return/[zZ]$/.test(y)||(y+=" Z"),y};return Object.assign(Object.assign({},f),{[o]:h})})}};v3.props={};function Oit(){return{"data.venn":v3,"mark.boxplot":Z5,"mark.gauge":Q5,"mark.wordCloud":r3,"mark.liquid":l3}}function wit(){return Object.assign(Object.assign(Object.assign(Object.assign({},net()),drt()),Oit()),QJ())}var ip=function(){return ip=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ip.apply(this,arguments)},Sit=q$(U$,ip(ip({},wit()),DX())),Mit="[object Boolean]";function Eit(t){return t===!0||t===!1||ci(t)&&T(t)==Mit}var Zm=Eit,Lu=function(){return Lu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Lu.apply(this,arguments)},Ait=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Tit=["renderer"],g3=["width","height","autoFit","theme","inset","insetLeft","insetRight","insetTop","insetBottom","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","depth","title","clip","children","type","data","direction"],Km="__transform__",Pit="__skipDelCustomKeys__",Ms=function(t,e){return Zm(e)?{type:t,available:e}:Lu({type:t},e)},Qm={xField:"encode.x",yField:"encode.y",colorField:"encode.color",angleField:"encode.y",keyField:"encode.key",sizeField:"encode.size",shapeField:"encode.shape",seriesField:"encode.series",positionField:"encode.position",textField:"encode.text",valueField:"encode.value",binField:"encode.x",srcField:"encode.src",linkColorField:"encode.linkColor",stack:{target:"transform",value:function(t){return Ms("stackY",t)}},normalize:{target:"transform",value:function(t){return Ms("normalizeY",t)}},percent:{target:"transform",value:function(t){return Ms("normalizeY",t)}},group:{target:"transform",value:function(t){return Ms("dodgeX",t)}},sort:{target:"transform",value:function(t){return Ms("sortX",t)}},symmetry:{target:"transform",value:function(t){return Ms("symmetryY",t)}},diff:{target:"transform",value:function(t){return Ms("diffY",t)}},meta:{target:"scale",value:function(t){return t}},label:{target:"labels",value:function(t){return t}},shape:"style.shape",connectNulls:{target:"style",value:function(t){return Zm(t)?{connect:t}:t}}},Jm=["xField","yField","seriesField","colorField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],ap=[{key:"annotations",extend_keys:[]},{key:"line",type:"line",extend_keys:Jm},{key:"point",type:"point",extend_keys:Jm},{key:"area",type:"area",extend_keys:Jm}],t1=["radius","innerRadius","startAngle","endAngle","focusX","focusY","distortionX","distortionY","visual"],Cit=[{key:"transform",callback:function(t,e,n){var r;t[e]=t[e]||[];var i=n.available,a=i===void 0?!0:i,o=Ait(n,["available"]);a?t[e].push(Lu((r={},r[Km]=!0,r),o)):t[e].splice(t[e].indexOf(function(s){return s.type===n.type}),1)}},{key:"labels",callback:function(t,e,n){var r;if(!n||Ct(n)){t[e]=n||[];return}n.text||(n.text=t.yField),t[e]=t[e]||[],t[e].push(Lu((r={},r[Km]=!0,r),n))}}],e1=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}],kit=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),op=function(){return op=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},op.apply(this,arguments)},Rit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Lit=function(t){kit(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=Rit(n,["style"]);return t.call(this,op({style:op({fill:"#eee"},r)},i))||this}return e}(sl),Nit=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sp=function(){return sp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},sp.apply(this,arguments)},Iit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},y3=function(t){Nit(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=Iit(n,["style"]);return t.call(this,sp({style:sp({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},r)},i))||this}return e}(ca);function jit(t,e,n){(n!==void 0&&!It(t[e],n)||n===void 0&&!(e in t))&&qu(t,e,n)}var n1=jit;function Dit(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(n(a[c],c,a)===!1)break}return e}}var Fit=Dit,Bit=Fit(),m3=Bit;function zit(t){return ci(t)&&Za(t)}var Git=zit,Wit="[object Object]",Hit=Function.prototype,Yit=Object.prototype,b3=Hit.toString,Vit=Yit.hasOwnProperty,$it=b3.call(Object);function Xit(t){if(!ci(t)||T(t)!=Wit)return!1;var e=zp(t);if(e===null)return!0;var n=Vit.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&b3.call(n)==$it}var r1=Xit;function Uit(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var i1=Uit;function qit(t){return Ho(t,$c(t))}var Zit=qit;function Kit(t,e,n,r,i,a,o){var s=i1(t,n),c=i1(e,n),l=o.get(c);if(l){n1(t,n,l);return}var u=a?a(s,c,n+"",t,e,o):void 0,f=u===void 0;if(f){var d=Ct(c),h=!d&&Wc(c),p=!d&&!h&&Np(c);u=c,d||h||p?Ct(s)?u=s:Git(s)?u=Bp(s):h?(f=!1,u=tb(c,!0)):p?(f=!1,u=ab(c,!0)):u=[]:r1(c)||Gc(c)?(u=s,Gc(s)?u=Zit(s):(!$(s)||_t(s))&&(u=sb(c))):f=!1}f&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),n1(t,n,u)}var Qit=Kit;function x3(t,e,n,r,i){t!==e&&m3(e,function(a,o){if(i||(i=new ks),$(a))Qit(t,e,o,n,x3,r,i);else{var s=r?r(i1(t,o),a,o+"",t,e,i):void 0;s===void 0&&(s=a),n1(t,o,s)}},$c)}var Jit=x3;function tat(t){return t}var a1=tat;function eat(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var nat=eat,_3=Math.max;function rat(t,e,n){return e=_3(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=_3(r.length-e,0),o=Array(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),nat(t,this,s)}}var O3=rat;function iat(t){return function(){return t}}var aat=iat,oat=Uu?function(t,e){return Uu(t,"toString",{configurable:!0,enumerable:!1,value:aat(e),writable:!0})}:a1,sat=oat,cat=800,lat=16,uat=Date.now;function fat(t){var e=0,n=0;return function(){var r=uat(),i=lat-(r-n);if(n=r,i>0){if(++e>=cat)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var dat=fat,hat=dat(sat),w3=hat;function pat(t,e){return w3(O3(t,e,a1),t+"")}var vat=pat;function gat(t,e,n){if(!$(n))return!1;var r=typeof e;return(r=="number"?Za(n)&&Vu(e,n.length):r=="string"&&e in n)?It(n[e],t):!1}var yat=gat;function mat(t){return vat(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,o&&yat(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e})}var S3=mat,bat=S3(function(t,e,n,r){Jit(t,e,n,r)}),xat=bat,M3=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))},_at=function(t,e){if(Ct(e))return e},Xa=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return xat.apply(void 0,M3(M3([],t,!1),[_at],!1))},Oat=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),E3=function(t){Oat(e,t);function e(n,r,i){var a=t.call(this,{style:Xa(i,r)})||this;return a.chart=n,a}return e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},e.prototype.disconnectedCallback=function(){},e.prototype.attributeChangedCallback=function(n){},e.prototype.update=function(n,r){var i;return this.attr(Xa({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},e.prototype.clear=function(){this.removeChildren()},e.prototype.getElementsLayout=function(){var n=this.chart.getContext().canvas,r=n.document.getElementsByClassName("element"),i=[];return r.forEach(function(a){var o=a.getBBox(),s=o.x,c=o.y,l=o.width,u=o.height,f=a.__data__;i.push({bbox:o,x:s,y:c,width:l,height:u,key:f.key,data:f})}),i},e.prototype.bindEvents=function(n,r){},e}(Of),wat=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cp=function(){return cp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},cp.apply(this,arguments)},Sat=function(t){wat(e,t);function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return e.prototype.getConversionTagLayout=function(){var n=this.direction==="vertical",r=this.getElementsLayout(),i=r[0],a=i.x,o=i.y,s=i.height,c=i.width,l=i.data,u=["items",0,"value"],f=vr(l,u),d=n?r[1].y-o-s:r[1].x-a-c,h=[],p=this.attributes,v=p.size,g=v===void 0?40:v,y=p.arrowSize,m=y===void 0?20:y,b=p.spacing,_=b===void 0?4:b;return r.forEach(function(O,w){if(w>0){var M=O.x,E=O.y,A=O.height,P=O.width,C=O.data,D=O.key,N=vr(C,u),k=g/2;if(n){var R=M+P/2,I=E;h.push({points:[[R+k,I-d+_],[R+k,I-m-_],[R,I-_],[R-k,I-m-_],[R-k,I-d+_]],center:[R,I-d/2-_],width:d,value:[f,N],key:D})}else{var R=M,I=E+A/2;h.push({points:[[M-d+_,I-k],[M-m-_,I-k],[R-_,I],[M-m-_,I+k],[M-d+_,I+k]],center:[R-d/2-_,I],width:d,value:[f,N],key:D})}f=N}}),h},e.prototype.render=function(){this.setDirection(),this.drawConversionTag()},e.prototype.setDirection=function(){var n=this.chart.getCoordinate(),r=vr(n,"options.transformations"),i="horizontal";r.forEach(function(a){a.includes("transpose")&&(i="vertical")}),this.direction=i},e.prototype.drawConversionTag=function(){var n=this,r=this.getConversionTagLayout(),i=this.attributes,a=i.style,o=i.text,s=o.style,c=o.formatter;r.forEach(function(l){var u=l.points,f=l.center,d=l.value,h=l.key,p=d[0],v=d[1],g=f[0],y=f[1],m=new Lit({style:cp({points:u,fill:"#eee"},a),id:"polygon-".concat(h)}),b=new y3({style:cp({x:g,y,text:_t(c)?c(p,v):(v/p*100).toFixed(2)+"%"},s),id:"text-".concat(h)});n.appendChild(m),n.appendChild(b)})},e.prototype.update=function(){var n=this,r=this.getConversionTagLayout();r.forEach(function(i){var a=i.points,o=i.center,s=i.key,c=o[0],l=o[1],u=n.getElementById("polygon-".concat(s)),f=n.getElementById("text-".concat(s));u.setAttribute("points",a),f.setAttribute("x",c),f.setAttribute("y",l)})},e.tag="ConversionTag",e}(E3),Mat=1,Eat=2;function Aat(t,e,n,r){var i=n.length,a=i,o=!r;if(t==null)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){s=n[i];var c=s[0],l=t[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in t))return!1}else{var f=new ks;if(r)var d=r(l,u,c,t,e,f);if(!(d===void 0?Fp(u,l,Mat|Eat,r,f):d))return!1}}return!0}var Tat=Aat;function Pat(t){return t===t&&!$(t)}var A3=Pat;function Cat(t){for(var e=Go(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,A3(i)]}return e}var kat=Cat;function Rat(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var T3=Rat;function Lat(t){var e=kat(t);return e.length==1&&e[0][2]?T3(e[0][0],e[0][1]):function(n){return n===t||Tat(n,t,e)}}var Nat=Lat;function Iat(t,e){return t!=null&&e in Object(t)}var jat=Iat;function Dat(t,e,n){e=Ns(e,t);for(var r=-1,i=e.length,a=!1;++r<i;){var o=Is(e[r]);if(!(a=t!=null&&n(t,o)))break;t=t[o]}return a||++r!=i?a:(i=t==null?0:t.length,!!i&&kp(i)&&Vu(o,i)&&(Ct(t)||Gc(t)))}var Fat=Dat;function Bat(t,e){return t!=null&&Fat(t,e,jat)}var P3=Bat,zat=1,Gat=2;function Wat(t,e){return Hp(t)&&A3(e)?T3(Is(t),e):function(n){var r=vr(n,t);return r===void 0&&r===e?P3(n,t):Fp(e,r,zat|Gat)}}var Hat=Wat;function Yat(t){return function(e){return e==null?void 0:e[t]}}var Vat=Yat;function $at(t){return function(e){return Ju(e,t)}}var Xat=$at;function Uat(t){return Hp(t)?Vat(Is(t)):Xat(t)}var qat=Uat;function Zat(t){return typeof t=="function"?t:t==null?a1:typeof t=="object"?Ct(t)?Hat(t[0],t[1]):Nat(t):qat(t)}var o1=Zat;function Kat(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}var Qat=Kat;function Jat(t){return t!==t}var tot=Jat;function eot(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}var not=eot;function rot(t,e,n){return e===e?not(t,e,n):Qat(t,tot,n)}var C3=rot;function iot(t,e){var n=t==null?0:t.length;return!!n&&C3(t,e,0)>-1}var aot=iot;function oot(t,e,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}var sot=oot;function cot(){}var k3=cot,lot=1/0,uot=Ls&&1/Ap(new Ls([,-0]))[1]==lot?function(t){return new Ls(t)}:k3,fot=uot,dot=200;function hot(t,e,n){var r=-1,i=aot,a=t.length,o=!0,s=[],c=s;if(n)o=!1,i=sot;else if(a>=dot){var l=e?null:fot(t);if(l)return Ap(l);o=!1,i=M1,c=new S1}else c=e?[]:s;t:for(;++r<a;){var u=t[r],f=e?e(u):u;if(u=n||u!==0?u:0,o&&f===f){for(var d=c.length;d--;)if(c[d]===f)continue t;e&&c.push(f),s.push(u)}else i(c,f,n)||(c!==s&&c.push(f),s.push(u))}return s}var pot=hot;function vot(t,e){return t&&t.length?pot(t,o1(e,2)):[]}var s1=vot;function got(t,e,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;){var o=t[i];e(r,o,n(o),t)}return r}var yot=got;function mot(t,e){return t&&m3(t,e,Go)}var bot=mot;function xot(t,e){return function(n,r){if(n==null)return n;if(!Za(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var _ot=xot,Oot=_ot(bot),R3=Oot;function wot(t,e,n,r){return R3(t,function(i,a,o){e(r,i,n(i),o)}),r}var Sot=wot;function Mot(t,e){return function(n,r){var i=Ct(n)?yot:Sot,a=e?e():{};return i(n,t,o1(r,2),a)}}var Eot=Mot,Aot=Object.prototype,Tot=Aot.hasOwnProperty,Pot=Eot(function(t,e,n){Tot.call(t,n)?t[n].push(e):qu(t,n,[e])}),L3=Pot,c1=32,N3=16,I3=48,Cot=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nu=function(){return Nu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Nu.apply(this,arguments)},kot=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Rot=function(t){Cot(e,t);function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return e.prototype.render=function(){this.drawText()},e.prototype.getBidirectionalBarAxisTextLayout=function(){var n=this.attributes.layout,r=n==="vertical",i=this.getElementsLayout(),a=r?s1(i,"x"):s1(i,"y"),o=["title"],s=[],c=this.chart.getContext().views,l=vr(c,[0,"layout"]),u=l.width,f=l.height;return a.forEach(function(d){var h=d.x,p=d.y,v=d.height,g=d.width,y=d.data,m=d.key,b=vr(y,o);r?s.push({x:h+g/2,y:f,text:b,key:m}):s.push({x:u,y:p+v/2,text:b,key:m})}),s1(s,"text").length!==s.length&&(s=Object.values(L3(s,"text")).map(function(d){var h,p=d.reduce(function(v,g){return v+(r?g.x:g.y)},0);return Nu(Nu({},d[0]),(h={},h[r?"x":"y"]=p/d.length,h))})),s},e.prototype.transformLabelStyle=function(n){var r={},i=/^label[A-Z]/;return Object.keys(n).forEach(function(a){i.test(a)&&(r[a.replace("label","").replace(/^[A-Z]/,function(o){return o.toLowerCase()})]=n[a])}),r},e.prototype.drawText=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout(),i=this.attributes,a=i.layout,o=i.labelFormatter,s=kot(i,["layout","labelFormatter"]);r.forEach(function(c){var l=c.x,u=c.y,f=c.text,d=c.key,h=new y3({style:Nu({x:l,y:u,text:_t(o)?o(f):f,wordWrap:!0,wordWrapWidth:a==="horizontal"?c1*2:120,maxLines:2,textOverflow:"ellipsis"},n.transformLabelStyle(s)),id:"text-".concat(d)});n.appendChild(h)})},e.prototype.update=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout();r.forEach(function(i){var a=i.x,o=i.y,s=i.key,c=n.getElementById("text-".concat(s));c.setAttribute("x",a),c.setAttribute("y",o)})},e.tag="BidirectionalBarAxisText",e}(E3),Lot={ConversionTag:Sat,BidirectionalBarAxisText:Rot},Not=function(){function t(e,n){this.container=new Map,this.chart=e,this.config=n,this.init()}return t.prototype.init=function(){var e=this;e1.forEach(function(n){var r,i=n.key,a=n.shape,o=e.config[i];if(o){var s=new Lot[a](e.chart,o),c=e.chart.getContext().canvas;c.appendChild(s),e.container.set(i,s)}else(r=e.container.get(i))===null||r===void 0||r.clear()})},t.prototype.update=function(){var e=this;this.container.size&&e1.forEach(function(n){var r=n.key,i=e.container.get(r);i==null||i.update()})},t}();function Iot(t,e,n,r){if(!$(t))return t;e=Ns(e,t);for(var i=-1,a=e.length,o=a-1,s=t;s!=null&&++i<a;){var c=Is(e[i]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=$(u)?u:Vu(e[i+1])?[]:{})}Zu(s,c,l),s=s[c]}return t}var j3=Iot;function jot(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],s=Ju(t,o);n(s,o)&&j3(a,Ns(o,t),s)}return a}var Dot=jot;function Fot(t,e){return Dot(t,e,function(n,r){return P3(t,r)})}var Bot=Fot,D3=gt?gt.isConcatSpreadable:void 0;function zot(t){return Ct(t)||Gc(t)||!!(D3&&t&&t[D3])}var Got=zot;function F3(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=Got),i||(i=[]);++a<o;){var s=t[a];e>0&&n(s)?e>1?F3(s,e-1,n,r,i):Pp(i,s):r||(i[i.length]=s)}return i}var Wot=F3;function Hot(t){var e=t==null?0:t.length;return e?Wot(t,1):[]}var Yot=Hot;function Vot(t){return w3(O3(t,void 0,Yot),t+"")}var l1=Vot,$ot=l1(function(t,e){return t==null?{}:Bot(t,e)}),lp=$ot,Xot=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dc=function(){return Dc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Dc.apply(this,arguments)},B3="data-chart-source-type",vn=function(t){Xot(e,t);function e(n,r){var i=t.call(this)||this;return i.container=typeof n=="string"?document.getElementById(n):n,i.options=Xa({},i.getBaseOptions(),i.getDefaultOptions(),r),i.createG2(),i.bindEvents(),i}return e.prototype.getChartOptions=function(){return Dc(Dc({},lp(this.options,Tit)),{container:this.container})},e.prototype.getSpecOptions=function(){return this.type==="base"||this[Pit]?Dc(Dc({},this.options),this.getChartOptions()):this.options},e.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new Sit(this.getChartOptions()),this.container.setAttribute(B3,"Ant Design Charts")},e.prototype.bindEvents=function(){var n=this;this.chart&&this.chart.on("*",function(r){r!=null&&r.type&&n.emit(r.type,r)})},e.prototype.getBaseOptions=function(){return{type:"view",autoFit:!0}},e.prototype.getDefaultOptions=function(){},e.prototype.render=function(){var n=this;this.type!=="base"&&this.execAdaptor(),this.chart.options(this.getSpecOptions()),this.chart.render().then(function(){n.annotation=new Not(n.chart,n.options)}),this.bindSizeSensor()},e.prototype.update=function(n){this.updateOption(n)},e.prototype.updateOption=function(n){this.options=Xa({},this.options,n)},e.prototype.changeData=function(n){this.chart.changeData(n)},e.prototype.changeSize=function(n,r){this.chart.changeSize(n,r)},e.prototype.destroy=function(){this.chart.destroy(),this.off(),this.container.removeAttribute(B3)},e.prototype.execAdaptor=function(){var n=this.getSchemaAdaptor();n({chart:this.chart,options:this.options})},e.prototype.triggerResize=function(){this.chart.forceFit()},e.prototype.bindSizeSensor=function(){var n=this,r=this.options.autoFit,i=r===void 0?!0:r;i&&this.chart.on(Sn.AFTER_CHANGE_SIZE,function(){n.annotation.update()})},e}(Up),Uot=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qot=function(t){Uot(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="base",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"line"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return function(n){return n}},e}(vn);function Zot(){}var u1=Zot;function up(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}up.prototype=Wp(u1.prototype),up.prototype.constructor=up;var Iu=up,Kot=Yc&&new Yc,z3=Kot,Qot=z3?function(t){return z3.get(t)}:k3,G3=Qot,Jot={},W3=Jot,tst=Object.prototype,est=tst.hasOwnProperty;function nst(t){for(var e=t.name+"",n=W3[e],r=est.call(W3,e)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==t)return i.name}return e}var fp=nst,rst=4294967295;function dp(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=rst,this.__views__=[]}dp.prototype=Wp(u1.prototype),dp.prototype.constructor=dp;var f1=dp;function ist(t){if(t instanceof f1)return t.clone();var e=new Iu(t.__wrapped__,t.__chain__);return e.__actions__=Bp(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var ast=ist,ost=Object.prototype,sst=ost.hasOwnProperty;function hp(t){if(ci(t)&&!Ct(t)&&!(t instanceof f1)){if(t instanceof Iu)return t;if(sst.call(t,"__wrapped__"))return ast(t)}return new Iu(t)}hp.prototype=u1.prototype,hp.prototype.constructor=hp;var cst=hp;function lst(t){var e=fp(t),n=cst[e];if(typeof n!="function"||!(e in f1.prototype))return!1;if(t===n)return!0;var r=G3(n);return!!r&&t===r[0]}var H3=lst,ust="Expected a function",fst=8,dst=32,hst=128,pst=256;function vst(t){return l1(function(e){var n=e.length,r=n,i=Iu.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new TypeError(ust);if(i&&!o&&fp(a)=="wrapper")var o=new Iu([],!0)}for(r=o?r:n;++r<n;){a=e[r];var s=fp(a),c=s=="wrapper"?G3(a):void 0;c&&H3(c[0])&&c[1]==(hst|fst|dst|pst)&&!c[4].length&&c[9]==1?o=o[fp(c[0])].apply(o,c[3]):o=a.length==1&&H3(a)?o[s]():o.thru(a)}return function(){var l=arguments,u=l[0];if(o&&l.length==1&&Ct(u))return o.plant(u).value();for(var f=0,d=n?e[f].apply(this,l):u;++f<n;)d=e[f].call(this,d);return d}})}var gst=vst,yst=gst(),bn=yst,mst=function(t){var e=t.options,n=e.children,r=n===void 0?[]:n;return r.forEach(function(i){Object.keys(i).forEach(function(a){Ct(i[a])&&a!=="data"&&(i[a]=i[a].filter(function(o){return!o[Km]}))})}),e};function bst(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var xst=bst;function _st(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++r<i;)a[r]=t[r+e];return a}var Ost=_st;function wst(t,e){return e.length<2?t:Ju(t,Ost(e,0,-1))}var Sst=wst;function Mst(t,e){return e=Ns(e,t),t=Sst(t,e),t==null||delete t[Is(xst(e))]}var Est=Mst;function Ast(t){return r1(t)?void 0:t}var Tst=Ast,Pst=1,Cst=2,kst=4,Rst=l1(function(t,e){var n={};if(t==null)return n;var r=!1;e=Qu(e,function(a){return a=Ns(a,t),r||(r=a.length>1),a}),Ho(t,nb(t),n),r&&(n=hb(n,Pst|Cst|kst,Tst));for(var i=e.length;i--;)Est(n,e[i]);return n}),Y3=Rst;function Lst(t,e,n){return t==null?t:j3(t,e,n)}var Fe=Lst,V3=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))},Nst=function(t){var e=t.children,n=e===void 0?[]:e,r=Object.keys(Qm).concat(ap.map(function(i){return i.key}),t1);return r.forEach(function(i){delete t[i]}),n.forEach(function(i){Object.keys(i).forEach(function(a){r.includes(a)&&delete i[a]})}),Object.keys(t).forEach(function(i){V3(V3([],g3,!0),e1.map(function(a){return a.key}),!0).includes(i)||delete t[i]}),t},En=function(t){var e=mst(t),n=e.children,r=n===void 0?[]:n,i=Y3(e,[].concat(g3,ap.map(function(l){return l.key}))),a=function(l){var u;return(u=Cit.find(function(f){return f.key===l}))===null||u===void 0?void 0:u.callback},o=function(l,u,f){var d=a(u);d?d(l,u,f):l[u]=Xa({},l[u],f)},s=function(l){Object.keys(l).forEach(function(u){var f=ap.find(function(p){return p.key===u});if(f){var d=f.type,h=f.extend_keys;d?r.push(c(Xa({},lp(l,h),{type:d},l[u]))):Ct(l[u])&&l[u].forEach(function(p){r.push(c(p))})}})},c=function(l){return s(l),Object.keys(Qm).forEach(function(u){var f=Qm[u];if(l[u])if($(f)){var d=f.value,h=f.target,p=d(l[u]);o(l,h,p)}else Fe(l,f,l[u])}),l};return r.forEach(function(l){var u=Xa({},i,l);c(Xa(l,u))}),s(e),Nst(e),t},d1=function(){return d1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d1.apply(this,arguments)};function Ist(t){var e=t.options,n=e.stack,r=e.tooltip,i=e.xField;if(!n)return t;var a=ap.map(function(s){return s.type}).filter(function(s){return!!s}),o=!1;return a.forEach(function(s){e[s]&&(o=!0,Fe(e,[s,"stack"],d1({y1:"y"},typeof n=="object"?n:{})))}),o&&!Zm(r)&&!r&&Fe(e,"tooltip",{title:i,items:[{channel:"y"}]}),t}function pr(t){return bn(Ist)(t)}function jst(t){return bn(pr,En)(t)}var Dst=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fst=function(t){Dst(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="area",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"area"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return jst},e}(vn),ju=function(){return ju=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ju.apply(this,arguments)};function $3(t){var e=function(n){var r=n.options;vr(r,"children.length")>1&&Fe(r,"children",[{type:"interval"}]);var i=r.scale,a=r.markBackground,o=r.data,s=r.children,c=vr(i,"y.domain",[]);if(a&&c.length&&Ct(o)){var l="domainMax",u=o.map(function(f){var d;return ju(ju({},f),(d={},d[l]=c[c.length-1],d))});s.unshift(ju({type:"interval",data:u,yField:l,tooltip:!1,legend:!1,style:{fill:"#eee"},label:!1},a))}return n};return bn(e,pr,En)(t)}var Bst=function(){var t=function(e,n){return function(r){var i=e.fill,a=i===void 0?"#2888FF":i,o=e.stroke,s=e.fillOpacity,c=s===void 0?1:s,l=e.strokeOpacity,u=l===void 0?.2:l,f=e.pitch,d=f===void 0?8:f,h=r[0],p=r[1],v=r[2],g=r[3],y=(p[1]-h[1])/2,m=n.document,b=m.createElement("g",{}),_=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],[v[0]-d,h[1]+y],g],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u,inset:30}}),O=m.createElement("polygon",{style:{points:[[h[0]-d,h[1]+y],p,v,[v[0]-d,h[1]+y]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u}}),w=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],p,[h[0]+d,h[1]+y]],fill:a,fillOpacity:c-.2}});return b.appendChild(_),b.appendChild(O),b.appendChild(w),b}};m_("shape.interval.bar25D",t)},zst=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Bst();var Gst=function(t){zst(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Bar",n}return e.getDefaultOptions=function(){return{type:"view",coordinate:{transform:[{type:"transpose"}]},children:[{type:"interval"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0},elementHighlightByColor:{background:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $3},e}(vn),Wst=function(){var t=function(e,n){return function(r){var i=e.fill,a=i===void 0?"#2888FF":i,o=e.stroke,s=e.fillOpacity,c=s===void 0?1:s,l=e.strokeOpacity,u=l===void 0?.2:l,f=e.pitch,d=f===void 0?8:f,h=r[1][0]-r[0][0],p=h/2+r[0][0],v=n.document,g=v.createElement("g",{}),y=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]+d],[p,r[3][1]+d],[r[3][0],r[3][1]]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u,inset:30}}),m=v.createElement("polygon",{style:{points:[[p,r[1][1]+d],[r[1][0],r[1][1]],[r[2][0],r[2][1]],[p,r[2][1]+d]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u}}),b=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]-d],[r[1][0],r[1][1]],[p,r[1][1]+d]],fill:a,fillOpacity:c-.2}});return g.appendChild(m),g.appendChild(y),g.appendChild(b),g}};m_("shape.interval.column25D",t)},Hst=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Wst();var Yst=function(t){Hst(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="column",n}return e.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0},elementHighlightByColor:{background:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $3},e}(vn);function Vst(t){var e=function(n){var r=n.options,i=r.annotations,a=i===void 0?[]:i,o=r.children,s=o===void 0?[]:o,c=r.scale,l=!1;return vr(c,"y.key")||s.forEach(function(u,f){if(!vr(u,"scale.y.key")){var d="child".concat(f,"Scale");Fe(u,"scale.y.key",d);var h=u.annotations,p=h===void 0?[]:h;p.length>0&&(Fe(u,"scale.y.independent",!1),p.forEach(function(v){Fe(v,"scale.y.key",d)})),!l&&a.length>0&&vr(u,"scale.y.independent")===void 0&&(l=!0,Fe(u,"scale.y.independent",!1),a.forEach(function(v){Fe(v,"scale.y.key",d)}))}}),n};return bn(e,pr,En)(t)}var $st=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),X3=function(t){$st(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="DualAxes",n}return e.getDefaultOptions=function(){return{type:"view",axis:{y:{title:!1,tick:!1},x:{title:!1}},scale:{y:{independent:!0,nice:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Vst},e}(vn);function Xst(t){var e=function(a){var o=a.options,s=o.xField,c=o.colorField;return c||Fe(o,"colorField",s),a},n=function(a){var o=a.options,s=o.compareField,c=o.transform,l=o.isTransposed,u=l===void 0?!0:l,f=o.coordinate;return c||(s?Fe(o,"transform",[]):Fe(o,"transform",[{type:"symmetryY"}])),!f&&u&&Fe(o,"coordinate",{transform:[{type:"transpose"}]}),a},r=function(a){var o=a.options,s=o.compareField,c=o.seriesField,l=o.data,u=o.children,f=o.yField,d=o.isTransposed,h=d===void 0?!0:d;if(s||c){var p=Object.values(L3(l,function(v){return v[s||c]}));u[0].data=p[0],u.push({type:"interval",data:p[1],yField:function(v){return-v[f]}}),delete o.compareField,delete o.data}return c&&(Fe(o,"type","spaceFlex"),Fe(o,"ratio",[1,1]),Fe(o,"direction",h?"row":"col"),delete o.seriesField),a},i=function(a){var o=a.options,s=o.tooltip,c=o.xField,l=o.yField;return s||Fe(o,"tooltip",{title:!1,items:[function(u){return{name:u[c],value:u[l]}}]}),a};return bn(e,n,r,i,pr,En)(t)}var Ust=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qst=function(t){Ust(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="column",n}return e.getDefaultOptions=function(){return{type:"view",scale:{x:{padding:0}},animate:{enter:{type:"fadeIn"}},axis:!1,shapeField:"funnel",label:{position:"inside",transform:[{type:"contrastReverse"}]},children:[{type:"interval"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Xst},e}(vn);function Zst(t){return bn(pr,En)(t)}var Kst=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qst=function(t){Kst(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="line",n}return e.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"line"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Zst},e}(vn),Du=function(){return Du=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Du.apply(this,arguments)};function pp(t){var e=t.options,n=e.coordinate,r=n===void 0?{}:n;return Fe(t,["options","coordinate"],Du(Du(Du({},r),lp(e,t1)),{outerRadius:vr(e,"radius")})),t}function Jst(t){return bn(pp,En)(t)}var tct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ect=function(t){tct(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="pie",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"theta"},transform:[{type:"stackY",reverse:!0}],animate:{enter:{type:"waveIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Jst},e}(vn);function nct(t){return bn(pr,En)(t)}var rct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ict=function(t){rct(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="scatter",n}return e.getDefaultOptions=function(){return{axis:{y:{title:!1},x:{title:!1}},legend:{size:!1},children:[{type:"point"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return nct},e}(vn);function act(t){var e=function(n){return Fe(n,"options.coordinate",{type:vr(n,"options.coordinateType","polar")}),n};return bn(e,pp,En)(t)}var oct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sct=function(t){oct(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="radar",n}return e.getDefaultOptions=function(){return{axis:{x:{grid:!0,line:!0},y:{zIndex:1,title:!1,line:!0,nice:!0}},meta:{x:{padding:.5,align:0}},interaction:{tooltip:{style:{crosshairsLineDash:[4,4]}}},children:[{type:"line"}],coordinateType:"polar"}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return act},e}(vn);function cct(t,e){var n=-1,r=Za(t)?Array(t.length):[];return R3(t,function(i,a,o){r[++n]=e(i,a,o)}),r}var lct=cct;function uct(t,e){var n=Ct(t)?Qu:lct;return n(t,o1(e,3))}var Fc=uct,Ua=function(){return Ua=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ua.apply(this,arguments)},fct="__stock-range__",dct="trend",hct="up",pct="down";function vct(t){var e=function(r){var i=r.options,a=i.data,o=i.yField;return r.options.data=Fc(a,function(s){var c=s&&Ua({},s);if(Array.isArray(o)&&c){var l=o[0],u=o[1],f=o[2],d=o[3];c[dct]=c[l]<=c[u]?hct:pct,c[fct]=[c[l],c[u],c[f],c[d]]}return c}),r},n=function(r){var i=r.options,a=i.xField,o=i.yField,s=i.fallingFill,c=i.risingFill,l=o[0],u=o[1],f=o[2],d=o[3];return r.options.children=Fc(r.options.children,function(h,p){var v=p===0;return Ua(Ua({},h),{tooltip:{title:function(g){return g[a]instanceof Date?g[a].toLocaleString():g[a]},items:[{field:f},{field:d},{field:l},{field:u}]},encode:Ua(Ua({},h.encode||{}),{y:v?[f,d]:[l,u],color:function(g){return Math.sign(g[u]-g[l])}}),style:Ua(Ua({},h.style||{}),{lineWidth:v?1:10})})}),delete i.yField,r.options.legend={color:!1},s&&Fe(r,"options.scale.color.range[0]",s),c&&Fe(r,"options.scale.color.range[2]",c),r};return bn(e,n,En)(t)}var gct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yct=["#26a69a","#999999","#ef5350"],mct=function(t){gct(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="stock",n}return e.getDefaultOptions=function(){return{type:"view",scale:{color:{domain:[-1,0,1],range:yct},y:{nice:!0}},children:[{type:"link"},{type:"link"}],axis:{x:{title:!1,grid:!1},y:{title:!1,grid:!0,gridLineDash:null}},animate:{enter:{type:"scaleInY"}},interaction:{tooltip:{shared:!0,marker:!1,groupName:!1,crosshairs:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return vct},e}(vn);function bct(t){return bn(pr,En)(t)}var xct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_ct=function(t){xct(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyLine",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"line",axis:!1}],autoFit:!1,animate:{enter:{type:"growInX",duration:500}},padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return bct},e}(vn);function Oct(t){return bn(pr,En)(t)}var wct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sct=function(t){wct(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyArea",n}return e.getDefaultOptions=function(){return{type:"view",animate:{enter:{type:"growInX",duration:500}},children:[{type:"area",axis:!1}],autoFit:!1,padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Oct},e}(vn);function Mct(t){return bn(pr,En)(t)}var Ect=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Act=function(t){Ect(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyColumn",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval",axis:!1}],autoFit:!1,padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Mct},e}(vn),h1=function(){return h1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},h1.apply(this,arguments)};function Tct(t){var e=function(n){var r=n.options,i=r.percent,a=r.color,o=a===void 0?[]:a;if(!i)return n;var s={scale:{color:{range:o.length?o:[]}},data:[1,i]};return Object.assign(r,h1({},s)),n};return bn(e,pr,En)(t)}var Pct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cct=function(t){Pct(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyProgress",n}return e.getDefaultOptions=function(){return{type:"view",data:[],autoFit:!1,margin:0,padding:0,tooltip:!1,children:[{interaction:{tooltip:!1},coordinate:{transform:[{type:"transpose"}]},type:"interval",axis:!1,legend:!1,encode:{y:function(n){return n},color:function(n,r){return r}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Tct},e}(vn),p1=function(){return p1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},p1.apply(this,arguments)};function kct(t){var e=function(r){var i=r.options,a=i.radius,o=a===void 0?.8:a;return Fe(r,"options.coordinate.innerRadius",o),r},n=function(r){var i=r.options,a=i.percent,o=i.color,s=o===void 0?[]:o;if(!a)return r;var c={scale:{color:{range:s.length?s:[]}},data:[1,a]};return Object.assign(i,p1({},c)),r};return bn(e,n,pr,En)(t)}var Rct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lct=function(t){Rct(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyRing",n}return e.getDefaultOptions=function(){return{type:"view",data:[],autoFit:!1,margin:0,padding:0,coordinate:{type:"theta"},animate:{enter:{type:"waveIn"}},interaction:{tooltip:!1},tooltip:!1,children:[{type:"interval",axis:!1,legend:!1,encode:{y:function(n){return n},color:function(n,r){return r}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return kct},e}(vn);function Nct(t){return bn(pp,En)(t)}var Ict=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jct=function(t){Ict(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="rose",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"polar"},animate:{enter:{type:"waveIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Nct},e}(vn),v1="__start__",Bc="__end__",g1="__waterfall_value__",y1=function(){return y1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},y1.apply(this,arguments)},Dct=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))};function Fct(t){var e=function(r){var i=r.options,a=i.data,o=a===void 0?[]:a,s=i.yField;return o.length&&(o.reduce(function(c,l,u){var f;if(u===0||l.isTotal)l[v1]=0,l[Bc]=l[s],l[g1]=l[s];else{var d=(f=c[Bc])!==null&&f!==void 0?f:c[s];l[v1]=d,l[Bc]=d+l[s],l[g1]=c[Bc]}return l},[]),Object.assign(i,{yField:[v1,Bc]})),r},n=function(r){var i=r.options,a=i.data,o=a===void 0?[]:a,s=i.xField,c=i.children,l=i.linkStyle,u=Dct([],o,!0);return u.reduce(function(f,d,h){return h>0&&(d.x1=f[s],d.x2=d[s],d.y1=f[Bc]),d},[]),u.shift(),c.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:u,style:y1({stroke:"#697474"},l),label:!1,tooltip:!1}),r};return bn(e,n,pr,En)(t)}var Bct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zct=function(t){Bct(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="waterfall",n}return e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:g1,valueFormatter:"~s",name:"value"},axis:{y:{title:null,labelFormatter:"~s"},x:{title:null}},children:[{type:"interval",interaction:{elementHighlightByColor:{background:!0}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Fct},e}(vn),Gct="[object Number]";function Wct(t){return typeof t=="number"||ci(t)&&T(t)==Gct}var zc=Wct,Hct=Object.prototype,Yct=Hct.hasOwnProperty,Vct=S3(function(t,e){if($u(e)||Za(e)){Ho(e,Go(e),t);return}for(var n in e)Yct.call(e,n)&&Zu(t,n,e[n])}),U3=Vct,$ct=/\s/;function Xct(t){for(var e=t.length;e--&&$ct.test(t.charAt(e)););return e}var Uct=Xct,qct=/^\s+/;function Zct(t){return t&&t.slice(0,Uct(t)+1).replace(qct,"")}var Kct=Zct,q3=0/0,Qct=/^[-+]0x[0-9a-f]+$/i,Jct=/^0b[01]+$/i,tlt=/^0o[0-7]+$/i,elt=parseInt;function nlt(t){if(typeof t=="number")return t;if(Xc(t))return q3;if($(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=$(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Kct(t);var n=Jct.test(t);return n||tlt.test(t)?elt(t.slice(2),n?2:8):Qct.test(t)?q3:+t}var Z3=nlt,K3=1/0,rlt=17976931348623157e292;function ilt(t){if(!t)return t===0?t:0;if(t=Z3(t),t===K3||t===-K3){var e=t<0?-1:1;return e*rlt}return t===t?t:0}var alt=ilt;function olt(t){var e=alt(t),n=e%1;return e===e?n?e-n:e:0}var Q3=olt,slt=at.isFinite,clt=Math.min;function llt(t){var e=Math[t];return function(n,r){if(n=Z3(n),r=r==null?0:clt(Q3(r),292),r&&slt(n)){var i=($p(n)+"e").split("e"),a=e(i[0]+"e"+(+i[1]+r));return i=($p(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return e(n)}}var ult=llt,flt=ult("ceil"),dlt=flt,hlt=0/0;function plt(t){return typeof t=="number"?t:Xc(t)?hlt:+t}var J3=plt;function vlt(t,e){return function(n,r){var i;if(n===void 0&&r===void 0)return e;if(n!==void 0&&(i=n),r!==void 0){if(i===void 0)return r;typeof n=="string"||typeof r=="string"?(n=Vp(n),r=Vp(r)):(n=J3(n),r=J3(r)),i=t(n,r)}return i}}var glt=vlt,ylt=glt(function(t,e){return t/e},1),mlt=ylt;function blt(t){var e=function(n){var r=n.options,i=r.data,a=r.binNumber,o=r.binWidth,s=r.children,c=r.channel,l=c===void 0?"count":c,u=vr(s,"[0].transform[0]",{});return zc(o)?(U3(u,{thresholds:dlt(mlt(i.length,o)),y:l}),n):(zc(a)&&U3(u,{thresholds:a,y:l}),n)};return bn(e,pr,En)(t)}var xlt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_lt=function(t){xlt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Histogram",n}return e.getDefaultOptions=function(){return{type:"view",autoFit:!0,axis:{y:{title:!1},x:{title:!1}},children:[{type:"rect",transform:[{type:"binX",y:"count"}],interaction:{elementHighlightByColor:{background:!0}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return blt},e}(vn);function Olt(t){var e=function(r){var i=r.options,a=i.tooltip,o=i.colorField,s=i.sizeField;return a.field||(a.field=o||s),r},n=function(r){var i=r.options,a=i.mark,o=i.children;return a&&(o[0].type=a),r};return bn(e,n,pr,En)(t)}var wlt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Slt=function(t){wlt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="heatmap",n}return e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{valueFormatter:"~s"},axis:{y:{title:null,grid:!0},x:{title:null,grid:!0}},children:[{type:"point",interaction:{elementHighlightByColor:{background:!0}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Olt},e}(vn);function Mlt(t){var e=function(n){var r=n.options.boxType,i=r===void 0?"box":r;return n.options.children[0].type=i,n};return bn(e,pr,En)(t)}var Elt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Alt=function(t){Elt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="box",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"box"}],axis:{y:{title:!1},x:{title:!1}},tooltip:{items:[{name:"min",channel:"y"},{name:"q1",channel:"y1"},{name:"q2",channel:"y2"},{name:"q3",channel:"y3"},{name:"max",channel:"y4"}]}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Mlt},e}(vn);function Tlt(t){return bn(pr,En)(t)}var Plt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Clt=function(t){Plt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="sankey",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"sankey"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Tlt},e}(vn);function klt(t){var e=t.options.layout,n=e===void 0?"horizontal":e;return t.options.coordinate.transform=n!=="horizontal"?void 0:[{type:"transpose"}],t}function Rlt(t){klt(t);var e=t.options.layout,n=e===void 0?"horizontal":e;return t.options.children.forEach(function(r){var i;!((i=r==null?void 0:r.coordinate)===null||i===void 0)&&i.transform&&(r.coordinate.transform=n!=="horizontal"?void 0:[{type:"transpose"}])}),t}function Llt(t){return t==null}var Nlt=Llt,Ilt="[object String]";function jlt(t){return typeof t=="string"||!Ct(t)&&ci(t)&&T(t)==Ilt}var tR=jlt;function Dlt(t,e){return Qu(e,function(n){return t[n]})}var Flt=Dlt;function Blt(t){return t==null?[]:Flt(t,Go(t))}var zlt=Blt,Glt=Math.max;function Wlt(t,e,n,r){t=Za(t)?t:zlt(t),n=n&&!r?Q3(n):0;var i=t.length;return n<0&&(n=Glt(i+n,0)),tR(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&C3(t,e,n)>-1}var Hlt=Wlt,ta=function(){return ta=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ta.apply(this,arguments)},vp=["#f0efff","#5B8FF9","#3D76DD"];function m1(t,e,n,r){r===void 0&&(r=!0);var i=0,a=!1,o=Fc(t,function(s){var c,l,u=vr(s,[e]);if(Nlt(u))return[];if(tR(u)){var f=Number(u);return isNaN(f)?[]:(c={},c[n]=s[n],c[e]=f,c)}return Ct(u)?(a=!0,i=Math.max(i,u.length),Fc(r?u.sort(function(d,h){return h-d}):u,function(d,h){var p;return p={},p[n]=s[n],p[e]=d,p.index=h,p})):(i=Math.max(1,i),l={},l[n]=s[n],l[e]=u,l)}).flat();return a?[o.map(function(s){return ta({index:0},s)}),i]:[o,i]}function b1(t,e){return new Array(t).fill("").map(function(n,r){return Ct(e)?e[r%e.length]:e})}function Ylt(t){var e=function(i){var a=i.options,o=a.color,s=a.rangeField,c=s===void 0?"ranges":s,l=a.measureField,u=l===void 0?"measures":l,f=a.targetField,d=f===void 0?"targets":f,h=a.xField,p=h===void 0?"title":h,v=a.mapField,g=a.data,y=m1(g,c,p),m=y[0],b=y[1],_=m1(g,u,p,!1),O=_[0],w=_[1],M=m1(g,d,p,!1),E=M[0],A=M[1],P=vr(o,[c],vp[0]),C=vr(o,[u],vp[1]),D=vr(o,[d],vp[2]),N=[b1(b,P),b1(w,C),b1(A,D)].flat();return i.options.children=Fc(i.options.children,function(k,R){var I=[m,O,E][R],F=[c,u,d][R];return ta(ta({},k),{data:I,encode:ta(ta({},k.encode||{}),{x:p,y:F,color:function(B){var z=B.index,Y=zc(z)?"".concat(F,"_").concat(z):F;return v?vr(v,[F,z],Y):Y}}),style:ta(ta({},k.style||{}),{zIndex:function(B){return-B[F]}}),labels:R!==0?Fc(k.labels,function(B){return ta(ta({},B),{text:F})}):void 0})}),i.options.scale.color.range=N,i.options.legend.color.itemMarker=function(k){return v&&Hlt(v==null?void 0:v[d],k)||(k==null?void 0:k.replace(/\_\d$/,""))===d?"line":"square"},i},n=function(i){var a=i.options.layout,o=a===void 0?"horizontal":a;return o!=="horizontal"&&Fe(i,"options.children[2].shapeField","hyphen"),i},r=function(i){var a=i.options,o=a.range,s=o===void 0?{}:o,c=a.measure,l=c===void 0?{}:c,u=a.target,f=u===void 0?{}:u,d=a.children;return i.options.children=[s,l,f].map(function(h,p){return Xa(d[p],h)}),i};return bn(e,n,r,Rlt,En)(t)}var Vlt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$lt=function(t){Vlt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="bullet",n}return e.getDefaultOptions=function(){return{type:"view",scale:{color:{range:vp}},legend:{color:{itemMarker:function(n){return n==="target"?"line":"square"}}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval",style:{maxWidth:30},axis:{y:{grid:!0,gridLineWidth:2}}},{type:"interval",style:{maxWidth:20},transform:[{type:"stackY"}]},{type:"point",encode:{size:8,shape:"line"}}],interaction:{tooltip:{shared:!0}},coordinate:{transform:[{type:"transpose"}]}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Ylt},e}(vn);function Xlt(t){var e=function(n){var r=n.options.data;return n.options.data={value:r},n};return bn(e,pr,En)(t)}var Ult=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qlt=function(t){Ult(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Gauge",n}return e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"gauge"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Xlt},e}(vn);function Zlt(t){var e=function(n){var r=n.options.percent;return zc(r)&&Fe(n,"options.data",r),n};return bn(e,pr,En)(t)}var Klt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qlt=function(t){Klt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Liquid",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"liquid"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Zlt},e}(vn);function Jlt(t){return bn(pr,En)(t)}var tut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eut=function(t){tut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="WordCloud",n}return e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"wordCloud"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Jlt},e}(vn);function nut(t){var e=function(n){var r=n.options,i=r.data;return i&&Fe(r,"data",{value:i}),n};return bn(e,pr,En)(t)}var rut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),iut=function(t){rut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="treemap",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"treemap"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return nut},e}(vn),Lo=function(){return Lo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Lo.apply(this,arguments)};function aut(t){var e=function(i){var a=i.options,o=a.startAngle,s=a.maxAngle,c=a.coordinate,l=a.radius,u=a.innerRadius,f=zc(o)?o/(2*Math.PI)*360:-90,d=zc(s)?(Number(s)+f)/180*Math.PI:Math.PI;return Fe(i,["options","coordinate"],Lo(Lo(Lo({},c),lp(a.coordinate,t1)),{endAngle:d,outerRadius:l,innerRadius:u,startAngle:o!=null?o:-Math.PI/2})),i},n=function(i){var a=i.options,o=a.tooltip,s=a.xField,c=a.yField;return o||Fe(a,"tooltip",{title:!1,items:[function(l){return{name:l[s],value:l[c]}}]}),i},r=function(i){var a=i.options,o=a.markBackground,s=a.children,c=a.scale,l=a.coordinate,u=a.xField,f=vr(c,"y.domain",[]);return o&&s.unshift(Lo({type:"interval",xField:u,yField:f[f.length-1],colorField:o.color,scale:{color:{type:"identity"}},style:{fillOpacity:o.opacity,fill:o.color?void 0:"#e0e4ee"},coordinate:Lo(Lo({},l),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},o)),i};return bn(e,n,r,pr,En)(t)}var out=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sut=function(t){out(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="radial",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"radial",innerRadius:.1,outerRadius:1,endAngle:Math.PI},animate:{enter:{type:"waveIn",duration:800}},axis:{y:{nice:!0,labelAutoHide:!0,labelAutoRotate:!1},x:{title:!1,nice:!0,labelAutoRotate:!1,labelAutoHide:{type:"equidistance",cfg:{minGap:6}}}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return aut},e}(vn);function cut(t){return bn(En)(t)}var lut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),uut=function(t){lut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="CirclePacking",n}return e.getDefaultOptions=function(){return{legend:!1,type:"view",children:[{type:"pack"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return cut},e}(vn),gp=function(){return gp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},gp.apply(this,arguments)};function fut(t){var e=function(n){var r=n.options,i=r.xField,a=r.yField,o=r.seriesField,s=r.children,c=s==null?void 0:s.map(function(l){return gp(gp({},l),{xField:i,yField:a,seriesField:o,colorField:o,data:l.type==="density"?{transform:[{type:"kde",field:a,groupBy:[i,o]}]}:l.data})}).filter(function(l){return r.violinType!=="density"||l.type==="density"});return Fe(r,"children",c),r.violinType==="polar"&&Fe(r,"coordinate",{type:"polar"}),Fe(r,"violinType",void 0),n};return bn(e,pr,En)(t)}var dut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hut=function(t){dut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="violin",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"density",sizeField:"size",tooltip:!1},{type:"boxplot",shapeField:"violin",style:{opacity:.5,point:!1}}],animate:{enter:{type:"fadeIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return fut},e}(vn),Fu=function(){return Fu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Fu.apply(this,arguments)},put=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))};function vut(t){var e=function(a){var o=a.options,s=o.yField,c=o.children;return c.forEach(function(l,u){Fe(l,"yField",s[u])}),a},n=function(a){var o=a.options,s=o.yField,c=o.children,l=o.data;if(r1(l))return a;var u=Ct(vr(l,[0]))?l:[l,l];return c.forEach(function(f,d){Fe(f,"data",put([],u[d].map(function(h){return Fu({groupKey:s[d]},h)}),!0))}),a},r=function(a){var o=a.options,s=o.yField,c=s[0],l=s[1],u=o.tooltip;return u||Fe(o,"tooltip",{items:[{field:c,value:c},{field:l,value:l}]}),a},i=function(a){var o=a.options,s=o.children,c=o.layout,l=o.coordinate.transform,u=o.paddingBottom,f=u===void 0?I3:u,d=o.paddingLeft,h=d===void 0?I3:d,p=o.axis;Fe(o,"axisText",Fu(Fu({},(p==null?void 0:p.x)||{}),{layout:c}));var v=s[0],g=s[1];if(c==="vertical")Fe(o,"direction","col"),Fe(o,"paddingLeft",h),Fe(o,"coordinate.transform",l.filter(function(O){return O.type!=="transpose"})),Fe(v,"paddingBottom",N3),Fe(g,"paddingTop",N3),Fe(g,"axis",{x:{position:"top"}}),Fe(g,"scale",{y:{range:[0,1]}});else{Fe(o,"paddingBottom",f),Fe(v,"scale",{y:{range:[0,1]}});var y=v.paddingRight,m=y===void 0?c1:y,b=g.paddingLeft,_=b===void 0?c1:b;Fe(v,"paddingRight",m),Fe(v,"axis",{x:{position:"right"}}),Fe(g,"paddingLeft",_)}return a};return bn(e,n,r,i,pr,En)(t)}var gut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yut=function(t){gut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="BidirectionalBar",n}return e.getDefaultOptions=function(){return{type:"spaceFlex",coordinate:{transform:[{type:"transpose"}]},scale:{y:{nice:!0}},direction:"row",layout:"horizontal",legend:!1,axis:{y:{title:!1},x:{title:!1,label:!1}},children:[{type:"interval"},{type:"interval"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return vut},e}(vn),Es;(function(t){t.color="key",t.d="path"})(Es||(Es={}));function mut(t){var e=function(n){var r=n.options,i=r.data,a=r.setsField,o=r.sizeField;return Ct(i)&&(Fe(r,"data",{type:"inline",value:i,transform:[{type:"venn",sets:a,size:o,as:[Es.color,Es.d]}]}),Fe(r,"colorField",a),Fe(r,["children","0","encode","d"],Es.d)),Fe(n,"options",Y3(r,["sizeField","setsField"])),n};return bn(e,En)(t)}var but=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),xut=function(t){but(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="venn",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"path"}],legend:{color:{itemMarker:"circle"}},encode:{color:Es.color,d:Es.d}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return mut},e}(vn);function _ut(t){var e=function(n){return n};return bn(e,pp,En)(t)}var Out=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wut=function(t){Out(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Sunburst",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"sunburst"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return _ut},e}(vn),Sut={Base:qot,Line:Qst,Column:Yst,Pie:ect,Area:Fst,Bar:Gst,DualAxes:X3,Funnel:qst,Scatter:ict,Radar:sct,Rose:jct,Stock:mct,TinyLine:_ct,TinyArea:Sct,TinyColumn:Act,TinyProgress:Cct,TinyRing:Lct,Waterfall:zct,Histogram:_lt,Heatmap:Slt,Box:Alt,Sankey:Clt,Bullet:$lt,Gauge:qlt,Liquid:Qlt,WordCloud:eut,Treemap:iut,RadialBar:sut,CirclePacking:uut,Violin:hut,BidirectionalBar:yut,Venn:xut,Mix:X3,Sunburst:wut},x1=function(){return x1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},x1.apply(this,arguments)},eR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Mut=(0,te.forwardRef)(function(t,e){var n=t.chartType,r=n===void 0?"Base":n,i=eR(t,["chartType"]),a=i.containerStyle,o=a===void 0?{height:"inherit"}:a,s=i.containerAttributes,c=s===void 0?{}:s,l=i.className,u=i.loading,f=i.loadingTemplate,d=i.errorTemplate,h=eR(i,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate"]),p=$I(Sut[r],h),v=p.chart,g=p.container;return(0,te.useImperativeHandle)(e,function(){return v.current}),te.createElement(fn,{errorTemplate:d},u&&te.createElement(Fn,{loadingTemplate:f}),te.createElement("div",x1({className:l,style:o,ref:g},c)))})},16290:function(Ye,Ve){(function(mt,kt){kt(Ve)})(this,function(mt){"use strict";function kt(L){var j=typeof Symbol=="function"&&Symbol.iterator,G=j&&L[j],V=0;if(G)return G.call(L);if(L&&typeof L.length=="number")return{next:function(){return{value:(L=L&&V>=L.length?void 0:L)&&L[V++],done:!L}}};throw new TypeError(j?"Object is not iterable.":"Symbol.iterator is not defined.")}function Rt(L,j){var G=typeof Symbol=="function"&&L[Symbol.iterator];if(!G)return L;var V,nt,it=G.call(L),q=[];try{for(;(j===void 0||0<j--)&&!(V=it.next()).done;)q.push(V.value)}catch(Z){nt={error:Z}}finally{try{V&&!V.done&&(G=it.return)&&G.call(it)}finally{if(nt)throw nt.error}}return q}function be(L,j,G){if(G||arguments.length===2)for(var V,nt=0,it=j.length;nt<it;nt++)!V&&nt in j||((V=V||Array.prototype.slice.call(j,0,nt))[nt]=j[nt]);return L.concat(V||Array.prototype.slice.call(j))}function We(L){return ve(L,"Function")}var te={}.toString,ve=function(L,j){return te.call(L)==="[object "+j+"]"},re=function(L){return Array.isArray?Array.isArray(L):ve(L,"Array")},Gt=function(L){if(typeof(j=L)!="object"||j===null||!ve(L,"Object"))return!1;var j;if(Object.getPrototypeOf(L)===null)return!0;for(var G=L;Object.getPrototypeOf(G)!==null;)G=Object.getPrototypeOf(G);return Object.getPrototypeOf(L)===G},dt=function(L){return ve(L,"Number")},he=Object.values?function(L){return Object.values(L)}:function(L){var j,G=[],V=L,nt=function(ft,pt){We(L)&&pt==="prototype"||G.push(ft)};if(V){if(re(V))for(var it=0,q=V.length;it<q&&nt(V[it],it)!==!1;it++);else if(j=typeof V,V!==null&&j=="object"||j=="function"){for(var Z in V)if(V.hasOwnProperty(Z)&&nt(V[Z],Z)===!1)break}}return G},Zt=5;function ue(L){for(var j=[],G=1;G<arguments.length;G++)j[G-1]=arguments[G];for(var V=0;V<j.length;V+=1)(function nt(it,q,Z,ft){for(var pt in Z=Z||0,ft=ft||Zt,q){var Kt;q.hasOwnProperty(pt)&&((Kt=q[pt])!==null&&Gt(Kt)?(Gt(it[pt])||(it[pt]={}),Z<ft?nt(it[pt],Kt,Z+1,ft):it[pt]=q[pt]):re(Kt)?(it[pt]=[],it[pt]=it[pt].concat(Kt)):Kt!==void 0&&(it[pt]=Kt))}})(L,j[V]);return L}function ie(L){return L}(function(L,j){var G;if(We(L))return(G=function(){for(var V=[],nt=0;nt<arguments.length;nt++)V[nt]=arguments[nt];var it,q=j?j.apply(this,V):V[0],Z=G.cache;return Z.has(q)?Z.get(q):(it=L.apply(this,V),Z.set(q,it),it)}).cache=new Map;throw new TypeError("Expected a function")})(function(L,q){var G=(q=q===void 0?{}:q).fontSize,V=q.fontFamily,nt=q.fontWeight,it=q.fontStyle,q=q.fontVariant;return(jt=jt||document.createElement("canvas").getContext("2d")).font=[it,q,nt,G+"px",V].join(" "),jt.measureText(ve(L,"String")?L:"").width},function(L,j){return function(){for(var G=0,V=0,nt=arguments.length;V<nt;V++)G+=arguments[V].length;for(var it=Array(G),q=0,V=0;V<nt;V++)for(var Z=arguments[V],ft=0,pt=Z.length;ft<pt;ft++,q++)it[q]=Z[ft];return it}([L],he(j=j===void 0?{}:j)).join("")});var jt,Lt=typeof Float32Array!="undefined"?Float32Array:Array;function At(){var L=new Lt(9);return Lt!=Float32Array&&(L[1]=0,L[2]=0,L[3]=0,L[5]=0,L[6]=0,L[7]=0),L[0]=1,L[4]=1,L[8]=1,L}Math.hypot||(Math.hypot=function(){for(var L=0,j=arguments.length;j--;)L+=arguments[j]*arguments[j];return Math.sqrt(L)});var Dt=function(L,ee,pe){var V=ee[0],nt=ee[1],it=ee[2],q=ee[3],Z=ee[4],ft=ee[5],pt=ee[6],Kt=ee[7],ee=ee[8],me=pe[0],Jt=pe[1],ge=pe[2],de=pe[3],Vt=pe[4],Pe=pe[5],xe=pe[6],Ce=pe[7],pe=pe[8];return L[0]=me*V+Jt*q+ge*pt,L[1]=me*nt+Jt*Z+ge*Kt,L[2]=me*it+Jt*ft+ge*ee,L[3]=de*V+Vt*q+Pe*pt,L[4]=de*nt+Vt*Z+Pe*Kt,L[5]=de*it+Vt*ft+Pe*ee,L[6]=xe*V+Ce*q+pe*pt,L[7]=xe*nt+Ce*Z+pe*Kt,L[8]=xe*it+Ce*ft+pe*ee,L};function Se(){var L=new Lt(16);return Lt!=Float32Array&&(L[1]=0,L[2]=0,L[3]=0,L[4]=0,L[6]=0,L[7]=0,L[8]=0,L[9]=0,L[11]=0,L[12]=0,L[13]=0,L[14]=0),L[0]=1,L[5]=1,L[10]=1,L[15]=1,L}var ke=function(L,xe,G){var V=xe[0],nt=xe[1],it=xe[2],q=xe[3],Z=xe[4],ft=xe[5],pt=xe[6],Kt=xe[7],ee=xe[8],me=xe[9],Jt=xe[10],ge=xe[11],de=xe[12],Vt=xe[13],Pe=xe[14],xe=xe[15],Ce=G[0],pe=G[1],Te=G[2],tn=G[3];return L[0]=Ce*V+pe*Z+Te*ee+tn*de,L[1]=Ce*nt+pe*ft+Te*me+tn*Vt,L[2]=Ce*it+pe*pt+Te*Jt+tn*Pe,L[3]=Ce*q+pe*Kt+Te*ge+tn*xe,Ce=G[4],pe=G[5],Te=G[6],tn=G[7],L[4]=Ce*V+pe*Z+Te*ee+tn*de,L[5]=Ce*nt+pe*ft+Te*me+tn*Vt,L[6]=Ce*it+pe*pt+Te*Jt+tn*Pe,L[7]=Ce*q+pe*Kt+Te*ge+tn*xe,Ce=G[8],pe=G[9],Te=G[10],tn=G[11],L[8]=Ce*V+pe*Z+Te*ee+tn*de,L[9]=Ce*nt+pe*ft+Te*me+tn*Vt,L[10]=Ce*it+pe*pt+Te*Jt+tn*Pe,L[11]=Ce*q+pe*Kt+Te*ge+tn*xe,Ce=G[12],pe=G[13],Te=G[14],tn=G[15],L[12]=Ce*V+pe*Z+Te*ee+tn*de,L[13]=Ce*nt+pe*ft+Te*me+tn*Vt,L[14]=Ce*it+pe*pt+Te*Jt+tn*Pe,L[15]=Ce*q+pe*Kt+Te*ge+tn*xe,L};function Je(L){for(var j=[],G=1;G<arguments.length;G++)j[G-1]=arguments[G];return L?j.reduce(function(V,nt){return function(it){return nt(V(it))}},L):ie}function $e(L){return L instanceof Float32Array||L instanceof Array}function Ze(L,j,G){for(;L<j;)L+=2*Math.PI;for(;G<L;)L-=2*Math.PI;return L}Ae=new Lt(3),Lt!=Float32Array&&(Ae[0]=0,Ae[1]=0,Ae[2]=0),Ae=new Lt(4),Lt!=Float32Array&&(Ae[0]=0,Ae[1]=0,Ae[2]=0,Ae[3]=0);function un(q,j,G,V,nt){var it=(q=Rt(q,2))[0],q=q[1],Z=At();return it=[it,q],(q=Z)[0]=1,q[1]=0,q[2]=0,q[3]=0,q[4]=1,q[5]=0,q[6]=it[0],q[7]=it[1],q[8]=1,q}function Xe(L,...j){return j.reduce((G,V)=>nt=>G(V(nt)),L)}function ze(L,j){return j-L?G=>(G-L)/(j-L):G=>.5}const ln=Math.sqrt(50),Oe=Math.sqrt(10),Me=Math.sqrt(2);function gn(L,j,G){return j=(j-L)/Math.max(0,G),L=Math.floor(Math.log(j)/Math.LN10),G=j/wr(10,L),0<=L?(G>=ln?10:G>=Oe?5:G>=Me?2:1)*wr(10,L):-wr(10,-L)/(G>=ln?10:G>=Oe?5:G>=Me?2:1)}const Fn=(L,j,G=5)=>{L=[L,j];let V=0,nt=L.length-1,it=L[V],q=L[nt],Z;return q<it&&([it,q]=[q,it],[V,nt]=[nt,V]),0<(Z=gn(it,q,G))?(it=Math.floor(it/Z)*Z,q=Math.ceil(q/Z)*Z,Z=gn(it,q,G)):Z<0&&(it=Math.ceil(it*Z)/Z,q=Math.floor(q*Z)/Z,Z=gn(it,q,G)),0<Z?(L[V]=Math.floor(it/Z)*Z,L[nt]=Math.ceil(q/Z)*Z):Z<0&&(L[V]=Math.ceil(it*Z)/Z,L[nt]=Math.floor(q*Z)/Z),L};function Jn(L){return L!=null&&!Number.isNaN(L)}function fn(L,j){return G=>{G.prototype.rescale=function(){this.initRange(),this.nice();var[V]=this.chooseTransforms();this.composeOutput(V,this.chooseClamp(V))},G.prototype.initRange=function(){var V=this.options.interpolator;this.options.range=L(V)},G.prototype.composeOutput=function(V,nt){var it,{domain:Z,interpolator:q,round:ft}=this.getOptions(),Z=j(Z.map(V)),ft=ft?(it=q,pt=>(pt=it(pt),dt(pt)?Math.round(pt):pt)):q;this.output=Xe(ft,Z,nt,V)},G.prototype.invert=void 0}}var yn,Ae={exports:{}},qe={exports:{}},vt=function(L){return!(!L||typeof L=="string")&&(L instanceof Array||Array.isArray(L)||0<=L.length&&(L.splice instanceof Function||Object.getOwnPropertyDescriptor(L,L.length-1)&&L.constructor.name!=="String"))},Yt=Array.prototype.concat,et=Array.prototype.slice,at=qe.exports=function(L){for(var j=[],G=0,V=L.length;G<V;G++){var nt=L[G];vt(nt)?j=Yt.call(j,et.call(nt)):j.push(nt)}return j},Ot=(at.wrap=function(L){return function(){return L(at(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),gt=qe.exports,$t=Object.hasOwnProperty,Ft=Object.create(null);for(yn in Ot)$t.call(Ot,yn)&&(Ft[Ot[yn]]=yn);var ae=Ae.exports={to:{},get:{}};function X(L,j,G){return Math.min(Math.max(j,L),G)}function lt(L){return L=Math.round(L).toString(16).toUpperCase(),L.length<2?"0"+L:L}ae.get=function(L){var j,G;switch(L.substring(0,3).toLowerCase()){case"hsl":j=ae.get.hsl(L),G="hsl";break;case"hwb":j=ae.get.hwb(L),G="hwb";break;default:j=ae.get.rgb(L),G="rgb"}return j?{model:G,value:j}:null},ae.get.rgb=function(L){if(!L)return null;var j,G,V,nt=[0,0,0,1];if(j=L.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(V=j[2],j=j[1],G=0;G<3;G++){var it=2*G;nt[G]=parseInt(j.slice(it,2+it),16)}V&&(nt[3]=parseInt(V,16)/255)}else if(j=L.match(/^#([a-f0-9]{3,4})$/i)){for(V=(j=j[1])[3],G=0;G<3;G++)nt[G]=parseInt(j[G]+j[G],16);V&&(nt[3]=parseInt(V+V,16)/255)}else{if(j=L.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(G=0;G<3;G++)nt[G]=parseInt(j[G+1],0);else{if(!(j=L.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(j=L.match(/^(\w+)$/))?j[1]==="transparent"?[0,0,0,0]:$t.call(Ot,j[1])?((nt=Ot[j[1]])[3]=1,nt):null:null;for(G=0;G<3;G++)nt[G]=Math.round(2.55*parseFloat(j[G+1]))}j[4]&&(j[5]?nt[3]=.01*parseFloat(j[4]):nt[3]=parseFloat(j[4]))}for(G=0;G<3;G++)nt[G]=X(nt[G],0,255);return nt[3]=X(nt[3],0,1),nt},ae.get.hsl=function(L){var j;return(L=L&&L.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(j=parseFloat(L[4]),[(parseFloat(L[1])%360+360)%360,X(parseFloat(L[2]),0,100),X(parseFloat(L[3]),0,100),X(isNaN(j)?1:j,0,1)]):null},ae.get.hwb=function(L){var j;return(L=L&&L.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(j=parseFloat(L[4]),[(parseFloat(L[1])%360+360)%360,X(parseFloat(L[2]),0,100),X(parseFloat(L[3]),0,100),X(isNaN(j)?1:j,0,1)]):null},ae.to.hex=function(){var L=gt(arguments);return"#"+lt(L[0])+lt(L[1])+lt(L[2])+(L[3]<1?lt(Math.round(255*L[3])):"")},ae.to.rgb=function(){var L=gt(arguments);return L.length<4||L[3]===1?"rgb("+Math.round(L[0])+", "+Math.round(L[1])+", "+Math.round(L[2])+")":"rgba("+Math.round(L[0])+", "+Math.round(L[1])+", "+Math.round(L[2])+", "+L[3]+")"},ae.to.rgb.percent=function(){var L=gt(arguments),j=Math.round(L[0]/255*100),G=Math.round(L[1]/255*100),V=Math.round(L[2]/255*100);return L.length<4||L[3]===1?"rgb("+j+"%, "+G+"%, "+V+"%)":"rgba("+j+"%, "+G+"%, "+V+"%, "+L[3]+")"},ae.to.hsl=function(){var L=gt(arguments);return L.length<4||L[3]===1?"hsl("+L[0]+", "+L[1]+"%, "+L[2]+"%)":"hsla("+L[0]+", "+L[1]+"%, "+L[2]+"%, "+L[3]+")"},ae.to.hwb=function(){var L=gt(arguments),j="";return 4<=L.length&&L[3]!==1&&(j=", "+L[3]),"hwb("+L[0]+", "+L[1]+"%, "+L[2]+"%"+j+")"},ae.to.keyword=function(L){return Ft[L.slice(0,3)]};var ht=Ae.exports;function Ut(L,j,G){let V=G;return V<0&&(V+=1),1<V&&--V,V<1/6?L+6*(j-L)*V:V<.5?j:V<2/3?L+(j-L)*(2/3-V)*6:L}function Q(nt){var j,G,V,nt=ht.get(nt);return nt?({model:nt,value:j}=nt,nt==="rgb"?j:nt==="hsl"?(j=(nt=j)[0]/360,G=nt[1]/100,V=nt[2]/100,nt=nt[3],G==0?[255*V,255*V,255*V,nt]:[255*Ut(G=2*V-(V=V<.5?V*(1+G):V+G-V*G),V,j+1/3),255*Ut(G,V,j),255*Ut(G,V,j-1/3),nt]):null):null}const st=(L,j)=>G=>L*(1-G)+j*G,xt=(L,j)=>{if(typeof L=="number"&&typeof j=="number")return st(L,j);if(typeof L!="string"||typeof j!="string")return()=>L;{var G=L,V=j;const nt=Q(G),it=Q(V);return nt===null||it===null?nt?()=>G:()=>V:q=>{var Z=new Array(4);for(let ge=0;ge<4;ge+=1){var ft=nt[ge],pt=it[ge];Z[ge]=ft*(1-q)+pt*q}var[Kt,ee,me,Jt]=Z;return`rgba(${Math.round(Kt)}, ${Math.round(ee)}, ${Math.round(me)}, ${Jt})`}}},H=(L,j)=>{const G=st(L,j);return V=>Math.round(G(V))};function K({map:L,initKey:j},G){return j=j(G),L.has(j)?L.get(j):G}function ut(L){return typeof L=="object"?L.valueOf():L}class x extends Map{constructor(j){if(super(),this.map=new Map,this.initKey=ut,j!==null)for(var[G,V]of j)this.set(G,V)}get(j){return super.get(K({map:this.map,initKey:this.initKey},j))}has(j){return super.has(K({map:this.map,initKey:this.initKey},j))}set(j,G){return super.set(([{map:j,initKey:V},nt]=[{map:this.map,initKey:this.initKey},j],V=V(nt),j.has(V)?j.get(V):(j.set(V,nt),nt)),G);var V,nt}delete(j){return super.delete(([{map:j,initKey:G},V]=[{map:this.map,initKey:this.initKey},j],G=G(V),j.has(G)&&(V=j.get(G),j.delete(G)),V));var G,V}}class T{constructor(j){this.options=ue({},this.getDefaultOptions()),this.update(j)}getOptions(){return this.options}update(j={}){this.options=ue({},this.options,j),this.rescale(j)}rescale(j){}}const W=Symbol("defaultUnknown");function $(L,j,G){for(let V=0;V<j.length;V+=1)L.has(j[V])||L.set(G(j[V]),V)}function J(j){var{value:j,from:G,to:V,mapper:nt,notFoundReturn:it}=j;let q=nt.get(j);if(q===void 0){if(it!==W)return it;q=G.push(j)-1,nt.set(j,q)}return V[q%V.length]}function ct(L){return L instanceof Date?j=>""+j:typeof L=="object"?j=>JSON.stringify(j):j=>j}class yt extends T{getDefaultOptions(){return{domain:[],range:[],unknown:W}}constructor(j){super(j)}map(j){return this.domainIndexMap.size===0&&$(this.domainIndexMap,this.getDomain(),this.domainKey),J({value:this.domainKey(j),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(j){return this.rangeIndexMap.size===0&&$(this.rangeIndexMap,this.getRange(),this.rangeKey),J({value:this.rangeKey(j),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(j){var[G]=this.options.domain,[V]=this.options.range;this.domainKey=ct(G),this.rangeKey=ct(V),this.rangeIndexMap?(j&&!j.range||this.rangeIndexMap.clear(),j&&!j.domain&&!j.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new yt(this.options)}getRange(){return this.options.range}getDomain(){var j,G;return this.sortedDomain||({domain:j,compare:G}=this.options,this.sortedDomain=G?[...j].sort(G):j),this.sortedDomain}}function St(Vt){const{domain:j,range:G,paddingOuter:V,paddingInner:nt,flex:it,round:q,align:Z}=Vt;var ft=j.length,Jt=0<(Jt=(Vt=ft)-(pt=it).length)?[...pt,...new Array(Jt).fill(1)]:Jt<0?pt.slice(0,Vt):pt,[Vt,pt]=G,pt=pt-Vt,de=pt/(2/ft*V+1-1/ft*nt);const Kt=de*nt/ft;de-=ft*Kt;const ee=function(pe){const Te=Math.min(...pe);return pe.map(tn=>tn/Te)}(Jt),me=de/ee.reduce((pe,Te)=>pe+Te);var Jt=new x(j.map((pe,Te)=>(Te=ee[Te]*me,[pe,q?Math.floor(Te):Te]))),ge=new x(j.map((pe,Te)=>(Te=ee[Te]*me+Kt,[pe,q?Math.floor(Te):Te]))),de=Array.from(ge.values()).reduce((pe,Te)=>pe+Te),Vt=Vt+(pt-(de-de/ft*nt))*Z;let Pe=q?Math.round(Vt):Vt;var xe=new Array(ft);for(let pe=0;pe<ft;pe+=1){xe[pe]=(Ce=Pe,Math.round(1e12*Ce)/1e12);var Ce=j[pe];Pe+=ge.get(Ce)}return{valueBandWidth:Jt,valueStep:ge,adjustedRange:xe}}class Et extends yt{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:W,flex:[]}}constructor(j){super(j)}clone(){return new Et(this.options)}getStep(j){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:j===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(j)}getBandWidth(j){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:j===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(j)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:j,paddingInner:G}=this.options;return 0<j?j:G}getPaddingOuter(){var{padding:j,paddingOuter:G}=this.options;return 0<j?j:G}rescale(){super.rescale();var{align:V,domain:j,range:nt,round:it,flex:G}=this.options,{adjustedRange:V,valueBandWidth:nt,valueStep:it}=function(pt){var Z=pt.domain;if((Z=Z.length)===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!((ft=pt.flex)==null||!ft.length))return St(pt);var{range:ft,paddingOuter:pt,paddingInner:Kt,round:ee,align:me}=pt;let Jt,ge,de=ft[0];return ft=ft[1]-de,Jt=ft/Math.max(1,2*pt+(Z-Kt)),ee&&(Jt=Math.floor(Jt)),de+=(ft-Jt*(Z-Kt))*me,ge=Jt*(1-Kt),ee&&(de=Math.round(de),ge=Math.round(ge)),pt=new Array(Z).fill(0).map((Vt,Pe)=>de+Pe*Jt),{valueStep:Jt,valueBandWidth:ge,adjustedRange:pt}}({align:V,range:nt,round:it,flex:G,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:j});this.valueStep=it,this.valueBandWidth=nt,this.adjustedRange=V}}const _t=(L,j,G)=>{let V,nt,it=L,q=j;if(it===q&&0<G)return[it];let Z=gn(it,q,G);if(Z===0||!Number.isFinite(Z))return[];if(0<Z){it=Math.ceil(it/Z),q=Math.floor(q/Z),nt=new Array(V=Math.ceil(q-it+1));for(let ft=0;ft<V;ft+=1)nt[ft]=(it+ft)*Z}else{Z=-Z,it=Math.ceil(it*Z),q=Math.floor(q*Z),nt=new Array(V=Math.ceil(q-it+1));for(let ft=0;ft<V;ft+=1)nt[ft]=(it+ft)/Z}return nt},zt=(V,it,G)=>{var[V,nt]=V,[it,q]=it;let Z,ft;return Xe(ft=V<nt?(Z=ze(V,nt),G(it,q)):(Z=ze(nt,V),G(q,it)),Z)},Ht=(L,j,G)=>{const V=Math.min(L.length,j.length)-1,nt=new Array(V),it=new Array(V);var q=L[0]>L[V],Z=q?[...L].reverse():L,ft=q?[...j].reverse():j;for(let pt=0;pt<V;pt+=1)nt[pt]=ze(Z[pt],Z[pt+1]),it[pt]=G(ft[pt],ft[pt+1]);return pt=>{var Kt=function(me,Jt,ge,de,Vt){let Pe=ge||0,xe=de||me.length;for(var Ce=Vt||(Te=>Te);Pe<xe;){var pe=Math.floor((Pe+xe)/2);Ce(me[pe])>Jt?xe=pe:Pe=pe+1}return Pe}(L,pt,1,V)-1,ee=nt[Kt];return Xe(it[Kt],ee)(pt)}},Ct=(L,j,G,V)=>(2<Math.min(L.length,j.length)?Ht:zt)(L,j,V?H:G);class Wt extends T{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:st,tickCount:5}}map(j){return Jn(j)?this.output(j):this.options.unknown}invert(j){return Jn(j)?this.input(j):this.options.unknown}nice(){var j,G,V,nt;this.options.nice&&([j,G,V,...nt]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(j,G,V,...nt))}getTicks(){var j=this.options.tickMethod,[G,V,nt,...it]=this.getTickMethodOptions();return j(G,V,nt,...it)}getTickMethodOptions(){var{domain:j,tickCount:G}=this.options;return[j[0],j[j.length-1],G]}chooseNice(){return Fn}rescale(){this.nice();var[j,G]=this.chooseTransforms();this.composeOutput(j,this.chooseClamp(j)),this.composeInput(j,G,this.chooseClamp(G))}chooseClamp(V){var{clamp:G,range:nt}=this.options,V=this.options.domain.map(V),nt=Math.min(V.length,nt.length);if(G){G=V[0],V=V[nt-1];const it=V<G?V:G,q=V<G?G:V;return Z=>Math.min(Math.max(it,Z),q)}return ie}composeOutput(j,G){var{domain:q,range:V,round:nt,interpolate:it}=this.options,q=Ct(q.map(j),V,it,nt);this.output=Xe(q,G,j)}composeInput(j,G,V){var{domain:nt,range:it}=this.options,it=Ct(it,nt.map(j),st);this.input=Xe(G,V,it)}}class Qt extends Wt{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:xt,tickMethod:_t,tickCount:5}}chooseTransforms(){return[ie,ie]}clone(){return new Qt(this.options)}}class fe extends Et{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:W,paddingInner:1,paddingOuter:0}}constructor(j){super(j)}getPaddingInner(){return 1}clone(){return new fe(this.options)}update(j){super.update(j)}getPaddingOuter(){return this.options.padding}}function It(L,j){for(var G=[],V=0,nt=L.length;V<nt;V++)G.push(L[V].substr(0,j));return G}var we,qe=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ae=["January","February","March","April","May","June","July","August","September","October","November","December"],Ie=It(Ae,3);(function(L){for(var j=[],G=1;G<arguments.length;G++)j[G-1]=arguments[G];for(var V=0,nt=j;V<nt.length;V++){var it,q=nt[V];for(it in q)L[it]=q[it]}})({},{dayNamesShort:It(qe,3),dayNames:qe,monthNamesShort:Ie,monthNames:Ae,amPm:["am","pm"],DoFn:function(L){return L+["th","st","nd","rd"][3<L%10?0:(L-L%10!=10?1:0)*L%10]}});var Le;let je=we=class extends Qt{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ie,tickMethod:_t,tickCount:5}}constructor(L){super(L)}clone(){return new we(this.options)}};je=we=function(L,j,G,V){var nt,it=arguments.length,q=it<3?j:V===null?V=Object.getOwnPropertyDescriptor(j,G):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(L,j,G,V);else for(var Z=L.length-1;0<=Z;Z--)(nt=L[Z])&&(q=(it<3?nt(q):3<it?nt(j,G,q):nt(j,G))||q);return 3<it&&q&&Object.defineProperty(j,G,q),q}([fn(function(L){return[L(0),L(1)]},j=>{var[j,G]=j;return Xe(st(0,1),ze(j,G))})],je);let $n=Le=class extends Qt{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ie,tickMethod:_t,tickCount:5}}constructor(L){super(L)}clone(){return new Le(this.options)}};$n=Le=function(L,j,G,V){var nt,it=arguments.length,q=it<3?j:V===null?V=Object.getOwnPropertyDescriptor(j,G):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(L,j,G,V);else for(var Z=L.length-1;0<=Z;Z--)(nt=L[Z])&&(q=(it<3?nt(q):3<it?nt(j,G,q):nt(j,G))||q);return 3<it&&q&&Object.defineProperty(j,G,q),q}([fn(function(L){return[L(0),L(.5),L(1)]},L=>{const[j,G,V]=L,nt=Xe(st(0,.5),ze(j,G)),it=Xe(st(.5,1),ze(G,V));return q=>(j>V?q<G?it:nt:q<G?nt:it)(q)})],$n);function Xn(L,j,G,V,nt){var it=new Qt({range:[j,j+V]}),q=new Qt({range:[G,G+nt]});return{transform:function(pt){var pt=Rt(pt,2),ft=pt[0],pt=pt[1];return[it.map(ft),q.map(pt)]},untransform:function(pt){var pt=Rt(pt,2),ft=pt[0],pt=pt[1];return[it.invert(ft),q.invert(pt)]}}}function Un(L,j,G,V,nt){return(0,Rt(L,1)[0])(j,G,V,nt)}function qn(L,j,G,V,nt){return Rt(L,1)[0]}function or(ft,j,G,V,nt){var it=(ft=Rt(ft,4))[0],q=ft[1],Z=ft[2],ft=ft[3],pt=new Qt({range:[Z,ft]}),Kt=new Qt({range:[it,q]}),ee=1<(Z=nt/V)?1:Z,me=1<Z?1/Z:1;return{transform:function(de){var de=Rt(de,2),ge=de[0],de=de[1],ge=Kt.map(ge),de=pt.map(de);return[.5*(de*Math.cos(ge)*ee)+.5,.5*(de*Math.sin(ge)*me)+.5]},untransform:function(Vt){var Vt=Rt(Vt,2),ge=Vt[0],Vt=Vt[1],ge=2*(ge-.5)/ee,Vt=2*(Vt-.5)/me,de=Math.sqrt(Math.pow(ge,2)+Math.pow(Vt,2)),Vt=Ze(Math.atan2(Vt,ge),it,q);return[Kt.invert(Vt),pt.invert(de)]}}}function sr(L,j,G,V,nt){return{transform:function(q){var q=Rt(q,2),Z=q[0];return[q[1],Z]},untransform:function(q){var q=Rt(q,2),Z=q[0];return[q[1],Z]}}}function Bn(L){for(var j=[],G=1;G<arguments.length;G++)j[G-1]=arguments[G];return Ma.apply(void 0,be([[-1,-1]],Rt(j),!1))}function on(L){for(var j=[],G=1;G<arguments.length;G++)j[G-1]=arguments[G];return Ma.apply(void 0,be([[-1,1]],Rt(j),!1))}function Kr(L){for(var j=[],G=1;G<arguments.length;G++)j[G-1]=arguments[G];return Ma.apply(void 0,be([[1,-1]],Rt(j),!1))}function wa(q,j,G,V,nt){var it,q=Rt(q,1)[0],Z=At();return Z=Z,q=q,it=Math.sin(q),q=Math.cos(q),Z[0]=q,Z[1]=it,Z[2]=0,Z[3]=-it,Z[4]=q,Z[5]=0,Z[6]=0,Z[7]=0,Z[8]=1,Z}function Sa(L,j,G,V,nt){var it=(L=Rt(L,4))[0],q=L[1],Z=L[2],ft=(L[3]-Z)/(+q/(2*Math.PI)+1),pt=ft/(2*Math.PI),Kt=new Qt({range:[Z,Z+.99*ft]}),ee=new Qt({range:[it,q]}),me=1<(L=nt/V)?1:L,Jt=1<L?1/L:1;return{transform:function(Vt){var Vt=Rt(Vt,2),de=Vt[0],Vt=Vt[1],de=ee.map(de),Vt=Kt.map(Vt);return[.5*(Math.cos(de)*(pt*de+Vt)*me)+.5,.5*(Math.sin(de)*(pt*de+Vt)*Jt)+.5]},untransform:function(Vt){var Vt=Rt(Vt,2),Pe=Vt[0],Vt=Vt[1],Pe=2*(Pe-.5)/me,Vt=2*(Vt-.5)/Jt,de=Math.sqrt(Math.pow(Pe,2)+Math.pow(Vt,2)),Vt=Ze(Math.atan2(Vt,Pe)+Math.floor(de/ft)*Math.PI*2,it,q),Pe=de-pt*Vt;return[ee.invert(Vt),Kt.invert(Pe)]}}}function Ts(ft,j,G,V,nt){var it=(ft=Rt(ft,4))[0],q=ft[1],Z=ft[2],ft=ft[3],pt=new Qt({range:[Z,ft]});return{transform:function(Kt){for(var ee=[],me=Kt.length,Jt=new fe({domain:new Array(me).fill(0).map(function(Pe,xe){return xe}),range:[it,q]}),ge=0;ge<me;ge++){var Vt=Kt[ge],de=Jt.map(ge),Vt=pt.map(Vt);ee.push(de,Vt)}return ee},untransform:function(Kt){for(var ee=[],me=0;me<Kt.length;me+=2){var Jt=Kt[me+1];ee.push(pt.invert(Jt))}return ee}}}var Ma=function(q,j,G,V,nt){var q=Rt(q,2),it=q[0],q=q[1],Z=At();return it=[it,q],(q=Z)[0]=it[0],q[1]=0,q[2]=0,q[3]=0,q[4]=it[1],q[5]=0,q[6]=0,q[7]=0,q[8]=1,q};function Gu(L){return 1/Math.tan(L)}function yp(L,j,G,V,nt){var it=Gu(Rt(L,1)[0]);return{transform:function(ft){var ft=Rt(ft,2),Z=ft[0],ft=ft[1];return[Z+ft*it,ft]},untransform:function(ft){var ft=Rt(ft,2),Z=ft[0],ft=ft[1];return[Z-ft*it,ft]}}}function mp(L,j,G,V,nt){var it=Gu(Rt(L,1)[0]);return{transform:function(Z){var Z=Rt(Z,2),ft=Z[0];return[ft,Z[1]+ft*it]},untransform:function(Z){var Z=Rt(Z,2),ft=Z[0];return[ft,Z[1]-ft*it]}}}function Io(L,j,G,Z,q){var it=L<j,q=(it?j-Z:q-j)||q-Z,Z=it?-1:1;return Z*q*(G+1)/(G+q/((L-j)*Z))+j}function Ea(L,j,G,V,q){var it=L<j,q=(it?j-V:q-j)||q-V;return q/(q*(G+1)/(L-j)-G*(it?-1:1))+j}function jo(L,j,G){return G?new Qt({range:[0,1],domain:[0,j]}).map(L):L}function bp(Z,j,G,V,nt){var it=(Z=Rt(Z,3))[0],q=Z[1],Z=Z[2],ft=jo(it,V,Z!==void 0&&Z);return{transform:function(ee){var ee=Rt(ee,2),Kt=ee[0],ee=ee[1];return[Io(Kt,ft,q,0,1),ee]},untransform:function(ee){var ee=Rt(ee,2),Kt=ee[0],ee=ee[1];return[Ea(Kt,ft,q,0,1),ee]}}}function xp(Z,j,G,V,nt){var it=(Z=Rt(Z,3))[0],q=Z[1],Z=Z[2],ft=jo(it,nt,Z!==void 0&&Z);return{transform:function(pt){return pt=Rt(pt,2),[pt[0],Io(pt[1],ft,q,0,1)]},untransform:function(pt){return pt=Rt(pt,2),[pt[0],Ea(pt[1],ft,q,0,1)]}}}function _p(pt,j,G,V,nt){var it=(pt=Rt(pt,5))[0],q=pt[1],Z=pt[2],ft=pt[3],pt=pt[4],Kt=jo(it,V,pt=pt!==void 0&&pt),ee=jo(q,nt,pt);return{transform:function(ge){var ge=Rt(ge,2),Jt=ge[0],ge=ge[1];return[Io(Jt,Kt,Z,0,1),Io(ge,ee,ft,0,1)]},untransform:function(ge){var ge=Rt(ge,2),Jt=ge[0],ge=ge[1];return[Ea(Jt,Kt,Z,0,1),Ea(ge,ee,ft,0,1)]}}}function Op(pt,j,G,V,nt){var it=(pt=Rt(pt,5))[0],q=pt[1],Z=pt[2],ft=pt[3],pt=(pt=pt[4])!==void 0&&pt,Kt=new Qt({range:[0,V]}),ee=new Qt({range:[0,nt]}),me=pt?it:Kt.map(it),Jt=pt?q:ee.map(q);return{transform:function(Vt){var Vt=Rt(Vt,2),de=Vt[0],Vt=Vt[1],Pe=Kt.map(de)-me,xe=ee.map(Vt)-Jt,Ce=Math.sqrt(Pe*Pe+xe*xe);return Z<Ce?[de,Vt]:(de=Io(Ce,0,ft,0,Z),Vt=Math.atan2(xe,Pe),Ce=me+de*Math.cos(Vt),xe=Jt+de*Math.sin(Vt),[Kt.invert(Ce),ee.invert(xe)])},untransform:function(Vt){var Vt=Rt(Vt,2),de=Vt[0],Vt=Vt[1],Pe=Kt.map(de)-me,xe=ee.map(Vt)-Jt,Ce=Math.sqrt(Pe*Pe+xe*xe);return Z<Ce?[de,Vt]:(de=Ea(Ce,0,ft,0,Z),Vt=Math.atan2(xe,Pe),Ce=me+de*Math.cos(Vt),xe=Jt+de*Math.sin(Vt),[Kt.invert(Ce),ee.invert(xe)])}}}function wp(L,j,G,V,nt,it,q){var Z=new Qt({range:[j,j+nt]}),ft=new Qt({range:[G,G+it]}),pt=new Qt({range:[V,V+q]});return{transform:function(Jt){var Jt=Rt(Jt,3),ee=Jt[0],me=Jt[1],Jt=Jt[2];return[Z.map(ee),ft.map(me),pt.map(Jt)]},untransform:function(Jt){var Jt=Rt(Jt,3),ee=Jt[0],me=Jt[1],Jt=Jt[2];return[Z.invert(ee),ft.invert(me),pt.invert(Jt)]}}}function Aa(Kt,j,G,V,nt,it,q){var Z,ft=(Kt=Rt(Kt,3))[0],pt=Kt[1],Kt=Kt[2];return Z=Se(),ft=[ft,pt,Kt],Z[0]=1,Z[1]=0,Z[2]=0,Z[3]=0,Z[4]=0,Z[5]=1,Z[6]=0,Z[7]=0,Z[8]=0,Z[9]=0,Z[10]=1,Z[11]=0,Z[12]=ft[0],Z[13]=ft[1],Z[14]=ft[2],Z[15]=1,Z}function Sp(L,j,G,V,nt,it,q){return{transform:function(ft){var ft=Rt(ft,3),pt=ft[0];return[ft[1],pt,ft[2]]},untransform:function(ft){var ft=Rt(ft,3),pt=ft[0];return[ft[1],pt,ft[2]]}}}function Mp(Kt,j,G,V,nt,it,q){var Z,ft=(Kt=Rt(Kt,3))[0],pt=Kt[1],Kt=Kt[2];return Z=Se(),ft=[ft,pt,Kt],Z[0]=ft[0],Z[1]=0,Z[2]=0,Z[3]=0,Z[4]=0,Z[5]=ft[1],Z[6]=0,Z[7]=0,Z[8]=0,Z[9]=0,Z[10]=ft[2],Z[11]=0,Z[12]=0,Z[13]=0,Z[14]=0,Z[15]=1,Z}zr.prototype.update=function(L){this.options=ue({},this.options,L),this.recoordinate()},zr.prototype.clone=function(){return new zr(this.options)},zr.prototype.getOptions=function(){return this.options},zr.prototype.clear=function(){this.update({transformations:[]})},zr.prototype.getSize=function(){var L=this.options;return[L.width,L.height]},zr.prototype.getCenter=function(){var L=this.options,j=L.x,G=L.y;return[(2*j+L.width)/2,(2*G+L.height)/2]},zr.prototype.transform=function(){for(var L=[],j=0;j<arguments.length;j++)L[j]=arguments[j];var G=this.options.transformations;return this.update({transformations:be(be([],Rt(G),!1),[be([],Rt(L),!1)],!1)}),this},zr.prototype.map=function(L){return this.output(L)},zr.prototype.invert=function(L){return this.input(L)},zr.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},zr.prototype.compose=function(L){function j(pe,Te){var tn;Z.push((Te=Te===void 0?!0:Te)?(tn=pe,function(Qr){for(var si=[],Ir=0;Ir<Qr.length-1;Ir+=2){var Jr=[Qr[Ir],Qr[Ir+1]],Jr=tn(Jr);si.push.apply(si,be([],Rt(Jr),!1))}return si}):pe)}var G,V,nt=(L=L===void 0?!1:L)?be([],Rt(this.options.transformations),!1).reverse():this.options.transformations,it=L?function(pe){return pe.untransform}:function(pe){return pe.transform},q=[],Z=[];try{for(var ft=kt(nt),pt=ft.next();!pt.done;pt=ft.next()){var Kt,ee,me,Jt,ge,de,Vt=Rt(pt.value),Pe=Vt[0],xe=Vt.slice(1),Ce=this.transformers[Pe];Ce&&(ee=(Kt=this.options).x,me=Kt.y,Jt=Kt.width,ge=Kt.height,$e(de=Ce(be([],Rt(xe),!1),ee,me,Jt,ge))?q.push(de):(q.length&&(j(this.createMatrixTransform(q,L)),q.splice(0,q.length)),j(it(de)||ie,Pe!=="parallel")))}}catch(pe){G={error:pe}}finally{try{pt&&!pt.done&&(V=ft.return)&&V.call(ft)}finally{if(G)throw G.error}}return q.length&&j(this.createMatrixTransform(q,L)),Je.apply(void 0,be([],Rt(Z),!1))},zr.prototype.createMatrixTransform=function(L,j){var G,V,nt,it,q,Z,ft,pt,Kt,ee,me,Jt,ge=At();return j&&L.reverse(),L.forEach(function(de){return Dt(ge,ge,de)}),j&&(j=L=ge,(Jt=new Lt(9))[0]=j[0],Jt[1]=j[1],Jt[2]=j[2],Jt[3]=j[3],Jt[4]=j[4],Jt[5]=j[5],Jt[6]=j[6],Jt[7]=j[7],Jt[8]=j[8],Jt=(j=Jt)[0],G=j[1],V=j[2],nt=j[3],it=j[4],q=j[5],Z=j[6],ft=j[7],pt=(j=j[8])*it-q*ft,me=Jt*pt+G*(Kt=-j*nt+q*Z)+V*(ee=ft*nt-it*Z))&&(L[0]=pt*(me=1/me),L[1]=(-j*G+V*ft)*me,L[2]=(q*G-V*it)*me,L[3]=Kt*me,L[4]=(j*Jt-V*Z)*me,L[5]=(-q*Jt+V*nt)*me,L[6]=ee*me,L[7]=(-ft*Jt+G*Z)*me,L[8]=(it*Jt-G*nt)*me),function(Te){var Vt,Pe,xe,Ce,pe,Te=[Te[0],Te[1],1];return xe=ge,Ce=(Pe=Vt=Te)[0],pe=Pe[1],Pe=Pe[2],Vt[0]=Ce*xe[0]+pe*xe[3]+Pe*xe[6],Vt[1]=Ce*xe[1]+pe*xe[4]+Pe*xe[7],Vt[2]=Ce*xe[2]+pe*xe[5]+Pe*xe[8],[Te[0],Te[1]]}},qe=zr;function zr(L){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:Xn,translate:un,custom:Un,matrix:qn,polar:or,transpose:sr,scale:Ma,"shear.x":yp,"shear.y":mp,reflect:Bn,"reflect.x":on,"reflect.y":Kr,rotate:wa,helix:Sa,parallel:Ts,fisheye:_p,"fisheye.x":bp,"fisheye.y":xp,"fisheye.circular":Op},this.update(L)}Gr.prototype.update=function(L){this.options=ue({},this.options,L),this.recoordinate()},Gr.prototype.clone=function(){return new Gr(this.options)},Gr.prototype.getOptions=function(){return this.options},Gr.prototype.clear=function(){this.update({transformations:[]})},Gr.prototype.getSize=function(){var L=this.options;return[L.width,L.height,L.depth]},Gr.prototype.getCenter=function(){var L=this.options,j=L.x,G=L.y,V=L.z;return[(2*j+L.width)/2,(2*G+L.height)/2,(2*V+L.depth)/2]},Gr.prototype.transform=function(){for(var L=[],j=0;j<arguments.length;j++)L[j]=arguments[j];var G=this.options.transformations;return this.update({transformations:be(be([],Rt(G),!1),[be([],Rt(L),!1)],!1)}),this},Gr.prototype.map=function(L){return this.output(L)},Gr.prototype.invert=function(L){return this.input(L)},Gr.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Gr.prototype.compose=function(L){function j(tn,Qr){var si;Z.push((Qr=Qr===void 0?!0:Qr)?(si=tn,function(Ir){for(var Jr=[],_i=0;_i<Ir.length-1;_i+=3){var tr=[Ir[_i],Ir[_i+1],Ir[_i+2]],tr=si(tr);Jr.push.apply(Jr,be([],Rt(tr),!1))}return Jr}):tn)}var G,V,nt=(L=L===void 0?!1:L)?be([],Rt(this.options.transformations),!1).reverse():this.options.transformations,it=L?function(tn){return tn.untransform}:function(tn){return tn.transform},q=[],Z=[];try{for(var ft=kt(nt),pt=ft.next();!pt.done;pt=ft.next()){var Kt,ee,me,Jt,ge,de,Vt,Pe,xe=Rt(pt.value),Ce=xe[0],pe=xe.slice(1),Te=this.transformers[Ce];Te&&(ee=(Kt=this.options).x,me=Kt.y,Jt=Kt.z,ge=Kt.width,de=Kt.height,Vt=Kt.depth,$e(Pe=Te(be([],Rt(pe),!1),ee,me,Jt,ge,de,Vt))?q.push(Pe):(q.length&&(j(this.createMatrixTransform(q,L)),q.splice(0,q.length)),j(it(Pe)||ie,!0)))}}catch(tn){G={error:tn}}finally{try{pt&&!pt.done&&(V=ft.return)&&V.call(ft)}finally{if(G)throw G.error}}return q.length&&j(this.createMatrixTransform(q,L)),Je.apply(void 0,be([],Rt(Z),!1))},Gr.prototype.createMatrixTransform=function(L,j){var G,V,nt,it,q,Z,ft,pt,Kt,ee,me,Jt,ge,de,Vt,Pe,xe,Ce,pe,Te,tn,Qr,si,Ir,Jr,_i,tr,On,Do=Se();return j&&L.reverse(),L.forEach(function(Ep){return ke(Do,Do,Ep)}),j&&(j=L=Do,(On=new Lt(16))[0]=j[0],On[1]=j[1],On[2]=j[2],On[3]=j[3],On[4]=j[4],On[5]=j[5],On[6]=j[6],On[7]=j[7],On[8]=j[8],On[9]=j[9],On[10]=j[10],On[11]=j[11],On[12]=j[12],On[13]=j[13],On[14]=j[14],On[15]=j[15],On=(j=On)[0],G=j[1],V=j[2],nt=j[3],it=j[4],q=j[5],Z=j[6],ft=j[7],pt=j[8],Kt=j[9],ee=j[10],me=j[11],Jt=j[12],ge=j[13],de=j[14],j=j[15],tr=(Vt=On*q-G*it)*(_i=ee*j-me*de)-(Pe=On*Z-V*it)*(Jr=Kt*j-me*ge)+(xe=On*ft-nt*it)*(Ir=Kt*de-ee*ge)+(Ce=G*Z-V*q)*(si=pt*j-me*Jt)-(pe=G*ft-nt*q)*(Qr=pt*de-ee*Jt)+(Te=V*ft-nt*Z)*(tn=pt*ge-Kt*Jt))&&(L[0]=(q*_i-Z*Jr+ft*Ir)*(tr=1/tr),L[1]=(V*Jr-G*_i-nt*Ir)*tr,L[2]=(ge*Te-de*pe+j*Ce)*tr,L[3]=(ee*pe-Kt*Te-me*Ce)*tr,L[4]=(Z*si-it*_i-ft*Qr)*tr,L[5]=(On*_i-V*si+nt*Qr)*tr,L[6]=(de*xe-Jt*Te-j*Pe)*tr,L[7]=(pt*Te-ee*xe+me*Pe)*tr,L[8]=(it*Jr-q*si+ft*tn)*tr,L[9]=(G*si-On*Jr-nt*tn)*tr,L[10]=(Jt*pe-ge*xe+j*Vt)*tr,L[11]=(Kt*xe-pt*pe-me*Vt)*tr,L[12]=(q*Qr-it*Ir-Z*tn)*tr,L[13]=(On*Ir-G*Qr+V*tn)*tr,L[14]=(ge*Pe-Jt*Ce-de*Vt)*tr,L[15]=(pt*Ce-Kt*Pe+ee*Vt)*tr),function(ra){var Fo,Xi,Ar,Bo,na,zo,ra=[ra[0],ra[1],ra[2],1];return Ar=Do,Bo=(Xi=Fo=ra)[0],na=Xi[1],zo=Xi[2],Xi=Xi[3],Fo[0]=Ar[0]*Bo+Ar[4]*na+Ar[8]*zo+Ar[12]*Xi,Fo[1]=Ar[1]*Bo+Ar[5]*na+Ar[9]*zo+Ar[13]*Xi,Fo[2]=Ar[2]*Bo+Ar[6]*na+Ar[10]*zo+Ar[14]*Xi,Fo[3]=Ar[3]*Bo+Ar[7]*na+Ar[11]*zo+Ar[15]*Xi,[ra[0],ra[1],ra[2]]}},Ie=Gr;function Gr(L){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:wp,translate3D:Aa,scale3D:Mp,transpose3D:Sp},this.update(L)}mt.Coordinate=qe,mt.Coordinate3D=Ie,Object.defineProperty(mt,"__esModule",{value:!0})})},39083:function(Ye,Ve){"use strict";var mt=function(kt,Rt,be){return kt<Rt?Rt:kt>be?be:kt};Ve.Z=mt},58622:function(Ye,Ve){"use strict";var mt=function(kt){return kt==null};Ve.Z=mt},39696:function(Ye,Ve,mt){"use strict";var kt=mt(98104),Rt=function(be){return(0,kt.Z)(be,"Number")};Ve.Z=Rt},98104:function(Ye,Ve){"use strict";var mt={}.toString,kt=function(Rt,be){return mt.call(Rt)==="[object "+be+"]"};Ve.Z=kt},61323:function(Ye,Ve,mt){"use strict";var kt=mt(53263);Ve.Z=kt.Z},48966:function(Ye,Ve,mt){"use strict";var kt=mt(92002);Ve.Z=kt.Z},99419:function(Ye){"use strict";Ye.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},2489:function(Ye,Ve,mt){var kt=mt(99419),Rt=mt(27933),be=Object.hasOwnProperty,We=Object.create(null);for(var te in kt)be.call(kt,te)&&(We[kt[te]]=te);var ve=Ye.exports={to:{},get:{}};ve.get=function(dt){var he=dt.substring(0,3).toLowerCase(),Zt,ue;switch(he){case"hsl":Zt=ve.get.hsl(dt),ue="hsl";break;case"hwb":Zt=ve.get.hwb(dt),ue="hwb";break;default:Zt=ve.get.rgb(dt),ue="rgb";break}return Zt?{model:ue,value:Zt}:null},ve.get.rgb=function(dt){if(!dt)return null;var he=/^#([a-f0-9]{3,4})$/i,Zt=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,ue=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,ie=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,jt=/^(\w+)$/,Lt=[0,0,0,1],At,Dt,Se;if(At=dt.match(Zt)){for(Se=At[2],At=At[1],Dt=0;Dt<3;Dt++){var ke=Dt*2;Lt[Dt]=parseInt(At.slice(ke,ke+2),16)}Se&&(Lt[3]=parseInt(Se,16)/255)}else if(At=dt.match(he)){for(At=At[1],Se=At[3],Dt=0;Dt<3;Dt++)Lt[Dt]=parseInt(At[Dt]+At[Dt],16);Se&&(Lt[3]=parseInt(Se+Se,16)/255)}else if(At=dt.match(ue)){for(Dt=0;Dt<3;Dt++)Lt[Dt]=parseInt(At[Dt+1],0);At[4]&&(At[5]?Lt[3]=parseFloat(At[4])*.01:Lt[3]=parseFloat(At[4]))}else if(At=dt.match(ie)){for(Dt=0;Dt<3;Dt++)Lt[Dt]=Math.round(parseFloat(At[Dt+1])*2.55);At[4]&&(At[5]?Lt[3]=parseFloat(At[4])*.01:Lt[3]=parseFloat(At[4]))}else return(At=dt.match(jt))?At[1]==="transparent"?[0,0,0,0]:be.call(kt,At[1])?(Lt=kt[At[1]],Lt[3]=1,Lt):null:null;for(Dt=0;Dt<3;Dt++)Lt[Dt]=re(Lt[Dt],0,255);return Lt[3]=re(Lt[3],0,1),Lt},ve.get.hsl=function(dt){if(!dt)return null;var he=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,Zt=dt.match(he);if(Zt){var ue=parseFloat(Zt[4]),ie=(parseFloat(Zt[1])%360+360)%360,jt=re(parseFloat(Zt[2]),0,100),Lt=re(parseFloat(Zt[3]),0,100),At=re(isNaN(ue)?1:ue,0,1);return[ie,jt,Lt,At]}return null},ve.get.hwb=function(dt){if(!dt)return null;var he=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,Zt=dt.match(he);if(Zt){var ue=parseFloat(Zt[4]),ie=(parseFloat(Zt[1])%360+360)%360,jt=re(parseFloat(Zt[2]),0,100),Lt=re(parseFloat(Zt[3]),0,100),At=re(isNaN(ue)?1:ue,0,1);return[ie,jt,Lt,At]}return null},ve.to.hex=function(){var dt=Rt(arguments);return"#"+Gt(dt[0])+Gt(dt[1])+Gt(dt[2])+(dt[3]<1?Gt(Math.round(dt[3]*255)):"")},ve.to.rgb=function(){var dt=Rt(arguments);return dt.length<4||dt[3]===1?"rgb("+Math.round(dt[0])+", "+Math.round(dt[1])+", "+Math.round(dt[2])+")":"rgba("+Math.round(dt[0])+", "+Math.round(dt[1])+", "+Math.round(dt[2])+", "+dt[3]+")"},ve.to.rgb.percent=function(){var dt=Rt(arguments),he=Math.round(dt[0]/255*100),Zt=Math.round(dt[1]/255*100),ue=Math.round(dt[2]/255*100);return dt.length<4||dt[3]===1?"rgb("+he+"%, "+Zt+"%, "+ue+"%)":"rgba("+he+"%, "+Zt+"%, "+ue+"%, "+dt[3]+")"},ve.to.hsl=function(){var dt=Rt(arguments);return dt.length<4||dt[3]===1?"hsl("+dt[0]+", "+dt[1]+"%, "+dt[2]+"%)":"hsla("+dt[0]+", "+dt[1]+"%, "+dt[2]+"%, "+dt[3]+")"},ve.to.hwb=function(){var dt=Rt(arguments),he="";return dt.length>=4&&dt[3]!==1&&(he=", "+dt[3]),"hwb("+dt[0]+", "+dt[1]+"%, "+dt[2]+"%"+he+")"},ve.to.keyword=function(dt){return We[dt.slice(0,3)]};function re(dt,he,Zt){return Math.min(Math.max(he,dt),Zt)}function Gt(dt){var he=Math.round(dt).toString(16).toUpperCase();return he.length<2?"0"+he:he}},52617:function(Ye,Ve,mt){"use strict";mt.d(Ve,{ZP:function(){return Je},B8:function(){return Xe}});function kt(vt,Yt,et){vt.prototype=Yt.prototype=et,et.constructor=vt}function Rt(vt,Yt){var et=Object.create(vt.prototype);for(var at in Yt)et[at]=Yt[at];return et}function be(){}var We=.7,te=1/We,ve="\\s*([+-]?\\d+)\\s*",re="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dt=/^#([0-9a-f]{3,8})$/,he=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),Zt=new RegExp("^rgb\\("+[Gt,Gt,Gt]+"\\)$"),ue=new RegExp("^rgba\\("+[ve,ve,ve,re]+"\\)$"),ie=new RegExp("^rgba\\("+[Gt,Gt,Gt,re]+"\\)$"),jt=new RegExp("^hsl\\("+[re,Gt,Gt]+"\\)$"),Lt=new RegExp("^hsla\\("+[re,Gt,Gt,re]+"\\)$"),At={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};kt(be,Je,{copy:function(vt){return Object.assign(new this.constructor,this,vt)},displayable:function(){return this.rgb().displayable()},hex:Dt,formatHex:Dt,formatHsl:Se,formatRgb:ke,toString:ke});function Dt(){return this.rgb().formatHex()}function Se(){return Fn(this).formatHsl()}function ke(){return this.rgb().formatRgb()}function Je(vt){var Yt,et;return vt=(vt+"").trim().toLowerCase(),(Yt=dt.exec(vt))?(et=Yt[1].length,Yt=parseInt(Yt[1],16),et===6?$e(Yt):et===3?new ze(Yt>>8&15|Yt>>4&240,Yt>>4&15|Yt&240,(Yt&15)<<4|Yt&15,1):et===8?Ze(Yt>>24&255,Yt>>16&255,Yt>>8&255,(Yt&255)/255):et===4?Ze(Yt>>12&15|Yt>>8&240,Yt>>8&15|Yt>>4&240,Yt>>4&15|Yt&240,((Yt&15)<<4|Yt&15)/255):null):(Yt=he.exec(vt))?new ze(Yt[1],Yt[2],Yt[3],1):(Yt=Zt.exec(vt))?new ze(Yt[1]*255/100,Yt[2]*255/100,Yt[3]*255/100,1):(Yt=ue.exec(vt))?Ze(Yt[1],Yt[2],Yt[3],Yt[4]):(Yt=ie.exec(vt))?Ze(Yt[1]*255/100,Yt[2]*255/100,Yt[3]*255/100,Yt[4]):(Yt=jt.exec(vt))?gn(Yt[1],Yt[2]/100,Yt[3]/100,1):(Yt=Lt.exec(vt))?gn(Yt[1],Yt[2]/100,Yt[3]/100,Yt[4]):At.hasOwnProperty(vt)?$e(At[vt]):vt==="transparent"?new ze(NaN,NaN,NaN,0):null}function $e(vt){return new ze(vt>>16&255,vt>>8&255,vt&255,1)}function Ze(vt,Yt,et,at){return at<=0&&(vt=Yt=et=NaN),new ze(vt,Yt,et,at)}function un(vt){return vt instanceof be||(vt=Je(vt)),vt?(vt=vt.rgb(),new ze(vt.r,vt.g,vt.b,vt.opacity)):new ze}function Xe(vt,Yt,et,at){return arguments.length===1?un(vt):new ze(vt,Yt,et,at==null?1:at)}function ze(vt,Yt,et,at){this.r=+vt,this.g=+Yt,this.b=+et,this.opacity=+at}kt(ze,Xe,Rt(be,{brighter:function(vt){return vt=vt==null?te:Math.pow(te,vt),new ze(this.r*vt,this.g*vt,this.b*vt,this.opacity)},darker:function(vt){return vt=vt==null?We:Math.pow(We,vt),new ze(this.r*vt,this.g*vt,this.b*vt,this.opacity)},rgb:function(){return this},displayable:function(){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:ln,formatHex:ln,formatRgb:Oe,toString:Oe}));function ln(){return"#"+Me(this.r)+Me(this.g)+Me(this.b)}function Oe(){var vt=this.opacity;return vt=isNaN(vt)?1:Math.max(0,Math.min(1,vt)),(vt===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(vt===1?")":", "+vt+")")}function Me(vt){return vt=Math.max(0,Math.min(255,Math.round(vt)||0)),(vt<16?"0":"")+vt.toString(16)}function gn(vt,Yt,et,at){return at<=0?vt=Yt=et=NaN:et<=0||et>=1?vt=Yt=NaN:Yt<=0&&(vt=NaN),new fn(vt,Yt,et,at)}function Fn(vt){if(vt instanceof fn)return new fn(vt.h,vt.s,vt.l,vt.opacity);if(vt instanceof be||(vt=Je(vt)),!vt)return new fn;if(vt instanceof fn)return vt;vt=vt.rgb();var Yt=vt.r/255,et=vt.g/255,at=vt.b/255,Ot=Math.min(Yt,et,at),gt=Math.max(Yt,et,at),$t=NaN,Ft=gt-Ot,ae=(gt+Ot)/2;return Ft?(Yt===gt?$t=(et-at)/Ft+(et<at)*6:et===gt?$t=(at-Yt)/Ft+2:$t=(Yt-et)/Ft+4,Ft/=ae<.5?gt+Ot:2-gt-Ot,$t*=60):Ft=ae>0&&ae<1?0:$t,new fn($t,Ft,ae,vt.opacity)}function Jn(vt,Yt,et,at){return arguments.length===1?Fn(vt):new fn(vt,Yt,et,at==null?1:at)}function fn(vt,Yt,et,at){this.h=+vt,this.s=+Yt,this.l=+et,this.opacity=+at}kt(fn,Jn,Rt(be,{brighter:function(vt){return vt=vt==null?te:Math.pow(te,vt),new fn(this.h,this.s,this.l*vt,this.opacity)},darker:function(vt){return vt=vt==null?We:Math.pow(We,vt),new fn(this.h,this.s,this.l*vt,this.opacity)},rgb:function(){var vt=this.h%360+(this.h<0)*360,Yt=isNaN(vt)||isNaN(this.s)?0:this.s,et=this.l,at=et+(et<.5?et:1-et)*Yt,Ot=2*et-at;return new ze(yn(vt>=240?vt-240:vt+120,Ot,at),yn(vt,Ot,at),yn(vt<120?vt+240:vt-120,Ot,at),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var vt=this.opacity;return vt=isNaN(vt)?1:Math.max(0,Math.min(1,vt)),(vt===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(vt===1?")":", "+vt+")")}}));function yn(vt,Yt,et){return(vt<60?Yt+(et-Yt)*vt/60:vt<180?et:vt<240?Yt+(et-Yt)*(240-vt)/60:Yt)*255}},2337:function(Ye){"use strict";var Ve=Object.prototype.hasOwnProperty,mt="~";function kt(){}Object.create&&(kt.prototype=Object.create(null),new kt().__proto__||(mt=!1));function Rt(ve,re,Gt){this.fn=ve,this.context=re,this.once=Gt||!1}function be(ve,re,Gt,dt,he){if(typeof Gt!="function")throw new TypeError("The listener must be a function");var Zt=new Rt(Gt,dt||ve,he),ue=mt?mt+re:re;return ve._events[ue]?ve._events[ue].fn?ve._events[ue]=[ve._events[ue],Zt]:ve._events[ue].push(Zt):(ve._events[ue]=Zt,ve._eventsCount++),ve}function We(ve,re){--ve._eventsCount===0?ve._events=new kt:delete ve._events[re]}function te(){this._events=new kt,this._eventsCount=0}te.prototype.eventNames=function(){var re=[],Gt,dt;if(this._eventsCount===0)return re;for(dt in Gt=this._events)Ve.call(Gt,dt)&&re.push(mt?dt.slice(1):dt);return Object.getOwnPropertySymbols?re.concat(Object.getOwnPropertySymbols(Gt)):re},te.prototype.listeners=function(re){var Gt=mt?mt+re:re,dt=this._events[Gt];if(!dt)return[];if(dt.fn)return[dt.fn];for(var he=0,Zt=dt.length,ue=new Array(Zt);he<Zt;he++)ue[he]=dt[he].fn;return ue},te.prototype.listenerCount=function(re){var Gt=mt?mt+re:re,dt=this._events[Gt];return dt?dt.fn?1:dt.length:0},te.prototype.emit=function(re,Gt,dt,he,Zt,ue){var ie=mt?mt+re:re;if(!this._events[ie])return!1;var jt=this._events[ie],Lt=arguments.length,At,Dt;if(jt.fn){switch(jt.once&&this.removeListener(re,jt.fn,void 0,!0),Lt){case 1:return jt.fn.call(jt.context),!0;case 2:return jt.fn.call(jt.context,Gt),!0;case 3:return jt.fn.call(jt.context,Gt,dt),!0;case 4:return jt.fn.call(jt.context,Gt,dt,he),!0;case 5:return jt.fn.call(jt.context,Gt,dt,he,Zt),!0;case 6:return jt.fn.call(jt.context,Gt,dt,he,Zt,ue),!0}for(Dt=1,At=new Array(Lt-1);Dt<Lt;Dt++)At[Dt-1]=arguments[Dt];jt.fn.apply(jt.context,At)}else{var Se=jt.length,ke;for(Dt=0;Dt<Se;Dt++)switch(jt[Dt].once&&this.removeListener(re,jt[Dt].fn,void 0,!0),Lt){case 1:jt[Dt].fn.call(jt[Dt].context);break;case 2:jt[Dt].fn.call(jt[Dt].context,Gt);break;case 3:jt[Dt].fn.call(jt[Dt].context,Gt,dt);break;case 4:jt[Dt].fn.call(jt[Dt].context,Gt,dt,he);break;default:if(!At)for(ke=1,At=new Array(Lt-1);ke<Lt;ke++)At[ke-1]=arguments[ke];jt[Dt].fn.apply(jt[Dt].context,At)}}return!0},te.prototype.on=function(re,Gt,dt){return be(this,re,Gt,dt,!1)},te.prototype.once=function(re,Gt,dt){return be(this,re,Gt,dt,!0)},te.prototype.removeListener=function(re,Gt,dt,he){var Zt=mt?mt+re:re;if(!this._events[Zt])return this;if(!Gt)return We(this,Zt),this;var ue=this._events[Zt];if(ue.fn)ue.fn===Gt&&(!he||ue.once)&&(!dt||ue.context===dt)&&We(this,Zt);else{for(var ie=0,jt=[],Lt=ue.length;ie<Lt;ie++)(ue[ie].fn!==Gt||he&&!ue[ie].once||dt&&ue[ie].context!==dt)&&jt.push(ue[ie]);jt.length?this._events[Zt]=jt.length===1?jt[0]:jt:We(this,Zt)}return this},te.prototype.removeAllListeners=function(re){var Gt;return re?(Gt=mt?mt+re:re,this._events[Gt]&&We(this,Gt)):(this._events=new kt,this._eventsCount=0),this},te.prototype.off=te.prototype.removeListener,te.prototype.addListener=te.prototype.on,te.prefixed=mt,te.EventEmitter=te,Ye.exports=te},52827:function(Ye,Ve){(function(mt,kt){kt(Ve)})(this,function(mt){"use strict";function kt(ie,jt,Lt,At){At=At||{};var Dt=At.maxIterations||100,Se=At.tolerance||1e-10,ke=ie(jt),Je=ie(Lt),$e=Lt-jt;if(ke*Je>0)throw"Initial bisect points must have opposite signs";if(ke===0)return jt;if(Je===0)return Lt;for(var Ze=0;Ze<Dt;++Ze){$e/=2;var un=jt+$e,Xe=ie(un);if(Xe*ke>=0&&(jt=un),Math.abs($e)<Se||Xe===0)return un}return jt+$e}function Rt(ie){for(var jt=new Array(ie),Lt=0;Lt<ie;++Lt)jt[Lt]=0;return jt}function be(ie,jt){return Rt(ie).map(function(){return Rt(jt)})}function We(ie,jt){for(var Lt=0,At=0;At<ie.length;++At)Lt+=ie[At]*jt[At];return Lt}function te(ie){return Math.sqrt(We(ie,ie))}function ve(ie,jt,Lt){for(var At=0;At<jt.length;++At)ie[At]=jt[At]*Lt}function re(ie,jt,Lt,At,Dt){for(var Se=0;Se<ie.length;++Se)ie[Se]=jt*Lt[Se]+At*Dt[Se]}function Gt(ie,jt,Lt){Lt=Lt||{};var At=Lt.maxIterations||jt.length*200,Dt=Lt.nonZeroDelta||1.05,Se=Lt.zeroDelta||.001,ke=Lt.minErrorDelta||1e-6,Je=Lt.minErrorDelta||1e-5,$e=Lt.rho!==void 0?Lt.rho:1,Ze=Lt.chi!==void 0?Lt.chi:2,un=Lt.psi!==void 0?Lt.psi:-.5,Xe=Lt.sigma!==void 0?Lt.sigma:.5,ze,ln=jt.length,Oe=new Array(ln+1);Oe[0]=jt,Oe[0].fx=ie(jt),Oe[0].id=0;for(var Me=0;Me<ln;++Me){var gn=jt.slice();gn[Me]=gn[Me]?gn[Me]*Dt:Se,Oe[Me+1]=gn,Oe[Me+1].fx=ie(gn),Oe[Me+1].id=Me+1}function Fn(Ft){for(var ae=0;ae<Ft.length;ae++)Oe[ln][ae]=Ft[ae];Oe[ln].fx=Ft.fx}for(var Jn=function(Ft,ae){return Ft.fx-ae.fx},fn=jt.slice(),yn=jt.slice(),vt=jt.slice(),Yt=jt.slice(),et=0;et<At;++et){if(Oe.sort(Jn),Lt.history){var at=Oe.map(function(Ft){var ae=Ft.slice();return ae.fx=Ft.fx,ae.id=Ft.id,ae});at.sort(function(Ft,ae){return Ft.id-ae.id}),Lt.history.push({x:Oe[0].slice(),fx:Oe[0].fx,simplex:at})}for(ze=0,Me=0;Me<ln;++Me)ze=Math.max(ze,Math.abs(Oe[0][Me]-Oe[1][Me]));if(Math.abs(Oe[0].fx-Oe[ln].fx)<ke&&ze<Je)break;for(Me=0;Me<ln;++Me){fn[Me]=0;for(var Ot=0;Ot<ln;++Ot)fn[Me]+=Oe[Ot][Me];fn[Me]/=ln}var gt=Oe[ln];if(re(yn,1+$e,fn,-$e,gt),yn.fx=ie(yn),yn.fx<Oe[0].fx)re(Yt,1+Ze,fn,-Ze,gt),Yt.fx=ie(Yt),Yt.fx<yn.fx?Fn(Yt):Fn(yn);else if(yn.fx>=Oe[ln-1].fx){var $t=!1;if(yn.fx>gt.fx?(re(vt,1+un,fn,-un,gt),vt.fx=ie(vt),vt.fx<gt.fx?Fn(vt):$t=!0):(re(vt,1-un*$e,fn,un*$e,gt),vt.fx=ie(vt),vt.fx<yn.fx?Fn(vt):$t=!0),$t){if(Xe>=1)break;for(Me=1;Me<Oe.length;++Me)re(Oe[Me],1-Xe,Oe[0],Xe,Oe[Me]),Oe[Me].fx=ie(Oe[Me])}}else Fn(yn)}return Oe.sort(Jn),{fx:Oe[0].fx,x:Oe[0]}}function dt(ie,jt,Lt,At,Dt,Se,ke){var Je=Lt.fx,$e=We(Lt.fxprime,jt),Ze=Je,un=Je,Xe=$e,ze=0;Dt=Dt||1,Se=Se||1e-6,ke=ke||.1;function ln(Me,gn,Fn){for(var Jn=0;Jn<16;++Jn)if(Dt=(Me+gn)/2,re(At.x,1,Lt.x,Dt,jt),Ze=At.fx=ie(At.x,At.fxprime),Xe=We(At.fxprime,jt),Ze>Je+Se*Dt*$e||Ze>=Fn)gn=Dt;else{if(Math.abs(Xe)<=-ke*$e)return Dt;Xe*(gn-Me)>=0&&(gn=Me),Me=Dt,Fn=Ze}return 0}for(var Oe=0;Oe<10;++Oe){if(re(At.x,1,Lt.x,Dt,jt),Ze=At.fx=ie(At.x,At.fxprime),Xe=We(At.fxprime,jt),Ze>Je+Se*Dt*$e||Oe&&Ze>=un)return ln(ze,Dt,un);if(Math.abs(Xe)<=-ke*$e)return Dt;if(Xe>=0)return ln(Dt,ze,Ze);un=Ze,ze=Dt,Dt*=2}return Dt}function he(ie,jt,Lt){var At={x:jt.slice(),fx:0,fxprime:jt.slice()},Dt={x:jt.slice(),fx:0,fxprime:jt.slice()},Se=jt.slice(),ke,Je,$e=1,Ze;Lt=Lt||{},Ze=Lt.maxIterations||jt.length*20,At.fx=ie(At.x,At.fxprime),ke=At.fxprime.slice(),ve(ke,At.fxprime,-1);for(var un=0;un<Ze;++un){if($e=dt(ie,ke,At,Dt,$e),Lt.history&&Lt.history.push({x:At.x.slice(),fx:At.fx,fxprime:At.fxprime.slice(),alpha:$e}),!$e)ve(ke,At.fxprime,-1);else{re(Se,1,Dt.fxprime,-1,At.fxprime);var Xe=We(At.fxprime,At.fxprime),ze=Math.max(0,We(Se,Dt.fxprime)/Xe);re(ke,ze,ke,-1,Dt.fxprime),Je=At,At=Dt,Dt=Je}if(te(At.fxprime)<=1e-5)break}return Lt.history&&Lt.history.push({x:At.x.slice(),fx:At.fx,fxprime:At.fxprime.slice(),alpha:$e}),At}function Zt(ie,jt,Lt){Lt=Lt||{};for(var At=Lt.maxIterations||jt.length*100,Dt=Lt.learnRate||.001,Se={x:jt.slice(),fx:0,fxprime:jt.slice()},ke=0;ke<At&&(Se.fx=ie(Se.x,Se.fxprime),Lt.history&&Lt.history.push({x:Se.x.slice(),fx:Se.fx,fxprime:Se.fxprime.slice()}),re(Se.x,1,Se.x,-Dt,Se.fxprime),!(te(Se.fxprime)<=1e-5));++ke);return Se}function ue(ie,jt,Lt){Lt=Lt||{};var At={x:jt.slice(),fx:0,fxprime:jt.slice()},Dt={x:jt.slice(),fx:0,fxprime:jt.slice()},Se=Lt.maxIterations||jt.length*100,ke=Lt.learnRate||1,Je=jt.slice(),$e=Lt.c1||.001,Ze=Lt.c2||.1,un,Xe=[];if(Lt.history){var ze=ie;ie=function(Oe,Me){return Xe.push(Oe.slice()),ze(Oe,Me)}}At.fx=ie(At.x,At.fxprime);for(var ln=0;ln<Se&&(ve(Je,At.fxprime,-1),ke=dt(ie,Je,At,Dt,ke,$e,Ze),Lt.history&&(Lt.history.push({x:At.x.slice(),fx:At.fx,fxprime:At.fxprime.slice(),functionCalls:Xe,learnRate:ke,alpha:ke}),Xe=[]),un=At,At=Dt,Dt=un,!(ke===0||te(At.fxprime)<1e-5));++ln);return At}mt.bisect=kt,mt.nelderMead=Gt,mt.conjugateGradient=he,mt.gradientDescent=Zt,mt.gradientDescentLineSearch=ue,mt.zeros=Rt,mt.zerosM=be,mt.norm2=te,mt.weightedSum=re,mt.scale=ve})},31767:function(Ye,Ve,mt){"use strict";mt.d(Ve,{FD:function(){return be},Ib:function(){return kt},WT:function(){return Rt}});var kt=1e-6,Rt=typeof Float32Array!="undefined"?Float32Array:Array,be=Math.random;function We(Gt){Rt=Gt}var te=Math.PI/180;function ve(Gt){return Gt*te}function re(Gt,dt){return Math.abs(Gt-dt)<=kt*Math.max(1,Math.abs(Gt),Math.abs(dt))}Math.hypot||(Math.hypot=function(){for(var Gt=0,dt=arguments.length;dt--;)Gt+=arguments[dt]*arguments[dt];return Math.sqrt(Gt)})},39536:function(Ye,Ve,mt){"use strict";mt.r(Ve),mt.d(Ve,{add:function(){return ht},adjoint:function(){return he},clone:function(){return be},copy:function(){return We},create:function(){return Rt},determinant:function(){return Zt},equals:function(){return H},exactEquals:function(){return xt},frob:function(){return lt},fromQuat:function(){return fn},fromQuat2:function(){return ln},fromRotation:function(){return $e},fromRotationTranslation:function(){return ze},fromRotationTranslationScale:function(){return Fn},fromRotationTranslationScaleOrigin:function(){return Jn},fromScaling:function(){return Je},fromTranslation:function(){return ke},fromValues:function(){return te},fromXRotation:function(){return Ze},fromYRotation:function(){return un},fromZRotation:function(){return Xe},frustum:function(){return yn},getRotation:function(){return gn},getScaling:function(){return Me},getTranslation:function(){return Oe},identity:function(){return re},invert:function(){return dt},lookAt:function(){return Ft},mul:function(){return K},multiply:function(){return ue},multiplyScalar:function(){return Q},multiplyScalarAndAdd:function(){return st},ortho:function(){return gt},orthoNO:function(){return Ot},orthoZO:function(){return $t},perspective:function(){return Yt},perspectiveFromFieldOfView:function(){return at},perspectiveNO:function(){return vt},perspectiveZO:function(){return et},rotate:function(){return Lt},rotateX:function(){return At},rotateY:function(){return Dt},rotateZ:function(){return Se},scale:function(){return jt},set:function(){return ve},str:function(){return X},sub:function(){return ut},subtract:function(){return Ut},targetTo:function(){return ae},translate:function(){return ie},transpose:function(){return Gt}});var kt=mt(31767);function Rt(){var x=new kt.WT(16);return kt.WT!=Float32Array&&(x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[11]=0,x[12]=0,x[13]=0,x[14]=0),x[0]=1,x[5]=1,x[10]=1,x[15]=1,x}function be(x){var T=new kt.WT(16);return T[0]=x[0],T[1]=x[1],T[2]=x[2],T[3]=x[3],T[4]=x[4],T[5]=x[5],T[6]=x[6],T[7]=x[7],T[8]=x[8],T[9]=x[9],T[10]=x[10],T[11]=x[11],T[12]=x[12],T[13]=x[13],T[14]=x[14],T[15]=x[15],T}function We(x,T){return x[0]=T[0],x[1]=T[1],x[2]=T[2],x[3]=T[3],x[4]=T[4],x[5]=T[5],x[6]=T[6],x[7]=T[7],x[8]=T[8],x[9]=T[9],x[10]=T[10],x[11]=T[11],x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15],x}function te(x,T,W,$,J,ct,yt,St,Et,_t,zt,Ht,Ct,Wt,Qt,fe){var It=new kt.WT(16);return It[0]=x,It[1]=T,It[2]=W,It[3]=$,It[4]=J,It[5]=ct,It[6]=yt,It[7]=St,It[8]=Et,It[9]=_t,It[10]=zt,It[11]=Ht,It[12]=Ct,It[13]=Wt,It[14]=Qt,It[15]=fe,It}function ve(x,T,W,$,J,ct,yt,St,Et,_t,zt,Ht,Ct,Wt,Qt,fe,It){return x[0]=T,x[1]=W,x[2]=$,x[3]=J,x[4]=ct,x[5]=yt,x[6]=St,x[7]=Et,x[8]=_t,x[9]=zt,x[10]=Ht,x[11]=Ct,x[12]=Wt,x[13]=Qt,x[14]=fe,x[15]=It,x}function re(x){return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function Gt(x,T){if(x===T){var W=T[1],$=T[2],J=T[3],ct=T[6],yt=T[7],St=T[11];x[1]=T[4],x[2]=T[8],x[3]=T[12],x[4]=W,x[6]=T[9],x[7]=T[13],x[8]=$,x[9]=ct,x[11]=T[14],x[12]=J,x[13]=yt,x[14]=St}else x[0]=T[0],x[1]=T[4],x[2]=T[8],x[3]=T[12],x[4]=T[1],x[5]=T[5],x[6]=T[9],x[7]=T[13],x[8]=T[2],x[9]=T[6],x[10]=T[10],x[11]=T[14],x[12]=T[3],x[13]=T[7],x[14]=T[11],x[15]=T[15];return x}function dt(x,T){var W=T[0],$=T[1],J=T[2],ct=T[3],yt=T[4],St=T[5],Et=T[6],_t=T[7],zt=T[8],Ht=T[9],Ct=T[10],Wt=T[11],Qt=T[12],fe=T[13],It=T[14],we=T[15],qe=W*St-$*yt,Ae=W*Et-J*yt,Ie=W*_t-ct*yt,Le=$*Et-J*St,je=$*_t-ct*St,$n=J*_t-ct*Et,Xn=zt*fe-Ht*Qt,Un=zt*It-Ct*Qt,qn=zt*we-Wt*Qt,or=Ht*It-Ct*fe,sr=Ht*we-Wt*fe,Bn=Ct*we-Wt*It,on=qe*Bn-Ae*sr+Ie*or+Le*qn-je*Un+$n*Xn;return on?(on=1/on,x[0]=(St*Bn-Et*sr+_t*or)*on,x[1]=(J*sr-$*Bn-ct*or)*on,x[2]=(fe*$n-It*je+we*Le)*on,x[3]=(Ct*je-Ht*$n-Wt*Le)*on,x[4]=(Et*qn-yt*Bn-_t*Un)*on,x[5]=(W*Bn-J*qn+ct*Un)*on,x[6]=(It*Ie-Qt*$n-we*Ae)*on,x[7]=(zt*$n-Ct*Ie+Wt*Ae)*on,x[8]=(yt*sr-St*qn+_t*Xn)*on,x[9]=($*qn-W*sr-ct*Xn)*on,x[10]=(Qt*je-fe*Ie+we*qe)*on,x[11]=(Ht*Ie-zt*je-Wt*qe)*on,x[12]=(St*Un-yt*or-Et*Xn)*on,x[13]=(W*or-$*Un+J*Xn)*on,x[14]=(fe*Ae-Qt*Le-It*qe)*on,x[15]=(zt*Le-Ht*Ae+Ct*qe)*on,x):null}function he(x,T){var W=T[0],$=T[1],J=T[2],ct=T[3],yt=T[4],St=T[5],Et=T[6],_t=T[7],zt=T[8],Ht=T[9],Ct=T[10],Wt=T[11],Qt=T[12],fe=T[13],It=T[14],we=T[15];return x[0]=St*(Ct*we-Wt*It)-Ht*(Et*we-_t*It)+fe*(Et*Wt-_t*Ct),x[1]=-($*(Ct*we-Wt*It)-Ht*(J*we-ct*It)+fe*(J*Wt-ct*Ct)),x[2]=$*(Et*we-_t*It)-St*(J*we-ct*It)+fe*(J*_t-ct*Et),x[3]=-($*(Et*Wt-_t*Ct)-St*(J*Wt-ct*Ct)+Ht*(J*_t-ct*Et)),x[4]=-(yt*(Ct*we-Wt*It)-zt*(Et*we-_t*It)+Qt*(Et*Wt-_t*Ct)),x[5]=W*(Ct*we-Wt*It)-zt*(J*we-ct*It)+Qt*(J*Wt-ct*Ct),x[6]=-(W*(Et*we-_t*It)-yt*(J*we-ct*It)+Qt*(J*_t-ct*Et)),x[7]=W*(Et*Wt-_t*Ct)-yt*(J*Wt-ct*Ct)+zt*(J*_t-ct*Et),x[8]=yt*(Ht*we-Wt*fe)-zt*(St*we-_t*fe)+Qt*(St*Wt-_t*Ht),x[9]=-(W*(Ht*we-Wt*fe)-zt*($*we-ct*fe)+Qt*($*Wt-ct*Ht)),x[10]=W*(St*we-_t*fe)-yt*($*we-ct*fe)+Qt*($*_t-ct*St),x[11]=-(W*(St*Wt-_t*Ht)-yt*($*Wt-ct*Ht)+zt*($*_t-ct*St)),x[12]=-(yt*(Ht*It-Ct*fe)-zt*(St*It-Et*fe)+Qt*(St*Ct-Et*Ht)),x[13]=W*(Ht*It-Ct*fe)-zt*($*It-J*fe)+Qt*($*Ct-J*Ht),x[14]=-(W*(St*It-Et*fe)-yt*($*It-J*fe)+Qt*($*Et-J*St)),x[15]=W*(St*Ct-Et*Ht)-yt*($*Ct-J*Ht)+zt*($*Et-J*St),x}function Zt(x){var T=x[0],W=x[1],$=x[2],J=x[3],ct=x[4],yt=x[5],St=x[6],Et=x[7],_t=x[8],zt=x[9],Ht=x[10],Ct=x[11],Wt=x[12],Qt=x[13],fe=x[14],It=x[15],we=T*yt-W*ct,qe=T*St-$*ct,Ae=T*Et-J*ct,Ie=W*St-$*yt,Le=W*Et-J*yt,je=$*Et-J*St,$n=_t*Qt-zt*Wt,Xn=_t*fe-Ht*Wt,Un=_t*It-Ct*Wt,qn=zt*fe-Ht*Qt,or=zt*It-Ct*Qt,sr=Ht*It-Ct*fe;return we*sr-qe*or+Ae*qn+Ie*Un-Le*Xn+je*$n}function ue(x,T,W){var $=T[0],J=T[1],ct=T[2],yt=T[3],St=T[4],Et=T[5],_t=T[6],zt=T[7],Ht=T[8],Ct=T[9],Wt=T[10],Qt=T[11],fe=T[12],It=T[13],we=T[14],qe=T[15],Ae=W[0],Ie=W[1],Le=W[2],je=W[3];return x[0]=Ae*$+Ie*St+Le*Ht+je*fe,x[1]=Ae*J+Ie*Et+Le*Ct+je*It,x[2]=Ae*ct+Ie*_t+Le*Wt+je*we,x[3]=Ae*yt+Ie*zt+Le*Qt+je*qe,Ae=W[4],Ie=W[5],Le=W[6],je=W[7],x[4]=Ae*$+Ie*St+Le*Ht+je*fe,x[5]=Ae*J+Ie*Et+Le*Ct+je*It,x[6]=Ae*ct+Ie*_t+Le*Wt+je*we,x[7]=Ae*yt+Ie*zt+Le*Qt+je*qe,Ae=W[8],Ie=W[9],Le=W[10],je=W[11],x[8]=Ae*$+Ie*St+Le*Ht+je*fe,x[9]=Ae*J+Ie*Et+Le*Ct+je*It,x[10]=Ae*ct+Ie*_t+Le*Wt+je*we,x[11]=Ae*yt+Ie*zt+Le*Qt+je*qe,Ae=W[12],Ie=W[13],Le=W[14],je=W[15],x[12]=Ae*$+Ie*St+Le*Ht+je*fe,x[13]=Ae*J+Ie*Et+Le*Ct+je*It,x[14]=Ae*ct+Ie*_t+Le*Wt+je*we,x[15]=Ae*yt+Ie*zt+Le*Qt+je*qe,x}function ie(x,T,W){var $=W[0],J=W[1],ct=W[2],yt,St,Et,_t,zt,Ht,Ct,Wt,Qt,fe,It,we;return T===x?(x[12]=T[0]*$+T[4]*J+T[8]*ct+T[12],x[13]=T[1]*$+T[5]*J+T[9]*ct+T[13],x[14]=T[2]*$+T[6]*J+T[10]*ct+T[14],x[15]=T[3]*$+T[7]*J+T[11]*ct+T[15]):(yt=T[0],St=T[1],Et=T[2],_t=T[3],zt=T[4],Ht=T[5],Ct=T[6],Wt=T[7],Qt=T[8],fe=T[9],It=T[10],we=T[11],x[0]=yt,x[1]=St,x[2]=Et,x[3]=_t,x[4]=zt,x[5]=Ht,x[6]=Ct,x[7]=Wt,x[8]=Qt,x[9]=fe,x[10]=It,x[11]=we,x[12]=yt*$+zt*J+Qt*ct+T[12],x[13]=St*$+Ht*J+fe*ct+T[13],x[14]=Et*$+Ct*J+It*ct+T[14],x[15]=_t*$+Wt*J+we*ct+T[15]),x}function jt(x,T,W){var $=W[0],J=W[1],ct=W[2];return x[0]=T[0]*$,x[1]=T[1]*$,x[2]=T[2]*$,x[3]=T[3]*$,x[4]=T[4]*J,x[5]=T[5]*J,x[6]=T[6]*J,x[7]=T[7]*J,x[8]=T[8]*ct,x[9]=T[9]*ct,x[10]=T[10]*ct,x[11]=T[11]*ct,x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15],x}function Lt(x,T,W,$){var J=$[0],ct=$[1],yt=$[2],St=Math.hypot(J,ct,yt),Et,_t,zt,Ht,Ct,Wt,Qt,fe,It,we,qe,Ae,Ie,Le,je,$n,Xn,Un,qn,or,sr,Bn,on,Kr;return St<kt.Ib?null:(St=1/St,J*=St,ct*=St,yt*=St,Et=Math.sin(W),_t=Math.cos(W),zt=1-_t,Ht=T[0],Ct=T[1],Wt=T[2],Qt=T[3],fe=T[4],It=T[5],we=T[6],qe=T[7],Ae=T[8],Ie=T[9],Le=T[10],je=T[11],$n=J*J*zt+_t,Xn=ct*J*zt+yt*Et,Un=yt*J*zt-ct*Et,qn=J*ct*zt-yt*Et,or=ct*ct*zt+_t,sr=yt*ct*zt+J*Et,Bn=J*yt*zt+ct*Et,on=ct*yt*zt-J*Et,Kr=yt*yt*zt+_t,x[0]=Ht*$n+fe*Xn+Ae*Un,x[1]=Ct*$n+It*Xn+Ie*Un,x[2]=Wt*$n+we*Xn+Le*Un,x[3]=Qt*$n+qe*Xn+je*Un,x[4]=Ht*qn+fe*or+Ae*sr,x[5]=Ct*qn+It*or+Ie*sr,x[6]=Wt*qn+we*or+Le*sr,x[7]=Qt*qn+qe*or+je*sr,x[8]=Ht*Bn+fe*on+Ae*Kr,x[9]=Ct*Bn+It*on+Ie*Kr,x[10]=Wt*Bn+we*on+Le*Kr,x[11]=Qt*Bn+qe*on+je*Kr,T!==x&&(x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15]),x)}function At(x,T,W){var $=Math.sin(W),J=Math.cos(W),ct=T[4],yt=T[5],St=T[6],Et=T[7],_t=T[8],zt=T[9],Ht=T[10],Ct=T[11];return T!==x&&(x[0]=T[0],x[1]=T[1],x[2]=T[2],x[3]=T[3],x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15]),x[4]=ct*J+_t*$,x[5]=yt*J+zt*$,x[6]=St*J+Ht*$,x[7]=Et*J+Ct*$,x[8]=_t*J-ct*$,x[9]=zt*J-yt*$,x[10]=Ht*J-St*$,x[11]=Ct*J-Et*$,x}function Dt(x,T,W){var $=Math.sin(W),J=Math.cos(W),ct=T[0],yt=T[1],St=T[2],Et=T[3],_t=T[8],zt=T[9],Ht=T[10],Ct=T[11];return T!==x&&(x[4]=T[4],x[5]=T[5],x[6]=T[6],x[7]=T[7],x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15]),x[0]=ct*J-_t*$,x[1]=yt*J-zt*$,x[2]=St*J-Ht*$,x[3]=Et*J-Ct*$,x[8]=ct*$+_t*J,x[9]=yt*$+zt*J,x[10]=St*$+Ht*J,x[11]=Et*$+Ct*J,x}function Se(x,T,W){var $=Math.sin(W),J=Math.cos(W),ct=T[0],yt=T[1],St=T[2],Et=T[3],_t=T[4],zt=T[5],Ht=T[6],Ct=T[7];return T!==x&&(x[8]=T[8],x[9]=T[9],x[10]=T[10],x[11]=T[11],x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15]),x[0]=ct*J+_t*$,x[1]=yt*J+zt*$,x[2]=St*J+Ht*$,x[3]=Et*J+Ct*$,x[4]=_t*J-ct*$,x[5]=zt*J-yt*$,x[6]=Ht*J-St*$,x[7]=Ct*J-Et*$,x}function ke(x,T){return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=T[0],x[13]=T[1],x[14]=T[2],x[15]=1,x}function Je(x,T){return x[0]=T[0],x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=T[1],x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=T[2],x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function $e(x,T,W){var $=W[0],J=W[1],ct=W[2],yt=Math.hypot($,J,ct),St,Et,_t;return yt<kt.Ib?null:(yt=1/yt,$*=yt,J*=yt,ct*=yt,St=Math.sin(T),Et=Math.cos(T),_t=1-Et,x[0]=$*$*_t+Et,x[1]=J*$*_t+ct*St,x[2]=ct*$*_t-J*St,x[3]=0,x[4]=$*J*_t-ct*St,x[5]=J*J*_t+Et,x[6]=ct*J*_t+$*St,x[7]=0,x[8]=$*ct*_t+J*St,x[9]=J*ct*_t-$*St,x[10]=ct*ct*_t+Et,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x)}function Ze(x,T){var W=Math.sin(T),$=Math.cos(T);return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=$,x[6]=W,x[7]=0,x[8]=0,x[9]=-W,x[10]=$,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function un(x,T){var W=Math.sin(T),$=Math.cos(T);return x[0]=$,x[1]=0,x[2]=-W,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=W,x[9]=0,x[10]=$,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function Xe(x,T){var W=Math.sin(T),$=Math.cos(T);return x[0]=$,x[1]=W,x[2]=0,x[3]=0,x[4]=-W,x[5]=$,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function ze(x,T,W){var $=T[0],J=T[1],ct=T[2],yt=T[3],St=$+$,Et=J+J,_t=ct+ct,zt=$*St,Ht=$*Et,Ct=$*_t,Wt=J*Et,Qt=J*_t,fe=ct*_t,It=yt*St,we=yt*Et,qe=yt*_t;return x[0]=1-(Wt+fe),x[1]=Ht+qe,x[2]=Ct-we,x[3]=0,x[4]=Ht-qe,x[5]=1-(zt+fe),x[6]=Qt+It,x[7]=0,x[8]=Ct+we,x[9]=Qt-It,x[10]=1-(zt+Wt),x[11]=0,x[12]=W[0],x[13]=W[1],x[14]=W[2],x[15]=1,x}function ln(x,T){var W=new kt.WT(3),$=-T[0],J=-T[1],ct=-T[2],yt=T[3],St=T[4],Et=T[5],_t=T[6],zt=T[7],Ht=$*$+J*J+ct*ct+yt*yt;return Ht>0?(W[0]=(St*yt+zt*$+Et*ct-_t*J)*2/Ht,W[1]=(Et*yt+zt*J+_t*$-St*ct)*2/Ht,W[2]=(_t*yt+zt*ct+St*J-Et*$)*2/Ht):(W[0]=(St*yt+zt*$+Et*ct-_t*J)*2,W[1]=(Et*yt+zt*J+_t*$-St*ct)*2,W[2]=(_t*yt+zt*ct+St*J-Et*$)*2),ze(x,T,W),x}function Oe(x,T){return x[0]=T[12],x[1]=T[13],x[2]=T[14],x}function Me(x,T){var W=T[0],$=T[1],J=T[2],ct=T[4],yt=T[5],St=T[6],Et=T[8],_t=T[9],zt=T[10];return x[0]=Math.hypot(W,$,J),x[1]=Math.hypot(ct,yt,St),x[2]=Math.hypot(Et,_t,zt),x}function gn(x,T){var W=new kt.WT(3);Me(W,T);var $=1/W[0],J=1/W[1],ct=1/W[2],yt=T[0]*$,St=T[1]*J,Et=T[2]*ct,_t=T[4]*$,zt=T[5]*J,Ht=T[6]*ct,Ct=T[8]*$,Wt=T[9]*J,Qt=T[10]*ct,fe=yt+zt+Qt,It=0;return fe>0?(It=Math.sqrt(fe+1)*2,x[3]=.25*It,x[0]=(Ht-Wt)/It,x[1]=(Ct-Et)/It,x[2]=(St-_t)/It):yt>zt&&yt>Qt?(It=Math.sqrt(1+yt-zt-Qt)*2,x[3]=(Ht-Wt)/It,x[0]=.25*It,x[1]=(St+_t)/It,x[2]=(Ct+Et)/It):zt>Qt?(It=Math.sqrt(1+zt-yt-Qt)*2,x[3]=(Ct-Et)/It,x[0]=(St+_t)/It,x[1]=.25*It,x[2]=(Ht+Wt)/It):(It=Math.sqrt(1+Qt-yt-zt)*2,x[3]=(St-_t)/It,x[0]=(Ct+Et)/It,x[1]=(Ht+Wt)/It,x[2]=.25*It),x}function Fn(x,T,W,$){var J=T[0],ct=T[1],yt=T[2],St=T[3],Et=J+J,_t=ct+ct,zt=yt+yt,Ht=J*Et,Ct=J*_t,Wt=J*zt,Qt=ct*_t,fe=ct*zt,It=yt*zt,we=St*Et,qe=St*_t,Ae=St*zt,Ie=$[0],Le=$[1],je=$[2];return x[0]=(1-(Qt+It))*Ie,x[1]=(Ct+Ae)*Ie,x[2]=(Wt-qe)*Ie,x[3]=0,x[4]=(Ct-Ae)*Le,x[5]=(1-(Ht+It))*Le,x[6]=(fe+we)*Le,x[7]=0,x[8]=(Wt+qe)*je,x[9]=(fe-we)*je,x[10]=(1-(Ht+Qt))*je,x[11]=0,x[12]=W[0],x[13]=W[1],x[14]=W[2],x[15]=1,x}function Jn(x,T,W,$,J){var ct=T[0],yt=T[1],St=T[2],Et=T[3],_t=ct+ct,zt=yt+yt,Ht=St+St,Ct=ct*_t,Wt=ct*zt,Qt=ct*Ht,fe=yt*zt,It=yt*Ht,we=St*Ht,qe=Et*_t,Ae=Et*zt,Ie=Et*Ht,Le=$[0],je=$[1],$n=$[2],Xn=J[0],Un=J[1],qn=J[2],or=(1-(fe+we))*Le,sr=(Wt+Ie)*Le,Bn=(Qt-Ae)*Le,on=(Wt-Ie)*je,Kr=(1-(Ct+we))*je,wa=(It+qe)*je,Sa=(Qt+Ae)*$n,Ts=(It-qe)*$n,Ma=(1-(Ct+fe))*$n;return x[0]=or,x[1]=sr,x[2]=Bn,x[3]=0,x[4]=on,x[5]=Kr,x[6]=wa,x[7]=0,x[8]=Sa,x[9]=Ts,x[10]=Ma,x[11]=0,x[12]=W[0]+Xn-(or*Xn+on*Un+Sa*qn),x[13]=W[1]+Un-(sr*Xn+Kr*Un+Ts*qn),x[14]=W[2]+qn-(Bn*Xn+wa*Un+Ma*qn),x[15]=1,x}function fn(x,T){var W=T[0],$=T[1],J=T[2],ct=T[3],yt=W+W,St=$+$,Et=J+J,_t=W*yt,zt=$*yt,Ht=$*St,Ct=J*yt,Wt=J*St,Qt=J*Et,fe=ct*yt,It=ct*St,we=ct*Et;return x[0]=1-Ht-Qt,x[1]=zt+we,x[2]=Ct-It,x[3]=0,x[4]=zt-we,x[5]=1-_t-Qt,x[6]=Wt+fe,x[7]=0,x[8]=Ct+It,x[9]=Wt-fe,x[10]=1-_t-Ht,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function yn(x,T,W,$,J,ct,yt){var St=1/(W-T),Et=1/(J-$),_t=1/(ct-yt);return x[0]=ct*2*St,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=ct*2*Et,x[6]=0,x[7]=0,x[8]=(W+T)*St,x[9]=(J+$)*Et,x[10]=(yt+ct)*_t,x[11]=-1,x[12]=0,x[13]=0,x[14]=yt*ct*2*_t,x[15]=0,x}function vt(x,T,W,$,J){var ct=1/Math.tan(T/2),yt;return x[0]=ct/W,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=ct,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[11]=-1,x[12]=0,x[13]=0,x[15]=0,J!=null&&J!==1/0?(yt=1/($-J),x[10]=(J+$)*yt,x[14]=2*J*$*yt):(x[10]=-1,x[14]=-2*$),x}var Yt=vt;function et(x,T,W,$,J){var ct=1/Math.tan(T/2),yt;return x[0]=ct/W,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=ct,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[11]=-1,x[12]=0,x[13]=0,x[15]=0,J!=null&&J!==1/0?(yt=1/($-J),x[10]=J*yt,x[14]=J*$*yt):(x[10]=-1,x[14]=-$),x}function at(x,T,W,$){var J=Math.tan(T.upDegrees*Math.PI/180),ct=Math.tan(T.downDegrees*Math.PI/180),yt=Math.tan(T.leftDegrees*Math.PI/180),St=Math.tan(T.rightDegrees*Math.PI/180),Et=2/(yt+St),_t=2/(J+ct);return x[0]=Et,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=_t,x[6]=0,x[7]=0,x[8]=-((yt-St)*Et*.5),x[9]=(J-ct)*_t*.5,x[10]=$/(W-$),x[11]=-1,x[12]=0,x[13]=0,x[14]=$*W/(W-$),x[15]=0,x}function Ot(x,T,W,$,J,ct,yt){var St=1/(T-W),Et=1/($-J),_t=1/(ct-yt);return x[0]=-2*St,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=-2*Et,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=2*_t,x[11]=0,x[12]=(T+W)*St,x[13]=(J+$)*Et,x[14]=(yt+ct)*_t,x[15]=1,x}var gt=Ot;function $t(x,T,W,$,J,ct,yt){var St=1/(T-W),Et=1/($-J),_t=1/(ct-yt);return x[0]=-2*St,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=-2*Et,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=_t,x[11]=0,x[12]=(T+W)*St,x[13]=(J+$)*Et,x[14]=ct*_t,x[15]=1,x}function Ft(x,T,W,$){var J,ct,yt,St,Et,_t,zt,Ht,Ct,Wt,Qt=T[0],fe=T[1],It=T[2],we=$[0],qe=$[1],Ae=$[2],Ie=W[0],Le=W[1],je=W[2];return Math.abs(Qt-Ie)<kt.Ib&&Math.abs(fe-Le)<kt.Ib&&Math.abs(It-je)<kt.Ib?re(x):(zt=Qt-Ie,Ht=fe-Le,Ct=It-je,Wt=1/Math.hypot(zt,Ht,Ct),zt*=Wt,Ht*=Wt,Ct*=Wt,J=qe*Ct-Ae*Ht,ct=Ae*zt-we*Ct,yt=we*Ht-qe*zt,Wt=Math.hypot(J,ct,yt),Wt?(Wt=1/Wt,J*=Wt,ct*=Wt,yt*=Wt):(J=0,ct=0,yt=0),St=Ht*yt-Ct*ct,Et=Ct*J-zt*yt,_t=zt*ct-Ht*J,Wt=Math.hypot(St,Et,_t),Wt?(Wt=1/Wt,St*=Wt,Et*=Wt,_t*=Wt):(St=0,Et=0,_t=0),x[0]=J,x[1]=St,x[2]=zt,x[3]=0,x[4]=ct,x[5]=Et,x[6]=Ht,x[7]=0,x[8]=yt,x[9]=_t,x[10]=Ct,x[11]=0,x[12]=-(J*Qt+ct*fe+yt*It),x[13]=-(St*Qt+Et*fe+_t*It),x[14]=-(zt*Qt+Ht*fe+Ct*It),x[15]=1,x)}function ae(x,T,W,$){var J=T[0],ct=T[1],yt=T[2],St=$[0],Et=$[1],_t=$[2],zt=J-W[0],Ht=ct-W[1],Ct=yt-W[2],Wt=zt*zt+Ht*Ht+Ct*Ct;Wt>0&&(Wt=1/Math.sqrt(Wt),zt*=Wt,Ht*=Wt,Ct*=Wt);var Qt=Et*Ct-_t*Ht,fe=_t*zt-St*Ct,It=St*Ht-Et*zt;return Wt=Qt*Qt+fe*fe+It*It,Wt>0&&(Wt=1/Math.sqrt(Wt),Qt*=Wt,fe*=Wt,It*=Wt),x[0]=Qt,x[1]=fe,x[2]=It,x[3]=0,x[4]=Ht*It-Ct*fe,x[5]=Ct*Qt-zt*It,x[6]=zt*fe-Ht*Qt,x[7]=0,x[8]=zt,x[9]=Ht,x[10]=Ct,x[11]=0,x[12]=J,x[13]=ct,x[14]=yt,x[15]=1,x}function X(x){return"mat4("+x[0]+", "+x[1]+", "+x[2]+", "+x[3]+", "+x[4]+", "+x[5]+", "+x[6]+", "+x[7]+", "+x[8]+", "+x[9]+", "+x[10]+", "+x[11]+", "+x[12]+", "+x[13]+", "+x[14]+", "+x[15]+")"}function lt(x){return Math.hypot(x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15])}function ht(x,T,W){return x[0]=T[0]+W[0],x[1]=T[1]+W[1],x[2]=T[2]+W[2],x[3]=T[3]+W[3],x[4]=T[4]+W[4],x[5]=T[5]+W[5],x[6]=T[6]+W[6],x[7]=T[7]+W[7],x[8]=T[8]+W[8],x[9]=T[9]+W[9],x[10]=T[10]+W[10],x[11]=T[11]+W[11],x[12]=T[12]+W[12],x[13]=T[13]+W[13],x[14]=T[14]+W[14],x[15]=T[15]+W[15],x}function Ut(x,T,W){return x[0]=T[0]-W[0],x[1]=T[1]-W[1],x[2]=T[2]-W[2],x[3]=T[3]-W[3],x[4]=T[4]-W[4],x[5]=T[5]-W[5],x[6]=T[6]-W[6],x[7]=T[7]-W[7],x[8]=T[8]-W[8],x[9]=T[9]-W[9],x[10]=T[10]-W[10],x[11]=T[11]-W[11],x[12]=T[12]-W[12],x[13]=T[13]-W[13],x[14]=T[14]-W[14],x[15]=T[15]-W[15],x}function Q(x,T,W){return x[0]=T[0]*W,x[1]=T[1]*W,x[2]=T[2]*W,x[3]=T[3]*W,x[4]=T[4]*W,x[5]=T[5]*W,x[6]=T[6]*W,x[7]=T[7]*W,x[8]=T[8]*W,x[9]=T[9]*W,x[10]=T[10]*W,x[11]=T[11]*W,x[12]=T[12]*W,x[13]=T[13]*W,x[14]=T[14]*W,x[15]=T[15]*W,x}function st(x,T,W,$){return x[0]=T[0]+W[0]*$,x[1]=T[1]+W[1]*$,x[2]=T[2]+W[2]*$,x[3]=T[3]+W[3]*$,x[4]=T[4]+W[4]*$,x[5]=T[5]+W[5]*$,x[6]=T[6]+W[6]*$,x[7]=T[7]+W[7]*$,x[8]=T[8]+W[8]*$,x[9]=T[9]+W[9]*$,x[10]=T[10]+W[10]*$,x[11]=T[11]+W[11]*$,x[12]=T[12]+W[12]*$,x[13]=T[13]+W[13]*$,x[14]=T[14]+W[14]*$,x[15]=T[15]+W[15]*$,x}function xt(x,T){return x[0]===T[0]&&x[1]===T[1]&&x[2]===T[2]&&x[3]===T[3]&&x[4]===T[4]&&x[5]===T[5]&&x[6]===T[6]&&x[7]===T[7]&&x[8]===T[8]&&x[9]===T[9]&&x[10]===T[10]&&x[11]===T[11]&&x[12]===T[12]&&x[13]===T[13]&&x[14]===T[14]&&x[15]===T[15]}function H(x,T){var W=x[0],$=x[1],J=x[2],ct=x[3],yt=x[4],St=x[5],Et=x[6],_t=x[7],zt=x[8],Ht=x[9],Ct=x[10],Wt=x[11],Qt=x[12],fe=x[13],It=x[14],we=x[15],qe=T[0],Ae=T[1],Ie=T[2],Le=T[3],je=T[4],$n=T[5],Xn=T[6],Un=T[7],qn=T[8],or=T[9],sr=T[10],Bn=T[11],on=T[12],Kr=T[13],wa=T[14],Sa=T[15];return Math.abs(W-qe)<=kt.Ib*Math.max(1,Math.abs(W),Math.abs(qe))&&Math.abs($-Ae)<=kt.Ib*Math.max(1,Math.abs($),Math.abs(Ae))&&Math.abs(J-Ie)<=kt.Ib*Math.max(1,Math.abs(J),Math.abs(Ie))&&Math.abs(ct-Le)<=kt.Ib*Math.max(1,Math.abs(ct),Math.abs(Le))&&Math.abs(yt-je)<=kt.Ib*Math.max(1,Math.abs(yt),Math.abs(je))&&Math.abs(St-$n)<=kt.Ib*Math.max(1,Math.abs(St),Math.abs($n))&&Math.abs(Et-Xn)<=kt.Ib*Math.max(1,Math.abs(Et),Math.abs(Xn))&&Math.abs(_t-Un)<=kt.Ib*Math.max(1,Math.abs(_t),Math.abs(Un))&&Math.abs(zt-qn)<=kt.Ib*Math.max(1,Math.abs(zt),Math.abs(qn))&&Math.abs(Ht-or)<=kt.Ib*Math.max(1,Math.abs(Ht),Math.abs(or))&&Math.abs(Ct-sr)<=kt.Ib*Math.max(1,Math.abs(Ct),Math.abs(sr))&&Math.abs(Wt-Bn)<=kt.Ib*Math.max(1,Math.abs(Wt),Math.abs(Bn))&&Math.abs(Qt-on)<=kt.Ib*Math.max(1,Math.abs(Qt),Math.abs(on))&&Math.abs(fe-Kr)<=kt.Ib*Math.max(1,Math.abs(fe),Math.abs(Kr))&&Math.abs(It-wa)<=kt.Ib*Math.max(1,Math.abs(It),Math.abs(wa))&&Math.abs(we-Sa)<=kt.Ib*Math.max(1,Math.abs(we),Math.abs(Sa))}var K=ue,ut=Ut},38015:function(Ye,Ve,mt){"use strict";mt.d(Ve,{$X:function(){return Gt},AK:function(){return ze},Fv:function(){return Xe},I6:function(){return at},IH:function(){return re},JG:function(){return te},Ue:function(){return Rt},al:function(){return We},lu:function(){return $t},t7:function(){return Oe},t8:function(){return ve},tk:function(){return Ze}});var kt=mt(31767);function Rt(){var Q=new kt.WT(2);return kt.WT!=Float32Array&&(Q[0]=0,Q[1]=0),Q}function be(Q){var st=new glMatrix.ARRAY_TYPE(2);return st[0]=Q[0],st[1]=Q[1],st}function We(Q,st){var xt=new kt.WT(2);return xt[0]=Q,xt[1]=st,xt}function te(Q,st){return Q[0]=st[0],Q[1]=st[1],Q}function ve(Q,st,xt){return Q[0]=st,Q[1]=xt,Q}function re(Q,st,xt){return Q[0]=st[0]+xt[0],Q[1]=st[1]+xt[1],Q}function Gt(Q,st,xt){return Q[0]=st[0]-xt[0],Q[1]=st[1]-xt[1],Q}function dt(Q,st,xt){return Q[0]=st[0]*xt[0],Q[1]=st[1]*xt[1],Q}function he(Q,st,xt){return Q[0]=st[0]/xt[0],Q[1]=st[1]/xt[1],Q}function Zt(Q,st){return Q[0]=Math.ceil(st[0]),Q[1]=Math.ceil(st[1]),Q}function ue(Q,st){return Q[0]=Math.floor(st[0]),Q[1]=Math.floor(st[1]),Q}function ie(Q,st,xt){return Q[0]=Math.min(st[0],xt[0]),Q[1]=Math.min(st[1],xt[1]),Q}function jt(Q,st,xt){return Q[0]=Math.max(st[0],xt[0]),Q[1]=Math.max(st[1],xt[1]),Q}function Lt(Q,st){return Q[0]=Math.round(st[0]),Q[1]=Math.round(st[1]),Q}function At(Q,st,xt){return Q[0]=st[0]*xt,Q[1]=st[1]*xt,Q}function Dt(Q,st,xt,H){return Q[0]=st[0]+xt[0]*H,Q[1]=st[1]+xt[1]*H,Q}function Se(Q,st){var xt=st[0]-Q[0],H=st[1]-Q[1];return Math.hypot(xt,H)}function ke(Q,st){var xt=st[0]-Q[0],H=st[1]-Q[1];return xt*xt+H*H}function Je(Q){var st=Q[0],xt=Q[1];return Math.hypot(st,xt)}function $e(Q){var st=Q[0],xt=Q[1];return st*st+xt*xt}function Ze(Q,st){return Q[0]=-st[0],Q[1]=-st[1],Q}function un(Q,st){return Q[0]=1/st[0],Q[1]=1/st[1],Q}function Xe(Q,st){var xt=st[0],H=st[1],K=xt*xt+H*H;return K>0&&(K=1/Math.sqrt(K)),Q[0]=st[0]*K,Q[1]=st[1]*K,Q}function ze(Q,st){return Q[0]*st[0]+Q[1]*st[1]}function ln(Q,st,xt){var H=st[0]*xt[1]-st[1]*xt[0];return Q[0]=Q[1]=0,Q[2]=H,Q}function Oe(Q,st,xt,H){var K=st[0],ut=st[1];return Q[0]=K+H*(xt[0]-K),Q[1]=ut+H*(xt[1]-ut),Q}function Me(Q,st){st=st||1;var xt=glMatrix.RANDOM()*2*Math.PI;return Q[0]=Math.cos(xt)*st,Q[1]=Math.sin(xt)*st,Q}function gn(Q,st,xt){var H=st[0],K=st[1];return Q[0]=xt[0]*H+xt[2]*K,Q[1]=xt[1]*H+xt[3]*K,Q}function Fn(Q,st,xt){var H=st[0],K=st[1];return Q[0]=xt[0]*H+xt[2]*K+xt[4],Q[1]=xt[1]*H+xt[3]*K+xt[5],Q}function Jn(Q,st,xt){var H=st[0],K=st[1];return Q[0]=xt[0]*H+xt[3]*K+xt[6],Q[1]=xt[1]*H+xt[4]*K+xt[7],Q}function fn(Q,st,xt){var H=st[0],K=st[1];return Q[0]=xt[0]*H+xt[4]*K+xt[12],Q[1]=xt[1]*H+xt[5]*K+xt[13],Q}function yn(Q,st,xt,H){var K=st[0]-xt[0],ut=st[1]-xt[1],x=Math.sin(H),T=Math.cos(H);return Q[0]=K*T-ut*x+xt[0],Q[1]=K*x+ut*T+xt[1],Q}function vt(Q,st){var xt=Q[0],H=Q[1],K=st[0],ut=st[1],x=Math.sqrt(xt*xt+H*H)*Math.sqrt(K*K+ut*ut),T=x&&(xt*K+H*ut)/x;return Math.acos(Math.min(Math.max(T,-1),1))}function Yt(Q){return Q[0]=0,Q[1]=0,Q}function et(Q){return"vec2("+Q[0]+", "+Q[1]+")"}function at(Q,st){return Q[0]===st[0]&&Q[1]===st[1]}function Ot(Q,st){var xt=Q[0],H=Q[1],K=st[0],ut=st[1];return Math.abs(xt-K)<=glMatrix.EPSILON*Math.max(1,Math.abs(xt),Math.abs(K))&&Math.abs(H-ut)<=glMatrix.EPSILON*Math.max(1,Math.abs(H),Math.abs(ut))}var gt=null,$t=Gt,Ft=null,ae=null,X=null,lt=null,ht=null,Ut=function(){var Q=Rt();return function(st,xt,H,K,ut,x){var T,W;for(xt||(xt=2),H||(H=0),K?W=Math.min(K*xt+H,st.length):W=st.length,T=H;T<W;T+=xt)Q[0]=st[T],Q[1]=st[T+1],ut(Q,Q,x),st[T]=Q[0],st[T+1]=Q[1];return st}}()},54442:function(Ye,Ve,mt){"use strict";mt.r(Ve),mt.d(Ve,{add:function(){return Gt},angle:function(){return at},bezier:function(){return gn},ceil:function(){return ue},clone:function(){return be},copy:function(){return ve},create:function(){return Rt},cross:function(){return ln},dist:function(){return ht},distance:function(){return ke},div:function(){return lt},divide:function(){return Zt},dot:function(){return ze},equals:function(){return Ft},exactEquals:function(){return $t},floor:function(){return ie},forEach:function(){return xt},fromValues:function(){return te},hermite:function(){return Me},inverse:function(){return un},len:function(){return Q},length:function(){return We},lerp:function(){return Oe},max:function(){return Lt},min:function(){return jt},mul:function(){return X},multiply:function(){return he},negate:function(){return Ze},normalize:function(){return Xe},random:function(){return Fn},rotateX:function(){return vt},rotateY:function(){return Yt},rotateZ:function(){return et},round:function(){return At},scale:function(){return Dt},scaleAndAdd:function(){return Se},set:function(){return re},sqrDist:function(){return Ut},sqrLen:function(){return st},squaredDistance:function(){return Je},squaredLength:function(){return $e},str:function(){return gt},sub:function(){return ae},subtract:function(){return dt},transformMat3:function(){return fn},transformMat4:function(){return Jn},transformQuat:function(){return yn},zero:function(){return Ot}});var kt=mt(31767);function Rt(){var H=new kt.WT(3);return kt.WT!=Float32Array&&(H[0]=0,H[1]=0,H[2]=0),H}function be(H){var K=new kt.WT(3);return K[0]=H[0],K[1]=H[1],K[2]=H[2],K}function We(H){var K=H[0],ut=H[1],x=H[2];return Math.hypot(K,ut,x)}function te(H,K,ut){var x=new kt.WT(3);return x[0]=H,x[1]=K,x[2]=ut,x}function ve(H,K){return H[0]=K[0],H[1]=K[1],H[2]=K[2],H}function re(H,K,ut,x){return H[0]=K,H[1]=ut,H[2]=x,H}function Gt(H,K,ut){return H[0]=K[0]+ut[0],H[1]=K[1]+ut[1],H[2]=K[2]+ut[2],H}function dt(H,K,ut){return H[0]=K[0]-ut[0],H[1]=K[1]-ut[1],H[2]=K[2]-ut[2],H}function he(H,K,ut){return H[0]=K[0]*ut[0],H[1]=K[1]*ut[1],H[2]=K[2]*ut[2],H}function Zt(H,K,ut){return H[0]=K[0]/ut[0],H[1]=K[1]/ut[1],H[2]=K[2]/ut[2],H}function ue(H,K){return H[0]=Math.ceil(K[0]),H[1]=Math.ceil(K[1]),H[2]=Math.ceil(K[2]),H}function ie(H,K){return H[0]=Math.floor(K[0]),H[1]=Math.floor(K[1]),H[2]=Math.floor(K[2]),H}function jt(H,K,ut){return H[0]=Math.min(K[0],ut[0]),H[1]=Math.min(K[1],ut[1]),H[2]=Math.min(K[2],ut[2]),H}function Lt(H,K,ut){return H[0]=Math.max(K[0],ut[0]),H[1]=Math.max(K[1],ut[1]),H[2]=Math.max(K[2],ut[2]),H}function At(H,K){return H[0]=Math.round(K[0]),H[1]=Math.round(K[1]),H[2]=Math.round(K[2]),H}function Dt(H,K,ut){return H[0]=K[0]*ut,H[1]=K[1]*ut,H[2]=K[2]*ut,H}function Se(H,K,ut,x){return H[0]=K[0]+ut[0]*x,H[1]=K[1]+ut[1]*x,H[2]=K[2]+ut[2]*x,H}function ke(H,K){var ut=K[0]-H[0],x=K[1]-H[1],T=K[2]-H[2];return Math.hypot(ut,x,T)}function Je(H,K){var ut=K[0]-H[0],x=K[1]-H[1],T=K[2]-H[2];return ut*ut+x*x+T*T}function $e(H){var K=H[0],ut=H[1],x=H[2];return K*K+ut*ut+x*x}function Ze(H,K){return H[0]=-K[0],H[1]=-K[1],H[2]=-K[2],H}function un(H,K){return H[0]=1/K[0],H[1]=1/K[1],H[2]=1/K[2],H}function Xe(H,K){var ut=K[0],x=K[1],T=K[2],W=ut*ut+x*x+T*T;return W>0&&(W=1/Math.sqrt(W)),H[0]=K[0]*W,H[1]=K[1]*W,H[2]=K[2]*W,H}function ze(H,K){return H[0]*K[0]+H[1]*K[1]+H[2]*K[2]}function ln(H,K,ut){var x=K[0],T=K[1],W=K[2],$=ut[0],J=ut[1],ct=ut[2];return H[0]=T*ct-W*J,H[1]=W*$-x*ct,H[2]=x*J-T*$,H}function Oe(H,K,ut,x){var T=K[0],W=K[1],$=K[2];return H[0]=T+x*(ut[0]-T),H[1]=W+x*(ut[1]-W),H[2]=$+x*(ut[2]-$),H}function Me(H,K,ut,x,T,W){var $=W*W,J=$*(2*W-3)+1,ct=$*(W-2)+W,yt=$*(W-1),St=$*(3-2*W);return H[0]=K[0]*J+ut[0]*ct+x[0]*yt+T[0]*St,H[1]=K[1]*J+ut[1]*ct+x[1]*yt+T[1]*St,H[2]=K[2]*J+ut[2]*ct+x[2]*yt+T[2]*St,H}function gn(H,K,ut,x,T,W){var $=1-W,J=$*$,ct=W*W,yt=J*$,St=3*W*J,Et=3*ct*$,_t=ct*W;return H[0]=K[0]*yt+ut[0]*St+x[0]*Et+T[0]*_t,H[1]=K[1]*yt+ut[1]*St+x[1]*Et+T[1]*_t,H[2]=K[2]*yt+ut[2]*St+x[2]*Et+T[2]*_t,H}function Fn(H,K){K=K||1;var ut=kt.FD()*2*Math.PI,x=kt.FD()*2-1,T=Math.sqrt(1-x*x)*K;return H[0]=Math.cos(ut)*T,H[1]=Math.sin(ut)*T,H[2]=x*K,H}function Jn(H,K,ut){var x=K[0],T=K[1],W=K[2],$=ut[3]*x+ut[7]*T+ut[11]*W+ut[15];return $=$||1,H[0]=(ut[0]*x+ut[4]*T+ut[8]*W+ut[12])/$,H[1]=(ut[1]*x+ut[5]*T+ut[9]*W+ut[13])/$,H[2]=(ut[2]*x+ut[6]*T+ut[10]*W+ut[14])/$,H}function fn(H,K,ut){var x=K[0],T=K[1],W=K[2];return H[0]=x*ut[0]+T*ut[3]+W*ut[6],H[1]=x*ut[1]+T*ut[4]+W*ut[7],H[2]=x*ut[2]+T*ut[5]+W*ut[8],H}function yn(H,K,ut){var x=ut[0],T=ut[1],W=ut[2],$=ut[3],J=K[0],ct=K[1],yt=K[2],St=T*yt-W*ct,Et=W*J-x*yt,_t=x*ct-T*J,zt=T*_t-W*Et,Ht=W*St-x*_t,Ct=x*Et-T*St,Wt=$*2;return St*=Wt,Et*=Wt,_t*=Wt,zt*=2,Ht*=2,Ct*=2,H[0]=J+St+zt,H[1]=ct+Et+Ht,H[2]=yt+_t+Ct,H}function vt(H,K,ut,x){var T=[],W=[];return T[0]=K[0]-ut[0],T[1]=K[1]-ut[1],T[2]=K[2]-ut[2],W[0]=T[0],W[1]=T[1]*Math.cos(x)-T[2]*Math.sin(x),W[2]=T[1]*Math.sin(x)+T[2]*Math.cos(x),H[0]=W[0]+ut[0],H[1]=W[1]+ut[1],H[2]=W[2]+ut[2],H}function Yt(H,K,ut,x){var T=[],W=[];return T[0]=K[0]-ut[0],T[1]=K[1]-ut[1],T[2]=K[2]-ut[2],W[0]=T[2]*Math.sin(x)+T[0]*Math.cos(x),W[1]=T[1],W[2]=T[2]*Math.cos(x)-T[0]*Math.sin(x),H[0]=W[0]+ut[0],H[1]=W[1]+ut[1],H[2]=W[2]+ut[2],H}function et(H,K,ut,x){var T=[],W=[];return T[0]=K[0]-ut[0],T[1]=K[1]-ut[1],T[2]=K[2]-ut[2],W[0]=T[0]*Math.cos(x)-T[1]*Math.sin(x),W[1]=T[0]*Math.sin(x)+T[1]*Math.cos(x),W[2]=T[2],H[0]=W[0]+ut[0],H[1]=W[1]+ut[1],H[2]=W[2]+ut[2],H}function at(H,K){var ut=H[0],x=H[1],T=H[2],W=K[0],$=K[1],J=K[2],ct=Math.sqrt(ut*ut+x*x+T*T),yt=Math.sqrt(W*W+$*$+J*J),St=ct*yt,Et=St&&ze(H,K)/St;return Math.acos(Math.min(Math.max(Et,-1),1))}function Ot(H){return H[0]=0,H[1]=0,H[2]=0,H}function gt(H){return"vec3("+H[0]+", "+H[1]+", "+H[2]+")"}function $t(H,K){return H[0]===K[0]&&H[1]===K[1]&&H[2]===K[2]}function Ft(H,K){var ut=H[0],x=H[1],T=H[2],W=K[0],$=K[1],J=K[2];return Math.abs(ut-W)<=kt.Ib*Math.max(1,Math.abs(ut),Math.abs(W))&&Math.abs(x-$)<=kt.Ib*Math.max(1,Math.abs(x),Math.abs($))&&Math.abs(T-J)<=kt.Ib*Math.max(1,Math.abs(T),Math.abs(J))}var ae=dt,X=he,lt=Zt,ht=ke,Ut=Je,Q=We,st=$e,xt=function(){var H=Rt();return function(K,ut,x,T,W,$){var J,ct;for(ut||(ut=3),x||(x=0),T?ct=Math.min(T*ut+x,K.length):ct=K.length,J=x;J<ct;J+=ut)H[0]=K[J],H[1]=K[J+1],H[2]=K[J+2],W(H,H,$),K[J]=H[0],K[J+1]=H[1],K[J+2]=H[2];return K}}()},49953:function(Ye,Ve,mt){"use strict";mt.d(Ve,{AK:function(){return ze},Fv:function(){return Xe},I6:function(){return yn},IH:function(){return re},JG:function(){return te},Ue:function(){return Rt},al:function(){return We},bA:function(){return At},d9:function(){return be},fF:function(){return gn},fS:function(){return vt},kE:function(){return Je},t7:function(){return Oe},t8:function(){return ve},we:function(){return $e}});var kt=mt(31767);function Rt(){var X=new kt.WT(4);return kt.WT!=Float32Array&&(X[0]=0,X[1]=0,X[2]=0,X[3]=0),X}function be(X){var lt=new kt.WT(4);return lt[0]=X[0],lt[1]=X[1],lt[2]=X[2],lt[3]=X[3],lt}function We(X,lt,ht,Ut){var Q=new kt.WT(4);return Q[0]=X,Q[1]=lt,Q[2]=ht,Q[3]=Ut,Q}function te(X,lt){return X[0]=lt[0],X[1]=lt[1],X[2]=lt[2],X[3]=lt[3],X}function ve(X,lt,ht,Ut,Q){return X[0]=lt,X[1]=ht,X[2]=Ut,X[3]=Q,X}function re(X,lt,ht){return X[0]=lt[0]+ht[0],X[1]=lt[1]+ht[1],X[2]=lt[2]+ht[2],X[3]=lt[3]+ht[3],X}function Gt(X,lt,ht){return X[0]=lt[0]-ht[0],X[1]=lt[1]-ht[1],X[2]=lt[2]-ht[2],X[3]=lt[3]-ht[3],X}function dt(X,lt,ht){return X[0]=lt[0]*ht[0],X[1]=lt[1]*ht[1],X[2]=lt[2]*ht[2],X[3]=lt[3]*ht[3],X}function he(X,lt,ht){return X[0]=lt[0]/ht[0],X[1]=lt[1]/ht[1],X[2]=lt[2]/ht[2],X[3]=lt[3]/ht[3],X}function Zt(X,lt){return X[0]=Math.ceil(lt[0]),X[1]=Math.ceil(lt[1]),X[2]=Math.ceil(lt[2]),X[3]=Math.ceil(lt[3]),X}function ue(X,lt){return X[0]=Math.floor(lt[0]),X[1]=Math.floor(lt[1]),X[2]=Math.floor(lt[2]),X[3]=Math.floor(lt[3]),X}function ie(X,lt,ht){return X[0]=Math.min(lt[0],ht[0]),X[1]=Math.min(lt[1],ht[1]),X[2]=Math.min(lt[2],ht[2]),X[3]=Math.min(lt[3],ht[3]),X}function jt(X,lt,ht){return X[0]=Math.max(lt[0],ht[0]),X[1]=Math.max(lt[1],ht[1]),X[2]=Math.max(lt[2],ht[2]),X[3]=Math.max(lt[3],ht[3]),X}function Lt(X,lt){return X[0]=Math.round(lt[0]),X[1]=Math.round(lt[1]),X[2]=Math.round(lt[2]),X[3]=Math.round(lt[3]),X}function At(X,lt,ht){return X[0]=lt[0]*ht,X[1]=lt[1]*ht,X[2]=lt[2]*ht,X[3]=lt[3]*ht,X}function Dt(X,lt,ht,Ut){return X[0]=lt[0]+ht[0]*Ut,X[1]=lt[1]+ht[1]*Ut,X[2]=lt[2]+ht[2]*Ut,X[3]=lt[3]+ht[3]*Ut,X}function Se(X,lt){var ht=lt[0]-X[0],Ut=lt[1]-X[1],Q=lt[2]-X[2],st=lt[3]-X[3];return Math.hypot(ht,Ut,Q,st)}function ke(X,lt){var ht=lt[0]-X[0],Ut=lt[1]-X[1],Q=lt[2]-X[2],st=lt[3]-X[3];return ht*ht+Ut*Ut+Q*Q+st*st}function Je(X){var lt=X[0],ht=X[1],Ut=X[2],Q=X[3];return Math.hypot(lt,ht,Ut,Q)}function $e(X){var lt=X[0],ht=X[1],Ut=X[2],Q=X[3];return lt*lt+ht*ht+Ut*Ut+Q*Q}function Ze(X,lt){return X[0]=-lt[0],X[1]=-lt[1],X[2]=-lt[2],X[3]=-lt[3],X}function un(X,lt){return X[0]=1/lt[0],X[1]=1/lt[1],X[2]=1/lt[2],X[3]=1/lt[3],X}function Xe(X,lt){var ht=lt[0],Ut=lt[1],Q=lt[2],st=lt[3],xt=ht*ht+Ut*Ut+Q*Q+st*st;return xt>0&&(xt=1/Math.sqrt(xt)),X[0]=ht*xt,X[1]=Ut*xt,X[2]=Q*xt,X[3]=st*xt,X}function ze(X,lt){return X[0]*lt[0]+X[1]*lt[1]+X[2]*lt[2]+X[3]*lt[3]}function ln(X,lt,ht,Ut){var Q=ht[0]*Ut[1]-ht[1]*Ut[0],st=ht[0]*Ut[2]-ht[2]*Ut[0],xt=ht[0]*Ut[3]-ht[3]*Ut[0],H=ht[1]*Ut[2]-ht[2]*Ut[1],K=ht[1]*Ut[3]-ht[3]*Ut[1],ut=ht[2]*Ut[3]-ht[3]*Ut[2],x=lt[0],T=lt[1],W=lt[2],$=lt[3];return X[0]=T*ut-W*K+$*H,X[1]=-(x*ut)+W*xt-$*st,X[2]=x*K-T*xt+$*Q,X[3]=-(x*H)+T*st-W*Q,X}function Oe(X,lt,ht,Ut){var Q=lt[0],st=lt[1],xt=lt[2],H=lt[3];return X[0]=Q+Ut*(ht[0]-Q),X[1]=st+Ut*(ht[1]-st),X[2]=xt+Ut*(ht[2]-xt),X[3]=H+Ut*(ht[3]-H),X}function Me(X,lt){lt=lt||1;var ht,Ut,Q,st,xt,H;do ht=glMatrix.RANDOM()*2-1,Ut=glMatrix.RANDOM()*2-1,xt=ht*ht+Ut*Ut;while(xt>=1);do Q=glMatrix.RANDOM()*2-1,st=glMatrix.RANDOM()*2-1,H=Q*Q+st*st;while(H>=1);var K=Math.sqrt((1-xt)/H);return X[0]=lt*ht,X[1]=lt*Ut,X[2]=lt*Q*K,X[3]=lt*st*K,X}function gn(X,lt,ht){var Ut=lt[0],Q=lt[1],st=lt[2],xt=lt[3];return X[0]=ht[0]*Ut+ht[4]*Q+ht[8]*st+ht[12]*xt,X[1]=ht[1]*Ut+ht[5]*Q+ht[9]*st+ht[13]*xt,X[2]=ht[2]*Ut+ht[6]*Q+ht[10]*st+ht[14]*xt,X[3]=ht[3]*Ut+ht[7]*Q+ht[11]*st+ht[15]*xt,X}function Fn(X,lt,ht){var Ut=lt[0],Q=lt[1],st=lt[2],xt=ht[0],H=ht[1],K=ht[2],ut=ht[3],x=ut*Ut+H*st-K*Q,T=ut*Q+K*Ut-xt*st,W=ut*st+xt*Q-H*Ut,$=-xt*Ut-H*Q-K*st;return X[0]=x*ut+$*-xt+T*-K-W*-H,X[1]=T*ut+$*-H+W*-xt-x*-K,X[2]=W*ut+$*-K+x*-H-T*-xt,X[3]=lt[3],X}function Jn(X){return X[0]=0,X[1]=0,X[2]=0,X[3]=0,X}function fn(X){return"vec4("+X[0]+", "+X[1]+", "+X[2]+", "+X[3]+")"}function yn(X,lt){return X[0]===lt[0]&&X[1]===lt[1]&&X[2]===lt[2]&&X[3]===lt[3]}function vt(X,lt){var ht=X[0],Ut=X[1],Q=X[2],st=X[3],xt=lt[0],H=lt[1],K=lt[2],ut=lt[3];return Math.abs(ht-xt)<=kt.Ib*Math.max(1,Math.abs(ht),Math.abs(xt))&&Math.abs(Ut-H)<=kt.Ib*Math.max(1,Math.abs(Ut),Math.abs(H))&&Math.abs(Q-K)<=kt.Ib*Math.max(1,Math.abs(Q),Math.abs(K))&&Math.abs(st-ut)<=kt.Ib*Math.max(1,Math.abs(st),Math.abs(ut))}var Yt=null,et=null,at=null,Ot=null,gt=null,$t=null,Ft=null,ae=function(){var X=Rt();return function(lt,ht,Ut,Q,st,xt){var H,K;for(ht||(ht=4),Ut||(Ut=0),Q?K=Math.min(Q*ht+Ut,lt.length):K=lt.length,H=Ut;H<K;H+=ht)X[0]=lt[H],X[1]=lt[H+1],X[2]=lt[H+2],X[3]=lt[H+3],st(X,X,xt),lt[H]=X[0],lt[H+1]=X[1],lt[H+2]=X[2],lt[H+3]=X[3];return lt}}()},48254:function(Ye){Ye.exports=function(mt){return!mt||typeof mt=="string"?!1:mt instanceof Array||Array.isArray(mt)||mt.length>=0&&(mt.splice instanceof Function||Object.getOwnPropertyDescriptor(mt,mt.length-1)&&mt.constructor.name!=="String")}},42956:function(Ye){"use strict";var Ve=Ye.exports;Ye.exports.isNumber=function(mt){return typeof mt=="number"},Ye.exports.findMin=function(mt){if(mt.length===0)return 1/0;for(var kt=mt[0],Rt=1;Rt<mt.length;Rt++)kt=Math.min(kt,mt[Rt]);return kt},Ye.exports.findMax=function(mt){if(mt.length===0)return-1/0;for(var kt=mt[0],Rt=1;Rt<mt.length;Rt++)kt=Math.max(kt,mt[Rt]);return kt},Ye.exports.findMinMulti=function(mt){for(var kt=Ve.findMin(mt[0]),Rt=1;Rt<mt.length;Rt++)kt=Math.min(kt,Ve.findMin(mt[Rt]));return kt},Ye.exports.findMaxMulti=function(mt){for(var kt=Ve.findMax(mt[0]),Rt=1;Rt<mt.length;Rt++)kt=Math.max(kt,Ve.findMax(mt[Rt]));return kt},Ye.exports.inside=function(mt,kt,Rt){return mt<=Rt&&Rt<=kt}},78434:function(Ye,Ve,mt){"use strict";var kt=50,Rt=2,be=Math.log(2),We=Ye.exports,te=mt(42956);function ve(Gt){return 1-Math.abs(Gt)}Ye.exports.getUnifiedMinMax=function(Gt,dt){return We.getUnifiedMinMaxMulti([Gt],dt)},Ye.exports.getUnifiedMinMaxMulti=function(Gt,dt){dt=dt||{};var he=!1,Zt=!1,ue=te.isNumber(dt.width)?dt.width:Rt,ie=te.isNumber(dt.size)?dt.size:kt,jt=te.isNumber(dt.min)?dt.min:(he=!0,te.findMinMulti(Gt)),Lt=te.isNumber(dt.max)?dt.max:(Zt=!0,te.findMaxMulti(Gt)),At=Lt-jt,Dt=At/(ie-1);return he&&(jt=jt-2*ue*Dt),Zt&&(Lt=Lt+2*ue*Dt),{min:jt,max:Lt}},Ye.exports.create=function(Gt,dt){if(dt=dt||{},!Gt||Gt.length===0)return[];var he=te.isNumber(dt.size)?dt.size:kt,Zt=te.isNumber(dt.width)?dt.width:Rt,ue=We.getUnifiedMinMax(Gt,{size:he,width:Zt,min:dt.min,max:dt.max}),ie=ue.min,jt=ue.max,Lt=jt-ie,At=Lt/(he-1);if(Lt===0)return[{x:ie,y:1}];for(var Dt=[],Se=0;Se<he;Se++)Dt.push({x:ie+Se*At,y:0});var ke=function(Oe){return Math.floor((Oe-ie)/At)},Je=re(ve,Zt),$e=Je[Zt],Ze=Je[Zt-1]-Je[Zt-2],un=0;Gt.forEach(function(Oe){var Me=ke(Oe);if(!(Me+Zt<0||Me-Zt>=Dt.length)){var gn=Math.max(Me-Zt,0),Fn=Me,Jn=Math.min(Me+Zt,Dt.length-1),fn=gn-(Me-Zt),yn=Me+Zt-Jn,vt=Je[-Zt-1+fn]||0,Yt=Je[-Zt-1+yn]||0,et=$e/($e-vt-Yt);fn>0&&(un+=et*(fn-1)*Ze);var at=Math.max(0,Me-Zt+1);te.inside(0,Dt.length-1,at)&&(Dt[at].y+=et*1*Ze),te.inside(0,Dt.length-1,Fn+1)&&(Dt[Fn+1].y-=et*2*Ze),te.inside(0,Dt.length-1,Jn+1)&&(Dt[Jn+1].y+=et*1*Ze)}});var Xe=un,ze=0,ln=0;return Dt.forEach(function(Oe){ze+=Oe.y,Xe+=ze,Oe.y=Xe,ln+=Xe}),ln>0&&Dt.forEach(function(Oe){Oe.y/=ln}),Dt};function re(Gt,dt){for(var he={},Zt=0,ue=-dt;ue<=dt;ue++)Zt+=Gt(ue/dt),he[ue]=Zt;return he}Ye.exports.getExpectedValueFromPdf=function(Gt){if(!(!Gt||Gt.length===0)){var dt=0;return Gt.forEach(function(he){dt+=he.x*he.y}),dt}},Ye.exports.getXWithLeftTailArea=function(Gt,dt){if(!(!Gt||Gt.length===0)){for(var he=0,Zt=0,ue=0;ue<Gt.length&&(Zt=ue,he+=Gt[ue].y,!(he>=dt));ue++);return Gt[Zt].x}},Ye.exports.getPerplexity=function(Gt){if(!(!Gt||Gt.length===0)){var dt=0;return Gt.forEach(function(he){var Zt=Math.log(he.y);isFinite(Zt)&&(dt+=he.y*Zt)}),dt=-dt/be,Math.pow(2,dt)}}},27933:function(Ye,Ve,mt){"use strict";var kt=mt(48254),Rt=Array.prototype.concat,be=Array.prototype.slice,We=Ye.exports=function(ve){for(var re=[],Gt=0,dt=ve.length;Gt<dt;Gt++){var he=ve[Gt];kt(he)?re=Rt.call(re,be.call(he)):re.push(he)}return re};We.wrap=function(te){return function(){return te(We(arguments))}}},335:function(Ye,Ve,mt){var kt=mt(31479);function Rt(be,We){var te=typeof Symbol!="undefined"&&be[Symbol.iterator]||be["@@iterator"];if(!te){if(Array.isArray(be)||(te=kt(be))||We&&be&&typeof be.length=="number"){te&&(be=te);var ve=0,re=function(){};return{s:re,n:function(){return ve>=be.length?{done:!0}:{done:!1,value:be[ve++]}},e:function(ue){throw ue},f:re}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Gt=!0,dt=!1,he;return{s:function(){te=te.call(be)},n:function(){var ue=te.next();return Gt=ue.done,ue},e:function(ue){dt=!0,he=ue},f:function(){try{!Gt&&te.return!=null&&te.return()}finally{if(dt)throw he}}}}Ye.exports=Rt,Ye.exports.__esModule=!0,Ye.exports.default=Ye.exports},73983:function(Ye,Ve,mt){"use strict";var kt=mt(2337);Ve.Z=kt},99938:function(Ye,Ve,mt){"use strict";mt.d(Ve,{CR:function(){return Dt},Jh:function(){return ie},Q_:function(){return gn},XA:function(){return At},ZT:function(){return Rt},_T:function(){return We},ev:function(){return Je},mG:function(){return ue},pi:function(){return be},pr:function(){return ke}});var kt=function(et,at){return kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ot,gt){Ot.__proto__=gt}||function(Ot,gt){for(var $t in gt)Object.prototype.hasOwnProperty.call(gt,$t)&&(Ot[$t]=gt[$t])},kt(et,at)};function Rt(et,at){if(typeof at!="function"&&at!==null)throw new TypeError("Class extends value "+String(at)+" is not a constructor or null");kt(et,at);function Ot(){this.constructor=et}et.prototype=at===null?Object.create(at):(Ot.prototype=at.prototype,new Ot)}var be=function(){return be=Object.assign||function(at){for(var Ot,gt=1,$t=arguments.length;gt<$t;gt++){Ot=arguments[gt];for(var Ft in Ot)Object.prototype.hasOwnProperty.call(Ot,Ft)&&(at[Ft]=Ot[Ft])}return at},be.apply(this,arguments)};function We(et,at){var Ot={};for(var gt in et)Object.prototype.hasOwnProperty.call(et,gt)&&at.indexOf(gt)<0&&(Ot[gt]=et[gt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,gt=Object.getOwnPropertySymbols(et);$t<gt.length;$t++)at.indexOf(gt[$t])<0&&Object.prototype.propertyIsEnumerable.call(et,gt[$t])&&(Ot[gt[$t]]=et[gt[$t]]);return Ot}function te(et,at,Ot,gt){var $t=arguments.length,Ft=$t<3?at:gt===null?gt=Object.getOwnPropertyDescriptor(at,Ot):gt,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ft=Reflect.decorate(et,at,Ot,gt);else for(var X=et.length-1;X>=0;X--)(ae=et[X])&&(Ft=($t<3?ae(Ft):$t>3?ae(at,Ot,Ft):ae(at,Ot))||Ft);return $t>3&&Ft&&Object.defineProperty(at,Ot,Ft),Ft}function ve(et,at){return function(Ot,gt){at(Ot,gt,et)}}function re(et,at,Ot,gt,$t,Ft){function ae(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var X=gt.kind,lt=X==="getter"?"get":X==="setter"?"set":"value",ht=!at&&et?gt.static?et:et.prototype:null,Ut=at||(ht?Object.getOwnPropertyDescriptor(ht,gt.name):{}),Q,st=!1,xt=Ot.length-1;xt>=0;xt--){var H={};for(var K in gt)H[K]=K==="access"?{}:gt[K];for(var K in gt.access)H.access[K]=gt.access[K];H.addInitializer=function(x){if(st)throw new TypeError("Cannot add initializers after decoration has completed");Ft.push(ae(x||null))};var ut=(0,Ot[xt])(X==="accessor"?{get:Ut.get,set:Ut.set}:Ut[lt],H);if(X==="accessor"){if(ut===void 0)continue;if(ut===null||typeof ut!="object")throw new TypeError("Object expected");(Q=ae(ut.get))&&(Ut.get=Q),(Q=ae(ut.set))&&(Ut.set=Q),(Q=ae(ut.init))&&$t.unshift(Q)}else(Q=ae(ut))&&(X==="field"?$t.unshift(Q):Ut[lt]=Q)}ht&&Object.defineProperty(ht,gt.name,Ut),st=!0}function Gt(et,at,Ot){for(var gt=arguments.length>2,$t=0;$t<at.length;$t++)Ot=gt?at[$t].call(et,Ot):at[$t].call(et);return gt?Ot:void 0}function dt(et){return typeof et=="symbol"?et:"".concat(et)}function he(et,at,Ot){return typeof at=="symbol"&&(at=at.description?"[".concat(at.description,"]"):""),Object.defineProperty(et,"name",{configurable:!0,value:Ot?"".concat(Ot," ",at):at})}function Zt(et,at){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(et,at)}function ue(et,at,Ot,gt){function $t(Ft){return Ft instanceof Ot?Ft:new Ot(function(ae){ae(Ft)})}return new(Ot||(Ot=Promise))(function(Ft,ae){function X(Ut){try{ht(gt.next(Ut))}catch(Q){ae(Q)}}function lt(Ut){try{ht(gt.throw(Ut))}catch(Q){ae(Q)}}function ht(Ut){Ut.done?Ft(Ut.value):$t(Ut.value).then(X,lt)}ht((gt=gt.apply(et,at||[])).next())})}function ie(et,at){var Ot={label:0,sent:function(){if(Ft[0]&1)throw Ft[1];return Ft[1]},trys:[],ops:[]},gt,$t,Ft,ae;return ae={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function X(ht){return function(Ut){return lt([ht,Ut])}}function lt(ht){if(gt)throw new TypeError("Generator is already executing.");for(;ae&&(ae=0,ht[0]&&(Ot=0)),Ot;)try{if(gt=1,$t&&(Ft=ht[0]&2?$t.return:ht[0]?$t.throw||((Ft=$t.return)&&Ft.call($t),0):$t.next)&&!(Ft=Ft.call($t,ht[1])).done)return Ft;switch($t=0,Ft&&(ht=[ht[0]&2,Ft.value]),ht[0]){case 0:case 1:Ft=ht;break;case 4:return Ot.label++,{value:ht[1],done:!1};case 5:Ot.label++,$t=ht[1],ht=[0];continue;case 7:ht=Ot.ops.pop(),Ot.trys.pop();continue;default:if(Ft=Ot.trys,!(Ft=Ft.length>0&&Ft[Ft.length-1])&&(ht[0]===6||ht[0]===2)){Ot=0;continue}if(ht[0]===3&&(!Ft||ht[1]>Ft[0]&&ht[1]<Ft[3])){Ot.label=ht[1];break}if(ht[0]===6&&Ot.label<Ft[1]){Ot.label=Ft[1],Ft=ht;break}if(Ft&&Ot.label<Ft[2]){Ot.label=Ft[2],Ot.ops.push(ht);break}Ft[2]&&Ot.ops.pop(),Ot.trys.pop();continue}ht=at.call(et,Ot)}catch(Ut){ht=[6,Ut],$t=0}finally{gt=Ft=0}if(ht[0]&5)throw ht[1];return{value:ht[0]?ht[1]:void 0,done:!0}}}var jt=Object.create?function(et,at,Ot,gt){gt===void 0&&(gt=Ot);var $t=Object.getOwnPropertyDescriptor(at,Ot);(!$t||("get"in $t?!at.__esModule:$t.writable||$t.configurable))&&($t={enumerable:!0,get:function(){return at[Ot]}}),Object.defineProperty(et,gt,$t)}:function(et,at,Ot,gt){gt===void 0&&(gt=Ot),et[gt]=at[Ot]};function Lt(et,at){for(var Ot in et)Ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,Ot)&&jt(at,et,Ot)}function At(et){var at=typeof Symbol=="function"&&Symbol.iterator,Ot=at&&et[at],gt=0;if(Ot)return Ot.call(et);if(et&&typeof et.length=="number")return{next:function(){return et&>>=et.length&&(et=void 0),{value:et&&et[gt++],done:!et}}};throw new TypeError(at?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dt(et,at){var Ot=typeof Symbol=="function"&&et[Symbol.iterator];if(!Ot)return et;var gt=Ot.call(et),$t,Ft=[],ae;try{for(;(at===void 0||at-- >0)&&!($t=gt.next()).done;)Ft.push($t.value)}catch(X){ae={error:X}}finally{try{$t&&!$t.done&&(Ot=gt.return)&&Ot.call(gt)}finally{if(ae)throw ae.error}}return Ft}function Se(){for(var et=[],at=0;at<arguments.length;at++)et=et.concat(Dt(arguments[at]));return et}function ke(){for(var et=0,at=0,Ot=arguments.length;at<Ot;at++)et+=arguments[at].length;for(var gt=Array(et),$t=0,at=0;at<Ot;at++)for(var Ft=arguments[at],ae=0,X=Ft.length;ae<X;ae++,$t++)gt[$t]=Ft[ae];return gt}function Je(et,at,Ot){if(Ot||arguments.length===2)for(var gt=0,$t=at.length,Ft;gt<$t;gt++)(Ft||!(gt in at))&&(Ft||(Ft=Array.prototype.slice.call(at,0,gt)),Ft[gt]=at[gt]);return et.concat(Ft||Array.prototype.slice.call(at))}function $e(et){return this instanceof $e?(this.v=et,this):new $e(et)}function Ze(et,at,Ot){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var gt=Ot.apply(et,at||[]),$t,Ft=[];return $t={},ae("next"),ae("throw"),ae("return"),$t[Symbol.asyncIterator]=function(){return this},$t;function ae(st){gt[st]&&($t[st]=function(xt){return new Promise(function(H,K){Ft.push([st,xt,H,K])>1||X(st,xt)})})}function X(st,xt){try{lt(gt[st](xt))}catch(H){Q(Ft[0][3],H)}}function lt(st){st.value instanceof $e?Promise.resolve(st.value.v).then(ht,Ut):Q(Ft[0][2],st)}function ht(st){X("next",st)}function Ut(st){X("throw",st)}function Q(st,xt){st(xt),Ft.shift(),Ft.length&&X(Ft[0][0],Ft[0][1])}}function un(et){var at,Ot;return at={},gt("next"),gt("throw",function($t){throw $t}),gt("return"),at[Symbol.iterator]=function(){return this},at;function gt($t,Ft){at[$t]=et[$t]?function(ae){return(Ot=!Ot)?{value:$e(et[$t](ae)),done:!1}:Ft?Ft(ae):ae}:Ft}}function Xe(et){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var at=et[Symbol.asyncIterator],Ot;return at?at.call(et):(et=typeof At=="function"?At(et):et[Symbol.iterator](),Ot={},gt("next"),gt("throw"),gt("return"),Ot[Symbol.asyncIterator]=function(){return this},Ot);function gt(Ft){Ot[Ft]=et[Ft]&&function(ae){return new Promise(function(X,lt){ae=et[Ft](ae),$t(X,lt,ae.done,ae.value)})}}function $t(Ft,ae,X,lt){Promise.resolve(lt).then(function(ht){Ft({value:ht,done:X})},ae)}}function ze(et,at){return Object.defineProperty?Object.defineProperty(et,"raw",{value:at}):et.raw=at,et}var ln=Object.create?function(et,at){Object.defineProperty(et,"default",{enumerable:!0,value:at})}:function(et,at){et.default=at};function Oe(et){if(et&&et.__esModule)return et;var at={};if(et!=null)for(var Ot in et)Ot!=="default"&&Object.prototype.hasOwnProperty.call(et,Ot)&&jt(at,et,Ot);return ln(at,et),at}function Me(et){return et&&et.__esModule?et:{default:et}}function gn(et,at,Ot,gt){if(Ot==="a"&&!gt)throw new TypeError("Private accessor was defined without a getter");if(typeof at=="function"?et!==at||!gt:!at.has(et))throw new TypeError("Cannot read private member from an object whose class did not declare it");return Ot==="m"?gt:Ot==="a"?gt.call(et):gt?gt.value:at.get(et)}function Fn(et,at,Ot,gt,$t){if(gt==="m")throw new TypeError("Private method is not writable");if(gt==="a"&&!$t)throw new TypeError("Private accessor was defined without a setter");if(typeof at=="function"?et!==at||!$t:!at.has(et))throw new TypeError("Cannot write private member to an object whose class did not declare it");return gt==="a"?$t.call(et,Ot):$t?$t.value=Ot:at.set(et,Ot),Ot}function Jn(et,at){if(at===null||typeof at!="object"&&typeof at!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof et=="function"?at===et:et.has(at)}function fn(et,at,Ot){if(at!=null){if(typeof at!="object"&&typeof at!="function")throw new TypeError("Object expected.");var gt;if(Ot){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");gt=at[Symbol.asyncDispose]}if(gt===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");gt=at[Symbol.dispose]}if(typeof gt!="function")throw new TypeError("Object not disposable.");et.stack.push({value:at,dispose:gt,async:Ot})}else Ot&&et.stack.push({async:!0});return at}var yn=typeof SuppressedError=="function"?SuppressedError:function(et,at,Ot){var gt=new Error(Ot);return gt.name="SuppressedError",gt.error=et,gt.suppressed=at,gt};function vt(et){function at(gt){et.error=et.hasError?new yn(gt,et.error,"An error was suppressed during disposal."):gt,et.hasError=!0}function Ot(){for(;et.stack.length;){var gt=et.stack.pop();try{var $t=gt.dispose&>.dispose.call(gt.value);if(gt.async)return Promise.resolve($t).then(Ot,function(Ft){return at(Ft),Ot()})}catch(Ft){at(Ft)}}if(et.hasError)throw et.error}return Ot()}var Yt={__extends:Rt,__assign:be,__rest:We,__decorate:te,__param:ve,__metadata:Zt,__awaiter:ue,__generator:ie,__createBinding:jt,__exportStar:Lt,__values:At,__read:Dt,__spread:Se,__spreadArrays:ke,__spreadArray:Je,__await:$e,__asyncGenerator:Ze,__asyncDelegator:un,__asyncValues:Xe,__makeTemplateObject:ze,__importStar:Oe,__importDefault:Me,__classPrivateFieldGet:gn,__classPrivateFieldSet:Fn,__classPrivateFieldIn:Jn,__addDisposableResource:fn,__disposeResources:vt}}}]);
|