usage-board 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1 -1
- package/dist/public/_nuxt/{DhnbCV8M.js → 15CW3D68.js} +1 -1
- package/dist/public/_nuxt/{BT5lZ84X.js → B6G-s9D-.js} +1 -1
- package/dist/public/_nuxt/{BFuazmgM.js → BeEwECnn.js} +1 -1
- package/dist/public/_nuxt/{Rw8uLrAX.js → BeygfM9p.js} +1 -1
- package/dist/public/_nuxt/{DJtZPkAh.js → Bu4SpN_a.js} +1 -1
- package/dist/public/_nuxt/{Bhg6RTpr.js → C6ydMk2z.js} +1 -1
- package/dist/public/_nuxt/{CBNzCW3N.js → Dn8cXZx3.js} +3 -3
- package/dist/public/_nuxt/{uC637M1z.js → DysUC14A.js} +6 -6
- package/dist/public/_nuxt/{CJwUiTrM.js → KLhV325n.js} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/ac4b25d6-d6eb-44bb-8c5b-b1d6f651c196.json +1 -0
- package/dist/public/_nuxt/{4bxbFgue.js → chy2QJx0.js} +1 -1
- package/dist/public/_nuxt/{BWrHX8SV.js → pmnAmEjb.js} +1 -1
- package/dist/server/chunks/build/client.precomputed.mjs +1 -1
- package/dist/server/chunks/nitro/nitro.mjs +90 -90
- package/package.json +1 -1
- package/dist/public/_nuxt/builds/meta/8e0230d2-a165-4dfa-b759-5387bcb88e4e.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as fe,L as ve,M as At,N as Z,O as be,Q as Ht,R as
|
|
1
|
+
import{K as fe,L as ve,M as At,N as Z,O as be,Q as Ht,R as it,U as N,W,X as Nt,Y as z,Z as _t,$ as pt,a0 as $t,a1 as Yt,a2 as V,a3 as ye,a4 as Kt,a5 as _e,a6 as ke,a7 as xe,a8 as Qt,a9 as X,aa as Jt,ab as Se,ac as Te,ad as lt,ae as Dt,af as Ae,ag as Mt,ah as $e,ai as Xt,aj as xt,ak as De,al as Ce,am as we,an as te,ao as Re,ap as Me,aq as Le,ar as Ue,as as Oe,at as Et,au as Pt,av as Ee,aw as Pe,ax as ee,I as jt,S as je,f as qt,z as ae,_ as ne,n as tt,g as Y,o as rt,q as Ve,ay as Ie,k as Zt,az as Fe,aA as Lt,p as We,aB as ze,s as Be,t as Ge,v as He,w as Ne,x as Ye,y as Ke,B as Xe,m as Q,H as qe,G as Ze,F as Qe}from"./chy2QJx0.js";import{_ as Je,a as ta,b as ea}from"./C6ydMk2z.js";import{z as et,G as aa,p as na,i as mt,v as Vt,o as F,c as K,C as sa,E as oa,r as It,ai as Ct,ag as wt,ad as se,Q as oe,n as ie,h as $,B as ht,w as M,a as U,t as j,b as S,D as C,K as St,J as Tt,S as Ft,Y as ia,a9 as la,d as I,a3 as ra,I as ca,a4 as ua}from"./Dn8cXZx3.js";const da=Object.assign(Object.assign({},fe),{tooltip:void 0,annotations:void 0});class ga extends ve{constructor(e,t,n){var i;super(e),this._defaultConfig=da,this.config=this._defaultConfig,t&&(this.updateContainer(t,!0),this.component=t.component),n&&this.setData(n,!0),!((i=this.component)===null||i===void 0)&&i.datamodel.data&&this.render()}setData(e,t){var n;const{config:i}=this;this.component&&this.component.setData(e),t||this.render(),(n=i.tooltip)===null||n===void 0||n.hide()}updateContainer(e,t){super.updateContainer(e),this._removeAllChildren(),this.component=e.component,e.sizing&&(this.component.sizing=e.sizing),this.element.appendChild(this.component.element);const n=e.tooltip;n&&(n.hasContainer()||n.setContainer(this._container),n.setComponents([this.component]));const i=e.annotations;i&&this.element.appendChild(i.element),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),t||this.render()}updateComponent(e,t){this.component.setConfig(e),t||this.render()}update(e,t,n){e&&this.updateContainer(e,!0),t&&this.updateComponent(t,!0),n&&this.setData(n,!0),this.render()}getFitWidthScale(){const{config:e,component:t}=this,n=t;if(!n.getWidth)return 1;const i=n.getWidth()+e.margin.left+e.margin.right;return this.width/i}_preRender(){var e,t;super._preRender(),this.component.setSize(this.width,this.height,this.containerWidth,this.containerHeight),this.component.setContainerMargin(this.config.margin),(e=this.config.annotations)===null||e===void 0||e.setSize(this.width,this.height,this.containerWidth,this.containerHeight),(t=this.config.annotations)===null||t===void 0||t.setContainerMargin(this.config.margin)}_render(e){var t,n;const{config:i,component:r}=this;super._render(e),r.g.attr("transform",`translate(${i.margin.left},${i.margin.top})`),r.render(e),(t=i.annotations)===null||t===void 0||t.render(e),i.tooltip&&i.tooltip.update(),(n=i.onRenderComplete)===null||n===void 0||n.call(i,this.svg.node(),i.margin,this.containerWidth,this.containerHeight,this.width,this.height)}render(e=this.config.duration){const{config:t,component:n}=this;if(t.sizing===At.Extend||t.sizing===At.FitWidth){const i=t.sizing===At.FitWidth,r=n,s=r.getWidth()+t.margin.left+t.margin.right,a=r.getHeight()+t.margin.top+t.margin.bottom,g=i?this.getFitWidthScale():1,l=this.svg.attr("width"),o=this.svg.attr("height"),h=s*g,m=a*g,b=l||o;Z(this.svg,b?e:0).attr("width",h).attr("height",m).attr("viewBox",`0 0 ${s} ${i?m:a}`).attr("preserveAspectRatio","xMinYMin")}else this.svg.attr("width",this.config.width||this.containerWidth).attr("height",this.config.height||this.containerHeight);this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}_onResize(){var e;const{config:t}=this;super._onResize(),(e=t.tooltip)===null||e===void 0||e.hide()}destroy(){var e,t;const{component:n,config:i}=this;super.destroy(),n?.destroy(),(e=i.tooltip)===null||e===void 0||e.destroy(),(t=i.annotations)===null||t===void 0||t.destroy()}}function pa(p){return p.innerRadius}function ha(p){return p.outerRadius}function ma(p){return p.startAngle}function fa(p){return p.endAngle}function va(p){return p&&p.padAngle}function ba(p,e,t,n,i,r,s,a){var g=t-p,l=n-e,o=s-i,h=a-r,m=h*g-o*l;if(!(m*m<z))return m=(o*(e-r)-h*(p-i))/m,[p+m*g,e+m*l]}function bt(p,e,t,n,i,r,s){var a=p-t,g=e-n,l=(s?r:-r)/pt(a*a+g*g),o=l*g,h=-l*a,m=p+o,b=e+h,d=t+o,v=n+h,u=(m+d)/2,k=(b+v)/2,w=d-m,R=v-b,L=w*w+R*R,y=i-r,c=m*v-d*b,f=(R<0?-1:1)*pt(ye(0,y*y*L-c*c)),A=(c*R-w*f)/L,E=(-c*w-R*f)/L,P=(c*R+w*f)/L,T=(-c*w+R*f)/L,O=A-u,_=E-k,D=P-u,H=T-k;return O*O+_*_>D*D+H*H&&(A=P,E=T),{cx:A,cy:E,x01:-o,y01:-h,x11:A*(i/y-1),y11:E*(i/y-1)}}function ya(){var p=pa,e=ha,t=W(0),n=null,i=ma,r=fa,s=va,a=null,g=be(l);function l(){var o,h,m=+p.apply(this,arguments),b=+e.apply(this,arguments),d=i.apply(this,arguments)-Nt,v=r.apply(this,arguments)-Nt,u=Yt(v-d),k=v>d;if(a||(a=o=g()),b<m&&(h=b,b=m,m=h),!(b>z))a.moveTo(0,0);else if(u>_t-z)a.moveTo(b*it(d),b*N(d)),a.arc(0,0,b,d,v,!k),m>z&&(a.moveTo(m*it(v),m*N(v)),a.arc(0,0,m,v,d,k));else{var w=d,R=v,L=d,y=v,c=u,f=u,A=s.apply(this,arguments)/2,E=A>z&&(n?+n.apply(this,arguments):pt(m*m+b*b)),P=$t(Yt(b-m)/2,+t.apply(this,arguments)),T=P,O=P,_,D;if(E>z){var H=Kt(E/m*N(A)),at=Kt(E/b*N(A));(c-=H*2)>z?(H*=k?1:-1,L+=H,y-=H):(c=0,L=y=(d+v)/2),(f-=at*2)>z?(at*=k?1:-1,w+=at,R-=at):(f=0,w=R=(d+v)/2)}var q=b*it(w),nt=b*N(w),ct=m*it(y),J=m*N(y);if(P>z){var ut=b*it(R),st=b*N(R),dt=m*it(L),ft=m*N(L),G;if(u<Ht)if(G=ba(q,nt,dt,ft,ut,st,ct,J)){var gt=q-G[0],x=nt-G[1],B=ut-G[0],ot=st-G[1],Bt=1/N(_e((gt*B+x*ot)/(pt(gt*gt+x*x)*pt(B*B+ot*ot)))/2),Gt=pt(G[0]*G[0]+G[1]*G[1]);T=$t(P,(m-Gt)/(Bt-1)),O=$t(P,(b-Gt)/(Bt+1))}else T=O=0}f>z?O>z?(_=bt(dt,ft,q,nt,b,O,k),D=bt(ut,st,ct,J,b,O,k),a.moveTo(_.cx+_.x01,_.cy+_.y01),O<P?a.arc(_.cx,_.cy,O,V(_.y01,_.x01),V(D.y01,D.x01),!k):(a.arc(_.cx,_.cy,O,V(_.y01,_.x01),V(_.y11,_.x11),!k),a.arc(0,0,b,V(_.cy+_.y11,_.cx+_.x11),V(D.cy+D.y11,D.cx+D.x11),!k),a.arc(D.cx,D.cy,O,V(D.y11,D.x11),V(D.y01,D.x01),!k))):(a.moveTo(q,nt),a.arc(0,0,b,w,R,!k)):a.moveTo(q,nt),!(m>z)||!(c>z)?a.lineTo(ct,J):T>z?(_=bt(ct,J,ut,st,m,-T,k),D=bt(q,nt,dt,ft,m,-T,k),a.lineTo(_.cx+_.x01,_.cy+_.y01),T<P?a.arc(_.cx,_.cy,T,V(_.y01,_.x01),V(D.y01,D.x01),!k):(a.arc(_.cx,_.cy,T,V(_.y01,_.x01),V(_.y11,_.x11),!k),a.arc(0,0,m,V(_.cy+_.y11,_.cx+_.x11),V(D.cy+D.y11,D.cx+D.x11),k),a.arc(D.cx,D.cy,T,V(D.y11,D.x11),V(D.y01,D.x01),!k))):a.arc(0,0,m,y,L,k)}if(a.closePath(),o)return a=null,o+""||null}return l.centroid=function(){var o=(+p.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +r.apply(this,arguments))/2-Ht/2;return[it(h)*o,N(h)*o]},l.innerRadius=function(o){return arguments.length?(p=typeof o=="function"?o:W(+o),l):p},l.outerRadius=function(o){return arguments.length?(e=typeof o=="function"?o:W(+o),l):e},l.cornerRadius=function(o){return arguments.length?(t=typeof o=="function"?o:W(+o),l):t},l.padRadius=function(o){return arguments.length?(n=o==null?null:typeof o=="function"?o:W(+o),l):n},l.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:W(+o),l):i},l.endAngle=function(o){return arguments.length?(r=typeof o=="function"?o:W(+o),l):r},l.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:W(+o),l):s},l.context=function(o){return arguments.length?(a=o??null,l):a},l}function _a(p,e){return e<p?-1:e>p?1:e>=p?0:NaN}function ka(p){return p}function xa(){var p=ka,e=_a,t=null,n=W(0),i=W(_t),r=W(0);function s(a){var g,l=(a=ke(a)).length,o,h,m=0,b=new Array(l),d=new Array(l),v=+n.apply(this,arguments),u=Math.min(_t,Math.max(-_t,i.apply(this,arguments)-v)),k,w=Math.min(Math.abs(u)/l,r.apply(this,arguments)),R=w*(u<0?-1:1),L;for(g=0;g<l;++g)(L=d[b[g]=g]=+p(a[g],g,a))>0&&(m+=L);for(e!=null?b.sort(function(y,c){return e(d[y],d[c])}):t!=null&&b.sort(function(y,c){return t(a[y],a[c])}),g=0,h=m?(u-l*R)/m:0;g<l;++g,v=k)o=b[g],L=d[o],k=v+(L>0?L*h:0)+R,d[o]={data:a[o],index:g,value:L,startAngle:v,endAngle:k,padAngle:w};return d}return s.value=function(a){return arguments.length?(p=typeof a=="function"?a:W(+a),s):p},s.sortValues=function(a){return arguments.length?(e=a,t=null,s):e},s.sort=function(a){return arguments.length?(t=a,e=null,s):t},s.startAngle=function(a){return arguments.length?(n=typeof a=="function"?a:W(+a),s):n},s.endAngle=function(a){return arguments.length?(i=typeof a=="function"?a:W(+a),s):i},s.padAngle=function(a){return arguments.length?(r=typeof a=="function"?a:W(+a),s):r},s}function Sa({x:p,y:e,w:t,h:n,tl:i=!1,tr:r=!1,bl:s=!1,br:a=!1,r:g=0}){let l;l=`M${p+g},${e}h${t-2*g}`;let o=r?g:0,h=r?0:g;return l+=`a${o},${o} 0 0 1 ${o},${o}`,l+=`h${h}v${h}`,l+=`v${n-2*g}`,o=a?g:0,h=a?0:g,l+=`a${o},${o} 0 0 1 ${-o},${o}`,l+=`v${h}h${-h}`,l+=`h${2*g-t}`,o=s?g:0,h=s?0:g,l+=`a${o},${o} 0 0 1 ${-o},${-o}`,l+=`h${-h}v${-h}`,l+=`v${2*g-n}`,o=i?g:0,h=i?0:g,l+=`a${o},${o} 0 0 1 ${o},${-o}`,l+=`v${-h}h${h}`,l+="z",l}const Ta=Object.assign(Object.assign({},xe),{color:void 0,barMaxWidth:void 0,barWidth:void 0,dataStep:void 0,barPadding:0,roundedCorners:2,cursor:null,barMinHeight1Px:!1,barMinHeightZeroValue:null,orientation:Qt.Vertical}),le=X`
|
|
2
2
|
label: stacked-bar-component;
|
|
3
3
|
`,Aa=Jt`
|
|
4
4
|
:root {
|
|
@@ -13,7 +13,7 @@ import{K as fe,L as ve,M as At,N as Z,O as be,Q as Ht,R as lt,U as N,W,X as Nt,Y
|
|
|
13
13
|
--vis-dark-stacked-bar-stroke-color: none;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
body.theme-dark ${`.${
|
|
16
|
+
body.theme-dark ${`.${le}`} {
|
|
17
17
|
--vis-stacked-bar-stroke-color: var(--vis-dark-stacked-bar-stroke-color);
|
|
18
18
|
}
|
|
19
19
|
`,kt=X`
|
|
@@ -31,7 +31,7 @@ import{K as fe,L as ve,M as At,N as Z,O as be,Q as Ht,R as lt,U as N,W,X as Nt,Y
|
|
|
31
31
|
label: barGroup;
|
|
32
32
|
`,re=X`
|
|
33
33
|
label: barGroupExit;
|
|
34
|
-
`,$a=Object.freeze(Object.defineProperty({__proto__:null,bar:kt,barGroup:Ut,barGroupExit:re,globalStyles:Aa,root:
|
|
34
|
+
`,$a=Object.freeze(Object.defineProperty({__proto__:null,bar:kt,barGroup:Ut,barGroupExit:re,globalStyles:Aa,root:le},Symbol.toStringTag,{value:"Module"}));class Wt extends Se{constructor(e){super(),this._defaultConfig=Ta,this.config=this._defaultConfig,this.getAccessors=()=>Te(this.config.y)?this.config.y:[this.config.y],this.stacked=!0,this.events={},this._barData=[],e&&this.setConfig(e)}get bleed(){if(this._barData=this._getVisibleData(),this._barData.length===0)return{top:0,bottom:0,left:0,right:0};const e=!this.isVertical()&&this.dataScale.range()[0]>this.dataScale.range()[1],t=this.dataScale.domain(),n=this._getBarWidth()/2,i=this._barData.map((b,d)=>lt(b,this.config.x,d)),r=Dt(i),s=Ae(i),a=this.dataScale(r),g=this.dataScale(s),l=this.dataScale.invert(a+(e?n:-n)),o=this.dataScale.invert(g+(e?-n:n)),h=l<=t[0]?this.dataScale(t[0])-this.dataScale(l):0,m=o>t[1]?this.dataScale(o)-this.dataScale(t[1]):0;return{top:this.isVertical()?0:e?-m:h,bottom:this.isVertical()?0:e?-h:m,left:this.isVertical()?h:0,right:this.isVertical()?m:0}}get dataScale(){return this.isVertical()?this.xScale:this.yScale}get valueScale(){return this.isVertical()?this.yScale:this.xScale}isVertical(){return this.config.orientation===Qt.Vertical}_render(e){const{config:t}=this,n=Mt(e)?e:t.duration,i=this.getAccessors(),r=$e(this._barData,0,i,this._prevNegative);this._prevNegative=r.map(d=>!!d.isMostlyNegative);const s=this.g.selectAll(`.${Ut}`).data(this._barData,(d,v)=>{var u;return`${(u=Xt(d,t.id,v))!==null&&u!==void 0?u:v}`}),a=(d,v)=>{const u=this.dataScale(lt(d,t.x,v)),k=this.isVertical()?u:0,w=this.isVertical()?0:u;return`translate(${k},${w})`},l=s.enter().append("g").attr("class",Ut).attr("transform",a).style("opacity",1).merge(s);Z(l,n).attr("transform",a).style("opacity",1);const o=s.exit().attr("class",re);Z(o,n).style("opacity",0).remove(),Z(o.selectAll(`.${kt}`),n).attr("transform",this.isVertical()?`translate(0,${this._height/3})`:`translate(${this._width/6},0)`);const h=l.selectAll(`.${kt}`).data((d,v)=>r.map((u,k)=>({datum:d,index:v,stacked:u[v],stackIndex:k,isEnding:k===r.length-1||k<=r.length-1&&r[k+1][v][0]!==u[v][1]})).filter(u=>u.stacked[0]!==u.stacked[1]),d=>d.stackIndex),b=h.enter().append("path").attr("class",kt).attr("d",d=>this._getBarPath(d,!0)).style("fill",d=>xt(d.datum,t.color,d.stackIndex)).merge(h);Z(b,n).attr("d",d=>this._getBarPath(d)).style("fill",d=>xt(d.datum,t.color,d.stackIndex)).style("cursor",d=>Xt(d.datum,t.cursor,d.stackIndex)),Z(h.exit(),n).style("opacity",0).remove()}_getBarWidth(){const{config:e,datamodel:{data:t}}=this;if(De(t))return 0;if(e.barWidth)return Dt([e.barWidth,e.barMaxWidth]);const n=this.dataScale.bandwidth,i=this.dataScale.domain?this.dataScale.domain():[];let s=1+(n?i.length:i[1]-i[0])/e.dataStep||!n&&t.filter((l,o)=>{const h=lt(l,e.x,o);return h>=i[0]&&h<=i[1]}).length||t.length;!n&&s>=2&&(s+=1);const g=(s<2?1:1-e.barPadding)*(this.isVertical()?this._width:this._height)/s;return Dt([g,e.barMaxWidth])}_getVisibleData(){const{config:e,datamodel:{data:t}}=this,n=this._getBarWidth(),i=t.length<2?0:n/2,r=this.dataScale,s=Math.abs(r.invert(i)-r.invert(0));return t?.filter((g,l)=>{const o=lt(g,e.x,l),h=r.domain(),m=+h[0],b=+h[1];return o>=m-s&&o<=b+s})}_getBarPath(e,t=!1){const{config:n}=this,i=this.getAccessors(),r=this._getBarWidth(),s=e.stacked[1]<0,a=e.isEnding,g=lt(e.datum,i[e.stackIndex],e.index),l=t?0:Math.abs(this.valueScale(e.stacked[0])-this.valueScale(e.stacked[1])),o=!t&&n.barMinHeight1Px&&l<1&&isFinite(g)&&g!==n.barMinHeightZeroValue?1:l,h=t?this.valueScale(0):this.valueScale(s?e.stacked[0]:e.stacked[1])-(l<1&&n.barMinHeight1Px?1:0),m=-r/2,b=r,d=n.roundedCorners?Mt(n.roundedCorners)?+n.roundedCorners:b/2:0,v=te(d,0,Math.min(l,b)/2),u=this.yScale.range()[0]>this.yScale.range()[1];return Sa({x:this.isVertical()?m:h-o,y:this.isVertical()?h+(u?0:-o):m,w:this.isVertical()?b:o,h:this.isVertical()?o:b,tl:a&&(this.isVertical()?!s&&u||s&&!u:s),tr:a&&(this.isVertical()?!s&&u||s&&!u:!s),br:a&&(this.isVertical()?s&&u||!s&&!u:!s),bl:a&&(this.isVertical()?s&&u||!s&&!u:s),r:v})}getValueScaleExtent(e){const{datamodel:t}=this,n=this.getAccessors(),i=e?this._getVisibleData():t.data;return Ce(i,...n)}getDataScaleExtent(){const{config:e,datamodel:t}=this;return we(t.data,e.x)}getYDataExtent(e){return this.isVertical()?this.getValueScaleExtent(e):this.getDataScaleExtent()}getXDataExtent(){return this.isVertical()?this.getDataScaleExtent():this.getValueScaleExtent(!1)}}Wt.selectors=$a;const Da=Object.assign(Object.assign({},Re),{id:(p,e)=>{var t;return(t=p.id)!==null&&t!==void 0?t:e},value:void 0,angleRange:[0,2*Math.PI],padAngle:0,sortFunction:void 0,cornerRadius:0,color:void 0,radius:void 0,arcWidth:20,centralLabel:void 0,centralSubLabel:void 0,centralSubLabelWrap:!0,showEmptySegments:!1,emptySegmentAngle:.5*Math.PI/180,showBackground:!0,backgroundAngleRange:void 0,centralLabelOffsetX:void 0,centralLabelOffsetY:void 0});function Ca(p,e){p.style("fill",t=>xt(t.data,e.color,t.index)).style("opacity",0).each((t,n,i)=>{const r=i[n],s=(t.startAngle+t.endAngle)/2,a=(t.endAngle-t.startAngle)/2;r._animState={startAngle:s-a,endAngle:s+a,innerRadius:t.innerRadius,outerRadius:t.outerRadius,padAngle:t.padAngle}})}function wa(p,e,t,n){p.style("transition",`fill ${n}ms`).style("fill",r=>xt(r.data,e.color,r.index));const i=r=>e.showEmptySegments||r.value?1:0;n?Z(p,n).style("opacity",i).attrTween("d",(s,a,g)=>{const l=g[a],o={startAngle:s.startAngle,endAngle:s.endAngle,innerRadius:s.innerRadius,outerRadius:s.outerRadius,padAngle:s.padAngle},h=Me(l._animState,o);return m=>(l._animState=h(m),t(l._animState))}):p.attr("d",t).style("opacity",i)}function Ra(p,e){Z(p,e).style("opacity",0).remove()}const ce=Array.from({length:4},(p,e)=>{const t=-Math.PI/2+e*Math.PI/2;return[t,t+Math.PI]}),[xn,Sn,Tn,An]=ce,ue=X`
|
|
35
35
|
label: donut-component;
|
|
36
36
|
`,Ma=Jt`
|
|
37
37
|
:root {
|
|
@@ -88,7 +88,7 @@ import{K as fe,L as ve,M as At,N as Z,O as be,Q as Ht,R as lt,U as N,W,X as Nt,Y
|
|
|
88
88
|
font-family: var(--vis-donut-central-sub-label-font-family, var(--vis-font-family));
|
|
89
89
|
font-weight: var(--vis-donut-central-sub-label-font-weight);
|
|
90
90
|
fill: var(--vis-donut-central-sub-label-text-color);
|
|
91
|
-
`,La=Object.freeze(Object.defineProperty({__proto__:null,background:de,centralLabel:pe,centralSubLabel:he,root:ue,segment:Ot,segmentExit:ge,variables:Ma},Symbol.toStringTag,{value:"Module"}));class zt extends Le{constructor(e){super(),this._defaultConfig=Da,this.config=this._defaultConfig,this.datamodel=new Ue,this.arcGen=ya(),this.events={},e&&this.setConfig(e),this.arcBackground=this.g.append("path"),this.arcGroup=this.g.append("g"),this.centralLabel=this.g.append("text").attr("class",pe),this.centralSubLabel=this.g.append("text").attr("class",he)}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e){var t,n,
|
|
91
|
+
`,La=Object.freeze(Object.defineProperty({__proto__:null,background:de,centralLabel:pe,centralSubLabel:he,root:ue,segment:Ot,segmentExit:ge,variables:Ma},Symbol.toStringTag,{value:"Module"}));class zt extends Le{constructor(e){super(),this._defaultConfig=Da,this.config=this._defaultConfig,this.datamodel=new Ue,this.arcGen=ya(),this.events={},e&&this.setConfig(e),this.arcBackground=this.g.append("path"),this.arcGroup=this.g.append("g"),this.centralLabel=this.g.append("text").attr("class",pe),this.centralSubLabel=this.g.append("text").attr("class",he)}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e){var t,n,i,r,s,a,g,l,o,h,m,b,d,v;const{config:u,datamodel:k,bleed:w}=this,R=k.data.map((x,B)=>({index:B,datum:x})).filter(x=>u.showEmptySegments||lt(x.datum,u.value,x.index)),L=Mt(e)?e:u.duration,[y,c,f,A]=ce.map(x=>u.angleRange&&u.angleRange[0]===x[0]&&u.angleRange[1]===x[1]),E=y||f,P=c||A,T=this._width*(P?2:1),O=this._height*(E?2:1),_=u.radius||Math.min(T-w.left-w.right,O-w.top-w.bottom)/2,D=u.arcWidth===0?0:te(_-u.arcWidth,0,_-1),H=this._height/2+(y?_/2:f?-_/2:0),at=this._width/2+(A?_/2:c?-_/2:0),q=`translate(${at},${H})`;this.arcGroup.attr("transform",q),this.arcGen.startAngle(x=>x.startAngle).endAngle(x=>x.endAngle).innerRadius(x=>x.innerRadius).outerRadius(x=>x.outerRadius).padAngle(x=>x.padAngle).cornerRadius(u.cornerRadius);const ct=xa().startAngle((n=(t=u.angleRange)===null||t===void 0?void 0:t[0])!==null&&n!==void 0?n:0).endAngle((r=(i=u.angleRange)===null||i===void 0?void 0:i[1])!==null&&r!==void 0?r:2*Math.PI).padAngle(u.padAngle).value(x=>lt(x.datum,u.value,x.index)||0).sort((x,B)=>{var ot;return(ot=u.sortFunction)===null||ot===void 0?void 0:ot.call(u,x.datum,B.datum)})(R).map(x=>{const B=Object.assign(Object.assign({},x),{data:x.data.datum,index:x.data.index,innerRadius:D,outerRadius:_});return u.showEmptySegments&&x.endAngle-x.startAngle-x.padAngle<=Number.EPSILON&&(B.endAngle=x.startAngle+Math.max(u.emptySegmentAngle,u.padAngle),B.padAngle=x.padAngle/2),B}),J=this.arcGroup.selectAll(`.${Ot}`).data(ct,x=>u.id(x.data,x.index)),ut=J.enter().append("path").attr("class",Ot).call(Ca,u),st=J.merge(ut);st.call(wa,u,this.arcGen,L),st.sort((x,B)=>B.value-x.value),J.exit().attr("class",ge).call(Ra,L);const dt=c?"start":A?"end":"middle";this.centralLabel.attr("dy",u.centralSubLabel?"-0.55em":null).style("text-anchor",dt).text((s=u.centralLabel)!==null&&s!==void 0?s:null),this.centralSubLabel.attr("dy",u.centralLabel?"0.55em":null).style("text-anchor",dt).text((a=u.centralSubLabel)!==null&&a!==void 0?a:null),u.centralSubLabelWrap&&Oe(this.centralSubLabel,D*1.9);const ft=(u.centralLabelOffsetX||0)+at;let G=(u.centralLabelOffsetY||0)+H;E&&u.centralLabelOffsetX===void 0&&u.centralLabelOffsetY===void 0&&(G=(y?-this.centralSubLabel.node().getBoundingClientRect().height:f?this.centralLabel.node().getBoundingClientRect().height:0)+H);const gt=`translate(${ft},${G})`;this.centralLabel.attr("transform",gt),this.centralSubLabel.attr("transform",gt),this.arcBackground.attr("class",de).attr("visibility",u.showBackground?null:"hidden").attr("transform",q),Z(this.arcBackground,L).attr("d",this.arcGen({startAngle:(h=(l=(g=u.backgroundAngleRange)===null||g===void 0?void 0:g[0])!==null&&l!==void 0?l:(o=u.angleRange)===null||o===void 0?void 0:o[0])!==null&&h!==void 0?h:0,endAngle:(v=(b=(m=u.backgroundAngleRange)===null||m===void 0?void 0:m[1])!==null&&b!==void 0?b:(d=u.angleRange)===null||d===void 0?void 0:d[1])!==null&&v!==void 0?v:2*Math.PI,innerRadius:D,outerRadius:_}))}}zt.selectors=La;const Ua=et({__name:"index",props:{component:{},tooltip:{},annotations:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(p,{expose:e}){const t=p,{data:n}=aa(t),i=Et(t);let r;const s=oa({component:void 0,tooltip:void 0,annotations:void 0}),a=It(),g=()=>{r||a.value&&s.component&&(r=new ga(a.value,{...Ct(s)},n.value))};return na(()=>{var l;g(),(l=s.component)==null||l.config,r?.updateContainer({...Ct(i.value),...Ct(s)})}),mt(n,()=>{r?r.setData(n.value,!0):g()}),Vt(()=>r?.destroy()),wt(Pt,{data:n,update:l=>s.component=l,destroy:()=>s.component=void 0}),wt(Ee,{data:n,update:l=>s.tooltip=l,destroy:()=>{s.tooltip=void 0}}),wt(Pe,{data:n,update:l=>s.annotations=l,destroy:()=>{s.annotations=void 0}}),e({component:r}),(l,o)=>(F(),K("div",{"data-vis-single-container":"",ref_key:"elRef",ref:a,class:"unovis-single-container"},[sa(l.$slots,"default")],512))}}),Oa={"data-vis-component":""},Ea=Wt.selectors,Pa=et({__name:"index",props:{color:{type:[Function,String,Array,null]},barWidth:{},barMaxWidth:{},dataStep:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},cursor:{type:[Function,String,null]},barMinHeight1Px:{type:Boolean},barMinHeightZeroValue:{},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:e}){const t=se(Pt),n=p,i=$(()=>t.data.value??n.data),r=Et(n),s=It();return oe(()=>{ie(()=>{var a;s.value=new Wt(r.value),(a=s.value)==null||a.setData(i.value),t.update(s.value)})}),Vt(()=>{var a;(a=s.value)==null||a.destroy(),t.destroy()}),mt(r,(a,g)=>{var l;ee(a,g)||(l=s.value)==null||l.setConfig(r.value)}),mt(i,()=>{var a;(a=s.value)==null||a.setData(i.value)}),e({component:s}),(a,g)=>(F(),K("div",Oa))}}),ja={"data-vis-component":""},Va=zt.selectors,Ia=et({__name:"index",props:{id:{type:Function},value:{type:[Function,Number,null]},angleRange:{},padAngle:{},sortFunction:{type:Function},cornerRadius:{},color:{type:[Function,String,Array,null]},radius:{},arcWidth:{},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},showEmptySegments:{type:Boolean},emptySegmentAngle:{},showBackground:{type:Boolean},backgroundAngleRange:{},centralLabelOffsetX:{},centralLabelOffsetY:{},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:e}){const t=se(Pt),n=p,i=$(()=>t.data.value??n.data),r=Et(n),s=It();return oe(()=>{ie(()=>{var a;s.value=new zt(r.value),(a=s.value)==null||a.setData(i.value),t.update(s.value)})}),Vt(()=>{var a;(a=s.value)==null||a.destroy(),t.destroy()}),mt(r,(a,g)=>{var l;ee(a,g)||(l=s.value)==null||l.setConfig(r.value)}),mt(i,()=>{var a;(a=s.value)==null||a.setData(i.value)}),e({component:s}),(a,g)=>(F(),K("div",ja))}}),Fa={class:"mb-4 grid grid-cols-2 gap-3"},Wa={class:"rounded-md border px-3 py-2"},za={class:"mt-1 text-xl font-semibold tabular-nums"},Ba={class:"rounded-md border px-3 py-2"},Ga={class:"mt-1 text-xl font-semibold tabular-nums"},Ha={class:"mt-4 flex flex-wrap justify-center items-center gap-3 text-xs text-muted-foreground"},Na=et({name:"StatisticalAnalysisSessionAnalysisPanel",__name:"SessionAnalysisPanel",props:{items:{},totalSessions:{}},setup(p){const e=p,t=[{color:"#2563eb",key:"tokens",label:"Token Usage"},{color:"#b6d72f",key:"duration",label:"Duration"},{color:"#f97316",key:"cost",label:"Cost"}],n={cost:{color:t[2].color,label:t[2].label},duration:{color:t[1].color,label:t[1].label},tokens:{color:t[0].color,label:t[0].label}},i={bottom:32,left:120,right:12,top:8},r=$(()=>{const c=e.items.reduce((f,A)=>f+A.costUSD,0)/e.items.length;return tt(c)}),s=$(()=>{const c=new Map;for(const T of e.items){const O=c.get(T.project)??{costUSD:0,durationMinutes:0,sessionCount:0,tokenTotal:0};O.costUSD+=T.costUSD,O.durationMinutes+=l(T.duration),O.sessionCount+=1,O.tokenTotal+=T.tokenTotal,c.set(T.project,O)}const f=Array.from(c.entries()).map(([T,O])=>({project:T,...O})).sort((T,O)=>O.costUSD-T.costUSD),A=Math.max(...f.map(T=>T.tokenTotal),0),E=Math.max(...f.map(T=>T.durationMinutes),0),P=Math.max(...f.map(T=>T.costUSD),0);return f.map((T,O)=>({...T,costLabel:tt(T.costUSD),costScore:h(T.costUSD,P),durationLabel:o(T.durationMinutes),durationScore:h(T.durationMinutes,E),index:O,tokenLabel:Y(T.tokenTotal),tokenScore:h(T.tokenTotal,A)}))}),a=$(()=>s.value.map(c=>c.index)),g=$(()=>({[Ea.bar]:k}));function l(c){const f=c.match(/(\d+)h/)?.[1],A=c.match(/(\d+)m/)?.[1];return Number(f??0)*60+Number(A??0)}function o(c){const f=Math.floor(c/60),A=c%60;return f===0?`${A}m`:A===0?`${f}h`:`${f}h ${A}m`}function h(c,f){return f>0?c/f*100:0}function m(c){return c.index}function b(c){return c.tokenScore}function d(c){return c.durationScore}function v(c){return c.costScore}function u(c,f){return t[f]?.color??t[0].color}function k(c){const f=c.datum,A=t[c.stackIndex]??t[0],E=w(f,c.stackIndex);return`
|
|
92
92
|
<div class="grid min-w-44 gap-2 rounded-md border bg-background px-3 py-2 text-xs shadow-lg">
|
|
93
93
|
<div class="font-medium text-foreground">${y(f.project)}</div>
|
|
94
94
|
<div class="flex items-center justify-between gap-4">
|
|
@@ -105,7 +105,7 @@ import{K as fe,L as ve,M as At,N as Z,O as be,Q as Ht,R as lt,U as N,W,X as Nt,Y
|
|
|
105
105
|
<div class="flex justify-between gap-4"><span>Sessions</span><span>${f.sessionCount}</span></div>
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
108
|
-
`}function w(c,f){return f===0?`${c.tokenLabel} tokens`:f===1?c.durationLabel:c.costLabel}function R(c){return c instanceof Date?"":s.value.find(f=>f.index===c)?.project??""}function L(c){return c instanceof Date?"":`${Math.round(c)}%`}function y(c){return c.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}return(c,f)=>{const A=ne,E=jt;return F(),ht(E,{description:"Token, duration, and cost grouped by project",icon:"lucide:messages-square",title:"Session Analysis"},{default:M(()=>[U("div",Fa,[U("div",Wa,[f[0]||(f[0]=U("p",{class:"text-xs text-muted-foreground"}," Total Sessions ",-1)),U("p",za,j(p.totalSessions),1)]),U("div",Ba,[f[1]||(f[1]=U("p",{class:"text-xs text-muted-foreground"}," Top Session Avg ",-1)),U("p",Ga,j(r.value),1)])]),S(A,{class:"h-80 w-full",config:n},{default:M(()=>[S(C(je),{"auto-margin":!1,data:s.value,height:320,margin:
|
|
108
|
+
`}function w(c,f){return f===0?`${c.tokenLabel} tokens`:f===1?c.durationLabel:c.costLabel}function R(c){return c instanceof Date?"":s.value.find(f=>f.index===c)?.project??""}function L(c){return c instanceof Date?"":`${Math.round(c)}%`}function y(c){return c.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}return(c,f)=>{const A=ne,E=jt;return F(),ht(E,{description:"Token, duration, and cost grouped by project",icon:"lucide:messages-square",title:"Session Analysis"},{default:M(()=>[U("div",Fa,[U("div",Wa,[f[0]||(f[0]=U("p",{class:"text-xs text-muted-foreground"}," Total Sessions ",-1)),U("p",za,j(p.totalSessions),1)]),U("div",Ba,[f[1]||(f[1]=U("p",{class:"text-xs text-muted-foreground"}," Top Session Avg ",-1)),U("p",Ga,j(r.value),1)])]),S(A,{class:"h-80 w-full",config:n},{default:M(()=>[S(C(je),{"auto-margin":!1,data:s.value,height:320,margin:i,"y-direction":"south"},{default:M(()=>[S(C(Pa),{"bar-max-width":28,"bar-padding":.28,color:u,cursor:"pointer",orientation:"horizontal","rounded-corners":3,x:m,y:[b,d,v]},null,8,["y"]),S(C(qt),{"grid-line":!1,"tick-format":R,"tick-text-width":100,"tick-text-fit-mode":"trim","tick-text-trim-type":"end","tick-values":a.value,type:"y"},null,8,["tick-values"]),S(C(qt),{"num-ticks":4,"tick-format":L,type:"x"}),S(C(ae),{triggers:g.value},null,8,["triggers"])]),_:1},8,["data"])]),_:1}),U("div",Ha,[(F(),K(Tt,null,St(t,P=>U("div",{key:P.key,class:"flex items-center gap-2"},[U("span",{class:"size-2.5 rounded-sm",style:Ft({backgroundColor:P.color})},null,4),U("span",null,j(P.label),1)])),64))])]),_:1})}}}),Ya=Object.assign(Na,{__name:"StatisticalAnalysisSessionAnalysisPanel"}),Ka={class:"space-y-4"},Xa={class:"flex items-start justify-between gap-3"},qa={class:"min-w-0"},Za={class:"truncate text-sm font-medium"},Qa={class:"truncate text-xs text-muted-foreground"},Ja={class:"shrink-0 text-sm font-semibold tabular-nums"},tn={class:"h-2 overflow-hidden rounded-full bg-secondary"},en=et({name:"StatisticalAnalysisUsageBarList",__name:"UsageBarList",props:{items:{}},setup(p){function e(n){switch(n){case"green":return"bg-emerald-500";case"amber":return"bg-amber-500";case"sky":return"bg-sky-500";case"rose":return"bg-rose-500";default:return"bg-primary"}}function t(n){return`${Math.max(n.percent,n.percent>0?3:0)}%`}return(n,i)=>(F(),K("div",Ka,[(F(!0),K(Tt,null,St(p.items,r=>(F(),K("div",{key:r.label,class:"space-y-2"},[U("div",Xa,[U("div",qa,[U("p",Za,j(r.label),1),U("p",Qa,j(r.detail),1)]),U("span",Ja,j(r.value),1)]),U("div",tn,[U("div",{class:ia(["h-full rounded-full transition-[width]",e(r.tone)]),style:Ft({width:t(r)})},null,6)])]))),128))]))}}),an=Object.assign(en,{__name:"StatisticalAnalysisUsageBarList"}),nn={class:"grid gap-6 lg:grid-cols-[220px_1fr] lg:items-center"},sn={class:"flex items-center justify-center"},on={class:"space-y-3"},ln={class:"flex min-w-0 items-center gap-2"},rn={class:"truncate text-sm text-muted-foreground"},cn={class:"text-sm font-semibold tabular-nums"},un={class:"w-12 text-right text-xs text-muted-foreground tabular-nums"},dn={class:"mt-5 border-t pt-4"},gn=et({name:"StatisticalAnalysisEfficiencyCachePanel",__name:"EfficiencyCachePanel",props:{dailyItems:{},items:{}},setup(p){const e=p,t=$(()=>e.dailyItems.reduce((d,v)=>d+v.inputTokens,0)),n=$(()=>e.dailyItems.reduce((d,v)=>d+v.cachedInputTokens,0)),i=$(()=>Math.max(t.value-n.value,0)),r=$(()=>t.value>0?n.value/t.value:0),s=$(()=>rt(r.value)),a=$(()=>[{color:"#059669",key:"cached",label:"Cached Input",shareLabel:rt(r.value),value:n.value,valueLabel:Y(n.value)},{color:"#0ea5e9",key:"fresh",label:"Fresh Input",shareLabel:rt(t.value>0?i.value/t.value:0),value:i.value,valueLabel:Y(i.value)}]),g=$(()=>Object.fromEntries(a.value.map(d=>[d.key,{color:d.color,label:d.label}]))),l=$(()=>({[Va.segment]:m}));function o(d){return d.value}function h(d){return d.color}function m(d){const v=d.data;return`
|
|
109
109
|
<div class="grid min-w-40 gap-2 rounded-md border bg-background px-3 py-2 text-xs shadow-lg">
|
|
110
110
|
<div class="flex items-center gap-2 font-medium text-foreground">
|
|
111
111
|
<span class="size-2 rounded-sm" style="background-color: ${v.color}"></span>
|
|
@@ -116,4 +116,4 @@ import{K as fe,L as ve,M as At,N as Z,O as be,Q as Ht,R as lt,U as N,W,X as Nt,Y
|
|
|
116
116
|
<div class="flex justify-between gap-4"><span>Share</span><span class="font-mono font-medium text-foreground">${v.shareLabel}</span></div>
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
119
|
-
`}function b(d){return d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}return(d,v)=>{const u=ne,k=an,w=jt;return F(),ht(w,{description:"Cached input ratio across total input tokens",icon:"lucide:gauge",title:"Efficiency / Cache"},{default:M(()=>[U("div",nn,[U("div",sn,[S(u,{class:"h-52 w-full max-w-56",config:C(g)},{default:M(()=>[S(C(Ua),{data:C(a),height:208},{default:M(()=>[S(C(Ia),{"arc-width":26,"central-label":C(s),"central-sub-label":"Hit Rate",color:h,"corner-radius":4,"pad-angle":.04,value:o},null,8,["central-label"]),S(C(ae),{triggers:C(
|
|
119
|
+
`}function b(d){return d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}return(d,v)=>{const u=ne,k=an,w=jt;return F(),ht(w,{description:"Cached input ratio across total input tokens",icon:"lucide:gauge",title:"Efficiency / Cache"},{default:M(()=>[U("div",nn,[U("div",sn,[S(u,{class:"h-52 w-full max-w-56",config:C(g)},{default:M(()=>[S(C(Ua),{data:C(a),height:208},{default:M(()=>[S(C(Ia),{"arc-width":26,"central-label":C(s),"central-sub-label":"Hit Rate",color:h,"corner-radius":4,"pad-angle":.04,value:o},null,8,["central-label"]),S(C(ae),{triggers:C(l)},null,8,["triggers"])]),_:1},8,["data"])]),_:1},8,["config"])]),U("div",on,[(F(!0),K(Tt,null,St(C(a),R=>(F(),K("div",{key:R.key,class:"grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3"},[U("div",ln,[U("span",{class:"size-2.5 shrink-0 rounded-full",style:Ft({backgroundColor:R.color})},null,4),U("span",rn,j(R.label),1)]),U("span",cn,j(R.valueLabel),1),U("span",un,j(R.shareLabel),1)]))),128))])]),U("div",dn,[S(k,{items:p.items},null,8,["items"])])]),_:1})}}}),pn=Object.assign(gn,{__name:"StatisticalAnalysisEfficiencyCachePanel"}),Rt=["claudeCode","codex","gemini"];function me(){const{payload:p}=la(),e=$(()=>p.value?Rt.map(y=>p.value[y]):[]),t=$(()=>e.value.flatMap((y,c)=>y.sessionUsage.map(f=>({...f,id:`${Rt[c]}:${f.id}`,sessionId:`${Rt[c]}:${f.sessionId}`}))).sort((y,c)=>Date.parse(c.startedAt)-Date.parse(y.startedAt))),n=$(()=>hn(e.value.flatMap(y=>y.dailyTokenUsage))),i=$(()=>mn(e.value.flatMap(y=>y.monthlyModelUsage))),r=$(()=>Fe(t.value)),s=$(()=>n.value.reduce((y,c)=>y+c.costUSD,0)),a=$(()=>n.value.reduce((y,c)=>y+c.totalTokens,0)),g=$(()=>n.value.reduce((y,c)=>y+c.inputTokens,0)),l=$(()=>n.value.reduce((y,c)=>y+c.cachedInputTokens,0)),o=$(()=>n.value.reduce((y,c)=>y+c.outputTokens,0)),h=$(()=>n.value.reduce((y,c)=>y+c.reasoningOutputTokens,0)),m=$(()=>t.value.length),b=Ve(new Date),d=Ie(b),v=$(()=>n.value.find(y=>Lt(y.date)===b)),u=$(()=>n.value.find(y=>Lt(y.date)===d)),k=$(()=>Zt(v.value?.costUSD??0,u.value?.costUSD??0,tt)),w=$(()=>Zt(v.value?.totalTokens??0,u.value?.totalTokens??0,Y)),R=$(()=>{const y=new Map;for(const c of n.value)for(const[f,A]of Object.entries(c.models)){const E=y.get(f)??{activeDays:new Set,costUSD:0,inputTokens:0,outputTokens:0,totalTokens:0},P=c.totalTokens>0?A.totalTokens/c.totalTokens:0;E.activeDays.add(c.date),E.costUSD+=c.costUSD*P,E.inputTokens+=A.inputTokens,E.outputTokens+=A.outputTokens,E.totalTokens+=A.totalTokens,y.set(f,E)}return Array.from(y.entries()).map(([c,f],A)=>({label:c,value:tt(f.costUSD),detail:`${Y(f.totalTokens)} tokens / ${f.activeDays.size} active days`,percent:yt(f.costUSD,s.value)*100,tone:A===0?"sky":"green"})).sort((c,f)=>f.percent-c.percent)}),L=$(()=>{const y=yt(l.value,g.value),c=yt(h.value,a.value),f=yt(o.value,a.value);return[{label:"Cache Hit Rate",value:rt(y),detail:`${Y(l.value)} cached input tokens`,percent:y*100,tone:"green"},{label:"Reasoning Token Share",value:rt(c),detail:`${Y(h.value)} reasoning output tokens`,percent:c*100,tone:"amber"},{label:"Output Token Share",value:rt(f),detail:`${Y(o.value)} output tokens`,percent:f*100,tone:"sky"}]});return{cachedInputTokens:l,costGrowthTrend:k,dailyTokenUsage:n,efficiencyMetrics:L,inputTokens:g,modelUsage:R,monthlyModelUsage:i,outputTokens:o,projectUsage:r,reasoningOutputTokens:h,sessionUsage:t,totalCost:s,totalSessions:m,totalTokens:a,tokenGrowthTrend:w}}function hn(p){const e=new Map;for(const t of p){const n=Lt(t.date),i=e.get(n)??{cachedInputTokens:0,costUSD:0,date:We(n,t.date),inputTokens:0,models:new Map,outputTokens:0,reasoningOutputTokens:0,totalTokens:0};i.cachedInputTokens+=t.cachedInputTokens,i.costUSD+=t.costUSD,i.inputTokens+=t.inputTokens,i.outputTokens+=t.outputTokens,i.reasoningOutputTokens+=t.reasoningOutputTokens,i.totalTokens+=t.totalTokens;for(const[r,s]of Object.entries(t.models)){const a=i.models.get(r)??fn();a.cachedInputTokens+=s.cachedInputTokens,a.inputTokens+=s.inputTokens,a.isFallback=a.isFallback||s.isFallback,a.outputTokens+=s.outputTokens,a.reasoningOutputTokens+=s.reasoningOutputTokens,a.totalTokens+=s.totalTokens,i.models.set(r,a)}e.set(n,i)}return Array.from(e.entries()).sort((t,n)=>n[0].localeCompare(t[0])).map(([,t])=>({cachedInputTokens:t.cachedInputTokens,costUSD:ze(t.costUSD),date:t.date,inputTokens:t.inputTokens,models:Object.fromEntries(t.models.entries()),outputTokens:t.outputTokens,reasoningOutputTokens:t.reasoningOutputTokens,totalTokens:t.totalTokens}))}function mn(p){const e=new Map;for(const t of p){const n=`${t.month}__${t.model}`,i=e.get(n)??{model:t.model,month:t.month,tokenTotal:0};i.tokenTotal+=t.tokenTotal,e.set(n,i)}return Array.from(e.values()).sort((t,n)=>t.month.localeCompare(n.month)||t.model.localeCompare(n.model))}function fn(){return{cachedInputTokens:0,inputTokens:0,isFallback:!1,outputTokens:0,reasoningOutputTokens:0,totalTokens:0}}function yt(p,e){return e>0?p/e:0}const vt=10,vn=et({name:"StatisticalAnalysisTokensUsagePanel",__name:"TokensUsagePanel",setup(p){const{dailyTokenUsage:e}=me(),t=ua(1),n=$(()=>Math.max(1,Math.ceil(e.value.length/vt))),i=$(()=>{const s=(Math.min(t.value,n.value)-1)*vt;return e.value.slice(s,s+vt)});return mt(e,()=>{t.value=1}),(r,s)=>{const a=He,g=Ge,l=Be,o=Xe,h=Ne,m=Ye,b=Ke,d=jt;return F(),ht(d,{description:"Daily model activity by token type, cache reads, total usage, and cost",icon:"lucide:calendar-days",title:"Daily Token Usage"},{default:M(()=>[S(m,null,{default:M(()=>[S(l,null,{default:M(()=>[S(g,null,{default:M(()=>[S(a,null,{default:M(()=>[...s[1]||(s[1]=[I("Date",-1)])]),_:1}),S(a,null,{default:M(()=>[...s[2]||(s[2]=[I("Models",-1)])]),_:1}),S(a,{class:"text-right"},{default:M(()=>[...s[3]||(s[3]=[I(" Input ",-1)])]),_:1}),S(a,{class:"text-right"},{default:M(()=>[...s[4]||(s[4]=[I(" Output ",-1)])]),_:1}),S(a,{class:"text-right"},{default:M(()=>[...s[5]||(s[5]=[I(" Reasoning ",-1)])]),_:1}),S(a,{class:"text-right"},{default:M(()=>[...s[6]||(s[6]=[I(" Cache Read ",-1)])]),_:1}),S(a,{class:"text-right"},{default:M(()=>[...s[7]||(s[7]=[I(" Total Tokens ",-1)])]),_:1}),S(a,{class:"text-right"},{default:M(()=>[...s[8]||(s[8]=[I(" Cost (USD) ",-1)])]),_:1})]),_:1})]),_:1}),S(h,null,{default:M(()=>[(F(!0),K(Tt,null,St(C(i),v=>(F(),ht(g,{key:v.date},{default:M(()=>[S(o,{class:"font-medium"},{default:M(()=>[I(j(v.date),1)]),_:2},1024),S(o,null,{default:M(()=>[I(j(Object.keys(v.models).join(", ")),1)]),_:2},1024),S(o,{class:"text-right"},{default:M(()=>[I(j(C(Q)(v.inputTokens)),1)]),_:2},1024),S(o,{class:"text-right"},{default:M(()=>[I(j(C(Q)(v.outputTokens)),1)]),_:2},1024),S(o,{class:"text-right"},{default:M(()=>[I(j(C(Q)(v.reasoningOutputTokens)),1)]),_:2},1024),S(o,{class:"text-right"},{default:M(()=>[I(j(C(Q)(v.cachedInputTokens)),1)]),_:2},1024),S(o,{class:"text-right"},{default:M(()=>[I(j(C(Q)(v.totalTokens)),1)]),_:2},1024),S(o,{class:"text-right"},{default:M(()=>[I(j(v.costUSD.toFixed(2)),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),C(e).length>vt?(F(),ht(b,{key:0,page:C(t),"onUpdate:page":s[0]||(s[0]=v=>ra(t)?t.value=v:null),"page-count":C(n),"page-size":vt,total:C(e).length},null,8,["page","page-count","total"])):ca("",!0)]),_:1})}}}),bn=Object.assign(vn,{__name:"StatisticalAnalysisTokensUsagePanel"}),$n=et({__name:"index",setup(p){const{cachedInputTokens:e,costGrowthTrend:t,dailyTokenUsage:n,efficiencyMetrics:i,inputTokens:r,monthlyModelUsage:s,projectUsage:a,sessionUsage:g,totalCost:l,totalSessions:o,totalTokens:h,tokenGrowthTrend:m}=me(),b=$(()=>[{detail:`${tt(l.value)} total spend across all tools`,icon:"lucide:wallet",name:"Total Spend",trend:t.value.trend,trendTone:t.value.trendTone,value:tt(l.value)},{detail:`${Q(h.value)} total tokens across all tools`,icon:"solar:cpu-line-duotone",name:"Token Usage",trend:m.value.trend,trendTone:m.value.trendTone,value:Y(h.value)},{detail:`${Q(e.value)} of ${Q(r.value)} input tokens were served from cache`,icon:"lucide:database-zap",name:"Cache Hit Rate",trend:`${Y(e.value)} cached`,trendTone:"neutral",value:rt(r.value>0?e.value/r.value:0)},{detail:`${tt(l.value)} across ${Q(o.value)} sessions`,icon:"lucide:receipt-text",name:"Avg Session Cost",trend:"across all tools",trendTone:"neutral",value:tt(o.value>0?l.value/o.value:0)}]);return(d,v)=>{const u=qe,k=Je,w=ta,R=ea,L=Ya,y=pn,c=bn,f=Ze,A=Qe;return F(),ht(A,null,{default:M(()=>[S(u,{cards:C(b)},null,8,["cards"]),S(f,null,{default:M(()=>[S(k,{"monthly-items":C(s),class:"md:col-span-8"},null,8,["monthly-items"]),S(w,{items:C(a),class:"md:col-span-4"},null,8,["items"]),S(R,{items:C(n),class:"md:col-span-12","heat-metric":"cost",title:"Usage Trend"},null,8,["items"]),S(L,{items:C(g),"total-sessions":C(o),class:"md:col-span-6"},null,8,["items","total-sessions"]),S(y,{"daily-items":C(n),items:C(i),class:"md:col-span-6"},null,8,["daily-items","items"]),S(c,{class:"md:col-span-12"})]),_:1})]),_:1})}}});export{$n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as j,g as $,n as C,s as M,t as A,v as z,w as B,x as I,y as E,B as H,m as v,F as O,H as F,G as K,E as V}from"./
|
|
1
|
+
import{I as j,g as $,n as C,s as M,t as A,v as z,w as B,x as I,y as E,B as H,m as v,F as O,H as F,G as K,E as V}from"./chy2QJx0.js";import{_ as G,a as J,b as L}from"./C6ydMk2z.js";import{_ as q,e as Q}from"./Bu4SpN_a.js";import{z as U,o as T,B as h,w as s,a as _,t as c,D as a,b as t,d as n,c as W,K as X,J as Y,I as Z,a3 as ee,a4 as te,h as r,a9 as se,aa as oe,ab as ae,ac as ne}from"./Dn8cXZx3.js";const le={class:"mb-4 grid grid-cols-1 gap-3 sm:grid-cols-3"},re={class:"rounded-md border px-3 py-2"},ue={class:"mt-1 text-lg font-semibold tabular-nums"},de={class:"rounded-md border px-3 py-2"},me={class:"mt-1 text-lg font-semibold tabular-nums"},ie={class:"rounded-md border px-3 py-2"},ce={class:"mt-1 text-lg font-semibold tabular-nums"},pe=U({name:"UsageAnalyticsSessionUsageTable",__name:"SessionUsageTable",props:{items:{},pageSize:{default:10},productName:{default:"Product"}},setup(o){const d=o,m=te(1),f=r(()=>Math.max(1,Math.ceil(d.items.length/d.pageSize))),w=r(()=>{const e=(Math.min(m.value,f.value)-1)*d.pageSize;return d.items.slice(e,e+d.pageSize)}),y=r(()=>d.items.reduce((u,e)=>u+e.costUSD,0)),b=r(()=>d.items.reduce((u,e)=>u+e.tokenTotal,0));function l(u){return new Intl.DateTimeFormat("en-US",{day:"2-digit",hour:"2-digit",minute:"2-digit",month:"short"}).format(new Date(u))}return(u,e)=>{const i=z,x=A,k=M,g=H,R=q,P=B,D=I,S=E,N=j;return T(),h(N,{description:`Each row maps one ${o.productName} session to its session-level token consumption.`,icon:"lucide:file-json-2",title:`${o.productName} Session Statistics`},{default:s(()=>[_("div",le,[_("div",re,[e[1]||(e[1]=_("p",{class:"text-xs text-muted-foreground"}," Sessions ",-1)),_("p",ue,c(o.items.length),1)]),_("div",de,[e[2]||(e[2]=_("p",{class:"text-xs text-muted-foreground"}," Tokens ",-1)),_("p",me,c(("formatCompactNumber"in u?u.formatCompactNumber:a($))(a(b))),1)]),_("div",ie,[e[3]||(e[3]=_("p",{class:"text-xs text-muted-foreground"}," Spend ",-1)),_("p",ce,c(("formatCurrency"in u?u.formatCurrency:a(C))(a(y))),1)])]),t(D,null,{default:s(()=>[t(k,null,{default:s(()=>[t(x,null,{default:s(()=>[t(i,null,{default:s(()=>[...e[4]||(e[4]=[n("Session ID",-1)])]),_:1}),t(i,null,{default:s(()=>[...e[5]||(e[5]=[n("Project",-1)])]),_:1}),t(i,null,{default:s(()=>[...e[6]||(e[6]=[n("Thread",-1)])]),_:1}),t(i,null,{default:s(()=>[...e[7]||(e[7]=[n("Model",-1)])]),_:1}),t(i,null,{default:s(()=>[...e[8]||(e[8]=[n("Started",-1)])]),_:1}),t(i,{class:"text-right"},{default:s(()=>[...e[9]||(e[9]=[n(" Duration ",-1)])]),_:1}),t(i,{class:"text-right"},{default:s(()=>[...e[10]||(e[10]=[n(" Input ",-1)])]),_:1}),t(i,{class:"text-right"},{default:s(()=>[...e[11]||(e[11]=[n(" Output ",-1)])]),_:1}),t(i,{class:"text-right"},{default:s(()=>[...e[12]||(e[12]=[n(" Total Tokens ",-1)])]),_:1}),t(i,{class:"text-right"},{default:s(()=>[...e[13]||(e[13]=[n(" Cost ",-1)])]),_:1})]),_:1})]),_:1}),t(P,null,{default:s(()=>[(T(!0),W(Y,null,X(a(w),p=>(T(),h(x,{key:p.sessionId},{default:s(()=>[t(g,{class:"max-w-80 truncate font-mono text-xs"},{default:s(()=>[n(c(p.sessionId),1)]),_:2},1024),t(g,{class:"font-medium"},{default:s(()=>[n(c(p.project),1)]),_:2},1024),t(g,{class:"max-w-64 truncate"},{default:s(()=>[n(c(p.threadName),1)]),_:2},1024),t(g,null,{default:s(()=>[n(c(p.model),1)]),_:2},1024),t(g,{class:"whitespace-nowrap"},{default:s(()=>[n(c(l(p.startedAt)),1)]),_:2},1024),t(g,{class:"text-right tabular-nums"},{default:s(()=>[n(c(p.duration),1)]),_:2},1024),t(g,{class:"text-right tabular-nums"},{default:s(()=>[n(c(a(v)(p.inputTokens)),1)]),_:2},1024),t(g,{class:"text-right tabular-nums"},{default:s(()=>[n(c(a(v)(p.outputTokens)),1)]),_:2},1024),t(g,{class:"text-right tabular-nums"},{default:s(()=>[n(c(a(v)(p.tokenTotal)),1)]),_:2},1024),t(g,{class:"text-right tabular-nums"},{default:s(()=>[n(c(("formatCurrency"in u?u.formatCurrency:a(C))(p.costUSD)),1)]),_:2},1024)]),_:2},1024))),128)),o.items.length===0?(T(),h(R,{key:0,colspan:10},{default:s(()=>[n(" No "+c(o.productName)+" sessions found. ",1)]),_:1})):Z("",!0)]),_:1})]),_:1}),t(S,{page:a(m),"onUpdate:page":e[0]||(e[0]=p=>ee(m)?m.value=p:null),"page-count":a(f),"page-size":o.pageSize,total:o.items.length},null,8,["page","page-count","page-size","total"])]),_:1},8,["description","title"])}}}),ge=Object.assign(pe,{__name:"UsageAnalyticsSessionUsageTable"}),_e=U({name:"DashboardTokenConsumptionDashboard",__name:"TokenConsumptionDashboard",props:{dailyRows:{},dailyTokenUsage:{},monthlyModelUsage:{},monthlyRows:{},overviewCards:{},productName:{},projectUsage:{},sessionRows:{},sessionUsage:{},weeklyRows:{}},setup(o){const d=o,m=r(()=>V(d.sessionUsage));return(f,w)=>{const y=F,b=G,l=J,u=L,e=Q,i=ge,x=K,k=O;return T(),h(k,null,{default:s(()=>[t(y,{cards:o.overviewCards},null,8,["cards"]),t(x,null,{default:s(()=>[t(b,{"monthly-items":o.monthlyModelUsage,class:"md:col-span-8"},null,8,["monthly-items"]),t(l,{items:o.projectUsage,class:"md:col-span-4"},null,8,["items"]),t(u,{items:o.dailyTokenUsage,class:"md:col-span-12",title:`${o.productName} Token Heatmap`},null,8,["items","title"]),t(e,{"daily-items":a(m),"monthly-items":o.monthlyRows,"product-name":o.productName,"session-items":o.sessionRows,"weekly-items":o.weeklyRows,class:"md:col-span-12"},null,8,["daily-items","monthly-items","product-name","session-items","weekly-items"]),t(i,{items:o.sessionUsage,"product-name":o.productName,class:"md:col-span-12"},null,8,["items","product-name"])]),_:1})]),_:1})}}}),ye=Object.assign(_e,{__name:"DashboardTokenConsumptionDashboard"}),fe={dailyRows:[],dailyTokenUsage:[],monthlyModelUsage:[],monthlyRows:[],overviewCards:[],projectUsage:[],sessionRows:[],sessionUsage:[],todayTopModel:null,todayTopProject:null,todayTotalCost:0,todayTotalTokens:0,weeklyRows:[]};function we(o){const{clear:d,error:m,execute:f,payload:w,refresh:y,status:b}=se(),l=r(()=>w.value?.[o]??fe);return{clear:d,dailyRows:r(()=>l.value.dailyRows),dailyTokenUsage:r(()=>l.value.dailyTokenUsage),dashboard:l,error:m,execute:f,monthlyModelUsage:r(()=>l.value.monthlyModelUsage),monthlyRows:r(()=>l.value.monthlyRows),overviewCards:r(()=>l.value.overviewCards),projectUsage:r(()=>l.value.projectUsage),refresh:y,sessionRows:r(()=>l.value.sessionRows),sessionUsage:r(()=>l.value.sessionUsage),status:b,todayTopModel:r(()=>l.value.todayTopModel),todayTopProject:r(()=>l.value.todayTopProject),todayTotalCost:r(()=>l.value.todayTotalCost),todayTotalTokens:r(()=>l.value.todayTotalTokens),weeklyRows:r(()=>l.value.weeklyRows)}}const be=U({name:"DashboardProductPage",__name:"ProductPage",props:{productKey:{},productName:{}},setup(o){const d=o,{dailyRows:m,dailyTokenUsage:f,monthlyModelUsage:w,monthlyRows:y,overviewCards:b,projectUsage:l,sessionRows:u,sessionUsage:e,weeklyRows:i}=we(d.productKey);return(x,k)=>{const g=ye;return T(),h(g,{"daily-rows":a(m),"daily-token-usage":a(f),"monthly-model-usage":a(w),"monthly-rows":a(y),"overview-cards":a(b),"product-name":o.productName,"project-usage":a(l),"session-rows":a(u),"session-usage":a(e),"weekly-rows":a(i)},null,8,["daily-rows","daily-token-usage","monthly-model-usage","monthly-rows","overview-cards","product-name","project-usage","session-rows","session-usage","weekly-rows"])}}}),Te=Object.assign(be,{__name:"DashboardProductPage"}),ve=U({__name:"[product]",setup(o){const d=oe(),m=ae(d.params.product);if(!m)throw ne({status:404,message:"Page not found"});return(f,w)=>{const y=Te;return T(),h(y,{"product-key":a(m).payloadKey,"product-name":a(m).name},null,8,["product-key","product-name"])}}});export{ve as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"ac4b25d6-d6eb-44bb-8c5b-b1d6f651c196","timestamp":1777010971439}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"ac4b25d6-d6eb-44bb-8c5b-b1d6f651c196","timestamp":1777010971439,"prerendered":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aj as Wu,ak as mi,al as Yi,h as P,am as qu,x as Vu,an as Yu,p as de,r as Y,ao as Xu,ap as Gu,Q as _e,s as sl,aq as ju,i as pt,n as pe,v as on,j as fs,z as F,G as ds,ar as Zu,$ as Ku,q as bn,A as Nt,as as Qu,o as $,B as Z,w as H,C as B,D as C,S as Xi,P as Ne,E as ol,V as Ju,I as vi,at as th,M as Gi,au as al,c as X,L as Vt,av as eh,a7 as nh,aw as ze,a4 as ih,ax as rh,b as lt,ay as sh,T as ps,U as gs,az as ji,H as oh,aA as ah,m as po,d as qe,t as Jt,N as lh,k as ch,O as uh,aB as hh,X as fh,Z as ht,a as Dt,Y as it,a8 as ll,J as cl,K as ul,ai as yr,ag as un,ad as Zi,aC as dh}from"./
|
|
1
|
+
import{aj as Wu,ak as mi,al as Yi,h as P,am as qu,x as Vu,an as Yu,p as de,r as Y,ao as Xu,ap as Gu,Q as _e,s as sl,aq as ju,i as pt,n as pe,v as on,j as fs,z as F,G as ds,ar as Zu,$ as Ku,q as bn,A as Nt,as as Qu,o as $,B as Z,w as H,C as B,D as C,S as Xi,P as Ne,E as ol,V as Ju,I as vi,at as th,M as Gi,au as al,c as X,L as Vt,av as eh,a7 as nh,aw as ze,a4 as ih,ax as rh,b as lt,ay as sh,T as ps,U as gs,az as ji,H as oh,aA as ah,m as po,d as qe,t as Jt,N as lh,k as ch,O as uh,aB as hh,X as fh,Z as ht,a as Dt,Y as it,a8 as ll,J as cl,K as ul,ai as yr,ag as un,ad as Zi,aC as dh}from"./Dn8cXZx3.js";function hl(t,e,n){const i=n.originalEvent.target,r=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),i.dispatchEvent(r)}function ph(t){return t==null}function gh(t){const e=Yi(),n=e?.type.emits,i={};return n?.length||console.warn(`No emitted event found. Please check component: ${e?.type.__name}`),n?.forEach(r=>{i[Wu(mi(r))]=(...s)=>t(r,...s)}),i}function fl(t){const e=Yi(),n=Object.keys(e?.type.props??{}).reduce((r,s)=>{const o=(e?.type.props[s]).default;return o!==void 0&&(r[s]=o),r},{}),i=qu(t);return P(()=>{const r={},s=e?.vnode.props??{};return Object.keys(s).forEach(o=>{r[mi(o)]=s[o]}),Object.keys({...n,...r}).reduce((o,a)=>(i.value[a]!==void 0&&(o[a]=i.value[a]),o),{})})}function ms(t,e){const n=fl(t),i=e?gh(e):{};return P(()=>({...n.value,...i}))}function mh(t,e){const n=Vu(!1,300);Yu(()=>{n.value=!1});const i=Y(null),r=Xu();function s(){i.value=null,n.value=!1}function o(a,l){if(!l)return;const c=a.currentTarget,u={x:a.clientX,y:a.clientY},h=vh(u,c.getBoundingClientRect()),f=_h(u,h,1),d=yh(l.getBoundingClientRect()),p=bh([...f,...d]);i.value=p,n.value=!0}return de(a=>{if(t.value&&e.value){const l=u=>o(u,e.value),c=u=>o(u,t.value);t.value.addEventListener("pointerleave",l),e.value.addEventListener("pointerleave",c),a(()=>{t.value?.removeEventListener("pointerleave",l),e.value?.removeEventListener("pointerleave",c)})}}),de(a=>{if(i.value){const l=c=>{if(!i.value||!(c.target instanceof Element))return;const u=c.target,h={x:c.clientX,y:c.clientY},f=t.value?.contains(u)||e.value?.contains(u),d=!xh(h,i.value),p=!!u.closest("[data-grace-area-trigger]");f?s():(d||p)&&(s(),r.trigger())};t.value?.ownerDocument.addEventListener("pointermove",l),a(()=>t.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:n,onPointerExit:r.on}}function vh(t,e){const n=Math.abs(e.top-t.y),i=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function _h(t,e,n=5){const i=[];switch(e){case"top":i.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":i.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":i.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":i.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return i}function yh(t){const{top:e,right:n,bottom:i,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:i},{x:r,y:i}]}function xh(t,e){const{x:n,y:i}=t;let r=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s].x,l=e[s].y,c=e[o].x,u=e[o].y;l>i!=u>i&&n<(c-a)*(i-l)/(u-l)+a&&(r=!r)}return r}function bh(t){const e=t.slice();return e.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),wh(e)}function wh(t){if(t.length<=1)return t.slice();const e=[];for(let i=0;i<t.length;i++){const r=t[i];for(;e.length>=2;){const s=e.at(-1),o=e[e.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let i=t.length-1;i>=0;i--){const r=t[i];for(;n.length>=2;){const s=n.at(-1),o=n[n.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}function dl(t,e="reka"){let n;return n=Gu?.(),e?`${e}-${n}`:n}function kh(t){const e=Y(),n=P(()=>e.value?.width??0),i=P(()=>e.value?.height??0);return _e(()=>{const r=sl(t);if(r){e.value={width:r.offsetWidth,height:r.offsetHeight};const s=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,c;if("borderBoxSize"in a){const u=a.borderBoxSize,h=Array.isArray(u)?u[0]:u;l=h.inlineSize,c=h.blockSize}else l=r.offsetWidth,c=r.offsetHeight;e.value={width:l,height:c}});return s.observe(r,{box:"border-box"}),()=>s.unobserve(r)}else e.value=void 0}),{width:n,height:i}}function Sh(t,e){const n=Y(t);function i(s){return e[n.value][s]??n.value}return{state:n,dispatch:s=>{n.value=i(s)}}}function Ch(t,e){const n=Y({}),i=Y("none"),r=Y(t),s=t.value?"mounted":"unmounted";let o;const a=e.value?.ownerDocument.defaultView??ju,{state:l,dispatch:c}=Sh(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=m=>{if(fs){const v=new CustomEvent(m,{bubbles:!1,cancelable:!1});e.value?.dispatchEvent(v)}};pt(t,async(m,v)=>{const y=v!==m;if(await pe(),y){const _=i.value,b=Vn(e.value);m?(c("MOUNT"),u("enter"),b==="none"&&u("after-enter")):b==="none"||b==="undefined"||n.value?.display==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):v&&_!==b?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const h=m=>{const v=Vn(e.value),y=v.includes(CSS.escape(m.animationName)),_=l.value==="mounted"?"enter":"leave";if(m.target===e.value&&y&&(u(`after-${_}`),c("ANIMATION_END"),!r.value)){const b=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",o=a?.setTimeout(()=>{e.value?.style.animationFillMode==="forwards"&&(e.value.style.animationFillMode=b)})}m.target===e.value&&v==="none"&&c("ANIMATION_END")},f=m=>{m.target===e.value&&(i.value=Vn(e.value))},d=pt(e,(m,v)=>{m?(n.value=getComputedStyle(m),m.addEventListener("animationstart",f),m.addEventListener("animationcancel",h),m.addEventListener("animationend",h)):(c("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),v?.removeEventListener("animationstart",f),v?.removeEventListener("animationcancel",h),v?.removeEventListener("animationend",h))},{immediate:!0}),p=pt(l,()=>{const m=Vn(e.value);i.value=l.value==="mounted"?m:"none"});return on(()=>{d(),p()}),{isPresent:P(()=>["mounted","unmountSuspended"].includes(l.value))}}function Vn(t){return t&&getComputedStyle(t).animationName||"none"}var Th=F({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){const{present:i,forceMount:r}=ds(t),s=Y(),{isPresent:o}=Ch(i,s);n({present:o});let a=e.default({present:o.value});a=Zu(a||[]);const l=Yi();if(a&&a?.length>1){const c=l?.parent?.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(u=>` - ${u}`).join(`
|
|
2
2
|
`)].join(`
|
|
3
3
|
`))}return()=>r.value||i.value||o.value?Ku(e.default({present:o.value})[0],{ref:c=>{const u=sl(c);return typeof u?.hasAttribute>"u"||(u?.hasAttribute("data-reka-popper-content-wrapper")?s.value=u.firstElementChild:s.value=u),u}}):null}});const Ah="dismissableLayer.pointerDownOutside",Mh="dismissableLayer.focusOutside";function pl(t,e){if(!(e instanceof Element))return!1;const n=e.closest("[data-dismissable-layer]"),i=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),r=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(i===n||r.indexOf(i)<r.indexOf(n)))}function Eh(t,e,n=!0){const i=e?.value?.ownerDocument??globalThis?.document,r=Y(!1),s=Y(()=>{});return de(o=>{if(!fs||!bn(n))return;const a=async c=>{const u=c.target;if(!(!e?.value||!u)){if(pl(e.value,u)){r.value=!1;return}if(c.target&&!r.value){let f=function(){hl(Ah,t,h)};const h={originalEvent:c};c.pointerType==="touch"?(i.removeEventListener("click",s.value),s.value=f,i.addEventListener("click",s.value,{once:!0})):f()}else i.removeEventListener("click",s.value);r.value=!1}},l=window.setTimeout(()=>{i.addEventListener("pointerdown",a)},0);o(()=>{window.clearTimeout(l),i.removeEventListener("pointerdown",a),i.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>{bn(n)&&(r.value=!0)}}}function Dh(t,e,n=!0){const i=e?.value?.ownerDocument??globalThis?.document,r=Y(!1);return de(s=>{if(!fs||!bn(n))return;const o=async a=>{if(!e?.value)return;await pe(),await pe();const l=a.target;!e.value||!l||pl(e.value,l)||a.target&&!r.value&&hl(Mh,t,{originalEvent:a})};i.addEventListener("focusin",o),s(()=>i.removeEventListener("focusin",o))}),{onFocusCapture:()=>{bn(n)&&(r.value=!0)},onBlurCapture:()=>{bn(n)&&(r.value=!1)}}}const Tt=ol({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});var Oh=F({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Nt(),o=P(()=>s.value?.ownerDocument??globalThis.document),a=P(()=>Tt.layersRoot),l=P(()=>s.value?Array.from(a.value).indexOf(s.value):-1),c=P(()=>Tt.layersWithOutsidePointerEventsDisabled.size>0),u=P(()=>{const d=Array.from(a.value),[p]=[...Tt.layersWithOutsidePointerEventsDisabled].slice(-1),g=d.indexOf(p);return l.value>=g}),h=Eh(async d=>{const p=[...Tt.branches].some(g=>g?.contains(d.target));!u.value||p||(i("pointerDownOutside",d),i("interactOutside",d),await pe(),d.defaultPrevented||i("dismiss"))},s),f=Dh(d=>{[...Tt.branches].some(g=>g?.contains(d.target))||(i("focusOutside",d),i("interactOutside",d),d.defaultPrevented||i("dismiss"))},s);return Qu("Escape",d=>{l.value===a.value.size-1&&(i("escapeKeyDown",d),d.defaultPrevented||i("dismiss"))}),de(d=>{s.value&&(n.disableOutsidePointerEvents&&(Tt.layersWithOutsidePointerEventsDisabled.size===0&&(Tt.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),Tt.layersWithOutsidePointerEventsDisabled.add(s.value)),a.value.add(s.value),d(()=>{n.disableOutsidePointerEvents&&Tt.layersWithOutsidePointerEventsDisabled.size===1&&!ph(Tt.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=Tt.originalBodyPointerEvents)}))}),de(d=>{d(()=>{s.value&&(a.value.delete(s.value),Tt.layersWithOutsidePointerEventsDisabled.delete(s.value))})}),(d,p)=>($(),Z(C(Ne),{ref:C(r),"as-child":d.asChild,as:d.as,"data-dismissable-layer":"",style:Xi({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:C(f).onFocusCapture,onBlurCapture:C(f).onBlurCapture,onPointerdownCapture:C(h).onPointerDownCapture},{default:H(()=>[B(d.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),$h=Oh,Ph=F({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=th();return(n,i)=>C(e)||n.forceMount?($(),Z(Ju,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[B(n.$slots,"default")],8,["to","disabled","defer"])):vi("v-if",!0)}}),Fh=Ph,Rh=F({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>($(),Z(C(Ne),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:H(()=>[B(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Nh=Rh;const[gl,Bh]=Gi("PopperRoot");var Lh=F({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=Y();return Bh({anchor:e,onAnchorChange:n=>e.value=n}),(n,i)=>B(n.$slots,"default")}}),Ih=Lh,Hh=F({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Nt(),r=gl();return al(()=>{r.onAnchorChange(e.reference??i.value)}),(s,o)=>($(),Z(C(Ne),{ref:C(n),as:s.as,"as-child":s.asChild},{default:H(()=>[B(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),zh=Hh;const Uh={key:0,d:"M0 0L6 6L12 0"},Wh={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var qh=F({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(t){const e=t;return Nt(),(n,i)=>($(),Z(C(Ne),Vt(e,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 12 6",preserveAspectRatio:n.asChild?void 0:"none"}),{default:H(()=>[B(n.$slots,"default",{},()=>[n.rounded?($(),X("path",Wh)):($(),X("path",Uh))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Vh=qh;function Yh(t){return t!==null}function Xh(t){return{name:"transformOrigin",options:t,fn(e){const{placement:n,rects:i,middlewareData:r}=e,o=r.arrow?.centerOffset!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=Rr(n),h={start:"0%",center:"50%",end:"100%"}[u],f=(r.arrow?.x??0)+a/2,d=(r.arrow?.y??0)+l/2;let p="",g="";return c==="bottom"?(p=o?h:`${f}px`,g=`${-l}px`):c==="top"?(p=o?h:`${f}px`,g=`${i.floating.height+l}px`):c==="right"?(p=`${-l}px`,g=o?h:`${d}px`):c==="left"&&(p=`${i.floating.width+l}px`,g=o?h:`${d}px`),{data:{x:p,y:g}}}}}function Rr(t){const[e,n="center"]=t.split("-");return[e,n]}const Gh=["top","right","bottom","left"],ge=Math.min,wt=Math.max,_i=Math.round,Yn=Math.floor,Ut=t=>({x:t,y:t}),jh={left:"right",right:"left",bottom:"top",top:"bottom"};function Nr(t,e,n){return wt(t,ge(e,n))}function te(t,e){return typeof t=="function"?t(e):t}function ee(t){return t.split("-")[0]}function an(t){return t.split("-")[1]}function vs(t){return t==="x"?"y":"x"}function _s(t){return t==="y"?"height":"width"}function zt(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function ys(t){return vs(zt(t))}function Zh(t,e,n){n===void 0&&(n=!1);const i=an(t),r=ys(t),s=_s(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=yi(o)),[o,yi(o)]}function Kh(t){const e=yi(t);return[Br(t),e,Br(e)]}function Br(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const go=["left","right"],mo=["right","left"],Qh=["top","bottom"],Jh=["bottom","top"];function tf(t,e,n){switch(t){case"top":case"bottom":return n?e?mo:go:e?go:mo;case"left":case"right":return e?Qh:Jh;default:return[]}}function ef(t,e,n,i){const r=an(t);let s=tf(ee(t),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(Br)))),s}function yi(t){const e=ee(t);return jh[e]+t.slice(e.length)}function nf(t){return{top:0,right:0,bottom:0,left:0,...t}}function ml(t){return typeof t!="number"?nf(t):{top:t,right:t,bottom:t,left:t}}function xi(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function vo(t,e,n){let{reference:i,floating:r}=t;const s=zt(e),o=ys(e),a=_s(o),l=ee(e),c=s==="y",u=i.x+i.width/2-r.width/2,h=i.y+i.height/2-r.height/2,f=i[a]/2-r[a]/2;let d;switch(l){case"top":d={x:u,y:i.y-r.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:h};break;case"left":d={x:i.x-r.width,y:h};break;default:d={x:i.x,y:i.y}}switch(an(e)){case"start":d[o]-=f*(n&&c?-1:1);break;case"end":d[o]+=f*(n&&c?-1:1);break}return d}async function rf(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:d=0}=te(e,t),p=ml(d),m=a[f?h==="floating"?"reference":"floating":h],v=xi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(m)))==null||n?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=h==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(_))?await(s.getScale==null?void 0:s.getScale(_))||{x:1,y:1}:{x:1,y:1},k=xi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:_,strategy:l}):y);return{top:(v.top-k.top+p.top)/b.y,bottom:(k.bottom-v.bottom+p.bottom)/b.y,left:(v.left-k.left+p.left)/b.x,right:(k.right-v.right+p.right)/b.x}}const sf=50,of=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=o.detectOverflow?o:{...o,detectOverflow:rf},l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:h}=vo(c,i,l),f=i,d=0;const p={};for(let g=0;g<s.length;g++){const m=s[g];if(!m)continue;const{name:v,fn:y}=m,{x:_,y:b,data:k,reset:x}=await y({x:u,y:h,initialPlacement:i,placement:f,strategy:r,middlewareData:p,rects:c,platform:a,elements:{reference:t,floating:e}});u=_??u,h=b??h,p[v]={...p[v],...k},x&&d<sf&&(d++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(c=x.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:r}):x.rects),{x:u,y:h}=vo(c,f,l)),g=-1)}return{x:u,y:h,placement:f,strategy:r,middlewareData:p}},af=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=te(t,e)||{};if(c==null)return{};const h=ml(u),f={x:n,y:i},d=ys(r),p=_s(d),g=await o.getDimensions(c),m=d==="y",v=m?"top":"left",y=m?"bottom":"right",_=m?"clientHeight":"clientWidth",b=s.reference[p]+s.reference[d]-f[d]-s.floating[p],k=f[d]-s.reference[d],x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let w=x?x[_]:0;(!w||!await(o.isElement==null?void 0:o.isElement(x)))&&(w=a.floating[_]||s.floating[p]);const O=b/2-k/2,D=w/2-g[p]/2-1,E=ge(h[v],D),L=ge(h[y],D),T=E,z=w-g[p]-L,I=w/2-g[p]/2+O,tt=Nr(T,I,z),ot=!l.arrow&&an(r)!=null&&I!==tt&&s.reference[p]/2-(I<T?E:L)-g[p]/2<0,et=ot?I<T?I-T:I-z:0;return{[d]:f[d]+et,data:{[d]:tt,centerOffset:I-tt-et,...ot&&{alignmentOffset:et}},reset:ot}}}),lf=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...m}=te(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=ee(r),y=zt(a),_=ee(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=f||(_||!g?[yi(a)]:Kh(a)),x=p!=="none";!f&&x&&k.push(...ef(a,g,p,b));const w=[a,...k],O=await l.detectOverflow(e,m),D=[];let E=((i=s.flip)==null?void 0:i.overflows)||[];if(u&&D.push(O[v]),h){const I=Zh(r,o,b);D.push(O[I[0]],O[I[1]])}if(E=[...E,{placement:r,overflows:D}],!D.every(I=>I<=0)){var L,T;const I=(((L=s.flip)==null?void 0:L.index)||0)+1,tt=w[I];if(tt&&(!(h==="alignment"?y!==zt(tt):!1)||E.every(j=>zt(j.placement)===y?j.overflows[0]>0:!0)))return{data:{index:I,overflows:E},reset:{placement:tt}};let ot=(T=E.filter(et=>et.overflows[0]<=0).sort((et,j)=>et.overflows[1]-j.overflows[1])[0])==null?void 0:T.placement;if(!ot)switch(d){case"bestFit":{var z;const et=(z=E.filter(j=>{if(x){const dt=zt(j.placement);return dt===y||dt==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(dt=>dt>0).reduce((dt,yt)=>dt+yt,0)]).sort((j,dt)=>j[1]-dt[1])[0])==null?void 0:z[0];et&&(ot=et);break}case"initialPlacement":ot=a;break}if(r!==ot)return{reset:{placement:ot}}}return{}}}};function _o(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function yo(t){return Gh.some(e=>t[e]>=0)}const cf=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:i}=e,{strategy:r="referenceHidden",...s}=te(t,e);switch(r){case"referenceHidden":{const o=await i.detectOverflow(e,{...s,elementContext:"reference"}),a=_o(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:yo(a)}}}case"escaped":{const o=await i.detectOverflow(e,{...s,altBoundary:!0}),a=_o(o,n.floating);return{data:{escapedOffsets:a,escaped:yo(a)}}}default:return{}}}}},vl=new Set(["left","top"]);async function uf(t,e){const{placement:n,platform:i,elements:r}=t,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=ee(n),a=an(n),l=zt(n)==="y",c=vl.has(o)?-1:1,u=s&&l?-1:1,h=te(e,t);let{mainAxis:f,crossAxis:d,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof p=="number"&&(d=a==="end"?p*-1:p),l?{x:d*u,y:f*c}:{x:f*c,y:d*u}}const hf=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=e,l=await uf(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}},ff=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:y,y:_}=v;return{x:y,y:_}}},...c}=te(t,e),u={x:n,y:i},h=await s.detectOverflow(e,c),f=zt(ee(r)),d=vs(f);let p=u[d],g=u[f];if(o){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",_=p+h[v],b=p-h[y];p=Nr(_,p,b)}if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",_=g+h[v],b=g-h[y];g=Nr(_,g,b)}const m=l.fn({...e,[d]:p,[f]:g});return{...m,data:{x:m.x-n,y:m.y-i,enabled:{[d]:o,[f]:a}}}}}},df=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=te(t,e),u={x:n,y:i},h=zt(r),f=vs(h);let d=u[f],p=u[h];const g=te(a,e),m=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const _=f==="y"?"height":"width",b=s.reference[f]-s.floating[_]+m.mainAxis,k=s.reference[f]+s.reference[_]-m.mainAxis;d<b?d=b:d>k&&(d=k)}if(c){var v,y;const _=f==="y"?"width":"height",b=vl.has(ee(r)),k=s.reference[h]-s.floating[_]+(b&&((v=o.offset)==null?void 0:v[h])||0)+(b?0:m.crossAxis),x=s.reference[h]+s.reference[_]+(b?0:((y=o.offset)==null?void 0:y[h])||0)-(b?m.crossAxis:0);p<k?p=k:p>x&&(p=x)}return{[f]:d,[h]:p}}}},pf=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=te(t,e),u=await o.detectOverflow(e,c),h=ee(r),f=an(r),d=zt(r)==="y",{width:p,height:g}=s.floating;let m,v;h==="top"||h==="bottom"?(m=h,v=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=h,m=f==="end"?"top":"bottom");const y=g-u.top-u.bottom,_=p-u.left-u.right,b=ge(g-u[m],y),k=ge(p-u[v],_),x=!e.middlewareData.shift;let w=b,O=k;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(O=_),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(w=y),x&&!f){const E=wt(u.left,0),L=wt(u.right,0),T=wt(u.top,0),z=wt(u.bottom,0);d?O=p-2*(E!==0||L!==0?E+L:wt(u.left,u.right)):w=g-2*(T!==0||z!==0?T+z:wt(u.top,u.bottom))}await l({...e,availableWidth:O,availableHeight:w});const D=await o.getDimensions(a.floating);return p!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}};function Ki(){return typeof window<"u"}function Be(t){return xs(t)?(t.nodeName||"").toLowerCase():"#document"}function kt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Yt(t){var e;return(e=(xs(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function xs(t){return Ki()?t instanceof Node||t instanceof kt(t).Node:!1}function Ft(t){return Ki()?t instanceof Element||t instanceof kt(t).Element:!1}function oe(t){return Ki()?t instanceof HTMLElement||t instanceof kt(t).HTMLElement:!1}function xo(t){return!Ki()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof kt(t).ShadowRoot}function Nn(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=Rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&r!=="inline"&&r!=="contents"}function gf(t){return/^(table|td|th)$/.test(Be(t))}function Qi(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const mf=/transform|translate|scale|rotate|perspective|filter/,vf=/paint|layout|strict|content/,xe=t=>!!t&&t!=="none";let xr;function bs(t){const e=Ft(t)?Rt(t):t;return xe(e.transform)||xe(e.translate)||xe(e.scale)||xe(e.rotate)||xe(e.perspective)||!ws()&&(xe(e.backdropFilter)||xe(e.filter))||mf.test(e.willChange||"")||vf.test(e.contain||"")}function _f(t){let e=me(t);for(;oe(e)&&!Ze(e);){if(bs(e))return e;if(Qi(e))return null;e=me(e)}return null}function ws(){return xr==null&&(xr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xr}function Ze(t){return/^(html|body|#document)$/.test(Be(t))}function Rt(t){return kt(t).getComputedStyle(t)}function Ji(t){return Ft(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function me(t){if(Be(t)==="html")return t;const e=t.assignedSlot||t.parentNode||xo(t)&&t.host||Yt(t);return xo(e)?e.host:e}function _l(t){const e=me(t);return Ze(e)?t.ownerDocument?t.ownerDocument.body:t.body:oe(e)&&Nn(e)?e:_l(e)}function An(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=_l(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=kt(r);if(s){const a=Lr(o);return e.concat(o,o.visualViewport||[],Nn(r)?r:[],a&&n?An(a):[])}else return e.concat(r,An(r,[],n))}function Lr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function yl(t){const e=Rt(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=oe(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,a=_i(n)!==s||_i(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function ks(t){return Ft(t)?t:t.contextElement}function Ve(t){const e=ks(t);if(!oe(e))return Ut(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=yl(e);let o=(s?_i(n.width):n.width)/i,a=(s?_i(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const yf=Ut(0);function xl(t){const e=kt(t);return!ws()||!e.visualViewport?yf:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xf(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==kt(t)?!1:e}function De(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=ks(t);let o=Ut(1);e&&(i?Ft(i)&&(o=Ve(i)):o=Ve(t));const a=xf(s,n,i)?xl(s):Ut(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,h=r.height/o.y;if(s){const f=kt(s),d=i&&Ft(i)?kt(i):i;let p=f,g=Lr(p);for(;g&&i&&d!==p;){const m=Ve(g),v=g.getBoundingClientRect(),y=Rt(g),_=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*m.x,b=v.top+(g.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,h*=m.y,l+=_,c+=b,p=kt(g),g=Lr(p)}}return xi({width:u,height:h,x:l,y:c})}function tr(t,e){const n=Ji(t).scrollLeft;return e?e.left+n:De(Yt(t)).left+n}function bl(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-tr(t,n),r=n.top+e.scrollTop;return{x:i,y:r}}function bf(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=Yt(i),a=e?Qi(e.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ut(1);const u=Ut(0),h=oe(i);if((h||!h&&!s)&&((Be(i)!=="body"||Nn(o))&&(l=Ji(i)),h)){const d=De(i);c=Ve(i),u.x=d.x+i.clientLeft,u.y=d.y+i.clientTop}const f=o&&!h&&!s?bl(o,l):Ut(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function wf(t){return Array.from(t.getClientRects())}function kf(t){const e=Yt(t),n=Ji(t),i=t.ownerDocument.body,r=wt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=wt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+tr(t);const a=-n.scrollTop;return Rt(i).direction==="rtl"&&(o+=wt(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}const bo=25;function Sf(t,e){const n=kt(t),i=Yt(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const u=ws();(!u||u&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const c=tr(i);if(c<=0){const u=i.ownerDocument,h=u.body,f=getComputedStyle(h),d=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(i.clientWidth-h.clientWidth-d);p<=bo&&(s-=p)}else c<=bo&&(s+=c);return{width:s,height:o,x:a,y:l}}function Cf(t,e){const n=De(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=oe(t)?Ve(t):Ut(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function wo(t,e,n){let i;if(e==="viewport")i=Sf(t,n);else if(e==="document")i=kf(Yt(t));else if(Ft(e))i=Cf(e,n);else{const r=xl(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return xi(i)}function wl(t,e){const n=me(t);return n===e||!Ft(n)||Ze(n)?!1:Rt(n).position==="fixed"||wl(n,e)}function Tf(t,e){const n=e.get(t);if(n)return n;let i=An(t,[],!1).filter(a=>Ft(a)&&Be(a)!=="body"),r=null;const s=Rt(t).position==="fixed";let o=s?me(t):t;for(;Ft(o)&&!Ze(o);){const a=Rt(o),l=bs(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Nn(o)&&!l&&wl(t,o))?i=i.filter(u=>u!==o):r=a,o=me(o)}return e.set(t,i),i}function Af(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?Qi(e)?[]:Tf(e,this._c):[].concat(n),i],a=wo(e,o[0],r);let l=a.top,c=a.right,u=a.bottom,h=a.left;for(let f=1;f<o.length;f++){const d=wo(e,o[f],r);l=wt(d.top,l),c=ge(d.right,c),u=ge(d.bottom,u),h=wt(d.left,h)}return{width:c-h,height:u-l,x:h,y:l}}function Mf(t){const{width:e,height:n}=yl(t);return{width:e,height:n}}function Ef(t,e,n){const i=oe(e),r=Yt(e),s=n==="fixed",o=De(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Ut(0);function c(){l.x=tr(r)}if(i||!i&&!s)if((Be(e)!=="body"||Nn(r))&&(a=Ji(e)),i){const d=De(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&c();s&&!i&&r&&c();const u=r&&!i&&!s?bl(r,a):Ut(0),h=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:h,y:f,width:o.width,height:o.height}}function br(t){return Rt(t).position==="static"}function ko(t,e){if(!oe(t)||Rt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Yt(t)===n&&(n=n.ownerDocument.body),n}function kl(t,e){const n=kt(t);if(Qi(t))return n;if(!oe(t)){let r=me(t);for(;r&&!Ze(r);){if(Ft(r)&&!br(r))return r;r=me(r)}return n}let i=ko(t,e);for(;i&&gf(i)&&br(i);)i=ko(i,e);return i&&Ze(i)&&br(i)&&!bs(i)?n:i||_f(t)||n}const Df=async function(t){const e=this.getOffsetParent||kl,n=this.getDimensions,i=await n(t.floating);return{reference:Ef(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Of(t){return Rt(t).direction==="rtl"}const $f={convertOffsetParentRelativeRectToViewportRelativeRect:bf,getDocumentElement:Yt,getClippingRect:Af,getOffsetParent:kl,getElementRects:Df,getClientRects:wf,getDimensions:Mf,getScale:Ve,isElement:Ft,isRTL:Of};function Sl(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Pf(t,e){let n=null,i;const r=Yt(t);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:h,width:f,height:d}=c;if(a||e(),!f||!d)return;const p=Yn(h),g=Yn(r.clientWidth-(u+f)),m=Yn(r.clientHeight-(h+d)),v=Yn(u),_={rootMargin:-p+"px "+-g+"px "+-m+"px "+-v+"px",threshold:wt(0,ge(1,l))||1};let b=!0;function k(x){const w=x[0].intersectionRatio;if(w!==l){if(!b)return o();w?o(!1,w):i=setTimeout(()=>{o(!1,1e-7)},1e3)}w===1&&!Sl(c,t.getBoundingClientRect())&&o(),b=!1}try{n=new IntersectionObserver(k,{..._,root:r.ownerDocument})}catch{n=new IntersectionObserver(k,_)}n.observe(t)}return o(!0),s}function Ff(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=ks(t),u=r||s?[...c?An(c):[],...e?An(e):[]]:[];u.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const h=c&&a?Pf(c,n):null;let f=-1,d=null;o&&(d=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&d&&e&&(d.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=d)==null||_.observe(e)})),n()}),c&&!l&&d.observe(c),e&&d.observe(e));let p,g=l?De(t):null;l&&m();function m(){const v=De(t);g&&!Sl(g,v)&&n(),g=v,p=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h?.(),(v=d)==null||v.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const Rf=hf,Nf=ff,So=lf,Bf=pf,Lf=cf,If=af,Hf=df,zf=(t,e,n)=>{const i=new Map,r={platform:$f,...n},s={...r.platform,_c:i};return of(t,e,{...r,platform:s})};function Uf(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ir(t){if(Uf(t)){const e=t.$el;return xs(e)&&Be(e)==="#comment"?null:e}return t}function We(t){return typeof t=="function"?t():C(t)}function Wf(t){return{name:"arrow",options:t,fn(e){const n=Ir(We(t.element));return n==null?{}:If({element:n,padding:t.padding}).fn(e)}}}function Cl(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Co(t,e){const n=Cl(t);return Math.round(e*n)/n}function qf(t,e,n){n===void 0&&(n={});const i=n.whileElementsMounted,r=P(()=>{var w;return(w=We(n.open))!=null?w:!0}),s=P(()=>We(n.middleware)),o=P(()=>{var w;return(w=We(n.placement))!=null?w:"bottom"}),a=P(()=>{var w;return(w=We(n.strategy))!=null?w:"absolute"}),l=P(()=>{var w;return(w=We(n.transform))!=null?w:!0}),c=P(()=>Ir(t.value)),u=P(()=>Ir(e.value)),h=Y(0),f=Y(0),d=Y(a.value),p=Y(o.value),g=ih({}),m=Y(!1),v=P(()=>{const w={position:d.value,left:"0",top:"0"};if(!u.value)return w;const O=Co(u.value,h.value),D=Co(u.value,f.value);return l.value?{...w,transform:"translate("+O+"px, "+D+"px)",...Cl(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:O+"px",top:D+"px"}});let y;function _(){if(c.value==null||u.value==null)return;const w=r.value;zf(c.value,u.value,{middleware:s.value,placement:o.value,strategy:a.value}).then(O=>{h.value=O.x,f.value=O.y,d.value=O.strategy,p.value=O.placement,g.value=O.middlewareData,m.value=w!==!1})}function b(){typeof y=="function"&&(y(),y=void 0)}function k(){if(b(),i===void 0){_();return}if(c.value!=null&&u.value!=null){y=i(c.value,u.value,_);return}}function x(){r.value||(m.value=!1)}return pt([s,o,a,r],_,{flush:"sync"}),pt([c,u],k,{flush:"sync"}),pt(r,x,{flush:"sync"}),eh()&&nh(b),{x:ze(h),y:ze(f),strategy:ze(d),placement:ze(p),middlewareData:ze(g),isPositioned:ze(m),floatingStyles:v,update:_}}const Vf={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Yf,Xf]=Gi("PopperContent");var Gf=F({inheritAttrs:!1,__name:"PopperContent",props:sh({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Vf}),emits:["placed"],setup(t,{emit:e}){const n=t,i=e,r=gl(),{forwardRef:s,currentElement:o}=Nt(),a=Y(),l=Y(),{width:c,height:u}=kh(l),h=P(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=P(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=P(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),p=P(()=>({padding:f.value,boundary:d.value.filter(Yh),altBoundary:d.value.length>0})),g=P(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),m=rh(()=>[Rf({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&So({...p.value,...g.value}),n.avoidCollisions&&Nf({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?Hf():void 0,...p.value}),!n.prioritizePosition&&n.avoidCollisions&&So({...p.value,...g.value}),Bf({...p.value,apply:({elements:T,rects:z,availableWidth:I,availableHeight:tt})=>{const{width:ot,height:et}=z.reference,j=T.floating.style;j.setProperty("--reka-popper-available-width",`${I}px`),j.setProperty("--reka-popper-available-height",`${tt}px`),j.setProperty("--reka-popper-anchor-width",`${ot}px`),j.setProperty("--reka-popper-anchor-height",`${et}px`)}}),l.value&&Wf({element:l.value,padding:n.arrowPadding}),Xh({arrowWidth:c.value,arrowHeight:u.value}),n.hideWhenDetached&&Lf({strategy:"referenceHidden",...p.value})]),v=P(()=>n.reference??r.anchor.value),{floatingStyles:y,placement:_,isPositioned:b,middlewareData:k}=qf(v,a,{strategy:n.positionStrategy,placement:h,whileElementsMounted:(...T)=>Ff(...T,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:m}),x=P(()=>Rr(_.value)[0]),w=P(()=>Rr(_.value)[1]);al(()=>{b.value&&i("placed")});const O=P(()=>{const T=k.value.arrow?.centerOffset!==0;return n.hideShiftedArrow&&T}),D=Y("");de(()=>{o.value&&(D.value=window.getComputedStyle(o.value).zIndex)});const E=P(()=>k.value.arrow?.x??0),L=P(()=>k.value.arrow?.y??0);return Xf({placedSide:x,onArrowChange:T=>l.value=T,arrowX:E,arrowY:L,shouldHideArrow:O}),(T,z)=>($(),X("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:Xi({...C(y),transform:C(b)?C(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:D.value,"--reka-popper-transform-origin":[C(k).transformOrigin?.x,C(k).transformOrigin?.y].join(" "),...C(k).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[lt(C(Ne),Vt({ref:C(s)},T.$attrs,{"as-child":n.asChild,as:T.as,"data-side":x.value,"data-align":w.value,style:{animation:C(b)?void 0:"none"}}),{default:H(()=>[B(T.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),jf=Gf;const Zf={top:"bottom",right:"left",bottom:"top",left:"right"};var Kf=F({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(t){const{forwardRef:e}=Nt(),n=Yf(),i=P(()=>Zf[n.placedSide.value]);return(r,s)=>($(),X("span",{ref:o=>{C(n).onArrowChange(o??void 0)},style:Xi({position:"absolute",left:C(n).arrowX?.value?`${C(n).arrowX?.value}px`:void 0,top:C(n).arrowY?.value?`${C(n).arrowY?.value}px`:void 0,[i.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[C(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[C(n).placedSide.value],visibility:C(n).shouldHideArrow.value?"hidden":void 0})},[lt(Vh,Vt(r.$attrs,{ref:C(e),style:{display:"block"},as:r.as,"as-child":r.asChild,rounded:r.rounded,width:r.width,height:r.height}),{default:H(()=>[B(r.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Qf=Kf,Jf=F({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(t){const e=t;return Nt(),(n,i)=>($(),Z(C(Qf),ps(gs(e)),{default:H(()=>[B(n.$slots,"default")]),_:3},16))}}),td=Jf;const Tl="tooltip.open",[er,ed]=Gi("TooltipRoot");var nd=F({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(t,{emit:e}){const n=t,i=e;Nt();const r=ji(),s=P(()=>n.disableHoverableContent??r.disableHoverableContent.value),o=P(()=>n.disableClosingTrigger??r.disableClosingTrigger.value),a=P(()=>n.disabled??r.disabled.value),l=P(()=>n.delayDuration??r.delayDuration.value),c=P(()=>n.ignoreNonKeyboardFocus??r.ignoreNonKeyboardFocus.value),u=oh(n,"open",i,{defaultValue:n.defaultOpen,passive:n.open===void 0});pt(u,_=>{r.onClose&&(_?(r.onOpen(),document.dispatchEvent(new CustomEvent(Tl))):r.onClose())});const h=Y(!1),f=Y(),d=P(()=>u.value?h.value?"delayed-open":"instant-open":"closed"),{start:p,stop:g}=ah(()=>{h.value=!0,u.value=!0},l,{immediate:!1});function m(){g(),h.value=!1,u.value=!0}function v(){g(),u.value=!1}function y(){p()}return ed({contentId:"",open:u,stateAttribute:d,trigger:f,onTriggerChange(_){f.value=_},onTriggerEnter(){r.isOpenDelayed.value?y():m()},onTriggerLeave(){s.value?v():g()},onOpen:m,onClose:v,disableHoverableContent:s,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:c}),(_,b)=>($(),Z(C(Ih),null,{default:H(()=>[B(_.$slots,"default",{open:C(u)})]),_:3}))}}),id=nd,rd=F({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,r=er(),s=ji(),{forwardRef:o,currentElement:a}=Nt(),l=P(()=>n.ariaLabel||a.value?.textContent),c=P(()=>{const{ariaLabel:u,...h}=n;return ch(h,s.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return _e(()=>{po(window,"scroll",u=>{u.target?.contains(r.trigger.value)&&r.onClose()},{capture:!0}),po(window,Tl,r.onClose)}),(u,h)=>($(),Z(C($h),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:h[0]||(h[0]=f=>i("escapeKeyDown",f)),onPointerDownOutside:h[1]||(h[1]=f=>{C(r).disableClosingTrigger.value&&C(r).trigger.value?.contains(f.target)&&f.preventDefault(),i("pointerDownOutside",f)}),onFocusOutside:h[2]||(h[2]=lh(()=>{},["prevent"])),onDismiss:h[3]||(h[3]=f=>C(r).onClose())},{default:H(()=>[lt(C(jf),Vt({ref:C(o),"data-state":C(r).stateAttribute.value},{...u.$attrs,...c.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:H(()=>[B(u.$slots,"default"),lt(C(Nh),{id:C(r).contentId,role:"tooltip"},{default:H(()=>[qe(Jt(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),Al=rd,sd=F({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(t){const n=fl(t),{forwardRef:i,currentElement:r}=Nt(),{trigger:s,onClose:o}=er(),a=ji(),{isPointerInTransit:l,onPointerExit:c}=mh(s,r);return a.isPointerInTransitRef=l,c(()=>{o()}),(u,h)=>($(),Z(Al,Vt({ref:C(i)},C(n)),{default:H(()=>[B(u.$slots,"default")]),_:3},16))}}),od=sd,ad=F({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,r=er(),s=ms(n,i),{forwardRef:o}=Nt();return(a,l)=>($(),Z(C(Th),{present:a.forceMount||C(r).open.value},{default:H(()=>[($(),Z(uh(C(r).disableHoverableContent.value?Al:od),Vt({ref:C(o)},C(s)),{default:H(()=>[B(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),ld=ad,cd=F({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,i)=>($(),Z(C(Fh),ps(gs(e)),{default:H(()=>[B(n.$slots,"default")]),_:3},16))}}),ud=cd,hd=F({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=er(),i=ji();n.contentId||=dl(void 0,"reka-tooltip-content");const{forwardRef:r,currentElement:s}=Nt(),o=Y(!1),a=Y(!1),l=P(()=>n.disabled.value?{}:{click:g,focus:d,pointermove:h,pointerleave:f,pointerdown:u,blur:p});_e(()=>{n.onTriggerChange(s.value)});function c(){setTimeout(()=>{o.value=!1},1)}function u(){n.open&&!n.disableClosingTrigger.value&&n.onClose(),o.value=!0,document.addEventListener("pointerup",c,{once:!0})}function h(m){m.pointerType!=="touch"&&!a.value&&!i.isPointerInTransitRef.value&&(n.onTriggerEnter(),a.value=!0)}function f(){n.onTriggerLeave(),a.value=!1}function d(m){o.value||n.ignoreNonKeyboardFocus.value&&!m.target.matches?.(":focus-visible")||n.onOpen()}function p(){n.onClose()}function g(){n.disableClosingTrigger.value||n.onClose()}return(m,v)=>($(),Z(C(zh),{"as-child":"",reference:m.reference},{default:H(()=>[lt(C(Ne),Vt({ref:C(r),"aria-describedby":C(n).open.value?C(n).contentId:void 0,"data-state":C(n).stateAttribute.value,as:m.as,"as-child":e.asChild,"data-grace-area-trigger":""},hh(l.value)),{default:H(()=>[B(m.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),fd=hd;const dd=F({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const r=ms(t,e);return(s,o)=>($(),Z(C(id),Vt({"data-slot":"tooltip"},C(r)),{default:H(a=>[B(s.$slots,"default",ps(gs(a)))]),_:3},16))}}),pd=F({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,r=fh(n,"class"),s=ms(r,i);return(o,a)=>($(),Z(C(ud),null,{default:H(()=>[lt(C(ld),Vt({"data-slot":"tooltip-content"},{...C(s),...o.$attrs},{class:C(ht)("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",n.class)}),{default:H(()=>[B(o.$slots,"default"),lt(C(td),{class:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),gd=F({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,i)=>($(),Z(C(fd),Vt({"data-slot":"tooltip-trigger"},e),{default:H(()=>[B(n.$slots,"default")]),_:3},16))}}),md={class:"max-w-64 leading-relaxed"},vd=F({name:"ValueTooltip",__name:"ValueTooltip",props:{content:{}},setup(t){return(e,n)=>{const i=gd,r=pd,s=dd;return t.content?($(),Z(s,{key:1},{default:H(()=>[lt(i,{"as-child":""},{default:H(()=>[B(e.$slots,"default")]),_:3}),lt(r,{side:"top"},{default:H(()=>[Dt("p",md,Jt(t.content),1)]),_:1})]),_:3})):B(e.$slots,"default",{key:0})}}}),_d=Object.assign(vd,{__name:"ValueTooltip"}),yd=F({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>($(),X("div",{"data-slot":"card",class:it(C(ht)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e.class))},[B(n.$slots,"default")],2))}}),xd=F({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>($(),X("div",{"data-slot":"card-content",class:it(C(ht)("px-6",e.class))},[B(n.$slots,"default")],2))}}),bd=F({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>($(),X("div",{"data-slot":"card-header",class:it(C(ht)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e.class))},[B(n.$slots,"default")],2))}}),wd=F({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>($(),X("h3",{"data-slot":"card-title",class:it(C(ht)("leading-none font-semibold",e.class))},[B(n.$slots,"default")],2))}}),kd={class:"flex items-start justify-between gap-4"},Sd={class:"min-w-0 space-y-1"},Cd={key:0,class:"text-sm text-muted-foreground"},Td=F({name:"StatisticalAnalysisPanel",__name:"Panel",props:{compact:{type:Boolean},description:{},icon:{},title:{}},setup(t){return(e,n)=>{const i=wd,r=ll,s=bd,o=xd,a=yd;return $(),Z(a,{class:it(C(ht)("shadow-none bg-transparent",t.compact?"gap-3 py-4":"gap-4 py-5"))},{default:H(()=>[lt(s,{class:it(C(ht)(t.compact?"px-4":"px-5"))},{default:H(()=>[Dt("div",kd,[Dt("div",Sd,[lt(i,{class:it(t.compact?"text-xs font-medium text-muted-foreground uppercase tracking-wide":"text-base")},{default:H(()=>[qe(Jt(t.title),1)]),_:1},8,["class"]),t.description?($(),X("p",Cd,Jt(t.description),1)):vi("",!0)]),t.icon?($(),X("div",{key:0,class:it(C(ht)("shrink-0 rounded-lg bg-secondary text-secondary-foreground flex items-center justify-center",t.compact?"size-7":"size-8"))},[lt(r,{mode:"svg",name:t.icon,class:it(t.compact?"size-3.5":"size-4")},null,8,["name","class"])],2)):vi("",!0)])]),_:1},8,["class"]),lt(o,{class:it(C(ht)(t.compact?"px-4":"px-5"))},{default:H(()=>[B(e.$slots,"default")]),_:3},8,["class"])]),_:3},8,["class"])}}}),Ad=Object.assign(Td,{__name:"StatisticalAnalysisPanel"}),Md={class:"flex justify-between items-center"},Ed={class:"flex items-center gap-1"},Dd=F({name:"StatisticalAnalysisTotalCard",__name:"TotalCard",props:{detail:{},name:{},value:{},icon:{},trend:{},trendTone:{default:"neutral"}},setup(t){const e=t,n=P(()=>e.trendTone==="down"?{icon:"lucide:trending-down",iconClass:"size-3 text-red-500",textClass:"text-xs font-medium text-red-500"}:e.trendTone==="up"?{icon:"lucide:trending-up",iconClass:"size-3 text-emerald-500",textClass:"text-xs font-medium text-emerald-600 dark:text-emerald-400"}:{icon:"lucide:minus",iconClass:"size-3 text-muted-foreground",textClass:"text-xs font-medium text-muted-foreground"});return(i,r)=>{const s=_d,o=ll,a=Ad;return $(),Z(a,{compact:"",icon:t.icon,title:t.name},{default:H(()=>[Dt("div",Md,[lt(s,{content:t.detail},{default:H(()=>[Dt("span",{class:it(C(ht)("text-2xl font-bold tracking-tight"))},Jt(t.value),3)]),_:1},8,["content"]),Dt("div",Ed,[lt(o,{class:it(C(n).iconClass),mode:"svg",name:C(n).icon},null,8,["class","name"]),Dt("span",{class:it(C(n).textClass)},Jt(t.trend),3)])])]),_:1},8,["icon","title"])}}}),Od=Object.assign(Dd,{__name:"StatisticalAnalysisTotalCard"}),$d={class:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4"},Pd=F({name:"DashboardOverviewCards",__name:"OverviewCards",props:{cards:{}},setup(t){return(e,n)=>{const i=Od;return $(),X("div",$d,[($(!0),X(cl,null,ul(t.cards,r=>($(),Z(i,{key:r.name,detail:r.detail,icon:r.icon,name:r.name,trend:r.trend,"trend-tone":r.trendTone,value:r.value},null,8,["detail","icon","name","trend","trend-tone","value"]))),128))])}}}),O1=Object.assign(Pd,{__name:"DashboardOverviewCards"}),Fd=F({__name:"ChartStyle",props:{id:{}},setup(t){const{config:e}=u1(),n=P(()=>Object.entries(e.value).filter(([,i])=>i.theme||i.color));return(i,r)=>n.value.length?($(),Z(C(Ne),{key:0,as:"style"},{default:H(()=>[qe(Jt(Object.entries(C(c1)).map(([s,o])=>`
|
|
4
4
|
${o} [data-chart=${t.id}] {
|