@gientech/modual 2.3.26 → 2.3.28

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/oprecords.js CHANGED
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/client-D1ogoa79.js","./assets/lodash-Damzdmsp.js"])))=>i.map(i=>d[i]);
2
- import{jsx as gt,jsxs as nn,Fragment as i1}from"react/jsx-runtime";import*as ki from"react";import sn,{Component as pL,Fragment as vL,useRef as Zs,useEffect as qu,forwardRef as $O,createContext as gL,useContext as yL,useMemo as Ku,useState as Qn}from"react";import md from"styled-components";import{Timeline as mL,Avatar as bL,Spin as FO,Row as xL,Col as Eh,Card as Ml,Statistic as kh,DatePicker as wL,Input as OL,Radio as Mh}from"antd";import Qs from"dayjs";import{DashboardContainer as _L}from"@mxmweb/zui";import SL from"axios";import{D as bd,m as xd,g as q0,f as EL,e as Zu,d as kL,l as It,p as ML,x as Tt,a as J,b as tt,k as Et,z as Ja,h as St,c as st,B as qi,C as On,K as H}from"./assets/lodash-Damzdmsp.js";import{c as K0}from"./assets/createLucideIcon-Bj5DlX2s.js";import{S as AL}from"./assets/search-CEuIa9-_.js";/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/client-Drx8xxnE.js","./assets/AntdIcon-Vuhc5UuC.js"])))=>i.map(i=>d[i]);
2
+ import{jsx as gt,jsxs as nn,Fragment as i1}from"react/jsx-runtime";import*as ki from"react";import sn,{Component as pL,Fragment as vL,useRef as Zs,useEffect as qu,forwardRef as $O,createContext as gL,useContext as yL,useMemo as Ku,useState as Qn}from"react";import md from"styled-components";import{Timeline as mL,Avatar as bL,Spin as FO,Row as xL,Col as Eh,Card as Ml,Statistic as kh,DatePicker as wL,Input as OL,Radio as Mh}from"antd";import Qs from"dayjs";import{DashboardContainer as _L}from"@mxmweb/zui";import SL from"axios";import{I as bd,_ as xd,g as q0,b as EL,j as Et,o as Ja,f as St,e as st}from"./assets/AntdIcon-Vuhc5UuC.js";import{c as K0}from"./assets/createLucideIcon-Bj5DlX2s.js";import{d as kL,c as Zu,b as ML,e as It,g as Tt,_ as J,a as tt,i as qi,j as On,m as H}from"./assets/lodash-L-fHanCU.js";import{S as AL}from"./assets/search-CEuIa9-_.js";/**
3
3
  * @license lucide-react v0.456.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
@@ -38,14 +38,14 @@ ${u.map(f=>` ${l(f)}`).join(`,
38
38
  ]`:typeof u=="object"?`{
39
39
  ${Object.entries(u).map(([f,d])=>` ${f}: ${l(d)}`).join(`,
40
40
  `)}
41
- }`:u.toString();return l(c)}catch{return s}},a=s=>{if(!s)return null;const c=Qs(s);return nn("div",{className:"text-gray-500 text-xs",children:[gt("div",{children:c.format("YYYY-MM-DD")}),gt("div",{children:c.format("HH:mm:ss")})]})},o=s=>{var l;return(((l=s.split("/").pop())==null?void 0:l.split("?")[0])||"").replace(/([A-Z])/g," $1").replace(/^./,u=>u.toUpperCase()).trim()};return gt("div",{id:"scrollableDiv",className:"userOperate",style:{height:"calc(100% - 64px)",overflow:"auto",padding:"0 16px"},children:gt(JL,{dataLength:t.length,next:n,hasMore:e,loader:gt("div",{className:"text-center py-4",children:r?gt(FO,{}):null}),scrollableTarget:"scrollableDiv",endMessage:gt("div",{className:"text-center text-gray-500 py-4",children:"\u6CA1\u6709\u66F4\u591A\u6570\u636E\u4E86"}),children:gt(mL,{mode:"left",style:{padding:"0 8px"},items:t.map(s=>({key:s.id,color:s.success?"green":"red",label:a(s.startTime||s.gmtCreated),children:nn("div",{className:"bg-white p-4 rounded-lg shadow-sm mb-4 hover:shadow-md transition-shadow ml-2",children:[gt("div",{className:"flex justify-between items-start mb-3",children:nn("div",{className:"flex items-center",children:[gt(bL,{icon:gt(YL,{...Tu()}),...tN("MEMBER")}),gt("span",{className:"font-medium mr-4",children:s.userName||"\u672A\u77E5\u7528\u6237"}),nn("span",{className:"text-gray-400 flex items-center",children:[gt("div",{...GO("GROUP"),className:"w-6 h-6 flex items-center justify-center mr-1",children:gt(BL,{...Tu(),className:"text-white text-xs"})}),s.ip]})]})}),gt("div",{className:"flex items-center justify-between",children:nn("div",{className:"flex items-center",children:[nn("div",{className:"mr-4 flex items-center",children:[gt("div",{className:"w-6 h-6 flex items-center justify-center",children:gt(BO,{...Tu(),className:" text-xs"})}),gt("span",{className:"font-medium",children:s.name||o(s.url)})]}),nn("div",{className:`flex items-center ${s.success?"text-green-500":"text-red-500"}`,children:[gt("div",{className:"w-6 h-6 flex items-center justify-center rounded-lg",children:s.success===1?gt(RL,{style:{color:s.success===1?"linear-gradient(135deg, #22C55E 0%, #16A34A 100%)":"linear-gradient(135deg, #EF4444 0%, #DC2626 100%)"},className:" text-xs"}):gt(DL,{style:{color:s.success===1?"linear-gradient(135deg, #22C55E 0%, #16A34A 100%)":"linear-gradient(135deg, #EF4444 0%, #DC2626 100%)"},className:" text-xs"})}),gt("span",{children:s.success===1?"\u64CD\u4F5C\u6210\u529F":"\u64CD\u4F5C\u5931\u8D25"})]})]})}),s.params&&nn("div",{className:"mt-3 text-gray-500 text-sm bg-gray-50 p-3 rounded",children:[gt("div",{className:"font-medium mb-2",children:"\u8BF7\u6C42\u53C2\u6570\uFF1A"}),gt("div",{className:"whitespace-pre font-mono text-xs overflow-x-auto bg-white p-2 rounded border border-gray-100",children:i(s.params)})]}),s.url&&nn("div",{className:"mt-2 text-gray-400 text-xs",children:[gt("span",{className:"font-medium",children:"\u8BF7\u6C42\u8DEF\u5F84\uFF1A"}),s.url]})]},s.id)}))})})})},HO=()=>[["cartesian"]];HO.props={};function nN(t,n){return t=t%(2*Math.PI),n=n%(2*Math.PI),t<0&&(t=2*Math.PI+t),n<0&&(n=2*Math.PI+n),t>=n&&(n=n+2*Math.PI),{startAngle:t,endAngle:n}}const VO=(t={})=>{const n={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1},e=Object.assign(Object.assign({},n),t);return Object.assign(Object.assign({},e),nN(e.startAngle,e.endAngle))},Jc=t=>{const{startAngle:n,endAngle:e,innerRadius:r,outerRadius:i}=VO(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",n,e,r,i]]};Jc.props={};const XO=({startAngle:t=0,endAngle:n=Math.PI*6,innerRadius:e=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,n,e,r]];XO.props={};const Z0=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];Z0.props={transform:!0};const rN=(t={})=>{const n={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},n),t)},UO=t=>{const{startAngle:n,endAngle:e,innerRadius:r,outerRadius:i}=rN(t);return[...Z0(),...Jc({startAngle:n,endAngle:e,innerRadius:r,outerRadius:i})]};UO.props={};const qO=(t={})=>{const n={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},n),t)},Q0=t=>{const{startAngle:n,endAngle:e,innerRadius:r,outerRadius:i}=qO(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Jc({startAngle:n,endAngle:e,innerRadius:r,outerRadius:i})]};Q0.props={};const J0=()=>[["parallel",0,1,0,1]];J0.props={};const KO=({focusX:t=0,focusY:n=0,distortionX:e=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,n,e,r,i]];KO.props={transform:!0};const ZO=t=>{const{startAngle:n=-Math.PI/2,endAngle:e=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=t;return[...J0(),...Jc({startAngle:n,endAngle:e,innerRadius:r,outerRadius:i})]};ZO.props={};const QO=({value:t})=>n=>n.map(()=>t);QO.props={};const JO=({value:t})=>n=>n.map(t);JO.props={};const t_=({value:t})=>n=>n.map(e=>e[t]);t_.props={};const e_=({value:t})=>()=>t;e_.props={};var Ba=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},n_=function(t,n){if(!Ba(t))return t;for(var e=[],r=0;r<t.length;r++){var i=t[r];n(i,r)&&e.push(i)}return e};function on(t){return typeof t=="function"}function yt(t){return t==null}function Ge(t){return Array.isArray(t)}const tl=(function(t){var n=typeof t;return t!==null&&n==="object"||n==="function"});function tg(t,n){if(t){var e;if(Ge(t))for(var r=0,i=t.length;r<i&&(e=n(t[r],r),e!==!1);r++);else if(tl(t)){for(var a in t)if(t.hasOwnProperty(a)&&(e=n(t[a],a),e===!1))break}}}var wd=Object.keys?function(t){return Object.keys(t)}:function(t){var n=[];return tg(t,function(e,r){on(t)&&r==="prototype"||n.push(r)}),n};function iN(t,n){var e=wd(n),r=e.length;if(yt(t))return!r;for(var i=0;i<r;i+=1){var a=e[i];if(n[a]!==t[a]||!(a in t))return!1}return!0}var iv=function(t){return typeof t=="object"&&t!==null},aN={}.toString,r_=function(t,n){return aN.call(t)==="[object "+n+"]"},xi=function(t){if(!iv(t)||!r_(t,"Object"))return!1;if(Object.getPrototypeOf(t)===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n};function zo(t,n){if(!Ge(t))return null;var e;if(on(n)&&(e=n),xi(n)&&(e=function(i){return iN(i,n)}),e){for(var r=0;r<t.length;r+=1)if(e(t[r]))return t[r]}return null}var oN=function(t){if(!Ge(t))return[];for(var n=[],e=0;e<t.length;e++)n=n.concat(t[e]);return n};function Ju(t){if(!Array.isArray(t))return-1/0;var n=t.length;if(!n)return-1/0;for(var e=t[0],r=1;r<n;r++)e=Math.max(e,t[r]);return e}const tf=(function(t){if(Ge(t))return t.reduce(function(n,e){return Math.min(n,e)},t[0])});var i_=function(t,n,e){if(!Ge(t)&&!xi(t))return t;var r=e;return tg(t,function(i,a){r=n(r,i,a)}),r};function ge(t){return typeof t=="string"}function sN(t){if(Ba(t))return t[0]}function Hn(t){if(Ba(t)){var n=t;return n[n.length-1]}}var Fe=function(t,n,e){return t<n?n:t>e?e:t};function he(t){return typeof t=="number"}var cN=1e-5;function tc(t,n,e){return e===void 0&&(e=cN),t===n||Math.abs(t-n)<e}const lN=(function(t,n){if(Ge(t)){for(var e,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=on(n)?n(a):a[n];o>r&&(e=a,r=o)}return e}}),uN=(function(t,n){if(Ge(t)){for(var e,r=1/0,i=0;i<t.length;i++){var a=t[i],o=on(n)?n(a):a[n];o<r&&(e=a,r=o)}return e}});var a_=function(t,n){return(t%n+n)%n};const o_=(function(t){return yt(t)?"":t.toString()});var s_=function(t){var n=o_(t);return n.charAt(0).toLowerCase()+n.substring(1)};function fN(t,n){return!t||!n?t:t.replace(/\\?\{([^{}]+)\}/g,function(e,r){return e.charAt(0)==="\\"?e.slice(1):n[r]===void 0?"":n[r]})}var na=function(t){var n=o_(t);return n.charAt(0).toUpperCase()+n.substring(1)},s1=function(t){return r_(t,"Boolean")};function c_(t){return t===null}var re=function(t){return t===void 0};function dN(t){return t instanceof Element||t instanceof Document}function c1(t,n){for(var e in n)n.hasOwnProperty(e)&&e!=="constructor"&&n[e]!==void 0&&(t[e]=n[e])}function l_(t,n,e,r){return n&&c1(t,n),e&&c1(t,e),t}var gc=function(t){if(typeof t!="object"||t===null)return t;var n;if(Ge(t)){n=[];for(var e=0,r=t.length;e<r;e++)typeof t[e]=="object"&&t[e]!=null?n[e]=gc(t[e]):n[e]=t[e]}else{n={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?n[i]=gc(t[i]):n[i]=t[i]}return n};function u_(t,n,e){var r;return function(){var i=this,a=arguments,o=function(){r=null,t.apply(i,a)};clearTimeout(r),r=setTimeout(o,n)}}function hN(t){var n,e,r,i=t;function a(s,c){++n>i&&(r=e,o(1),++n),e[s]=c}function o(s){n=0,e=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return e[s]!==void 0||r[s]!==void 0},get:function(s){var c=e[s];if(c!==void 0)return c;if((c=r[s])!==void 0)return a(s,c),c},set:function(s,c){e[s]!==void 0?e[s]=c:a(s,c)}}}var Ah=new Map;function pN(t,n,e){var r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var o=n?n.apply(this,i):i[0];Ah.has(t)||Ah.set(t,hN(e));var s=Ah.get(t);if(s.has(o))return s.get(o);var c=t.apply(this,i);return s.set(o,c),c};return r}var vN=5;function gN(t,n){if(Object.hasOwn)return Object.hasOwn(t,n);if(t==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),n)}function f_(t,n,e,r){e=e||0,r=r||vN;for(var i in n)if(gN(n,i)){var a=n[i];a!==null&&xi(a)?(xi(t[i])||(t[i]={}),e<r?f_(t[i],a,e+1,r):t[i]=n[i]):Ge(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var U=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0;r<n.length;r+=1)f_(t,n[r]);return t},d_=function(t,n){if(!Ba(t))return-1;var e=Array.prototype.indexOf;if(e)return e.call(t,n);for(var r=-1,i=0;i<t.length;i++)if(t[i]===n){r=i;break}return r},yc=function(t,n){if(t===n)return!0;if(!t||!n||ge(t)||ge(n))return!1;if(Ba(t)||Ba(n)){if(t.length!==n.length)return!1;for(var e=!0,r=0;r<t.length&&(e=yc(t[r],n[r]),!!e);r++);return e}if(iv(t)||iv(n)){var i=Object.keys(t),a=Object.keys(n);if(i.length!==a.length)return!1;for(var e=!0,r=0;r<i.length&&(e=yc(t[i[r]],n[i[r]]),!!e);r++);return e}return!1},yN=function(t){return t};const mN=(function(t,n){n===void 0&&(n=yN);var e={};return tl(t)&&!yt(t)&&Object.keys(t).forEach(function(r){e[r]=n(t[r],r)}),e}),mt=(function(t,n,e){for(var r=0,i=ge(n)?n.split("."):n;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?e:t}),Od=(function(t,n,e){var r=t,i=ge(n)?n.split("."):n;return i.forEach(function(a,o){o<i.length-1?(tl(r[a])||(r[a]=he(i[o+1])?[]:{}),r=r[a]):r[a]=e}),t});var bN=Object.prototype.hasOwnProperty;const el=(function(t,n){if(t===null||!xi(t))return{};var e={};return tg(n,function(r){bN.call(t,r)&&(e[r]=t[r])}),e}),eg=(function(t,n){return i_(t,function(e,r,i){return n.includes(i)||(e[i]=r),e},{})}),za=(function(t,n,e){var r,i,a,o,s=0;e||(e={});var c=function(){s=e.leading===!1?0:Date.now(),r=null,o=t.apply(i,a),r||(i=a=null)},l=function(){var u=Date.now();!s&&e.leading===!1&&(s=u);var f=n-(u-s);return i=this,a=arguments,f<=0||f>n?(r&&(clearTimeout(r),r=null),s=u,o=t.apply(i,a),r||(i=a=null)):!r&&e.trailing!==!1&&(r=setTimeout(c,f)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l}),Th=(function(){}),Zr=(function(t){return t});function mc(t){return yt(t)?0:Ba(t)?t.length:Object.keys(t).length}var Ee=1e-6,Qe=typeof Float32Array<"u"?Float32Array:Array,xN="zyx";function ls(){var t=new Qe(9);return Qe!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function wN(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function ON(t){var n=new Qe(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n}function _N(t,n,e,r,i,a,o,s,c){var l=new Qe(9);return l[0]=t,l[1]=n,l[2]=e,l[3]=r,l[4]=i,l[5]=a,l[6]=o,l[7]=s,l[8]=c,l}function SN(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],f=u*o-s*l,d=-u*a+s*c,h=l*a-o*c,p=e*f+r*d+i*h;return p?(p=1/p,t[0]=f*p,t[1]=(-u*r+i*l)*p,t[2]=(s*r-i*o)*p,t[3]=d*p,t[4]=(u*e-i*c)*p,t[5]=(-s*e+i*a)*p,t[6]=h*p,t[7]=(-l*e+r*c)*p,t[8]=(o*e-r*a)*p,t):null}function EN(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],f=n[8],d=e[0],h=e[1],p=e[2],v=e[3],g=e[4],y=e[5],m=e[6],b=e[7],x=e[8];return t[0]=d*r+h*o+p*l,t[1]=d*i+h*s+p*u,t[2]=d*a+h*c+p*f,t[3]=v*r+g*o+y*l,t[4]=v*i+g*s+y*u,t[5]=v*a+g*c+y*f,t[6]=m*r+b*o+x*l,t[7]=m*i+b*s+x*u,t[8]=m*a+b*c+x*f,t}function kN(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t}function MN(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function AN(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}var TN=EN;function Zt(){var t=new Qe(16);return Qe!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ng(t){var n=new Qe(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n}function Wo(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function h_(t,n,e,r,i,a,o,s,c,l,u,f,d,h,p,v){var g=new Qe(16);return g[0]=t,g[1]=n,g[2]=e,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=c,g[9]=l,g[10]=u,g[11]=f,g[12]=d,g[13]=h,g[14]=p,g[15]=v,g}function av(t,n,e,r,i,a,o,s,c,l,u,f,d,h,p,v,g){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=f,t[11]=d,t[12]=h,t[13]=p,t[14]=v,t[15]=g,t}function Ki(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p_(t,n){if(t===n){var e=n[1],r=n[2],i=n[3],a=n[6],o=n[7],s=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=a,t[11]=n[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function Sr(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],f=n[9],d=n[10],h=n[11],p=n[12],v=n[13],g=n[14],y=n[15],m=e*s-r*o,b=e*c-i*o,x=e*l-a*o,w=r*c-i*s,O=r*l-a*s,_=i*l-a*c,S=u*v-f*p,E=u*g-d*p,k=u*y-h*p,M=f*g-d*v,T=f*y-h*v,A=d*y-h*g,P=m*A-b*T+x*M+w*k-O*E+_*S;return P?(P=1/P,t[0]=(s*A-c*T+l*M)*P,t[1]=(i*T-r*A-a*M)*P,t[2]=(v*_-g*O+y*w)*P,t[3]=(d*O-f*_-h*w)*P,t[4]=(c*k-o*A-l*E)*P,t[5]=(e*A-i*k+a*E)*P,t[6]=(g*x-p*_-y*b)*P,t[7]=(u*_-d*x+h*b)*P,t[8]=(o*T-s*k+l*S)*P,t[9]=(r*k-e*T-a*S)*P,t[10]=(p*O-v*x+y*m)*P,t[11]=(f*x-u*O-h*m)*P,t[12]=(s*E-o*M-c*S)*P,t[13]=(e*M-r*E+i*S)*P,t[14]=(v*b-p*w-g*m)*P,t[15]=(u*w-f*b+d*m)*P,t):null}function PN(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],f=n[9],d=n[10],h=n[11],p=n[12],v=n[13],g=n[14],y=n[15],m=e*s-r*o,b=e*c-i*o,x=e*l-a*o,w=r*c-i*s,O=r*l-a*s,_=i*l-a*c,S=u*v-f*p,E=u*g-d*p,k=u*y-h*p,M=f*g-d*v,T=f*y-h*v,A=d*y-h*g;return t[0]=s*A-c*T+l*M,t[1]=i*T-r*A-a*M,t[2]=v*_-g*O+y*w,t[3]=d*O-f*_-h*w,t[4]=c*k-o*A-l*E,t[5]=e*A-i*k+a*E,t[6]=g*x-p*_-y*b,t[7]=u*_-d*x+h*b,t[8]=o*T-s*k+l*S,t[9]=r*k-e*T-a*S,t[10]=p*O-v*x+y*m,t[11]=f*x-u*O-h*m,t[12]=s*E-o*M-c*S,t[13]=e*M-r*E+i*S,t[14]=v*b-p*w-g*m,t[15]=u*w-f*b+d*m,t}function v_(t){var n=t[0],e=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],f=t[10],d=t[11],h=t[12],p=t[13],v=t[14],g=t[15],y=n*o-e*a,m=n*s-r*a,b=e*s-r*o,x=l*p-u*h,w=l*v-f*h,O=u*v-f*p,_=n*O-e*w+r*x,S=a*O-o*w+s*x,E=l*b-u*m+f*y,k=h*b-p*m+v*y;return c*_-i*S+g*E-d*k}function _n(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],f=n[8],d=n[9],h=n[10],p=n[11],v=n[12],g=n[13],y=n[14],m=n[15],b=e[0],x=e[1],w=e[2],O=e[3];return t[0]=b*r+x*s+w*f+O*v,t[1]=b*i+x*c+w*d+O*g,t[2]=b*a+x*l+w*h+O*y,t[3]=b*o+x*u+w*p+O*m,b=e[4],x=e[5],w=e[6],O=e[7],t[4]=b*r+x*s+w*f+O*v,t[5]=b*i+x*c+w*d+O*g,t[6]=b*a+x*l+w*h+O*y,t[7]=b*o+x*u+w*p+O*m,b=e[8],x=e[9],w=e[10],O=e[11],t[8]=b*r+x*s+w*f+O*v,t[9]=b*i+x*c+w*d+O*g,t[10]=b*a+x*l+w*h+O*y,t[11]=b*o+x*u+w*p+O*m,b=e[12],x=e[13],w=e[14],O=e[15],t[12]=b*r+x*s+w*f+O*v,t[13]=b*i+x*c+w*d+O*g,t[14]=b*a+x*l+w*h+O*y,t[15]=b*o+x*u+w*p+O*m,t}function Ao(t,n,e){var r=e[0],i=e[1],a=e[2],o,s,c,l,u,f,d,h,p,v,g,y;return n===t?(t[12]=n[0]*r+n[4]*i+n[8]*a+n[12],t[13]=n[1]*r+n[5]*i+n[9]*a+n[13],t[14]=n[2]*r+n[6]*i+n[10]*a+n[14],t[15]=n[3]*r+n[7]*i+n[11]*a+n[15]):(o=n[0],s=n[1],c=n[2],l=n[3],u=n[4],f=n[5],d=n[6],h=n[7],p=n[8],v=n[9],g=n[10],y=n[11],t[0]=o,t[1]=s,t[2]=c,t[3]=l,t[4]=u,t[5]=f,t[6]=d,t[7]=h,t[8]=p,t[9]=v,t[10]=g,t[11]=y,t[12]=o*r+u*i+p*a+n[12],t[13]=s*r+f*i+v*a+n[13],t[14]=c*r+d*i+g*a+n[14],t[15]=l*r+h*i+y*a+n[15]),t}function g_(t,n,e){var r=e[0],i=e[1],a=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=n[7]*i,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=n[11]*a,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function CN(t,n,e,r){var i=r[0],a=r[1],o=r[2],s=Math.sqrt(i*i+a*a+o*o),c,l,u,f,d,h,p,v,g,y,m,b,x,w,O,_,S,E,k,M,T,A,P,L;return s<Ee?null:(s=1/s,i*=s,a*=s,o*=s,c=Math.sin(e),l=Math.cos(e),u=1-l,f=n[0],d=n[1],h=n[2],p=n[3],v=n[4],g=n[5],y=n[6],m=n[7],b=n[8],x=n[9],w=n[10],O=n[11],_=i*i*u+l,S=a*i*u+o*c,E=o*i*u-a*c,k=i*a*u-o*c,M=a*a*u+l,T=o*a*u+i*c,A=i*o*u+a*c,P=a*o*u-i*c,L=o*o*u+l,t[0]=f*_+v*S+b*E,t[1]=d*_+g*S+x*E,t[2]=h*_+y*S+w*E,t[3]=p*_+m*S+O*E,t[4]=f*k+v*M+b*T,t[5]=d*k+g*M+x*T,t[6]=h*k+y*M+w*T,t[7]=p*k+m*M+O*T,t[8]=f*A+v*P+b*L,t[9]=d*A+g*P+x*L,t[10]=h*A+y*P+w*L,t[11]=p*A+m*P+O*L,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function y_(t,n,e){var r=Math.sin(e),i=Math.cos(e),a=n[4],o=n[5],s=n[6],c=n[7],l=n[8],u=n[9],f=n[10],d=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=a*i+l*r,t[5]=o*i+u*r,t[6]=s*i+f*r,t[7]=c*i+d*r,t[8]=l*i-a*r,t[9]=u*i-o*r,t[10]=f*i-s*r,t[11]=d*i-c*r,t}function m_(t,n,e){var r=Math.sin(e),i=Math.cos(e),a=n[0],o=n[1],s=n[2],c=n[3],l=n[8],u=n[9],f=n[10],d=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=a*i-l*r,t[1]=o*i-u*r,t[2]=s*i-f*r,t[3]=c*i-d*r,t[8]=a*r+l*i,t[9]=o*r+u*i,t[10]=s*r+f*i,t[11]=c*r+d*i,t}function LN(t,n,e){var r=Math.sin(e),i=Math.cos(e),a=n[0],o=n[1],s=n[2],c=n[3],l=n[4],u=n[5],f=n[6],d=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=a*i+l*r,t[1]=o*i+u*r,t[2]=s*i+f*r,t[3]=c*i+d*r,t[4]=l*i-a*r,t[5]=u*i-o*r,t[6]=f*i-s*r,t[7]=d*i-c*r,t}function li(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Ii(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b_(t,n,e){var r=e[0],i=e[1],a=e[2],o=Math.sqrt(r*r+i*i+a*a),s,c,l;return o<Ee?null:(o=1/o,r*=o,i*=o,a*=o,s=Math.sin(n),c=Math.cos(n),l=1-c,t[0]=r*r*l+c,t[1]=i*r*l+a*s,t[2]=a*r*l-i*s,t[3]=0,t[4]=r*i*l-a*s,t[5]=i*i*l+c,t[6]=a*i*l+r*s,t[7]=0,t[8]=r*a*l+i*s,t[9]=i*a*l-r*s,t[10]=a*a*l+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function x_(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function w_(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ov(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function O_(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=r+r,c=i+i,l=a+a,u=r*s,f=r*c,d=r*l,h=i*c,p=i*l,v=a*l,g=o*s,y=o*c,m=o*l;return t[0]=1-(h+v),t[1]=f+m,t[2]=d-y,t[3]=0,t[4]=f-m,t[5]=1-(u+v),t[6]=p+g,t[7]=0,t[8]=d+y,t[9]=p-g,t[10]=1-(u+h),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function NN(t,n){var e=new Qe(3),r=-n[0],i=-n[1],a=-n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],f=r*r+i*i+a*a+o*o;return f>0?(e[0]=(s*o+u*r+c*a-l*i)*2/f,e[1]=(c*o+u*i+l*r-s*a)*2/f,e[2]=(l*o+u*a+s*i-c*r)*2/f):(e[0]=(s*o+u*r+c*a-l*i)*2,e[1]=(c*o+u*i+l*r-s*a)*2,e[2]=(l*o+u*a+s*i-c*r)*2),O_(t,n,e),t}function ef(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function Yo(t,n){var e=n[0],r=n[1],i=n[2],a=n[4],o=n[5],s=n[6],c=n[8],l=n[9],u=n[10];return t[0]=Math.sqrt(e*e+r*r+i*i),t[1]=Math.sqrt(a*a+o*o+s*s),t[2]=Math.sqrt(c*c+l*l+u*u),t}function nf(t,n){var e=new Qe(3);Yo(e,n);var r=1/e[0],i=1/e[1],a=1/e[2],o=n[0]*r,s=n[1]*i,c=n[2]*a,l=n[4]*r,u=n[5]*i,f=n[6]*a,d=n[8]*r,h=n[9]*i,p=n[10]*a,v=o+u+p,g=0;return v>0?(g=Math.sqrt(v+1)*2,t[3]=.25*g,t[0]=(f-h)/g,t[1]=(d-c)/g,t[2]=(s-l)/g):o>u&&o>p?(g=Math.sqrt(1+o-u-p)*2,t[3]=(f-h)/g,t[0]=.25*g,t[1]=(s+l)/g,t[2]=(d+c)/g):u>p?(g=Math.sqrt(1+u-o-p)*2,t[3]=(d-c)/g,t[0]=(s+l)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=Math.sqrt(1+p-o-u)*2,t[3]=(s-l)/g,t[0]=(d+c)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function RN(t,n,e,r){n[0]=r[12],n[1]=r[13],n[2]=r[14];var i=r[0],a=r[1],o=r[2],s=r[4],c=r[5],l=r[6],u=r[8],f=r[9],d=r[10];e[0]=Math.sqrt(i*i+a*a+o*o),e[1]=Math.sqrt(s*s+c*c+l*l),e[2]=Math.sqrt(u*u+f*f+d*d);var h=1/e[0],p=1/e[1],v=1/e[2],g=i*h,y=a*p,m=o*v,b=s*h,x=c*p,w=l*v,O=u*h,_=f*p,S=d*v,E=g+x+S,k=0;return E>0?(k=Math.sqrt(E+1)*2,t[3]=.25*k,t[0]=(w-_)/k,t[1]=(O-m)/k,t[2]=(y-b)/k):g>x&&g>S?(k=Math.sqrt(1+g-x-S)*2,t[3]=(w-_)/k,t[0]=.25*k,t[1]=(y+b)/k,t[2]=(O+m)/k):x>S?(k=Math.sqrt(1+x-g-S)*2,t[3]=(O-m)/k,t[0]=(y+b)/k,t[1]=.25*k,t[2]=(w+_)/k):(k=Math.sqrt(1+S-g-x)*2,t[3]=(y-b)/k,t[0]=(O+m)/k,t[1]=(w+_)/k,t[2]=.25*k),t}function IN(t,n,e,r){var i=n[0],a=n[1],o=n[2],s=n[3],c=i+i,l=a+a,u=o+o,f=i*c,d=i*l,h=i*u,p=a*l,v=a*u,g=o*u,y=s*c,m=s*l,b=s*u,x=r[0],w=r[1],O=r[2];return t[0]=(1-(p+g))*x,t[1]=(d+b)*x,t[2]=(h-m)*x,t[3]=0,t[4]=(d-b)*w,t[5]=(1-(f+g))*w,t[6]=(v+y)*w,t[7]=0,t[8]=(h+m)*O,t[9]=(v-y)*O,t[10]=(1-(f+p))*O,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ec(t,n,e,r,i){var a=n[0],o=n[1],s=n[2],c=n[3],l=a+a,u=o+o,f=s+s,d=a*l,h=a*u,p=a*f,v=o*u,g=o*f,y=s*f,m=c*l,b=c*u,x=c*f,w=r[0],O=r[1],_=r[2],S=i[0],E=i[1],k=i[2],M=(1-(v+y))*w,T=(h+x)*w,A=(p-b)*w,P=(h-x)*O,L=(1-(d+y))*O,I=(g+m)*O,R=(p+b)*_,C=(g-m)*_,N=(1-(d+v))*_;return t[0]=M,t[1]=T,t[2]=A,t[3]=0,t[4]=P,t[5]=L,t[6]=I,t[7]=0,t[8]=R,t[9]=C,t[10]=N,t[11]=0,t[12]=e[0]+S-(M*S+P*E+R*k),t[13]=e[1]+E-(T*S+L*E+C*k),t[14]=e[2]+k-(A*S+I*E+N*k),t[15]=1,t}function rg(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e+e,s=r+r,c=i+i,l=e*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*c,v=a*o,g=a*s,y=a*c;return t[0]=1-f-p,t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-l-p,t[6]=h+v,t[7]=0,t[8]=d+g,t[9]=h-v,t[10]=1-l-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function jN(t,n,e,r,i,a,o){var s=1/(e-n),c=1/(i-r),l=1/(a-o);return t[0]=a*2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a*2*c,t[6]=0,t[7]=0,t[8]=(e+n)*s,t[9]=(i+r)*c,t[10]=(o+a)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*l,t[15]=0,t}function __(t,n,e,r,i){var a=1/Math.tan(n/2);if(t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0){var o=1/(r-i);t[10]=(i+r)*o,t[14]=2*i*r*o}else t[10]=-1,t[14]=-2*r;return t}var DN=__;function $N(t,n,e,r,i){var a=1/Math.tan(n/2);if(t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0){var o=1/(r-i);t[10]=i*o,t[14]=i*r*o}else t[10]=-1,t[14]=-r;return t}function FN(t,n,e,r){var i=Math.tan(n.upDegrees*Math.PI/180),a=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),s=Math.tan(n.rightDegrees*Math.PI/180),c=2/(o+s),l=2/(i+a);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-((o-s)*c*.5),t[9]=(i-a)*l*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t}function S_(t,n,e,r,i,a,o){var s=1/(n-e),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(n+e)*s,t[13]=(i+r)*c,t[14]=(o+a)*l,t[15]=1,t}var E_=S_;function k_(t,n,e,r,i,a,o){var s=1/(n-e),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=l,t[11]=0,t[12]=(n+e)*s,t[13]=(i+r)*c,t[14]=a*l,t[15]=1,t}function M_(t,n,e,r){var i,a,o,s,c,l,u,f,d,h,p=n[0],v=n[1],g=n[2],y=r[0],m=r[1],b=r[2],x=e[0],w=e[1],O=e[2];return Math.abs(p-x)<Ee&&Math.abs(v-w)<Ee&&Math.abs(g-O)<Ee?Ki(t):(u=p-x,f=v-w,d=g-O,h=1/Math.sqrt(u*u+f*f+d*d),u*=h,f*=h,d*=h,i=m*d-b*f,a=b*u-y*d,o=y*f-m*u,h=Math.sqrt(i*i+a*a+o*o),h?(h=1/h,i*=h,a*=h,o*=h):(i=0,a=0,o=0),s=f*o-d*a,c=d*i-u*o,l=u*a-f*i,h=Math.sqrt(s*s+c*c+l*l),h?(h=1/h,s*=h,c*=h,l*=h):(s=0,c=0,l=0),t[0]=i,t[1]=s,t[2]=u,t[3]=0,t[4]=a,t[5]=c,t[6]=f,t[7]=0,t[8]=o,t[9]=l,t[10]=d,t[11]=0,t[12]=-(i*p+a*v+o*g),t[13]=-(s*p+c*v+l*g),t[14]=-(u*p+f*v+d*g),t[15]=1,t)}function BN(t,n,e,r){var i=n[0],a=n[1],o=n[2],s=r[0],c=r[1],l=r[2],u=i-e[0],f=a-e[1],d=o-e[2],h=u*u+f*f+d*d;h>0&&(h=1/Math.sqrt(h),u*=h,f*=h,d*=h);var p=c*d-l*f,v=l*u-s*d,g=s*f-c*u;return h=p*p+v*v+g*g,h>0&&(h=1/Math.sqrt(h),p*=h,v*=h,g*=h),t[0]=p,t[1]=v,t[2]=g,t[3]=0,t[4]=f*g-d*v,t[5]=d*p-u*g,t[6]=u*v-f*p,t[7]=0,t[8]=u,t[9]=f,t[10]=d,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t}function zN(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function WN(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]+t[3]*t[3]+t[4]*t[4]+t[5]*t[5]+t[6]*t[6]+t[7]*t[7]+t[8]*t[8]+t[9]*t[9]+t[10]*t[10]+t[11]*t[11]+t[12]*t[12]+t[13]*t[13]+t[14]*t[14]+t[15]*t[15])}function YN(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t}function A_(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function GN(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t}function HN(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t}function sv(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function VN(t,n){var e=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15],m=n[0],b=n[1],x=n[2],w=n[3],O=n[4],_=n[5],S=n[6],E=n[7],k=n[8],M=n[9],T=n[10],A=n[11],P=n[12],L=n[13],I=n[14],R=n[15];return Math.abs(e-m)<=Ee*Math.max(1,Math.abs(e),Math.abs(m))&&Math.abs(r-b)<=Ee*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=Ee*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(a-w)<=Ee*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(o-O)<=Ee*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(s-_)<=Ee*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(c-S)<=Ee*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(l-E)<=Ee*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(u-k)<=Ee*Math.max(1,Math.abs(u),Math.abs(k))&&Math.abs(f-M)<=Ee*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(d-T)<=Ee*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(h-A)<=Ee*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(p-P)<=Ee*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(v-L)<=Ee*Math.max(1,Math.abs(v),Math.abs(L))&&Math.abs(g-I)<=Ee*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(y-R)<=Ee*Math.max(1,Math.abs(y),Math.abs(R))}var ig=_n,XN=A_;const UN=Object.freeze(Object.defineProperty({__proto__:null,add:YN,adjoint:PN,clone:ng,copy:Wo,create:Zt,decompose:RN,determinant:v_,equals:VN,exactEquals:sv,frob:WN,fromQuat:rg,fromQuat2:NN,fromRotation:b_,fromRotationTranslation:O_,fromRotationTranslationScale:IN,fromRotationTranslationScaleOrigin:ec,fromScaling:Ii,fromTranslation:li,fromValues:h_,fromXRotation:x_,fromYRotation:w_,fromZRotation:ov,frustum:jN,getRotation:nf,getScaling:Yo,getTranslation:ef,identity:Ki,invert:Sr,lookAt:M_,mul:ig,multiply:_n,multiplyScalar:GN,multiplyScalarAndAdd:HN,ortho:E_,orthoNO:S_,orthoZO:k_,perspective:DN,perspectiveFromFieldOfView:FN,perspectiveNO:__,perspectiveZO:$N,rotate:CN,rotateX:y_,rotateY:m_,rotateZ:LN,scale:g_,set:av,str:zN,sub:XN,subtract:A_,targetTo:BN,translate:Ao,transpose:p_},Symbol.toStringTag,{value:"Module"}));function Dt(){var t=new Qe(3);return Qe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function ci(t){var n=new Qe(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function ui(t){var n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function Ht(t,n,e){var r=new Qe(3);return r[0]=t,r[1]=n,r[2]=e,r}function zr(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function wn(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function Gi(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function cv(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function qN(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function KN(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function ZN(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function rf(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function QN(t,n){var e=n[0]-t[0],r=n[1]-t[1],i=n[2]-t[2];return Math.sqrt(e*e+r*r+i*i)}function Ia(t,n){var e=n[0],r=n[1],i=n[2],a=e*e+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function Wr(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Pu(t,n,e){var r=n[0],i=n[1],a=n[2],o=e[0],s=e[1],c=e[2];return t[0]=i*c-a*s,t[1]=a*o-r*c,t[2]=r*s-i*o,t}function lv(t,n,e,r){var i=n[0],a=n[1],o=n[2];return t[0]=i+r*(e[0]-i),t[1]=a+r*(e[1]-a),t[2]=o+r*(e[2]-o),t}function Ie(t,n,e){var r=n[0],i=n[1],a=n[2],o=e[3]*r+e[7]*i+e[11]*a+e[15];return o=o||1,t[0]=(e[0]*r+e[4]*i+e[8]*a+e[12])/o,t[1]=(e[1]*r+e[5]*i+e[9]*a+e[13])/o,t[2]=(e[2]*r+e[6]*i+e[10]*a+e[14])/o,t}function T_(t,n,e){var r=n[0],i=n[1],a=n[2];return t[0]=r*e[0]+i*e[3]+a*e[6],t[1]=r*e[1]+i*e[4]+a*e[7],t[2]=r*e[2]+i*e[5]+a*e[8],t}function JN(t,n,e){var r=e[0],i=e[1],a=e[2],o=e[3],s=n[0],c=n[1],l=n[2],u=i*l-a*c,f=a*s-r*l,d=r*c-i*s;return u=u+u,f=f+f,d=d+d,t[0]=s+o*u+i*d-a*f,t[1]=c+o*f+a*u-r*d,t[2]=l+o*d+r*f-i*u,t}function xs(t,n){var e=t[0],r=t[1],i=t[2],a=n[0],o=n[1],s=n[2];return Math.abs(e-a)<=Ee*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-o)<=Ee*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=Ee*Math.max(1,Math.abs(i),Math.abs(s))}var t4=cv,l1=QN,P_=ui;(function(){var t=Dt();return function(n,e,r,i,a,o){var s,c;for(e||(e=3),r||(r=0),i?c=Math.min(i*e+r,n.length):c=n.length,s=r;s<c;s+=e)t[0]=n[s],t[1]=n[s+1],t[2]=n[s+2],a(t,t,o),n[s]=t[0],n[s+1]=t[1],n[s+2]=t[2];return n}})();function Yr(){var t=new Qe(4);return Qe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Rs(t,n,e,r){var i=new Qe(4);return i[0]=t,i[1]=n,i[2]=e,i[3]=r,i}function e4(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function n4(t,n,e,r,i){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t}function r4(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e*e+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),t[0]=e*o,t[1]=r*o,t[2]=i*o,t[3]=a*o,t}function Gr(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3];return t[0]=e[0]*r+e[4]*i+e[8]*a+e[12]*o,t[1]=e[1]*r+e[5]*i+e[9]*a+e[13]*o,t[2]=e[2]*r+e[6]*i+e[10]*a+e[14]*o,t[3]=e[3]*r+e[7]*i+e[11]*a+e[15]*o,t}(function(){var t=Yr();return function(n,e,r,i,a,o){var s,c;for(e||(e=4),r||(r=0),i?c=Math.min(i*e+r,n.length):c=n.length,s=r;s<c;s+=e)t[0]=n[s],t[1]=n[s+1],t[2]=n[s+2],t[3]=n[s+3],a(t,t,o),n[s]=t[0],n[s+1]=t[1],n[s+2]=t[2],n[s+3]=t[3];return n}})();function an(){var t=new Qe(4);return Qe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Di(t,n,e){e=e*.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t}function Hi(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],c=e[1],l=e[2],u=e[3];return t[0]=r*u+o*s+i*l-a*c,t[1]=i*u+o*c+a*s-r*l,t[2]=a*u+o*l+r*c-i*s,t[3]=o*u-r*s-i*c-a*l,t}function Ph(t,n,e,r){var i=n[0],a=n[1],o=n[2],s=n[3],c=e[0],l=e[1],u=e[2],f=e[3],d,h,p,v,g;return h=i*c+a*l+o*u+s*f,h<0&&(h=-h,c=-c,l=-l,u=-u,f=-f),1-h>Ee?(d=Math.acos(h),p=Math.sin(d),v=Math.sin((1-r)*d)/p,g=Math.sin(r*d)/p):(v=1-r,g=r),t[0]=v*i+g*c,t[1]=v*a+g*l,t[2]=v*o+g*u,t[3]=v*s+g*f,t}function Ch(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e*e+r*r+i*i+a*a,s=o?1/o:0;return t[0]=-e*s,t[1]=-r*s,t[2]=-i*s,t[3]=a*s,t}function i4(t,n){var e=n[0]+n[4]+n[8],r;if(e>0)r=Math.sqrt(e+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{var i=0;n[4]>n[0]&&(i=1),n[8]>n[i*3+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(n[i*3+i]-n[a*3+a]-n[o*3+o]+1),t[i]=.5*r,r=.5/r,t[3]=(n[a*3+o]-n[o*3+a])*r,t[a]=(n[a*3+i]+n[i*3+a])*r,t[o]=(n[o*3+i]+n[i*3+o])*r}return t}function Al(t,n,e,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:xN,a=Math.PI/360;n*=a,r*=a,e*=a;var o=Math.sin(n),s=Math.cos(n),c=Math.sin(e),l=Math.cos(e),u=Math.sin(r),f=Math.cos(r);switch(i){case"xyz":t[0]=o*l*f+s*c*u,t[1]=s*c*f-o*l*u,t[2]=s*l*u+o*c*f,t[3]=s*l*f-o*c*u;break;case"xzy":t[0]=o*l*f-s*c*u,t[1]=s*c*f-o*l*u,t[2]=s*l*u+o*c*f,t[3]=s*l*f+o*c*u;break;case"yxz":t[0]=o*l*f+s*c*u,t[1]=s*c*f-o*l*u,t[2]=s*l*u-o*c*f,t[3]=s*l*f+o*c*u;break;case"yzx":t[0]=o*l*f+s*c*u,t[1]=s*c*f+o*l*u,t[2]=s*l*u-o*c*f,t[3]=s*l*f-o*c*u;break;case"zxy":t[0]=o*l*f-s*c*u,t[1]=s*c*f+o*l*u,t[2]=s*l*u+o*c*f,t[3]=s*l*f-o*c*u;break;case"zyx":t[0]=o*l*f-s*c*u,t[1]=s*c*f+o*l*u,t[2]=s*l*u-o*c*f,t[3]=s*l*f+o*c*u;break;default:throw new Error("Unknown angle order "+i)}return t}var a4=Rs,Tl=e4,C_=n4,u1=Hi,af=r4;(function(){var t=Dt(),n=Ht(1,0,0),e=Ht(0,1,0);return function(r,i,a){var o=Wr(i,a);return o<-.999999?(Pu(t,n,i),P_(t)<1e-6&&Pu(t,e,i),Ia(t,t),Di(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(Pu(t,i,a),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,af(r,r))}})();(function(){var t=an(),n=an();return function(e,r,i,a,o,s){return Ph(t,r,o,s),Ph(n,i,a,s),Ph(e,t,n,2*s*(1-s)),e}})();(function(){var t=ls();return function(n,e,r,i){return t[0]=r[0],t[3]=r[1],t[6]=r[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-e[0],t[5]=-e[1],t[8]=-e[2],af(n,i4(n,t))}})();function ag(){var t=new Qe(2);return Qe!=Float32Array&&(t[0]=0,t[1]=0),t}function o4(t,n){return t[0]=n[0],t[1]=n[1],t}function s4(t,n,e){return t[0]=n,t[1]=e,t}function c4(t,n){var e=n[0],r=n[1],i=e*e+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i,t}function l4(t,n){return t[0]*n[0]+t[1]*n[1]}function u4(t,n){return t[0]===n[0]&&t[1]===n[1]}(function(){var t=ag();return function(n,e,r,i,a,o){var s,c;for(e||(e=2),r||(r=0),i?c=Math.min(i*e+r,n.length):c=n.length,s=r;s<c;s+=e)t[0]=n[s],t[1]=n[s+1],a(t,t,o),n[s]=t[0],n[s+1]=t[1];return n}})();var uv=function(t,n){return uv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},uv(t,n)};function Se(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");uv(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var Z=function(){return Z=Object.assign||function(n){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}return n},Z.apply(this,arguments)};function Ze(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e}function nl(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function F(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a}function f4(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;for(var r=Array(t),i=0,n=0;n<e;n++)for(var a=arguments[n],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function ht(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))}function Lh(t,n,e,r){if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?r:e==="a"?r.call(t):r?r.value:n.get(t)}var L_={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function d4(t,n,e){if(t[e].length>7){t[e].shift();for(var r=t[e],i=e;r.length;)n[e]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(e,1)}}var nc={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function N_(t){return Array.isArray(t)&&t.every(function(n){var e=n[0].toLowerCase();return nc[e]===n.length-1&&"achlmqstvz".includes(e)})}function R_(t){return N_(t)&&t.every(function(n){var e=n[0];return e===e.toUpperCase()})}function I_(t){return R_(t)&&t.every(function(n){var e=n[0];return"ACLMQZ".includes(e)})}function f1(t){for(var n=t.pathValue[t.segmentStart],e=n.toLowerCase(),r=t.data;r.length>=nc[e]&&(e==="m"&&r.length>2?(t.segments.push([n].concat(r.splice(0,2))),e="l",n=n==="m"?"l":"L"):t.segments.push([n].concat(r.splice(0,nc[e]))),!!nc[e]););}function h4(t){var n=t.index,e=t.pathValue,r=e.charCodeAt(n);if(r===48){t.param=0,t.index+=1;return}if(r===49){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'.concat(e[n],'", expecting 0 or 1 at index ').concat(n)}function p4(t){return t>=48&&t<=57||t===43||t===45||t===46}function uo(t){return t>=48&&t<=57}function v4(t){var n=t.max,e=t.pathValue,r=t.index,i=r,a=!1,o=!1,s=!1,c=!1,l;if(i>=n){t.err="[path-util]: Invalid path value at index ".concat(i,', "pathValue" is missing param');return}if(l=e.charCodeAt(i),(l===43||l===45)&&(i+=1,l=e.charCodeAt(i)),!uo(l)&&l!==46){t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" is not a number');return}if(l!==46){if(a=l===48,i+=1,l=e.charCodeAt(i),a&&i<n&&l&&uo(l)){t.err="[path-util]: Invalid path value at index ".concat(r,', "').concat(e[r],'" illegal number');return}for(;i<n&&uo(e.charCodeAt(i));)i+=1,o=!0;l=e.charCodeAt(i)}if(l===46){for(c=!0,i+=1;uo(e.charCodeAt(i));)i+=1,s=!0;l=e.charCodeAt(i)}if(l===101||l===69){if(c&&!o&&!s){t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" invalid float exponent');return}if(i+=1,l=e.charCodeAt(i),(l===43||l===45)&&(i+=1),i<n&&uo(e.charCodeAt(i)))for(;i<n&&uo(e.charCodeAt(i));)i+=1;else{t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" invalid integer exponent');return}}t.index=i,t.param=+t.pathValue.slice(r,i)}function g4(t){var n=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&n.includes(t)}function Cu(t){for(var n=t.pathValue,e=t.max;t.index<e&&g4(n.charCodeAt(t.index));)t.index+=1}function y4(t){switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function m4(t){return(t|32)===97}function b4(t){var n=t.max,e=t.pathValue,r=t.index,i=e.charCodeAt(r),a=nc[e[r].toLowerCase()];if(t.segmentStart=r,!y4(i)){t.err='[path-util]: Invalid path value "'.concat(e[r],'" is not a path command');return}if(t.index+=1,Cu(t),t.data=[],!a){f1(t);return}for(;;){for(var o=a;o>0;o-=1){if(m4(i)&&(o===3||o===4)?h4(t):v4(t),t.err.length)return;t.data.push(t.param),Cu(t),t.index<n&&e.charCodeAt(t.index)===44&&(t.index+=1,Cu(t))}if(t.index>=t.max||!p4(e.charCodeAt(t.index)))break}f1(t)}var x4=(function(){function t(n){this.pathValue=n,this.segments=[],this.max=n.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return t})();function w4(t){if(N_(t))return[].concat(t);var n=new x4(t);for(Cu(n);n.index<n.max&&!n.err.length;)b4(n);return n.err?n.err:n.segments}function O4(t){if(R_(t))return[].concat(t);var n=w4(t),e=0,r=0,i=0,a=0;return n.map(function(o){var s=o.slice(1).map(Number),c=o[0],l=c.toUpperCase();if(c==="M")return e=s[0],r=s[1],i=e,a=r,["M",e,r];var u;if(c!==l)switch(l){case"A":u=[l,s[0],s[1],s[2],s[3],s[4],s[5]+e,s[6]+r];break;case"V":u=[l,s[0]+r];break;case"H":u=[l,s[0]+e];break;default:{var f=s.map(function(h,p){return h+(p%2?r:e)});u=[l].concat(f)}}else u=[l].concat(s);var d=u.length;switch(l){case"Z":e=i,r=a;break;case"H":e=u[1];break;case"V":r=u[1];break;default:e=u[d-2],r=u[d-1],l==="M"&&(i=e,a=r)}return u})}function _4(t,n){var e=t[0],r=n.x1,i=n.y1,a=n.x2,o=n.y2,s=t.slice(1).map(Number),c=t;if("TQ".includes(e)||(n.qx=null,n.qy=null),e==="H")c=["L",t[1],i];else if(e==="V")c=["L",r,t[1]];else if(e==="S"){var l=r*2-a,u=i*2-o;n.x1=l,n.y1=u,c=["C",l,u].concat(s)}else if(e==="T"){var f=r*2-n.qx,d=i*2-n.qy;n.qx=f,n.qy=d,c=["Q",f,d].concat(s)}else if(e==="Q"){var h=s[0],p=s[1];n.qx=h,n.qy=p}return c}function of(t){if(I_(t))return[].concat(t);for(var n=O4(t),e=Z({},L_),r=0;r<n.length;r+=1){n[r]=_4(n[r],e);var i=n[r],a=i.length;e.x1=+i[a-2],e.y1=+i[a-1],e.x2=+i[a-4]||e.x1,e.y2=+i[a-3]||e.y1}return n}function S4(t){return I_(t)&&t.every(function(n){var e=n[0];return"MC".includes(e)})}function Pl(t,n,e){var r=t*Math.cos(e)-n*Math.sin(e),i=t*Math.sin(e)+n*Math.cos(e);return{x:r,y:i}}function og(t,n,e,r,i,a,o,s,c,l){var u=t,f=n,d=e,h=r,p=s,v=c,g=Math.PI*120/180,y=Math.PI/180*(+i||0),m=[],b,x,w,O,_;if(l)x=l[0],w=l[1],O=l[2],_=l[3];else{b=Pl(u,f,-y),u=b.x,f=b.y,b=Pl(p,v,-y),p=b.x,v=b.y;var S=(u-p)/2,E=(f-v)/2,k=S*S/(d*d)+E*E/(h*h);k>1&&(k=Math.sqrt(k),d*=k,h*=k);var M=d*d,T=h*h,A=(a===o?-1:1)*Math.sqrt(Math.abs((M*T-M*E*E-T*S*S)/(M*E*E+T*S*S)));O=A*d*E/h+(u+p)/2,_=A*-h*S/d+(f+v)/2,x=Math.asin(((f-_)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((v-_)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),x=u<O?Math.PI-x:x,w=p<O?Math.PI-w:w,x<0&&(x=Math.PI*2+x),w<0&&(w=Math.PI*2+w),o&&x>w&&(x-=Math.PI*2),!o&&w>x&&(w-=Math.PI*2)}var P=w-x;if(Math.abs(P)>g){var L=w,I=p,R=v;w=x+g*(o&&w>x?1:-1),p=O+d*Math.cos(w),v=_+h*Math.sin(w),m=og(p,v,d,h,i,0,o,I,R,[w,L,O,_])}P=w-x;var C=Math.cos(x),N=Math.sin(x),j=Math.cos(w),D=Math.sin(w),$=Math.tan(P/4),B=4/3*d*$,z=4/3*h*$,W=[u,f],G=[u+B*N,f-z*C],V=[p+B*D,v-z*j],Y=[p,v];if(G[0]=2*W[0]-G[0],G[1]=2*W[1]-G[1],l)return G.concat(V,Y,m);m=G.concat(V,Y,m);for(var q=[],K=0,et=m.length;K<et;K+=1)q[K]=K%2?Pl(m[K-1],m[K],y).y:Pl(m[K],m[K+1],y).x;return q}function E4(t,n,e,r,i,a){var o=.3333333333333333,s=2/3;return[o*t+s*e,o*n+s*r,o*i+s*e,o*a+s*r,i,a]}function Li(t,n,e){var r=t[0],i=t[1],a=n[0],o=n[1];return[r+(a-r)*e,i+(o-i)*e]}var d1=function(t,n,e,r){var i=.5,a=Li([t,n],[e,r],i);return ht(ht([],a,!0),[e,r,e,r],!1)};function k4(t,n){var e=t[0],r=t.slice(1).map(Number),i=r[0],a=r[1],o,s=n.x1,c=n.y1,l=n.x,u=n.y;switch("TQ".includes(e)||(n.qx=null,n.qy=null),e){case"M":return n.x=i,n.y=a,t;case"A":return o=[s,c].concat(r),["C"].concat(og(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return n.qx=i,n.qy=a,o=[s,c].concat(r),["C"].concat(E4(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(d1(s,c,i,a));case"Z":return s===l&&c===u?["C",s,c,l,u,l,u]:["C"].concat(d1(s,c,l,u))}return t}function fv(t,n){if(n===void 0&&(n=!1),S4(t)){var e=[].concat(t);return n?[e,[]]:e}for(var r=of(t),i=Z({},L_),a=[],o="",s=r.length,c,l,u=[],f=0;f<s;f+=1){r[f]&&(o=r[f][0]),a[f]=o;var d=k4(r[f],i);r[f]=d,d4(r,a,f),s=r.length,o==="Z"&&u.push(f),c=r[f],l=c.length,i.x1=+c[l-2],i.y1=+c[l-1],i.x2=+c[l-4]||i.x1,i.y2=+c[l-3]||i.y1}return n?[r,u]:r}function M4(t){return t.map(function(n){return Array.isArray(n)?[].concat(n):n})}function A4(t){var n=t.slice(1).map(function(e,r,i){return r?i[r-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))}).map(function(e){return e.map(function(r,i){return e[e.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(n[0].slice(0,2))].concat(n.map(function(e){return["C"].concat(e.slice(2))}))}function Dn(t,n){return Math.sqrt((t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1]))}function dv(t,n,e,r,i){var a=Dn([t,n],[e,r]),o={x:0,y:0};if(typeof i=="number")if(i<=0)o={x:t,y:n};else if(i>=a)o={x:e,y:r};else{var s=Li([t,n],[e,r],i/a),c=s[0],l=s[1];o={x:c,y:l}}return{length:a,point:o,min:{x:Math.min(t,e),y:Math.min(n,r)},max:{x:Math.max(t,e),y:Math.max(n,r)}}}function h1(t,n){var e=t.x,r=t.y,i=n.x,a=n.y,o=e*i+r*a,s=Math.sqrt((Math.pow(e,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2))),c=e*a-r*i<0?-1:1,l=c*Math.acos(o/s);return l}function T4(t,n,e,r,i,a,o,s,c,l){var u=Math.abs,f=Math.sin,d=Math.cos,h=Math.sqrt,p=Math.PI,v=u(e),g=u(r),y=(i%360+360)%360,m=y*(p/180);if(t===s&&n===c)return{x:t,y:n};if(v===0||g===0)return dv(t,n,s,c,l).point;var b=(t-s)/2,x=(n-c)/2,w={x:d(m)*b+f(m)*x,y:-f(m)*b+d(m)*x},O=Math.pow(w.x,2)/Math.pow(v,2)+Math.pow(w.y,2)/Math.pow(g,2);O>1&&(v*=h(O),g*=h(O));var _=Math.pow(v,2)*Math.pow(g,2)-Math.pow(v,2)*Math.pow(w.y,2)-Math.pow(g,2)*Math.pow(w.x,2),S=Math.pow(v,2)*Math.pow(w.y,2)+Math.pow(g,2)*Math.pow(w.x,2),E=_/S;E=E<0?0:E;var k=(a!==o?1:-1)*h(E),M={x:k*(v*w.y/g),y:k*(-(g*w.x)/v)},T={x:d(m)*M.x-f(m)*M.y+(t+s)/2,y:f(m)*M.x+d(m)*M.y+(n+c)/2},A={x:(w.x-M.x)/v,y:(w.y-M.y)/g},P=h1({x:1,y:0},A),L={x:(-w.x-M.x)/v,y:(-w.y-M.y)/g},I=h1(A,L);!o&&I>0?I-=2*p:o&&I<0&&(I+=2*p),I%=2*p;var R=P+I*l,C=v*d(R),N=g*f(R),j={x:d(m)*C-f(m)*N+T.x,y:f(m)*C+d(m)*N+T.y};return j}function P4(t,n,e,r,i,a,o,s,c,l,u){var f,d=u.bbox,h=d===void 0?!0:d,p=u.length,v=p===void 0?!0:p,g=u.sampleSize,y=g===void 0?30:g,m=typeof l=="number",b=t,x=n,w=0,O=[b,x,w],_=[b,x],S=0,E={x:0,y:0},k=[{x:b,y:x}];m&&l<=0&&(E={x:b,y:x});for(var M=0;M<=y;M+=1){if(S=M/y,f=T4(t,n,e,r,i,a,o,s,c,S),b=f.x,x=f.y,h&&k.push({x:b,y:x}),v&&(w+=Dn(_,[b,x])),_=[b,x],m&&w>=l&&l>O[2]){var T=(w-l)/(w-O[2]);E={x:_[0]*(1-T)+O[0]*T,y:_[1]*(1-T)+O[1]*T}}O=[b,x,w]}return m&&l>=w&&(E={x:s,y:c}),{length:w,point:E,min:{x:Math.min.apply(null,k.map(function(A){return A.x})),y:Math.min.apply(null,k.map(function(A){return A.y}))},max:{x:Math.max.apply(null,k.map(function(A){return A.x})),y:Math.max.apply(null,k.map(function(A){return A.y}))}}}function C4(t,n,e,r,i,a,o,s,c){var l=1-c;return{x:Math.pow(l,3)*t+3*Math.pow(l,2)*c*e+3*l*Math.pow(c,2)*i+Math.pow(c,3)*o,y:Math.pow(l,3)*n+3*Math.pow(l,2)*c*r+3*l*Math.pow(c,2)*a+Math.pow(c,3)*s}}function j_(t,n,e,r,i,a,o,s,c,l){var u,f=l.bbox,d=f===void 0?!0:f,h=l.length,p=h===void 0?!0:h,v=l.sampleSize,g=v===void 0?10:v,y=typeof c=="number",m=t,b=n,x=0,w=[m,b,x],O=[m,b],_=0,S={x:0,y:0},E=[{x:m,y:b}];y&&c<=0&&(S={x:m,y:b});for(var k=0;k<=g;k+=1){if(_=k/g,u=C4(t,n,e,r,i,a,o,s,_),m=u.x,b=u.y,d&&E.push({x:m,y:b}),p&&(x+=Dn(O,[m,b])),O=[m,b],y&&x>=c&&c>w[2]){var M=(x-c)/(x-w[2]);S={x:O[0]*(1-M)+w[0]*M,y:O[1]*(1-M)+w[1]*M}}w=[m,b,x]}return y&&c>=x&&(S={x:o,y:s}),{length:x,point:S,min:{x:Math.min.apply(null,E.map(function(T){return T.x})),y:Math.min.apply(null,E.map(function(T){return T.y}))},max:{x:Math.max.apply(null,E.map(function(T){return T.x})),y:Math.max.apply(null,E.map(function(T){return T.y}))}}}function L4(t,n,e,r,i,a,o){var s=1-o;return{x:Math.pow(s,2)*t+2*s*o*e+Math.pow(o,2)*i,y:Math.pow(s,2)*n+2*s*o*r+Math.pow(o,2)*a}}function N4(t,n,e,r,i,a,o,s){var c,l=s.bbox,u=l===void 0?!0:l,f=s.length,d=f===void 0?!0:f,h=s.sampleSize,p=h===void 0?10:h,v=typeof o=="number",g=t,y=n,m=0,b=[g,y,m],x=[g,y],w=0,O={x:0,y:0},_=[{x:g,y}];v&&o<=0&&(O={x:g,y});for(var S=0;S<=p;S+=1){if(w=S/p,c=L4(t,n,e,r,i,a,w),g=c.x,y=c.y,u&&_.push({x:g,y}),d&&(m+=Dn(x,[g,y])),x=[g,y],v&&m>=o&&o>b[2]){var E=(m-o)/(m-b[2]);O={x:x[0]*(1-E)+b[0]*E,y:x[1]*(1-E)+b[1]*E}}b=[g,y,m]}return v&&o>=m&&(O={x:i,y:a}),{length:m,point:O,min:{x:Math.min.apply(null,_.map(function(k){return k.x})),y:Math.min.apply(null,_.map(function(k){return k.y}))},max:{x:Math.max.apply(null,_.map(function(k){return k.x})),y:Math.max.apply(null,_.map(function(k){return k.y}))}}}function D_(t,n,e){for(var r,i,a,o,s,c,l=of(t),u=typeof n=="number",f,d=[],h,p=0,v=0,g=0,y=0,m,b=[],x=[],w=0,O={x:0,y:0},_=O,S=O,E=O,k=0,M=0,T=l.length;M<T;M+=1)m=l[M],h=m[0],f=h==="M",d=f?d:[p,v].concat(m.slice(1)),f?(g=m[1],y=m[2],O={x:g,y},_=O,w=0,u&&n<.001&&(E=O)):h==="L"?(r=dv(d[0],d[1],d[2],d[3],(n||0)-k),w=r.length,O=r.min,_=r.max,S=r.point):h==="A"?(i=P4(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(n||0)-k,e||{}),w=i.length,O=i.min,_=i.max,S=i.point):h==="C"?(a=j_(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(n||0)-k,e||{}),w=a.length,O=a.min,_=a.max,S=a.point):h==="Q"?(o=N4(d[0],d[1],d[2],d[3],d[4],d[5],(n||0)-k,e||{}),w=o.length,O=o.min,_=o.max,S=o.point):h==="Z"&&(d=[p,v,g,y],s=dv(d[0],d[1],d[2],d[3],(n||0)-k),w=s.length,O=s.min,_=s.max,S=s.point),u&&k<n&&k+w>=n&&(E=S),x.push(_),b.push(O),k+=w,c=h!=="Z"?m.slice(-2):[g,y],p=c[0],v=c[1];return u&&n>=k&&(E={x:p,y:v}),{length:k,point:E,min:{x:Math.min.apply(null,b.map(function(A){return A.x})),y:Math.min.apply(null,b.map(function(A){return A.y}))},max:{x:Math.max.apply(null,x.map(function(A){return A.x})),y:Math.max.apply(null,x.map(function(A){return A.y}))}}}function R4(t,n){return D_(t,void 0,Z(Z({},n),{bbox:!1,length:!0})).length}function I4(t){var n=t.length,e=n-1;return t.map(function(r,i){return t.map(function(a,o){var s=i+o,c;return o===0||t[s]&&t[s][0]==="M"?(c=t[s],["M"].concat(c.slice(-2))):(s>=n&&(s-=e),t[s])})})}function j4(t,n){var e=t.length-1,r=[],i=0,a=0,o=I4(t);return o.forEach(function(s,c){t.slice(1).forEach(function(l,u){a+=Dn(t[(c+u)%e].slice(-2),n[u%e].slice(-2))}),r[c]=a,a=0}),i=r.indexOf(Math.min.apply(null,r)),o[i]}function D4(t,n,e,r,i,a,o,s){return 3*((s-n)*(e+i)-(o-t)*(r+a)+r*(t-i)-e*(n-a)+s*(i+t/3)-o*(a+n/3))/20}function $4(t){var n=0,e=0,r=0;return fv(t).map(function(i){var a;switch(i[0]){case"M":return n=i[1],e=i[2],0;default:var o=i.slice(1),s=o[0],c=o[1],l=o[2],u=o[3],f=o[4],d=o[5];return r=D4(n,e,s,c,l,u,f,d),a=i.slice(-2),n=a[0],e=a[1],r}}).reduce(function(i,a){return i+a},0)}function p1(t){return $4(t)>=0}function F4(t,n,e){return D_(t,n,Z(Z({},e),{bbox:!1,length:!0})).point}var B4=50;function z4(t,n){n===void 0&&(n=.5);var e=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),a=t.slice(6,8),o=Li(e,r,n),s=Li(r,i,n),c=Li(i,a,n),l=Li(o,s,n),u=Li(s,c,n),f=Li(l,u,n);return[["C"].concat(o,l,f),["C"].concat(u,c,a)]}function v1(t){return t.map(function(n,e,r){var i=e&&r[e-1].slice(-2).concat(n.slice(1)),a=e?j_(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0,o;return e?o=a?z4(i):[n,n]:o=[n],{s:n,ss:o,l:a}})}function $_(t,n,e,r){if(r===void 0&&(r=0),r>B4)return console.warn("Maximum recursion depth reached in equalizeSegments"),[t,n];var i=v1(t),a=v1(n),o=i.length,s=a.length,c=i.filter(function(y){return y.l}).length,l=a.filter(function(y){return y.l}).length,u=i.filter(function(y){return y.l}).reduce(function(y,m){var b=m.l;return y+b},0)/c||0,f=a.filter(function(y){return y.l}).reduce(function(y,m){var b=m.l;return y+b},0)/l||0,d=e||Math.max(o,s),h=[u,f],p=[d-o,d-s],v=0,g=[i,a].map(function(y,m){return y.l===d?y.map(function(b){return b.s}):y.map(function(b,x){return v=x&&p[m]&&b.l>=h[m],p[m]-=v?1:0,v?b.ss:[b.s]}).flat()});return g[0].length===g[1].length?g:$_(g[0],g[1],d,r+1)}function g1(t){var n=document.createElement("div");n.innerHTML=t;var e=n.childNodes[0];return e&&n.contains(e)&&n.removeChild(e),e}function ue(t,n){if(t!==null)return{type:"column",value:t,field:n}}function bc(t,n){const e=ue(t,n);return Object.assign(Object.assign({},e),{inferred:!0})}function sf(t,n){if(t!==null)return{type:"column",value:t,field:n,visual:!0}}function W4(t,n){const e=ue(t,n);return Object.assign(Object.assign({},e),{constant:!1})}function Vi(t,n){const e=[];for(const r of t)e[r]=n;return e}function zt(t,n){const e=t[n];if(!e)return[null,null];const{value:r,field:i=null}=e;return[r,i]}function cf(t,...n){for(const e of n)if(typeof e=="string"){const[r,i]=zt(t,e);if(r!==null)return[r,i]}else return[e,null];return[null,null]}function rl(t){return t instanceof Date?!1:typeof t=="object"}const il=()=>(t,n)=>{const{encode:e}=n,{y1:r}=e;return r!==void 0?[t,n]:[t,U({},n,{encode:{y1:bc(Vi(t,0))}})]};il.props={};function Re(t,n){return t==null||n==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function Y4(t,n){return t==null||n==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function vi(t){let n,e,r;t.length!==2?(n=Re,e=(s,c)=>Re(t(s),c),r=(s,c)=>t(s)-c):(n=t===Re||t===Y4?t:G4,e=t,r=t);function i(s,c,l=0,u=s.length){if(l<u){if(n(c,c)!==0)return u;do{const f=l+u>>>1;e(s[f],c)<0?l=f+1:u=f}while(l<u)}return l}function a(s,c,l=0,u=s.length){if(l<u){if(n(c,c)!==0)return u;do{const f=l+u>>>1;e(s[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function o(s,c,l=0,u=s.length){const f=i(s,c,l,u-1);return f>l&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:i,center:o,right:a}}function G4(){return 0}function hv(t){return t===null?NaN:+t}function*H4(t,n){if(n===void 0)for(let e of t)e!=null&&(e=+e)>=e&&(yield e);else{let e=-1;for(let r of t)(r=n(r,++e,t))!=null&&(r=+r)>=r&&(yield r)}}const F_=vi(Re),V4=F_.right,X4=F_.left,U4=vi(hv).center;function B_(t,n){let e=0;for(let r of t)r!=null&&(r=+r)>=r&&++e;return e}function q4(t,n){let e=0,r,i=0,a=0;if(n===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(r=o-i,i+=r/++e,a+=r*(o-i));else{let o=-1;for(let s of t)(s=n(s,++o,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++e,a+=r*(s-i))}if(e>1)return a/(e-1)}function z_(t,n){const e=q4(t,n);return e&&Math.sqrt(e)}function gi(t,n){let e,r;if(n===void 0)for(const i of t)i!=null&&(e===void 0?i>=i&&(e=r=i):(e>i&&(e=i),r<i&&(r=i)));else{let i=-1;for(let a of t)(a=n(a,++i,t))!=null&&(e===void 0?a>=a&&(e=r=a):(e>a&&(e=a),r<a&&(r=a)))}return[e,r]}class Wa{constructor(){this._partials=new Float64Array(32),this._n=0}add(n){const e=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const a=e[i],o=n+a,s=Math.abs(n)<Math.abs(a)?n-(o-a):a-(o-n);s&&(e[r++]=s),n=o}return e[r]=n,this._n=r+1,this}valueOf(){const n=this._partials;let e=this._n,r,i,a,o=0;if(e>0){for(o=n[--e];e>0&&(r=o,i=n[--e],o=r+i,a=i-(o-r),!a););e>0&&(a<0&&n[e-1]<0||a>0&&n[e-1]>0)&&(i=a*2,r=o+i,i==r-o&&(o=r))}return o}}let K4=class extends Map{constructor(n,e=J4){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const[r,i]of n)this.set(r,i)}get(n){return super.get(y1(this,n))}has(n){return super.has(y1(this,n))}set(n,e){return super.set(Z4(this,n),e)}delete(n){return super.delete(Q4(this,n))}};function y1({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function Z4({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function Q4({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function J4(t){return t!==null&&typeof t=="object"?t.valueOf():t}function xc(t){return t}function le(t,...n){return _d(t,xc,xc,n)}function sg(t,...n){return _d(t,Array.from,xc,n)}function cg(t,n,...e){return _d(t,xc,n,e)}function lg(t,n,...e){return _d(t,Array.from,n,e)}function _d(t,n,e,r){return(function i(a,o){if(o>=r.length)return e(a);const s=new K4,c=r[o++];let l=-1;for(const u of a){const f=c(u,++l,a),d=s.get(f);d?d.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,i(f,o));return n(s)})(t,0)}function tR(t,n){return Array.from(n,e=>t[e])}function Er(t,...n){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&e.length!==2||n.length>1){const r=Uint32Array.from(t,(i,a)=>a);return n.length>1?(n=n.map(i=>t.map(i)),r.sort((i,a)=>{for(const o of n){const s=wc(o[i],o[a]);if(s)return s}})):(e=t.map(e),r.sort((i,a)=>wc(e[i],e[a]))),tR(t,r)}return t.sort(W_(e))}function W_(t=Re){if(t===Re)return wc;if(typeof t!="function")throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||r===0?r:(t(e,e)===0)-(t(n,n)===0)}}function wc(t,n){return(t==null||!(t>=t))-(n==null||!(n>=n))||(t<n?-1:t>n?1:0)}function eR(t,n,e){return(n.length!==2?Er(cg(t,n,e),(([r,i],[a,o])=>Re(i,o)||Re(r,a))):Er(le(t,e),(([r,i],[a,o])=>n(i,o)||Re(r,a)))).map(([r])=>r)}var nR=Array.prototype,rR=nR.slice;function Nh(t){return()=>t}const iR=Math.sqrt(50),aR=Math.sqrt(10),oR=Math.sqrt(2);function lf(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=iR?10:a>=aR?5:a>=oR?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(t*l),c=Math.round(n*l),s/l<t&&++s,c/l>n&&--c,l=-l):(l=Math.pow(10,i)*o,s=Math.round(t/l),c=Math.round(n/l),s*l<t&&++s,c*l>n&&--c),c<s&&.5<=e&&e<2?lf(t,n,e*2):[s,c,l]}function sR(t,n,e){if(n=+n,t=+t,e=+e,!(e>0))return[];if(t===n)return[t];const r=n<t,[i,a,o]=r?lf(n,t,e):lf(t,n,e);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(i+l)/-o;else for(let l=0;l<s;++l)c[l]=(i+l)*o;return c}function pv(t,n,e){return n=+n,t=+t,e=+e,lf(t,n,e)[2]}function cR(t,n,e){let r;for(;;){const i=pv(t,n,e);if(i===r||i===0||!isFinite(i))return[t,n];i>0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function lR(t){return Math.max(1,Math.ceil(Math.log(B_(t))/Math.LN2)+1)}function uR(){var t=xc,n=gi,e=lR;function r(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,c,l=new Array(o);for(a=0;a<o;++a)l[a]=t(i[a],a,i);var u=n(l),f=u[0],d=u[1],h=e(l,f,d);if(!Array.isArray(h)){const b=d,x=+h;if(n===gi&&([f,d]=cR(f,d,x)),h=sR(f,d,x),h[0]<=f&&(c=pv(f,d,x)),h[h.length-1]>=d)if(b>=d&&n===gi){const w=pv(f,d,x);isFinite(w)&&(w>0?d=(Math.floor(d/w)+1)*w:w<0&&(d=(Math.ceil(d*-w)+1)/-w))}else h.pop()}for(var p=h.length,v=0,g=p;h[v]<=f;)++v;for(;h[g-1]>d;)--g;(v||g<p)&&(h=h.slice(v,g),p=g-v);var y=new Array(p+1),m;for(a=0;a<=p;++a)m=y[a]=[],m.x0=a>0?h[a-1]:f,m.x1=a<p?h[a]:d;if(isFinite(c)){if(c>0)for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[Math.min(p,Math.floor((s-f)/c))].push(i[a]);else if(c<0){for(a=0;a<o;++a)if((s=l[a])!=null&&f<=s&&s<=d){const b=Math.floor((f-s)*c);y[Math.min(p,b+(h[b]<=s))].push(i[a])}}}else for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[V4(h,s,0,p)].push(i[a]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Nh(i),r):t},r.domain=function(i){return arguments.length?(n=typeof i=="function"?i:Nh([i[0],i[1]]),r):n},r.thresholds=function(i){return arguments.length?(e=typeof i=="function"?i:Nh(Array.isArray(i)?rR.call(i):i),r):e},r}function Qt(t,n){let e;if(n===void 0)for(const r of t)r!=null&&(e<r||e===void 0&&r>=r)&&(e=r);else{let r=-1;for(let i of t)(i=n(i,++r,t))!=null&&(e<i||e===void 0&&i>=i)&&(e=i)}return e}function us(t,n){let e,r=-1,i=-1;if(n===void 0)for(const a of t)++i,a!=null&&(e<a||e===void 0&&a>=a)&&(e=a,r=i);else for(let a of t)(a=n(a,++i,t))!=null&&(e<a||e===void 0&&a>=a)&&(e=a,r=i);return r}function Xn(t,n){let e;if(n===void 0)for(const r of t)r!=null&&(e>r||e===void 0&&r>=r)&&(e=r);else{let r=-1;for(let i of t)(i=n(i,++r,t))!=null&&(e>i||e===void 0&&i>=i)&&(e=i)}return e}function al(t,n){let e,r=-1,i=-1;if(n===void 0)for(const a of t)++i,a!=null&&(e>a||e===void 0&&a>=a)&&(e=a,r=i);else for(let a of t)(a=n(a,++i,t))!=null&&(e>a||e===void 0&&a>=a)&&(e=a,r=i);return r}function ug(t,n,e=0,r=1/0,i){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),r=Math.floor(Math.min(t.length-1,r)),!(e<=n&&n<=r))return t;for(i=i===void 0?wc:W_(i);r>e;){if(r-e>600){const c=r-e+1,l=n-e+1,u=Math.log(c),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),h=Math.max(e,Math.floor(n-l*f/c+d)),p=Math.min(r,Math.floor(n+(c-l)*f/c+d));ug(t,n,h,p,i)}const a=t[n];let o=e,s=r;for(ws(t,e,n),i(t[r],a)>0&&ws(t,e,r);o<s;){for(ws(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[e],a)===0?ws(t,e,s):(++s,ws(t,s,r)),s<=n&&(e=s+1),n<=s&&(r=s-1)}return t}function ws(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function fR(t,n=Re){let e,r=!1;if(n.length===1){let i;for(const a of t){const o=n(a);(r?Re(o,i)>0:Re(o,o)===0)&&(e=a,i=o,r=!0)}}else for(const i of t)(r?n(i,e)>0:n(i,i)===0)&&(e=i,r=!0);return e}function Sd(t,n,e){if(t=Float64Array.from(H4(t,e)),!(!(r=t.length)||isNaN(n=+n))){if(n<=0||r<2)return Xn(t);if(n>=1)return Qt(t);var r,i=(r-1)*n,a=Math.floor(i),o=Qt(ug(t,a).subarray(0,a+1)),s=Xn(t.subarray(a+1));return o+(s-o)*(i-a)}}function dR(t,n,e=hv){if(!isNaN(n=+n)){if(r=Float64Array.from(t,(s,c)=>hv(e(t[c],c,t))),n<=0)return al(r);if(n>=1)return us(r);var r,i=Uint32Array.from(t,(s,c)=>c),a=r.length-1,o=Math.floor(a*n);return ug(i,o,0,a,(s,c)=>wc(r[s],r[c])),o=fR(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function hR(t,n,e){const r=B_(t),i=z_(t);return r&&i?Math.ceil((e-n)*Math.cbrt(r)/(3.49*i)):1}function Oc(t,n){let e=0,r=0;if(n===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++e,r+=i);else{let i=-1;for(let a of t)(a=n(a,++i,t))!=null&&(a=+a)>=a&&(++e,r+=a)}if(e)return r/e}function fg(t,n){return Sd(t,.5,n)}function pR(t,n){return dR(t,.5,n)}function*vR(t){for(const n of t)yield*n}function Y_(t){return Array.from(vR(t))}function Oo(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=Math.max(0,Math.ceil((n-t)/e))|0,a=new Array(i);++r<i;)a[r]=t+r*e;return a}function lr(t,n){let e=0;if(n===void 0)for(let r of t)(r=+r)&&(e+=r);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e}function Go(t,...n){return n.reduce((e,r)=>i=>e(r(i)),t)}function uf(t,n){return n-t?e=>(e-t)/(n-t):e=>.5}function gR(t,n){const e=n<t?n:t,r=t>n?t:n;return i=>Math.min(Math.max(e,i),r)}function dg(t,n,e,r,i){let a=e||0,o=r||t.length;const s=i||(c=>c);for(;a<o;){const c=Math.floor((a+o)/2);s(t[c])>n?o=c:a=c+1}return a}const vv=Math.sqrt(50),gv=Math.sqrt(10),yv=Math.sqrt(2);function Lu(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),a=r/10**i;return i>=0?(a>=vv?10:a>=gv?5:a>=yv?2:1)*10**i:-(10**-i)/(a>=vv?10:a>=gv?5:a>=yv?2:1)}function m1(t,n,e){const r=Math.abs(n-t)/Math.max(0,e);let i=10**Math.floor(Math.log(r)/Math.LN10);const a=r/i;return a>=vv?i*=10:a>=gv?i*=5:a>=yv&&(i*=2),n<t?-i:i}const hg=(t,n,e=5)=>{const r=[t,n];let i=0,a=r.length-1,o=r[i],s=r[a],c;return s<o&&([o,s]=[s,o],[i,a]=[a,i]),c=Lu(o,s,e),c>0?(o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c,c=Lu(o,s,e)):c<0&&(o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c,c=Lu(o,s,e)),c>0?(r[i]=Math.floor(o/c)*c,r[a]=Math.ceil(s/c)*c):c<0&&(r[i]=Math.ceil(o*c)/c,r[a]=Math.floor(s*c)/c),r},_c=1e3,Sc=_c*60,Ec=Sc*60,Ya=Ec*24,rc=Ya*7,G_=Ya*30,H_=Ya*365;function En(t,n,e,r){const i=(l,u)=>{const f=h=>r(h)%u===0;let d=u;for(;d&&!f(l);)e(l,-1),d-=1;return l},a=(l,u)=>{u&&i(l,u),n(l)},o=(l,u)=>{const f=new Date(+l);return a(f,u),f},s=(l,u)=>{const f=new Date(+l-1);return a(f,u),e(f,u),a(f),f};return{ceil:s,floor:o,range:(l,u,f,d)=>{const h=[],p=Math.floor(f),v=d?s(l,f):s(l);for(let g=v;g<u;e(g,p),a(g))h.push(new Date(+g));return h},duration:t}}const yR=En(1,t=>t,(t,n=1)=>{t.setTime(+t+n)},t=>t.getTime()),mR=En(_c,t=>{t.setMilliseconds(0)},(t,n=1)=>{t.setTime(+t+_c*n)},t=>t.getSeconds()),bR=En(Sc,t=>{t.setSeconds(0,0)},(t,n=1)=>{t.setTime(+t+Sc*n)},t=>t.getMinutes()),xR=En(Ec,t=>{t.setMinutes(0,0,0)},(t,n=1)=>{t.setTime(+t+Ec*n)},t=>t.getHours()),wR=En(Ya,t=>{t.setHours(0,0,0,0)},(t,n=1)=>{t.setTime(+t+Ya*n)},t=>t.getDate()-1),V_=En(G_,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,n=1)=>{const e=t.getMonth();t.setMonth(e+n)},t=>t.getMonth()),OR=En(rc,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,n=1)=>{t.setDate(t.getDate()+7*n)},t=>{const n=V_.floor(t),e=new Date(+t);return Math.floor((+e-+n)/rc)}),_R=En(H_,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n=1)=>{const e=t.getFullYear();t.setFullYear(e+n)},t=>t.getFullYear()),X_={millisecond:yR,second:mR,minute:bR,hour:xR,day:wR,week:OR,month:V_,year:_R},SR=En(1,t=>t,(t,n=1)=>{t.setTime(+t+n)},t=>t.getTime()),ER=En(_c,t=>{t.setUTCMilliseconds(0)},(t,n=1)=>{t.setTime(+t+_c*n)},t=>t.getUTCSeconds()),kR=En(Sc,t=>{t.setUTCSeconds(0,0)},(t,n=1)=>{t.setTime(+t+Sc*n)},t=>t.getUTCMinutes()),MR=En(Ec,t=>{t.setUTCMinutes(0,0,0)},(t,n=1)=>{t.setTime(+t+Ec*n)},t=>t.getUTCHours()),AR=En(Ya,t=>{t.setUTCHours(0,0,0,0)},(t,n=1)=>{t.setTime(+t+Ya*n)},t=>t.getUTCDate()-1),U_=En(G_,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,n=1)=>{const e=t.getUTCMonth();t.setUTCMonth(e+n)},t=>t.getUTCMonth()),TR=En(rc,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,n=1)=>{t.setTime(+t+rc*n)},t=>{const n=U_.floor(t),e=new Date(+t);return Math.floor((+e-+n)/rc)}),PR=En(H_,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n=1)=>{const e=t.getUTCFullYear();t.setUTCFullYear(e+n)},t=>t.getUTCFullYear()),q_={millisecond:SR,second:ER,minute:kR,hour:MR,day:AR,week:TR,month:U_,year:PR};function CR(t){const n=t?q_:X_,{year:e,month:r,week:i,day:a,hour:o,minute:s,second:c,millisecond:l}=n;return{tickIntervals:[[c,1],[c,5],[c,15],[c,30],[s,1],[s,5],[s,15],[s,30],[o,1],[o,3],[o,6],[o,12],[a,1],[a,2],[i,1],[r,1],[r,3],[e,1]],year:e,millisecond:l}}function K_(t,n,e,r,i){const a=+t,o=+n,{tickIntervals:s,year:c,millisecond:l}=CR(i),u=([g,y])=>g.duration*y,f=r?(o-a)/r:e||5,d=r||(o-a)/f,h=s.length,p=dg(s,d,0,h,u);let v;if(p===h){const g=m1(a/c.duration,o/c.duration,f);v=[c,g]}else if(p){const g=d/u(s[p-1])<u(s[p])/d,[y,m]=g?s[p-1]:s[p],b=r?Math.ceil(r/y.duration):m;v=[y,b]}else{const g=Math.max(m1(a,o,f),1);v=[l,g]}return v}const LR=(t,n,e,r,i)=>{const a=t>n,o=a?n:t,s=a?t:n,[c,l]=K_(o,s,e,r,i),u=[c.floor(o,l),c.ceil(s,l)];return a?u.reverse():u};function ff(t){return!re(t)&&!c_(t)&&!Number.isNaN(t)}const Z_=t=>n=>-t(-n),pg=(t,n)=>{const e=Math.log(t),r=t===Math.E?Math.log:t===10?Math.log10:t===2?Math.log2:i=>Math.log(i)/e;return n?Z_(r):r},vg=(t,n)=>{const e=t===Math.E?Math.exp:r=>t**r;return n?Z_(e):e},NR=(t,n,e,r)=>{const i=t<0,a=pg(r,i),o=vg(r,i),s=t>n,c=s?n:t,l=s?t:n,u=[o(Math.floor(a(c))),o(Math.ceil(a(l)))];return s?u.reverse():u},RR=t=>n=>{const e=t(n);return he(e)?Math.round(e):e};function IR(t,n){return e=>{e.prototype.rescale=function(){this.initRange(),this.nice();const[r]=this.chooseTransforms();this.composeOutput(r,this.chooseClamp(r))},e.prototype.initRange=function(){const{interpolator:r}=this.options;this.options.range=t(r)},e.prototype.composeOutput=function(r,i){const{domain:a,interpolator:o,round:s}=this.getOptions(),c=n(a.map(r)),l=s?RR(o):o;this.output=Go(l,c,i,r)},e.prototype.invert=void 0}}var Rh={exports:{}},Ih,b1;function jR(){return b1||(b1=1,Ih={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Ih}var jh={exports:{}},Dh,x1;function DR(){return x1||(x1=1,Dh=function(n){return!n||typeof n=="string"?!1:n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&n.constructor.name!=="String")}),Dh}var w1;function $R(){if(w1)return jh.exports;w1=1;var t=DR(),n=Array.prototype.concat,e=Array.prototype.slice,r=jh.exports=function(a){for(var o=[],s=0,c=a.length;s<c;s++){var l=a[s];t(l)?o=n.call(o,e.call(l)):o.push(l)}return o};return r.wrap=function(i){return function(){return i(r(arguments))}},jh.exports}var O1;function FR(){if(O1)return Rh.exports;O1=1;var t=jR(),n=$R(),e=Object.hasOwnProperty,r=Object.create(null);for(var i in t)e.call(t,i)&&(r[t[i]]=i);var a=Rh.exports={to:{},get:{}};a.get=function(c){var l=c.substring(0,3).toLowerCase(),u,f;switch(l){case"hsl":u=a.get.hsl(c),f="hsl";break;case"hwb":u=a.get.hwb(c),f="hwb";break;default:u=a.get.rgb(c),f="rgb";break}return u?{model:f,value:u}:null},a.get.rgb=function(c){if(!c)return null;var l=/^#([a-f0-9]{3,4})$/i,u=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,f=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,h=/^(\w+)$/,p=[0,0,0,1],v,g,y;if(v=c.match(u)){for(y=v[2],v=v[1],g=0;g<3;g++){var m=g*2;p[g]=parseInt(v.slice(m,m+2),16)}y&&(p[3]=parseInt(y,16)/255)}else if(v=c.match(l)){for(v=v[1],y=v[3],g=0;g<3;g++)p[g]=parseInt(v[g]+v[g],16);y&&(p[3]=parseInt(y+y,16)/255)}else if(v=c.match(f)){for(g=0;g<3;g++)p[g]=parseInt(v[g+1],0);v[4]&&(v[5]?p[3]=parseFloat(v[4])*.01:p[3]=parseFloat(v[4]))}else if(v=c.match(d)){for(g=0;g<3;g++)p[g]=Math.round(parseFloat(v[g+1])*2.55);v[4]&&(v[5]?p[3]=parseFloat(v[4])*.01:p[3]=parseFloat(v[4]))}else return(v=c.match(h))?v[1]==="transparent"?[0,0,0,0]:e.call(t,v[1])?(p=t[v[1]],p[3]=1,p):null:null;for(g=0;g<3;g++)p[g]=o(p[g],0,255);return p[3]=o(p[3],0,1),p},a.get.hsl=function(c){if(!c)return null;var l=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,u=c.match(l);if(u){var f=parseFloat(u[4]),d=(parseFloat(u[1])%360+360)%360,h=o(parseFloat(u[2]),0,100),p=o(parseFloat(u[3]),0,100),v=o(isNaN(f)?1:f,0,1);return[d,h,p,v]}return null},a.get.hwb=function(c){if(!c)return null;var l=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,u=c.match(l);if(u){var f=parseFloat(u[4]),d=(parseFloat(u[1])%360+360)%360,h=o(parseFloat(u[2]),0,100),p=o(parseFloat(u[3]),0,100),v=o(isNaN(f)?1:f,0,1);return[d,h,p,v]}return null},a.to.hex=function(){var c=n(arguments);return"#"+s(c[0])+s(c[1])+s(c[2])+(c[3]<1?s(Math.round(c[3]*255)):"")},a.to.rgb=function(){var c=n(arguments);return c.length<4||c[3]===1?"rgb("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+")":"rgba("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+", "+c[3]+")"},a.to.rgb.percent=function(){var c=n(arguments),l=Math.round(c[0]/255*100),u=Math.round(c[1]/255*100),f=Math.round(c[2]/255*100);return c.length<4||c[3]===1?"rgb("+l+"%, "+u+"%, "+f+"%)":"rgba("+l+"%, "+u+"%, "+f+"%, "+c[3]+")"},a.to.hsl=function(){var c=n(arguments);return c.length<4||c[3]===1?"hsl("+c[0]+", "+c[1]+"%, "+c[2]+"%)":"hsla("+c[0]+", "+c[1]+"%, "+c[2]+"%, "+c[3]+")"},a.to.hwb=function(){var c=n(arguments),l="";return c.length>=4&&c[3]!==1&&(l=", "+c[3]),"hwb("+c[0]+", "+c[1]+"%, "+c[2]+"%"+l+")"},a.to.keyword=function(c){return r[c.slice(0,3)]};function o(c,l,u){return Math.min(Math.max(l,c),u)}function s(c){var l=Math.round(c).toString(16).toUpperCase();return l.length<2?"0"+l:l}return Rh.exports}var BR=FR();const Q_=q0(BR);function $h(t,n,e){let r=e;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}function zR(t){const n=t[0]/360,e=t[1]/100,r=t[2]/100,i=t[3];if(e===0)return[r*255,r*255,r*255,i];const a=r<.5?r*(1+e):r+e-r*e,o=2*r-a,s=$h(o,a,n+1/3),c=$h(o,a,n),l=$h(o,a,n-1/3);return[s*255,c*255,l*255,i]}function _1(t){const n=Q_.get(t);if(!n)return null;const{model:e,value:r}=n;return e==="rgb"?r:e==="hsl"?zR(r):null}const Ho=(t,n)=>e=>t*(1-e)+n*e,WR=(t,n)=>{const e=_1(t),r=_1(n);return e===null||r===null?e?()=>t:()=>n:i=>{const a=new Array(4);for(let u=0;u<4;u+=1){const f=e[u],d=r[u];a[u]=f*(1-i)+d*i}const[o,s,c,l]=a;return`rgba(${Math.round(o)}, ${Math.round(s)}, ${Math.round(c)}, ${l})`}},ol=(t,n)=>typeof t=="number"&&typeof n=="number"?Ho(t,n):typeof t=="string"&&typeof n=="string"?WR(t,n):()=>t,YR=(t,n)=>{const e=Ho(t,n);return r=>Math.round(e(r))};function GR(t,n){const{second:e,minute:r,hour:i,day:a,week:o,month:s,year:c}=n;return e.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":a.floor(t)<t?"hh A":s.floor(t)<t?o.floor(t)<t?"MMM DD":"ddd DD":c.floor(t)<t?"MMMM":"YYYY"}function S1({map:t,initKey:n},e){const r=n(e);return t.has(r)?t.get(r):e}function HR({map:t,initKey:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function VR({map:t,initKey:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function XR(t){return typeof t=="object"?t.valueOf():t}let E1=class extends Map{constructor(n){if(super(),this.map=new Map,this.initKey=XR,n!==null)for(const[e,r]of n)this.set(e,r)}get(n){return super.get(S1({map:this.map,initKey:this.initKey},n))}has(n){return super.has(S1({map:this.map,initKey:this.initKey},n))}set(n,e){return super.set(HR({map:this.map,initKey:this.initKey},n),e)}delete(n){return super.delete(VR({map:this.map,initKey:this.initKey},n))}},sl=class{transformBreaks(n){return n}constructor(n){var e;this.options=U({},this.getDefaultOptions()),this.update(!((e=n==null?void 0:n.breaks)===null||e===void 0)&&e.length?this.transformBreaks(n):n)}getOptions(){return this.options}update(n={}){const e=n.breaks?this.transformBreaks(n):n;this.options=U({},this.options,e),this.rescale(e)}rescale(n){}};const Ed=Symbol("defaultUnknown");function k1(t,n,e){for(let r=0;r<n.length;r+=1)t.has(n[r])||t.set(e(n[r]),r)}function M1(t){const{value:n,from:e,to:r,mapper:i,notFoundReturn:a}=t;let o=i.get(n);if(o===void 0){if(a!==Ed)return a;o=e.push(n)-1,i.set(n,o)}return r[o%r.length]}function A1(t){return t instanceof Date?n=>`${n}`:typeof t=="object"?n=>JSON.stringify(n):n=>n}let J_=class tS extends sl{getDefaultOptions(){return{domain:[],range:[],unknown:Ed}}constructor(n){super(n)}map(n){return this.domainIndexMap.size===0&&k1(this.domainIndexMap,this.getDomain(),this.domainKey),M1({value:this.domainKey(n),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(n){return this.rangeIndexMap.size===0&&k1(this.rangeIndexMap,this.getRange(),this.rangeKey),M1({value:this.rangeKey(n),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(n){const[e]=this.options.domain,[r]=this.options.range;if(this.domainKey=A1(e),this.rangeKey=A1(r),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!n||n.range)&&this.rangeIndexMap.clear(),(!n||n.domain||n.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new tS(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:n,compare:e}=this.options;return this.sortedDomain=e?[...n].sort(e):n,this.sortedDomain}};function UR(t){const n=t.reduce((e,r)=>Math.min(e,r),1/0);return n===1/0?[]:t.map(e=>e/n)}function qR(t,n){const e=t.length,r=n-e;return r>0?[...t,...new Array(r).fill(1)]:r<0?t.slice(0,n):t}function KR(t){return Math.round(t*1e12)/1e12}function ZR(t){const{domain:n,range:e,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t,c=n.length,l=qR(a,c),[u,f]=e,d=f-u,h=2/c*r+1-1/c*i,p=d/h,v=p*i/c,g=p-c*v,y=UR(l),m=y.reduce((T,A)=>T+A),b=g/m,x=new E1(n.map((T,A)=>{const P=y[A]*b;return[T,o?Math.floor(P):P]})),w=new E1(n.map((T,A)=>{const L=y[A]*b+v;return[T,o?Math.floor(L):L]})),O=Array.from(w.values()).reduce((T,A)=>T+A),S=(d-(O-O/c*i))*s,E=u+S;let k=o?Math.round(E):E;const M=new Array(c);for(let T=0;T<c;T+=1){M[T]=KR(k);const A=n[T];k+=w.get(A)}return{valueBandWidth:x,valueStep:w,adjustedRange:M}}function QR(t){var n;const{domain:e}=t,r=e.length;if(r===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((n=t.flex)===null||n===void 0)&&n.length))return ZR(t);const{range:a,paddingOuter:o,paddingInner:s,round:c,align:l}=t;let u,f,d=a[0];const p=a[1]-d,v=o*2,g=r-s;u=p/Math.max(1,v+g),c&&(u=Math.floor(u)),d+=(p-u*(r-s))*l,f=u*(1-s),c&&(d=Math.round(d),f=Math.round(f));const y=new Array(r).fill(0).map((m,b)=>d+b*u);return{valueStep:u,valueBandWidth:f,adjustedRange:y}}let kc=class eS extends J_{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Ed,flex:[]}}constructor(n){super(n)}clone(){return new eS(this.options)}getStep(n){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:n===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(n)}getBandWidth(n){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:n===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(n)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:n,paddingInner:e}=this.options;return n>0?n:e}getPaddingOuter(){const{padding:n,paddingOuter:e}=this.options;return n>0?n:e}rescale(){super.rescale();const{align:n,domain:e,range:r,round:i,flex:a}=this.options,{adjustedRange:o,valueBandWidth:s,valueStep:c}=QR({align:n,range:r,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=c,this.valueBandWidth=s,this.adjustedRange=o}};const JR=(t,n)=>{if(!(n!=null&&n.length))return t;const e=[...t,...n.flatMap(a=>[a.start,a.end])],i=Array.from(new Set(e)).sort((a,o)=>a-o).filter(a=>!n.some(({start:o,end:s})=>a>o&&a<s));return i.length?i:t},Zi=(t,n,e,r)=>{let i,a,o=t,s=n;if(o===s&&e>0)return[o];let c=Lu(o,s,e);if(c===0||!Number.isFinite(c))return[];if(c>0){o=Math.ceil(o/c),s=Math.floor(s/c),a=new Array(i=Math.ceil(s-o+1));for(let l=0;l<i;l+=1)a[l]=(o+l)*c}else{c=-c,o=Math.ceil(o*c),s=Math.floor(s*c),a=new Array(i=Math.ceil(s-o+1));for(let l=0;l<i;l+=1)a[l]=(o+l)/c}return JR(a,r)};let gg=class nS extends sl{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:Zi}}map(n){const[e]=this.options.range;return e!==void 0?e:this.options.unknown}invert(n){const[e]=this.options.range;return n===e&&e!==void 0?this.options.domain:[]}getTicks(){const{tickMethod:n,domain:e,tickCount:r}=this.options,[i,a]=e;return!he(i)||!he(a)?[]:n(i,a,r)}clone(){return new nS(this.options)}};function Os(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const t6=[1,5,2,2.5,4,3],T1=Number.EPSILON*100;function e6(t,n){return(t%n+n)%n}function n6(t){return Math.round(t*1e12)/1e12}function r6(t,n,e,r,i,a){const o=mc(n),s=d_(n,t);let c=0;const l=e6(r,a);return(l<T1||a-l<T1)&&r<=0&&i>=0&&(c=1),1-s/(o-1)-e+c}function i6(t,n,e){const r=mc(n);return 1-d_(n,t)/(r-1)-e+1}function a6(t,n,e,r,i,a){const o=(t-1)/(a-i),s=(n-1)/(Math.max(a,r)-Math.min(e,i));return 2-Math.max(o/s,s/o)}function o6(t,n){return t>=n?2-(t-1)/(n-1):1}function s6(t,n,e,r){const i=n-t;return 1-.5*((n-r)**2+(t-e)**2)/(.1*i)**2}function c6(t,n,e){const r=n-t;return e>r?1-((e-r)/2)**2/(.1*r)**2:1}function l6(){return 1}const yg=(t,n,e=5,r=!0,i=t6,a=[.25,.2,.5,.05])=>{const o=e<0?0:Math.round(e);if(Number.isNaN(t)||Number.isNaN(n)||typeof t!="number"||typeof n!="number"||!o)return[];if(n-t<1e-15||o===1)return[t];const s={score:-2,lmin:0,lmax:0,lstep:0};let c=1;for(;c<1/0;){for(let p=0;p<i.length;p+=1){const v=i[p],g=i6(v,i,c);if(a[0]*g+a[1]+a[2]+a[3]<s.score){c=1/0;break}let y=2;for(;y<1/0;){const m=o6(y,o);if(a[0]*g+a[1]+a[2]*m+a[3]<s.score)break;const b=(n-t)/(y+1)/c/v;let x=Math.ceil(Math.log10(b));for(;x<1/0;){const w=c*v*10**x,O=c6(t,n,w*(y-1));if(a[0]*g+a[1]*O+a[2]*m+a[3]<s.score)break;const _=Math.floor(n/w)*c-(y-1)*c,S=Math.ceil(t/w)*c;if(_<=S){const E=S-_;for(let k=0;k<=E;k+=1){const T=(_+k)*(w/c),A=T+w*(y-1),P=w,L=r6(v,i,c,T,A,P),I=s6(t,n,T,A),R=a6(y,o,t,n,T,A),C=l6(),N=a[0]*L+a[1]*I+a[2]*R+a[3]*C;N>s.score&&(!r||T<=t&&A>=n)&&(s.lmin=T,s.lmax=A,s.lstep=P,s.score=N)}}x+=1}y+=1}}c+=1}const l=Os(s.lmax),u=Os(s.lmin),f=Os(s.lstep),d=Math.floor(n6((l-u)/f))+1,h=new Array(d);h[0]=Os(u);for(let p=1;p<d;p+=1)h[p]=Os(h[p-1]+f);return h};let rS=class iS extends sl{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:yg}}map(n){return ff(n)?n:this.options.unknown}invert(n){return this.map(n)}clone(){return new iS(this.options)}getTicks(){const{domain:n,tickCount:e,tickMethod:r}=this.options,[i,a]=n;return!he(i)||!he(a)?[]:r(i,a,e)}};const u6=(t,n,e)=>{const[r,i]=t,[a,o]=n;let s,c;return r<i?(s=uf(r,i),c=e(a,o)):(s=uf(i,r),c=e(o,a)),Go(c,s)},f6=(t,n,e)=>{const r=Math.min(t.length,n.length)-1,i=new Array(r),a=new Array(r),o=t[0]>t[r],s=o?[...t].reverse():t,c=o?[...n].reverse():n;for(let l=0;l<r;l+=1)i[l]=uf(s[l],s[l+1]),a[l]=e(c[l],c[l+1]);return l=>{const u=dg(t,l,1,r)-1,f=i[u],d=a[u];return Go(d,f)(l)}},P1=(t,n,e,r)=>(Math.min(t.length,n.length)>2?f6:u6)(t,n,r?YR:e);let kd=class extends sl{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Ho,tickCount:5}}map(n){return ff(n)?this.output(n):this.options.unknown}invert(n){return ff(n)?this.input(n):this.options.unknown}nice(){if(!this.options.nice||Ge(this.options.breaks))return;const[n,e,r,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(n,e,r,...i)}getTicks(){const{tickMethod:n}=this.options,[e,r,i,...a]=this.getTickMethodOptions();return n(e,r,i,...a)}getTickMethodOptions(){const{domain:n,tickCount:e}=this.options,r=n[0],i=n[n.length-1];return[r,i,e]}chooseNice(){return hg}rescale(){this.nice();const[n,e]=this.chooseTransforms();this.composeOutput(n,this.chooseClamp(n)),this.composeInput(n,e,this.chooseClamp(e))}chooseClamp(n){const{clamp:e,range:r}=this.options,i=this.options.domain.map(n),a=Math.min(i.length,r.length);return e?gR(i[0],i[a-1]):Zr}composeOutput(n,e){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=P1(r.map(n),i,o,a);this.output=Go(s,e,n)}composeInput(n,e,r){const{domain:i,range:a}=this.options,o=P1(a,i.map(n),Ho);this.input=Go(e,r,o)}},wi=class aS extends kd{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:ol,tickMethod:Zi,tickCount:5}}removeUnsortedValues(n,e,r){let i=-1/0;return e.reduce((o,s,c)=>{if(c===0)return o;const l=i>0?i:s;return i>0&&(r?s>i:s<i)?o.push(c):(l-e[c-1])*(r?-1:1)<0?(i<0&&(i=e[c-1]),o.push(c)):i=-1/0,o},[]).slice().reverse().forEach(o=>{n.splice(o,1),e.splice(o,1)}),{breaksDomain:n,breaksRange:e}}transformDomain(n){const e=[.2,.8],r=.03,{domain:i=[],range:a=[1,0],breaks:o=[],tickCount:s=5,nice:c}=n,[l,u]=[Math.min(...i),Math.max(...i)];let f=l,d=u;if(c&&o.length<2){const E=this.chooseNice()(l,u,s);f=E[0],d=E[E.length-1]}const h=Math.min(f,l);let p=Math.max(d,u);const v=o.filter(({end:E})=>E<p).sort((E,k)=>E.start-k.start),g=Zi(h,p,s,v);if(Hn(g)<p){const E=hg(0,p-Hn(g),3);g.push(Hn(g)+Hn(E)),p=Hn(g)}const[y,m]=[a[0],Hn(a)],b=p-h,x=Math.abs(m-y),w=y>m,O=g.map(E=>{const k=(E-h)/b;return w?y-k*x:y+k*x}),[_,S]=e;return v.forEach(({start:E,end:k,gap:M=r,compress:T="middle"})=>{const A=g.indexOf(E),P=g.indexOf(k);let L=(O[A]+O[P])/2;T==="start"&&(L=O[A]),T==="end"&&(L=O[P]);const I=M*x/2;let R=w?L+I:L-I,C=w?L-I:L+I;R<_&&(C+=_-R,R=_),C>S&&(R-=C-S,C=S),R>S&&(C-=R-S,R=S),C<_&&(R+=_-C,C=_),O[A]=R,O[P]=C}),this.removeUnsortedValues(g,O,w)}transformBreaks(n){const{domain:e,breaks:r=[]}=n;if(!Ge(n.breaks))return n;const i=Math.max(...e),a=r.filter(({end:l})=>l<i),o={...n,breaks:a},{breaksDomain:s,breaksRange:c}=this.transformDomain(o);return{...n,domain:s,range:c,breaks:a,tickMethod:()=>[...s]}}chooseTransforms(){return[Zr,Zr]}clone(){return new aS(this.options)}},d6=class oS extends kc{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Ed,paddingInner:1,paddingOuter:0}}constructor(n){super(n)}getPaddingInner(){return 1}clone(){return new oS(this.options)}update(n){super.update(n)}getPaddingOuter(){return this.options.padding}};const h6=t=>n=>n<0?-((-n)**t):n**t,p6=t=>n=>n<0?-((-n)**(1/t)):n**(1/t),v6=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);let sS=class cS extends kd{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:ol,tickMethod:Zi,tickCount:5}}constructor(n){super(n)}chooseTransforms(){const{exponent:n}=this.options;if(n===1)return[Zr,Zr];const e=n===.5?v6:h6(n),r=p6(n);return[e,r]}clone(){return new cS(this.options)}},g6=class lS extends sS{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:ol,tickMethod:Zi,tickCount:5,exponent:.5}}constructor(n){super(n)}update(n){super.update(n)}clone(){return new lS(this.options)}},Md=class uS extends sl{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(n){super(n)}map(n){if(!ff(n))return this.options.unknown;const e=dg(this.thresholds,n,0,this.n);return this.options.range[e]}invert(n){const{range:e}=this.options,r=e.indexOf(n),i=this.thresholds;return[i[r-1],i[r]]}clone(){return new uS(this.options)}rescale(){const{domain:n,range:e}=this.options;this.n=Math.min(n.length,e.length-1),this.thresholds=n}};const y6=(t,n,e,r=10)=>{const i=t<0,a=vg(r,i),o=pg(r,i),s=n<t,c=s?n:t,l=s?t:n;let u=o(c),f=o(l),d=[];if(!(r%1)&&f-u<e){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){const h=a(u);for(let p=r-1;p>=1;p-=1){const v=h*p;if(v>l)break;v>=c&&d.push(v)}}else for(;u<=f;u+=1){const h=a(u);for(let p=1;p<r;p+=1){const v=h*p;if(v>l)break;v>=c&&d.push(v)}}d.length*2<e&&(d=Zi(c,l,e))}else{const h=e===-1?f-u:Math.min(f-u,e);d=Zi(u,f,h).map(a)}return s?d.reverse():d};let m6=class fS extends kd{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:ol,tickMethod:y6,tickCount:5}}chooseNice(){return NR}getTickMethodOptions(){const{domain:n,tickCount:e,base:r}=this.options,i=n[0],a=n[n.length-1];return[i,a,e,r]}chooseTransforms(){const{base:n,domain:e}=this.options,r=e[0]<0;return[pg(n,r),vg(n,r)]}clone(){return new fS(this.options)}},dS=class hS extends Md{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:yg}}constructor(n){super(n)}nice(){const{nice:n}=this.options;if(n){const[e,r,i]=this.getTickMethodOptions();this.options.domain=hg(e,r,i)}}getTicks(){const{tickMethod:n}=this.options,[e,r,i]=this.getTickMethodOptions();return n(e,r,i)}getTickMethodOptions(){const{domain:n,tickCount:e}=this.options,r=n[0],i=n[n.length-1];return[r,i,e]}rescale(){this.nice();const{range:n,domain:e}=this.options,[r,i]=e;this.n=n.length-1,this.thresholds=new Array(this.n);for(let a=0;a<this.n;a+=1)this.thresholds[a]=((a+1)*i-(a-this.n)*r)/(this.n+1)}invert(n){const[e,r]=super.invert(n),[i,a]=this.options.domain;return e===void 0&&r===void 0?[e,r]:[e||i,r||a]}getThresholds(){return this.thresholds}clone(){return new hS(this.options)}};function b6(t,n){const e=t.length;if(!e)return;if(e<2)return t[e-1];const r=(e-1)*n,i=Math.floor(r),a=t[i],o=t[i+1];return a+(o-a)*(r-i)}function x6(t,n,e=!1){const r=t;e||r.sort((a,o)=>a-o);const i=[];for(let a=1;a<n;a+=1)i.push(b6(r,a/n));return i}let pS=class vS extends Md{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:yg}}constructor(n){super(n)}rescale(){const{domain:n,range:e}=this.options;this.n=e.length-1,this.thresholds=x6(n,this.n+1,!1)}invert(n){const[e,r]=super.invert(n),{domain:i}=this.options,a=i[0],o=i[i.length-1];return e===void 0&&r===void 0?[e,r]:[e||a,r||o]}getThresholds(){return this.thresholds}clone(){return new vS(this.options)}getTicks(){const{tickCount:n,domain:e,tickMethod:r}=this.options,i=e.length-1,a=e[0],o=e[i];return r(a,o,n)}};var w6=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,O6=/\[([^]*?)\]/gm;function gS(t,n){for(var e=[],r=0,i=t.length;r<i;r++)e.push(t[r].substr(0,n));return e}function mv(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0,i=n;r<i.length;r++){var a=i[r];for(var o in a)t[o]=a[o]}return t}var yS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],mS=["January","February","March","April","May","June","July","August","September","October","November","December"],_6=gS(mS,3),S6=gS(yS,3),E6={dayNamesShort:S6,dayNames:yS,monthNamesShort:_6,monthNames:mS,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},k6=mv({},E6),Rn=function(t,n){for(n===void 0&&(n=2),t=String(t);t.length<n;)t="0"+t;return t},M6={D:function(t){return String(t.getDate())},DD:function(t){return Rn(t.getDate())},Do:function(t,n){return n.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Rn(t.getDay())},ddd:function(t,n){return n.dayNamesShort[t.getDay()]},dddd:function(t,n){return n.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return Rn(t.getMonth()+1)},MMM:function(t,n){return n.monthNamesShort[t.getMonth()]},MMMM:function(t,n){return n.monthNames[t.getMonth()]},YY:function(t){return Rn(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Rn(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Rn(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Rn(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Rn(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Rn(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Rn(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Rn(t.getMilliseconds(),3)},a:function(t,n){return t.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(t,n){return t.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+Rn(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+Rn(Math.floor(Math.abs(n)/60),2)+":"+Rn(Math.abs(n)%60,2)}},C1={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},A6=function(t,n,e){if(n===void 0&&(n=C1.default),e===void 0&&(e={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");n=C1[n]||n;var r=[];n=n.replace(O6,function(a,o){return r.push(o),"@@@"});var i=mv(mv({},k6),e);return n=n.replace(w6,function(a){return M6[a](t,i)}),n.replace(/@@@/g,function(){return r.shift()})};const T6=(t,n,e,r,i)=>{const a=t>n,o=a?n:t,s=a?t:n,[c,l]=K_(o,s,e,r,i),u=c.range(o,new Date(+s+1),l,!0);return a?u.reverse():u};function P6(t){const n=t.getTimezoneOffset(),e=new Date(t);return e.setMinutes(e.getMinutes()+n,e.getSeconds(),e.getMilliseconds()),e}let C6=class bS extends kd{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:T6,interpolate:Ho,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return LR}getTickMethodOptions(){const{domain:n,tickCount:e,tickInterval:r,utc:i}=this.options,a=n[0],o=n[n.length-1];return[a,o,e,r,i]}getFormatter(){const{mask:n,utc:e}=this.options,r=e?q_:X_,i=e?P6:Zr;return a=>A6(i(a),n||GR(a,r))}clone(){return new bS(this.options)}};var L6=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a},bv;function N6(t){return[t(0),t(1)]}const R6=t=>{const[n,e]=t;return Go(Ho(0,1),uf(n,e))};let xv=bv=class extends wi{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Zr,tickMethod:Zi,tickCount:5}}constructor(n){super(n)}clone(){return new bv(this.options)}};xv=bv=L6([IR(N6,R6)],xv);var I6=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,n||[])).next())})};function j6(t){var n;let e=t;for(;e;){if(((n=e.attributes)===null||n===void 0?void 0:n.class)==="view")return e;e=e.parentNode}return null}function Ad(t){const{markType:n,nodeName:e}=t;return n==="heatmap"&&e==="image"}function mg(t,n){const e=n??j6(t).__data__,r=t.__data__,{markKey:i,index:a,seriesIndex:o,normalized:s={x:0}}=r,{markState:c}=e,l=Array.from(c.keys()).find(u=>u.key===i);if(l)return o?o.map(u=>l.data[u]):Ad(t)?l.data[Math.round(l.data.length*s.x)]:l.data[a]}function D6(t,n){var e,r,i,a;const o=(e=n.markKey)!==null&&e!==void 0?e:(i=(r=n.element)===null||r===void 0?void 0:r.__data__)===null||i===void 0?void 0:i.markKey,s=Object.keys(t).find(c=>{if(c.startsWith("series")){const l=t[c].getOptions();return l.name==="series"&&l.markKey===o}});return(a=t[s])!==null&&a!==void 0?a:t.series}function $6(t,n){const{color:e,facet:r=!1}=t,{color:i,series:a}=n,o=D6(t,n),s=c=>c&&c.invert&&!(c instanceof kc)&&!(c instanceof gg);if(s(o))return o.clone().invert(a);if(a&&o instanceof kc&&o.invert(a)!==i&&!r)return o.invert(a);if(s(e)){const c=e.invert(i);return Array.isArray(c)?null:c}return null}function Ga(t){return t}function bg(t){return t.reduce((n,e)=>(r,...i)=>e(n(r,...i),...i),Ga)}function F6(t){return t.reduce((n,e)=>r=>I6(this,void 0,void 0,function*(){const i=yield n(r);return e(i)}),Ga)}function xg(t){return t.replace(/( |^)[a-z]/g,n=>n.toUpperCase())}function Vo(t=""){throw new Error(t)}function Td(t,n){const{attributes:e}=n,r=new Set(["id","className"]);for(const[i,a]of Object.entries(e))r.has(i)||t.attr(i,a)}function fe(t){return t!=null&&!Number.isNaN(t)}function B6(t){const n=new Map;return e=>{if(n.has(e))return n.get(e);const r=t(e);return n.set(e,r),r}}function z6(t,n){const{transform:e}=t.style,i=(a=>a==="none"||a===void 0)(e)?"":e;t.style.transform=`${i} ${n}`.trimStart()}function nt(t,n){return xS(t,n)||{}}function xS(t,n){const e=Object.entries(t||{}).filter(([r])=>r.startsWith(n)).map(([r,i])=>[s_(r.replace(n,"").trim()),i]).filter(([r])=>!!r);return e.length===0?null:Object.fromEntries(e)}function W6(t,n){return Object.fromEntries(Object.entries(t).filter(([e])=>n.find(r=>e.startsWith(r))))}function Nu(t,...n){return Object.fromEntries(Object.entries(t).filter(([e])=>n.every(r=>!e.startsWith(r))))}function L1(t,n){if(t===void 0)return null;if(typeof t=="number")return t;const e=+t.replace("%","");return Number.isNaN(e)?null:e/100*n}function Xo(t){return typeof t=="object"&&!(t instanceof Date)&&t!==null&&!Array.isArray(t)}function Oi(t){return t===null||t===!1}function wS(t,n,e=5,r=0){if(!(r>=e)){for(const i of Object.keys(n)){const a=n[i];!xi(a)||!xi(t[i])?t[i]=a:wS(t[i],a,e,r+1)}return t}}function Qr(t,n){return Object.entries(t).reduce((e,[r,i])=>(e[r]=n(i,r,t),e),{})}function to(t){return t.map((n,e)=>e)}function Y6(t){return t[0]}function OS(t){return t[t.length-1]}function G6(t){return Array.from(new Set(t))}function _S(t,n){const e=[[],[]];return t.forEach(r=>{e[n(r)?0:1].push(r)}),e}function SS(t,n=t.length){if(n===1)return t.map(r=>[r]);const e=[];for(let r=0;r<t.length;r++){const i=t.slice(r+1);SS(i,n-1).forEach(o=>{e.push([t[r],...o])})}return e}function H6(t){if(t.length===1)return[t];const n=[];for(let e=1;e<=t.length;e++)n.push(...SS(t,e));return n}function ra(t,n,e){const{encode:r}=e;if(t===null)return[n];const i=V6(t).map(o=>{var s;return[o,(s=zt(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>fe(o));return Array.from(le(n,o=>i.map(([,s])=>s[o]).join("-")).values())}function ES(t){return Array.isArray(t)?q6(t):typeof t=="function"?U6(t):t==="series"?X6:t==="value"?K6:t==="sum"?Z6:t==="maxIndex"?Q6:null}function kS(t,n){for(const e of t)e.sort(n)}function MS(t,n){return(n==null?void 0:n.domain)||Array.from(new Set(t))}function V6(t){return Array.isArray(t)?t:[t]}function X6(t,n,e){return cl(r=>e[r])}function U6(t){return(n,e,r)=>cl(i=>t(n[i]))}function q6(t){return(n,e,r)=>(i,a)=>t.reduce((o,s)=>o!==0?o:Re(n[i][s],n[a][s]),0)}function K6(t,n,e){return cl(r=>n[r])}function Z6(t,n,e){const r=to(t),i=Array.from(le(r,o=>e[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((c,l)=>c+ +n[l])]));return cl(o=>a.get(e[o]))}function Q6(t,n,e){const r=to(t),i=Array.from(le(r,o=>e[+o]).entries()),a=new Map(i.map(([o,s])=>[o,us(s,c=>n[c])]));return cl(o=>a.get(e[o]))}function cl(t){return(n,e)=>Re(t(n),t(e))}const AS=(t={})=>{const{groupBy:n="x",orderBy:e=null,reverse:r=!1,y:i="y",y1:a="y1",series:o=!0}=t;return(s,c)=>{var l;const{data:u,encode:f,style:d={}}=c,[h,p]=zt(f,"y"),[v,g]=zt(f,"y1"),[y]=o?cf(f,"series","color"):zt(f,"color"),m=ra(n,s,c),x=((l=ES(e))!==null&&l!==void 0?l:(()=>null))(u,h,y);x&&kS(m,x);const w=new Array(s.length),O=new Array(s.length),_=new Array(s.length),S=[],E=[];for(const L of m){r&&L.reverse();const I=v?+v[L[0]]:0,R=[],C=[];for(const W of L){const G=_[W]=+h[W]-I;G<0?C.push(W):G>=0&&R.push(W)}const N=R.length>0?R:C,j=C.length>0?C:R;let D=R.length-1,$=0;for(;D>0&&h[N[D]]===0;)D--;for(;$<j.length-1&&h[j[$]]===0;)$++;S.push(N[D]),E.push(j[$]);let B=I;for(const W of C.reverse()){const G=_[W];B=w[W]=(O[W]=B)+G}let z=I;for(const W of R){const G=_[W];G>0?z=w[W]=(O[W]=z)+G:w[W]=O[W]=z}}const k=new Set(S),M=new Set(E),T=i==="y"?w:O,A=a==="y"?w:O;let P;return c.type==="point"?P={y0:bc(h,p),y:ue(T,p)}:P={y0:bc(h,p),y:ue(T,p),y1:ue(A,g)},[s,U({},c,{encode:Object.assign({},P),style:Object.assign({first:(L,I)=>k.has(I),last:(L,I)=>M.has(I)},d)})]}};AS.props={};function _s(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function J6(t){const n=t.getFullYear(),e=_s(t.getMonth()+1),r=_s(t.getDate()),i=`${n}-${e}-${r}`,a=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return a||o||s?`${i} ${_s(a)}:${_s(o)}:${_s(s)}`:i}const Pd=(t={})=>{const{channel:n="x"}=t;return(e,r)=>{const{encode:i}=r,{tooltip:a}=r;if(Oi(a))return[e,r];const{title:o}=a;if(o!==void 0)return[e,r];const s=Object.keys(i).filter(l=>l.startsWith(n)).filter(l=>!i[l].inferred).map(l=>zt(i,l)).filter(([l])=>l).map(l=>l[0]);if(s.length===0)return[e,r];const c=[];for(const l of e)c[l]={value:s.map(u=>u[l]instanceof Date?J6(u[l]):u[l]).join(", ")};return[e,U({},r,{tooltip:{title:c}})]}};Pd.props={};const ia=()=>(t,n)=>{const{encode:e}=n,{x:r}=e;return r!==void 0?[t,n]:[t,U({},n,{encode:{x:bc(Vi(t,0))},scale:{x:{guide:null}}})]};ia.props={};const ll=()=>(t,n)=>{const{encode:e}=n,{y:r}=e;return r!==void 0?[t,n]:[t,U({},n,{encode:{y:bc(Vi(t,0))},scale:{y:{guide:null}}})]};ll.props={};const wg=()=>(t,n)=>{const{encode:e}=n,{size:r}=e;return r!==void 0?[t,n]:[t,U({},n,{encode:{size:sf(Vi(t,3))}})]};wg.props={};var tI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const TS=()=>(t,n)=>{const{encode:e}=n,{key:r}=e,i=tI(e,["key"]);if(r!==void 0)return[t,n];const a=Object.values(i).map(({value:s})=>s),o=t.map(s=>a.filter(Array.isArray).map(c=>c[s]).join("-"));return[t,U({},n,{encode:{key:ue(o)}})]};TS.props={};const Og=()=>(t,n)=>{const{encode:e}=n,{series:r,color:i}=e;if(r!==void 0||i===void 0)return[t,n];const[a,o]=zt(e,"color");return[t,U({},n,{encode:{series:ue(a,o)}})]};Og.props={};const PS=()=>(t,n)=>{const{data:e}=n;return!Array.isArray(e)||e.some(rl)?[t,n]:[t,U({},n,{encode:{y:ue(e)}})]};PS.props={};const CS=()=>(t,n)=>{const{data:e}=n;return!Array.isArray(e)||e.some(rl)?[t,n]:[t,U({},n,{encode:{x:ue(e)}})]};CS.props={};const LS=()=>(t,n)=>{const{encode:e}=n,{y1:r}=e;if(r)return[t,n];const[i]=zt(e,"y");return[t,U({},n,{encode:{y1:ue([...i])}})]};LS.props={};const NS=()=>(t,n)=>{const{encode:e}=n,{x1:r}=e;if(r)return[t,n];const[i]=zt(e,"x");return[t,U({},n,{encode:{x1:ue([...i])}})]};NS.props={};const RS=()=>(t,n)=>{const{data:e}=n;if(Array.isArray(e)&&(e.every(Array.isArray)||!e.some(rl))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,U({},n,{encode:{x:ue(r(e,0)),x1:ue(r(e,1))}})]}return[t,n]};RS.props={};const IS=()=>(t,n)=>{const{data:e}=n;if(Array.isArray(e)&&(e.every(Array.isArray)||!e.some(rl))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,U({},n,{encode:{y:ue(r(e,0)),y1:ue(r(e,1))}})]}return[t,n]};IS.props={};const Cd=t=>{const{channel:n}=t;return(e,r)=>{const{encode:i,tooltip:a}=r;if(Oi(a))return[e,r];const{items:o=[]}=a;if(!o||o.length>0)return[e,r];const c=(Array.isArray(n)?n:[n]).flatMap(l=>Object.keys(i).filter(u=>u.startsWith(l)).map(u=>{const{field:f,value:d,inferred:h=!1,aggregate:p}=i[u];return h?null:p&&d?{channel:u}:f?{field:f}:d?{channel:u}:null}).filter(u=>u!==null));return[e,U({},r,{tooltip:{items:c}})]}};Cd.props={};const _g=()=>(t,n)=>[t,U({scale:{x:{padding:0},y:{padding:0}}},n)];_g.props={};var N1=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Ld=()=>(t,n)=>{const{data:e,style:r={}}=n,i=N1(n,["data","style"]),{x:a,y:o}=r,s=N1(r,["x","y"]);if(a==null||o==null)return[t,n];const c=a||0,l=o||0;return[[0],U({},i,{data:[0],cartesian:!0,encode:{x:ue([c]),y:ue([l])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};Ld.props={};const jS=()=>(t,n)=>{const{style:e={}}=n;return[t,U({},n,{style:Object.assign(Object.assign({},e),Object.fromEntries(Object.entries(e).filter(([,r])=>typeof r=="function").map(([r,i])=>[r,()=>i])))})]};jS.props={};const Nd=()=>(t,n)=>{const{data:e}=n;if(!Array.isArray(e)||e.some(rl))return[t,n];const r=Array.isArray(e[0])?e:[e],i=r.map(o=>o[0]),a=r.map(o=>o[1]);return[t,U({},n,{encode:{x:ue(i),y:ue(a)}})]};Nd.props={};const DS=()=>(t,n)=>{const{style:e={},encode:r}=n,{series:i}=r,{gradient:a}=e;return!a||i?[t,n]:[t,U({},n,{encode:{series:sf(Vi(t,void 0))}})]};DS.props={};var eI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const $S=(t={})=>{const{groupBy:n="x",reverse:e=!1,orderBy:r,padding:i}=t;return eI(t,["groupBy","reverse","orderBy","padding"]),(a,o)=>{const{data:s,encode:c,scale:l}=o,{series:u}=l,[f]=zt(c,"y"),[d]=cf(c,"series","color"),h=MS(d,u),p=U({},o,{scale:{series:{domain:h,paddingInner:i}}}),v=ra(n,a,o),g=ES(r);if(!g)return[a,U(p,{encode:{series:ue(d)}})];const y=g(s,f,d);y&&kS(v,y);const m=new Array(a.length);for(const b of v){e&&b.reverse();for(let x=0;x<b.length;x++)m[b[x]]=h[x]}return[a,U(p,{encode:{series:ue(r?m:d)}})]}};$S.props={};const FS=t=>{const{groupBy:n=["x"],reducer:e=(o,s)=>s[o[0]],orderBy:r=null,reverse:i=!1,duration:a}=t;return(o,s)=>{const{encode:c}=s,u=(Array.isArray(n)?n:[n]).map(g=>[g,zt(c,g)[0]]);if(u.length===0)return[o,s];let f=[o];for(const[,g]of u){const y=[];for(const m of f){const b=Array.from(le(m,x=>g[x]).values());y.push(...b)}f=y}if(r){const[g]=zt(c,r);g&&f.sort((y,m)=>e(y,g)-e(m,g)),i&&f.reverse()}const d=(a||3e3)/f.length,[h]=a?[Vi(o,d)]:cf(c,"enterDuration",Vi(o,d)),[p]=cf(c,"enterDelay",Vi(o,0)),v=new Array(o.length);for(let g=0,y=0;g<f.length;g++){const m=f[g],b=Qt(m,x=>+h[x]);for(const x of m)v[x]=+p[x]+y;y+=b}return[o,U({},s,{encode:{enterDuration:sf(h),enterDelay:sf(v)}})]}};FS.props={};var nI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function rI(t){return typeof t=="function"?t:{min:(e,r)=>Xn(e,i=>r[+i]),max:(e,r)=>Qt(e,i=>r[+i]),first:(e,r)=>r[e[0]],last:(e,r)=>r[e[e.length-1]],mean:(e,r)=>Oc(e,i=>r[+i]),median:(e,r)=>fg(e,i=>r[+i]),sum:(e,r)=>lr(e,i=>r[+i]),deviation:(e,r)=>z_(e,i=>r[+i])}[t]||Qt}const BS=(t={})=>{const{groupBy:n="x",basis:e="max"}=t;return(r,i)=>{const{encode:a,tooltip:o}=i,{x:s}=a,c=nI(a,["x"]),l=Object.entries(c).filter(([v])=>v.startsWith("y")).map(([v])=>[v,zt(a,v)[0]]),[,u]=l.find(([v])=>v==="y"),f=l.map(([v])=>[v,new Array(r.length)]),d=ra(n,r,i),h=rI(e);for(const v of d){const g=h(v,u);for(const y of v)for(let m=0;m<l.length;m++){const[,b]=l[m],[,x]=f[m];x[y]=+b[y]/g}}const p=Oi(o)||(o==null?void 0:o.items)&&(o==null?void 0:o.items.length)!==0;return[r,U({},i,Object.assign({encode:Object.fromEntries(f.map(([v,g])=>[v,ue(g,zt(a,v)[1])]))},!p&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};BS.props={};function df(t,n,e){if(t===null)return[-.5,.5];const r=MS(t,n),a=new kc({domain:r,range:[0,1],padding:e}).getBandWidth();return[-a/2,a/2]}function hf(t,n,e){return n*(1-t)+e*t}const zS=(t={})=>{const{padding:n=0,paddingX:e=n,paddingY:r=n,random:i=Math.random}=t;return(a,o)=>{const{encode:s,scale:c}=o,{x:l,y:u}=c,[f]=zt(s,"x"),[d]=zt(s,"y"),h=df(f,l,e),p=df(d,u,r),v=a.map(()=>hf(i(),...p)),g=a.map(()=>hf(i(),...h));return[a,U({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:ue(v),dx:ue(g)}})]}};zS.props={};const WS=(t={})=>{const{padding:n=0,random:e=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[c]=zt(a,"x"),l=df(c,s,n),u=r.map(()=>hf(e(),...l));return[r,U({scale:{x:{padding:.5}}},i,{encode:{dx:ue(u)}})]}};WS.props={};const YS=(t={})=>{const{padding:n=0,random:e=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[c]=zt(a,"y"),l=df(c,s,n),u=r.map(()=>hf(e(),...l));return[r,U({scale:{y:{padding:.5}}},i,{encode:{dy:ue(u)}})]}};YS.props={};var iI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const GS=(t={})=>{const{groupBy:n="x"}=t;return(e,r)=>{const{encode:i,style:a={}}=r,{x:o}=i,s=iI(i,["x"]),c=Object.entries(s).filter(([h])=>h.startsWith("y")).map(([h])=>[h,zt(i,h)[0]]),l=c.map(([h])=>[h,new Array(e.length)]),u=ra(n,e,r),f=new Array(u.length);for(let h=0;h<u.length;h++){const v=u[h].flatMap(m=>c.map(([,b])=>+b[m])),[g,y]=gi(v);f[h]=(g+y)/2}const d=Math.max(...f);for(let h=0;h<u.length;h++){const p=d-f[h],v=u[h];for(const g of v)for(let y=0;y<c.length;y++){const[,m]=c[y],[,b]=l[y];b[g]=+m[g]+p}}return[e,U({},r,{encode:Object.fromEntries(l.map(([h,p])=>[h,ue(p,zt(i,h)[1])])),style:Object.assign({first:(h,p)=>p===0,last:(h,p)=>p===u.length-1},a)})]}};GS.props={};const HS=(t={})=>{const{groupBy:n="x"}=t;return(e,r)=>{const{encode:i}=r,[a]=zt(i,"y"),[o,s]=zt(i,"y1"),c=ra(n,e,r),l=new Array(e.length);for(const u of c){const f=u.map(d=>+a[d]);for(let d=0;d<u.length;d++){const h=u[d],p=Math.max(...f.filter((v,g)=>g!==d));l[h]=+a[h]>p?p:a[h]}}return[e,U({},r,{encode:{y1:ue(l,s)}})]}};HS.props={};function R1(t,n){return[t[0]]}function aI(t,n){const e=t.length-1;return[t[e]]}function oI(t,n){const e=us(t,r=>n[r]);return[t[e]]}function sI(t,n){const e=al(t,r=>n[r]);return[t[e]]}function cI(t){return typeof t=="function"?t:{first:R1,last:aI,max:oI,min:sI}[t]||R1}const Rd=(t={})=>{const{groupBy:n="series",channel:e,selector:r}=t;return(i,a)=>{const{encode:o}=a,s=ra(n,i,a),[c]=zt(o,e),l=cI(r);return[s.flatMap(u=>l(u,c)),a]}};Rd.props={};var lI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const VS=(t={})=>{const{selector:n}=t,e=lI(t,["selector"]);return Rd(Object.assign({channel:"x",selector:n},e))};VS.props={};var uI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const XS=(t={})=>{const{selector:n}=t,e=uI(t,["selector"]);return Rd(Object.assign({channel:"y",selector:n},e))};XS.props={};var fI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function aa(t){return n=>n===null?t:`${t} of ${n}`}function dI(t){if(typeof t=="function")return[t,null];const e={mean:hI,max:vI,count:yI,first:bI,last:xI,sum:mI,min:gI,median:pI}[t];if(!e)throw new Error(`Unknown reducer: ${t}.`);return e()}function hI(){const t=(e,r)=>Oc(e,i=>+r[i]),n=aa("mean");return[t,n]}function pI(){const t=(e,r)=>fg(e,i=>+r[i]),n=aa("median");return[t,n]}function vI(){const t=(e,r)=>Qt(e,i=>+r[i]),n=aa("max");return[t,n]}function gI(){const t=(e,r)=>Xn(e,i=>+r[i]),n=aa("min");return[t,n]}function yI(){const t=(e,r)=>e.length,n=aa("count");return[t,n]}function mI(){const t=(e,r)=>lr(e,i=>+r[i]),n=aa("sum");return[t,n]}function bI(){const t=(e,r)=>r[e[0]],n=aa("first");return[t,n]}function xI(){const t=(e,r)=>r[e[e.length-1]],n=aa("last");return[t,n]}const Sg=(t={})=>{const{groupBy:n}=t,e=fI(t,["groupBy"]);return(r,i)=>{const{data:a,encode:o}=i,s=n(r,i);if(!s)return[r,i];const c=(h,p)=>{if(h)return h;const{from:v}=p;if(!v)return h;const[,g]=zt(o,v);return g},l=Object.entries(e).map(([h,p])=>{const[v,g]=dI(p),[y,m]=zt(o,h),b=c(m,p),x=s.map(w=>v(w,y??a));return[h,Object.assign(Object.assign({},W4(x,(g==null?void 0:g(b))||b)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,v]=zt(o,h),g=s.map(y=>p[y[0]]);return[h,ue(g,v)]}),f=s.map(h=>a[h[0]]);return[to(s),U({},i,{data:f,encode:Object.fromEntries([...u,...l])})]}};Sg.props={};var wI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const ul=(t={})=>{const{channels:n=["x","y"]}=t,e=wI(t,["channels"]),r=(i,a)=>ra(n,i,a);return Sg(Object.assign(Object.assign({},e),{groupBy:r}))};ul.props={};const US=(t={})=>ul(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));US.props={};const qS=(t={})=>ul(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));qS.props={};const KS=(t={})=>ul(Object.assign(Object.assign({},t),{channels:["color"]}));KS.props={};function OI(t,n,e){const{by:r=t,reducer:i="max"}=n,[a]=zt(e,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>Qt(o,s=>+a[s]);if(i==="min")return o=>Xn(o,s=>+a[s]);if(i==="sum")return o=>lr(o,s=>+a[s]);if(i==="median")return o=>fg(o,s=>+a[s]);if(i==="mean")return o=>Oc(o,s=>+a[s]);if(i==="first")return o=>a[o[0]];if(i==="last")return o=>a[o[o.length-1]];throw new Error(`Unknown reducer: ${i}`)}function _I(t,n,e){if(!Array.isArray(e))return t;const r=new Set(e);return t.filter(i=>r.has(n[i]))}const Id=(t={})=>(n,e)=>{const{reverse:r,slice:i,channel:a,by:o,ordinal:s=!0,reducer:c}=t,{encode:l,scale:u={}}=e,f=u[a].domain,[d]=zt(l,o??a),[h]=zt(l,a),p=OI(a,{by:o,reducer:c},l),v=_I(n,h,f),g=eR(v,p,x=>h[x]),y=s?n:Er(n,x=>d[x]);r&&(!s&&y.reverse(),g.reverse());const m=typeof i=="number"?[0,i]:i,b=i?g.slice(...m):g;return[y,U(e,{scale:{[a]:{domain:b}}})]};Id.props={};const ZS=(t={})=>Id(Object.assign(Object.assign({},t),{channel:"x"}));ZS.props={};const QS=(t={})=>Id(Object.assign(Object.assign({},t),{channel:"color"}));QS.props={};const JS=(t={})=>Id(Object.assign(Object.assign({},t),{channel:"y"}));JS.props={};function SI(t,n){return typeof n=="string"?t.map(e=>e[n]):t.map(n)}function EI(t,n){if(typeof t=="function")return e=>t(e,n);if(t==="sum")return e=>lr(e,r=>+n[r]);throw new Error(`Unknown reducer: ${t}`)}const tE=(t={})=>{const{field:n,channel:e="y",reducer:r="sum"}=t;return(i,a)=>{const{data:o,encode:s}=a,[c]=zt(s,"x"),l=n?SI(o,n):zt(s,e)[0],u=EI(r,l),f=lg(i,u,d=>c[d]).map(d=>d[1]);return[i,U({},a,{scale:{x:{flex:f}}})]}};tE.props={};function je([t,n],[e,r]){return[t-e,n-r]}function Cl([t,n],[e,r]){return[t+e,n+r]}function Te([t,n],[e,r]){return Math.sqrt(Math.pow(t-e,2)+Math.pow(n-r,2))}function fr([t,n]){return Math.atan2(n,t)}function Uo([t,n]){return fr([t,n])+Math.PI/2}function eE(t,n){const e=fr(t),r=fr(n);return e<r?r-e:Math.PI*2-(e-r)}function Eg(t){let n=1/0,e=-1/0,r=1/0,i=-1/0;for(const[s,c]of t)n=Math.min(s,n),e=Math.max(s,e),r=Math.min(c,r),i=Math.max(c,i);const a=e-n,o=i-r;return[n,r,a,o]}function nE([t,n],[e,r]){return[(t+e)/2,(n+r)/2]}function kI(t){const{padding:n=0,direction:e="col"}=t;return(r,i,a)=>{const o=r.length;if(o===0)return[];const{innerWidth:s,innerHeight:c}=a,l=c/s;let u=Math.ceil(Math.sqrt(i/l)),f=s/u,d=Math.ceil(i/u),h=d*f;for(;h>c;)u=u+1,f=s/u,d=Math.ceil(i/u),h=d*f;const p=c-d*f,v=d<=1?0:p/(d-1),[g,y]=d<=1?[(s-o*f)/(o-1),(c-f)/2]:[0,0];return r.map((m,b)=>{const[x,w,O,_]=Eg(m),S=e==="col"?b%u:Math.floor(b/d),E=e==="col"?Math.floor(b/u):b%d,k=S*f,M=(d-E-1)*f+p,T=(f-n)/O,A=(f-n)/_,P=k-x+g*S+1/2*n,L=M-w-v*E-y+1/2*n;return`translate(${P}, ${L}) scale(${T}, ${A})`})}}const rE=t=>(n,e)=>[n,U({},e,{modifier:kI(t),axis:!1})];rE.props={};var MI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const I1="thresholds";function AI(t){const[n,e]=gi(t);return Math.min(200,hR(t,n,e))}const kg=(t={})=>{const{groupChannels:n=["color"],binChannels:e=["x","y"]}=t,r=MI(t,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:c}=s,l=e.map(p=>{const[v]=zt(c,p);return v}),u=nt(r,I1),f=o.filter(p=>l.every(v=>fe(v[p]))),d=[...n.map(p=>{const[v]=zt(c,p);return v}).filter(fe).map(p=>v=>p[v]),...e.map((p,v)=>{const g=l[v],y=u[p]||AI(g),m=uR().thresholds(y).value(x=>+g[x])(f),b=new Map(m.flatMap(x=>{const{x0:w,x1:O}=x,_=`${w},${O}`;return x.map(S=>[S,_])}));return i[p]=b,x=>b.get(x)})];return Array.from(le(f,p=>d.map(v=>v(p)).join("-")).values())};return Sg(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(I1)))),Object.fromEntries(e.flatMap(o=>{const s=([l])=>+i[o].get(l).split(",")[0],c=([l])=>+i[o].get(l).split(",")[1];return c.from=o,[[o,s],[`${o}1`,c]]}))),{groupBy:a}))};kg.props={};const iE=(t={})=>{const{thresholds:n}=t;return kg(Object.assign(Object.assign({},t),{thresholdsX:n,groupChannels:["color"],binChannels:["x"]}))};iE.props={};function TI(t,n,e,r){const i=t.length;if(r>=i||r===0)return t;const a=h=>n[t[h]]*1,o=h=>e[t[h]]*1,s=[],c=(i-2)/(r-2);let l=0,u,f,d;s.push(l);for(let h=0;h<r-2;h++){let p=0,v=0,g=Math.floor((h+1)*c)+1,y=Math.floor((h+2)*c)+1;y=Math.min(y,i);const m=y-g;for(;g<y;g++)p+=a(g),v+=o(g);p/=m,v/=m;let b=Math.floor((h+0)*c)+1;const x=Math.floor((h+1)*c)+1,w=[a(l),o(l)];for(u=f=-1;b<x;b++)f=Math.abs((w[0]-p)*(a(b)-w[1])-(w[0]-o(b))*(v-w[0]))*.5,f>u&&(u=f,d=b);s.push(d),l=d}return s.push(i-1),s.map(h=>t[h])}function PI(t){if(typeof t=="function")return t;if(t==="lttb")return TI;const n={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[al(r,o=>a[o])]],max:(r,i,a)=>[r[us(r,o=>a[o])]],median:(r,i,a)=>[r[pR(r,o=>a[o])]]},e=n[t]||n.median;return(r,i,a,o)=>{const s=Math.max(1,Math.floor(r.length/o));return CI(r,s).flatMap(l=>e(l,i,a))}}function CI(t,n){const e=t.length,r=[];let i=0;for(;i<e;)r.push(t.slice(i,i+=n));return r}const aE=(t={})=>{const{strategy:n="median",thresholds:e=2e3,groupBy:r=["series","color"]}=t,i=PI(n);return(a,o)=>{const{encode:s}=o,c=ra(r,a,o),[l]=zt(s,"x"),[u]=zt(s,"y");return[c.flatMap(f=>i(f,l,u,e)),o]}};aE.props={};function LI(t){return typeof t=="object"?[t.value,t.ordinal]:[t,!0]}function NI(t){var n;const{encode:e}=t,r=Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),{y:Object.assign(Object.assign({},t.encode.y),{value:[]})})}),i=(n=e==null?void 0:e.color)===null||n===void 0?void 0:n.field;if(!e||!i)return r;let a;for(const[o,s]of Object.entries(e))(o==="x"||o==="y")&&s.field===i&&(a=Object.assign(Object.assign({},a),{[o]:Object.assign(Object.assign({},s),{value:[]})}));return a?Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),a)}):r}const oE=(t={})=>(n,e)=>{const{encode:r,data:i}=e,a=Object.keys(t).length>0,o=Object.entries(t).map(([f,d])=>{const[h]=zt(r,f);if(!h)return null;const[p,v=!0]=LI(d);if(typeof p=="function")return g=>p(h[g]);if(v){const g=Array.isArray(p)?p:[p];return g.length===0?null:y=>g.includes(h[y])}else{const[g,y]=p;return m=>h[m]>=g&&h[m]<=y}}).filter(fe),s=f=>o.every(d=>d(f)),c=n.filter(s),l=c.map((f,d)=>d);if(o.length===0&&a){const f=NI(e);return[[],f]}const u=Object.entries(r).map(([f,d])=>[f,Object.assign(Object.assign({},d),{value:l.map(h=>d.value[c[h]]).filter(h=>h!==void 0)})]);return[l,U({},e,{encode:Object.fromEntries(u),data:c.map(f=>i[f])})]};oE.props={};function _e(t){return function(){return t}}const j1=Math.abs,mn=Math.atan2,pa=Math.cos,RI=Math.max,Fh=Math.min,Pr=Math.sin,_o=Math.sqrt,bn=1e-12,Mc=Math.PI,pf=Mc/2,II=2*Mc;function jI(t){return t>1?0:t<-1?Mc:Math.acos(t)}function D1(t){return t>=1?pf:t<=-1?-pf:Math.asin(t)}const wv=Math.PI,Ov=2*wv,Ea=1e-6,DI=Ov-Ea;function sE(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=arguments[n]+t[n]}function $I(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return sE;const e=10**n;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*e)/e+r[i]}}let Mg=class{constructor(n){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=n==null?sE:$I(n)}moveTo(n,e){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(n,e){this._append`L${this._x1=+n},${this._y1=+e}`}quadraticCurveTo(n,e,r,i){this._append`Q${+n},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(n,e,r,i,a,o){this._append`C${+n},${+e},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(n,e,r,i,a){if(n=+n,e=+e,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=r-n,l=i-e,u=o-n,f=s-e,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=n},${this._y1=e}`;else if(d>Ea)if(!(Math.abs(f*c-l*u)>Ea)||!a)this._append`L${this._x1=n},${this._y1=e}`;else{let h=r-o,p=i-s,v=c*c+l*l,g=h*h+p*p,y=Math.sqrt(v),m=Math.sqrt(d),b=a*Math.tan((wv-Math.acos((v+d-g)/(2*y*m)))/2),x=b/m,w=b/y;Math.abs(x-1)>Ea&&this._append`L${n+x*u},${e+x*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=n+w*c},${this._y1=e+w*l}`}}arc(n,e,r,i,a,o){if(n=+n,e=+e,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=n+s,u=e+c,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Ea||Math.abs(this._y1-u)>Ea)&&this._append`L${l},${u}`,r&&(d<0&&(d=d%Ov+Ov),d>DI?this._append`A${r},${r},0,1,${f},${n-s},${e-c}A${r},${r},0,1,${f},${this._x1=l},${this._y1=u}`:d>Ea&&this._append`A${r},${r},0,${+(d>=wv)},${f},${this._x1=n+r*Math.cos(a)},${this._y1=e+r*Math.sin(a)}`)}rect(n,e,r,i){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function pr(){return new Mg}pr.prototype=Mg.prototype;function Ag(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{const r=Math.floor(e);if(!(r>=0))throw new RangeError(`invalid digits: ${e}`);n=r}return t},()=>new Mg(n)}function FI(t){return t.innerRadius}function BI(t){return t.outerRadius}function zI(t){return t.startAngle}function WI(t){return t.endAngle}function YI(t){return t&&t.padAngle}function GI(t,n,e,r,i,a,o,s){var c=e-t,l=r-n,u=o-i,f=s-a,d=f*c-u*l;if(!(d*d<bn))return d=(u*(n-a)-f*(t-i))/d,[t+d*c,n+d*l]}function Ll(t,n,e,r,i,a,o){var s=t-e,c=n-r,l=(o?a:-a)/_o(s*s+c*c),u=l*c,f=-l*s,d=t+u,h=n+f,p=e+u,v=r+f,g=(d+p)/2,y=(h+v)/2,m=p-d,b=v-h,x=m*m+b*b,w=i-a,O=d*v-p*h,_=(b<0?-1:1)*_o(RI(0,w*w*x-O*O)),S=(O*b-m*_)/x,E=(-O*m-b*_)/x,k=(O*b+m*_)/x,M=(-O*m+b*_)/x,T=S-g,A=E-y,P=k-g,L=M-y;return T*T+A*A>P*P+L*L&&(S=k,E=M),{cx:S,cy:E,x01:-u,y01:-f,x11:S*(i/w-1),y11:E*(i/w-1)}}function Tg(){var t=FI,n=BI,e=_e(0),r=null,i=zI,a=WI,o=YI,s=null,c=Ag(l);function l(){var u,f,d=+t.apply(this,arguments),h=+n.apply(this,arguments),p=i.apply(this,arguments)-pf,v=a.apply(this,arguments)-pf,g=j1(v-p),y=v>p;if(s||(s=u=c()),h<d&&(f=h,h=d,d=f),!(h>bn))s.moveTo(0,0);else if(g>II-bn)s.moveTo(h*pa(p),h*Pr(p)),s.arc(0,0,h,p,v,!y),d>bn&&(s.moveTo(d*pa(v),d*Pr(v)),s.arc(0,0,d,v,p,y));else{var m=p,b=v,x=p,w=v,O=g,_=g,S=o.apply(this,arguments)/2,E=S>bn&&(r?+r.apply(this,arguments):_o(d*d+h*h)),k=Fh(j1(h-d)/2,+e.apply(this,arguments)),M=k,T=k,A,P;if(E>bn){var L=D1(E/d*Pr(S)),I=D1(E/h*Pr(S));(O-=L*2)>bn?(L*=y?1:-1,x+=L,w-=L):(O=0,x=w=(p+v)/2),(_-=I*2)>bn?(I*=y?1:-1,m+=I,b-=I):(_=0,m=b=(p+v)/2)}var R=h*pa(m),C=h*Pr(m),N=d*pa(w),j=d*Pr(w);if(k>bn){var D=h*pa(b),$=h*Pr(b),B=d*pa(x),z=d*Pr(x),W;if(g<Mc)if(W=GI(R,C,B,z,D,$,N,j)){var G=R-W[0],V=C-W[1],Y=D-W[0],q=$-W[1],K=1/Pr(jI((G*Y+V*q)/(_o(G*G+V*V)*_o(Y*Y+q*q)))/2),et=_o(W[0]*W[0]+W[1]*W[1]);M=Fh(k,(d-et)/(K-1)),T=Fh(k,(h-et)/(K+1))}else M=T=0}_>bn?T>bn?(A=Ll(B,z,R,C,h,T,y),P=Ll(D,$,N,j,h,T,y),s.moveTo(A.cx+A.x01,A.cy+A.y01),T<k?s.arc(A.cx,A.cy,T,mn(A.y01,A.x01),mn(P.y01,P.x01),!y):(s.arc(A.cx,A.cy,T,mn(A.y01,A.x01),mn(A.y11,A.x11),!y),s.arc(0,0,h,mn(A.cy+A.y11,A.cx+A.x11),mn(P.cy+P.y11,P.cx+P.x11),!y),s.arc(P.cx,P.cy,T,mn(P.y11,P.x11),mn(P.y01,P.x01),!y))):(s.moveTo(R,C),s.arc(0,0,h,m,b,!y)):s.moveTo(R,C),!(d>bn)||!(O>bn)?s.lineTo(N,j):M>bn?(A=Ll(N,j,D,$,d,-M,y),P=Ll(R,C,B,z,d,-M,y),s.lineTo(A.cx+A.x01,A.cy+A.y01),M<k?s.arc(A.cx,A.cy,M,mn(A.y01,A.x01),mn(P.y01,P.x01),!y):(s.arc(A.cx,A.cy,M,mn(A.y01,A.x01),mn(A.y11,A.x11),!y),s.arc(0,0,d,mn(A.cy+A.y11,A.cx+A.x11),mn(P.cy+P.y11,P.cx+P.x11),y),s.arc(P.cx,P.cy,M,mn(P.y11,P.x11),mn(P.y01,P.x01),!y))):s.arc(0,0,d,w,x,y)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Mc/2;return[pa(f)*u,Pr(f)*u]},l.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:_e(+u),l):t},l.outerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:_e(+u),l):n},l.cornerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:_e(+u),l):e},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:_e(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:_e(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:_e(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:_e(+u),l):o},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function cE(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lE(t){this._context=t}lE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n);break}}};function fl(t){return new lE(t)}function uE(t){return t[0]}function fE(t){return t[1]}function eo(t,n){var e=_e(!0),r=null,i=fl,a=null,o=Ag(s);t=typeof t=="function"?t:t===void 0?uE:_e(t),n=typeof n=="function"?n:n===void 0?fE:_e(n);function s(c){var l,u=(c=cE(c)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&e(f=c[l],l,c))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(f,l,c),+n(f,l,c));if(h)return a=null,h+""||null}return s.x=function(c){return arguments.length?(t=typeof c=="function"?c:_e(+c),s):t},s.y=function(c){return arguments.length?(n=typeof c=="function"?c:_e(+c),s):n},s.defined=function(c){return arguments.length?(e=typeof c=="function"?c:_e(!!c),s):e},s.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),s):r},s}function _v(t,n,e){var r=null,i=_e(!0),a=null,o=fl,s=null,c=Ag(l);t=typeof t=="function"?t:t===void 0?uE:_e(+t),n=typeof n=="function"?n:_e(n===void 0?0:+n),e=typeof e=="function"?e:e===void 0?fE:_e(+e);function l(f){var d,h,p,v=(f=cE(f)).length,g,y=!1,m,b=new Array(v),x=new Array(v);for(a==null&&(s=o(m=c())),d=0;d<=v;++d){if(!(d<v&&i(g=f[d],d,f))===y)if(y=!y)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(b[p],x[p]);s.lineEnd(),s.areaEnd()}y&&(b[d]=+t(g,d,f),x[d]=+n(g,d,f),s.point(r?+r(g,d,f):b[d],e?+e(g,d,f):x[d]))}if(m)return s=null,m+""||null}function u(){return eo().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:_e(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:_e(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:_e(+f),l):r},l.y=function(f){return arguments.length?(n=typeof f=="function"?f:_e(+f),e=null,l):n},l.y0=function(f){return arguments.length?(n=typeof f=="function"?f:_e(+f),l):n},l.y1=function(f){return arguments.length?(e=f==null?null:typeof f=="function"?f:_e(+f),l):e},l.lineX0=l.lineY0=function(){return u().x(t).y(n)},l.lineY1=function(){return u().x(t).y(e)},l.lineX1=function(){return u().x(r).y(n)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:_e(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}var dE=Pg(fl);function hE(t){this._curve=t}hE.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};function Pg(t){function n(e){return new hE(t(e))}return n._curve=t,n}function Is(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(e){return arguments.length?n(Pg(e)):n()._curve},t}function HI(){return Is(eo().curve(dE))}function VI(){var t=_v().curve(dE),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Is(e())},delete t.lineX0,t.lineEndAngle=function(){return Is(r())},delete t.lineX1,t.lineInnerRadius=function(){return Is(i())},delete t.lineY0,t.lineOuterRadius=function(){return Is(a())},delete t.lineY1,t.curve=function(o){return arguments.length?n(Pg(o)):n()._curve},t}function qo(){}function Sv(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Cg(t,n){this._context=t,this._k=(1-n)/6}Cg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Sv(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Sv(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(r){return new Cg(r,n)}return e.tension=function(r){return t(+r)},e})(0);function Lg(t,n){this._context=t,this._k=(1-n)/6}Lg.prototype={areaStart:qo,areaEnd:qo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Sv(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(r){return new Lg(r,n)}return e.tension=function(r){return t(+r)},e})(0);function pE(t,n,e){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>bn){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>bn){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-n*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-e*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function vE(t,n){this._context=t,this._alpha=n}vE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:pE(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(r){return n?new vE(r,n):new Cg(r,0)}return e.alpha=function(r){return t(+r)},e})(.5);function gE(t,n){this._context=t,this._alpha=n}gE.prototype={areaStart:qo,areaEnd:qo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:pE(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const yE=(function t(n){function e(r){return n?new gE(r,n):new Lg(r,0)}return e.alpha=function(r){return t(+r)},e})(.5);function mE(t){this._context=t}mE.prototype={areaStart:qo,areaEnd:qo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function Ng(t){return new mE(t)}function $1(t){return t<0?-1:1}function F1(t,n,e){var r=t._x1-t._x0,i=n-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return($1(a)+$1(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function B1(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Bh(t,n,e){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*n,a-s,o-s*e,a,o)}function vf(t){this._context=t}vf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Bh(this,this._t0,B1(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,!(t===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Bh(this,B1(this,e=F1(this,t,n)),e);break;default:Bh(this,this._t0,e=F1(this,t,n));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}};function bE(t){this._context=new xE(t)}(bE.prototype=Object.create(vf.prototype)).point=function(t,n){vf.prototype.point.call(this,n,t)};function xE(t){this._context=t}xE.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,a){this._context.bezierCurveTo(n,t,r,e,a,i)}};function wE(t){return new vf(t)}function OE(t){return new bE(t)}function jd(t,n){this._context=t,this._t=n}jd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}break}}this._x=t,this._y=n}};function _E(t){return new jd(t,.5)}function SE(t){return new jd(t,0)}function EE(t){return new jd(t,1)}function de(t){const{transformations:n}=t.getOptions();return n.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function Jt(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="polar")}function Dd(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="reflect")&&n.some(([e])=>e.startsWith("transpose"))}function kE(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="helix")}function $d(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="parallel")}function ME(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="fisheye")}function XI(t){return $d(t)&&Jt(t)}function fs(t){return kE(t)||Jt(t)}function UI(t){return Jt(t)&&de(t)}function qI(t){if(fs(t)){const[n,e]=t.getSize(),r=t.getOptions().transformations.find(i=>i[0]==="polar");if(r)return Math.max(n,e)/2*r[4]}return 0}function Fd(t){const{transformations:n}=t.getOptions(),[,,,e,r]=n.find(i=>i[0]==="polar");return[+e,+r]}function Rg(t,n=!0){const{transformations:e}=t.getOptions(),[,r,i]=e.find(a=>a[0]==="polar");return n?[+r*180/Math.PI,+i*180/Math.PI]:[r,i]}function KI(t,n){const{transformations:e}=t.getOptions(),[,...r]=e.find(i=>i[0]===n);return r}function Pt(t,n,e){return n=Zu(n),EL(t,kL()?Reflect.construct(n,e||[],Zu(t).constructor):n.apply(t,e))}var zh={exports:{}},z1;function ZI(){return z1||(z1=1,(function(t){var n=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function i(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function a(c,l,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||c,d),p=e?e+l:l;return c._events[p]?c._events[p].fn?c._events[p]=[c._events[p],h]:c._events[p].push(h):(c._events[p]=h,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new r:delete c._events[l]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],u,f;if(this._eventsCount===0)return l;for(f in u=this._events)n.call(u,f)&&l.push(e?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},s.prototype.listeners=function(l){var u=e?e+l:l,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},s.prototype.listenerCount=function(l){var u=e?e+l:l,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(l,u,f,d,h,p){var v=e?e+l:l;if(!this._events[v])return!1;var g=this._events[v],y=arguments.length,m,b;if(g.fn){switch(g.once&&this.removeListener(l,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,f),!0;case 4:return g.fn.call(g.context,u,f,d),!0;case 5:return g.fn.call(g.context,u,f,d,h),!0;case 6:return g.fn.call(g.context,u,f,d,h,p),!0}for(b=1,m=new Array(y-1);b<y;b++)m[b-1]=arguments[b];g.fn.apply(g.context,m)}else{var x=g.length,w;for(b=0;b<x;b++)switch(g[b].once&&this.removeListener(l,g[b].fn,void 0,!0),y){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,u);break;case 3:g[b].fn.call(g[b].context,u,f);break;case 4:g[b].fn.call(g[b].context,u,f,d);break;default:if(!m)for(w=1,m=new Array(y-1);w<y;w++)m[w-1]=arguments[w];g[b].fn.apply(g[b].context,m)}}return!0},s.prototype.on=function(l,u,f){return a(this,l,u,f,!1)},s.prototype.once=function(l,u,f){return a(this,l,u,f,!0)},s.prototype.removeListener=function(l,u,f,d){var h=e?e+l:l;if(!this._events[h])return this;if(!u)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===u&&(!d||p.once)&&(!f||p.context===f)&&o(this,h);else{for(var v=0,g=[],y=p.length;v<y;v++)(p[v].fn!==u||d&&!p[v].once||f&&p[v].context!==f)&&g.push(p[v]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},s.prototype.removeAllListeners=function(l){var u;return l?(u=e?e+l:l,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=e,s.EventEmitter=s,t.exports=s})(zh)),zh.exports}var QI=ZI();const AE=q0(QI);function JI(t,n){for(;!{}.hasOwnProperty.call(t,n)&&(t=Zu(t))!==null;);return t}function Ev(){return Ev=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,n,e){var r=JI(t,n);if(r){var i=Object.getOwnPropertyDescriptor(r,n);return i.get?i.get.call(arguments.length<3?t:e):i.value}},Ev.apply(null,arguments)}function W1(t,n,e,r){var i=Ev(Zu(t.prototype),n,e);return typeof i=="function"?function(a){return i.apply(e,a)}:i}/*!
41
+ }`:u.toString();return l(c)}catch{return s}},a=s=>{if(!s)return null;const c=Qs(s);return nn("div",{className:"text-gray-500 text-xs",children:[gt("div",{children:c.format("YYYY-MM-DD")}),gt("div",{children:c.format("HH:mm:ss")})]})},o=s=>{var l;return(((l=s.split("/").pop())==null?void 0:l.split("?")[0])||"").replace(/([A-Z])/g," $1").replace(/^./,u=>u.toUpperCase()).trim()};return gt("div",{id:"scrollableDiv",className:"userOperate",style:{height:"calc(100% - 64px)",overflow:"auto",padding:"0 16px"},children:gt(JL,{dataLength:t.length,next:n,hasMore:e,loader:gt("div",{className:"text-center py-4",children:r?gt(FO,{}):null}),scrollableTarget:"scrollableDiv",endMessage:gt("div",{className:"text-center text-gray-500 py-4",children:"\u6CA1\u6709\u66F4\u591A\u6570\u636E\u4E86"}),children:gt(mL,{mode:"left",style:{padding:"0 8px"},items:t.map(s=>({key:s.id,color:s.success?"green":"red",label:a(s.startTime||s.gmtCreated),children:nn("div",{className:"bg-white p-4 rounded-lg shadow-sm mb-4 hover:shadow-md transition-shadow ml-2",children:[gt("div",{className:"flex justify-between items-start mb-3",children:nn("div",{className:"flex items-center",children:[gt(bL,{icon:gt(YL,{...Tu()}),...tN("MEMBER")}),gt("span",{className:"font-medium mr-4",children:s.userName||"\u672A\u77E5\u7528\u6237"}),nn("span",{className:"text-gray-400 flex items-center",children:[gt("div",{...GO("GROUP"),className:"w-6 h-6 flex items-center justify-center mr-1",children:gt(BL,{...Tu(),className:"text-white text-xs"})}),s.ip]})]})}),gt("div",{className:"flex items-center justify-between",children:nn("div",{className:"flex items-center",children:[nn("div",{className:"mr-4 flex items-center",children:[gt("div",{className:"w-6 h-6 flex items-center justify-center",children:gt(BO,{...Tu(),className:" text-xs"})}),gt("span",{className:"font-medium",children:s.name||o(s.url)})]}),nn("div",{className:`flex items-center ${s.success?"text-green-500":"text-red-500"}`,children:[gt("div",{className:"w-6 h-6 flex items-center justify-center rounded-lg",children:s.success===1?gt(RL,{style:{color:s.success===1?"linear-gradient(135deg, #22C55E 0%, #16A34A 100%)":"linear-gradient(135deg, #EF4444 0%, #DC2626 100%)"},className:" text-xs"}):gt(DL,{style:{color:s.success===1?"linear-gradient(135deg, #22C55E 0%, #16A34A 100%)":"linear-gradient(135deg, #EF4444 0%, #DC2626 100%)"},className:" text-xs"})}),gt("span",{children:s.success===1?"\u64CD\u4F5C\u6210\u529F":"\u64CD\u4F5C\u5931\u8D25"})]})]})}),s.params&&nn("div",{className:"mt-3 text-gray-500 text-sm bg-gray-50 p-3 rounded",children:[gt("div",{className:"font-medium mb-2",children:"\u8BF7\u6C42\u53C2\u6570\uFF1A"}),gt("div",{className:"whitespace-pre font-mono text-xs overflow-x-auto bg-white p-2 rounded border border-gray-100",children:i(s.params)})]}),s.url&&nn("div",{className:"mt-2 text-gray-400 text-xs",children:[gt("span",{className:"font-medium",children:"\u8BF7\u6C42\u8DEF\u5F84\uFF1A"}),s.url]})]},s.id)}))})})})},HO=()=>[["cartesian"]];HO.props={};function nN(t,n){return t=t%(2*Math.PI),n=n%(2*Math.PI),t<0&&(t=2*Math.PI+t),n<0&&(n=2*Math.PI+n),t>=n&&(n=n+2*Math.PI),{startAngle:t,endAngle:n}}const VO=(t={})=>{const n={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1},e=Object.assign(Object.assign({},n),t);return Object.assign(Object.assign({},e),nN(e.startAngle,e.endAngle))},Jc=t=>{const{startAngle:n,endAngle:e,innerRadius:r,outerRadius:i}=VO(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",n,e,r,i]]};Jc.props={};const XO=({startAngle:t=0,endAngle:n=Math.PI*6,innerRadius:e=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,n,e,r]];XO.props={};const Z0=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];Z0.props={transform:!0};const rN=(t={})=>{const n={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},n),t)},UO=t=>{const{startAngle:n,endAngle:e,innerRadius:r,outerRadius:i}=rN(t);return[...Z0(),...Jc({startAngle:n,endAngle:e,innerRadius:r,outerRadius:i})]};UO.props={};const qO=(t={})=>{const n={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},n),t)},Q0=t=>{const{startAngle:n,endAngle:e,innerRadius:r,outerRadius:i}=qO(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Jc({startAngle:n,endAngle:e,innerRadius:r,outerRadius:i})]};Q0.props={};const J0=()=>[["parallel",0,1,0,1]];J0.props={};const KO=({focusX:t=0,focusY:n=0,distortionX:e=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,n,e,r,i]];KO.props={transform:!0};const ZO=t=>{const{startAngle:n=-Math.PI/2,endAngle:e=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=t;return[...J0(),...Jc({startAngle:n,endAngle:e,innerRadius:r,outerRadius:i})]};ZO.props={};const QO=({value:t})=>n=>n.map(()=>t);QO.props={};const JO=({value:t})=>n=>n.map(t);JO.props={};const t_=({value:t})=>n=>n.map(e=>e[t]);t_.props={};const e_=({value:t})=>()=>t;e_.props={};var Ba=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},n_=function(t,n){if(!Ba(t))return t;for(var e=[],r=0;r<t.length;r++){var i=t[r];n(i,r)&&e.push(i)}return e};function on(t){return typeof t=="function"}function yt(t){return t==null}function Ge(t){return Array.isArray(t)}const tl=(function(t){var n=typeof t;return t!==null&&n==="object"||n==="function"});function tg(t,n){if(t){var e;if(Ge(t))for(var r=0,i=t.length;r<i&&(e=n(t[r],r),e!==!1);r++);else if(tl(t)){for(var a in t)if(t.hasOwnProperty(a)&&(e=n(t[a],a),e===!1))break}}}var wd=Object.keys?function(t){return Object.keys(t)}:function(t){var n=[];return tg(t,function(e,r){on(t)&&r==="prototype"||n.push(r)}),n};function iN(t,n){var e=wd(n),r=e.length;if(yt(t))return!r;for(var i=0;i<r;i+=1){var a=e[i];if(n[a]!==t[a]||!(a in t))return!1}return!0}var iv=function(t){return typeof t=="object"&&t!==null},aN={}.toString,r_=function(t,n){return aN.call(t)==="[object "+n+"]"},xi=function(t){if(!iv(t)||!r_(t,"Object"))return!1;if(Object.getPrototypeOf(t)===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n};function zo(t,n){if(!Ge(t))return null;var e;if(on(n)&&(e=n),xi(n)&&(e=function(i){return iN(i,n)}),e){for(var r=0;r<t.length;r+=1)if(e(t[r]))return t[r]}return null}var oN=function(t){if(!Ge(t))return[];for(var n=[],e=0;e<t.length;e++)n=n.concat(t[e]);return n};function Ju(t){if(!Array.isArray(t))return-1/0;var n=t.length;if(!n)return-1/0;for(var e=t[0],r=1;r<n;r++)e=Math.max(e,t[r]);return e}const tf=(function(t){if(Ge(t))return t.reduce(function(n,e){return Math.min(n,e)},t[0])});var i_=function(t,n,e){if(!Ge(t)&&!xi(t))return t;var r=e;return tg(t,function(i,a){r=n(r,i,a)}),r};function ge(t){return typeof t=="string"}function sN(t){if(Ba(t))return t[0]}function Hn(t){if(Ba(t)){var n=t;return n[n.length-1]}}var Fe=function(t,n,e){return t<n?n:t>e?e:t};function he(t){return typeof t=="number"}var cN=1e-5;function tc(t,n,e){return e===void 0&&(e=cN),t===n||Math.abs(t-n)<e}const lN=(function(t,n){if(Ge(t)){for(var e,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=on(n)?n(a):a[n];o>r&&(e=a,r=o)}return e}}),uN=(function(t,n){if(Ge(t)){for(var e,r=1/0,i=0;i<t.length;i++){var a=t[i],o=on(n)?n(a):a[n];o<r&&(e=a,r=o)}return e}});var a_=function(t,n){return(t%n+n)%n};const o_=(function(t){return yt(t)?"":t.toString()});var s_=function(t){var n=o_(t);return n.charAt(0).toLowerCase()+n.substring(1)};function fN(t,n){return!t||!n?t:t.replace(/\\?\{([^{}]+)\}/g,function(e,r){return e.charAt(0)==="\\"?e.slice(1):n[r]===void 0?"":n[r]})}var na=function(t){var n=o_(t);return n.charAt(0).toUpperCase()+n.substring(1)},s1=function(t){return r_(t,"Boolean")};function c_(t){return t===null}var re=function(t){return t===void 0};function dN(t){return t instanceof Element||t instanceof Document}function c1(t,n){for(var e in n)n.hasOwnProperty(e)&&e!=="constructor"&&n[e]!==void 0&&(t[e]=n[e])}function l_(t,n,e,r){return n&&c1(t,n),e&&c1(t,e),t}var gc=function(t){if(typeof t!="object"||t===null)return t;var n;if(Ge(t)){n=[];for(var e=0,r=t.length;e<r;e++)typeof t[e]=="object"&&t[e]!=null?n[e]=gc(t[e]):n[e]=t[e]}else{n={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?n[i]=gc(t[i]):n[i]=t[i]}return n};function u_(t,n,e){var r;return function(){var i=this,a=arguments,o=function(){r=null,t.apply(i,a)};clearTimeout(r),r=setTimeout(o,n)}}function hN(t){var n,e,r,i=t;function a(s,c){++n>i&&(r=e,o(1),++n),e[s]=c}function o(s){n=0,e=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return e[s]!==void 0||r[s]!==void 0},get:function(s){var c=e[s];if(c!==void 0)return c;if((c=r[s])!==void 0)return a(s,c),c},set:function(s,c){e[s]!==void 0?e[s]=c:a(s,c)}}}var Ah=new Map;function pN(t,n,e){var r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var o=n?n.apply(this,i):i[0];Ah.has(t)||Ah.set(t,hN(e));var s=Ah.get(t);if(s.has(o))return s.get(o);var c=t.apply(this,i);return s.set(o,c),c};return r}var vN=5;function gN(t,n){if(Object.hasOwn)return Object.hasOwn(t,n);if(t==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),n)}function f_(t,n,e,r){e=e||0,r=r||vN;for(var i in n)if(gN(n,i)){var a=n[i];a!==null&&xi(a)?(xi(t[i])||(t[i]={}),e<r?f_(t[i],a,e+1,r):t[i]=n[i]):Ge(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var U=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0;r<n.length;r+=1)f_(t,n[r]);return t},d_=function(t,n){if(!Ba(t))return-1;var e=Array.prototype.indexOf;if(e)return e.call(t,n);for(var r=-1,i=0;i<t.length;i++)if(t[i]===n){r=i;break}return r},yc=function(t,n){if(t===n)return!0;if(!t||!n||ge(t)||ge(n))return!1;if(Ba(t)||Ba(n)){if(t.length!==n.length)return!1;for(var e=!0,r=0;r<t.length&&(e=yc(t[r],n[r]),!!e);r++);return e}if(iv(t)||iv(n)){var i=Object.keys(t),a=Object.keys(n);if(i.length!==a.length)return!1;for(var e=!0,r=0;r<i.length&&(e=yc(t[i[r]],n[i[r]]),!!e);r++);return e}return!1},yN=function(t){return t};const mN=(function(t,n){n===void 0&&(n=yN);var e={};return tl(t)&&!yt(t)&&Object.keys(t).forEach(function(r){e[r]=n(t[r],r)}),e}),mt=(function(t,n,e){for(var r=0,i=ge(n)?n.split("."):n;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?e:t}),Od=(function(t,n,e){var r=t,i=ge(n)?n.split("."):n;return i.forEach(function(a,o){o<i.length-1?(tl(r[a])||(r[a]=he(i[o+1])?[]:{}),r=r[a]):r[a]=e}),t});var bN=Object.prototype.hasOwnProperty;const el=(function(t,n){if(t===null||!xi(t))return{};var e={};return tg(n,function(r){bN.call(t,r)&&(e[r]=t[r])}),e}),eg=(function(t,n){return i_(t,function(e,r,i){return n.includes(i)||(e[i]=r),e},{})}),za=(function(t,n,e){var r,i,a,o,s=0;e||(e={});var c=function(){s=e.leading===!1?0:Date.now(),r=null,o=t.apply(i,a),r||(i=a=null)},l=function(){var u=Date.now();!s&&e.leading===!1&&(s=u);var f=n-(u-s);return i=this,a=arguments,f<=0||f>n?(r&&(clearTimeout(r),r=null),s=u,o=t.apply(i,a),r||(i=a=null)):!r&&e.trailing!==!1&&(r=setTimeout(c,f)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l}),Th=(function(){}),Zr=(function(t){return t});function mc(t){return yt(t)?0:Ba(t)?t.length:Object.keys(t).length}var Ee=1e-6,Qe=typeof Float32Array<"u"?Float32Array:Array,xN="zyx";function ls(){var t=new Qe(9);return Qe!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function wN(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function ON(t){var n=new Qe(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n}function _N(t,n,e,r,i,a,o,s,c){var l=new Qe(9);return l[0]=t,l[1]=n,l[2]=e,l[3]=r,l[4]=i,l[5]=a,l[6]=o,l[7]=s,l[8]=c,l}function SN(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],f=u*o-s*l,d=-u*a+s*c,h=l*a-o*c,p=e*f+r*d+i*h;return p?(p=1/p,t[0]=f*p,t[1]=(-u*r+i*l)*p,t[2]=(s*r-i*o)*p,t[3]=d*p,t[4]=(u*e-i*c)*p,t[5]=(-s*e+i*a)*p,t[6]=h*p,t[7]=(-l*e+r*c)*p,t[8]=(o*e-r*a)*p,t):null}function EN(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],f=n[8],d=e[0],h=e[1],p=e[2],v=e[3],g=e[4],y=e[5],m=e[6],b=e[7],x=e[8];return t[0]=d*r+h*o+p*l,t[1]=d*i+h*s+p*u,t[2]=d*a+h*c+p*f,t[3]=v*r+g*o+y*l,t[4]=v*i+g*s+y*u,t[5]=v*a+g*c+y*f,t[6]=m*r+b*o+x*l,t[7]=m*i+b*s+x*u,t[8]=m*a+b*c+x*f,t}function kN(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t}function MN(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function AN(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}var TN=EN;function Zt(){var t=new Qe(16);return Qe!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ng(t){var n=new Qe(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n}function Wo(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function h_(t,n,e,r,i,a,o,s,c,l,u,f,d,h,p,v){var g=new Qe(16);return g[0]=t,g[1]=n,g[2]=e,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=c,g[9]=l,g[10]=u,g[11]=f,g[12]=d,g[13]=h,g[14]=p,g[15]=v,g}function av(t,n,e,r,i,a,o,s,c,l,u,f,d,h,p,v,g){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=f,t[11]=d,t[12]=h,t[13]=p,t[14]=v,t[15]=g,t}function Ki(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p_(t,n){if(t===n){var e=n[1],r=n[2],i=n[3],a=n[6],o=n[7],s=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=a,t[11]=n[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function Sr(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],f=n[9],d=n[10],h=n[11],p=n[12],v=n[13],g=n[14],y=n[15],m=e*s-r*o,b=e*c-i*o,x=e*l-a*o,w=r*c-i*s,O=r*l-a*s,_=i*l-a*c,S=u*v-f*p,E=u*g-d*p,k=u*y-h*p,M=f*g-d*v,T=f*y-h*v,A=d*y-h*g,P=m*A-b*T+x*M+w*k-O*E+_*S;return P?(P=1/P,t[0]=(s*A-c*T+l*M)*P,t[1]=(i*T-r*A-a*M)*P,t[2]=(v*_-g*O+y*w)*P,t[3]=(d*O-f*_-h*w)*P,t[4]=(c*k-o*A-l*E)*P,t[5]=(e*A-i*k+a*E)*P,t[6]=(g*x-p*_-y*b)*P,t[7]=(u*_-d*x+h*b)*P,t[8]=(o*T-s*k+l*S)*P,t[9]=(r*k-e*T-a*S)*P,t[10]=(p*O-v*x+y*m)*P,t[11]=(f*x-u*O-h*m)*P,t[12]=(s*E-o*M-c*S)*P,t[13]=(e*M-r*E+i*S)*P,t[14]=(v*b-p*w-g*m)*P,t[15]=(u*w-f*b+d*m)*P,t):null}function PN(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],f=n[9],d=n[10],h=n[11],p=n[12],v=n[13],g=n[14],y=n[15],m=e*s-r*o,b=e*c-i*o,x=e*l-a*o,w=r*c-i*s,O=r*l-a*s,_=i*l-a*c,S=u*v-f*p,E=u*g-d*p,k=u*y-h*p,M=f*g-d*v,T=f*y-h*v,A=d*y-h*g;return t[0]=s*A-c*T+l*M,t[1]=i*T-r*A-a*M,t[2]=v*_-g*O+y*w,t[3]=d*O-f*_-h*w,t[4]=c*k-o*A-l*E,t[5]=e*A-i*k+a*E,t[6]=g*x-p*_-y*b,t[7]=u*_-d*x+h*b,t[8]=o*T-s*k+l*S,t[9]=r*k-e*T-a*S,t[10]=p*O-v*x+y*m,t[11]=f*x-u*O-h*m,t[12]=s*E-o*M-c*S,t[13]=e*M-r*E+i*S,t[14]=v*b-p*w-g*m,t[15]=u*w-f*b+d*m,t}function v_(t){var n=t[0],e=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],f=t[10],d=t[11],h=t[12],p=t[13],v=t[14],g=t[15],y=n*o-e*a,m=n*s-r*a,b=e*s-r*o,x=l*p-u*h,w=l*v-f*h,O=u*v-f*p,_=n*O-e*w+r*x,S=a*O-o*w+s*x,E=l*b-u*m+f*y,k=h*b-p*m+v*y;return c*_-i*S+g*E-d*k}function _n(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],f=n[8],d=n[9],h=n[10],p=n[11],v=n[12],g=n[13],y=n[14],m=n[15],b=e[0],x=e[1],w=e[2],O=e[3];return t[0]=b*r+x*s+w*f+O*v,t[1]=b*i+x*c+w*d+O*g,t[2]=b*a+x*l+w*h+O*y,t[3]=b*o+x*u+w*p+O*m,b=e[4],x=e[5],w=e[6],O=e[7],t[4]=b*r+x*s+w*f+O*v,t[5]=b*i+x*c+w*d+O*g,t[6]=b*a+x*l+w*h+O*y,t[7]=b*o+x*u+w*p+O*m,b=e[8],x=e[9],w=e[10],O=e[11],t[8]=b*r+x*s+w*f+O*v,t[9]=b*i+x*c+w*d+O*g,t[10]=b*a+x*l+w*h+O*y,t[11]=b*o+x*u+w*p+O*m,b=e[12],x=e[13],w=e[14],O=e[15],t[12]=b*r+x*s+w*f+O*v,t[13]=b*i+x*c+w*d+O*g,t[14]=b*a+x*l+w*h+O*y,t[15]=b*o+x*u+w*p+O*m,t}function Ao(t,n,e){var r=e[0],i=e[1],a=e[2],o,s,c,l,u,f,d,h,p,v,g,y;return n===t?(t[12]=n[0]*r+n[4]*i+n[8]*a+n[12],t[13]=n[1]*r+n[5]*i+n[9]*a+n[13],t[14]=n[2]*r+n[6]*i+n[10]*a+n[14],t[15]=n[3]*r+n[7]*i+n[11]*a+n[15]):(o=n[0],s=n[1],c=n[2],l=n[3],u=n[4],f=n[5],d=n[6],h=n[7],p=n[8],v=n[9],g=n[10],y=n[11],t[0]=o,t[1]=s,t[2]=c,t[3]=l,t[4]=u,t[5]=f,t[6]=d,t[7]=h,t[8]=p,t[9]=v,t[10]=g,t[11]=y,t[12]=o*r+u*i+p*a+n[12],t[13]=s*r+f*i+v*a+n[13],t[14]=c*r+d*i+g*a+n[14],t[15]=l*r+h*i+y*a+n[15]),t}function g_(t,n,e){var r=e[0],i=e[1],a=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=n[7]*i,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=n[11]*a,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function CN(t,n,e,r){var i=r[0],a=r[1],o=r[2],s=Math.sqrt(i*i+a*a+o*o),c,l,u,f,d,h,p,v,g,y,m,b,x,w,O,_,S,E,k,M,T,A,P,L;return s<Ee?null:(s=1/s,i*=s,a*=s,o*=s,c=Math.sin(e),l=Math.cos(e),u=1-l,f=n[0],d=n[1],h=n[2],p=n[3],v=n[4],g=n[5],y=n[6],m=n[7],b=n[8],x=n[9],w=n[10],O=n[11],_=i*i*u+l,S=a*i*u+o*c,E=o*i*u-a*c,k=i*a*u-o*c,M=a*a*u+l,T=o*a*u+i*c,A=i*o*u+a*c,P=a*o*u-i*c,L=o*o*u+l,t[0]=f*_+v*S+b*E,t[1]=d*_+g*S+x*E,t[2]=h*_+y*S+w*E,t[3]=p*_+m*S+O*E,t[4]=f*k+v*M+b*T,t[5]=d*k+g*M+x*T,t[6]=h*k+y*M+w*T,t[7]=p*k+m*M+O*T,t[8]=f*A+v*P+b*L,t[9]=d*A+g*P+x*L,t[10]=h*A+y*P+w*L,t[11]=p*A+m*P+O*L,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function y_(t,n,e){var r=Math.sin(e),i=Math.cos(e),a=n[4],o=n[5],s=n[6],c=n[7],l=n[8],u=n[9],f=n[10],d=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=a*i+l*r,t[5]=o*i+u*r,t[6]=s*i+f*r,t[7]=c*i+d*r,t[8]=l*i-a*r,t[9]=u*i-o*r,t[10]=f*i-s*r,t[11]=d*i-c*r,t}function m_(t,n,e){var r=Math.sin(e),i=Math.cos(e),a=n[0],o=n[1],s=n[2],c=n[3],l=n[8],u=n[9],f=n[10],d=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=a*i-l*r,t[1]=o*i-u*r,t[2]=s*i-f*r,t[3]=c*i-d*r,t[8]=a*r+l*i,t[9]=o*r+u*i,t[10]=s*r+f*i,t[11]=c*r+d*i,t}function LN(t,n,e){var r=Math.sin(e),i=Math.cos(e),a=n[0],o=n[1],s=n[2],c=n[3],l=n[4],u=n[5],f=n[6],d=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=a*i+l*r,t[1]=o*i+u*r,t[2]=s*i+f*r,t[3]=c*i+d*r,t[4]=l*i-a*r,t[5]=u*i-o*r,t[6]=f*i-s*r,t[7]=d*i-c*r,t}function li(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Ii(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b_(t,n,e){var r=e[0],i=e[1],a=e[2],o=Math.sqrt(r*r+i*i+a*a),s,c,l;return o<Ee?null:(o=1/o,r*=o,i*=o,a*=o,s=Math.sin(n),c=Math.cos(n),l=1-c,t[0]=r*r*l+c,t[1]=i*r*l+a*s,t[2]=a*r*l-i*s,t[3]=0,t[4]=r*i*l-a*s,t[5]=i*i*l+c,t[6]=a*i*l+r*s,t[7]=0,t[8]=r*a*l+i*s,t[9]=i*a*l-r*s,t[10]=a*a*l+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function x_(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function w_(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ov(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function O_(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=r+r,c=i+i,l=a+a,u=r*s,f=r*c,d=r*l,h=i*c,p=i*l,v=a*l,g=o*s,y=o*c,m=o*l;return t[0]=1-(h+v),t[1]=f+m,t[2]=d-y,t[3]=0,t[4]=f-m,t[5]=1-(u+v),t[6]=p+g,t[7]=0,t[8]=d+y,t[9]=p-g,t[10]=1-(u+h),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function NN(t,n){var e=new Qe(3),r=-n[0],i=-n[1],a=-n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],f=r*r+i*i+a*a+o*o;return f>0?(e[0]=(s*o+u*r+c*a-l*i)*2/f,e[1]=(c*o+u*i+l*r-s*a)*2/f,e[2]=(l*o+u*a+s*i-c*r)*2/f):(e[0]=(s*o+u*r+c*a-l*i)*2,e[1]=(c*o+u*i+l*r-s*a)*2,e[2]=(l*o+u*a+s*i-c*r)*2),O_(t,n,e),t}function ef(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function Yo(t,n){var e=n[0],r=n[1],i=n[2],a=n[4],o=n[5],s=n[6],c=n[8],l=n[9],u=n[10];return t[0]=Math.sqrt(e*e+r*r+i*i),t[1]=Math.sqrt(a*a+o*o+s*s),t[2]=Math.sqrt(c*c+l*l+u*u),t}function nf(t,n){var e=new Qe(3);Yo(e,n);var r=1/e[0],i=1/e[1],a=1/e[2],o=n[0]*r,s=n[1]*i,c=n[2]*a,l=n[4]*r,u=n[5]*i,f=n[6]*a,d=n[8]*r,h=n[9]*i,p=n[10]*a,v=o+u+p,g=0;return v>0?(g=Math.sqrt(v+1)*2,t[3]=.25*g,t[0]=(f-h)/g,t[1]=(d-c)/g,t[2]=(s-l)/g):o>u&&o>p?(g=Math.sqrt(1+o-u-p)*2,t[3]=(f-h)/g,t[0]=.25*g,t[1]=(s+l)/g,t[2]=(d+c)/g):u>p?(g=Math.sqrt(1+u-o-p)*2,t[3]=(d-c)/g,t[0]=(s+l)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=Math.sqrt(1+p-o-u)*2,t[3]=(s-l)/g,t[0]=(d+c)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function RN(t,n,e,r){n[0]=r[12],n[1]=r[13],n[2]=r[14];var i=r[0],a=r[1],o=r[2],s=r[4],c=r[5],l=r[6],u=r[8],f=r[9],d=r[10];e[0]=Math.sqrt(i*i+a*a+o*o),e[1]=Math.sqrt(s*s+c*c+l*l),e[2]=Math.sqrt(u*u+f*f+d*d);var h=1/e[0],p=1/e[1],v=1/e[2],g=i*h,y=a*p,m=o*v,b=s*h,x=c*p,w=l*v,O=u*h,_=f*p,S=d*v,E=g+x+S,k=0;return E>0?(k=Math.sqrt(E+1)*2,t[3]=.25*k,t[0]=(w-_)/k,t[1]=(O-m)/k,t[2]=(y-b)/k):g>x&&g>S?(k=Math.sqrt(1+g-x-S)*2,t[3]=(w-_)/k,t[0]=.25*k,t[1]=(y+b)/k,t[2]=(O+m)/k):x>S?(k=Math.sqrt(1+x-g-S)*2,t[3]=(O-m)/k,t[0]=(y+b)/k,t[1]=.25*k,t[2]=(w+_)/k):(k=Math.sqrt(1+S-g-x)*2,t[3]=(y-b)/k,t[0]=(O+m)/k,t[1]=(w+_)/k,t[2]=.25*k),t}function IN(t,n,e,r){var i=n[0],a=n[1],o=n[2],s=n[3],c=i+i,l=a+a,u=o+o,f=i*c,d=i*l,h=i*u,p=a*l,v=a*u,g=o*u,y=s*c,m=s*l,b=s*u,x=r[0],w=r[1],O=r[2];return t[0]=(1-(p+g))*x,t[1]=(d+b)*x,t[2]=(h-m)*x,t[3]=0,t[4]=(d-b)*w,t[5]=(1-(f+g))*w,t[6]=(v+y)*w,t[7]=0,t[8]=(h+m)*O,t[9]=(v-y)*O,t[10]=(1-(f+p))*O,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ec(t,n,e,r,i){var a=n[0],o=n[1],s=n[2],c=n[3],l=a+a,u=o+o,f=s+s,d=a*l,h=a*u,p=a*f,v=o*u,g=o*f,y=s*f,m=c*l,b=c*u,x=c*f,w=r[0],O=r[1],_=r[2],S=i[0],E=i[1],k=i[2],M=(1-(v+y))*w,T=(h+x)*w,A=(p-b)*w,P=(h-x)*O,L=(1-(d+y))*O,I=(g+m)*O,R=(p+b)*_,C=(g-m)*_,N=(1-(d+v))*_;return t[0]=M,t[1]=T,t[2]=A,t[3]=0,t[4]=P,t[5]=L,t[6]=I,t[7]=0,t[8]=R,t[9]=C,t[10]=N,t[11]=0,t[12]=e[0]+S-(M*S+P*E+R*k),t[13]=e[1]+E-(T*S+L*E+C*k),t[14]=e[2]+k-(A*S+I*E+N*k),t[15]=1,t}function rg(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e+e,s=r+r,c=i+i,l=e*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*c,v=a*o,g=a*s,y=a*c;return t[0]=1-f-p,t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-l-p,t[6]=h+v,t[7]=0,t[8]=d+g,t[9]=h-v,t[10]=1-l-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function jN(t,n,e,r,i,a,o){var s=1/(e-n),c=1/(i-r),l=1/(a-o);return t[0]=a*2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a*2*c,t[6]=0,t[7]=0,t[8]=(e+n)*s,t[9]=(i+r)*c,t[10]=(o+a)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*l,t[15]=0,t}function __(t,n,e,r,i){var a=1/Math.tan(n/2);if(t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0){var o=1/(r-i);t[10]=(i+r)*o,t[14]=2*i*r*o}else t[10]=-1,t[14]=-2*r;return t}var DN=__;function $N(t,n,e,r,i){var a=1/Math.tan(n/2);if(t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0){var o=1/(r-i);t[10]=i*o,t[14]=i*r*o}else t[10]=-1,t[14]=-r;return t}function FN(t,n,e,r){var i=Math.tan(n.upDegrees*Math.PI/180),a=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),s=Math.tan(n.rightDegrees*Math.PI/180),c=2/(o+s),l=2/(i+a);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-((o-s)*c*.5),t[9]=(i-a)*l*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t}function S_(t,n,e,r,i,a,o){var s=1/(n-e),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(n+e)*s,t[13]=(i+r)*c,t[14]=(o+a)*l,t[15]=1,t}var E_=S_;function k_(t,n,e,r,i,a,o){var s=1/(n-e),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=l,t[11]=0,t[12]=(n+e)*s,t[13]=(i+r)*c,t[14]=a*l,t[15]=1,t}function M_(t,n,e,r){var i,a,o,s,c,l,u,f,d,h,p=n[0],v=n[1],g=n[2],y=r[0],m=r[1],b=r[2],x=e[0],w=e[1],O=e[2];return Math.abs(p-x)<Ee&&Math.abs(v-w)<Ee&&Math.abs(g-O)<Ee?Ki(t):(u=p-x,f=v-w,d=g-O,h=1/Math.sqrt(u*u+f*f+d*d),u*=h,f*=h,d*=h,i=m*d-b*f,a=b*u-y*d,o=y*f-m*u,h=Math.sqrt(i*i+a*a+o*o),h?(h=1/h,i*=h,a*=h,o*=h):(i=0,a=0,o=0),s=f*o-d*a,c=d*i-u*o,l=u*a-f*i,h=Math.sqrt(s*s+c*c+l*l),h?(h=1/h,s*=h,c*=h,l*=h):(s=0,c=0,l=0),t[0]=i,t[1]=s,t[2]=u,t[3]=0,t[4]=a,t[5]=c,t[6]=f,t[7]=0,t[8]=o,t[9]=l,t[10]=d,t[11]=0,t[12]=-(i*p+a*v+o*g),t[13]=-(s*p+c*v+l*g),t[14]=-(u*p+f*v+d*g),t[15]=1,t)}function BN(t,n,e,r){var i=n[0],a=n[1],o=n[2],s=r[0],c=r[1],l=r[2],u=i-e[0],f=a-e[1],d=o-e[2],h=u*u+f*f+d*d;h>0&&(h=1/Math.sqrt(h),u*=h,f*=h,d*=h);var p=c*d-l*f,v=l*u-s*d,g=s*f-c*u;return h=p*p+v*v+g*g,h>0&&(h=1/Math.sqrt(h),p*=h,v*=h,g*=h),t[0]=p,t[1]=v,t[2]=g,t[3]=0,t[4]=f*g-d*v,t[5]=d*p-u*g,t[6]=u*v-f*p,t[7]=0,t[8]=u,t[9]=f,t[10]=d,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t}function zN(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function WN(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]+t[3]*t[3]+t[4]*t[4]+t[5]*t[5]+t[6]*t[6]+t[7]*t[7]+t[8]*t[8]+t[9]*t[9]+t[10]*t[10]+t[11]*t[11]+t[12]*t[12]+t[13]*t[13]+t[14]*t[14]+t[15]*t[15])}function YN(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t}function A_(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function GN(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t}function HN(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t}function sv(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function VN(t,n){var e=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15],m=n[0],b=n[1],x=n[2],w=n[3],O=n[4],_=n[5],S=n[6],E=n[7],k=n[8],M=n[9],T=n[10],A=n[11],P=n[12],L=n[13],I=n[14],R=n[15];return Math.abs(e-m)<=Ee*Math.max(1,Math.abs(e),Math.abs(m))&&Math.abs(r-b)<=Ee*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=Ee*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(a-w)<=Ee*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(o-O)<=Ee*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(s-_)<=Ee*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(c-S)<=Ee*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(l-E)<=Ee*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(u-k)<=Ee*Math.max(1,Math.abs(u),Math.abs(k))&&Math.abs(f-M)<=Ee*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(d-T)<=Ee*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(h-A)<=Ee*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(p-P)<=Ee*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(v-L)<=Ee*Math.max(1,Math.abs(v),Math.abs(L))&&Math.abs(g-I)<=Ee*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(y-R)<=Ee*Math.max(1,Math.abs(y),Math.abs(R))}var ig=_n,XN=A_;const UN=Object.freeze(Object.defineProperty({__proto__:null,add:YN,adjoint:PN,clone:ng,copy:Wo,create:Zt,decompose:RN,determinant:v_,equals:VN,exactEquals:sv,frob:WN,fromQuat:rg,fromQuat2:NN,fromRotation:b_,fromRotationTranslation:O_,fromRotationTranslationScale:IN,fromRotationTranslationScaleOrigin:ec,fromScaling:Ii,fromTranslation:li,fromValues:h_,fromXRotation:x_,fromYRotation:w_,fromZRotation:ov,frustum:jN,getRotation:nf,getScaling:Yo,getTranslation:ef,identity:Ki,invert:Sr,lookAt:M_,mul:ig,multiply:_n,multiplyScalar:GN,multiplyScalarAndAdd:HN,ortho:E_,orthoNO:S_,orthoZO:k_,perspective:DN,perspectiveFromFieldOfView:FN,perspectiveNO:__,perspectiveZO:$N,rotate:CN,rotateX:y_,rotateY:m_,rotateZ:LN,scale:g_,set:av,str:zN,sub:XN,subtract:A_,targetTo:BN,translate:Ao,transpose:p_},Symbol.toStringTag,{value:"Module"}));function Dt(){var t=new Qe(3);return Qe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function ci(t){var n=new Qe(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function ui(t){var n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function Ht(t,n,e){var r=new Qe(3);return r[0]=t,r[1]=n,r[2]=e,r}function zr(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function wn(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function Gi(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function cv(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function qN(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function KN(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function ZN(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function rf(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function QN(t,n){var e=n[0]-t[0],r=n[1]-t[1],i=n[2]-t[2];return Math.sqrt(e*e+r*r+i*i)}function Ia(t,n){var e=n[0],r=n[1],i=n[2],a=e*e+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function Wr(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Pu(t,n,e){var r=n[0],i=n[1],a=n[2],o=e[0],s=e[1],c=e[2];return t[0]=i*c-a*s,t[1]=a*o-r*c,t[2]=r*s-i*o,t}function lv(t,n,e,r){var i=n[0],a=n[1],o=n[2];return t[0]=i+r*(e[0]-i),t[1]=a+r*(e[1]-a),t[2]=o+r*(e[2]-o),t}function Ie(t,n,e){var r=n[0],i=n[1],a=n[2],o=e[3]*r+e[7]*i+e[11]*a+e[15];return o=o||1,t[0]=(e[0]*r+e[4]*i+e[8]*a+e[12])/o,t[1]=(e[1]*r+e[5]*i+e[9]*a+e[13])/o,t[2]=(e[2]*r+e[6]*i+e[10]*a+e[14])/o,t}function T_(t,n,e){var r=n[0],i=n[1],a=n[2];return t[0]=r*e[0]+i*e[3]+a*e[6],t[1]=r*e[1]+i*e[4]+a*e[7],t[2]=r*e[2]+i*e[5]+a*e[8],t}function JN(t,n,e){var r=e[0],i=e[1],a=e[2],o=e[3],s=n[0],c=n[1],l=n[2],u=i*l-a*c,f=a*s-r*l,d=r*c-i*s;return u=u+u,f=f+f,d=d+d,t[0]=s+o*u+i*d-a*f,t[1]=c+o*f+a*u-r*d,t[2]=l+o*d+r*f-i*u,t}function xs(t,n){var e=t[0],r=t[1],i=t[2],a=n[0],o=n[1],s=n[2];return Math.abs(e-a)<=Ee*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-o)<=Ee*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=Ee*Math.max(1,Math.abs(i),Math.abs(s))}var t4=cv,l1=QN,P_=ui;(function(){var t=Dt();return function(n,e,r,i,a,o){var s,c;for(e||(e=3),r||(r=0),i?c=Math.min(i*e+r,n.length):c=n.length,s=r;s<c;s+=e)t[0]=n[s],t[1]=n[s+1],t[2]=n[s+2],a(t,t,o),n[s]=t[0],n[s+1]=t[1],n[s+2]=t[2];return n}})();function Yr(){var t=new Qe(4);return Qe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Rs(t,n,e,r){var i=new Qe(4);return i[0]=t,i[1]=n,i[2]=e,i[3]=r,i}function e4(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function n4(t,n,e,r,i){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t}function r4(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e*e+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),t[0]=e*o,t[1]=r*o,t[2]=i*o,t[3]=a*o,t}function Gr(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3];return t[0]=e[0]*r+e[4]*i+e[8]*a+e[12]*o,t[1]=e[1]*r+e[5]*i+e[9]*a+e[13]*o,t[2]=e[2]*r+e[6]*i+e[10]*a+e[14]*o,t[3]=e[3]*r+e[7]*i+e[11]*a+e[15]*o,t}(function(){var t=Yr();return function(n,e,r,i,a,o){var s,c;for(e||(e=4),r||(r=0),i?c=Math.min(i*e+r,n.length):c=n.length,s=r;s<c;s+=e)t[0]=n[s],t[1]=n[s+1],t[2]=n[s+2],t[3]=n[s+3],a(t,t,o),n[s]=t[0],n[s+1]=t[1],n[s+2]=t[2],n[s+3]=t[3];return n}})();function an(){var t=new Qe(4);return Qe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Di(t,n,e){e=e*.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t}function Hi(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],c=e[1],l=e[2],u=e[3];return t[0]=r*u+o*s+i*l-a*c,t[1]=i*u+o*c+a*s-r*l,t[2]=a*u+o*l+r*c-i*s,t[3]=o*u-r*s-i*c-a*l,t}function Ph(t,n,e,r){var i=n[0],a=n[1],o=n[2],s=n[3],c=e[0],l=e[1],u=e[2],f=e[3],d,h,p,v,g;return h=i*c+a*l+o*u+s*f,h<0&&(h=-h,c=-c,l=-l,u=-u,f=-f),1-h>Ee?(d=Math.acos(h),p=Math.sin(d),v=Math.sin((1-r)*d)/p,g=Math.sin(r*d)/p):(v=1-r,g=r),t[0]=v*i+g*c,t[1]=v*a+g*l,t[2]=v*o+g*u,t[3]=v*s+g*f,t}function Ch(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e*e+r*r+i*i+a*a,s=o?1/o:0;return t[0]=-e*s,t[1]=-r*s,t[2]=-i*s,t[3]=a*s,t}function i4(t,n){var e=n[0]+n[4]+n[8],r;if(e>0)r=Math.sqrt(e+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{var i=0;n[4]>n[0]&&(i=1),n[8]>n[i*3+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(n[i*3+i]-n[a*3+a]-n[o*3+o]+1),t[i]=.5*r,r=.5/r,t[3]=(n[a*3+o]-n[o*3+a])*r,t[a]=(n[a*3+i]+n[i*3+a])*r,t[o]=(n[o*3+i]+n[i*3+o])*r}return t}function Al(t,n,e,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:xN,a=Math.PI/360;n*=a,r*=a,e*=a;var o=Math.sin(n),s=Math.cos(n),c=Math.sin(e),l=Math.cos(e),u=Math.sin(r),f=Math.cos(r);switch(i){case"xyz":t[0]=o*l*f+s*c*u,t[1]=s*c*f-o*l*u,t[2]=s*l*u+o*c*f,t[3]=s*l*f-o*c*u;break;case"xzy":t[0]=o*l*f-s*c*u,t[1]=s*c*f-o*l*u,t[2]=s*l*u+o*c*f,t[3]=s*l*f+o*c*u;break;case"yxz":t[0]=o*l*f+s*c*u,t[1]=s*c*f-o*l*u,t[2]=s*l*u-o*c*f,t[3]=s*l*f+o*c*u;break;case"yzx":t[0]=o*l*f+s*c*u,t[1]=s*c*f+o*l*u,t[2]=s*l*u-o*c*f,t[3]=s*l*f-o*c*u;break;case"zxy":t[0]=o*l*f-s*c*u,t[1]=s*c*f+o*l*u,t[2]=s*l*u+o*c*f,t[3]=s*l*f-o*c*u;break;case"zyx":t[0]=o*l*f-s*c*u,t[1]=s*c*f+o*l*u,t[2]=s*l*u-o*c*f,t[3]=s*l*f+o*c*u;break;default:throw new Error("Unknown angle order "+i)}return t}var a4=Rs,Tl=e4,C_=n4,u1=Hi,af=r4;(function(){var t=Dt(),n=Ht(1,0,0),e=Ht(0,1,0);return function(r,i,a){var o=Wr(i,a);return o<-.999999?(Pu(t,n,i),P_(t)<1e-6&&Pu(t,e,i),Ia(t,t),Di(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(Pu(t,i,a),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,af(r,r))}})();(function(){var t=an(),n=an();return function(e,r,i,a,o,s){return Ph(t,r,o,s),Ph(n,i,a,s),Ph(e,t,n,2*s*(1-s)),e}})();(function(){var t=ls();return function(n,e,r,i){return t[0]=r[0],t[3]=r[1],t[6]=r[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-e[0],t[5]=-e[1],t[8]=-e[2],af(n,i4(n,t))}})();function ag(){var t=new Qe(2);return Qe!=Float32Array&&(t[0]=0,t[1]=0),t}function o4(t,n){return t[0]=n[0],t[1]=n[1],t}function s4(t,n,e){return t[0]=n,t[1]=e,t}function c4(t,n){var e=n[0],r=n[1],i=e*e+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i,t}function l4(t,n){return t[0]*n[0]+t[1]*n[1]}function u4(t,n){return t[0]===n[0]&&t[1]===n[1]}(function(){var t=ag();return function(n,e,r,i,a,o){var s,c;for(e||(e=2),r||(r=0),i?c=Math.min(i*e+r,n.length):c=n.length,s=r;s<c;s+=e)t[0]=n[s],t[1]=n[s+1],a(t,t,o),n[s]=t[0],n[s+1]=t[1];return n}})();var uv=function(t,n){return uv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},uv(t,n)};function Se(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");uv(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var Z=function(){return Z=Object.assign||function(n){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}return n},Z.apply(this,arguments)};function Ze(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e}function nl(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function F(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a}function f4(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;for(var r=Array(t),i=0,n=0;n<e;n++)for(var a=arguments[n],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function ht(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))}function Lh(t,n,e,r){if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?r:e==="a"?r.call(t):r?r.value:n.get(t)}var L_={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function d4(t,n,e){if(t[e].length>7){t[e].shift();for(var r=t[e],i=e;r.length;)n[e]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(e,1)}}var nc={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function N_(t){return Array.isArray(t)&&t.every(function(n){var e=n[0].toLowerCase();return nc[e]===n.length-1&&"achlmqstvz".includes(e)})}function R_(t){return N_(t)&&t.every(function(n){var e=n[0];return e===e.toUpperCase()})}function I_(t){return R_(t)&&t.every(function(n){var e=n[0];return"ACLMQZ".includes(e)})}function f1(t){for(var n=t.pathValue[t.segmentStart],e=n.toLowerCase(),r=t.data;r.length>=nc[e]&&(e==="m"&&r.length>2?(t.segments.push([n].concat(r.splice(0,2))),e="l",n=n==="m"?"l":"L"):t.segments.push([n].concat(r.splice(0,nc[e]))),!!nc[e]););}function h4(t){var n=t.index,e=t.pathValue,r=e.charCodeAt(n);if(r===48){t.param=0,t.index+=1;return}if(r===49){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'.concat(e[n],'", expecting 0 or 1 at index ').concat(n)}function p4(t){return t>=48&&t<=57||t===43||t===45||t===46}function uo(t){return t>=48&&t<=57}function v4(t){var n=t.max,e=t.pathValue,r=t.index,i=r,a=!1,o=!1,s=!1,c=!1,l;if(i>=n){t.err="[path-util]: Invalid path value at index ".concat(i,', "pathValue" is missing param');return}if(l=e.charCodeAt(i),(l===43||l===45)&&(i+=1,l=e.charCodeAt(i)),!uo(l)&&l!==46){t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" is not a number');return}if(l!==46){if(a=l===48,i+=1,l=e.charCodeAt(i),a&&i<n&&l&&uo(l)){t.err="[path-util]: Invalid path value at index ".concat(r,', "').concat(e[r],'" illegal number');return}for(;i<n&&uo(e.charCodeAt(i));)i+=1,o=!0;l=e.charCodeAt(i)}if(l===46){for(c=!0,i+=1;uo(e.charCodeAt(i));)i+=1,s=!0;l=e.charCodeAt(i)}if(l===101||l===69){if(c&&!o&&!s){t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" invalid float exponent');return}if(i+=1,l=e.charCodeAt(i),(l===43||l===45)&&(i+=1),i<n&&uo(e.charCodeAt(i)))for(;i<n&&uo(e.charCodeAt(i));)i+=1;else{t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" invalid integer exponent');return}}t.index=i,t.param=+t.pathValue.slice(r,i)}function g4(t){var n=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&n.includes(t)}function Cu(t){for(var n=t.pathValue,e=t.max;t.index<e&&g4(n.charCodeAt(t.index));)t.index+=1}function y4(t){switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function m4(t){return(t|32)===97}function b4(t){var n=t.max,e=t.pathValue,r=t.index,i=e.charCodeAt(r),a=nc[e[r].toLowerCase()];if(t.segmentStart=r,!y4(i)){t.err='[path-util]: Invalid path value "'.concat(e[r],'" is not a path command');return}if(t.index+=1,Cu(t),t.data=[],!a){f1(t);return}for(;;){for(var o=a;o>0;o-=1){if(m4(i)&&(o===3||o===4)?h4(t):v4(t),t.err.length)return;t.data.push(t.param),Cu(t),t.index<n&&e.charCodeAt(t.index)===44&&(t.index+=1,Cu(t))}if(t.index>=t.max||!p4(e.charCodeAt(t.index)))break}f1(t)}var x4=(function(){function t(n){this.pathValue=n,this.segments=[],this.max=n.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return t})();function w4(t){if(N_(t))return[].concat(t);var n=new x4(t);for(Cu(n);n.index<n.max&&!n.err.length;)b4(n);return n.err?n.err:n.segments}function O4(t){if(R_(t))return[].concat(t);var n=w4(t),e=0,r=0,i=0,a=0;return n.map(function(o){var s=o.slice(1).map(Number),c=o[0],l=c.toUpperCase();if(c==="M")return e=s[0],r=s[1],i=e,a=r,["M",e,r];var u;if(c!==l)switch(l){case"A":u=[l,s[0],s[1],s[2],s[3],s[4],s[5]+e,s[6]+r];break;case"V":u=[l,s[0]+r];break;case"H":u=[l,s[0]+e];break;default:{var f=s.map(function(h,p){return h+(p%2?r:e)});u=[l].concat(f)}}else u=[l].concat(s);var d=u.length;switch(l){case"Z":e=i,r=a;break;case"H":e=u[1];break;case"V":r=u[1];break;default:e=u[d-2],r=u[d-1],l==="M"&&(i=e,a=r)}return u})}function _4(t,n){var e=t[0],r=n.x1,i=n.y1,a=n.x2,o=n.y2,s=t.slice(1).map(Number),c=t;if("TQ".includes(e)||(n.qx=null,n.qy=null),e==="H")c=["L",t[1],i];else if(e==="V")c=["L",r,t[1]];else if(e==="S"){var l=r*2-a,u=i*2-o;n.x1=l,n.y1=u,c=["C",l,u].concat(s)}else if(e==="T"){var f=r*2-n.qx,d=i*2-n.qy;n.qx=f,n.qy=d,c=["Q",f,d].concat(s)}else if(e==="Q"){var h=s[0],p=s[1];n.qx=h,n.qy=p}return c}function of(t){if(I_(t))return[].concat(t);for(var n=O4(t),e=Z({},L_),r=0;r<n.length;r+=1){n[r]=_4(n[r],e);var i=n[r],a=i.length;e.x1=+i[a-2],e.y1=+i[a-1],e.x2=+i[a-4]||e.x1,e.y2=+i[a-3]||e.y1}return n}function S4(t){return I_(t)&&t.every(function(n){var e=n[0];return"MC".includes(e)})}function Pl(t,n,e){var r=t*Math.cos(e)-n*Math.sin(e),i=t*Math.sin(e)+n*Math.cos(e);return{x:r,y:i}}function og(t,n,e,r,i,a,o,s,c,l){var u=t,f=n,d=e,h=r,p=s,v=c,g=Math.PI*120/180,y=Math.PI/180*(+i||0),m=[],b,x,w,O,_;if(l)x=l[0],w=l[1],O=l[2],_=l[3];else{b=Pl(u,f,-y),u=b.x,f=b.y,b=Pl(p,v,-y),p=b.x,v=b.y;var S=(u-p)/2,E=(f-v)/2,k=S*S/(d*d)+E*E/(h*h);k>1&&(k=Math.sqrt(k),d*=k,h*=k);var M=d*d,T=h*h,A=(a===o?-1:1)*Math.sqrt(Math.abs((M*T-M*E*E-T*S*S)/(M*E*E+T*S*S)));O=A*d*E/h+(u+p)/2,_=A*-h*S/d+(f+v)/2,x=Math.asin(((f-_)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((v-_)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),x=u<O?Math.PI-x:x,w=p<O?Math.PI-w:w,x<0&&(x=Math.PI*2+x),w<0&&(w=Math.PI*2+w),o&&x>w&&(x-=Math.PI*2),!o&&w>x&&(w-=Math.PI*2)}var P=w-x;if(Math.abs(P)>g){var L=w,I=p,R=v;w=x+g*(o&&w>x?1:-1),p=O+d*Math.cos(w),v=_+h*Math.sin(w),m=og(p,v,d,h,i,0,o,I,R,[w,L,O,_])}P=w-x;var C=Math.cos(x),N=Math.sin(x),j=Math.cos(w),D=Math.sin(w),$=Math.tan(P/4),B=4/3*d*$,z=4/3*h*$,W=[u,f],G=[u+B*N,f-z*C],V=[p+B*D,v-z*j],Y=[p,v];if(G[0]=2*W[0]-G[0],G[1]=2*W[1]-G[1],l)return G.concat(V,Y,m);m=G.concat(V,Y,m);for(var q=[],K=0,et=m.length;K<et;K+=1)q[K]=K%2?Pl(m[K-1],m[K],y).y:Pl(m[K],m[K+1],y).x;return q}function E4(t,n,e,r,i,a){var o=.3333333333333333,s=2/3;return[o*t+s*e,o*n+s*r,o*i+s*e,o*a+s*r,i,a]}function Li(t,n,e){var r=t[0],i=t[1],a=n[0],o=n[1];return[r+(a-r)*e,i+(o-i)*e]}var d1=function(t,n,e,r){var i=.5,a=Li([t,n],[e,r],i);return ht(ht([],a,!0),[e,r,e,r],!1)};function k4(t,n){var e=t[0],r=t.slice(1).map(Number),i=r[0],a=r[1],o,s=n.x1,c=n.y1,l=n.x,u=n.y;switch("TQ".includes(e)||(n.qx=null,n.qy=null),e){case"M":return n.x=i,n.y=a,t;case"A":return o=[s,c].concat(r),["C"].concat(og(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return n.qx=i,n.qy=a,o=[s,c].concat(r),["C"].concat(E4(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(d1(s,c,i,a));case"Z":return s===l&&c===u?["C",s,c,l,u,l,u]:["C"].concat(d1(s,c,l,u))}return t}function fv(t,n){if(n===void 0&&(n=!1),S4(t)){var e=[].concat(t);return n?[e,[]]:e}for(var r=of(t),i=Z({},L_),a=[],o="",s=r.length,c,l,u=[],f=0;f<s;f+=1){r[f]&&(o=r[f][0]),a[f]=o;var d=k4(r[f],i);r[f]=d,d4(r,a,f),s=r.length,o==="Z"&&u.push(f),c=r[f],l=c.length,i.x1=+c[l-2],i.y1=+c[l-1],i.x2=+c[l-4]||i.x1,i.y2=+c[l-3]||i.y1}return n?[r,u]:r}function M4(t){return t.map(function(n){return Array.isArray(n)?[].concat(n):n})}function A4(t){var n=t.slice(1).map(function(e,r,i){return r?i[r-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))}).map(function(e){return e.map(function(r,i){return e[e.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(n[0].slice(0,2))].concat(n.map(function(e){return["C"].concat(e.slice(2))}))}function Dn(t,n){return Math.sqrt((t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1]))}function dv(t,n,e,r,i){var a=Dn([t,n],[e,r]),o={x:0,y:0};if(typeof i=="number")if(i<=0)o={x:t,y:n};else if(i>=a)o={x:e,y:r};else{var s=Li([t,n],[e,r],i/a),c=s[0],l=s[1];o={x:c,y:l}}return{length:a,point:o,min:{x:Math.min(t,e),y:Math.min(n,r)},max:{x:Math.max(t,e),y:Math.max(n,r)}}}function h1(t,n){var e=t.x,r=t.y,i=n.x,a=n.y,o=e*i+r*a,s=Math.sqrt((Math.pow(e,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2))),c=e*a-r*i<0?-1:1,l=c*Math.acos(o/s);return l}function T4(t,n,e,r,i,a,o,s,c,l){var u=Math.abs,f=Math.sin,d=Math.cos,h=Math.sqrt,p=Math.PI,v=u(e),g=u(r),y=(i%360+360)%360,m=y*(p/180);if(t===s&&n===c)return{x:t,y:n};if(v===0||g===0)return dv(t,n,s,c,l).point;var b=(t-s)/2,x=(n-c)/2,w={x:d(m)*b+f(m)*x,y:-f(m)*b+d(m)*x},O=Math.pow(w.x,2)/Math.pow(v,2)+Math.pow(w.y,2)/Math.pow(g,2);O>1&&(v*=h(O),g*=h(O));var _=Math.pow(v,2)*Math.pow(g,2)-Math.pow(v,2)*Math.pow(w.y,2)-Math.pow(g,2)*Math.pow(w.x,2),S=Math.pow(v,2)*Math.pow(w.y,2)+Math.pow(g,2)*Math.pow(w.x,2),E=_/S;E=E<0?0:E;var k=(a!==o?1:-1)*h(E),M={x:k*(v*w.y/g),y:k*(-(g*w.x)/v)},T={x:d(m)*M.x-f(m)*M.y+(t+s)/2,y:f(m)*M.x+d(m)*M.y+(n+c)/2},A={x:(w.x-M.x)/v,y:(w.y-M.y)/g},P=h1({x:1,y:0},A),L={x:(-w.x-M.x)/v,y:(-w.y-M.y)/g},I=h1(A,L);!o&&I>0?I-=2*p:o&&I<0&&(I+=2*p),I%=2*p;var R=P+I*l,C=v*d(R),N=g*f(R),j={x:d(m)*C-f(m)*N+T.x,y:f(m)*C+d(m)*N+T.y};return j}function P4(t,n,e,r,i,a,o,s,c,l,u){var f,d=u.bbox,h=d===void 0?!0:d,p=u.length,v=p===void 0?!0:p,g=u.sampleSize,y=g===void 0?30:g,m=typeof l=="number",b=t,x=n,w=0,O=[b,x,w],_=[b,x],S=0,E={x:0,y:0},k=[{x:b,y:x}];m&&l<=0&&(E={x:b,y:x});for(var M=0;M<=y;M+=1){if(S=M/y,f=T4(t,n,e,r,i,a,o,s,c,S),b=f.x,x=f.y,h&&k.push({x:b,y:x}),v&&(w+=Dn(_,[b,x])),_=[b,x],m&&w>=l&&l>O[2]){var T=(w-l)/(w-O[2]);E={x:_[0]*(1-T)+O[0]*T,y:_[1]*(1-T)+O[1]*T}}O=[b,x,w]}return m&&l>=w&&(E={x:s,y:c}),{length:w,point:E,min:{x:Math.min.apply(null,k.map(function(A){return A.x})),y:Math.min.apply(null,k.map(function(A){return A.y}))},max:{x:Math.max.apply(null,k.map(function(A){return A.x})),y:Math.max.apply(null,k.map(function(A){return A.y}))}}}function C4(t,n,e,r,i,a,o,s,c){var l=1-c;return{x:Math.pow(l,3)*t+3*Math.pow(l,2)*c*e+3*l*Math.pow(c,2)*i+Math.pow(c,3)*o,y:Math.pow(l,3)*n+3*Math.pow(l,2)*c*r+3*l*Math.pow(c,2)*a+Math.pow(c,3)*s}}function j_(t,n,e,r,i,a,o,s,c,l){var u,f=l.bbox,d=f===void 0?!0:f,h=l.length,p=h===void 0?!0:h,v=l.sampleSize,g=v===void 0?10:v,y=typeof c=="number",m=t,b=n,x=0,w=[m,b,x],O=[m,b],_=0,S={x:0,y:0},E=[{x:m,y:b}];y&&c<=0&&(S={x:m,y:b});for(var k=0;k<=g;k+=1){if(_=k/g,u=C4(t,n,e,r,i,a,o,s,_),m=u.x,b=u.y,d&&E.push({x:m,y:b}),p&&(x+=Dn(O,[m,b])),O=[m,b],y&&x>=c&&c>w[2]){var M=(x-c)/(x-w[2]);S={x:O[0]*(1-M)+w[0]*M,y:O[1]*(1-M)+w[1]*M}}w=[m,b,x]}return y&&c>=x&&(S={x:o,y:s}),{length:x,point:S,min:{x:Math.min.apply(null,E.map(function(T){return T.x})),y:Math.min.apply(null,E.map(function(T){return T.y}))},max:{x:Math.max.apply(null,E.map(function(T){return T.x})),y:Math.max.apply(null,E.map(function(T){return T.y}))}}}function L4(t,n,e,r,i,a,o){var s=1-o;return{x:Math.pow(s,2)*t+2*s*o*e+Math.pow(o,2)*i,y:Math.pow(s,2)*n+2*s*o*r+Math.pow(o,2)*a}}function N4(t,n,e,r,i,a,o,s){var c,l=s.bbox,u=l===void 0?!0:l,f=s.length,d=f===void 0?!0:f,h=s.sampleSize,p=h===void 0?10:h,v=typeof o=="number",g=t,y=n,m=0,b=[g,y,m],x=[g,y],w=0,O={x:0,y:0},_=[{x:g,y}];v&&o<=0&&(O={x:g,y});for(var S=0;S<=p;S+=1){if(w=S/p,c=L4(t,n,e,r,i,a,w),g=c.x,y=c.y,u&&_.push({x:g,y}),d&&(m+=Dn(x,[g,y])),x=[g,y],v&&m>=o&&o>b[2]){var E=(m-o)/(m-b[2]);O={x:x[0]*(1-E)+b[0]*E,y:x[1]*(1-E)+b[1]*E}}b=[g,y,m]}return v&&o>=m&&(O={x:i,y:a}),{length:m,point:O,min:{x:Math.min.apply(null,_.map(function(k){return k.x})),y:Math.min.apply(null,_.map(function(k){return k.y}))},max:{x:Math.max.apply(null,_.map(function(k){return k.x})),y:Math.max.apply(null,_.map(function(k){return k.y}))}}}function D_(t,n,e){for(var r,i,a,o,s,c,l=of(t),u=typeof n=="number",f,d=[],h,p=0,v=0,g=0,y=0,m,b=[],x=[],w=0,O={x:0,y:0},_=O,S=O,E=O,k=0,M=0,T=l.length;M<T;M+=1)m=l[M],h=m[0],f=h==="M",d=f?d:[p,v].concat(m.slice(1)),f?(g=m[1],y=m[2],O={x:g,y},_=O,w=0,u&&n<.001&&(E=O)):h==="L"?(r=dv(d[0],d[1],d[2],d[3],(n||0)-k),w=r.length,O=r.min,_=r.max,S=r.point):h==="A"?(i=P4(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(n||0)-k,e||{}),w=i.length,O=i.min,_=i.max,S=i.point):h==="C"?(a=j_(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(n||0)-k,e||{}),w=a.length,O=a.min,_=a.max,S=a.point):h==="Q"?(o=N4(d[0],d[1],d[2],d[3],d[4],d[5],(n||0)-k,e||{}),w=o.length,O=o.min,_=o.max,S=o.point):h==="Z"&&(d=[p,v,g,y],s=dv(d[0],d[1],d[2],d[3],(n||0)-k),w=s.length,O=s.min,_=s.max,S=s.point),u&&k<n&&k+w>=n&&(E=S),x.push(_),b.push(O),k+=w,c=h!=="Z"?m.slice(-2):[g,y],p=c[0],v=c[1];return u&&n>=k&&(E={x:p,y:v}),{length:k,point:E,min:{x:Math.min.apply(null,b.map(function(A){return A.x})),y:Math.min.apply(null,b.map(function(A){return A.y}))},max:{x:Math.max.apply(null,x.map(function(A){return A.x})),y:Math.max.apply(null,x.map(function(A){return A.y}))}}}function R4(t,n){return D_(t,void 0,Z(Z({},n),{bbox:!1,length:!0})).length}function I4(t){var n=t.length,e=n-1;return t.map(function(r,i){return t.map(function(a,o){var s=i+o,c;return o===0||t[s]&&t[s][0]==="M"?(c=t[s],["M"].concat(c.slice(-2))):(s>=n&&(s-=e),t[s])})})}function j4(t,n){var e=t.length-1,r=[],i=0,a=0,o=I4(t);return o.forEach(function(s,c){t.slice(1).forEach(function(l,u){a+=Dn(t[(c+u)%e].slice(-2),n[u%e].slice(-2))}),r[c]=a,a=0}),i=r.indexOf(Math.min.apply(null,r)),o[i]}function D4(t,n,e,r,i,a,o,s){return 3*((s-n)*(e+i)-(o-t)*(r+a)+r*(t-i)-e*(n-a)+s*(i+t/3)-o*(a+n/3))/20}function $4(t){var n=0,e=0,r=0;return fv(t).map(function(i){var a;switch(i[0]){case"M":return n=i[1],e=i[2],0;default:var o=i.slice(1),s=o[0],c=o[1],l=o[2],u=o[3],f=o[4],d=o[5];return r=D4(n,e,s,c,l,u,f,d),a=i.slice(-2),n=a[0],e=a[1],r}}).reduce(function(i,a){return i+a},0)}function p1(t){return $4(t)>=0}function F4(t,n,e){return D_(t,n,Z(Z({},e),{bbox:!1,length:!0})).point}var B4=50;function z4(t,n){n===void 0&&(n=.5);var e=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),a=t.slice(6,8),o=Li(e,r,n),s=Li(r,i,n),c=Li(i,a,n),l=Li(o,s,n),u=Li(s,c,n),f=Li(l,u,n);return[["C"].concat(o,l,f),["C"].concat(u,c,a)]}function v1(t){return t.map(function(n,e,r){var i=e&&r[e-1].slice(-2).concat(n.slice(1)),a=e?j_(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0,o;return e?o=a?z4(i):[n,n]:o=[n],{s:n,ss:o,l:a}})}function $_(t,n,e,r){if(r===void 0&&(r=0),r>B4)return console.warn("Maximum recursion depth reached in equalizeSegments"),[t,n];var i=v1(t),a=v1(n),o=i.length,s=a.length,c=i.filter(function(y){return y.l}).length,l=a.filter(function(y){return y.l}).length,u=i.filter(function(y){return y.l}).reduce(function(y,m){var b=m.l;return y+b},0)/c||0,f=a.filter(function(y){return y.l}).reduce(function(y,m){var b=m.l;return y+b},0)/l||0,d=e||Math.max(o,s),h=[u,f],p=[d-o,d-s],v=0,g=[i,a].map(function(y,m){return y.l===d?y.map(function(b){return b.s}):y.map(function(b,x){return v=x&&p[m]&&b.l>=h[m],p[m]-=v?1:0,v?b.ss:[b.s]}).flat()});return g[0].length===g[1].length?g:$_(g[0],g[1],d,r+1)}function g1(t){var n=document.createElement("div");n.innerHTML=t;var e=n.childNodes[0];return e&&n.contains(e)&&n.removeChild(e),e}function ue(t,n){if(t!==null)return{type:"column",value:t,field:n}}function bc(t,n){const e=ue(t,n);return Object.assign(Object.assign({},e),{inferred:!0})}function sf(t,n){if(t!==null)return{type:"column",value:t,field:n,visual:!0}}function W4(t,n){const e=ue(t,n);return Object.assign(Object.assign({},e),{constant:!1})}function Vi(t,n){const e=[];for(const r of t)e[r]=n;return e}function zt(t,n){const e=t[n];if(!e)return[null,null];const{value:r,field:i=null}=e;return[r,i]}function cf(t,...n){for(const e of n)if(typeof e=="string"){const[r,i]=zt(t,e);if(r!==null)return[r,i]}else return[e,null];return[null,null]}function rl(t){return t instanceof Date?!1:typeof t=="object"}const il=()=>(t,n)=>{const{encode:e}=n,{y1:r}=e;return r!==void 0?[t,n]:[t,U({},n,{encode:{y1:bc(Vi(t,0))}})]};il.props={};function Re(t,n){return t==null||n==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function Y4(t,n){return t==null||n==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function vi(t){let n,e,r;t.length!==2?(n=Re,e=(s,c)=>Re(t(s),c),r=(s,c)=>t(s)-c):(n=t===Re||t===Y4?t:G4,e=t,r=t);function i(s,c,l=0,u=s.length){if(l<u){if(n(c,c)!==0)return u;do{const f=l+u>>>1;e(s[f],c)<0?l=f+1:u=f}while(l<u)}return l}function a(s,c,l=0,u=s.length){if(l<u){if(n(c,c)!==0)return u;do{const f=l+u>>>1;e(s[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function o(s,c,l=0,u=s.length){const f=i(s,c,l,u-1);return f>l&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:i,center:o,right:a}}function G4(){return 0}function hv(t){return t===null?NaN:+t}function*H4(t,n){if(n===void 0)for(let e of t)e!=null&&(e=+e)>=e&&(yield e);else{let e=-1;for(let r of t)(r=n(r,++e,t))!=null&&(r=+r)>=r&&(yield r)}}const F_=vi(Re),V4=F_.right,X4=F_.left,U4=vi(hv).center;function B_(t,n){let e=0;for(let r of t)r!=null&&(r=+r)>=r&&++e;return e}function q4(t,n){let e=0,r,i=0,a=0;if(n===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(r=o-i,i+=r/++e,a+=r*(o-i));else{let o=-1;for(let s of t)(s=n(s,++o,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++e,a+=r*(s-i))}if(e>1)return a/(e-1)}function z_(t,n){const e=q4(t,n);return e&&Math.sqrt(e)}function gi(t,n){let e,r;if(n===void 0)for(const i of t)i!=null&&(e===void 0?i>=i&&(e=r=i):(e>i&&(e=i),r<i&&(r=i)));else{let i=-1;for(let a of t)(a=n(a,++i,t))!=null&&(e===void 0?a>=a&&(e=r=a):(e>a&&(e=a),r<a&&(r=a)))}return[e,r]}class Wa{constructor(){this._partials=new Float64Array(32),this._n=0}add(n){const e=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const a=e[i],o=n+a,s=Math.abs(n)<Math.abs(a)?n-(o-a):a-(o-n);s&&(e[r++]=s),n=o}return e[r]=n,this._n=r+1,this}valueOf(){const n=this._partials;let e=this._n,r,i,a,o=0;if(e>0){for(o=n[--e];e>0&&(r=o,i=n[--e],o=r+i,a=i-(o-r),!a););e>0&&(a<0&&n[e-1]<0||a>0&&n[e-1]>0)&&(i=a*2,r=o+i,i==r-o&&(o=r))}return o}}let K4=class extends Map{constructor(n,e=J4){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const[r,i]of n)this.set(r,i)}get(n){return super.get(y1(this,n))}has(n){return super.has(y1(this,n))}set(n,e){return super.set(Z4(this,n),e)}delete(n){return super.delete(Q4(this,n))}};function y1({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function Z4({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function Q4({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function J4(t){return t!==null&&typeof t=="object"?t.valueOf():t}function xc(t){return t}function le(t,...n){return _d(t,xc,xc,n)}function sg(t,...n){return _d(t,Array.from,xc,n)}function cg(t,n,...e){return _d(t,xc,n,e)}function lg(t,n,...e){return _d(t,Array.from,n,e)}function _d(t,n,e,r){return(function i(a,o){if(o>=r.length)return e(a);const s=new K4,c=r[o++];let l=-1;for(const u of a){const f=c(u,++l,a),d=s.get(f);d?d.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,i(f,o));return n(s)})(t,0)}function tR(t,n){return Array.from(n,e=>t[e])}function Er(t,...n){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&e.length!==2||n.length>1){const r=Uint32Array.from(t,(i,a)=>a);return n.length>1?(n=n.map(i=>t.map(i)),r.sort((i,a)=>{for(const o of n){const s=wc(o[i],o[a]);if(s)return s}})):(e=t.map(e),r.sort((i,a)=>wc(e[i],e[a]))),tR(t,r)}return t.sort(W_(e))}function W_(t=Re){if(t===Re)return wc;if(typeof t!="function")throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||r===0?r:(t(e,e)===0)-(t(n,n)===0)}}function wc(t,n){return(t==null||!(t>=t))-(n==null||!(n>=n))||(t<n?-1:t>n?1:0)}function eR(t,n,e){return(n.length!==2?Er(cg(t,n,e),(([r,i],[a,o])=>Re(i,o)||Re(r,a))):Er(le(t,e),(([r,i],[a,o])=>n(i,o)||Re(r,a)))).map(([r])=>r)}var nR=Array.prototype,rR=nR.slice;function Nh(t){return()=>t}const iR=Math.sqrt(50),aR=Math.sqrt(10),oR=Math.sqrt(2);function lf(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=iR?10:a>=aR?5:a>=oR?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(t*l),c=Math.round(n*l),s/l<t&&++s,c/l>n&&--c,l=-l):(l=Math.pow(10,i)*o,s=Math.round(t/l),c=Math.round(n/l),s*l<t&&++s,c*l>n&&--c),c<s&&.5<=e&&e<2?lf(t,n,e*2):[s,c,l]}function sR(t,n,e){if(n=+n,t=+t,e=+e,!(e>0))return[];if(t===n)return[t];const r=n<t,[i,a,o]=r?lf(n,t,e):lf(t,n,e);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(i+l)/-o;else for(let l=0;l<s;++l)c[l]=(i+l)*o;return c}function pv(t,n,e){return n=+n,t=+t,e=+e,lf(t,n,e)[2]}function cR(t,n,e){let r;for(;;){const i=pv(t,n,e);if(i===r||i===0||!isFinite(i))return[t,n];i>0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function lR(t){return Math.max(1,Math.ceil(Math.log(B_(t))/Math.LN2)+1)}function uR(){var t=xc,n=gi,e=lR;function r(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,c,l=new Array(o);for(a=0;a<o;++a)l[a]=t(i[a],a,i);var u=n(l),f=u[0],d=u[1],h=e(l,f,d);if(!Array.isArray(h)){const b=d,x=+h;if(n===gi&&([f,d]=cR(f,d,x)),h=sR(f,d,x),h[0]<=f&&(c=pv(f,d,x)),h[h.length-1]>=d)if(b>=d&&n===gi){const w=pv(f,d,x);isFinite(w)&&(w>0?d=(Math.floor(d/w)+1)*w:w<0&&(d=(Math.ceil(d*-w)+1)/-w))}else h.pop()}for(var p=h.length,v=0,g=p;h[v]<=f;)++v;for(;h[g-1]>d;)--g;(v||g<p)&&(h=h.slice(v,g),p=g-v);var y=new Array(p+1),m;for(a=0;a<=p;++a)m=y[a]=[],m.x0=a>0?h[a-1]:f,m.x1=a<p?h[a]:d;if(isFinite(c)){if(c>0)for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[Math.min(p,Math.floor((s-f)/c))].push(i[a]);else if(c<0){for(a=0;a<o;++a)if((s=l[a])!=null&&f<=s&&s<=d){const b=Math.floor((f-s)*c);y[Math.min(p,b+(h[b]<=s))].push(i[a])}}}else for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[V4(h,s,0,p)].push(i[a]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Nh(i),r):t},r.domain=function(i){return arguments.length?(n=typeof i=="function"?i:Nh([i[0],i[1]]),r):n},r.thresholds=function(i){return arguments.length?(e=typeof i=="function"?i:Nh(Array.isArray(i)?rR.call(i):i),r):e},r}function Qt(t,n){let e;if(n===void 0)for(const r of t)r!=null&&(e<r||e===void 0&&r>=r)&&(e=r);else{let r=-1;for(let i of t)(i=n(i,++r,t))!=null&&(e<i||e===void 0&&i>=i)&&(e=i)}return e}function us(t,n){let e,r=-1,i=-1;if(n===void 0)for(const a of t)++i,a!=null&&(e<a||e===void 0&&a>=a)&&(e=a,r=i);else for(let a of t)(a=n(a,++i,t))!=null&&(e<a||e===void 0&&a>=a)&&(e=a,r=i);return r}function Xn(t,n){let e;if(n===void 0)for(const r of t)r!=null&&(e>r||e===void 0&&r>=r)&&(e=r);else{let r=-1;for(let i of t)(i=n(i,++r,t))!=null&&(e>i||e===void 0&&i>=i)&&(e=i)}return e}function al(t,n){let e,r=-1,i=-1;if(n===void 0)for(const a of t)++i,a!=null&&(e>a||e===void 0&&a>=a)&&(e=a,r=i);else for(let a of t)(a=n(a,++i,t))!=null&&(e>a||e===void 0&&a>=a)&&(e=a,r=i);return r}function ug(t,n,e=0,r=1/0,i){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),r=Math.floor(Math.min(t.length-1,r)),!(e<=n&&n<=r))return t;for(i=i===void 0?wc:W_(i);r>e;){if(r-e>600){const c=r-e+1,l=n-e+1,u=Math.log(c),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),h=Math.max(e,Math.floor(n-l*f/c+d)),p=Math.min(r,Math.floor(n+(c-l)*f/c+d));ug(t,n,h,p,i)}const a=t[n];let o=e,s=r;for(ws(t,e,n),i(t[r],a)>0&&ws(t,e,r);o<s;){for(ws(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[e],a)===0?ws(t,e,s):(++s,ws(t,s,r)),s<=n&&(e=s+1),n<=s&&(r=s-1)}return t}function ws(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function fR(t,n=Re){let e,r=!1;if(n.length===1){let i;for(const a of t){const o=n(a);(r?Re(o,i)>0:Re(o,o)===0)&&(e=a,i=o,r=!0)}}else for(const i of t)(r?n(i,e)>0:n(i,i)===0)&&(e=i,r=!0);return e}function Sd(t,n,e){if(t=Float64Array.from(H4(t,e)),!(!(r=t.length)||isNaN(n=+n))){if(n<=0||r<2)return Xn(t);if(n>=1)return Qt(t);var r,i=(r-1)*n,a=Math.floor(i),o=Qt(ug(t,a).subarray(0,a+1)),s=Xn(t.subarray(a+1));return o+(s-o)*(i-a)}}function dR(t,n,e=hv){if(!isNaN(n=+n)){if(r=Float64Array.from(t,(s,c)=>hv(e(t[c],c,t))),n<=0)return al(r);if(n>=1)return us(r);var r,i=Uint32Array.from(t,(s,c)=>c),a=r.length-1,o=Math.floor(a*n);return ug(i,o,0,a,(s,c)=>wc(r[s],r[c])),o=fR(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function hR(t,n,e){const r=B_(t),i=z_(t);return r&&i?Math.ceil((e-n)*Math.cbrt(r)/(3.49*i)):1}function Oc(t,n){let e=0,r=0;if(n===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++e,r+=i);else{let i=-1;for(let a of t)(a=n(a,++i,t))!=null&&(a=+a)>=a&&(++e,r+=a)}if(e)return r/e}function fg(t,n){return Sd(t,.5,n)}function pR(t,n){return dR(t,.5,n)}function*vR(t){for(const n of t)yield*n}function Y_(t){return Array.from(vR(t))}function Oo(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=Math.max(0,Math.ceil((n-t)/e))|0,a=new Array(i);++r<i;)a[r]=t+r*e;return a}function lr(t,n){let e=0;if(n===void 0)for(let r of t)(r=+r)&&(e+=r);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e}function Go(t,...n){return n.reduce((e,r)=>i=>e(r(i)),t)}function uf(t,n){return n-t?e=>(e-t)/(n-t):e=>.5}function gR(t,n){const e=n<t?n:t,r=t>n?t:n;return i=>Math.min(Math.max(e,i),r)}function dg(t,n,e,r,i){let a=e||0,o=r||t.length;const s=i||(c=>c);for(;a<o;){const c=Math.floor((a+o)/2);s(t[c])>n?o=c:a=c+1}return a}const vv=Math.sqrt(50),gv=Math.sqrt(10),yv=Math.sqrt(2);function Lu(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),a=r/10**i;return i>=0?(a>=vv?10:a>=gv?5:a>=yv?2:1)*10**i:-(10**-i)/(a>=vv?10:a>=gv?5:a>=yv?2:1)}function m1(t,n,e){const r=Math.abs(n-t)/Math.max(0,e);let i=10**Math.floor(Math.log(r)/Math.LN10);const a=r/i;return a>=vv?i*=10:a>=gv?i*=5:a>=yv&&(i*=2),n<t?-i:i}const hg=(t,n,e=5)=>{const r=[t,n];let i=0,a=r.length-1,o=r[i],s=r[a],c;return s<o&&([o,s]=[s,o],[i,a]=[a,i]),c=Lu(o,s,e),c>0?(o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c,c=Lu(o,s,e)):c<0&&(o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c,c=Lu(o,s,e)),c>0?(r[i]=Math.floor(o/c)*c,r[a]=Math.ceil(s/c)*c):c<0&&(r[i]=Math.ceil(o*c)/c,r[a]=Math.floor(s*c)/c),r},_c=1e3,Sc=_c*60,Ec=Sc*60,Ya=Ec*24,rc=Ya*7,G_=Ya*30,H_=Ya*365;function En(t,n,e,r){const i=(l,u)=>{const f=h=>r(h)%u===0;let d=u;for(;d&&!f(l);)e(l,-1),d-=1;return l},a=(l,u)=>{u&&i(l,u),n(l)},o=(l,u)=>{const f=new Date(+l);return a(f,u),f},s=(l,u)=>{const f=new Date(+l-1);return a(f,u),e(f,u),a(f),f};return{ceil:s,floor:o,range:(l,u,f,d)=>{const h=[],p=Math.floor(f),v=d?s(l,f):s(l);for(let g=v;g<u;e(g,p),a(g))h.push(new Date(+g));return h},duration:t}}const yR=En(1,t=>t,(t,n=1)=>{t.setTime(+t+n)},t=>t.getTime()),mR=En(_c,t=>{t.setMilliseconds(0)},(t,n=1)=>{t.setTime(+t+_c*n)},t=>t.getSeconds()),bR=En(Sc,t=>{t.setSeconds(0,0)},(t,n=1)=>{t.setTime(+t+Sc*n)},t=>t.getMinutes()),xR=En(Ec,t=>{t.setMinutes(0,0,0)},(t,n=1)=>{t.setTime(+t+Ec*n)},t=>t.getHours()),wR=En(Ya,t=>{t.setHours(0,0,0,0)},(t,n=1)=>{t.setTime(+t+Ya*n)},t=>t.getDate()-1),V_=En(G_,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,n=1)=>{const e=t.getMonth();t.setMonth(e+n)},t=>t.getMonth()),OR=En(rc,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,n=1)=>{t.setDate(t.getDate()+7*n)},t=>{const n=V_.floor(t),e=new Date(+t);return Math.floor((+e-+n)/rc)}),_R=En(H_,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n=1)=>{const e=t.getFullYear();t.setFullYear(e+n)},t=>t.getFullYear()),X_={millisecond:yR,second:mR,minute:bR,hour:xR,day:wR,week:OR,month:V_,year:_R},SR=En(1,t=>t,(t,n=1)=>{t.setTime(+t+n)},t=>t.getTime()),ER=En(_c,t=>{t.setUTCMilliseconds(0)},(t,n=1)=>{t.setTime(+t+_c*n)},t=>t.getUTCSeconds()),kR=En(Sc,t=>{t.setUTCSeconds(0,0)},(t,n=1)=>{t.setTime(+t+Sc*n)},t=>t.getUTCMinutes()),MR=En(Ec,t=>{t.setUTCMinutes(0,0,0)},(t,n=1)=>{t.setTime(+t+Ec*n)},t=>t.getUTCHours()),AR=En(Ya,t=>{t.setUTCHours(0,0,0,0)},(t,n=1)=>{t.setTime(+t+Ya*n)},t=>t.getUTCDate()-1),U_=En(G_,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,n=1)=>{const e=t.getUTCMonth();t.setUTCMonth(e+n)},t=>t.getUTCMonth()),TR=En(rc,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,n=1)=>{t.setTime(+t+rc*n)},t=>{const n=U_.floor(t),e=new Date(+t);return Math.floor((+e-+n)/rc)}),PR=En(H_,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n=1)=>{const e=t.getUTCFullYear();t.setUTCFullYear(e+n)},t=>t.getUTCFullYear()),q_={millisecond:SR,second:ER,minute:kR,hour:MR,day:AR,week:TR,month:U_,year:PR};function CR(t){const n=t?q_:X_,{year:e,month:r,week:i,day:a,hour:o,minute:s,second:c,millisecond:l}=n;return{tickIntervals:[[c,1],[c,5],[c,15],[c,30],[s,1],[s,5],[s,15],[s,30],[o,1],[o,3],[o,6],[o,12],[a,1],[a,2],[i,1],[r,1],[r,3],[e,1]],year:e,millisecond:l}}function K_(t,n,e,r,i){const a=+t,o=+n,{tickIntervals:s,year:c,millisecond:l}=CR(i),u=([g,y])=>g.duration*y,f=r?(o-a)/r:e||5,d=r||(o-a)/f,h=s.length,p=dg(s,d,0,h,u);let v;if(p===h){const g=m1(a/c.duration,o/c.duration,f);v=[c,g]}else if(p){const g=d/u(s[p-1])<u(s[p])/d,[y,m]=g?s[p-1]:s[p],b=r?Math.ceil(r/y.duration):m;v=[y,b]}else{const g=Math.max(m1(a,o,f),1);v=[l,g]}return v}const LR=(t,n,e,r,i)=>{const a=t>n,o=a?n:t,s=a?t:n,[c,l]=K_(o,s,e,r,i),u=[c.floor(o,l),c.ceil(s,l)];return a?u.reverse():u};function ff(t){return!re(t)&&!c_(t)&&!Number.isNaN(t)}const Z_=t=>n=>-t(-n),pg=(t,n)=>{const e=Math.log(t),r=t===Math.E?Math.log:t===10?Math.log10:t===2?Math.log2:i=>Math.log(i)/e;return n?Z_(r):r},vg=(t,n)=>{const e=t===Math.E?Math.exp:r=>t**r;return n?Z_(e):e},NR=(t,n,e,r)=>{const i=t<0,a=pg(r,i),o=vg(r,i),s=t>n,c=s?n:t,l=s?t:n,u=[o(Math.floor(a(c))),o(Math.ceil(a(l)))];return s?u.reverse():u},RR=t=>n=>{const e=t(n);return he(e)?Math.round(e):e};function IR(t,n){return e=>{e.prototype.rescale=function(){this.initRange(),this.nice();const[r]=this.chooseTransforms();this.composeOutput(r,this.chooseClamp(r))},e.prototype.initRange=function(){const{interpolator:r}=this.options;this.options.range=t(r)},e.prototype.composeOutput=function(r,i){const{domain:a,interpolator:o,round:s}=this.getOptions(),c=n(a.map(r)),l=s?RR(o):o;this.output=Go(l,c,i,r)},e.prototype.invert=void 0}}var Rh={exports:{}},Ih,b1;function jR(){return b1||(b1=1,Ih={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Ih}var jh={exports:{}},Dh,x1;function DR(){return x1||(x1=1,Dh=function(n){return!n||typeof n=="string"?!1:n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&n.constructor.name!=="String")}),Dh}var w1;function $R(){if(w1)return jh.exports;w1=1;var t=DR(),n=Array.prototype.concat,e=Array.prototype.slice,r=jh.exports=function(a){for(var o=[],s=0,c=a.length;s<c;s++){var l=a[s];t(l)?o=n.call(o,e.call(l)):o.push(l)}return o};return r.wrap=function(i){return function(){return i(r(arguments))}},jh.exports}var O1;function FR(){if(O1)return Rh.exports;O1=1;var t=jR(),n=$R(),e=Object.hasOwnProperty,r=Object.create(null);for(var i in t)e.call(t,i)&&(r[t[i]]=i);var a=Rh.exports={to:{},get:{}};a.get=function(c){var l=c.substring(0,3).toLowerCase(),u,f;switch(l){case"hsl":u=a.get.hsl(c),f="hsl";break;case"hwb":u=a.get.hwb(c),f="hwb";break;default:u=a.get.rgb(c),f="rgb";break}return u?{model:f,value:u}:null},a.get.rgb=function(c){if(!c)return null;var l=/^#([a-f0-9]{3,4})$/i,u=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,f=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,h=/^(\w+)$/,p=[0,0,0,1],v,g,y;if(v=c.match(u)){for(y=v[2],v=v[1],g=0;g<3;g++){var m=g*2;p[g]=parseInt(v.slice(m,m+2),16)}y&&(p[3]=parseInt(y,16)/255)}else if(v=c.match(l)){for(v=v[1],y=v[3],g=0;g<3;g++)p[g]=parseInt(v[g]+v[g],16);y&&(p[3]=parseInt(y+y,16)/255)}else if(v=c.match(f)){for(g=0;g<3;g++)p[g]=parseInt(v[g+1],0);v[4]&&(v[5]?p[3]=parseFloat(v[4])*.01:p[3]=parseFloat(v[4]))}else if(v=c.match(d)){for(g=0;g<3;g++)p[g]=Math.round(parseFloat(v[g+1])*2.55);v[4]&&(v[5]?p[3]=parseFloat(v[4])*.01:p[3]=parseFloat(v[4]))}else return(v=c.match(h))?v[1]==="transparent"?[0,0,0,0]:e.call(t,v[1])?(p=t[v[1]],p[3]=1,p):null:null;for(g=0;g<3;g++)p[g]=o(p[g],0,255);return p[3]=o(p[3],0,1),p},a.get.hsl=function(c){if(!c)return null;var l=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,u=c.match(l);if(u){var f=parseFloat(u[4]),d=(parseFloat(u[1])%360+360)%360,h=o(parseFloat(u[2]),0,100),p=o(parseFloat(u[3]),0,100),v=o(isNaN(f)?1:f,0,1);return[d,h,p,v]}return null},a.get.hwb=function(c){if(!c)return null;var l=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,u=c.match(l);if(u){var f=parseFloat(u[4]),d=(parseFloat(u[1])%360+360)%360,h=o(parseFloat(u[2]),0,100),p=o(parseFloat(u[3]),0,100),v=o(isNaN(f)?1:f,0,1);return[d,h,p,v]}return null},a.to.hex=function(){var c=n(arguments);return"#"+s(c[0])+s(c[1])+s(c[2])+(c[3]<1?s(Math.round(c[3]*255)):"")},a.to.rgb=function(){var c=n(arguments);return c.length<4||c[3]===1?"rgb("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+")":"rgba("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+", "+c[3]+")"},a.to.rgb.percent=function(){var c=n(arguments),l=Math.round(c[0]/255*100),u=Math.round(c[1]/255*100),f=Math.round(c[2]/255*100);return c.length<4||c[3]===1?"rgb("+l+"%, "+u+"%, "+f+"%)":"rgba("+l+"%, "+u+"%, "+f+"%, "+c[3]+")"},a.to.hsl=function(){var c=n(arguments);return c.length<4||c[3]===1?"hsl("+c[0]+", "+c[1]+"%, "+c[2]+"%)":"hsla("+c[0]+", "+c[1]+"%, "+c[2]+"%, "+c[3]+")"},a.to.hwb=function(){var c=n(arguments),l="";return c.length>=4&&c[3]!==1&&(l=", "+c[3]),"hwb("+c[0]+", "+c[1]+"%, "+c[2]+"%"+l+")"},a.to.keyword=function(c){return r[c.slice(0,3)]};function o(c,l,u){return Math.min(Math.max(l,c),u)}function s(c){var l=Math.round(c).toString(16).toUpperCase();return l.length<2?"0"+l:l}return Rh.exports}var BR=FR();const Q_=q0(BR);function $h(t,n,e){let r=e;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}function zR(t){const n=t[0]/360,e=t[1]/100,r=t[2]/100,i=t[3];if(e===0)return[r*255,r*255,r*255,i];const a=r<.5?r*(1+e):r+e-r*e,o=2*r-a,s=$h(o,a,n+1/3),c=$h(o,a,n),l=$h(o,a,n-1/3);return[s*255,c*255,l*255,i]}function _1(t){const n=Q_.get(t);if(!n)return null;const{model:e,value:r}=n;return e==="rgb"?r:e==="hsl"?zR(r):null}const Ho=(t,n)=>e=>t*(1-e)+n*e,WR=(t,n)=>{const e=_1(t),r=_1(n);return e===null||r===null?e?()=>t:()=>n:i=>{const a=new Array(4);for(let u=0;u<4;u+=1){const f=e[u],d=r[u];a[u]=f*(1-i)+d*i}const[o,s,c,l]=a;return`rgba(${Math.round(o)}, ${Math.round(s)}, ${Math.round(c)}, ${l})`}},ol=(t,n)=>typeof t=="number"&&typeof n=="number"?Ho(t,n):typeof t=="string"&&typeof n=="string"?WR(t,n):()=>t,YR=(t,n)=>{const e=Ho(t,n);return r=>Math.round(e(r))};function GR(t,n){const{second:e,minute:r,hour:i,day:a,week:o,month:s,year:c}=n;return e.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":a.floor(t)<t?"hh A":s.floor(t)<t?o.floor(t)<t?"MMM DD":"ddd DD":c.floor(t)<t?"MMMM":"YYYY"}function S1({map:t,initKey:n},e){const r=n(e);return t.has(r)?t.get(r):e}function HR({map:t,initKey:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function VR({map:t,initKey:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function XR(t){return typeof t=="object"?t.valueOf():t}let E1=class extends Map{constructor(n){if(super(),this.map=new Map,this.initKey=XR,n!==null)for(const[e,r]of n)this.set(e,r)}get(n){return super.get(S1({map:this.map,initKey:this.initKey},n))}has(n){return super.has(S1({map:this.map,initKey:this.initKey},n))}set(n,e){return super.set(HR({map:this.map,initKey:this.initKey},n),e)}delete(n){return super.delete(VR({map:this.map,initKey:this.initKey},n))}},sl=class{transformBreaks(n){return n}constructor(n){var e;this.options=U({},this.getDefaultOptions()),this.update(!((e=n==null?void 0:n.breaks)===null||e===void 0)&&e.length?this.transformBreaks(n):n)}getOptions(){return this.options}update(n={}){const e=n.breaks?this.transformBreaks(n):n;this.options=U({},this.options,e),this.rescale(e)}rescale(n){}};const Ed=Symbol("defaultUnknown");function k1(t,n,e){for(let r=0;r<n.length;r+=1)t.has(n[r])||t.set(e(n[r]),r)}function M1(t){const{value:n,from:e,to:r,mapper:i,notFoundReturn:a}=t;let o=i.get(n);if(o===void 0){if(a!==Ed)return a;o=e.push(n)-1,i.set(n,o)}return r[o%r.length]}function A1(t){return t instanceof Date?n=>`${n}`:typeof t=="object"?n=>JSON.stringify(n):n=>n}let J_=class tS extends sl{getDefaultOptions(){return{domain:[],range:[],unknown:Ed}}constructor(n){super(n)}map(n){return this.domainIndexMap.size===0&&k1(this.domainIndexMap,this.getDomain(),this.domainKey),M1({value:this.domainKey(n),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(n){return this.rangeIndexMap.size===0&&k1(this.rangeIndexMap,this.getRange(),this.rangeKey),M1({value:this.rangeKey(n),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(n){const[e]=this.options.domain,[r]=this.options.range;if(this.domainKey=A1(e),this.rangeKey=A1(r),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!n||n.range)&&this.rangeIndexMap.clear(),(!n||n.domain||n.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new tS(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:n,compare:e}=this.options;return this.sortedDomain=e?[...n].sort(e):n,this.sortedDomain}};function UR(t){const n=t.reduce((e,r)=>Math.min(e,r),1/0);return n===1/0?[]:t.map(e=>e/n)}function qR(t,n){const e=t.length,r=n-e;return r>0?[...t,...new Array(r).fill(1)]:r<0?t.slice(0,n):t}function KR(t){return Math.round(t*1e12)/1e12}function ZR(t){const{domain:n,range:e,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t,c=n.length,l=qR(a,c),[u,f]=e,d=f-u,h=2/c*r+1-1/c*i,p=d/h,v=p*i/c,g=p-c*v,y=UR(l),m=y.reduce((T,A)=>T+A),b=g/m,x=new E1(n.map((T,A)=>{const P=y[A]*b;return[T,o?Math.floor(P):P]})),w=new E1(n.map((T,A)=>{const L=y[A]*b+v;return[T,o?Math.floor(L):L]})),O=Array.from(w.values()).reduce((T,A)=>T+A),S=(d-(O-O/c*i))*s,E=u+S;let k=o?Math.round(E):E;const M=new Array(c);for(let T=0;T<c;T+=1){M[T]=KR(k);const A=n[T];k+=w.get(A)}return{valueBandWidth:x,valueStep:w,adjustedRange:M}}function QR(t){var n;const{domain:e}=t,r=e.length;if(r===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((n=t.flex)===null||n===void 0)&&n.length))return ZR(t);const{range:a,paddingOuter:o,paddingInner:s,round:c,align:l}=t;let u,f,d=a[0];const p=a[1]-d,v=o*2,g=r-s;u=p/Math.max(1,v+g),c&&(u=Math.floor(u)),d+=(p-u*(r-s))*l,f=u*(1-s),c&&(d=Math.round(d),f=Math.round(f));const y=new Array(r).fill(0).map((m,b)=>d+b*u);return{valueStep:u,valueBandWidth:f,adjustedRange:y}}let kc=class eS extends J_{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Ed,flex:[]}}constructor(n){super(n)}clone(){return new eS(this.options)}getStep(n){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:n===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(n)}getBandWidth(n){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:n===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(n)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:n,paddingInner:e}=this.options;return n>0?n:e}getPaddingOuter(){const{padding:n,paddingOuter:e}=this.options;return n>0?n:e}rescale(){super.rescale();const{align:n,domain:e,range:r,round:i,flex:a}=this.options,{adjustedRange:o,valueBandWidth:s,valueStep:c}=QR({align:n,range:r,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=c,this.valueBandWidth=s,this.adjustedRange=o}};const JR=(t,n)=>{if(!(n!=null&&n.length))return t;const e=[...t,...n.flatMap(a=>[a.start,a.end])],i=Array.from(new Set(e)).sort((a,o)=>a-o).filter(a=>!n.some(({start:o,end:s})=>a>o&&a<s));return i.length?i:t},Zi=(t,n,e,r)=>{let i,a,o=t,s=n;if(o===s&&e>0)return[o];let c=Lu(o,s,e);if(c===0||!Number.isFinite(c))return[];if(c>0){o=Math.ceil(o/c),s=Math.floor(s/c),a=new Array(i=Math.ceil(s-o+1));for(let l=0;l<i;l+=1)a[l]=(o+l)*c}else{c=-c,o=Math.ceil(o*c),s=Math.floor(s*c),a=new Array(i=Math.ceil(s-o+1));for(let l=0;l<i;l+=1)a[l]=(o+l)/c}return JR(a,r)};let gg=class nS extends sl{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:Zi}}map(n){const[e]=this.options.range;return e!==void 0?e:this.options.unknown}invert(n){const[e]=this.options.range;return n===e&&e!==void 0?this.options.domain:[]}getTicks(){const{tickMethod:n,domain:e,tickCount:r}=this.options,[i,a]=e;return!he(i)||!he(a)?[]:n(i,a,r)}clone(){return new nS(this.options)}};function Os(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const t6=[1,5,2,2.5,4,3],T1=Number.EPSILON*100;function e6(t,n){return(t%n+n)%n}function n6(t){return Math.round(t*1e12)/1e12}function r6(t,n,e,r,i,a){const o=mc(n),s=d_(n,t);let c=0;const l=e6(r,a);return(l<T1||a-l<T1)&&r<=0&&i>=0&&(c=1),1-s/(o-1)-e+c}function i6(t,n,e){const r=mc(n);return 1-d_(n,t)/(r-1)-e+1}function a6(t,n,e,r,i,a){const o=(t-1)/(a-i),s=(n-1)/(Math.max(a,r)-Math.min(e,i));return 2-Math.max(o/s,s/o)}function o6(t,n){return t>=n?2-(t-1)/(n-1):1}function s6(t,n,e,r){const i=n-t;return 1-.5*((n-r)**2+(t-e)**2)/(.1*i)**2}function c6(t,n,e){const r=n-t;return e>r?1-((e-r)/2)**2/(.1*r)**2:1}function l6(){return 1}const yg=(t,n,e=5,r=!0,i=t6,a=[.25,.2,.5,.05])=>{const o=e<0?0:Math.round(e);if(Number.isNaN(t)||Number.isNaN(n)||typeof t!="number"||typeof n!="number"||!o)return[];if(n-t<1e-15||o===1)return[t];const s={score:-2,lmin:0,lmax:0,lstep:0};let c=1;for(;c<1/0;){for(let p=0;p<i.length;p+=1){const v=i[p],g=i6(v,i,c);if(a[0]*g+a[1]+a[2]+a[3]<s.score){c=1/0;break}let y=2;for(;y<1/0;){const m=o6(y,o);if(a[0]*g+a[1]+a[2]*m+a[3]<s.score)break;const b=(n-t)/(y+1)/c/v;let x=Math.ceil(Math.log10(b));for(;x<1/0;){const w=c*v*10**x,O=c6(t,n,w*(y-1));if(a[0]*g+a[1]*O+a[2]*m+a[3]<s.score)break;const _=Math.floor(n/w)*c-(y-1)*c,S=Math.ceil(t/w)*c;if(_<=S){const E=S-_;for(let k=0;k<=E;k+=1){const T=(_+k)*(w/c),A=T+w*(y-1),P=w,L=r6(v,i,c,T,A,P),I=s6(t,n,T,A),R=a6(y,o,t,n,T,A),C=l6(),N=a[0]*L+a[1]*I+a[2]*R+a[3]*C;N>s.score&&(!r||T<=t&&A>=n)&&(s.lmin=T,s.lmax=A,s.lstep=P,s.score=N)}}x+=1}y+=1}}c+=1}const l=Os(s.lmax),u=Os(s.lmin),f=Os(s.lstep),d=Math.floor(n6((l-u)/f))+1,h=new Array(d);h[0]=Os(u);for(let p=1;p<d;p+=1)h[p]=Os(h[p-1]+f);return h};let rS=class iS extends sl{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:yg}}map(n){return ff(n)?n:this.options.unknown}invert(n){return this.map(n)}clone(){return new iS(this.options)}getTicks(){const{domain:n,tickCount:e,tickMethod:r}=this.options,[i,a]=n;return!he(i)||!he(a)?[]:r(i,a,e)}};const u6=(t,n,e)=>{const[r,i]=t,[a,o]=n;let s,c;return r<i?(s=uf(r,i),c=e(a,o)):(s=uf(i,r),c=e(o,a)),Go(c,s)},f6=(t,n,e)=>{const r=Math.min(t.length,n.length)-1,i=new Array(r),a=new Array(r),o=t[0]>t[r],s=o?[...t].reverse():t,c=o?[...n].reverse():n;for(let l=0;l<r;l+=1)i[l]=uf(s[l],s[l+1]),a[l]=e(c[l],c[l+1]);return l=>{const u=dg(t,l,1,r)-1,f=i[u],d=a[u];return Go(d,f)(l)}},P1=(t,n,e,r)=>(Math.min(t.length,n.length)>2?f6:u6)(t,n,r?YR:e);let kd=class extends sl{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Ho,tickCount:5}}map(n){return ff(n)?this.output(n):this.options.unknown}invert(n){return ff(n)?this.input(n):this.options.unknown}nice(){if(!this.options.nice||Ge(this.options.breaks))return;const[n,e,r,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(n,e,r,...i)}getTicks(){const{tickMethod:n}=this.options,[e,r,i,...a]=this.getTickMethodOptions();return n(e,r,i,...a)}getTickMethodOptions(){const{domain:n,tickCount:e}=this.options,r=n[0],i=n[n.length-1];return[r,i,e]}chooseNice(){return hg}rescale(){this.nice();const[n,e]=this.chooseTransforms();this.composeOutput(n,this.chooseClamp(n)),this.composeInput(n,e,this.chooseClamp(e))}chooseClamp(n){const{clamp:e,range:r}=this.options,i=this.options.domain.map(n),a=Math.min(i.length,r.length);return e?gR(i[0],i[a-1]):Zr}composeOutput(n,e){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=P1(r.map(n),i,o,a);this.output=Go(s,e,n)}composeInput(n,e,r){const{domain:i,range:a}=this.options,o=P1(a,i.map(n),Ho);this.input=Go(e,r,o)}},wi=class aS extends kd{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:ol,tickMethod:Zi,tickCount:5}}removeUnsortedValues(n,e,r){let i=-1/0;return e.reduce((o,s,c)=>{if(c===0)return o;const l=i>0?i:s;return i>0&&(r?s>i:s<i)?o.push(c):(l-e[c-1])*(r?-1:1)<0?(i<0&&(i=e[c-1]),o.push(c)):i=-1/0,o},[]).slice().reverse().forEach(o=>{n.splice(o,1),e.splice(o,1)}),{breaksDomain:n,breaksRange:e}}transformDomain(n){const e=[.2,.8],r=.03,{domain:i=[],range:a=[1,0],breaks:o=[],tickCount:s=5,nice:c}=n,[l,u]=[Math.min(...i),Math.max(...i)];let f=l,d=u;if(c&&o.length<2){const E=this.chooseNice()(l,u,s);f=E[0],d=E[E.length-1]}const h=Math.min(f,l);let p=Math.max(d,u);const v=o.filter(({end:E})=>E<p).sort((E,k)=>E.start-k.start),g=Zi(h,p,s,v);if(Hn(g)<p){const E=hg(0,p-Hn(g),3);g.push(Hn(g)+Hn(E)),p=Hn(g)}const[y,m]=[a[0],Hn(a)],b=p-h,x=Math.abs(m-y),w=y>m,O=g.map(E=>{const k=(E-h)/b;return w?y-k*x:y+k*x}),[_,S]=e;return v.forEach(({start:E,end:k,gap:M=r,compress:T="middle"})=>{const A=g.indexOf(E),P=g.indexOf(k);let L=(O[A]+O[P])/2;T==="start"&&(L=O[A]),T==="end"&&(L=O[P]);const I=M*x/2;let R=w?L+I:L-I,C=w?L-I:L+I;R<_&&(C+=_-R,R=_),C>S&&(R-=C-S,C=S),R>S&&(C-=R-S,R=S),C<_&&(R+=_-C,C=_),O[A]=R,O[P]=C}),this.removeUnsortedValues(g,O,w)}transformBreaks(n){const{domain:e,breaks:r=[]}=n;if(!Ge(n.breaks))return n;const i=Math.max(...e),a=r.filter(({end:l})=>l<i),o={...n,breaks:a},{breaksDomain:s,breaksRange:c}=this.transformDomain(o);return{...n,domain:s,range:c,breaks:a,tickMethod:()=>[...s]}}chooseTransforms(){return[Zr,Zr]}clone(){return new aS(this.options)}},d6=class oS extends kc{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Ed,paddingInner:1,paddingOuter:0}}constructor(n){super(n)}getPaddingInner(){return 1}clone(){return new oS(this.options)}update(n){super.update(n)}getPaddingOuter(){return this.options.padding}};const h6=t=>n=>n<0?-((-n)**t):n**t,p6=t=>n=>n<0?-((-n)**(1/t)):n**(1/t),v6=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);let sS=class cS extends kd{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:ol,tickMethod:Zi,tickCount:5}}constructor(n){super(n)}chooseTransforms(){const{exponent:n}=this.options;if(n===1)return[Zr,Zr];const e=n===.5?v6:h6(n),r=p6(n);return[e,r]}clone(){return new cS(this.options)}},g6=class lS extends sS{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:ol,tickMethod:Zi,tickCount:5,exponent:.5}}constructor(n){super(n)}update(n){super.update(n)}clone(){return new lS(this.options)}},Md=class uS extends sl{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(n){super(n)}map(n){if(!ff(n))return this.options.unknown;const e=dg(this.thresholds,n,0,this.n);return this.options.range[e]}invert(n){const{range:e}=this.options,r=e.indexOf(n),i=this.thresholds;return[i[r-1],i[r]]}clone(){return new uS(this.options)}rescale(){const{domain:n,range:e}=this.options;this.n=Math.min(n.length,e.length-1),this.thresholds=n}};const y6=(t,n,e,r=10)=>{const i=t<0,a=vg(r,i),o=pg(r,i),s=n<t,c=s?n:t,l=s?t:n;let u=o(c),f=o(l),d=[];if(!(r%1)&&f-u<e){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){const h=a(u);for(let p=r-1;p>=1;p-=1){const v=h*p;if(v>l)break;v>=c&&d.push(v)}}else for(;u<=f;u+=1){const h=a(u);for(let p=1;p<r;p+=1){const v=h*p;if(v>l)break;v>=c&&d.push(v)}}d.length*2<e&&(d=Zi(c,l,e))}else{const h=e===-1?f-u:Math.min(f-u,e);d=Zi(u,f,h).map(a)}return s?d.reverse():d};let m6=class fS extends kd{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:ol,tickMethod:y6,tickCount:5}}chooseNice(){return NR}getTickMethodOptions(){const{domain:n,tickCount:e,base:r}=this.options,i=n[0],a=n[n.length-1];return[i,a,e,r]}chooseTransforms(){const{base:n,domain:e}=this.options,r=e[0]<0;return[pg(n,r),vg(n,r)]}clone(){return new fS(this.options)}},dS=class hS extends Md{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:yg}}constructor(n){super(n)}nice(){const{nice:n}=this.options;if(n){const[e,r,i]=this.getTickMethodOptions();this.options.domain=hg(e,r,i)}}getTicks(){const{tickMethod:n}=this.options,[e,r,i]=this.getTickMethodOptions();return n(e,r,i)}getTickMethodOptions(){const{domain:n,tickCount:e}=this.options,r=n[0],i=n[n.length-1];return[r,i,e]}rescale(){this.nice();const{range:n,domain:e}=this.options,[r,i]=e;this.n=n.length-1,this.thresholds=new Array(this.n);for(let a=0;a<this.n;a+=1)this.thresholds[a]=((a+1)*i-(a-this.n)*r)/(this.n+1)}invert(n){const[e,r]=super.invert(n),[i,a]=this.options.domain;return e===void 0&&r===void 0?[e,r]:[e||i,r||a]}getThresholds(){return this.thresholds}clone(){return new hS(this.options)}};function b6(t,n){const e=t.length;if(!e)return;if(e<2)return t[e-1];const r=(e-1)*n,i=Math.floor(r),a=t[i],o=t[i+1];return a+(o-a)*(r-i)}function x6(t,n,e=!1){const r=t;e||r.sort((a,o)=>a-o);const i=[];for(let a=1;a<n;a+=1)i.push(b6(r,a/n));return i}let pS=class vS extends Md{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:yg}}constructor(n){super(n)}rescale(){const{domain:n,range:e}=this.options;this.n=e.length-1,this.thresholds=x6(n,this.n+1,!1)}invert(n){const[e,r]=super.invert(n),{domain:i}=this.options,a=i[0],o=i[i.length-1];return e===void 0&&r===void 0?[e,r]:[e||a,r||o]}getThresholds(){return this.thresholds}clone(){return new vS(this.options)}getTicks(){const{tickCount:n,domain:e,tickMethod:r}=this.options,i=e.length-1,a=e[0],o=e[i];return r(a,o,n)}};var w6=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,O6=/\[([^]*?)\]/gm;function gS(t,n){for(var e=[],r=0,i=t.length;r<i;r++)e.push(t[r].substr(0,n));return e}function mv(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0,i=n;r<i.length;r++){var a=i[r];for(var o in a)t[o]=a[o]}return t}var yS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],mS=["January","February","March","April","May","June","July","August","September","October","November","December"],_6=gS(mS,3),S6=gS(yS,3),E6={dayNamesShort:S6,dayNames:yS,monthNamesShort:_6,monthNames:mS,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},k6=mv({},E6),Rn=function(t,n){for(n===void 0&&(n=2),t=String(t);t.length<n;)t="0"+t;return t},M6={D:function(t){return String(t.getDate())},DD:function(t){return Rn(t.getDate())},Do:function(t,n){return n.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Rn(t.getDay())},ddd:function(t,n){return n.dayNamesShort[t.getDay()]},dddd:function(t,n){return n.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return Rn(t.getMonth()+1)},MMM:function(t,n){return n.monthNamesShort[t.getMonth()]},MMMM:function(t,n){return n.monthNames[t.getMonth()]},YY:function(t){return Rn(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Rn(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Rn(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Rn(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Rn(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Rn(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Rn(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Rn(t.getMilliseconds(),3)},a:function(t,n){return t.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(t,n){return t.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+Rn(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+Rn(Math.floor(Math.abs(n)/60),2)+":"+Rn(Math.abs(n)%60,2)}},C1={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},A6=function(t,n,e){if(n===void 0&&(n=C1.default),e===void 0&&(e={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");n=C1[n]||n;var r=[];n=n.replace(O6,function(a,o){return r.push(o),"@@@"});var i=mv(mv({},k6),e);return n=n.replace(w6,function(a){return M6[a](t,i)}),n.replace(/@@@/g,function(){return r.shift()})};const T6=(t,n,e,r,i)=>{const a=t>n,o=a?n:t,s=a?t:n,[c,l]=K_(o,s,e,r,i),u=c.range(o,new Date(+s+1),l,!0);return a?u.reverse():u};function P6(t){const n=t.getTimezoneOffset(),e=new Date(t);return e.setMinutes(e.getMinutes()+n,e.getSeconds(),e.getMilliseconds()),e}let C6=class bS extends kd{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:T6,interpolate:Ho,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return LR}getTickMethodOptions(){const{domain:n,tickCount:e,tickInterval:r,utc:i}=this.options,a=n[0],o=n[n.length-1];return[a,o,e,r,i]}getFormatter(){const{mask:n,utc:e}=this.options,r=e?q_:X_,i=e?P6:Zr;return a=>A6(i(a),n||GR(a,r))}clone(){return new bS(this.options)}};var L6=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a},bv;function N6(t){return[t(0),t(1)]}const R6=t=>{const[n,e]=t;return Go(Ho(0,1),uf(n,e))};let xv=bv=class extends wi{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Zr,tickMethod:Zi,tickCount:5}}constructor(n){super(n)}clone(){return new bv(this.options)}};xv=bv=L6([IR(N6,R6)],xv);var I6=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,n||[])).next())})};function j6(t){var n;let e=t;for(;e;){if(((n=e.attributes)===null||n===void 0?void 0:n.class)==="view")return e;e=e.parentNode}return null}function Ad(t){const{markType:n,nodeName:e}=t;return n==="heatmap"&&e==="image"}function mg(t,n){const e=n??j6(t).__data__,r=t.__data__,{markKey:i,index:a,seriesIndex:o,normalized:s={x:0}}=r,{markState:c}=e,l=Array.from(c.keys()).find(u=>u.key===i);if(l)return o?o.map(u=>l.data[u]):Ad(t)?l.data[Math.round(l.data.length*s.x)]:l.data[a]}function D6(t,n){var e,r,i,a;const o=(e=n.markKey)!==null&&e!==void 0?e:(i=(r=n.element)===null||r===void 0?void 0:r.__data__)===null||i===void 0?void 0:i.markKey,s=Object.keys(t).find(c=>{if(c.startsWith("series")){const l=t[c].getOptions();return l.name==="series"&&l.markKey===o}});return(a=t[s])!==null&&a!==void 0?a:t.series}function $6(t,n){const{color:e,facet:r=!1}=t,{color:i,series:a}=n,o=D6(t,n),s=c=>c&&c.invert&&!(c instanceof kc)&&!(c instanceof gg);if(s(o))return o.clone().invert(a);if(a&&o instanceof kc&&o.invert(a)!==i&&!r)return o.invert(a);if(s(e)){const c=e.invert(i);return Array.isArray(c)?null:c}return null}function Ga(t){return t}function bg(t){return t.reduce((n,e)=>(r,...i)=>e(n(r,...i),...i),Ga)}function F6(t){return t.reduce((n,e)=>r=>I6(this,void 0,void 0,function*(){const i=yield n(r);return e(i)}),Ga)}function xg(t){return t.replace(/( |^)[a-z]/g,n=>n.toUpperCase())}function Vo(t=""){throw new Error(t)}function Td(t,n){const{attributes:e}=n,r=new Set(["id","className"]);for(const[i,a]of Object.entries(e))r.has(i)||t.attr(i,a)}function fe(t){return t!=null&&!Number.isNaN(t)}function B6(t){const n=new Map;return e=>{if(n.has(e))return n.get(e);const r=t(e);return n.set(e,r),r}}function z6(t,n){const{transform:e}=t.style,i=(a=>a==="none"||a===void 0)(e)?"":e;t.style.transform=`${i} ${n}`.trimStart()}function nt(t,n){return xS(t,n)||{}}function xS(t,n){const e=Object.entries(t||{}).filter(([r])=>r.startsWith(n)).map(([r,i])=>[s_(r.replace(n,"").trim()),i]).filter(([r])=>!!r);return e.length===0?null:Object.fromEntries(e)}function W6(t,n){return Object.fromEntries(Object.entries(t).filter(([e])=>n.find(r=>e.startsWith(r))))}function Nu(t,...n){return Object.fromEntries(Object.entries(t).filter(([e])=>n.every(r=>!e.startsWith(r))))}function L1(t,n){if(t===void 0)return null;if(typeof t=="number")return t;const e=+t.replace("%","");return Number.isNaN(e)?null:e/100*n}function Xo(t){return typeof t=="object"&&!(t instanceof Date)&&t!==null&&!Array.isArray(t)}function Oi(t){return t===null||t===!1}function wS(t,n,e=5,r=0){if(!(r>=e)){for(const i of Object.keys(n)){const a=n[i];!xi(a)||!xi(t[i])?t[i]=a:wS(t[i],a,e,r+1)}return t}}function Qr(t,n){return Object.entries(t).reduce((e,[r,i])=>(e[r]=n(i,r,t),e),{})}function to(t){return t.map((n,e)=>e)}function Y6(t){return t[0]}function OS(t){return t[t.length-1]}function G6(t){return Array.from(new Set(t))}function _S(t,n){const e=[[],[]];return t.forEach(r=>{e[n(r)?0:1].push(r)}),e}function SS(t,n=t.length){if(n===1)return t.map(r=>[r]);const e=[];for(let r=0;r<t.length;r++){const i=t.slice(r+1);SS(i,n-1).forEach(o=>{e.push([t[r],...o])})}return e}function H6(t){if(t.length===1)return[t];const n=[];for(let e=1;e<=t.length;e++)n.push(...SS(t,e));return n}function ra(t,n,e){const{encode:r}=e;if(t===null)return[n];const i=V6(t).map(o=>{var s;return[o,(s=zt(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>fe(o));return Array.from(le(n,o=>i.map(([,s])=>s[o]).join("-")).values())}function ES(t){return Array.isArray(t)?q6(t):typeof t=="function"?U6(t):t==="series"?X6:t==="value"?K6:t==="sum"?Z6:t==="maxIndex"?Q6:null}function kS(t,n){for(const e of t)e.sort(n)}function MS(t,n){return(n==null?void 0:n.domain)||Array.from(new Set(t))}function V6(t){return Array.isArray(t)?t:[t]}function X6(t,n,e){return cl(r=>e[r])}function U6(t){return(n,e,r)=>cl(i=>t(n[i]))}function q6(t){return(n,e,r)=>(i,a)=>t.reduce((o,s)=>o!==0?o:Re(n[i][s],n[a][s]),0)}function K6(t,n,e){return cl(r=>n[r])}function Z6(t,n,e){const r=to(t),i=Array.from(le(r,o=>e[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((c,l)=>c+ +n[l])]));return cl(o=>a.get(e[o]))}function Q6(t,n,e){const r=to(t),i=Array.from(le(r,o=>e[+o]).entries()),a=new Map(i.map(([o,s])=>[o,us(s,c=>n[c])]));return cl(o=>a.get(e[o]))}function cl(t){return(n,e)=>Re(t(n),t(e))}const AS=(t={})=>{const{groupBy:n="x",orderBy:e=null,reverse:r=!1,y:i="y",y1:a="y1",series:o=!0}=t;return(s,c)=>{var l;const{data:u,encode:f,style:d={}}=c,[h,p]=zt(f,"y"),[v,g]=zt(f,"y1"),[y]=o?cf(f,"series","color"):zt(f,"color"),m=ra(n,s,c),x=((l=ES(e))!==null&&l!==void 0?l:(()=>null))(u,h,y);x&&kS(m,x);const w=new Array(s.length),O=new Array(s.length),_=new Array(s.length),S=[],E=[];for(const L of m){r&&L.reverse();const I=v?+v[L[0]]:0,R=[],C=[];for(const W of L){const G=_[W]=+h[W]-I;G<0?C.push(W):G>=0&&R.push(W)}const N=R.length>0?R:C,j=C.length>0?C:R;let D=R.length-1,$=0;for(;D>0&&h[N[D]]===0;)D--;for(;$<j.length-1&&h[j[$]]===0;)$++;S.push(N[D]),E.push(j[$]);let B=I;for(const W of C.reverse()){const G=_[W];B=w[W]=(O[W]=B)+G}let z=I;for(const W of R){const G=_[W];G>0?z=w[W]=(O[W]=z)+G:w[W]=O[W]=z}}const k=new Set(S),M=new Set(E),T=i==="y"?w:O,A=a==="y"?w:O;let P;return c.type==="point"?P={y0:bc(h,p),y:ue(T,p)}:P={y0:bc(h,p),y:ue(T,p),y1:ue(A,g)},[s,U({},c,{encode:Object.assign({},P),style:Object.assign({first:(L,I)=>k.has(I),last:(L,I)=>M.has(I)},d)})]}};AS.props={};function _s(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function J6(t){const n=t.getFullYear(),e=_s(t.getMonth()+1),r=_s(t.getDate()),i=`${n}-${e}-${r}`,a=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return a||o||s?`${i} ${_s(a)}:${_s(o)}:${_s(s)}`:i}const Pd=(t={})=>{const{channel:n="x"}=t;return(e,r)=>{const{encode:i}=r,{tooltip:a}=r;if(Oi(a))return[e,r];const{title:o}=a;if(o!==void 0)return[e,r];const s=Object.keys(i).filter(l=>l.startsWith(n)).filter(l=>!i[l].inferred).map(l=>zt(i,l)).filter(([l])=>l).map(l=>l[0]);if(s.length===0)return[e,r];const c=[];for(const l of e)c[l]={value:s.map(u=>u[l]instanceof Date?J6(u[l]):u[l]).join(", ")};return[e,U({},r,{tooltip:{title:c}})]}};Pd.props={};const ia=()=>(t,n)=>{const{encode:e}=n,{x:r}=e;return r!==void 0?[t,n]:[t,U({},n,{encode:{x:bc(Vi(t,0))},scale:{x:{guide:null}}})]};ia.props={};const ll=()=>(t,n)=>{const{encode:e}=n,{y:r}=e;return r!==void 0?[t,n]:[t,U({},n,{encode:{y:bc(Vi(t,0))},scale:{y:{guide:null}}})]};ll.props={};const wg=()=>(t,n)=>{const{encode:e}=n,{size:r}=e;return r!==void 0?[t,n]:[t,U({},n,{encode:{size:sf(Vi(t,3))}})]};wg.props={};var tI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const TS=()=>(t,n)=>{const{encode:e}=n,{key:r}=e,i=tI(e,["key"]);if(r!==void 0)return[t,n];const a=Object.values(i).map(({value:s})=>s),o=t.map(s=>a.filter(Array.isArray).map(c=>c[s]).join("-"));return[t,U({},n,{encode:{key:ue(o)}})]};TS.props={};const Og=()=>(t,n)=>{const{encode:e}=n,{series:r,color:i}=e;if(r!==void 0||i===void 0)return[t,n];const[a,o]=zt(e,"color");return[t,U({},n,{encode:{series:ue(a,o)}})]};Og.props={};const PS=()=>(t,n)=>{const{data:e}=n;return!Array.isArray(e)||e.some(rl)?[t,n]:[t,U({},n,{encode:{y:ue(e)}})]};PS.props={};const CS=()=>(t,n)=>{const{data:e}=n;return!Array.isArray(e)||e.some(rl)?[t,n]:[t,U({},n,{encode:{x:ue(e)}})]};CS.props={};const LS=()=>(t,n)=>{const{encode:e}=n,{y1:r}=e;if(r)return[t,n];const[i]=zt(e,"y");return[t,U({},n,{encode:{y1:ue([...i])}})]};LS.props={};const NS=()=>(t,n)=>{const{encode:e}=n,{x1:r}=e;if(r)return[t,n];const[i]=zt(e,"x");return[t,U({},n,{encode:{x1:ue([...i])}})]};NS.props={};const RS=()=>(t,n)=>{const{data:e}=n;if(Array.isArray(e)&&(e.every(Array.isArray)||!e.some(rl))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,U({},n,{encode:{x:ue(r(e,0)),x1:ue(r(e,1))}})]}return[t,n]};RS.props={};const IS=()=>(t,n)=>{const{data:e}=n;if(Array.isArray(e)&&(e.every(Array.isArray)||!e.some(rl))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,U({},n,{encode:{y:ue(r(e,0)),y1:ue(r(e,1))}})]}return[t,n]};IS.props={};const Cd=t=>{const{channel:n}=t;return(e,r)=>{const{encode:i,tooltip:a}=r;if(Oi(a))return[e,r];const{items:o=[]}=a;if(!o||o.length>0)return[e,r];const c=(Array.isArray(n)?n:[n]).flatMap(l=>Object.keys(i).filter(u=>u.startsWith(l)).map(u=>{const{field:f,value:d,inferred:h=!1,aggregate:p}=i[u];return h?null:p&&d?{channel:u}:f?{field:f}:d?{channel:u}:null}).filter(u=>u!==null));return[e,U({},r,{tooltip:{items:c}})]}};Cd.props={};const _g=()=>(t,n)=>[t,U({scale:{x:{padding:0},y:{padding:0}}},n)];_g.props={};var N1=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Ld=()=>(t,n)=>{const{data:e,style:r={}}=n,i=N1(n,["data","style"]),{x:a,y:o}=r,s=N1(r,["x","y"]);if(a==null||o==null)return[t,n];const c=a||0,l=o||0;return[[0],U({},i,{data:[0],cartesian:!0,encode:{x:ue([c]),y:ue([l])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};Ld.props={};const jS=()=>(t,n)=>{const{style:e={}}=n;return[t,U({},n,{style:Object.assign(Object.assign({},e),Object.fromEntries(Object.entries(e).filter(([,r])=>typeof r=="function").map(([r,i])=>[r,()=>i])))})]};jS.props={};const Nd=()=>(t,n)=>{const{data:e}=n;if(!Array.isArray(e)||e.some(rl))return[t,n];const r=Array.isArray(e[0])?e:[e],i=r.map(o=>o[0]),a=r.map(o=>o[1]);return[t,U({},n,{encode:{x:ue(i),y:ue(a)}})]};Nd.props={};const DS=()=>(t,n)=>{const{style:e={},encode:r}=n,{series:i}=r,{gradient:a}=e;return!a||i?[t,n]:[t,U({},n,{encode:{series:sf(Vi(t,void 0))}})]};DS.props={};var eI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const $S=(t={})=>{const{groupBy:n="x",reverse:e=!1,orderBy:r,padding:i}=t;return eI(t,["groupBy","reverse","orderBy","padding"]),(a,o)=>{const{data:s,encode:c,scale:l}=o,{series:u}=l,[f]=zt(c,"y"),[d]=cf(c,"series","color"),h=MS(d,u),p=U({},o,{scale:{series:{domain:h,paddingInner:i}}}),v=ra(n,a,o),g=ES(r);if(!g)return[a,U(p,{encode:{series:ue(d)}})];const y=g(s,f,d);y&&kS(v,y);const m=new Array(a.length);for(const b of v){e&&b.reverse();for(let x=0;x<b.length;x++)m[b[x]]=h[x]}return[a,U(p,{encode:{series:ue(r?m:d)}})]}};$S.props={};const FS=t=>{const{groupBy:n=["x"],reducer:e=(o,s)=>s[o[0]],orderBy:r=null,reverse:i=!1,duration:a}=t;return(o,s)=>{const{encode:c}=s,u=(Array.isArray(n)?n:[n]).map(g=>[g,zt(c,g)[0]]);if(u.length===0)return[o,s];let f=[o];for(const[,g]of u){const y=[];for(const m of f){const b=Array.from(le(m,x=>g[x]).values());y.push(...b)}f=y}if(r){const[g]=zt(c,r);g&&f.sort((y,m)=>e(y,g)-e(m,g)),i&&f.reverse()}const d=(a||3e3)/f.length,[h]=a?[Vi(o,d)]:cf(c,"enterDuration",Vi(o,d)),[p]=cf(c,"enterDelay",Vi(o,0)),v=new Array(o.length);for(let g=0,y=0;g<f.length;g++){const m=f[g],b=Qt(m,x=>+h[x]);for(const x of m)v[x]=+p[x]+y;y+=b}return[o,U({},s,{encode:{enterDuration:sf(h),enterDelay:sf(v)}})]}};FS.props={};var nI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function rI(t){return typeof t=="function"?t:{min:(e,r)=>Xn(e,i=>r[+i]),max:(e,r)=>Qt(e,i=>r[+i]),first:(e,r)=>r[e[0]],last:(e,r)=>r[e[e.length-1]],mean:(e,r)=>Oc(e,i=>r[+i]),median:(e,r)=>fg(e,i=>r[+i]),sum:(e,r)=>lr(e,i=>r[+i]),deviation:(e,r)=>z_(e,i=>r[+i])}[t]||Qt}const BS=(t={})=>{const{groupBy:n="x",basis:e="max"}=t;return(r,i)=>{const{encode:a,tooltip:o}=i,{x:s}=a,c=nI(a,["x"]),l=Object.entries(c).filter(([v])=>v.startsWith("y")).map(([v])=>[v,zt(a,v)[0]]),[,u]=l.find(([v])=>v==="y"),f=l.map(([v])=>[v,new Array(r.length)]),d=ra(n,r,i),h=rI(e);for(const v of d){const g=h(v,u);for(const y of v)for(let m=0;m<l.length;m++){const[,b]=l[m],[,x]=f[m];x[y]=+b[y]/g}}const p=Oi(o)||(o==null?void 0:o.items)&&(o==null?void 0:o.items.length)!==0;return[r,U({},i,Object.assign({encode:Object.fromEntries(f.map(([v,g])=>[v,ue(g,zt(a,v)[1])]))},!p&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};BS.props={};function df(t,n,e){if(t===null)return[-.5,.5];const r=MS(t,n),a=new kc({domain:r,range:[0,1],padding:e}).getBandWidth();return[-a/2,a/2]}function hf(t,n,e){return n*(1-t)+e*t}const zS=(t={})=>{const{padding:n=0,paddingX:e=n,paddingY:r=n,random:i=Math.random}=t;return(a,o)=>{const{encode:s,scale:c}=o,{x:l,y:u}=c,[f]=zt(s,"x"),[d]=zt(s,"y"),h=df(f,l,e),p=df(d,u,r),v=a.map(()=>hf(i(),...p)),g=a.map(()=>hf(i(),...h));return[a,U({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:ue(v),dx:ue(g)}})]}};zS.props={};const WS=(t={})=>{const{padding:n=0,random:e=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[c]=zt(a,"x"),l=df(c,s,n),u=r.map(()=>hf(e(),...l));return[r,U({scale:{x:{padding:.5}}},i,{encode:{dx:ue(u)}})]}};WS.props={};const YS=(t={})=>{const{padding:n=0,random:e=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[c]=zt(a,"y"),l=df(c,s,n),u=r.map(()=>hf(e(),...l));return[r,U({scale:{y:{padding:.5}}},i,{encode:{dy:ue(u)}})]}};YS.props={};var iI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const GS=(t={})=>{const{groupBy:n="x"}=t;return(e,r)=>{const{encode:i,style:a={}}=r,{x:o}=i,s=iI(i,["x"]),c=Object.entries(s).filter(([h])=>h.startsWith("y")).map(([h])=>[h,zt(i,h)[0]]),l=c.map(([h])=>[h,new Array(e.length)]),u=ra(n,e,r),f=new Array(u.length);for(let h=0;h<u.length;h++){const v=u[h].flatMap(m=>c.map(([,b])=>+b[m])),[g,y]=gi(v);f[h]=(g+y)/2}const d=Math.max(...f);for(let h=0;h<u.length;h++){const p=d-f[h],v=u[h];for(const g of v)for(let y=0;y<c.length;y++){const[,m]=c[y],[,b]=l[y];b[g]=+m[g]+p}}return[e,U({},r,{encode:Object.fromEntries(l.map(([h,p])=>[h,ue(p,zt(i,h)[1])])),style:Object.assign({first:(h,p)=>p===0,last:(h,p)=>p===u.length-1},a)})]}};GS.props={};const HS=(t={})=>{const{groupBy:n="x"}=t;return(e,r)=>{const{encode:i}=r,[a]=zt(i,"y"),[o,s]=zt(i,"y1"),c=ra(n,e,r),l=new Array(e.length);for(const u of c){const f=u.map(d=>+a[d]);for(let d=0;d<u.length;d++){const h=u[d],p=Math.max(...f.filter((v,g)=>g!==d));l[h]=+a[h]>p?p:a[h]}}return[e,U({},r,{encode:{y1:ue(l,s)}})]}};HS.props={};function R1(t,n){return[t[0]]}function aI(t,n){const e=t.length-1;return[t[e]]}function oI(t,n){const e=us(t,r=>n[r]);return[t[e]]}function sI(t,n){const e=al(t,r=>n[r]);return[t[e]]}function cI(t){return typeof t=="function"?t:{first:R1,last:aI,max:oI,min:sI}[t]||R1}const Rd=(t={})=>{const{groupBy:n="series",channel:e,selector:r}=t;return(i,a)=>{const{encode:o}=a,s=ra(n,i,a),[c]=zt(o,e),l=cI(r);return[s.flatMap(u=>l(u,c)),a]}};Rd.props={};var lI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const VS=(t={})=>{const{selector:n}=t,e=lI(t,["selector"]);return Rd(Object.assign({channel:"x",selector:n},e))};VS.props={};var uI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const XS=(t={})=>{const{selector:n}=t,e=uI(t,["selector"]);return Rd(Object.assign({channel:"y",selector:n},e))};XS.props={};var fI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function aa(t){return n=>n===null?t:`${t} of ${n}`}function dI(t){if(typeof t=="function")return[t,null];const e={mean:hI,max:vI,count:yI,first:bI,last:xI,sum:mI,min:gI,median:pI}[t];if(!e)throw new Error(`Unknown reducer: ${t}.`);return e()}function hI(){const t=(e,r)=>Oc(e,i=>+r[i]),n=aa("mean");return[t,n]}function pI(){const t=(e,r)=>fg(e,i=>+r[i]),n=aa("median");return[t,n]}function vI(){const t=(e,r)=>Qt(e,i=>+r[i]),n=aa("max");return[t,n]}function gI(){const t=(e,r)=>Xn(e,i=>+r[i]),n=aa("min");return[t,n]}function yI(){const t=(e,r)=>e.length,n=aa("count");return[t,n]}function mI(){const t=(e,r)=>lr(e,i=>+r[i]),n=aa("sum");return[t,n]}function bI(){const t=(e,r)=>r[e[0]],n=aa("first");return[t,n]}function xI(){const t=(e,r)=>r[e[e.length-1]],n=aa("last");return[t,n]}const Sg=(t={})=>{const{groupBy:n}=t,e=fI(t,["groupBy"]);return(r,i)=>{const{data:a,encode:o}=i,s=n(r,i);if(!s)return[r,i];const c=(h,p)=>{if(h)return h;const{from:v}=p;if(!v)return h;const[,g]=zt(o,v);return g},l=Object.entries(e).map(([h,p])=>{const[v,g]=dI(p),[y,m]=zt(o,h),b=c(m,p),x=s.map(w=>v(w,y??a));return[h,Object.assign(Object.assign({},W4(x,(g==null?void 0:g(b))||b)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,v]=zt(o,h),g=s.map(y=>p[y[0]]);return[h,ue(g,v)]}),f=s.map(h=>a[h[0]]);return[to(s),U({},i,{data:f,encode:Object.fromEntries([...u,...l])})]}};Sg.props={};var wI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const ul=(t={})=>{const{channels:n=["x","y"]}=t,e=wI(t,["channels"]),r=(i,a)=>ra(n,i,a);return Sg(Object.assign(Object.assign({},e),{groupBy:r}))};ul.props={};const US=(t={})=>ul(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));US.props={};const qS=(t={})=>ul(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));qS.props={};const KS=(t={})=>ul(Object.assign(Object.assign({},t),{channels:["color"]}));KS.props={};function OI(t,n,e){const{by:r=t,reducer:i="max"}=n,[a]=zt(e,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>Qt(o,s=>+a[s]);if(i==="min")return o=>Xn(o,s=>+a[s]);if(i==="sum")return o=>lr(o,s=>+a[s]);if(i==="median")return o=>fg(o,s=>+a[s]);if(i==="mean")return o=>Oc(o,s=>+a[s]);if(i==="first")return o=>a[o[0]];if(i==="last")return o=>a[o[o.length-1]];throw new Error(`Unknown reducer: ${i}`)}function _I(t,n,e){if(!Array.isArray(e))return t;const r=new Set(e);return t.filter(i=>r.has(n[i]))}const Id=(t={})=>(n,e)=>{const{reverse:r,slice:i,channel:a,by:o,ordinal:s=!0,reducer:c}=t,{encode:l,scale:u={}}=e,f=u[a].domain,[d]=zt(l,o??a),[h]=zt(l,a),p=OI(a,{by:o,reducer:c},l),v=_I(n,h,f),g=eR(v,p,x=>h[x]),y=s?n:Er(n,x=>d[x]);r&&(!s&&y.reverse(),g.reverse());const m=typeof i=="number"?[0,i]:i,b=i?g.slice(...m):g;return[y,U(e,{scale:{[a]:{domain:b}}})]};Id.props={};const ZS=(t={})=>Id(Object.assign(Object.assign({},t),{channel:"x"}));ZS.props={};const QS=(t={})=>Id(Object.assign(Object.assign({},t),{channel:"color"}));QS.props={};const JS=(t={})=>Id(Object.assign(Object.assign({},t),{channel:"y"}));JS.props={};function SI(t,n){return typeof n=="string"?t.map(e=>e[n]):t.map(n)}function EI(t,n){if(typeof t=="function")return e=>t(e,n);if(t==="sum")return e=>lr(e,r=>+n[r]);throw new Error(`Unknown reducer: ${t}`)}const tE=(t={})=>{const{field:n,channel:e="y",reducer:r="sum"}=t;return(i,a)=>{const{data:o,encode:s}=a,[c]=zt(s,"x"),l=n?SI(o,n):zt(s,e)[0],u=EI(r,l),f=lg(i,u,d=>c[d]).map(d=>d[1]);return[i,U({},a,{scale:{x:{flex:f}}})]}};tE.props={};function je([t,n],[e,r]){return[t-e,n-r]}function Cl([t,n],[e,r]){return[t+e,n+r]}function Te([t,n],[e,r]){return Math.sqrt(Math.pow(t-e,2)+Math.pow(n-r,2))}function fr([t,n]){return Math.atan2(n,t)}function Uo([t,n]){return fr([t,n])+Math.PI/2}function eE(t,n){const e=fr(t),r=fr(n);return e<r?r-e:Math.PI*2-(e-r)}function Eg(t){let n=1/0,e=-1/0,r=1/0,i=-1/0;for(const[s,c]of t)n=Math.min(s,n),e=Math.max(s,e),r=Math.min(c,r),i=Math.max(c,i);const a=e-n,o=i-r;return[n,r,a,o]}function nE([t,n],[e,r]){return[(t+e)/2,(n+r)/2]}function kI(t){const{padding:n=0,direction:e="col"}=t;return(r,i,a)=>{const o=r.length;if(o===0)return[];const{innerWidth:s,innerHeight:c}=a,l=c/s;let u=Math.ceil(Math.sqrt(i/l)),f=s/u,d=Math.ceil(i/u),h=d*f;for(;h>c;)u=u+1,f=s/u,d=Math.ceil(i/u),h=d*f;const p=c-d*f,v=d<=1?0:p/(d-1),[g,y]=d<=1?[(s-o*f)/(o-1),(c-f)/2]:[0,0];return r.map((m,b)=>{const[x,w,O,_]=Eg(m),S=e==="col"?b%u:Math.floor(b/d),E=e==="col"?Math.floor(b/u):b%d,k=S*f,M=(d-E-1)*f+p,T=(f-n)/O,A=(f-n)/_,P=k-x+g*S+1/2*n,L=M-w-v*E-y+1/2*n;return`translate(${P}, ${L}) scale(${T}, ${A})`})}}const rE=t=>(n,e)=>[n,U({},e,{modifier:kI(t),axis:!1})];rE.props={};var MI=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const I1="thresholds";function AI(t){const[n,e]=gi(t);return Math.min(200,hR(t,n,e))}const kg=(t={})=>{const{groupChannels:n=["color"],binChannels:e=["x","y"]}=t,r=MI(t,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:c}=s,l=e.map(p=>{const[v]=zt(c,p);return v}),u=nt(r,I1),f=o.filter(p=>l.every(v=>fe(v[p]))),d=[...n.map(p=>{const[v]=zt(c,p);return v}).filter(fe).map(p=>v=>p[v]),...e.map((p,v)=>{const g=l[v],y=u[p]||AI(g),m=uR().thresholds(y).value(x=>+g[x])(f),b=new Map(m.flatMap(x=>{const{x0:w,x1:O}=x,_=`${w},${O}`;return x.map(S=>[S,_])}));return i[p]=b,x=>b.get(x)})];return Array.from(le(f,p=>d.map(v=>v(p)).join("-")).values())};return Sg(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(I1)))),Object.fromEntries(e.flatMap(o=>{const s=([l])=>+i[o].get(l).split(",")[0],c=([l])=>+i[o].get(l).split(",")[1];return c.from=o,[[o,s],[`${o}1`,c]]}))),{groupBy:a}))};kg.props={};const iE=(t={})=>{const{thresholds:n}=t;return kg(Object.assign(Object.assign({},t),{thresholdsX:n,groupChannels:["color"],binChannels:["x"]}))};iE.props={};function TI(t,n,e,r){const i=t.length;if(r>=i||r===0)return t;const a=h=>n[t[h]]*1,o=h=>e[t[h]]*1,s=[],c=(i-2)/(r-2);let l=0,u,f,d;s.push(l);for(let h=0;h<r-2;h++){let p=0,v=0,g=Math.floor((h+1)*c)+1,y=Math.floor((h+2)*c)+1;y=Math.min(y,i);const m=y-g;for(;g<y;g++)p+=a(g),v+=o(g);p/=m,v/=m;let b=Math.floor((h+0)*c)+1;const x=Math.floor((h+1)*c)+1,w=[a(l),o(l)];for(u=f=-1;b<x;b++)f=Math.abs((w[0]-p)*(a(b)-w[1])-(w[0]-o(b))*(v-w[0]))*.5,f>u&&(u=f,d=b);s.push(d),l=d}return s.push(i-1),s.map(h=>t[h])}function PI(t){if(typeof t=="function")return t;if(t==="lttb")return TI;const n={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[al(r,o=>a[o])]],max:(r,i,a)=>[r[us(r,o=>a[o])]],median:(r,i,a)=>[r[pR(r,o=>a[o])]]},e=n[t]||n.median;return(r,i,a,o)=>{const s=Math.max(1,Math.floor(r.length/o));return CI(r,s).flatMap(l=>e(l,i,a))}}function CI(t,n){const e=t.length,r=[];let i=0;for(;i<e;)r.push(t.slice(i,i+=n));return r}const aE=(t={})=>{const{strategy:n="median",thresholds:e=2e3,groupBy:r=["series","color"]}=t,i=PI(n);return(a,o)=>{const{encode:s}=o,c=ra(r,a,o),[l]=zt(s,"x"),[u]=zt(s,"y");return[c.flatMap(f=>i(f,l,u,e)),o]}};aE.props={};function LI(t){return typeof t=="object"?[t.value,t.ordinal]:[t,!0]}function NI(t){var n;const{encode:e}=t,r=Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),{y:Object.assign(Object.assign({},t.encode.y),{value:[]})})}),i=(n=e==null?void 0:e.color)===null||n===void 0?void 0:n.field;if(!e||!i)return r;let a;for(const[o,s]of Object.entries(e))(o==="x"||o==="y")&&s.field===i&&(a=Object.assign(Object.assign({},a),{[o]:Object.assign(Object.assign({},s),{value:[]})}));return a?Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),a)}):r}const oE=(t={})=>(n,e)=>{const{encode:r,data:i}=e,a=Object.keys(t).length>0,o=Object.entries(t).map(([f,d])=>{const[h]=zt(r,f);if(!h)return null;const[p,v=!0]=LI(d);if(typeof p=="function")return g=>p(h[g]);if(v){const g=Array.isArray(p)?p:[p];return g.length===0?null:y=>g.includes(h[y])}else{const[g,y]=p;return m=>h[m]>=g&&h[m]<=y}}).filter(fe),s=f=>o.every(d=>d(f)),c=n.filter(s),l=c.map((f,d)=>d);if(o.length===0&&a){const f=NI(e);return[[],f]}const u=Object.entries(r).map(([f,d])=>[f,Object.assign(Object.assign({},d),{value:l.map(h=>d.value[c[h]]).filter(h=>h!==void 0)})]);return[l,U({},e,{encode:Object.fromEntries(u),data:c.map(f=>i[f])})]};oE.props={};function _e(t){return function(){return t}}const j1=Math.abs,mn=Math.atan2,pa=Math.cos,RI=Math.max,Fh=Math.min,Pr=Math.sin,_o=Math.sqrt,bn=1e-12,Mc=Math.PI,pf=Mc/2,II=2*Mc;function jI(t){return t>1?0:t<-1?Mc:Math.acos(t)}function D1(t){return t>=1?pf:t<=-1?-pf:Math.asin(t)}const wv=Math.PI,Ov=2*wv,Ea=1e-6,DI=Ov-Ea;function sE(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=arguments[n]+t[n]}function $I(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return sE;const e=10**n;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*e)/e+r[i]}}let Mg=class{constructor(n){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=n==null?sE:$I(n)}moveTo(n,e){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(n,e){this._append`L${this._x1=+n},${this._y1=+e}`}quadraticCurveTo(n,e,r,i){this._append`Q${+n},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(n,e,r,i,a,o){this._append`C${+n},${+e},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(n,e,r,i,a){if(n=+n,e=+e,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=r-n,l=i-e,u=o-n,f=s-e,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=n},${this._y1=e}`;else if(d>Ea)if(!(Math.abs(f*c-l*u)>Ea)||!a)this._append`L${this._x1=n},${this._y1=e}`;else{let h=r-o,p=i-s,v=c*c+l*l,g=h*h+p*p,y=Math.sqrt(v),m=Math.sqrt(d),b=a*Math.tan((wv-Math.acos((v+d-g)/(2*y*m)))/2),x=b/m,w=b/y;Math.abs(x-1)>Ea&&this._append`L${n+x*u},${e+x*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=n+w*c},${this._y1=e+w*l}`}}arc(n,e,r,i,a,o){if(n=+n,e=+e,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=n+s,u=e+c,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Ea||Math.abs(this._y1-u)>Ea)&&this._append`L${l},${u}`,r&&(d<0&&(d=d%Ov+Ov),d>DI?this._append`A${r},${r},0,1,${f},${n-s},${e-c}A${r},${r},0,1,${f},${this._x1=l},${this._y1=u}`:d>Ea&&this._append`A${r},${r},0,${+(d>=wv)},${f},${this._x1=n+r*Math.cos(a)},${this._y1=e+r*Math.sin(a)}`)}rect(n,e,r,i){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function pr(){return new Mg}pr.prototype=Mg.prototype;function Ag(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{const r=Math.floor(e);if(!(r>=0))throw new RangeError(`invalid digits: ${e}`);n=r}return t},()=>new Mg(n)}function FI(t){return t.innerRadius}function BI(t){return t.outerRadius}function zI(t){return t.startAngle}function WI(t){return t.endAngle}function YI(t){return t&&t.padAngle}function GI(t,n,e,r,i,a,o,s){var c=e-t,l=r-n,u=o-i,f=s-a,d=f*c-u*l;if(!(d*d<bn))return d=(u*(n-a)-f*(t-i))/d,[t+d*c,n+d*l]}function Ll(t,n,e,r,i,a,o){var s=t-e,c=n-r,l=(o?a:-a)/_o(s*s+c*c),u=l*c,f=-l*s,d=t+u,h=n+f,p=e+u,v=r+f,g=(d+p)/2,y=(h+v)/2,m=p-d,b=v-h,x=m*m+b*b,w=i-a,O=d*v-p*h,_=(b<0?-1:1)*_o(RI(0,w*w*x-O*O)),S=(O*b-m*_)/x,E=(-O*m-b*_)/x,k=(O*b+m*_)/x,M=(-O*m+b*_)/x,T=S-g,A=E-y,P=k-g,L=M-y;return T*T+A*A>P*P+L*L&&(S=k,E=M),{cx:S,cy:E,x01:-u,y01:-f,x11:S*(i/w-1),y11:E*(i/w-1)}}function Tg(){var t=FI,n=BI,e=_e(0),r=null,i=zI,a=WI,o=YI,s=null,c=Ag(l);function l(){var u,f,d=+t.apply(this,arguments),h=+n.apply(this,arguments),p=i.apply(this,arguments)-pf,v=a.apply(this,arguments)-pf,g=j1(v-p),y=v>p;if(s||(s=u=c()),h<d&&(f=h,h=d,d=f),!(h>bn))s.moveTo(0,0);else if(g>II-bn)s.moveTo(h*pa(p),h*Pr(p)),s.arc(0,0,h,p,v,!y),d>bn&&(s.moveTo(d*pa(v),d*Pr(v)),s.arc(0,0,d,v,p,y));else{var m=p,b=v,x=p,w=v,O=g,_=g,S=o.apply(this,arguments)/2,E=S>bn&&(r?+r.apply(this,arguments):_o(d*d+h*h)),k=Fh(j1(h-d)/2,+e.apply(this,arguments)),M=k,T=k,A,P;if(E>bn){var L=D1(E/d*Pr(S)),I=D1(E/h*Pr(S));(O-=L*2)>bn?(L*=y?1:-1,x+=L,w-=L):(O=0,x=w=(p+v)/2),(_-=I*2)>bn?(I*=y?1:-1,m+=I,b-=I):(_=0,m=b=(p+v)/2)}var R=h*pa(m),C=h*Pr(m),N=d*pa(w),j=d*Pr(w);if(k>bn){var D=h*pa(b),$=h*Pr(b),B=d*pa(x),z=d*Pr(x),W;if(g<Mc)if(W=GI(R,C,B,z,D,$,N,j)){var G=R-W[0],V=C-W[1],Y=D-W[0],q=$-W[1],K=1/Pr(jI((G*Y+V*q)/(_o(G*G+V*V)*_o(Y*Y+q*q)))/2),et=_o(W[0]*W[0]+W[1]*W[1]);M=Fh(k,(d-et)/(K-1)),T=Fh(k,(h-et)/(K+1))}else M=T=0}_>bn?T>bn?(A=Ll(B,z,R,C,h,T,y),P=Ll(D,$,N,j,h,T,y),s.moveTo(A.cx+A.x01,A.cy+A.y01),T<k?s.arc(A.cx,A.cy,T,mn(A.y01,A.x01),mn(P.y01,P.x01),!y):(s.arc(A.cx,A.cy,T,mn(A.y01,A.x01),mn(A.y11,A.x11),!y),s.arc(0,0,h,mn(A.cy+A.y11,A.cx+A.x11),mn(P.cy+P.y11,P.cx+P.x11),!y),s.arc(P.cx,P.cy,T,mn(P.y11,P.x11),mn(P.y01,P.x01),!y))):(s.moveTo(R,C),s.arc(0,0,h,m,b,!y)):s.moveTo(R,C),!(d>bn)||!(O>bn)?s.lineTo(N,j):M>bn?(A=Ll(N,j,D,$,d,-M,y),P=Ll(R,C,B,z,d,-M,y),s.lineTo(A.cx+A.x01,A.cy+A.y01),M<k?s.arc(A.cx,A.cy,M,mn(A.y01,A.x01),mn(P.y01,P.x01),!y):(s.arc(A.cx,A.cy,M,mn(A.y01,A.x01),mn(A.y11,A.x11),!y),s.arc(0,0,d,mn(A.cy+A.y11,A.cx+A.x11),mn(P.cy+P.y11,P.cx+P.x11),y),s.arc(P.cx,P.cy,M,mn(P.y11,P.x11),mn(P.y01,P.x01),!y))):s.arc(0,0,d,w,x,y)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Mc/2;return[pa(f)*u,Pr(f)*u]},l.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:_e(+u),l):t},l.outerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:_e(+u),l):n},l.cornerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:_e(+u),l):e},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:_e(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:_e(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:_e(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:_e(+u),l):o},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function cE(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lE(t){this._context=t}lE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n);break}}};function fl(t){return new lE(t)}function uE(t){return t[0]}function fE(t){return t[1]}function eo(t,n){var e=_e(!0),r=null,i=fl,a=null,o=Ag(s);t=typeof t=="function"?t:t===void 0?uE:_e(t),n=typeof n=="function"?n:n===void 0?fE:_e(n);function s(c){var l,u=(c=cE(c)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&e(f=c[l],l,c))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(f,l,c),+n(f,l,c));if(h)return a=null,h+""||null}return s.x=function(c){return arguments.length?(t=typeof c=="function"?c:_e(+c),s):t},s.y=function(c){return arguments.length?(n=typeof c=="function"?c:_e(+c),s):n},s.defined=function(c){return arguments.length?(e=typeof c=="function"?c:_e(!!c),s):e},s.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),s):r},s}function _v(t,n,e){var r=null,i=_e(!0),a=null,o=fl,s=null,c=Ag(l);t=typeof t=="function"?t:t===void 0?uE:_e(+t),n=typeof n=="function"?n:_e(n===void 0?0:+n),e=typeof e=="function"?e:e===void 0?fE:_e(+e);function l(f){var d,h,p,v=(f=cE(f)).length,g,y=!1,m,b=new Array(v),x=new Array(v);for(a==null&&(s=o(m=c())),d=0;d<=v;++d){if(!(d<v&&i(g=f[d],d,f))===y)if(y=!y)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(b[p],x[p]);s.lineEnd(),s.areaEnd()}y&&(b[d]=+t(g,d,f),x[d]=+n(g,d,f),s.point(r?+r(g,d,f):b[d],e?+e(g,d,f):x[d]))}if(m)return s=null,m+""||null}function u(){return eo().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:_e(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:_e(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:_e(+f),l):r},l.y=function(f){return arguments.length?(n=typeof f=="function"?f:_e(+f),e=null,l):n},l.y0=function(f){return arguments.length?(n=typeof f=="function"?f:_e(+f),l):n},l.y1=function(f){return arguments.length?(e=f==null?null:typeof f=="function"?f:_e(+f),l):e},l.lineX0=l.lineY0=function(){return u().x(t).y(n)},l.lineY1=function(){return u().x(t).y(e)},l.lineX1=function(){return u().x(r).y(n)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:_e(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}var dE=Pg(fl);function hE(t){this._curve=t}hE.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};function Pg(t){function n(e){return new hE(t(e))}return n._curve=t,n}function Is(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(e){return arguments.length?n(Pg(e)):n()._curve},t}function HI(){return Is(eo().curve(dE))}function VI(){var t=_v().curve(dE),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Is(e())},delete t.lineX0,t.lineEndAngle=function(){return Is(r())},delete t.lineX1,t.lineInnerRadius=function(){return Is(i())},delete t.lineY0,t.lineOuterRadius=function(){return Is(a())},delete t.lineY1,t.curve=function(o){return arguments.length?n(Pg(o)):n()._curve},t}function qo(){}function Sv(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Cg(t,n){this._context=t,this._k=(1-n)/6}Cg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Sv(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Sv(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(r){return new Cg(r,n)}return e.tension=function(r){return t(+r)},e})(0);function Lg(t,n){this._context=t,this._k=(1-n)/6}Lg.prototype={areaStart:qo,areaEnd:qo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Sv(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(r){return new Lg(r,n)}return e.tension=function(r){return t(+r)},e})(0);function pE(t,n,e){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>bn){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>bn){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-n*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-e*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function vE(t,n){this._context=t,this._alpha=n}vE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:pE(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(r){return n?new vE(r,n):new Cg(r,0)}return e.alpha=function(r){return t(+r)},e})(.5);function gE(t,n){this._context=t,this._alpha=n}gE.prototype={areaStart:qo,areaEnd:qo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:pE(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const yE=(function t(n){function e(r){return n?new gE(r,n):new Lg(r,0)}return e.alpha=function(r){return t(+r)},e})(.5);function mE(t){this._context=t}mE.prototype={areaStart:qo,areaEnd:qo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function Ng(t){return new mE(t)}function $1(t){return t<0?-1:1}function F1(t,n,e){var r=t._x1-t._x0,i=n-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return($1(a)+$1(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function B1(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Bh(t,n,e){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*n,a-s,o-s*e,a,o)}function vf(t){this._context=t}vf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Bh(this,this._t0,B1(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,!(t===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Bh(this,B1(this,e=F1(this,t,n)),e);break;default:Bh(this,this._t0,e=F1(this,t,n));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}};function bE(t){this._context=new xE(t)}(bE.prototype=Object.create(vf.prototype)).point=function(t,n){vf.prototype.point.call(this,n,t)};function xE(t){this._context=t}xE.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,a){this._context.bezierCurveTo(n,t,r,e,a,i)}};function wE(t){return new vf(t)}function OE(t){return new bE(t)}function jd(t,n){this._context=t,this._t=n}jd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}break}}this._x=t,this._y=n}};function _E(t){return new jd(t,.5)}function SE(t){return new jd(t,0)}function EE(t){return new jd(t,1)}function de(t){const{transformations:n}=t.getOptions();return n.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function Jt(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="polar")}function Dd(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="reflect")&&n.some(([e])=>e.startsWith("transpose"))}function kE(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="helix")}function $d(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="parallel")}function ME(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="fisheye")}function XI(t){return $d(t)&&Jt(t)}function fs(t){return kE(t)||Jt(t)}function UI(t){return Jt(t)&&de(t)}function qI(t){if(fs(t)){const[n,e]=t.getSize(),r=t.getOptions().transformations.find(i=>i[0]==="polar");if(r)return Math.max(n,e)/2*r[4]}return 0}function Fd(t){const{transformations:n}=t.getOptions(),[,,,e,r]=n.find(i=>i[0]==="polar");return[+e,+r]}function Rg(t,n=!0){const{transformations:e}=t.getOptions(),[,r,i]=e.find(a=>a[0]==="polar");return n?[+r*180/Math.PI,+i*180/Math.PI]:[r,i]}function KI(t,n){const{transformations:e}=t.getOptions(),[,...r]=e.find(i=>i[0]===n);return r}function Pt(t,n,e){return n=Zu(n),kL(t,ML()?Reflect.construct(n,e||[],Zu(t).constructor):n.apply(t,e))}var zh={exports:{}},z1;function ZI(){return z1||(z1=1,(function(t){var n=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function i(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function a(c,l,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||c,d),p=e?e+l:l;return c._events[p]?c._events[p].fn?c._events[p]=[c._events[p],h]:c._events[p].push(h):(c._events[p]=h,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new r:delete c._events[l]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],u,f;if(this._eventsCount===0)return l;for(f in u=this._events)n.call(u,f)&&l.push(e?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},s.prototype.listeners=function(l){var u=e?e+l:l,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},s.prototype.listenerCount=function(l){var u=e?e+l:l,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(l,u,f,d,h,p){var v=e?e+l:l;if(!this._events[v])return!1;var g=this._events[v],y=arguments.length,m,b;if(g.fn){switch(g.once&&this.removeListener(l,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,f),!0;case 4:return g.fn.call(g.context,u,f,d),!0;case 5:return g.fn.call(g.context,u,f,d,h),!0;case 6:return g.fn.call(g.context,u,f,d,h,p),!0}for(b=1,m=new Array(y-1);b<y;b++)m[b-1]=arguments[b];g.fn.apply(g.context,m)}else{var x=g.length,w;for(b=0;b<x;b++)switch(g[b].once&&this.removeListener(l,g[b].fn,void 0,!0),y){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,u);break;case 3:g[b].fn.call(g[b].context,u,f);break;case 4:g[b].fn.call(g[b].context,u,f,d);break;default:if(!m)for(w=1,m=new Array(y-1);w<y;w++)m[w-1]=arguments[w];g[b].fn.apply(g[b].context,m)}}return!0},s.prototype.on=function(l,u,f){return a(this,l,u,f,!1)},s.prototype.once=function(l,u,f){return a(this,l,u,f,!0)},s.prototype.removeListener=function(l,u,f,d){var h=e?e+l:l;if(!this._events[h])return this;if(!u)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===u&&(!d||p.once)&&(!f||p.context===f)&&o(this,h);else{for(var v=0,g=[],y=p.length;v<y;v++)(p[v].fn!==u||d&&!p[v].once||f&&p[v].context!==f)&&g.push(p[v]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},s.prototype.removeAllListeners=function(l){var u;return l?(u=e?e+l:l,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=e,s.EventEmitter=s,t.exports=s})(zh)),zh.exports}var QI=ZI();const AE=q0(QI);function JI(t,n){for(;!{}.hasOwnProperty.call(t,n)&&(t=Zu(t))!==null;);return t}function Ev(){return Ev=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,n,e){var r=JI(t,n);if(r){var i=Object.getOwnPropertyDescriptor(r,n);return i.get?i.get.call(arguments.length<3?t:e):i.value}},Ev.apply(null,arguments)}function W1(t,n,e,r){var i=Ev(Zu(t.prototype),n,e);return typeof i=="function"?function(a){return i.apply(e,a)}:i}/*!
42
42
  * @antv/g-math
43
43
  * @description Geometry util
44
44
  * @version 3.0.1
45
45
  * @date 5/9/2025, 8:18:51 AM
46
46
  * @author AntVis
47
47
  * @docs https://g.antv.antgroup.com/
48
- */function yi(t,n,e,r){var i=t-e,a=n-r;return Math.sqrt(i*i+a*a)}function TE(t,n){var e=Math.min.apply(Math,It(t)),r=Math.min.apply(Math,It(n)),i=Math.max.apply(Math,It(t)),a=Math.max.apply(Math,It(n));return{x:e,y:r,width:i-e,height:a-r}}function t8(t,n,e){return Math.atan(-n/t*Math.tan(e))}function e8(t,n,e){return Math.atan(n/(t*Math.tan(e)))}function n8(t,n,e,r,i,a){return e*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function r8(t,n,e,r,i,a){return e*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+n}function i8(t,n,e,r,i,a,o){for(var s=t8(e,r,i),c=1/0,l=-1/0,u=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var d=s+f;a<o?a<d&&d<o&&u.push(d):o<d&&d<a&&u.push(d)}for(var h=0;h<u.length;h++){var p=n8(t,n,e,r,i,u[h]);p<c&&(c=p),p>l&&(l=p)}for(var v=e8(e,r,i),g=1/0,y=-1/0,m=[a,o],b=-Math.PI*2;b<=Math.PI*2;b+=Math.PI){var x=v+b;a<o?a<x&&x<o&&m.push(x):o<x&&x<a&&m.push(x)}for(var w=0;w<m.length;w++){var O=r8(t,n,e,r,i,m[w]);O<g&&(g=O),O>y&&(y=O)}return{x:c,y:g,width:l-c,height:y-g}}var a8=1e-4;function PE(t,n,e,r,i,a){var o=-1,s=1/0,c=[e,r],l=20;a&&a>200&&(l=a/10);for(var u=1/l,f=u/10,d=0;d<=l;d++){var h=d*u,p=[i.apply(void 0,It(t.concat([h]))),i.apply(void 0,It(n.concat([h])))],v=yi(c[0],c[1],p[0],p[1]);v<s&&(o=h,s=v)}if(o===0)return{x:t[0],y:n[0]};if(o===1){var g=t.length;return{x:t[g-1],y:n[g-1]}}s=1/0;for(var y=0;y<32&&!(f<a8);y++){var m=o-f,b=o+f,x=[i.apply(void 0,It(t.concat([m]))),i.apply(void 0,It(n.concat([m])))],w=yi(c[0],c[1],x[0],x[1]);if(m>=0&&w<s)o=m,s=w;else{var O=[i.apply(void 0,It(t.concat([b]))),i.apply(void 0,It(n.concat([b])))],_=yi(c[0],c[1],O[0],O[1]);b<=1&&_<s?(o=b,s=_):f*=.5}}return{x:i.apply(void 0,It(t.concat([o]))),y:i.apply(void 0,It(n.concat([o])))}}function CE(t,n,e,r){return yi(t,n,e,r)}function LE(t,n,e,r,i){return{x:(1-i)*t+i*e,y:(1-i)*n+i*r}}function o8(t,n,e,r,i,a){var o=[e-t,r-n];if(u4(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-n)*(a-n));var s=[-o[1],o[0]];c4(s,s);var c=[i-t,a-n];return Math.abs(l4(c,s))}function kv(t,n,e,r,i){var a=1-i;return a*a*a*t+3*n*i*a*a+3*e*i*i*a+r*i*i*i}function Y1(t,n,e,r){var i=-3*t+9*n-9*e+3*r,a=6*t-12*n+6*e,o=3*n-3*t,s=[],c,l,u;if(tc(i,0))tc(a,0)||(c=-o/a,c>=0&&c<=1&&s.push(c));else{var f=a*a-4*i*o;tc(f,0)?s.push(-a/(2*i)):f>0&&(u=Math.sqrt(f),c=(-a+u)/(2*i),l=(-a-u)/(2*i),c>=0&&c<=1&&s.push(c),l>=0&&l<=1&&s.push(l))}return s}function s8(t,n,e,r,i,a,o,s){for(var c=[t,o],l=[n,s],u=Y1(t,e,i,o),f=Y1(n,r,a,s),d=0;d<u.length;d++)c.push(kv(t,e,i,o,u[d]));for(var h=0;h<f.length;h++)l.push(kv(n,r,a,s,f[h]));return TE(c,l)}function c8(t,n,e,r,i,a,o,s,c,l,u){return PE([t,e,i,o],[n,r,a,s],c,l,kv,u)}function G1(t,n,e,r,i,a,o,s,c,l,u){var f=c8(t,n,e,r,i,a,o,s,c,l,u);return yi(f.x,f.y,c,l)}function l8(t){if(t.length<2)return 0;for(var n=0,e=0;e<t.length-1;e++){var r=t[e],i=t[e+1];n+=yi(r[0],r[1],i[0],i[1])}return n}function u8(t){return l8(t)}function Mv(t,n,e,r){var i=1-r;return i*i*t+2*r*i*n+r*r*e}function H1(t,n,e){var r=t+e-2*n;if(tc(r,0))return[.5];var i=(t-n)/r;return i<=1&&i>=0?[i]:[]}function f8(t,n,e,r,i,a){var o=H1(t,e,i)[0],s=H1(n,r,a)[0],c=[t,i],l=[n,a];return o!==void 0&&c.push(Mv(t,e,i,o)),s!==void 0&&l.push(Mv(n,r,a,s)),TE(c,l)}function d8(t,n,e,r,i,a,o,s){return PE([t,e,i],[n,r,a],o,s,Mv)}function h8(t,n,e,r,i,a,o,s){var c=d8(t,n,e,r,i,a,o,s);return yi(c.x,c.y,o,s)}function ka(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=ML(t))||n){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
48
+ */function yi(t,n,e,r){var i=t-e,a=n-r;return Math.sqrt(i*i+a*a)}function TE(t,n){var e=Math.min.apply(Math,It(t)),r=Math.min.apply(Math,It(n)),i=Math.max.apply(Math,It(t)),a=Math.max.apply(Math,It(n));return{x:e,y:r,width:i-e,height:a-r}}function t8(t,n,e){return Math.atan(-n/t*Math.tan(e))}function e8(t,n,e){return Math.atan(n/(t*Math.tan(e)))}function n8(t,n,e,r,i,a){return e*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function r8(t,n,e,r,i,a){return e*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+n}function i8(t,n,e,r,i,a,o){for(var s=t8(e,r,i),c=1/0,l=-1/0,u=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var d=s+f;a<o?a<d&&d<o&&u.push(d):o<d&&d<a&&u.push(d)}for(var h=0;h<u.length;h++){var p=n8(t,n,e,r,i,u[h]);p<c&&(c=p),p>l&&(l=p)}for(var v=e8(e,r,i),g=1/0,y=-1/0,m=[a,o],b=-Math.PI*2;b<=Math.PI*2;b+=Math.PI){var x=v+b;a<o?a<x&&x<o&&m.push(x):o<x&&x<a&&m.push(x)}for(var w=0;w<m.length;w++){var O=r8(t,n,e,r,i,m[w]);O<g&&(g=O),O>y&&(y=O)}return{x:c,y:g,width:l-c,height:y-g}}var a8=1e-4;function PE(t,n,e,r,i,a){var o=-1,s=1/0,c=[e,r],l=20;a&&a>200&&(l=a/10);for(var u=1/l,f=u/10,d=0;d<=l;d++){var h=d*u,p=[i.apply(void 0,It(t.concat([h]))),i.apply(void 0,It(n.concat([h])))],v=yi(c[0],c[1],p[0],p[1]);v<s&&(o=h,s=v)}if(o===0)return{x:t[0],y:n[0]};if(o===1){var g=t.length;return{x:t[g-1],y:n[g-1]}}s=1/0;for(var y=0;y<32&&!(f<a8);y++){var m=o-f,b=o+f,x=[i.apply(void 0,It(t.concat([m]))),i.apply(void 0,It(n.concat([m])))],w=yi(c[0],c[1],x[0],x[1]);if(m>=0&&w<s)o=m,s=w;else{var O=[i.apply(void 0,It(t.concat([b]))),i.apply(void 0,It(n.concat([b])))],_=yi(c[0],c[1],O[0],O[1]);b<=1&&_<s?(o=b,s=_):f*=.5}}return{x:i.apply(void 0,It(t.concat([o]))),y:i.apply(void 0,It(n.concat([o])))}}function CE(t,n,e,r){return yi(t,n,e,r)}function LE(t,n,e,r,i){return{x:(1-i)*t+i*e,y:(1-i)*n+i*r}}function o8(t,n,e,r,i,a){var o=[e-t,r-n];if(u4(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-n)*(a-n));var s=[-o[1],o[0]];c4(s,s);var c=[i-t,a-n];return Math.abs(l4(c,s))}function kv(t,n,e,r,i){var a=1-i;return a*a*a*t+3*n*i*a*a+3*e*i*i*a+r*i*i*i}function Y1(t,n,e,r){var i=-3*t+9*n-9*e+3*r,a=6*t-12*n+6*e,o=3*n-3*t,s=[],c,l,u;if(tc(i,0))tc(a,0)||(c=-o/a,c>=0&&c<=1&&s.push(c));else{var f=a*a-4*i*o;tc(f,0)?s.push(-a/(2*i)):f>0&&(u=Math.sqrt(f),c=(-a+u)/(2*i),l=(-a-u)/(2*i),c>=0&&c<=1&&s.push(c),l>=0&&l<=1&&s.push(l))}return s}function s8(t,n,e,r,i,a,o,s){for(var c=[t,o],l=[n,s],u=Y1(t,e,i,o),f=Y1(n,r,a,s),d=0;d<u.length;d++)c.push(kv(t,e,i,o,u[d]));for(var h=0;h<f.length;h++)l.push(kv(n,r,a,s,f[h]));return TE(c,l)}function c8(t,n,e,r,i,a,o,s,c,l,u){return PE([t,e,i,o],[n,r,a,s],c,l,kv,u)}function G1(t,n,e,r,i,a,o,s,c,l,u){var f=c8(t,n,e,r,i,a,o,s,c,l,u);return yi(f.x,f.y,c,l)}function l8(t){if(t.length<2)return 0;for(var n=0,e=0;e<t.length-1;e++){var r=t[e],i=t[e+1];n+=yi(r[0],r[1],i[0],i[1])}return n}function u8(t){return l8(t)}function Mv(t,n,e,r){var i=1-r;return i*i*t+2*r*i*n+r*r*e}function H1(t,n,e){var r=t+e-2*n;if(tc(r,0))return[.5];var i=(t-n)/r;return i<=1&&i>=0?[i]:[]}function f8(t,n,e,r,i,a){var o=H1(t,e,i)[0],s=H1(n,r,a)[0],c=[t,i],l=[n,a];return o!==void 0&&c.push(Mv(t,e,i,o)),s!==void 0&&l.push(Mv(n,r,a,s)),TE(c,l)}function d8(t,n,e,r,i,a,o,s){return PE([t,e,i],[n,r,a],o,s,Mv)}function h8(t,n,e,r,i,a,o,s){var c=d8(t,n,e,r,i,a,o,s);return yi(c.x,c.y,o,s)}function ka(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=EL(t))||n){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
49
49
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{o||e.return==null||e.return()}finally{if(s)throw a}}}}/*!
50
50
  * @antv/g-lite
51
51
  * @description A core module for rendering engine implements DOM API.
@@ -173,7 +173,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
173
173
  `)}function c(f){return f.map(l).join(`
174
174
  `)}function l(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?gnt(f):n.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:c,formatRow:l,formatValue:u}}function mnt(t){for(var n in t){var e=t[n].trim(),r,i;if(!e)e=null;else if(e==="true")e=!0;else if(e==="false")e=!1;else if(e==="NaN")e=NaN;else if(!isNaN(r=+e))e=r;else if(i=e.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))bnt&&i[4]&&!i[7]&&(e=e.replace(/-/g,"/").replace(/T/," ")),e=new Date(e);else continue;t[n]=e}return t}const bnt=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var xnt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,n||[])).next())})};const O3=t=>{const{value:n,format:e=n.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>xnt(void 0,void 0,void 0,function*(){const a=yield fetch(n);if(e==="csv"){const o=yield a.text();return ynt(r).parse(o,i?mnt:Ga)}if(e==="json")return yield a.json();throw new Error(`Unknown format: ${e}.`)})};O3.props={};function wnt(t){return!t||Object.keys(t).length===0}const _3=t=>{const{fields:n,key:e="key",value:r="value"}=t;return i=>wnt(n)?i:i.flatMap(a=>n.map(o=>Object.assign(Object.assign({},a),{[e]:o,[r]:a[o]})))};_3.props={};function Ont(t){return t!=null&&!Number.isNaN(t)}const S3=t=>{const{callback:n=Ont}=t;return e=>e.filter(n)};S3.props={};const E3=t=>{const{callback:n}=t;return e=>Array.isArray(e)?[...e].sort(n):e};E3.props={};function _nt(t,n=[]){return n.reduce((e,r)=>(r in t&&(e[r]=t[r]),e),{})}const k3=t=>{const{fields:n}=t;return e=>e.map(r=>_nt(r,n))};k3.props={};function Snt(t){return Object.keys(t).length===0}const M3=t=>n=>{if(!t||Snt(t))return n;const e=r=>Object.entries(r).reduce((i,[a,o])=>(i[t[a]||a]=o,i),{});return n.map(e)};M3.props={};function Ent(t,n){return t.map(e=>{if(Array.isArray(e)){const[r,i=n]=e;return[r,i]}return[e,n]})}const A3=t=>{const{fields:n=[]}=t,e=Ent(n,!0);return r=>{const i=(a,o)=>e.reduce((s,[c,l=!0])=>s!==0?s:l?a[c]<o[c]?-1:+(a[c]!==o[c]):a[c]>o[c]?-1:+(a[c]!==o[c]),0);return[...r].sort(i)}};A3.props={};const T3=t=>{const{value:n}=t;return()=>n};T3.props={};const P3=t=>{const{callback:n=Ga}=t;return e=>n(e)};P3.props={};const C3=t=>{const{callback:n=Ga}=t;return e=>Array.isArray(e)?e.map(n):e};C3.props={};var knt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,n||[])).next())})};function Mnt(t,n){return{set(e,r,i){if(n[e]===void 0)return this;const a=r?r.call(null,n[e]):n[e];return i?i.call(null,a):typeof t[e]=="function"?t[e](a):t[e]=a,this},setAsync(e,r,i){return knt(this,void 0,void 0,function*(){if(n[e]===void 0)return this;const a=r?yield r.call(null,n[e]):n[e];return i?i.call(null,a):typeof t[e]=="function"?t[e](a):t[e]=a,this})}}}const Yp=Math.PI/180,Ks=64,Gu=2048;function Ant(t){return t.text}function Tnt(){return"serif"}function hO(){return"normal"}function Pnt(t){return t.value}function Cnt(){return~~(Math.random()*2)*90}function Lnt(){return 1}function Nnt(){}function Rnt(t,n,e,r){if(n.sprite)return;const i=t.context,a=t.ratio;i.clearRect(0,0,(Ks<<5)/a,Gu/a);let o=0,s=0,c=0;const l=e.length;for(--r;++r<l;){n=e[r],i.save(),i.font=n.style+" "+n.weight+" "+~~((n.size+1)/a)+"px "+n.font;let d=i.measureText(n.text+"m").width*a,h=n.size<<1;if(n.rotate){const p=Math.sin(n.rotate*Yp),v=Math.cos(n.rotate*Yp),g=d*v,y=d*p,m=h*v,b=h*p;d=Math.max(Math.abs(g+b),Math.abs(g-b))+31>>5<<5,h=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else d=d+31>>5<<5;if(h>c&&(c=h),o+d>=Ks<<5&&(o=0,s+=c,c=0),s+h>=Gu)break;i.translate((o+(d>>1))/a,(s+(h>>1))/a),n.rotate&&i.rotate(n.rotate*Yp),i.fillText(n.text,0,0),n.padding&&(i.lineWidth=2*n.padding,i.strokeText(n.text,0,0)),i.restore(),n.width=d,n.height=h,n.xoff=o,n.yoff=s,n.x1=d>>1,n.y1=h>>1,n.x0=-n.x1,n.y0=-n.y1,n.hasText=!0,o+=d}const u=i.getImageData(0,0,(Ks<<5)/a,Gu/a).data,f=[];for(;--r>=0;){if(n=e[r],!n.hasText)continue;const d=n.width,h=d>>5;let p=n.y1-n.y0;for(let y=0;y<p*h;y++)f[y]=0;if(o=n.xoff,o==null)return;s=n.yoff;let v=0,g=-1;for(let y=0;y<p;y++){for(let m=0;m<d;m++){const b=h*y+(m>>5),x=u[(s+y)*(Ks<<5)+(o+m)<<2]?1<<31-m%32:0;f[b]|=x,v|=x}v?g=y:(n.y0++,p--,y--,s++)}n.y1=n.y0+g,n.sprite=f.slice(0,(n.y1-n.y0)*h)}}function Int(t,n,e){e>>=5;const r=t.sprite,i=t.width>>5,a=t.x-(i<<4),o=a&127,s=32-o,c=t.y1-t.y0;let l=(t.y+t.y0)*e+(a>>5),u;for(let f=0;f<c;f++){u=0;for(let d=0;d<=i;d++)if((u<<s|(d<i?(u=r[f*i+d])>>>o:0))&n[l+d])return!0;l+=e}return!1}function jnt(t,n){const e=t[0],r=t[1];n.x+n.x0<e.x&&(e.x=n.x+n.x0),n.y+n.y0<e.y&&(e.y=n.y+n.y0),n.x+n.x1>r.x&&(r.x=n.x+n.x1),n.y+n.y1>r.y&&(r.y=n.y+n.y1)}function Dnt(t,n){return t.x+t.x1>n[0].x&&t.x+t.x0<n[1].x&&t.y+t.y1>n[0].y&&t.y+t.y0<n[1].y}function L3(t){const n=t[0]/t[1];return function(e){return[n*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function $nt(t){const e=4*t[0]/t[1];let r=0,i=0;return function(a){const o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:r+=e;break;case 1:i+=4;break;case 2:r-=e;break;default:i-=4;break}return[r,i]}}function pO(t){const n=[];let e=-1;for(;++e<t;)n[e]=0;return n}function Fnt(){return document.createElement("canvas")}function si(t){return typeof t=="function"?t:function(){return t}}const Bnt={archimedean:L3,rectangular:$nt};function znt(){let t=[256,256],n=Ant,e=Tnt,r=Pnt,i=hO,a=Cnt,o=Lnt,s=L3,c=Math.random,l=Nnt,u=[],f=null,d=1/0,h=Fnt;const p=hO,v={};v.start=function(){const[m,b]=t,x=g(h()),w=v.board?v.board:pO((t[0]>>5)*t[1]),O=u.length,_=[],S=u.map(function(T,A,P){return T.text=n.call(this,T,A,P),T.font=e.call(this,T,A,P),T.style=p.call(this,T,A,P),T.weight=i.call(this,T,A,P),T.rotate=a.call(this,T,A,P),T.size=~~r.call(this,T,A,P),T.padding=o.call(this,T,A,P),T}).sort(function(T,A){return A.size-T.size});let E=-1,k=v.board?[{x:0,y:0},{x:m,y:b}]:void 0;f&&clearInterval(f),f=setInterval(M,0),M();function M(){const T=Date.now();for(;Date.now()-T<d&&++E<O;){const A=S[E];A.x=m*(c()+.5)>>1,A.y=b*(c()+.5)>>1,Rnt(x,A,S,E),A.hasText&&y(w,A,k)&&(l.call(null,"word",{cloud:v,word:A}),_.push(A),k?v.hasImage||jnt(k,A):k=[{x:A.x+A.x0,y:A.y+A.y0},{x:A.x+A.x1,y:A.y+A.y1}],A.x-=t[0]>>1,A.y-=t[1]>>1)}v._tags=_,v._bounds=k,E>=O&&(v.stop(),l.call(null,"end",{cloud:v,words:_,bounds:k}))}return v},v.stop=function(){return f&&(clearInterval(f),f=null),v};function g(m){m.width=m.height=1;const b=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(Ks<<5)/b,m.height=Gu/b;const x=m.getContext("2d");return x.fillStyle=x.strokeStyle="red",x.textAlign="center",x.textBaseline="middle",{context:x,ratio:b}}function y(m,b,x){const w=b.x,O=b.y,_=Math.sqrt(t[0]*t[0]+t[1]*t[1]),S=s(t),E=c()<.5?1:-1;let k,M=-E,T,A;for(;(k=S(M+=E))&&(T=~~k[0],A=~~k[1],!(Math.min(Math.abs(T),Math.abs(A))>=_));)if(b.x=w+T,b.y=O+A,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>t[0]||b.y+b.y1>t[1])&&(!x||!Int(b,m,t[0]))&&(!x||Dnt(b,x))){const P=b.sprite,L=b.width>>5,I=t[0]>>5,R=b.x-(L<<4),C=R&127,N=32-C,j=b.y1-b.y0;let D,$=(b.y+b.y0)*I+(R>>5);for(let B=0;B<j;B++){D=0;for(let z=0;z<=L;z++)m[$+z]|=D<<N|(z<L?(D=P[B*L+z])>>>C:0);$+=I}return delete b.sprite,!0}return!1}return v.createMask=m=>{const b=document.createElement("canvas"),[x,w]=t;if(!x||!w)return;const O=x>>5,_=pO((x>>5)*w);b.width=x,b.height=w;const S=b.getContext("2d");S.drawImage(m,0,0,m.width,m.height,0,0,x,w);const E=S.getImageData(0,0,x,w).data;for(let k=0;k<w;k++)for(let M=0;M<x;M++){const T=O*k+(M>>5),A=k*x+M<<2,L=E[A]>=250&&E[A+1]>=250&&E[A+2]>=250?1<<31-M%32:0;_[T]|=L}v.board=_,v.hasImage=!0},v.timeInterval=function(m){d=m??1/0},v.words=function(m){u=m},v.size=function(m=[]){t=[+m[0],+m[1]]},v.text=function(m){n=si(m)},v.font=function(m){e=si(m)},v.fontWeight=function(m){i=si(m)},v.rotate=function(m){a=si(m)},v.canvas=function(m){h=si(m)},v.spiral=function(m){s=Bnt[m]||m},v.fontSize=function(m){r=si(m)},v.padding=function(m){o=si(m)},v.random=function(m){c=si(m)},v.on=function(m){l=si(m)},v}var Wnt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,n||[])).next())})},Ynt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Gnt={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return(~~(Math.random()*6)-3)*30}};function Hnt(t){return new Promise((n,e)=>{if(t instanceof HTMLImageElement){n(t);return}if(typeof t=="string"){const r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>n(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),e()};return}e()})}function Vnt(t,n){if(typeof t=="function")return t;if(Array.isArray(t)){const[e,r]=t;if(!n)return()=>(r+e)/2;const[i,a]=n;return a===i?()=>(r+e)/2:({value:o})=>(r-e)/(a-i)*(o-i)+e}return()=>t}const N3=(t,n)=>e=>Wnt(void 0,void 0,void 0,function*(){const r=Object.assign({},Gnt,t,{canvas:n.createCanvas}),i=znt();yield Mnt(i,r).set("fontSize",m=>{const b=e.map(x=>x.value);return Vnt(m,[Xn(b),Qt(b)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").set("canvas").setAsync("imageMask",Hnt,i.createMask),i.words([...e]);const a=i.start(),[o,s]=r.size,c=[{x:0,y:0},{x:o,y:s}],{_bounds:l=c,_tags:u,hasImage:f}=a,d=u.map(m=>{var{x:b,y:x,font:w}=m,O=Ynt(m,["x","y","font"]);return Object.assign(Object.assign({},O),{x:b+o/2,y:x+s/2,fontFamily:w})}),[{x:h,y:p},{x:v,y:g}]=l,y={text:"",value:0,opacity:0,fontSize:0};return d.push(Object.assign(Object.assign({},y),{x:f?0:h,y:f?0:p}),Object.assign(Object.assign({},y),{x:f?o:v,y:f?s:g})),d});N3.props={};function vO(t){return typeof t=="string"?n=>n[t]:t}const R3=t=>{const{join:n,on:e,select:r=[],as:i=r,unknown:a=NaN}=t,[o,s]=e,c=vO(s),l=vO(o),u=cg(n,([f])=>f,f=>c(f));return f=>f.map(d=>{const h=u.get(l(d));return Object.assign(Object.assign({},d),r.reduce((p,v,g)=>(p[i[g]]=h?h[v]:a,p),{}))})};R3.props={};const I3=t=>{const{start:n,end:e}=t;return r=>r.slice(n,e)};I3.props={};var Gp={exports:{}},Hp={exports:{}},gO;function Xnt(){return gO||(gO=1,(function(t){var n=t.exports;t.exports.isNumber=function(e){return typeof e=="number"},t.exports.findMin=function(e){if(e.length===0)return 1/0;for(var r=e[0],i=1;i<e.length;i++)r=Math.min(r,e[i]);return r},t.exports.findMax=function(e){if(e.length===0)return-1/0;for(var r=e[0],i=1;i<e.length;i++)r=Math.max(r,e[i]);return r},t.exports.findMinMulti=function(e){for(var r=n.findMin(e[0]),i=1;i<e.length;i++)r=Math.min(r,n.findMin(e[i]));return r},t.exports.findMaxMulti=function(e){for(var r=n.findMax(e[0]),i=1;i<e.length;i++)r=Math.max(r,n.findMax(e[i]));return r},t.exports.inside=function(e,r,i){return e<=i&&i<=r}})(Hp)),Hp.exports}var yO;function Unt(){return yO||(yO=1,(function(t){var n=50,e=2,r=Math.log(2),i=t.exports,a=Xnt();function o(c){return 1-Math.abs(c)}t.exports.getUnifiedMinMax=function(c,l){return i.getUnifiedMinMaxMulti([c],l)},t.exports.getUnifiedMinMaxMulti=function(c,l){l=l||{};var u=!1,f=!1,d=a.isNumber(l.width)?l.width:e,h=a.isNumber(l.size)?l.size:n,p=a.isNumber(l.min)?l.min:(u=!0,a.findMinMulti(c)),v=a.isNumber(l.max)?l.max:(f=!0,a.findMaxMulti(c)),g=v-p,y=g/(h-1);return u&&(p=p-2*d*y),f&&(v=v+2*d*y),{min:p,max:v}},t.exports.create=function(c,l){if(l=l||{},!c||c.length===0)return[];var u=a.isNumber(l.size)?l.size:n,f=a.isNumber(l.width)?l.width:e,d=i.getUnifiedMinMax(c,{size:u,width:f,min:l.min,max:l.max}),h=d.min,p=d.max,v=p-h,g=v/(u-1);if(v===0)return[{x:h,y:1}];for(var y=[],m=0;m<u;m++)y.push({x:h+m*g,y:0});var b=function(M){return Math.floor((M-h)/g)},x=s(o,f),w=x[f],O=x[f-1]-x[f-2],_=0;c.forEach(function(M){var T=b(M);if(!(T+f<0||T-f>=y.length)){var A=Math.max(T-f,0),P=T,L=Math.min(T+f,y.length-1),I=A-(T-f),R=T+f-L,C=x[-f-1+I]||0,N=x[-f-1+R]||0,j=w/(w-C-N);I>0&&(_+=j*(I-1)*O);var D=Math.max(0,T-f+1);a.inside(0,y.length-1,D)&&(y[D].y+=j*1*O),a.inside(0,y.length-1,P+1)&&(y[P+1].y-=j*2*O),a.inside(0,y.length-1,L+1)&&(y[L+1].y+=j*1*O)}});var S=_,E=0,k=0;return y.forEach(function(M){E+=M.y,S+=E,M.y=S,k+=S}),k>0&&y.forEach(function(M){M.y/=k}),y};function s(c,l){for(var u={},f=0,d=-l;d<=l;d++)f+=c(d/l),u[d]=f;return u}t.exports.getExpectedValueFromPdf=function(c){if(!(!c||c.length===0)){var l=0;return c.forEach(function(u){l+=u.x*u.y}),l}},t.exports.getXWithLeftTailArea=function(c,l){if(!(!c||c.length===0)){for(var u=0,f=0,d=0;d<c.length&&(f=d,u+=c[d].y,!(u>=l));d++);return c[f].x}},t.exports.getPerplexity=function(c){if(!(!c||c.length===0)){var l=0;return c.forEach(function(u){var f=Math.log(u.y);isFinite(f)&&(l+=u.y*f)}),l=-l/r,Math.pow(2,l)}}})(Gp)),Gp.exports}var qnt=Unt();const Knt=q0(qnt),j3=t=>{const{field:n,groupBy:e,as:r=["y","size"],min:i,max:a,size:o=10,width:s}=t,[c,l]=r;return u=>Array.from(le(u,d=>e.map(h=>d[h]).join("-")).values()).map(d=>{const h=Knt.create(d.map(g=>g[n]),{min:i,max:a,size:o,width:s}),p=h.map(g=>g.x),v=h.map(g=>g.y);return Object.assign(Object.assign({},d[0]),{[c]:p,[l]:v})})};j3.props={};function Znt(t,n,e,r){r=r||{};const i=r.maxIterations||100,a=r.tolerance||1e-10,o=t(n),s=t(e);let c=e-n;if(o*s>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(s===0)return e;for(let l=0;l<i;++l){c/=2;const u=n+c,f=t(u);if(f*o>=0&&(n=u),Math.abs(c)<a||f===0)return u}return n+c}function C0(t){const n=new Array(t);for(let e=0;e<t;++e)n[e]=0;return n}function mO(t,n){return C0(t).map(()=>C0(n))}function $o(t,n){let e=0;for(let r=0;r<t.length;++r)e+=t[r]*n[r];return e}function L0(t){return Math.sqrt($o(t,t))}function N0(t,n,e){for(let r=0;r<n.length;++r)t[r]=n[r]*e}function hi(t,n,e,r,i){for(let a=0;a<t.length;++a)t[a]=n*e[a]+r*i[a]}function Qnt(t,n,e){e=e||{};const r=e.maxIterations||n.length*200,i=e.nonZeroDelta||1.05,a=e.zeroDelta||.001,o=e.minErrorDelta||1e-6,s=e.minErrorDelta||1e-5,c=e.rho!==void 0?e.rho:1,l=e.chi!==void 0?e.chi:2,u=e.psi!==void 0?e.psi:-.5,f=e.sigma!==void 0?e.sigma:.5;let d;const h=n.length,p=new Array(h+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let w=0;w<h;++w){const O=n.slice();O[w]=O[w]?O[w]*i:a,p[w+1]=O,p[w+1].fx=t(O),p[w+1].id=w+1}function v(w){for(let O=0;O<w.length;O++)p[h][O]=w[O];p[h].fx=w.fx}const g=(w,O)=>w.fx-O.fx,y=n.slice(),m=n.slice(),b=n.slice(),x=n.slice();for(let w=0;w<r;++w){if(p.sort(g),e.history){const _=p.map(S=>{const E=S.slice();return E.fx=S.fx,E.id=S.id,E});_.sort((S,E)=>S.id-E.id),e.history.push({x:p[0].slice(),fx:p[0].fx,simplex:_})}d=0;for(let _=0;_<h;++_)d=Math.max(d,Math.abs(p[0][_]-p[1][_]));if(Math.abs(p[0].fx-p[h].fx)<o&&d<s)break;for(let _=0;_<h;++_){y[_]=0;for(let S=0;S<h;++S)y[_]+=p[S][_];y[_]/=h}const O=p[h];if(hi(m,1+c,y,-c,O),m.fx=t(m),m.fx<p[0].fx)hi(x,1+l,y,-l,O),x.fx=t(x),x.fx<m.fx?v(x):v(m);else if(m.fx>=p[h-1].fx){let _=!1;if(m.fx>O.fx?(hi(b,1+u,y,-u,O),b.fx=t(b),b.fx<O.fx?v(b):_=!0):(hi(b,1-u*c,y,u*c,O),b.fx=t(b),b.fx<m.fx?v(b):_=!0),_){if(f>=1)break;for(let S=1;S<p.length;++S)hi(p[S],1-f,p[0],f,p[S]),p[S].fx=t(p[S])}}else v(m)}return p.sort(g),{fx:p[0].fx,x:p[0]}}function Jnt(t,n,e,r,i,a,o){const s=e.fx,c=$o(e.fxprime,n);let l=s,u=s,f=c,d=0;i=i||1,a=a||1e-6,o=o||.1;function h(p,v,g){for(let y=0;y<16;++y)if(i=(p+v)/2,hi(r.x,1,e.x,i,n),l=r.fx=t(r.x,r.fxprime),f=$o(r.fxprime,n),l>s+a*i*c||l>=g)v=i;else{if(Math.abs(f)<=-o*c)return i;f*(v-p)>=0&&(v=p),p=i,g=l}return 0}for(let p=0;p<10;++p){if(hi(r.x,1,e.x,i,n),l=r.fx=t(r.x,r.fxprime),f=$o(r.fxprime,n),l>s+a*i*c||p&&l>=u)return h(d,i,u);if(Math.abs(f)<=-o*c)return i;if(f>=0)return h(i,d,l);u=l,d=i,i*=2}return i}function trt(t,n,e){let r={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const a=n.slice();let o,s=1;e=e||{};const c=e.maxIterations||n.length*20;r.fx=t(r.x,r.fxprime);const l=r.fxprime.slice();N0(l,r.fxprime,-1);for(let u=0;u<c;++u){if(s=Jnt(t,l,r,i,s),e.history&&e.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),!s)N0(l,r.fxprime,-1);else{hi(a,1,i.fxprime,-1,r.fxprime);const f=$o(r.fxprime,r.fxprime),d=Math.max(0,$o(a,i.fxprime)/f);hi(l,d,l,-1,i.fxprime),o=r,r=i,i=o}if(L0(r.fxprime)<=1e-5)break}return e.history&&e.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),r}const D3=1e-10;function $3(t,n){const e=nrt(t),r=e.filter(function(c){return ert(c,t)});let i=0,a=0,o;const s=[];if(r.length>1){const c=rrt(r);for(o=0;o<r.length;++o){const u=r[o];u.angle=Math.atan2(u.x-c.x,u.y-c.y)}r.sort(function(u,f){return f.angle-u.angle});let l=r[r.length-1];for(o=0;o<r.length;++o){const u=r[o];a+=(l.x+u.x)*(u.y-l.y);const f={x:(u.x+l.x)/2,y:(u.y+l.y)/2};let d=null;for(let h=0;h<u.parentIndex.length;++h)if(l.parentIndex.indexOf(u.parentIndex[h])>-1){const p=t[u.parentIndex[h]],v=Math.atan2(u.x-p.x,u.y-p.y),g=Math.atan2(l.x-p.x,l.y-p.y);let y=g-v;y<0&&(y+=2*Math.PI);const m=g-y/2;let b=Kc(f,{x:p.x+p.radius*Math.sin(m),y:p.y+p.radius*Math.cos(m)});b>p.radius*2&&(b=p.radius*2),(d===null||d.width>b)&&(d={circle:p,width:b,p1:u,p2:l})}d!==null&&(s.push(d),i+=R0(d.circle.radius,d.width),l=u)}}else{let c=t[0];for(o=1;o<t.length;++o)t[o].radius<c.radius&&(c=t[o]);let l=!1;for(o=0;o<t.length;++o)if(Kc(t[o],c)>Math.abs(c.radius-t[o].radius)){l=!0;break}l?i=a=0:(i=c.radius*c.radius*Math.PI,s.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-D3,y:c.y+c.radius},width:c.radius*2}))}return a/=2,n&&(n.area=i+a,n.arcArea=i,n.polygonArea=a,n.arcs=s,n.innerPoints=r,n.intersectionPoints=e),i+a}function ert(t,n){for(let e=0;e<n.length;++e)if(Kc(t,n[e])>n[e].radius+D3)return!1;return!0}function nrt(t){const n=[];for(let e=0;e<t.length;++e)for(let r=e+1;r<t.length;++r){const i=B3(t[e],t[r]);for(let a=0;a<i.length;++a){const o=i[a];o.parentIndex=[e,r],n.push(o)}}return n}function R0(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function Kc(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function F3(t,n,e){if(e>=t+n)return 0;if(e<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const r=t-(e*e-n*n+t*t)/(2*e),i=n-(e*e-t*t+n*n)/(2*e);return R0(t,r)+R0(n,i)}function B3(t,n){const e=Kc(t,n),r=t.radius,i=n.radius;if(e>=r+i||e<=Math.abs(r-i))return[];const a=(r*r-i*i+e*e)/(2*e),o=Math.sqrt(r*r-a*a),s=t.x+a*(n.x-t.x)/e,c=t.y+a*(n.y-t.y)/e,l=-(n.y-t.y)*(o/e),u=-(n.x-t.x)*(o/e);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function rrt(t){const n={x:0,y:0};for(let e=0;e<t.length;++e)n.x+=t[e].x,n.y+=t[e].y;return n.x/=t.length,n.y/=t.length,n}function irt(t,n){n=n||{},n.maxIterations=n.maxIterations||500;const e=n.initialLayout||crt,r=n.lossFunction||t1;t=art(t);const i=e(t,n),a=[],o=[];let s;for(s in i)i.hasOwnProperty(s)&&(a.push(i[s].x),a.push(i[s].y),o.push(s));const l=Qnt(function(u){const f={};for(let d=0;d<o.length;++d){const h=o[d];f[h]={x:u[2*d],y:u[2*d+1],radius:i[h].radius}}return r(f,t)},a,n).x;for(let u=0;u<o.length;++u)s=o[u],i[s].x=l[2*u],i[s].y=l[2*u+1];return i}const z3=1e-10;function I0(t,n,e){return Math.min(t,n)*Math.min(t,n)*Math.PI<=e+z3?Math.abs(t-n):Znt(function(r){return F3(t,n,r)-e},0,t+n)}function art(t){t=t.slice();const n=[],e={};let r,i,a,o;for(r=0;r<t.length;++r){const s=t[r];s.sets.length==1?n.push(s.sets[0]):s.sets.length==2&&(a=s.sets[0],o=s.sets[1],e[[a,o]]=!0,e[[o,a]]=!0)}for(n.sort((s,c)=>s>c?1:-1),r=0;r<n.length;++r)for(a=n[r],i=r+1;i<n.length;++i)o=n[i],[a,o]in e||t.push({sets:[a,o],size:0});return t}function ort(t,n,e){const r=mO(n.length,n.length),i=mO(n.length,n.length);return t.filter(function(a){return a.sets.length==2}).map(function(a){const o=e[a.sets[0]],s=e[a.sets[1]],c=Math.sqrt(n[o].size/Math.PI),l=Math.sqrt(n[s].size/Math.PI),u=I0(c,l,a.size);r[o][s]=r[s][o]=u;let f=0;a.size+1e-10>=Math.min(n[o].size,n[s].size)?f=1:a.size<=1e-10&&(f=-1),i[o][s]=i[s][o]=f}),{distances:r,constraints:i}}function srt(t,n,e,r){let i=0,a;for(a=0;a<n.length;++a)n[a]=0;for(a=0;a<e.length;++a){const o=t[2*a],s=t[2*a+1];for(let c=a+1;c<e.length;++c){const l=t[2*c],u=t[2*c+1],f=e[a][c],d=r[a][c],h=(l-o)*(l-o)+(u-s)*(u-s),p=Math.sqrt(h),v=h-f*f;d>0&&p<=f||d<0&&p>=f||(i+=2*v*v,n[2*a]+=4*v*(o-l),n[2*a+1]+=4*v*(s-u),n[2*c]+=4*v*(l-o),n[2*c+1]+=4*v*(u-s))}}return i}function crt(t,n){let e=urt(t,n);const r=n.lossFunction||t1;if(t.length>=8){const i=lrt(t,n),a=r(i,t),o=r(e,t);a+1e-8<o&&(e=i)}return e}function lrt(t,n){n=n||{};const e=n.restarts||10,r=[],i={};let a;for(a=0;a<t.length;++a){const v=t[a];v.sets.length==1&&(i[v.sets[0]]=r.length,r.push(v))}const o=ort(t,r,i);let s=o.distances;const c=o.constraints,l=L0(s.map(L0))/s.length;s=s.map(function(v){return v.map(function(g){return g/l})});const u=function(v,g){return srt(v,g,s,c)};let f,d;for(a=0;a<e;++a){const v=C0(s.length*2).map(Math.random);d=trt(u,v,n),(!f||d.fx<f.fx)&&(f=d)}const h=f.x,p={};for(a=0;a<r.length;++a){const v=r[a];p[v.sets[0]]={x:h[2*a]*l,y:h[2*a+1]*l,radius:Math.sqrt(v.size/Math.PI)}}if(n.history)for(a=0;a<n.history.length;++a)N0(n.history[a].x,l);return p}function urt(t,n){const e=n&&n.lossFunction?n.lossFunction:t1,r={},i={};let a;for(let f=0;f<t.length;++f){const d=t[f];d.sets.length==1&&(a=d.sets[0],r[a]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:d.size,radius:Math.sqrt(d.size/Math.PI)},i[a]=[])}t=t.filter(function(f){return f.sets.length==2});for(let f=0;f<t.length;++f){const d=t[f];let h=d.hasOwnProperty("weight")?d.weight:1;const p=d.sets[0],v=d.sets[1];d.size+z3>=Math.min(r[p].size,r[v].size)&&(h=0),i[p].push({set:v,size:d.size,weight:h}),i[v].push({set:p,size:d.size,weight:h})}const o=[];for(a in i)if(i.hasOwnProperty(a)){let f=0;for(let d=0;d<i[a].length;++d)f+=i[a][d].size*i[a][d].weight;o.push({set:a,size:f})}function s(f,d){return d.size-f.size}o.sort(s);const c={};function l(f){return f.set in c}function u(f,d){r[d].x=f.x,r[d].y=f.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let f=1;f<o.length;++f){const d=o[f].set,h=i[d].filter(l);if(a=r[d],h.sort(s),h.length===0)throw"ERROR: missing pairwise overlap information";const p=[];for(let y=0;y<h.length;++y){const m=r[h[y].set],b=I0(a.radius,m.radius,h[y].size);p.push({x:m.x+b,y:m.y}),p.push({x:m.x-b,y:m.y}),p.push({y:m.y+b,x:m.x}),p.push({y:m.y-b,x:m.x});for(let x=y+1;x<h.length;++x){const w=r[h[x].set],O=I0(a.radius,w.radius,h[x].size),_=B3({x:m.x,y:m.y,radius:b},{x:w.x,y:w.y,radius:O});for(let S=0;S<_.length;++S)p.push(_[S])}}let v=1e50,g=p[0];for(let y=0;y<p.length;++y){r[d].x=p[y].x,r[d].y=p[y].y;const m=e(r,t);m<v&&(v=m,g=p[y])}u(g,d)}return r}function t1(t,n){let e=0;function r(i){return i.map(function(a){return t[a]})}for(let i=0;i<n.length;++i){const a=n[i];let o;if(a.sets.length==1)continue;if(a.sets.length==2){const c=t[a.sets[0]],l=t[a.sets[1]];o=F3(c.radius,l.radius,Kc(c,l))}else o=$3(r(a.sets));const s=a.hasOwnProperty("weight")?a.weight:1;e+=s*(o-a.size)*(o-a.size)}return e}function frt(t){const n=function(e){const r=Math.max.apply(null,t.map(function(a){return a[e]+a.radius})),i=Math.min.apply(null,t.map(function(a){return a[e]-a.radius}));return{max:r,min:i}};return{xRange:n("x"),yRange:n("y")}}function drt(t,n,e,r){const i=[],a=[];for(const v in t)t.hasOwnProperty(v)&&(a.push(v),i.push(t[v]));n-=2*r,e-=2*r;const o=frt(i),s=o.xRange,c=o.yRange;if(s.max==s.min||c.max==c.min)return console.log("not scaling solution: zero size detected"),t;const l=n/(s.max-s.min),u=e/(c.max-c.min),f=Math.min(u,l),d=(n-(s.max-s.min)*f)/2,h=(e-(c.max-c.min)*f)/2,p={};for(let v=0;v<i.length;++v){const g=i[v];p[a[v]]={radius:f*g.radius,x:r+d+(g.x-s.min)*f,y:r+h+(g.y-c.min)*f}}return p}function hrt(t,n,e){const r=[],i=t-e,a=n;return r.push("M",i,a),r.push("A",e,e,0,1,0,i+2*e,a),r.push("A",e,e,0,1,0,i,a),r.join(" ")}function prt(t){const n={};$3(t,n);const e=n.arcs;if(e.length===0)return"M 0 0";if(e.length==1){const r=e[0].circle;return hrt(r.x,r.y,r.radius)}else{const r=[`
175
175
  M`,e[0].p2.x,e[0].p2.y];for(let i=0;i<e.length;++i){const a=e[i],o=a.circle.radius,s=a.width>o;r.push(`
176
- A`,o,o,0,s?1:0,1,a.p1.x,a.p1.y)}return r.join(" ")}}const W3=t=>{const{sets:n="sets",size:e="size",as:r=["key","path"],padding:i=0}=t,[a,o]=r;return s=>{const c=s.map(f=>Object.assign(Object.assign({},f),{sets:f[n],size:f[e],[a]:f.sets.join("&")}));c.sort((f,d)=>f.sets.length-d.sets.length);const l=irt(c);let u;return c.map(f=>{const d=f[n],h=({width:p,height:v})=>{u=u||drt(l,p,v,i);const g=d.map(m=>u[m]);let y=prt(g);return/[zZ]$/.test(y)||(y+=" Z"),y};return Object.assign(Object.assign({},f),{[o]:h})})}};W3.props={};const Y3=()=>t=>(console.log("G2 data section:",t),t);Y3.props={};function vrt(t,n){if(n<0||n>1)throw new Error("alpha must be between 0 and 1.");if(t.length===0)return[];let e=t[0];const r=[];for(const i of t){if(i==null){r.push(i),console.warn("EMA\uFF1AThe value is null or undefined",t);continue}e==null&&(e=i);const a=e*n+(1-n)*i;r.push(a),e=a}return r}const G3=t=>{const{field:n="y",alpha:e=.6,as:r=n}=t;return i=>{const a=i.map(s=>s[n]),o=vrt(a,e);return i.map((s,c)=>Object.assign(Object.assign({},s),{[r]:o[c]}))}};G3.props={};const H3=.01;function Zc(t){const{min:n,max:e}=t;return[[n[0],n[1]],[e[0],e[1]]]}function bO(t,n,e=H3){const[r,i]=t,[a,o]=n;return r>=a[0]-e&&r<=o[0]+e&&i>=a[1]-e&&i<=o[1]+e}function V3(t,n,e=H3){const[r,i]=t;return!(bO(r,n,e)&&bO(i,n,e))}function grt(t,n){const[e,r]=t,[i,a]=n;return e[0]<a[0]&&r[0]>i[0]&&e[1]<a[1]&&r[1]>i[1]}const yrt=t=>{const{priority:n}=t;return e=>{const r=[];return n&&e.sort(n),e.forEach(i=>{bh(i);const a=i.getLocalBounds();r.some(s=>grt(Zc(a),Zc(s.getLocalBounds())))?jm(i):r.push(i)}),e}};function mrt([t,n],[e,r]){return r>t&&n>e}function Au(){const t=new Map;return[r=>t.get(r),(r,i)=>t.set(r,i)]}function brt(t){const n=t.cloneNode(!0),e=n.getElementById("connector");e&&n.removeChild(e);const{min:r,max:i}=n.getRenderBounds();return n.destroy(),{min:r,max:i}}const xrt=t=>{const{maxIterations:n=10,maxError:e=.1,padding:r=1}=t;return i=>{const a=i.length;if(a<=1)return i;const[o,s]=Au(),[c,l]=Au(),[u,f]=Au(),[d,h]=Au();for(const p of i){const{min:v,max:g}=brt(p),[y,m]=v,[b,x]=g;s(p,m),l(p,m),f(p,x-m),h(p,[y,b])}for(let p=0;p<n;p++){i.sort((g,y)=>Re(c(g),c(y)));let v=0;for(let g=0;g<a-1;g++){const y=i[g];let m=g+1,b;for(;(b=i[m])&&!mrt(d(y),d(b));)m+=1;if(b){const x=c(y),w=u(y),O=c(b),_=O-(x+w);if(_<r){const S=(r-_)/2;v=Math.max(v,S),l(y,x-S),l(b,O+S)}}}if(v<e)break}for(const p of i)p.style.y+=c(p)-o(p);return i}};function X3(t){return typeof t=="object"?t:Xi(t)}function Vp(t){let n=t/255;return n=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4),n}function xO(t,n,e){return .2126*Vp(t)+.7152*Vp(n)+.0722*Vp(e)}function U3(t,n){if(!t||!n||t===n)return 1;const{r:e,g:r,b:i}=t,{r:a,g:o,b:s}=n,c=xO(e,r,i),l=xO(a,o,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function q3(t,n){const e=us(n,r=>U3(t,X3(r)));return n[e]}const wrt=t=>{const{threshold:n=4.5,palette:e=["#000","#fff"]}=t;return r=>(r.forEach(i=>{const a=i.attr("dependentElement").parsedStyle.fill,o=i.parsedStyle.fill;U3(o,a)<n&&i.attr("fill",q3(a,e))}),r)},Ort=()=>t=>(t.forEach(n=>{bh(n);const e=n.attr("bounds"),r=n.getLocalBounds();V3(Zc(r),e)&&jm(n)}),t),_rt=(t,n)=>{const[[e,r],[i,a]]=n,[[o,s],[c,l]]=t;let u=0,f=0;return o<e?u=e-o:c>i&&(u=i-c),s<r?f=r-s:l>a&&(f=a-l),[u,f]},Srt=(t,n)=>!t||!t.min||!t.max?!n||!n.min||!n.max?{min:[0,0],max:[0,0]}:n:!n||!n.min||!n.max?t:{min:[Math.min(t.min[0],n.min[0]),Math.min(t.min[1],n.min[1])],max:[Math.max(t.max[0],n.max[0]),Math.max(t.max[1],n.max[1])]},Ert=(t={})=>(n,{canvas:e,layout:r})=>{const{bounds:i="view",offsetX:a=0,offsetY:o=0}=t,c=(()=>{if(i==="main"){const{x:l=0,y:u=0,width:f=0,height:d=0,marginLeft:h=0,marginRight:p=0,marginTop:v=0,marginBottom:g=0,paddingLeft:y=0,paddingRight:m=0,paddingTop:b=0,paddingBottom:x=0}=r;return[[l+h+y+a,u+v+b+o],[l+f-p-m-a,u+d-g-x-o]]}else{const{x:l=0,y:u=0,width:f=0,height:d=0}=r;return[[l+a,u+o],[l+f-a,u+d-o]]}})();return n.forEach(l=>{bh(l);const{max:u,min:f}=Srt(l.getRenderBounds(),l.getBounds());if(!u||!f||u[0]===0&&u[1]===0&&f[0]===0&&f[1]===0)return;const[d,h]=u,[p,v]=f,g=_rt([[p,v],[d,h]],c);l.style.connector&&l.style.connectorPoints&&(l.style.connectorPoints[0][0]-=g[0],l.style.connectorPoints[0][1]-=g[1]),l.style.x+=g[0],l.style.y+=g[1]}),n};function wO(t){var n;const e=t.getAnimations();if(!e||e.length===0)return Uc(t);const r=t.cloneNode(!0);r.style.visibility="hidden",e.forEach(a=>{const o=a.effect.getKeyframes();o&&o.length>0&&r.attr(o[o.length-1])}),(n=t.parentNode)===null||n===void 0||n.appendChild(r);const i=Uc(r);return r.destroy(),i}const krt=t=>{const{palette:n=["#000","#fff"],threshold:e=2}=t;return r=>(r.forEach(i=>{var a,o;const s=i.attr("dependentElement"),c=(o=(a=i.attributes.fill)!==null&&a!==void 0?a:i.parsedStyle.fill)!==null&&o!==void 0?o:"#fff",l=Zc(wO(i)),u=Zc(wO(s));if(V3(l,u,e)){const f=q3(X3(c),n);i.attr("stroke",f)}else i.removeAttribute("stroke")}),r)};function Mrt(){return{"data.fetch":O3,"data.inline":T3,"data.sortBy":A3,"data.sort":E3,"data.filter":S3,"data.pick":k3,"data.rename":M3,"data.fold":_3,"data.slice":I3,"data.custom":P3,"data.map":C3,"data.join":R3,"data.kde":j3,"data.log":Y3,"data.wordCloud":N3,"data.ema":G3,"transform.stackY":AS,"transform.binX":iE,"transform.bin":kg,"transform.dodgeX":$S,"transform.jitter":zS,"transform.jitterX":WS,"transform.jitterY":YS,"transform.symmetryY":GS,"transform.diffY":HS,"transform.stackEnter":FS,"transform.normalizeY":BS,"transform.select":Rd,"transform.selectX":VS,"transform.selectY":XS,"transform.groupX":US,"transform.groupY":qS,"transform.groupColor":KS,"transform.group":ul,"transform.sortX":ZS,"transform.sortY":JS,"transform.sortColor":QS,"transform.flexX":tE,"transform.pack":rE,"transform.sample":aE,"transform.filter":oE,"coordinate.cartesian":HO,"coordinate.polar":Jc,"coordinate.transpose":Z0,"coordinate.theta":UO,"coordinate.parallel":J0,"coordinate.fisheye":KO,"coordinate.radial":Q0,"coordinate.radar":ZO,"coordinate.helix":XO,"encode.constant":QO,"encode.field":t_,"encode.transform":JO,"encode.column":e_,"mark.interval":EA,"mark.rect":kA,"mark.line":MA,"mark.point":AA,"mark.text":TA,"mark.cell":PA,"mark.area":CA,"mark.link":By,"mark.image":LA,"mark.polygon":NA,"mark.box":RA,"mark.vector":IA,"mark.lineX":DA,"mark.lineY":jA,"mark.connector":$A,"mark.range":FA,"mark.rangeX":BA,"mark.rangeY":zA,"mark.path":VA,"mark.shape":lT,"mark.density":ET,"mark.heatmap":kT,"mark.wordCloud":Xy,"mark.beeswarm":AT,"palette.category10":CT,"palette.category20":LT,"scale.linear":RT,"scale.ordinal":IT,"scale.band":NT,"scale.identity":jT,"scale.point":DT,"scale.time":$T,"scale.log":FT,"scale.pow":BT,"scale.sqrt":GT,"scale.threshold":zT,"scale.quantile":WT,"scale.quantize":YT,"scale.sequential":HT,"scale.constant":VT,"theme.classic":XT,"theme.classicDark":qT,"theme.academy":KT,"theme.light":Qy,"theme.dark":UT,"component.axisX":sP,"component.axisY":cP,"component.legendCategory":zm,"component.legendContinuous":da,"component.legends":F5,"component.title":R5,"component.sliderX":I5,"component.sliderY":j5,"component.scrollbarX":D5,"component.scrollbarY":$5,"animation.scaleInX":Ym,"animation.scaleOutX":Stt,"animation.scaleInY":B5,"animation.scaleOutY":Ett,"animation.waveIn":H5,"animation.fadeIn":z5,"animation.fadeOut":W5,"animation.zoomIn":jtt,"animation.zoomOut":Dtt,"animation.pathIn":V5,"animation.morphing":G5,"animation.growInX":X5,"animation.growInY":U5,"interaction.elementHighlight":wh,"interaction.elementHighlightByX":q5,"interaction.elementHighlightByColor":K5,"interaction.elementHoverScale":Z5,"interaction.elementSelect":Oh,"interaction.elementSelectByX":Q5,"interaction.elementSelectByColor":J5,"interaction.fisheye":qtt,"interaction.chartIndex":t3,"interaction.tooltip":l3,"interaction.legendFilter":JJ,"interaction.legendHighlight":uet,"interaction.brushHighlight":_h,"interaction.brushXHighlight":get,"interaction.brushYHighlight":yet,"interaction.brushAxisHighlight":Met,"interaction.brushFilter":Qm,"interaction.brushXFilter":Cet,"interaction.brushYFilter":Let,"interaction.sliderFilter":m3,"interaction.sliderWheel":b3,"interaction.scrollbarFilter":Uet,"interaction.poptip":x3,"interaction.treemapDrillDown":nnt,"interaction.drillDown":snt,"interaction.elementPointMove":hnt,"composition.spaceLayer":LP,"composition.spaceFlex":NP,"composition.facetRect":$P,"composition.repeatMatrix":kU,"composition.facetCircle":LU,"composition.timingKeyframe":FP,"labelTransform.overlapHide":yrt,"labelTransform.overlapDodgeY":xrt,"labelTransform.overflowHide":Ort,"labelTransform.contrastReverse":wrt,"labelTransform.overflowStroke":krt,"labelTransform.exceedAdjust":Ert}}function Art(){return{"composition.geoView":pC,"composition.geoPath":BP}}function Trt(){return{"data.arc":Wy,"data.cluster":wT,"mark.forceGraph":bT,"mark.tree":_T,"mark.pack":aT,"mark.sankey":GA,"mark.chord":HA,"mark.treemap":iT,"mark.partition":PT}}function Prt(){return{"data.venn":W3,"mark.boxplot":cT,"mark.gauge":ST,"mark.wordCloud":Xy,"mark.liquid":MT}}function K3(){return Object.assign(Object.assign(Object.assign(Object.assign({},Art()),Trt()),Prt()),Mrt())}function Crt(t,n){class e extends t{constructor(i){super(Object.assign(Object.assign({},i),{lib:n}))}}return e}const Z3={};function Q3(t,n){t.startsWith("symbol.")?Q7(t.split(".").pop(),n):Object.assign(Z3,{[t]:n})}const bo=t=>t?parseInt(t):0;function Lrt(t){const n=getComputedStyle(t),e=t.clientWidth||bo(n.width),r=t.clientHeight||bo(n.height),i=bo(n.paddingLeft)+bo(n.paddingRight),a=bo(n.paddingTop)+bo(n.paddingBottom);return{width:e-i,height:r-a}}function Xp(t,n){const e=[t];for(;e.length;){const r=e.shift();n&&n(r);const i=r.children||[];for(const a of i)e.push(a)}}class e1{constructor(n={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=n}map(n=e=>e){const e=n(this.value);return this.value=e,this}attr(n,e){return arguments.length===1?this.value[n]:this.map(r=>(r[n]=e,r))}append(n){const e=new n({});return e.children=[],this.push(e),e}push(n){return n.parentNode=this,n.index=this.children.length,this.children.push(n),this}remove(){const n=this.parentNode;if(n){const{children:e}=n,r=e.findIndex(i=>i===this);e.splice(r,1)}return this}getNodeByKey(n){let e=null;return Xp(this,i=>{n===i.attr("key")&&(e=i)}),e}getNodesByType(n){const e=[];return Xp(this,i=>{n===i.type&&e.push(i)}),e}getNodeByType(n){let e=null;return Xp(this,r=>{e||n===r.type&&(e=r)}),e}call(n,...e){return n(this.map(),...e),this}getRoot(){let n=this;for(;n&&n.parentNode;)n=n.parentNode;return n}}var J3=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const j0=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],tL="__remove__",eL="__callback__",OO=1,_O=1;function Nrt(t){if(t===void 0){const n=document.createElement("div");return n[tL]=!0,n}return typeof t=="string"?document.getElementById(t):t}function Rrt(t){const n=t.parentNode;n&&n.removeChild(t)}function Irt(t){if(t.type!==null)return t;const n=t.children[t.children.length-1];for(const e of j0)n.attr(e,t.attr(e));return n}function SO(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function Up(t,n){const{width:e,height:r,autoFit:i,depth:a=0}=t;let o=640,s=480;if(i){const{width:c,height:l}=Lrt(n);o=c||o,s=l||s}return o=e||o,s=r||s,{width:Math.max(he(o)?o:OO,OO),height:Math.max(he(s)?s:_O,_O),depth:a}}function jrt(t){const n=Irt(t),e=[n],r=new Map;for(r.set(n,SO(n));e.length;){const i=e.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===eL)a.children=s.value;else{const c=SO(s),{children:l=[]}=a;l.push(c),e.push(s),r.set(s,c),a.children=l}}return r.get(n)}function Drt(t,n){return typeof t=="function"?!0:new Set(Object.keys(n)).has(t)}function $rt(t,n){return typeof t!="function"&&new Set(Object.keys(n)).has(t)}function Frt(t,n,e,r,i){const{type:a}=t,{type:o=e||a}=n;if($rt(o,i)){for(const s of j0)t.attr(s)!==void 0&&n[s]===void 0&&(n[s]=t.attr(s));return n}if(Drt(o,r)){const s={type:"view"},c=Object.assign({},n);for(const l of j0)c[l]!==void 0&&(s[l]=c[l],delete c[l]);return Object.assign(Object.assign({},s),{children:[c]})}return n}function Brt(t,n,e){if(typeof t=="function")return n.mark;const i=Object.assign(Object.assign({},n),e)[t];if(!i)throw new Error(`Unknown mark: ${t}.`);return i}function zrt(t,n,e){if(typeof t=="function"){const c=new e1;return c.value=t,c.type=eL,c}const{type:r,children:i}=t,a=J3(t,["type","children"]),o=Brt(r,n,e),s=new o;return s.value=a,s.type=r,s}function Wrt(t,n){const{type:e,children:r}=n,i=J3(n,["type","children"]);t.type===e||e===void 0?wS(t.value,i):typeof e=="string"&&(t.type=e,t.value=i)}function Yrt(t,n,e,r){if(!t)return;const i=[[t,n]];for(;i.length;){const[a,o]=i.shift(),s=zrt(o,e,r);Array.isArray(a.children)&&a.push(s);const{children:c}=o;if(Array.isArray(c))for(const l of c)i.push([s,l]);else typeof c=="function"&&i.push([s,c])}}function Grt(t,n,e,r,i){const a=Frt(t,n,e,r,i),o=[[null,t,a]];for(;o.length;){const[s,c,l]=o.shift();if(!c)Yrt(s,l,r,i);else if(!l)c.remove();else{Wrt(c,l);const{children:u}=l,{children:f}=c;if(Array.isArray(u)&&Array.isArray(f)){const d=Math.max(u.length,f.length);for(let h=0;h<d;h++){const p=u[h],v=f[h];o.push([c,v,p])}}else typeof u=="function"&&o.push([c,null,u])}}}function Hrt(){let t,n;return[new Promise((r,i)=>{n=r,t=i}),n,t]}function Vrt(t,n,{key:e=n}){t.prototype[n]=function(r){return arguments.length===0?this.attr(e):this.attr(e,r)}}function Xrt(t,n,{key:e=n}){t.prototype[n]=function(r){if(arguments.length===0)return this.attr(e);if(Array.isArray(r))return this.attr(e,r);const i=[...this.attr(e)||[],r];return this.attr(e,i)}}function Urt(t,n,{key:e=n}){t.prototype[n]=function(r,i){if(arguments.length===0)return this.attr(e);if(arguments.length===1&&typeof r!="string")return this.attr(e,r);const a=this.attr(e)||{};return a[r]=arguments.length===1?!0:i,this.attr(e,a)}}function qrt(t,n,e){t.prototype[n]=function(r){if(arguments.length===0)return this.attr(n);if(Array.isArray(r))return this.attr(n,{items:r});if(Xo(r)&&(r.title!==void 0||r.items!==void 0))return this.attr(n,r);if(r===null||r===!1)return this.attr(n,r);const i=this.attr(n)||{},{items:a=[]}=i;return a.push(r),i.items=a,this.attr(n,i)}}function Krt(t,n,{ctor:e}){t.prototype[n]=function(r){const i=this.append(e);return n==="mark"&&(i.type=r),i}}function Zrt(t,n,{ctor:e}){t.prototype[n]=function(){return this.type=null,this.append(e)}}function sd(t){return n=>{for(const[e,r]of Object.entries(t)){const{type:i}=r;i==="value"?Vrt(n,e,r):i==="array"?Xrt(n,e,r):i==="object"?Urt(n,e,r):i==="node"?Krt(n,e,r):i==="container"?Zrt(n,e,r):i==="mix"&&qrt(n,e)}return n}}function EO(t){return Object.fromEntries(Object.entries(t).map(([n,e])=>[n,{type:"node",ctor:e}]))}const nL={encode:{type:"object"},scale:{type:"object"},data:{type:"value"},transform:{type:"array"},style:{type:"object"},animate:{type:"object"},coordinate:{type:"object"},interaction:{type:"object"},label:{type:"array",key:"labels"},axis:{type:"object"},legend:{type:"object"},slider:{type:"object"},scrollbar:{type:"object"},state:{type:"object"},layout:{type:"object"},theme:{type:"object"},title:{type:"value"}},Qrt=Object.assign(Object.assign({},nL),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),Jrt=Object.assign(Object.assign({},nL),{labelTransform:{type:"array"}});var tit=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a};let cd=class extends e1{changeData(n){var e;const r=this.getRoot();if(r)return this.attr("data",n),!((e=this.children)===null||e===void 0)&&e.length&&this.children.forEach(i=>{i.attr("data",n)}),r==null?void 0:r.render()}getView(){const n=this.getRoot(),{views:e}=n.getContext();if(e!=null&&e.length)return e.find(r=>r.key===this._key)}getScale(){var n;return(n=this.getView())===null||n===void 0?void 0:n.scale}getScaleByChannel(n){const e=this.getScale();if(e)return e[n]}getCoordinate(){var n;return(n=this.getView())===null||n===void 0?void 0:n.coordinate}getTheme(){var n;return(n=this.getView())===null||n===void 0?void 0:n.theme}getGroup(){const n=this._key;return n?this.getRoot().getContext().canvas.getRoot().getElementById(n):void 0}show(){const n=this.getGroup();n&&!n.isVisible()&&bh(n)}hide(){const n=this.getGroup();n&&n.isVisible()&&jm(n)}};cd=tit([sd(Jrt)],cd);var eit=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a};let D0=class extends e1{changeData(n){const e=this.getRoot();if(e)return this.attr("data",n),e==null?void 0:e.render()}getMark(){var n;const e=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(!e)return;const{markState:r}=e,i=Array.from(r.keys()).find(a=>a.key===this.attr("key"));return r.get(i)}getScale(){var n;const e=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(e)return e==null?void 0:e.scale}getScaleByChannel(n){var e,r;const i=(e=this.getRoot())===null||e===void 0?void 0:e.getView();if(i)return(r=i==null?void 0:i.scale)===null||r===void 0?void 0:r[n]}getGroup(){const n=this.attr("key");return n?this.getRoot().getContext().canvas.getRoot().getElementById(n):void 0}};D0=eit([sd(Qrt)],D0);var nit=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a},rit=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const iit="G2_CHART_KEY";class ait extends cd{constructor(n){const{container:e,canvas:r,renderer:i,plugins:a,lib:o,createCanvas:s}=n,c=rit(n,["container","canvas","renderer","plugins","lib","createCanvas"]);super(c,"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailingClear=null,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=u_(()=>{this.forceFit()},300),this._renderer=i||new mP,this._plugins=a||[],this._container=Nrt(e),this._emitter=new nm,this._context={library:Object.assign(Object.assign({},o),Z3),emitter:this._emitter,canvas:r,createCanvas:s},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;const n=new Promise((a,o)=>kJ(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[e,r,i]=Hrt();return n.then(r).then(()=>{if(this._trailingClear){const a=this.options();this._trailingClear(),this._trailing&&this.options(a)}}).catch(i).then(()=>{this._trailingClear=null,this._renderTrailing()}),e}options(n){if(arguments.length===0)return jrt(this);const{type:e}=n;return e&&(this._previousDefinedType=e),Grt(this,n,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(n,e,r){return this._emitter.on(n,e,r),this}once(n,e){return this._emitter.once(n,e),this}emit(n,...e){return this._emitter.emit(n,...e),this}off(n,e){return this._emitter.off(n,e),this}clear(n=!0){if(this._rendering){this._trailingClear=()=>{this.clear(n)},this._reset();return}const e=this.options();this.emit(Xt.BEFORE_CLEAR),this._reset(),zw(e,this._context,!1,n),this.emit(Xt.AFTER_CLEAR)}destroy(){const n=this.options();this.emit(Xt.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),zw(n,this._context,!0),this._container[tL]&&Rrt(this._container),this.emit(Xt.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:n,height:e}=Up(this.options(),this._container);if(n===this._width&&e===this._height)return Promise.resolve(this);this.emit(Xt.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(Xt.AFTER_CHANGE_SIZE)}),r}changeSize(n,e){if(n===this._width&&e===this._height)return Promise.resolve(this);this.emit(Xt.BEFORE_CHANGE_SIZE),this.attr("width",n),this.attr("height",e);const r=this.render();return r.then(()=>{this.emit(Xt.AFTER_CHANGE_SIZE)}),r}getDataByXY(n,e={}){const{shared:r=!1,series:i,facet:a=!1,startX:o=0,startY:s=0}=e,{canvas:c,views:l}=this._context,{document:u}=c,{x:f,y:d}=n,{coordinate:h,scale:p,markState:v,data:g,key:y}=l[0],m=u.getElementsByClassName(jr),b=r?M=>M.__data__.x:M=>M,x=le(m,b),w=u.getElementsByClassName(Cf)[0],O=mr(w),_=M=>Array.from(M.values()).some(T=>{var A,P;return((A=T.interaction)===null||A===void 0?void 0:A.seriesTooltip)||((P=T.channels)===null||P===void 0?void 0:P.some(L=>L.name==="series"&&L.values!==void 0))}),S=Ir(i,_(v)),E=M=>mt(M,"__data__.data",null),k=M=>M.map(E);try{if(S&&_(v)&&!a){const{selectedData:P}=c3({root:O,event:{offsetX:f,offsetY:d},elements:m,coordinate:h,scale:p,startX:o,startY:s}),L=g.get(`${y}-0`);return P.map(({index:I})=>L[I])}const M=s3({root:O,event:{offsetX:f,offsetY:d},elements:m,coordinate:h,scale:p,shared:r});if(Ad(M))return mg(M,g.get(y));const T=b(M),A=x.get(T);return A?k(A):[]}catch{const T=c.document.elementFromPointSync(f,d);return T?E(T):[]}}_create(){const{library:n}=this._context,e=a=>a.startsWith("mark.")||a==="component.axisX"||a==="component.axisY"||a==="component.legends",r=["mark.mark",...Object.keys(n).filter(e)];this._marks={};for(const a of r){const o=a.split(".").pop();class s extends D0{constructor(){super({},o)}}this._marks[o]=s,this[o]=function(c){const l=this.append(s);return o==="mark"&&(l.type=c),l}}const i=["composition.view",...Object.keys(n).filter(a=>a.startsWith("composition.")&&a!=="composition.mark")];this._compositions=Object.fromEntries(i.map(a=>{const o=a.split(".").pop();let s=class extends cd{constructor(){super({},o)}};return s=nit([sd(EO(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))sd(EO(this._compositions))(a);for(const a of i){const o=a.split(".").pop();this[o]=function(){const s=this._compositions[o];return this.type=null,this.append(s)}}}_reset(){const n=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([e])=>e.startsWith("margin")||e.startsWith("padding")||e.startsWith("inset")||n.includes(e))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{const n=this._trailingResolve.bind(this);this._trailingResolve=null,n(this)}).catch(n=>{const e=this._trailingReject.bind(this);this._trailingReject=null,e(n)}))}_createResolve(n){return()=>{this._rendering=!1,n(this)}}_createReject(n){return e=>{this._rendering=!1,n(e)}}_computedOptions(){const n=this.options(),{key:e=iit}=n,{width:r,height:i,depth:a}=Up(n,this._container);return this._width=r,this._height=i,this._key=e,Object.assign(Object.assign({key:this._key},n),{width:r,height:i,depth:a})}_createCanvas(){var n,e;const{width:r,height:i}=Up(this.options(),this._container);this._plugins.push(new xP),this._plugins.forEach(o=>this._renderer.registerPlugin(o)),this._context.canvas=new pk({container:this._container,width:r,height:i,renderer:this._renderer});const a=(e=(n=this._context.canvas)===null||n===void 0?void 0:n.getContextService())===null||e===void 0?void 0:e.getDomElement();a&&(a.style.display="block")}_addToTrailing(){var n;return(n=this._trailingResolve)===null||n===void 0||n.call(this,this),this._trailing=!0,new Promise((r,i)=>{this._trailingResolve=r,this._trailingReject=i})}_bindAutoFit(){const n=this.options(),{autoFit:e}=n;if(this._hasBindAutoFit){e||this._unbindAutoFit();return}e&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}Object.assign({},K3());const oit="modulepreload",sit=function(t,n){return new URL(t,n).href},kO={},MO=function(n,e,r){let i=Promise.resolve();if(e&&e.length>0){let o=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};const s=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),l=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(e.map(u=>{if(u=sit(u,r),u in kO)return;kO[u]=!0;const f=u.endsWith(".css"),d=f?'[rel="stylesheet"]':"";if(!!r)for(let v=s.length-1;v>=0;v--){const g=s[v];if(g.href===u&&(!f||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":oit,f||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),f)return new Promise((v,g)=>{p.addEventListener("load",v),p.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return n().catch(a)})};var rL=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,n||[])).next())})},iL=function(t,n){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(e=0)),e;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,i=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){e.label=l[1];break}if(l[0]===6&&e.label<a[1]){e.label=a[1],a=l;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(l);break}a[2]&&e.ops.pop(),e.trys.pop();continue}l=n.call(t,e)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},qp="__rc_react_root__",n1,$0,AO=!1;function cit(){return rL(this,void 0,void 0,function(){var t,n,e,r,i;return iL(this,function(a){switch(a.label){case 0:if(AO)return[2];AO=!0,a.label=1;case 1:return a.trys.push([1,6,,7]),t=ki.version||"",n=parseInt(t.split(".")[0],10),n>=18?[4,MO(()=>import("./assets/client-D1ogoa79.js").then(o=>o.c),__vite__mapDeps([0,1]),import.meta.url)]:[3,3];case 2:return e=a.sent(),n1=e.createRoot,[3,5];case 3:return[4,MO(()=>import("react-dom"),[],import.meta.url)];case 4:r=a.sent(),$0=r.render,r.unmountComponentAtNode,a.label=5;case 5:return[3,7];case 6:return i=a.sent(),console.warn("[react-render] Failed to load ReactDOM API:",i),[3,7];case 7:return[2]}})})}function lit(t,n){n[qp]||(n[qp]=n1(n)),n[qp].render(t)}function uit(t,n){if(!$0)throw new Error("ReactDOM.render not available");$0(t,n)}function fit(t,n){return rL(this,void 0,void 0,function(){return iL(this,function(e){switch(e.label){case 0:return[4,cit()];case 1:return e.sent(),n1?lit(t,n):uit(t,n),[2]}})})}var Hu=new Map;typeof document<"u"&&Hu.set("tooltip",document.createElement("div"));var dit=function(t,n){n===void 0&&(n=!1);var e=null;if(n)e=Hu.get("tooltip");else if(e=document.createElement("div"),t!=null&&t.key){var r=Hu.get(t.key);r?e=r:Hu.set(t.key,e)}return fit(t,e),e},F0=function(){return F0=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},F0.apply(this,arguments)},hit=function(t,n){if(n===void 0&&(n={}),typeof document>"u")return"loading";var e="";n&&Object.keys(n).forEach(function(o){e+="".concat(o,": ").concat(n[o],`;
176
+ A`,o,o,0,s?1:0,1,a.p1.x,a.p1.y)}return r.join(" ")}}const W3=t=>{const{sets:n="sets",size:e="size",as:r=["key","path"],padding:i=0}=t,[a,o]=r;return s=>{const c=s.map(f=>Object.assign(Object.assign({},f),{sets:f[n],size:f[e],[a]:f.sets.join("&")}));c.sort((f,d)=>f.sets.length-d.sets.length);const l=irt(c);let u;return c.map(f=>{const d=f[n],h=({width:p,height:v})=>{u=u||drt(l,p,v,i);const g=d.map(m=>u[m]);let y=prt(g);return/[zZ]$/.test(y)||(y+=" Z"),y};return Object.assign(Object.assign({},f),{[o]:h})})}};W3.props={};const Y3=()=>t=>(console.log("G2 data section:",t),t);Y3.props={};function vrt(t,n){if(n<0||n>1)throw new Error("alpha must be between 0 and 1.");if(t.length===0)return[];let e=t[0];const r=[];for(const i of t){if(i==null){r.push(i),console.warn("EMA\uFF1AThe value is null or undefined",t);continue}e==null&&(e=i);const a=e*n+(1-n)*i;r.push(a),e=a}return r}const G3=t=>{const{field:n="y",alpha:e=.6,as:r=n}=t;return i=>{const a=i.map(s=>s[n]),o=vrt(a,e);return i.map((s,c)=>Object.assign(Object.assign({},s),{[r]:o[c]}))}};G3.props={};const H3=.01;function Zc(t){const{min:n,max:e}=t;return[[n[0],n[1]],[e[0],e[1]]]}function bO(t,n,e=H3){const[r,i]=t,[a,o]=n;return r>=a[0]-e&&r<=o[0]+e&&i>=a[1]-e&&i<=o[1]+e}function V3(t,n,e=H3){const[r,i]=t;return!(bO(r,n,e)&&bO(i,n,e))}function grt(t,n){const[e,r]=t,[i,a]=n;return e[0]<a[0]&&r[0]>i[0]&&e[1]<a[1]&&r[1]>i[1]}const yrt=t=>{const{priority:n}=t;return e=>{const r=[];return n&&e.sort(n),e.forEach(i=>{bh(i);const a=i.getLocalBounds();r.some(s=>grt(Zc(a),Zc(s.getLocalBounds())))?jm(i):r.push(i)}),e}};function mrt([t,n],[e,r]){return r>t&&n>e}function Au(){const t=new Map;return[r=>t.get(r),(r,i)=>t.set(r,i)]}function brt(t){const n=t.cloneNode(!0),e=n.getElementById("connector");e&&n.removeChild(e);const{min:r,max:i}=n.getRenderBounds();return n.destroy(),{min:r,max:i}}const xrt=t=>{const{maxIterations:n=10,maxError:e=.1,padding:r=1}=t;return i=>{const a=i.length;if(a<=1)return i;const[o,s]=Au(),[c,l]=Au(),[u,f]=Au(),[d,h]=Au();for(const p of i){const{min:v,max:g}=brt(p),[y,m]=v,[b,x]=g;s(p,m),l(p,m),f(p,x-m),h(p,[y,b])}for(let p=0;p<n;p++){i.sort((g,y)=>Re(c(g),c(y)));let v=0;for(let g=0;g<a-1;g++){const y=i[g];let m=g+1,b;for(;(b=i[m])&&!mrt(d(y),d(b));)m+=1;if(b){const x=c(y),w=u(y),O=c(b),_=O-(x+w);if(_<r){const S=(r-_)/2;v=Math.max(v,S),l(y,x-S),l(b,O+S)}}}if(v<e)break}for(const p of i)p.style.y+=c(p)-o(p);return i}};function X3(t){return typeof t=="object"?t:Xi(t)}function Vp(t){let n=t/255;return n=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4),n}function xO(t,n,e){return .2126*Vp(t)+.7152*Vp(n)+.0722*Vp(e)}function U3(t,n){if(!t||!n||t===n)return 1;const{r:e,g:r,b:i}=t,{r:a,g:o,b:s}=n,c=xO(e,r,i),l=xO(a,o,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function q3(t,n){const e=us(n,r=>U3(t,X3(r)));return n[e]}const wrt=t=>{const{threshold:n=4.5,palette:e=["#000","#fff"]}=t;return r=>(r.forEach(i=>{const a=i.attr("dependentElement").parsedStyle.fill,o=i.parsedStyle.fill;U3(o,a)<n&&i.attr("fill",q3(a,e))}),r)},Ort=()=>t=>(t.forEach(n=>{bh(n);const e=n.attr("bounds"),r=n.getLocalBounds();V3(Zc(r),e)&&jm(n)}),t),_rt=(t,n)=>{const[[e,r],[i,a]]=n,[[o,s],[c,l]]=t;let u=0,f=0;return o<e?u=e-o:c>i&&(u=i-c),s<r?f=r-s:l>a&&(f=a-l),[u,f]},Srt=(t,n)=>!t||!t.min||!t.max?!n||!n.min||!n.max?{min:[0,0],max:[0,0]}:n:!n||!n.min||!n.max?t:{min:[Math.min(t.min[0],n.min[0]),Math.min(t.min[1],n.min[1])],max:[Math.max(t.max[0],n.max[0]),Math.max(t.max[1],n.max[1])]},Ert=(t={})=>(n,{canvas:e,layout:r})=>{const{bounds:i="view",offsetX:a=0,offsetY:o=0}=t,c=(()=>{if(i==="main"){const{x:l=0,y:u=0,width:f=0,height:d=0,marginLeft:h=0,marginRight:p=0,marginTop:v=0,marginBottom:g=0,paddingLeft:y=0,paddingRight:m=0,paddingTop:b=0,paddingBottom:x=0}=r;return[[l+h+y+a,u+v+b+o],[l+f-p-m-a,u+d-g-x-o]]}else{const{x:l=0,y:u=0,width:f=0,height:d=0}=r;return[[l+a,u+o],[l+f-a,u+d-o]]}})();return n.forEach(l=>{bh(l);const{max:u,min:f}=Srt(l.getRenderBounds(),l.getBounds());if(!u||!f||u[0]===0&&u[1]===0&&f[0]===0&&f[1]===0)return;const[d,h]=u,[p,v]=f,g=_rt([[p,v],[d,h]],c);l.style.connector&&l.style.connectorPoints&&(l.style.connectorPoints[0][0]-=g[0],l.style.connectorPoints[0][1]-=g[1]),l.style.x+=g[0],l.style.y+=g[1]}),n};function wO(t){var n;const e=t.getAnimations();if(!e||e.length===0)return Uc(t);const r=t.cloneNode(!0);r.style.visibility="hidden",e.forEach(a=>{const o=a.effect.getKeyframes();o&&o.length>0&&r.attr(o[o.length-1])}),(n=t.parentNode)===null||n===void 0||n.appendChild(r);const i=Uc(r);return r.destroy(),i}const krt=t=>{const{palette:n=["#000","#fff"],threshold:e=2}=t;return r=>(r.forEach(i=>{var a,o;const s=i.attr("dependentElement"),c=(o=(a=i.attributes.fill)!==null&&a!==void 0?a:i.parsedStyle.fill)!==null&&o!==void 0?o:"#fff",l=Zc(wO(i)),u=Zc(wO(s));if(V3(l,u,e)){const f=q3(X3(c),n);i.attr("stroke",f)}else i.removeAttribute("stroke")}),r)};function Mrt(){return{"data.fetch":O3,"data.inline":T3,"data.sortBy":A3,"data.sort":E3,"data.filter":S3,"data.pick":k3,"data.rename":M3,"data.fold":_3,"data.slice":I3,"data.custom":P3,"data.map":C3,"data.join":R3,"data.kde":j3,"data.log":Y3,"data.wordCloud":N3,"data.ema":G3,"transform.stackY":AS,"transform.binX":iE,"transform.bin":kg,"transform.dodgeX":$S,"transform.jitter":zS,"transform.jitterX":WS,"transform.jitterY":YS,"transform.symmetryY":GS,"transform.diffY":HS,"transform.stackEnter":FS,"transform.normalizeY":BS,"transform.select":Rd,"transform.selectX":VS,"transform.selectY":XS,"transform.groupX":US,"transform.groupY":qS,"transform.groupColor":KS,"transform.group":ul,"transform.sortX":ZS,"transform.sortY":JS,"transform.sortColor":QS,"transform.flexX":tE,"transform.pack":rE,"transform.sample":aE,"transform.filter":oE,"coordinate.cartesian":HO,"coordinate.polar":Jc,"coordinate.transpose":Z0,"coordinate.theta":UO,"coordinate.parallel":J0,"coordinate.fisheye":KO,"coordinate.radial":Q0,"coordinate.radar":ZO,"coordinate.helix":XO,"encode.constant":QO,"encode.field":t_,"encode.transform":JO,"encode.column":e_,"mark.interval":EA,"mark.rect":kA,"mark.line":MA,"mark.point":AA,"mark.text":TA,"mark.cell":PA,"mark.area":CA,"mark.link":By,"mark.image":LA,"mark.polygon":NA,"mark.box":RA,"mark.vector":IA,"mark.lineX":DA,"mark.lineY":jA,"mark.connector":$A,"mark.range":FA,"mark.rangeX":BA,"mark.rangeY":zA,"mark.path":VA,"mark.shape":lT,"mark.density":ET,"mark.heatmap":kT,"mark.wordCloud":Xy,"mark.beeswarm":AT,"palette.category10":CT,"palette.category20":LT,"scale.linear":RT,"scale.ordinal":IT,"scale.band":NT,"scale.identity":jT,"scale.point":DT,"scale.time":$T,"scale.log":FT,"scale.pow":BT,"scale.sqrt":GT,"scale.threshold":zT,"scale.quantile":WT,"scale.quantize":YT,"scale.sequential":HT,"scale.constant":VT,"theme.classic":XT,"theme.classicDark":qT,"theme.academy":KT,"theme.light":Qy,"theme.dark":UT,"component.axisX":sP,"component.axisY":cP,"component.legendCategory":zm,"component.legendContinuous":da,"component.legends":F5,"component.title":R5,"component.sliderX":I5,"component.sliderY":j5,"component.scrollbarX":D5,"component.scrollbarY":$5,"animation.scaleInX":Ym,"animation.scaleOutX":Stt,"animation.scaleInY":B5,"animation.scaleOutY":Ett,"animation.waveIn":H5,"animation.fadeIn":z5,"animation.fadeOut":W5,"animation.zoomIn":jtt,"animation.zoomOut":Dtt,"animation.pathIn":V5,"animation.morphing":G5,"animation.growInX":X5,"animation.growInY":U5,"interaction.elementHighlight":wh,"interaction.elementHighlightByX":q5,"interaction.elementHighlightByColor":K5,"interaction.elementHoverScale":Z5,"interaction.elementSelect":Oh,"interaction.elementSelectByX":Q5,"interaction.elementSelectByColor":J5,"interaction.fisheye":qtt,"interaction.chartIndex":t3,"interaction.tooltip":l3,"interaction.legendFilter":JJ,"interaction.legendHighlight":uet,"interaction.brushHighlight":_h,"interaction.brushXHighlight":get,"interaction.brushYHighlight":yet,"interaction.brushAxisHighlight":Met,"interaction.brushFilter":Qm,"interaction.brushXFilter":Cet,"interaction.brushYFilter":Let,"interaction.sliderFilter":m3,"interaction.sliderWheel":b3,"interaction.scrollbarFilter":Uet,"interaction.poptip":x3,"interaction.treemapDrillDown":nnt,"interaction.drillDown":snt,"interaction.elementPointMove":hnt,"composition.spaceLayer":LP,"composition.spaceFlex":NP,"composition.facetRect":$P,"composition.repeatMatrix":kU,"composition.facetCircle":LU,"composition.timingKeyframe":FP,"labelTransform.overlapHide":yrt,"labelTransform.overlapDodgeY":xrt,"labelTransform.overflowHide":Ort,"labelTransform.contrastReverse":wrt,"labelTransform.overflowStroke":krt,"labelTransform.exceedAdjust":Ert}}function Art(){return{"composition.geoView":pC,"composition.geoPath":BP}}function Trt(){return{"data.arc":Wy,"data.cluster":wT,"mark.forceGraph":bT,"mark.tree":_T,"mark.pack":aT,"mark.sankey":GA,"mark.chord":HA,"mark.treemap":iT,"mark.partition":PT}}function Prt(){return{"data.venn":W3,"mark.boxplot":cT,"mark.gauge":ST,"mark.wordCloud":Xy,"mark.liquid":MT}}function K3(){return Object.assign(Object.assign(Object.assign(Object.assign({},Art()),Trt()),Prt()),Mrt())}function Crt(t,n){class e extends t{constructor(i){super(Object.assign(Object.assign({},i),{lib:n}))}}return e}const Z3={};function Q3(t,n){t.startsWith("symbol.")?Q7(t.split(".").pop(),n):Object.assign(Z3,{[t]:n})}const bo=t=>t?parseInt(t):0;function Lrt(t){const n=getComputedStyle(t),e=t.clientWidth||bo(n.width),r=t.clientHeight||bo(n.height),i=bo(n.paddingLeft)+bo(n.paddingRight),a=bo(n.paddingTop)+bo(n.paddingBottom);return{width:e-i,height:r-a}}function Xp(t,n){const e=[t];for(;e.length;){const r=e.shift();n&&n(r);const i=r.children||[];for(const a of i)e.push(a)}}class e1{constructor(n={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=n}map(n=e=>e){const e=n(this.value);return this.value=e,this}attr(n,e){return arguments.length===1?this.value[n]:this.map(r=>(r[n]=e,r))}append(n){const e=new n({});return e.children=[],this.push(e),e}push(n){return n.parentNode=this,n.index=this.children.length,this.children.push(n),this}remove(){const n=this.parentNode;if(n){const{children:e}=n,r=e.findIndex(i=>i===this);e.splice(r,1)}return this}getNodeByKey(n){let e=null;return Xp(this,i=>{n===i.attr("key")&&(e=i)}),e}getNodesByType(n){const e=[];return Xp(this,i=>{n===i.type&&e.push(i)}),e}getNodeByType(n){let e=null;return Xp(this,r=>{e||n===r.type&&(e=r)}),e}call(n,...e){return n(this.map(),...e),this}getRoot(){let n=this;for(;n&&n.parentNode;)n=n.parentNode;return n}}var J3=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const j0=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],tL="__remove__",eL="__callback__",OO=1,_O=1;function Nrt(t){if(t===void 0){const n=document.createElement("div");return n[tL]=!0,n}return typeof t=="string"?document.getElementById(t):t}function Rrt(t){const n=t.parentNode;n&&n.removeChild(t)}function Irt(t){if(t.type!==null)return t;const n=t.children[t.children.length-1];for(const e of j0)n.attr(e,t.attr(e));return n}function SO(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function Up(t,n){const{width:e,height:r,autoFit:i,depth:a=0}=t;let o=640,s=480;if(i){const{width:c,height:l}=Lrt(n);o=c||o,s=l||s}return o=e||o,s=r||s,{width:Math.max(he(o)?o:OO,OO),height:Math.max(he(s)?s:_O,_O),depth:a}}function jrt(t){const n=Irt(t),e=[n],r=new Map;for(r.set(n,SO(n));e.length;){const i=e.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===eL)a.children=s.value;else{const c=SO(s),{children:l=[]}=a;l.push(c),e.push(s),r.set(s,c),a.children=l}}return r.get(n)}function Drt(t,n){return typeof t=="function"?!0:new Set(Object.keys(n)).has(t)}function $rt(t,n){return typeof t!="function"&&new Set(Object.keys(n)).has(t)}function Frt(t,n,e,r,i){const{type:a}=t,{type:o=e||a}=n;if($rt(o,i)){for(const s of j0)t.attr(s)!==void 0&&n[s]===void 0&&(n[s]=t.attr(s));return n}if(Drt(o,r)){const s={type:"view"},c=Object.assign({},n);for(const l of j0)c[l]!==void 0&&(s[l]=c[l],delete c[l]);return Object.assign(Object.assign({},s),{children:[c]})}return n}function Brt(t,n,e){if(typeof t=="function")return n.mark;const i=Object.assign(Object.assign({},n),e)[t];if(!i)throw new Error(`Unknown mark: ${t}.`);return i}function zrt(t,n,e){if(typeof t=="function"){const c=new e1;return c.value=t,c.type=eL,c}const{type:r,children:i}=t,a=J3(t,["type","children"]),o=Brt(r,n,e),s=new o;return s.value=a,s.type=r,s}function Wrt(t,n){const{type:e,children:r}=n,i=J3(n,["type","children"]);t.type===e||e===void 0?wS(t.value,i):typeof e=="string"&&(t.type=e,t.value=i)}function Yrt(t,n,e,r){if(!t)return;const i=[[t,n]];for(;i.length;){const[a,o]=i.shift(),s=zrt(o,e,r);Array.isArray(a.children)&&a.push(s);const{children:c}=o;if(Array.isArray(c))for(const l of c)i.push([s,l]);else typeof c=="function"&&i.push([s,c])}}function Grt(t,n,e,r,i){const a=Frt(t,n,e,r,i),o=[[null,t,a]];for(;o.length;){const[s,c,l]=o.shift();if(!c)Yrt(s,l,r,i);else if(!l)c.remove();else{Wrt(c,l);const{children:u}=l,{children:f}=c;if(Array.isArray(u)&&Array.isArray(f)){const d=Math.max(u.length,f.length);for(let h=0;h<d;h++){const p=u[h],v=f[h];o.push([c,v,p])}}else typeof u=="function"&&o.push([c,null,u])}}}function Hrt(){let t,n;return[new Promise((r,i)=>{n=r,t=i}),n,t]}function Vrt(t,n,{key:e=n}){t.prototype[n]=function(r){return arguments.length===0?this.attr(e):this.attr(e,r)}}function Xrt(t,n,{key:e=n}){t.prototype[n]=function(r){if(arguments.length===0)return this.attr(e);if(Array.isArray(r))return this.attr(e,r);const i=[...this.attr(e)||[],r];return this.attr(e,i)}}function Urt(t,n,{key:e=n}){t.prototype[n]=function(r,i){if(arguments.length===0)return this.attr(e);if(arguments.length===1&&typeof r!="string")return this.attr(e,r);const a=this.attr(e)||{};return a[r]=arguments.length===1?!0:i,this.attr(e,a)}}function qrt(t,n,e){t.prototype[n]=function(r){if(arguments.length===0)return this.attr(n);if(Array.isArray(r))return this.attr(n,{items:r});if(Xo(r)&&(r.title!==void 0||r.items!==void 0))return this.attr(n,r);if(r===null||r===!1)return this.attr(n,r);const i=this.attr(n)||{},{items:a=[]}=i;return a.push(r),i.items=a,this.attr(n,i)}}function Krt(t,n,{ctor:e}){t.prototype[n]=function(r){const i=this.append(e);return n==="mark"&&(i.type=r),i}}function Zrt(t,n,{ctor:e}){t.prototype[n]=function(){return this.type=null,this.append(e)}}function sd(t){return n=>{for(const[e,r]of Object.entries(t)){const{type:i}=r;i==="value"?Vrt(n,e,r):i==="array"?Xrt(n,e,r):i==="object"?Urt(n,e,r):i==="node"?Krt(n,e,r):i==="container"?Zrt(n,e,r):i==="mix"&&qrt(n,e)}return n}}function EO(t){return Object.fromEntries(Object.entries(t).map(([n,e])=>[n,{type:"node",ctor:e}]))}const nL={encode:{type:"object"},scale:{type:"object"},data:{type:"value"},transform:{type:"array"},style:{type:"object"},animate:{type:"object"},coordinate:{type:"object"},interaction:{type:"object"},label:{type:"array",key:"labels"},axis:{type:"object"},legend:{type:"object"},slider:{type:"object"},scrollbar:{type:"object"},state:{type:"object"},layout:{type:"object"},theme:{type:"object"},title:{type:"value"}},Qrt=Object.assign(Object.assign({},nL),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),Jrt=Object.assign(Object.assign({},nL),{labelTransform:{type:"array"}});var tit=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a};let cd=class extends e1{changeData(n){var e;const r=this.getRoot();if(r)return this.attr("data",n),!((e=this.children)===null||e===void 0)&&e.length&&this.children.forEach(i=>{i.attr("data",n)}),r==null?void 0:r.render()}getView(){const n=this.getRoot(),{views:e}=n.getContext();if(e!=null&&e.length)return e.find(r=>r.key===this._key)}getScale(){var n;return(n=this.getView())===null||n===void 0?void 0:n.scale}getScaleByChannel(n){const e=this.getScale();if(e)return e[n]}getCoordinate(){var n;return(n=this.getView())===null||n===void 0?void 0:n.coordinate}getTheme(){var n;return(n=this.getView())===null||n===void 0?void 0:n.theme}getGroup(){const n=this._key;return n?this.getRoot().getContext().canvas.getRoot().getElementById(n):void 0}show(){const n=this.getGroup();n&&!n.isVisible()&&bh(n)}hide(){const n=this.getGroup();n&&n.isVisible()&&jm(n)}};cd=tit([sd(Jrt)],cd);var eit=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a};let D0=class extends e1{changeData(n){const e=this.getRoot();if(e)return this.attr("data",n),e==null?void 0:e.render()}getMark(){var n;const e=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(!e)return;const{markState:r}=e,i=Array.from(r.keys()).find(a=>a.key===this.attr("key"));return r.get(i)}getScale(){var n;const e=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(e)return e==null?void 0:e.scale}getScaleByChannel(n){var e,r;const i=(e=this.getRoot())===null||e===void 0?void 0:e.getView();if(i)return(r=i==null?void 0:i.scale)===null||r===void 0?void 0:r[n]}getGroup(){const n=this.attr("key");return n?this.getRoot().getContext().canvas.getRoot().getElementById(n):void 0}};D0=eit([sd(Qrt)],D0);var nit=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a},rit=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const iit="G2_CHART_KEY";class ait extends cd{constructor(n){const{container:e,canvas:r,renderer:i,plugins:a,lib:o,createCanvas:s}=n,c=rit(n,["container","canvas","renderer","plugins","lib","createCanvas"]);super(c,"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailingClear=null,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=u_(()=>{this.forceFit()},300),this._renderer=i||new mP,this._plugins=a||[],this._container=Nrt(e),this._emitter=new nm,this._context={library:Object.assign(Object.assign({},o),Z3),emitter:this._emitter,canvas:r,createCanvas:s},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;const n=new Promise((a,o)=>kJ(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[e,r,i]=Hrt();return n.then(r).then(()=>{if(this._trailingClear){const a=this.options();this._trailingClear(),this._trailing&&this.options(a)}}).catch(i).then(()=>{this._trailingClear=null,this._renderTrailing()}),e}options(n){if(arguments.length===0)return jrt(this);const{type:e}=n;return e&&(this._previousDefinedType=e),Grt(this,n,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(n,e,r){return this._emitter.on(n,e,r),this}once(n,e){return this._emitter.once(n,e),this}emit(n,...e){return this._emitter.emit(n,...e),this}off(n,e){return this._emitter.off(n,e),this}clear(n=!0){if(this._rendering){this._trailingClear=()=>{this.clear(n)},this._reset();return}const e=this.options();this.emit(Xt.BEFORE_CLEAR),this._reset(),zw(e,this._context,!1,n),this.emit(Xt.AFTER_CLEAR)}destroy(){const n=this.options();this.emit(Xt.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),zw(n,this._context,!0),this._container[tL]&&Rrt(this._container),this.emit(Xt.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:n,height:e}=Up(this.options(),this._container);if(n===this._width&&e===this._height)return Promise.resolve(this);this.emit(Xt.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(Xt.AFTER_CHANGE_SIZE)}),r}changeSize(n,e){if(n===this._width&&e===this._height)return Promise.resolve(this);this.emit(Xt.BEFORE_CHANGE_SIZE),this.attr("width",n),this.attr("height",e);const r=this.render();return r.then(()=>{this.emit(Xt.AFTER_CHANGE_SIZE)}),r}getDataByXY(n,e={}){const{shared:r=!1,series:i,facet:a=!1,startX:o=0,startY:s=0}=e,{canvas:c,views:l}=this._context,{document:u}=c,{x:f,y:d}=n,{coordinate:h,scale:p,markState:v,data:g,key:y}=l[0],m=u.getElementsByClassName(jr),b=r?M=>M.__data__.x:M=>M,x=le(m,b),w=u.getElementsByClassName(Cf)[0],O=mr(w),_=M=>Array.from(M.values()).some(T=>{var A,P;return((A=T.interaction)===null||A===void 0?void 0:A.seriesTooltip)||((P=T.channels)===null||P===void 0?void 0:P.some(L=>L.name==="series"&&L.values!==void 0))}),S=Ir(i,_(v)),E=M=>mt(M,"__data__.data",null),k=M=>M.map(E);try{if(S&&_(v)&&!a){const{selectedData:P}=c3({root:O,event:{offsetX:f,offsetY:d},elements:m,coordinate:h,scale:p,startX:o,startY:s}),L=g.get(`${y}-0`);return P.map(({index:I})=>L[I])}const M=s3({root:O,event:{offsetX:f,offsetY:d},elements:m,coordinate:h,scale:p,shared:r});if(Ad(M))return mg(M,g.get(y));const T=b(M),A=x.get(T);return A?k(A):[]}catch{const T=c.document.elementFromPointSync(f,d);return T?E(T):[]}}_create(){const{library:n}=this._context,e=a=>a.startsWith("mark.")||a==="component.axisX"||a==="component.axisY"||a==="component.legends",r=["mark.mark",...Object.keys(n).filter(e)];this._marks={};for(const a of r){const o=a.split(".").pop();class s extends D0{constructor(){super({},o)}}this._marks[o]=s,this[o]=function(c){const l=this.append(s);return o==="mark"&&(l.type=c),l}}const i=["composition.view",...Object.keys(n).filter(a=>a.startsWith("composition.")&&a!=="composition.mark")];this._compositions=Object.fromEntries(i.map(a=>{const o=a.split(".").pop();let s=class extends cd{constructor(){super({},o)}};return s=nit([sd(EO(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))sd(EO(this._compositions))(a);for(const a of i){const o=a.split(".").pop();this[o]=function(){const s=this._compositions[o];return this.type=null,this.append(s)}}}_reset(){const n=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([e])=>e.startsWith("margin")||e.startsWith("padding")||e.startsWith("inset")||n.includes(e))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{const n=this._trailingResolve.bind(this);this._trailingResolve=null,n(this)}).catch(n=>{const e=this._trailingReject.bind(this);this._trailingReject=null,e(n)}))}_createResolve(n){return()=>{this._rendering=!1,n(this)}}_createReject(n){return e=>{this._rendering=!1,n(e)}}_computedOptions(){const n=this.options(),{key:e=iit}=n,{width:r,height:i,depth:a}=Up(n,this._container);return this._width=r,this._height=i,this._key=e,Object.assign(Object.assign({key:this._key},n),{width:r,height:i,depth:a})}_createCanvas(){var n,e;const{width:r,height:i}=Up(this.options(),this._container);this._plugins.push(new xP),this._plugins.forEach(o=>this._renderer.registerPlugin(o)),this._context.canvas=new pk({container:this._container,width:r,height:i,renderer:this._renderer});const a=(e=(n=this._context.canvas)===null||n===void 0?void 0:n.getContextService())===null||e===void 0?void 0:e.getDomElement();a&&(a.style.display="block")}_addToTrailing(){var n;return(n=this._trailingResolve)===null||n===void 0||n.call(this,this),this._trailing=!0,new Promise((r,i)=>{this._trailingResolve=r,this._trailingReject=i})}_bindAutoFit(){const n=this.options(),{autoFit:e}=n;if(this._hasBindAutoFit){e||this._unbindAutoFit();return}e&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}Object.assign({},K3());const oit="modulepreload",sit=function(t,n){return new URL(t,n).href},kO={},MO=function(n,e,r){let i=Promise.resolve();if(e&&e.length>0){let o=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};const s=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),l=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(e.map(u=>{if(u=sit(u,r),u in kO)return;kO[u]=!0;const f=u.endsWith(".css"),d=f?'[rel="stylesheet"]':"";if(!!r)for(let v=s.length-1;v>=0;v--){const g=s[v];if(g.href===u&&(!f||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":oit,f||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),f)return new Promise((v,g)=>{p.addEventListener("load",v),p.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return n().catch(a)})};var rL=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,n||[])).next())})},iL=function(t,n){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(e=0)),e;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,i=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){e.label=l[1];break}if(l[0]===6&&e.label<a[1]){e.label=a[1],a=l;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(l);break}a[2]&&e.ops.pop(),e.trys.pop();continue}l=n.call(t,e)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},qp="__rc_react_root__",n1,$0,AO=!1;function cit(){return rL(this,void 0,void 0,function(){var t,n,e,r,i;return iL(this,function(a){switch(a.label){case 0:if(AO)return[2];AO=!0,a.label=1;case 1:return a.trys.push([1,6,,7]),t=ki.version||"",n=parseInt(t.split(".")[0],10),n>=18?[4,MO(()=>import("./assets/client-Drx8xxnE.js").then(o=>o.c),__vite__mapDeps([0,1]),import.meta.url)]:[3,3];case 2:return e=a.sent(),n1=e.createRoot,[3,5];case 3:return[4,MO(()=>import("react-dom"),[],import.meta.url)];case 4:r=a.sent(),$0=r.render,r.unmountComponentAtNode,a.label=5;case 5:return[3,7];case 6:return i=a.sent(),console.warn("[react-render] Failed to load ReactDOM API:",i),[3,7];case 7:return[2]}})})}function lit(t,n){n[qp]||(n[qp]=n1(n)),n[qp].render(t)}function uit(t,n){if(!$0)throw new Error("ReactDOM.render not available");$0(t,n)}function fit(t,n){return rL(this,void 0,void 0,function(){return iL(this,function(e){switch(e.label){case 0:return[4,cit()];case 1:return e.sent(),n1?lit(t,n):uit(t,n),[2]}})})}var Hu=new Map;typeof document<"u"&&Hu.set("tooltip",document.createElement("div"));var dit=function(t,n){n===void 0&&(n=!1);var e=null;if(n)e=Hu.get("tooltip");else if(e=document.createElement("div"),t!=null&&t.key){var r=Hu.get(t.key);r?e=r:Hu.set(t.key,e)}return fit(t,e),e},F0=function(){return F0=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},F0.apply(this,arguments)},hit=function(t,n){if(n===void 0&&(n={}),typeof document>"u")return"loading";var e="";n&&Object.keys(n).forEach(function(o){e+="".concat(o,": ").concat(n[o],`;
177
177
  `)});var r=t.attachShadow({mode:"open"}),i=document.createElement("div"),a=document.createElement("style");a.innerHTML=`.loading {
178
178
  display: inline-block;
179
179
  position: relative;
@@ -253,4 +253,4 @@ A`,o,o,0,s?1:0,1,a.p1.x,a.p1.y)}return r.join(" ")}}const W3=t=>{const{sets:n="s
253
253
  align-items: center;
254
254
  gap: 12px;
255
255
  flex-wrap: wrap;
256
- `;function yst(t){const{url:n="http://127.0.0.1:2230",token:e,role:r,eventsEmit:i}=t,{getMessage:a}=UL(),o=50,[s,c]=Qn(!1),[l,u]=Qn(!1),[f,d]=Qn(!1),[h,p]=Qn(null),[v,g]=Qn("timeline"),[y,m]=Qn({username:"",dateRange:[Qs().subtract(3,"month"),Qs()]}),[b,x]=Qn(""),{getTimelineOperateRecords:w,getStatisticsOperateRecords:O}=Ku(()=>KL({url:n,token:e,role:r,eventsEmit:i,getMessage:a}),[]),_=Zs({timeline:null,statistics:null});qu(()=>{var G,V,Y,q;const j=y.username||void 0,D=(V=(G=y.dateRange)==null?void 0:G[0])==null?void 0:V.format("YYYY-MM-DD"),$=(q=(Y=y.dateRange)==null?void 0:Y[1])==null?void 0:q.format("YYYY-MM-DD"),B=_.current[v],z=JSON.stringify({fuzzy:j,start:D,end:$});(B==null?void 0:B.key)!==z&&(v=="timeline"?(A(1),I(1,!1)):C())},[y,v]);const[S,E]=Qn(!0),[k,M]=Qn([]),[T,A]=Qn(1),[P,L]=Qn([]),I=async(j=1,D=!1)=>{var $,B,z,W;try{p(null),D?(d(!0),u(!0)):c(!0);const G={pageNo:j,pageSize:o,fuzzy:y.username||void 0,start:(B=($=y.dateRange)==null?void 0:$[0])==null?void 0:B.format("YYYY-MM-DD"),end:(W=(z=y.dateRange)==null?void 0:z[1])==null?void 0:W.format("YYYY-MM-DD")},V=await w(G);if(_.current.timeline={key:JSON.stringify({fuzzy:G.fuzzy,start:G.start,end:G.end})},console.log("\u64CD\u4F5C\u8BB0\u5F55\u6570\u636E:",V),V!=null&&V.records){const Y=V.records.map(K=>({id:K.id,endTime:K.endTime,gmtCreated:K.gmtCreated,gmtModified:K.gmtModified,ip:K.ip,name:K.name||"",params:K.params,startTime:K.startTime,success:K.success||0,url:K.url||"",userId:K.userId,userName:K.userName}));M(K=>D?[...K,...Y]:Y);const q=V.total||0;E(j*o<q),A(j)}}catch(G){console.error("\u83B7\u53D6\u64CD\u4F5C\u8BB0\u5F55\u5931\u8D25:",G),p(G instanceof Error?G.message:String(G??a("common.unknownError")))}finally{D?(d(!1),u(!1)):c(!1)}},R=()=>{!s&&S&&I(T+1,!0)},C=async()=>{var j,D,$,B;try{p(null),c(!0);const z={fuzzy:y.username||void 0,start:(D=(j=y.dateRange)==null?void 0:j[0])==null?void 0:D.format("YYYY-MM-DD"),end:(B=($=y.dateRange)==null?void 0:$[1])==null?void 0:B.format("YYYY-MM-DD")},W=await O({...z});_.current.statistics={key:JSON.stringify({fuzzy:z.fuzzy,start:z.start,end:z.end})},console.log("\u64CD\u4F5C\u8BB0\u5F55\u6570\u636E:",W),L(W)}catch(z){console.error("\u83B7\u53D6\u64CD\u4F5C\u8BB0\u5F55\u5931\u8D25:",z),p(z instanceof Error?z.message:String(z??a("common.unknownError")))}finally{c(!1)}},N=(j,{from:D})=>{if(!j)return!1;const $=Qs().endOf("day");if(j.isAfter($,"day"))return!0;if(!D)return!1;const B=D.subtract(3,"month").startOf("day"),z=D.add(3,"month").startOf("day");return j.isBefore(B,"day")||j.isAfter(z,"day")};return gt(_L,{title:a("dashboard.title"),description:a("dashboard.description"),children:nn(hst,{children:[nn(pst,{children:[nn(vst,{children:[gt(OL,{value:b,onChange:j=>{x(j.target.value)},onPressEnter:()=>{m(j=>({...j,username:b}))},placeholder:a("toolbar.keywordPlaceholder"),style:{width:240},suffix:gt(AL,{size:14,onClick:()=>{m(j=>({...j,username:b}))}})}),gt(dst,{value:y==null?void 0:y.dateRange,allowClear:!1,locale:fL,onChange:j=>{j&&j[0]&&j[1]&&m(D=>({...D,dateRange:[j[0],j[1]]}))},disabledDate:N})]}),gt(gst,{children:nn(Mh.Group,{value:v,onChange:j=>{g(j.target.value)},children:[nn(Mh.Button,{value:"timeline",children:[gt(PL,{size:14,className:"inline"})," \u65F6\u95F4\u8F74"]}),nn(Mh.Button,{value:"statistics",children:[gt(TL,{size:14,className:"inline"})," \u7EDF\u8BA1\u56FE"]})]})})]}),h?gt("div",{style:{padding:16,color:"#cf1322"},children:h}):gt(i1,{children:s?gt("div",{style:{padding:24,display:"flex",justifyContent:"center"},children:gt(FO,{})}):nn(i1,{children:[" ",v==="statistics"?gt(sst,{statistics:P,viewMode:v}):gt(eN,{records:k,loadMore:R,hasMore:S,loadingMore:f})]})})]})})}function Fst({locale:t="zh",messages:n,...e}){return gt(qL,{locale:t,messages:n,children:gt(yst,{...e})})}export{Fst as default};
256
+ `;function yst(t){const{url:n="http://127.0.0.1:2230",token:e,role:r,eventsEmit:i}=t,{getMessage:a}=UL(),o=50,[s,c]=Qn(!1),[l,u]=Qn(!1),[f,d]=Qn(!1),[h,p]=Qn(null),[v,g]=Qn("timeline"),[y,m]=Qn({username:"",dateRange:[Qs().subtract(3,"month"),Qs()]}),[b,x]=Qn(""),{getTimelineOperateRecords:w,getStatisticsOperateRecords:O}=Ku(()=>KL({url:n,token:e,role:r,eventsEmit:i,getMessage:a}),[]),_=Zs({timeline:null,statistics:null});qu(()=>{var G,V,Y,q;const j=y.username||void 0,D=(V=(G=y.dateRange)==null?void 0:G[0])==null?void 0:V.format("YYYY-MM-DD"),$=(q=(Y=y.dateRange)==null?void 0:Y[1])==null?void 0:q.format("YYYY-MM-DD"),B=_.current[v],z=JSON.stringify({fuzzy:j,start:D,end:$});(B==null?void 0:B.key)!==z&&(v=="timeline"?(A(1),I(1,!1)):C())},[y,v]);const[S,E]=Qn(!0),[k,M]=Qn([]),[T,A]=Qn(1),[P,L]=Qn([]),I=async(j=1,D=!1)=>{var $,B,z,W;try{p(null),D?(d(!0),u(!0)):c(!0);const G={pageNo:j,pageSize:o,fuzzy:y.username||void 0,start:(B=($=y.dateRange)==null?void 0:$[0])==null?void 0:B.format("YYYY-MM-DD"),end:(W=(z=y.dateRange)==null?void 0:z[1])==null?void 0:W.format("YYYY-MM-DD")},V=await w(G);if(_.current.timeline={key:JSON.stringify({fuzzy:G.fuzzy,start:G.start,end:G.end})},console.log("\u64CD\u4F5C\u8BB0\u5F55\u6570\u636E:",V),V!=null&&V.records){const Y=V.records.map(K=>({id:K.id,endTime:K.endTime,gmtCreated:K.gmtCreated,gmtModified:K.gmtModified,ip:K.ip,name:K.name||"",params:K.params,startTime:K.startTime,success:K.success||0,url:K.url||"",userId:K.userId,userName:K.userName}));M(K=>D?[...K,...Y]:Y);const q=V.total||0;E(j*o<q),A(j)}}catch(G){console.error("\u83B7\u53D6\u64CD\u4F5C\u8BB0\u5F55\u5931\u8D25:",G),p(G instanceof Error?G.message:String(G??a("common.unknownError")))}finally{D?(d(!1),u(!1)):c(!1)}},R=()=>{!s&&S&&I(T+1,!0)},C=async()=>{var j,D,$,B;try{p(null),c(!0);const z={fuzzy:y.username||void 0,start:(D=(j=y.dateRange)==null?void 0:j[0])==null?void 0:D.format("YYYY-MM-DD"),end:(B=($=y.dateRange)==null?void 0:$[1])==null?void 0:B.format("YYYY-MM-DD")},W=await O({...z});_.current.statistics={key:JSON.stringify({fuzzy:z.fuzzy,start:z.start,end:z.end})},console.log("\u64CD\u4F5C\u8BB0\u5F55\u6570\u636E:",W),L(W)}catch(z){console.error("\u83B7\u53D6\u64CD\u4F5C\u8BB0\u5F55\u5931\u8D25:",z),p(z instanceof Error?z.message:String(z??a("common.unknownError")))}finally{c(!1)}},N=(j,{from:D})=>{if(!j)return!1;const $=Qs().endOf("day");if(j.isAfter($,"day"))return!0;if(!D)return!1;const B=D.subtract(3,"month").startOf("day"),z=D.add(3,"month").startOf("day");return j.isBefore(B,"day")||j.isAfter(z,"day")};return gt(_L,{title:a("dashboard.title"),description:a("dashboard.description"),children:nn(hst,{children:[nn(pst,{children:[nn(vst,{children:[gt(OL,{value:b,onChange:j=>{x(j.target.value)},onPressEnter:()=>{m(j=>({...j,username:b}))},placeholder:a("toolbar.keywordPlaceholder"),style:{width:240},suffix:gt(AL,{size:14,onClick:()=>{m(j=>({...j,username:b}))}})}),gt(dst,{value:y==null?void 0:y.dateRange,allowClear:!1,locale:fL,onChange:j=>{j&&j[0]&&j[1]&&m(D=>({...D,dateRange:[j[0],j[1]]}))},disabledDate:N})]}),gt(gst,{children:nn(Mh.Group,{value:v,onChange:j=>{g(j.target.value)},children:[nn(Mh.Button,{value:"timeline",children:[gt(PL,{size:14,className:"inline"})," \u65F6\u95F4\u8F74"]}),nn(Mh.Button,{value:"statistics",children:[gt(TL,{size:14,className:"inline"})," \u7EDF\u8BA1\u56FE"]})]})})]}),h?gt("div",{style:{padding:16,color:"#cf1322"},children:h}):gt(i1,{children:s?gt("div",{style:{padding:24,display:"flex",justifyContent:"center"},children:gt(FO,{})}):nn(i1,{children:[" ",v==="statistics"?gt(sst,{statistics:P,viewMode:v}):gt(eN,{records:k,loadMore:R,hasMore:S,loadingMore:f})]})})]})})}function Bst({locale:t="zh",messages:n,...e}){return gt(qL,{locale:t,messages:n,children:gt(yst,{...e})})}export{Bst as default};