@tabler/charts-bootstrap 0.0.0-stage → 0.0.1-alpha.0

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.
@@ -0,0 +1,3 @@
1
+ var TablerCharts=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t=0){let n=n=>{let r=typeof e==`number`?e:e?.[n];return Number.isFinite(r)?r:t};return{top:n(`top`),right:n(`right`),bottom:n(`bottom`),left:n(`left`)}}function n(e,t,n){return{x:n.left,y:n.top,width:Math.max(0,e-n.left-n.right),height:Math.max(0,t-n.top-n.bottom)}}let r=e=>e>=4352&&(e<=4447||e>=11904&&e<=42191||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65280&&e<=65376||e>=127744);function i(e){return e>=`0`&&e<=`9`?e===`1`?.45:.63:" !'.,:;|ijlI`".includes(e)?.27:`()[]{}-/frt`.includes(e)?.38:`%@MWmw`.includes(e)?.88:`CDGHNOQU`.includes(e)?.76:e>=`A`&&e<=`Z`?.66:.57}function a(e,t){let n=0;for(let t=0;t<e.length;t++){let i=e.codePointAt(t);n+=o[i]??(r(i)?1:.57),i>65535&&t++}return n*t}let o=/* @__PURE__ */ Array.from({length:128},(e,t)=>i(String.fromCharCode(t))),s=e=>Math.round(e*100)/100,c=1.25,l=`http://www.w3.org/2000/svg`,u={fill:`rgb(0, 0, 0)`,"fill-opacity":`1`,stroke:`none`,"stroke-width":`1px`,"stroke-opacity":`1`,"stroke-dasharray":`none`,"stroke-dashoffset":`0px`,"stroke-linecap":`butt`,"stroke-linejoin":`miter`,"paint-order":`normal`,"shape-rendering":`auto`,"vector-effect":`none`,opacity:`1`,visibility:`visible`},d={...u,"font-family":``,"font-size":``,"font-weight":`400`,"font-style":`normal`,"font-variant-numeric":`normal`,"letter-spacing":`normal`},f={"stop-color":``,"stop-opacity":`1`},p={opacity:`1`},m=/* @__PURE__ */ new Set([`path`,`line`,`rect`,`circle`,`ellipse`,`polygon`,`polyline`]);function h(e){let t=`element`in e&&!(e instanceof Element)?e.element:e,n=t.localName===`svg`?t:t.querySelector(`:scope > svg.tc-chart`);if(!n)throw Error(`@tabler/charts: no rendered chart to export.`);return n}function g(e){let t=e.transform;if(!t||t===`none`)return;let n=t.replace(/px/g,``);if(n.startsWith(`translate`))return n;let[r=0,i=0]=(e.transformOrigin||`0 0`).split(` `).map(Number.parseFloat);return r||i?`translate(${r} ${i}) ${n} translate(${-r} ${-i})`:n}function _(e,t){let n=getComputedStyle(e);if(n.display===`none`)return!1;let r=e.localName,i=r===`text`?d:r===`stop`?f:m.has(r)?u:p,a=[];for(let e in i){let t=n.getPropertyValue(e);t&&t!==i[e]&&a.push(`${e}:${t}`)}t.removeAttribute(`style`),a.length&&t.setAttribute(`style`,a.join(`;`));let o=g(n);o&&t.setAttribute(`transform`,o);let s=Array.from(e.children),c=Array.from(t.children);return s.forEach((e,t)=>{let n=c[t];(e.classList.contains(`tc-hover-layer`)||!_(e,n))&&n.remove()}),!0}function v(e){let t=e.querySelector(`:scope > .tc-legend`),n=t?Array.from(t.querySelectorAll(`.tc-legend-item`)):[];if(!t||!n.length)return;let r=e.ownerDocument,i=e.querySelector(`:scope > svg.tc-patterned`),a=t.getBoundingClientRect(),o=r.createElementNS(l,`g`);for(let e of n){let t=e.querySelector(`.tc-legend-swatch`),n=e.querySelector(`.tc-legend-name`);if(!t||!n)continue;let c=t.getBoundingClientRect(),u=n.getBoundingClientRect(),d=getComputedStyle(t).getPropertyValue(`--tc-series-color`).trim(),f=/\btc-series-([1-8])\b/.exec(e.getAttribute(`class`)??``)?.[1]??`other`,p=i?getComputedStyle(i).getPropertyValue(`--tc-pattern-${f}`).trim():``,m=e.classList.contains(`tc-legend-item-hidden`),h=r.createElementNS(l,`circle`);h.setAttribute(`cx`,String(s(c.left-a.left+c.width/2))),h.setAttribute(`cy`,String(s(c.top-a.top+c.height/2))),h.setAttribute(`r`,String(s(c.width/2-(m?.75:0)))),h.setAttribute(`style`,m?`fill:none;stroke:${d};stroke-width:1.5px`:`fill:${p.startsWith(`url(`)?p:d}`);let g=getComputedStyle(n),_=r.createElementNS(l,`text`);_.setAttribute(`x`,String(s(u.left-a.left))),_.setAttribute(`y`,String(s(u.top-a.top+u.height/2))),_.setAttribute(`dy`,`0.35em`),_.setAttribute(`style`,`fill:${g.color};font-family:${g.fontFamily};font-size:${g.fontSize};font-weight:${g.fontWeight}`),_.textContent=n.textContent,o.append(h,_)}let c=t.getAttribute(`data-position`)===`bottom`,u=Number.parseFloat(getComputedStyle(t)[c?`marginTop`:`marginBottom`])||0;return{svg:o,height:s(a.height+u),margin:u,bottom:c}}function y(e,t={}){let n=h(e);for(let e of n.getAnimations?.({subtree:!0})??[])e.finish();let r=n.cloneNode(!0);_(n,r);let i=n.ownerDocument,a=Number(n.getAttribute(`width`)),o=Number(n.getAttribute(`height`));r.setAttribute(`xmlns`,l),r.removeAttribute(`class`),r.removeAttribute(`tabindex`),r.removeAttribute(`data-resizing`),r.removeAttribute(`aria-describedby`),r.removeAttribute(`aria-activedescendant`);let s=getComputedStyle(n),c=n.parentElement,u=t.legend!==!1&&c?v(c):void 0,d=o;if(u){let e=i.createElementNS(l,`g`);e.append(...Array.from(r.childNodes)),u.bottom?u.svg.setAttribute(`transform`,`translate(0 ${o+u.margin})`):e.setAttribute(`transform`,`translate(0 ${u.height})`),r.append(e,u.svg),d=o+u.height}r.setAttribute(`width`,String(a)),r.setAttribute(`height`,String(d)),r.setAttribute(`viewBox`,`0 0 ${a} ${d}`);let f=n.getAttribute(`aria-label`);if(f){let e=i.createElementNS(l,`title`);e.textContent=f,r.prepend(e)}let p=t.background===void 0||t.background===`auto`?s.getPropertyValue(`--tc-surface`).trim()||void 0:t.background||void 0;if(p){let e=i.createElementNS(l,`rect`);e.setAttribute(`width`,`100%`),e.setAttribute(`height`,`100%`),e.setAttribute(`fill`,p),r.insertBefore(e,r.querySelector(`:scope > title`)?.nextSibling??r.firstChild)}return new XMLSerializer().serializeToString(r)}async function b(e,t={}){let{type:n=`image/png`,scale:r=2,quality:i}=t,a=y(e,{...t,...n===`image/jpeg`&&t.background===!1?{background:`#fff`}:{}}),o=h(e).ownerDocument,s=new Image;s.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(a)}`,await s.decode();let c=o.createElement(`canvas`);c.width=Math.round(s.width*r),c.height=Math.round(s.height*r);let l=c.getContext(`2d`);if(!l)throw Error(`@tabler/charts: no 2d canvas to draw the image.`);return l.drawImage(s,0,0,c.width,c.height),new Promise((e,t)=>{c.toBlob(n=>n?e(n):t(/* @__PURE__ */ Error(`@tabler/charts: could not encode.`)),n,i)})}async function x(e,t={}){let{format:n=`png`}=t,r=h(e),i=n===`svg`?new Blob([y(e,t)],{type:`image/svg+xml`}):await b(e,{...t,type:`image/${n}`}),a=(t.filename??r.getAttribute(`aria-label`)??`chart`).replace(/[\\/:*?"<>|]+/g,``).trim(),o=r.ownerDocument.createElement(`a`);o.href=URL.createObjectURL(i),o.download=`${a||`chart`}.${n===`jpeg`?`jpg`:n}`,o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e3)}let S={};function C(e){Object.assign(S,e)}let w=/* @__PURE__ */ new Set;function T(e){w.add(e),S.post=(e,t,n,r)=>{for(let i of w)t=i(e,t,n,r);return t}}function E(e){let t=S[e];if(!t)throw Error(`@tabler/charts: Import "@tabler/charts/${e===`dates`?`time`:e}" for ${e}.`);return t}C({export:x});function D(e,t,...n){let r={},i;if(t)for(let e in t){let n=t[e];if(e===`key`)n!=null&&(i=n);else if(e===`class`){let e=O(n);e&&(r.class=e)}else if(e===`style`){let e=A(n);e&&(r.style=e)}else n===!0?r[e]=``:(typeof n==`string`||typeof n==`number`&&Number.isFinite(n))&&(r[e]=n)}let a=[];return j(n,a),{tag:e,attrs:r,children:a,key:i}}function O(e){if(!e)return``;if(typeof e==`string`)return e;let t=``;for(let n of e){let e=O(n);e&&(t=t?`${t} ${e}`:e)}return t}let k=/[;{}<>"'\\]|\/\*|\b(?:url(?!\(#[\w-]+\))|src|attr|image|image-set|cross-fade|element|expression)\s*\(/i;function A(e){if(!e)return``;if(typeof e==`string`)return e;let t=``;for(let n in e){let r=e[n];r==null||r===``||k.test(String(r))||(t+=`${t?`;`:``}${n}:${r}`)}return t}function j(e,t){for(let n of e){if(n==null||typeof n==`boolean`)continue;if(Array.isArray(n)){j(n,t);continue}if(typeof n==`object`){t.push(n);continue}let e=String(n);if(e===``)continue;let r=t.length-1;r>=0&&typeof t[r]==`string`?t[r]+=e:t.push(e)}}let M=/* @__PURE__ */ new Map,N=/* @__PURE__ */ new Map;function P(e,t,n){let r=e.get(t);return r===void 0&&(e.size>=64&&e.clear(),r=n(),e.set(t,r)),r}function F(e,t){return`${JSON.stringify(e??null)}|${JSON.stringify(t)}`}function I(e,t={}){return P(M,F(e,t),()=>new Intl.NumberFormat(e,t))}function L(e,t={}){return P(N,F(e,t),()=>new Intl.DateTimeFormat(e,t))}let R=e=>e===0?0:e;function z(e,t){if(typeof e==`function`)return e;let{compactSymbols:n,...r}=e??{};if(n)return V(n===!0?B:n,r,t);let i=I(t,r);return e=>i.format(R(e))}let B=[`K`,`M`,`B`,`T`];function V(e,{notation:t,compactDisplay:n,...r},i){let a=H(r),o=I(i,a?r:{...r,maximumSignificantDigits:2}),s=a?o:I(i,{...r,maximumFractionDigits:0});return t=>{for(let n=0;;n++){let r=R(t/1e3**n),i=(Math.abs(r)<10?o:s).formatToParts(r),a=``,c;for(let e of i)e.type===`integer`&&(a+=e.value),(e.type===`integer`||e.type===`fraction`)&&(c=e);if(a.length<4||n>=e.length)return n&&c&&(c.value+=e[n-1]),i.map(e=>e.value).join(``)}}}let ee=e=>e.notation===`compact`||!!e.compactSymbols,H=e=>(e.minimumFractionDigits??e.maximumFractionDigits??e.minimumSignificantDigits??e.maximumSignificantDigits)!==void 0;function U(e,t){return z(typeof e==`object`&&ee(e)&&!H(e)?{...e,maximumSignificantDigits:3}:e,t)}function te(e){let t=Math.abs(e);return!Number.isFinite(t)||t===0?0:Math.max(0,-Math.floor(Math.log10(t)+1e-9))}function ne(e){return H(e)||!!e.compactSymbols||(e.notation??`standard`)!==`standard`}function re(e,t,n){if(typeof t==`function`)return t;let r=t??{};if(ne(r))return z(r,n);let i=te(e);r.style===`percent`&&(i=Math.max(0,i-2));let a=z({...r,minimumFractionDigits:i,maximumFractionDigits:i},n),o=Math.abs(e)*1e-9;return e=>a(Math.abs(e)<o?0:e)}function ie(e,t){if(typeof e==`function`)return t=>e(typeof t==`number`?new Date(t):t);let n=L(t,e);return e=>n.format(e)}let ae=Math.sqrt(50),oe=Math.sqrt(10),se=Math.sqrt(2);function ce(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=ae?10:a>=oe?5:a>=se?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&n>=.5&&n<2?ce(e,t,n*2):[s,c,l]}function le(e,t,n=5){if(!(n>0)||!Number.isFinite(e)||!Number.isFinite(t))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?ce(t,e,n):ce(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);for(let e=0;e<s;e++){let t=r?a-e:i+e;c[e]=o<0?t/-o:t*o}return c}function ue(e,t,n){return ce(e,t,n)[2]}function de(e,t,n=5){let r=t<e,i=r?ue(t,e,n):ue(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function fe(e,t,n=5){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t||!(n>0))return[e,t];let r=t<e,i=r?t:e,a=r?e:t,o;for(let e=0;e<10;e++){let e=ue(i,a,n);if(e===o)return r?[a,i]:[i,a];if(e>0)i=Math.floor(i/e)*e,a=Math.ceil(a/e)*e;else if(e<0)i=Math.ceil(i*e)/e,a=Math.floor(a*e)/e;else break;o=e}return[e,t]}function pe(e,t={}){let{count:n=5,format:r,locale:i}=t,[a,o]=e.domain,s=re(de(a,o,n),r,i);return e.ticks(n).map(t=>({value:t,position:e(t),label:s(t)}))}function me(e,t=String){return e.domain.map((n,r)=>({value:n,position:e.at(r)+e.bandwidth/2,label:t(n,r)}))}let he=e=>e===`top`||e===`bottom`;function ge(e,t,n,r=8){if(e.length<2)return e.slice();let i=e.map(e=>he(t)?a(e.label,n):n*c),o=(t,n)=>Math.abs(e[n].position-e[t].position)>=(i[t]+i[n])/2+r,s=e.length-1,l=Math.abs(e[s].position-e[0].position),u=i.reduce((e,t)=>e+t+r,0),d=l>0?Math.max(1,Math.floor(u/l)):s;for(let t=d;t<=s;t++){let n=!0;for(let e=t;e<=s&&n;e+=t)n=o(e-t,e);if(!n)continue;let r=[];for(let e=0;e<=s;e+=t)r.push(e);let i=r[r.length-1];return i!==s&&(o(i,s)?r.push(s):r.length>1&&o(r[r.length-2],s)&&(r[r.length-1]=s)),r.map(t=>e[t])}return e.slice(0,1)}function W(e,t,n,r={}){let{tickSize:i=0,tickPadding:o=8}=r;if(t.length===0)return 0;let s=he(e)?n*c:t.reduce((e,t)=>Math.max(e,a(t.label,n)),0)+3;return Math.ceil(s+i+o)}function _e(e){let{position:t,ticks:n,area:r,tickSize:i=0,tickPadding:a=8,line:o=!1}=e,c=he(t),l=t===`top`||t===`left`?-1:1,u=l*(i+a),d=t===`top`?r.y:t===`bottom`?r.y+r.height:t===`left`?r.x:r.x+r.width,f=c?{y:u,dy:t===`top`?`0em`:`0.71em`,"text-anchor":`middle`}:{x:u,dy:`0.32em`,"text-anchor":t===`left`?`end`:`start`},p=c?{y2:l*i}:{x2:l*i};return D(`g`,{key:`axis-${t}`,class:[`tc-axis`,c?`tc-axis-x`:`tc-axis-y`,`tc-axis-${t}`],"aria-hidden":`true`},o&&D(`line`,c?{class:`tc-axis-line`,x1:r.x,x2:r.x+r.width,y1:d,y2:d}:{class:`tc-axis-line`,x1:d,x2:d,y1:r.y,y2:r.y+r.height}),n.map(e=>D(`g`,{key:e.value,class:`tc-tick`,style:c?`transform:translate(${s(e.position)}px,${s(d)}px)`:`transform:translate(${s(d)}px,${s(e.position)}px)`},i>0&&D(`line`,{class:`tc-tick-line`,...p}),D(`text`,{class:`tc-tick-label`,...f},e.label))))}function ve(e){let{direction:t,ticks:n,area:r}=e;return D(`g`,{key:`grid-${t}`,class:[`tc-grid`,`tc-grid-${t}`],"aria-hidden":`true`},n.map(e=>{let n=s(e.position);return D(`line`,{key:e.value,class:[`tc-grid-line`,e.value===0&&`tc-grid-line-zero`],...t===`y`?{x1:r.x,x2:r.x+r.width,y1:0,y2:0,style:`transform:translateY(${n}px)`}:{x1:0,x2:0,y1:r.y,y2:r.y+r.height,style:`transform:translateX(${n}px)`}})}))}function ye(e,t,n={}){let{paddingInner:r=0,paddingOuter:i=0,align:a=.5}=n,o=Math.min(1,Math.max(0,r)),s=e.length,[c,l]=t,u=l<c,d=u?l:c,f=u?c:l,p=(f-d)/Math.max(1,s-o+i*2),m=d+(f-d-p*(s-o))*a,h=p*(1-o),g=/* @__PURE__ */ new Map;for(let t=0;t<s;t++){let n=e[t];g.has(n)||g.set(n,t)}let _=e=>m+p*(u?s-1-e:e),v=e=>{let t=g.get(e);return t===void 0?void 0:_(t)};return Object.assign(v,{domain:e.slice(),range:[c,l],bandwidth:h,step:p,at:_,center(e){let t=v(e);return t===void 0?void 0:t+h/2},indexAt(e){if(s===0)return-1;let t=p===0?0:Math.round((e-m-h/2)/p),n=Math.min(s-1,Math.max(0,t));return u?s-1-n:n}})}function be(e,t,n={}){let{padding:r=0,align:i}=n;return ye(e,t,{paddingInner:1,paddingOuter:r,...i===void 0?{}:{align:i}})}function xe(e){let t=1/0,n=-1/0;for(let r of e)r!=null&&Number.isFinite(r)&&(r<t&&(t=r),r>n&&(n=r));return t<=n?[t,n]:void 0}function Se(e,t,n={}){let[r,i]=e,[a,o]=t,s=i-r,c=s===0?0:(o-a)/s,l=(a+o)/2,{clamp:u=!1}=n,d=Math.min(a,o),f=Math.max(a,o),p=Math.min(r,i),m=Math.max(r,i);return Object.assign(e=>{if(s===0)return l;let t=a+(e-r)*c;return u?Math.min(f,Math.max(d,t)):t},{domain:[r,i],range:[a,o],invert(e){if(s===0||o===a)return r;let t=r+(e-a)/c;return u?Math.min(m,Math.max(p,t)):t},ticks(e){return le(r,i,e)},nice(e){return Se(fe(r,i,e),t,n)}})}let G=e=>typeof e==`number`&&Math.abs(e)<=1e300?Math.abs(e)<1e-300?0:e:null,Ce=e=>G(e)??void 0,we=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Te=e=>Array.isArray(e)?e:[],Ee=e=>typeof e==`string`?e:G(e)===null?``:String(e),De=e=>typeof e==`string`||G(e instanceof Date?+e:e)!==null?e:``,Oe=e=>{let t=Te(e);return t.every(e=>e==null||G(e)===e)?t:t.map(G)},ke=(e,t)=>Te(e).filter(we).map(t),Ae=e=>({...e,name:Ee(e.name),id:typeof e.id==`string`?e.id:void 0,color:typeof e.color==`string`?e.color:void 0}),je=e=>{let t=we(e)?e:{};return{...t,labels:Array.isArray(t.labels)?t.labels.map(De):void 0,series:ke(t.series,e=>({...Ae(e),values:Oe(e.values)}))}},K=e=>t=>({...t,data:e(t.data)}),Me=e=>ke(e,e=>({...Ae(e),value:G(e.value)??0,max:Ce(e.max)})),q=e=>e.id??e.name;function Ne(e){return e.map((e,t)=>{let n={key:q(e),name:e.name,index:t};return e.color&&(n.color=e.color),e.hidden&&(n.hidden=!0),n})}function Pe(e,t){return{key:q(e),class:[`tc-series`,`tc-series-${t+1}`,e.class],"data-series":e.name,style:{"--tc-series-color":e.color}}}let J=e=>e instanceof Date?e.getTime():e,Y=q,Fe=e=>Ne(e.series);function Ie(e){if(e.labels)return e.labels.slice();let t=Math.max(0,...e.series.map(e=>e.values.length));return Array.from({length:t},(e,t)=>t+1)}function Le(e,t){return e==null||!Number.isFinite(e)?!1:t?.scale!==`log`||e>0}let Re=e=>e.x?.type===`time`&&Ie(e.data).every(e=>Number.isFinite(Be(e)));function ze(e,t){return e.x?.format?e.x.format:Re(e)?E(`dates`)(Ie(e.data),e.x?.utc,t.locale):e=>String(e)}let Be=e=>new Date(e).getTime();function Ve(e,t,n){return n.scale===`log`?E(`log`).scale(e,t):Se(e,t)}function He(e,t,n,r,i){return t.scale===`log`?E(`log`).ticks(e,n,r,i):pe(e,{count:n,format:r,locale:i})}let Ue=e=>{let{shapes:t,patterns:n}=e;return t??n===!0?S[`point-shapes`]:void 0},We=(e,t)=>Math.min(G(e?.ticks)??t,100);function Ge(e,t,n,r,i=/* @__PURE__ */ new Set,a,o=[]){let s=a??e.series.filter(e=>!i.has(Y(e))).flatMap(e=>e.values);return Ke(o.length?[...s,...o]:s,t,n,r)}function Ke(e,t,n,r){if(t.scale===`log`)return E(`log`).domain(e,t);let i=G(t.min),a=G(t.max),[o,s]=xe(e)??[0,1];if((t.zero??n)&&(o=Math.min(o,0),s=Math.max(s,0)),o===s){if(o===0)s=1;else{let e=Math.abs(o)*.1;o-=e,s+=e}}if(i!==null&&(o=i),a!==null&&(s=a),t.nice!==!1){let[e,t]=fe(o,s,r);i===null&&(o=e),a===null&&(s=t)}return[o,s]}function qe(e){return e.annotations?.length?E(`annotations`):void 0}function Je(e,t,n,r){let i=e.y??{},a=We(i,Math.max(2,r)),o=Ge(e.data,i,n.zero,a,t.hidden,n.values,qe(e)?.values(e.annotations)),s=n.tickFormat??i.format,c=e=>Ve(o,e,i),l=e=>He(e,i,a,s,t.locale);return{scale:c,ticks:l,probe:l(c([0,1]))}}function Ye(e,t,n,r,i,a){let{area:o,x:s,y:c,xTicks:l,yTicks:u,horizontal:d}=r,f=e.x??{},p=qe(e)?.layers(e.annotations,{area:o,horizontal:d,fontSize:t.fontSize,value:c,band:s,keys:i,time:a}),m=e.y?.show!==!1&&[_e({position:d?`bottom`:`left`,ticks:u,area:o})],h=(f.show!==!1&&r.labels.length>0||f.line)&&[_e({position:d?`left`:`bottom`,ticks:l,area:o,line:f.line===!0})],g=e=>e.flatMap(e=>e||[]);return{...r,background:g([e.y?.grid!==!1&&ve({direction:d?`x`:`y`,ticks:u,area:o}),f.grid&&ve({direction:d?`y`:`x`,ticks:l,area:o}),p?.under]),foreground:g([p?.over,d?h:m,d?m:h]),clip:Ze(t,o,n)}}function Xe(e,r,i){let{data:o}=e,s=e.y??{},l=e.x??{},{fontSize:u,locale:d,width:f,height:p}=r,m=i.overhang??0,h=t(e.padding),g=Ie(o),_=ze(e,r),v=s.show!==!1,y=l.show!==!1&&g.length>0,b=Re(e)&&i.scale===`point`,x=Je(e,r,i,Math.round(p/60)),S=x.probe,C=Math.max(2,Math.round(f/80)),w=g.map(J),T=e=>_(g[e],e),D=b?E(`time`).axis(g,w,l,C,d):{edges:g.length?[T(0),T(g.length-1)]:[],scale:e=>i.scale===`point`?be(w,e):ye(w,e,{paddingInner:i.paddingInner??.3,paddingOuter:i.paddingOuter??.15}),ticks:e=>me(e,(e,t)=>T(t))},O=D.edges,k=Math.ceil(u*c/2),A=y?a(O[0]??``,u):0,j=y?a(O[O.length-1]??``,u):0,M=i.scale===`point`,N=v?W(`left`,S,u):0,P=e=>{let t=t=>M?Math.ceil(t/2):Math.max(0,Math.ceil(t/2-e));return{right:h.right+Math.max(t(j),m,8),left:h.left+Math.max(N,t(A),m,v?0:8)}},F=Math.max(1,g.length)*2,I=P((f-h.left-h.right-N)/F);M||(I=P((f-I.left-I.right)/F));let L=n(f,p,{top:h.top+Math.max(v?k:0,m,4),bottom:h.bottom+Math.max(y?W(`bottom`,[S[0]],u):v?k:0,m,4),...I}),R=D.scale([L.x,L.x+L.width]),z=x.scale([L.y+L.height,L.y]),B=ge(x.ticks(z),`left`,u,4);return Ye(e,r,m,{area:L,labels:g,x:R,y:z,horizontal:!1,xTicks:y?ge(D.ticks(R),`bottom`,u):[],yTicks:B},w,D.time)}function Ze(e,t,n){let r=`${e.id}-clip`,i=n+1;return{def:D(`clipPath`,{id:r},D(`rect`,{x:t.x-i,y:t.y-i,width:t.width+i*2,height:t.height+i*2})),url:`url(#${r})`}}function Qe(e,t){let{dash:n,width:r}=e;return{...Pe(e,t),style:{"--tc-series-color":e.color,"--tc-series-dash":Number.isFinite(n)?`${n}px`:n,"--tc-series-width":Number.isFinite(r)?`${r}px`:void 0}}}function $e(e,t,n,r,i){let{area:a,x:o,labels:s,horizontal:c}=e,{data:l}=t,u=ze(t,n),d=U(t.y?.format,n.locale),f=e=>{let i=o.at(e),f=i+o.bandwidth/2,p=s[e],m=c?{x:a.x,y:f}:{x:f,y:null},h=[];l.series.forEach((i,a)=>{if(n.hidden.has(Y(i)))return;let o=i.values[e],s=Le(o,t.y)?o:null,c=s===null?m:r(a,e,s),l={name:i.name,seriesIndex:a,value:s,text:s===null?`–`:d(s),...c};i.color&&(l.color=i.color),h.push(l)});let g={index:e,label:J(p),title:u(p,e),x:c?a.x+a.width/2:f,area:a,items:h};return c&&(g.y=f,g.axis=`y`),o.bandwidth>0&&(g.band=c?{x:a.x,y:i,width:a.width,height:o.bandwidth}:{x:i,y:a.y,width:o.bandwidth,height:a.height}),g};return{count:s.length,hitTest(e,t){if(s.length===0||e<a.x-8||e>a.x+a.width+8||t<a.y-8||t>a.y+a.height+8)return null;let n=o.indexAt(c?t:e),r=f(n),l=i?.(e,t,n);return l!==void 0&&(r.seriesIndex=l),r},hitIndex(e,t){if(e<0||e>=s.length)return null;let n=f(e);return t!==void 0&&n.items.some(e=>e.seriesIndex===t)&&(n.seriesIndex=t),n}}}function et(e,t,n=1/0){let r=Ie(e.data),i=r.length>n?r.slice(0,n):r,a=ze(e,t),o=U(e.y?.format,t.locale),s=e.data.series.filter(e=>!t.hidden.has(Y(e)));return{columns:[``,...s.map(e=>e.name)],total:r.length,rows:i.map((e,t)=>[a(e,t),...s.map(e=>{let n=e.values[t];return n==null||!Number.isFinite(n)?`–`:o(n)})])}}function tt(e,t){if(e.time){let n=e.time(new Date(Be(t)));return Number.isFinite(n)?[n,n]:void 0}let n=e.keys.indexOf(J(t));return n<0?void 0:[e.band.at(n),e.band.at(n)+e.band.bandwidth]}let nt=(e,t)=>{if(!Array.isArray(e))return t(e);let n=e.map(t);return n.length===2&&!n.includes(null)?n:null},rt=e=>e===void 0?e:ke(e,e=>({...e,y:e.y===void 0?e.y:nt(e.y,G),x:e.x===void 0?e.x:nt(e.x,De),label:e.label==null?void 0:Ee(e.label),color:typeof e.color==`string`?e.color:void 0})).filter(e=>e.y!==null&&e.x!==null&&(e.x??e.y)!==void 0),it=e=>Array.isArray(e);function at(e){let t=[];for(let n of rt(e)??[])if(n.y!==void 0)for(let e of it(n.y)?n.y:[n.y])Number.isFinite(e)&&t.push(e);return t}function ot(e,t){if(e=rt(e),!e?.length)return{under:null,over:null};let{area:n,horizontal:r,fontSize:i}=t,o=[],c=[],l=n.x,u=n.x+n.width,d=n.y,f=n.y+n.height,p=(e,t,n)=>e>=t-.5&&e<=n+.5,m=e.map(e=>{let n,i;if(e.y!==void 0){let[a,o]=it(e.y)?e.y:[e.y,e.y];if(!Number.isFinite(a)||!Number.isFinite(o))return;n=[t.value(a),t.value(o)],i=r}else if(e.x!==void 0){let[a,o]=it(e.x)?e.x:[e.x,e.x],s=tt(t,a),c=tt(t,o);if(!s||!c)return;n=it(e.x)?[Math.min(s[0],c[0]),Math.max(s[1],c[1])]:[(s[0]+s[1])/2,(s[0]+s[1])/2],i=!r}else return;let a=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]),[s,c]=i?[l,u]:[d,f];if(p(a,s,c)||p(o,s,c)||a<s&&o>c)return{a0:Math.max(a,s),a1:Math.min(o,c),vertical:i}}),h=[],g=[];m.forEach((e,t)=>{if(!e||e.a1-e.a0>.5)return;let n=e.a0;g.push([t,e.vertical?[n-1.5,d,n+1.5,f]:[l,n-1.5,u,n+1.5]])});let _=(e,[t,n,r,i])=>e[2]<=t||e[0]>=r||e[3]<=n||e[1]>=i,v=e=>h.every(t=>_(e,t)),y=(e,t)=>v(e)&&g.every(([n,r])=>n===t||_(e,r));return e.forEach((e,t)=>{let n=e.id??t,r=t=>({key:t?`${n}-${t}`:n,class:[`tc-annotation`,e.y===void 0?`tc-annotation-x`:`tc-annotation-y`,e.class],style:{"--tc-annotation-color":e.color}}),p=e.position!==`start`,g=m[t];if(!g)return;let{a0:_,a1:b,vertical:x}=g,S;if(e.label){let n=a(e.label,i*.92),r=b-_<=.5,o=[];if(x){let e=_+4,t=r?_-4-n:Math.max(l,b-4-n),a=e+n<=u?[e,t]:[t,e],s=p?d+i:f-4,c=(p?1:-1)*i*1.2;for(let e of a)if(!(e<l||e+n>u))for(let t=0;t<3;t++)o.push([e,s+t*c]);o.length||o.push([Math.max(l+4,a[0]),s])}else{let e=p?u-4-n:l+4,t=p?l+4:u-4-n;for(let n of[e,t])r?o.push([n,_-4],[n,_+i]):o.push([n,_+i],[n,b-4])}let c=([e,t])=>[e,t-i,e+n,t+i*.25],m=o.find(e=>y(c(e),t))??o.find(e=>v(c(e)))??o[0];h.push(c(m)),S=D(`text`,{class:`tc-annotation-label`,x:s(m[0]),y:s(m[1])},e.label)}if(b-_>.5){let e=x?`M${s(_)},${s(d)}H${s(b)}V${s(f)}H${s(_)}Z`:`M${s(l)},${s(_)}H${s(u)}V${s(b)}H${s(l)}Z`;o.push(D(`g`,r(),D(`path`,{class:`tc-annotation-band`,d:e}))),S&&c.push(D(`g`,r(`label`),S));return}let C=s(_);c.push(D(`g`,r(),D(`line`,x?{class:`tc-annotation-line`,x1:C,x2:C,y1:s(d),y2:s(f)}:{class:`tc-annotation-line`,x1:s(l),x2:s(u),y1:C,y2:C}),S))}),{under:o.length?D(`g`,{key:`annotations-under`,class:`tc-annotations`,"aria-hidden":`true`},o):null,over:c.length?D(`g`,{key:`annotations-over`,class:`tc-annotations`,"aria-hidden":`true`},c):null}}function st(e,t,n){let r=e[0],i=e[e.length-1],a=r!==void 0&&i!==void 0?Math.abs(Be(i)-Be(r)):0,o=ie({year:`numeric`,month:`short`,day:`numeric`,...a>0&&a<2592e5?{hour:`numeric`,minute:`2-digit`}:{},...t?{timeZone:`UTC`}:{}},n);return e=>Number.isFinite(Be(e))?o(Be(e)):String(e)}function ct(e,t,n={}){let r=n.base&&n.base>1?n.base:10,i=n.clamp===!0,a=e[0]<0||e[1]<0?-1:1,o=e=>Math.max(Number.MIN_VALUE,e*a),s=Math.log(r),c=r===10?Math.log10:r===2?Math.log2:e=>Math.log(e)/s,l=e=>c(o(e)),u=e=>a*r**e,d=l(e[0]),f=l(e[1]),[p,m]=t,h=f-d,g=h===0?0:(m-p)/h,_=Math.min(p,m),v=Math.max(p,m);return Object.assign(e=>{if(h===0)return(p+m)/2;let t=p+(l(e)-d)*g;return i?Math.min(v,Math.max(_,t)):t},{domain:[e[0],e[1]],range:[p,m],invert(t){return h===0||m===p?e[0]:u(d+(t-p)/g)},ticks(e=5){let t=Math.min(d,f),n=Math.max(d,f);if(!Number.isFinite(t)||!Number.isFinite(n))return[];let i=Math.floor(t),o=Math.ceil(n),s=o-i,c=e=>{let r=l(e);return r>=t-1e-9&&r<=n+1e-9},u=[];if(s<=e&&Number.isInteger(r)){let t=e=>{let t=[];for(let n=i;n<=o;n++)for(let i=1;i<r;i++){let o=a*i*r**n;e(i)&&c(o)&&t.push(o)}return t};u=t(()=>!0),u.length>e*2&&(u=t(e=>e===1||e===2||e===5)),u.length>e*2&&(u=t(e=>e===1))}else{let i=Math.max(1,Math.ceil(s/Math.max(1,e)));for(let e=Math.ceil(t/i)*i;e<=n+1e-9;e+=i){let t=a*r**e;c(t)&&u.push(t)}}return f<d?u.reverse():u},nice(){let e=u(Math.floor(Math.min(d,f))),r=u(Math.ceil(Math.max(d,f)));return ct(f<d?[r,e]:[e,r],t,n)}})}function lt(e,t){let[n,r]=xe(e.filter(e=>e!=null&&e>0&&Number.isFinite(e)))??[1,10],i=G(t.min),a=G(t.max);if(i!==null&&i>0&&(n=i),a!==null&&a>0&&(r=a),n===r&&(r=n*10),t.nice!==!1){let e=ct([n,r],[0,1]).nice().domain;i===null&&(n=e[0]),a===null&&(r=e[1])}return[n,r]}function ut(e,t,n,r){let i=z(n,r);return e.ticks(t).map(t=>({value:t,position:e(t),label:i(t)}))}function dt(e){return e?`${e.index}:${e.seriesIndex??``}`:``}function ft(e,t,n,r,i){let a=e.getBoundingClientRect(),o=a.width>0?r/a.width:1,s=a.height>0?i/a.height:1;return{x:(t-a.left)*o,y:(n-a.top)*s}}function pt(e,t){return D(`div`,{class:`tc-legend-items`},e.map(e=>{let n=t.has(e.key);return D(`button`,{key:e.key,type:`button`,class:[`tc-legend-item`,`tc-series`,`tc-series-${e.index+1}`,n&&`tc-legend-item-hidden`],style:{"--tc-series-color":e.color},"aria-pressed":n?`false`:`true`,"data-key":e.key},D(`span`,{class:`tc-legend-swatch`,"aria-hidden":`true`}),D(`span`,{class:`tc-legend-name`},e.name))}))}function mt(e){return new Set(e.filter(e=>e.hidden).map(e=>e.key))}let ht=/^[a-zA-Z_][\w:.-]*$/,gt=/^on/i;function _t(e){return ht.test(e)}function vt(e){return ht.test(e)&&!gt.test(e)}let yt=`http://www.w3.org/2000/svg`,bt=`http://www.w3.org/1999/xhtml`,X=/* @__PURE__ */ new WeakMap,xt=/* @__PURE__ */ new WeakMap;function Z(e,t,n){let r=xt.get(e)??(n?.parentNode===e?n:void 0);if(t===null||!_t(t.tag))return r&&(r.remove(),xt.delete(e)),null;if(r&&Dt(r,t))return kt(r,t),xt.set(e,r),r;if(r&&S.hydrate?.(r,t,St(e,t.tag)))return xt.set(e,r),r;let i=Et(t,St(e,t.tag),e.ownerDocument);return r?r.replaceWith(i):e.appendChild(i),xt.set(e,i),i}function St(e,t){return t===`svg`||e.namespaceURI===`http://www.w3.org/2000/svg`&&e.localName!==`foreignObject`?yt:bt}function Ct(e){return e.namespaceURI===`http://www.w3.org/2000/svg`&&e.localName!==`foreignObject`?yt:bt}function wt(e,t,n){if(typeof e==`string`){let t=n.createTextNode(e);return X.set(t,e),t}return _t(e.tag)?Et(e,e.tag===`svg`?yt:t,n):null}function Tt(e,t,n){t===`style`?e.style.cssText=n:e.setAttribute(t,n)}function Et(e,t,n){let r=n.createElementNS(t,e.tag),{attrs:i}=e;for(let e in i)vt(e)&&Tt(r,e,String(i[e]));let a=Ct(r);for(let t of e.children){let e=wt(t,a,n);e&&r.appendChild(e)}return X.set(r,e),r}function Dt(e,t){let n=X.get(e);return n===void 0?!1:typeof t==`string`?typeof n==`string`:typeof n!=`string`&&n.tag===t.tag&&n.key===t.key}function Ot(e,t){if(typeof t==`string`){X.get(e)!==t&&(e.data=t,X.set(e,t));return}kt(e,t)}function kt(e,t){let n=X.get(e);n!==t&&(At(e,n.attrs,S.sweep?.(e,n,t)??t.attrs,!0),jt(e,t.children),X.set(e,t))}function At(e,t,n,r=!1){for(let i in n){let a=n[i];t[i]!==a&&vt(i)&&(r&&i===`d`&&S.morph?.(e,String(t[i]??``),String(a))||Tt(e,i,String(a)))}for(let r in t)!(r in n)&&vt(r)&&e.removeAttribute(r)}function jt(e,t){if(t.length===0&&e.firstChild===null)return;let n=Array.from(e.childNodes),r=/* @__PURE__ */ new Map,i=[];for(let e of n){let t=X.get(e);t!==void 0&&(typeof t!=`string`&&t.key!==void 0?r.set(t.key,e):i.push(e))}let a=Array(t.length),o=/* @__PURE__ */ new Set,s=0;for(let e=0;e<t.length;e++){let n=t[e],c;typeof n!=`string`&&n.key!==void 0?c=r.get(n.key):s<i.length&&(c=i[s]),c&&!o.has(c)&&Dt(c,n)&&(a[e]=c,o.add(c),c===i[s]&&s++)}for(let t of n)o.has(t)||e.removeChild(t);let c=Ct(e),l=e.ownerDocument,u=null;for(let n=t.length-1;n>=0;n--){let r=t[n],i=a[n];if(i)Ot(i,r);else if(i=wt(r,c,l)??void 0,!i)continue;(i.parentNode!==e||i.nextSibling!==u)&&e.insertBefore(i,u),u=i}}let Mt=/* @__PURE__ */ new Set([`a`,`b`,`button`,`caption`,`div`,`em`,`i`,`label`,`li`,`ol`,`p`,`section`,`small`,`span`,`strong`,`table`,`tbody`,`td`,`th`,`thead`,`tr`,`ul`]),Nt=/* @__PURE__ */ new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`source`,`track`,`wbr`]);function Pt(e,t={}){return typeof e==`string`?Ht(e):Ft(t.xmlns!==!1&&e.tag===`svg`&&e.attrs.xmlns===void 0?{...e,attrs:{xmlns:`http://www.w3.org/2000/svg`,...e.attrs}}:e,t.namespace?t.namespace===`svg`:!Mt.has(e.tag))}function Ft(e,t){let{tag:n,attrs:r,children:i}=e;if(!_t(n))return``;let a=t||n===`svg`,o=`<${n}`;for(let e in r)vt(e)&&(o+=` ${e}="${Ut(String(r[e]))}"`);if(i.length===0){if(a)return`${o}/>`;if(Nt.has(n.toLowerCase()))return`${o}>`}o+=`>`;let s=a&&n!==`foreignObject`;for(let e of i)o+=typeof e==`string`?Ht(e):Ft(e,s);return`${o}</${n}>`}let It=/[&<>]/,Lt=/[&"<>]/,Rt=/[&<>]/g,zt=/[&"<>]/g,Bt={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`},Vt=e=>Bt[e];function Ht(e){return It.test(e)?e.replace(Rt,Vt):e}function Ut(e){return Lt.test(e)?e.replace(zt,Vt):e}let Wt=/* @__PURE__ */ new WeakMap,Gt=/* @__PURE__ */ new WeakSet,Kt;function qt(){return Kt||typeof ResizeObserver!=`function`||(Kt=new ResizeObserver(e=>{for(let{target:t,contentRect:n}of e)t.isConnected?(Gt.add(t),Wt.get(t)?.(n.width,n.height)):Gt.has(t)&&(Gt.delete(t),Kt?.unobserve(t))})),Kt}function Jt(e,t){let n=qt();return n?(Wt.set(e,t),n.observe(e),()=>{Wt.get(e)===t&&(Wt.delete(e),n.unobserve(e))}):()=>{}}let Yt=/* @__PURE__ */ new Map,Xt=!1,Zt=e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):queueMicrotask(e)};function Qt(e){try{e()}catch(e){setTimeout(()=>{throw e})}}function $t(e,t){Yt.set(e,t),Xt||(Xt=!0,Zt(nn))}let en={};function tn(e){Yt.delete(e)}function nn(){Xt=!1;let e=0,t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Map;do{for(let[r,i]of Yt)Yt.delete(r),t.has(r)?n.set(r,i):(t.add(r),Qt(i),e++);e+=en.idle?.()??0}while(Yt.size>0);for(let[e,t]of n)$t(e,t);return e}let rn=0,an=()=>`tc-${++rn}`;function on(e,t){let n=t?.width??0,r=Math.max(0,Math.round(Number.isFinite(e.width)?e.width:n>0?n:600)),i=e.aspectRatio&&e.aspectRatio>0?e.aspectRatio:2,a=Number.isFinite(e.height)?e.height:e.height===`container`&&(t?.height??0)>0?t?.height:r/i;return{width:r,height:Math.max(0,Math.round(a))}}function sn(e,t,n,r,i,a){let o,s=cn(e,t,n,e=>{o=e,r(e)},i,a),c=e.type.render(e,s);return S.post?S.post(e,c,o,s):c}function cn(e,t,n,r,i,a){return{width:t.width,height:t.height,fontSize:e.fontSize??a??12,locale:e.locale,id:n,onHitTest:r,hidden:i}}function ln(e){let t={...e.type?.clean?e.type.clean(e):e};for(let e in t)typeof t[e]==`number`&&!Number.isFinite(t[e])&&delete t[e];return t}function un(e){if(!e.type||typeof e.type.render!=`function`)throw TypeError("@tabler/charts: `type` must be a chart type such as line.")}function dn(e){let t=e.type.legend?.(e)??[],n=e.legend;return{items:t,show:n===void 0?t.length>=2:n!==!1&&t.length>0,position:typeof n==`object`&&n.position===`bottom`?`bottom`:`top`}}function fn(e){if(e.title)return e.title;let t=(e.type.legend?.(e)??[]).map(e=>e.name).filter(Boolean),n=t.slice(0,6).join(`, `);return`${e.type.name} chart${t.length?`: ${n}${t.length>6?`, …`:``}`:``}`}let pn=e=>Array.isArray(e)?e.reduce((e,t)=>e+pn(t),0):e&&typeof e==`object`?1+pn(e.children):0,mn=(e,t)=>e.animate===!1||e.animate!==!0&&pn(t)>1e3;function hn(e,t,n,r,i,a,o,s){let{width:c,height:l}=t,u=e.description?`${n}-desc`:void 0,{patterns:d}=e,f=d===!1?void 0:(d===!0?E(`patterns`):S.patterns)?.(e,n);return D(`svg`,{class:[`tc-chart`,`tc-chart-${e.type.name}`,r&&`tc-static`,f?.[0],e.class],style:f?.[1],viewBox:`0 0 ${c} ${l}`,width:c,height:l,role:`img`,"aria-label":fn(e),"aria-describedby":u,...s},u&&D(`desc`,{key:`desc`,id:u},e.description),f?.[2],a&&D(`g`,{key:`hover-under`,class:`tc-hover-layer`},a),i,o&&D(`g`,{key:`hover-over`,class:`tc-hover-layer`},o))}function gn(e,t,n=e.id??`tc`,r=()=>{}){un(e),e=ln(e);let i=mt(dn(e).items),a=sn(e,t,n,r,i),o=e;return hn(o,t,n,mn(o,a),a)}function _n(e,t){return Pt(gn(e,t))}let vn=[`hover`,`click`,`legend-toggle`,`render`],yn=/* @__PURE__ */ new WeakMap;var bn=class{element;id;#e;#t=(e,t)=>{let n=this.#e.height===`container`,r=e!==this.#n.width||n&&t!==this.#n.height;this.#n={width:e,height:t},r&&(e||t)&&(this.#h=void 0,this.#x(),this.#S())};#n={};#r=/* @__PURE__ */ new Map;#i;#a=[];#o=!1;#s;#c;#l=``;#u=null;#d;#f;#p=/* @__PURE__ */ new Map;#m;#h;constructor(e,t,n=[]){let r=typeof e==`string`?document.querySelector(e):e;if(!r)throw Error(`@tabler/charts: element "${String(e)}" not found.`);yn.get(r)?.destroy(),yn.set(r,this),this.element=r,this.#e=ln(t),this.id=t.id??an(),this.#m=r.querySelector(`:scope > svg.tc-chart`),this.#w(),this.#i=Jt(r,this.#t);try{for(let e of[...n,...t.plugins??[]])this.#a.push(e.install(this));this.render()}catch(e){throw this.destroy(),e}}get config(){return this.#e}get size(){let e=this.#n;if(this.#e.height===`container`&&e.height){let t=0;for(let e of this.#a)t+=e.reservedHeight?.()??0;t&&(e={...e,height:e.height-t})}return on(this.#e,e)}get fontSize(){return this.#d?.fontSize??this.#e.fontSize??12}get interaction(){return this.#s}get active(){return this.#u}get pointer(){let e=this.#c;return this.#u&&e?.kind===`pointer`?{x:e.x,y:e.y}:void 0}get highlightSource(){return this.#u?this.#c?.kind:void 0}highlightIndex(e,t){let n=this.#s?.hitIndex(e,t)??null;return n?(this.#c={kind:`index`,index:e,seriesIndex:t},this.#y(n),n):null}highlightAt(e,t,n){let r=this.hitTest(e,t);return this.#c={kind:`pointer`,x:e,y:t},this.#y(r,n),r}clearHighlight(e){this.#c=void 0,this.#y(null,e)}toggleSeries(e,t){let{items:n}=dn(this.#e),r=typeof e==`number`?n.find(t=>t.index===e):n.find(t=>t.key===e)??n.find(t=>t.name===e);if(!r)return this;let i=t??!this.#b(n).has(r.key);return this.#p.set(r.key,i),this.emit(`legend-toggle`,{key:r.key,name:r.name,index:r.index,hidden:i}),this.#S(),this}isHidden(e){return this.#b(dn(this.#e).items).has(e)}update(e){this.#e=ln({...this.#e,...e});for(let t in e)t!==`data`&&(this.#h=void 0);return this.#S(),this}setConfig(e){return this.#e=ln(e),this.#h=void 0,this.#S(),this}setData(e){return this.update({data:e})}resize(){return this.#o||(this.#i=Jt(this.element,this.#t)),this.#w(),this.#h=void 0,this.#S(),this}render(){if(this.#o)return this;tn(this);let e=this.#e,t=e;un(t);let n=dn(e),r=this.#b(n.items);for(let e of this.#a)e.beforeRender?.({config:t,legend:n,hidden:r});let i=this.size,{content:a,stale:o,changed:s}=this.#g(i,r);o&&this.#_();let c=this.#m;Z(this.element,this.#v(a,i),c),this.#m=null,c&&this.#x();for(let e of this.#a)e.afterRender?.({config:t,legend:n,hidden:r,size:i,stale:o,changed:s});return o&&this.emit(`render`,{size:i}),this}#g(e,t){let n=this.#e,r=[...t].sort().join(`\0`);this.#h??=n.fontSize??this.#C();let i=n.fontSize??this.#h,a=this.#d,o=!a||a.cfg!==n||a.hidden!==r,s=o||a?.width!==e.width||a.height!==e.height||a.fontSize!==i;if(!a||s){this.#s=void 0;let o=sn(n,e,this.id,e=>{this.#s=e},t,i);a={cfg:n,width:e.width,height:e.height,hidden:r,fontSize:i,content:o,still:mn(n,o)},this.#d=a}return{content:a,stale:s,changed:o}}#_(){let e=this.#c;if(!e)return;let t=e.kind===`pointer`?this.hitTest(e.x,e.y):this.#s?.hitIndex(e.index,e.seriesIndex)??null;this.#y(t,void 0,!0,!1)}#v(e,t){let n=this.#e,r=this.#u,i=[],a=[],o;for(let e of this.#a){if(r&&e.layers){let t=e.layers(r,n);i.push(t.under),a.push(t.over)}let t=e.svgAttrs?.(n);t&&(o={...o,...t})}return hn(n,t,this.id,e.still,e.content,i.length?i:void 0,a.length?a:void 0,o)}hitTest(e,t){return this.#s?.hitTest(e,t)??null}on(e,t){let n=this.#r.get(e);return n||(n=/* @__PURE__ */ new Set,this.#r.set(e,n)),n.add(t),()=>{n.delete(t)}}destroy(){if(!this.#o){this.#o=!0,yn.get(this.element)===this&&yn.delete(this.element),tn(this),clearTimeout(this.#f),this.#i();for(let e of this.#a)e.destroy?.();this.#r.clear(),Z(this.element,null)}}#y(e,t,n=!1,r=!0){let i=dt(e);(n||i!==this.#l)&&(n&&i===``&&this.#l===``||(this.#l=i,this.#u=e,this.emit(`hover`,t?{hit:e,event:t}:{hit:e}),r&&this.#S()))}#b(e){let t=/* @__PURE__ */ new Set;for(let n of e)(this.#p.get(n.key)??n.hidden)&&t.add(n.key);return t}#x(){let e=this.element.querySelector(`:scope > svg.tc-chart`);e&&(e.setAttribute(`data-resizing`,``),clearTimeout(this.#f),this.#f=setTimeout(()=>e.removeAttribute(`data-resizing`),200))}#S(){this.#o||$t(this,()=>this.render())}#C(){if(typeof getComputedStyle!=`function`)return;let e=Number.parseFloat(getComputedStyle(this.element).getPropertyValue(`--tc-font-size`));return Number.isFinite(e)&&e>0?e:void 0}#w(){let e=this.element,t=typeof getComputedStyle==`function`?getComputedStyle(e):void 0,n=e=>Number.parseFloat(e??``)||0;this.#n={width:e.clientWidth-n(t?.paddingLeft)-n(t?.paddingRight),height:e.clientHeight-n(t?.paddingTop)-n(t?.paddingBottom)}}emit(e,t){let n=this.#r.get(e);if(n)for(let e of n)e(t)}};let xn=[`M-2,2L2,-2M0,8L8,0M6,10L10,6`,`M2,2h.01M6,6h.01`,`M-2,6L2,10M0,0L8,8M6,-2L10,2`,`M0,4H8`,`M0,8L8,0M0,0L8,8`,`M4,0V8`,`M0,4H8M4,0V8`,`M1,2H4M5,6H8`],Sn=xn.length,Cn=e=>e<Sn?[`${e+1}`,`tc-series-${e+1}`]:[`other`,``];function wn(e,t){let n=/* @__PURE__ */ new Map;for(let r of e){let[e,i]=Cn(r.index);n.has(e)||n.set(e,D(`pattern`,{key:e,id:`${t}-pattern-${e}`,class:[`tc-pattern`,`tc-series`,i],width:8,height:8,patternUnits:`userSpaceOnUse`,style:{"--tc-series-color":r.color}},D(`rect`,{class:`tc-pattern-bg`,width:8,height:8}),D(`path`,{class:`tc-pattern-ink`,d:xn[r.index%Sn]})))}return[...n.values()]}function Tn(e,t){let n={};for(let r of e){let[e]=Cn(r.index);n[`--tc-pattern-${e}`]=`url(#${t}-pattern-${e})`}return n}function En(e,t){let{items:n}=dn(e);if(n.length)return[e.patterns===!0?`tc-patterned`:`tc-patterns-auto`,Tn(n,t),D(`defs`,{key:`patterns`},wn(n,t))]}let Dn=[[],[-.9,-.9,.9,-.9,.9,.9,-.9,.9],[0,-1.3,1.2,.9,-1.2,.9],[0,-1.3,1.3,0,0,1.3,-1.3,0],[-1.2,-.9,1.2,-.9,0,1.3],[-.4,-1.2,.4,-1.2,.4,-.4,1.2,-.4,1.2,.4,.4,.4,.4,1.2,-.4,1.2,-.4,.4,-1.2,.4,-1.2,-.4,-.4,-.4],[-.7,-1.2,0,-.5,.7,-1.2,1.2,-.7,.5,0,1.2,.7,.7,1.2,0,.5,-.7,1.2,-1.2,.7,-.5,0,-1.2,-.7],[0,-1.4,.32,-.44,1.33,-.43,.52,.17,.82,1.13,0,.55,-.82,1.13,-.52,.17,-1.33,-.43,-.32,-.44]];function On(e,t,n,r){let i=Dn[e]??[];if(!i.length)return`M${s(t-r)},${s(n)}a${r},${r},0,1,0,${2*r},0a${r},${r},0,1,0,${-2*r},0Z`;let a=``;for(let e=0;e<i.length;e+=2)a+=`${e?`L`:`M`}${s(t+i[e]*r)},${s(n+i[e+1]*r)}`;return`${a}Z`}function kn(e,t){if(Array.isArray(e))return e.map(e=>kn(e,t));if(!e||typeof e!=`object`)return e;let{attrs:n}=e,r=String(n.class??``),i=/\btc-series-(\d+)\b/.exec(r);return e.tag===`circle`&&t>=0&&/\btc-point\b/.test(r)&&!/\btc-bubble\b/.test(r)?{tag:`path`,attrs:{class:`${r} tc-marker`,d:On(t,+(n.cx??0),+(n.cy??0),+(n.r??0))},children:[],key:e.key}:{...e,children:e.children.map(e=>kn(e,i?Number(i[1])-1:t))}}let An=(e,t)=>e.shapes??e.patterns===!0?kn(t,-1):t,jn=1e3,Mn=60*jn,Nn=60*Mn,Pn=24*Nn,Fn=30*Pn,In=365*Pn,Ln=[{unit:`second`,step:1,ms:jn},{unit:`second`,step:5,ms:5*jn},{unit:`second`,step:15,ms:15*jn},{unit:`second`,step:30,ms:30*jn},{unit:`minute`,step:1,ms:Mn},{unit:`minute`,step:5,ms:5*Mn},{unit:`minute`,step:15,ms:15*Mn},{unit:`minute`,step:30,ms:30*Mn},{unit:`hour`,step:1,ms:Nn},{unit:`hour`,step:3,ms:3*Nn},{unit:`hour`,step:6,ms:6*Nn},{unit:`hour`,step:12,ms:12*Nn},{unit:`day`,step:1,ms:Pn},{unit:`day`,step:2,ms:2*Pn},{unit:`week`,step:1,ms:6048e5},{unit:`month`,step:1,ms:Fn},{unit:`month`,step:3,ms:3*Fn},{unit:`year`,step:1,ms:In}];function Rn(e){let t=(t,n)=>{switch(n){case`year`:return e?t.getUTCFullYear():t.getFullYear();case`month`:return e?t.getUTCMonth():t.getMonth();case`day`:case`week`:return e?t.getUTCDate():t.getDate();case`hour`:return e?t.getUTCHours():t.getHours();case`minute`:return e?t.getUTCMinutes():t.getMinutes();default:return e?t.getUTCSeconds():t.getSeconds()}},n=(t,n,r,i=0,a=0,o=0)=>e?new Date(Date.UTC(t,n,r,i,a,o)):new Date(t,n,r,i,a,o),r=t=>e?t.getUTCDay():t.getDay();return{floor:(e,{unit:i,step:a})=>{let o=t(e,`year`),s=t(e,`month`),c=t(e,`day`);switch(i){case`year`:return n(Math.floor(o/a)*a,0,1);case`month`:return n(o,Math.floor(s/a)*a,1);case`week`:return n(o,s,c-(r(e)+6)%7);case`day`:return n(o,s,Math.floor((c-1)/a)*a+1);case`hour`:return n(o,s,c,Math.floor(t(e,`hour`)/a)*a);case`minute`:return n(o,s,c,t(e,`hour`),Math.floor(t(e,`minute`)/a)*a);default:return n(o,s,c,t(e,`hour`),t(e,`minute`),Math.floor(t(e,`second`)/a)*a)}},next:(e,{unit:r,step:i})=>{let a=t(e,`year`),o=t(e,`month`),s=t(e,`day`);switch(r){case`year`:return n(a+i,0,1);case`month`:return n(a,o+i,1);case`week`:return n(a,o,s+7*i);case`day`:{let e=n(a,o,s+i);return t(e,`month`)===o?e:n(a,o+1,1)}case`hour`:return n(a,o,s,t(e,`hour`)+i);case`minute`:return n(a,o,s,t(e,`hour`),t(e,`minute`)+i);default:return n(a,o,s,t(e,`hour`),t(e,`minute`),t(e,`second`)+i)}},boundary:(e,n)=>{switch(n){case`second`:return t(e,`second`)===0;case`minute`:return t(e,`minute`)===0&&t(e,`second`)===0;case`hour`:return t(e,`hour`)===0&&t(e,`minute`)===0;case`day`:case`week`:return t(e,`day`)===1;case`month`:return t(e,`month`)===0;default:return!1}}}}function zn(e,t){let n=Math.abs(e)/Math.max(1,t),r=0;for(;r<Ln.length&&Ln[r].ms<n;)r++;if(r===Ln.length){let e=Math.max(1,de(0,n/In,1));return{unit:`year`,step:e,ms:e*In}}if(r===0)return Ln[0];let i=Ln[r-1],a=Ln[r];return n/i.ms<a.ms/n?i:a}let Bn=e=>e instanceof Date?e.getTime():e,Vn={second:[{hour:`numeric`,minute:`2-digit`,second:`2-digit`},{hour:`numeric`,minute:`2-digit`}],minute:[{hour:`numeric`,minute:`2-digit`},{hour:`numeric`,minute:`2-digit`}],hour:[{hour:`numeric`,minute:`2-digit`},{month:`short`,day:`numeric`}],day:[{month:`short`,day:`numeric`},null],week:[{month:`short`,day:`numeric`},null],month:[{month:`short`},{year:`numeric`}],year:[{year:`numeric`},null]};function Hn(e,t,n={}){let r=n.utc===!0,i=Bn(e[0]),a=Bn(e[1]),[o,s]=t,c=a-i,l=c===0?0:(s-o)/c,u=Rn(r),d=n.clamp===!0,f=Math.min(o,s),p=Math.max(o,s),m=e=>{if(c===0)return(o+s)/2;let t=o+(Bn(e)-i)*l;return d?Math.min(p,Math.max(f,t)):t},h=(e=5)=>zn(c,e);return Object.assign(m,{domain:[i,a],range:[o,s],utc:r,invert(e){return new Date(c===0||s===o?i:i+(e-o)/l)},ticks(e=5){if(!Number.isFinite(i)||!Number.isFinite(a))return[];let t=Math.min(i,a),n=Math.max(i,a);if(t===n)return[new Date(t)];let r=h(e),o=[],s=u.floor(new Date(t),r);for(s.getTime()<t&&(s=u.next(s,r));s.getTime()<=n&&o.length<1e3;)o.push(s),s=u.next(s,r);return a<i?o.reverse():o},tickFormat(e=5,t){let{unit:n}=h(e),[i,a]=Vn[n],o=r?{timeZone:`UTC`}:{},s=L(t,{...i,...o}),c=a?L(t,{...a,...o}):null;return e=>(c&&u.boundary(e,n)?c:s).format(e)},nice(r=5){if(c===0||!Number.isFinite(c))return Hn(e,t,n);let o=h(r),s=u.floor(new Date(Math.min(i,a)),o),l=u.floor(new Date(Math.max(i,a)),o);return l.getTime()<Math.max(i,a)&&(l=u.next(l,o)),Hn(a<i?[l,s]:[s,l],t,n)}})}function Un(e,t,n,r){let[i,a]=xe(e)??[0,1],o=e.filter(e=>Number.isFinite(e)),s=Hn([i,a],n,{utc:r}),c=e.map(e=>s(e));return{scale:Object.assign(e=>c[t.indexOf(e)],{domain:t.slice(),range:n,bandwidth:0,step:o.length>1?(n[1]-n[0])/(o.length-1):0,at:e=>c[e]??n[0],center:e=>c[t.indexOf(e)],indexAt(e){if(c.length===0)return-1;let t=0,n=c.length-1;for(;t<n;){let r=t+n>>1;c[r]<e?t=r+1:n=r}let r=t-1;return r>=0&&e-c[r]<c[t]-e?r:t}}),time:s}}function Wn(e,t,n,r,i){let a=e.map(Be),o=e=>Un(a,t,e,n.utc===!0),s=o([0,1]).time,{format:c}=n,l=c?e=>c(e,-1):s.tickFormat(r,i),u=s;return{edges:s.ticks(r).map(l),scale(e){let t=o(e);return u=t.time,t.scale},ticks:()=>u.ticks(r).map(e=>({value:e.getTime(),position:u(e),label:l(e)})),get time(){return u}}}let Gn=(e,t)=>e.x<t.x+t.width&&t.x<e.x+e.width&&e.y<t.y+t.height&&t.y<e.y+e.height,Kn=(e,t)=>t.x>=e.x-1&&t.y>=e.y-1&&t.x+t.width<=e.x+e.width+1&&t.y+t.height<=e.y+e.height+1;function qn(e,t,n){let r=e.valueLabels,i=typeof r==`object`?r:{},{fontSize:o,locale:c}=n,l=e.type.valueLabels,u=l?.marks===`slice`,d=l?.marks===`cell`,f=!!e.stacked,p=i.format?z(i.format,c):u?e=>I(c,{style:`percent`,maximumFractionDigits:1}).format(e):l?.format?z(l.format(e),c):void 0,m=o,h=[],g=/* @__PURE__ */ new Map,_=0;for(let e=0;e<t.count;e++){let n=t.hitIndex(e);for(let t of n?.items??[])t.value!==null&&t.y!==null&&n&&(_+=Math.abs(t.value),!u&&!t.box&&i.points!==`all`&&g.set(t.seriesIndex,h.length),h.push([`${e}-${t.seriesIndex}`,t,n]))}let v=h.flatMap(([,e])=>e.box?[e.box]:[]),y=[];return h.forEach(([e,t,n],r)=>{let{area:s}=n;if(!u&&!t.box&&i.points!==`all`&&g.get(t.seriesIndex)!==r)return;let c=t.value,l=c/(_||1),h=p?p(u?l:c):t.text,b=a(h,o),x=(n,r,i)=>(!t.box&&!u&&(n=Math.max(s.x+b/2+2,Math.min(n,s.x+s.width-b/2-2))),{key:e,text:h,x:n,y:r,inside:i,box:{x:n-b/2-2,y:r-m/2,width:b+4,height:m}}),S=t.y,C=[],{box:w}=t;if(u)C.push(x(t.x,S,!0));else if(w){let e=n.axis===`y`,r=c<0;if(!f&&!d){let n=(e?b/2:m/2)+4,i=r?1:-1,a=S+i*n;C.push(e?x(t.x-i*n,S,!1):x(t.x,a,!1),...e?[]:[x(w.x+b/2-3,a,!1),x(w.x+w.width-b/2+3,a,!1)],e?x(t.x+i*n,S,!0):x(t.x,S-i*n,!0))}else C.push(x(w.x+w.width/2,w.y+w.height/2,!0))}else{let e=b/2+4+4;C.push(x(t.x,S-m/2-4-2,!1),x(t.x,S+m/2+4+2,!1),x(t.x-e,S,!1),x(t.x+e,S,!1))}let T={...s,y:0,height:s.y+s.height},E=(e,n={...e.box,x:e.box.x+5,width:e.box.width-10})=>Kn(u?s:T,e.box)&&(!e.inside||!w||Kn(w,e.box))&&(!u||Jn(t,s,l,e.box))&&!y.some(t=>Gn(t.box,e.box))&&!v.some(e=>e!==w&&Gn(e,n)),D=C.find(e=>E(e));D&&y.push(D)}),y.length?D(`g`,{key:`value-labels`,class:`tc-value-labels`,"aria-hidden":`true`},y.map(e=>D(`text`,{key:e.key,class:[`tc-value-label`,e.inside&&`tc-value-label-inside`],style:`transform:translate(${s(e.x)}px,${s(e.y)}px)`,"text-anchor":`middle`,dy:`0.35em`},e.text))):null}function Jn(e,t,n,r){let i=t.width/2,a=Math.hypot(e.x-t.x-i,e.y-t.y-i),o=2*(i-a);return r.width<=n*2*Math.PI*a&&r.height<=o}let Yn=(e,t,n,r)=>e.valueLabels&&n?[t,qn(e,n,r)]:t;function Xn(e,t,n){return e.nodeType===1&&e.localName===t.tag&&e.namespaceURI===n}function Zn(e,t){let n={};for(let t of e.getAttributeNames())n[t]=e.getAttribute(t);n.style&&=``,At(e,n,t.attrs);let r=t.children.some(e=>typeof e==`string`);for(let t of Array.from(e.childNodes))(t.nodeType===8||!r&&t.nodeType===3)&&e.removeChild(t);let i=Ct(e),a=e.firstChild;for(let n of t.children){let t=a?a.nextSibling:null;if(typeof n==`string`?a?.nodeType===3:a&&Xn(a,n,n.tag===`svg`?`http://www.w3.org/2000/svg`:i))typeof n==`string`?(a.data!==n&&(a.data=n),X.set(a,n)):Zn(a,n),a=t;else{let t=wt(n,i,e.ownerDocument);t&&e.insertBefore(t,a)}}for(;a;){let t=a;a=a.nextSibling,e.removeChild(t)}X.set(e,t)}function Qn(e,t,n){return X.has(e)||!Xn(e,t,n)?!1:(Zn(e,t),!0)}let $n=/* @__PURE__ */ new WeakMap;function er(e){let t=$n.get(e);return t&&cancelAnimationFrame(t.frame),$n.delete(e),t?.now}function tr(e,t,n,r,i,a){let o={frame:0,now:t.slice()},s=performance.now(),c=l=>{let u=Math.min(1,Math.max(0,(l-s)/r)),d=1-(1-u)**3;o.now=n.map((e,n)=>t[n]+(e-t[n])*d),e.setAttribute(`d`,u<1?i(o.now):a),u<1?o.frame=requestAnimationFrame(c):$n.delete(e)};$n.set(e,o),o.frame=requestAnimationFrame(c)}let nr=/-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi,rr;function ir(e,t,n){rr??=typeof CSS>`u`||CSS.supports(`d`,`path("M0 0")`);let r=er(e);if(rr||e.closest(`.tc-static,[data-resizing]`))return!1;let i=getComputedStyle(e),a=i.transitionProperty.split(`, `).findIndex(e=>e===`d`||e===`all`),o=a<0?0:Number.parseFloat(i.transitionDuration.split(`, `)[a]??``)*1e3,c=n.split(nr),l=n.match(nr)?.map(Number)??[],u=t.match(nr)?.map(Number)??[];return!(o>0)||u.length!==l.length||t.split(nr).join()!==c.join()?!1:(tr(e,r?.length===l.length?r:u,l,o,e=>e.reduce((e,t,n)=>e+s(t)+c[n+1],c[0]),n),!0)}function ar(e,t){let n=e.length;if(!(t>=3)||n<=t)return e.map((e,t)=>t);let r=[],i=-1;for(let t=0;t<n;t++){let n=e[t]!=null;n&&i===-1&&(i=t),!n&&i!==-1&&(r.push([i,t]),i=-1)}i!==-1&&r.push([i,n]);let a=r.reduce((e,[t,n])=>e+(n-t),0),o=[],s=0;for(let[n,i]of r)n>s&&o.push(s),or(e,n,i,Math.max(2,Math.round(t*(i-n)/a)),o),s=i;return s<n&&o.push(s),o}function or(e,t,n,r,i){let a=n-t;if(a<=r){for(let e=t;e<n;e++)i.push(e);return}let o=t=>e[t],s=(a-2)/(r-2),c=t;i.push(c);for(let e=0;e<r-2;e++){let r=t+1+Math.floor((e+1)*s),a=Math.min(n,t+1+Math.floor((e+2)*s)),l=0,u=0;for(let e=r;e<a;e++)l+=o(e)[0],u+=o(e)[1];let d=Math.max(1,a-r);l/=d,u/=d;let f=t+1+Math.floor(e*s),p=Math.min(n-1,t+1+Math.floor((e+1)*s)),[m,h]=o(c),g=f,_=-1;for(let e=f;e<p;e++){let[t,n]=o(e),r=Math.abs((m-l)*(n-h)-(m-t)*(u-h));r>_&&(_=r,g=e)}i.push(g),c=g}i.push(n-1)}function sr(e,t){return ar(e,t).map(t=>e[t])}var cr=class{d=``;#e;constructor(e){this.#e=10**Math.max(0,Math.min(12,Math.floor(e)))}#t(e){let t=Math.round(e*this.#e)/this.#e;return String(t===0?0:t)}#n(e,t){return`${this.#t(e)},${this.#t(t)}`}moveTo(e,t){this.d+=`M${this.#n(e,t)}`}lineTo(e,t){this.d+=`L${this.#n(e,t)}`}curveTo(e,t,n,r,i,a){this.d+=`C${this.#n(e,t)},${this.#n(n,r)},${this.#n(i,a)}`}close(){this.d+=`Z`}};function lr(e,t,n,r){let i=n===`monotone`?ur(t):t,a=i[0];if(!a)return 0;switch(r?e.moveTo(a[0],a[1]):e.lineTo(a[0],a[1]),n){case`monotone`:pr(e,i);break;case`step`:dr(e,i,.5);break;case`step-before`:dr(e,i,0);break;case`step-after`:dr(e,i,1);break;default:for(let t=1;t<i.length;t++){let n=i[t];e.lineTo(n[0],n[1])}}return i.length}function ur(e){return e.filter((t,n)=>{let r=e[n-1];return!r||t[0]!==r[0]||t[1]!==r[1]})}function dr(e,t,n){for(let r=1;r<t.length;r++){let[i,a]=t[r-1],[o,s]=t[r];if(n<=0)e.lineTo(i,s),e.lineTo(o,s);else if(n>=1)e.lineTo(o,a),e.lineTo(o,s);else{let c=i*(1-n)+o*n;e.lineTo(c,a),e.lineTo(c,s),r===t.length-1&&e.lineTo(o,s)}}}let fr=e=>e<0?-1:1;function pr(e,t){let n=t.length;if(n<2)return;if(n===2){let n=t[1];e.lineTo(n[0],n[1]);return}let r=Array(n);for(let e=1;e<n-1;e++){let[n,i]=t[e-1],[a,o]=t[e],[s,c]=t[e+1],l=a-n,u=s-a,d=(o-i)/(l||(u<0?-0:0)),f=(c-o)/(u||(l<0?-0:0)),p=(d*u+f*l)/(l+u);r[e]=(fr(d)+fr(f))*Math.min(Math.abs(d),Math.abs(f),.5*Math.abs(p))||0}r[0]=mr(t[0],t[1],r[1]),r[n-1]=mr(t[n-2],t[n-1],r[n-2]);for(let i=1;i<n;i++){let[n,a]=t[i-1],[o,s]=t[i],c=(o-n)/3;e.curveTo(n+c,a+c*r[i-1],o-c,s-c*r[i],o,s)}}function mr(e,t,n){let r=t[0]-e[0];return r?3*(t[1]-e[1])/r/2-n/2:n}let hr=e=>e!=null&&Number.isFinite(e[0])&&Number.isFinite(e[1]);function gr(e,t=()=>!0){let n=[],r;for(let i=0;i<e.length;i++)hr(e[i])&&t(i)?(r||(r=[],n.push(r)),r.push(i)):r=void 0;return n}function _r(e,t={}){let{curve:n=`linear`,precision:r=2}=t,i=new cr(r);for(let t of gr(e))lr(i,t.map(t=>e[t]),n,!0)===1&&i.close();return i.d}function vr(e,t,n={}){let{curve:r=`linear`,precision:i=2}=n,a=new cr(i),o=e=>typeof t==`number`?t:t[e]??NaN;for(let t of gr(e,e=>Number.isFinite(o(e))))lr(a,t.map(t=>e[t]),r,!0),lr(a,t.map(t=>[e[t][0],o(t)]).reverse(),r===`step-before`?`step-after`:r===`step-after`?`step-before`:r,!1),a.close();return a.d}let yr={png:`PNG`,svg:`SVG`,jpeg:`JPEG`,webp:`WebP`},br=[`png`,`svg`];function xr(e){return e===!0?{}:Array.isArray(e)?{formats:e}:e}function Sr(){return{name:`download`,install(e){let t=e.element,n=t.ownerDocument,r,i={},a=!t.classList.contains(`tc-container`),o=()=>r?.querySelector(`.tc-download-toggle`),s=()=>r?.querySelector(`.tc-download-menu`),c=()=>Array.from(r?.querySelectorAll(`.tc-download-item`)??[]),l=e=>{let t=s();t&&(t.hidden=!e,o()?.setAttribute(`aria-expanded`,String(e)),e?n.addEventListener(`pointerdown`,d,!0):n.removeEventListener(`pointerdown`,d,!0))},u=()=>s()?.hidden===!1,d=e=>{r?.contains(e.target)||l(!1)},f=t=>{let n=t.target;if(n.closest(`.tc-download-toggle`)){l(!u()),u()&&c()[0]?.focus();return}let r=n.closest(`.tc-download-item`)?.getAttribute(`data-format`);r&&(l(!1),o()?.focus(),E(`export`)(e,{...i,format:r}))},p=e=>{if(e.key===`Escape`&&u()){e.preventDefault(),l(!1),o()?.focus();return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;let t=c();t.length&&(e.preventDefault(),u()||l(!0),t[(t.indexOf(n.activeElement)+(e.key===`ArrowDown`?1:-1)+t.length)%t.length]?.focus())},m=e=>{r?.contains(e.relatedTarget)||l(!1)},h=()=>{r&&(l(!1),Z(r,null),r.remove(),r=void 0,a&&t.classList.remove(`tc-container`))};return{afterRender({config:e,changed:a}){let o=e.download;if(!o||typeof document>`u`){h();return}if(!a&&r?.isConnected)return;E(`export`),i=xr(o);let s=i.formats?.length?i.formats:br;r||(r=n.createElement(`div`),r.className=`tc-download`,r.addEventListener(`click`,f),r.addEventListener(`keydown`,p),r.addEventListener(`focusout`,m)),Z(r,D(`div`,{class:`tc-download-box`},D(`button`,{type:`button`,class:`tc-download-toggle`,"aria-label":i.label??`Download`,"aria-haspopup":`menu`,"aria-expanded":`false`},D(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},D(`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12`}))),D(`div`,{class:`tc-download-menu`,role:`menu`,hidden:``},s.map(e=>D(`button`,{key:e,type:`button`,role:`menuitem`,class:`tc-download-item`,"data-format":e},yr[e]??e))))),t.classList.add(`tc-container`),r.isConnected||t.appendChild(r)},destroy:h}}}}function Cr(e,t,n){return D(`g`,{key:e,class:[`tc-series`,`tc-series-${e+1}`],style:{"--tc-series-color":t}},n)}function wr(e,t=!0){let{area:n}=e;return D(`g`,{class:`tc-hover`,"aria-hidden":`true`},e.mark?null:e.band?D(`rect`,{class:`tc-hover-band`,x:s(e.band.x),y:s(e.band.y),width:s(e.band.width),height:s(e.band.height)}):t&&D(`line`,e.guide?{class:`tc-crosshair`,x1:s(e.guide.x1),x2:s(e.guide.x2),y1:s(e.guide.y1),y2:s(e.guide.y2)}:{class:`tc-crosshair`,x1:s(e.x),x2:s(e.x),y1:s(n.y),y2:s(n.y+n.height)}))}function Tr(e,t=4,n){let{mark:r}=e;if(r){let t=e.items.find(t=>t.seriesIndex===e.seriesIndex)??e.items[0];return D(`g`,{class:`tc-hover`,"aria-hidden":`true`},t&&Cr(t.seriesIndex,t.color,D(`path`,{class:`tc-hover-mark`,d:r.d,style:`transform:translate(${s(r.x)}px,${s(r.y)}px)`})))}return D(`g`,{class:`tc-hover`,"aria-hidden":`true`},!e.band&&e.items.map(e=>e.y!==null&&Cr(e.seriesIndex,e.color,n?D(`path`,{class:`tc-point tc-point-active tc-marker`,d:n(e.seriesIndex,e.x,e.y,t)}):D(`circle`,{class:`tc-point tc-point-active`,cx:s(e.x),cy:s(e.y),r:t}))))}let Er=/* @__PURE__ */ new WeakSet;function Dr(e){let t=e.element;if(Er.has(e)||typeof t.addEventListener!=`function`)return;Er.add(e);let n=n=>{let r=t.querySelector(`svg.tc-chart`);if(!r)return;let{width:i,height:a}=e.size;return ft(r,n.clientX,n.clientY,i,a)},r=t=>{let r=n(t);r&&e.highlightAt(r.x,r.y,t)},i=t=>{t.pointerType!==`touch`&&e.highlightSource===`pointer`&&e.clearHighlight(t)},a=t=>{let r=n(t),i=r?e.hitTest(r.x,r.y):null;i&&e.emit(`click`,{hit:i,event:t})};return t.addEventListener(`pointermove`,r),t.addEventListener(`pointerdown`,r),t.addEventListener(`pointerleave`,i),t.addEventListener(`click`,a),()=>{Er.delete(e),t.removeEventListener(`pointermove`,r),t.removeEventListener(`pointerdown`,r),t.removeEventListener(`pointerleave`,i),t.removeEventListener(`click`,a)}}function Or(){return{name:`pointer`,install(e){let t=Dr(e);return t?{destroy:t}:{}}}}function kr(){return{name:`highlight`,install(e){let t=Dr(e);return{layers:(e,t)=>({under:wr(e,t.crosshair!==!1),over:Tr(e,4,Ue(t))}),...t?{destroy:t}:{}}}}}function Ar(e,t){let[n=``,...r]=e.columns;return D(`table`,{class:`tc-table`},t&&D(`caption`,null,t),D(`thead`,null,D(`tr`,null,D(`th`,{scope:`col`},n),r.map((e,t)=>D(`th`,{key:t,scope:`col`},e)))),D(`tbody`,null,e.rows.map(([e=``,...t],n)=>D(`tr`,{key:n},D(`th`,{scope:`row`},e),t.map((e,t)=>D(`td`,{key:t},e))))))}function jr(e){let t=(e.seriesIndex===void 0?e.items:e.items.filter(t=>t.seriesIndex===e.seriesIndex)).map(e=>`${e.name} ${e.text}`).join(`, `);return e.title?`${e.title}: ${t}`:t}let Mr=e=>e.keyboard??e.type.keyboard??!0;function Nr(){return{name:`keyboard`,install(e){let t=e.element,n,r=()=>(n||(n=t.ownerDocument.createElement(`div`),n.className=`tc-sr-only`,n.setAttribute(`aria-live`,`polite`),n.setAttribute(`aria-atomic`,`true`),t.appendChild(n)),n),i=e=>{r().textContent=e},a=(t,n)=>{let r=e.highlightIndex(t,n);r&&i(jr(r))},o=t=>{let n=e.interaction;if(!n||n.count===0)return!1;let r=e.highlightSource===`index`?e.active:null,i=n.count-1,o=r?.index,s=r?.seriesIndex,c=r?.items.map(e=>e.seriesIndex)??[],l=s===void 0?-1:c.indexOf(s);switch(t){case`ArrowRight`:return a(o===void 0?0:Math.min(i,o+1),s),!0;case`ArrowLeft`:return a(o===void 0?i:Math.max(0,o-1),s),!0;case`Home`:return a(0,s),!0;case`End`:return a(i,s),!0;case`ArrowDown`:case`ArrowUp`:{if(o===void 0||c.length===0)return a(0),!0;let e=t===`ArrowDown`?1:-1,n=l===-1?e>0?0:c.length-1:l+e;return a(o,n<0||n>=c.length?void 0:c[n]),!0}case`Escape`:return r?(e.clearHighlight(),!0):!1;default:return!1}},s=e=>e?.matches?.(`svg.tc-chart`)===!0,c=t=>{let{key:n}=t;Mr(e.config)&&s(t.target)&&o(n)&&t.preventDefault()},l=t=>{s(t.target)&&e.highlightSource===`index`&&e.clearHighlight()},u=t=>{Mr(e.config)&&s(t.target)&&r()};return t.addEventListener(`keydown`,c),t.addEventListener(`focusin`,u),t.addEventListener(`focusout`,l),{svgAttrs:e=>Mr(e)?{tabindex:0}:void 0,destroy(){t.removeEventListener(`keydown`,c),t.removeEventListener(`focusin`,u),t.removeEventListener(`focusout`,l),n?.remove()}}}}}function Pr(){return{name:`legend`,install(e){let t=e.element,n=t.querySelector(`:scope > .tc-legend`)??void 0,r=n?.firstElementChild??null,i=!1,a=t=>{let n=(t.target.closest?.(`.tc-legend-item`))?.getAttribute(`data-key`);n!=null&&e.toggleSeries(n)},o=()=>{n&&=(Z(n,null),n.removeEventListener(`click`,a),i=!1,n.remove(),void 0)},s=()=>{if(!n)return;let e=t.querySelector(`:scope > svg.tc-chart`);n.dataset.position===`bottom`?e?e.nextElementSibling!==n&&e.after(n):n.isConnected||t.appendChild(n):(!n.isConnected||n.nextElementSibling!==e)&&t.insertBefore(n,e??t.firstChild)};return{beforeRender({legend:e,hidden:c}){if(!e.show||typeof document>`u`){o();return}n||(n=t.ownerDocument.createElement(`div`),n.className=`tc-legend`),i||=(n.addEventListener(`click`,a),!0),n.dataset.position=e.position,Z(n,pt(e.items,c),r),r=null,s()},reservedHeight(){if(!n?.isConnected)return 0;let{marginTop:e,marginBottom:t}=getComputedStyle(n);return n.offsetHeight+(Number.parseFloat(e)||0)+(Number.parseFloat(t)||0)},afterRender:s,destroy:o}}}}let Fr=/* @__PURE__ */ new Map,Ir=/* @__PURE__ */ new WeakMap,Lr=!1;function Rr(e,t){let n=Ir.get(e);if(!n){n=/* @__PURE__ */ new Map;for(let t=0;t<e.count;t++){let r=e.hitIndex(t);r&&!n.has(r.label)&&n.set(r.label,t)}Ir.set(e,n)}return n.get(t)}function zr(){return{name:`sync`,install(e){let t=new WeakRef(e),n,r,i=()=>{n?.delete(t),r&&n?.size===0&&Fr.get(r)===n&&Fr.delete(r)},a=()=>{let a=e.config.sync,o=a?Fr.get(a)??/* @__PURE__ */ new Set:void 0;o!==n&&(i(),a&&o&&(o.add(t),Fr.set(a,o)),n=o,r=a)};a();let o=e.on(`hover`,({hit:t})=>{if(!(Lr||!n||t&&e.highlightSource!==`pointer`)){Lr=!0;try{for(let r of n){let i=r.deref();if(i||n.delete(r),!i||i===e)continue;let a=t&&i.interaction&&Rr(i.interaction,t.label);a==null?i.clearHighlight():i.highlightIndex(a)}}finally{Lr=!1}}});return{afterRender:a,destroy(){o(),i()}}}}}let Br=/* @__PURE__ */ new Map,Vr=!1;function Hr(){Vr=!1;let e=0;for(;Br.size>0;){let t=Array.from(Br.values());Br.clear();for(let n of t)Qt(n),e++}return e}function Ur(e,t){en.idle=Hr,Br.set(e,t),!Vr&&(Vr=!0,typeof requestIdleCallback==`function`?requestIdleCallback(Hr,{timeout:1e3}):setTimeout(Hr,100))}function Wr(e){Br.delete(e)}function Gr(){return{name:`table`,install(e){let t=e.element,n=t.querySelector(`:scope > .tc-table-wrap`)??void 0,r=n?.firstElementChild??null,i,a={},o=()=>{Wr(a),n&&=(Z(n,null),n.remove(),void 0)},s=(i,a,s)=>{let c=i.table??!0,l=typeof c==`object`&&c.maxRows?c.maxRows:1e3,u=c!==!1&&typeof document<`u`?i.type.table?.(i,cn(i,a,e.id,()=>{},s,e.fontSize),l):void 0;if(!u){o();return}let d=c===`visible`||typeof c==`object`&&c.visible===!0,f=i.title,p=u.total??u.rows.length,m=u.rows.length>l?{columns:u.columns,rows:u.rows.slice(0,l)}:u;if(p>m.rows.length){let e=I(i.locale),t=`${e.format(m.rows.length)} of ${e.format(p)} rows`;f=f?`${f} (${t})`:t}n||=t.ownerDocument.createElement(`div`),n.className=d?`tc-table-wrap`:`tc-table-wrap tc-sr-only`,Z(n,Ar(m,f),r),r=null;let h=t.querySelector(`:scope > svg.tc-chart`),g=t.querySelector(`:scope > .tc-legend[data-position="bottom"]`)??h;g&&g.nextElementSibling!==n?g.after(n):n.isConnected||t.appendChild(n)};return{afterRender({config:e,size:t,hidden:r,changed:o}){if(!o&&n?.isConnected)return;let c=e.table??!0,l=i===c;i=c,l&&n?.isConnected&&n.classList.contains(`tc-sr-only`)?Ur(a,()=>s(e,t,r)):(Wr(a),s(e,t,r))},destroy:o}}}}function Kr(e,t){if(t)return t;let n=e.items.find(t=>t.seriesIndex===e.seriesIndex)??e.items[0];return e.guide&&n?.y!=null?{x:n.x,y:n.y}:e.axis===`y`?{x:n?.x??e.x,y:e.y??e.area.y}:{x:e.x,y:n?.y??e.area.y+e.area.height/2}}function qr(e,t={}){return D(`div`,{class:`tc-tooltip-content`},t.format?t.format(e):[e.title&&D(`div`,{class:`tc-tooltip-title`},e.title),e.items.map(t=>D(`div`,{key:t.seriesIndex,class:[`tc-tooltip-item`,`tc-series`,`tc-series-${t.seriesIndex+1}`,e.seriesIndex===t.seriesIndex&&`tc-tooltip-item-active`],style:{"--tc-series-color":t.color}},D(`span`,{class:`tc-tooltip-swatch`}),D(`span`,{class:`tc-tooltip-name`},t.name),D(`span`,{class:`tc-tooltip-value`},t.text))),t.footer&&D(`div`,{class:`tc-tooltip-footer`},t.footer(e))])}function Jr(e,t,n,r=12){let{x:i=0,y:a=0}=n,o=e.x+r+t.width<=i+n.width,s=e.x-r-t.width>=i,c=o||!s?`right`:`left`,l=c===`right`?e.x+r:e.x-r-t.width,u=Math.max(i,Math.min(l,i+n.width-t.width)),d=Math.max(a,Math.min(e.y-t.height/2,a+n.height-t.height));return{x:Math.round(u),y:Math.round(d),side:c}}function Yr(e){let t=0,n=0,r=innerWidth,i=innerHeight;for(let a=e;a;){let e=getComputedStyle(a);if(e.overflowX!==`visible`||e.overflowY!==`visible`){let e=a.getBoundingClientRect();t=Math.max(t,e.left),n=Math.max(n,e.top),r=Math.min(r,e.right),i=Math.min(i,e.bottom);break}a=a.parentElement??(a.getRootNode().host||null)}return{left:t,top:n,right:r,bottom:i}}let Xr=[];function Zr(){for(let e of Xr.splice(0).map(e=>e()))e?.()}function Qr(){return{name:`tooltip`,install(e){let t=Dr(e),n=e.element,r=!n.classList.contains(`tc-container`);n.classList.add(`tc-container`);let i,a=0;return{afterRender(){let t=e.config.tooltip,r=e.active,o=r&&Kr(r,e.pointer);if(t===!1||typeof document>`u`||!r||!o||!Number.isFinite(o.x)||!Number.isFinite(o.y)){a++,i?.removeAttribute(`data-visible`);return}i||(i=n.ownerDocument.createElement(`div`),i.className=`tc-tooltip`,i.setAttribute(`aria-hidden`,`true`),n.appendChild(i)),Z(i,qr(r,typeof t==`object`?t:void 0));let s=i,c=++a;Xr.push(()=>{let t=n.querySelector(`svg.tc-chart`);if(!t||c!==a)return;let{width:i,height:l}=e.size,u=n.getBoundingClientRect(),d=t.getBoundingClientRect(),f=u.width>0&&n.offsetWidth>0?u.width/n.offsetWidth:1,p=d.width>0?d.width/i/f:1,m=d.height>0?d.height/l/f:1,h={x:(d.left-u.left)/f-n.clientLeft,y:(d.top-u.top)/f-n.clientTop},g=r.axis===`y`||r.guide?o.x:r.x,_=r.axis===`y`?r.y??o.y:o.y,v=Yr(n),y=Jr({x:h.x+g*p,y:h.y+_*m},{width:s.offsetWidth,height:s.offsetHeight},{x:(v.left-u.left)/f-n.clientLeft,y:(v.top-u.top)/f-n.clientTop,width:(v.right-v.left)/f,height:(v.bottom-v.top)/f});return()=>{s.style.transform=`translate(${y.x}px, ${y.y}px)`,s.dataset.side=y.side,s.hasAttribute(`data-visible`)||(getComputedStyle(s).transform,s.setAttribute(`data-visible`,``))}}),$t(Xr,Zr)},destroy(){a++,i&&(Z(i,null),i.remove()),r&&n.classList.remove(`tc-container`),t?.()}}}}}function $r(){return[kr(),Pr(),Qr(),Gr(),Nr(),zr(),Sr()]}var ei=class extends bn{constructor(e,t){super(e,t,$r())}};function ti(e){return D(`mask`,{id:e,maskContentUnits:`objectBoundingBox`},D(`linearGradient`,{id:`${e}-gradient`,x1:0,y1:0,x2:0,y2:1},D(`stop`,{class:`tc-fade-start`,offset:0}),D(`stop`,{class:`tc-fade-end`,offset:1})),D(`rect`,{width:1,height:1,fill:`url(#${e}-gradient)`}))}function ni(e,t,n={}){let{percent:r=!1,nullAsZero:i=!1,hidden:a}=n,o=e.map(e=>!a?.has(Y(e))),s=e.map(()=>Array(t).fill(null));for(let n=0;n<t;n++){let t=0;r&&e.forEach((e,r)=>{let i=e.values[n];o[r]&&i!=null&&(t+=Math.abs(i))});let a=0,c=0,l,u;for(let d=0;d<e.length;d++){let f=e[d];if(!o[d])continue;let p=f.values[n],m=p!=null;if(!m&&!i)continue;let h=m?p:0;r&&(h=t===0?0:h/t);let g=s[d];if(h<0){let e={y0:c,y1:c+h};g[n]=e,c+=h,u=e}else{let e={y0:a,y1:a+h};g[n]=e,a+=h,l=e}}r&&(l&&Math.abs(a-1)<1e-9&&(l.y1=1),u&&Math.abs(c+1)<1e-9&&(u.y1=-1))}return s}function ri(e){let t=[];for(let n of e)for(let e of n)e&&t.push(e.y0,e.y1);return t}function ii(e,t,n,r,i,a){let o=[];for(let s=0;s<t;s++){let t=e.values[s];a(t)?o.push([n(s),r(t)]):i||o.push(null)}return o}function ai(e,t,n){let{curve:r=`monotone`,points:i=`none`,pointRadius:a=4,connectNulls:o=!1,area:c=n,stacked:l=!1,decimate:u,fill:d=l?`solid`:`gradient`}=e,f=i===`none`?2:a+2,{series:p}=e.data,m=Ie(e.data).length,h=l?ni(p,m,{percent:l===`percent`,nullAsZero:!0,hidden:t.hidden}):null,g=Xe(e,t,{scale:`point`,zero:c||h!==null,overhang:f,...h?{values:ri(h)}:{},...l===`percent`?{tickFormat:{style:`percent`}}:{}}),{x:_,y:v,labels:y}=g,b=v(Math.min(Math.max(0,v.domain[0]),v.domain[1]));t.onHitTest($e(g,e,t,(e,t,n)=>({x:_.at(t),y:v(h?h[e]?.[t]?.y1??0:n)})));let x=c&&d===`gradient`,S=`${t.id}-fade`,C=e=>!t.hidden.has(Y(e)),w=p.map((t,n)=>{if(!C(t))return[];let r=h?.[n];return r?r.map((e,t)=>e?[_.at(t),v(e.y1)]:null):ii(t,y.length,e=>_.at(e),v,o,t=>Le(t,e.y))}),T=w.map(e=>u!==void 0&&e.length>u?E(`decimate`)(e,u):null),O=e=>{let t=w[e],n=T[e];return n?n.map(e=>t[e]):t},k=e=>{let t=h?.[e];if(!t)return b;let n=t.map(e=>e?v(e.y0):null),r=T[e];return r?r.map(e=>n[e]??null):n},A=c&&D(`g`,{class:`tc-areas`},e.data.series.map((e,t)=>C(e)&&D(`g`,Qe(e,t),D(`path`,{class:[`tc-area`,x&&`tc-area-gradient`],d:vr(O(t),k(t),{curve:r}),mask:x?`url(#${S})`:void 0})))),j=e.data.series.map((e,t)=>{if(!C(e))return null;let n=O(t),o=n.filter(e=>e!=null),c=i===`all`?o:i===`last`?o.slice(-1):[];return D(`g`,Qe(e,t),D(`path`,{class:`tc-line`,d:_r(n,{curve:r})}),c.length>0&&D(`g`,{class:`tc-points`},c.map(([e,t])=>D(`circle`,{key:e,class:`tc-point`,cx:s(e),cy:s(t),r:a}))))});return[D(`defs`,{key:`defs`},g.clip.def,x&&ti(S)),g.background,D(`g`,{key:`series`,class:`tc-series-list`,"clip-path":g.clip.url},A,j),g.foreground]}let oi={name:`line`,clean:K(je),render:(e,t)=>ai(e,t,!1),legend:e=>Fe(e.data),table:(e,t,n)=>et(e,t,n)},si={name:`area`,clean:K(je),render:(e,t)=>ai(e,t,!0),legend:e=>Fe(e.data),table:(e,t,n)=>et(e,t,n)},Q=e=>{let t=s(e);return t===0?0:t};function ci(e,t,n,r,i=0){let a=Math.max(0,t),o=Math.abs(n-r),s=Math.max(0,Math.min(i,a/2,o)),c=Q(e),l=Q(e+a),u=Q(n),d=Q(r),f=r<=n,p=Q(f?r+s:r-s),m=+!!f,h=Q(s);return`M${c},${u}L${c},${p}A${h},${h},0,0,${m},${Q(e+s)},${d}L${Q(e+a-s)},${d}A${h},${h},0,0,${m},${l},${p}L${l},${u}Z`}function li(e,t,n,r,i=0){let a=Math.max(0,t),o=Math.abs(r-n),s=Math.max(0,Math.min(i,a/2,o)),c=Q(e),l=Q(e+a),u=Q(n),d=Q(r),f=r>=n,p=Q(f?r-s:r+s),m=+!!f,h=Q(s);return`M${u},${c}L${p},${c}A${h},${h},0,0,${m},${d},${Q(e+s)}L${d},${Q(e+a-s)}A${h},${h},0,0,${m},${p},${l}L${u},${l}Z`}function ui(e,r,i){let o=e.y??{},s=e.x??{},{fontSize:c,width:l,height:u}=r,d=i.overhang??0,f=t(e.padding),p=Ie(e.data),m=ze(e,r),h=Je(e,r,i,Math.round(l/80)),g=h.probe,_=o.show!==!1,v=s.show!==!1&&p.length>0,y=p.map((e,t)=>({value:J(e),position:0,label:m(e,t)})),b=e=>_&&e?Math.ceil(a(e.label,c)/2):0,x=n(l,u,{top:f.top+Math.max(d,4),right:f.right+Math.max(b(g[g.length-1]),d,8),bottom:f.bottom+Math.max(_?W(`bottom`,g,c):0,d,4),left:f.left+Math.max(v?W(`left`,y,c):0,b(g[0]),d,8)}),S=p.map(J),C=ye(S,[x.y,x.y+x.height],{paddingInner:i.paddingInner??.3,paddingOuter:i.paddingOuter??.15}),w=h.scale([x.x,x.x+x.width]),T=ge(h.ticks(w),`bottom`,c);return Ye(e,r,d,{area:x,labels:p,x:C,y:w,horizontal:!0,xTicks:v?ge(me(C,(e,t)=>m(p[t],t)),`left`,c):[],yTicks:T},S)}let di={name:`bar`,clean:K(je),render(e,t){let{radius:n=4,maxBarWidth:r=24,gap:i=2,groupPadding:a=.3,stacked:o=!1,orientation:s=`vertical`,curve:c=`monotone`}=e,l=s===`horizontal`,{series:u}=e.data,d=Ie(e.data).length,f=e=>(u[e]?.type??`bar`)!==`bar`,p=u.filter((e,t)=>f(t)).map(Y),m=p.length?/* @__PURE__ */ new Set([...t.hidden,...p]):t.hidden,h=o?ni(u,d,{percent:o===`percent`,hidden:m}):null,g={scale:`band`,zero:!0,paddingInner:a,paddingOuter:a/2,...h?{values:[...ri(h),...u.flatMap((e,t)=>f(t)?e.values:[])]}:{},...o===`percent`?{tickFormat:{style:`percent`}}:{}},_=l?ui(e,t,g):Xe(e,t,g),{x:v,y,labels:b}=_,x=/* @__PURE__ */ new Map;u.forEach((e,n)=>{!t.hidden.has(Y(e))&&!f(n)&&x.set(n,x.size)});let S=[...x.keys()],C=h?1:Math.max(1,x.size),w=Math.max(0,Math.min(r,(v.bandwidth-(h?0:i*(C-1)))/C)),T=w*C+(h?0:i*(C-1)),O=(v.bandwidth-T)/2,k=(e,t)=>v.at(t)+O+(h?0:(x.get(e)??0)*(w+i)),A=(t,n)=>{if(h)return h[t]?.[n]??null;let r=u[t]?.values[n];return Le(r,e.y)?{y0:0,y1:r}:null},j=b.map((e,t)=>{let n=-1,r=-1;for(let e of S){let i=A(e,t);i&&(i.y1>i.y0?n=e:i.y1<i.y0&&(r=e))}return{up:n,down:r}});t.onHitTest($e(_,e,t,(e,t,n)=>{if(f(e)){let e=v.at(t)+v.bandwidth/2;return l?{x:y(n),y:e}:{x:e,y:y(n)}}let r=k(e,t),i=A(e,t),a=y(i?.y1??0),o=y(i?.y0??0),s=Math.min(a,o),c=Math.abs(a-o);return l?{x:a,y:r+w/2,box:{x:s,y:r,width:c,height:w}}:{x:r+w/2,y:a,box:{x:r,y:s,width:w,height:c}}},(e,t,n)=>{let r=l?t:e,a=l?e:t;if(h){let e=k(0,n);return r<e-i/2||r>e+w+i/2?void 0:S.find(e=>{let t=A(e,n);if(!t)return!1;let r=y(t.y0),o=y(t.y1);return a>=Math.min(r,o)-i/2&&a<=Math.max(r,o)+i/2})}let o=Math.floor((r-(v.at(n)+O)+i/2)/(w+i)),s=S[o];return s!==void 0&&A(s,n)?s:void 0}));let M=u.map((e,t)=>x.has(t)&&D(`g`,Qe(e,t),b.map((e,r)=>{let a=A(t,r);if(!a)return null;let o=a.y1<a.y0,s=(o?1:-1)*(l?-1:1),c=a.y0===0?0:s*i,u=!h||(o?j[r]?.down:j[r]?.up)===t,d=l?li:ci;return D(`path`,{key:J(e),class:[`tc-bar`,o&&`tc-bar-negative`,l&&`tc-bar-horizontal`],d:d(k(t,r),w,y(a.y0)+c,y(a.y1),u?n:0)})}))),N=p.length?E(`line`):null,P=y(Math.min(Math.max(0,y.domain[0]),y.domain[1])),F=u.map((n,r)=>{if(!N||!f(r)||t.hidden.has(Y(n)))return null;let i=b.map((t,r)=>{let i=n.values[r];if(!Le(i,e.y))return null;let a=v.at(r)+v.bandwidth/2;return l?[y(i),a]:[a,y(i)]}),a=n.type===`area`&&!l;return D(`g`,Qe(n,r),a&&D(`path`,{class:`tc-area`,d:N.areaPath(i,P,{curve:c})}),D(`path`,{class:`tc-line`,d:N.linePath(i,{curve:c})}))});return[D(`defs`,{key:`defs`},_.clip.def),_.background,D(`g`,{key:`series`,class:`tc-series-list`,"clip-path":_.clip.url},M,F),_.foreground]},legend:e=>Fe(e.data),table:(e,t,n)=>et(e,t,n)},fi=(e,t,n,r,i)=>{let a=`A${i},${i},0,0,1,`;return`M${s(e+i)},${t}H${s(e+n-i)}${a}${s(e+n)},${s(t+i)}V${s(t+r-i)}${a}${s(e+n-i)},${s(t+r)}H${s(e+i)}${a}${e},${s(t+r-i)}V${s(t+i)}${a}${s(e+i)},${t}Z`},pi=(e,t)=>[e.open,e.high,e.low,e.close].every(e=>Le(e,t));function mi(e){let t=t=>e.data.map(n=>pi(n,e.y)?n[t]:null),n={data:{labels:e.data.map(e=>e.x),series:[{name:`Open`,values:t(`open`)},{name:`High`,values:t(`high`)},{name:`Low`,values:t(`low`)},{name:`Close`,values:t(`close`)}]}};return e.x&&(n.x=e.x),e.y&&(n.y=e.y),e.padding!==void 0&&(n.padding=e.padding),e.annotations&&(n.annotations=e.annotations),n}let hi={name:`candlestick`,clean:K(e=>ke(e,e=>({...e,x:De(e.x),open:G(e.open),high:G(e.high),low:G(e.low),close:G(e.close)}))),render(e,t){let{maxCandleWidth:n=16,groupPadding:r=.3,radius:i=1}=e,a=mi(e),o=Xe(a,t,{scale:`band`,zero:!1,paddingInner:r,paddingOuter:r/2}),{x:c,y:l,labels:u}=o,d=Math.max(1,Math.min(n,c.bandwidth)),f=e=>c.at(e)+c.bandwidth/2,p=e=>e.close>=e.open,m=$e(o,a,t,(e,t,n)=>({x:f(t),y:l(n)})),h=t=>{let n=t?e.data[t.index]:void 0;if(!t||!n)return t;let r=p(n)?`var(--tc-up-color,var(--tc-color-6))`:`var(--tc-negative-color,var(--tc-color-8))`;return{...t,items:t.items.map(e=>({...e,color:r}))}},g={count:m.count,hitIndex:(e,t)=>h(m.hitIndex(e,t)),hitTest:(e,t)=>h(m.hitTest(e,t))};t.onHitTest(g);let _=e.data.map((t,n)=>{if(!pi(t,e.y))return null;let r=s(f(n)),a=l(Math.max(t.open,t.close)),o=Math.max(l(Math.min(t.open,t.close)),a+1),c=s(f(n)-d/2),m=s(Math.min(i,d/2,(o-a)/2));return D(`g`,{key:J(u[n]),class:[`tc-candle`,p(t)?`tc-candle-up`:`tc-candle-down`]},D(`path`,{class:`tc-candle-wick`,d:`M${r},${s(l(t.high))}V${s(l(t.low))}`}),D(`path`,{class:`tc-candle-body`,d:fi(c,s(a),s(d),s(o-a),m)}))});return[D(`defs`,{key:`defs`},o.clip.def),o.background,D(`g`,{key:`series`,class:`tc-series-list tc-candles`,"clip-path":o.clip.url},_),o.foreground]},table:(e,t,n)=>et(mi(e),t,n)},$=1e-12,gi=Math.PI,_i=gi/2,vi=2*gi,yi=Math.PI/180,bi=e=>e>=1?_i:e<=-1?-_i:Math.asin(e),xi=e=>e>1?0:e<-1?gi:Math.acos(e);function Si(e,t,n,r,i,a,o,s){let c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<$))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function Ci(e,t,n,r,i,a,o){let s=e-n,c=t-r,l=(o?a:-a)/Math.sqrt(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}function wi(e,t,n,r,i,a,o){let s=r,c=i,l=r,u=i,d=a,f=a,p=(e.padAngle??0)/2,m=p>$?e.padRadius??Math.sqrt(t*t+n*n):0,h=Math.min(Math.abs(n-t)/2,e.cornerRadius??0),g=h,_=h;if(m>$){let e=bi(m/t*Math.sin(p)),a=bi(m/n*Math.sin(p));d-=e*2,d>$?(e*=o?1:-1,l+=e,u-=e):(d=0,l=u=(r+i)/2),f-=a*2,f>$?(a*=o?1:-1,s+=a,c-=a):(f=0,s=c=(r+i)/2)}let v=n*Math.cos(s),y=n*Math.sin(s),b=t*Math.cos(u),x=t*Math.sin(u),S=n*Math.cos(c),C=n*Math.sin(c),w=t*Math.cos(l),T=t*Math.sin(l);if(h>$&&a<gi){let e=Si(v,y,w,T,S,C,b,x);if(e){let r=v-e[0],i=y-e[1],a=S-e[0],o=C-e[1],s=(r*a+i*o)/(Math.sqrt(r*r+i*i)*Math.sqrt(a*a+o*o)),c=1/Math.sin(xi(s)/2),l=Math.sqrt(e[0]*e[0]+e[1]*e[1]);g=Math.min(h,(t-l)/(c-1)),_=Math.min(h,(n-l)/(c+1))}else g=_=0}return{a00:l,a01:s,a10:u,a11:c,da0:d,da1:f,rc:h,rc0:g,rc1:_,x01:v,y01:y,x10:b,y10:x,x11:S,y11:C,x00:w,y00:T}}function Ti(e){let t=(e.innerRadius+e.outerRadius)/2,n=(e.startAngle+e.endAngle)/2-_i;return[Math.cos(n)*t,Math.sin(n)*t]}function Ei(e,t,n){let r=Math.sqrt(t*t+n*n);return r>0?2*Math.asin(Math.min(1,e/2/r)):0}let Di=(e,t)=>Math.atan2(t,e);function Oi(e){let t=10**Math.max(0,Math.min(12,Math.floor(e.precision??2))),n=e=>{let n=Math.round(e*t)/t;return String(n===0?0:n)},r=``,i=(e,t)=>{r+=`M${n(e)},${n(t)}`},a=(e,t)=>{r+=`L${n(e)},${n(t)}`},o=(e,t,i,a)=>{r+=`A${n(e)},${n(e)},0,0,${t},${n(i)},${n(a)}`},s=(e,t,n,r)=>{let i=r?t-n:n-t;i=(i%vi+vi)%vi,i<$&&Math.abs(n-t)>$&&(i=vi);let a=r?t-i/2:t+i/2,s=+!r;o(e,s,e*Math.cos(a),e*Math.sin(a)),o(e,s,e*Math.cos(n),e*Math.sin(n))},c=Math.max(0,e.innerRadius),l=Math.max(0,e.outerRadius);l<c&&([c,l]=[l,c]);let u=e.startAngle-_i,d=e.endAngle-_i,f=Math.abs(d-u),p=d>u,m=+!!p;if(!(l>$)){i(0,0);for(let e=0;e<4;e++)o(0,m,0,0);a(0,0);for(let e=0;e<4;e++)o(0,m,0,0);return`${r}Z`}if(f>vi-$){let e=l*Math.cos(u),t=l*Math.sin(u);i(e,t),o(l,m,e,t),s(l,u,u+(p?vi:-vi)*(1-1e-9),!p),o(l,m,e,t);let n=c*Math.cos(u),d=c*Math.sin(u);if(a(n,d),o(c,m,n,d),c>$)s(c,u,u+(p?-vi:vi)*(1-1e-9),p);else for(let e=0;e<2;e++)o(0,m,0,0);return o(c,m,n,d),`${r}Z`}let{a00:h,a01:g,a10:_,a11:v,da0:y,da1:b,rc:x,rc0:S,rc1:C,x01:w,y01:T,x10:E,y10:D,x11:O,y11:k,x00:A,y00:j}=wi(e,c,l,u,d,f,p);if(b>$&&C>$){let e=Ci(A,j,w,T,l,C,p),t=Ci(O,k,E,D,l,C,p);if(i(e.cx+e.x01,e.cy+e.y01),C<x){let e=t.cx+t.x01,n=t.cy+t.y01;o(C,m,e,n),o(l,m,e,n),o(l,m,e,n),o(C,m,e,n)}else o(C,m,e.cx+e.x11,e.cy+e.y11),s(l,Di(e.cx+e.x11,e.cy+e.y11),Di(t.cx+t.x11,t.cy+t.y11),!p),o(C,m,t.cx+t.x01,t.cy+t.y01)}else{if(i(w,T),o(l,m,w,T),b>$)s(l,g,v,!p);else for(let e=0;e<2;e++)o(l,m,w,T);o(l,m,O,k)}if(!(c>$)||!(y>$)){a(E,D);for(let e=0;e<4;e++)o(c,m,E,D)}else if(S>$){let e=Ci(E,D,O,k,c,-S,p),t=Ci(w,T,A,j,c,-S,p);if(a(e.cx+e.x01,e.cy+e.y01),S<x){let e=t.cx+t.x01,n=t.cy+t.y01;o(S,m,e,n),o(c,m,e,n),o(c,m,e,n),o(S,m,e,n)}else o(S,m,e.cx+e.x11,e.cy+e.y11),s(c,Di(e.cx+e.x11,e.cy+e.y11),Di(t.cx+t.x11,t.cy+t.y11),p),o(S,m,t.cx+t.x01,t.cy+t.y01)}else a(E,D),o(c,m,E,D),s(c,_,h,p),o(c,m,A,j);return`${r}Z`}function ki(e,t){let n=D(`path`,{class:e,d:Oi(t)});return n.arc=[t.innerRadius,t.outerRadius,t.startAngle,t.endAngle,t.padAngle??0,t.cornerRadius??0],n}function Ai(e,t,n){let{arc:r,attrs:i}=n;if(!r||t.attrs.d===i.d)return;let a=er(e)??t.arc,o=Number.parseFloat(getComputedStyle(e).transitionDuration)*1e3;if(a&&o>0)return tr(e,a,r,o,([e,t,n,r,i,a])=>Oi({innerRadius:e,outerRadius:t,startAngle:n,endAngle:r,padAngle:i,cornerRadius:a}),String(i.d)),{...i,d:t.attrs.d}}let ji=Math.PI/2;function Mi(e){let{data:t}=e;return typeof t==`number`?[{name:``,value:t}]:Array.isArray(t)?t:[t]}function Ni(e,t){let n=e.max??100;return Mi(e).map((e,t)=>({data:e,index:t,max:e.max??n})).filter(e=>!t.has(q(e.data))).map((e,t)=>({...e,position:t,value:Math.min(e.max,Math.max(0,e.data.value||0))}))}function Pi(e,t,n,r,i){let a=[[0,0]],o=t+n;a.push([Math.sin(t),-Math.cos(t)],[Math.sin(o),-Math.cos(o)]);for(let e=Math.ceil(t/ji)*ji,n=0;n<5&&e<=o+1e-9;n++)a.push([Math.sin(e),-Math.cos(e)]),e+=ji;let s=Math.min(e.width,e.height)/2,c={x0:0,y0:0,x1:0,y1:0};for(let t=0;t<4;t++){c={x0:0,y0:r,x1:0,y1:i};for(let[e,t]of a)c.x0=Math.min(c.x0,e*s),c.x1=Math.max(c.x1,e*s),c.y0=Math.min(c.y0,t*s),c.y1=Math.max(c.y1,t*s);let t=Math.min(e.width/(c.x1-c.x0),e.height/(c.y1-c.y0));if(Math.abs(t-1)<.001)break;s=Math.max(0,s*t)}return{outer:s,cx:e.x+(e.width-(c.x1-c.x0))/2-c.x0,cy:e.y+(e.height-(c.y1-c.y0))/2-c.y0}}function Fi(e,r){let{width:i,height:a,locale:o}=r,s=Math.max(1,e.thickness??12),c=Math.max(0,e.gap??4),l=e.cornerRadius??s/2,u=t(e.padding,0),d=n(i,a,{top:u.top+8,right:u.right+8,bottom:u.bottom+8,left:u.left+8}),f=(e.startAngle??0)*yi,p=Math.min(360,Math.max(0,e.angle??360))*yi,m=Ni(e,r.hidden),h=e.center,g=m[0],_=h!==!1&&g!==void 0,v=_?h?.label??(g.data.name||void 0):void 0,{outer:y,cx:b,cy:x}=Pi(d,f,p,_?-1.4*r.fontSize:0,_?(v?2:.7)*r.fontSize:0),S=z(e.format,o),C=I(o,{style:`percent`,maximumFractionDigits:1}),w=(e,t=0)=>{let n=Math.max(0,y-e.position*(s+c));return{innerRadius:Math.max(0,n-s-t),outerRadius:n+t}},T=e=>e.max>0?e.value/e.max:0,E=(e,t=0)=>({...w(e,t),startAngle:f,endAngle:f+p*T(e),cornerRadius:l}),O=e=>{let[t,n]=Ti(E(e)),r={name:e.data.name,seriesIndex:e.index,value:e.value,text:`${S(e.value)} (${C.format(T(e))})`,x:b+t,y:x+n};return e.data.color&&(r.color=e.data.color),{index:e.position,label:e.data.name,title:``,x:b+t,area:{x:b-y,y:x-y,width:y*2,height:y*2},items:[r],seriesIndex:e.index,mark:{d:Oi(E(e,2)),x:b,y:x}}},k={count:m.length,hitIndex:e=>{let t=m[e];return t?O(t):null},hitTest(e,t){let n=Math.hypot(e-b,t-x),r=m.find(e=>{let{innerRadius:t,outerRadius:r}=w(e,2);return n>=t&&n<=r});return r?O(r):null}};r.onHitTest(k);let A=m.map(e=>D(`g`,Pe(e.data,e.index),ki(`tc-gauge-track`,{...E(e),endAngle:f+p}),ki(`tc-gauge-arc`,E(e)))),j=_?h?.value??C.format(T(g)):``;return[D(`g`,{class:`tc-gauge`,style:`transform:translate(${b}px,${x}px)`},D(`g`,{class:`tc-gauge-rings`},A)),_&&D(`g`,{class:`tc-gauge-center`,"aria-hidden":`true`},D(`text`,{class:`tc-gauge-value`,x:b,y:x,dy:v?`0`:`0.35em`,"text-anchor":`middle`},j),v&&D(`text`,{class:`tc-gauge-label`,x:b,y:x,dy:`1.6em`,"text-anchor":`middle`},v))]}function Ii(e,t){let n=z(e.format,t.locale),r=I(t.locale,{style:`percent`,maximumFractionDigits:1});return{columns:[``,`Value`,`Share`],rows:Ni(e,t.hidden).map(e=>[e.data.name,n(e.value),r.format(e.max>0?e.value/e.max:0)])}}let Li={name:`gauge`,clean:K(e=>Me(typeof e==`number`?[{name:``,value:e}]:we(e)?[e]:e)),render:(e,t)=>(S.sweep=Ai,Fi(e,t)),legend:e=>Ne(Mi(e)),table:Ii},Ri=`var(--tc-heat-empty,var(--tc-grid-color))`,zi=(e,t=`var(--tc-heat-color,var(--tc-color-1))`)=>`color-mix(in oklab,${t} ${s(e*100)}%,${Ri})`,Bi=(e,t)=>e.name??`range-${t+1}`,Vi=(e,t)=>e.findIndex(e=>(e.from===void 0||t>=e.from)&&(e.to===void 0||t<e.to)),Hi=(e,t)=>e.color??(t<8?`var(--tc-color-${t+1})`:`var(--tc-color-other)`);function Ui(e,t,n,r,i){let a=Math.max(0,Math.min(i,n/2,r/2)),o=s;return`M${o(e+a)},${o(t)}H${o(e+n-a)}A${o(a)},${o(a)},0,0,1,${o(e+n)},${o(t+a)}V${o(t+r-a)}A${o(a)},${o(a)},0,0,1,${o(e+n-a)},${o(t+r)}H${o(e+a)}A${o(a)},${o(a)},0,0,1,${o(e)},${o(t+r-a)}V${o(t+a)}A${o(a)},${o(a)},0,0,1,${o(e+a)},${o(t)}Z`}function Wi(e,r){let{width:i,height:o,fontSize:c,locale:l}=r,{gap:u=2,radius:d=3}=e,f=Ie(e.data),p=e.x?.format??(e=>String(e)),m=z(e.format,l),[h,g]=xe(e.data.series.flatMap(e=>e.values))??[0,1],_=e.min??Math.min(0,h),v=e.max??g,y=t=>{let{mid:n}=e,r;return r=n!==void 0&&e.colors&&_<n&&n<v?t<=n?(t-_)/(n-_)*.5:.5+(t-n)/(v-n)*.5:v>_?(t-_)/(v-_):+(t>_),Math.min(1,Math.max(0,r))},b=e=>.08+.92*y(e),x=e.ranges?.length?e.ranges:void 0,S=!x&&e.colors&&e.colors.length>=2?e.colors:void 0,C=!x&&!S&&e.colorBy===`series`,w=C?e.data.series.filter(e=>!r.hidden.has(Y(e))):e.data.series,T=t=>e.data.series.indexOf(t),E=(e,t)=>{if(x){let t=Vi(x,e),n=x[t];return!n||r.hidden.has(Bi(n,t))?{color:Ri,empty:!0}:{style:{"--tc-cell-fill":n.color},color:n.color}}if(S){let t=y(e)*(S.length-1),n=Math.min(S.length-2,Math.floor(t)),r=s((t-n)*100),i=S[n],a=r<=0?i:r>=100?S[n+1]:`color-mix(in oklab,${S[n+1]} ${r}%,${i})`;return{style:{"--tc-cell-fill":a},color:a}}let n=b(e);return{style:`--tc-heat:${s(n*100)}%`,color:C?zi(n,Hi(t,T(t))):zi(n)}},O=t(e.padding,0),k=e.x?.show!==!1&&f.length>0,A=e.y?.show!==!1&&w.length>0,j=w.map((e,t)=>({value:t,position:0,label:e.name})),M=A?W(`left`,j,c):0,N=k?W(`bottom`,[{value:0,position:0,label:`M`}],c):0,P=k?a(p(f[f.length-1],f.length-1),c):0,F=(i-O.left-O.right-M)/Math.max(1,f.length)/2,I=n(i,o,{top:O.top,right:O.right+Math.max(0,Math.ceil(P/2-F)),bottom:O.bottom+N,left:O.left+M}),L=ye(f.map((e,t)=>t),[I.x,I.x+I.width]),R=ye(w.map((e,t)=>t),[I.y,I.y+I.height]),B=Math.max(0,L.bandwidth-u),V=Math.max(0,R.bandwidth-u),ee=e=>L.at(e)+u/2,H=e=>R.at(e)+u/2,U=(e,t)=>{let n=w[t]?.values[e];return n!=null&&Number.isFinite(n)?n:null},te=(e,t=0)=>{if(e<0||e>=f.length||w.length===0)return null;let n=Math.max(0,Math.min(w.length-1,t)),r=w.map((t,n)=>{let r=U(e,n),i=x&&r!==null?x[Vi(x,r)]:void 0;return{name:t.name,seriesIndex:n,value:r,text:r===null?`–`:i?.name?`${m(r)} · ${i.name}`:m(r),x:ee(e)+B/2,y:H(n)+V/2,box:{x:ee(e),y:H(n),width:B,height:V},color:r===null?`var(--tc-grid-color)`:E(r,t).color}});return{index:e,label:J(f[e]),title:p(f[e],e),x:ee(e)+B/2,area:I,items:r,seriesIndex:n,mark:{d:Ui(ee(e)-2,H(n)-2,B+4,V+4,d+2),x:0,y:0}}},ne={count:f.length,hitIndex:(e,t)=>te(e,t),hitTest(e,t){if(e<I.x||e>I.x+I.width||t<I.y||t>I.y+I.height)return null;let n=Math.min(f.length-1,Math.floor((e-I.x)/(L.step||1))),r=Math.min(w.length-1,Math.floor((t-I.y)/(R.step||1)));return te(n,r)}};r.onHitTest(ne);let re=w.map((e,t)=>D(`g`,{key:Y(e),class:[`tc-heatmap-row`,C&&[`tc-series`,`tc-series-${T(e)+1}`]],"data-series":e.name,style:C?{"--tc-series-color":e.color}:void 0},f.map((n,r)=>{let i=U(r,t),a=i===null?void 0:E(i,e);return D(`rect`,{key:J(n),class:[`tc-cell`,(i===null||a?.empty)&&`tc-cell-empty`],x:s(ee(r)),y:s(H(t)),width:s(B),height:s(V),rx:s(Math.min(d,B/2,V/2)),style:a?.style})}))),ie=k?ge(me(L,(e,t)=>p(f[t],t)),`bottom`,c):[],ae=A?me(R,(e,t)=>w[t]?.name??``):[];return[D(`g`,{class:`tc-heatmap-cells`},re),k&&_e({position:`bottom`,ticks:ie,area:I}),A&&_e({position:`left`,ticks:ae,area:I})]}function Gi(e){let{ranges:t}=e;if(t?.length){let n=z(e.format,e.locale);return t.map((e,t)=>({key:Bi(e,t),name:e.name??(e.from===void 0?`< ${n(e.to??0)}`:e.to===void 0?`≥ ${n(e.from)}`:`${n(e.from)}–${n(e.to)}`),index:t,color:e.color}))}return e.colors&&e.colors.length>=2?[]:e.colorBy===`series`?Fe(e.data):[]}let Ki={name:`heatmap`,clean:K(je),render:Wi,legend:Gi,valueLabels:{marks:`cell`,format:e=>e.format},table:(e,t,n)=>et({data:e.data,...e.x?{x:e.x}:{},y:{format:e.format}},t,n)};function qi(e,t){let n=e.data.map((e,t)=>({data:e,index:t,value:Math.max(0,e.value||0)})).filter(e=>!t.has(q(e.data))),r=n.reduce((e,t)=>e+t.value,0),i=(e.startAngle??0)*yi;return{slices:n.map(e=>{let t=r>0?e.value/r*Math.PI*2:0,n={...e,startAngle:i,endAngle:i+t};return i+=t,n}),total:r}}function Ji(e,r,i){let{width:a,height:o,locale:s}=r,c=e.gap??2,l=n(a,o,t(e.padding,0)),u=Math.max(0,Math.min(l.width,l.height)/2-8),d=u*Math.min(.95,Math.max(0,e.innerRadius??i.inner)),f=e.cornerRadius??i.corner,p=l.x+l.width/2,m=l.y+l.height/2,{slices:h,total:g}=qi(e,r.hidden),_=h.filter(e=>e.value>0),v=d===0&&_.length>1?c:0,y=d>0&&_.length>1?Ei(c,d,u):0,b=z(e.format,s),x=I(s,{style:`percent`,maximumFractionDigits:1}),S=(e,t=d,n=u)=>({innerRadius:t,outerRadius:n,startAngle:e.startAngle,endAngle:e.endAngle,padAngle:y,cornerRadius:f}),C=(e,t)=>{let[n,r]=Ti(S(e)),i={name:e.data.name,seriesIndex:e.index,value:e.value,text:`${b(e.value)} (${x.format(g>0?e.value/g:0)})`,x:p+n,y:m+r};return e.data.color&&(i.color=e.data.color),{index:t,label:e.data.name,title:``,x:p+n,area:{x:p-u,y:m-u,width:u*2,height:u*2},items:[i],seriesIndex:e.index,mark:{d:Oi({...S(e,u+2,u+6),cornerRadius:2}),x:p,y:m}}},w={count:_.length,hitIndex:e=>{let t=_[e];return t?C(t,e):null},hitTest(t,n){let r=t-p,i=n-m,a=Math.hypot(r,i);if(a<d-2||a>u+8)return null;let o=(e.startAngle??0)*yi,s=Math.PI*2,c=Math.atan2(r,-i);c=o+((c-o)%s+s)%s;let l=_.findIndex(e=>c>=e.startAngle&&c<e.endAngle);return l===-1?null:C(_[l],l)}};r.onHitTest(w);let T=h.map(e=>D(`g`,Pe(e.data,e.index),ki(`tc-slice`,S(e)))),E=e.center,O=d>0&&E!==!1,k=O?E?.value??b(g):``,A=O?E?.label:void 0;return[D(`g`,{class:`tc-pie`,style:`transform:translate(${p}px,${m}px)`},g===0&&D(`path`,{class:`tc-pie-track`,d:Oi({innerRadius:d,outerRadius:u,startAngle:0,endAngle:Math.PI*2})}),D(`g`,{class:`tc-pie-slices`,style:v>0?`--tc-pie-gap:${v}px`:void 0},T)),O&&D(`g`,{class:`tc-pie-center`,"aria-hidden":`true`},D(`text`,{class:`tc-pie-value`,x:p,y:m,dy:A?`0`:`0.35em`,"text-anchor":`middle`},k),A&&D(`text`,{class:`tc-pie-label`,x:p,y:m,dy:`1.6em`,"text-anchor":`middle`},A))]}function Yi(e,t){let{slices:n,total:r}=qi(e,t.hidden),i=z(e.format,t.locale),a=I(t.locale,{style:`percent`,maximumFractionDigits:1});return{columns:[``,`Value`,`Share`],rows:n.map(e=>[e.data.name,i(e.value),a.format(r>0?e.value/r:0)])}}function Xi(e,t){return{name:e,clean:K(Me),render:(e,n)=>(S.sweep=Ai,Ji(e,n,t)),legend:e=>Ne(e.data),table:Yi,valueLabels:{marks:`slice`}}}let Zi=Xi(`pie`,{inner:0,corner:0}),Qi=Xi(`donut`,{inner:.62,corner:4});function $i(e,t,n){if(a(e,n)<=t)return e;let r=e.length;for(;r>0&&a(`${e.slice(0,r)}…`,n)>t;)r--;return r>0?`${e.slice(0,r).trimEnd()}…`:``}function ea(e,t,n){let r=[],i=``;for(let o of e.split(` `)){let e=i?`${i} ${o}`:o;!i||a(e,n)<=t?i=e:(r.push(i),i=o)}return r.push(i),r.length>3&&r.splice(2,r.length,r.slice(2).join(` `)),r}let ta=e=>e>.1?1:e<-.1?-1:0;function na(e,t,n,r){let i=Math.min(e.width,e.height)/2;return t.forEach((t,o)=>{let s=Math.sin(t),c=Math.cos(t),l=n[o]??[],u=Math.max(0,...l.map(e=>a(e,r))),d=ra(l.length,r),f=ta(s),p=f===0?u/2:u+8;if(Math.abs(s)>1e-6&&(i=Math.min(i,(e.width/2-p)/Math.abs(s))),Math.abs(c)>1e-6){let t=(f===0?d+8:d/2)/Math.abs(c);i=Math.min(i,e.height/2/Math.abs(c)-t)}}),Math.max(0,i)}let ra=(e,t)=>t*(1+Math.max(0,e-1)*c);function ia(e,r){let{width:i,height:a,fontSize:o,locale:l}=r,u=e.r??{},{fill:d=!0,points:f=!1,pointRadius:p=4}=e,m=e.data.series,h=Ie(e.data),g=h.length,_=m.filter(e=>!r.hidden.has(Y(e))),v=e.format??(e=>String(e)),y=U(u.format,l),b=t(e.padding),x=n(i,a,{top:b.top+8,right:b.right+8,bottom:b.bottom+8,left:b.left+8}),S=x.x+x.width/2,C=x.y+x.height/2,w=h.map((e,t)=>t/Math.max(1,g)*Math.PI*2),T=h.map((e,t)=>v(e,t)),E=e.labelWidth??x.width/4,O=T.map(e=>ea(e,E,o)),k=Math.max(na(x,w,O,o),Math.min(x.width,x.height)/2*.5),A=O.map((e,t)=>{let n=Math.sin(w[t]),r=ta(n)===0?x.width:x.width/2-k*Math.abs(n)-8;return e.map(e=>$i(e,r,o))}),j=We(u,Math.max(2,Math.round(k/40))),M=Se(Ke(_.flatMap(e=>e.values),u,!0,j),[0,k],{clamp:!0}),N=pe(M,{count:j,format:u.format,locale:l}),P=(e,t)=>[S+t*Math.sin(w[e]),C-t*Math.cos(w[e])],F=e=>`${e.map((e,t)=>`${t?`L`:`M`}${P(t,e).map(s).join(`,`)}`).join(``)}Z`,I=t=>e.grid===`circle`?`M${s(S)},${s(C-t)}A${s(t)},${s(t)},0,1,1,${s(S)},${s(C+t)}A${s(t)},${s(t)},0,1,1,${s(S)},${s(C-t)}Z`:F(h.map(()=>t)),L=e=>e!=null&&Number.isFinite(e)?M(e):0,R=e=>{let t=[];m.forEach((n,i)=>{if(r.hidden.has(Y(n)))return;let a=n.values[e],o=a!=null&&Number.isFinite(a)?a:null,[s,c]=P(e,L(o)),l={name:n.name,seriesIndex:i,value:o,text:o===null?`–`:y(o),x:s,y:o===null?null:c};n.color&&(l.color=n.color),t.push(l)});let[n,i]=P(e,k);return{index:e,label:J(h[e]),title:T[e],x:n,area:{x:S-k,y:C-k,width:k*2,height:k*2},items:t,guide:{x1:S,y1:C,x2:n,y2:i}}},z={count:g,hitTest(e,t){if(g===0||Math.hypot(e-S,t-C)>k+8)return null;let n=Math.atan2(e-S,C-t),r=(n<0?n+Math.PI*2:n)/(Math.PI*2);return R(Math.round(r*g)%g)},hitIndex(e,t){if(e<0||e>=g)return null;let n=R(e);return t!==void 0&&n.items.some(e=>e.seriesIndex===t)&&(n.seriesIndex=t),n}};r.onHitTest(z);let B=D(`g`,{key:`grid`,class:`tc-radar-grid`,"aria-hidden":`true`},N.filter(e=>e.position>0).map(e=>D(`path`,{key:e.value,class:`tc-radar-ring`,d:I(e.position)})),h.map((e,t)=>{let[n,r]=P(t,k);return D(`line`,{key:J(e),class:`tc-radar-spoke`,x1:s(S),y1:s(C),x2:s(n),y2:s(r)})})),V=m.map((e,t)=>{if(r.hidden.has(Y(e)))return null;let n=F(h.map((t,n)=>L(e.values[n])));return D(`g`,Qe(e,t),d&&D(`path`,{class:`tc-area`,d:n}),D(`path`,{class:`tc-line`,d:n}),f&&D(`g`,{class:`tc-points`},h.map((t,n)=>{let r=e.values[n];if(r==null||!Number.isFinite(r))return null;let[i,a]=P(n,M(r));return D(`circle`,{key:J(t),class:`tc-point`,cx:s(i),cy:s(a),r:p})})))}),ee=D(`g`,{key:`labels`,class:`tc-radar-labels`,"aria-hidden":`true`},h.map((e,t)=>{let n=w[t],r=ta(Math.sin(n)),i=Math.cos(n),[a,o]=P(t,k+8),[l=``,...u]=A[t]??[],d=u.length*c,f=r===0?i>0?`${s(-d)}em`:`0.71em`:`${s(.35-d/2)}em`;return D(`text`,{key:J(e),class:`tc-tick-label tc-radar-label`,x:s(a),y:s(o),"text-anchor":r>0?`start`:r<0?`end`:`middle`,dy:f},l,u.map((e,t)=>D(`tspan`,{key:t,x:s(a),dy:`${c}em`},e)))})),H=u.show!==!1&&D(`g`,{key:`values`,class:`tc-radar-values`,"aria-hidden":`true`},N.filter(e=>e.position>0).map(e=>D(`text`,{key:e.value,class:`tc-tick-label tc-radar-value`,x:s(S+4),y:s(C-e.position),dy:`0.35em`},e.label)));return[B,D(`g`,{key:`series`,class:`tc-series-list tc-radar-series`,style:`transform-origin:${s(S)}px ${s(C)}px`},V),ee,H]}let aa={name:`radar`,clean:K(je),render:ia,legend:e=>Fe(e.data),table:(e,t,n)=>et({data:e.data,...e.r?.format?{y:{format:e.r.format}}:{},...e.format?{x:{format:e.format}}:{}},t,n)};function oa(e,t,n){if(a(e,n)<=t)return e;let r=e.length;for(;r>0&&a(`${e.slice(0,r)}…`,n)>t;)r--;return r>0?`${e.slice(0,r).trimEnd()}…`:``}let sa=e=>e.data.color??`var(--tc-color-${e.slot})`;function ca(e,t,n){let r=/* @__PURE__ */ new Map,i=[],a=(e,t)=>{let n=r.get(e);return n||(n={data:t??{name:e},index:i.length,slot:1,column:0,value:0,x:0,y:0,height:0,ins:[],outs:[]},r.set(e,n),i.push(n)),n},o=new Map((e.nodes??[]).map(e=>[e.name,e])),s=n=>{let r=o.get(n);return t.has(n)||r?.color!==void 0&&t.has(la(e,r.color))},c=[];e.links.forEach((e,t)=>{if(e.from===e.to||s(e.from)||s(e.to))return;let n=a(e.from,o.get(e.from)),r=a(e.to,o.get(e.to)),i={data:e,index:t,source:n,target:r,sy:0,ty:0,width:0};c.push(i),!(e.value<=0)&&(n.outs.push(i),r.ins.push(i))});for(let e of i)e.value=Math.max(e.outs.reduce((e,t)=>e+t.data.value,0),e.ins.reduce((e,t)=>e+t.data.value,0));for(let e=0;e<i.length;e++){let e=!1;for(let t of c)t.data.value>0&&t.target.column<=t.source.column&&(t.target.column=t.source.column+1,e=!0);if(!e)break}let l=i.reduce((e,t)=>Math.max(e,t.column),0);if(n)for(let e of i)e.outs.length===0&&(e.column=l);let u=[...o.keys()];i.sort((e,t)=>{if(e.column!==t.column)return e.column-t.column;let n=u.indexOf(e.data.name),r=u.indexOf(t.data.name);return n!==-1&&r!==-1?n-r:n===r?e.index-t.index:n===-1?1:-1});let d=/* @__PURE__ */ new Map;return i.forEach((e,t)=>{e.index=t;let n=(d.get(e.column)??0)+1;d.set(e.column,n),e.slot=(n-1)%8+1}),{nodes:i,links:c,columns:l+1}}let la=(e,t)=>(e.nodes??[]).find(e=>e.color===t)?.name??t;function ua(e,r){let{width:i,height:o,fontSize:s,locale:c}=r,l=Math.max(1,e.nodeWidth??12),u=Math.max(0,e.nodePadding??16),d=n(i,o,t(e.padding)),{nodes:f,links:p,columns:m}=ca(e.data,r.hidden,e.align!==`left`),h=U(e.format,c),g=f.map(e=>[e.data.name,h(e.value)]),_=e=>f.reduce((t,n,r)=>{if(!e(n))return t;let[i,o]=g[r];return Math.max(t,a(i,s),a(o,s))},0),v=d.width*.3,y=m>1?Math.min(v,_(e=>e.column===0)):0,b=Math.min(v,_(e=>e.column===m-1)),x={x:d.x+(y?y+8:0),y:d.y,width:Math.max(0,d.width-(y?y+8:0)-(b?b+8:0)),height:d.height},S=m>1?(x.width-l)/(m-1):0,C=Array.from({length:m},()=>[]);for(let e of f)C[e.column]?.push(e);let w=C.reduce((e,t)=>t.length>1?Math.min(e,x.height/2/(t.length-1)):e,u),T=1/0;for(let e of C){let t=e.reduce((e,t)=>e+t.value,0);t>0&&(T=Math.min(T,(x.height-(e.length-1)*w)/t))}(!Number.isFinite(T)||T<0)&&(T=0),C.forEach((e,t)=>{let n=e.reduce((e,t)=>e+t.value*T,0)+(e.length-1)*w,r=x.y+(x.height-n)/2;for(let n of e)n.x=x.x+(m>1?t*S:(x.width-l)/2),n.y=r,n.height=n.value*T,r+=n.height+w});for(let e of f){let t=e.y;for(let n of[...e.outs].sort((e,t)=>e.target.y-t.target.y))n.sy=t,n.width=n.data.value*T,t+=n.width;t=e.y;for(let n of[...e.ins].sort((e,t)=>e.source.y-t.source.y))n.ty=t,t+=n.data.value*T}return{nodes:f,links:p,plot:x,nodeWidth:l,labels:f.map((e,t)=>{let[n,r]=g[t],i=e.column===0&&m>1?`left`:`right`,a=i===`left`?y:e.column===m-1?b:S-l-16,o=C[e.column],c=o.indexOf(e),u=[o[c-1],o[c+1]].filter(e=>!!e).reduce((t,n)=>Math.min(t,(e.height+n.height)/2+w),1/0)>=s*2.25;return{side:i,name:oa(n,a,s),value:u?oa(r,a,s):``}})}}function da(e,t){let n=e.source.x+t,r=e.target.x,i=(n+r)/2,{sy:a,ty:o,width:c}=e,l=(...e)=>e.map(s).join(`,`);return`M${l(n,a)}C${l(i,a,i,o,r,o)}L${l(r,o+c)}C${l(i,o+c,i,a+c,n,a+c)}Z`}let fa=(e,t,n,r,i)=>{let a=1-i;return a*a*a*e+3*a*a*i*t+3*a*i*i*n+i*i*i*r};function pa(e,t,n,r){let i=e.source.x+t,a=e.target.x;if(n<Math.min(i,a)||n>Math.max(i,a)||i===a)return!1;let o=(i+a)/2,s=0,c=1;for(let e=0;e<20;e++){let e=(s+c)/2;fa(i,o,o,a,e)<n==a>i?s=e:c=e}let l=fa(e.sy,e.sy,e.ty,e.ty,(s+c)/2);return r>=l&&r<=l+e.width}function ma(e,t){let{nodes:n,links:r,plot:i,nodeWidth:a,labels:o}=ua(e,t),c=r.filter(e=>e.data.value>0),l=U(e.format,t.locale),u=e=>({d:`M0,0h${s(a)}v${s(e.height)}h${s(-a)}Z`,x:e.x,y:e.y}),d=e=>({name:`${e.source.data.name} → ${e.target.data.name}`,seriesIndex:e.index,color:sa(e.source),value:e.data.value,text:l(e.data.value),x:(e.source.x+a+e.target.x)/2,y:fa(e.sy,e.sy,e.ty,e.ty,.5)+e.width/2}),f=(e,t)=>{let n={name:e.data.name,seriesIndex:r.length+e.index,color:sa(e),value:e.value,text:l(e.value),x:e.x+a/2,y:e.y+e.height/2},o=[...e.ins,...e.outs].map(d),s=o.find(e=>e.seriesIndex===t),f=s&&c.find(e=>e.index===t);return{index:e.index,label:e.data.name,title:``,x:n.x,area:i,items:[n,...o],seriesIndex:s?t:n.seriesIndex,mark:f?{d:da(f,a),x:0,y:0}:u(e)}},p=e=>{let t=d(e);return{index:e.source.index,label:e.source.data.name,title:``,x:t.x,area:i,items:[t],seriesIndex:e.index,mark:{d:da(e,a),x:0,y:0}}},m={count:n.length,hitTest(e,t){let r=n.find(n=>e>=n.x-2&&e<=n.x+a+2&&t>=n.y-2&&t<=n.y+n.height+2);if(r)return f(r);let i=c.find(n=>pa(n,a,e,t));return i?p(i):null},hitIndex(e,t){let r=n[e];return r?f(r,t):null}};return t.onHitTest(m),[D(`g`,{key:`links`,class:`tc-sankey-links`},c.map(e=>D(`path`,{key:`${e.source.data.name}→${e.target.data.name}#${e.index}`,class:[`tc-series`,`tc-series-${e.source.slot}`,`tc-sankey-link`],style:{"--tc-series-color":e.source.data.color},d:da(e,a)}))),D(`g`,{key:`nodes`,class:`tc-sankey-nodes`},n.map(e=>D(`g`,{key:e.data.name,class:[`tc-series`,`tc-series-${e.slot}`],"data-series":e.data.name,style:{"--tc-series-color":e.data.color}},D(`rect`,{class:`tc-sankey-node`,x:s(e.x),y:s(e.y),width:s(a),height:s(e.height)})))),D(`g`,{key:`labels`,class:`tc-sankey-labels`,"aria-hidden":`true`},n.map((e,t)=>{let n=o[t];if(!n.name&&!n.value)return null;let r=s(n.side===`left`?e.x-8:e.x+a+8),i=s(e.y+e.height/2),c=n.side===`left`?`end`:`start`;return D(`g`,{key:e.data.name,class:`tc-sankey-label`},D(`text`,{class:`tc-value-label tc-sankey-name`,x:r,y:i,dy:n.value?`-0.25em`:`0.35em`,"text-anchor":c},n.name),n.value&&D(`text`,{class:`tc-tick-label tc-sankey-value`,x:r,y:i,dy:`0.95em`,"text-anchor":c},n.value))}))]}function ha(e){let t=/* @__PURE__ */ new Map;for(let n of e.data.nodes??[])if(n.color&&!t.has(n.color)){let e={key:n.name,name:n.name,index:t.size,color:n.color};n.hidden&&(e.hidden=!0),t.set(n.color,e)}return[...t.values()]}function ga(e,t){let{links:n}=ca(e.data,t.hidden,!0),r=U(e.format,t.locale);return{columns:[`From`,`To`,`Value`],rows:n.map(e=>[e.data.from,e.data.to,r(e.data.value)])}}let _a={name:`sankey`,clean:K(e=>{let t=we(e)?e:{};return{...t,nodes:Array.isArray(t.nodes)?ke(t.nodes,e=>Ae(e)):void 0,links:ke(t.links,e=>({from:Ee(e.from),to:Ee(e.to),value:Math.max(0,G(e.value)??0)}))}}),render:ma,legend:ha,table:ga},va=e=>`M${e},0A${e},${e},0,1,1,${-e},0A${e},${e},0,1,1,${e},0Z`,ya=e=>e.size!=null&&Number.isFinite(e.size)&&e.size>0?e.size:void 0;function ba(e,r){let{width:i,height:o,fontSize:l,locale:u}=r,d=e.x??{},f=e.y??{},p=e.radius??4,m=e.data.series.filter(e=>!r.hidden.has(q(e))).flatMap(e=>e.points),h=m.map(ya).filter(e=>e!==void 0),g=xe(h)?.[1]??0,_=e.size?.min??4,v=e.size?.max??24,y=e=>e!=null&&e>0&&g>0?_+(v-_)*Math.sqrt(e/g):p,b=Math.max(p,h.length?v:0)+2,x=We(f,Math.max(2,Math.round(o/60))),S=We(d,Math.max(2,Math.round(i/80))),C=e=>Le(e.x,d)&&Le(e.y,f),w=m.filter(C),T=Ke(w.map(e=>e.x),d,!1,S),E=Ke(w.map(e=>e.y),f,!1,x),O=d.show!==!1,k=f.show!==!1,A=(e,t,n)=>He(e,t,n,t.format,u),j=A(Ve(E,[1,0],f),f,x),M=A(Ve(T,[0,1],d),d,S),N=e=>O&&e?Math.ceil(a(e.label,l)/2):0,P=t(e.padding),F=n(i,o,{top:P.top+Math.max(k?Math.ceil(l*c/2):0,b,4),right:P.right+Math.max(N(M[M.length-1]),b,8),bottom:P.bottom+Math.max(O?W(`bottom`,M,l):0,b,4),left:P.left+Math.max(k?W(`left`,j,l):0,N(M[0]),b)}),I=Ve(T,[F.x,F.x+F.width],d),L=Ve(E,[F.y+F.height,F.y],f),R=ge(A(I,d,S),`bottom`,l),B=ge(A(L,f,x),`left`,l,4),V=[];e.data.series.forEach((e,t)=>{r.hidden.has(q(e))||e.points.forEach((e,n)=>{C(e)&&V.push({seriesIndex:t,pointIndex:n,point:e,cx:I(e.x),cy:L(e.y),r:y(ya(e))})})}),V.sort((e,t)=>e.cx-t.cx);let ee=U(d.format,u),H=U(f.format,u),te=z(void 0,u),ne=(t,n)=>{let r=e.data.series[t.seriesIndex],i=ya(t.point),a=i===void 0?``:` · ${te(i)}`,o={name:r.name,seriesIndex:t.seriesIndex,value:t.point.y,text:`${ee(t.point.x)}, ${H(t.point.y)}${a}`,x:t.cx,y:t.cy};return r.color&&(o.color=r.color),{index:n,label:t.point.label??r.name,title:t.point.label??``,x:t.cx,area:F,items:[o],seriesIndex:t.seriesIndex,mark:{d:va(s(t.r+4)),x:t.cx,y:t.cy}}},re={count:V.length,hitIndex:e=>{let t=V[e];return t?ne(t,e):null},hitTest(e,t){let n=0,r=V.length,i=24+v;for(;n<r;){let t=n+r>>1;V[t].cx<e-i?n=t+1:r=t}let a=-1,o=1/0;for(let r=n;r<V.length;r++){let n=V[r];if(n.cx>e+i)break;let s=Math.hypot(n.cx-e,n.cy-t)-n.r;s<o&&s<=24&&(a=r,o=s)}return a===-1?null:ne(V[a],a)}};r.onHitTest(re);let ie=Ue(e),ae=(e,t)=>{if(!e.length)return null;let n=s(p),r=``;for(let i of e)r+=ie?ie(t,I(i.x),L(i.y),n):`M${s(I(i.x)-p)},${s(L(i.y))}a${n},${n},0,1,0,${2*n},0a${n},${n},0,1,0,${-2*n},0`;return D(`path`,{key:`dots`,class:[`tc-point tc-dots`,ie&&`tc-marker`],d:r})},oe=[];f.grid!==!1&&oe.push(ve({direction:`y`,ticks:B,area:F})),d.grid&&oe.push(ve({direction:`x`,ticks:R,area:F}));let se=Ze(r,F,h.length?0:b),ce=e.data.series.map((e,t)=>!r.hidden.has(q(e))&&D(`g`,Pe(e,t),ae(e.points.filter(e=>C(e)&&ya(e)===void 0),t),e.points.map((e,t)=>C(e)&&ya(e)!==void 0&&D(`circle`,{key:t,class:`tc-point tc-bubble`,cx:s(I(e.x)),cy:s(L(e.y)),r:s(y(ya(e)))}))));return[D(`defs`,null,se.def),oe,D(`g`,{key:`series`,class:`tc-series-list`,"clip-path":se.url},ce),k&&_e({position:`left`,ticks:B,area:F}),O&&_e({position:`bottom`,ticks:R,area:F})]}function xa(e,t,n=1/0){let r=U(e.x?.format,t.locale),i=U(e.y?.format,t.locale),a=z(void 0,t.locale),o=e.data.series.filter(e=>!t.hidden.has(q(e))),s=o.some(e=>e.points.some(e=>e.size!=null)),c=o.some(e=>e.points.some(e=>e.label!=null)),l=o.reduce((e,t)=>e+t.points.length,0),u=n;return{columns:[``,...c?[`Label`]:[],`x`,`y`,...s?[`Size`]:[]],total:l,rows:o.flatMap(e=>{let t=e.points.slice(0,Math.max(0,u));return u-=t.length,t.map(t=>[e.name,...c?[t.label??``]:[],r(t.x),i(t.y),...s?[ya(t)===void 0?`–`:a(ya(t))]:[]])})}}let Sa={name:`scatter`,clean:K(e=>({...we(e)?e:{},series:ke(we(e)&&e.series,e=>({...Ae(e),points:ke(e.points,e=>({...e,x:G(e.x),y:G(e.y),size:G(e.size)??void 0,label:e.label==null?void 0:Ee(e.label)})).filter(e=>e.x!==null&&e.y!==null)}))})),render:ba,legend:e=>Ne(e.data.series),table:xa,valueLabels:{format:e=>e.y?.format}};function Ca(e,r){let{variant:i=`line`,curve:a=`monotone`,point:o=`last`,markers:c=`none`,pointRadius:l=3,name:u=`Value`}=e,d=e.data.map(e=>e==null||!Number.isFinite(e)?null:e),f=d.length,p=o===`last`||c===`minmax`?l+2:2,m=t(e.padding,0),h=n(r.width,r.height,{top:m.top+p,right:m.right+p,bottom:m.bottom+p,left:m.left+p}),g=i===`tristate`,_=e.zero??i!==`line`,v=g?[-1,1]:Ke(d,{nice:!1},_,2),y=i===`bar`||g,b=f>0?h.width/f:0,x=e=>y?h.x+b*e+b/2:h.x+(f>1?h.width*e/(f-1):h.width/2),S=Se(v,[h.y+h.height,h.y]),C=S(Math.min(Math.max(0,v[0]),v[1])),w=d.map((e,t)=>e===null?null:[x(t),S(e)]),T=z(e.format,r.locale),E=t=>{let n=e.labels?.[t];return n===void 0?``:String(n)},O=e=>S(g?Math.sign(e):e),k=t=>{let n=d[t];if(n===void 0)return null;let r=x(t),i={name:u,seriesIndex:0,value:n,text:n===null?`–`:T(n),x:r,y:n===null?null:O(n)},a={index:t,label:J(e.labels?.[t]??t+1),title:E(t),x:r,area:h,items:[i]};return n!==null&&(a.mark={d:va(l+3),x:r,y:O(n)}),a},A={count:f,hitIndex:e=>k(e),hitTest(e,t){if(f===0||t<h.y-p||t>h.y+h.height+p)return null;let n=y?Math.floor((e-h.x)/b):Math.round((e-h.x)/Math.max(1,h.width)*(f-1));return k(Math.max(0,Math.min(f-1,n)))}};r.onHitTest(A);let j=[];if(g){let e=Math.max(1,b-1);j.push(D(`line`,{class:`tc-sparkline-zero`,x1:h.x,x2:h.x+h.width,y1:s(C),y2:s(C)})),d.forEach((t,n)=>{if(t===null)return;let r=Math.sign(t),i=Math.min(2,h.height/2),[a,o]=r===0?[C+i/2,C-i/2]:[C,S(r)];j.push(D(`path`,{key:n,class:[`tc-bar`,r<0&&`tc-bar-negative`,r<0?`tc-tristate-loss`:r>0?`tc-tristate-win`:`tc-tristate-draw`],d:ci(x(n)-e/2,e,a,o,r===0?0:Math.min(2,e/2))}))})}else if(y){let e=Math.max(1,b-1);d.forEach((t,n)=>{t!==null&&j.push(D(`path`,{key:n,class:[`tc-bar`,t<0&&`tc-bar-negative`],d:ci(x(n)-e/2,e,C,S(t),Math.min(2,e/2))}))})}else i===`area`&&j.push(D(`path`,{class:`tc-area tc-area-gradient`,d:vr(w,C,{curve:a}),mask:`url(#${r.id}-fade)`})),j.push(D(`path`,{class:`tc-line`,d:_r(w,{curve:a})}));let M=(e,t)=>{let n=d[e];return n==null?null:D(`circle`,{key:`${t}-${e}`,class:[`tc-point`,t],cx:s(x(e)),cy:s(S(n)),r:l})},N=[];if(c===`minmax`){let e=-1,t=-1;d.forEach((n,r)=>{n!==null&&((e===-1||n<d[e])&&(e=r),(t===-1||n>d[t])&&(t=r))}),e!==-1&&N.push(M(e,`tc-point-min`)),t!==-1&&t!==e&&N.push(M(t,`tc-point-max`))}let P=-1;if(o===`last`){for(let e=f-1;e>=0;e--)if(d[e]!==null){P=e;break}}return[i===`area`&&D(`defs`,null,ti(`${r.id}-fade`)),D(`g`,{class:`tc-series tc-series-1 tc-sparkline`},j,N,P!==-1&&!y&&M(P,`tc-point-last`))]}let wa={name:`sparkline`,clean:e=>({...K(Oe)(e),labels:Array.isArray(e.labels)?e.labels.map(De):void 0}),render:Ca,keyboard:!1},Ta={line:oi,area:si,bar:di,pie:Zi,donut:Qi,scatter:Sa,sparkline:wa,gauge:Li,heatmap:Ki,candlestick:hi,radar:aa,sankey:_a};C({time:{scale:Hn,points:Un,axis:Wn},dates:st,log:{scale:ct,domain:lt,ticks:ut},decimate:ar,line:{linePath:_r,areaPath:vr},annotations:{layers:ot,values:at},patterns:En,"point-shapes":On,hydrate:Qn,morph:ir}),T(An),T(Yn);let Ea=`[data-tc-chart]`,Da=/* @__PURE__ */ new Set([`chart`,`src`,`data`,`options`]),Oa=/* @__PURE__ */ new Set([`title`,`description`,`locale`,`sync`,`id`,`class`]),ka=/* @__PURE__ */ new WeakMap,Aa=/* @__PURE__ */ new WeakSet;function ja(e){return ka.get(e)}function Ma(e){ka.get(e)?.destroy(),ka.delete(e)}function Na(e){return e===`true`||e===``?!0:e===`false`?!1:e!==``&&Number.isFinite(Number(e))?Number(e):/^\s*[[{]/.test(e)?Pa(e,`a data-tc-* attribute`):e}function Pa(e,t){try{return JSON.parse(e)}catch(e){throw SyntaxError(`@tabler/charts-bootstrap: invalid JSON in ${t}: ${e.message}`)}}function Fa(e){let t={},n=e.dataset.tcOptions;n&&Object.assign(t,Pa(n,`data-tc-options`));for(let[n,r]of Object.entries(e.dataset)){if(!n.startsWith(`tc`)||r===void 0)continue;let e=n.charAt(2).toLowerCase()+n.slice(3);Da.has(e)||(t[e]=e===`legend`&&r===`bottom`?{position:`bottom`}:e===`download`&&/^[a-z]/i.test(r)&&!/^(true|false)$/.test(r)?r.split(/[\s,]+/).filter(Boolean):Oa.has(e)?r:Na(r))}return t}function Ia(e){let t=e.dataset.tcData;if(t)return Pa(t,`data-tc-data`);let n=e.querySelector(`:scope > script[type="application/json"]`)?.textContent?.trim();return n?Pa(n,`the inline <script type="application/json">`):void 0}function La(e,t,n){e.dispatchEvent(new CustomEvent(`tc-${t}`,{detail:n,bubbles:!0}))}function Ra(e,t,n){let r=new ei(e,{...Fa(e),type:t,data:n});for(let t of vn)r.on(t,n=>La(e,t,n));return ka.set(e,r),La(e,`render`,{size:r.size}),r}function za(e,t){let n=ka.get(e);if(n||Aa.has(e))return n;let r=e.dataset.tcChart??``,i=t[r];if(!i){let e=Object.keys(t).join(`, `);throw Error(`@tabler/charts-bootstrap: unknown chart type "${r}". Known types: ${e}.`)}let a=e.dataset.tcSrc;return a?(Aa.add(e),e.setAttribute(`aria-busy`,`true`),fetch(a).then(e=>{if(!e.ok)throw Error(`${e.status} ${e.statusText}`.trim());return e.json()}).then(t=>e.isConnected?Ra(e,i,t):void 0,t=>{La(e,`error`,{error:t,src:a}),console.error(`@tabler/charts-bootstrap: could not load ${a}:`,t)}).finally(()=>{Aa.delete(e),e.removeAttribute(`aria-busy`)})):Ra(e,i,Ia(e)??[])}function Ba(e=document,t={}){let n={...Ta,...t.types},r=[...e.querySelectorAll(Ea)];e instanceof Element&&e.matches(Ea)&&r.unshift(e);let i=r.map(e=>{try{return za(e,n)}catch(t){La(e,`error`,{error:t}),console.error(t);return}});return Promise.all(i).then(e=>e.filter(e=>e!==void 0))}function Va(e=document.body,t={}){Ba(e,t);let n=new MutationObserver(e=>{for(let n of e){let e=n.target.closest?.(Ea);if(!(e&&ka.has(e))){for(let e of n.removedNodes)if(e instanceof Element){ka.has(e)&&Ma(e);for(let t of e.querySelectorAll(Ea))Ma(t)}for(let e of n.addedNodes)e instanceof Element&&!e.isConnected||e instanceof Element&&Ba(e,t)}}});return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()}if(typeof document<`u`){let e=document.currentScript;if(!e?.hasAttribute(`data-no-styles`)&&!document.getElementById(`tc-styles`)){let t=document.createElement(`style`);t.id=`tc-styles`,t.textContent=`/*! @tabler/charts | MIT */
2
+ :where(:root),:where([data-theme=light]){--tc-color-1:#2a78d6;--tc-color-2:#eb6834;--tc-color-3:#1baf7a;--tc-color-4:#eda100;--tc-color-5:#e87ba4;--tc-color-6:#008300;--tc-color-7:#4a3aa7;--tc-color-8:#e34948;--tc-color-other:#8a8983;--tc-surface:#fff;--tc-text-color:#0b0b0b;--tc-text-muted:#6f6e69;--tc-grid-color:#e1e0d9;--tc-baseline-color:#c3c2b7;--tc-hover-color:#0b0b0b0a;--tc-tooltip-bg:#fff;--tc-tooltip-color:var(--tc-text-color);--tc-tooltip-border:#0b0b0b1a;--tc-tooltip-shadow:0 4px 16px #0b0b0b1f;--tc-tooltip-radius:6px;--tc-focus-color:var(--tc-color-1);--tc-font-family:inherit;--tc-font-size:12px;--tc-stroke-width:2px;--tc-grid-width:1px;--tc-area-opacity:.1;--tc-area-gradient-start:.24;--tc-area-gradient-end:0;--tc-pie-value-size:1.75em;--tc-bubble-opacity:.7;--tc-point-ring:2px;--tc-duration:.4s;--tc-duration-fast:.12s;--tc-easing:cubic-bezier(.4, 0, .2, 1)}@media (prefers-color-scheme:dark){:where(:root:not([data-theme=light])){--tc-color-1:#3987e5;--tc-color-2:#d95926;--tc-color-3:#199e70;--tc-color-4:#c98500;--tc-color-5:#d55181;--tc-color-6:#008300;--tc-color-7:#9085e9;--tc-color-8:#e66767;--tc-color-other:#7c7b76;--tc-surface:#1a1a19;--tc-text-color:#fff;--tc-text-muted:#a3a29c;--tc-grid-color:#2c2c2a;--tc-baseline-color:#4a4a46;--tc-hover-color:#ffffff0f;--tc-tooltip-bg:#262625;--tc-tooltip-color:var(--tc-text-color);--tc-tooltip-border:#ffffff1a;--tc-tooltip-shadow:0 4px 16px #0006;--tc-focus-color:var(--tc-color-1)}}:where([data-theme=dark]){--tc-color-1:#3987e5;--tc-color-2:#d95926;--tc-color-3:#199e70;--tc-color-4:#c98500;--tc-color-5:#d55181;--tc-color-6:#008300;--tc-color-7:#9085e9;--tc-color-8:#e66767;--tc-color-other:#7c7b76;--tc-surface:#1a1a19;--tc-text-color:#fff;--tc-text-muted:#a3a29c;--tc-grid-color:#2c2c2a;--tc-baseline-color:#4a4a46;--tc-hover-color:#ffffff0f;--tc-tooltip-bg:#262625;--tc-tooltip-color:var(--tc-text-color);--tc-tooltip-border:#ffffff1a;--tc-tooltip-shadow:0 4px 16px #0006;--tc-focus-color:var(--tc-color-1)}.tc-chart{max-width:100%;height:auto;font-family:var(--tc-font-family);font-size:var(--tc-font-size);letter-spacing:normal;word-spacing:normal;text-transform:none;color:var(--tc-text-color);-webkit-tap-highlight-color:transparent;display:block;overflow:visible}.tc-chart :where(text){font:inherit}.tc-series{--tc-series-color:var(--tc-color-other);--tc-series-pattern:var(--tc-pattern-other);--tc-pattern-dash:1 3;--tc-pattern-ink:var(--tc-pattern-color,var(--tc-surface));--tc-swatch-pattern:repeating-linear-gradient(45deg, var(--tc-pattern-ink) 0 1px, #0000 0 3px)}.tc-series-1{--tc-series-color:var(--tc-color-1);--tc-series-pattern:var(--tc-pattern-1);--tc-pattern-dash:none;--tc-swatch-pattern:repeating-linear-gradient(45deg, var(--tc-pattern-ink) 0 1.5px, #0000 0 4px)}.tc-series-2{--tc-series-color:var(--tc-color-2);--tc-series-pattern:var(--tc-pattern-2);--tc-pattern-dash:6 3;--tc-swatch-pattern:radial-gradient(var(--tc-pattern-ink) .8px, #0000 1.2px) 0 0 / 4px 4px}.tc-series-3{--tc-series-color:var(--tc-color-3);--tc-series-pattern:var(--tc-pattern-3);--tc-pattern-dash:2 3;--tc-swatch-pattern:repeating-linear-gradient(-45deg, var(--tc-pattern-ink) 0 1.5px, #0000 0 4px)}.tc-series-4{--tc-series-color:var(--tc-color-4);--tc-series-pattern:var(--tc-pattern-4);--tc-pattern-dash:10 3 2 3;--tc-swatch-pattern:repeating-linear-gradient(var(--tc-pattern-ink) 0 1.5px, #0000 0 4px)}.tc-series-5{--tc-series-color:var(--tc-color-5);--tc-series-pattern:var(--tc-pattern-5);--tc-pattern-dash:4 4;--tc-swatch-pattern:repeating-linear-gradient(45deg, var(--tc-pattern-ink) 0 1px, #0000 0 4px), repeating-linear-gradient(-45deg, var(--tc-pattern-ink) 0 1px, #0000 0 4px)}.tc-series-6{--tc-series-color:var(--tc-color-6);--tc-series-pattern:var(--tc-pattern-6);--tc-pattern-dash:12 4;--tc-swatch-pattern:repeating-linear-gradient(90deg, var(--tc-pattern-ink) 0 1.5px, #0000 0 4px)}.tc-series-7{--tc-series-color:var(--tc-color-7);--tc-series-pattern:var(--tc-pattern-7);--tc-pattern-dash:2 2 6 2;--tc-swatch-pattern:repeating-linear-gradient(var(--tc-pattern-ink) 0 1px, #0000 0 4px), repeating-linear-gradient(90deg, var(--tc-pattern-ink) 0 1px, #0000 0 4px)}.tc-series-8{--tc-series-color:var(--tc-color-8);--tc-series-pattern:var(--tc-pattern-8);--tc-pattern-dash:8 2 2 2;--tc-swatch-pattern:linear-gradient(90deg, #0000 50%, var(--tc-series-color) 0) 0 0 / 4px 4px, repeating-linear-gradient(var(--tc-pattern-ink) 0 1.5px, #0000 0 4px)}.tc-tick-label{fill:var(--tc-text-muted);font-variant-numeric:tabular-nums}.tc-grid-line,.tc-grid-line-zero,.tc-axis-line,.tc-tick-line,.tc-crosshair,.tc-sparkline-zero,.tc-radar-ring,.tc-radar-spoke{stroke:var(--tc-baseline-color);stroke-width:var(--tc-grid-width);shape-rendering:crispedges;vector-effect:non-scaling-stroke}.tc-grid-line,.tc-sparkline-zero,.tc-radar-ring,.tc-radar-spoke{stroke:var(--tc-grid-color)}.tc-grid-line-zero{stroke:var(--tc-baseline-color)}.tc-line{fill:none;stroke:var(--tc-series-color);stroke-width:var(--tc-series-width,var(--tc-stroke-width));stroke-dasharray:var(--tc-series-dash,none);stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}.tc-area{fill:var(--tc-series-color);fill-opacity:var(--tc-area-opacity);stroke:none}.tc-pie-slices{--tc-pie-gap:0px}.tc-slice{fill:var(--tc-series-color);stroke:var(--tc-surface);stroke-width:var(--tc-pie-gap);stroke-linejoin:round}.tc-pie-track,.tc-gauge-track{fill:var(--tc-grid-color)}.tc-gauge-arc{fill:var(--tc-series-color)}.tc-pie-value,.tc-gauge-value{font-size:var(--tc-pie-value-size);fill:var(--tc-text-color);font-variant-numeric:tabular-nums;font-weight:600}.tc-pie-label,.tc-gauge-label{fill:var(--tc-text-muted)}.tc-sankey-node{fill:var(--tc-series-color)}.tc-sankey-link{fill:var(--tc-series-color);fill-opacity:var(--tc-area-opacity);stroke:none}.tc-chart-sankey{--tc-area-opacity:.35}.tc-sankey-value{font-size:.92em}.tc-chart-sankey .tc-hover-mark{opacity:.5}.tc-radar-ring,.tc-radar-spoke,.tc-chart-radar .tc-crosshair{fill:none;shape-rendering:auto}.tc-area-gradient{fill-opacity:1}.tc-fade-start{stop-color:#fff;stop-opacity:var(--tc-area-gradient-start)}.tc-fade-end{stop-color:#fff;stop-opacity:var(--tc-area-gradient-end)}.tc-chart-sparkline{--tc-stroke-width:1.5px;--tc-area-gradient-start:.3}.tc-bubble{fill-opacity:var(--tc-bubble-opacity)}.tc-point{fill:var(--tc-series-color);stroke:var(--tc-surface);stroke-width:var(--tc-point-ring);paint-order:stroke;transition:cx var(--tc-duration) var(--tc-easing), cy var(--tc-duration) var(--tc-easing)}.tc-point-min,.tc-point-max{fill:var(--tc-text-muted)}.tc-annotation{--tc-annotation-color:var(--tc-text-muted)}.tc-annotation-line{stroke:var(--tc-annotation-color);stroke-width:1px;stroke-dasharray:4 3;shape-rendering:crispedges;vector-effect:non-scaling-stroke}.tc-annotation-band{fill:var(--tc-annotation-color);fill-opacity:.1}.tc-annotation-label{fill:var(--tc-annotation-color);font-weight:500}.tc-annotation-label,.tc-radar-value{paint-order:stroke;stroke:var(--tc-surface);stroke-width:3px;stroke-linejoin:round;font-size:.92em}.tc-annotations{pointer-events:none}.tc-value-label{fill:var(--tc-text-color);font-variant-numeric:tabular-nums;paint-order:stroke;stroke:var(--tc-surface);stroke-width:3px;stroke-linejoin:round;transition:transform var(--tc-duration) var(--tc-easing);animation:tc-fade-in var(--tc-duration) var(--tc-easing);font-weight:500}.tc-marker{transition:d var(--tc-duration) var(--tc-easing)}:has(>svg .tc-marker)>:is(.tc-legend,.tc-tooltip) :is(.tc-legend-swatch,.tc-tooltip-swatch){background:var(--tc-series-color);width:10px;height:10px}:has(>svg .tc-marker)>:is(.tc-legend,.tc-tooltip) .tc-series-2 :is(.tc-legend-swatch,.tc-tooltip-swatch){border-radius:1px;scale:.8}:has(>svg .tc-marker)>:is(.tc-legend,.tc-tooltip) .tc-series-3 :is(.tc-legend-swatch,.tc-tooltip-swatch){clip-path:polygon(50% 3.6%,92.9% 82.1%,7.1% 82.1%);border-radius:0}:has(>svg .tc-marker)>:is(.tc-legend,.tc-tooltip) .tc-series-4 :is(.tc-legend-swatch,.tc-tooltip-swatch){clip-path:polygon(50% 3.6%,96.4% 50%,50% 96.4%,3.6% 50%);border-radius:0}:has(>svg .tc-marker)>:is(.tc-legend,.tc-tooltip) .tc-series-5 :is(.tc-legend-swatch,.tc-tooltip-swatch){clip-path:polygon(7.1% 17.9%,92.9% 17.9%,50% 96.4%);border-radius:0}:has(>svg .tc-marker)>:is(.tc-legend,.tc-tooltip) .tc-series-6 :is(.tc-legend-swatch,.tc-tooltip-swatch){clip-path:polygon(35.7% 7.1%,64.3% 7.1%,64.3% 35.7%,92.9% 35.7%,92.9% 64.3%,64.3% 64.3%,64.3% 92.9%,35.7% 92.9%,35.7% 64.3%,7.1% 64.3%,7.1% 35.7%,35.7% 35.7%);border-radius:0}:has(>svg .tc-marker)>:is(.tc-legend,.tc-tooltip) .tc-series-7 :is(.tc-legend-swatch,.tc-tooltip-swatch){clip-path:polygon(25% 7.1%,50% 32.1%,75% 7.1%,92.9% 25%,67.9% 50%,92.9% 75%,75% 92.9%,50% 67.9%,25% 92.9%,7.1% 75%,32.1% 50%,7.1% 25%);border-radius:0}:has(>svg .tc-marker)>:is(.tc-legend,.tc-tooltip) .tc-series-8 :is(.tc-legend-swatch,.tc-tooltip-swatch){clip-path:polygon(50% 0%,61.4% 34.3%,97.5% 34.6%,68.6% 56.1%,79.3% 90.4%,50% 69.6%,20.7% 90.4%,31.4% 56.1%,2.5% 34.6%,38.6% 34.3%);border-radius:0}.tc-pattern-bg{fill:var(--tc-series-color)}.tc-pattern-ink{fill:none;stroke:var(--tc-pattern-ink);stroke-width:1.5px;stroke-linecap:round}.tc-patterned :is(.tc-bar,.tc-area,.tc-slice,.tc-gauge-arc,.tc-bubble){fill:var(--tc-series-pattern,var(--tc-series-color))}.tc-patterned .tc-area{fill-opacity:max(var(--tc-area-opacity), .4)}.tc-patterned .tc-line{stroke-dasharray:var(--tc-series-dash,var(--tc-pattern-dash))}:has(>.tc-patterned)>:is(.tc-legend,.tc-tooltip) :is(.tc-legend-swatch,.tc-tooltip-swatch){background:var(--tc-swatch-pattern), var(--tc-series-color)}@keyframes tc-reveal{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0)}}@keyframes tc-grow{0%{transform:scaleY(0)}}@keyframes tc-grow-x{0%{transform:scaleX(0)}}@keyframes tc-fade-in{0%{opacity:0}}.tc-line,.tc-area,.tc-bar,.tc-radar-ring,.tc-dots{transition:d var(--tc-duration) var(--tc-easing)}.tc-slice,.tc-gauge-arc,.tc-gauge-track{transition:none var(--tc-duration)}.tc-chart-line .tc-series-list,.tc-chart-area .tc-series-list{animation:tc-reveal calc(var(--tc-duration) * 2) var(--tc-easing)}.tc-series-list .tc-series,.tc-areas .tc-series,.tc-sankey-links .tc-sankey-link,.tc-sankey-nodes .tc-series,.tc-series-list .tc-point,.tc-heatmap-cells,.tc-candles,.tc-tick,.tc-grid-line{animation:tc-fade-in var(--tc-duration) var(--tc-easing)}.tc-bar{fill:var(--tc-series-color);transform-box:fill-box;transform-origin:50% 100%;animation:tc-grow var(--tc-duration) var(--tc-easing)}.tc-bar-negative{transform-origin:50% 0}.tc-cell{fill:var(--tc-cell-fill,var(--tc-heat-color,var(--tc-color-1)));transition:fill var(--tc-duration) var(--tc-easing)}@supports (color:color-mix(in oklab, red 50%, blue)){.tc-cell{fill:var(--tc-cell-fill,color-mix(in oklab, var(--tc-heat-color,var(--tc-color-1)) var(--tc-heat,100%), var(--tc-heat-empty,var(--tc-grid-color))))}}.tc-heatmap-row.tc-series{--tc-heat-color:var(--tc-series-color)}.tc-cell-empty{fill:var(--tc-heat-empty,var(--tc-grid-color));opacity:.5}.tc-candle{--tc-candle-color:var(--tc-up-color,var(--tc-color-6))}.tc-candle-down{--tc-candle-color:var(--tc-negative-color,var(--tc-color-8))}.tc-candle-body{fill:var(--tc-candle-color);transition:d var(--tc-duration) var(--tc-easing), fill var(--tc-duration) var(--tc-easing)}.tc-candle-wick{fill:none;stroke:var(--tc-candle-color);stroke-width:1px;vector-effect:non-scaling-stroke;transition:d var(--tc-duration) var(--tc-easing), stroke var(--tc-duration) var(--tc-easing)}.tc-tristate-loss{fill:var(--tc-negative-color,var(--tc-color-8))}.tc-tristate-draw{fill:var(--tc-baseline-color)}.tc-bar-horizontal{transform-origin:0;animation-name:tc-grow-x}.tc-bar-horizontal.tc-bar-negative{transform-origin:100%}.tc-tick,.tc-grid-line{transition:transform var(--tc-duration) var(--tc-easing)}@keyframes tc-pie-in{0%{opacity:0;transform:scale(.85)}}.tc-pie-slices,.tc-gauge-rings,.tc-radar-series{animation:tc-pie-in calc(var(--tc-duration) * 1.5) var(--tc-easing)}.tc-hover .tc-point{transition:none;animation:none}.tc-static,.tc-chart[data-resizing]{--tc-duration:0s}:where(.tc-container){position:relative}.tc-hover{pointer-events:none}.tc-hover-band{fill:var(--tc-hover-color)}.tc-hover-mark{fill:var(--tc-series-color);opacity:.35}.tc-chart-heatmap .tc-hover-mark{fill:none;stroke:var(--tc-text-color);stroke-width:2px;opacity:.6}.tc-tooltip{z-index:10;pointer-events:none;opacity:0;min-width:120px;max-width:min(280px,100%);font-family:var(--tc-font-family);font-size:var(--tc-font-size);overflow-wrap:anywhere;color:var(--tc-tooltip-color);background:var(--tc-tooltip-bg);border:1px solid var(--tc-tooltip-border);border-radius:var(--tc-tooltip-radius);box-shadow:var(--tc-tooltip-shadow);transition:opacity var(--tc-duration-fast) var(--tc-easing);padding:8px 10px;line-height:1.4;position:absolute;top:0;left:0}.tc-tooltip[data-visible]{opacity:1;transition:opacity var(--tc-duration-fast) var(--tc-easing), transform var(--tc-duration-fast) var(--tc-easing)}.tc-tooltip-title{margin-bottom:4px;font-weight:600}.tc-tooltip-item{align-items:center;gap:8px;display:flex}.tc-tooltip-swatch,.tc-legend-swatch{background:var(--tc-series-color);border-radius:50%;flex:none;width:8px;height:8px}.tc-tooltip-name{color:var(--tc-text-muted);flex:1}.tc-tooltip-value{white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:500}.tc-tooltip-footer{border-top:1px solid var(--tc-tooltip-border);margin-top:4px;padding-top:4px}.tc-tooltip-item-active .tc-tooltip-name{color:var(--tc-tooltip-color)}.tc-legend{font-family:var(--tc-font-family);font-size:var(--tc-font-size);margin-bottom:8px;line-height:1.4}.tc-legend[data-position=bottom]{margin:8px 0 0}.tc-legend-items{flex-wrap:wrap;gap:4px 12px;display:flex}.tc-legend-item{appearance:none;font:inherit;text-align:start;color:var(--tc-text-color);cursor:pointer;transition:color var(--tc-duration-fast) var(--tc-easing);background:0 0;border:0;border-radius:4px;align-items:center;gap:6px;margin:0;padding:2px 4px;display:inline-flex}.tc-legend-item:hover{background:var(--tc-hover-color)}.tc-legend-item:focus-visible{outline:2px solid var(--tc-focus-color);outline-offset:1px}.tc-legend-item-hidden{color:var(--tc-text-muted)}.tc-legend-item-hidden .tc-legend-swatch{box-shadow:inset 0 0 0 1.5px var(--tc-series-color);background:0 0}.tc-download{z-index:5;font-family:var(--tc-font-family);font-size:var(--tc-font-size);line-height:1.4;position:absolute;top:0;right:0}.tc-download-toggle,.tc-download-item{appearance:none;font:inherit;color:var(--tc-text-muted);cursor:pointer;background:0 0;border:0;border-radius:4px;align-items:center;margin:0;display:flex}.tc-download-toggle{justify-content:center;width:24px;height:24px;padding:0}.tc-download-toggle:hover,.tc-download-toggle[aria-expanded=true],.tc-download-item:hover{color:var(--tc-text-color);background:var(--tc-hover-color)}.tc-download-toggle:focus-visible,.tc-download-item:focus-visible{outline:2px solid var(--tc-focus-color);outline-offset:1px}.tc-download-menu{min-width:80px;color:var(--tc-tooltip-color);background:var(--tc-tooltip-bg);border:1px solid var(--tc-tooltip-border);border-radius:var(--tc-tooltip-radius);box-shadow:var(--tc-tooltip-shadow);margin-top:2px;padding:4px;position:absolute;top:100%;right:0}.tc-download-item{text-align:start;white-space:nowrap;width:100%;padding:4px 8px}.tc-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.tc-chart:focus{outline:none}.tc-chart:focus-visible{outline:2px solid var(--tc-focus-color);outline-offset:2px;border-radius:2px}.tc-table-wrap:not(.tc-sr-only){margin-top:12px;overflow-x:auto}.tc-table{border-collapse:collapse;width:100%;font-family:var(--tc-font-family);font-size:var(--tc-font-size);font-variant-numeric:tabular-nums;color:var(--tc-text-color)}.tc-table caption{text-align:start;margin-bottom:4px;font-weight:600}.tc-table th,.tc-table td{text-align:end;border-bottom:1px solid var(--tc-grid-color);padding:4px 8px}.tc-table th[scope=row],.tc-table thead th:first-child{text-align:start}.tc-table thead th{color:var(--tc-text-muted);border-bottom-color:var(--tc-baseline-color);font-weight:600}@media (prefers-reduced-motion:reduce){.tc-chart,.tc-tooltip{--tc-duration:0s;--tc-duration-fast:0s}}@media (forced-colors:active){.tc-value-label{fill:canvastext;stroke:canvas}.tc-tick-label{fill:canvastext}.tc-grid-line,.tc-radar-ring,.tc-radar-spoke{stroke:graytext}.tc-grid-line-zero,.tc-axis-line,.tc-tick-line,.tc-line{stroke:canvastext}.tc-area{fill:graytext}.tc-bar,.tc-point{fill:canvastext;stroke:canvas}.tc-crosshair{stroke:highlight}.tc-tooltip{border-color:canvastext}.tc-legend-swatch{background:canvastext}.tc-legend-item-hidden .tc-legend-swatch{background:0 0;box-shadow:inset 0 0 0 1.5px canvastext}.tc-pattern-bg{fill:canvas}.tc-pattern-ink{stroke:canvastext}:is(.tc-patterned,.tc-patterns-auto) :is(.tc-bar,.tc-area,.tc-slice,.tc-gauge-arc,.tc-bubble){fill:var(--tc-series-pattern,CanvasText);fill-opacity:1;stroke:canvastext;stroke-width:1px}.tc-patterns-auto .tc-line{stroke-dasharray:var(--tc-series-dash,var(--tc-pattern-dash))}:has(>:is(.tc-patterned,.tc-patterns-auto))>:is(.tc-legend,.tc-tooltip) .tc-series{--tc-pattern-color:CanvasText;--tc-series-color:Canvas}:has(>:is(.tc-patterned,.tc-patterns-auto))>:is(.tc-legend,.tc-tooltip) :is(.tc-legend-swatch,.tc-tooltip-swatch){forced-color-adjust:none;background:var(--tc-swatch-pattern), Canvas;box-shadow:inset 0 0 0 1px canvastext}:has(>svg .tc-marker)>:is(.tc-legend,.tc-tooltip) :is(.tc-legend-swatch,.tc-tooltip-swatch){box-shadow:none;background:canvastext}}:where(:root,[data-bs-theme]){--tc-color-1:var(--bs-primary,#2a78d6);--tc-focus-color:var(--bs-primary,#2a78d6);--tc-surface:var(--bs-body-bg,#fff);--tc-text-color:var(--bs-body-color,#0b0b0b);--tc-tooltip-color:var(--bs-body-color,#0b0b0b);--tc-text-muted:var(--bs-secondary-color,#6f6e69);--tc-grid-color:var(--bs-border-color-translucent,#e1e0d9);--tc-baseline-color:var(--bs-border-color,#c3c2b7);--tc-hover-color:rgba(var(--bs-emphasis-color-rgb,11, 11, 11), .05);--tc-tooltip-bg:var(--bs-body-bg,#fff);--tc-tooltip-border:var(--bs-border-color-translucent,#0b0b0b1a);--tc-tooltip-shadow:var(--bs-box-shadow,0 4px 16px #0b0b0b1f);--tc-tooltip-radius:var(--bs-border-radius,6px);--tc-font-family:var(--bs-body-font-family,inherit)}:where(:root,[data-bs-theme=light]){--tc-color-2:#eb6834;--tc-color-3:#1baf7a;--tc-color-4:#eda100;--tc-color-5:#e87ba4;--tc-color-6:#008300;--tc-color-7:#4a3aa7;--tc-color-8:#e34948}:where([data-bs-theme=dark]){--tc-color-2:#d95926;--tc-color-3:#199e70;--tc-color-4:#c98500;--tc-color-5:#d55181;--tc-color-6:#008300;--tc-color-7:#9085e9;--tc-color-8:#e66767}`,t.nonce=e?.nonce??``,document.head.prepend(t)}let t=e?.hasAttribute(`data-observe`)??!1,n=()=>t?Va(document.body):void Ba(document);document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,n):n()}return e.Chart=ei,e.LINE_HEIGHT=c,e.VERSION=`0.0.0`,e.arcCentroid=Ti,e.arcPathStable=Oi,e.area=si,e.areaPath=vr,e.axis=_e,e.axisSize=W,e.band=ye,e.bandTicks=me,e.bar=di,e.barPath=ci,e.buildChart=gn,e.cancel=tn,e.candlestick=hi,e.categoryInteraction=$e,e.chartEvents=vn,e.chartLabel=fn,e.chartToString=_n,e.dataTable=Gr,e.defaultHidden=mt,e.defaultPlugins=$r,e.describeHit=jr,e.dispose=Ma,e.domainOf=Ke,e.donut=Qi,e.download=Sr,e.downloadChart=x,e.escapeAttr=Ut,e.escapeText=Ht,e.estimateTextWidth=a,e.exportImage=b,e.exportSVG=y,e.extent=xe,e.feature=E,e.features=S,e.flush=nn,e.formatDate=ie,e.formatDetail=U,e.formatNumber=z,e.formatTicks=re,e.gauge=Li,e.getChart=ja,e.getDateFormat=L,e.getNumberFormat=I,e.grid=ve,e.h=D,e.hbarPath=li,e.heatmap=Ki,e.highlight=kr,e.hitAnchor=Kr,e.hoverOverlay=Tr,e.hoverUnderlay=wr,e.init=Ba,e.innerRect=n,e.insets=t,e.keyboard=Nr,e.legend=Pr,e.legendContent=pt,e.line=oi,e.linePath=_r,e.linear=Se,e.linearTicks=pe,e.log=ct,e.lttb=sr,e.lttbIndices=ar,e.niceDomain=fe,e.normalizeClass=O,e.normalizeStyle=A,e.observe=Va,e.padAngleForGap=Ei,e.pie=Zi,e.placeTooltip=Jr,e.point=be,e.pointer=Or,e.radar=aa,e.register=C,e.render=Z,e.renderContext=cn,e.renderToString=Pt,e.resolveLegend=dn,e.resolveSize=on,e.sankey=_a,e.scatter=Sa,e.schedule=$t,e.seriesKey=Y,e.seriesLegend=Fe,e.seriesTable=et,e.sparkline=wa,e.stepPrecision=te,e.sync=zr,e.tableContent=Ar,e.thinTicks=ge,e.tickIncrement=ue,e.tickStep=de,e.ticks=le,e.time=Hn,e.timePointScale=Un,e.tooltip=Qr,e.tooltipContent=qr,e.types=Ta,e})({});
3
+ //# sourceMappingURL=tabler-charts-bootstrap.min.js.map