@antv/g2 5.0.9 → 5.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/g2-lite.min.js +1 -1
- package/dist/g2.min.js +3 -3
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -1
- package/esm/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +10 -1
package/dist/g2-lite.min.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
`}([h,d,f,s]))}c-=u,l+=1}return o}function Jx(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function tw(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function ew(t){var e,t=nt.convertToPath(t);if(t&&(tw(e=t,"m")&&tw(e,"M")))return t}function nw(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],g=ew(e),y=ew(n);if(d===p&&"path"!==d||(void 0===g||void 0===y))return p=n,d=r,[a,o,v,s]=Zx(i=e),h=i.style.transform,l=p.style.transform,[c,m,u,f]=(Jx(p,i),Zx(p)),h=[Object.assign({transform:`${h?h+" ":""}translate(${a-c}, ${o-m}) scale(${v/u}, ${s/f})`},Hx(i,qx)),Object.assign({transform:`${l?l+" ":""}translate(0, 0) scale(1, 1)`},Hx(p,qx))],p.animate(h,d);{a=g;const b="path"===(o=(c=t)["nodeName"])?c:(Jx(o=new nt.Path({style:Object.assign(Object.assign({},Hx(c,qx)),{d:a})}),c),o);var m=[Object.assign({path:g},Hx(e,qx)),Object.assign({path:y},Hx(n,qx))],v=b.animate(m,r);return v.onfinish=()=>{Wu(b,n)},b.style.transform="scale(1, 1)",b.style.transform="none",v}}Xx.props={};const rw=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:Qx,i=Wx(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,nw(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return nw(t,new nt.Path({style:Object.assign({path:d[e]},Hx(l,qx))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e=1,strokeOpacity:t=1,opacity:n=1}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return nw(t,t,new nt.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},iw=(rw.props={},b=>{return nt.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:nt.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!Uc(r))return Vx(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:e=0,inset:s=0,fillOpacity:l=1,strokeOpacity:c=1,opacity:u=1}=e,{points:t,y:f,y1:h}=t;const d=M1().cornerRadius(e).padAngle(s*Math.PI/180),p=k0(r,t,[f,h]),{startAngle:g,endAngle:y}=p,m=new nt.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=nt.convertToPath(m);return m.style.transform="",t};e=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:l,strokeOpacity:c,opacity:u,offset:.01},{waveInArcAngle:y,fillOpacity:l,strokeOpacity:c,opacity:u}],s=a.animate(e,Wx(i,n,b));return s.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},s.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},s}}),aw=(iw.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t="",fillOpacity:o=1,strokeOpacity:s=1,opacity:l=1}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,Wx(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),ow=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t="",fillOpacity:o=1,strokeOpacity:s=1,opacity:l=1}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,Wx(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},sw=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Wx(i,n,o))},lw=(sw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new nt.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Vx(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),cw=(lw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new nt.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=$x(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),uw=(cw.props={},{visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1});function fw(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>fw(t,e,n,r))}function hw(t){fw(t,"visibility","hidden",!0)}function dw(t){fw(t,"visibility","visible",!0)}function pw(t){return et(t).selectAll("."+st).nodes().filter(t=>!t.__removed__)}function gw(t,e){return yw(t,e).flatMap(({container:t})=>pw(t))}function yw(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key)}function mw(t){return et(t).select("."+lt).node()}function vw(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getRenderBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function bw(t,e){var{offsetX:e,offsetY:n}=e,[t,r,i,a]=function(t){var t=t.getRenderBounds(),{min:[t,e],max:[n,r]}=t;return[t,e,n,r]}(t);return[Math.min(i,Math.max(t,e))-t,Math.min(a,Math.max(r,n))-r]}function xw(t){return t=>t.__data__.color}function ww(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Mw(t){t=Array.isArray(t)?t:[t];const r=new Map(t.flatMap(e=>{return Array.from(e.markState.keys()).map(t=>[e.key+","+t.key,t.data])}));return t=>{var{index:t,markKey:e,viewKey:n}=t.__data__;return r.get(n+","+e)[t]}}function Ow(s,l=(t,e)=>t,c=(t,e,n)=>t.setAttribute(e,n)){const u="__states__",f="__ordinal__",i=t=>{var{[u]:e=[],[f]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),s[e]),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){a=t,o=r;var a=null!=(a=t.style[o])?a:uw[o],o=l(i,t);c(t,r,o),r in n||(n[r]=a)}t[f]=n}},a=t=>{t[u]||(t[u]=[])};return{setState:(t,...e)=>{a(t),t[u]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[u].indexOf(r);-1!==n&&t[u].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[u].indexOf(e))}}function kw(t,e){var n=(Array.isArray(t)?t:[t]).flatMap(e=>e.marks.map(t=>[e.key+","+t.key,t.state])),r={};for(const i of e){const[l,c]=Array.isArray(i)?i:[i,{}];r[l]=n.reduce((t,e)=>{const[a,n={}]=e;e=void 0===(e=n[l])||"object"==typeof e&&0===Object.keys(e).length?c:n[l];for(const[r,o]of Object.entries(e)){const s=t[r];t[r]=(t,e,n,r)=>{var i=r.__data__.viewKey+","+r.__data__.markKey;return a!==i?null===s||void 0===s?void 0:s(t,e,n,r):"function"!=typeof o?o:o(t,e,n,r)}}return t},{})}return r}function _w(t,r){const i=new Map(t.map((t,e)=>[t,e])),a=r?t.map(r):t;return(t,e)=>{var n;return"function"!=typeof t?t:(n=i.get(e),t(r?r(e):e,n,a,e))}}function Ew(t){var{link:e=!1,valueof:l=(t,e)=>t}=t,c=rt(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const u=t=>t.__data__.points;return[t=>{if(!(t.length<=1)){var e=Mc(t,(t,e)=>{t=t.__data__.x,e=e.__data__.x;return t-e});for(let t=1;t<e.length;t++){var n=p1();const s=e[t-1];var r=e[t],[r,i,a,o]=((t,e)=>{var[,t,n]=t,[e,,,r]=e;return[t,e,r,n]})(u(s),u(r)),r=(n.moveTo(...r),n.lineTo(...i),n.lineTo(...a),n.lineTo(...o),n.closePath(),c0(c,t=>l(t,s))),{fill:i=s.getAttribute("fill")}=r,a=rt(r,["fill"]),o=new nt.Path({className:"element-link",style:Object.assign({d:n.toString(),fill:i,zIndex:-2},a)});null!=(r=s.link)&&r.remove(),s.parentNode.appendChild(o),s.link=o}}},t=>{var e;null!=(e=t.link)&&e.remove(),t.link=null}]}function Sw(n,t,e){var r,i,a,o=t=>{var e=n.style["transform"];return e?e+" "+t:t};return Uc(e)?(a=n.__data__["points"],[a,i]=$c(e)?O0(a):a,r=p0(a,a=e.getCenter()),i=p0(i,a),a=y0(r)+v0(r,i)/2,o(`translate(${t*Math.cos(a)}, ${t*Math.sin(a)})`)):$c(e)?o(`translate(${t}, 0)`):o(`translate(0, ${-t})`)}function Aw(t){var{background:e,scale:s,coordinate:l,valueof:c}=t,u=rt(t,["background","scale","coordinate","valueof"]);const f="element-background";if(!e)return[()=>{},()=>{}];const r=(t,e,n)=>{var r=t.invert(e),e=e+t.getBandWidth(r)/2,t=t.getStep(r)/2,r=t*n;return[e-t+r,e+t-r]},h=(t,e)=>{var n=s["x"];return Tx(n)?(t=t["__data__"],t=t["x"],[n,t]=r(n,t,e),[n,t]):[0,1]},d=(t,e)=>{var n=s["y"];return Tx(n)?(t=t["__data__"],t=t["y"],[n,t]=r(n,t,e),[n,t]):[0,1]},p=(t,e)=>{var n=e["padding"],[r,i]=h(t,n),[n,a]=d(t,n),t=t["__data__"],{y:t,y1:o}=t;return K1([[r,n],[i,n],[i,a],[r,a]].map(t=>l.map(t)),{y:t,y1:o},l,e)},g=(t,e)=>{var n,r,{transform:i="scale(1.2, 1.2)",transformOrigin:a="center center",stroke:o=""}=e,e=rt(e,["transform","transformOrigin","stroke"]),i=Object.assign({transform:i,transformOrigin:a,stroke:o},e),s=t.cloneNode(!0);for([n,r]of Object.entries(i))s.style[n]=r;return s};return[e=>{e.background&&e.background.remove();var t=c0(u,t=>c(t,e)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:a=.001,strokeWidth:o=0}=t,t=rt(t,["fill","fillOpacity","zIndex","padding","strokeWidth"]),t=Object.assign(Object.assign({},t),{fill:n,fillOpacity:r,zIndex:i,padding:a,strokeWidth:o}),n=((()=>{var{x:t,y:e}=s;return[t,e].some(Tx)})()?p:g)(e,t);n.className=f,e.parentNode.appendChild(n),e.background=n},t=>{var e;null!=(e=t.background)&&e.remove(),t.background=null},t=>t.className===f]}function Lw(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function Tw(e,{elements:t,datum:n,groupKey:i=t=>t,link:r=!1,background:a=!1,delay:o=60,scale:s,coordinate:l,state:c={}}){const u=t(e),f=new Set(u),h=vc(u,i);t=_w(u,n);const[d,p]=Ew(Object.assign({elements:u,valueof:t,link:r,coordinate:l},at(c.active,"link"))),[g,y,m]=Aw(Object.assign({scale:s,coordinate:l,background:a,valueof:t},at(c.active,"background"))),{setState:v,removeState:b,hasState:x}=Ow(it(c,{active:Object.assign({},(null==(n=c.active)?void 0:n.offset)&&{transform:(...t)=>{var e=c.active.offset(...t),[,t]=t;return Sw(u[t],e,l)}})}),t);let w;const M=t=>{var e=t["target"];if(f.has(e)){w&&clearTimeout(w);var t=i(e),t=h.get(t),n=new Set(t);for(const r of u)n.has(r)?x(r,"active")||v(r,"active"):(v(r,"inactive"),p(r)),r!==e&&y(r);g(e),d(t)}},O=()=>{for(const t of u)b(t,"active","inactive"),y(t),p(t)},k=t=>{t=t.target;a&&!m(t)||(a||f.has(t))&&(0<o?(w&&clearTimeout(w),w=setTimeout(()=>{O(),w=null},o)):O())},_=()=>{O()};return e.addEventListener("pointerover",M),e.addEventListener("pointerout",k),e.addEventListener("pointerleave",_),()=>{e.removeEventListener("pointerover",M),e.removeEventListener("pointerout",k),e.removeEventListener("pointerleave",_);for(const t of u)y(t),p(t)}}function jw(t){var{delay:a,createGroup:o,background:s=!1,link:l=!1}=t,c=rt(t,["delay","createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{scale:r,coordinate:i}=e;return Tw(mw(t),Object.assign({elements:pw,datum:Mw(e),groupKey:o?o(e):void 0,coordinate:i,scale:r,state:kw(n,[["active",s?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:s,link:l,delay:a},c))}}function Nw(t){return jw(Object.assign(Object.assign({},t),{createGroup:ww}))}function Pw(t){return jw(Object.assign(Object.assign({},t),{createGroup:xw}))}function Cw(e,{elements:t,datum:n,groupKey:c=t=>t,link:u=!1,single:f=!1,coordinate:r,background:i=!1,scale:a,state:o={}}){const h=t(e),d=new Set(h),p=vc(h,c);t=_w(h,n);const[g,y]=Ew(Object.assign({link:u,elements:h,valueof:t,coordinate:r},at(o.selected,"link"))),[m,v]=Aw(Object.assign({background:i,coordinate:r,scale:a,valueof:t},at(o.selected,"background"))),{setState:b,removeState:s,hasState:x}=Ow(it(o,{selected:Object.assign({},(null==(n=o.selected)?void 0:n.offset)&&{transform:(...t)=>{var e=o.selected.offset(...t),[,t]=t;return Sw(h[t],e,r)}})}),t),w=()=>{for(const t of h)s(t,"selected","unselected"),y(t),v(t)},l=t=>{t=t.target;if(!d.has(t))return w();if(f){var e=t;if(x(e,"selected"))w();else{var n=c(e),n=p.get(n),r=new Set(n);for(const a of h)r.has(a)?b(a,"selected"):(b(a,"unselected"),y(a)),a!==e&&v(a);g(n),m(e)}}else{n=t;t=c(n),t=p.get(t);const o=new Set(t);if(x(n,"selected")){if(!h.some(t=>!o.has(t)&&x(t,"selected")))return w();for(const s of t)b(s,"unselected"),y(s),v(s)}else{var i=t.some(t=>x(t,"selected"));for(const l of h)o.has(l)?b(l,"selected"):x(l,"selected")||b(l,"unselected");!i&&u&&g(t),m(n)}}};return e.addEventListener("click",l),()=>{e.removeEventListener("click",l);for(const t of h)y(t)}}function Rw(t){var{createGroup:a,background:o=!1,link:s=!1}=t,l=rt(t,["createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{coordinate:r,scale:i}=e;return Cw(mw(t),Object.assign({elements:pw,datum:Mw(e),groupKey:a?a(e):void 0,coordinate:r,scale:i,state:kw(n,[["selected",o?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:o,link:s},l))}}function Bw(t){return Rw(Object.assign(Object.assign({},t),{createGroup:ww}))}function Iw(t){return Rw(Object.assign(Object.assign({},t),{createGroup:xw}))}function Fw(t){var{wait:k=20,leading:_,trailing:E=!1,labelFormatter:S=t=>""+t}=t,A=rt(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Mc(t.map(t=>d[t])),u=it({},e),f=u.marks.find(t=>"line"===t.type);t=Cc(bc(t,t=>Cc(t,t=>+h[t])/Bc(t,t=>+h[t]),t=>l[t]).values());it(f,{scale:{y:{domain:[1/t,t]}}});const p=mw(r),g=r.getElementsByClassName(st);const y=vc(r.getElementsByClassName(ut),t=>t.__data__.key.split("-")[0]),m=new nt.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},at(A,"rule"))}),v=new nt.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},at(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[uc(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",S(e))};let w;var M;const O=un(t=>{t=vw(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[ac(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},k,{leading:_,trailing:E});return M=[0,0],ue(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,M);x(M,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[ac(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",O),p.addEventListener("pointermove",O),p.addEventListener("pointerleave",O),()=>{m.remove(),p.removeEventListener("pointerenter",O),p.removeEventListener("pointermove",O),p.removeEventListener("pointerleave",O)}}}function Dw({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:r,update:i,container:e}=t,a=mw(e),o=it({},r);for(const s of o.marks)s.animate=!1;const n=un(t=>{var e,n,t=vw(a,t);t?([t,e]=t,(n=function(t){var{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);return r||(n.push(r={type:"fisheye"}),e.transform=n,t.coordinate=e,r)}(o)).focusX=t,n.focusY=e,n.visual=!0,i(o)):i(r)},l,{leading:c,trailing:u});return a.addEventListener("pointerenter",n),a.addEventListener("pointermove",n),a.addEventListener("pointerleave",n),()=>{a.removeEventListener("pointerenter",n),a.removeEventListener("pointermove",n),a.removeEventListener("pointerleave",n)}}}const $=new Proxy({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"},{get(t,e){if(e in t)return t[e]},set(){return!0}});function zw(t,e){t=t.__data__;const{markKey:n,index:r,seriesIndex:i}=t;t=e.markState;const a=Array.from(t.keys()).find(t=>t.key===n);if(a)return i?i.map(t=>a.data[t]):a.data[r]}function Ww(i,a,o,s=t=>!0){return t=>{var e,n,r;s(t)&&(r=t["target"],{className:e,markType:n}=r,o.emit("plot:"+i,t),"plot"!==e)&&("element"===e?(r=Object.assign(Object.assign({},t),{nativeEvent:!0,data:{data:zw(r,a)}}),o.emit("element:"+i,r),o.emit(n+":"+i,r)):o.emit(e+":"+i,t))}}function Gw(){return(t,e,n)=>{const{container:r,view:i}=t,a=Ww($.CLICK,i,n,t=>1===t.detail),o=Ww($.DBLCLICK,i,n,t=>2===t.detail),s=Ww($.POINTER_TAP,i,n),l=Ww($.POINTER_DOWN,i,n),c=Ww($.POINTER_UP,i,n),u=Ww($.POINTER_OVER,i,n),f=Ww($.POINTER_OUT,i,n),h=Ww($.POINTER_MOVE,i,n),d=Ww($.POINTER_ENTER,i,n),p=Ww($.POINTER_LEAVE,i,n),g=Ww($.POINTER_UPOUTSIDE,i,n),y=Ww($.DRAG_START,i,n),m=Ww($.DRAG,i,n),v=Ww($.DRAG_END,i,n),b=Ww($.DRAG_ENTER,i,n),x=Ww($.DRAG_LEAVE,i,n),w=Ww($.DRAG_OVER,i,n),M=Ww($.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",l),r.addEventListener("pointerup",c),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",y),r.addEventListener("drag",m),r.addEventListener("dragend",v),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",M),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",l),r.removeEventListener("pointerup",c),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",y),r.removeEventListener("drag",m),r.removeEventListener("dragend",v),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",M)}}}function Hw(t,e){return e?"string"==typeof e?document.querySelector(e):e:t.getRootNode().defaultView.getConfig().container}function qw({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:l=!1,mount:c,bounding:u}){var f,h,d=t.getRootNode().defaultView.getConfig().container,o=o?Hw(t,c):t,c=u||function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return{x:t,y:e,width:n-t,height:r-e}}(t),d=(u=o,t=(t=d).getBoundingClientRect(),u=u.getBoundingClientRect(),{x:t.x-u.x,y:t.y-u.y}),{tooltipElement:p=(t=o,u=n,p=r,f=s,h=l,c=c,d=d,u=new Db({className:"tooltip",style:{x:u,y:p,container:d,data:[],bounding:c,position:f,enterable:h,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:{".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}}),t.appendChild(u.HTMLTooltipElement),u)}=o,{items:d,title:c=""}=e;p.update(Object.assign({x:n,y:r,data:d,title:c,position:s,enterable:l},void 0!==i&&{content:i(a,{items:d,title:c})})),o.tooltipElement=p}function Vw({root:t,single:e,emitter:n,nativeEvent:r=!0,mount:i}){e=(e?Hw(t,i):t).tooltipElement;e&&(e.hide(),r)&&n.emit("tooltip:hide",{nativeEvent:r})}function Yw(t){var e=t["tooltipElement"];e&&(e.destroy(),t.tooltipElement=void 0)}function $w(t){var e=t["value"];return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function Uw(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof Np)&&!(t instanceof Sp);return i(n)?n.invert(r):r&&r!==e?r:!i(t)||(n=t.invert(e),Array.isArray(n))?null:n}function Kw(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e&&"transparent"!==e?e:n}=t;return t}function Xw(t,e=t=>t){t=new Map(t.map(t=>[e(t),t]));return Array.from(t.values())}function Zw(n,s,l,t=n.map(t=>t.__data__)){const e=t=>t instanceof Date?+t:t;var r=Xw(t.map(t=>t.title),e).filter(Gu),t=t.flatMap((r,t)=>{const i=n[t],{items:e=[],title:a}=r;t=e.filter(Gu);const o=void 0!==l?l:e.length<=1;return t.map(t=>{var{color:e=Kw(i),name:n}=t,t=rt(t,["color","name"]),n=o?Uw(s,r)||n:n||Uw(s,r);return Object.assign(Object.assign({},t),{color:e,name:n||a})})}).map($w);return Object.assign(Object.assign({},0<r.length&&{title:r.join(",")}),{items:Xw(t,t=>`(${e(t.name)}, ${e(t.value)}, ${e(t.color)})`)})}function Qw(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function Jw(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function t5(t,e){return void 0===t?e:t}function e5(t){var{title:t,items:e}=t;return 0===e.length&&void 0===t}function n5(S,t){var{elements:e,sort:A,filter:L,scale:T,coordinate:j,crosshairs:N,render:P,groupName:C,emitter:R,wait:n=50,leading:r=!0,trailing:i=!1,startX:B=0,startY:I=0,body:F=!0,single:D=!0,position:z,enterable:W,mount:G,bounding:H,style:a={}}=t,t=rt(t,["elements","sort","filter","scale","coordinate","crosshairs","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","style"]),e=e(S);const q=$c(j),V=Uc(j);a=it(a,t);const{innerWidth:Y,innerHeight:Q}=j.getOptions(),$=[],U=[];for(const u of e){var o=u["__data__"],o=o["seriesX"];(o?$:U).push(u)}$.sort((t,e)=>{const n=q?0:1;var r=t=>t.getBounds().min[n];return q?r(e)-r(t):r(t)-r(e)});const J=new Map($.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[Mc(n.map((t,e)=>e),t=>n[+t]),n]]})),tt=at(a,"crosshairs");t=T.x;const K=null!=t&&t.getBandWidth?t.getBandWidth()/2:0,X=t=>{var[t]=j.invert(t);return t-K},et=(t,e)=>{const n=q?1:0,r=t[n];return e.filter(t=>{var[t,e]=(t=>{var{min:t,max:e}=t.getLocalBounds();return Mc([t[n],e[n]])})(t);return r>=t&&r<=e})},s=un(t=>{var e=vw(S,t);if(e){var n=S.getRenderBounds();const g=n.min[0],y=n.min[1],m=[e[0]-B,e[1]-I];m;var n=et(m,U),r=[],i=[];for(const b of $){var[a,o]=J.get(b),a=((t,e,n)=>{var t=X(t),[r,i]=Mc([n[0],n[n.length-1]]);return t<r||i<t?null:e[(0,ac(t=>n[+t]).center)(e,t)]})(m,a,o);if(null!==a){r.push(b);o=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")&&"series"!==t).map(([t,e])=>{e=e[n];return[Xe(t.replace("series","")),e]}))})(b,a);const{x:g,y}=o;a=j.map([(g||0)+K,y||0]);i.push([o,a])}}var s=Array.from(new Set(i.map(t=>t[0].x)));const v=s[Ic(s,t=>Math.abs(t-X(m)))];var s=i.filter(t=>t[0].x===v),l=[...s.map(t=>t[0]),...n.map(t=>t.__data__)],n=[...r,...n],l=Zw(n,T,C,l);if(A&&l.items.sort((t,e)=>A(t)-A(e)),L&&(l.items=l.items.filter(L)),0===n.length||e5(l))Z();else{if(F&&qw({root:S,data:l,x:e[0]+g,y:e[1]+y,render:P,event:t,single:D,position:z,enterable:W,mount:G,bounding:H}),N){n=s.map(t=>t[1]);{l=S;e=n;s=Object.assign(Object.assign({},tt),{width:Y,height:Q,startX:B,startY:I,transposed:q,polar:V});var c,{height:n,width:u,startX:f,startY:h,transposed:d,polar:p}=s,s=rt(s,["height","width","startX","startY","transposed","polar"]);const x=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},s),w=(s=e.map(t=>t[1]),e=e.map(t=>t[0]),Gc(s)),M=Gc(e),[O,k,_,E]=p?(s=f+u/2,e=h+n/2,p=Math.min(u,n)/2,c=y0(p0([M,w],[s,e])),[s,s+p*Math.cos(c),e,e+p*Math.sin(c)]):d?[f,f+u,w+h,w+h]:[M+f,M+f,h,h+n];(e=l.ruleY||(s=new nt.Line({style:Object.assign({x1:O,x2:k,y1:_,y2:E},x)}),l.appendChild(s),s)).style.x1=O,e.style.x2=k,e.style.y1=_,e.style.y2=E,l.ruleY=e}}R.emit("tooltip:show",Object.assign(Object.assign({},t),{nativeEvent:!0,data:{data:{x:jx(T.x,X(m),!0)}}}))}}},n,{leading:r,trailing:i}),Z=()=>{Vw({root:S,single:D,emitter:R,mount:G}),N&&Qw(S)},l=({nativeEvent:t,data:e})=>{var n,r;t||(t=e.data["x"],e=T["x"],e=e.map(t),[t,e]=j.map([e,.5]),[n,r]=S.getRenderBounds()["min"],s({offsetX:t+n,offsetY:e+r}))},c=()=>{Vw({root:S,single:D,emitter:R,nativeEvent:!1,mount:G})};return R.on("tooltip:show",l),R.on("tooltip:hide",c),S.addEventListener("pointerenter",s),S.addEventListener("pointermove",s),S.addEventListener("pointerleave",Z),()=>{S.removeEventListener("pointerenter",s),S.removeEventListener("pointermove",s),S.removeEventListener("pointerleave",Z),R.off("tooltip:show",l),R.off("tooltip:hide",c),Yw(S),N&&Qw(S)}}function r5(a,{elements:t,scale:o,render:s,groupName:l,sort:c,filter:u,emitter:f,wait:e=50,leading:n=!0,trailing:r=!1,groupKey:h=t=>t,single:d=!0,position:p,enterable:g,datum:y,view:m,mount:v,bounding:b}){const x=t(a),w=new Set(x),M=vc(x,h),O=un(t=>{var e,n,r,i=t["target"];!w.has(i)||(e=h(i),e=1===(e=M.get(e)).length?function(n){var{title:t,items:e=[]}=t=n["__data__"],e=e.filter(Gu).map(t=>{var{color:e=Kw(n)}=t,t=rt(t,["color"]);return Object.assign(Object.assign({},t),{color:e})}).map($w);return Object.assign(Object.assign({},t&&{title:t}),{items:e})}(e[0]):Zw(e,o,l),c&&e.items.sort((t,e)=>c(t)-c(e)),u&&(e.items=e.items.filter(u)),e5(e))?Vw({root:a,single:d,emitter:f,mount:v}):({offsetX:n,offsetY:r}=t,qw({root:a,data:e,x:n,y:r,render:s,event:t,single:d,position:p,enterable:g,mount:v,bounding:b}),f.emit("tooltip:show",Object.assign(Object.assign({},t),{nativeEvent:!0,data:{data:zw(i,m)}})))},e,{leading:n,trailing:r}),i=t=>{t=t.target;w.has(t)&&Vw({root:a,single:d,emitter:f,mount:v})},k=({nativeEvent:t,data:e})=>{var n,r,i,a;t||(t=x.find(n=>Object.entries(e.data).every(([t,e])=>y(n)[t]===e)))&&({x:n,y:r,width:i,height:a}=t.getBBox(),O({target:t,offsetX:n+i/2,offsetY:r+a/2}))},_=({nativeEvent:t}={})=>{t||Vw({root:a,single:d,emitter:f,nativeEvent:!1,mount:v})};return f.on("tooltip:show",k),f.on("tooltip:hide",_),a.addEventListener("pointerover",O),a.addEventListener("pointermove",O),a.addEventListener("pointerout",i),()=>{a.removeEventListener("pointerover",O),a.removeEventListener("pointermove",O),a.removeEventListener("pointerout",i),f.off("tooltip:show",k),f.off("tooltip:hide",_),Yw(a)}}function i5(t){const{shared:f,crosshairs:h,series:d,item:p=()=>({}),facet:g=!1}=t,y=rt(t,["shared","crosshairs","series","name","item","facet"]);return(e,t,n)=>{var{container:r,view:i}=e;const{scale:a,markState:o,coordinate:s}=i;var l=Jw(o,"seriesTooltip"),c=Jw(o,"crosshairs"),r=mw(r),l=t5(d,l);if(l&&Array.from(o.values()).some(t=>{var e;return(null==(e=t.interaction)?void 0:e.seriesTooltip)&&t.tooltip})&&!g)return n5(r,Object.assign(Object.assign({},y),{elements:pw,scale:a,coordinate:s,crosshairs:t5(h,c),item:p,emitter:n}));if(l&&g){l=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const u=gw(e,t),a=l[0].view.scale;t=r.getBounds(),l=t.min[0],t=t.min[1];return n5(r.parentNode.parentNode,Object.assign(Object.assign({},y),{elements:()=>u,scale:a,coordinate:s,crosshairs:t5(h,c),item:p,startX:l,startY:t,emitter:n}))}return r5(r,Object.assign(Object.assign({},y),{datum:Mw(i),elements:pw,scale:a,coordinate:s,groupKey:f?ww(i):void 0,item:p,emitter:n,view:i}))}}const a5="legend-category",o5="items-item",s5="legend-category-item-marker",l5="legend-category-item-label";function c5(t){return t.getElementsByClassName(s5)[0]}function u5(t){return t.getElementsByClassName(l5)[0]}function f5(t){return t.getElementsByClassName(o5)}function h5(t){return t.getElementsByClassName(a5)}function d5(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function p5(t,{legends:e,marker:i,label:a,datum:o,filter:n,state:r={}}){const s=new Map,l=new Map,c=new Map;var{unselected:r={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=r,u={unselected:at(r,"marker")},r={unselected:at(r,"label")};const{setState:f,removeState:h}=Ow(u,void 0),{setState:d,removeState:p}=Ow(r,void 0),g=Array.from(e(t)),y=g.map(o),m=()=>{for(const r of g){var t=o(r),e=i(r),n=a(r);(y.includes(t)?(h(e,"unselected"),p):(f(e,"unselected"),d))(n,"unselected")}};for(const w of g){var v=()=>{Lw(t,"pointer")},b=()=>{Lw(t,"default")},x=()=>ue(this,void 0,void 0,function*(){var t=o(w),e=y.indexOf(t);-1===e?y.push(t):y.splice(e,1),0===y.length&&y.push(...g.map(o)),yield n(y),m()});w.addEventListener("click",x),w.addEventListener("pointerenter",v),w.addEventListener("pointerout",b),s.set(w,x),l.set(w,v),c.set(w,b)}return()=>{for(const t of g)t.removeEventListener("click",s.get(t)),t.removeEventListener("pointerenter",l.get(t)),t.removeEventListener("pointerout",c.get(t))}}function g5(){return(t,e,n)=>{const{container:r,view:a,options:o,update:s}=t;t=h5(r);const i=(r,i)=>ue(this,void 0,void 0,function*(){var t=a["scale"];const{[r]:n}=t;t=o.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[r]:i},...e];return it({},t,{transform:e,scale:{[r]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},o),{marks:t});return s(t)});if(!t.length){const c=t=>{var{values:t,channel:e}=t;i(e,t)};return n.on("legend:filter",c),()=>{n.off("legend:filter",c)}}const l=t.map(t=>{const{name:e,domain:n}=d5(t).scales[0];return p5(r,{legends:f5,marker:c5,label:u5,datum:t=>{t=t.__data__,t=t.index;return n[t]},filter:t=>i(e,t),state:t.attributes.state})});return()=>{l.forEach(t=>t())}}}function y5(){return t=>{const{container:e,view:n,options:r}=t;t=h5(e);const i=pw(e);var a=kw(r,["active","inactive"]),o=_w(i,Mw(n));for(const u of t){const f=t=>{var e=u.attributes["data"],t=t["__data__"],t=t["index"];return e[t].label},h=d5(u).scales[0].name,d=f5(u),p=(t=>{var{scale:{[t]:t}}=n;return t})(h),g=vc(i,t=>p.invert(t.__data__[h]));var{state:s={}}=u.attributes,{inactive:s={}}=s;const{setState:y,removeState:m}=Ow(a,o);var l={inactive:at(s,"marker")},s={inactive:at(s,"label")};const{setState:v,removeState:b}=Ow(l),{setState:x,removeState:w}=Ow(s),M=t=>{for(const r of d){var e=c5(r),n=u5(r);(r===t||null===t?(b(e,"inactive"),w):(v(e,"inactive"),x))(n,"inactive")}},O=new Map;for(const _ of d){var c=()=>{var t=f(_),e=new Set(g.get(t));for(const n of i)e.has(n)?y(n,"active"):y(n,"inactive");M(_)};_.addEventListener("pointerover",c),O.set(_,c)}const k=()=>{for(const t of i)m(t,"inactive","active");M(null)};return u.addEventListener("pointerleave",k),()=>{u.removeEventListener(k);for(var[t,e]of O)t.removeEventListener(e)}}}}function m5(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}const v5=ng(t=>{const e=t.attributes,{x:n,y:r,width:i,height:a,class:o,handleSize:s=10,document:l}=e,c=rt(e,["x","y","width","height","class","renders","handleSize","document"]);if(l&&void 0!==i&&void 0!==a&&void 0!==n&&void 0!==r){var u=s/2,f=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));n=t.handle;return n.attr(e),n},h=at(qu(c,"handleNW","handleNE"),"handleN"),{render:d=f}=h,h=rt(h,["render"]),p=at(c,"handleE"),{render:g=f}=p,p=rt(p,["render"]),y=at(qu(c,"handleSE","handleSW"),"handleS"),{render:m=f}=y,y=rt(y,["render"]),v=at(c,"handleW"),{render:b=f}=v,v=rt(v,["render"]),x=at(c,"handleNW"),{render:w=f}=x,x=rt(x,["render"]),M=at(c,"handleNE"),{render:O=f}=M,M=rt(M,["render"]),k=at(c,"handleSE"),{render:_=f}=k,k=rt(k,["render"]),E=at(c,"handleSW"),{render:f=f}=E,E=rt(E,["render"]);var S=i=>()=>{return new(ng(t=>{return e=i,n=(t=t).id,r=rt(t.attributes,["x","y"]),(e=e(t,Object.assign({x:0,y:0},r),l)).id=n,void(e.style.draggable=!0);var e,n,r}))({})},t=et(t).attr("className",o).style("x",n).style("y",r).style("draggable",!0);t.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(m5,Object.assign({width:i,height:a},qu(c,"handle"))),t.maybeAppend("handle-n",S(d)).style("x",u).style("y",-u).style("width",i-s).style("height",s).style("fill","transparent").call(m5,h),t.maybeAppend("handle-e",S(g)).style("x",i-u).style("y",u).style("width",s).style("height",a-s).style("fill","transparent").call(m5,p),t.maybeAppend("handle-s",S(m)).style("x",u).style("y",a-u).style("width",i-s).style("height",s).style("fill","transparent").call(m5,y),t.maybeAppend("handle-w",S(b)).style("x",-u).style("y",u).style("width",s).style("height",a-s).style("fill","transparent").call(m5,v),t.maybeAppend("handle-nw",S(w)).style("x",-u).style("y",-u).style("width",s).style("height",s).style("fill","transparent").call(m5,x),t.maybeAppend("handle-ne",S(O)).style("x",i-u).style("y",-u).style("width",s).style("height",s).style("fill","transparent").call(m5,M),t.maybeAppend("handle-se",S(_)).style("x",i-u).style("y",a-u).style("width",s).style("height",s).style("fill","transparent").call(m5,k),t.maybeAppend("handle-sw",S(f)).style("x",-u).style("y",a-u).style("width",s).style("height",s).style("fill","transparent").call(m5,E)}});function b5(l,t){var{brushed:a=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(l),brushRegion:c=(t,e,n,r,i)=>[t,e,n,r],reverse:u=!1,fill:n="#777",fillOpacity:r="0.3",stroke:i="#fff",selectedHandles:f=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=t,h=rt(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let d=null,p=null,g=null,y=null,m=null,v=!1;const[b,x,w,M]=s,O=(Lw(l,"crosshair"),l.style.draggable=!0,(t,e)=>{if(y&&y.remove(),m&&m.remove(),d=[t,e],u)return B();I()}),B=()=>{m=new nt.Path({style:Object.assign(Object.assign({},h),{fill:n,fillOpacity:r,stroke:i,pointerEvents:"none"})}),y=new v5({style:{x:0,y:0,width:0,height:0,draggable:!0,document:l.ownerDocument},className:"mask"}),l.appendChild(m),l.appendChild(y)},I=()=>{y=new v5({style:Object.assign(Object.assign({document:l.ownerDocument,x:0,y:0},h),{fill:n,fillOpacity:r,stroke:i,draggable:!0}),className:"mask"}),l.appendChild(y)},k=(t=!0)=>{y&&y.remove(),m&&m.remove(),d=null,p=null,g=null,v=!1,y=null,m=null,t&&e()},_=(t,e,n=!0)=>{var[t,e,r,i]=function(t,e,n,r,i){var[i,a,o,s]=i;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(o,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[t,e,r,i]=c(t,e,r,i,s);return(u?D:F)(t,e,r,i),a(t,e,r,i,n),[t,e,r,i]},F=(t,e,n,r)=>{y.style.x=t,y.style.y=e,y.style.width=n-t,y.style.height=r-e},D=(t,e,n,r)=>{m.style.d=`
|
|
8
8
|
M${b},${x}L${w},${x}L${w},${M}L${b},${M}Z
|
|
9
9
|
M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
|
|
10
|
-
`,y.style.x=t,y.style.y=e,y.style.width=n-t,y.style.height=r-e},E={"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"}},S=t=>L(t)||A(t),A=t=>{t=t.id;return-1!==f.indexOf(t)&&new Set(Object.keys(E)).has(t)},L=t=>t===y.getElementById("selection"),T=t=>{var e=t["target"],[t,n]=bw(l,t);y&&S(e)?S(e)&&(g=[t,n]):(O(t,n),v=!0)},j=t=>{var e,n,r,i,a,o,s=t["target"],t=bw(l,t);if(d)return g?L(s)?(e=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(n=t)[0]-g[0],n=n[1]-g[1],r=e(r,d[0],p[0],b,w),e=e(n,d[1],p[1],x,M),n=[d[0]+r,d[1]+e],r=[p[0]+r,p[1]+e],void _(n,r)):([e,n]=[t[0]-g[0],t[1]-g[1]],r=s["id"],E[r]?([s,i,a,o]=E[r].vector,_([d[0]+e*s,d[1]+n*i],[p[0]+e*a,p[1]+n*o])):void 0):_(d,t)},N=t=>{var e,n,r,i;g?(g=null,{x:e,y:r,width:n,height:i}=y.style,d=[e,r],p=[e+n,r+i]):(p=bw(l,t),[e,n,r,i]=_(d,p),v=!1,o(e,n,r,i,t))},P=t=>{t=t.target;y&&!S(t)&&k()},C=t=>{t=t.target;y&&S(t)&&!v?L(t)?Lw(l,"move"):A(t)&&Lw(l,E[t.id].cursor):Lw(l,"crosshair")},R=()=>{Lw(l,"default")};return l.addEventListener("dragstart",T),l.addEventListener("drag",j),l.addEventListener("dragend",N),l.addEventListener("click",P),l.addEventListener("pointermove",C),l.addEventListener("pointerleave",R),{mask:y,move(t,e,n,r,i=!0){y||O(t,e),d=[t,e],p=[n,r],_([t,e],[n,r],i)},remove(){y&&k()},destroy(){y&&k(!1),Lw(l,"default"),l.removeEventListener("dragstart",T),l.removeEventListener("drag",j),l.removeEventListener("dragend",N),l.removeEventListener("click",P),l.removeEventListener("pointermove",C),l.removeEventListener("pointerleave",R)}}}function x5(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function w5(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:a,brushRegion:o,extent:s,reverse:l,scale:c,coordinate:u,series:f=!1,key:d=t=>t,bboxOf:h=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:p={},emitter:g}=e,e=rt(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const y=n(t),m=i(t),v=m.flatMap(n);i=_w(y,a),n=at(e,"mask");const{setState:b,removeState:x}=Ow(p,i),w=new Map,{width:M,height:O,x:k=0,y:_=0}=h(t);a=s||[0,0,M,O];const E=()=>{for(const t of[...y,...v])x(t,"active","inactive")},S=(t,e,n,r)=>{var i;for(const u of m)null!=(i=u.brush)&&i.remove();var a=new Set;for(const f of y){var{min:o,max:s}=f.getLocalBounds(),[o,l]=o,[s,c]=s;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r<e||o<t||i<a||s<n)}([o,l,s,c],[t,e,n,r])?b(f,"inactive"):(b(f,"active"),a.add(d(f)))}for(const h of v)a.has(d(h))?b(h,"active"):b(h,"inactive")},A=()=>{for(const t of y)x(t,"inactive");for(const e of w.values())e.remove();w.clear()},L=(t,e,n,r)=>{var i;for(const o of y){var a=w.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),w.set(a,i),i);a.style.clipPath=new nt.Rect({style:{x:t+k,y:e+_,width:n-t,height:r-e}}),b(o,"inactive"),b(a,"active")}},T=b5(t,Object.assign(Object.assign({},n),{extent:a,brushRegion:o,reverse:l,selectedHandles:r,brushended:()=>{var t=f?A:E;g.emit("brush:end",{nativeEvent:!0}),t()},brushed:(t,e,n,r,i)=>{var a=Px(t,e,n,r,c,u);i&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:a}}),(f?L:S)(t,e,n,r)}})),j=({nativeEvent:t,data:e})=>{var n,r;t||(t=e["selection"],[e,t,n,r]=function(t,e,n){var[[t,r],[i,a]]=t,{x:e,y:o}=e,t=[e.map(t),o.map(i)],i=t=>t.getStep?t.getStep():0,r=[e.map(r)+i(e),o.map(a)+i(o)],[e,a]=n.map(t),[i,o]=n.map(r);return[e,a,i,o]}(t,c,u),T.move(e,t,n,r,!1))},N=(g.on("brush:highlight",j),()=>T.remove()),P=(g.on("brush:remove",N),T.destroy.bind(T));return T.destroy=()=>{g.off("brush:highlight",j),g.off("brush:remove",N),P()},T}function M5(t){var{facet:g,brushKey:y}=t,m=rt(t,["facet","brushKey"]);return(t,e,n)=>{var r,i,a,o,{container:s,view:l,options:c}=t,s=mw(s),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:d}=l;if(g)return r=(o=s.getBounds()).min[0],i=o.min[1],a=o.max[0],o=o.max[1],w5(s.parentNode.parentNode,Object.assign(Object.assign({elements:()=>gw(t,e),datum:Mw(yw(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[r,i,a,o],state:kw(yw(t,e).map(t=>t.options),f),emitter:n,scale:h,coordinate:d,selectedHandles:void 0},u),m));const p=w5(s,Object.assign(Object.assign({elements:pw,key:t=>t.__data__.key,siblings:()=>{return x5(t,e,y).map(t=>mw(t.container))},datum:Mw([l,...x5(t,e,y).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:kw([c,...x5(t,e,y).map(t=>t.options)],f),emitter:n,scale:h,coordinate:d,selectedHandles:void 0},u),m));return s.brush=p,()=>p.destroy()}}function O5(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function k5(t){return M5(Object.assign(Object.assign({},t),{brushRegion:O5,selectedHandles:["handle-e","handle-w"]}))}function _5(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function E5(t){return M5(Object.assign(Object.assign({},t),{brushRegion:_5,selectedHandles:["handle-n","handle-s"]}))}const S5="axis",A5="axis-hot-area";function L5(t){return t.getElementsByClassName(S5)}function T5(t){return t.getElementsByClassName("axis-line")[0]}function j5(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function N5(t,e){var{cross:n,offsetX:i}=e,e=rt(e,["cross","offsetX","offsetY"]),r=j5(t),[t]=T5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:_5,hotZone:new nt.Rect({className:A5,style:Object.assign({x:n?a:t-r/2,width:n?r/2:r,y:o,height:l-o},e)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,r)=>[Math.floor(a-i),e,Math.ceil(s-i),r]}}function P5(t,e){var{offsetY:i,cross:n=!1}=e,e=rt(e,["offsetY","offsetX","cross"]),r=j5(t),[,t]=T5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:O5,hotZone:new nt.Rect({className:A5,style:Object.assign({x:a,width:s-a,y:n?o:t-r,height:n?r:2*r},e)}),extent:n?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,n,r)=>[t,Math.floor(o-i),n,Math.ceil(l-i)]}}function C5(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={}}=e,e=rt(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state"]);const f=r(t);r=n(t);const h=Ow(u,_w(f,o))["setState"],d=new Map;var p=at(e,"mask");const g=()=>{for(const t of f)(t=>Array.from(d.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(t))?h(t,"active"):h(t,"inactive")};var y=r.some(a)&&r.some(t=>!a(t));for(const m of r){const{hotZone:v,brushRegion:b,extent:x}=(a(m)?P5:N5)(m,{offsetY:s,offsetX:l,cross:y,zIndex:999,fill:"transparent"});m.parentNode.appendChild(v),b5(v,Object.assign(Object.assign({},p),{reverse:c,brushRegion:b,brushended(){d.delete(m),g()},brushed(t,e,n,r){d.set(m,x(t,e,n,r)),g()}}))}}function R5(a){return t=>{var{container:t,view:e,options:n}=t,{x:r,y:i}=mw(t).getBBox();return C5(t,Object.assign({elements:pw,axes:L5,offsetY:i,offsetX:r,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:Mw(e),state:kw(n,["active",["inactive",{opacity:.5}]])},a))}}function B5(t,e){var{filter:a,reset:n,brushRegion:r,extent:i,reverse:o,emitter:s,selection:l}=e,e=at(rt(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:c,height:u}=t.getBBox(),i=i||[0,0,c,u];const f=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),h=b5(t,Object.assign(Object.assign({},e),{extent:i,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r,i){i.nativeEvent=!0,a(l(t,e,n,r),i),h.remove()}}));function d(t){f(t)&&(t.nativeEvent=!0,n(t))}t.addEventListener("click",d);const p=({nativeEvent:t,data:e})=>{t||(t=e["selection"],a(t,{nativeEvent:!1}))};return s.on("brush:filter",p),()=>{h.destroy(),s.off("brush:filter",p),t.removeEventListener("click",d)}}function I5(t){var{hideX:h=!0,hideY:d=!0}=t,p=rt(t,["hideX","hideY"]);return(t,e,a)=>{const{container:n,view:r,options:o,update:s}=t;t=mw(n);let l=!1,c=!1,u=r;var{scale:i,coordinate:f}=r;return B5(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{var{scale:i,coordinate:a}=u;return Px(t,e,n,r,i,a)},filter:(r,i)=>ue(this,void 0,void 0,function*(){if(!c){c=!0;const[e,n]=r;var t=o["marks"],t=t.map(t=>it({axis:Object.assign(Object.assign({},h&&{x:{transform:[{type:"hide"}]}}),d&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:e},y:{domain:n}}})),t=(a.emit("brush:filter",Object.assign(Object.assign({},i),{data:{selection:[e,n]}})),Object.assign(Object.assign({},o),{marks:t,clip:!0})),t=yield s(t);u=t.view,c=!1,l=!0}}),reset:t=>{var e,n;!c&&l&&(e=r["scale"],{x:e,y:n}=e,e=e.getOptions().domain,n=n.getOptions().domain,a.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[e,n]}})),l=!1,u=r,s(o))},extent:void 0,emitter:a,scale:i,coordinate:f},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),p))}}function F5(t){return I5(Object.assign(Object.assign({hideX:!0},t),{brushRegion:O5}))}function D5(t){return I5(Object.assign(Object.assign({hideY:!0},t),{brushRegion:_5}))}const z5="slider";function W5({wait:y=50,leading:m=!0,trailing:v=!1}){return t=>{const{container:e,view:n,options:s,update:l}=t;t=e.getElementsByClassName(z5);if(!t.length)return()=>{};let c=!1;const{scale:u,coordinate:r}=n;var{x:i,y:a}=u;const f=$c(r),o=new Map,h={x:i.getOptions().domain,y:a.getOptions().domain};for(const p of t){const g=p.attributes["orientation"];var d=un(o=>ue(this,void 0,void 0,function*(){var t,e,n,r,i,a=o.detail["value"];c||(c=!0,[i,t]=(t=g,i="vertical"===t?"y":"x",t="vertical"===t?"x":"y",f?[t,i]:[i,t]),a=function(t,e,n){var[t,r]=t;return Nx(e,[jx(e,(n=n?t=>1-t:t=>t)(t),!0),jx(e,n(r),!1)])}(a,u[i],f&&"horizontal"===g),h[i]=a,e=h[t],n=s,r={[i]:{domain:a},[t]:{domain:e}},i=(i=n["marks"]).map(t=>it({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:r,slider:Object.assign(Object.assign({},t.slider.x&&{x:{preserve:!0}}),t.slider.y&&{y:{preserve:!0}}),animate:!1})),a=Object.assign(Object.assign({},n),{marks:i,clip:!0,animate:!1}),yield l(a),c=!1)}),y,{leading:m,trailing:v});p.addEventListener("valuechange",d),o.set(p,d)}return()=>{for(var[t,e]of o)t.removeEventListener("valuechange",e)}}}const G5={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 H5(t){return"text"===t.nodeName&&!!t.isOverflowing()}function q5(t){var{offsetX:h=8,offsetY:d=8}=t,r=rt(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=at(r,"tip"),f=new Set,e=t=>{var e,n,r,i,a,o=t["target"];H5(o)?({offsetX:e,offsetY:n}=t,e=e+h-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new nt.HTML({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},G5),u),`<${r} style="${Object.entries(a).map(([t,e])=>t.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+e).join(";")}">${i}</${r}>`),x:e,y:n}}),s.appendChild(a),o.tip=a,f.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];H5(e)?e.tip&&(e.tip.remove(),e.tip=null,f.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),f.forEach(t=>t.remove())}}}function V5(n){return(t,...e)=>it({},n(t,...e),t)}function Y5(n){return(t,...e)=>it({},t,n(t,...e))}function $5(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=rt(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const U5=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:o=0,y:s=0,width:l,height:c,data:u}=t;return e.map(t=>{var{data:e,x:n,y:r,width:i,height:a}=t,t=rt(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},t),{data:$5(e,u),x:null!=n?n:o,y:null!=r?r:s,width:null!=i?i:l,height:null!=a?a:c})})},K5=(U5.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=rt(g,["data"]),y=$5(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),X5=(K5.props={},()=>t=>{var e=t["children"],t=rt(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},encode:f={},transform:h=[]}=t,n=rt(t,["data","scale","axis","legend","encode","transform"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={},encode:a={},transform:o=[]}=t,t=rt(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:$5(e,s),scale:it({},l,n),encode:it({},f,a),transform:[...h,...o],axis:!(!r||!c)&&it({},c,r),legend:!(!i||!u)&&it({},u,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),Z5=(X5.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinate:b,theme:x,component:w,interaction:M,x:O,y:k,key:_,frame:E,title:S,labelTransform:A,parentKey:L,clip:T,viewStyle:j}=t,t=rt(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelTransform","parentKey","clip","viewStyle"]);return[{type:"standardView",x:O,y:k,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinate:b,component:w,interaction:M,frame:E,title:S,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,parentKey:L,clip:T,style:j,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),Q5=(Z5.props={},V5(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=vc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),J5=V5(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:it({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:it({title:i},o)}}}),tM=V5(()=>({animate:{enterType:"fadeIn"}})),eM=Y5(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),nM=Y5(()=>({type:"cell"})),rM=Y5(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),iM=Y5((t,c=function(t){t=t.points;return b0(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?aM(a,e):(t=e.length?void 0:null,it({title:r===i-1&&void 0,grid:t},a))}},M=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?aM(r,e):(n=e.length?void 0:null,it({title:0===t&&void 0,grid:n},r))}},O={})=>{const{data:e,encode:n,children:u,scale:r,x:k=0,y:_=0,shareData:f=!1,key:E}=t,S=e["value"],{x:A,y:L}=n;t=r.color;const T=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=u0(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[L]:e}=t,t=void 0===A||t===n,e=void 0===L||e===r;return t&&e}).map(t=>S.filter(t)),v=f?Cc(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:L,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=rt(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:L?5:void 0}},r=r?g:0===g.length?[]:S,l={color:{domain:T}},o={x:oM(o,w)(p,r),y:oM(a,M)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+k,y:f+m+_,parentKey:E,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:it(s,e,l),axis:it({},i,o),legend:!1},t),O)})})}}});function aM(t,e){return e.length?it({title:!1,tick:null,label:null},t):it({title:!1,tick:null,label:null,grid:null},t)}function oM(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const sM=()=>t=>{return[zx.of(t).call(nM).call(J5).call(tM).call(Q5).call(eM).call(rM).call(iM).value()]},lM=(sM.props={},V5(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),cM=Y5(t=>{const{data:w,children:c,x:M=0,y:O=0,key:k}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=u0(t);const s=t.map(({points:t})=>b0(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=rt(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return aM(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return aM(n,e)})(y,w)};return Object.assign({data:w,parentKey:k,key:i+"-"+c,x:u+m+M,y:f+v+O,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:it({x:{facet:!1},y:{facet:!1}},e),axis:it({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:it({},a,{x:p,y:g})},t)})})}}}),uM=Y5(t=>{var e=t["encode"],t=rt(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=rt(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const fM=()=>t=>{return[zx.of(t).call(nM).call(J5).call(cM).call(uM).call(tM).call(eM).call(lM).value()]},hM=V5(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),dM=V5(t=>({coordinate:{type:"polar"}})),pM=t=>{var e=t["encode"],t=rt(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function gM(t){return t=>null}function yM(t){var t=t["points"],[t,e,n,r]=t,i=g0(t,r),t=p0(t,r),r=v0(t,p0(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=m0(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const mM=()=>t=>{return[zx.of(t).call(nM).call(pM).call(J5).call(dM).call(rM).call(iM,yM,gM,gM,{frame:!1}).call(tM).call(eM).call(hM).value()]};const vM=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=it({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function bM(t,e){if(null!==t)return{type:"column",value:t,field:e}}function xM(t,e){t=bM(t,e);return Object.assign(Object.assign({},t),{inferred:!0})}function wM(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function MM(t,e){var n=[];for(const r of t)n[r]=e;return n}function R(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function OM(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=R(t,i);if(null!==n)return[n,r]}return[null,null]}function kM(t){return!(t instanceof Date)&&"object"==typeof t}vM.props={};const _M=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,it({},e,{encode:{y1:xM(MM(t,0))}})]};function EM(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=R(r,t))?void 0:t[0]]}).filter(([,t])=>Gu(t));return Array.from(vc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function SM(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:ic(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>CM(t=>r(e[t]))):"series"===t?TM:"value"===t?jM:"sum"===t?NM:"maxIndex"===t?PM:()=>null}function AM(t,e){for(const n of t)n.sort(e)}function LM(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function TM(t,e,n){return CM(t=>n[t])}function jM(t,e,n){return CM(t=>e[t])}function NM(t,n,e){t=u0(t),t=Array.from(vc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return CM(t=>r.get(e[t]))}function PM(t,n,e){t=u0(t),t=Array.from(vc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Rc(e,t=>n[t])]));return CM(t=>r.get(e[t]))}function CM(n){return(t,e)=>ic(n(t),n(e))}_M.props={};const RM=(t={})=>{const{groupBy:L="x",orderBy:T=null,reverse:j=!1,y:N="y",y1:P="y1",series:C=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=R(r,"y"),[s,l]=R(r,"y1"),[r]=C?OM(r,"series","color"):R(r,"color"),c=EM(L,t,e),n=SM(T)(n,a,r),u=(n&&AM(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){j&&_.reverse();var g=s?+s[_[0]]:0,y=[],m=[];for(const E of _){var v=h[E]=+a[E]-g;v<0?m.push(E):0<=v&&y.push(E)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const S of m.reverse()){var w=h[S];n=u[S]=(f[S]=n)+w}let r=g;for(const A of y){var M=h[A];0<M?r=u[A]=(f[A]=r)+M:u[A]=f[A]=r}}const O=new Set(d),k=new Set(p);r="y"===N?u:f,n="y"===P?u:f;return[t,it({},e,{encode:{y0:xM(a,o),y:bM(r,o),y1:bM(n,l)},style:Object.assign({first:(t,e)=>O.has(e),last:(t,e)=>k.has(e)},i)})]}};function BM(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}RM.props={};const IM=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(BM)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",RM({groupBy:r})(t,e,n))},FM=(IM.props={},(t={})=>{const{channel:s="x"}=t;return(t,e)=>{const n=e["encode"];var r=e["tooltip"];if($u(r))return[t,e];r=r.title;if(void 0!==r)return[t,e];var i=Object.keys(n).filter(t=>t.startsWith(s)).filter(t=>!n[t].inferred).map(t=>R(n,t)).filter(([t])=>t).map(t=>t[0]);if(0===i.length)return[t,e];var a=[];for(const o of t)a[o]={value:i.map(t=>t[o]).join(", ")};return[t,it({},e,{tooltip:{title:a}})]}}),DM=(FM.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,it({},e,{encode:{x:xM(MM(t,0))},scale:{x:{guide:null}}})]}),zM=(DM.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,it({},e,{encode:{y:xM(MM(t,0))},scale:{y:{guide:null}}})]}),WM=(zM.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,it({},e,{encode:{size:wM(MM(t,3))}})]}),GM=(WM.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=rt(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,it({},e,{encode:{key:bM(r)}})]}),HM=(GM.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=R(n,"color"),[t,it({},e,{encode:{series:bM(r,i)}})])}),qM=(HM.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(kM)?[t,e]:[t,it({},e,{encode:{y:bM(n)}})]}),VM=(qM.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(kM)?[t,e]:[t,it({},e,{encode:{x:bM(n)}})]}),YM=(VM.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=R(n,"y"),[t,it({},e,{encode:{y1:bM([...r])}})])}),$M=(YM.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=R(n,"x"),[t,it({},e,{encode:{x1:bM([...r])}})])}),UM=($M.props={},t=>{const i=t["channel"];return(t,e)=>{const{encode:a,tooltip:n}=e;var r;return $u(n)||({items:r=[]}=n,!r)||0<r.length?[t,e]:(r=(Array.isArray(i)?i:[i]).flatMap(e=>Object.keys(a).filter(t=>t.startsWith(e)).map(t=>{var{field:e,value:n,inferred:r=!1,aggregate:i}=a[t];return r?null:i&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t)),[t,it({},e,{tooltip:{items:r}})])}}),KM=(UM.props={},()=>(t,e)=>[t,it({scale:{x:{padding:0},y:{padding:0}}},e)]),XM=(KM.props={},()=>(t,e)=>{var{style:n={}}=e,r=rt(e,["data","style"]),{x:i,y:a}=n,n=rt(n,["x","y"]);return null==i||null==a?[t,e]:[[0],it({},r,{data:[0],cartesian:!0,encode:{x:bM([i||0]),y:bM([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),ZM=(XM.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,it({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),QM=(ZM.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(kM)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,it({},e,{encode:{x:bM(n),y:bM(r)}})])}),JM=(QM.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,it({},e,{encode:{series:wM(MM(t,void 0))}})]:[t,e]}),tO=(JM.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return rt(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=R(r,"y"),[r]=OM(r,"series","color"),o=LM(r,i),i=EM(c,t,e),n=SM(f)(n,a,r),s=(n&&AM(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,it({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:bM(s)}})]}}),eO=(tO.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,R(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(vc(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=R(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[MM(n,r)]:OM(e,"enterDuration",MM(n,r));var[l]=OM(e,"enterDelay",MM(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=Cc(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,it({},t,{encode:{enterDuration:wM(s),enterDelay:wM(c)}})]}});eO.props={};const nO=(t={})=>{const{groupBy:p="x",basis:g="max"}=t;return(e,t)=>{const{encode:n,tooltip:r}=t;var i=rt(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=EM(p,e,t),l="function"==typeof(h=g)?h:{min:(t,e)=>Bc(t,t=>e[+t]),max:(t,e)=>Cc(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>Gc(t,t=>e[+t]),median:(t,e)=>Hc(t,t=>e[+t]),sum:(t,e)=>Yc(t,t=>e[+t]),deviation:(t,e)=>hc(t,t=>e[+t])}[h]||Cc;for(const e of i){var c=l(e,o);for(const d of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[d]=+u[d]/c}}var h=$u(r)||(null==r?void 0:r.items)&&0!==(null==r?void 0:r.items.length);return[e,it({},t,Object.assign({encode:Object.fromEntries(s.map(([t,e])=>[t,bM(e,R(n,t)[1])]))},!h&&n.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function rO(t,e,n){return null===t?[-.5,.5]:(t=LM(t,e),[-(e=new _p({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function iO(t,e,n){return e*(1-t)+n*t}nO.props={};const aO=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=R(n,"x"),[n]=R(n,"y");const o=rO(a,r,l),s=rO(n,i,c);a=t.map(()=>iO(u(),...s)),r=t.map(()=>iO(u(),...o));return[t,it({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:bM(a),dx:bM(r)}})]}},oO=(aO.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=R(n,"x");const i=rO(n,r,a);n=t.map(()=>iO(o(),...i));return[t,it({scale:{x:{padding:.5}}},e,{encode:{dx:bM(n)}})]}}),sO=(oO.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=rt(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=EM(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=dc(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,it({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,bM(e,R(n,t)[1])]))})]}}),lO=(sO.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=R(n,"y");var[,i]=R(n,"y1"),n=(f?OM(n,"series","color"):R(n,"color"),EM(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,it({},e,{encode:{y1:bM(a,i)}})]}});function cO(t,e){return[t[0]]}function uO(t,e){return[t[t.length-1]]}function fO(t,e){return[t[Rc(t,t=>e[t])]]}function hO(t,e){return[t[Ic(t,t=>e[t])]]}lO.props={};const dO=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=EM(a,t,e);const[r]=R(n,o),i="function"==typeof(n=s)?n:{first:cO,last:uO,max:fO,min:hO}[n]||cO;return[t.flatMap(t=>i(t,r)),e]}},pO=(dO.props={},(t={})=>{var e=t["selector"],t=rt(t,["selector"]);return dO(Object.assign({channel:"x",selector:e},t))}),gO=(pO.props={},(t={})=>{var e=t["selector"],t=rt(t,["selector"]);return dO(Object.assign({channel:"y",selector:e},t))});function yO(e){return t=>null===t?e:e+" of "+t}function mO(){return[(t,e)=>Gc(t,t=>+e[t]),yO("mean")]}function vO(){return[(t,e)=>Hc(t,t=>+e[t]),yO("median")]}function bO(){return[(t,e)=>Cc(t,t=>+e[t]),yO("max")]}function xO(){return[(t,e)=>Bc(t,t=>+e[t]),yO("min")]}function wO(){return[(t,e)=>t.length,yO("count")]}function MO(){return[(t,e)=>Yc(t,t=>+e[t]),yO("sum")]}function OO(){return[(t,e)=>e[t[0]],yO("first")]}function kO(){return[(t,e)=>e[t[t.length-1]],yO("last")]}gO.props={};const _O=(t={})=>{const i=t["groupBy"],a=rt(t,["groupBy"]);return(t,e)=>{const{data:s,encode:l}=e,c=i(t,e);if(!c)return[t,e];var t=Object.entries(a).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:mO,max:bO,count:wO,first:OO,last:kO,sum:MO,min:xO,median:vO}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=R(l,t);e=e;var e=(o=a)||((e=e["from"])?([,e]=R(l,e),e):o),o=c.map(t=>n(t,null!==i&&void 0!==i?i:s));return[t,Object.assign(Object.assign({},(t=o,o=(null==r?void 0:r(e))||e,t=bM(t,o),Object.assign(Object.assign({},t),{constant:!1}))),{aggregate:!0})]}),n=Object.keys(l).map(t=>{const[e,n]=R(l,t);return[t,bM(c.map(t=>e[t[0]]),n)]}),r=c.map(t=>s[t[0]]);return[u0(c),it({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},EO=(_O.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=rt(t,["channels"]);return _O(Object.assign(Object.assign({},e),{groupBy:(t,e)=>EM(n,t,e)}))}),SO=(EO.props={},(t={})=>EO(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),AO=(SO.props={},(t={})=>EO(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),LO=(AO.props={},(t={})=>EO(Object.assign(Object.assign({},t),{channels:["color"]})));function TO(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=rt(n,["reverse","slice","channel"]),{encode:o,scale:s={}}=e,s=null==(s=s[a])?void 0:s.domain;const[l]=R(o,a);var c,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=R(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>Cc(t,t=>+a[t]);if("min"===i)return t=>Bc(t,t=>+a[t]);if("sum"===i)return t=>Yc(t,t=>+a[t]);if("median"===i)return t=>Hc(t,t=>+a[t]);if("mean"===i)return t=>Gc(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),o=function(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(t=>r.has(e[t]))}(t,l,s),n=(s=o,o=t=>l[t],(2!==(c=n).length?Mc(bc(s,c,o),([t,e],[n,r])=>ic(e,r)||ic(t,n)):Mc(vc(s,o),([t,e],[n,r])=>c(e,r)||ic(t,n))).map(([t])=>t)),s=(r&&n.reverse(),"number"==typeof i?[0,i]:i),o=i?n.slice(...s):n;return[t,it(e,{scale:{[a]:{domain:o}}})]}LO.props={};const jO=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=rt(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return TO(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=R(i,r);return i=Mc(t,t=>a[t]),n&&i.reverse(),[i,e]}}},NO=(jO.props={},(t={})=>jO(Object.assign(Object.assign({},t),{channel:"x"}))),PO=(NO.props={},(t={})=>jO(Object.assign(Object.assign({},t),{channel:"color"}))),CO=(PO.props={},(t={})=>jO(Object.assign(Object.assign({},t),{channel:"y"})));CO.props={};const RO=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=R(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):R(r,s)[0],r=xc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>Yc(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,it({},e,{scale:{x:{flex:r}}})]}};function BO(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=b0(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}RO.props={};const IO=()=>(t,e)=>[t,it({},e,{modifier:BO,axis:!1})],FO=(IO.props={},"thresholds");function DO(t){var e,[n,r]=dc(t);return Math.min(200,(n=n,r=r,e=fc(t=t),t=hc(t),e&&t?Math.ceil((r-n)*Math.cbrt(e)/(3.49*t)):1))}const zO=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=rt(t,["groupChannels","binChannels"]),u={};return _O(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(FO)))),Object.fromEntries(l.flatMap(e=>{var t=([t])=>+u[e].get(t).split(",")[1];return[[t.from=e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",t]]}))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=R(n,t);return t}),a=at(c,FO),o=t.filter(e=>i.every(t=>Gu(t[e]))),r=[...s.map(t=>{var[t]=R(n,t);return t}).filter(Gu).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||DO(n),e=Pc().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(vc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},WO=(zO.props={},(t={})=>{var e=t["thresholds"];return zO(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function GO(e,n,r,t){var a=e.length;if(a<=t||0===t)return e;var o,s=t=>+n[e[t]],l=t=>+r[e[t]],c=[],u=(a-2)/(t-2);let f=0,h,d;c.push(f);for(let i=0;i<t-2;i++){let t=0,e=0,n=Math.floor((i+1)*u)+1;for(var p=Math.floor((i+2)*u)+1,g=(p=Math.min(p,a))-n;n<p;n++)t+=s(n),e+=l(n);t/=g,e/=g;let r=Math.floor((i+0)*u)+1;var y=Math.floor((i+1)*u)+1,m=[s(f),l(f)];for(h=-1;r<y;r++)(o=.5*Math.abs((m[0]-t)*(s(r)-m[1])-(m[0]-l(r))*(e-m[0])))>h&&(h=o,d=r);c.push(d),f=d}return c.push(a-1),c.map(t=>e[t])}function HO(t){if("function"==typeof t)return t;if("lttb"===t)return GO;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[Ic(t,t=>n[t])]],max:(t,e,n)=>[t[Rc(t,t=>n[t])]],median:(t,e,n)=>{return[t[Wc(t,.5,t=>n[t])]]}};const i=e[t]||e.median;return(t,e,n,r)=>{return function(t,e){var n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}(t,Math.max(1,Math.floor(t.length/r))).flatMap(t=>i(t,e,n))}}WO.props={};const qO=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=HO(e);return(t,e)=>{var n=e["encode"],t=EM(o,t,e);const[r]=R(n,"x"),[i]=R(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},VO=(qO.props={},(s={})=>(t,e)=>{const{encode:i,data:n}=e,r=Object.entries(s).map(([t,e])=>{const[n]=R(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(Gu);if(0===r.length)return[t,e];const a=t.filter(e=>r.every(t=>t(e))),o=a.map((t,e)=>e);t=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:o.map(t=>e.value[a[t]])})]);return[o,it({},e,{encode:Object.fromEntries(t),data:a.map(t=>n[t])})]});function YO(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function $O(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}VO.props={};const UO=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{dw(t);const i=t.getLocalBounds();n.some(t=>{var e=YO(i),t=YO(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]<r[0]&&n[0]>t[0]&&e[1]<r[1]&&n[1]>t[1]})?hw(t):n.push(t)}),t}};function KO(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const XO=t=>{const{maxIterations:M=10,maxError:O=.1,padding:k=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=KO(),[m,v]=KO();var a,o,s,l,[c,t]=KO(),[u,n]=KO();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,f]=f;y(b,g),v(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<M;t++){i.sort((t,e)=>ic(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(h);var d=c(h),p=m(e),d=p-(g+d);d<k&&(d=(k-d)/2,r=Math.max(r,d),v(h,g-d),v(e,p+d))}}if(r<O)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}};function ZO(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function QO(t,e,n){return.2126*ZO(t)+.7152*ZO(e)+.0722*ZO(n)}function JO(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=QO(t,n,r),n=QO(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function t3(e,t){return t[Rc(t,t=>{return JO(e,"object"==typeof(t=t)?t:nt.parseColor(t))})]}const e3=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;JO(t.parsedStyle.fill,e)<n&&t.attr("fill",t3(e,r))}),t)},n3=t=>(t,e)=>(t.forEach(t=>{dw(t);var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!($O(t,e)&&$O(n,e))}(YO(t.getLocalBounds()),e)||hw(t)}),t);var T=1e-6,r3=1e-12,S=Math.PI,i3=S/2,a3=S/4,o3=2*S,s3=180/S,l3=S/180,c3=Math.abs,u3=Math.atan,f3=Math.atan2,A=Math.cos,h3=Math.ceil,d3=Math.exp,p3=Math.log,g3=Math.pow,j=Math.sin,y3=Math.sign||function(t){return 0<t?1:t<0?-1:0},m3=Math.sqrt,v3=Math.tan;function b3(t){return 1<t?0:t<-1?S:Math.acos(t)}function x3(t){return 1<t?i3:t<-1?-i3:Math.asin(t)}function w3(){}function M3(t,e){t&&k3.hasOwnProperty(t.type)&&k3[t.type](t,e)}var O3={Feature:function(t,e){M3(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)M3(n[r].geometry,e)}},k3={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){_3(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)_3(n[r],e,0)},Polygon:function(t,e){E3(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)E3(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)M3(n[r],e)}};function _3(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function E3(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)_3(t[n],e,1);e.polygonEnd()}function S3(t,e){t&&O3.hasOwnProperty(t.type)?O3[t.type](t,e):M3(t,e)}function A3(t){return[f3(t[1],t[0]),x3(t[2])]}function L3(t){var e=t[0],t=t[1],n=A(t);return[n*A(e),n*j(e),j(t)]}function T3(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function j3(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 N3(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function P3(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function C3(t){var e=m3(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function R3(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function B3(t,e){return c3(t)>S&&(t-=Math.round(t/o3)*o3),[t,e]}function I3(t,e,n){return(t%=o3)?e||n?R3(D3(t),z3(e,n)):D3(t):e||n?z3(e,n):B3}function F3(n){return function(t,e){return c3(t+=n)>S&&(t-=Math.round(t/o3)*o3),[t,e]}}function D3(t){var e=F3(t);return e.invert=F3(-t),e}function z3(t,e){var i=A(t),a=j(t),o=A(e),s=j(e);function n(t,e){var n=A(e),r=A(t)*n,t=j(t)*n,n=j(e),e=n*i+r*a;return[f3(t*o-e*s,r*i-n*a),x3(e*o+t*s)]}return n.invert=function(t,e){var n=A(e),r=A(t)*n,t=j(t)*n,n=j(e),e=n*o-t*s;return[f3(t*o+n*s,r*i+e*a),x3(e*i-r*a)]},n}function W3(t,e){(e=L3(e))[0]-=t,C3(e);t=b3(-e[1]);return((-e[2]<0?-t:t)+o3-T)%o3}function G3(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:w3,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function H3(t,e){return c3(t[0]-e[0])<T&&c3(t[1]-e[1])<T}function q3(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 V3(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(H3(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*T}s.push(n=new q3(r,t,null,!0)),l.push(n.o=new q3(r,null,n,!1)),s.push(n=new q3(i,t,null,!1)),l.push(n.o=new q3(i,null,n,!0))}}),s.length){for(l.sort(e),Y3(s),Y3(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function Y3(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function $3(t){return c3(t[0])<=S?t[0]:y3(t[0])*((c3(t[0])+S)%o3-S)}function U3(y,m,v,b){return function(s){var l,c,u,n=m(s),f=G3(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=qc(c);var t=function(t,e){var n=$3(e),r=e[1],e=j(r),i=[j(n),-A(n),0],a=0,o=0,s=new pc;1===e?r=i3+T:-1===e&&(r=-i3-T);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=$3(h),p=h[1]/2+a3,g=j(p),y=A(p),m=0;m<f;++m,d=b,g=w,y=x,h=v){var v=u[m],b=$3(v),x=v[1]/2+a3,w=j(x),x=A(x),M=b-d,O=0<=M?1:-1,k=O*M,_=S<k,E=g*w;s.add(f3(E*O*j(k),y*x+E*A(k))),a+=_?M+O*o3:M,_^n<=d^n<=b&&(C3(E=j3(L3(h),L3(v))),C3(k=j3(i,E)),(O=(_^0<=M?-1:1)*x3(k[2]))<r||r===O&&(E[0]||E[1]))&&(o+=_^0<=M?1:-1)}return(a<-T||a<T&&s<-r3)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),V3(c,X3,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(K3))}return e}}function K3(t){return 1<t.length}function X3(t,e){return((t=t.x)[0]<0?t[1]-i3-T:i3-t[1])-((e=e.x)[0]<0?e[1]-i3-T:i3-e[1])}B3.invert=B3;var Z3=U3(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?S:-S,l=c3(t-f);c3(l-S)<T?(c.point(f,h=0<(h+e)/2?i3:-i3),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&S<=l&&(c3(f-d)<T&&(f-=d*T),c3(t-s)<T&&(t-=s*T),l=h,i=e,o=j((n=f)-(r=t)),h=c3(o)>T?u3((j(l)*(a=A(i))*j(r)-j(i)*(r=A(l))*j(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*i3,r.point(-S,i),r.point(0,i),r.point(S,i),r.point(S,0),r.point(S,-i),r.point(0,-i),r.point(-S,-i),r.point(-S,0),r.point(-S,i)):c3(t[0]-e[0])>T?(t=t[0]<e[0]?S:-S,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-S,-i3]);function Q3(d){var g=A(d),p=6*l3,f=0<g,h=c3(g)>T;function y(t,e){return A(t)*A(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=j3(L3(t),L3(e)),h=T3(f,f),d=f[0],p=h-d*d;return p?(r=j3(u,f),N3(u=P3(u,g*h/p),P3(f,-g*d/p)),(p=(f=T3(u,h=r))*f-(d=T3(h,h))*(T3(u,u)-1))<0?void 0:(N3(p=P3(h,(-f-(r=m3(p)))/d),u),p=A3(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=c3((s=a-i)-S)<T)&&e<o&&(c=o,o=e,e=c),(l||s<T?l?0<o+e^p[1]<(c3(p[0]-i)<T?o:e):o<=p[1]&&p[1]<=e:S<s^(i<=p[0]&&p[0]<=a))?(N3(c=P3(h,(-f+r)/d),u),[p,A3(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:S-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return U3(y,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?S:-S),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!H3(o,n)&&!H3(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&H3(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=A(r),c=j(r),u=o*a;null==n?(n=r+o*o3,s=r-u/2):(n=W3(l,n),s=W3(l,s),(0<o?n<s:s<n)&&(n+=o*o3));for(var f,h=n;0<o?s<h:h<s;h-=u)f=A3([l,-c*A(h),-c*j(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-S,d-S])}var J3=1e9,tk=-J3;function ek(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function M(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return c3(t[0]-m)<T?0<e?0:3:c3(t[0]-b)<T?0<e?2:1:c3(t[1]-v)<T?0<e?1:0:0<e?3:2}function O(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,g=r,t=G3(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=qc(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),M(null,null,1,r),r.lineEnd()),n&&V3(i,O,t,M,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(tk,Math.min(J3,c)),u=Math.max(tk,Math.min(J3,u))],r=[t=Math.max(tk,Math.min(J3,t)),e=Math.max(tk,Math.min(J3,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function nk(t,e,n){var r=Vc(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function rk(t,e,n){var r=Vc(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function ik(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=nk(s,o,90),f=rk(r,n,v),h=nk(c,l,90),d=rk(a,i,v),e):v},e.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return Vc(h3(a/y)*y,i,y).map(h).concat(Vc(h3(c/m)*m,l,m).map(d)).concat(Vc(h3(r/p)*p,n,p).filter(function(t){return c3(t%y)>T}).map(u)).concat(Vc(h3(s/g)*g,o,g).filter(function(t){return c3(t%m)>T}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v}var ak,ok,sk,lk,ck=t=>t,uk=new pc,fk=new pc,hk={point:w3,lineStart:w3,lineEnd:w3,polygonStart:function(){hk.lineStart=dk,hk.lineEnd=yk},polygonEnd:function(){hk.lineStart=hk.lineEnd=hk.point=w3,uk.add(c3(fk)),fk=new pc},result:function(){var t=uk/2;return uk=new pc,t}};function dk(){hk.point=pk}function pk(t,e){hk.point=gk,ak=sk=t,ok=lk=e}function gk(t,e){fk.add(lk*t-sk*e),sk=t,lk=e}function yk(){gk(ak,ok)}var mk=hk,vk=1/0,bk=vk,xk=-vk,wk=xk;var Mk,Ok,kk,_k,Ek={point:function(t,e){t<vk&&(vk=t);xk<t&&(xk=t);e<bk&&(bk=e);wk<e&&(wk=e)},lineStart:w3,lineEnd:w3,polygonStart:w3,polygonEnd:w3,result:function(){var t=[[vk,bk],[xk,wk]];return xk=wk=-(bk=vk=1/0),t}},Sk=0,Ak=0,Lk=0,Tk=0,jk=0,Nk=0,Pk=0,Ck=0,Rk=0,Bk={point:Ik,lineStart:Fk,lineEnd:Wk,polygonStart:function(){Bk.lineStart=Gk,Bk.lineEnd=Hk},polygonEnd:function(){Bk.point=Ik,Bk.lineStart=Fk,Bk.lineEnd=Wk},result:function(){var t=Rk?[Pk/Rk,Ck/Rk]:Nk?[Tk/Nk,jk/Nk]:Lk?[Sk/Lk,Ak/Lk]:[NaN,NaN];return Sk=Ak=Lk=Tk=jk=Nk=Pk=Ck=Rk=0,t}};function Ik(t,e){Sk+=t,Ak+=e,++Lk}function Fk(){Bk.point=Dk}function Dk(t,e){Bk.point=zk,Ik(kk=t,_k=e)}function zk(t,e){var n=t-kk,r=e-_k,n=m3(n*n+r*r);Tk+=n*(kk+t)/2,jk+=n*(_k+e)/2,Nk+=n,Ik(kk=t,_k=e)}function Wk(){Bk.point=Ik}function Gk(){Bk.point=qk}function Hk(){Vk(Mk,Ok)}function qk(t,e){Bk.point=Vk,Ik(Mk=kk=t,Ok=_k=e)}function Vk(t,e){var n=t-kk,r=e-_k,n=m3(n*n+r*r);Tk+=n*(kk+t)/2,jk+=n*(_k+e)/2,Nk+=n,Pk+=(n=_k*t-kk*e)*(kk+t),Ck+=n*(_k+e),Rk+=3*n,Ik(kk=t,_k=e)}var Yk=Bk;function $k(t){this._context=t}$k.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(){0===this._line&&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,o3)}},result:w3};var Uk,Kk,Xk,Zk,Qk,Jk=new pc,t4={point:w3,lineStart:function(){t4.point=e4},lineEnd:function(){Uk&&n4(Kk,Xk),t4.point=w3},polygonStart:function(){Uk=!0},polygonEnd:function(){Uk=null},result:function(){var t=+Jk;return Jk=new pc,t}};function e4(t,e){t4.point=n4,Kk=Zk=t,Xk=Qk=e}function n4(t,e){Zk-=t,Qk-=e,Jk.add(m3(Zk*Zk+Qk*Qk)),Zk=t,Qk=e}var r4=t4;let i4,a4,o4,s4;class l4{constructor(t){this._append=null==t?c4:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return c4;if(e!==i4){const r=10**e;i4=e,a4=function(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}return a4}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:var n,r;this._append`M${t},${e}`,this._radius===o4&&this._append===a4||(n=this._radius,r=this._,this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,o4=n,a4=this._append,s4=this._,this._=r),this._+=s4}}result(){var t=this._;return this._="",t.length?t:null}}function c4(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function u4(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),S3(t,a(o))),o.result()}return s.area=function(t){return S3(t,a(mk)),mk.result()},s.measure=function(t){return S3(t,a(r4)),r4.result()},s.bounds=function(t){return S3(t,a(Ek)),Ek.result()},s.centroid=function(t){return S3(t,a(Yk)),Yk.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,ck):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new l4(r)):new $k(n=t),"function"!=typeof i&&o.pointRadius(i),s):n},s.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(o.pointRadius(+t),+t),s):i},s.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return null===n&&(o=new l4(r)),s},s.projection(e).digits(r).context(n)}function f4(r){return function(t){var e,n=new h4;for(e in r)n[e]=r[e];return n.stream=t,n}}function h4(){}function d4(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),S3(n,t.stream(Ek)),e(Ek.result()),null!=r&&t.clipExtent(r),t}function p4(i,a,t){return d4(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function g4(t,e,n){return p4(t,[[0,0],e],n)}function y4(r,i,t){return d4(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function m4(i,a,t){return d4(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}h4.prototype={constructor:h4,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()}};var v4=16,b4=A(30*l3);function x4(t,e){return+e?(S=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=S(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=L3([t,e]),e=S(t,e);L(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],v4,r),r.point(u,f)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){L(u,f,c,h,d,p,i,a,n,o,s,l,v4,r),g.lineEnd=m,m()}return g}):(n=t,f4({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,S,A;function L(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,m,v,b,x,w,M,O,k=o-t,_=s-e,E=k*k+_*_;4*A<E&&h--&&(y=a+f,x=x3(y/=m=m3((p=r+c)*p+(g=i+u)*g+y*y)),v=c3(c3(y)-1)<T||c3(n-l)<T?(n+l)/2:f3(g,p),b=(x=S(v,x))[0],x=x[1],A<(O=_*(w=b-t)-k*(M=x-e))*O/E||.3<c3((k*w+_*M)/E-.5)||r*c+i*u+a*f<b4)&&(L(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,h,d),d.point(b,x),L(b,x,v,p,g,y,o,s,l,c,u,f,h,d))}}var w4=f4({point:function(t,e){this.stream.point(t*l3,e*l3)}});function M4(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,m;return e?(f=A(e),e=j(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function O4(t){return k4(function(){return t})()}function k4(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,M=null,O=Z3,k=null,_=ck,E=.5;function S(t){return l(t[0]*l3,t[1]*l3)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*s3,t[1]*s3]}function L(){var t=M4(f,0,0,x,w,b).apply(null,e(p,g)),t=M4(f,h-t[0],d-t[1],x,w,b);return r=I3(y,m,v),s=R3(e,t),l=R3(r,s),o=x4(s,E),T()}function T(){return c=u=null,S}return S.stream=function(t){return c&&u===t?c:c=w4((n=r,f4({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(O(o(_(u=t))))));var n},S.preclip=function(t){return arguments.length?(O=t,M=void 0,T()):O},S.postclip=function(t){return arguments.length?(_=t,k=n=i=a=null,T()):_},S.clipAngle=function(t){return arguments.length?(O=+t?Q3(M=t*l3):(M=null,Z3),T()):M*s3},S.clipExtent=function(t){return arguments.length?(_=null==t?(k=n=i=a=null,ck):ek(k=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),T()):null==k?null:[[k,n],[i,a]]},S.scale=function(t){return arguments.length?(f=+t,L()):f},S.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],L()):[h,d]},S.center=function(t){return arguments.length?(p=t[0]%360*l3,g=t[1]%360*l3,L()):[p*s3,g*s3]},S.rotate=function(t){return arguments.length?(y=t[0]%360*l3,m=t[1]%360*l3,v=2<t.length?t[2]%360*l3:0,L()):[y*s3,m*s3,v*s3]},S.angle=function(t){return arguments.length?(b=t%360*l3,L()):b*s3},S.reflectX=function(t){return arguments.length?(x=t?-1:1,L()):x<0},S.reflectY=function(t){return arguments.length?(w=t?-1:1,L()):w<0},S.precision=function(t){return arguments.length?(o=x4(s,E=t*t),T()):m3(E)},S.fitExtent=function(t,e){return p4(S,t,e)},S.fitSize=function(t,e){return g4(S,t,e)},S.fitWidth=function(t,e){return y4(S,t,e)},S.fitHeight=function(t,e){return m4(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,L()}}function _4(t){var e=0,n=S/3,r=k4(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*l3,n=t[1]*l3):[e*s3,n*s3]},t}function E4(t,e){var n,r,i,a=j(t),o=(a+j(e))/2;return c3(o)<T?(n=A(t),s.invert=function(t,e){return[t/n,x3(e*n)]},s):(i=m3(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=f3(t,c3(e))*y3(e);return e*o<0&&(n-=S*y3(t)*y3(e)),[n/o,x3((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,j(e)/n]}function l(t,e){e=m3(r-2*o*j(e))/o;return[e*j(t*=o),i-e*A(t)]}}function S4(){return _4(E4).scale(155.424).center([0,33.6442])}function A4(){return S4().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function L4(i){return function(t,e){var n=A(t),r=A(e),n=i(n*r);return n===1/0?[2,0]:[n*r*j(t),n*j(e)]}}function T4(a){return function(t,e){var n=m3(t*t+e*e),r=a(n),i=j(r),r=A(r);return[f3(t*i,n*r),x3(n&&e*i/n)]}}var j4=L4(function(t){return m3(2/(1+t))});j4.invert=T4(function(t){return 2*x3(t/2)});var N4=L4(function(t){return(t=b3(t))&&t/j(t)});function P4(t,e){return[t,p3(v3((i3+e)/2))]}function C4(r){var i,a,o,s=O4(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=S*l(),n=s((e=I3((e=s.rotate())[0]*l3,e[1]*l3,2<e.length?e[2]*l3:0),function(t){return(t=e.invert(t[0]*l3,t[1]*l3))[0]*=s3,t[1]*=s3,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===P4?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function R4(t){return v3((i3+t)/2)}function B4(t,e){var n=A(t),i=t===e?j(t):p3(n/A(e))/p3(R4(e)/R4(t)),a=n*g3(R4(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=y3(i)*m3(t*t+e*e),r=f3(t,c3(e))*y3(e);return e*i<0&&(r-=S*y3(t)*y3(e)),[r/i,2*u3(g3(a/n,1/i))-i3]},r):P4;function r(t,e){0<a?e<-i3+T&&(e=-i3+T):i3-T<e&&(e=i3-T);e=a/g3(R4(e),i);return[e*j(i*t),a-e*A(i*t)]}}function I4(t,e){return[t,e]}function F4(t,e){var n=A(t),r=t===e?j(t):(n-A(e))/(e-t),i=n/r+t;return c3(r)<T?I4:(a.invert=function(t,e){var e=i-e,n=f3(t,c3(e))*y3(e);return e*r<0&&(n-=S*y3(t)*y3(e)),[n/r,i-y3(r)*m3(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*j(t),i-e*A(t)]}}N4.invert=T4(function(t){return t}),P4.invert=function(t,e){return[t,2*u3(d3(e))-i3]},I4.invert=I4;var D4=1.340264,z4=-.081106,W4=893e-6,G4=.003796,H4=m3(3)/2;function q4(t,e){var e=x3(H4*j(e)),n=e*e,r=n*n*n;return[t*A(e)/(H4*(D4+3*z4*n+r*(7*W4+9*G4*n))),e*(D4+z4*n+r*(W4+G4*n))]}function V4(t,e){var n=A(e),r=A(t)*n;return[n*j(t)/r,j(e)/r]}function Y4(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function $4(t,e){return[A(e)*j(t),j(e)]}function U4(t,e){var n=A(e),r=1+A(t)*n;return[n*j(t)/r,j(e)/r]}function K4(t,e){return[p3(v3((i3+e)/2)),-t]}q4.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(D4+z4*i+a*(W4+G4*i))-e)/(D4+3*z4*i+a*(7*W4+9*G4*i)))*r)*i*i,!(c3(n)<r3));++o);return[H4*t*(D4+3*z4*i+a*(7*W4+9*G4*i))/A(r),x3(j(r)/H4)]},V4.invert=T4(u3),Y4.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),c3(a)>T&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},$4.invert=T4(x3),U4.invert=T4(function(t){return 2*u3(t)}),K4.invert=function(t,e){return[-e,2*u3(d3(t))-i3]};var X4=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=A4(),l=S4().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=S4().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+T,r+.12*e+T],[n-.214*e-T,r+.234*e-T]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+T,r+.166*e+T],[n-.115*e-T,r+.234*e-T]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return p4(f,t,e)},f.fitSize=function(t,e){return g4(f,t,e)},f.fitWidth=function(t,e){return y4(f,t,e)},f.fitHeight=function(t,e){return m4(f,t,e)},f.scale(1070)},geoAlbers:A4,geoAzimuthalEqualArea:function(){return O4(j4).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:j4,geoAzimuthalEquidistant:function(){return O4(N4).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:N4,geoConicConformal:function(){return _4(B4).scale(109.5).parallels([30,30])},geoConicConformalRaw:B4,geoConicEqualArea:S4,geoConicEqualAreaRaw:E4,geoConicEquidistant:function(){return _4(F4).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:F4,geoEqualEarth:function(){return O4(q4).scale(177.158)},geoEqualEarthRaw:q4,geoEquirectangular:function(){return O4(I4).scale(152.63)},geoEquirectangularRaw:I4,geoGnomonic:function(){return O4(V4).scale(144.049).clipAngle(60)},geoGnomonicRaw:V4,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,m=f4({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=ck;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,ck):ek(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=j(d=t%360*l3),r=A(d),b()):d*s3},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return p4(x,t,e)},x.fitSize=function(t,e){return g4(x,t,e)},x.fitWidth=function(t,e){return y4(x,t,e)},x.fitHeight=function(t,e){return m4(x,t,e)},x},geoProjection:O4,geoProjectionMutator:k4,geoMercator:function(){return C4(P4).scale(961/o3)},geoMercatorRaw:P4,geoNaturalEarth1:function(){return O4(Y4).scale(175.295)},geoNaturalEarth1Raw:Y4,geoOrthographic:function(){return O4($4).scale(249.5).clipAngle(90+T)},geoOrthographicRaw:$4,geoStereographic:function(){return O4(U4).scale(250).clipAngle(142)},geoStereographicRaw:U4,geoTransverseMercator:function(){var t=C4(K4),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:K4});function Z4(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function Q4(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(t6),e.find(t=>t.sphere)?{type:"Sphere"}:Z4(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=u4(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function J4(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[ik()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function t6(t){return"geoPath"===t.type}Do=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=rt(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Qe(t);if(e=X4[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(J4);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(Q4(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=u4(i);const u=new Ip({domain:[t,t+n]}),f=new Ip({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{var e,n,r;return t6(t)?({style:n,tooltip:r={}}=e=t,Object.assign(Object.assign({},e),{type:"path",tooltip:Ku(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>g(t)||[]})})):t})})]},Do.props={},r=()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=rt(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]};r.props={};const e6={"composition.geoView":Do,"composition.geoPath":r};function n6(){return Object.assign({"data.fetch":xh,"data.inline":Sh,"data.sortBy":Eh,"data.sort":Oh,"data.filter":Mh,"data.pick":kh,"data.rename":_h,"data.fold":wh,"data.slice":nd,"data.custom":Ah,"data.map":Lh,"data.cluster":ah,"data.tree":oh,"data.sankey":Iu,"data.arc":Ph,"data.wordCloud":Jh,"data.join":ed,"data.kde":cd,"transform.maybeZeroY1":_M,"transform.maybeZeroX":DM,"transform.maybeStackY":IM,"transform.maybeTitle":FM,"transform.maybeSeries":HM,"transform.maybeZeroPadding":KM,"transform.stackY":RM,"transform.binX":WO,"transform.bin":zO,"transform.dodgeX":tO,"transform.jitter":aO,"transform.jitterX":oO,"transform.symmetryY":sO,"transform.diffY":lO,"transform.stackEnter":eO,"transform.normalizeY":nO,"transform.select":dO,"transform.selectX":pO,"transform.selectY":gO,"transform.groupX":SO,"transform.groupY":AO,"transform.groupColor":LO,"transform.group":EO,"transform.maybeSize":WM,"transform.maybeZeroY":zM,"transform.maybeKey":GM,"transform.sortX":NO,"transform.sortY":CO,"transform.sortColor":PO,"transform.flexX":RO,"transform.maybeTupleY":qM,"transform.maybeTupleX":VM,"transform.maybeIdentityY":YM,"transform.maybeIdentityX":$M,"transform.maybeTuple":QM,"transform.maybeVisualPosition":XM,"transform.maybeFunctionAttribute":ZM,"transform.maybeGradient":JM,"transform.maybeTooltip":UM,"transform.pack":IO,"transform.sample":qO,"transform.filter":VO,"coordinate.cartesian":Ss,"coordinate.polar":Ls,"coordinate.helix":Ts,"coordinate.transpose":js,"coordinate.theta":Ns,"coordinate.parallel":Rs,"coordinate.fisheye":Bs,"coordinate.radial":Cs,"coordinate.radar":Is,"encode.constant":Fs,"encode.field":zs,"encode.transform":Ds,"encode.column":Ws,"mark.interval":nc,"mark.rect":rc,"mark.line":iu,"mark.point":au,"mark.text":ou,"mark.cell":su,"mark.area":lu,"mark.link":cu,"mark.image":uu,"mark.polygon":fu,"mark.box":hu,"mark.vector":du,"mark.lineX":gu,"mark.lineY":pu,"mark.connector":yu,"mark.range":bu,"mark.rangeX":xu,"mark.rangeY":wu,"mark.sankey":Qu,"mark.path":Ju,"mark.treemap":rf,"mark.pack":af,"mark.boxplot":pf,"mark.shape":gf,"mark.forceGraph":rh,"mark.gauge":j0,"mark.tree":sh,"mark.wordCloud":ud,"mark.density":N0,"palette.category10":P0,"palette.category20":C0,"scale.linear":B0,"scale.ordinal":I0,"scale.band":R0,"scale.identity":F0,"scale.point":D0,"scale.time":z0,"scale.log":W0,"scale.pow":G0,"scale.sqrt":Y0,"scale.threshold":H0,"scale.quantile":q0,"scale.quantize":V0,"scale.sequential":$0,"scale.constant":U0,"shape.interval.rect":Z1,"shape.interval.hollow":Q1,"shape.interval.funnel":J1,"shape.interval.pyramid":eg,"shape.rect.rect":Z1,"shape.rect.hollow":Q1,"shape.cell.cell":Z1,"shape.cell.hollow":Q1,"shape.line.line":ag,"shape.line.hv":sg,"shape.line.vh":lg,"shape.line.hvh":cg,"shape.line.smooth":og,"shape.point.bowtie":hg,"shape.point.cross":dg,"shape.point.diamond":pg,"shape.point.hexagon":gg,"shape.point.hollowBowtie":yg,"shape.point.hollowDiamond":mg,"shape.point.hollowHexagon":vg,"shape.point.hollow":bg,"shape.point.hollowSquare":xg,"shape.point.hollowTriangle":wg,"shape.point.hollowTriangleDown":Mg,"shape.point.hyphen":Og,"shape.point.line":kg,"shape.point.plus":_g,"shape.point.point":Eg,"shape.point.square":Sg,"shape.point.tick":Ag,"shape.point.triangle":Lg,"shape.point.triangleDown":Tg,"shape.text.text":Vb,"shape.area.area":Xb,"shape.area.smooth":Zb,"shape.area.hvh":Qb,"shape.area.vh":Jb,"shape.area.hv":t2,"shape.link.smooth":n2,"shape.link.vhv":r2,"shape.link.arc":i2,"shape.link.link":e2,"shape.image.image":a2,"shape.polygon.polygon":o2,"shape.polygon.ribbon":s2,"shape.box.box":l2,"shape.box.violin":c2,"shape.vector.vector":jg,"shape.label.label":S2,"shape.text.badge":$b,"shape.lineX.line":u2,"shape.lineY.line":u2,"shape.shape.shape":N2,"shape.connector.connector":d2,"shape.range.range":Z1,"shape.rangeX.range":Z1,"shape.rangeY.range":Z1,"shape.path.path":L2,"shape.path.hollow":T2,"shape.density.density":j2,"theme.classic":P2,"theme.classicDark":C2,"theme.academy":B2,"component.axisX":fx,"component.axisY":hx,"component.axisRadar":dx,"component.axisLinear":cx,"component.axisArc":ux,"component.legendCategory":mx,"component.legendContinuous":Ox,"component.legendContinuousBlock":kx,"component.legendContinuousBlockSize":Ex,"component.legendContinuousSize":_x,"component.title":Lx,"component.sliderX":Rx,"component.sliderY":Bx,"component.scrollbarX":Fx,"component.scrollbarY":Dx,"animation.scaleInX":Vx,"animation.scaleOutX":Yx,"animation.scaleInY":$x,"animation.scaleOutY":Ux,"animation.waveIn":iw,"animation.fadeIn":Kx,"animation.fadeOut":Xx,"animation.zoomIn":aw,"animation.zoomOut":ow,"animation.pathIn":sw,"animation.morphing":rw,"animation.growInX":lw,"animation.growInY":cw,"interaction.elementHighlight":jw,"interaction.elementHighlightByX":Nw,"interaction.elementHighlightByColor":Pw,"interaction.elementSelect":Rw,"interaction.elementSelectByX":Bw,"interaction.elementSelectByColor":Iw,"interaction.fisheye":Dw,"interaction.chartIndex":Fw,"interaction.tooltip":i5,"interaction.legendFilter":g5,"interaction.legendHighlight":y5,"interaction.brushHighlight":M5,"interaction.brushXHighlight":k5,"interaction.brushYHighlight":E5,"interaction.brushAxisHighlight":R5,"interaction.brushFilter":I5,"interaction.brushXFilter":F5,"interaction.brushYFilter":D5,"interaction.sliderFilter":W5,"interaction.poptip":q5,"interaction.event":Gw,"composition.spaceLayer":U5,"composition.spaceFlex":K5,"composition.mark":Z5,"composition.view":X5,"composition.facetRect":sM,"composition.repeatMatrix":fM,"composition.facetCircle":mM,"composition.timingKeyframe":vM,"labelTransform.overlapHide":UO,"labelTransform.overlapDodgeY":XO,"labelTransform.overflowHide":n3,"labelTransform.contrastReverse":e3},e6)}const r6=[["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"]]]]];function i6(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function a6(t,e,n,r,i){var a=t[0],t=t[1],o=Q();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function o6(t,e,n,r,i){var a=new Ip({range:[e,e+r]}),o=new Ip({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function s6(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function l6(t,e,n,r,i){return t[0]}function c6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Ip({range:[s,t]}),c=new Ip({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=i6(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function u6(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function f6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return m6.apply(void 0,v6([[-1,-1]],e,!1))}function h6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return m6.apply(void 0,v6([[-1,1]],e,!1))}function d6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return m6.apply(void 0,v6([[1,-1]],e,!1))}function p6(t,e,n,r,i){var a,t=t[0],o=Q();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function g6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Ip({range:[s,s+.99*l]}),f=new Ip({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=i6(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function y6(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Ip({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Fp({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var m6=function(t,e,n,r,i){var a=t[0],t=t[1],o=Q();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},v6=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function b6(t){return 1/Math.tan(t)}function x6(t,e,n,r,i){var a=b6(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function w6(t,e,n,r,i){var a=b6(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function M6(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function O6(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function k6(t,e,n){return n?new Ip({range:[0,1],domain:[0,e]}).map(t):t}function _6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=k6(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[M6(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[O6(e,s,o,0,1),t]}}}function E6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=k6(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],M6(t[1],s,o,0,1)]},untransform:function(t){return[t[0],O6(t[1],s,o,0,1)]}}}function S6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=k6(a,r,t=void 0!==t&&t),u=k6(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[M6(e,c,s,0,1),M6(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[O6(e,c,s,0,1),O6(t,u,l,0,1)]}}}function A6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Ip({range:[0,r]}),u=new Ip({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=M6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=O6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var L6=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},T6=(j6.prototype.update=function(t){this.options=zd({},this.options,t),this.recoordinate()},j6.prototype.clone=function(){return new j6(this.options)},j6.prototype.getOptions=function(){return this.options},j6.prototype.clear=function(){this.update({transformations:[]})},j6.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},j6.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},j6.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:L6(L6([],n,!0),[L6([],t,!0)],!1)}),this},j6.prototype.map=function(t){return this.output(t)},j6.prototype.invert=function(t){return this.input(t)},j6.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},j6.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?L6([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(L6([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Wd,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):Wd}.apply(void 0,a)},j6.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=Q();return e&&t.reverse(),t.forEach(function(t){return J(p,p,t)}),e&&(e=t=p,(d=new Z(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},j6);function j6(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:o6,translate:a6,custom:s6,matrix:l6,polar:c6,transpose:u6,scale:m6,"shear.x":x6,"shear.y":w6,reflect:f6,"reflect.x":h6,"reflect.y":d6,rotate:p6,helix:g6,parallel:y6,fisheye:S6,"fisheye.x":_6,"fisheye.y":E6,"fisheye.circular":A6},this.update(t)}function N6(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||zu("Unknown Component: "+t)};return[t=>{var e=t["type"],t=rt(t,["type"]);return r(e)(Object.assign({},t))},r]}function P6(t,e){var{coordinate:n={}}=t,t=rt(t,["coordinate"]),{type:r,transform:i=[]}=n,n=rt(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=N6("coordinate",e),{transform:e=!1}=e(r).props||{};if(e)throw new Error(`Unknown coordinate: ${r}.`);return Object.assign(Object.assign({},t),{coordinates:[Object.assign({type:r},n),...i]})}function C6(t,e){return t.filter(t=>t.type===e)}function R6(t){return 0<C6(t,"polar").length}function B6(t){return C6(t,"transpose").length%2==1}function I6(t){return 0<C6(t,"theta").length}function F6(t){return 0<C6(t,"radial").length}function h(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}i=h("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),go=h("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),jo=h("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),fo=h("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),co=h("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),es=h("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),rs=h("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),n=h("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),hs=h("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),os=h("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function D6(t,e,n){(t.prototype=e.prototype=n).constructor=t}function z6(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function W6(){}var G6=1/.7,is="\\s*([+-]?\\d+)\\s*",e="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",H6=/^#([0-9a-f]{3,8})$/,q6=new RegExp(`^rgb\\(${is},${is},${is}\\)$`),V6=new RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),Y6=new RegExp(`^rgba\\(${is},${is},${is},${e}\\)$`),$6=new RegExp(`^rgba\\(${Mo},${Mo},${Mo},${e}\\)$`),U6=new RegExp(`^hsl\\(${e},${Mo},${Mo}\\)$`),K6=new RegExp(`^hsla\\(${e},${Mo},${Mo},${e}\\)$`),X6={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};function Z6(){return this.rgb().formatHex()}function Q6(){return this.rgb().formatRgb()}function J6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=H6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?t_(e):3===n?new i_(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?e_(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?e_(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=q6.exec(t))?new i_(e[1],e[2],e[3],1):(e=V6.exec(t))?new i_(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Y6.exec(t))?e_(e[1],e[2],e[3],e[4]):(e=$6.exec(t))?e_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=U6.exec(t))?u_(e[1],e[2]/100,e[3]/100,1):(e=K6.exec(t))?u_(e[1],e[2]/100,e[3]/100,e[4]):X6.hasOwnProperty(t)?t_(X6[t]):"transparent"===t?new i_(NaN,NaN,NaN,0):null}function t_(t){return new i_(t>>16&255,t>>8&255,255&t,1)}function e_(t,e,n,r){return new i_(t=r<=0?e=n=NaN:t,e,n,r)}function n_(t){return(t=t instanceof W6?t:J6(t))?new i_((t=t.rgb()).r,t.g,t.b,t.opacity):new i_}function r_(t,e,n,r){return 1===arguments.length?n_(t):new i_(t,e,n,null==r?1:r)}function i_(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function a_(){return"#"+c_(this.r)+c_(this.g)+c_(this.b)}function o_(){var t=s_(this.opacity);return(1===t?"rgb(":"rgba(")+l_(this.r)+`, ${l_(this.g)}, `+l_(this.b)+(1===t?")":`, ${t})`)}function s_(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function l_(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function c_(t){return((t=l_(t))<16?"0":"")+t.toString(16)}function u_(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new h_(t,e,n,r)}function f_(t){var e,n,r,i,a,o,s,l;return t instanceof h_?new h_(t.h,t.s,t.l,t.opacity):(t=t instanceof W6?t:J6(t))?t instanceof h_?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new h_(o,s,l,t.opacity)):new h_}function h_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function d_(t){return(t=(t||0)%360)<0?t+360:t}function p_(t){return Math.max(0,Math.min(1,t||0))}function g_(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}D6(W6,J6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Z6,formatHex:Z6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return f_(this).formatHsl()},formatRgb:Q6,toString:Q6}),D6(i_,r_,z6(W6,{brighter(t){return t=null==t?G6:Math.pow(G6,t),new i_(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new i_(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new i_(l_(this.r),l_(this.g),l_(this.b),s_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:a_,formatHex:a_,formatHex8:function(){return"#"+c_(this.r)+c_(this.g)+c_(this.b)+c_(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:o_,toString:o_})),D6(h_,function(t,e,n,r){return 1===arguments.length?f_(t):new h_(t,e,n,null==r?1:r)},z6(W6,{brighter(t){return t=null==t?G6:Math.pow(G6,t),new h_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new h_(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new i_(g_(240<=t?t-240:120+t,n,e),g_(t,n,e),g_(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new h_(d_(this.h),p_(this.s),p_(this.l),s_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=s_(this.opacity);return(1===t?"hsl(":"hsla(")+d_(this.h)+`, ${100*p_(this.s)}%, ${100*p_(this.l)}%`+(1===t?")":`, ${t})`)}}));const y_=Math.PI/180,m_=180/Math.PI;var v_=1.78277,b_=-.29227,x_=-.90649,w_=1.97294,M_=w_*x_,O_=w_*v_,k_=v_*b_- -.14861*x_;function __(t,e,n,r){return 1===arguments.length?(i=t)instanceof E_?new E_(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof i_?i:n_(i)).r/255,o=i.g/255,l=i.b/255,l=(w_*(o-(a=(k_*l+M_*a-O_*o)/(k_+M_-O_)))-b_*(o=l-a))/x_,new E_((l=(s=Math.sqrt(l*l+o*o)/(w_*a*(1-a)))?Math.atan2(l,o)*m_-120:NaN)<0?l+360:l,s,a,i.opacity)):new E_(t,e,n,null==r?1:r);var i,a,o,s,l}function E_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}D6(E_,__,z6(W6,{brighter(t){return t=null==t?G6:Math.pow(G6,t),new E_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new E_(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*y_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new i_(255*(e+n*(-.14861*r+v_*t)),255*(e+n*(b_*r+x_*t)),255*(e+w_*r*n),this.opacity)}}));var S_=t=>()=>t;function A_(e,n){return function(t){return e+t*n}}function L_(a){return 1==(a=+a)?T_:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):S_(isNaN(t)?e:t);var n,r,i}}function T_(t,e){var n=e-t;return n?A_(t,n):S_(isNaN(t)?e:t)}!function t(e){var o=L_(e);function n(e,t){var n=o((e=r_(e)).r,(t=r_(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=T_(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);j_=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var j_,N_=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=r_(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=j_(r),i=j_(i),a=j_(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function P_(s){return function t(o){function e(e,t){var n=s((e=__(e)).h,(t=__(t)).h),r=T_(e.s,t.s),i=T_(e.l,t.l),a=T_(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}P_(function(t,e){var n=e-t;return n?A_(t,180<n||n<-180?n-360*Math.round(n/360):n):S_(isNaN(t)?e:t)});var ko=P_(T_),a=t=>N_(t[t.length-1]),po=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h),uo=a(po),cs=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h),Po=a(cs),yo=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h),ms=a(yo),as=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h),Bl=a(as),ug=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h),Oo=a(ug),_o=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h),So=a(_o),Ao=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h),ho=a(Ao),Eo=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h),ns=a(Eo),o=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h),ss=a(o),Do=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h),r=a(Do),is=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h),Mo=a(is),e=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h),C_=a(e),R_=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h),B_=a(R_),I_=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h),F_=a(I_),D_=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h),z_=a(D_),W_=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h),G_=a(W_),H_=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h),q_=a(H_),V_=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h),Y_=a(V_),$_=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h),U_=a($_),K_=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h),X_=a(K_),Z_=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h),Q_=a(Z_),J_=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h),tE=a(J_),eE=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h),nE=a(eE),rE=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h),iE=a(rE),aE=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h),oE=a(aE),sE=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h),lE=a(sE),cE=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h),a=a(cE);var uE=ko(__(300,.5,0),__(-240,.5,1)),fE=ko(__(-100,.75,.35),__(80,1.5,.8)),ko=ko(__(260,.75,.35),__(80,1.5,.8)),hE=__();var dE=r_(),pE=Math.PI/3,gE=2*Math.PI/3;function yE(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var mE=yE(h("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),vE=yE(h("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),bE=yE(h("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xE=yE(h("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),wE=Object.freeze({__proto__:null,schemeCategory10:i,schemeAccent:go,schemeDark2:jo,schemePaired:fo,schemePastel1:co,schemePastel2:es,schemeSet1:rs,schemeSet2:n,schemeSet3:hs,schemeTableau10:os,interpolateBrBG:uo,schemeBrBG:po,interpolatePRGn:Po,schemePRGn:cs,interpolatePiYG:ms,schemePiYG:yo,interpolatePuOr:Bl,schemePuOr:as,interpolateRdBu:Oo,schemeRdBu:ug,interpolateRdGy:So,schemeRdGy:_o,interpolateRdYlBu:ho,schemeRdYlBu:Ao,interpolateRdYlGn:ns,schemeRdYlGn:Eo,interpolateSpectral:ss,schemeSpectral:o,interpolateBuGn:r,schemeBuGn:Do,interpolateBuPu:Mo,schemeBuPu:is,interpolateGnBu:C_,schemeGnBu:e,interpolateOrRd:B_,schemeOrRd:R_,interpolatePuBuGn:F_,schemePuBuGn:I_,interpolatePuBu:z_,schemePuBu:D_,interpolatePuRd:G_,schemePuRd:W_,interpolateRdPu:q_,schemeRdPu:H_,interpolateYlGnBu:Y_,schemeYlGnBu:V_,interpolateYlGn:U_,schemeYlGn:$_,interpolateYlOrBr:X_,schemeYlOrBr:K_,interpolateYlOrRd:Q_,schemeYlOrRd:Z_,interpolateBlues:tE,schemeBlues:J_,interpolateGreens:nE,schemeGreens:eE,interpolateGreys:iE,schemeGreys:rE,interpolatePurples:oE,schemePurples:aE,interpolateReds:lE,schemeReds:sE,interpolateOranges:a,schemeOranges:cE,interpolateCividis:function(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-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:uE,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return hE.h=360*t-100,hE.s=1.5-1.5*e,hE.l=.8-.9*e,hE+""},interpolateWarm:fE,interpolateCool:ko,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,dE.r=255*(e=Math.sin(t))*e,dE.g=255*(e=Math.sin(t+pE))*e,dE.b=255*(e=Math.sin(t+gE))*e,dE+""},interpolateTurbo:function(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-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:mE,interpolateMagma:vE,interpolateInferno:bE,interpolatePlasma:xE});function ME(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return PE(t,Yu)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?AE(t):void 0===r?jE(e)?AE(t):NE(e)?"time":LE(t,i):jE([r])?AE(t):NE(e)?"time":LE(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)Gu(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[null!=a?a:o,null!=i?i:s];case"band":case"ordinal":case"point":return TE(e);case"quantile":return function(t){return TE(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)Gu(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[null!=a?a:o,null!=i?i:s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=dp,nice:n=!1,tickCount:r=5}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:I6(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Qe(e),i=wE["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":var u=SE(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],f0(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return SE(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function OE(t,e){var[e]=N6("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[Fu,Fu];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(n);return n(e(t))}function kE(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(_E)?dc(e):t.every(EE)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function _E(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function EE(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function SE(t,e,n,r,i){var[i]=N6("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=Qe(t),i=wE["scheme"+e],a=wE["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function AE(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function LE(t,e){return"color"!==t||e?"linear":"sequential"}function TE(t){return Array.from(new Set(t.flat()))}function jE(t){return PE(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function NE(t){return PE(t,t=>t instanceof Date)}function PE(t,e){for(const n of t)if(n.some(e))return!0;return!1}const CE={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},RE={threshold:"threshold",quantize:"quantize",quantile:"quantile"},BE={ordinal:"ordinal",band:"band",point:"point"},IE={constant:"constant"};function FE(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=N6("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=N6("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?B6(i)?t+"Y":t+"X":"y"===e?B6(i)?t+"X":t+"Y":null;if(r&&e)return i=o(e)["props"],{defaultPosition:t,defaultSize:i,defaultOrder:a}=i,Object.assign(Object.assign({position:t,size:i,order:a,type:e},r),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{var{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);const y=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,y.push(Object.assign({type:"title",position:n,orientation:e,order:t,size:a},"string"==typeof i?{title:i}:i))),function(t,e){t=t.filter(t=>{return!!((t=t)&&t.type&&("function"==typeof t.type||({type:t,domain:n,range:r,interpolator:e}=t,n=n&&0<n.length,r=r&&0<r.length,["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(t)&&n&&r)||["sequential"].includes(t)&&n&&(r||e)||["constant","identity"].includes(t)&&r));var e,n,r});return[...function(t){const e=t.filter(t=>"string"!=typeof t.type||["shape","size","color","opacity"].includes(t.name)).filter(t=>!("constant"===t.type&&"size"===t.name)),n=e.filter(t=>!t.field),r=e.filter(t=>!!t.field),i=new Map(Array.from(vc(r,t=>t.field)).map(([t,e])=>[t,[...e,...n.filter(t=>"constant"===t.type)]]).concat([[void 0,n]]).filter(([,t])=>t.some(t=>"constant"!==t.type)));if(0===i.size)return[];t=Array.from(i).map(([,t])=>{var e,n,r=function(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...d0(e,t));return n}(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>{return[t.name,"string"!=typeof(t=(t=t).type)?null:t in CE?"continuous":t in BE?"discrete":t in RE?"distribution":t in IE?"constant":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of r6)for(const{option:a,combination:o}of r)if(n.some(t=>ln(i(t),i(a))))return[e,o];return null}).filter(Gu);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0<C6(n,"helix").length||I6(n))&&(!B6(n)||!R6(n)&&!F6(n))){if(e.startsWith("x"))return R6(n)?["axisArc",[t]]:F6(n)?["axisLinear",[t]]:[B6(n)?"axisY":"axisX",[t]];if(e.startsWith("y"))return R6(n)?["axisLinear",[t]]:F6(n)?["axisArc",[t]]:[B6(n)?"axisX":"axisY",[t]];if(e.startsWith("position")){if(0<C6(n,"radar").length)return["axisRadar",[t]];if(!R6(n))return["axisY",[t]]}}return null}).filter(Gu)}(t,e)]}(g,d).forEach(([t,e])=>{var n=p(t)["props"],{defaultPosition:r,defaultOrientation:i,defaultSize:a,defaultOrder:o}=n,{guide:n,field:s}=Object.assign({},...e);for(const h of Array.isArray(n)?n:[n]){var l,c,[u,f]=function(t,e,n,r,i,a,o){var[s]=zE(o),e=[r.position||e,null!=s?s:n];if("string"==typeof t&&t.startsWith("axis"))return function(t,e,n,r,i){n=n[0].name;{var a,o;if("axisRadar"===t)return r=r.filter(t=>t.name.startsWith("position")),a=WE(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=zE(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0<C6(t,"parallel").length}(i))return null===(s=WE(n))?e:B6(i)?0===s?["top",null]:["center","horizontal"]:0===s?e:["center","vertical"]}if("axisLinear"===t)return[r]=zE(i),["center",r];if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(R6(i))return["center",null];if(F6(i))return["center",null];if("axisX"===t&&function(t){return 0<C6(t,"reflect").length}(i)||"axisX"===t&&function(t){return 0<C6(t,"reflectY").length}(i))return["top",null];return e}(t,e,i,a,o);if("string"==typeof t&&t.startsWith("legend")&&R6(o)&&"center"===r.position)return["center","vertical"];return e}(t,r,i,h,e,g,d);(u||f)&&({size:l=a,order:c=o}=h,y.push(Object.assign(Object.assign({title:s},h),{position:u,orientation:f,order:c,size:l,type:t,scales:e})))}}),y}function DE(t,e,n,r,i){var[a]=N6("component",r),{scales:o=[],bbox:s}=t,t=rt(t,["scales","bbox"]),l=o.map(t=>OE(t,r)),s={bbox:s,scales:o,library:r};return a(t)({coordinate:e,library:r,markState:i,scales:l,theme:n,value:s})}function zE(t){var e,n=C6(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=As(n),[n,e]):(n=C6(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=Ps(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function WE(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function GE(t,e,n,r,i,a){var[a]=N6("scale",a),o=t["type"];if("string"==typeof o&&o.startsWith("axis")&&["left","right","bottom","top"].includes(r)){t.transform=t.transform||[{type:"hide"}];var{labelFormatter:o,scales:s,title:l,tickCount:c,tickMethod:u,tickFilter:f}=t;const p="left"===r||"right"===r;var r=function(t,e,n){var{axis:n,["axis"+Du(e)]:e}=n;return it({},n,e,t.style)}(t,r,i),{tickLength:i=0,labelSpacing:h=0,titleSpacing:d=0}=r,r=rt(r,["tickLength","labelSpacing","titleSpacing"]),[s]=s,c=(void 0!==c&&(s.tickCount=c),void 0!==u&&(s.tickMethod=u),a(s));const g=function(t,e,n){n=HE(t,n),n=n.map(t=>{return"number"==typeof t?(e=t,Math.abs(e)<1e-15?e:parseFloat(e.toFixed(15))):t;var e}),e=e?"string"==typeof e?V2(e):e:t.getFormatter?t.getFormatter():t=>""+t;return n.map(e)}(c,o,f),y=at(r,"label"),m=g.map((n,r)=>{var t=Object.fromEntries(Object.entries(y).map(([t,e])=>[t,"function"==typeof e?e(n,r):e]));return p||(t.transform="none"),qE(n,t)});u=Cc(m,t=>t.width),a=i+h,o=(p?t.size=u+a:!function(t,e,n,r,i){var a=Yc(e,t=>t.width);if(n<a)return 1;const o=t.clone(),s=(o.update({range:[0,n]}),HE(t,i)),l=s.map(t=>o.map(t)+function(t,e){if(!t.getBandWidth)return 0;t=t.getBandWidth(e)/2;return t}(o,t)),c=s.map((t,e)=>e),u=-r[0],f=n+r[1],h=(t,e)=>{e=e.width;return[t-e/2,t+e/2]};for(let t=0;t<c.length;t++){var d=l[t],[d,p]=h(d,e[t]);if(d<u||f<p)return 1;d=l[t+1];if(d){var[d]=h(d,e[t+1]);if(d<p)return 1}}return}(c,m,e,n,f)?(s=Cc(m,t=>t.height),t.size=s+a):(t.size=u+a,t.style=Object.assign(Object.assign({},t.style),{labelTransform:"rotate(90)"})),g.map((t,e)=>e));t.indexBBox=new Map(o.map(t=>[t,[g[t],m[t]]])),!1!==l&&null!=l&&(i=at(r,"title"),h=qE(Array.isArray(l)?l.join(","):l,i),p?t.size+=d+h.width:t.size+=d+h.height)}}function HE(t,e){t=t.getTicks?t.getTicks():t.getOptions().domain;return e?t.filter(e):t}function qE(t,e){t=(t=t)instanceof nt.DisplayObject?t:new nt.Text({style:{text:""+t}}),t.attr(Object.assign(Object.assign({},e),{visibility:"none"})),e=t.getBBox();return e}function VE(t,e,n,r,i,a,o){var s=vc(t,t=>t.position),{padding:t,paddingLeft:i=t,paddingRight:l=t,paddingBottom:c=t,paddingTop:t=t}=i,u={paddingBottom:c,paddingLeft:i,paddingTop:t,paddingRight:l};for(const d of r){var f="padding"+Du(p2(d)),h=u[f];if(void 0===h||"auto"===h)if(s.has(d)){const t=s.get(d);"auto"===h&&t.forEach(t=>GE(t,e,n,d,a,o));h=t.reduce((t,{size:e})=>t+e,0);u[f]=h}else u[f]=30}return u}function YE(t,B,e){var I=vc(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:F,marginLeft:r,marginTop:i,marginBottom:D,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:W}=e,t=t+r,r=n+i,n=e+z,i=F+D,G={top:[t,0,o,r,"vertical",!0,ic],right:[W-n,r,n,a,"horizontal",!1,ic],bottom:[t,s-i,o,i,"vertical",!1,ic],left:[0,r,t,a,"horizontal",!0,ic],"top-left":[t,0,o,r,"vertical",!0,ic],"top-right":[t,0,o,r,"vertical",!0,ic],"bottom-left":[t,s-i,o,i,"vertical",!1,ic],"bottom-right":[t,s-i,o,i,"vertical",!1,ic],center:[t,r,o,a,"center",null,null],inner:[t,r,o,a,"center",null,null],outer:[t,r,o,a,"center",null,null]};for(const[C,t]of I.entries()){var l=G[C],[c,H]=h0(t,t=>"string"==typeof t.type&&("center"===C||!(!t.type.startsWith("axis")||!["inner","outer"].includes(C))));if(c.length){p=d=h=f=u=void 0;var u=c,f=B,h=l,d=C,[u,p]=h0(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(m=y=g=c=void 0,u),g=f,y=h,m=d;if("center"===m)if(!function(t){return Zc(t)&&Uc(t)}(g)){if(Uc(g)){u=void 0;d=void 0;v=void 0;b=void 0;x=void 0;w=void 0;u=c;d=y;var[v,b,x,w]=d;for(const tt of u)tt.bbox={x:v,y:b,width:x,height:w}}else if(Zc(g)){d=void 0;u=void 0;M=void 0;O=void 0;d=c;u=g;var M=y;var O=c[0].orientation;"horizontal"===O?function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(d,u,M):"vertical"===O&&function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(d,u,M)}}else{k=void 0;O=void 0;_=void 0;E=void 0;S=void 0;A=void 0;var k=c;O=y;var[_,E,S,A]=O;for(const R of k)R.bbox={x:_,y:E,width:S,height:A},R.radar={index:k.indexOf(R),count:k.length}}else if("inner"===m){L=void 0;d=void 0;u=void 0;q=void 0;V=void 0;M=void 0;T=void 0;j=void 0;Y=void 0;$=void 0;var L=c;d=g;u=y;var[q,V,,u]=u,[M,T]=d.getCenter(),[d]=tu(d),u=u/2,j=d*u,Y=M-j,$=T-j;for(let t=0;t<L.length;t++)L[t].bbox={x:q+Y,y:V+$,width:2*j,height:2*j}}else if("outer"===m){g=void 0;d=void 0;U=void 0;K=void 0;X=void 0;Z=void 0;g=c;d=y;var[U,K,X,Z]=d;for(const et of g)et.bbox={x:U,y:K,width:X,height:Z}}J=Q=P=y=c=m=T=u=N=void 0;var N=p,u=f,T=h;if(0!==N.length){var[T,m,c,y]=T,[u]=tu(u),P=y/2*u/Math.sqrt(2),Q=T+c/2,J=m+y/2;for(let t=0;t<N.length;t++)N[t].bbox={x:Q-P,y:J-P,width:2*P,height:2*P}}}H.length&&!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]="vertical"===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>null===l||void 0===l?void 0:l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function $E(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=rt(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function UE(t,i,a){return ue(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=N6("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=rt(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ue(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),Fu)}([rt(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?u0(n):[],Object.assign(Object.assign({},i),{data:n})]})}function KE(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function XE(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=c0(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return Gu(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function ZE(t,e,n){var r=e["encode"];return r?(r=c0(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{constant:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function QE(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=N6("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=c0(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function JE(t,e,n){var{tooltip:r={}}=e;return $u(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:Yu(r)&&Xu(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function tS(g,t,e){const{data:y,encode:m,tooltip:n={}}=t;var r,i,a,o;return $u(n)?[g,t]:(r=e=>{if(!e)return e;if("string"==typeof e)return g.map(t=>({name:e,value:y[t][e]}));if(Yu(e)){var{field:t,channel:n,color:r,name:i=t,valueFormatter:a=t=>t}=e,o="string"==typeof a?V2(a):a,s=n&&m[n],a=s&&m[n].field,l=i||a||n,c=[];for(const d of g){var u=t?y[d][t]:s?m[n].value[d]:null;c[d]={name:l,color:r,value:o(u)}}return c}if("function"!=typeof e)return e;var f=[];for(const p of g){var h=e(y[p],p,y,m);Yu(h)?f[p]=h:f[p]={value:h}}return f},{title:o,items:i=[]}=n,a=rt(n,["title","items"]),o=Object.assign({title:r(o),items:Array.isArray(i)?i.map(r):[]},a),[g,Object.assign(Object.assign({},t),{tooltip:o})])}function eS(l,t,e){var n,r=t["encode"],i=rt(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=rt(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function nS(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var l="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return it(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>[t,{guide:s(r,t),slider:s(a,t),scrollbar:s(o,t)}]))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function rS(t,e,n){var r=e["animate"];return r||void 0===r||it(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function iS(l,c,u){return ue(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ue(this,void 0,void 0,function*(){var t=c["library"],[t]=N6("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[$E,UE,KE,XE,ZE,QE,eS,rS,nS,JE,...e.map(t),...r.map(t),...n.map(t),tS];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(l,c,{library:u});const{encode:n,scale:h,data:r,tooltip:i}=e;if(!1===Array.isArray(r))return null;const a=c["channels"],o=xc(Object.entries(n).filter(([,t])=>Gu(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=a.find(t=>t.name===e);return null!=n&&n.independent?t:e});var s=a.filter(t=>{const{name:e,required:n}=t;if(o.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:c,scaleKey:u,range:f}=t;return o.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=e.some(t=>t.constant),a=h[t]||{},{independent:o=!1,key:s=u||t,type:i=i?"constant":r?"identity":c}=a,r=rt(a,["independent","key","type"]),a="constant"===i,l=a?void 0:f;return{name:t,values:e,scaleKey:o||a?Symbol("independent"):s,scale:Object.assign({type:i,range:l},r)}})});return[e,Object.assign(Object.assign({},c),{index:t,channels:s,tooltip:i})]})}function aS(W,G,H,q){var V,Y;return ue(this,void 0,void 0,function*(){const[n]=N6("composition",H);var[t]=N6("interaction",H);const r=new Set(Object.keys(H).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(Gu)),i=t=>{t=t.type;if("function"==typeof t){var{props:e={}}=t,{composite:e=!0}=e;if(e)return"mark"}return"string"==typeof t&&r.has(t)?"mark":t};const a=t=>"standardView"===i(t);var e=t=>{var e;return a(t)?[t]:(e=i(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[W],u=[];c.length;){var f=c.shift();if(a(f)){var h=l.get(f),[h,d]=h?cS(h,f,H):yield sS(f,H),p=(s.set(h,f),o.push(h),d.flatMap(e).map(t=>P6(t,H)));if(c.push(...p),p.every(a)){var g=yield Promise.all(p.map(t=>lS(t,H)));kE(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),kE(h,"y");for(let t=0;t<p.length;t++){var B=p[t],I=g[t];l.set(B,I)}}}else{d="mark"===i(f)?f:yield mS(f,H),h=e(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}q.emitter.emit($.BEFORE_PAINT);const y=new Map,m=new Map,v=[];G.selectAll(wS(U)).data(o,t=>t.key).join(t=>t.append("g").attr("className",U).attr("id",t=>t.key).call(oS).each(function(t){uS(t,et(this),v,H),y.set(t,this)}),t=>t.call(oS).each(function(t){uS(t,et(this),v,H),m.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var b=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(h,d,p){return f=>ue(this,void 0,void 0,function*(){var t,[e,n]=yield sS(f,d),r=(uS(e,h,[],d),h),i=f,a=e,o=p,[s]=N6("interaction",s=d),l=(l=r.node()).nameInteraction,c=yS(i).find(([t])=>"tooltip"===t);(l=l.get("tooltip"))&&(null!=(t=l.destroy)&&t.call(l),c[1])&&(t=s(Object.assign({type:"tooltip"},c[1])),l={options:i,view:a,container:r.node(),update:t=>Promise.resolve(t)},t(l,[],o.emitter));for(const u of n)aS(u,h,d,p);return{options:f,view:e}})}(et(e),H,q)})),x=b(y);for(const T of x){const W=T["options"];var w=new Map;T.container.nameInteraction=w;for(const j of yS(W)){var[M,O]=j;O&&(O=t(Object.assign({type:M},O))(T,x,q.emitter),w.set(M,{destroy:O}))}}var k=b(m);for(const N of k){const{options:W,container:P}=N;var _=P.nameInteraction;for(const C of yS(W)){var[E,S]=C,A=_.get(E);A&&null!=(V=A.destroy)&&V.call(A),S&&(A=t(Object.assign({type:E},S))(N,k,q.emitter),_.set(E,{destroy:A}))}}const{width:F,height:D}=W;var L=[];for(const R of u){var z=new Promise(e=>ue(this,void 0,void 0,function*(){for(const t of R)yield aS(Object.assign({width:F,height:D},t),G,H,q);e()}));L.push(z)}q.views=o,null!=(Y=q.animations)&&Y.forEach(t=>null==t?void 0:t.cancel()),q.animations=v,q.emitter.emit($.AFTER_PAINT);b=v.filter(Gu).map(pS).map(t=>t.finished);return Promise.all([...b,...L])})}function oS(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function sS(e,n){return ue(this,void 0,void 0,function*(){var t=function(t){var{coordinate:e={},interaction:n={},marks:r}=t,t=rt(t,["coordinate","interaction","marks"]),i=r.map(t=>t.coordinate||{}),a=r.map(t=>t.interaction||{}),i=[...i,e].reduceRight((t,e)=>it(t,e),{}),e=[n,...a].reduce((t,e)=>it(t,e),{});return Object.assign(Object.assign({},t),{marks:r,coordinate:i,interaction:e})}(yield function(c,u){return ue(this,void 0,void 0,function*(){var[t,e]=N6("mark",u);const n=c["marks"];for(var r=[],i=[...n];i.length;){var[a]=i.splice(0,1),a=yield mS(a,u);const{type:s=zu("G2Mark type is required."),key:l}=a;var{props:o={}}=e(s),{composite:o=!0}=o;if(o){const n=yield t(a)(c);o=Array.isArray(n)?n:[n];i.unshift(...o.map((t,e)=>Object.assign(Object.assign({},t),{key:l+"-"+e})))}else r.push(a)}return Object.assign(Object.assign({},c),{marks:r})})}(e,n)),t=(e.interaction=t.interaction,e.coordinate=t.coordinate,P6(t,n));return cS(yield lS(t,n),t,n)})}function lS(p,g){return ue(this,void 0,void 0,function*(){var[t]=N6("theme",g),[,e]=N6("mark",g),{theme:n,marks:r,coordinates:i=[]}=p,a=t(gS(n)),o=new Map;for(const f of r){var s,l=f["type"],{props:l={}}=e(l),l=yield iS(f,l,g);l&&([l,s]=l,o.set(l,s))}for(const h of vc(Array.from(o.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var c=h.reduce((t,{scale:e})=>it(t,e),{}),u=h[0]["values"],u=Array.from(new Set(u.map(t=>t.field).filter(Gu)));const p=it({guide:{title:0===u.length?void 0:u},field:u[0]},c);u=h[0]["name"];const d=ME(u,h.flatMap(({values:t})=>t.map(t=>t.value)),p,i,a,g);h.forEach(t=>t.scale=d)}return o})}function cS(t,e,n){var[r]=N6("mark",n),[i]=N6("theme",n),[a]=N6("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:f=[]}=e;var h,d,i=i(gS(l)),p=Array.from(t.values()),g=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),g=FE(function(t,e,n){for(var[r]of n.entries())if("cell"===r.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;n=e[0].defaultShape;if(!["point","line","rect","hollow"].includes(n))return t;e=(null==(e=t.find(t=>"color"===t.name))?void 0:e.field)||null,e={field:e,name:"shape",type:"constant",domain:[],range:[{point:"point",line:"hyphen",rect:"square",hollow:"hollow"}[n]]};return[...t,e]}(Array.from(g),p,t),e,n),y=function(t,e,n,r){var{width:i,height:a,x:o=0,y:s=0,inset:l=0,insetLeft:c=l,insetTop:u=l,insetBottom:f=l,insetRight:l=l,margin:h=0,marginLeft:d=h,marginBottom:p=h,marginTop:g=h,marginRight:h=h,padding:y,paddingBottom:m=y,paddingLeft:v=y,paddingRight:b=y,paddingTop:y=y}=e,x=(t,e,n)=>"auto"===t?Math.min(n,e):e,{paddingLeft:w,paddingRight:M}=VE(t,a,[0,0],["left","right"],e,n,r),v=x(v,w,1/3*(O=i-d-h)),w=x(b,M,1/3*O),{paddingTop:M,paddingBottom:O}=VE(t,b=O-v-w,[v,w],["bottom","top"],e,n,r),e=x(m,O,1/3*(t=a-p-g)),n=x(y,M,1/3*t);return{width:i,height:a,insetLeft:c,insetTop:u,insetBottom:f,insetRight:l,innerWidth:b,innerHeight:t-e-n,paddingLeft:v,paddingRight:w,paddingTop:n,paddingBottom:e,marginLeft:d,marginBottom:p,marginTop:g,marginRight:h,x:o,y:s}}(g,e,i,n),m=function(t,e,n){var[n]=N6("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new T6(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(y,e,n),p=s?it({mainLineWidth:1,mainStroke:"#000"},u):u,v=(YE(g,m,y),{}),b=[];for([h,d]of t.entries()){const{children:M,dataDomain:O,modifier:k,key:_}=h,{index:E,channels:S,tooltip:A}=d;var x=c0(Object.fromEntries(S.map(({name:t,scale:e})=>[t,e])),t=>OE(t,n));Object.assign(v,x);const L=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(S,x),[T,j,N]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>Gu(t)&&Gu(e))&&(r.push(a),i.push(o))}return[r,i]}(r(h)(E,x,L,m));var w=O||T.length;const P=k?k(j,w,y):[],C=t=>{var e;return null==(e=null==(e=A.title)?void 0:e[t])?void 0:e.value},R=e=>A.items.map(t=>t[e]);w=T.map((t,e)=>{var n=Object.assign({points:j[e],transform:P[e],index:t,markKey:_,viewKey:o},A&&{title:C(t),items:R(t)});for(const[r,i]of Object.entries(L))n[r]=i[t],N&&(n["series"+Qe(r)]=N[e].map(t=>i[t]));return N&&(n.seriesIndex=N[e]),N&&A&&(n.seriesItems=N[e].map(t=>R(t)),n.seriesTitle=N[e].map(t=>C(t))),n}),w=(d.data=w,d.index=T,null==M?void 0:M(w,x,y));b.push(...w||[])}return[{layout:y,theme:i,coordinate:m,components:g,markState:t,key:o,clip:c,scale:v,style:p,labelTransform:fS(f.map(a))},b]}function uS(Z,Q,J,tt){ue(this,void 0,void 0,function*(){const{components:B,theme:n,layout:t,markState:r,coordinate:i,key:e,style:I,clip:a}=Z,{width:F,height:D}=t,z=rt(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>Hu(Object.assign({},n,I),t)),W=["a","margin","padding","inset"].map(t=>at(z,t)),c=t=>t.style("x",t=>p[t].x).style("y",t=>p[t].y).style("width",t=>p[t].width).style("height",t=>p[t].height).each(function(t){var e,n,r=et(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,f=0,h=F,d=D;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return u+=t,f+=e,h-=t+r,d-=e+n,{x:u,y:f,width:h,height:d}}),g=(Q.selectAll(wS(ft)).data(s.filter(t=>Gu(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",ft).style("zIndex",-2).call(c),t=>t.call(c),t=>t.remove()),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{enter:r={},update:a={},exit:o={}}=r,{type:s,duration:l=300,delay:c=0}=a,{type:u,duration:f=300,delay:h=0}=r,{type:d,duration:p=300,delay:g=0}=o;for(const _ of i){var{updateType:y=s,updateDuration:m=l,updateDelay:v=c,enterType:b=u,enterDuration:x=f,enterDelay:w=h,exitDuration:M=p,exitDelay:O=g,exitType:k=d}=_;void 0!==y&&!y||(e=Math.max(e,m+v),n=Math.min(n,v)),void 0!==k&&!k||(e=Math.max(e,M+O),n=Math.min(n,O)),void 0!==b&&!b||(e=Math.max(e,x+w),n=Math.min(n,w))}}return e===-1/0?null:[n,e-n]}(r)),y=!!g&&{duration:g[1]};var m,v,b,s=Q.selectAll(wS(ct)).data(B,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",ct).append(t=>DE(it({animate:y},t),i,n,tt,r)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=DE(it({animate:y},t),i,n,tt,r)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();J.push(...s.flat().filter(Gu));const x=Q.selectAll(wS(lt)).data([t],()=>e).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",lt).call(vS).call(xS,Array.from(r.keys())).call(MS,a),t=>t.call(xS,Array.from(r.keys())).call(t=>{if(!g)return vS(t);{const[l,c]=g;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(MS,a)).transitions();J.push(...x.flat());for([m,v]of r.entries()){var G=v["data"];const{key:e,class:H,type:A}=m;var w=Q.select("#"+e);const L=function(s,t,e,n){const[l]=N6("shape",n),c=s["data"],{defaultShape:u,data:r}=t,f=r.map(t=>t.points),{theme:h,coordinate:d}=e,{type:p,style:g={}}=s;return t=>{var{shape:e=u}=g,{shape:e=e,points:n,seriesIndex:r,index:i}=t,t=rt(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:e,mark:p,defaultShape:u,index:i});const a=r?r.map(t=>c[t]):c[i],o=r||i;r=c0(g,t=>hS(t,a,o,c));return l(Object.assign(Object.assign({},r),{type:bS(s,e)}))(n,t,d,h,f)}}(m,v,Z,tt),q=(M=m,b=v,dS("enter",M,b,Z,tt)),T=(M=m,b=v,dS("update",M,b,Z,tt)),V=(M=m,b=v,dS("exit",M,b,Z,tt));var M=function(t,e,n,r){t=t.node().parentElement;return t.findAll(t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node()).flatMap(t=>t.getElementsByClassName(r))}(Q,w,H,"element");const x=w.selectAll(wS(st)).selectFacetAll(M).data(G,t=>t.key,t=>t.groupKey).join(t=>t.append(L).attr("className",st).attr("markType",A).transition(function(t){return q(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,s=c,n.__facet__&&(i=n.parentNode.parentNode,o=r.parentNode,[i,a]=s(i),[s,o]=s(o),i=`translate(${i-s}, ${a-o})`,s=n.style.transform,a="none"===(a=s)||void 0===a?"":s,n.style.transform=(a+" "+i).trimStart(),r.append(n));var n,r,i,a,o=L(t,e),s=T(t,[this],[o]);return null===s&&(this.nodeName===o.nodeName?Wu(this,o):this.parentNode.replaceChild(o,this)),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return V(t,[this])}).remove(),t=>t.append(L).attr("className",st).attr("markType",A).transition(function(t){var e=this["__fromElements__"],t=T(t,e,[this]);return new L0(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new L0([],this.__toData__,this.parentNode).append(L).attr("className",st).attr("markType",A).nodes();return T(t,[this],e)}).remove()).transitions();J.push(...x.flat())}{var O=Z,k=Q,_=tt,E,S;const[Y]=N6("labelTransform",_),{markState:$,labelTransform:j}=O,U=k.select(wS(ot)).node(),N=new Map,P=new Map,K=Array.from($.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=N6("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=rt(t,["formatter","transform","style"]),t=c0(Object.assign(Object.assign({},t),a),t=>hS(t,r,e,l)),{shape:a=c,text:o}=t,t=rt(t,["shape","text"]),i="string"==typeof i?V2(i):i,i=Object.assign(Object.assign({},t),{text:i(o,r,e,l)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,O,_),a=k.select("#"+r).selectAll(wS(st)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=rt(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{N.set(t,i),P.set(t,e)}),t})})}),C=et(U).selectAll(wS(ut)).data(K,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",ut),t=>t.each(function(t){Wu(this,N.get(t)(t))}),t=>t.remove()).nodes(),X=vc(C,t=>P.get(t.__data__)),R=O["coordinate"];for([E,S]of X){var{transform:E=[]}=E;fS(E.map(Y))(S,R)}j&&j(C,R)}})}function fS(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function hS(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function dS(o,t,e,n,r){var[,i]=N6("shape",r);const[s]=N6("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Qe(o)}Animation`;const{[e]:c}=i(bS(t,r)).props,{[o]:u={}}=a,f=(null==(n=t.animate)?void 0:n[o])||{};return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function pS(t){return t.finished.then(()=>{t.cancel()}),t}function gS(t={}){var e;return"string"==typeof t?{type:t}:({type:e="classic"}=t,t=rt(t,["type"]),Object.assign(Object.assign({},t),{type:e}))}function yS(t){var{interaction:t={}}=t;return Object.entries(it({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0},t))}function mS(r,i){return ue(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=rt(r,["data"]);return null==e?r:([,{data:e}]=yield UE(0,{data:e},t),Object.assign({data:e},n))})}function vS(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function bS(t,e){t=t.type;return"string"==typeof e?t+"."+e:e}function xS(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(wS(E)).data(e,t=>t.key).join(t=>t.append("g").attr("className",E).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.remove()),t.select(wS(ot)).node())||t.append("g").attr("className",ot).style("zIndex",0)}function wS(...t){return t.map(t=>"."+t).join("")}function MS(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new nt.Rect({style:{x:e,y:t,width:n,height:r}})):null})}function OS(t){for(var t=it({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=it({},s[t]);s[t]=l,e.set(l,o),n.set(l,t),r.push(l)}}return t}function kS(t,e={},n,r){const{width:i=640,height:a=480,theme:o}=t,s=(o||zu('ChartOptions.theme is required, such as `const chart = new Chart({ theme: "classic"})`.'),OS(t)),{canvas:l=(t=i,f=a,h=new _.Renderer,h.registerPlugin(new ks),new nt.Canvas({width:t,height:f,container:document.createElement("div"),renderer:h})),library:c=n6(),emitter:u=new _s}=e;var f,h;e.canvas=l,e.library=c,e.emitter=u,l.resize(i,a),u.emit($.BEFORE_RENDER);const d=et(l.document.documentElement);return l.ready.then(()=>aS(Object.assign(Object.assign({},s),{width:i,height:a}),d,c,e)).then(()=>{l.requestAnimationFrame(()=>{u.emit($.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),"string"==typeof(t=l.getConfig().container)?document.getElementById(t):t}function _S(t,e={},n=!1){var r,{canvas:e,emitter:i}=e;e&&(null!=(r=(r=e).getRoot().querySelectorAll("."+U))&&r.forEach(t=>{var{nameInteraction:t=new Map}=t;0<(null==t?void 0:t.size)&&Array.from(null==t?void 0:t.values()).forEach(t=>{null!=t&&t.destroy()})}),n?e.destroy():e.destroyChildren()),i.off()}function ES(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function SS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function AS(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length&&"string"!=typeof t?this.attr(r,t):((n=this.attr(r)||{})[t]=1===arguments.length||e,this.attr(r,n))}}function g(r){return t=>{for(const n of r){var e=n["type"];"value"===e?ES(t,n):"array"===e?SS(t,n):"object"===e?AS(t,n):"node"===e?function(t,{name:n,ctor:r}){t.prototype[n]=function(t){var e=this.append(r);return"mark"===n&&(e.type=t),e}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"mix"===e&&function(t,{name:r}){t.prototype[r]=function(t){var e,n;return 0===arguments.length?this.attr(r):Array.isArray(t)?this.attr(r,{items:t}):Yu(t)&&(void 0!==t.title||void 0!==t.items)||null===t||!1===t?this.attr(r,t):({items:n=[]}=e=this.attr(r)||{},n.push(t),e.items=n,this.attr(r,e))}}(t,n)}return t}}function LS(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function TS(t,e){for(var n=[t];n.length;){var r=n.shift(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class jS{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return TS(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return TS(this,t=>{e===t.type&&n.push(t)}),n}getNodeByType(e){let n=null;return TS(this,t=>{n||e===t.type&&(n=t)}),n}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}class NS extends jS{changeData(t){var e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t,e=null==(e=this.getRoot())?void 0:e.getView();if(e)return e=e["markState"],t=Array.from(e.keys()).find(t=>t.key===this.attr("key")),e.get(t)}getScale(){var t=null==(t=this.getRoot())?void 0:t.getView();return!t||null==t?void 0:t.scale}getScaleByChannel(t){var e=null==(e=this.getRoot())?void 0:e.getView();return!e||null==(e=null==e?void 0:e.scale)?void 0:e[t]}getGroup(){var t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}}i=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"object"},{name:"interaction",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"},{name:"scrollbar",type:"object"},{name:"state",type:"object"},{name:"tooltip",type:"mix"}];let PS=class extends NS{constructor(){super({})}},CS=(PS=t([g(i)],PS),class extends NS{constructor(){super({},"interval")}}),RS=(CS=t([g(i)],CS),class extends NS{constructor(){super({},"rect")}}),BS=(RS=t([g(i)],RS),class extends NS{constructor(){super({},"point")}}),IS=(BS=t([g(i)],BS),class extends NS{constructor(){super({},"area")}}),FS=(IS=t([g(i)],IS),class extends NS{constructor(){super({},"line")}}),DS=(FS=t([g(i)],FS),class extends NS{constructor(){super({},"cell")}}),zS=(DS=t([g(i)],DS),class extends NS{constructor(){super({},"vector")}}),WS=(zS=t([g(i)],zS),class extends NS{constructor(){super({},"link")}}),GS=(WS=t([g(i)],WS),class extends NS{constructor(){super({},"polygon")}});GS=t([g(i)],GS);go=t([g(i)],class extends NS{constructor(){super({},"image")}});let HS=class extends NS{constructor(){super({},"text")}},qS=(HS=t([g(i)],HS),class extends NS{constructor(){super({},"box")}}),VS=(qS=t([g(i)],qS),class extends NS{constructor(){super({},"lineX")}}),YS=(VS=t([g(i)],VS),class extends NS{constructor(){super({},"lineY")}}),$S=(YS=t([g(i)],YS),class extends NS{constructor(){super({},"range")}}),US=($S=t([g(i)],$S),class extends NS{constructor(){super({},"rangeX")}}),KS=(US=t([g(i)],US),class extends NS{constructor(){super({},"rangeY")}}),XS=(KS=t([g(i)],KS),class extends NS{constructor(){super({},"connector")}}),ZS=(XS=t([g(i)],XS),class extends NS{constructor(){super({},"shape")}}),QS=(ZS=t([g(i)],ZS),class extends NS{constructor(){super({},"sankey")}}),JS=(QS=t([g([...i,{name:"layout",type:"value"}])],QS),class extends NS{constructor(){super({},"treemap")}}),t8=(JS=t([g([...i,{name:"layout",type:"value"}])],JS),class extends NS{constructor(){super({},"boxplot")}}),e8=(t8=t([g(i)],t8),class extends NS{constructor(){super({},"density")}}),n8=(e8=t([g(i)],e8),class extends NS{constructor(){super({},"pack")}}),r8=(n8=t([g([...i,{name:"layout",type:"value"}])],n8),class extends NS{constructor(){super({},"forceGraph")}}),i8=(r8=t([g([...i,{name:"layout",type:"value"}])],r8),class extends NS{constructor(){super({},"tree")}}),a8=(i8=t([g([...i,{name:"layout",type:"value"}])],i8),class extends NS{constructor(){super({},"wordCloud")}}),o8=(a8=t([g([...i,{name:"layout",type:"object"}])],a8),class extends NS{constructor(){super({},"gauge")}});o8=t([g(i)],o8);const s8={mark:PS,interval:CS,rect:RS,point:BS,area:IS,line:FS,cell:DS,vector:zS,link:WS,polygon:GS,image:go,text:HS,box:qS,lineX:VS,lineY:YS,range:$S,rangeX:US,rangeY:KS,connector:XS,sankey:QS,treemap:JS,boxplot:t8,density:e8,shape:ZS,pack:n8,forceGraph:r8,tree:i8,wordCloud:a8,gauge:o8};class l8 extends jS{changeData(e){var t,n=this.getRoot();if(n)return this.attr("data",e),null!=(t=this.children)&&t.length&&this.children.forEach(t=>{t.attr("data",e)}),null==n?void 0:n.render()}getView(){var t=this.getRoot().getContext()["views"];if(null!=t&&t.length)return t.find(t=>t.key===this._key)}getScale(){var t;return null==(t=this.getView())?void 0:t.scale}getScaleByChannel(t){var e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?void 0:t.theme}getGroup(){var t=this._key;if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&dw(t)}hide(){var t=this.getGroup();t&&t.isVisible()&&hw(t)}}let c8=class extends l8{constructor(t={},e="view"){super(t,e)}},u8=(c8=t([g([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...LS(s8)])],c8),class extends l8{constructor(){super({},"spaceLayer")}}),f8=(u8=t([g([{type:"value",name:"data"},...LS(s8)])],u8),class extends l8{constructor(){super({},"spaceFlex")}}),h8=(f8=t([g([{type:"value",name:"data"},...LS(s8)])],f8),class extends l8{constructor(){super({},"facetRect")}}),d8=(h8=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...LS(s8)])],h8),class extends l8{constructor(){super({},"facetCircle")}}),p8=(d8=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...LS(s8)])],d8),class extends l8{constructor(){super({},"repeatMatrix")}}),g8=(p8=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...LS(s8)])],p8),class extends l8{constructor(){super({},"timingKeyframe")}}),y8=(g8=t([g([...LS(s8)])],g8),class extends l8{constructor(){super({},"geoView")}}),m8=(y8=t([g([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...LS(s8)])],y8),class extends l8{constructor(){super({},"geoPath")}});m8=t([g([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...LS(s8)])],m8);const v8={view:c8,spaceLayer:u8,spaceFlex:f8,facetRect:h8,facetCircle:d8,repeatMatrix:p8,timingKeyframe:g8,geoView:y8,geoPath:m8};for(const S8 of Object.values(v8))g(LS(v8))(S8);const b8=n6();const x8=["width","height","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme"];function w8(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function M8(t,e){var n,r=t["autoFit"];return r?(r=e,e=getComputedStyle(r),n=r.clientWidth||tf(e.width),r=r.clientHeight||tf(e.height),{width:n-(tf(e.paddingLeft)+tf(e.paddingRight)),height:r-(tf(e.paddingTop)+tf(e.paddingBottom))}):({width:n=640,height:r=480}=t,{width:n,height:r})}function O8(t){var t=function(t){if(null!==t.type)return t;var e=t.children[t.children.length-1];for(const n of x8)e.attr(n,t.attr(n));return e}(t),e=[t],n=new Map;for(n.set(t,w8(t));e.length;){const t=e.pop();var r=n.get(t),{children:i=[]}=t;for(const s of i){var a=w8(s),{children:o=[]}=r;o.push(a),e.push(s),n.set(s,a),r.children=o}}return n.get(t)}function k8(t,e){var t=t["type"],{type:t=t}=e;if("view"===t)return e;if("string"!=typeof t)return e;if(t=t,!new Set(Object.keys(s8)).has(t))return e;var n={type:"view"},r=Object.assign({},e);for(const i of x8)void 0!==r[i]&&(n[i]=r[i],delete r[i]);return Object.assign(Object.assign({},n),{children:[r]})}function _8(t){var e=t["type"],t=rt(t,["type","children"]);if("string"==typeof e)return(e=new(function(t){var e=Object.assign(Object.assign({},s8),v8)[t];if(e)return e;throw new Error(`Unknown mark: ${t}.`)}(e))).value=t,e}function E8(t,e){for(var n,r,i=[[null,t,k8(t,e)]];i.length;){var[a,o,s]=i.shift();if(o){n=o,d=void 0,d=(r=s).type,r=rt(r,["type","children"]),n.type===d||void 0===d?n.value=it(n.value,r):"string"==typeof d&&(n.type=d,n.value=r);var l=s["children"],c=o["children"];if(Array.isArray(l)&&Array.isArray(c))for(let t=0;t<l.length;t++){var u=l[t],f=c[t];i.push([o,f,u])}}else{y=g=p=d=h=void 0;var h=a,d=s;if(h)for(var p=[[h,d]];p.length;){const[h,m]=p.shift();var g=_8(m),y=(Array.isArray(h.children)&&h.children.push(g),m)["children"];if(Array.isArray(y))for(const v of y)p.push([g,v])}}}}fo=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"value"},{name:"interaction",type:"object"},{name:"theme",type:"object"},{name:"title",type:"value"},{name:"transform",type:"array"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},{name:"labelTransform",type:"array"},...LS(s8),...(jo=v8,Object.entries(jo).map(([t,e])=>({type:"container",name:t,ctor:e})))];y.Chart=class extends c8{constructor(t){var t=t||{},{container:e,canvas:n,renderer:r,plugins:i}=t;super(rt(t,["container","canvas","renderer","plugins"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._onResize=nn(()=>{this.forceFit()},300),this._renderer=r||new _.Renderer,this._plugins=i||[],this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new _s,this._context={library:b8,emitter:this._emitter,canvas:n}}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;var t=new Promise((t,e)=>kS(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e))),[e,n,r]=function(){let n,r;return[new Promise((t,e)=>{r=t,n=e}),r,n]}();return t.then(n).catch(r).then(()=>this._renderTrailing()),e}options(t){return 0===arguments.length?O8(this):(E8(this,t),this)}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(){this.options();this.emit($.BEFORE_CLEAR),this._reset(),_S(0,this._context,!1),this.emit($.AFTER_CLEAR)}destroy(){var t,e;this.options();this.emit($.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),_S(0,this._context,!0),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit($.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;var{width:t,height:e}=M8(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit($.BEFORE_CHANGE_SIZE);t=this.render();return t.then(()=>{this.emit($.AFTER_CHANGE_SIZE)}),t}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit($.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);t=this.render();return t.then(()=>{this.emit($.AFTER_CHANGE_SIZE)}),t}_reset(){this.type="view",this.value={},this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{var t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)}).catch(t=>{var e=this._trailingReject.bind(this);this._trailingReject=null,e(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(e){return t=>{this._rendering=!1,e(t)}}_computedOptions(){var t=this.options(),{key:e="G2_CHART_KEY"}=t,{width:n,height:r}=M8(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r})}_createCanvas(){var{width:t,height:e}=M8(this.options(),this._container);this._plugins.push(new ks),this._plugins.forEach(t=>this._renderer.registerPlugin(t)),this._context.canvas=new nt.Canvas({container:this._container,width:t,height:e,renderer:this._renderer})}_addToTrailing(){null!=(t=this._trailingResolve)&&t.call(this,this),this._trailing=!0;var t=new Promise((t,e)=>{this._trailingResolve=t,this._trailingReject=e});return t}_bindAutoFit(){var t=this.options()["autoFit"];this._hasBindAutoFit?t||this._unbindAutoFit():t&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}},y.Chart=t([g(fo)],y.Chart),y.AREA_CLASS_NAME=ft,y.COMPONENT_CLASS_NAME=ct,y.ChartEvent=$,y.CompositionNode=l8,y.ELEMENT_CLASS_NAME=st,y.LABEL_CLASS_NAME=ut,y.LABEL_LAYER_CLASS_NAME=ot,y.MAIN_LAYER_CLASS_NAME=E,y.MarkNode=NS,y.PLOT_CLASS_NAME=lt,y.VIEW_CLASS_NAME=U,y.createLibrary=n6,y.register=function(t,e){Object.assign(b8,{[t]:e})},y.render=kS,y.renderToMountedElement=function(t,e={},n,r){var i,{width:a=640,height:o=480}=t,t=OS(t);const{library:s=n6(),group:l=new nt.Group,emitter:c=new _s}=e;if(null!==l&&void 0!==l&&l.parentElement)return i=et(l),e.group=l,e.library=s,(e.emitter=c).emit($.BEFORE_RENDER),aS(Object.assign(Object.assign({},t),{width:a,height:o}),i,s,e).then(()=>{l.ownerDocument.defaultView.requestAnimationFrame(()=>{c.emit($.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),l;throw new Error("renderToMountedElement can't render chart to unmounted group.")},Object.defineProperty(y,"__esModule",{value:!0})});
|
|
10
|
+
`,y.style.x=t,y.style.y=e,y.style.width=n-t,y.style.height=r-e},E={"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"}},S=t=>L(t)||A(t),A=t=>{t=t.id;return-1!==f.indexOf(t)&&new Set(Object.keys(E)).has(t)},L=t=>t===y.getElementById("selection"),T=t=>{var e=t["target"],[t,n]=bw(l,t);y&&S(e)?S(e)&&(g=[t,n]):(O(t,n),v=!0)},j=t=>{var e,n,r,i,a,o,s=t["target"],t=bw(l,t);if(d)return g?L(s)?(e=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(n=t)[0]-g[0],n=n[1]-g[1],r=e(r,d[0],p[0],b,w),e=e(n,d[1],p[1],x,M),n=[d[0]+r,d[1]+e],r=[p[0]+r,p[1]+e],void _(n,r)):([e,n]=[t[0]-g[0],t[1]-g[1]],r=s["id"],E[r]?([s,i,a,o]=E[r].vector,_([d[0]+e*s,d[1]+n*i],[p[0]+e*a,p[1]+n*o])):void 0):_(d,t)},N=t=>{var e,n,r,i;g?(g=null,{x:e,y:r,width:n,height:i}=y.style,d=[e,r],p=[e+n,r+i]):(p=bw(l,t),[e,n,r,i]=_(d,p),v=!1,o(e,n,r,i,t))},P=t=>{t=t.target;y&&!S(t)&&k()},C=t=>{t=t.target;y&&S(t)&&!v?L(t)?Lw(l,"move"):A(t)&&Lw(l,E[t.id].cursor):Lw(l,"crosshair")},R=()=>{Lw(l,"default")};return l.addEventListener("dragstart",T),l.addEventListener("drag",j),l.addEventListener("dragend",N),l.addEventListener("click",P),l.addEventListener("pointermove",C),l.addEventListener("pointerleave",R),{mask:y,move(t,e,n,r,i=!0){y||O(t,e),d=[t,e],p=[n,r],_([t,e],[n,r],i)},remove(){y&&k()},destroy(){y&&k(!1),Lw(l,"default"),l.removeEventListener("dragstart",T),l.removeEventListener("drag",j),l.removeEventListener("dragend",N),l.removeEventListener("click",P),l.removeEventListener("pointermove",C),l.removeEventListener("pointerleave",R)}}}function x5(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function w5(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:a,brushRegion:o,extent:s,reverse:l,scale:c,coordinate:u,series:f=!1,key:d=t=>t,bboxOf:h=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:p={},emitter:g}=e,e=rt(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const y=n(t),m=i(t),v=m.flatMap(n);i=_w(y,a),n=at(e,"mask");const{setState:b,removeState:x}=Ow(p,i),w=new Map,{width:M,height:O,x:k=0,y:_=0}=h(t);a=s||[0,0,M,O];const E=()=>{for(const t of[...y,...v])x(t,"active","inactive")},S=(t,e,n,r)=>{var i;for(const u of m)null!=(i=u.brush)&&i.remove();var a=new Set;for(const f of y){var{min:o,max:s}=f.getLocalBounds(),[o,l]=o,[s,c]=s;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r<e||o<t||i<a||s<n)}([o,l,s,c],[t,e,n,r])?b(f,"inactive"):(b(f,"active"),a.add(d(f)))}for(const h of v)a.has(d(h))?b(h,"active"):b(h,"inactive")},A=()=>{for(const t of y)x(t,"inactive");for(const e of w.values())e.remove();w.clear()},L=(t,e,n,r)=>{var i;for(const o of y){var a=w.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),w.set(a,i),i);a.style.clipPath=new nt.Rect({style:{x:t+k,y:e+_,width:n-t,height:r-e}}),b(o,"inactive"),b(a,"active")}},T=b5(t,Object.assign(Object.assign({},n),{extent:a,brushRegion:o,reverse:l,selectedHandles:r,brushended:()=>{var t=f?A:E;g.emit("brush:end",{nativeEvent:!0}),t()},brushed:(t,e,n,r,i)=>{var a=Px(t,e,n,r,c,u);i&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:a}}),(f?L:S)(t,e,n,r)}})),j=({nativeEvent:t,data:e})=>{var n,r;t||(t=e["selection"],[e,t,n,r]=function(t,e,n){var[[t,r],[i,a]]=t,{x:e,y:o}=e,t=[e.map(t),o.map(i)],i=t=>t.getStep?t.getStep():0,r=[e.map(r)+i(e),o.map(a)+i(o)],[e,a]=n.map(t),[i,o]=n.map(r);return[e,a,i,o]}(t,c,u),T.move(e,t,n,r,!1))},N=(g.on("brush:highlight",j),()=>T.remove()),P=(g.on("brush:remove",N),T.destroy.bind(T));return T.destroy=()=>{g.off("brush:highlight",j),g.off("brush:remove",N),P()},T}function M5(t){var{facet:g,brushKey:y}=t,m=rt(t,["facet","brushKey"]);return(t,e,n)=>{var r,i,a,o,{container:s,view:l,options:c}=t,s=mw(s),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:d}=l;if(g)return r=(o=s.getBounds()).min[0],i=o.min[1],a=o.max[0],o=o.max[1],w5(s.parentNode.parentNode,Object.assign(Object.assign({elements:()=>gw(t,e),datum:Mw(yw(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[r,i,a,o],state:kw(yw(t,e).map(t=>t.options),f),emitter:n,scale:h,coordinate:d,selectedHandles:void 0},u),m));const p=w5(s,Object.assign(Object.assign({elements:pw,key:t=>t.__data__.key,siblings:()=>{return x5(t,e,y).map(t=>mw(t.container))},datum:Mw([l,...x5(t,e,y).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:kw([c,...x5(t,e,y).map(t=>t.options)],f),emitter:n,scale:h,coordinate:d,selectedHandles:void 0},u),m));return s.brush=p,()=>p.destroy()}}function O5(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function k5(t){return M5(Object.assign(Object.assign({},t),{brushRegion:O5,selectedHandles:["handle-e","handle-w"]}))}function _5(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function E5(t){return M5(Object.assign(Object.assign({},t),{brushRegion:_5,selectedHandles:["handle-n","handle-s"]}))}const S5="axis",A5="axis-hot-area";function L5(t){return t.getElementsByClassName(S5)}function T5(t){return t.getElementsByClassName("axis-line")[0]}function j5(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function N5(t,e){var{cross:n,offsetX:i}=e,e=rt(e,["cross","offsetX","offsetY"]),r=j5(t),[t]=T5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:_5,hotZone:new nt.Rect({className:A5,style:Object.assign({x:n?a:t-r/2,width:n?r/2:r,y:o,height:l-o},e)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,r)=>[Math.floor(a-i),e,Math.ceil(s-i),r]}}function P5(t,e){var{offsetY:i,cross:n=!1}=e,e=rt(e,["offsetY","offsetX","cross"]),r=j5(t),[,t]=T5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:O5,hotZone:new nt.Rect({className:A5,style:Object.assign({x:a,width:s-a,y:n?o:t-r,height:n?r:2*r},e)}),extent:n?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,n,r)=>[t,Math.floor(o-i),n,Math.ceil(l-i)]}}function C5(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={}}=e,e=rt(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state"]);const f=r(t);r=n(t);const h=Ow(u,_w(f,o))["setState"],d=new Map;var p=at(e,"mask");const g=()=>{for(const t of f)(t=>Array.from(d.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(t))?h(t,"active"):h(t,"inactive")};var y=r.some(a)&&r.some(t=>!a(t));for(const m of r){const{hotZone:v,brushRegion:b,extent:x}=(a(m)?P5:N5)(m,{offsetY:s,offsetX:l,cross:y,zIndex:999,fill:"transparent"});m.parentNode.appendChild(v),b5(v,Object.assign(Object.assign({},p),{reverse:c,brushRegion:b,brushended(){d.delete(m),g()},brushed(t,e,n,r){d.set(m,x(t,e,n,r)),g()}}))}}function R5(a){return t=>{var{container:t,view:e,options:n}=t,{x:r,y:i}=mw(t).getBBox();return C5(t,Object.assign({elements:pw,axes:L5,offsetY:i,offsetX:r,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:Mw(e),state:kw(n,["active",["inactive",{opacity:.5}]])},a))}}function B5(t,e){var{filter:a,reset:n,brushRegion:r,extent:i,reverse:o,emitter:s,selection:l}=e,e=at(rt(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:c,height:u}=t.getBBox(),i=i||[0,0,c,u];const f=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),h=b5(t,Object.assign(Object.assign({},e),{extent:i,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r,i){i.nativeEvent=!0,a(l(t,e,n,r),i),h.remove()}}));function d(t){f(t)&&(t.nativeEvent=!0,n(t))}t.addEventListener("click",d);const p=({nativeEvent:t,data:e})=>{t||(t=e["selection"],a(t,{nativeEvent:!1}))};return s.on("brush:filter",p),()=>{h.destroy(),s.off("brush:filter",p),t.removeEventListener("click",d)}}function I5(t){var{hideX:h=!0,hideY:d=!0}=t,p=rt(t,["hideX","hideY"]);return(t,e,a)=>{const{container:n,view:r,options:o,update:s}=t;t=mw(n);let l=!1,c=!1,u=r;var{scale:i,coordinate:f}=r;return B5(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{var{scale:i,coordinate:a}=u;return Px(t,e,n,r,i,a)},filter:(r,i)=>ue(this,void 0,void 0,function*(){if(!c){c=!0;const[e,n]=r;var t=o["marks"],t=t.map(t=>it({axis:Object.assign(Object.assign({},h&&{x:{transform:[{type:"hide"}]}}),d&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:e},y:{domain:n}}})),t=(a.emit("brush:filter",Object.assign(Object.assign({},i),{data:{selection:[e,n]}})),Object.assign(Object.assign({},o),{marks:t,clip:!0})),t=yield s(t);u=t.view,c=!1,l=!0}}),reset:t=>{var e,n;!c&&l&&(e=r["scale"],{x:e,y:n}=e,e=e.getOptions().domain,n=n.getOptions().domain,a.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[e,n]}})),l=!1,u=r,s(o))},extent:void 0,emitter:a,scale:i,coordinate:f},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),p))}}function F5(t){return I5(Object.assign(Object.assign({hideX:!0},t),{brushRegion:O5}))}function D5(t){return I5(Object.assign(Object.assign({hideY:!0},t),{brushRegion:_5}))}const z5="slider";function W5({wait:y=50,leading:m=!0,trailing:v=!1}){return t=>{const{container:e,view:n,options:s,update:l}=t;t=e.getElementsByClassName(z5);if(!t.length)return()=>{};let c=!1;const{scale:u,coordinate:r}=n;var{x:i,y:a}=u;const f=$c(r),o=new Map,h={x:i.getOptions().domain,y:a.getOptions().domain};for(const p of t){const g=p.attributes["orientation"];var d=un(o=>ue(this,void 0,void 0,function*(){var t,e,n,r,i,a=o.detail["value"];c||(c=!0,[i,t]=(t=g,i="vertical"===t?"y":"x",t="vertical"===t?"x":"y",f?[t,i]:[i,t]),a=function(t,e,n){var[t,r]=t;return Nx(e,[jx(e,(n=n?t=>1-t:t=>t)(t),!0),jx(e,n(r),!1)])}(a,u[i],f&&"horizontal"===g),h[i]=a,e=h[t],n=s,r={[i]:{domain:a},[t]:{domain:e}},i=(i=n["marks"]).map(t=>it({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:r,slider:Object.assign(Object.assign({},t.slider.x&&{x:{preserve:!0}}),t.slider.y&&{y:{preserve:!0}}),animate:!1})),a=Object.assign(Object.assign({},n),{marks:i,clip:!0,animate:!1}),yield l(a),c=!1)}),y,{leading:m,trailing:v});p.addEventListener("valuechange",d),o.set(p,d)}return()=>{for(var[t,e]of o)t.removeEventListener("valuechange",e)}}}const G5={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 H5(t){return"text"===t.nodeName&&!!t.isOverflowing()}function q5(t){var{offsetX:h=8,offsetY:d=8}=t,r=rt(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=at(r,"tip"),f=new Set,e=t=>{var e,n,r,i,a,o=t["target"];H5(o)?({offsetX:e,offsetY:n}=t,e=e+h-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new nt.HTML({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},G5),u),`<${r} style="${Object.entries(a).map(([t,e])=>t.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+e).join(";")}">${i}</${r}>`),x:e,y:n}}),s.appendChild(a),o.tip=a,f.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];H5(e)?e.tip&&(e.tip.remove(),e.tip=null,f.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),f.forEach(t=>t.remove())}}}function V5(n){return(t,...e)=>it({},n(t,...e),t)}function Y5(n){return(t,...e)=>it({},t,n(t,...e))}function $5(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=rt(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const U5=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:o=0,y:s=0,width:l,height:c,data:u}=t;return e.map(t=>{var{data:e,x:n,y:r,width:i,height:a}=t,t=rt(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},t),{data:$5(e,u),x:null!=n?n:o,y:null!=r?r:s,width:null!=i?i:l,height:null!=a?a:c})})},K5=(U5.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=rt(g,["data"]),y=$5(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),X5=(K5.props={},()=>t=>{var e=t["children"],t=rt(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},encode:f={},transform:h=[]}=t,n=rt(t,["data","scale","axis","legend","encode","transform"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={},encode:a={},transform:o=[]}=t,t=rt(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:$5(e,s),scale:it({},l,n),encode:it({},f,a),transform:[...h,...o],axis:!(!r||!c)&&it({},c,r),legend:!(!i||!u)&&it({},u,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),Z5=(X5.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinate:b,theme:x,component:w,interaction:M,x:O,y:k,key:_,frame:E,title:S,labelTransform:A,parentKey:L,clip:T,viewStyle:j}=t,t=rt(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelTransform","parentKey","clip","viewStyle"]);return[{type:"standardView",x:O,y:k,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinate:b,component:w,interaction:M,frame:E,title:S,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,parentKey:L,clip:T,style:j,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),Q5=(Z5.props={},V5(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=vc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),J5=V5(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:it({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:it({title:i},o)}}}),tM=V5(()=>({animate:{enterType:"fadeIn"}})),eM=Y5(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),nM=Y5(()=>({type:"cell"})),rM=Y5(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),iM=Y5((t,c=function(t){t=t.points;return b0(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?aM(a,e):(t=e.length?void 0:null,it({title:r===i-1&&void 0,grid:t},a))}},M=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?aM(r,e):(n=e.length?void 0:null,it({title:0===t&&void 0,grid:n},r))}},O={})=>{const{data:e,encode:n,children:u,scale:r,x:k=0,y:_=0,shareData:f=!1,key:E}=t,S=e["value"],{x:A,y:L}=n;t=r.color;const T=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=u0(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[L]:e}=t,t=void 0===A||t===n,e=void 0===L||e===r;return t&&e}).map(t=>S.filter(t)),v=f?Cc(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:L,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=rt(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:L?5:void 0}},r=r?g:0===g.length?[]:S,l={color:{domain:T}},o={x:oM(o,w)(p,r),y:oM(a,M)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+k,y:f+m+_,parentKey:E,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:it(s,e,l),axis:it({},i,o),legend:!1},t),O)})})}}});function aM(t,e){return e.length?it({title:!1,tick:null,label:null},t):it({title:!1,tick:null,label:null,grid:null},t)}function oM(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const sM=()=>t=>{return[zx.of(t).call(nM).call(J5).call(tM).call(Q5).call(eM).call(rM).call(iM).value()]},lM=(sM.props={},V5(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),cM=Y5(t=>{const{data:w,children:c,x:M=0,y:O=0,key:k}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=u0(t);const s=t.map(({points:t})=>b0(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=rt(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return aM(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return aM(n,e)})(y,w)};return Object.assign({data:w,parentKey:k,key:i+"-"+c,x:u+m+M,y:f+v+O,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:it({x:{facet:!1},y:{facet:!1}},e),axis:it({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:it({},a,{x:p,y:g})},t)})})}}}),uM=Y5(t=>{var e=t["encode"],t=rt(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=rt(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const fM=()=>t=>{return[zx.of(t).call(nM).call(J5).call(cM).call(uM).call(tM).call(eM).call(lM).value()]},hM=V5(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),dM=V5(t=>({coordinate:{type:"polar"}})),pM=t=>{var e=t["encode"],t=rt(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function gM(t){return t=>null}function yM(t){var t=t["points"],[t,e,n,r]=t,i=g0(t,r),t=p0(t,r),r=v0(t,p0(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=m0(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const mM=()=>t=>{return[zx.of(t).call(nM).call(pM).call(J5).call(dM).call(rM).call(iM,yM,gM,gM,{frame:!1}).call(tM).call(eM).call(hM).value()]};const vM=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=it({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function bM(t,e){if(null!==t)return{type:"column",value:t,field:e}}function xM(t,e){t=bM(t,e);return Object.assign(Object.assign({},t),{inferred:!0})}function wM(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function MM(t,e){var n=[];for(const r of t)n[r]=e;return n}function R(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function OM(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=R(t,i);if(null!==n)return[n,r]}return[null,null]}function kM(t){return!(t instanceof Date)&&"object"==typeof t}vM.props={};const _M=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,it({},e,{encode:{y1:xM(MM(t,0))}})]};function EM(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=R(r,t))?void 0:t[0]]}).filter(([,t])=>Gu(t));return Array.from(vc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function SM(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:ic(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>CM(t=>r(e[t]))):"series"===t?TM:"value"===t?jM:"sum"===t?NM:"maxIndex"===t?PM:()=>null}function AM(t,e){for(const n of t)n.sort(e)}function LM(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function TM(t,e,n){return CM(t=>n[t])}function jM(t,e,n){return CM(t=>e[t])}function NM(t,n,e){t=u0(t),t=Array.from(vc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return CM(t=>r.get(e[t]))}function PM(t,n,e){t=u0(t),t=Array.from(vc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Rc(e,t=>n[t])]));return CM(t=>r.get(e[t]))}function CM(n){return(t,e)=>ic(n(t),n(e))}_M.props={};const RM=(t={})=>{const{groupBy:L="x",orderBy:T=null,reverse:j=!1,y:N="y",y1:P="y1",series:C=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=R(r,"y"),[s,l]=R(r,"y1"),[r]=C?OM(r,"series","color"):R(r,"color"),c=EM(L,t,e),n=SM(T)(n,a,r),u=(n&&AM(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){j&&_.reverse();var g=s?+s[_[0]]:0,y=[],m=[];for(const E of _){var v=h[E]=+a[E]-g;v<0?m.push(E):0<=v&&y.push(E)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const S of m.reverse()){var w=h[S];n=u[S]=(f[S]=n)+w}let r=g;for(const A of y){var M=h[A];0<M?r=u[A]=(f[A]=r)+M:u[A]=f[A]=r}}const O=new Set(d),k=new Set(p);r="y"===N?u:f,n="y"===P?u:f;return[t,it({},e,{encode:{y0:xM(a,o),y:bM(r,o),y1:bM(n,l)},style:Object.assign({first:(t,e)=>O.has(e),last:(t,e)=>k.has(e)},i)})]}};function BM(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}RM.props={};const IM=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(BM)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",RM({groupBy:r})(t,e,n))},FM=(IM.props={},(t={})=>{const{channel:s="x"}=t;return(t,e)=>{const n=e["encode"];var r=e["tooltip"];if($u(r))return[t,e];r=r.title;if(void 0!==r)return[t,e];var i=Object.keys(n).filter(t=>t.startsWith(s)).filter(t=>!n[t].inferred).map(t=>R(n,t)).filter(([t])=>t).map(t=>t[0]);if(0===i.length)return[t,e];var a=[];for(const o of t)a[o]={value:i.map(t=>t[o]).join(", ")};return[t,it({},e,{tooltip:{title:a}})]}}),DM=(FM.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,it({},e,{encode:{x:xM(MM(t,0))},scale:{x:{guide:null}}})]}),zM=(DM.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,it({},e,{encode:{y:xM(MM(t,0))},scale:{y:{guide:null}}})]}),WM=(zM.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,it({},e,{encode:{size:wM(MM(t,3))}})]}),GM=(WM.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=rt(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,it({},e,{encode:{key:bM(r)}})]}),HM=(GM.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=R(n,"color"),[t,it({},e,{encode:{series:bM(r,i)}})])}),qM=(HM.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(kM)?[t,e]:[t,it({},e,{encode:{y:bM(n)}})]}),VM=(qM.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(kM)?[t,e]:[t,it({},e,{encode:{x:bM(n)}})]}),YM=(VM.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=R(n,"y"),[t,it({},e,{encode:{y1:bM([...r])}})])}),$M=(YM.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=R(n,"x"),[t,it({},e,{encode:{x1:bM([...r])}})])}),UM=($M.props={},t=>{const i=t["channel"];return(t,e)=>{const{encode:a,tooltip:n}=e;var r;return $u(n)||({items:r=[]}=n,!r)||0<r.length?[t,e]:(r=(Array.isArray(i)?i:[i]).flatMap(e=>Object.keys(a).filter(t=>t.startsWith(e)).map(t=>{var{field:e,value:n,inferred:r=!1,aggregate:i}=a[t];return r?null:i&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t)),[t,it({},e,{tooltip:{items:r}})])}}),KM=(UM.props={},()=>(t,e)=>[t,it({scale:{x:{padding:0},y:{padding:0}}},e)]),XM=(KM.props={},()=>(t,e)=>{var{style:n={}}=e,r=rt(e,["data","style"]),{x:i,y:a}=n,n=rt(n,["x","y"]);return null==i||null==a?[t,e]:[[0],it({},r,{data:[0],cartesian:!0,encode:{x:bM([i||0]),y:bM([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),ZM=(XM.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,it({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),QM=(ZM.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(kM)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,it({},e,{encode:{x:bM(n),y:bM(r)}})])}),JM=(QM.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,it({},e,{encode:{series:wM(MM(t,void 0))}})]:[t,e]}),tO=(JM.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return rt(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=R(r,"y"),[r]=OM(r,"series","color"),o=LM(r,i),i=EM(c,t,e),n=SM(f)(n,a,r),s=(n&&AM(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,it({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:bM(s)}})]}}),eO=(tO.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,R(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(vc(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=R(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[MM(n,r)]:OM(e,"enterDuration",MM(n,r));var[l]=OM(e,"enterDelay",MM(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=Cc(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,it({},t,{encode:{enterDuration:wM(s),enterDelay:wM(c)}})]}});eO.props={};const nO=(t={})=>{const{groupBy:p="x",basis:g="max"}=t;return(e,t)=>{const{encode:n,tooltip:r}=t;var i=rt(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=EM(p,e,t),l="function"==typeof(h=g)?h:{min:(t,e)=>Bc(t,t=>e[+t]),max:(t,e)=>Cc(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>Gc(t,t=>e[+t]),median:(t,e)=>Hc(t,t=>e[+t]),sum:(t,e)=>Yc(t,t=>e[+t]),deviation:(t,e)=>hc(t,t=>e[+t])}[h]||Cc;for(const e of i){var c=l(e,o);for(const d of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[d]=+u[d]/c}}var h=$u(r)||(null==r?void 0:r.items)&&0!==(null==r?void 0:r.items.length);return[e,it({},t,Object.assign({encode:Object.fromEntries(s.map(([t,e])=>[t,bM(e,R(n,t)[1])]))},!h&&n.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function rO(t,e,n){return null===t?[-.5,.5]:(t=LM(t,e),[-(e=new _p({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function iO(t,e,n){return e*(1-t)+n*t}nO.props={};const aO=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=R(n,"x"),[n]=R(n,"y");const o=rO(a,r,l),s=rO(n,i,c);a=t.map(()=>iO(u(),...s)),r=t.map(()=>iO(u(),...o));return[t,it({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:bM(a),dx:bM(r)}})]}},oO=(aO.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=R(n,"x");const i=rO(n,r,a);n=t.map(()=>iO(o(),...i));return[t,it({scale:{x:{padding:.5}}},e,{encode:{dx:bM(n)}})]}}),sO=(oO.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=rt(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=EM(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=dc(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,it({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,bM(e,R(n,t)[1])]))})]}}),lO=(sO.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=R(n,"y");var[,i]=R(n,"y1"),n=(f?OM(n,"series","color"):R(n,"color"),EM(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,it({},e,{encode:{y1:bM(a,i)}})]}});function cO(t,e){return[t[0]]}function uO(t,e){return[t[t.length-1]]}function fO(t,e){return[t[Rc(t,t=>e[t])]]}function hO(t,e){return[t[Ic(t,t=>e[t])]]}lO.props={};const dO=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=EM(a,t,e);const[r]=R(n,o),i="function"==typeof(n=s)?n:{first:cO,last:uO,max:fO,min:hO}[n]||cO;return[t.flatMap(t=>i(t,r)),e]}},pO=(dO.props={},(t={})=>{var e=t["selector"],t=rt(t,["selector"]);return dO(Object.assign({channel:"x",selector:e},t))}),gO=(pO.props={},(t={})=>{var e=t["selector"],t=rt(t,["selector"]);return dO(Object.assign({channel:"y",selector:e},t))});function yO(e){return t=>null===t?e:e+" of "+t}function mO(){return[(t,e)=>Gc(t,t=>+e[t]),yO("mean")]}function vO(){return[(t,e)=>Hc(t,t=>+e[t]),yO("median")]}function bO(){return[(t,e)=>Cc(t,t=>+e[t]),yO("max")]}function xO(){return[(t,e)=>Bc(t,t=>+e[t]),yO("min")]}function wO(){return[(t,e)=>t.length,yO("count")]}function MO(){return[(t,e)=>Yc(t,t=>+e[t]),yO("sum")]}function OO(){return[(t,e)=>e[t[0]],yO("first")]}function kO(){return[(t,e)=>e[t[t.length-1]],yO("last")]}gO.props={};const _O=(t={})=>{const i=t["groupBy"],a=rt(t,["groupBy"]);return(t,e)=>{const{data:s,encode:l}=e,c=i(t,e);if(!c)return[t,e];var t=Object.entries(a).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:mO,max:bO,count:wO,first:OO,last:kO,sum:MO,min:xO,median:vO}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=R(l,t);e=e;var e=(o=a)||((e=e["from"])?([,e]=R(l,e),e):o),o=c.map(t=>n(t,null!==i&&void 0!==i?i:s));return[t,Object.assign(Object.assign({},(t=o,o=(null==r?void 0:r(e))||e,t=bM(t,o),Object.assign(Object.assign({},t),{constant:!1}))),{aggregate:!0})]}),n=Object.keys(l).map(t=>{const[e,n]=R(l,t);return[t,bM(c.map(t=>e[t[0]]),n)]}),r=c.map(t=>s[t[0]]);return[u0(c),it({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},EO=(_O.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=rt(t,["channels"]);return _O(Object.assign(Object.assign({},e),{groupBy:(t,e)=>EM(n,t,e)}))}),SO=(EO.props={},(t={})=>EO(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),AO=(SO.props={},(t={})=>EO(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),LO=(AO.props={},(t={})=>EO(Object.assign(Object.assign({},t),{channels:["color"]})));function TO(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=rt(n,["reverse","slice","channel"]),{encode:o,scale:s={}}=e,s=null==(s=s[a])?void 0:s.domain;const[l]=R(o,a);var c,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=R(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>Cc(t,t=>+a[t]);if("min"===i)return t=>Bc(t,t=>+a[t]);if("sum"===i)return t=>Yc(t,t=>+a[t]);if("median"===i)return t=>Hc(t,t=>+a[t]);if("mean"===i)return t=>Gc(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),o=function(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(t=>r.has(e[t]))}(t,l,s),n=(s=o,o=t=>l[t],(2!==(c=n).length?Mc(bc(s,c,o),([t,e],[n,r])=>ic(e,r)||ic(t,n)):Mc(vc(s,o),([t,e],[n,r])=>c(e,r)||ic(t,n))).map(([t])=>t)),s=(r&&n.reverse(),"number"==typeof i?[0,i]:i),o=i?n.slice(...s):n;return[t,it(e,{scale:{[a]:{domain:o}}})]}LO.props={};const jO=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=rt(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return TO(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=R(i,r);return i=Mc(t,t=>a[t]),n&&i.reverse(),[i,e]}}},NO=(jO.props={},(t={})=>jO(Object.assign(Object.assign({},t),{channel:"x"}))),PO=(NO.props={},(t={})=>jO(Object.assign(Object.assign({},t),{channel:"color"}))),CO=(PO.props={},(t={})=>jO(Object.assign(Object.assign({},t),{channel:"y"})));CO.props={};const RO=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=R(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):R(r,s)[0],r=xc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>Yc(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,it({},e,{scale:{x:{flex:r}}})]}};function BO(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=b0(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}RO.props={};const IO=()=>(t,e)=>[t,it({},e,{modifier:BO,axis:!1})],FO=(IO.props={},"thresholds");function DO(t){var e,[n,r]=dc(t);return Math.min(200,(n=n,r=r,e=fc(t=t),t=hc(t),e&&t?Math.ceil((r-n)*Math.cbrt(e)/(3.49*t)):1))}const zO=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=rt(t,["groupChannels","binChannels"]),u={};return _O(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(FO)))),Object.fromEntries(l.flatMap(e=>{var t=([t])=>+u[e].get(t).split(",")[1];return[[t.from=e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",t]]}))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=R(n,t);return t}),a=at(c,FO),o=t.filter(e=>i.every(t=>Gu(t[e]))),r=[...s.map(t=>{var[t]=R(n,t);return t}).filter(Gu).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||DO(n),e=Pc().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(vc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},WO=(zO.props={},(t={})=>{var e=t["thresholds"];return zO(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function GO(e,n,r,t){var a=e.length;if(a<=t||0===t)return e;var o,s=t=>+n[e[t]],l=t=>+r[e[t]],c=[],u=(a-2)/(t-2);let f=0,h,d;c.push(f);for(let i=0;i<t-2;i++){let t=0,e=0,n=Math.floor((i+1)*u)+1;for(var p=Math.floor((i+2)*u)+1,g=(p=Math.min(p,a))-n;n<p;n++)t+=s(n),e+=l(n);t/=g,e/=g;let r=Math.floor((i+0)*u)+1;var y=Math.floor((i+1)*u)+1,m=[s(f),l(f)];for(h=-1;r<y;r++)(o=.5*Math.abs((m[0]-t)*(s(r)-m[1])-(m[0]-l(r))*(e-m[0])))>h&&(h=o,d=r);c.push(d),f=d}return c.push(a-1),c.map(t=>e[t])}function HO(t){if("function"==typeof t)return t;if("lttb"===t)return GO;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[Ic(t,t=>n[t])]],max:(t,e,n)=>[t[Rc(t,t=>n[t])]],median:(t,e,n)=>{return[t[Wc(t,.5,t=>n[t])]]}};const i=e[t]||e.median;return(t,e,n,r)=>{return function(t,e){var n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}(t,Math.max(1,Math.floor(t.length/r))).flatMap(t=>i(t,e,n))}}WO.props={};const qO=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=HO(e);return(t,e)=>{var n=e["encode"],t=EM(o,t,e);const[r]=R(n,"x"),[i]=R(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},VO=(qO.props={},(s={})=>(t,e)=>{const{encode:i,data:n}=e,r=Object.entries(s).map(([t,e])=>{const[n]=R(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(Gu);if(0===r.length)return[t,e];const a=t.filter(e=>r.every(t=>t(e))),o=a.map((t,e)=>e);t=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:o.map(t=>e.value[a[t]])})]);return[o,it({},e,{encode:Object.fromEntries(t),data:a.map(t=>n[t])})]});function YO(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function $O(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}VO.props={};const UO=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{dw(t);const i=t.getLocalBounds();n.some(t=>{var e=YO(i),t=YO(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]<r[0]&&n[0]>t[0]&&e[1]<r[1]&&n[1]>t[1]})?hw(t):n.push(t)}),t}};function KO(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const XO=t=>{const{maxIterations:M=10,maxError:O=.1,padding:k=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=KO(),[m,v]=KO();var a,o,s,l,[c,t]=KO(),[u,n]=KO();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,f]=f;y(b,g),v(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<M;t++){i.sort((t,e)=>ic(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(h);var d=c(h),p=m(e),d=p-(g+d);d<k&&(d=(k-d)/2,r=Math.max(r,d),v(h,g-d),v(e,p+d))}}if(r<O)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}};function ZO(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function QO(t,e,n){return.2126*ZO(t)+.7152*ZO(e)+.0722*ZO(n)}function JO(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=QO(t,n,r),n=QO(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function t3(e,t){return t[Rc(t,t=>{return JO(e,"object"==typeof(t=t)?t:nt.parseColor(t))})]}const e3=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;JO(t.parsedStyle.fill,e)<n&&t.attr("fill",t3(e,r))}),t)},n3=t=>(t,e)=>(t.forEach(t=>{dw(t);var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!($O(t,e)&&$O(n,e))}(YO(t.getLocalBounds()),e)||hw(t)}),t);var T=1e-6,r3=1e-12,S=Math.PI,i3=S/2,a3=S/4,o3=2*S,s3=180/S,l3=S/180,c3=Math.abs,u3=Math.atan,f3=Math.atan2,A=Math.cos,h3=Math.ceil,d3=Math.exp,p3=Math.log,g3=Math.pow,j=Math.sin,y3=Math.sign||function(t){return 0<t?1:t<0?-1:0},m3=Math.sqrt,v3=Math.tan;function b3(t){return 1<t?0:t<-1?S:Math.acos(t)}function x3(t){return 1<t?i3:t<-1?-i3:Math.asin(t)}function w3(){}function M3(t,e){t&&k3.hasOwnProperty(t.type)&&k3[t.type](t,e)}var O3={Feature:function(t,e){M3(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)M3(n[r].geometry,e)}},k3={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){_3(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)_3(n[r],e,0)},Polygon:function(t,e){E3(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)E3(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)M3(n[r],e)}};function _3(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function E3(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)_3(t[n],e,1);e.polygonEnd()}function S3(t,e){t&&O3.hasOwnProperty(t.type)?O3[t.type](t,e):M3(t,e)}function A3(t){return[f3(t[1],t[0]),x3(t[2])]}function L3(t){var e=t[0],t=t[1],n=A(t);return[n*A(e),n*j(e),j(t)]}function T3(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function j3(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 N3(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function P3(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function C3(t){var e=m3(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function R3(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function B3(t,e){return c3(t)>S&&(t-=Math.round(t/o3)*o3),[t,e]}function I3(t,e,n){return(t%=o3)?e||n?R3(D3(t),z3(e,n)):D3(t):e||n?z3(e,n):B3}function F3(n){return function(t,e){return c3(t+=n)>S&&(t-=Math.round(t/o3)*o3),[t,e]}}function D3(t){var e=F3(t);return e.invert=F3(-t),e}function z3(t,e){var i=A(t),a=j(t),o=A(e),s=j(e);function n(t,e){var n=A(e),r=A(t)*n,t=j(t)*n,n=j(e),e=n*i+r*a;return[f3(t*o-e*s,r*i-n*a),x3(e*o+t*s)]}return n.invert=function(t,e){var n=A(e),r=A(t)*n,t=j(t)*n,n=j(e),e=n*o-t*s;return[f3(t*o+n*s,r*i+e*a),x3(e*i-r*a)]},n}function W3(t,e){(e=L3(e))[0]-=t,C3(e);t=b3(-e[1]);return((-e[2]<0?-t:t)+o3-T)%o3}function G3(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:w3,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function H3(t,e){return c3(t[0]-e[0])<T&&c3(t[1]-e[1])<T}function q3(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 V3(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(H3(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*T}s.push(n=new q3(r,t,null,!0)),l.push(n.o=new q3(r,null,n,!1)),s.push(n=new q3(i,t,null,!1)),l.push(n.o=new q3(i,null,n,!0))}}),s.length){for(l.sort(e),Y3(s),Y3(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function Y3(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function $3(t){return c3(t[0])<=S?t[0]:y3(t[0])*((c3(t[0])+S)%o3-S)}function U3(y,m,v,b){return function(s){var l,c,u,n=m(s),f=G3(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=qc(c);var t=function(t,e){var n=$3(e),r=e[1],e=j(r),i=[j(n),-A(n),0],a=0,o=0,s=new pc;1===e?r=i3+T:-1===e&&(r=-i3-T);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=$3(h),p=h[1]/2+a3,g=j(p),y=A(p),m=0;m<f;++m,d=b,g=w,y=x,h=v){var v=u[m],b=$3(v),x=v[1]/2+a3,w=j(x),x=A(x),M=b-d,O=0<=M?1:-1,k=O*M,_=S<k,E=g*w;s.add(f3(E*O*j(k),y*x+E*A(k))),a+=_?M+O*o3:M,_^n<=d^n<=b&&(C3(E=j3(L3(h),L3(v))),C3(k=j3(i,E)),(O=(_^0<=M?-1:1)*x3(k[2]))<r||r===O&&(E[0]||E[1]))&&(o+=_^0<=M?1:-1)}return(a<-T||a<T&&s<-r3)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),V3(c,X3,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(K3))}return e}}function K3(t){return 1<t.length}function X3(t,e){return((t=t.x)[0]<0?t[1]-i3-T:i3-t[1])-((e=e.x)[0]<0?e[1]-i3-T:i3-e[1])}B3.invert=B3;var Z3=U3(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?S:-S,l=c3(t-f);c3(l-S)<T?(c.point(f,h=0<(h+e)/2?i3:-i3),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&S<=l&&(c3(f-d)<T&&(f-=d*T),c3(t-s)<T&&(t-=s*T),l=h,i=e,o=j((n=f)-(r=t)),h=c3(o)>T?u3((j(l)*(a=A(i))*j(r)-j(i)*(r=A(l))*j(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*i3,r.point(-S,i),r.point(0,i),r.point(S,i),r.point(S,0),r.point(S,-i),r.point(0,-i),r.point(-S,-i),r.point(-S,0),r.point(-S,i)):c3(t[0]-e[0])>T?(t=t[0]<e[0]?S:-S,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-S,-i3]);function Q3(d){var g=A(d),p=6*l3,f=0<g,h=c3(g)>T;function y(t,e){return A(t)*A(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=j3(L3(t),L3(e)),h=T3(f,f),d=f[0],p=h-d*d;return p?(r=j3(u,f),N3(u=P3(u,g*h/p),P3(f,-g*d/p)),(p=(f=T3(u,h=r))*f-(d=T3(h,h))*(T3(u,u)-1))<0?void 0:(N3(p=P3(h,(-f-(r=m3(p)))/d),u),p=A3(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=c3((s=a-i)-S)<T)&&e<o&&(c=o,o=e,e=c),(l||s<T?l?0<o+e^p[1]<(c3(p[0]-i)<T?o:e):o<=p[1]&&p[1]<=e:S<s^(i<=p[0]&&p[0]<=a))?(N3(c=P3(h,(-f+r)/d),u),[p,A3(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:S-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return U3(y,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?S:-S),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!H3(o,n)&&!H3(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&H3(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=A(r),c=j(r),u=o*a;null==n?(n=r+o*o3,s=r-u/2):(n=W3(l,n),s=W3(l,s),(0<o?n<s:s<n)&&(n+=o*o3));for(var f,h=n;0<o?s<h:h<s;h-=u)f=A3([l,-c*A(h),-c*j(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-S,d-S])}var J3=1e9,tk=-J3;function ek(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function M(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return c3(t[0]-m)<T?0<e?0:3:c3(t[0]-b)<T?0<e?2:1:c3(t[1]-v)<T?0<e?1:0:0<e?3:2}function O(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,g=r,t=G3(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=qc(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),M(null,null,1,r),r.lineEnd()),n&&V3(i,O,t,M,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(tk,Math.min(J3,c)),u=Math.max(tk,Math.min(J3,u))],r=[t=Math.max(tk,Math.min(J3,t)),e=Math.max(tk,Math.min(J3,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function nk(t,e,n){var r=Vc(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function rk(t,e,n){var r=Vc(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function ik(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=nk(s,o,90),f=rk(r,n,v),h=nk(c,l,90),d=rk(a,i,v),e):v},e.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return Vc(h3(a/y)*y,i,y).map(h).concat(Vc(h3(c/m)*m,l,m).map(d)).concat(Vc(h3(r/p)*p,n,p).filter(function(t){return c3(t%y)>T}).map(u)).concat(Vc(h3(s/g)*g,o,g).filter(function(t){return c3(t%m)>T}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v}var ak,ok,sk,lk,ck=t=>t,uk=new pc,fk=new pc,hk={point:w3,lineStart:w3,lineEnd:w3,polygonStart:function(){hk.lineStart=dk,hk.lineEnd=yk},polygonEnd:function(){hk.lineStart=hk.lineEnd=hk.point=w3,uk.add(c3(fk)),fk=new pc},result:function(){var t=uk/2;return uk=new pc,t}};function dk(){hk.point=pk}function pk(t,e){hk.point=gk,ak=sk=t,ok=lk=e}function gk(t,e){fk.add(lk*t-sk*e),sk=t,lk=e}function yk(){gk(ak,ok)}var mk=hk,vk=1/0,bk=vk,xk=-vk,wk=xk;var Mk,Ok,kk,_k,Ek={point:function(t,e){t<vk&&(vk=t);xk<t&&(xk=t);e<bk&&(bk=e);wk<e&&(wk=e)},lineStart:w3,lineEnd:w3,polygonStart:w3,polygonEnd:w3,result:function(){var t=[[vk,bk],[xk,wk]];return xk=wk=-(bk=vk=1/0),t}},Sk=0,Ak=0,Lk=0,Tk=0,jk=0,Nk=0,Pk=0,Ck=0,Rk=0,Bk={point:Ik,lineStart:Fk,lineEnd:Wk,polygonStart:function(){Bk.lineStart=Gk,Bk.lineEnd=Hk},polygonEnd:function(){Bk.point=Ik,Bk.lineStart=Fk,Bk.lineEnd=Wk},result:function(){var t=Rk?[Pk/Rk,Ck/Rk]:Nk?[Tk/Nk,jk/Nk]:Lk?[Sk/Lk,Ak/Lk]:[NaN,NaN];return Sk=Ak=Lk=Tk=jk=Nk=Pk=Ck=Rk=0,t}};function Ik(t,e){Sk+=t,Ak+=e,++Lk}function Fk(){Bk.point=Dk}function Dk(t,e){Bk.point=zk,Ik(kk=t,_k=e)}function zk(t,e){var n=t-kk,r=e-_k,n=m3(n*n+r*r);Tk+=n*(kk+t)/2,jk+=n*(_k+e)/2,Nk+=n,Ik(kk=t,_k=e)}function Wk(){Bk.point=Ik}function Gk(){Bk.point=qk}function Hk(){Vk(Mk,Ok)}function qk(t,e){Bk.point=Vk,Ik(Mk=kk=t,Ok=_k=e)}function Vk(t,e){var n=t-kk,r=e-_k,n=m3(n*n+r*r);Tk+=n*(kk+t)/2,jk+=n*(_k+e)/2,Nk+=n,Pk+=(n=_k*t-kk*e)*(kk+t),Ck+=n*(_k+e),Rk+=3*n,Ik(kk=t,_k=e)}var Yk=Bk;function $k(t){this._context=t}$k.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(){0===this._line&&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,o3)}},result:w3};var Uk,Kk,Xk,Zk,Qk,Jk=new pc,t4={point:w3,lineStart:function(){t4.point=e4},lineEnd:function(){Uk&&n4(Kk,Xk),t4.point=w3},polygonStart:function(){Uk=!0},polygonEnd:function(){Uk=null},result:function(){var t=+Jk;return Jk=new pc,t}};function e4(t,e){t4.point=n4,Kk=Zk=t,Xk=Qk=e}function n4(t,e){Zk-=t,Qk-=e,Jk.add(m3(Zk*Zk+Qk*Qk)),Zk=t,Qk=e}var r4=t4;let i4,a4,o4,s4;class l4{constructor(t){this._append=null==t?c4:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return c4;if(e!==i4){const r=10**e;i4=e,a4=function(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}return a4}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:var n,r;this._append`M${t},${e}`,this._radius===o4&&this._append===a4||(n=this._radius,r=this._,this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,o4=n,a4=this._append,s4=this._,this._=r),this._+=s4}}result(){var t=this._;return this._="",t.length?t:null}}function c4(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function u4(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),S3(t,a(o))),o.result()}return s.area=function(t){return S3(t,a(mk)),mk.result()},s.measure=function(t){return S3(t,a(r4)),r4.result()},s.bounds=function(t){return S3(t,a(Ek)),Ek.result()},s.centroid=function(t){return S3(t,a(Yk)),Yk.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,ck):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new l4(r)):new $k(n=t),"function"!=typeof i&&o.pointRadius(i),s):n},s.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(o.pointRadius(+t),+t),s):i},s.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return null===n&&(o=new l4(r)),s},s.projection(e).digits(r).context(n)}function f4(r){return function(t){var e,n=new h4;for(e in r)n[e]=r[e];return n.stream=t,n}}function h4(){}function d4(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),S3(n,t.stream(Ek)),e(Ek.result()),null!=r&&t.clipExtent(r),t}function p4(i,a,t){return d4(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function g4(t,e,n){return p4(t,[[0,0],e],n)}function y4(r,i,t){return d4(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function m4(i,a,t){return d4(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}h4.prototype={constructor:h4,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()}};var v4=16,b4=A(30*l3);function x4(t,e){return+e?(S=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=S(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=L3([t,e]),e=S(t,e);L(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],v4,r),r.point(u,f)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){L(u,f,c,h,d,p,i,a,n,o,s,l,v4,r),g.lineEnd=m,m()}return g}):(n=t,f4({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,S,A;function L(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,m,v,b,x,w,M,O,k=o-t,_=s-e,E=k*k+_*_;4*A<E&&h--&&(y=a+f,x=x3(y/=m=m3((p=r+c)*p+(g=i+u)*g+y*y)),v=c3(c3(y)-1)<T||c3(n-l)<T?(n+l)/2:f3(g,p),b=(x=S(v,x))[0],x=x[1],A<(O=_*(w=b-t)-k*(M=x-e))*O/E||.3<c3((k*w+_*M)/E-.5)||r*c+i*u+a*f<b4)&&(L(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,h,d),d.point(b,x),L(b,x,v,p,g,y,o,s,l,c,u,f,h,d))}}var w4=f4({point:function(t,e){this.stream.point(t*l3,e*l3)}});function M4(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,m;return e?(f=A(e),e=j(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function O4(t){return k4(function(){return t})()}function k4(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,M=null,O=Z3,k=null,_=ck,E=.5;function S(t){return l(t[0]*l3,t[1]*l3)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*s3,t[1]*s3]}function L(){var t=M4(f,0,0,x,w,b).apply(null,e(p,g)),t=M4(f,h-t[0],d-t[1],x,w,b);return r=I3(y,m,v),s=R3(e,t),l=R3(r,s),o=x4(s,E),T()}function T(){return c=u=null,S}return S.stream=function(t){return c&&u===t?c:c=w4((n=r,f4({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(O(o(_(u=t))))));var n},S.preclip=function(t){return arguments.length?(O=t,M=void 0,T()):O},S.postclip=function(t){return arguments.length?(_=t,k=n=i=a=null,T()):_},S.clipAngle=function(t){return arguments.length?(O=+t?Q3(M=t*l3):(M=null,Z3),T()):M*s3},S.clipExtent=function(t){return arguments.length?(_=null==t?(k=n=i=a=null,ck):ek(k=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),T()):null==k?null:[[k,n],[i,a]]},S.scale=function(t){return arguments.length?(f=+t,L()):f},S.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],L()):[h,d]},S.center=function(t){return arguments.length?(p=t[0]%360*l3,g=t[1]%360*l3,L()):[p*s3,g*s3]},S.rotate=function(t){return arguments.length?(y=t[0]%360*l3,m=t[1]%360*l3,v=2<t.length?t[2]%360*l3:0,L()):[y*s3,m*s3,v*s3]},S.angle=function(t){return arguments.length?(b=t%360*l3,L()):b*s3},S.reflectX=function(t){return arguments.length?(x=t?-1:1,L()):x<0},S.reflectY=function(t){return arguments.length?(w=t?-1:1,L()):w<0},S.precision=function(t){return arguments.length?(o=x4(s,E=t*t),T()):m3(E)},S.fitExtent=function(t,e){return p4(S,t,e)},S.fitSize=function(t,e){return g4(S,t,e)},S.fitWidth=function(t,e){return y4(S,t,e)},S.fitHeight=function(t,e){return m4(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,L()}}function _4(t){var e=0,n=S/3,r=k4(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*l3,n=t[1]*l3):[e*s3,n*s3]},t}function E4(t,e){var n,r,i,a=j(t),o=(a+j(e))/2;return c3(o)<T?(n=A(t),s.invert=function(t,e){return[t/n,x3(e*n)]},s):(i=m3(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=f3(t,c3(e))*y3(e);return e*o<0&&(n-=S*y3(t)*y3(e)),[n/o,x3((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,j(e)/n]}function l(t,e){e=m3(r-2*o*j(e))/o;return[e*j(t*=o),i-e*A(t)]}}function S4(){return _4(E4).scale(155.424).center([0,33.6442])}function A4(){return S4().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function L4(i){return function(t,e){var n=A(t),r=A(e),n=i(n*r);return n===1/0?[2,0]:[n*r*j(t),n*j(e)]}}function T4(a){return function(t,e){var n=m3(t*t+e*e),r=a(n),i=j(r),r=A(r);return[f3(t*i,n*r),x3(n&&e*i/n)]}}var j4=L4(function(t){return m3(2/(1+t))});j4.invert=T4(function(t){return 2*x3(t/2)});var N4=L4(function(t){return(t=b3(t))&&t/j(t)});function P4(t,e){return[t,p3(v3((i3+e)/2))]}function C4(r){var i,a,o,s=O4(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=S*l(),n=s((e=I3((e=s.rotate())[0]*l3,e[1]*l3,2<e.length?e[2]*l3:0),function(t){return(t=e.invert(t[0]*l3,t[1]*l3))[0]*=s3,t[1]*=s3,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===P4?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function R4(t){return v3((i3+t)/2)}function B4(t,e){var n=A(t),i=t===e?j(t):p3(n/A(e))/p3(R4(e)/R4(t)),a=n*g3(R4(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=y3(i)*m3(t*t+e*e),r=f3(t,c3(e))*y3(e);return e*i<0&&(r-=S*y3(t)*y3(e)),[r/i,2*u3(g3(a/n,1/i))-i3]},r):P4;function r(t,e){0<a?e<-i3+T&&(e=-i3+T):i3-T<e&&(e=i3-T);e=a/g3(R4(e),i);return[e*j(i*t),a-e*A(i*t)]}}function I4(t,e){return[t,e]}function F4(t,e){var n=A(t),r=t===e?j(t):(n-A(e))/(e-t),i=n/r+t;return c3(r)<T?I4:(a.invert=function(t,e){var e=i-e,n=f3(t,c3(e))*y3(e);return e*r<0&&(n-=S*y3(t)*y3(e)),[n/r,i-y3(r)*m3(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*j(t),i-e*A(t)]}}N4.invert=T4(function(t){return t}),P4.invert=function(t,e){return[t,2*u3(d3(e))-i3]},I4.invert=I4;var D4=1.340264,z4=-.081106,W4=893e-6,G4=.003796,H4=m3(3)/2;function q4(t,e){var e=x3(H4*j(e)),n=e*e,r=n*n*n;return[t*A(e)/(H4*(D4+3*z4*n+r*(7*W4+9*G4*n))),e*(D4+z4*n+r*(W4+G4*n))]}function V4(t,e){var n=A(e),r=A(t)*n;return[n*j(t)/r,j(e)/r]}function Y4(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function $4(t,e){return[A(e)*j(t),j(e)]}function U4(t,e){var n=A(e),r=1+A(t)*n;return[n*j(t)/r,j(e)/r]}function K4(t,e){return[p3(v3((i3+e)/2)),-t]}q4.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(D4+z4*i+a*(W4+G4*i))-e)/(D4+3*z4*i+a*(7*W4+9*G4*i)))*r)*i*i,!(c3(n)<r3));++o);return[H4*t*(D4+3*z4*i+a*(7*W4+9*G4*i))/A(r),x3(j(r)/H4)]},V4.invert=T4(u3),Y4.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),c3(a)>T&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},$4.invert=T4(x3),U4.invert=T4(function(t){return 2*u3(t)}),K4.invert=function(t,e){return[-e,2*u3(d3(t))-i3]};var X4=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=A4(),l=S4().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=S4().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+T,r+.12*e+T],[n-.214*e-T,r+.234*e-T]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+T,r+.166*e+T],[n-.115*e-T,r+.234*e-T]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return p4(f,t,e)},f.fitSize=function(t,e){return g4(f,t,e)},f.fitWidth=function(t,e){return y4(f,t,e)},f.fitHeight=function(t,e){return m4(f,t,e)},f.scale(1070)},geoAlbers:A4,geoAzimuthalEqualArea:function(){return O4(j4).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:j4,geoAzimuthalEquidistant:function(){return O4(N4).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:N4,geoConicConformal:function(){return _4(B4).scale(109.5).parallels([30,30])},geoConicConformalRaw:B4,geoConicEqualArea:S4,geoConicEqualAreaRaw:E4,geoConicEquidistant:function(){return _4(F4).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:F4,geoEqualEarth:function(){return O4(q4).scale(177.158)},geoEqualEarthRaw:q4,geoEquirectangular:function(){return O4(I4).scale(152.63)},geoEquirectangularRaw:I4,geoGnomonic:function(){return O4(V4).scale(144.049).clipAngle(60)},geoGnomonicRaw:V4,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,m=f4({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=ck;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,ck):ek(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=j(d=t%360*l3),r=A(d),b()):d*s3},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return p4(x,t,e)},x.fitSize=function(t,e){return g4(x,t,e)},x.fitWidth=function(t,e){return y4(x,t,e)},x.fitHeight=function(t,e){return m4(x,t,e)},x},geoProjection:O4,geoProjectionMutator:k4,geoMercator:function(){return C4(P4).scale(961/o3)},geoMercatorRaw:P4,geoNaturalEarth1:function(){return O4(Y4).scale(175.295)},geoNaturalEarth1Raw:Y4,geoOrthographic:function(){return O4($4).scale(249.5).clipAngle(90+T)},geoOrthographicRaw:$4,geoStereographic:function(){return O4(U4).scale(250).clipAngle(142)},geoStereographicRaw:U4,geoTransverseMercator:function(){var t=C4(K4),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:K4});function Z4(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function Q4(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(t6),e.find(t=>t.sphere)?{type:"Sphere"}:Z4(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=u4(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function J4(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[ik()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function t6(t){return"geoPath"===t.type}Do=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=rt(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Qe(t);if(e=X4[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(J4);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(Q4(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=u4(i);const u=new Ip({domain:[t,t+n]}),f=new Ip({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{var e,n,r;return t6(t)?({style:n,tooltip:r={}}=e=t,Object.assign(Object.assign({},e),{type:"path",tooltip:Ku(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>g(t)||[]})})):t})})]},Do.props={},r=()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=rt(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]};r.props={};const e6={"composition.geoView":Do,"composition.geoPath":r};function n6(){return Object.assign({"data.fetch":xh,"data.inline":Sh,"data.sortBy":Eh,"data.sort":Oh,"data.filter":Mh,"data.pick":kh,"data.rename":_h,"data.fold":wh,"data.slice":nd,"data.custom":Ah,"data.map":Lh,"data.cluster":ah,"data.tree":oh,"data.sankey":Iu,"data.arc":Ph,"data.wordCloud":Jh,"data.join":ed,"data.kde":cd,"transform.maybeZeroY1":_M,"transform.maybeZeroX":DM,"transform.maybeStackY":IM,"transform.maybeTitle":FM,"transform.maybeSeries":HM,"transform.maybeZeroPadding":KM,"transform.stackY":RM,"transform.binX":WO,"transform.bin":zO,"transform.dodgeX":tO,"transform.jitter":aO,"transform.jitterX":oO,"transform.symmetryY":sO,"transform.diffY":lO,"transform.stackEnter":eO,"transform.normalizeY":nO,"transform.select":dO,"transform.selectX":pO,"transform.selectY":gO,"transform.groupX":SO,"transform.groupY":AO,"transform.groupColor":LO,"transform.group":EO,"transform.maybeSize":WM,"transform.maybeZeroY":zM,"transform.maybeKey":GM,"transform.sortX":NO,"transform.sortY":CO,"transform.sortColor":PO,"transform.flexX":RO,"transform.maybeTupleY":qM,"transform.maybeTupleX":VM,"transform.maybeIdentityY":YM,"transform.maybeIdentityX":$M,"transform.maybeTuple":QM,"transform.maybeVisualPosition":XM,"transform.maybeFunctionAttribute":ZM,"transform.maybeGradient":JM,"transform.maybeTooltip":UM,"transform.pack":IO,"transform.sample":qO,"transform.filter":VO,"coordinate.cartesian":Ss,"coordinate.polar":Ls,"coordinate.helix":Ts,"coordinate.transpose":js,"coordinate.theta":Ns,"coordinate.parallel":Rs,"coordinate.fisheye":Bs,"coordinate.radial":Cs,"coordinate.radar":Is,"encode.constant":Fs,"encode.field":zs,"encode.transform":Ds,"encode.column":Ws,"mark.interval":nc,"mark.rect":rc,"mark.line":iu,"mark.point":au,"mark.text":ou,"mark.cell":su,"mark.area":lu,"mark.link":cu,"mark.image":uu,"mark.polygon":fu,"mark.box":hu,"mark.vector":du,"mark.lineX":gu,"mark.lineY":pu,"mark.connector":yu,"mark.range":bu,"mark.rangeX":xu,"mark.rangeY":wu,"mark.sankey":Qu,"mark.path":Ju,"mark.treemap":rf,"mark.pack":af,"mark.boxplot":pf,"mark.shape":gf,"mark.forceGraph":rh,"mark.gauge":j0,"mark.tree":sh,"mark.wordCloud":ud,"mark.density":N0,"palette.category10":P0,"palette.category20":C0,"scale.linear":B0,"scale.ordinal":I0,"scale.band":R0,"scale.identity":F0,"scale.point":D0,"scale.time":z0,"scale.log":W0,"scale.pow":G0,"scale.sqrt":Y0,"scale.threshold":H0,"scale.quantile":q0,"scale.quantize":V0,"scale.sequential":$0,"scale.constant":U0,"shape.interval.rect":Z1,"shape.interval.hollow":Q1,"shape.interval.funnel":J1,"shape.interval.pyramid":eg,"shape.rect.rect":Z1,"shape.rect.hollow":Q1,"shape.cell.cell":Z1,"shape.cell.hollow":Q1,"shape.line.line":ag,"shape.line.hv":sg,"shape.line.vh":lg,"shape.line.hvh":cg,"shape.line.smooth":og,"shape.point.bowtie":hg,"shape.point.cross":dg,"shape.point.diamond":pg,"shape.point.hexagon":gg,"shape.point.hollowBowtie":yg,"shape.point.hollowDiamond":mg,"shape.point.hollowHexagon":vg,"shape.point.hollow":bg,"shape.point.hollowSquare":xg,"shape.point.hollowTriangle":wg,"shape.point.hollowTriangleDown":Mg,"shape.point.hyphen":Og,"shape.point.line":kg,"shape.point.plus":_g,"shape.point.point":Eg,"shape.point.square":Sg,"shape.point.tick":Ag,"shape.point.triangle":Lg,"shape.point.triangleDown":Tg,"shape.text.text":Vb,"shape.area.area":Xb,"shape.area.smooth":Zb,"shape.area.hvh":Qb,"shape.area.vh":Jb,"shape.area.hv":t2,"shape.link.smooth":n2,"shape.link.vhv":r2,"shape.link.arc":i2,"shape.link.link":e2,"shape.image.image":a2,"shape.polygon.polygon":o2,"shape.polygon.ribbon":s2,"shape.box.box":l2,"shape.box.violin":c2,"shape.vector.vector":jg,"shape.label.label":S2,"shape.text.badge":$b,"shape.lineX.line":u2,"shape.lineY.line":u2,"shape.shape.shape":N2,"shape.connector.connector":d2,"shape.range.range":Z1,"shape.rangeX.range":Z1,"shape.rangeY.range":Z1,"shape.path.path":L2,"shape.path.hollow":T2,"shape.density.density":j2,"theme.classic":P2,"theme.classicDark":C2,"theme.academy":B2,"component.axisX":fx,"component.axisY":hx,"component.axisRadar":dx,"component.axisLinear":cx,"component.axisArc":ux,"component.legendCategory":mx,"component.legendContinuous":Ox,"component.legendContinuousBlock":kx,"component.legendContinuousBlockSize":Ex,"component.legendContinuousSize":_x,"component.title":Lx,"component.sliderX":Rx,"component.sliderY":Bx,"component.scrollbarX":Fx,"component.scrollbarY":Dx,"animation.scaleInX":Vx,"animation.scaleOutX":Yx,"animation.scaleInY":$x,"animation.scaleOutY":Ux,"animation.waveIn":iw,"animation.fadeIn":Kx,"animation.fadeOut":Xx,"animation.zoomIn":aw,"animation.zoomOut":ow,"animation.pathIn":sw,"animation.morphing":rw,"animation.growInX":lw,"animation.growInY":cw,"interaction.elementHighlight":jw,"interaction.elementHighlightByX":Nw,"interaction.elementHighlightByColor":Pw,"interaction.elementSelect":Rw,"interaction.elementSelectByX":Bw,"interaction.elementSelectByColor":Iw,"interaction.fisheye":Dw,"interaction.chartIndex":Fw,"interaction.tooltip":i5,"interaction.legendFilter":g5,"interaction.legendHighlight":y5,"interaction.brushHighlight":M5,"interaction.brushXHighlight":k5,"interaction.brushYHighlight":E5,"interaction.brushAxisHighlight":R5,"interaction.brushFilter":I5,"interaction.brushXFilter":F5,"interaction.brushYFilter":D5,"interaction.sliderFilter":W5,"interaction.poptip":q5,"interaction.event":Gw,"composition.spaceLayer":U5,"composition.spaceFlex":K5,"composition.mark":Z5,"composition.view":X5,"composition.facetRect":sM,"composition.repeatMatrix":fM,"composition.facetCircle":mM,"composition.timingKeyframe":vM,"labelTransform.overlapHide":UO,"labelTransform.overlapDodgeY":XO,"labelTransform.overflowHide":n3,"labelTransform.contrastReverse":e3},e6)}const r6=[["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"]]]]];function i6(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function a6(t,e,n,r,i){var a=t[0],t=t[1],o=Q();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function o6(t,e,n,r,i){var a=new Ip({range:[e,e+r]}),o=new Ip({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function s6(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function l6(t,e,n,r,i){return t[0]}function c6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Ip({range:[s,t]}),c=new Ip({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=i6(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function u6(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function f6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return m6.apply(void 0,v6([[-1,-1]],e,!1))}function h6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return m6.apply(void 0,v6([[-1,1]],e,!1))}function d6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return m6.apply(void 0,v6([[1,-1]],e,!1))}function p6(t,e,n,r,i){var a,t=t[0],o=Q();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function g6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Ip({range:[s,s+.99*l]}),f=new Ip({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=i6(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function y6(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Ip({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Fp({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var m6=function(t,e,n,r,i){var a=t[0],t=t[1],o=Q();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},v6=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function b6(t){return 1/Math.tan(t)}function x6(t,e,n,r,i){var a=b6(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function w6(t,e,n,r,i){var a=b6(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function M6(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function O6(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function k6(t,e,n){return n?new Ip({range:[0,1],domain:[0,e]}).map(t):t}function _6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=k6(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[M6(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[O6(e,s,o,0,1),t]}}}function E6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=k6(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],M6(t[1],s,o,0,1)]},untransform:function(t){return[t[0],O6(t[1],s,o,0,1)]}}}function S6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=k6(a,r,t=void 0!==t&&t),u=k6(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[M6(e,c,s,0,1),M6(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[O6(e,c,s,0,1),O6(t,u,l,0,1)]}}}function A6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Ip({range:[0,r]}),u=new Ip({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=M6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=O6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var L6=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},T6=(j6.prototype.update=function(t){this.options=zd({},this.options,t),this.recoordinate()},j6.prototype.clone=function(){return new j6(this.options)},j6.prototype.getOptions=function(){return this.options},j6.prototype.clear=function(){this.update({transformations:[]})},j6.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},j6.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},j6.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:L6(L6([],n,!0),[L6([],t,!0)],!1)}),this},j6.prototype.map=function(t){return this.output(t)},j6.prototype.invert=function(t){return this.input(t)},j6.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},j6.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?L6([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(L6([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Wd,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):Wd}.apply(void 0,a)},j6.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=Q();return e&&t.reverse(),t.forEach(function(t){return J(p,p,t)}),e&&(e=t=p,(d=new Z(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},j6);function j6(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:o6,translate:a6,custom:s6,matrix:l6,polar:c6,transpose:u6,scale:m6,"shear.x":x6,"shear.y":w6,reflect:f6,"reflect.x":h6,"reflect.y":d6,rotate:p6,helix:g6,parallel:y6,fisheye:S6,"fisheye.x":_6,"fisheye.y":E6,"fisheye.circular":A6},this.update(t)}function N6(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||zu("Unknown Component: "+t)};return[t=>{var e=t["type"],t=rt(t,["type"]);return r(e)(Object.assign({},t))},r]}function P6(t,e){var{coordinate:n={}}=t,t=rt(t,["coordinate"]),{type:r,transform:i=[]}=n,n=rt(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=N6("coordinate",e),{transform:e=!1}=e(r).props||{};if(e)throw new Error(`Unknown coordinate: ${r}.`);return Object.assign(Object.assign({},t),{coordinates:[Object.assign({type:r},n),...i]})}function C6(t,e){return t.filter(t=>t.type===e)}function R6(t){return 0<C6(t,"polar").length}function B6(t){return C6(t,"transpose").length%2==1}function I6(t){return 0<C6(t,"theta").length}function F6(t){return 0<C6(t,"radial").length}function h(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}i=h("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),go=h("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),jo=h("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),fo=h("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),co=h("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),es=h("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),rs=h("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),n=h("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),hs=h("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),os=h("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function D6(t,e,n){(t.prototype=e.prototype=n).constructor=t}function z6(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function W6(){}var G6=1/.7,is="\\s*([+-]?\\d+)\\s*",e="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",H6=/^#([0-9a-f]{3,8})$/,q6=new RegExp(`^rgb\\(${is},${is},${is}\\)$`),V6=new RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),Y6=new RegExp(`^rgba\\(${is},${is},${is},${e}\\)$`),$6=new RegExp(`^rgba\\(${Mo},${Mo},${Mo},${e}\\)$`),U6=new RegExp(`^hsl\\(${e},${Mo},${Mo}\\)$`),K6=new RegExp(`^hsla\\(${e},${Mo},${Mo},${e}\\)$`),X6={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};function Z6(){return this.rgb().formatHex()}function Q6(){return this.rgb().formatRgb()}function J6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=H6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?t_(e):3===n?new i_(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?e_(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?e_(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=q6.exec(t))?new i_(e[1],e[2],e[3],1):(e=V6.exec(t))?new i_(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Y6.exec(t))?e_(e[1],e[2],e[3],e[4]):(e=$6.exec(t))?e_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=U6.exec(t))?u_(e[1],e[2]/100,e[3]/100,1):(e=K6.exec(t))?u_(e[1],e[2]/100,e[3]/100,e[4]):X6.hasOwnProperty(t)?t_(X6[t]):"transparent"===t?new i_(NaN,NaN,NaN,0):null}function t_(t){return new i_(t>>16&255,t>>8&255,255&t,1)}function e_(t,e,n,r){return new i_(t=r<=0?e=n=NaN:t,e,n,r)}function n_(t){return(t=t instanceof W6?t:J6(t))?new i_((t=t.rgb()).r,t.g,t.b,t.opacity):new i_}function r_(t,e,n,r){return 1===arguments.length?n_(t):new i_(t,e,n,null==r?1:r)}function i_(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function a_(){return"#"+c_(this.r)+c_(this.g)+c_(this.b)}function o_(){var t=s_(this.opacity);return(1===t?"rgb(":"rgba(")+l_(this.r)+`, ${l_(this.g)}, `+l_(this.b)+(1===t?")":`, ${t})`)}function s_(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function l_(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function c_(t){return((t=l_(t))<16?"0":"")+t.toString(16)}function u_(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new h_(t,e,n,r)}function f_(t){var e,n,r,i,a,o,s,l;return t instanceof h_?new h_(t.h,t.s,t.l,t.opacity):(t=t instanceof W6?t:J6(t))?t instanceof h_?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new h_(o,s,l,t.opacity)):new h_}function h_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function d_(t){return(t=(t||0)%360)<0?t+360:t}function p_(t){return Math.max(0,Math.min(1,t||0))}function g_(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}D6(W6,J6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Z6,formatHex:Z6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return f_(this).formatHsl()},formatRgb:Q6,toString:Q6}),D6(i_,r_,z6(W6,{brighter(t){return t=null==t?G6:Math.pow(G6,t),new i_(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new i_(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new i_(l_(this.r),l_(this.g),l_(this.b),s_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:a_,formatHex:a_,formatHex8:function(){return"#"+c_(this.r)+c_(this.g)+c_(this.b)+c_(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:o_,toString:o_})),D6(h_,function(t,e,n,r){return 1===arguments.length?f_(t):new h_(t,e,n,null==r?1:r)},z6(W6,{brighter(t){return t=null==t?G6:Math.pow(G6,t),new h_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new h_(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new i_(g_(240<=t?t-240:120+t,n,e),g_(t,n,e),g_(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new h_(d_(this.h),p_(this.s),p_(this.l),s_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=s_(this.opacity);return(1===t?"hsl(":"hsla(")+d_(this.h)+`, ${100*p_(this.s)}%, ${100*p_(this.l)}%`+(1===t?")":`, ${t})`)}}));const y_=Math.PI/180,m_=180/Math.PI;var v_=1.78277,b_=-.29227,x_=-.90649,w_=1.97294,M_=w_*x_,O_=w_*v_,k_=v_*b_- -.14861*x_;function __(t,e,n,r){return 1===arguments.length?(i=t)instanceof E_?new E_(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof i_?i:n_(i)).r/255,o=i.g/255,l=i.b/255,l=(w_*(o-(a=(k_*l+M_*a-O_*o)/(k_+M_-O_)))-b_*(o=l-a))/x_,new E_((l=(s=Math.sqrt(l*l+o*o)/(w_*a*(1-a)))?Math.atan2(l,o)*m_-120:NaN)<0?l+360:l,s,a,i.opacity)):new E_(t,e,n,null==r?1:r);var i,a,o,s,l}function E_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}D6(E_,__,z6(W6,{brighter(t){return t=null==t?G6:Math.pow(G6,t),new E_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new E_(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*y_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new i_(255*(e+n*(-.14861*r+v_*t)),255*(e+n*(b_*r+x_*t)),255*(e+w_*r*n),this.opacity)}}));var S_=t=>()=>t;function A_(e,n){return function(t){return e+t*n}}function L_(a){return 1==(a=+a)?T_:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):S_(isNaN(t)?e:t);var n,r,i}}function T_(t,e){var n=e-t;return n?A_(t,n):S_(isNaN(t)?e:t)}!function t(e){var o=L_(e);function n(e,t){var n=o((e=r_(e)).r,(t=r_(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=T_(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);j_=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var j_,N_=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=r_(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=j_(r),i=j_(i),a=j_(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function P_(s){return function t(o){function e(e,t){var n=s((e=__(e)).h,(t=__(t)).h),r=T_(e.s,t.s),i=T_(e.l,t.l),a=T_(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}P_(function(t,e){var n=e-t;return n?A_(t,180<n||n<-180?n-360*Math.round(n/360):n):S_(isNaN(t)?e:t)});var ko=P_(T_),a=t=>N_(t[t.length-1]),po=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h),uo=a(po),cs=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h),Po=a(cs),yo=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h),ms=a(yo),as=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h),Bl=a(as),ug=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h),Oo=a(ug),_o=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h),So=a(_o),Ao=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h),ho=a(Ao),Eo=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h),ns=a(Eo),o=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h),ss=a(o),Do=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h),r=a(Do),is=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h),Mo=a(is),e=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h),C_=a(e),R_=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h),B_=a(R_),I_=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h),F_=a(I_),D_=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h),z_=a(D_),W_=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h),G_=a(W_),H_=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h),q_=a(H_),V_=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h),Y_=a(V_),$_=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h),U_=a($_),K_=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h),X_=a(K_),Z_=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h),Q_=a(Z_),J_=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h),tE=a(J_),eE=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h),nE=a(eE),rE=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h),iE=a(rE),aE=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h),oE=a(aE),sE=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h),lE=a(sE),cE=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h),a=a(cE);var uE=ko(__(300,.5,0),__(-240,.5,1)),fE=ko(__(-100,.75,.35),__(80,1.5,.8)),ko=ko(__(260,.75,.35),__(80,1.5,.8)),hE=__();var dE=r_(),pE=Math.PI/3,gE=2*Math.PI/3;function yE(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var mE=yE(h("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),vE=yE(h("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),bE=yE(h("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xE=yE(h("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),wE=Object.freeze({__proto__:null,schemeCategory10:i,schemeAccent:go,schemeDark2:jo,schemePaired:fo,schemePastel1:co,schemePastel2:es,schemeSet1:rs,schemeSet2:n,schemeSet3:hs,schemeTableau10:os,interpolateBrBG:uo,schemeBrBG:po,interpolatePRGn:Po,schemePRGn:cs,interpolatePiYG:ms,schemePiYG:yo,interpolatePuOr:Bl,schemePuOr:as,interpolateRdBu:Oo,schemeRdBu:ug,interpolateRdGy:So,schemeRdGy:_o,interpolateRdYlBu:ho,schemeRdYlBu:Ao,interpolateRdYlGn:ns,schemeRdYlGn:Eo,interpolateSpectral:ss,schemeSpectral:o,interpolateBuGn:r,schemeBuGn:Do,interpolateBuPu:Mo,schemeBuPu:is,interpolateGnBu:C_,schemeGnBu:e,interpolateOrRd:B_,schemeOrRd:R_,interpolatePuBuGn:F_,schemePuBuGn:I_,interpolatePuBu:z_,schemePuBu:D_,interpolatePuRd:G_,schemePuRd:W_,interpolateRdPu:q_,schemeRdPu:H_,interpolateYlGnBu:Y_,schemeYlGnBu:V_,interpolateYlGn:U_,schemeYlGn:$_,interpolateYlOrBr:X_,schemeYlOrBr:K_,interpolateYlOrRd:Q_,schemeYlOrRd:Z_,interpolateBlues:tE,schemeBlues:J_,interpolateGreens:nE,schemeGreens:eE,interpolateGreys:iE,schemeGreys:rE,interpolatePurples:oE,schemePurples:aE,interpolateReds:lE,schemeReds:sE,interpolateOranges:a,schemeOranges:cE,interpolateCividis:function(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-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:uE,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return hE.h=360*t-100,hE.s=1.5-1.5*e,hE.l=.8-.9*e,hE+""},interpolateWarm:fE,interpolateCool:ko,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,dE.r=255*(e=Math.sin(t))*e,dE.g=255*(e=Math.sin(t+pE))*e,dE.b=255*(e=Math.sin(t+gE))*e,dE+""},interpolateTurbo:function(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-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:mE,interpolateMagma:vE,interpolateInferno:bE,interpolatePlasma:xE});function ME(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return PE(t,Yu)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?AE(t):void 0===r?jE(e)?AE(t):NE(e)?"time":LE(t,i):jE([r])?AE(t):NE(e)?"time":LE(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)Gu(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[null!=a?a:o,null!=i?i:s];case"band":case"ordinal":case"point":return TE(e);case"quantile":return function(t){return TE(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)Gu(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[null!=a?a:o,null!=i?i:s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=dp,nice:n=!1,tickCount:r=5}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:I6(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Qe(e),i=wE["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":var u=SE(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],f0(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return SE(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function OE(t,e){var[e]=N6("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[Fu,Fu];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(n);return n(e(t))}function kE(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(_E)?dc(e):t.every(EE)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function _E(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function EE(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function SE(t,e,n,r,i){var[i]=N6("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=Qe(t),i=wE["scheme"+e],a=wE["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function AE(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function LE(t,e){return"color"!==t||e?"linear":"sequential"}function TE(t){return Array.from(new Set(t.flat()))}function jE(t){return PE(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function NE(t){return PE(t,t=>t instanceof Date)}function PE(t,e){for(const n of t)if(n.some(e))return!0;return!1}const CE={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},RE={threshold:"threshold",quantize:"quantize",quantile:"quantile"},BE={ordinal:"ordinal",band:"band",point:"point"},IE={constant:"constant"};function FE(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=N6("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=N6("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?B6(i)?t+"Y":t+"X":"y"===e?B6(i)?t+"X":t+"Y":null;if(r&&e)return i=o(e)["props"],{defaultPosition:t,defaultSize:i,defaultOrder:a}=i,Object.assign(Object.assign({position:t,size:i,order:a,type:e},r),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{var{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);const y=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,y.push(Object.assign({type:"title",position:n,orientation:e,order:t,size:a},"string"==typeof i?{title:i}:i))),function(t,e){t=t.filter(t=>{return!!((t=t)&&t.type&&("function"==typeof t.type||({type:t,domain:n,range:r,interpolator:e}=t,n=n&&0<n.length,r=r&&0<r.length,["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(t)&&n&&r)||["sequential"].includes(t)&&n&&(r||e)||["constant","identity"].includes(t)&&r));var e,n,r});return[...function(t){const e=t.filter(t=>"string"!=typeof t.type||["shape","size","color","opacity"].includes(t.name)).filter(t=>!("constant"===t.type&&"size"===t.name)),n=e.filter(t=>!t.field),r=e.filter(t=>!!t.field),i=new Map(Array.from(vc(r,t=>t.field)).map(([t,e])=>[t,[...e,...n.filter(t=>"constant"===t.type)]]).concat([[void 0,n]]).filter(([,t])=>t.some(t=>"constant"!==t.type)));if(0===i.size)return[];t=Array.from(i).map(([,t])=>{var e,n,r=function(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...d0(e,t));return n}(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>{return[t.name,"string"!=typeof(t=(t=t).type)?null:t in CE?"continuous":t in BE?"discrete":t in RE?"distribution":t in IE?"constant":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of r6)for(const{option:a,combination:o}of r)if(n.some(t=>ln(i(t),i(a))))return[e,o];return null}).filter(Gu);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0<C6(n,"helix").length||I6(n))&&(!B6(n)||!R6(n)&&!F6(n))){if(e.startsWith("x"))return R6(n)?["axisArc",[t]]:F6(n)?["axisLinear",[t]]:[B6(n)?"axisY":"axisX",[t]];if(e.startsWith("y"))return R6(n)?["axisLinear",[t]]:F6(n)?["axisArc",[t]]:[B6(n)?"axisX":"axisY",[t]];if(e.startsWith("position")){if(0<C6(n,"radar").length)return["axisRadar",[t]];if(!R6(n))return["axisY",[t]]}}return null}).filter(Gu)}(t,e)]}(g,d).forEach(([t,e])=>{var n=p(t)["props"],{defaultPosition:r,defaultOrientation:i,defaultSize:a,defaultOrder:o}=n,{guide:n,field:s}=Object.assign({},...e);for(const h of Array.isArray(n)?n:[n]){var l,c,[u,f]=function(t,e,n,r,i,a,o){var[s]=zE(o),e=[r.position||e,null!=s?s:n];if("string"==typeof t&&t.startsWith("axis"))return function(t,e,n,r,i){n=n[0].name;{var a,o;if("axisRadar"===t)return r=r.filter(t=>t.name.startsWith("position")),a=WE(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=zE(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0<C6(t,"parallel").length}(i))return null===(s=WE(n))?e:B6(i)?0===s?["top",null]:["center","horizontal"]:0===s?e:["center","vertical"]}if("axisLinear"===t)return[r]=zE(i),["center",r];if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(R6(i))return["center",null];if(F6(i))return["center",null];if("axisX"===t&&function(t){return 0<C6(t,"reflect").length}(i)||"axisX"===t&&function(t){return 0<C6(t,"reflectY").length}(i))return["top",null];return e}(t,e,i,a,o);if("string"==typeof t&&t.startsWith("legend")&&R6(o)&&"center"===r.position)return["center","vertical"];return e}(t,r,i,h,e,g,d);(u||f)&&({size:l=a,order:c=o}=h,y.push(Object.assign(Object.assign({title:s},h),{position:u,orientation:f,order:c,size:l,type:t,scales:e})))}}),y}function DE(t,e,n,r,i){var[a]=N6("component",r),{scales:o=[],bbox:s}=t,t=rt(t,["scales","bbox"]),l=o.map(t=>OE(t,r)),s={bbox:s,scales:o,library:r};return a(t)({coordinate:e,library:r,markState:i,scales:l,theme:n,value:s})}function zE(t){var e,n=C6(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=As(n),[n,e]):(n=C6(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=Ps(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function WE(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function GE(t,e,n,r,i,a){var[a]=N6("scale",a),o=t["type"];if("string"==typeof o&&o.startsWith("axis")&&["left","right","bottom","top"].includes(r)){t.transform=t.transform||[{type:"hide"}];var{labelFormatter:o,scales:s,title:l,tickCount:c,tickMethod:u,tickFilter:f}=t;const p="left"===r||"right"===r;var r=function(t,e,n){var{axis:n,["axis"+Du(e)]:e}=n;return it({},n,e,t.style)}(t,r,i),{tickLength:i=0,labelSpacing:h=0,titleSpacing:d=0}=r,r=rt(r,["tickLength","labelSpacing","titleSpacing"]),[s]=s,c=(void 0!==c&&(s.tickCount=c),void 0!==u&&(s.tickMethod=u),a(s));const g=function(t,e,n){n=HE(t,n),n=n.map(t=>{return"number"==typeof t?(e=t,Math.abs(e)<1e-15?e:parseFloat(e.toFixed(15))):t;var e}),e=e?"string"==typeof e?V2(e):e:t.getFormatter?t.getFormatter():t=>""+t;return n.map(e)}(c,o,f),y=at(r,"label"),m=g.map((n,r)=>{var t=Object.fromEntries(Object.entries(y).map(([t,e])=>[t,"function"==typeof e?e(n,r):e]));return p||(t.transform="none"),qE(n,t)});u=Cc(m,t=>t.width),a=i+h,o=(p?t.size=u+a:!function(t,e,n,r,i){var a=Yc(e,t=>t.width);if(n<a)return 1;const o=t.clone(),s=(o.update({range:[0,n]}),HE(t,i)),l=s.map(t=>o.map(t)+function(t,e){if(!t.getBandWidth)return 0;t=t.getBandWidth(e)/2;return t}(o,t)),c=s.map((t,e)=>e),u=-r[0],f=n+r[1],h=(t,e)=>{e=e.width;return[t-e/2,t+e/2]};for(let t=0;t<c.length;t++){var d=l[t],[d,p]=h(d,e[t]);if(d<u||f<p)return 1;d=l[t+1];if(d){var[d]=h(d,e[t+1]);if(d<p)return 1}}return}(c,m,e,n,f)?(s=Cc(m,t=>t.height),t.size=s+a):(t.size=u+a,t.style=Object.assign(Object.assign({},t.style),{labelTransform:"rotate(90)"})),g.map((t,e)=>e));t.indexBBox=new Map(o.map(t=>[t,[g[t],m[t]]])),!1!==l&&null!=l&&(i=at(r,"title"),h=qE(Array.isArray(l)?l.join(","):l,i),p?t.size+=d+h.width:t.size+=d+h.height)}}function HE(t,e){t=t.getTicks?t.getTicks():t.getOptions().domain;return e?t.filter(e):t}function qE(t,e){t=(t=t)instanceof nt.DisplayObject?t:new nt.Text({style:{text:""+t}}),t.attr(Object.assign(Object.assign({},e),{visibility:"none"})),e=t.getBBox();return e}function VE(t,e,n,r,i,a,o){var s=vc(t,t=>t.position),{padding:t,paddingLeft:i=t,paddingRight:l=t,paddingBottom:c=t,paddingTop:t=t}=i,u={paddingBottom:c,paddingLeft:i,paddingTop:t,paddingRight:l};for(const d of r){var f="padding"+Du(p2(d)),h=u[f];if(void 0===h||"auto"===h)if(s.has(d)){const t=s.get(d);"auto"===h&&t.forEach(t=>GE(t,e,n,d,a,o));h=t.reduce((t,{size:e})=>t+e,0);u[f]=h}else u[f]=30}return u}function YE(t,B,e){var I=vc(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:F,marginLeft:r,marginTop:i,marginBottom:D,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:W}=e,t=t+r,r=n+i,n=e+z,i=F+D,G={top:[t,0,o,r,"vertical",!0,ic],right:[W-n,r,n,a,"horizontal",!1,ic],bottom:[t,s-i,o,i,"vertical",!1,ic],left:[0,r,t,a,"horizontal",!0,ic],"top-left":[t,0,o,r,"vertical",!0,ic],"top-right":[t,0,o,r,"vertical",!0,ic],"bottom-left":[t,s-i,o,i,"vertical",!1,ic],"bottom-right":[t,s-i,o,i,"vertical",!1,ic],center:[t,r,o,a,"center",null,null],inner:[t,r,o,a,"center",null,null],outer:[t,r,o,a,"center",null,null]};for(const[C,t]of I.entries()){var l=G[C],[c,H]=h0(t,t=>"string"==typeof t.type&&("center"===C||!(!t.type.startsWith("axis")||!["inner","outer"].includes(C))));if(c.length){p=d=h=f=u=void 0;var u=c,f=B,h=l,d=C,[u,p]=h0(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(m=y=g=c=void 0,u),g=f,y=h,m=d;if("center"===m)if(!function(t){return Zc(t)&&Uc(t)}(g)){if(Uc(g)){u=void 0;d=void 0;v=void 0;b=void 0;x=void 0;w=void 0;u=c;d=y;var[v,b,x,w]=d;for(const tt of u)tt.bbox={x:v,y:b,width:x,height:w}}else if(Zc(g)){d=void 0;u=void 0;M=void 0;O=void 0;d=c;u=g;var M=y;var O=c[0].orientation;"horizontal"===O?function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(d,u,M):"vertical"===O&&function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(d,u,M)}}else{k=void 0;O=void 0;_=void 0;E=void 0;S=void 0;A=void 0;var k=c;O=y;var[_,E,S,A]=O;for(const R of k)R.bbox={x:_,y:E,width:S,height:A},R.radar={index:k.indexOf(R),count:k.length}}else if("inner"===m){L=void 0;d=void 0;u=void 0;q=void 0;V=void 0;M=void 0;T=void 0;j=void 0;Y=void 0;$=void 0;var L=c;d=g;u=y;var[q,V,,u]=u,[M,T]=d.getCenter(),[d]=tu(d),u=u/2,j=d*u,Y=M-j,$=T-j;for(let t=0;t<L.length;t++)L[t].bbox={x:q+Y,y:V+$,width:2*j,height:2*j}}else if("outer"===m){g=void 0;d=void 0;U=void 0;K=void 0;X=void 0;Z=void 0;g=c;d=y;var[U,K,X,Z]=d;for(const et of g)et.bbox={x:U,y:K,width:X,height:Z}}J=Q=P=y=c=m=T=u=N=void 0;var N=p,u=f,T=h;if(0!==N.length){var[T,m,c,y]=T,[u]=tu(u),P=y/2*u/Math.sqrt(2),Q=T+c/2,J=m+y/2;for(let t=0;t<N.length;t++)N[t].bbox={x:Q-P,y:J-P,width:2*P,height:2*P}}}H.length&&!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]="vertical"===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>null===l||void 0===l?void 0:l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function $E(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=rt(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function UE(t,i,a){return ue(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=N6("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=rt(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ue(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),Fu)}([rt(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?u0(n):[],Object.assign(Object.assign({},i),{data:n})]})}function KE(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function XE(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=c0(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return Gu(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function ZE(t,e,n){var r=e["encode"];return r?(r=c0(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{constant:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function QE(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=N6("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=c0(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function JE(t,e,n){var{tooltip:r={}}=e;return $u(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:Yu(r)&&Xu(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function tS(g,t,e){const{data:y,encode:m,tooltip:n={}}=t;var r,i,a,o;return $u(n)?[g,t]:(r=e=>{if(!e)return e;if("string"==typeof e)return g.map(t=>({name:e,value:y[t][e]}));if(Yu(e)){var{field:t,channel:n,color:r,name:i=t,valueFormatter:a=t=>t}=e,o="string"==typeof a?V2(a):a,s=n&&m[n],a=s&&m[n].field,l=i||a||n,c=[];for(const d of g){var u=t?y[d][t]:s?m[n].value[d]:null;c[d]={name:l,color:r,value:o(u)}}return c}if("function"!=typeof e)return e;var f=[];for(const p of g){var h=e(y[p],p,y,m);Yu(h)?f[p]=h:f[p]={value:h}}return f},{title:o,items:i=[]}=n,a=rt(n,["title","items"]),o=Object.assign({title:r(o),items:Array.isArray(i)?i.map(r):[]},a),[g,Object.assign(Object.assign({},t),{tooltip:o})])}function eS(l,t,e){var n,r=t["encode"],i=rt(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=rt(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function nS(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var l="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return it(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>[t,{guide:s(r,t),slider:s(a,t),scrollbar:s(o,t)}]))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function rS(t,e,n){var r=e["animate"];return r||void 0===r||it(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function iS(l,c,u){return ue(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ue(this,void 0,void 0,function*(){var t=c["library"],[t]=N6("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[$E,UE,KE,XE,ZE,QE,eS,rS,nS,JE,...e.map(t),...r.map(t),...n.map(t),tS];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(l,c,{library:u});const{encode:n,scale:h,data:r,tooltip:i}=e;if(!1===Array.isArray(r))return null;const a=c["channels"],o=xc(Object.entries(n).filter(([,t])=>Gu(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=a.find(t=>t.name===e);return null!=n&&n.independent?t:e});var s=a.filter(t=>{const{name:e,required:n}=t;if(o.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:c,scaleKey:u,range:f}=t;return o.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=e.some(t=>t.constant),a=h[t]||{},{independent:o=!1,key:s=u||t,type:i=i?"constant":r?"identity":c}=a,r=rt(a,["independent","key","type"]),a="constant"===i,l=a?void 0:f;return{name:t,values:e,scaleKey:o||a?Symbol("independent"):s,scale:Object.assign({type:i,range:l},r)}})});return[e,Object.assign(Object.assign({},c),{index:t,channels:s,tooltip:i})]})}function aS(W,G,H,q){var V,Y;return ue(this,void 0,void 0,function*(){const[n]=N6("composition",H);var[t]=N6("interaction",H);const r=new Set(Object.keys(H).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(Gu)),i=t=>{t=t.type;if("function"==typeof t){var{props:e={}}=t,{composite:e=!0}=e;if(e)return"mark"}return"string"==typeof t&&r.has(t)?"mark":t};const a=t=>"standardView"===i(t);var e=t=>{var e;return a(t)?[t]:(e=i(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[W],u=[];c.length;){var f=c.shift();if(a(f)){var h=l.get(f),[h,d]=h?cS(h,f,H):yield sS(f,H),p=(s.set(h,f),o.push(h),d.flatMap(e).map(t=>P6(t,H)));if(c.push(...p),p.every(a)){var g=yield Promise.all(p.map(t=>lS(t,H)));kE(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),kE(h,"y");for(let t=0;t<p.length;t++){var B=p[t],I=g[t];l.set(B,I)}}}else{d="mark"===i(f)?f:yield mS(f,H),h=e(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}q.emitter.emit($.BEFORE_PAINT);const y=new Map,m=new Map,v=[];G.selectAll(wS(U)).data(o,t=>t.key).join(t=>t.append("g").attr("className",U).attr("id",t=>t.key).call(oS).each(function(t){uS(t,et(this),v,H),y.set(t,this)}),t=>t.call(oS).each(function(t){uS(t,et(this),v,H),m.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var b=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(h,d,p){return f=>ue(this,void 0,void 0,function*(){var t,[e,n]=yield sS(f,d),r=(uS(e,h,[],d),h),i=f,a=e,o=p,[s]=N6("interaction",s=d),l=(l=r.node()).nameInteraction,c=yS(i).find(([t])=>"tooltip"===t);(l=l.get("tooltip"))&&(null!=(t=l.destroy)&&t.call(l),c[1])&&(t=s(Object.assign({type:"tooltip"},c[1])),l={options:i,view:a,container:r.node(),update:t=>Promise.resolve(t)},t(l,[],o.emitter));for(const u of n)aS(u,h,d,p);return{options:f,view:e}})}(et(e),H,q)})),x=b(y);for(const T of x){const W=T["options"];var w=new Map;T.container.nameInteraction=w;for(const j of yS(W)){var[M,O]=j;O&&(O=t(Object.assign({type:M},O))(T,x,q.emitter),w.set(M,{destroy:O}))}}var k=b(m);for(const N of k){const{options:W,container:P}=N;var _=P.nameInteraction;for(const C of yS(W)){var[E,S]=C,A=_.get(E);A&&null!=(V=A.destroy)&&V.call(A),S&&(A=t(Object.assign({type:E},S))(N,k,q.emitter),_.set(E,{destroy:A}))}}const{width:F,height:D}=W;var L=[];for(const R of u){var z=new Promise(e=>ue(this,void 0,void 0,function*(){for(const t of R)yield aS(Object.assign({width:F,height:D},t),G,H,q);e()}));L.push(z)}q.views=o,null!=(Y=q.animations)&&Y.forEach(t=>null==t?void 0:t.cancel()),q.animations=v,q.emitter.emit($.AFTER_PAINT);b=v.filter(Gu).map(pS).map(t=>t.finished);return Promise.all([...b,...L])})}function oS(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function sS(e,n){return ue(this,void 0,void 0,function*(){var t=function(t){var{coordinate:e={},interaction:n={},marks:r}=t,t=rt(t,["coordinate","interaction","marks"]),i=r.map(t=>t.coordinate||{}),a=r.map(t=>t.interaction||{}),i=[...i,e].reduceRight((t,e)=>it(t,e),{}),e=[n,...a].reduce((t,e)=>it(t,e),{});return Object.assign(Object.assign({},t),{marks:r,coordinate:i,interaction:e})}(yield function(c,u){return ue(this,void 0,void 0,function*(){var[t,e]=N6("mark",u);const n=c["marks"];for(var r=[],i=[...n];i.length;){var[a]=i.splice(0,1),a=yield mS(a,u);const{type:s=zu("G2Mark type is required."),key:l}=a;var{props:o={}}=e(s),{composite:o=!0}=o;if(o){const n=yield t(a)(c);o=Array.isArray(n)?n:[n];i.unshift(...o.map((t,e)=>Object.assign(Object.assign({},t),{key:l+"-"+e})))}else r.push(a)}return Object.assign(Object.assign({},c),{marks:r})})}(e,n)),t=(e.interaction=t.interaction,e.coordinate=t.coordinate,P6(t,n));return cS(yield lS(t,n),t,n)})}function lS(p,g){return ue(this,void 0,void 0,function*(){var[t]=N6("theme",g),[,e]=N6("mark",g),{theme:n,marks:r,coordinates:i=[]}=p,a=t(gS(n)),o=new Map;for(const f of r){var s,l=f["type"],{props:l={}}=e(l),l=yield iS(f,l,g);l&&([l,s]=l,o.set(l,s))}for(const h of vc(Array.from(o.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var c=h.reduce((t,{scale:e})=>it(t,e),{}),u=h[0]["values"],u=Array.from(new Set(u.map(t=>t.field).filter(Gu)));const p=it({guide:{title:0===u.length?void 0:u},field:u[0]},c);u=h[0]["name"];const d=ME(u,h.flatMap(({values:t})=>t.map(t=>t.value)),p,i,a,g);h.forEach(t=>t.scale=d)}return o})}function cS(t,e,n){var[r]=N6("mark",n),[i]=N6("theme",n),[a]=N6("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:f=[]}=e;var h,d,i=i(gS(l)),p=Array.from(t.values()),g=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),g=FE(function(t,e,n){for(var[r]of n.entries())if("cell"===r.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;n=e[0].defaultShape;if(!["point","line","rect","hollow"].includes(n))return t;e=(null==(e=t.find(t=>"color"===t.name))?void 0:e.field)||null,e={field:e,name:"shape",type:"constant",domain:[],range:[{point:"point",line:"hyphen",rect:"square",hollow:"hollow"}[n]]};return[...t,e]}(Array.from(g),p,t),e,n),y=function(t,e,n,r){var{width:i,height:a,x:o=0,y:s=0,inset:l=0,insetLeft:c=l,insetTop:u=l,insetBottom:f=l,insetRight:l=l,margin:h=0,marginLeft:d=h,marginBottom:p=h,marginTop:g=h,marginRight:h=h,padding:y,paddingBottom:m=y,paddingLeft:v=y,paddingRight:b=y,paddingTop:y=y}=e,x=(t,e,n)=>"auto"===t?Math.min(n,e):e,{paddingLeft:w,paddingRight:M}=VE(t,a,[0,0],["left","right"],e,n,r),v=x(v,w,1/3*(O=i-d-h)),w=x(b,M,1/3*O),{paddingTop:M,paddingBottom:O}=VE(t,b=O-v-w,[v,w],["bottom","top"],e,n,r),e=x(m,O,1/3*(t=a-p-g)),n=x(y,M,1/3*t);return{width:i,height:a,insetLeft:c,insetTop:u,insetBottom:f,insetRight:l,innerWidth:b,innerHeight:t-e-n,paddingLeft:v,paddingRight:w,paddingTop:n,paddingBottom:e,marginLeft:d,marginBottom:p,marginTop:g,marginRight:h,x:o,y:s}}(g,e,i,n),m=function(t,e,n){var[n]=N6("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new T6(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(y,e,n),p=s?it({mainLineWidth:1,mainStroke:"#000"},u):u,v=(YE(g,m,y),{}),b=[];for([h,d]of t.entries()){const{children:M,dataDomain:O,modifier:k,key:_}=h,{index:E,channels:S,tooltip:A}=d;var x=c0(Object.fromEntries(S.map(({name:t,scale:e})=>[t,e])),t=>OE(t,n));Object.assign(v,x);const L=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(S,x),[T,j,N]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>Gu(t)&&Gu(e))&&(r.push(a),i.push(o))}return[r,i]}(r(h)(E,x,L,m));var w=O||T.length;const P=k?k(j,w,y):[],C=t=>{var e;return null==(e=null==(e=A.title)?void 0:e[t])?void 0:e.value},R=e=>A.items.map(t=>t[e]);w=T.map((t,e)=>{var n=Object.assign({points:j[e],transform:P[e],index:t,markKey:_,viewKey:o},A&&{title:C(t),items:R(t)});for(const[r,i]of Object.entries(L))n[r]=i[t],N&&(n["series"+Qe(r)]=N[e].map(t=>i[t]));return N&&(n.seriesIndex=N[e]),N&&A&&(n.seriesItems=N[e].map(t=>R(t)),n.seriesTitle=N[e].map(t=>C(t))),n}),w=(d.data=w,d.index=T,null==M?void 0:M(w,x,y));b.push(...w||[])}return[{layout:y,theme:i,coordinate:m,components:g,markState:t,key:o,clip:c,scale:v,style:p,labelTransform:fS(f.map(a))},b]}function uS(Z,Q,J,tt){ue(this,void 0,void 0,function*(){const{components:B,theme:n,layout:t,markState:r,coordinate:i,key:e,style:I,clip:a}=Z,{width:F,height:D}=t,z=rt(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>Hu(Object.assign({},n,I),t)),W=["a","margin","padding","inset"].map(t=>at(z,t)),c=t=>t.style("x",t=>p[t].x).style("y",t=>p[t].y).style("width",t=>p[t].width).style("height",t=>p[t].height).each(function(t){var e,n,r=et(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,f=0,h=F,d=D;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return u+=t,f+=e,h-=t+r,d-=e+n,{x:u,y:f,width:h,height:d}}),g=(Q.selectAll(wS(ft)).data(s.filter(t=>Gu(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",ft).style("zIndex",-2).call(c),t=>t.call(c),t=>t.remove()),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{enter:r={},update:a={},exit:o={}}=r,{type:s,duration:l=300,delay:c=0}=a,{type:u,duration:f=300,delay:h=0}=r,{type:d,duration:p=300,delay:g=0}=o;for(const _ of i){var{updateType:y=s,updateDuration:m=l,updateDelay:v=c,enterType:b=u,enterDuration:x=f,enterDelay:w=h,exitDuration:M=p,exitDelay:O=g,exitType:k=d}=_;void 0!==y&&!y||(e=Math.max(e,m+v),n=Math.min(n,v)),void 0!==k&&!k||(e=Math.max(e,M+O),n=Math.min(n,O)),void 0!==b&&!b||(e=Math.max(e,x+w),n=Math.min(n,w))}}return e===-1/0?null:[n,e-n]}(r)),y=!!g&&{duration:g[1]};var m,v,b,s=Q.selectAll(wS(ct)).data(B,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",ct).append(t=>DE(it({animate:y},t),i,n,tt,r)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=DE(it({animate:y},t),i,n,tt,r)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();J.push(...s.flat().filter(Gu));const x=Q.selectAll(wS(lt)).data([t],()=>e).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",lt).call(vS).call(xS,Array.from(r.keys())).call(MS,a),t=>t.call(xS,Array.from(r.keys())).call(t=>{if(!g)return vS(t);{const[l,c]=g;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(MS,a)).transitions();J.push(...x.flat());for([m,v]of r.entries()){var G=v["data"];const{key:e,class:H,type:A}=m;var w=Q.select("#"+e);const L=function(s,t,e,n){const[l]=N6("shape",n),c=s["data"],{defaultShape:u,data:r}=t,f=r.map(t=>t.points),{theme:h,coordinate:d}=e,{type:p,style:g={}}=s;return t=>{var{shape:e=u}=g,{shape:e=e,points:n,seriesIndex:r,index:i}=t,t=rt(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:e,mark:p,defaultShape:u,index:i});const a=r?r.map(t=>c[t]):c[i],o=r||i;r=c0(g,t=>hS(t,a,o,c));return l(Object.assign(Object.assign({},r),{type:bS(s,e)}))(n,t,d,h,f)}}(m,v,Z,tt),q=(M=m,b=v,dS("enter",M,b,Z,tt)),T=(M=m,b=v,dS("update",M,b,Z,tt)),V=(M=m,b=v,dS("exit",M,b,Z,tt));var M=function(t,e,n,r){t=t.node().parentElement;return t.findAll(t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node()).flatMap(t=>t.getElementsByClassName(r))}(Q,w,H,"element");const x=w.selectAll(wS(st)).selectFacetAll(M).data(G,t=>t.key,t=>t.groupKey).join(t=>t.append(L).attr("className",st).attr("markType",A).transition(function(t){return q(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,s=c,n.__facet__&&(i=n.parentNode.parentNode,o=r.parentNode,[i,a]=s(i),[s,o]=s(o),i=`translate(${i-s}, ${a-o})`,s=n.style.transform,a="none"===(a=s)||void 0===a?"":s,n.style.transform=(a+" "+i).trimStart(),r.append(n));var n,r,i,a,o=L(t,e),s=T(t,[this],[o]);return null===s&&(this.nodeName===o.nodeName?Wu(this,o):this.parentNode.replaceChild(o,this)),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return V(t,[this])}).remove(),t=>t.append(L).attr("className",st).attr("markType",A).transition(function(t){var e=this["__fromElements__"],t=T(t,e,[this]);return new L0(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new L0([],this.__toData__,this.parentNode).append(L).attr("className",st).attr("markType",A).nodes();return T(t,[this],e)}).remove()).transitions();J.push(...x.flat())}{var O=Z,k=Q,_=tt,E,S;const[Y]=N6("labelTransform",_),{markState:$,labelTransform:j}=O,U=k.select(wS(ot)).node(),N=new Map,P=new Map,K=Array.from($.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=N6("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=rt(t,["formatter","transform","style"]),t=c0(Object.assign(Object.assign({},t),a),t=>hS(t,r,e,l)),{shape:a=c,text:o}=t,t=rt(t,["shape","text"]),i="string"==typeof i?V2(i):i,i=Object.assign(Object.assign({},t),{text:i(o,r,e,l)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,O,_),a=k.select("#"+r).selectAll(wS(st)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=rt(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{N.set(t,i),P.set(t,e)}),t})})}),C=et(U).selectAll(wS(ut)).data(K,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",ut),t=>t.each(function(t){Wu(this,N.get(t)(t))}),t=>t.remove()).nodes(),X=vc(C,t=>P.get(t.__data__)),R=O["coordinate"];for([E,S]of X){var{transform:E=[]}=E;fS(E.map(Y))(S,R)}j&&j(C,R)}})}function fS(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function hS(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function dS(o,t,e,n,r){var[,i]=N6("shape",r);const[s]=N6("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Qe(o)}Animation`;const{[e]:c}=i(bS(t,r)).props,{[o]:u={}}=a,f=(null==(n=t.animate)?void 0:n[o])||{};return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function pS(t){return t.finished.then(()=>{t.cancel()}),t}function gS(t={}){var e;return"string"==typeof t?{type:t}:({type:e="classic"}=t,t=rt(t,["type"]),Object.assign(Object.assign({},t),{type:e}))}function yS(t){var{interaction:t={}}=t;return Object.entries(it({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0},t))}function mS(r,i){return ue(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=rt(r,["data"]);return null==e?r:([,{data:e}]=yield UE(0,{data:e},t),Object.assign({data:e},n))})}function vS(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function bS(t,e){t=t.type;return"string"==typeof e?t+"."+e:e}function xS(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(wS(E)).data(e,t=>t.key).join(t=>t.append("g").attr("className",E).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.remove()),t.select(wS(ot)).node())||t.append("g").attr("className",ot).style("zIndex",0)}function wS(...t){return t.map(t=>"."+t).join("")}function MS(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new nt.Rect({style:{x:e,y:t,width:n,height:r}})):null})}function OS(t){for(var t=it({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=it({},s[t]);s[t]=l,e.set(l,o),n.set(l,t),r.push(l)}}return t}function kS(t,e={},n,r){const{width:i=640,height:a=480,theme:o}=t,s=(o||zu('ChartOptions.theme is required, such as `const chart = new Chart({ theme: "classic"})`.'),OS(t)),{canvas:l=(t=i,f=a,h=new _.Renderer,h.registerPlugin(new ks),new nt.Canvas({width:t,height:f,container:document.createElement("div"),renderer:h})),library:c=n6(),emitter:u=new _s}=e;var f,h;e.canvas=l,e.library=c,e.emitter=u,l.resize(i,a),u.emit($.BEFORE_RENDER);const d=et(l.document.documentElement);return l.ready.then(()=>aS(Object.assign(Object.assign({},s),{width:i,height:a}),d,c,e)).then(()=>{l.requestAnimationFrame(()=>{u.emit($.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),"string"==typeof(t=l.getConfig().container)?document.getElementById(t):t}function _S(t,e={},n=!1){var r,{canvas:e,emitter:i}=e;e&&(null!=(r=(r=e).getRoot().querySelectorAll("."+U))&&r.forEach(t=>{var{nameInteraction:t=new Map}=t;0<(null==t?void 0:t.size)&&Array.from(null==t?void 0:t.values()).forEach(t=>{null!=t&&t.destroy()})}),n?e.destroy():e.destroyChildren()),i.off()}function ES(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function SS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function AS(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length&&"string"!=typeof t?this.attr(r,t):((n=this.attr(r)||{})[t]=1===arguments.length||e,this.attr(r,n))}}function g(r){return t=>{for(const n of r){var e=n["type"];"value"===e?ES(t,n):"array"===e?SS(t,n):"object"===e?AS(t,n):"node"===e?function(t,{name:n,ctor:r}){t.prototype[n]=function(t){var e=this.append(r);return"mark"===n&&(e.type=t),e}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"mix"===e&&function(t,{name:r}){t.prototype[r]=function(t){var e,n;return 0===arguments.length?this.attr(r):Array.isArray(t)?this.attr(r,{items:t}):Yu(t)&&(void 0!==t.title||void 0!==t.items)||null===t||!1===t?this.attr(r,t):({items:n=[]}=e=this.attr(r)||{},n.push(t),e.items=n,this.attr(r,e))}}(t,n)}return t}}function LS(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function TS(t,e){for(var n=[t];n.length;){var r=n.shift(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class jS{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return TS(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return TS(this,t=>{e===t.type&&n.push(t)}),n}getNodeByType(e){let n=null;return TS(this,t=>{n||e===t.type&&(n=t)}),n}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}class NS extends jS{changeData(t){var e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t,e=null==(e=this.getRoot())?void 0:e.getView();if(e)return e=e["markState"],t=Array.from(e.keys()).find(t=>t.key===this.attr("key")),e.get(t)}getScale(){var t=null==(t=this.getRoot())?void 0:t.getView();return!t||null==t?void 0:t.scale}getScaleByChannel(t){var e=null==(e=this.getRoot())?void 0:e.getView();return!e||null==(e=null==e?void 0:e.scale)?void 0:e[t]}getGroup(){var t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}}i=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"object"},{name:"interaction",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"},{name:"scrollbar",type:"object"},{name:"state",type:"object"},{name:"tooltip",type:"mix"}];let PS=class extends NS{constructor(){super({})}},CS=(PS=t([g(i)],PS),class extends NS{constructor(){super({},"interval")}}),RS=(CS=t([g(i)],CS),class extends NS{constructor(){super({},"rect")}}),BS=(RS=t([g(i)],RS),class extends NS{constructor(){super({},"point")}}),IS=(BS=t([g(i)],BS),class extends NS{constructor(){super({},"area")}}),FS=(IS=t([g(i)],IS),class extends NS{constructor(){super({},"line")}}),DS=(FS=t([g(i)],FS),class extends NS{constructor(){super({},"cell")}}),zS=(DS=t([g(i)],DS),class extends NS{constructor(){super({},"vector")}}),WS=(zS=t([g(i)],zS),class extends NS{constructor(){super({},"link")}}),GS=(WS=t([g(i)],WS),class extends NS{constructor(){super({},"polygon")}});GS=t([g(i)],GS);go=t([g(i)],class extends NS{constructor(){super({},"image")}});let HS=class extends NS{constructor(){super({},"text")}},qS=(HS=t([g(i)],HS),class extends NS{constructor(){super({},"box")}}),VS=(qS=t([g(i)],qS),class extends NS{constructor(){super({},"lineX")}}),YS=(VS=t([g(i)],VS),class extends NS{constructor(){super({},"lineY")}}),$S=(YS=t([g(i)],YS),class extends NS{constructor(){super({},"range")}}),US=($S=t([g(i)],$S),class extends NS{constructor(){super({},"rangeX")}}),KS=(US=t([g(i)],US),class extends NS{constructor(){super({},"rangeY")}}),XS=(KS=t([g(i)],KS),class extends NS{constructor(){super({},"connector")}}),ZS=(XS=t([g(i)],XS),class extends NS{constructor(){super({},"shape")}}),QS=(ZS=t([g(i)],ZS),class extends NS{constructor(){super({},"sankey")}}),JS=(QS=t([g([...i,{name:"layout",type:"value"}])],QS),class extends NS{constructor(){super({},"treemap")}}),t8=(JS=t([g([...i,{name:"layout",type:"value"}])],JS),class extends NS{constructor(){super({},"boxplot")}}),e8=(t8=t([g(i)],t8),class extends NS{constructor(){super({},"density")}}),n8=(e8=t([g(i)],e8),class extends NS{constructor(){super({},"pack")}}),r8=(n8=t([g([...i,{name:"layout",type:"value"}])],n8),class extends NS{constructor(){super({},"forceGraph")}}),i8=(r8=t([g([...i,{name:"layout",type:"value"}])],r8),class extends NS{constructor(){super({},"tree")}}),a8=(i8=t([g([...i,{name:"layout",type:"value"}])],i8),class extends NS{constructor(){super({},"wordCloud")}}),o8=(a8=t([g([...i,{name:"layout",type:"object"}])],a8),class extends NS{constructor(){super({},"gauge")}});o8=t([g(i)],o8);const s8={mark:PS,interval:CS,rect:RS,point:BS,area:IS,line:FS,cell:DS,vector:zS,link:WS,polygon:GS,image:go,text:HS,box:qS,lineX:VS,lineY:YS,range:$S,rangeX:US,rangeY:KS,connector:XS,sankey:QS,treemap:JS,boxplot:t8,density:e8,shape:ZS,pack:n8,forceGraph:r8,tree:i8,wordCloud:a8,gauge:o8};class l8 extends jS{changeData(e){var t,n=this.getRoot();if(n)return this.attr("data",e),null!=(t=this.children)&&t.length&&this.children.forEach(t=>{t.attr("data",e)}),null==n?void 0:n.render()}getView(){var t=this.getRoot().getContext()["views"];if(null!=t&&t.length)return t.find(t=>t.key===this._key)}getScale(){var t;return null==(t=this.getView())?void 0:t.scale}getScaleByChannel(t){var e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?void 0:t.theme}getGroup(){var t=this._key;if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&dw(t)}hide(){var t=this.getGroup();t&&t.isVisible()&&hw(t)}}let c8=class extends l8{constructor(t={},e="view"){super(t,e)}},u8=(c8=t([g([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...LS(s8)])],c8),class extends l8{constructor(){super({},"spaceLayer")}}),f8=(u8=t([g([{type:"value",name:"data"},...LS(s8)])],u8),class extends l8{constructor(){super({},"spaceFlex")}}),h8=(f8=t([g([{type:"value",name:"data"},...LS(s8)])],f8),class extends l8{constructor(){super({},"facetRect")}}),d8=(h8=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...LS(s8)])],h8),class extends l8{constructor(){super({},"facetCircle")}}),p8=(d8=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...LS(s8)])],d8),class extends l8{constructor(){super({},"repeatMatrix")}}),g8=(p8=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...LS(s8)])],p8),class extends l8{constructor(){super({},"timingKeyframe")}}),y8=(g8=t([g([...LS(s8)])],g8),class extends l8{constructor(){super({},"geoView")}}),m8=(y8=t([g([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...LS(s8)])],y8),class extends l8{constructor(){super({},"geoPath")}});m8=t([g([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...LS(s8)])],m8);const v8={view:c8,spaceLayer:u8,spaceFlex:f8,facetRect:h8,facetCircle:d8,repeatMatrix:p8,timingKeyframe:g8,geoView:y8,geoPath:m8};for(const S8 of Object.values(v8))g(LS(v8))(S8);const b8=n6();const x8=["width","height","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme"];function w8(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function M8(t,e){var n,r=t["autoFit"];return r?(r=e,e=getComputedStyle(r),n=r.clientWidth||tf(e.width),r=r.clientHeight||tf(e.height),{width:n-(tf(e.paddingLeft)+tf(e.paddingRight)),height:r-(tf(e.paddingTop)+tf(e.paddingBottom))}):({width:n=640,height:r=480}=t,{width:n,height:r})}function O8(t){var t=function(t){if(null!==t.type)return t;var e=t.children[t.children.length-1];for(const n of x8)e.attr(n,t.attr(n));return e}(t),e=[t],n=new Map;for(n.set(t,w8(t));e.length;){const t=e.pop();var r=n.get(t),{children:i=[]}=t;for(const s of i){var a=w8(s),{children:o=[]}=r;o.push(a),e.push(s),n.set(s,a),r.children=o}}return n.get(t)}function k8(t,e){var t=t["type"],{type:t=t}=e;if("view"===t)return e;if("string"!=typeof t)return e;if(t=t,!new Set(Object.keys(s8)).has(t))return e;var n={type:"view"},r=Object.assign({},e);for(const i of x8)void 0!==r[i]&&(n[i]=r[i],delete r[i]);return Object.assign(Object.assign({},n),{children:[r]})}function _8(t){var e=t["type"],t=rt(t,["type","children"]);if("string"==typeof e)return(e=new(function(t){var e=Object.assign(Object.assign({},s8),v8)[t];if(e)return e;throw new Error(`Unknown mark: ${t}.`)}(e))).value=t,e}function E8(t,e){for(var n,r,i=[[null,t,k8(t,e)]];i.length;){var[a,o,s]=i.shift();if(o){n=o,d=void 0,d=(r=s).type,r=rt(r,["type","children"]),n.type===d||void 0===d?n.value=it(n.value,r):"string"==typeof d&&(n.type=d,n.value=r);var l=s["children"],c=o["children"];if(Array.isArray(l)&&Array.isArray(c))for(let t=0;t<l.length;t++){var u=l[t],f=c[t];i.push([o,f,u])}}else{y=g=p=d=h=void 0;var h=a,d=s;if(h)for(var p=[[h,d]];p.length;){const[h,m]=p.shift();var g=_8(m),y=(Array.isArray(h.children)&&h.children.push(g),m)["children"];if(Array.isArray(y))for(const v of y)p.push([g,v])}}}}fo=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"value"},{name:"interaction",type:"object"},{name:"theme",type:"object"},{name:"title",type:"value"},{name:"transform",type:"array"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},{name:"labelTransform",type:"array"},...LS(s8),...(jo=v8,Object.entries(jo).map(([t,e])=>({type:"container",name:t,ctor:e})))];y.Chart=class extends c8{constructor(t){var t=t||{},{container:e,canvas:n,renderer:r,plugins:i}=t;super(rt(t,["container","canvas","renderer","plugins"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._onResize=nn(()=>{this.forceFit()},300),this._renderer=r||new _.Renderer,this._plugins=i||[],this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new _s,this._context={library:b8,emitter:this._emitter,canvas:n}}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;var t=new Promise((t,e)=>kS(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e))),[e,n,r]=function(){let n,r;return[new Promise((t,e)=>{r=t,n=e}),r,n]}();return t.then(n).catch(r).then(()=>this._renderTrailing()),e}options(t){return 0===arguments.length?O8(this):(E8(this,t),this)}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(){this.options();this.emit($.BEFORE_CLEAR),this._reset(),_S(0,this._context,!1),this.emit($.AFTER_CLEAR)}destroy(){var t,e;this.options();this.emit($.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),_S(0,this._context,!0),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit($.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;var{width:t,height:e}=M8(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit($.BEFORE_CHANGE_SIZE);t=this.render();return t.then(()=>{this.emit($.AFTER_CHANGE_SIZE)}),t}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit($.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);t=this.render();return t.then(()=>{this.emit($.AFTER_CHANGE_SIZE)}),t}_reset(){this.type="view",this.value={},this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{var t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)}).catch(t=>{var e=this._trailingReject.bind(this);this._trailingReject=null,e(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(e){return t=>{this._rendering=!1,e(t)}}_computedOptions(){var t=this.options(),{key:e="G2_CHART_KEY"}=t,{width:n,height:r}=M8(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r})}_createCanvas(){var{width:t,height:e}=M8(this.options(),this._container);this._plugins.push(new ks),this._plugins.forEach(t=>this._renderer.registerPlugin(t)),this._context.canvas=new nt.Canvas({container:this._container,width:t,height:e,renderer:this._renderer})}_addToTrailing(){null!=(t=this._trailingResolve)&&t.call(this,this),this._trailing=!0;var t=new Promise((t,e)=>{this._trailingResolve=t,this._trailingReject=e});return t}_bindAutoFit(){var t=this.options()["autoFit"];this._hasBindAutoFit?t||this._unbindAutoFit():t&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}},y.Chart=t([g(fo)],y.Chart),nt.runtime.enableCSSParsing=!1,y.AREA_CLASS_NAME=ft,y.COMPONENT_CLASS_NAME=ct,y.ChartEvent=$,y.CompositionNode=l8,y.ELEMENT_CLASS_NAME=st,y.LABEL_CLASS_NAME=ut,y.LABEL_LAYER_CLASS_NAME=ot,y.MAIN_LAYER_CLASS_NAME=E,y.MarkNode=NS,y.PLOT_CLASS_NAME=lt,y.VIEW_CLASS_NAME=U,y.createLibrary=n6,y.register=function(t,e){Object.assign(b8,{[t]:e})},y.render=kS,y.renderToMountedElement=function(t,e={},n,r){var i,{width:a=640,height:o=480}=t,t=OS(t);const{library:s=n6(),group:l=new nt.Group,emitter:c=new _s}=e;if(null!==l&&void 0!==l&&l.parentElement)return i=et(l),e.group=l,e.library=s,(e.emitter=c).emit($.BEFORE_RENDER),aS(Object.assign(Object.assign({},t),{width:a,height:o}),i,s,e).then(()=>{l.ownerDocument.defaultView.requestAnimationFrame(()=>{c.emit($.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),l;throw new Error("renderToMountedElement can't render chart to unmounted group.")},Object.defineProperty(y,"__esModule",{value:!0})});
|