Files
monisuo/monisuo-admin/dist/assets/dashboard-DdRw0MXG.js

316 lines
210 KiB
JavaScript
Raw Normal View History

2026-04-05 19:44:40 +08:00
import{Ct as e,Dt as t,E as n,Et as r,I as i,J as a,L as o,N as s,Ot as c,P as l,Q as u,R as d,S as f,V as p,W as m,Y as h,_ as g,at as _,b as v,bt as y,ct as b,g as x,gt as S,h as C,j as w,l as T,m as E,mt as ee,r as te,ut as D,v as O,w as ne,wt as k,x as A,xt as re,y as j,yt as M,z as ie}from"./vue.runtime.esm-bundler-DS0mm12S.js";import{v as ae}from"./dist-3yfE1dPa.js";import{a as oe,i as se,n as ce,r as le,t as ue}from"./SelectValue-BbKWf16W.js";import{n as de}from"./lib-CC9cpJ8Y.js";import{R as fe}from"./index-axPHP3AB.js";import{O as pe,_ as me}from"./Teleport-f0-_cFyq.js";import{i as he,n as ge}from"./button-xrpYa8G4.js";import{n as _e,t as ve}from"./AvatarImage-Da9BQozn.js";import{t as ye}from"./AvatarFallback-Bq_U7jEu.js";import{i as be,n as xe,r as Se,t as Ce}from"./TabsTrigger-YBRNpb_0.js";import{t as we}from"./Card-C4ypPl9R.js";import{t as Te}from"./CardContent-CjpRZuCW.js";import{n as Ee,r as De,t as Oe}from"./CardTitle-CmtJJ__x.js";import{r as ke}from"./global-layout-DVspC3_O.js";var Ae=!1;function je(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Me(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var Ne=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0?!Ae:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(Me(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=je(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),N=`-ms-`,Pe=`-moz-`,P=`-webkit-`,Fe=`comm`,Ie=`rule`,Le=`decl`,Re=`@import`,ze=`@keyframes`,Be=`@layer`,Ve=Math.abs,He=String.fromCharCode,Ue=Object.assign;function We(e,t){return I(e,0)^45?(((t<<2^I(e,0))<<2^I(e,1))<<2^I(e,2))<<2^I(e,3):0}function Ge(e){return e.trim()}function Ke(e,t){return(e=t.exec(e))?e[0]:e}function F(e,t,n){return e.replace(t,n)}function qe(e,t){return e.indexOf(t)}function I(e,t){return e.charCodeAt(t)|0}function Je(e,t,n){return e.slice(t,n)}function Ye(e){return e.length}function Xe(e){return e.length}function Ze(e,t){return t.push(e),e}function Qe(e,t){return e.map(t).join(``)}var $e=1,et=1,tt=0,L=0,R=0,nt=``;function rt(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:$e,column:et,length:o,return:``}}function it(e,t){return Ue(rt(``,null,null,``,null,null,0),e,{length:-e.length},t)}function at(){return R}function ot(){return R=L>0?I(nt,--L):0,et--,R===10&&(et=1,$e--),R}function z(){return R=L<tt?I(nt,L++):0,et++,R===10&&(et=1,$e++),R}function st(){return I(nt,L)}function ct(){return L}function lt(e,t){return Je(nt,e,t)}function ut(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dt(e){return $e=et=1,tt=Ye(nt=e),L=0,[]}function ft(e){return nt=``,e}function pt(e){return Ge(lt(L-1,gt(e===91?e+2:e===40?e+1:e)))}function mt(e){for(;(R=st())&&R<33;)z();return ut(e)>2||ut(R)>3?``:` `}function ht(e,t){for(;--t&&z()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return lt(e,ct()+(t<6&&st()==32&&z()==32))}function gt(e){for(;z();)switch(R){case e:return L;case 34:case 39:e!==34&&e!==39&&gt(R);break;case 40:
<pattern id="${e.id}" viewBox="0 0 10 10" width="10" height="10" patternUnits="userSpaceOnUse">
<rect width="100%" height="100%" fill="#fff"/>
${e.svg}
</pattern>
<rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#${e.id})"/>
</mask>`,Is=(e,t)=>`<marker id="${Ps(e)}"
fill="var(${ks(t)})"
markerUnits="userSpaceOnUse"
refX="5"
refY="5"
markerWidth="10"
markerHeight="10">
${e.marker}
</marker>`;function Ls(){let e=Ms.map(Fs).concat(Ns.map(Is)).join(``),t=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);t.setAttribute(`height`,`100%`),t.setAttribute(`width`,`100%`),t.style.position=`fixed`,t.style.zIndex=`-99999999`,t.innerHTML=`<defs>${e}</defs>`,document.body.appendChild(t)}typeof window<`u`&&Ls(),globalThis!=null&&globalThis.UNOVIS_ICON_FONT_FAMILY;var Rs=(globalThis==null?void 0:globalThis.UNOVIS_FONT_W2H_RATIO_DEFAULT)||.5,zs=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_SEPARATOR_DEFAULT)||[` `,`-`,`.`,`,`],Bs=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT)||`-`,Vs=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_DEFAULT)||{text:``,fontSize:12,fontFamily:`var(--vis-font-family)`,lineHeight:1.25,marginTop:0,marginBottom:0};ln`
:root {
label: vis-root-styles;
--vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
--vis-font-wh-ratio: ${Rs};
--vis-color-main: var(${ks(0)});
--vis-color-main-light: ${As(Ds[0])};
--vis-color-main-dark: ${js(Ds[0])};
--vis-color-grey: #2a2a2a;
${Ds.map((e,t)=>`${ks(t)}: ${e};`)}
${Os.map((e,t)=>`--vis-dark-color${t}: ${e};`)}
${Ms.map((e,t)=>`
--${Ps(e)}: url(#${Ps(e)});
--vis-pattern-fill${t}: var(--${Ps(e)});
`)}
${Ns.map((e,t)=>`
--${Ps(e)}: url(#${Ps(e)});
--vis-pattern-marker${t}: var(--${Ps(e)});
--vis-pattern-dasharray${t}: ${e.dashArray?.join(` `)};
`)}
body.theme-dark {
${Ds.map((e,t)=>`${ks(t)}: var(--vis-dark-color${t});`)}
}
body.theme-patterns {
${Ms.map((e,t)=>`path[style*="fill: var(${ks(t)})"] {
mask: var(--vis-pattern-fill${t});
}`)}
${Ns.map((e,t)=>`
path[stroke="var(${ks(t)})"]:not([style*="fill"]),
path[style*="stroke: var(${ks(t)})"]:not([style*="fill"]) {
marker: var(--vis-pattern-marker${t});
stroke-dasharray: var(--vis-pattern-dasharray${t});
}
`)}
}
`;function Hs(e=window==null?void 0:window.document.body){return e?+Vo(`var(--vis-font-wh-ratio)`,e):Rs}var Us=fr(`start`,`end`,`cancel`,`interrupt`),Ws=[];function Gs(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Ys(e,n,{name:t,index:r,group:i,on:Us,tween:Ws,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Ks(e,t){var n=Js(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function qs(e,t){var n=Js(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Js(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Ys(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=jr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return Lr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Lr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Xs(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Zs(e){return this.each(function(){Xs(this,e)})}var Qs=e=>()=>e;function $s(e,t){return function(n){return e+n*t}}function ec(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function tc(e){return(e=+e)==1?nc:function(t,n){return n-t?ec(t,n,e):Qs(isNaN(t)?n:t)}}function nc(e,t){var n=t-e;return n?$s(e,n):Qs(isNaN(e)?t:e)}var rc=(function e(t){var n=tc(t);function r(e,t){var r=n((e=ps(e)).r,(t=ps(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=nc(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function ic(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function ac(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function oc(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=hc(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function sc(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function cc(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function lc(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=hc(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var uc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dc=new RegExp(uc.source,`g`);function fc(e){return function(){return e}}function pc(e){return function(t){return e(t)+``}}function mc(e,t){var n=uc.lastIndex=dc.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=uc.exec(e))&&(i=dc.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:cc(r,i)})),n=dc.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?pc(c[0].x):fc(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function hc(e,t){var n=typeof t,r;return t==null||n===`boolean`?Qs(t):(n===`number`?cc:n===`string`?(r=ls(t))?(t=r,rc):m
--highlight-filter-id: url(${a}#${i}); // defining a css variable
`),this._svgDefs.append(`filter`).attr(`id`,i).attr(`filterUnits`,`objectBoundingBox`).html(`<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>`),t&&this.updateContainer(t,!0),n&&this.setData(n,!0),(this.config.xAxis||this.config.yAxis||this.components?.some(e=>e.datamodel.data))&&this.render(),(r=document.fonts)==null||r.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){let e=this._getMargin();return nr(this.containerWidth-e.left-e.right,0,1/0)}get height(){let e=this._getMargin();return nr(this.containerHeight-e.top-e.bottom,0,1/0)}setData(e,t){var n,r,i,a,o;let{components:s,config:c}=this;e&&(this.datamodel.data=e,s.forEach(t=>{t.setData(e)}),(n=c.crosshair)==null||n.setData(e),(r=c.xAxis)==null||r.setData(e),(i=c.yAxis)==null||i.setData(e),Jn(this.datamodel.data,e)||((a=c.tooltip)==null||a.hide(),(o=c.crosshair)==null||o.hide()),t||this.render())}updateContainer(e,t){super.updateContainer(e),this._removeAllChildren(),this.setData(this.datamodel.data,!0),e.xAxis&&(this.config.xAxis.config.type=G.X,this.element.appendChild(e.xAxis.element)),e.yAxis&&(this.config.yAxis.config.type=G.Y,this.element.appendChild(e.yAxis.element));for(let e of this.components)this.element.appendChild(e.element);let n=e.tooltip;n&&(n.hasContainer()||n.setContainer(this._container),n.setComponents(this.components));let r=e.crosshair;r&&(r.setContainer(this.svg),r.tooltip=n,this.element.appendChild(r.element));let i=e.annotations;i&&this.element.appendChild(i.element),this.element.appendChild(this._clipPath.node()),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),t||this.render()}updateComponents(e,t){let{config:n}=this;this.components.forEach((t,n)=>{e[n]&&t.setConfig(e[n])}),this._updateScales(...this.components,n.xAxis,n.yAxis,n.crosshair),t||this.render()}update(e,t,n){n&&(this.datamodel.data=n),e&&this.updateContainer(e,!0),t&&this.updateComponents(t,!0),this.render()}_preRender(){let{config:e}=this;super._preRender(),e.autoMargin&&this._setAutoMargin();let t=tr([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]),n=this._getMargin();for(let e of t)e.setSize(this.width,this.height,this.containerWidth,this.containerHeight),e.setContainerMargin(n);this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){var t,n,r,i;let{config:a}=this;super._render();let o=this._getMargin();for(let t of this.components)t.g.attr(`transform`,`translate(${o.left},${o.top})`).style(`clip-path`,t.clippable?`url(#${this._clipPathId})`:null).style(`-webkit-clip-path`,t.clippable?`url(#${this._clipPathId})`:null),t.render(e);this._renderAxes(this._firstRender?0:e);let s=a.clipPathExtend;this._clipPath.select(`rect`).attr(`x`,-s).attr(`y`,-s).attr(`width`,this.width+2*s).attr(`height`,this.height+2*s),(t=a.tooltip)==null||t.update();let c=a.crosshair;if(c){let e=this.components.filter(e=>!e.stacked).map(e=>e.config.y),t=this.components.filter(e=>e.stacked).map(e=>e.config.y),n=this.components.find(e=>e.config.baseline)?.config?.baseline;c.accessors={x:this.components[0]?.config.x,y:Yn(e),yStacked:Yn(t),baseline:n},c.g.attr(`transform`,`translate(${o.left},${o.top})`).style(`clip-path`,`url(#${this._clipPathId})`).style(`-webkit-clip-path`,`url(#${this._clipPathId})`),c.render()}(n=a.annotations)==null||n.g.attr(`transform`,`translate(${o.left},${o.top})`),(r=a.annotations)==null||r.render(),this._firstRender=!1,(i=a.onRenderComplete)==null||i.call(a,this.svg.node(),o,this._getBleed(this.components),this.containerWidth,this.containerHeight,this.width,this.height)}_updateScales(...e){let t=tr(e||this.components);this._setScales(...t),this._updateScalesDomain(...t),this._updateScalesRange(...t)}_setScales(...e){let{config:t}=this;e&&(t.xScale&&e.forEach(e=>e.setScale(X.X,t.xScale)),t.yScale&&e.forEach(e=>e.setScale(X.Y,t.yScale)))}_updateScalesDomain(...e){let{config:t}=this;if(!e)return;let n=e.filter(e=>!e.config.excludeFromDomainCalculation);Object.values(X).forEach(r=>{let[i,a]=vn(In(n.map(e=>e.get
label: tooltip;
display: inline-block;
left: 0;
bottom: 0;
min-width: max-content;
position: absolute;
opacity: 0;
transition: opacity;
transition-duration: var(--vis-tooltip-transition-duration);
z-index: 999999;
padding: var(--vis-tooltip-padding);
color: var(--vis-tooltip-text-color);
border-radius: var(--vis-tooltip-border-radius);
box-shadow: var(--vis-tooltip-box-shadow);
border: solid 1px var(--vis-tooltip-border-color);
background-color: var(--vis-tooltip-background-color);
backdrop-filter: var(--vis-tooltip-backdrop-filter);
`,Rp=Lp,zp=ln`
:root {
--vis-tooltip-background-color: rgba(255, 255, 255, 0.95);
--vis-tooltip-border-color: #e5e9f7;
--vis-tooltip-text-color: #000;
--vis-tooltip-shadow-color: rgba(172, 179, 184, 0.35);
--vis-tooltip-backdrop-filter: none;
--vis-tooltip-padding: 10px 15px;
--vis-tooltip-border-radius: 5px;
--vis-tooltip-transition-duration: 300ms;
--vis-tooltip-box-shadow: none;
--vis-dark-tooltip-background-color: rgba(30,30,30, 0.95);
--vis-dark-tooltip-text-color: #e5e9f7;
--vis-dark-tooltip-border-color: var(--vis-color-grey);
--vis-dark-tooltip-shadow-color: rgba(0,0,0, 0.95);
}
body.theme-dark ${`.${Lp}`} {
--vis-tooltip-background-color: var(--vis-dark-tooltip-background-color);
--vis-tooltip-text-color: var(--vis-dark-tooltip-text-color);
--vis-tooltip-border-color: var(--vis-dark-tooltip-border-color);
--vis-tooltip-shadow-color: var(--vis-dark-tooltip-shadow-color);
}
body.theme-dark {
--vis-tooltip-background-color: rgba(30,30,30, 0.95);
--vis-tooltip-text-color: #e5e9f7;
--vis-tooltip-border-color: var(--vis-color-grey);
--vis-tooltip-shadow-color: rgba(0,0,0, 0.95);
}
`,Bp=B`
bottom: unset;
position: fixed;
`,Vp=B`
opacity: 1;
`,Hp=B`
display: none;
`,Up=B`
label: non-interactive;
pointer-events: none;
user-select: none;
`,Wp=class{constructor(e={}){this._defaultConfig=Fp,this.config=this._defaultConfig,this._setUpEventsThrottled=Qn(this._setUpEvents,500),this._setContainerPositionThrottled=Qn(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement(`div`),this.div=Fa(this.element).attr(`class`,Lp).classed(Vp,!1).classed(Hp,!0),this.setConfig(e),this.components=this.config.components,this._mutationObserver=new MutationObserver(()=>{this._isShown&&(!this.config.followCursor&&this._hoveredElement?this.placeByElement(this._hoveredElement):this._position&&this.place({x:this._position[0],y:this._position[1]}))}),this._mutationObserver.observe(this.div.node(),{childList:!0,subtree:!0})}setConfig(e){this.prevConfig=this.config,this.config=Zn(this._defaultConfig,e),this.prevConfig.horizontalPlacement!==this.config.horizontalPlacement&&this.overrideHorizontalPlacement(void 0),this.config.container&&this.config.container!==this.prevConfig?.container&&this.setContainer(this.config.container),this._setUpAttributes()}setContainer(e){var t;(t=this.element.parentNode)==null||t.removeChild(this.element),this._container=e,this._container.appendChild(this.element),this._setContainerPositionThrottled()}getContainer(){return this._container}hasContainer(){return!!this._container&&this._container.isConnected}setComponents(e){this.components=e}update(){this._container&&this._setUpEventsThrottled()}show(e,t){this.render(e),this.place(t)}_hide(){this.div.classed(Vp,!1).on(`transitionend`,()=>{this.div.classed(Hp,!this._isShown)}),this._isShown=!1}hide(){window.clearTimeout(this._showDelayTimeoutId),this.config.hideDelay?(window.clearTimeout(this._hideDelayTimeoutId),this._hideDelayTimeoutId=setTimeout(()=>this._hide(),this.config.hideDelay)):this._hide()}_display(){window.clearTimeout(this._hideDelayTimeoutId),this.div.classed(Hp,!1).classed(Vp,!0),this._isShown=!0}display(){this._isShown||(this.config.showDelay?(window.clearTimeout(this._showDelayTimeoutId),this._showDelayTimeoutId=setTimeout(()=>{this._display(),this.place({x:this._position[0],y:this._position[1]})},this.config.showDelay)):this._display())}place(e){if(this._position=[e.x,e.y],!this.hasContainer()){console.warn(`Unovis | Tooltip: Container was not set or is not initialized yet`);return}let{config:t}=this,n=this.element.offsetWidth,r=this.element.offsetHeight,i=this._overriddenHorizontalPlacement||(t.horizontalPlacement===Z.Auto?Z.Center:t.horizontalPlacement),a=t.verticalPlacement===Z.Auto?e.y-r<0?Z.Bottom:Z.Top:t.verticalPlacement,o=i===Z.Left?-n-5-t.horizontalShift:i===Z.Center?-n/2:5+t.horizontalShift,s=a===Z.Bottom?5+t.verticalShift:a===Z.Center?-r/2:-5-t.verticalShift-r,[c,l]=this._constraintPosToContainer(e.x+o,e.y+s,n,r);this._applyPosition(c,l,r)}placeByElement(e){let{config:t}=this;this._hoveredElement=e;let n=this.element.offsetWidth,r=this.element.offsetHeight,i=this.isContainerBody(),a=i?window.innerWidth:this._container.scrollWidth,o=e.getBoundingClientRect(),s=i?[o.x,o.y]:La({clientX:o.x,clientY:o.y,pageX:o.x,pageY:o.y},this._container),c=this._overriddenHorizontalPlacement||(t.horizontalPlacement===Z.Auto?s[0]-n<0?Z.Right:s[0]+n>a?Z.Left:Z.Center:t.horizontalPlacement),l=0;switch(c){case Z.Left:l=-n-5-t.horizontalShift;break;case Z.Right:l=o.width+5+t.horizontalShift;break;case Z.Center:default:l=(-n+o.width)/2;break}let u=t.verticalPlacement===Z.Auto?c===Z.Center?s[1]-r<0?Z.Bottom:Z.Top:Z.Center:t.verticalPlacement,d=-r;switch(u){case Z.Center:d+=(r+o.height)/2;break;case Z.Bottom:d+=r+o.height+5+t.verticalShift;break;case Z.Top:default:d+=-5-t.verticalShift;break}let[f,p]=this._constraintPosToContainer(s[0]+l,s[1]+d,n,r);this._applyPosition(f,p,r)}isContainerBody(){return this._container===document.body}overrideHorizontalPlacement(e){this._overriddenHorizontalPlacement=e}render(e){let{config:t,prevConfig:n}=this;e instanceof HTMLElement?this.div.select(`:first-child`).node()!==e&&this.div.html(``).append(()=>e):e!==null&&this.div.html(e||``),this.div.classed(t.className??``,!!t.className).classed(Up,!t.allowHover),n?.className&&n.className!==t.clas
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function ih(e,t){var n=[],r=[];function i(e,t){if(e.length===1)n.push(e[0]),r.push(e[0]);else{for(var a=Array(e.length-1),o=0;o<a.length;o++)o===0&&n.push(e[0]),o===a.length-1&&r.push(e[o+1]),a[o]=[(1-t)*e[o][0]+t*e[o+1][0],(1-t)*e[o][1]+t*e[o+1][1]];i(a,t)}}return e.length&&i(e,t),{left:n,right:r.reverse()}}function ah(e){var t={};return e.length===4&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],e.length===4?t.type=`C`:e.length===3?t.type=`Q`:t.type=`L`,t}function oh(e,t){t||=2;for(var n=[],r=e,i=1/t,a=0;a<t-1;a++){var o=i/(1-i*a),s=ih(r,o);n.push(s.left),r=s.right}return n.push(r),n}function sh(e,t,n){var r=[[e.x,e.y]];return t.x1!=null&&r.push([t.x1,t.y1]),t.x2!=null&&r.push([t.x2,t.y2]),r.push([t.x,t.y]),oh(r,n).map(ah)}var ch=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,lh={M:[`x`,`y`],L:[`x`,`y`],H:[`x`],V:[`y`],C:[`x1`,`y1`,`x2`,`y2`,`x`,`y`],S:[`x2`,`y2`,`x`,`y`],Q:[`x1`,`y1`,`x`,`y`],T:[`x`,`y`],A:[`rx`,`ry`,`xAxisRotation`,`largeArcFlag`,`sweepFlag`,`x`,`y`],Z:[]};Object.keys(lh).forEach(function(e){lh[e.toLowerCase()]=lh[e]});function uh(e,t){for(var n=Array(e),r=0;r<e;r++)n[r]=t;return n}function dh(e){return`${e.type}${lh[e.type].map(function(t){return e[t]}).join(`,`)}`}function fh(e,t){var n={x1:`x`,y1:`y`,x2:`x`,y2:`y`},r=[`xAxisRotation`,`largeArcFlag`,`sweepFlag`];if(e.type!==t.type&&t.type.toUpperCase()!==`M`){var i={};Object.keys(t).forEach(function(a){var o=t[a],s=e[a];s===void 0&&(r.includes(a)?s=o:(s===void 0&&n[a]&&(s=e[n[a]]),s===void 0&&(s=0))),i[a]=s}),i.type=t.type,e=i}return e}function ph(e,t,n){var r=[];if(t.type===`L`||t.type===`Q`||t.type===`C`)r=r.concat(sh(e,t,n));else{var i=eh({},e);i.type===`M`&&(i.type=`L`),r=r.concat(uh(n-1).map(function(){return i})),r.push(t)}return r}function mh(e,t,n){var r=e.length-1,i=t.length-1,a=r/i,o=uh(i).reduce(function(t,r,i){var o=Math.floor(a*i);if(n&&o<e.length-1&&n(e[o],e[o+1])){var s=a*i%1<.5;t[o]&&(s?o>0?--o:o<e.length-1&&(o+=1):o<e.length-1?o+=1:o>0&&--o)}return t[o]=(t[o]||0)+1,t},[]).reduce(function(t,n,r){if(r===e.length-1){var i=uh(n,eh({},e[e.length-1]));return i[0].type===`M`&&i.forEach(function(e){e.type=`L`}),t.concat(i)}return t.concat(ph(e[r],e[r+1],n))},[]);return o.unshift(e[0]),o}function hh(e){for(var t=(e||``).match(ch)||[],n=[],r,i,a=0;a<t.length;++a)if(r=lh[t[a]],r){i={type:t[a]};for(var o=0;o<r.length;++o)i[r[o]]=+t[a+o+1];a+=r.length,n.push(i)}return n}function gh(e,t,n){var r=e==null?[]:e.slice(),i=t==null?[]:t.slice(),a=Qm(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return[]};var c=(r.length===0||r[r.length-1].type===`Z`)&&(i.length===0||i[i.length-1].type===`Z`);r.length>0&&r[r.length-1].type===`Z`&&r.pop(),i.length>0&&i[i.length-1].type===`Z`&&i.pop(),r.length?i.length||i.push(r[0]):r.push(i[0]),Math.abs(i.length-r.length)!==0&&(i.length>r.length?r=mh(r,i,o):i.length<r.length&&(i=mh(i,r,o))),r=r.map(function(e,t){return fh(e,i[t])});var l=r.map(function(e){return Zm({},e)});return c&&(l.push({type:`Z`}),r.push({type:`Z`})),function(e){if(e===1&&s)return t??[];if(e===0)return r;for(var n=0;n<l.length;++n){var a=r[n],o=i[n],c=l[n],u=rh(lh[c.type]),d;try{for(u.s();!(d=u.n()).done;){var f=d.value;c[f]=(1-e)*a[f]+e*o[f],(f===`largeArcFlag`||f===`sweepFlag`)&&(c[f]=Math.round(c[f]))}}catch(e){u.e(e)}finally{u.f()}}return l}}function _h(e,t,n){var r=hh(e),i=hh(t),a=Qm(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return``};var c=gh(r,i,{excludeSegment:o,snapEndsToInput:s});return function(e){if(e===1&&s)return t??``;var n=c(e),r=``,i=rh(n),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r+=dh(o)}}catch(e){i.e(e)}finally{i.f()}
:root {
--vis-line-cursor: default;
--vis-line-stroke-dasharray: none;
--vis-line-stroke-dashoffset: 0;
--vis-line-gapfill-stroke-dasharray: 2 3;
--vis-line-gapfill-stroke-opacity: 0.8;
--vis-line-gapfill-stroke-dashoffset: 0;
}
`,Ch=B`
label: line-component;
`,wh=B`
label: line;
transition: opacity 200ms;
cursor: var(--vis-line-cursor);
`,Th=B`
label: linePath;
fill: none;
stroke-dasharray: var(--vis-line-stroke-dasharray);
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
`,Eh=B`
label: lineSelectionHelper;
fill: none;
stroke: rgba(0, 0, 0, 0);
stroke-width: 8px;
`,Dh=B`
opacity: 0.2;
`,Oh=B`
label: interpolated-path;
fill: none;
stroke-dasharray: var(--vis-line-gapfill-stroke-dasharray);
stroke-dashoffset: var(--vis-line-gapfill-stroke-dashoffset);
stroke-opacity: var(--vis-line-gapfill-stroke-opacity);
`,kh=class e extends jp{constructor(t){super(),this._defaultConfig=bh,this.config=this._defaultConfig,this.curve=yh[$.MonotoneX],this.events={[e.selectors.line]:{mouseover:this._highlight.bind(this),mouseleave:this._resetHighlight.bind(this)}},t&&this.setConfig(t)}get bleed(){let{config:{lineWidth:e}}=this,t=this.yScale.domain(),n=(this.yScale.range()[0]>this.yScale.range()[1]?wp.North:wp.South)===wp.South,r=e>3,i=e>=10;return{top:!i&&(!n&&t[1]===0||n&&t[0]===0)?0:e/2,bottom:!i&&(!n&&t[0]===0||n&&t[1]===0)?0:e/2,left:r?e/2:0,right:r?e/2:0}}_render(e){super._render(e);let{config:t,datamodel:{data:n}}=this,r=Vn(e)?e:t.duration;this.curve=yh[t.curveType],this.lineGen=om().x(e=>e.x).y(e=>e.y).defined(e=>e.defined).curve(this.curve);let i=Wn(t.y)?t.y:[t.y],a=n.map((e,n)=>this.xScale(V(e,t.x,n))),o=i.map(e=>{let r=n.map((n,r)=>{let i=V(n,e,r),o=(Vn(i)||i===null)&&isFinite(i)?i:t.fallbackValue,s=t.interpolateMissingData?(Vn(i)||i===null)&&isFinite(i):isFinite(o);return{x:a[r],y:this.yScale(o??0),defined:s,value:o}}),i=r.reduce((e,t)=>t.defined||e,!1),o=!1;return{values:r,defined:i,gaps:r.reduce((e,n,i)=>{!n.defined&&isFinite(t.fallbackValue)&&e.push(Object.assign(Object.assign({},n),{defined:!0})),!n.defined&&!o&&(o=!0);let a=i>0&&!r[i-1].defined||i<r.length-1&&!r[i+1].defined;return n.defined&&a&&(o||e.push(Object.assign(Object.assign({},n),{defined:!1})),e.push(n),o=!1),e},[]),visible:i&&r.some(e=>e.value!==null)}}),s=this.g.selectAll(`.${wh}`).data(o),c=s.enter().append(`g`).attr(`class`,wh);c.append(`path`).attr(`class`,Th).attr(`stroke`,(e,r)=>vh(n,t.color,r)).attr(`stroke-opacity`,0).attr(`stroke-width`,t.lineWidth),c.append(`path`).attr(`class`,Eh).attr(`d`,this._emptyPath()),c.append(`path`).attr(`class`,Oh).attr(`d`,this._emptyPath()).style(`opacity`,0);let l=c.merge(s);l.style(`cursor`,(e,r)=>er(n,t.cursor,r)),l.each((e,i,a)=>{let o=Fa(a[i]),s=o.select(`.${Th}`),c=o.select(`.${Eh}`),l=o.select(`.${Oh}`),u=e.visible,d=$n(n,t.lineDashArray,i),f=W(s,r).attr(`stroke`,vh(n,t.color,i)).attr(`stroke-width`,t.lineWidth).attr(`stroke-opacity`,u?1:0).style(`stroke-dasharray`,d?.join(` `)??null),p=e.values.some(e=>!e.defined),m=this.lineGen(e.values);if(r&&!p){let e=s.attr(`d`)||this._emptyPath(),t=m||this._emptyPath();f.attrTween(`d`,()=>_h(e,t))}else e.visible&&f.attr(`d`,m);c.attr(`d`,m).attr(`visibility`,u?null:`hidden`),p&&t.interpolateMissingData?W(l,r).attr(`d`,this.lineGen(e.gaps)).attr(`stroke`,vh(n,t.color,i)).attr(`stroke-width`,t.lineWidth-1).style(`opacity`,1):l.transition().duration(r).style(`opacity`,0)}),W(s.exit(),r).style(`opacity`,0).remove()}_emptyPath(){let e=this.xScale.range(),t=this.yScale.range();return`M${e[0]},${t[0]} L${e[1]},${t[0]}`}_highlight(e){let{config:t}=this;t.highlightOnHover&&this.g.selectAll(`.${wh}`).classed(Dh,t=>t!==e)}_resetHighlight(){let{config:e}=this;e.highlightOnHover&&this.g.selectAll(`.${wh}`).classed(Dh,!1)}};kh.selectors=xh;function Ah(e){return e}var jh=1,Mh=2,Nh=3,Ph=4,Fh=1e-6;function Ih(e){return`translate(`+e+`,0)`}function Lh(e){return`translate(0,`+e+`)`}function Rh(e){return t=>+e(t)}function zh(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Bh(){return!this.__axis}function Vh(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===jh||e===Ph?-1:1,u=e===Ph||e===Mh?`x`:`y`,d=e===jh||e===Nh?Ih:Lh;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):Ah),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?zh:Rh)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===jh?`0em`:e===Nh?`0.71em`:`0
`:if(c===`<`){s=r,d+=`< `,c=``;break}c+=f;break;default:c+=f;break}else if(s===a)switch(f){case`>`:c.slice(-2)==`--`&&(s=r),c=``;break;default:c+=f;break}}return t.state=s,t.tag_buffer=c,t.depth=l,t.in_quote_char=u,d}function f(e){let t=new Set;if(typeof e==`string`){let n;for(;n=o.exec(e);)t.add(n[1])}else !n.nonNative&&typeof e[n.iterator]==`function`?t=new Set(e):typeof e.forEach==`function`&&e.forEach(t.add,t);return t}function p(e){let t=s.exec(e);return t?t[1].toLowerCase():null}typeof define==`function`&&define.amd?define(function(){return c}):typeof t==`object`&&t.exports?t.exports=c:e.striptags=c})(e)}));function Zh(e){switch(e){case Yh.Center:return`middle`;case Yh.Right:return`end`;case Yh.Left:default:return`start`}}var Qh=c(Xh(),1),$h=e=>{switch(e){case Yh.Left:return`start`;case Yh.Right:return`end`;case Yh.Center:return`middle`;default:return null}};function eg(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function tg(e){return e.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g)?.filter(Boolean).map(e=>e.toLowerCase()).join(`-`)}function ng(e){return e.replace(/['"]/g,`&#39;`).replace(/\u0000/g,`\\0`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/\v/g,`\\v`).replace(/\t/g,`\\t`).replace(/\f/g,`\\f`)}function rg(e,t=15){return e?e.length>t?`${e.substr(e.length-t,t)}`:e:``}function ig(e,t=15){if(!e)return``;let n=Math.floor((t-3)/2);return e.length>t?`${e.substr(0,n)}${e.substr(-n,n)}`:e}function ag(e,t=15){return e?e.length>t?`${e.substr(0,t)}`:e:``}function og(e,t=15,n=Kh.Middle){if(!e)return``;let r=ag(e,t);return n===Kh.Start?r=rg(e,t):n===Kh.Middle&&(r=ig(e,t)),r}function sg(e,t=[` `]){let n=[e];for(let e=0;e<t.length;e++){let r=t[e];n.forEach((e,t)=>{let i=e.split(r),a=i.map((e,t)=>`${e}${t===i.length-1?``:r}`);n[t]=a}),n=Yn(n)}return n}function cg(e,t,n=[` `,`-`,`.`,`,`]){let r=e.text();if(!r)return;let i=sg(r,Wn(n)?n:[n]),a=parseFloat(e.attr(`x`))||0;e.text(``);let o=e.append(`tspan`).attr(`x`,a),s=`${i[0]}`;o.text(s),i.forEach((n,r)=>{if(r===0)return;let i=`${s}${n}`;o.text(i),o.node().getComputedTextLength()>t?(o.text(s.trim()),o=e.append(`tspan`).attr(`x`,a).attr(`dy`,`1.2em`).text(n),s=n):s+=n})}function lg(e,t,n,r,i,a){t===void 0&&(t=50),n===void 0&&(n=Kh.Middle),r===void 0&&(r=!0),i===void 0&&(i=+window.getComputedStyle(e.node())?.fontSize||0),a===void 0&&(a=Hs());let o=e.text()||``,s=o.length,c=r?i*s*a:e.node().getComputedTextLength(),l=Math.ceil(s*t/(1.1*c));return l<s?(e.text(og(o,l,n)),!0):!1}function ug(e,t,n=Hs()){return e.length*t*n||0}function dg(e,t,n){let r=`http://www.w3.org/2000/svg`,i=document.createElementNS(r,`svg`),a=document.createElementNS(r,`text`);a.textContent=e,a.setAttribute(`font-size`,`${n}`),a.setAttribute(`font-family`,t),i.appendChild(a),document.body.appendChild(i);let o=a.getComputedTextLength();return document.body.removeChild(i),o}function fg(e,t=void 0,n=!0,r=zs,i=!1){let a=`${e.text}`;if(!a)return[];let o=e.fontSize??Vs.fontSize,s=e.fontFamily??Vs.fontFamily,c=e.fontWidthToHeightRatio??Vs.fontWidthToHeightRatio,l=Array.isArray(r)?r:[r];return a.split(`
`).map(e=>{let r=[];if(!t)return[e];let a=sg(e,l),u=``;for(let e=0;e<a.length;e+=1)if((n?ug(u+a[e],o,c):dg(u+a[e],s,o))<t||e===0?u+=a[e]:(r.push(u.trim()),u=a[e]),i)for(;u.trim().length>2&&(n?ug(u,o,c):dg(u,s,o))>t;){let e=u.trim().length-2;for(;e>0;){let i=`${u.substring(0,e)}${Bs}`;if((n?ug(i,o,c):dg(i,s,o))<=t||e===1){r.push(i.trim()),u=u.substring(e);break}e--}}return u&&r.push(u.trim()),r}).flat()}function pg(e,t=void 0,n=void 0,r=!0,i=zs,a=!1){let o=Array.isArray(e)?e.map(e=>Zn(Vs,e)):[Zn(Vs,e)],s=o.map(e=>fg(e,t,r,i,a)),c=o[0],l=-c.fontSize*(c.lineHeight-1),u=[];return o.forEach((e,i)=>{let a=s[i],o=i>0?u[i-1]:void 0,c=o?o.marginBottom:0,d=e.marginTop;l+=Math.max(c,d);let f=e.fontSize*e.lineHeight,p=0;for(let i=0;i<a.length;i+=1){let o=a[i];l+=f;let s=`${o} `,c=r?ug(s,e.fontSize,e.fontWidthToHeightRatio):dg(s,e.fontFamily,e.fontSize);if(p=Math.max(c,p),n&&l+f>n&&i!==a.length-1){o.charAt(o.length-1)===Bs&&(o=o.substr(0,a[i].length-1)),c<t?a[i]=s:a[i]=`${a[i].substr(0,a[i].length-2)}`,a=a.slice(0,i+1);break}}u.push(Object.assign(Object.assign({},e),{_lines:a,_estimatedHeight:l-(o?._estimatedHeight||0),_maxWidth:Math.max(p,o?._maxWidth??0)}))}),u}function mg(e,t=0,n,r){return e.map((i,a)=>{let o=a>0?e[a-1]:void 0,s=o?o.marginBottom/o.fontSize:0,c=i.marginTop/i.fontSize,l=Math.max(s,c),u={fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fill:i.color,y:a===0&&n};return`<tspan xmlns="http://www.w3.org/2000/svg" ${Object.entries(u).filter(([e,t])=>t).map(([e,t])=>`${tg(e)}="${ng(t.toString())}"`).join(` `)}>${i._lines.map((e,n)=>{let o;return o=a===0&&n===0?l:n===0?l+i.lineHeight:i.lineHeight,`<tspan x="${t}" dy="${o}em" dominant-baseline="${r??`auto`}">${e.length?e:`\xA0`}</tspan>`}).join(``)}</tspan>`})}function hg(e){return Rn(e,e=>e._estimatedHeight)}var gg=[`text`,`tspan`,`textPath`,`altGlyph`,`altGlyphDef`,`altGlyphItem`,`glyphRef`,`textRef`,`textArea`];function _g(e,t,n,r){let i=pg(t,n.width,void 0,n.fastMode,n.separator,n.wordBreak),a=n.x??+e.getAttribute(`x`),o=n.y??+e.getAttribute(`y`),s=a??0,c=o??0;if(n.textAlign&&e.setAttribute(`text-anchor`,Zh(n.textAlign)),n.verticalAlign&&n.verticalAlign!==qh.Top){let e=hg(i),t=n.verticalAlign===qh.Middle?-e/2:n.verticalAlign===qh.Bottom?-e:0;c+=t}n.textRotationAngle?e.setAttribute(`transform`,`rotate(${n.textRotationAngle===0||n.textRotationAngle?n.textRotationAngle:0} ${s} ${c})`):e.removeAttribute(`transform`);let l=new DOMParser;e.textContent=``,i.forEach(t=>{let n=(0,Qh.default)(mg([t],s,c,r).join(``),gg),i=l.parseFromString(n,`image/svg+xml`).firstChild;e.appendChild(i)})}var vg=Object.assign(Object.assign({},Ap),{position:void 0,type:void 0,label:void 0,labelFontSize:null,labelTextFitMode:Jh.Wrap,labelTextTrimType:Kh.Middle,gridLine:!0,tickLine:!0,domainLine:!0,numTicks:void 0,minMaxTicksOnly:!1,minMaxTicksOnlyWhenWidthIsLess:250,minMaxTicksOnlyShowGridLines:!1,tickTextWidth:void 0,tickTextSeparator:void 0,tickTextForceWordBreak:!1,tickTextTrimType:Kh.Middle,tickTextFitMode:Jh.Wrap,tickTextFontSize:null,tickTextAlign:void 0,tickTextColor:null,tickTextAngle:void 0,labelMargin:8,labelColor:null,tickFormat:void 0,tickValues:void 0,fullSize:!0,tickPadding:8,tickTextHideOverlapping:void 0});function yg(e,t){let n=Object.entries(e);return Object.fromEntries(n.map(([e])=>[eg(e.replace(t??`--vis-`,``)),e]))}function bg(e,t){ln({":root":e,[`body.theme-dark .${t}`]:Object.keys(e).filter(e=>e.includes(`--vis-dark`)).map(e=>({[e.replace(`--vis-dark`,`--vis`)]:`var(${e})`}))})}var xg=t({axis:()=>Dg,cssVarDefaults:()=>Cg,grid:()=>Og,hideDomain:()=>Eg,hideTickLine:()=>Tg,label:()=>jg,root:()=>Sg,tick:()=>kg,tickLabel:()=>Mg,tickLabelHideable:()=>Ng,tickTextExiting:()=>Ag,variables:()=>wg}),Sg=B`
label: axis-component;
`,Cg={"--vis-axis-tick-color":`#e8e9ef`,"--vis-axis-grid-color":`#e8e9ef`,"--vis-axis-grid-line-width":`1px`,"--vis-axis-grid-line-dasharray":`none`,"--vis-axis-label-font-size":`14px`,"--vis-axis-label-color":`#6c778c`,"--vis-axis-label-weight":`500`,"--vis-axis-tick-label-color":`#6c778c`,"--vis-axis-tick-label-font-size":`12px`,"--vis-axis-tick-label-weight":`500`,"--vis-axis-tick-label-cursor":`default`,"--vis-axis-tick-label-text-decoration":`none`,"--vis-axis-tick-line-width":`1px`,"--vis-axis-tick-label-hide-transition":`opacity 400ms ease-in-out`,"--vis-dark-axis-tick-color":`#6c778c`,"--vis-dark-axis-tick-label-color":`#e8e9ef`,"--vis-dark-axis-grid-color":`#6c778c`,"--vis-dark-axis-label-color":`#fefefe`},wg=yg(Cg);bg(Cg,Sg);var Tg=B`
label: hide-tick-line;
`,Eg=B`
label: hide-domain;
`,Dg=B`
label: axis;
user-select: none;
.domain {
stroke: var(--vis-axis-domain-color, var(--vis-axis-tick-color));
stroke-width: var(--vis-axis-domain-line-width, var(--vis-axis-grid-line-width));
stroke-dasharray: var(--vis-axis-domain-line-dasharray, var(--vis-axis-grid-line-dasharray));
}
&${`.${Tg}`} {
.tick > line {
opacity: 0;
}
}
&${`.${Eg}`} {
.domain {
opacity: 0;
}
}
`,Og=B`
label: grid;
.domain {
opacity: 0;
}
line {
stroke: var(--vis-axis-grid-color);
stroke-width: var(--vis-axis-grid-line-width);
stroke-dasharray: var(--vis-axis-grid-line-dasharray);
}
`,kg=B`
label: tick;
stroke: none;
font-size: var(--vis-axis-tick-label-font-size);
font-weight: var(--vis-axis-tick-label-weight);
line {
stroke: var(--vis-axis-tick-color);
stroke-width: var(--vis-axis-tick-line-width);
}
text {
fill: var(--vis-axis-tick-label-color);
cursor: var(--vis-axis-tick-label-cursor);
font-family: var(--vis-axis-font-family, var(--vis-font-family));
text-decoration: var(--vis-axis-tick-label-text-decoration);
stroke: none;
}
`,Ag=B`
label: tick-text-exiting;
`,jg=B`
label: label;
fill: var(--vis-axis-label-color);
font-size: var(--vis-axis-label-font-size);
font-weight: var(--vis-axis-label-weight);
font-family: var(--vis-axis-font-family, var(--vis-font-family));
text-anchor: middle;
`,Mg=B`
label: tick-label;
`,Ng=B`
label: tick-label-hideable;
opacity: 0;
transition: var(--vis-axis-tick-label-hide-transition);
`,Pg=class extends jp{constructor(e){super(),this._defaultConfig=vg,this.config=this._defaultConfig,this._defaultNumTicks=3,this.events={},e&&this.setConfig(e),this.axisGroup=this.g.append(`g`),this.gridGroup=this.g.append(`g`).attr(`class`,Og)}preRender(){let{config:e}=this,t=this.g.append(`g`).attr(`opacity`,0);this._renderAxis(t,0),this._axisRawBBox=t.node().getBBox(),e.tickTextAlign&&this._alignTickLabels(),this._renderAxisLabel(t),this._axisSizeBBox=this._getAxisSize(t),this._requiredMargin=this._getRequiredMargin(this._axisSizeBBox),t.remove()}getPosition(){let{config:{type:e,position:t}}=this;return t??(e===G.X?Z.Bottom:Z.Left)}_getAxisSize(e){return e.node().getBBox()}_getRequiredMargin(e=this._axisSizeBBox){let{config:{type:t,position:n}}=this;switch(t){case G.X:{let t=this._axisSizeBBox.x+this._axisSizeBBox.width,r=this._axisSizeBBox.x<0?Math.abs(this._axisSizeBBox.x):0,i=t-this._width>1?t-this._width:0;switch(n){case Z.Top:return{top:e.height,left:r,right:i};case Z.Bottom:default:return{bottom:e.height,left:r,right:i}}}case G.Y:{let t=e.height>this._height?(e.height-this._height)/2:0,r=t,i=t;switch(n){case Z.Right:return{right:e.width,top:r,bottom:i};case Z.Left:default:return{left:e.width,top:r,bottom:i}}}}}getRequiredMargin(){return this._requiredMargin}getOffset(e){let{config:{type:t,position:n}}=this;switch(t){case G.X:switch(n){case Z.Top:return{top:e.top,left:e.left};case Z.Bottom:default:return{top:e.top+this._height,left:e.left}}case G.Y:switch(n){case Z.Right:return{top:e.top,left:e.left+this._width};case Z.Left:default:return{top:e.top,left:e.left}}}}_render(e=this.config.duration,t=this.axisGroup){let{config:n}=this;if(this._renderAxis(t,e),this._renderAxisLabel(t),n.gridLine){let t=this._buildGrid();this.gridGroup.selectAll(`*`).interrupt(),W(this.gridGroup,e).call(t).style(`opacity`,1)}else W(this.gridGroup,e).style(`opacity`,0);n.tickTextAlign&&this._alignTickLabels(),this._resolveTickLabelOverlap(t)}_buildAxis(){let{config:{type:e,position:t,tickPadding:n}}=this,r=this._getNumTicks();switch(e){case G.X:switch(t){case Z.Top:return Hh(this.xScale).ticks(r).tickPadding(n);case Z.Bottom:default:return Wh(this.xScale).ticks(r).tickPadding(n)}case G.Y:switch(t){case Z.Right:return Uh(this.yScale).ticks(r).tickPadding(n);case Z.Left:default:return Gh(this.yScale).ticks(r).tickPadding(n)}}}_buildGrid(){let{config:e}=this,t;switch(e.type){case G.X:switch(e.position){case Z.Top:t=Hh(this.xScale);break;case Z.Bottom:default:t=Wh(this.xScale);break}t.tickSize(-this._height);break;case G.Y:switch(e.position){case Z.Right:t=Uh(this.yScale);break;case Z.Left:default:t=Gh(this.yScale);break}t.tickSize(-this._width)}t.tickSizeOuter(0).tickFormat(()=>``);let n=this._getNumTicks()*2,r=t.scale(),i=r.domain(),a=e.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?(()=>{if(!e.minMaxTicksOnlyShowGridLines)return i;let t=r.ticks(n);if(t.length<2)return i;let a=t[1]-+t[0],o=i[1];return o-+t[t.length-1]>a/2?[...t,o]:t})():r.ticks(n);return t.tickValues(a),t}_renderAxis(e=this.axisGroup,t=this.config.duration){let{config:n}=this,r=this._buildAxis(),i=r.scale(),a=n.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?i.domain():i.ticks(this._getNumTicks()),o=a.length;r.tickValues(a),e.selectAll(`*`).interrupt();let s=W(e,t).call(r);e.selectAll(`text`).attr(`dy`,null).attr(`y`,null),s.on(`end`,()=>{this._resolveTickLabelOverlap(e)}),e.selectAll(`g.tick`).classed(kg,!0).style(`font-size`,n.tickTextFontSize);let c=e.selectAll(`g.tick > text`).filter(e=>a.some(t=>Jn(e,t))).classed(Mg,!0).classed(Ng,!!n.tickTextHideOverlapping).style(`fill`,n.tickTextColor);e.selectAll(`g.tick > text`).filter(e=>!a.some(t=>Jn(e,t))).classed(Ag,!0),c.nodes().forEach(e=>Xs(e));let l=r.tickSize(),u=this.getPosition(),d=n.tickTextWidth||(n.type===G.X?this._containerWidth/(o+1):this._containerWidth/5);if(c.each((e,t,r)=>{let i=n.tickFormat?.call(n,e,t,a)??`${e}`,o=r[t];if(!this._tickTextStyleCached){let e=getComputedStyle(o);this._tickTextStyleCached={fontSize:Number.parseFloat(e.fontSize),fontF
:root {
--vis-crosshair-line-stroke-color: #888;
--vis-crosshair-line-stroke-width: 1px;
--vis-crosshair-line-stroke-opacity: 1;
--vis-crosshair-circle-stroke-color: #fff;
--vis-crosshair-circle-stroke-width: 1px;
--vis-crosshair-circle-stroke-opacity: 0.75;
}
`,Rg=B`
label: crosshair-component;
`,zg=B`
stroke: var(--vis-crosshair-line-stroke-color);
stroke-width: var(--vis-crosshair-line-stroke-width);
stroke-opacity: var(--vis-crosshair-line-stroke-opacity);
pointer-events: none;
`,Bg=B`
stroke: var(--vis-crosshair-circle-stroke-color);
stroke-width: var(--vis-crosshair-circle-stroke-width);
stroke-opacity: var(--vis-crosshair-circle-stroke-opacity);
pointer-events: none;
`,Vg=class extends jp{constructor(e){super(),this.clippable=!0,this._defaultConfig=Fg,this.config=this._defaultConfig,this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,this._animFrameId=null,this._accessors={x:void 0,y:void 0,yStacked:void 0,baseline:void 0},e&&this.setConfig(e),this.g.style(`opacity`,0),this.line=this.g.append(`line`).attr(`class`,zg)}set accessors(e){this._accessors=e}get accessors(){let{config:e}=this,t=!!(e.x||e.y||e.yStacked),n=t?e.x:this._accessors.x,r=t?e.y:this._accessors.y;return{x:n,y:r?Wn(r)?r:[r]:void 0,yStacked:t?e.yStacked:this._accessors.yStacked,baseline:e.baseline??this._accessors.baseline}}_isContainerInViewport(){if(!this.container?.node())return!1;let e=this.container.node().getBoundingClientRect(),t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,r=Math.max(0,Math.min(e.right,t)-Math.max(e.left,0)),i=Math.max(0,Math.min(e.bottom,n)-Math.max(e.top,0)),a=e.width*e.height,o=r*i;return a>0&&o/a>=.35}setContainer(e){this.container!==e&&(this.container=e,this.container.on(`mousemove.crosshair`,this._onMouseMove.bind(this)),this.container.on(`mouseout.crosshair`,this._onMouseOut.bind(this)),this.container.on(`wheel.crosshair`,this._onWheel.bind(this)))}_render(e){var t;let{config:n,datamodel:r}=this,i=Vn(e)?e:n.duration,a=n.forceShowAt!==void 0,o=a?this.xScale(n.forceShowAt):this._xPx,s=this.xScale.invert(o),c=r.data?.length&&this.accessors.x?r.data.indexOf(lr(r.data,s,this.accessors.x,Bn.Left)):void 0,l,u;n.snapToData&&(!this.accessors.y&&!this.accessors.yStacked&&r.data?.length&&console.warn(`Unovis | Crosshair: Y accessors have not been configured. Please check if they're present in the configuration object`),!r.data?.length&&this._mouseEvent&&console.warn(`Unovis | Crosshair: No data to snap to. Make sure the data has been passed to the container or to the crosshair itself`),l=lr(r.data,s,this.accessors.x),u=r.data.indexOf(l));let d=this.xScale.range(),f=this.yScale.range(),p=n.snapToData&&l?nr(Math.round(this.xScale(V(l,this.accessors.x,u))),0,this._width):nr(o,d[0],d[1]),m=o>=d[0]&&o<=d[1],h=this._yPx>=Math.min(f[0],f[1])&&this._yPx<=Math.max(f[0],f[1]),g=n.skipRangeCheck?!!this._xPx:this._xPx?m&&h:m;n.hideWhenFarFromPointer&&Math.abs(p-+o)>=n.hideWhenFarFromPointerDistance&&(g=!1);let _=n.tooltip??this.tooltip;if(g&&_&&this._isContainerInViewport()){let e=_.getContainer()||this.container.node(),t=_.isContainerBody(),n=this.accessors.x?V(l,this.accessors.x,u):void 0;if(a){let e=this.container.node().getBoundingClientRect(),r=[(t?o+e.left:o)+this._containerMargin.left,this._height/2+(t?e.top:0)];this._showTooltip(l,n,r,c)}else if(this._mouseEvent){let r=t?[this._mouseEvent.clientX,this._mouseEvent.clientY]:La(this._mouseEvent,e);this._showTooltip(l,n,r,c)}}else this._hideTooltip();if(this._mouseEvent&&=((t=n.onCrosshairMove)==null||t.call(n,g?this.xScale.invert(this._xPx):void 0,l,u,this._mouseEvent),void 0),W(this.g,i).style(`opacity`,g?1:0),!isFinite(o))return;this.line.attr(`y1`,0).attr(`y2`,this._height),W(this.line,i,Nl).attr(`x1`,p).attr(`x2`,p);let v=Hn(n.getCircles)?n.getCircles(s,r.data,this.yScale,c):this.getCircleData(l,u),y=this.g.selectAll(`circle`).data(v,(e,t)=>e.id??t);W(y.enter().append(`circle`).attr(`class`,Bg).attr(`r`,0).attr(`cx`,p).attr(`cy`,e=>e.y).style(`fill`,e=>e.color).style(`stroke`,e=>e.strokeColor).style(`stroke-width`,e=>e.strokeWidth).merge(y),i,Nl).attr(`cx`,p).attr(`cy`,e=>e.y).attr(`r`,4).style(`opacity`,e=>e.opacity).style(`fill`,e=>e.color).style(`stroke`,e=>e.strokeColor).style(`stroke-width`,e=>e.strokeWidth),y.exit().remove()}hide(e){window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{var t,n;this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,(n=(t=this.config).onCrosshairMove)==null||n.call(t,void 0,void 0,void 0,e),this._render()})}_onMouseMove(e){let{datamodel:t,element:n}=this;!this.accessors.x&&t.data?.length&&console.warn(`Unovis | Crosshair: X accessor function has not been configured. Please check if it's pre
label: area-component;
`,Gg=ln`
:root {
--vis-area-cursor: default;
--vis-area-fill-opacity: 1;
--vis-area-stroke-color: none;
--vis-area-stroke-width: 0px;
--vis-area-stroke-dasharray: none;
--vis-area-stroke-opacity: 1;
--vis-area-hover-fill-opacity: none;
--vis-area-hover-stroke-width: none;
/* Dark Theme */
--vis-dark-area-stroke-color: none;
}
body.theme-dark ${`.${Wg}`} {
--vis-area-stroke-color: var(--vis-dark-area-stroke-color);
}
`,Kg=B`
label: area;
cursor: var(--vis-area-cursor);
fill-opacity: var(--vis-area-fill-opacity);
stroke-width: var(--vis-area-stroke-width);
stroke-dasharray: var(--vis-area-stroke-dasharray);
stroke: var(--vis-area-stroke-color);
stroke-opacity: var(--vis-area-stroke-opacity);
&:hover {
fill-opacity: var(--vis-area-hover-fill-opacity);
stroke-width: var(--vis-area-hover-stroke-width);
}
`,qg=B`
label: areaLinePath;
fill: none;
stroke-dasharray: var(--vis-line-stroke-dasharray);
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
`,Jg=class e extends jp{constructor(t){super(),this._defaultConfig=Hg,this.config=this._defaultConfig,this.stacked=!0,this.events={[e.selectors.area]:{}},t&&this.setConfig(t),this.stacked=Array.isArray(this.config.y)}get bleed(){let{config:{line:e,lineWidth:t}}=this;if(!e)return{top:0,bottom:0,left:0,right:0};let n=this.yScale.domain(),r=(this.yScale.range()[0]>this.yScale.range()[1]?wp.North:wp.South)===wp.South,i=t>3,a=t>=10;return{top:!a&&(!r&&n[1]===0||r&&n[0]===0)?0:t/2,bottom:!a&&(!r&&n[0]===0||r&&n[1]===0)?0:t/2,left:i?t/2:0,right:i?t/2:0}}_render(e){super._render(e);let{config:t,datamodel:{data:n}}=this,r=Vn(e)?e:t.duration,i=yh[t.curveType];this._areaGen=sm().x(e=>e.x).y0(e=>e.y0).y1(e=>e.y1).curve(i);let a=Wn(t.y)?t.y:[t.y],o=n.map((e,n)=>this.xScale(V(e,t.x,n))),s=ar(n,t.baseline,a,this._prevNegative);this._prevNegative=s.map(e=>!!e.isMostlyNegative);let c=[],l=s.map(e=>e.map((e,n)=>{let r=o[n],i=this.yScale(e[0]),a=this.yScale(e[1]),s=a>i,l=t.stackMinHeight&&c[n]||0,u=s?i+l:i-l,d=s?a+l:a-l,f=0;return(t.minHeight||t.minHeight1Px)&&Math.abs(d-u)<(t.minHeight??1)&&(f=(t.minHeight??1)-Math.abs(d-u),t.stackMinHeight&&(c[n]=l+f)),{x:r,y0:u,y1:s?d+f:d-f}})),u=l.length-1,d=[...l].reverse(),f=this.g.selectAll(`.${Kg}`).data(d),p=W(f.enter().append(`path`).attr(`class`,Kg).attr(`d`,e=>this._areaGen(e)||this._emptyPath()).style(`opacity`,0).style(`fill`,(e,r)=>vh(n,t.color,u-r)).merge(f),r).style(`opacity`,(e,r)=>e.some(e=>e.y0-e.y1!==0)?V(n,t.opacity,u-r):0).style(`fill`,(e,r)=>vh(n,t.color,u-r)).style(`cursor`,(e,r)=>er(n,t.cursor,u-r));r?p.attrTween(`d`,(e,t,n)=>_h(Fa(n[t]).attr(`d`),this._areaGen(e)||this._emptyPath())):p.attr(`d`,e=>this._areaGen(e)||this._emptyPath()),W(f.exit(),r).style(`opacity`,0).remove(),t.line&&this._renderLines(r,l)}_renderLines(e,t){let{config:n,datamodel:{data:r}}=this,i=t.length-1,a=[...t].reverse(),o=n.lineColor??n.color,s=this.g.selectAll(`.${qg}`).data(a),c=this.g.selectAll(`.${Kg}`).nodes(),l=W(s.enter().insert(`path`,(e,t)=>c[t+1]).attr(`class`,qg).attr(`stroke`,(e,t)=>vh(r,o,i-t)).attr(`stroke-width`,n.lineWidth).attr(`stroke-opacity`,0).merge(s),e).attr(`stroke`,(e,t)=>vh(r,o,i-t)).attr(`stroke-width`,n.lineWidth).attr(`stroke-opacity`,1).attr(`cursor`,(e,t)=>er(r,n.cursor,i-t)).style(`stroke-dasharray`,(e,t)=>$n(r,n.lineDashArray,t)?.join(` `)??null),u=yh[n.curveType];this._lineGen=om().x(e=>e.x).y(e=>e.y1).curve(u),e?l.attrTween(`d`,(e,t,n)=>_h(Fa(n[t]).attr(`d`)||this._emptyLinePath(),this._lineGen(e)||this._emptyLinePath())):l.attr(`d`,e=>this._lineGen(e)||this._emptyLinePath()),W(s.exit(),e).style(`opacity`,0).remove()}getYDataExtent(e){let{config:t,datamodel:n}=this,r=Wn(t.y)?t.y:[t.y],i=this.xScale.domain();return rr(e?ur(n.data,i,t.x,!0):n.data,t.baseline,...r)}_emptyPath(){let e=this.xScale.range(),t=this.yScale.domain(),n=this.yScale((t[0]+t[1])/2),r=n;return this._areaGen([{y0:n,y1:r,x:e[0]},{y0:n,y1:r,x:e[1]}])}_emptyLinePath(){let e=this.xScale.range(),t=this.yScale.range();return`M${e[0]},${t[0]} L${e[1]},${t[0]}`}};Jg.selectors=Ug;var Yg=Symbol(`componentAccessorKey`),Xg=Symbol(`tooltipAccessorKey`),Zg=Symbol(`crosshairAccessorKey`),Qg=Symbol(`axisAccessorKey`),$g=Symbol(`annotationsAccessorKey`);function e_(e,t){return Jn(e,t)}function t_(e){let t=f(),n=t.attrs;return E(()=>{let r={},i=t?.vnode.props??{};return Object.keys(i).forEach(t=>{r[y(t)]=e[y(t)]}),{...r,...n}})}var n_=A({__name:`index`,props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},clipPathExtend:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(e,{expose:t}){let n=e,{data:r}=S(n),c=t_(n),u=D(),d=b({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),f=D();return a(r,()=>{u.va
${r} [data-chart=${e.id}] {
${n.value.map(([e,n])=>{let r=n.theme?.[t]||n.color;return r?` --color-${e}: ${r};`:null}).join(`
`)}
}
`).join(`
`)),1)]),_:1})):g(``,!0)}}),m_=[`data-chart`],h_=A({__name:`ChartContainer`,props:{id:{},class:{type:[Boolean,null,String,Object,Array]},config:{},cursor:{type:Boolean}},setup(t){let n=t,{config:r}=S(n),a=me(),o=E(()=>`chart-${n.id||a.replace(/:/g,``)}`);return k_({id:a,config:r}),(s,c)=>(i(),O(`div`,{"data-slot":`chart`,"data-chart":o.value,class:re(M(fe)(`[&_.tick_text]:!fill-muted-foreground [&_.tick_line]:!stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex flex-col aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden [&_[data-vis-xy-container]]:h-full [&_[data-vis-single-container]]:h-full h-full [&_[data-vis-xy-container]]:w-full [&_[data-vis-single-container]]:w-full w-full `,n.class)),style:e({"--vis-tooltip-padding":`0px`,"--vis-tooltip-background-color":`transparent`,"--vis-tooltip-border-color":`transparent`,"--vis-tooltip-text-color":`none`,"--vis-tooltip-shadow-color":`none`,"--vis-tooltip-backdrop-filter":`none`,"--vis-crosshair-circle-stroke-color":`#0000`,"--vis-crosshair-line-stroke-width":t.cursor?`1px`:`0px`,"--vis-font-family":`var(--font-sans)`})},[ie(s.$slots,`default`,{id:M(a),config:M(r)}),v(p_,{id:o.value},null,8,[`id`])],14,m_))}}),g_=A({__name:`ChartLegendContent`,props:{hideIcon:{type:Boolean},nameKey:{},verticalAlign:{default:`bottom`},class:{type:[Boolean,null,String,Object,Array]}},setup(t){let n=t,{id:r,config:a}=O_(),o=E(()=>Object.entries(a.value).map(([e])=>({key:n.nameKey||e,itemConfig:a.value[e]}))),c=D(``);return s(()=>{c.value=`[data-chart="chart-${r}"]>[data-vis-xy-container]`}),(r,a)=>c.value?(i(),O(`div`,{key:0,class:re(M(fe)(`flex items-center justify-center gap-4`,t.verticalAlign===`top`?`pb-3`:`pt-3`,n.class))},[(i(!0),O(T,null,d(o.value,({key:t,itemConfig:n})=>(i(),O(`div`,{key:t,class:re(M(fe)(`[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3`))},[n?.icon?(i(),x(p(n.icon),{key:0})):(i(),O(`div`,{key:1,class:`h-2 w-2 shrink-0 rounded-[2px]`,style:e({backgroundColor:n.color})},null,4)),j(` `+k(n?.label),1)],2))),128))],2)):g(``,!0)}}),__={key:0,class:`font-medium`},v_={class:`grid gap-1.5`},y_={class:`grid gap-1.5`},b_={key:0,class:`font-medium`},x_={class:`text-muted-foreground`},S_={key:0,class:`text-foreground font-mono font-medium tabular-nums`},C_=A({__name:`ChartTooltipContent`,props:{hideLabel:{type:Boolean},hideIndicator:{type:Boolean},indicator:{default:`dot`},nameKey:{},labelKey:{},labelFormatter:{},payload:{default:()=>({})},config:{default:()=>({})},class:{type:[Boolean,null,String,Object,Array]},color:{},x:{}},setup(t){let n=t,r=E(()=>Object.entries(n.payload).map(([e,t])=>({key:e,value:t,itemConfig:n.config[e],indicatorColor:n.config[e]?.color??n.payload.fill})).filter(e=>e.itemConfig)),a=E(()=>Object.keys(n.payload).length===1&&n.indicator!==`dot`),o=E(()=>n.hideLabel?null:n.labelFormatter&&n.x!==void 0?n.labelFormatter(n.x):n.labelKey?n.config[n.labelKey]?.label||n.payload[n.labelKey]:n.x);return(s,c)=>(i(),O(`div`,{class:re(M(fe)(`border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl`,n.class))},[ie(s.$slots,`default`,{},()=>[!a.value&&o.value?(i(),O(`div`,__,k(o.value),1)):g(``,!0),C(`div`,v_,[(i(!0),O(T,null,d(r.value,({value:n,itemConfig:r,indicatorColor:s,key:c})=>(i(),O(`div`,{key:c,class:re(M(fe)(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5`,t.indicator===`dot`&&`items-center`))},[r?.icon?(i(),x(p(r.icon),{key:0})):t.hideIndicator?g(``,!0):(i(),O(`div`,{key:1,class:re(M(fe)(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":t.indic
<linearGradient id="fillDesktop" x1="0" y1="0" x2="0" y2="1">
<stop
offset="5%"
stop-color="var(--color-desktop)"
stop-opacity="0.8"
/>
<stop
offset="95%"
stop-color="var(--color-desktop)"
stop-opacity="0.1"
/>
</linearGradient>
<linearGradient id="fillMobile" x1="0" y1="0" x2="0" y2="1">
<stop
offset="5%"
stop-color="var(--color-mobile)"
stop-opacity="0.8"
/>
<stop
offset="95%"
stop-color="var(--color-mobile)"
stop-opacity="0.1"
/>
</linearGradient>
`,M_=A({__name:`overview-chart`,setup(e){let t=[{date:new Date(`2024-04-01`),desktop:222,mobile:150},{date:new Date(`2024-04-02`),desktop:97,mobile:180},{date:new Date(`2024-04-03`),desktop:167,mobile:120},{date:new Date(`2024-04-04`),desktop:242,mobile:260},{date:new Date(`2024-04-05`),desktop:373,mobile:290},{date:new Date(`2024-04-06`),desktop:301,mobile:340},{date:new Date(`2024-04-07`),desktop:245,mobile:180},{date:new Date(`2024-04-08`),desktop:409,mobile:320},{date:new Date(`2024-04-09`),desktop:59,mobile:110},{date:new Date(`2024-04-10`),desktop:261,mobile:190},{date:new Date(`2024-04-11`),desktop:327,mobile:350},{date:new Date(`2024-04-12`),desktop:292,mobile:210},{date:new Date(`2024-04-13`),desktop:342,mobile:380},{date:new Date(`2024-04-14`),desktop:137,mobile:220},{date:new Date(`2024-04-15`),desktop:120,mobile:170},{date:new Date(`2024-04-16`),desktop:138,mobile:190},{date:new Date(`2024-04-17`),desktop:446,mobile:360},{date:new Date(`2024-04-18`),desktop:364,mobile:410},{date:new Date(`2024-04-19`),desktop:243,mobile:180},{date:new Date(`2024-04-20`),desktop:89,mobile:150},{date:new Date(`2024-04-21`),desktop:137,mobile:200},{date:new Date(`2024-04-22`),desktop:224,mobile:170},{date:new Date(`2024-04-23`),desktop:138,mobile:230},{date:new Date(`2024-04-24`),desktop:387,mobile:290},{date:new Date(`2024-04-25`),desktop:215,mobile:250},{date:new Date(`2024-04-26`),desktop:75,mobile:130},{date:new Date(`2024-04-27`),desktop:383,mobile:420},{date:new Date(`2024-04-28`),desktop:122,mobile:180},{date:new Date(`2024-04-29`),desktop:315,mobile:240},{date:new Date(`2024-04-30`),desktop:454,mobile:380},{date:new Date(`2024-05-01`),desktop:165,mobile:220},{date:new Date(`2024-05-02`),desktop:293,mobile:310},{date:new Date(`2024-05-03`),desktop:247,mobile:190},{date:new Date(`2024-05-04`),desktop:385,mobile:420},{date:new Date(`2024-05-05`),desktop:481,mobile:390},{date:new Date(`2024-05-06`),desktop:498,mobile:520},{date:new Date(`2024-05-07`),desktop:388,mobile:300},{date:new Date(`2024-05-08`),desktop:149,mobile:210},{date:new Date(`2024-05-09`),desktop:227,mobile:180},{date:new Date(`2024-05-10`),desktop:293,mobile:330},{date:new Date(`2024-05-11`),desktop:335,mobile:270},{date:new Date(`2024-05-12`),desktop:197,mobile:240},{date:new Date(`2024-05-13`),desktop:197,mobile:160},{date:new Date(`2024-05-14`),desktop:448,mobile:490},{date:new Date(`2024-05-15`),desktop:473,mobile:380},{date:new Date(`2024-05-16`),desktop:338,mobile:400},{date:new Date(`2024-05-17`),desktop:499,mobile:420},{date:new Date(`2024-05-18`),desktop:315,mobile:350},{date:new Date(`2024-05-19`),desktop:235,mobile:180},{date:new Date(`2024-05-20`),desktop:177,mobile:230},{date:new Date(`2024-05-21`),desktop:82,mobile:140},{date:new Date(`2024-05-22`),desktop:81,mobile:120},{date:new Date(`2024-05-23`),desktop:252,mobile:290},{date:new Date(`2024-05-24`),desktop:294,mobile:220},{date:new Date(`2024-05-25`),desktop:201,mobile:250},{date:new Date(`2024-05-26`),desktop:213,mobile:170},{date:new Date(`2024-05-27`),desktop:420,mobile:460},{date:new Date(`2024-05-28`),desktop:233,mobile:190},{date:new Date(`2024-05-29`),desktop:78,mobile:130},{date:new Date(`2024-05-30`),desktop:340,mobile:280},{date:new Date(`2024-05-31`),desktop:178,mobile:230},{date:new Date(`2024-06-01`),desktop:178,mobile:200},{date:new Date(`2024-06-02`),desktop:470,mobile:410},{date:new Date(`2024-06-03`),desktop:103,mobile:160},{date:new Date(`2024-06-04`),desktop:439,mobile:380},{date:new Date(`2024-06-05`),desktop:88,mobile:140},{date:new Date(`2024-06-06`),desktop:294,mobile:250},{date:new Date(`2024-06-07`),desktop:323,mobile:370},{date:new Date(`2024-06-08`),desktop:385,mobile:320},{date:new Date(`2024-06-09`),desktop:438,mobile:480},{date:new Date(`2024-06-10`),desktop:155,mobile:200},{date:new Date(`2024-06-11`),desktop:92,mobile:150},{date:new Date(`2024-06-12`),desktop:492,mobile:420},{date:new Date(`2024-06-13`),desktop:81,mobile:130},{date:new Date(`2024-06-14`),desktop:426,mobile:380},{date:new Date(`2024-06-15`),desktop:307,mobile:350},{date:new Date(`2024-06-16`),