dsp-semactic 0.5.21 → 0.5.22
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.cjs.js +8 -8
- package/dist/index.es.js +588 -576
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Gt=require("vue-i18n"),So=["data-chart-type"],$o={class:"dss-chart-header"},_o={class:"dss-chart-header-titles"},Vo={key:0,class:"dss-chart-title"},Do={key:1,class:"dss-chart-subtitle"},Lo={key:0,class:"dss-chart-legend"},zo=["onClick","onMouseenter"],Ho={class:"dss-legend-text"},No=["width","height","data-smooth","data-animated"],Ao={id:"chart-clip"},Fo=["x","y","width","height"],Xo={key:0},Io={key:0,class:"dss-grid-lines","clip-path":"url(#chart-clip)"},To=["x1","x2","y1","y2"],Yo={class:"dss-axes"},Ro=["x1","x2","y1","y2"],Oo=["x1","x2","y1","y2"],Po={class:"dss-axis-labels"},Zo=["x","y"],jo=["x","y"],Uo=["x","y"],Wo=["y","transform"],qo={key:1,class:"dss-flag-markers"},Go={"clip-path":"url(#chart-clip)"},Qo=["x1","x2","y1","y2","onMouseover"],Ko=["x1","x2","y1","y2","onMouseover"],Jo=["x1","x2","y1","y2","onMouseover"],el=["cx","cy","onMouseover"],tl=["cx","cy","fill","onMouseover"],al=["x","y"],ol={class:"dss-chart-data","clip-path":"url(#chart-clip)"},ll={key:0},sl={class:"dss-bar-chart"},nl=["d","fill","onMouseover"],rl=["x","y","width","height","fill","onMouseover"],il={class:"dss-line-chart"},cl=["d","stroke","stroke-width"],ul=["cx","cy","r","fill","onMouseover"],dl={key:1},ml=["d","stroke","stroke-width"],hl=["cx","cy","r","fill","onMouseover"],vl={key:2},gl=["id"],pl=["x","y","width","height"],fl=["d","fill","fill-opacity","mask"],yl=["d","stroke","stroke-width"],kl={key:3},Cl=["d","fill","onMouseover"],xl=["x","y","width","height","fill","onMouseover"],Ml={key:2,class:"dss-crosshair","clip-path":"url(#chart-clip)"},wl=["x1","x2","y1","y2","stroke"],bl=["cx","cy","r","fill"],El={key:1,class:"dss-bubble-chart"},Bl={key:0,class:"dss-bubble-group"},Sl=["cx","cy","r","fill","fill-opacity","stroke","stroke-width","onMouseenter","onMouseleave","onClick"],$l=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],_l={key:2,class:"radial-chart"},Vl=["cx","cy","r"],Dl=["data-chart-type"],Ll=["d","fill","fill-opacity","stroke","stroke-width","onMouseover"],zl={key:1,class:"dss-radial-labels"},Hl=["x1","y1","x2","y2","stroke"],Nl=["x1","y1","x2","y2","stroke"],Al=["x","y","text-anchor","font-size"],Fl={key:3,class:"dss-spider-chart"},Xl={key:0,class:"dss-spider-grid"},Il=["cx","cy","r"],Tl={class:"dss-spider-grid-labels"},Yl=["x","y"],Rl=["x","y"],Ol=["x1","x2","y1","y2"],Pl={class:"dss-spider-labels"},Zl=["x","y","text-anchor","dominant-baseline"],jl={class:"dss-spider-data"},Ul=["points","fill","fill-opacity","stroke","stroke-width","onMouseover"],Wl=["cx","cy","r","fill","onMouseover"],ql={class:"dss-chart-logos"},Gl=["cx","cy","r","fill"],Ql=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],Kl=["onClick"],Jl=["src"],es={class:"dss-tooltip-section"},ts={class:"dss-tooltip-title"},as={class:"dss-tooltip-value"},os={key:0,class:"dss-tooltip-section"},ls={class:"dss-tooltip-section-title"},ss={class:"dss-tooltip-group-header"},ns={class:"dss-tooltip-item-content"},rs={class:"dss-tooltip-item-text"},is={key:1,class:"dss-tooltip-section"},cs={class:"dss-tooltip-section-title"},us={class:"dss-tooltip-item-content"},ds={class:"dss-tooltip-item-title"},ms={key:0,class:"dss-tooltip-item-description"},hs={class:"dss-tooltip-section"},vs={class:"dss-tooltip-title"},gs={key:0,class:"dss-bubble-tooltip-data"},ps={class:"dss-tooltip-series-name"},fs={class:"dss-tooltip-series-value"},ys={key:0,class:"dss-tooltip-section"},ks={class:"dss-tooltip-section-title"},Cs={class:"dss-tooltip-group-header"},xs={class:"dss-tooltip-item-content"},Ms={class:"dss-tooltip-item-text"},ws={key:1,class:"dss-tooltip-section"},bs={class:"dss-tooltip-section-title"},Es={class:"dss-tooltip-item-content"},Bs={class:"dss-tooltip-item-title"},Ss={key:0,class:"dss-tooltip-item-description"},$s={key:2,class:"dss-context-menu-separator"},_s={key:0,class:"dss-context-menu-separator"},Vs={key:0,class:"dss-context-menu-separator"},Ds=["onClick"],Ls=["innerHTML"],zs={key:0,class:"dss-context-menu-icon"},Hs={class:"dss-marker-modal-header"},Ns={class:"dss-marker-modal-body"},As={class:"dss-form-group"},Fs={for:"dss-marker-description"},Xs=["placeholder"],Is={class:"dss-form-group"},Ts={class:"icon-preview"},Ys=["src"],Rs={class:"dss-marker-modal-footer"},Os={class:"modal-footer-left"},Ps={class:"dss-modal-footer-right"},Zs=["disabled"],js={name:"DSSChart"},Us=Object.assign(js,{props:{series:{type:Array,required:!0,default:()=>[]},categories:{type:Array,default:()=>[]},flags:{type:Array,default:()=>[]},markers:{type:Array,default:()=>[]},chartId:{type:String,default:()=>"chart-"+Math.random().toString(36).substring(2,9)},i18n:{type:Object,default:null},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:Q=>typeof Q=="object"&&Q!==null}},emits:["add-marker","update-marker","delete-marker"],setup(Q,{emit:je}){const{t:L,locale:ut}=Gt.useI18n(),Ae=je,p=Q,Qt={chart:{type:"line",width:800,height:400,orientation:"vertical"},title:{text:"",style:{}},subtitle:{text:"",style:{}},xAxis:{title:{text:""},type:"category"},yAxis:{min:"auto",max:"auto",title:{text:""}},legend:{show:!0},radialLabels:{show:!1,pointerLength:25,horizontalLength:35,fontSize:14,color:"#000",textOffset:8},grid:{show:!0,style:{}},watermark:{enabled:!0,opacity:.05,size:"25%",position:"bottom-right"},colors:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"],logos:[],stroke:{width:2,curve:"smooth"},bubbles:{size:4},markers:{show:!0,icon:null,iconSize:25,customIcons:{}},fill:{area:{opacity:.3},spider:{opacity:.15}},crosshair:{show:!1,color:"#666"},bubbles:{size:4,tooltip:{fields:["x","y","size"],labels:{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},formatters:{}}},spider:{gridLabels:null,gridSteps:5},zoom:{enabled:!0,minScale:1,maxScale:2.5},smoothing:{enabled:!1,factor:.3,barRadius:4},animations:{enabled:!0,type:"draw",duration:2500,delay:0,staggerDelay:200,easing:"ease-out",onDataChange:!0,respectReducedMotion:!0},contextMenu:{enabled:!0,items:{addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0},customItems:[]}};function dt(t,o){const a=Object.assign({},t);return Ue(t)&&Ue(o)&&Object.keys(o).forEach(l=>{Ue(o[l])?l in t?a[l]=dt(t[l],o[l]):Object.assign(a,{[l]:o[l]}):Object.assign(a,{[l]:o[l]})}),a}const mt=()=>{let t=20,o=0;if(G.value&&(t+=30),J.value&&(t+=25),Fe.value&&p.series.length>0){const a=p.series.filter((i,r)=>!I.value.has(r)).length,s=Math.floor(K.value/100);o=Math.ceil(a/s)*25+10,t+=o}return{height:t,legendHeight:o}};function Ue(t){return t&&typeof t=="object"&&!Array.isArray(t)}const f=e.computed(()=>dt(Qt,p.options)),K=e.computed(()=>{const t=f.value;return t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),se=e.computed(()=>{const t=f.value;return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),X=e.computed(()=>{const t=f.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),ht=e.computed(()=>{const t=p.series.map(o=>o.type||X.value);return new Set(t).size>1}),G=e.computed(()=>{const t=f.value;return t&&t.title&&t.title.text?t.title.text:""}),J=e.computed(()=>{const t=f.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),We=e.computed(()=>{const t=f.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),vt=e.computed(()=>{const t=f.value;return t&&t.yAxis&&t.yAxis.title&&t.yAxis.title.text?t.yAxis.title.text:""}),Kt=e.computed(()=>{const t=f.value;if(!t||!t.yAxis)return pe;const o=t.yAxis.min;return typeof o=="number"||o===pe?o:pe}),Jt=e.computed(()=>{const t=f.value;if(!t||!t.yAxis)return pe;const o=t.yAxis.max;return typeof o=="number"||o===pe?o:pe}),gt=e.computed(()=>{const t=f.value;return t&&t.grid&&t.grid.show!==!1}),Fe=e.computed(()=>{const t=f.value;return t&&t.legend&&t.legend.show!==!1}),ue=e.computed(()=>{const t=f.value;if(!t||!t.crosshair)return!1;const o=t.crosshair.show;return o===!0||o==="true"}),ea=e.computed(()=>{const t=f.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),Ce=e.computed(()=>{const t=f.value;return t&&t.zoom&&t.zoom.enabled!==!1}),ta=e.computed(()=>{const t=f.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),aa=e.computed(()=>{const t=f.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),de=e.computed(()=>{const t=f.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),te=e.computed(()=>{const t=f.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),pt=e.computed(()=>{const t=f.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),re=e.computed(()=>{const t=f.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),Xe=e.computed(()=>{const t=f.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),ft=e.computed(()=>{const t=f.value;return re.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),oa=e.computed(()=>{const t=f.value,o=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return o.length>0?o:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),$e=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.enabled!==!1}),yt=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),kt=e.computed(()=>{const t=f.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),Ct=e.computed(()=>{const t=f.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),xt=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),me=e.computed(()=>{const t=f.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),la=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.onDataChange!==!1}),sa=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),_e=e.computed(()=>{const t=f.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),na=e.computed(()=>f.value?.spider?.gridSteps||5),qe=e.computed(()=>{const t=[],o=na.value;for(let a=1;a<=o;a++)t.push(F.value/o*a);return t}),ra=t=>{const o=ia.value;if(o&&Array.isArray(o)&&o[t]!==void 0)return o[t].toString();const a=qe.value[t];return Math.round(a/F.value*100)+"%"},ia=e.computed(()=>f.value?.spider?.gridLabels||null);e.computed(()=>{const t=f.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0});const ae=e.computed(()=>{const t=f.value,o={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...o,...t.contextMenu.items}:o}),Ge=e.computed(()=>{const t=f.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),ca=e.computed(()=>{const t=f.value;return t&&t.markers&&t.markers.icon?t.markers.icon:pa.value}),Ie=e.computed(()=>{const t=f.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),xe=e.computed(()=>{const t=f.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),ua=e.computed(()=>!m.value.isZooming);e.computed(()=>O.value.map(t=>{if(t.categoryIndex!==void 0&&(W.value||Z.value)){const o=q(t.categoryIndex),a=c.value.bottom-xe.value/2;return{...t,x:o,y:a}}return t}));function da(t,o){const a=new Date(t);let l=0,s=1/0;return o.forEach((n,i)=>{const[r,u,d]=n.split("-"),h=new Date(`20${d}`,u-1,r),v=Math.abs(h-a);v<s&&(s=v,l=i)}),l}const ma=e.computed(()=>p.markers.map(t=>{const o=da(t.marker_date,p.categories),a=q(o),l=c.value.bottom-xe.value/2;return{...t,x:a,y:l,categoryIndex:o}})),Qe=e.computed(()=>{const t=f.value;return t&&t.watermark&&t.watermark.enabled===!0}),Ke=e.computed(()=>{const t=f.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),ha=e.computed(()=>{const t=f.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:"25%"}),Je=e.computed(()=>{const t=f.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),et=e.computed(()=>{const t={left:c.value.left,top:c.value.top,width:c.value.width,height:c.value.height};let o,a;const l=String(ha.value);if(l.includes("%")){const s=parseFloat(l)/100;o=t.width*s,a=o*(96/499)}else{const s=parseFloat(l)||25;o=Math.min(t.width*.25,200)*(s/25),a=o*(96/499)}return{width:o,height:a,area:t}}),va=e.computed(()=>{const{width:t,height:o}=et.value,a=Je.value;let l,s;const n=c.value.left,i=c.value.right,r=c.value.top,u=c.value.bottom,d=c.value.width,h=c.value.height;switch(a){case"center":l=n+(d-t)/2,s=r+(h-o)/2;break;case"top-left":l=n+15,s=r+90;break;case"top-right":l=i-t-15,s=r+90;break;case"bottom-left":l=n+15,s=u-o+75;break;case"bottom-right":default:l=i-t-15,s=u-o+75;break}return{backgroundPositionX:l+"px",backgroundPositionY:s+"px",backgroundSize:`${t}px ${o}px`}}),ga=t=>!p.flags||!p.flags.length?[]:p.flags.filter(o=>o.categoryIndex===t),he=t=>{const o=ga(t),a=La(t),l=o.filter(i=>i.manual),s=o.filter(i=>!i.manual),n=[];return l.length>0&&n.push({type:L("chart.tooltip.manualFlags"),color:"#047395",flags:l.map(i=>({text:i.text,color:"#047395"}))}),s.length>0&&n.push({type:L("chart.tooltip.autoFlags"),color:"#0dbf89",flags:s.map(i=>({text:i.text,color:"#0dbf89"}))}),{flagGroups:n,markers:a.map(i=>({title:i.title,description:i.description,type:L("chart.tooltip.markers"),color:i.color||"#FF6B6B"}))}},pa=e.computed(()=>`data:image/svg+xml;base64,${btoa(`<svg width="55" height="56" viewBox="0 0 55 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Jt=require("vue-i18n"),Vo=["data-chart-type"],Do={class:"dss-chart-header"},Lo={class:"dss-chart-header-titles"},zo={key:0,class:"dss-chart-title"},Ho={key:1,class:"dss-chart-subtitle"},No={key:0,class:"dss-chart-legend"},Ao=["onClick","onMouseenter"],Fo={class:"dss-legend-text"},Xo=["width","height","data-smooth","data-animated"],Io={id:"chart-clip"},To=["x","y","width","height"],Yo={key:0},Ro={key:0,class:"dss-grid-lines","clip-path":"url(#chart-clip)"},Oo=["x1","x2","y1","y2"],Po={class:"dss-axes"},Zo=["x1","x2","y1","y2"],jo=["x1","x2","y1","y2"],Uo={class:"dss-axis-labels"},Wo=["x","y"],qo=["x","y"],Go=["x","y"],Qo=["y","transform"],Ko={key:1,class:"dss-flag-markers"},Jo={"clip-path":"url(#chart-clip)"},el=["x1","x2","y1","y2","onMouseover"],tl=["x1","x2","y1","y2","onMouseover"],al=["x1","x2","y1","y2","onMouseover"],ol=["cx","cy","onMouseover"],ll=["cx","cy","fill","onMouseover"],sl=["x","y"],nl={class:"dss-chart-data","clip-path":"url(#chart-clip)"},rl={key:0},il={class:"dss-bar-chart"},cl=["d","fill","onMouseover"],ul=["x","y","width","height","fill","onMouseover"],dl={class:"dss-line-chart"},ml=["d","stroke","stroke-width"],hl=["cx","cy","r","fill","onMouseover"],vl={key:1},gl=["d","stroke","stroke-width"],pl=["cx","cy","r","fill","onMouseover"],fl={key:2},yl=["id"],kl=["x","y","width","height"],Cl=["d","fill","fill-opacity","mask"],xl=["d","stroke","stroke-width"],Ml={key:3},wl=["d","fill","onMouseover"],bl=["x","y","width","height","fill","onMouseover"],El={key:2,class:"dss-crosshair","clip-path":"url(#chart-clip)"},Bl=["x1","x2","y1","y2","stroke"],Sl=["cx","cy","r","fill"],$l={key:1,class:"dss-bubble-chart"},_l={key:0,class:"dss-bubble-group"},Vl=["cx","cy","r","fill","fill-opacity","stroke","stroke-width","onMouseenter","onMouseleave","onClick"],Dl=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],Ll={key:2,class:"radial-chart"},zl=["cx","cy","r"],Hl=["data-chart-type"],Nl=["d","fill","fill-opacity","stroke","stroke-width","onMouseover"],Al={key:1,class:"dss-radial-labels"},Fl=["x1","y1","x2","y2","stroke"],Xl=["x1","y1","x2","y2","stroke"],Il=["x","y","text-anchor","font-size"],Tl={key:3,class:"dss-spider-chart"},Yl={key:0,class:"dss-spider-grid"},Rl=["cx","cy","r"],Ol={class:"dss-spider-grid-labels"},Pl=["x","y"],Zl=["x","y"],jl=["x1","x2","y1","y2"],Ul={class:"dss-spider-labels"},Wl=["x","y","text-anchor","dominant-baseline"],ql={class:"dss-spider-data"},Gl=["points","fill","fill-opacity","stroke","stroke-width","onMouseover"],Ql=["cx","cy","r","fill","onMouseover"],Kl={class:"dss-chart-logos"},Jl=["cx","cy","r","fill"],es=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],ts=["onClick"],as=["src"],os={class:"dss-tooltip-section"},ls={class:"dss-tooltip-title"},ss={class:"dss-tooltip-value"},ns={key:0,class:"dss-tooltip-section"},rs={class:"dss-tooltip-section-title"},is={class:"dss-tooltip-group-header"},cs={class:"dss-tooltip-item-content"},us={class:"dss-tooltip-item-text"},ds={key:1,class:"dss-tooltip-section"},ms={class:"dss-tooltip-section-title"},hs={class:"dss-tooltip-item-content"},vs={class:"dss-tooltip-item-title"},gs={key:0,class:"dss-tooltip-item-description"},ps={class:"dss-tooltip-section"},fs={class:"dss-tooltip-title"},ys={key:0,class:"dss-bubble-tooltip-data"},ks={class:"dss-tooltip-series-name"},Cs={class:"dss-tooltip-series-value"},xs={key:0,class:"dss-tooltip-section"},Ms={class:"dss-tooltip-section-title"},ws={class:"dss-tooltip-group-header"},bs={class:"dss-tooltip-item-content"},Es={class:"dss-tooltip-item-text"},Bs={key:1,class:"dss-tooltip-section"},Ss={class:"dss-tooltip-section-title"},$s={class:"dss-tooltip-item-content"},_s={class:"dss-tooltip-item-title"},Vs={key:0,class:"dss-tooltip-item-description"},Ds={key:2,class:"dss-context-menu-separator"},Ls={key:0,class:"dss-context-menu-separator"},zs={key:0,class:"dss-context-menu-separator"},Hs=["onClick"],Ns=["innerHTML"],As={key:0,class:"dss-context-menu-icon"},Fs={class:"dss-marker-modal-header"},Xs={class:"dss-marker-modal-body"},Is={class:"dss-form-group"},Ts={for:"dss-marker-description"},Ys=["placeholder"],Rs={class:"dss-form-group"},Os={class:"icon-preview"},Ps=["src"],Zs={class:"dss-marker-modal-footer"},js={class:"modal-footer-left"},Us={class:"dss-modal-footer-right"},Ws=["disabled"],qs={name:"DSSChart"},Gs=Object.assign(qs,{props:{series:{type:Array,required:!0,default:()=>[]},categories:{type:Array,default:()=>[]},flags:{type:Array,default:()=>[]},markers:{type:Array,default:()=>[]},chartId:{type:String,default:()=>"chart-"+Math.random().toString(36).substring(2,9)},i18n:{type:Object,default:null},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:Q=>typeof Q=="object"&&Q!==null}},emits:["add-marker","update-marker","delete-marker"],setup(Q,{emit:Ue}){const{t:L,locale:ht}=Jt.useI18n(),Ae=Ue,We=e.ref(null),qe=e.ref(null),Fe=e.computed(()=>{if(!We.value||!qe.value)return 0;try{const t=We.value.getBoundingClientRect();return qe.value.getBoundingClientRect().top-t.top}catch{return 0}}),p=Q,ea={chart:{type:"line",width:800,height:400,orientation:"vertical"},title:{text:"",style:{}},subtitle:{text:"",style:{}},xAxis:{title:{text:""},type:"category"},yAxis:{min:"auto",max:"auto",title:{text:""}},legend:{show:!0},radialLabels:{show:!1,pointerLength:25,horizontalLength:35,fontSize:14,color:"#000",textOffset:8},grid:{show:!0,style:{}},watermark:{enabled:!0,opacity:.05,size:"25%",position:"bottom-right"},colors:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"],logos:[],stroke:{width:2,curve:"smooth"},bubbles:{size:4},markers:{show:!0,icon:null,iconSize:25,customIcons:{}},fill:{area:{opacity:.3},spider:{opacity:.15}},crosshair:{show:!1,color:"#666"},bubbles:{size:4,tooltip:{fields:["x","y","size"],labels:{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},formatters:{}}},spider:{gridLabels:null,gridSteps:5},zoom:{enabled:!0,minScale:1,maxScale:2.5},smoothing:{enabled:!1,factor:.3,barRadius:4},animations:{enabled:!0,type:"draw",duration:2500,delay:0,staggerDelay:200,easing:"ease-out",onDataChange:!0,respectReducedMotion:!0},contextMenu:{enabled:!0,items:{addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0},customItems:[]}};function vt(t,o){const a=Object.assign({},t);return Ge(t)&&Ge(o)&&Object.keys(o).forEach(l=>{Ge(o[l])?l in t?a[l]=vt(t[l],o[l]):Object.assign(a,{[l]:o[l]}):Object.assign(a,{[l]:o[l]})}),a}const gt=()=>{let t=20,o=0;if(G.value&&(t+=30),J.value&&(t+=25),Xe.value&&p.series.length>0){const a=p.series.filter((i,r)=>!I.value.has(r)).length,s=Math.floor(K.value/100);o=Math.ceil(a/s)*25+10,t+=o}return{height:t,legendHeight:o}};function Ge(t){return t&&typeof t=="object"&&!Array.isArray(t)}const f=e.computed(()=>vt(ea,p.options)),K=e.computed(()=>{const t=f.value;return t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),se=e.computed(()=>{const t=f.value;return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),X=e.computed(()=>{const t=f.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),pt=e.computed(()=>{const t=p.series.map(o=>o.type||X.value);return new Set(t).size>1}),G=e.computed(()=>{const t=f.value;return t&&t.title&&t.title.text?t.title.text:""}),J=e.computed(()=>{const t=f.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),Qe=e.computed(()=>{const t=f.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),ft=e.computed(()=>{const t=f.value;return t&&t.yAxis&&t.yAxis.title&&t.yAxis.title.text?t.yAxis.title.text:""}),ta=e.computed(()=>{const t=f.value;if(!t||!t.yAxis)return pe;const o=t.yAxis.min;return typeof o=="number"||o===pe?o:pe}),aa=e.computed(()=>{const t=f.value;if(!t||!t.yAxis)return pe;const o=t.yAxis.max;return typeof o=="number"||o===pe?o:pe}),yt=e.computed(()=>{const t=f.value;return t&&t.grid&&t.grid.show!==!1}),Xe=e.computed(()=>{const t=f.value;return t&&t.legend&&t.legend.show!==!1}),ue=e.computed(()=>{const t=f.value;if(!t||!t.crosshair)return!1;const o=t.crosshair.show;return o===!0||o==="true"}),oa=e.computed(()=>{const t=f.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),Ce=e.computed(()=>{const t=f.value;return t&&t.zoom&&t.zoom.enabled!==!1}),la=e.computed(()=>{const t=f.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),sa=e.computed(()=>{const t=f.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),de=e.computed(()=>{const t=f.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),te=e.computed(()=>{const t=f.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),kt=e.computed(()=>{const t=f.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),re=e.computed(()=>{const t=f.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),Ie=e.computed(()=>{const t=f.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),Ct=e.computed(()=>{const t=f.value;return re.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),na=e.computed(()=>{const t=f.value,o=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return o.length>0?o:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),$e=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.enabled!==!1}),xt=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),Mt=e.computed(()=>{const t=f.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),wt=e.computed(()=>{const t=f.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),bt=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),me=e.computed(()=>{const t=f.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),ra=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.onDataChange!==!1}),ia=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),_e=e.computed(()=>{const t=f.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),ca=e.computed(()=>f.value?.spider?.gridSteps||5),Ke=e.computed(()=>{const t=[],o=ca.value;for(let a=1;a<=o;a++)t.push(F.value/o*a);return t}),ua=t=>{const o=da.value;if(o&&Array.isArray(o)&&o[t]!==void 0)return o[t].toString();const a=Ke.value[t];return Math.round(a/F.value*100)+"%"},da=e.computed(()=>f.value?.spider?.gridLabels||null);e.computed(()=>{const t=f.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0});const ae=e.computed(()=>{const t=f.value,o={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...o,...t.contextMenu.items}:o}),Je=e.computed(()=>{const t=f.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),ma=e.computed(()=>{const t=f.value;return t&&t.markers&&t.markers.icon?t.markers.icon:ka.value}),Te=e.computed(()=>{const t=f.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),xe=e.computed(()=>{const t=f.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),ha=e.computed(()=>!m.value.isZooming);e.computed(()=>O.value.map(t=>{if(t.categoryIndex!==void 0&&(W.value||Z.value)){const o=q(t.categoryIndex),a=Fe.value+c.value.bottom-xe.value/2;return{...t,x:o,y:a}}return t}));function va(t,o){const a=new Date(t);let l=0,s=1/0;return o.forEach((n,i)=>{const[r,u,d]=n.split("-"),h=new Date(`20${d}`,u-1,r),v=Math.abs(h-a);v<s&&(s=v,l=i)}),l}const ga=e.computed(()=>p.markers.map(t=>{const o=va(t.marker_date,p.categories),a=q(o),l=Fe.value+c.value.bottom-xe.value/2;return{...t,x:a,y:l,categoryIndex:o}})),et=e.computed(()=>{const t=f.value;return t&&t.watermark&&t.watermark.enabled===!0}),tt=e.computed(()=>{const t=f.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),pa=e.computed(()=>{const t=f.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:"25%"}),at=e.computed(()=>{const t=f.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),ot=e.computed(()=>{const t={left:c.value.left,top:c.value.top,width:c.value.width,height:c.value.height};let o,a;const l=String(pa.value);if(l.includes("%")){const s=parseFloat(l)/100;o=t.width*s,a=o*(96/499)}else{const s=parseFloat(l)||25;o=Math.min(t.width*.25,200)*(s/25),a=o*(96/499)}return{width:o,height:a,area:t}}),fa=e.computed(()=>{const{width:t,height:o}=ot.value,a=at.value;let l,s;const n=c.value.left,i=c.value.right,r=c.value.top,u=c.value.bottom,d=c.value.width,h=c.value.height;switch(a){case"center":l=n+(d-t)/2,s=r+(h-o)/2;break;case"top-left":l=n+15,s=r+90;break;case"top-right":l=i-t-15,s=r+90;break;case"bottom-left":l=n+15,s=u-o+75;break;case"bottom-right":default:l=i-t-15,s=u-o+75;break}return{backgroundPositionX:l+"px",backgroundPositionY:s+"px",backgroundSize:`${t}px ${o}px`}}),ya=t=>!p.flags||!p.flags.length?[]:p.flags.filter(o=>o.categoryIndex===t),he=t=>{const o=ya(t),a=Na(t),l=o.filter(i=>i.manual),s=o.filter(i=>!i.manual),n=[];return l.length>0&&n.push({type:L("chart.tooltip.manualFlags"),color:"#047395",flags:l.map(i=>({text:i.text,color:"#047395"}))}),s.length>0&&n.push({type:L("chart.tooltip.autoFlags"),color:"#0dbf89",flags:s.map(i=>({text:i.text,color:"#0dbf89"}))}),{flagGroups:n,markers:a.map(i=>({title:i.title,description:i.description,type:L("chart.tooltip.markers"),color:i.color||"#FF6B6B"}))}},ka=e.computed(()=>`data:image/svg+xml;base64,${btoa(`<svg width="55" height="56" viewBox="0 0 55 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path d="M55 51.841V4.14647C55 1.86149 53.1797 0.00915527 50.9343 0.00915527L4.06568 0.00915527C1.82027 0.00915527 0 1.86149 0 4.14647V51.841C0 54.126 1.82027 55.9783 4.06568 55.9783H50.9343C53.1797 55.9783 55 54.126 55 51.841Z" fill="#020203"/>
|
|
3
3
|
<path d="M27.7145 10.8883H16.9591C12.7639 10.8883 9.3623 14.3498 9.3623 18.619C9.3623 22.8882 12.7639 26.3497 16.9591 26.3497H27.8036C28.3624 26.3497 28.816 25.8881 28.816 25.3112L28.7188 11.9103C28.7188 11.3416 28.2653 10.8883 27.7064 10.8883H27.7145Z" fill="#FFC230"/>
|
|
4
4
|
<path d="M38.6799 25.649C42.5176 25.649 45.6288 22.483 45.6288 18.5776C45.6288 14.6722 42.5176 11.5063 38.6799 11.5063C34.8421 11.5063 31.731 14.6722 31.731 18.5776C31.731 22.483 34.8421 25.649 38.6799 25.649Z" fill="#fafafa"/>
|
|
5
5
|
<path d="M27.2846 45.1083H38.04C42.2352 45.1083 45.6368 41.6468 45.6368 37.3776C45.6368 33.1084 42.2352 29.6469 38.04 29.6469H27.1955C26.6366 29.6469 26.1831 30.1084 26.1831 30.6854L26.2803 44.0863C26.2803 44.655 26.7338 45.1083 27.2927 45.1083H27.2846Z" fill="#07A9DA"/>
|
|
6
6
|
<path d="M16.3198 44.4813C20.1575 44.4813 23.2687 41.3153 23.2687 37.4099C23.2687 33.5045 20.1575 30.3386 16.3198 30.3386C12.482 30.3386 9.37085 33.5045 9.37085 37.4099C9.37085 41.3153 12.482 44.4813 16.3198 44.4813Z" fill="#fafafa"/>
|
|
7
|
-
</svg>`)}`),
|
|
7
|
+
</svg>`)}`),Et=e.computed(()=>`data:image/svg+xml;base64,${btoa(`<svg width="499" height="96" viewBox="0 0 499 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8
8
|
<path d="M171.52 37.8399H160.38C160.26 36.4799 160.02 35.0599 159.68 33.5699C159.34 32.0799 158.77 30.7399 157.96 29.5299C157.16 28.3199 156 27.3199 154.48 26.5099C152.96 25.7099 150.94 25.2999 148.4 25.2999C144.69 25.2999 141.93 26.1299 140.14 27.8099C138.34 29.4799 137.45 31.5499 137.45 34.0299C137.45 37.7999 139.29 40.0799 142.97 40.8499C146.65 41.6299 150.67 42.3799 155.03 43.1199C159.39 43.8599 163.41 45.3899 167.09 47.7099C170.77 50.0299 172.61 54.6199 172.61 61.4899C172.61 64.6499 172.02 67.5099 170.85 70.0699C169.67 72.6399 168.02 74.7899 165.89 76.5199C163.76 78.2499 161.19 79.5799 158.19 80.5099C155.19 81.4399 151.93 81.8999 148.4 81.8999C143.95 81.8999 140.12 81.2699 136.94 79.9999C133.75 78.7299 131.19 77.0799 129.24 75.0399C127.29 72.9999 125.93 70.6899 125.16 68.1299C124.39 65.5599 124.19 62.9499 124.56 60.2899H136.25C136.37 62.0799 136.58 63.7899 136.85 65.3899C137.13 66.9999 137.68 68.4099 138.52 69.6099C139.35 70.8199 140.58 71.7799 142.19 72.4899C143.8 73.1999 145.99 73.5599 148.78 73.5599C153.3 73.5599 156.47 72.6199 158.29 70.7299C160.11 68.8399 161.03 66.6899 161.03 64.2799C161.03 60.2599 159.19 57.7799 155.51 56.8599C151.83 55.9299 147.79 55.0499 143.4 54.2099C139.01 53.3799 134.97 51.7699 131.29 49.3799C127.61 46.9999 125.77 42.3699 125.77 35.5099C125.77 32.8499 126.3 30.3899 127.35 28.1299C128.4 25.8699 129.9 23.9199 131.85 22.2799C133.8 20.6399 136.16 19.3399 138.95 18.3799C141.73 17.4199 144.8 16.9399 148.14 16.9399C152.41 16.9399 156.07 17.4699 159.14 18.5199C162.2 19.5699 164.69 21.0299 166.61 22.8799C168.53 24.7399 169.89 26.9499 170.69 29.5199C171.49 32.0899 171.77 34.8599 171.52 37.8199V37.8399Z" fill="#020203"/>
|
|
9
9
|
<path d="M179.04 58.1699C179.04 55.0799 179.55 52.0499 180.57 49.0699C181.59 46.0999 183.04 43.4899 184.93 41.2299C186.82 38.9699 189.09 37.1499 191.75 35.7499C194.41 34.3599 197.35 33.6599 200.57 33.6599C207 33.6599 212.15 35.9299 216.02 40.4799C219.89 45.0299 221.97 51.5999 222.28 60.1999H189.34C189.77 64.2199 191.09 67.1499 193.28 68.9699C195.48 70.7999 198.12 71.7099 201.21 71.7099C203 71.7099 204.5 71.4599 205.71 70.9699C206.92 70.4799 207.91 69.8899 208.68 69.2099C209.45 68.5299 210.06 67.8199 210.49 67.0799C210.92 66.3399 211.26 65.7199 211.51 65.2199H221.72C221.6 66.7699 221.1 68.5099 220.24 70.4599C219.37 72.4099 218.14 74.2299 216.53 75.9399C214.92 77.6399 212.85 79.0599 210.31 80.2099C207.77 81.3499 204.77 81.9299 201.31 81.9299C197.85 81.9299 194.91 81.2799 192.12 79.9799C189.34 78.6799 186.98 76.9499 185.07 74.7799C183.15 72.6099 181.67 70.0899 180.61 67.2199C179.56 64.3399 179.03 61.3299 179.03 58.1699H179.04ZM200.94 42.0199C198.47 42.0199 196.24 42.7299 194.26 44.1499C192.28 45.5699 190.89 47.8299 190.08 50.9199H211.33C211.02 48.0799 209.95 45.8799 208.13 44.3299C206.3 42.7899 203.91 42.0099 200.94 42.0099V42.0199Z" fill="#020203"/>
|
|
10
10
|
<path d="M268.59 80.9999H258.01V50.3799C258.01 48.2099 257.3 46.5099 255.88 45.2799C254.46 44.0399 252.6 43.4199 250.31 43.4199C248.45 43.4199 246.94 43.8399 245.76 44.6699C244.58 45.4999 243.67 46.5399 243.02 47.7799C242.37 49.0199 241.94 50.3799 241.72 51.8599C241.5 53.3399 241.4 54.7099 241.4 55.9399V80.9999H230.82V34.5999H241.03V38.3099C241.83 37.6899 243.27 36.7599 245.34 35.5199C247.41 34.2799 250.3 33.6599 254.02 33.6599C256.68 33.6599 259.12 34.1599 261.35 35.1399C263.58 36.1299 265.31 37.6799 266.55 39.7799C267.04 39.2899 267.71 38.6799 268.55 37.9699C269.38 37.2599 270.41 36.5799 271.61 35.9299C272.82 35.2799 274.22 34.7399 275.83 34.3099C277.44 33.8799 279.23 33.6599 281.21 33.6599C285.23 33.6599 288.67 34.8099 291.51 37.0899C294.36 39.3799 295.78 43.0599 295.78 48.1299V80.9799H285.2V50.3599C285.2 48.1899 284.49 46.4899 283.07 45.2599C281.65 44.0199 279.79 43.3999 277.5 43.3999C275.64 43.3999 274.13 43.8199 272.95 44.6499C271.77 45.4799 270.86 46.5199 270.21 47.7599C269.56 48.9999 269.13 50.3599 268.91 51.8399C268.69 53.3199 268.59 54.6899 268.59 55.9199V80.9799V80.9999Z" fill="#020203"/>
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
<path d="M67.37 43.9C74.0582 43.9 79.48 38.4782 79.48 31.79C79.48 25.1018 74.0582 19.68 67.37 19.68C60.6818 19.68 55.26 25.1018 55.26 31.79C55.26 38.4782 60.6818 43.9 67.37 43.9Z" fill="#fafafa"/>
|
|
19
19
|
<path d="M47.5201 77.18H66.2501C73.5601 77.18 79.4801 71.26 79.4801 63.95C79.4801 56.64 73.5601 50.72 66.2501 50.72H47.3601C46.3801 50.72 45.5901 51.52 45.6001 52.5L45.7601 75.44C45.7601 76.41 46.5501 77.19 47.5201 77.19V77.18Z" fill="#07ACDD"/>
|
|
20
20
|
<path d="M28.4201 76.12C35.1082 76.12 40.5301 70.6982 40.5301 64.01C40.5301 57.3218 35.1082 51.9 28.4201 51.9C21.7319 51.9 16.3101 57.3218 16.3101 64.01C16.3101 70.6982 21.7319 76.12 28.4201 76.12Z" fill="#fafafa"/>
|
|
21
|
-
</svg>`)}`),
|
|
22
|
-
`)}})}),
|
|
21
|
+
</svg>`)}`),Bt=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&t.radialLabels.show===!0}),Ca=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&typeof t.radialLabels.fontSize=="number"?t.radialLabels.fontSize:12});e.computed(()=>{const t=f.value;return t&&t.radialLabels&&t.radialLabels.color?t.radialLabels.color:"#000"});const xa=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&typeof t.radialLabels.pointerLength=="number"?t.radialLabels.pointerLength:25}),Ma=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&typeof t.radialLabels.horizontalLength=="number"?t.radialLabels.horizontalLength:40}),wa=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&typeof t.radialLabels.textOffset=="number"?t.radialLabels.textOffset:8}),St=e.computed(()=>{if(!p.flags||!p.flags.length)return[];const t=new Map;return p.flags.forEach(o=>{const a=o.categoryIndex;t.has(a)||t.set(a,[]),t.get(a).push(o)}),Array.from(t.entries()).map(([o,a])=>{const l=q(o),s=a.filter(i=>i.manual),n=a.filter(i=>!i.manual);return{categoryIndex:parseInt(o),x:l,flags:a,manualCount:s.length,autoCount:n.length,totalCount:a.length,hasManual:s.length>0,hasAuto:n.length>0,texts:a.map(i=>i.text).join(`
|
|
22
|
+
`)}})}),lt=e.ref({show:!1,x:0,y:0,content:"",count:0}),ba=e.computed(()=>f.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),Ea=e.computed(()=>{const t=f.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),Ba=e.computed(()=>f.value?.bubbles?.tooltip?.formatters||{}),I=e.ref(new Set),b=e.ref(null),st=e.ref(!1),R=e.ref({show:!1,x:0,y:0,title:"",value:""}),B=e.ref({show:!1,x:0,categoryIndex:-1,data:[]}),N=e.ref({show:!1,x:0,y:0,mouseDataX:0,mouseDataY:0,categoryIndex:-1,chartX:0,chartY:0}),m=e.ref({scale:1,offsetX:0,minScale:1,maxScale:2.5,isDragging:!1,lastMouseX:0,lastMouseY:0,isZooming:!1,zoomTimeout:null}),O=e.ref([]),D=e.ref({show:!1,title:"",description:"",color:"#FF6B6B",type:"default",editingMarkerId:null});e.computed(()=>{const t=["default"];return Te.value&&t.push(...Object.keys(Te.value)),t});const Ve=e.computed(()=>D.value.editingMarkerId!==null),Sa=t=>{I.value.has(t)||(mt.value=!0,b.value=t)},$a=()=>{mt.value=!1,b.value=null},_a=t=>{if(Le.value||Ze.value){B.value.show=!1;return}const a=t.currentTarget.getBoundingClientRect(),l=t.clientX-a.left,s=t.clientY-a.top,n=Z.value?l>=c.value.left-50&&l<=c.value.right+50&&s>=c.value.top-50&&s<=c.value.bottom+100:l>=c.value.left&&l<=c.value.right&&s>=c.value.top&&s<=c.value.bottom;if(st.value=n,Z.value){if(!ue.value||!n||m.value.isDragging||m.value.isZooming){B.value.show=!1;return}if(Oe.value.find(C=>!C||C.isHidden?!1:Math.sqrt(Math.pow(C.x-l,2)+Math.pow(C.y-s,2))<=C.radius+3))B.value.show=!1;else{const C=Oe.value.filter($=>!$||$.isHidden?!1:Math.sqrt(Math.pow($.x-l,2)+Math.pow($.y-s,2))<=250);if(C.length>0){let $=C[0],V=Math.sqrt(Math.pow($.x-l,2)+Math.pow($.y-s,2));C.forEach(y=>{const k=Math.sqrt(Math.pow(y.x-l,2)+Math.pow(y.y-s,2));k<V&&(V=k,$=y)});const g=30,_=Oe.value.filter(y=>!y||y.isHidden?!1:Math.abs(y.x-$.x)<=g).sort((y,k)=>y.y-k.y);B.value={show:!0,x:$.x,categoryIndex:Math.round($.originalX),data:(()=>{const y=ba.value,k=Ea.value,w=[];return _.forEach(x=>{y.forEach(z=>{const A=k[z]||z,le=uo(z,x);le&&w.push({seriesName:x.seriesName,label:x.label,value:`${A}: ${le}`,color:x.color,y:x.y})})}),w})()}}else B.value.show=!1}return}if(m.value.isDragging&&m.value.scale>1&&W.value&&Ce.value){B.value.show=!1;const S=t.clientX-m.value.lastMouseX,{minX:C,maxX:$}=P.value,V=$-C||1,_=S*.8;m.value.offsetX+=_;const y=V/m.value.scale,k=V-y,w=0,x=-k/V*c.value.width,z=w;m.value.offsetX=Math.max(x,Math.min(z,m.value.offsetX)),m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY;return}if(!ue.value||!W.value||m.value.isDragging||m.value.isZooming||!n){B.value.show=!1;return}const{minX:i,maxX:r}=P.value,u=r-i||1,d=u/m.value.scale,h=i-m.value.offsetX/c.value.width*u,v=(l-c.value.left)/c.value.width,E=h+v*d,M=Math.round(E);if(M>=0&&M<=r){const S=q(M),C=ke.value.map(($,V)=>{const g=p.series.findIndex(y=>y===$),_=$.data[M];return{seriesName:$.name,value:_!==void 0?_:null,color:j(g),y:_!==void 0?oe(_):null}}).filter($=>$.value!==null);B.value={show:!0,x:S,categoryIndex:M,data:C}}},Va=()=>{B.value.show=!1,st.value=!1,Ze.value=!1,Le.value||(lt.value.show=!1),m.value.isDragging&&(m.value.isDragging=!1),m.value.zoomTimeout&&(clearTimeout(m.value.zoomTimeout),m.value.zoomTimeout=null),m.value.isZooming=!1,setTimeout(()=>{b.value=null,R.value.show=!1},150)},Da=t=>{if(t.preventDefault(),t.stopPropagation(),be.value)return;const o=t.currentTarget.getBoundingClientRect(),a=t.clientX-o.left,l=t.clientY-o.top,s=Math.max(0,c.value.left-20),n=c.value.right,i=c.value.top,r=c.value.bottom+80;a>=s&&a<=n&&l>=i&&l<=r&&(N.value.show=!1,e.nextTick(()=>{N.value.show=!0,N.value.x=t.clientX,N.value.y=t.clientY,N.value.categoryIndex=null;const u=Math.max(c.value.left,Math.min(a,c.value.right))-c.value.left,h=c.value.width/ut.value.length,v=Math.floor(u/h);v>=0&&v<ut.value.length&&(N.value.categoryIndex=v)}))},ve=t=>{if(!(t&&t.button===2)){if(N.value.show&&t&&t.type==="click"){const o=document.querySelector(".dss-context-menu");if(o&&o.contains(t.target))return}N.value.show=!1}},La=t=>{if(typeof t.template=="function"){const o={series:p.series,categories:p.categories,markers:O.value},a={chartX:N.value.chartX,chartY:N.value.chartY,dataX:N.value.mouseDataX,dataY:N.value.mouseDataY,categoryIndex:N.value.categoryIndex};return t.template(o,a)}return t.template||t.label||""},za=t=>{const o=["dss-context-menu-item"];return t.cssClass&&o.push(t.cssClass),o},Ha=t=>t.style||{},$t=t=>t.type&&Te.value[t.type]?Te.value[t.type]:t.customIcon?t.customIcon:ma.value,Na=t=>O.value.length?O.value.filter(o=>o.categoryIndex===t):[],Aa=t=>{if(!W.value&&!Z.value)return{x:0,y:0};const o=q(t),a=Fe.value+c.value.bottom-xe.value/2;return{x:o,y:a}},_t=()=>{O.value.forEach(t=>{if(t.categoryIndex!==void 0&&(W.value||Z.value)){const o=Aa(t.categoryIndex);t.x=o.x,t.y=o.y}})},Fa=()=>{if(D.value.description&&D.value.description.length){if(Ve.value){const t=O.value.findIndex(o=>o.id===D.value.editingMarkerId);t!==-1?(O.value[t].description=D.value.description||"",O.value[t].color=D.value.color||"",O.value[t].type=D.value.type||"default",Ae("update-marker",O.value[t])):Ae("update-marker",{id:D.value.editingMarkerId,description:D.value.description||"",color:D.value.color||"",type:D.value.type||"default"})}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let o=Math.max(0,N.value.categoryIndex);if(Z.value){const{maxX:i}=P.value;o=Math.max(0,Math.min(o,Math.floor(i)))}else W.value&&(o=Math.max(0,Math.min(o,P.value.maxX)));const a=q(o),l=Fe.value+c.value.bottom-xe.value/2,s=Array.isArray(p.categories)?p.categories[o]:null,n={id:t,title:"",description:D.value.description||"",color:D.value.color||"",type:D.value.type||"default",categoryIndex:o,x:a,y:l,marker_date:s||null};Ae("add-marker",n)}Me(),Vt()}},Me=()=>{D.value.show=!1,D.value.title="",D.value.description="",D.value.color="#FF6B6B",D.value.type="default",D.value.editingMarkerId=null},Xa=()=>{Ve.value&&(Ia(D.value.editingMarkerId),Me())},Ia=t=>{const o=O.value.findIndex(a=>a.id===t);o!==-1&&(O.value.splice(o,1),Vt()),Ae("delete-marker",t)},Ta=t=>{D.value.show=!0,D.value.title=t?.title??t?.comment??"",D.value.description=t?.description??t?.comment??"",D.value.color=t?.color??"",D.value.type=t?.type??"default",D.value.editingMarkerId=t?.id??t?.marker_id??null},Ya=()=>{O.value=[],Oa(),ve()},Vt=()=>{try{const t=`dss-chart-markers-${p.chartId}`;localStorage.setItem(t,JSON.stringify(O.value))}catch(t){console.warn("Could not save markers to localStorage:",t)}},Ra=()=>{try{const t=`dss-chart-markers-${p.chartId}`,o=localStorage.getItem(t);if(o){const a=JSON.parse(o);Array.isArray(a)&&(O.value=a.map(l=>({...l,originalYOffset:l.originalYOffset!==void 0?l.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),O.value=[]}},Oa=()=>{try{const t=`dss-chart-markers-${p.chartId}`;localStorage.removeItem(t)}catch(t){console.warn("Could not clear markers from localStorage:",t)}},Ye=t=>{const o=G.value||"Chart",a=new Date().toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).replace(/\//g,"-");return`${o.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50).replace(/^-|-$/g,"")||"Chart"}-${a}.${t}`},Dt=()=>{const t=B.value.show,o=R.value.show;return B.value.show=!1,R.value.show=!1,{originalCrosshair:t,originalTooltip:o}},fe=t=>{B.value.show=t.originalCrosshair,R.value.show=t.originalTooltip},Pa=async(t,o=32,a=32)=>new Promise((l,s)=>{if(t.startsWith("data:")){l(t);return}const n=new Image;n.crossOrigin="anonymous";const i=setTimeout(()=>{console.warn("Image conversion timeout for:",t),l(t)},5e3);n.onload=()=>{clearTimeout(i);try{const r=document.createElement("canvas"),u=r.getContext("2d");r.width=o,r.height=a,u.fillStyle="#fafafa",u.fillRect(0,0,o,a),u.drawImage(n,0,0,o,a);const d=r.toDataURL("image/png");l(d)}catch(r){console.warn("Canvas conversion failed:",r),l(t)}},n.onerror=r=>{clearTimeout(i),console.warn("Failed to load image:",t,r),l(t)},n.src=t}),Za=async()=>{try{const t=Dt();setTimeout(async()=>{try{const o=document.querySelector(".dss-chart-svg");if(!o){console.error("Chart SVG element not found"),fe(t);return}const a=gt(),l=K.value,s=se.value+a.height,n=o.cloneNode(!0);n.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text").forEach(g=>g.remove());const r=n.querySelectorAll("image"),u=Array.from(r).map(async g=>{const _=g.getAttribute("xlink:href")||g.getAttribute("href");if(_&&!_.startsWith("data:"))try{const y=await Pa(_,32,32);g.setAttribute("xlink:href",y),g.setAttribute("href",y)}catch(y){console.warn("Failed to convert logo to base64:",y)}});await Promise.all(u);const h=new XMLSerializer().serializeToString(n).replace(/<svg[^>]*>/,"").replace("</svg>","");let v="",E=30;if(G.value&&(v+=`
|
|
23
23
|
<text x="24" y="${E}"
|
|
24
24
|
font-family="Arial, sans-serif"
|
|
25
25
|
font-size="18"
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
font-size="14"
|
|
33
33
|
fill="#666">
|
|
34
34
|
${J.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}
|
|
35
|
-
</text>`,E+=25),
|
|
36
|
-
<g opacity="${
|
|
35
|
+
</text>`,E+=25),Xe.value&&p.series.length>0){let g=l-200,_=G.value||J.value?35:25;const y=Math.floor((l-250)/120);let k=0;p.series.forEach((w,x)=>{if(!I.value.has(x)){const z=j(x),A=w.name.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");v+=`<circle cx="${g+6}" cy="${_-4}" r="6" fill="${z}"/>`,v+=`<text x="${g+18}" y="${_}" font-family="Arial, sans-serif" font-size="12" fill="#333">${A}</text>`,k++,k%y===0?(g=l-200,_+=20):g+=Math.min(120,A.length*8+35)}})}let M="";if(et.value)try{const{width:g,height:_}=ot.value,y=at.value,k=c.value.left,w=c.value.right,x=c.value.top,z=c.value.bottom,A=c.value.width,le=c.value.height;let U,ne;switch(y){case"center":U=k+(A-g)/2,ne=x+(le-_)/2;break;case"top-left":U=k+15,ne=x+5;break;case"top-right":U=w-g-5,ne=x+5;break;case"bottom-left":U=k+15,ne=z-_-5;break;case"bottom-right":default:U=w-g-5,ne=z-_-5;break}M=`
|
|
36
|
+
<g opacity="${tt.value}">
|
|
37
37
|
<g transform="translate(${U}, ${ne}) scale(${g/499})">
|
|
38
38
|
<path d="M171.52 37.8399H160.38C160.26 36.4799 160.02 35.0599 159.68 33.5699C159.34 32.0799 158.77 30.7399 157.96 29.5299C157.16 28.3199 156 27.3199 154.48 26.5099C152.96 25.7099 150.94 25.2999 148.4 25.2999C144.69 25.2999 141.93 26.1299 140.14 27.8099C138.34 29.4799 137.45 31.5499 137.45 34.0299C137.45 37.7999 139.29 40.0799 142.97 40.8499C146.65 41.6299 150.67 42.3799 155.03 43.1199C159.39 43.8599 163.41 45.3899 167.09 47.7099C170.77 50.0299 172.61 54.6199 172.61 61.4899C172.61 64.6499 172.02 67.5099 170.85 70.0699C169.67 72.6399 168.02 74.7899 165.89 76.5199C163.76 78.2499 161.19 79.5799 158.19 80.5099C155.19 81.4399 151.93 81.8999 148.4 81.8999C143.95 81.8999 140.12 81.2699 136.94 79.9999C133.75 78.7299 131.19 77.0799 129.24 75.0399C127.29 72.9999 125.93 70.6899 125.16 68.1299C124.39 65.5599 124.19 62.9499 124.56 60.2899H136.25C136.37 62.0799 136.58 63.7899 136.85 65.3899C137.13 66.9999 137.68 68.4099 138.52 69.6099C139.35 70.8199 140.58 71.7799 142.19 72.4899C143.8 73.1999 145.99 73.5599 148.78 73.5599C153.3 73.5599 156.47 72.6199 158.29 70.7299C160.11 68.8399 161.03 66.6899 161.03 64.2799C161.03 60.2599 159.19 57.7799 155.51 56.8599C151.83 55.9299 147.79 55.0499 143.4 54.2099C139.01 53.3799 134.97 51.7699 131.29 49.3799C127.61 46.9999 125.77 42.3699 125.77 35.5099C125.77 32.8499 126.3 30.3899 127.35 28.1299C128.4 25.8699 129.9 23.9199 131.85 22.2799C133.8 20.6399 136.16 19.3399 138.95 18.3799C141.73 17.4199 144.8 16.9399 148.14 16.9399C152.41 16.9399 156.07 17.4699 159.14 18.5199C162.2 19.5699 164.69 21.0299 166.61 22.8799C168.53 24.7399 169.89 26.9499 170.69 29.5199C171.49 32.0899 171.77 34.8599 171.52 37.8199V37.8399Z" fill="#020203"/>
|
|
39
39
|
<path d="M179.04 58.1699C179.04 55.0799 179.55 52.0499 180.57 49.0699C181.59 46.0999 183.04 43.4899 184.93 41.2299C186.82 38.9699 189.09 37.1499 191.75 35.7499C194.41 34.3599 197.35 33.6599 200.57 33.6599C207 33.6599 212.15 35.9299 216.02 40.4799C219.89 45.0299 221.97 51.5999 222.28 60.1999H189.34C189.77 64.2199 191.09 67.1499 193.28 68.9699C195.48 70.7999 198.12 71.7099 201.21 71.7099C203 71.7099 204.5 71.4599 205.71 70.9699C206.92 70.4799 207.91 69.8899 208.68 69.2099C209.45 68.5299 210.06 67.8199 210.49 67.0799C210.92 66.3399 211.26 65.7199 211.51 65.2199H221.72C221.6 66.7699 221.1 68.5099 220.24 70.4599C219.37 72.4099 218.14 74.2299 216.53 75.9399C214.92 77.6399 212.85 79.0599 210.31 80.2099C207.77 81.3499 204.77 81.9299 201.31 81.9299C197.85 81.9299 194.91 81.2799 192.12 79.9799C189.34 78.6799 186.98 76.9499 185.07 74.7799C183.15 72.6099 181.67 70.0899 180.61 67.2199C179.56 64.3399 179.03 61.3299 179.03 58.1699H179.04ZM200.94 42.0199C198.47 42.0199 196.24 42.7299 194.26 44.1499C192.28 45.5699 190.89 47.8299 190.08 50.9199H211.33C211.02 48.0799 209.95 45.8799 208.13 44.3299C206.3 42.7899 203.91 42.0099 200.94 42.0099V42.0199Z" fill="#020203"/>
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
${h}
|
|
67
67
|
${M}
|
|
68
68
|
</g>
|
|
69
|
-
</svg>`,C=new Blob([S],{type:"image/svg+xml;charset=utf-8"}),$=URL.createObjectURL(C),V=document.createElement("a");V.href=$,V.download=
|
|
69
|
+
</svg>`,C=new Blob([S],{type:"image/svg+xml;charset=utf-8"}),$=URL.createObjectURL(C),V=document.createElement("a");V.href=$,V.download=Ye("svg"),document.body.appendChild(V),V.click(),document.body.removeChild(V),URL.revokeObjectURL($),fe(t),ve()}catch(o){console.error("Error downloading SVG:",o),fe(t)}},50)}catch(t){console.error("Error downloading SVG:",t)}},ja=async()=>{try{const t=Dt();document.querySelector(".dss-custom-chart-container").offsetHeight,await new Promise(g=>setTimeout(g,300));const o=gt(),a=K.value,l=se.value+o.height,s=document.createElement("canvas"),n=s.getContext("2d"),i=2;s.width=a*i,s.height=l*i,s.style.width=a+"px",s.style.height=l+"px",n.scale(i,i),n.fillStyle="#fafafa",n.fillRect(0,0,a,l);let r=30;if(G.value&&(n.fillStyle="#333",n.font="bold 18px Arial, sans-serif",n.fillText(G.value,24,r),r+=30),J.value&&(n.fillStyle="#666",n.font="14px Arial, sans-serif",n.fillText(J.value,24,r),r+=25),Xe.value&&p.series.length>0){let g=a-200,_=G.value||J.value?35:25;const y=Math.floor((a-250)/120);let k=0;n.font="12px Arial, sans-serif",p.series.forEach((w,x)=>{if(!I.value.has(x)){const z=j(x);n.beginPath(),n.arc(g+6,_-4,6,0,2*Math.PI),n.fillStyle=z,n.fill(),n.fillStyle="#333",n.fillText(w.name,g+18,_),k++,k%y===0?(g=a-200,_+=20):g+=Math.min(120,w.name.length*8+35)}})}const d=document.querySelector(".dss-chart-svg").cloneNode(!0),h=d.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text"),v=d.querySelectorAll(".dss-crosshair"),E=d.querySelectorAll('[class*="tooltip"]');h.forEach(g=>g.remove()),v.forEach(g=>g.remove()),E.forEach(g=>g.remove()),d.querySelectorAll("image").forEach((g,_)=>{const y=g.getAttribute("xlink:href")||g.getAttribute("href");if(y&&!y.startsWith("data:")){const k=Pe.value[_],w=k?j(k.seriesIndex):"#3B82F6",x=g.getAttribute("x")||0,z=g.getAttribute("y")||0,A=g.getAttribute("width")||32,le=g.getAttribute("height")||32,U=document.createElementNS("http://www.w3.org/2000/svg","circle");U.setAttribute("cx",parseFloat(x)+parseFloat(A)/2),U.setAttribute("cy",parseFloat(z)+parseFloat(le)/2),U.setAttribute("r",Math.min(parseFloat(A),parseFloat(le))/2-1),U.setAttribute("fill",w),U.setAttribute("stroke","#fafafa"),U.setAttribute("stroke-width","2"),g.parentNode.replaceChild(U,g)}});const S=new XMLSerializer().serializeToString(d),C=new Blob([S],{type:"image/svg+xml;charset=utf-8"}),$=URL.createObjectURL(C),V=new Image;return new Promise((g,_)=>{V.onload=async()=>{try{if(n.drawImage(V,0,o.height),Pe.value.forEach(y=>{const k=y.x,w=y.y+o.height,x=(y.width||32)/2,z=j(y.seriesIndex);n.save(),n.beginPath(),n.arc(k,w,x-1,0,2*Math.PI),n.fillStyle=z,n.fill(),n.strokeStyle="#fafafa",n.lineWidth=2,n.stroke(),n.restore()}),et.value){const y=new Image,k=()=>{const{width:x,height:z}=ot.value,A=at.value,le=c.value.left,U=c.value.right,ne=c.value.top,Kt=c.value.bottom,$o=c.value.width,_o=c.value.height;let Be,Se;switch(A){case"center":Be=le+($o-x)/2,Se=ne+o.height+(_o-z)/2;break;case"top-left":Be=le+15,Se=ne+o.height+10;break;case"top-right":Be=U-x-5,Se=ne+o.height+10;break;case"bottom-left":Be=le+15,Se=Kt+o.height-z-5;break;case"bottom-right":default:Be=U-x-5,Se=Kt+o.height-z-5;break}n.globalAlpha=tt.value,n.drawImage(y,Be,Se,x,z),n.globalAlpha=1,w()},w=()=>{s.toBlob(x=>{const z=URL.createObjectURL(x),A=document.createElement("a");A.href=z,A.download=Ye("png"),document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(z),URL.revokeObjectURL($),fe(t),ve(),g()},"image/png")};y.onload=k,y.onerror=w,y.src=Et.value}else s.toBlob(y=>{const k=URL.createObjectURL(y),w=document.createElement("a");w.href=k,w.download=Ye("png"),document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(k),URL.revokeObjectURL($),fe(t),ve(),g()},"image/png")}catch(y){URL.revokeObjectURL($),fe(t),_(y)}},V.onerror=()=>{URL.revokeObjectURL($),fe(t),_(new Error("Failed to load SVG image"))},V.src=$})}catch(t){console.error("Error downloading PNG:",t)}},Ua=()=>{try{let t="";G.value&&(t+=`# ${L("chart.csv.chartTitle")}: ${G.value}
|
|
70
70
|
`),J.value&&(t+=`# ${L("chart.csv.chartSubtitle")}: ${J.value}
|
|
71
71
|
`),t+=`# ${L("chart.csv.generated")}: ${new Date().toLocaleString()}
|
|
72
72
|
|
|
73
73
|
`,t+="Category",p.series.forEach(n=>{const i=n.name.replace(/"/g,'""');t+=',"'+i+'"'}),t+=`
|
|
74
74
|
`;const o=Math.max(...p.series.map(n=>n.data?.length||0));for(let n=0;n<o;n++){let u='"'+(p.categories[n]||L("chart.fallback.item",{number:n+1})).toString().replace(/"/g,'""')+'"';p.series.forEach(d=>{const h=d.data&&d.data[n]!==void 0?d.data[n]:"";u+=","+h}),t+=u+`
|
|
75
|
-
`}const a=new Blob([t],{type:"text/csv;charset=utf-8;"}),l=URL.createObjectURL(a),s=document.createElement("a");s.href=l,s.download=Te("csv"),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(l),ve()}catch(t){console.error("Error downloading CSV:",t)}},Za=t=>{if(typeof t.action=="function"){const o={series:p.series,categories:p.categories,markers:O.value},a={chartX:N.value.chartX,chartY:N.value.chartY,dataX:N.value.mouseDataX,dataY:N.value.mouseDataY,categoryIndex:clampedCategoryIndex||N.value.categoryIndex};t.action(o,a)}ve()},ja=()=>{Me(),D.value.show=!0,ve()},_t=t=>{if(N.value.show){const o=document.querySelector(".dss-context-menu");o&&!o.contains(t.target)&&(N.value.show=!1)}},ot=t=>{N.value.show&&!t.target.closest(".context-menu")&&(N.value.show=!1)},Vt=t=>{if(!W.value||!Ce.value)return;t.preventDefault(),t.stopPropagation(),m.value.isZooming=!0,B.value.show=!1,m.value.zoomTimeout&&clearTimeout(m.value.zoomTimeout);const a=t.currentTarget.getBoundingClientRect(),l=t.clientX-a.left,s=t.clientY-a.top;if(l<c.value.left-50||l>c.value.right+50||s<c.value.top-50||s>c.value.bottom+100){m.value.isZooming=!1;return}const n=t.deltaY>0?.9:1.1,i=Math.max(m.value.minScale,Math.min(m.value.maxScale,m.value.scale*n));if(i!==m.value.scale){const{minX:r,maxX:u}=P.value,d=u-r||1,h=d/m.value.scale,v=r-m.value.offsetX/c.value.width*d,E=(l-c.value.left)/c.value.width,M=v+E*h;m.value.scale=i;const S=d/m.value.scale,C=M-E*S;m.value.offsetX=-(C-r)/d*c.value.width,m.value.scale<=1.01&&(m.value.scale=1,m.value.offsetX=0)}m.value.zoomTimeout=setTimeout(()=>{m.value.isZooming=!1,m.value.zoomTimeout=null},300)},Ua=t=>{if(!W.value||!Ce.value||m.value.scale<=1)return;B.value.show=!1;const a=t.currentTarget.getBoundingClientRect();t.clientX-a.left,t.clientY-a.top,m.value.isDragging=!0,m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY,t.preventDefault()},Wa=()=>{m.value.isDragging=!1},lt=()=>{!W.value||!Ce.value||(m.value.scale=1,m.value.offsetX=0,m.value.isDragging=!1,m.value.zoomTimeout&&(clearTimeout(m.value.zoomTimeout),m.value.zoomTimeout=null),m.value.isZooming=!1)},qa=()=>!W.value||!at.value||!Ce.value?"default":m.value.isDragging?"grabbing":m.value.scale>1?"grab":"dss-crosshair",st=t=>{if(t.length<2)return"";if(t.length===2)return`M ${t[0].x} ${t[0].y} L ${t[1].x} ${t[1].y}`;let o=`M ${t[0].x} ${t[0].y}`;for(let a=0;a<t.length-1;a++){const l=t[Math.max(a-1,0)],s=t[a],n=t[a+1],i=t[Math.min(a+2,t.length-1)],r=s.x+(n.x-l.x)/6*Xe.value,u=s.y+(n.y-l.y)/6*Xe.value,d=n.x-(i.x-s.x)/6*Xe.value,h=n.y-(i.y-s.y)/6*Xe.value;o+=` C ${r} ${u} ${d} ${h} ${n.x} ${n.y}`}return o},ge=e.computed(()=>{let o=50+(We.value?30:0)+60;if(Ee.value)return{left:90,top:90,right:90,bottom:90};let a=0;return G.value&&(a+=15),J.value&&(a+=10),{left:66,top:50+a,right:50,bottom:o}}),c=e.computed(()=>({left:ge.value.left,top:ge.value.top,right:K.value-ge.value.right,bottom:se.value-ge.value.bottom,width:K.value-(ge.value.left+ge.value.right),height:se.value-(ge.value.top+ge.value.bottom)})),W=e.computed(()=>["line","area","bar"].includes(X.value)||ht.value),we=e.computed(()=>ht.value),be=e.computed(()=>["radial","semi-radial"].includes(X.value)),Ee=e.computed(()=>X.value==="spider"),Z=e.computed(()=>X.value==="bubble"),Ye=e.computed(()=>f.value?.chart?.orientation==="horizontal"&&(X.value==="bar"||we.value)),Dt=t=>{const{minY:o,maxY:a}=P.value,l=a-o||1;return c.value.left+(t-o)/l*c.value.width},Lt=t=>{const{maxX:o}=P.value,a=o+1,s=c.value.height/a;return c.value.top+(t+.5)*s},T=e.computed(()=>K.value/2),Y=e.computed(()=>Ee.value?se.value/2-40:se.value/2),F=e.computed(()=>{if(Ee.value){const t=c.value.width-80,o=c.value.height-80;return Math.min(t,o)/2}return Math.min(c.value.width,c.value.height)/2}),ee=e.computed(()=>F.value*.45),nt=e.computed(()=>f.value?.bubbles?.minSize||8),zt=e.computed(()=>f.value?.bubbles?.maxSize||50),Ht=e.computed(()=>f.value?.bubbles?.opacity||.7),Nt=(t,o)=>{const a=[15,20,25,18,22],l=a[t%a.length]||20,s=1+Math.sin(o*.5)*.2;return Math.max(5,l*s)},Ga=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.opacity="1")},Qa=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.display="none")},ye=e.computed(()=>p.series),ke=e.computed(()=>p.series.filter((t,o)=>!I.value.has(o))),pe="auto",P=e.computed(()=>{if(Z.value)return Ka();if(!ke.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=1/0,o=-1/0,a=0;ke.value.forEach(r=>{r.data&&r.data.length&&(a=Math.max(a,r.data.length-1),r.data.forEach(u=>{typeof u=="number"&&(t=Math.min(t,u),o=Math.max(o,u))}))}),p.categories.length>0&&(a=Math.max(a,p.categories.length-1)),t===1/0&&(t=0,o=100);const l=Kt.value,s=Jt.value;let n,i;if(l===pe){const r=o-t,u=r>0?r*.1:1;n=Math.max(0,t-u)}else if(typeof l=="number")n=l;else{const r=o-t,u=r>0?r*.1:1;n=Math.max(0,t-u)}if(s===pe){const r=o-t,u=r>0?r*.1:2;i=o+u}else if(typeof s=="number")i=s;else{const r=o-t,u=r>0?r*.1:2;i=o+u}return{minX:0,maxX:a,minY:n,maxY:i}}),Ka=()=>{if(!ke.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,o=-1/0,a=1/0,l=-1/0,s=1/0,n=-1/0,i=!1;if(ke.value.forEach((d,h)=>{d?.data?.length&&d.data.forEach((v,E)=>{let M,S,C;if(typeof v=="object"&&v!==null&&!Array.isArray(v))M=typeof v.x=="number"?v.x:E,S=typeof v.y=="number"?v.y:0,C=typeof v.size=="number"?v.size:20;else if(Array.isArray(v)&&v.length>=3)M=typeof v[0]=="number"?v[0]:E,S=typeof v[1]=="number"?v[1]:0,C=typeof v[2]=="number"?v[2]:20;else if(typeof v=="number")M=E,S=v,C=Nt(h,E);else return;isFinite(M)&&isFinite(S)&&isFinite(C)&&(t=Math.min(t,M),o=Math.max(o,M),a=Math.min(a,S),l=Math.max(l,S),s=Math.min(s,C),n=Math.max(n,C),i=!0)})}),!i)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===o&&(t=Math.min(t,0),o=Math.max(o,p.categories?.length-1||8)),a===l&&(a=Math.max(0,a-10),l=a+20);const r=o-t,u=l-a;return{minX:t-r*.1,maxX:o+r*.1,minY:a-u*.1,maxY:l+u*.1,minSize:s,maxSize:n}},q=t=>{if(Z.value){const{minX:r,maxX:u}=P.value,d=u-r||1;return c.value.left+(t-r)/d*c.value.width}const{minX:o,maxX:a}=P.value,l=a-o||1,s=l/m.value.scale,n=o-m.value.offsetX/c.value.width*l,i=(t-n)/s;return c.value.left+i*c.value.width},oe=t=>{const{minY:o,maxY:a}=P.value,l=a-o||1;return c.value.bottom-(t-o)/l*c.value.height},Ja=t=>{if(!Z.value)return te.value||4;const{minSize:o,maxSize:a}=P.value,l=a-o||1;if(l===0)return(nt.value+zt.value)/2;const s=(t-o)/l;return nt.value+s*(zt.value-nt.value)},eo=e.computed(()=>At.value.map(t=>({y:t.y}))),rt=e.computed(()=>{if(Z.value)return to();if(X.value==="bar"){const S=[],{maxX:C}=P.value,$=C+1,V=5,_=(c.value.width-V*2)/$;for(let y=0;y<=C;y++){const k=c.value.left+V+(y+.5)*_;S.push({x:k,y:c.value.bottom+20,text:p.categories[y]||L("chart.fallback.item",{number:y+1})})}return S}const t=[],{minX:o,maxX:a}=P.value,l=a-o||1,s=l/m.value.scale,n=o-m.value.offsetX/c.value.width*l,i=n+s,r=Math.max(0,Math.floor(n-2)),u=Math.min(a,Math.ceil(i+2)),d=u-r,h=c.value.width,E=Math.floor(h/60);let M=1;d>E&&(M=Math.ceil(d/E));for(let S=r;S<=u;S+=M)if(S>=0&&S<=a){const C=q(S);C>=c.value.left-100&&C<=c.value.right+100&&t.push({x:C,y:c.value.bottom+20,text:p.categories[S]||`Item ${S+1}`})}return t}),to=()=>{const t=[],{minX:o,maxX:a}=P.value,l=a-o||1,s=Math.min(8,Math.max(4,Math.floor(c.value.width/80)));for(let n=0;n<=s;n++){const i=o+l*n/s,r=q(i);if(r>=c.value.left-10&&r<=c.value.right+10){const u=Math.round(i),d=p.categories?.[u];t.push({x:r,y:c.value.bottom+20,text:d||(Number.isInteger(i)?i.toString():i.toFixed(1))})}}return t},At=e.computed(()=>{if(Ye.value){const s=[],{maxX:n}=P.value;for(let i=0;i<=n;i++)s.push({x:c.value.left-10,y:Lt(i),text:p.categories[i]||`Item ${i+1}`});return s}const t=[],{minY:o,maxY:a}=P.value,l=5;for(let s=0;s<=l;s++){const n=o+(a-o)*(s/l),i=Math.round(n);t.push({x:c.value.left-10,y:oe(n),text:i.toString()})}return t}),j=t=>{const o=oa.value;if(!o||o.length===0){const a=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return a[t%a.length]}return o[t%o.length]},Ft=t=>{let o=0;for(let a=1;a<t.length;a++){const l=t[a].x-t[a-1].x,s=t[a].y-t[a-1].y;o+=Math.sqrt(l*l+s*s)}return o},Xt=e.computed(()=>X.value==="line"||we.value?(we.value?p.series.filter(o=>(o.type||X.value)==="line"):ye.value).map((o,a)=>{const l=p.series.findIndex(h=>h===o),s=o.data.map((h,v)=>typeof h!="number"?null:{x:Ye.value?Dt(h):q(v),y:Ye.value?Lt(v):oe(h)}).filter(Boolean);let n="";s.length>0&&(re.value?n=st(s):n=`M ${s[0].x} ${s[0].y}`+s.slice(1).map(h=>` L ${h.x} ${h.y}`).join(""));const i=Ft(s),r=I.value.has(l),u=b.value===l,d=b.value!==null&&b.value!==l;return{path:n,color:j(l),pathLength:i,seriesIndex:l,animationDelay:a*me.value,isHighlighted:u,isDimmed:d,isHidden:r}}):[]),ao=e.computed(()=>{if(X.value!=="line")return[];const t=[];return ye.value.forEach((o,a)=>{const l=b.value===a,s=b.value!==null&&b.value!==a,n=I.value.has(a);o.data.forEach((i,r)=>{typeof i=="number"&&t.push({x:q(r),y:oe(i),color:j(a),value:i,label:p.categories[r]||r.toString(),seriesName:o.name,categoryIndex:r,dataIndex:r,animationDelay:(a*o.data.length+r)*(me.value/8),isHighlighted:l,isDimmed:s,isHidden:n})})}),t}),Re=e.computed(()=>{if(!Z.value)return[];const t=[];return ye.value.forEach((o,a)=>{if(!o?.data?.length)return;const l=b.value,s=l!==null&&l===a,n=l!==null&&l!==a,i=I.value.has(a);o.data.forEach((r,u)=>{let d,h,v,E,M;if(typeof r=="object"&&r!==null&&!Array.isArray(r))d=typeof r.x=="number"?r.x:u,h=typeof r.y=="number"?r.y:0,v=typeof r.size=="number"?r.size:20,E=r.label||p.categories?.[u]||`Point ${u+1}`,M=r.image||r.imageUrl;else if(Array.isArray(r)&&r.length>=3)d=typeof r[0]=="number"?r[0]:u,h=typeof r[1]=="number"?r[1]:0,v=typeof r[2]=="number"?r[2]:20,E=r[3]||p.categories?.[u]||`Point ${u+1}`,M=r[4];else if(typeof r=="number")d=u,h=r,v=Nt(a,u),E=p.categories?.[u]||`Point ${u+1}`;else return;!isFinite(d)||!isFinite(h)||!isFinite(v)||t.push({x:q(d),y:oe(h),radius:Ja(v),originalX:d,originalY:h,originalSize:v,color:j(a),seriesName:o.name||`Series ${a+1}`,label:E,imageUrl:M,seriesIndex:a,dataIndex:u,categoryIndex:Math.round(d),isHighlighted:s,isDimmed:n,isHidden:i,opacity:Ht.value})})}),t}),it=e.computed(()=>X.value!=="area"?[]:ye.value.map((t,o)=>{const a=t.data.map((h,v)=>({x:q(v),y:oe(h)}));if(a.length===0)return{linePath:"",areaPath:"",color:j(o),isHidden:I.value.has(o)};let l=`M ${a[0].x} ${a[0].y}`;re.value&&a.length>1?l=st(a):a.slice(1).forEach(h=>{l+=` L ${h.x} ${h.y}`});const s=c.value.bottom+1;let n=`M ${a[0].x} ${s}`;if(n+=` L ${a[0].x} ${a[0].y}`,re.value&&a.length>1){const h=st(a),v=h.substring(h.indexOf("C")||h.indexOf("Q")||h.indexOf("L"));v?n+=" "+v:a.slice(1).forEach(E=>{n+=` L ${E.x} ${E.y}`})}else a.slice(1).forEach(h=>{n+=` L ${h.x} ${h.y}`});n+=` L ${a[a.length-1].x} ${s} Z`;const i=b.value===o,r=b.value!==null&&b.value!==o,u=I.value.has(o),d=Ft(a);return{linePath:l,areaPath:n,color:j(o),pathLength:d,isHighlighted:i,isDimmed:r,isHidden:u}})),It=e.computed(()=>{if(!(["bar"].includes(X.value)||we.value))return[];const t=[],{maxX:o}=P.value,a=we.value?p.series.filter(s=>(s.type||X.value)==="bar"):ye.value,l=a.length;if(Ye.value){const s=o+1,i=c.value.height/s,r=i*.8,u=r/l,d=u*.05,h=u-d;a.forEach((v,E)=>{const M=p.series.findIndex(V=>V===v),S=b.value===M,C=b.value!==null&&b.value!==M,$=I.value.has(M);v.data.forEach((V,g)=>{const k=c.value.top+(g+.5)*i-r/2+E*u+d/2,w=c.value.left,x=Math.abs(Dt(V)-c.value.left);let z="";if(re.value&&x>0){const A=Math.min(ft.value,h/2,x/2);z=[`M ${w} ${k}`,`L ${w+x-A} ${k}`,`Q ${w+x} ${k} ${w+x} ${k+A}`,`L ${w+x} ${k+h-A}`,`Q ${w+x} ${k+h} ${w+x-A} ${k+h}`,`L ${w} ${k+h}`,"Z"].join(" ")}t.push({x:w,y:k,width:x,height:h,color:j(M),value:V,label:p.categories[g]||g.toString(),seriesName:v.name,animationDelay:(E*a.length+g)*(me.value/4),isHighlighted:S,isDimmed:C,isHidden:$,barPath:z,isSmooth:re.value&&x>0})})})}else{const s=o+1,i=c.value.width/s,r=i*.8,u=r/l,d=u*.05,h=u-d;a.forEach((v,E)=>{const M=p.series.findIndex(V=>V===v),S=b.value===M,C=b.value!==null&&b.value!==M,$=I.value.has(M);v.data.forEach((V,g)=>{const k=c.value.left+(g+.5)*i-r/2+E*u+d/2,w=oe(Math.max(0,V)),x=Math.abs(oe(0)-oe(V));let z="";if(re.value&&x>0){const A=Math.min(ft.value,h/2,x/2);z=[`M ${k} ${w+x}`,`L ${k} ${w+A}`,`Q ${k} ${w} ${k+A} ${w}`,`L ${k+h-A} ${w}`,`Q ${k+h} ${w} ${k+h} ${w+A}`,`L ${k+h} ${w+x}`,"Z"].join(" ")}t.push({x:k,y:w,width:h,height:x,color:j(M),value:V,label:p.categories[g]||g.toString(),seriesName:v.name,animationDelay:(E*a.length+g)*(me.value/4),isHighlighted:S,isDimmed:C,isHidden:$,barPath:z,isSmooth:re.value&&x>0})})})}return t}),Tt=e.computed(()=>{if(!be.value)return[];const t=ye.value.map((n,i)=>({series:n,originalIndex:i})).filter(({originalIndex:n})=>!I.value.has(n));if(t.length===0)return[];let o=X.value==="semi-radial"?Math.PI:-Math.PI/2;const a=X.value==="semi-radial"?Math.PI:Math.PI*2,l=[];if(t.length===1){const{series:n,originalIndex:i}=t[0],r=n.data[0]||0,u=o,d=o+a-.001,h=u+a/2,v=T.value+Math.cos(u)*ee.value,E=Y.value+Math.sin(u)*ee.value,M=T.value+Math.cos(d)*ee.value,S=Y.value+Math.sin(d)*ee.value,C=T.value+Math.cos(d)*F.value,$=Y.value+Math.sin(d)*F.value,V=T.value+Math.cos(u)*F.value,g=Y.value+Math.sin(u)*F.value,_=1,y=[`M ${v} ${E}`,`A ${ee.value} ${ee.value} 0 ${_} 1 ${M} ${S}`,`L ${C} ${$}`,`A ${F.value} ${F.value} 0 ${_} 0 ${V} ${g}`,"Z"].join(" ");return l.push({path:y,color:j(i),value:r,seriesName:n.name,opacity:.8,isHighlighted:b.value===i,isDimmed:!1,isHidden:!1,startAngle:u,endAngle:d,midAngle:h}),l}const s=t.reduce((n,{series:i})=>n+(i.data[0]||0),0);return s===0?[]:(t.forEach(({series:n,originalIndex:i})=>{const r=n.data[0]||0,u=r/s*a,d=o,h=o+u,v=d+u/2,E=T.value+Math.cos(d)*ee.value,M=Y.value+Math.sin(d)*ee.value,S=T.value+Math.cos(h)*ee.value,C=Y.value+Math.sin(h)*ee.value,$=T.value+Math.cos(h)*F.value,V=Y.value+Math.sin(h)*F.value,g=T.value+Math.cos(d)*F.value,_=Y.value+Math.sin(d)*F.value,y=u>Math.PI?1:0,k=[`M ${E} ${M}`,`A ${ee.value} ${ee.value} 0 ${y} 1 ${S} ${C}`,`L ${$} ${V}`,`A ${F.value} ${F.value} 0 ${y} 0 ${g} ${_}`,"Z"].join(" ");l.push({path:k,color:j(i),value:r,seriesName:n.name,opacity:.8,isHighlighted:b.value===i,isDimmed:b.value!==null&&b.value!==i,isHidden:!1,startAngle:d,endAngle:h,midAngle:v}),o=h}),l)}),oo=e.computed(()=>!wt.value||!be.value?[]:Tt.value.map((t,o)=>{if(t.isHidden)return null;const a=ya.value,l=ka.value,s=Ca.value,n=T.value+Math.cos(t.midAngle)*F.value,i=Y.value+Math.sin(t.midAngle)*F.value,r=T.value+Math.cos(t.midAngle)*(F.value+a),u=Y.value+Math.sin(t.midAngle)*(F.value+a),d=Math.cos(t.midAngle)>=0,v=r+l*(d?1:-1),E=u,M=d?r+15:r-15,S=E-s,C=d?"start":"end";return{pointerStartX:n,pointerStartY:i,pointerEndX:r,pointerEndY:u,horizontalEndX:v,horizontalEndY:E,textX:M,textY:S,text:`${t.seriesName}: ${t.value}`,color:t.color,textAnchor:C,isRightSide:d,isHighlighted:t.isHighlighted,isDimmed:t.isDimmed}}).filter(Boolean)),lo=t=>{if(!t||t.isHidden)return 0;const o=t.opacity||Ht.value||.7;return b.value===null||b.value===void 0?o:b.value!==null?t.seriesIndex===b.value?Math.min(1,o+.1):Math.max(.5,o*.8):o},so=t=>{if(!t||t.isHidden)return 0;const o=t.radius>20?.9:.8;return b.value!==null?t.seriesIndex===b.value?Math.min(1,o+.1):o*.7:o},Yt=(t,o)=>{if(t)try{if(b.value===t.seriesIndex?b.value=null:b.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const a=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:o,chartId:p.chartId}});window.dispatchEvent(a)}}catch(a){console.error("Error in onBubbleClick:",a)}},no=(t,o)=>{const a=[`dss-bubble-fallback-${o}`];return t.isHighlighted&&a.push("dss-bubble-highlighted"),t.isDimmed&&a.push("dss-bubble-dimmed"),t.isHidden&&a.push("dss-bubble-hidden"),a.push(`dss-bubble-series-${t.seriesIndex}`),a.join(" ")},Rt=(t,o)=>{t&&(o.stopPropagation(),Pe.value=!0,b.value=t.seriesIndex,B.value.show=!1)},ro=(t,o)=>{let a;switch(t){case"x":a=o.originalX;break;case"y":a=o.originalY;break;case"size":a=o.originalSize;break;case"label":a=o.label;break;case"seriesName":a=o.seriesName;break;default:a=o[t]||""}const l=wa.value[t];return typeof l=="function"?l(a,o):typeof a=="number"?a.toFixed(1):a?.toString()||""},io=()=>{if(!Z.value||!B.value.data||B.value.data.length===0)return"Bubbles";const t=[],o=new Set;return B.value.data.forEach(a=>{if(a.seriesName&&a.label){const l=`${a.seriesName} - ${a.label}`;o.has(l)||(t.push(l),o.add(l))}else a.seriesName&&(o.has(a.seriesName)||(t.push(a.seriesName),o.add(a.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},Ot=(t,o)=>{t&&(Pe.value=!1,b.value=null)},De=e.computed(()=>p.categories.length||Math.max(...ke.value.map(t=>t.data.length))),co=e.computed(()=>{let t=0;return ke.value.forEach(o=>{o.data.forEach(a=>{typeof a=="number"&&(t=Math.max(t,a))})}),t||100}),Pt=e.computed(()=>{const t=[],o=De.value;for(let a=0;a<o;a++){const l=a*2*Math.PI/o-Math.PI/2,s=T.value+Math.cos(l)*F.value,n=Y.value+Math.sin(l)*F.value;t.push({x:s,y:n,angle:l,index:a})}return t}),uo=e.computed(()=>{const t=[],o=De.value;return Pt.value.forEach((a,l)=>{const s=F.value+15,n=l*2*Math.PI/o-Math.PI/2,i=T.value+Math.cos(n)*s,r=Y.value+Math.sin(n)*s+5;let u="middle",d="middle";Math.abs(Math.cos(n))>.5&&(u=Math.cos(n)>0?"start":"end"),Math.abs(Math.sin(n))>.5&&(d=Math.sin(n)>0?"hanging":"auto"),t.push({x:i,y:r,text:p.categories[l]||`Axis ${l+1}`,anchor:u,baseline:d})}),t}),mo=e.ref(new Set),ho=(t,o,a)=>{const l=`current-${a}`,s=mo.value.has(l);return!s&&b.value===null?o.fillOpacity||_e.value:o.isHighlighted||s?(o.fillOpacity||_e.value)+.15:o.isDimmed?(o.fillOpacity||_e.value)*.3:o.fillOpacity||_e.value},vo=e.computed(()=>{if(!Ee.value)return[];const t=[],o=De.value;return ye.value.forEach((a,l)=>{const s=[],n=[],i=b.value===l,r=b.value!==null&&b.value!==l,u=I.value.has(l);for(let d=0;d<o;d++){const h=a.data[d]||0,E=h/co.value*F.value,M=d*2*Math.PI/o-Math.PI/2,S=T.value+Math.cos(M)*E,C=Y.value+Math.sin(M)*E;s.push(`${S},${C}`),n.push({x:S,y:C,value:h,label:p.categories[d]||`Axis ${d+1}`,seriesName:a.name})}t.push({points:s.join(" "),dataPoints:n,color:j(l),fillOpacity:_e.value,seriesName:a.name,value:`${a.name}: ${a.data.join(", ")}`,isHighlighted:i,isDimmed:r,isHidden:u})}),t}),Oe=e.computed(()=>{const t=f.value;return t.logos.map((o,a)=>{const l=p.series[o.seriesIndex];if(!l||!l.data||l.data.length===0||I.value.has(o.seriesIndex))return null;let s,n;if(W.value){const r=l.data.map((u,d)=>({x:q(d),y:oe(u)}));if(t.animations.enabled&&!Ne.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(H.value.isAnimating||!H.value.hasAnimated))if(H.value.isAnimating){const u=H.value.currentFrame/H.value.totalFrames,d=Zt(t.animations.easing,Math.min(u,1)),h=bo(r,d);s=h.x+(o.offsetX||0),n=h.y+(o.offsetY||0)}else s=r[0].x+(o.offsetX||0),n=r[0].y+(o.offsetY||0);else{const u=l.data.length-1,d=l.data[u];s=q(u)+(o.offsetX||0),n=oe(d)+(o.offsetY||0)}}else if(be.value||Ee.value){const r=Math.PI*2/t.logos.length*a;s=T.value+Math.cos(r)*(F.value+30)+(o.offsetX||0),n=Y.value+Math.sin(r)*(F.value+30)+(o.offsetY||0)}return{...o,x:s,y:n,seriesIndex:o.seriesIndex}}).filter(Boolean)}),go=t=>{const o=document.querySelector(`.dss-logo-fallback-${t}`),a=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.opacity="0"),a&&(a.style.opacity="1")},po=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const o=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.display="none")},fo=t=>{I.value.has(t)?I.value.delete(t):I.value.add(t)},yo=e.computed(()=>{if(!R.value.show&&!(ue.value&&B.value.show&&!m.value.isZooming))return{display:"none"};let t,o;if(ue.value&&B.value.show&&!m.value.isZooming){t=B.value.x+15,o=c.value.top;const a=Z.value?200:150;t+a>K.value&&(t=B.value.x-a-15),t<0&&(t=10),o<10&&(o=10)}else t=R.value.x,o=R.value.y;return{left:t+"px",top:o+"px"}}),ie=(t,o)=>{if(Le.value)return;const l=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let s=o.clientX-l.left+10,n=o.clientY-l.top-10;const i=200,r=120,u=K.value,d=se.value;s+i>u&&(s=o.clientX-l.left-i-10),n+r>d&&(n=o.clientY-l.top-r-10),s<0&&(s=10),n<0&&(n=10);let h;typeof t.categoryIndex=="number"?h=t.categoryIndex:typeof t.dataIndex=="number"?h=t.dataIndex:t.label&&p.categories.includes(t.label)&&(h=p.categories.indexOf(t.label)),R.value={show:!0,x:s,y:n,title:t.seriesName||t.label||"",value:t.value?.toString()||"",categoryIndex:h}},ct=e.ref(!1),Pe=e.ref(!1),ce=()=>{R.value.show=!1,B.value.show=!1,ct.value||(b.value=null)},Le=e.ref(!1),ze=(t,o)=>{Le.value=!0,R.value.show=!1,B.value.show=!1;const l=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let s=o.clientX-l.left+15,n=o.clientY-l.top-10;const i=250;s+i>K.value&&(s=o.clientX-l.left-i-15),s<0&&(s=10),n<0&&(n=10),tt.value={show:!0,x:s,y:n,content:t.texts,count:t.totalCount}},He=()=>{Le.value=!1,tt.value.show=!1},H=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),Zt=(t,o)=>{switch(t){case"linear":return o;case"ease":return o<.5?2*o*o:-1+(4-2*o)*o;case"ease-in":return o*o;case"ease-out":return o*(2-o);case"ease-in-out":return o<.5?2*o*o:-1+(4-2*o)*o;default:return o}},Ne=e.computed(()=>sa.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),jt=()=>{if(!$e.value||Ne.value){H.value.hasAnimated=!0;return}H.value.isAnimating=!0,H.value.currentFrame=0,H.value.totalFrames=Math.ceil(kt.value/16.67);const t=()=>{const o=H.value.currentFrame/H.value.totalFrames,a=Zt(xt.value,Math.min(o,1));ko(a),o<1?(H.value.currentFrame++,H.value.animationId=requestAnimationFrame(t)):Co()};H.value.animationId=requestAnimationFrame(t)},ko=t=>{const o=document.querySelector(".dss-custom-chart-container");o&&o.style.setProperty("--dss-animation-progress",t)},Co=()=>{H.value.isAnimating=!1,H.value.hasAnimated=!0,H.value.animationId&&(cancelAnimationFrame(H.value.animationId),H.value.animationId=null)},xo=e.computed(()=>{if(!$e.value||Ne.value||H.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${kt.value}ms`,t["--dss-animation-easing"]=Mo(xt.value),t["--dss-stagger-delay"]=`${me.value}ms`,t}),Mo=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",wo=()=>{if(!$e.value||Ne.value)return"";const t=["dss-chart-animated"];return H.value.hasAnimated||t.push(`dss-animate-${yt.value}`),H.value.hasAnimated||(be.value?t.push("dss-animate-fill"):t.push(`dss-animate-${yt.value}`)),H.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>p.series,(t,o)=>{la.value&&o&&H.value.hasAnimated&&(H.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>jt(),Ct.value)}))},{deep:!0}),e.watch(()=>m.value.isZooming,(t,o)=>{o&&!t&&setTimeout(()=>{Bt()},50)}),e.watch(()=>[m.value.scale,m.value.offsetX],()=>{!m.value.isZooming&&!m.value.isDragging&&Bt()},{flush:"post"}),e.watch([ta,aa],([t,o])=>{m.value.minScale=t,m.value.maxScale=o,(m.value.scale<t||m.value.scale>o)&<()},{immediate:!0}),e.watch(()=>p.locale,t=>{t&&t!==ut.value&&(ut.value=t)},{immediate:!0}),e.watch(()=>N.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",ot)}):document.removeEventListener("click",ot)}),e.onMounted(()=>{b.value=null,Ia(),$e.value&&!Ne.value?setTimeout(()=>jt(),Ct.value):H.value.hasAnimated=!0,document.addEventListener("mousemove",Ut),document.addEventListener("mouseup",Wt),document.addEventListener("click",_t)}),e.onUnmounted(()=>{H.value.animationId&&cancelAnimationFrame(H.value.animationId),m.value.zoomTimeout&&clearTimeout(m.value.zoomTimeout),document.removeEventListener("mousemove",Ut),document.removeEventListener("mouseup",Wt),document.removeEventListener("click",_t),document.removeEventListener("click",ot)});const Ut=t=>{if(m.value.isDragging&&m.value.scale>1&&W.value){B.value.show=!1;const o=t.clientX-m.value.lastMouseX,{minX:a,maxX:l}=P.value,s=l-a||1,i=o*.8;m.value.offsetX+=i;const r=s/m.value.scale,u=s-r,d=0,h=-u/s*c.value.width,v=d;m.value.offsetX=Math.max(h,Math.min(v,m.value.offsetX)),m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY}},Wt=()=>{m.value.isDragging&&(m.value.isDragging=!1,setTimeout(()=>{!m.value.isDragging&&m.value.isZooming},100))},bo=(t,o)=>{if(!t||t.length===0)return{x:0,y:0};if(t.length===1||o<=0)return t[0];if(o>=1)return t[t.length-1];let a=0;const l=[];for(let i=1;i<t.length;i++){const r=t[i].x-t[i-1].x,u=t[i].y-t[i-1].y,d=Math.sqrt(r*r+u*u);l.push(d),a+=d}const s=a*o;let n=0;for(let i=0;i<l.length;i++){const r=n+l[i];if(s<=r){const u=(s-n)/l[i],d=t[i],h=t[i+1];return{x:d.x+(h.x-d.x)*u,y:d.y+(h.y-d.y)*u}}n=r}return t[t.length-1]};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",wo()]),style:e.normalizeStyle({width:K.value+"px",height:se.value+20+"px",...xo.value,cursor:qa()}),"data-chart-type":X.value,onWheel:Vt,onMousedown:Ua,onMousemove:Ba,onMouseup:Wa,onMouseleave:Sa,onDblclick:lt,onContextmenu:e.withModifiers($a,["prevent"]),onClick:e.withModifiers(ve,["left"]),onWheelCapture:Vt},[e.createElementVNode("div",$o,[e.createElementVNode("div",_o,[G.value?(e.openBlock(),e.createElementBlock("div",Vo,e.toDisplayString(G.value),1)):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",Do,e.toDisplayString(J.value),1)):e.createCommentVNode("",!0)]),Fe.value?(e.openBlock(),e.createElementBlock("div",Lo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.series,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${l}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":I.value.has(l),"dss-legend-hovered":b.value===l,"dss-legend-dimmed":b.value!==null&&b.value!==l}]),onClick:s=>fo(l),onMouseenter:s=>ba(l),onMouseleave:Ea,style:e.normalizeStyle({animationDelay:`${l*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:j(l)})},null,4),e.createElementVNode("span",Ho,e.toDisplayString(a.name),1)],46,zo))),128))])):e.createCommentVNode("",!0)]),(e.openBlock(),e.createElementBlock("svg",{width:K.value,height:se.value,class:"dss-chart-svg","data-smooth":re.value,"data-animated":$e.value},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Ao,[e.createElementVNode("rect",{x:c.value.left,y:c.value.top,width:c.value.width,height:c.value.height*4},null,8,Fo)])]),W.value||Z.value?(e.openBlock(),e.createElementBlock("g",Xo,[gt.value?(e.openBlock(),e.createElementBlock("g",Io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(eo.value,(a,l)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${l}`,x1:c.value.left,x2:c.value.right,y1:a.y,y2:a.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${l*50}ms`})},null,12,To))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Yo,[e.createElementVNode("line",{x1:c.value.left,x2:c.value.right,y1:c.value.bottom,y2:c.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Ro),e.createElementVNode("line",{x1:c.value.left,x2:c.value.left,y1:c.value.top,y2:c.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Oo)]),e.createElementVNode("g",Po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${l}`,x:a.x,y:a.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},e.toDisplayString(a.text),13,Zo))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${l}`,x:a.x,y:a.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${l*80}ms`})},e.toDisplayString(a.text),13,jo))),128)),We.value?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.left+c.value.width/2,y:c.value.bottom+45,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333"},e.toDisplayString(We.value),9,Uo)):e.createCommentVNode("",!0),vt.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:15,y:c.value.top+12+c.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(-90, 15, ${c.value.top+c.value.height/2})`},e.toDisplayString(vt.value),9,Wo)):e.createCommentVNode("",!0)]),bt.value.length>0?(e.openBlock(),e.createElementBlock("g",qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bt.value,a=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${a.categoryIndex}`},[e.createElementVNode("g",Go,[a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:c.value.bottom,y2:c.value.top,stroke:"#047395","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,Qo)):e.createCommentVNode("",!0),a.hasAuto&&!a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:c.value.bottom,y2:c.value.top,stroke:"#0dbf89","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,Ko)):e.createCommentVNode("",!0),a.hasAuto&&a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:c.value.bottom,y2:c.value.top,stroke:"#047395","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,Jo)):e.createCommentVNode("",!0)]),a.hasManual&&a.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x+8,cy:Math.max(15,c.value.top-10),r:"14",fill:"#0dbf89",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,el)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:a.x,cy:Math.max(15,c.value.top-10),r:"14",fill:a.hasManual&&a.hasAuto||a.hasManual?"#047395":"#0dbf89",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,tl),e.createElementVNode("text",{x:a.x,y:Math.max(15,c.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(a.totalCount),9,al)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",ol,[we.value?(e.openBlock(),e.createElementBlock("g",ll,[e.createElementVNode("g",sl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(It.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${l}`},[a.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.barPath,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,nl)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x,y:a.y,width:a.width,height:a.height,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,rl))],64))),128))]),e.createElementVNode("g",il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${l}`,d:a.path,stroke:a.color,"stroke-width":a.isHighlighted?de.value+2:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${a.animationDelay}ms`})},null,14,cl))),128)),te.value>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.mixedLinePoints,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${l}`,cx:a.x,cy:a.y,r:a.isHighlighted?te.value+2:te.value,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,ul))),128)):e.createCommentVNode("",!0)])])):X.value==="line"?(e.openBlock(),e.createElementBlock("g",dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${l}`,d:a.path,stroke:a.color,"stroke-width":a.isHighlighted?de.value+2:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${a.animationDelay}ms`})},null,14,ml))),128)),te.value>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(ao.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${l}`,cx:a.x,cy:a.y,r:a.isHighlighted?te.value+2:te.value,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,hl))),128)):e.createCommentVNode("",!0)])):X.value==="area"?(e.openBlock(),e.createElementBlock("g",vl,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(it.value,(a,l)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${l}`,id:`area-mask-${l}-${Q.chartId}`},[e.createElementVNode("rect",{x:c.value.left-10,y:c.value.top-10,width:c.value.width+20,height:c.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${c.value.width+20}px`})},null,12,pl)],8,gl))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(it.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${l}`,d:a.areaPath,fill:a.color,"fill-opacity":a.isHighlighted?pt.value+.2:pt.value,mask:`url(#area-mask-${l}-${Q.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden})},null,10,fl))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(it.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${l}`,d:a.linePath,stroke:a.color,"stroke-width":a.isHighlighted?de.value+1:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${l*me.value}ms`})},null,14,yl))),128))])):X.value==="bar"?(e.openBlock(),e.createElementBlock("g",kl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(It.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${l}`},[a.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.barPath,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,Cl)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x,y:a.y,width:a.width,height:a.height,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,xl))],64))),128))])):e.createCommentVNode("",!0)]),ue.value&&B.value.show&&!m.value.isZooming?(e.openBlock(),e.createElementBlock("g",Ml,[e.createElementVNode("line",{x1:B.value.x,x2:B.value.x,y1:c.value.top,y2:c.value.bottom,stroke:ea.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,wl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${l}`,cx:B.value.x,cy:a.y,r:te.value+2,fill:a.color,stroke:"#fafafa","stroke-width":"2",opacity:"0.9"},null,8,bl))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Z.value?(e.openBlock(),e.createElementBlock("g",El,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Re.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${l}`},[a?(e.openBlock(),e.createElementBlock("g",Bl,[e.createElementVNode("circle",{cx:a.x,cy:a.y,r:a.radius,fill:a.color,"fill-opacity":lo(a),stroke:a.color,"stroke-width":a.isHighlighted?3:1,"stroke-opacity":"0.8",class:e.normalizeClass(no(a,l)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:s=>Rt(a,s),onMouseleave:s=>Ot(a),onClick:s=>Yt(a,s)},null,42,Sl),a.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:a.x-a.radius*.65,y:a.y-a.radius*.65,width:a.radius*1.3,height:a.radius*1.3,"xlink:href":a.imageUrl,class:e.normalizeClass(`dss-bubble-image-${l} ${a.isHighlighted?"dss-bubble-highlighted":""} ${a.isDimmed?"dss-bubble-dimmed":""} ${a.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${a.radius*.65}px at ${a.radius*.65}px ${a.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:so(a)}),onLoad:s=>Ga(l),onError:s=>Qa(l),onMouseenter:s=>Rt(a,s),onMouseleave:s=>Ot(a),onClick:s=>Yt(a,s)},null,46,$l)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),be.value?(e.openBlock(),e.createElementBlock("g",_l,[X.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:T.value,cy:Y.value,r:F.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,Vl)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":X.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${l}`,d:a.path,fill:a.color,"fill-opacity":a.isHighlighted?(a.opacity||.8)+.2:a.opacity||.8,stroke:a.color,"stroke-width":a.isHighlighted?2:1,class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,42,Ll))),128))],8,Dl),wt.value?(e.openBlock(),e.createElementBlock("g",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oo.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${l}`,class:e.normalizeClass({"dss-label-highlighted":a.isHighlighted,"dss-label-dimmed":a.isDimmed})},[e.createElementVNode("line",{x1:a.pointerStartX,y1:a.pointerStartY,x2:a.pointerEndX,y2:a.pointerEndY,stroke:a.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},null,12,Hl),e.createElementVNode("line",{x1:a.pointerEndX,y1:a.pointerEndY,x2:a.horizontalEndX,y2:a.horizontalEndY,stroke:a.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({animationDelay:`${l*120}ms`})},null,12,Nl),e.createElementVNode("text",{x:a.textX,y:a.textY,"text-anchor":a.textAnchor,"font-size":fa.value,"dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${l*150}ms`})},e.toDisplayString(a.text),13,Al)],2))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ee.value?(e.openBlock(),e.createElementBlock("g",Fl,[gt.value?(e.openBlock(),e.createElementBlock("g",Xl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qe.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${l}`,cx:T.value,cy:Y.value,r:a,fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${l*150}ms`})},null,12,Il))),128)),e.createElementVNode("g",Tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qe.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${l}`},[e.createElementVNode("rect",{x:T.value-16,y:Y.value-a-7,width:"32",height:"16",fill:"#fafafa",stroke:"none"},null,8,Yl),e.createElementVNode("text",{x:T.value,y:Y.value-a+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(ra(l)),9,Rl)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pt.value,(a,l)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${l}`,x1:T.value,x2:a.x,y1:Y.value,y2:a.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},null,12,Ol))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Pl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(uo.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${l}`,x:a.x+Math.cos(l*2*Math.PI/De.value-Math.PI/2)*16,y:a.y+Math.sin(l*2*Math.PI/De.value-Math.PI/2)*16,"text-anchor":a.anchor,"dominant-baseline":a.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${l*120}ms`})},e.toDisplayString(a.text.charAt(0).toUpperCase()+a.text.slice(1)),13,Zl))),128))]),e.createElementVNode("g",jl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vo.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${l}`},[e.createElementVNode("polygon",{points:a.points,fill:a.color,"fill-opacity":ho("current",a,l),stroke:a.color,"stroke-width":a.isHighlighted?de.value+1:de.value,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${l*me.value}ms`,transition:"all 0.2s ease"}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,Ul),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataPoints,(s,n)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${l}-${n}`,cx:s.x,cy:s.y,r:a.isHighlighted?te.value+1:te.value>0?te.value:0,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${l*me.value+n*50}ms`,transition:"all 0.2s ease"}),onMouseover:i=>ie(s,i),onMouseleave:ce},null,46,Wl))),128))]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("g",ql,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${l}`,cx:a.x,cy:a.y,r:a.width/2,fill:j(a.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${l}`),style:e.normalizeStyle({animationDelay:`${l*200}ms`})},null,14,Gl))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(a,l)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${l}`,x:a.x-a.width/2,y:a.y-a.height/2,width:a.width,height:a.height,"xlink:href":a.url,onLoad:s=>go(l),onError:s=>po(l),class:e.normalizeClass(`dss-logo-image-${l}`),"clip-path":`circle(${a.width/2}px at ${a.width/2}px ${a.height/2}px)`,style:e.normalizeStyle({animationDelay:`${l*200}ms`})},null,46,Ql))),128))])],8,No)),Qe.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:K.value+"px",height:se.value+"px",backgroundImage:`url('${Mt.value}')`,backgroundRepeat:"no-repeat",...va.value,opacity:Ke.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ma.value,(a,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+a.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:a.x+"px",top:a.y+"px",width:xe.value+"px",height:xe.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(s=>Fa(a),["stop"])},[e.createElementVNode("img",{src:Et(a),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,Jl)],12,Kl)),[[e.vShow,ua.value]])),128)),R.value.show||ue.value&&B.value.show&&!m.value.isZooming?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":ue.value&&B.value.show&&!m.value.isZooming}]),style:e.normalizeStyle(yo.value)},[!ue.value||!B.value.show||m.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",es,[e.createElementVNode("div",ts,e.toDisplayString(R.value.title),1),e.createElementVNode("div",as,e.toDisplayString(R.value.value),1)]),R.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[he(R.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",os,[o[4]||(o[4]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ls,e.toDisplayString(e.unref(L)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(R.value.categoryIndex).flagGroups,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${l}`},[e.createElementVNode("div",ss,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(a.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.flags,(s,n)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${l}-${n}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",ns,[e.createElementVNode("div",rs,e.toDisplayString(s.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),he(R.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",is,[o[5]||(o[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",cs,e.toDisplayString(e.unref(L)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(R.value.categoryIndex).markers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${l}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("div",us,[e.createElementVNode("div",ds,e.toDisplayString(a.title),1),a.description?(e.openBlock(),e.createElementBlock("div",ms,e.toDisplayString(a.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",hs,[e.createElementVNode("div",vs,e.toDisplayString(Z.value?io():Q.categories[B.value.categoryIndex]||`Category ${B.value.categoryIndex+1}`),1),Z.value?(e.openBlock(),e.createElementBlock("div",gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${l}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(a.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${l}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",ps,e.toDisplayString(a.seriesName)+":",1),e.createElementVNode("span",fs,e.toDisplayString(a.value),1)]))),128))]),he(B.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",ys,[o[6]||(o[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ks,e.toDisplayString(e.unref(L)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(B.value.categoryIndex).flagGroups,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${l}`},[e.createElementVNode("div",Cs,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(a.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.flags,(s,n)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${l}-${n}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",xs,[e.createElementVNode("div",Ms,e.toDisplayString(s.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),he(B.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",ws,[o[7]||(o[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",bs,e.toDisplayString(e.unref(L)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(B.value.categoryIndex).markers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${l}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("div",Es,[e.createElementVNode("div",Bs,e.toDisplayString(a.title),1),a.description?(e.openBlock(),e.createElementBlock("div",Ss,e.toDisplayString(a.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),W.value&&Ce.value&&m.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-zoom-indicator",onClick:lt},[o[8]||(o[8]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(m.value.scale*100))+"% "+e.toDisplayString(e.unref(L)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,So),N.value.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-chart-context-menu",style:e.normalizeStyle({left:N.value.x+"px",top:N.value.y+"px"}),onClick:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},[ae.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:ja},e.toDisplayString(e.unref(L)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),O.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-context-menu-item",onClick:Xa},e.toDisplayString(e.unref(L)("chart.contextMenu.clearAllMarkers")),1)):e.createCommentVNode("",!0),ae.value.addMarker&&(ae.value.downloadSvg||ae.value.downloadPng||ae.value.downloadCsv||Ge.value.length>0)?(e.openBlock(),e.createElementBlock("div",$s)):e.createCommentVNode("",!0),ae.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:Ra},e.toDisplayString(e.unref(L)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),ae.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:Oa},e.toDisplayString(e.unref(L)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),ae.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:5,class:"dss-context-menu-item",onClick:Pa},e.toDisplayString(e.unref(L)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),Ge.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[ae.value.downloadSvg||ae.value.downloadPng||ae.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",_s)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ge.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+l},[a.separator?(e.openBlock(),e.createElementBlock("div",Vs)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(Va(a)),style:e.normalizeStyle(Da(a)),onClick:s=>Za(a)},[a.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:_a(a),class:"dss-custom-menu-content"},null,8,Ls)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.icon?(e.openBlock(),e.createElementBlock("span",zs,e.toDisplayString(a.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.label),1)],64))],14,Ds)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),D.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-marker-modal-overlay",onClick:Me},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:o[3]||(o[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Hs,[e.createElementVNode("h3",null,e.toDisplayString(Ve.value?e.unref(L)("chart.modalMarker.editMarker"):e.unref(L)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:Me},"×")]),e.createElementVNode("div",Ns,[o[9]||(o[9]=e.createElementVNode("div",{class:"dss-form-group"},null,-1)),e.createElementVNode("div",As,[e.createElementVNode("label",Fs,e.toDisplayString(e.unref(L)("chart.modalMarker.description")),1),e.withDirectives(e.createElementVNode("textarea",{id:"dss-marker-description","onUpdate:modelValue":o[1]||(o[1]=a=>D.value.description=a),placeholder:e.unref(L)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"3"},null,8,Xs),[[e.vModelText,D.value.description]])]),e.createElementVNode("div",Is,[e.createElementVNode("label",null,e.toDisplayString(e.unref(L)("chart.modalMarker.iconPreview")),1),e.createElementVNode("div",Ts,[e.createElementVNode("img",{src:Et({type:D.value.type}),alt:"Marker Icon Preview",class:"preview-icon",style:{width:"32px",height:"32px","border-radius":"50%",border:"2px solid #ddd"},onError:o[2]||(o[2]=a=>a.target.style.display="none")},null,40,Ys)])])]),e.createElementVNode("div",Rs,[e.createElementVNode("div",Os,[Ve.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:Na},e.toDisplayString(e.unref(L)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ps,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:Me},e.toDisplayString(e.unref(L)("chart.modalMarker.cancel")),1),e.createElementVNode("button",{class:"dss-btn dss-btn-primary",onClick:Ha,disabled:!(D.value.description&&D.value.description.length)},e.toDisplayString(Ve.value?e.unref(L)("chart.modalMarker.save"):e.unref(L)("chart.contextMenu.addMarker")),9,Zs)])])])])):e.createCommentVNode("",!0)],64))}}),Ws={contextMenu:{addMarker:"Add Marker",clearAllMarkers:"Clear All Markers",downloadSvg:"Download SVG",downloadPng:"Download PNG",downloadCsv:"Download CSV"},modalMarker:{editMarker:"Edit Marker",title:"Title",description:"Description",iconType:"Icon Type",defaultIcon:"Default Logo",iconPreview:"Icon Preview",deleteMarker:"Delete Marker",cancel:"Cancel",save:"Save",placeholderTitle:"Enter marker title",placeholderDescription:"Enter marker description (optional)"},zoom:{doubleClickToReset:"(Double-click to reset)"},csv:{chartTitle:"Chart Title",chartSubtitle:"Chart Subtitle",generated:"Generated"},fallback:{item:"Item",axis:"Axis"},tooltip:{flags:"Flags",markers:"Markers",manualFlags:"Manual Flags",autoFlags:"Auto Flags"}},qs={chart:Ws},Gs={contextMenu:{addMarker:"Ajouter un marqueur",clearAllMarkers:"Effacer tous les marqueurs",downloadSvg:"Télécharger SVG",downloadPng:"Télécharger PNG",downloadCsv:"Télécharger CSV"},modalMarker:{editMarker:"Modifier le marqueur",title:"Titre",description:"Description",iconType:"Type d'icône",defaultIcon:"Logo par défaut",iconPreview:"Prévisualisation de l'icône",deleteMarker:"Suprimer le marqueur",cancel:"Annuler",save:"Sauvegarder",placeholderTitle:"Entrez le titre du marqueur",placeholderDescription:"Entrez la description du marqueur (optionnel)"},zoom:{doubleClickToReset:"(Double-cliquez pour réinitialiser)"},csv:{chartTitle:"Titre du graphique",chartSubtitle:"Sous-titre du graphique",generated:"Généré"},fallback:{item:"Objet",axis:"Axe"},tooltip:{flags:"Drapeaux",markers:"Marqueurs",manualFlags:"Drapeaux manuels",autoFlags:"Drapeaux automatiques"}},Qs={chart:Gs},Ks={contextMenu:{addMarker:"Markering toevoegen",clearAllMarkers:"Wis alle markers",downloadSvg:"SVG downloaden",downloadPng:"PNG downloaden",downloadCsv:"CSV downloaden"},modalMarker:{editMarker:"Markering bewerken",title:"Titel",description:"Beschrijving",iconType:"Icoon Type",defaultIcon:"Standaard Logo",iconPreview:"Icoon Voorbeeld",deleteMarker:"Markering verwijderen",cancel:"Annuleren",save:"Opslaan",placeholderTitle:"Voer marker titel in",placeholderDescription:"Voer marker beschrijving in (optioneel)"},zoom:{doubleClickToReset:"(Dubbelklik om te resetten)"},csv:{chartTitle:"Grafiek Titel",chartSubtitle:"Grafiek Ondertitel",generated:"Gegenereerd"},fallback:{item:"Item",axis:"As"},tooltip:{flags:"Vlaggen",markers:"Markeringen",manualFlags:"Handmatige Vlaggen",autoFlags:"Automatische Vlaggen"}},Js={chart:Ks},Ze={en:qs,fr:Qs,nl:Js};function en(Q){if(!Q||!Q.global)return;const je=Q.global.availableLocales||[];Object.keys(Ze).forEach(L=>{je.includes(L)?Q.global.mergeLocaleMessage(L,Ze[L]):console.error(`⊗ Skipped DSP translations for: ${L} (not in app)`)})}Gt.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:Ze});exports.DSSChart=Us;exports.DSSChartMessages=Ze;exports.addDSSChartTranslations=en;
|
|
75
|
+
`}const a=new Blob([t],{type:"text/csv;charset=utf-8;"}),l=URL.createObjectURL(a),s=document.createElement("a");s.href=l,s.download=Ye("csv"),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(l),ve()}catch(t){console.error("Error downloading CSV:",t)}},Wa=t=>{if(typeof t.action=="function"){const o={series:p.series,categories:p.categories,markers:O.value},a={chartX:N.value.chartX,chartY:N.value.chartY,dataX:N.value.mouseDataX,dataY:N.value.mouseDataY,categoryIndex:clampedCategoryIndex||N.value.categoryIndex};t.action(o,a)}ve()},qa=()=>{Me(),D.value.show=!0,ve()},Lt=t=>{if(N.value.show){const o=document.querySelector(".dss-context-menu");o&&!o.contains(t.target)&&(N.value.show=!1)}},nt=t=>{N.value.show&&!t.target.closest(".context-menu")&&(N.value.show=!1)},zt=t=>{if(!W.value||!Ce.value)return;t.preventDefault(),t.stopPropagation(),m.value.isZooming=!0,B.value.show=!1,m.value.zoomTimeout&&clearTimeout(m.value.zoomTimeout);const a=t.currentTarget.getBoundingClientRect(),l=t.clientX-a.left,s=t.clientY-a.top;if(l<c.value.left-50||l>c.value.right+50||s<c.value.top-50||s>c.value.bottom+100){m.value.isZooming=!1;return}const n=t.deltaY>0?.9:1.1,i=Math.max(m.value.minScale,Math.min(m.value.maxScale,m.value.scale*n));if(i!==m.value.scale){const{minX:r,maxX:u}=P.value,d=u-r||1,h=d/m.value.scale,v=r-m.value.offsetX/c.value.width*d,E=(l-c.value.left)/c.value.width,M=v+E*h;m.value.scale=i;const S=d/m.value.scale,C=M-E*S;m.value.offsetX=-(C-r)/d*c.value.width,m.value.scale<=1.01&&(m.value.scale=1,m.value.offsetX=0)}m.value.zoomTimeout=setTimeout(()=>{m.value.isZooming=!1,m.value.zoomTimeout=null},300)},Ga=t=>{if(!W.value||!Ce.value||m.value.scale<=1)return;B.value.show=!1;const a=t.currentTarget.getBoundingClientRect();t.clientX-a.left,t.clientY-a.top,m.value.isDragging=!0,m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY,t.preventDefault()},Qa=()=>{m.value.isDragging=!1},rt=()=>{!W.value||!Ce.value||(m.value.scale=1,m.value.offsetX=0,m.value.isDragging=!1,m.value.zoomTimeout&&(clearTimeout(m.value.zoomTimeout),m.value.zoomTimeout=null),m.value.isZooming=!1)},Ka=()=>!W.value||!st.value||!Ce.value?"default":m.value.isDragging?"grabbing":m.value.scale>1?"grab":"dss-crosshair",it=t=>{if(t.length<2)return"";if(t.length===2)return`M ${t[0].x} ${t[0].y} L ${t[1].x} ${t[1].y}`;let o=`M ${t[0].x} ${t[0].y}`;for(let a=0;a<t.length-1;a++){const l=t[Math.max(a-1,0)],s=t[a],n=t[a+1],i=t[Math.min(a+2,t.length-1)],r=s.x+(n.x-l.x)/6*Ie.value,u=s.y+(n.y-l.y)/6*Ie.value,d=n.x-(i.x-s.x)/6*Ie.value,h=n.y-(i.y-s.y)/6*Ie.value;o+=` C ${r} ${u} ${d} ${h} ${n.x} ${n.y}`}return o},ge=e.computed(()=>{let o=50+(Qe.value?30:0)+60;if(Ee.value)return{left:90,top:90,right:90,bottom:90};let a=0;return G.value&&(a+=15),J.value&&(a+=10),{left:66,top:50+a,right:50,bottom:o}}),c=e.computed(()=>({left:ge.value.left,top:ge.value.top,right:K.value-ge.value.right,bottom:se.value-ge.value.bottom,width:K.value-(ge.value.left+ge.value.right),height:se.value-(ge.value.top+ge.value.bottom)})),W=e.computed(()=>["line","area","bar"].includes(X.value)||pt.value),we=e.computed(()=>pt.value),be=e.computed(()=>["radial","semi-radial"].includes(X.value)),Ee=e.computed(()=>X.value==="spider"),Z=e.computed(()=>X.value==="bubble"),Re=e.computed(()=>f.value?.chart?.orientation==="horizontal"&&(X.value==="bar"||we.value)),Ht=t=>{const{minY:o,maxY:a}=P.value,l=a-o||1;return c.value.left+(t-o)/l*c.value.width},Nt=t=>{const{maxX:o}=P.value,a=o+1,s=c.value.height/a;return c.value.top+(t+.5)*s},T=e.computed(()=>K.value/2),Y=e.computed(()=>Ee.value?se.value/2-40:se.value/2),F=e.computed(()=>{if(Ee.value){const t=c.value.width-80,o=c.value.height-80;return Math.min(t,o)/2}return Math.min(c.value.width,c.value.height)/2}),ee=e.computed(()=>F.value*.45),ct=e.computed(()=>f.value?.bubbles?.minSize||8),At=e.computed(()=>f.value?.bubbles?.maxSize||50),Ft=e.computed(()=>f.value?.bubbles?.opacity||.7),Xt=(t,o)=>{const a=[15,20,25,18,22],l=a[t%a.length]||20,s=1+Math.sin(o*.5)*.2;return Math.max(5,l*s)},Ja=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.opacity="1")},eo=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.display="none")},ye=e.computed(()=>p.series),ke=e.computed(()=>p.series.filter((t,o)=>!I.value.has(o))),pe="auto",P=e.computed(()=>{if(Z.value)return to();if(!ke.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=1/0,o=-1/0,a=0;ke.value.forEach(r=>{r.data&&r.data.length&&(a=Math.max(a,r.data.length-1),r.data.forEach(u=>{typeof u=="number"&&(t=Math.min(t,u),o=Math.max(o,u))}))}),p.categories.length>0&&(a=Math.max(a,p.categories.length-1)),t===1/0&&(t=0,o=100);const l=ta.value,s=aa.value;let n,i;if(l===pe){const r=o-t,u=r>0?r*.1:1;n=Math.max(0,t-u)}else if(typeof l=="number")n=l;else{const r=o-t,u=r>0?r*.1:1;n=Math.max(0,t-u)}if(s===pe){const r=o-t,u=r>0?r*.1:2;i=o+u}else if(typeof s=="number")i=s;else{const r=o-t,u=r>0?r*.1:2;i=o+u}return{minX:0,maxX:a,minY:n,maxY:i}}),to=()=>{if(!ke.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,o=-1/0,a=1/0,l=-1/0,s=1/0,n=-1/0,i=!1;if(ke.value.forEach((d,h)=>{d?.data?.length&&d.data.forEach((v,E)=>{let M,S,C;if(typeof v=="object"&&v!==null&&!Array.isArray(v))M=typeof v.x=="number"?v.x:E,S=typeof v.y=="number"?v.y:0,C=typeof v.size=="number"?v.size:20;else if(Array.isArray(v)&&v.length>=3)M=typeof v[0]=="number"?v[0]:E,S=typeof v[1]=="number"?v[1]:0,C=typeof v[2]=="number"?v[2]:20;else if(typeof v=="number")M=E,S=v,C=Xt(h,E);else return;isFinite(M)&&isFinite(S)&&isFinite(C)&&(t=Math.min(t,M),o=Math.max(o,M),a=Math.min(a,S),l=Math.max(l,S),s=Math.min(s,C),n=Math.max(n,C),i=!0)})}),!i)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===o&&(t=Math.min(t,0),o=Math.max(o,p.categories?.length-1||8)),a===l&&(a=Math.max(0,a-10),l=a+20);const r=o-t,u=l-a;return{minX:t-r*.1,maxX:o+r*.1,minY:a-u*.1,maxY:l+u*.1,minSize:s,maxSize:n}},q=t=>{if(Z.value){const{minX:r,maxX:u}=P.value,d=u-r||1;return c.value.left+(t-r)/d*c.value.width}const{minX:o,maxX:a}=P.value,l=a-o||1,s=l/m.value.scale,n=o-m.value.offsetX/c.value.width*l,i=(t-n)/s;return c.value.left+i*c.value.width},oe=t=>{const{minY:o,maxY:a}=P.value,l=a-o||1;return c.value.bottom-(t-o)/l*c.value.height},ao=t=>{if(!Z.value)return te.value||4;const{minSize:o,maxSize:a}=P.value,l=a-o||1;if(l===0)return(ct.value+At.value)/2;const s=(t-o)/l;return ct.value+s*(At.value-ct.value)},oo=e.computed(()=>It.value.map(t=>({y:t.y}))),ut=e.computed(()=>{if(Z.value)return lo();if(X.value==="bar"){const S=[],{maxX:C}=P.value,$=C+1,V=5,_=(c.value.width-V*2)/$;for(let y=0;y<=C;y++){const k=c.value.left+V+(y+.5)*_;S.push({x:k,y:c.value.bottom+20,text:p.categories[y]||L("chart.fallback.item",{number:y+1})})}return S}const t=[],{minX:o,maxX:a}=P.value,l=a-o||1,s=l/m.value.scale,n=o-m.value.offsetX/c.value.width*l,i=n+s,r=Math.max(0,Math.floor(n-2)),u=Math.min(a,Math.ceil(i+2)),d=u-r,h=c.value.width,E=Math.floor(h/60);let M=1;d>E&&(M=Math.ceil(d/E));for(let S=r;S<=u;S+=M)if(S>=0&&S<=a){const C=q(S);C>=c.value.left-100&&C<=c.value.right+100&&t.push({x:C,y:c.value.bottom+20,text:p.categories[S]||`Item ${S+1}`})}return t}),lo=()=>{const t=[],{minX:o,maxX:a}=P.value,l=a-o||1,s=Math.min(8,Math.max(4,Math.floor(c.value.width/80)));for(let n=0;n<=s;n++){const i=o+l*n/s,r=q(i);if(r>=c.value.left-10&&r<=c.value.right+10){const u=Math.round(i),d=p.categories?.[u];t.push({x:r,y:c.value.bottom+20,text:d||(Number.isInteger(i)?i.toString():i.toFixed(1))})}}return t},It=e.computed(()=>{if(Re.value){const s=[],{maxX:n}=P.value;for(let i=0;i<=n;i++)s.push({x:c.value.left-10,y:Nt(i),text:p.categories[i]||`Item ${i+1}`});return s}const t=[],{minY:o,maxY:a}=P.value,l=5;for(let s=0;s<=l;s++){const n=o+(a-o)*(s/l),i=Math.round(n);t.push({x:c.value.left-10,y:oe(n),text:i.toString()})}return t}),j=t=>{const o=na.value;if(!o||o.length===0){const a=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return a[t%a.length]}return o[t%o.length]},Tt=t=>{let o=0;for(let a=1;a<t.length;a++){const l=t[a].x-t[a-1].x,s=t[a].y-t[a-1].y;o+=Math.sqrt(l*l+s*s)}return o},Yt=e.computed(()=>X.value==="line"||we.value?(we.value?p.series.filter(o=>(o.type||X.value)==="line"):ye.value).map((o,a)=>{const l=p.series.findIndex(h=>h===o),s=o.data.map((h,v)=>({x:Re.value?Ht(h):q(v),y:Re.value?Nt(v):oe(h)}));let n="";s.length>0&&(re.value?n=it(s):n=`M ${s[0].x} ${s[0].y}`+s.slice(1).map(h=>` L ${h.x} ${h.y}`).join(""));const i=Tt(s),r=I.value.has(l),u=b.value===l,d=b.value!==null&&b.value!==l;return{path:n,color:j(l),pathLength:i,seriesIndex:l,animationDelay:a*me.value,isHighlighted:u,isDimmed:d,isHidden:r}}):[]),so=e.computed(()=>{if(X.value!=="line")return[];const t=[];return ye.value.forEach((o,a)=>{const l=b.value===a,s=b.value!==null&&b.value!==a,n=I.value.has(a);o.data.forEach((i,r)=>{t.push({x:q(r),y:oe(i),color:j(a),value:i,label:p.categories[r]||r.toString(),seriesName:o.name,categoryIndex:r,dataIndex:r,animationDelay:(a*o.data.length+r)*(me.value/8),isHighlighted:l,isDimmed:s,isHidden:n})})}),t}),Oe=e.computed(()=>{if(!Z.value)return[];const t=[];return ye.value.forEach((o,a)=>{if(!o?.data?.length)return;const l=b.value,s=l!==null&&l===a,n=l!==null&&l!==a,i=I.value.has(a);o.data.forEach((r,u)=>{let d,h,v,E,M;if(typeof r=="object"&&r!==null&&!Array.isArray(r))d=typeof r.x=="number"?r.x:u,h=typeof r.y=="number"?r.y:0,v=typeof r.size=="number"?r.size:20,E=r.label||p.categories?.[u]||`Point ${u+1}`,M=r.image||r.imageUrl;else if(Array.isArray(r)&&r.length>=3)d=typeof r[0]=="number"?r[0]:u,h=typeof r[1]=="number"?r[1]:0,v=typeof r[2]=="number"?r[2]:20,E=r[3]||p.categories?.[u]||`Point ${u+1}`,M=r[4];else if(typeof r=="number")d=u,h=r,v=Xt(a,u),E=p.categories?.[u]||`Point ${u+1}`;else return;!isFinite(d)||!isFinite(h)||!isFinite(v)||t.push({x:q(d),y:oe(h),radius:ao(v),originalX:d,originalY:h,originalSize:v,color:j(a),seriesName:o.name||`Series ${a+1}`,label:E,imageUrl:M,seriesIndex:a,dataIndex:u,categoryIndex:Math.round(d),isHighlighted:s,isDimmed:n,isHidden:i,opacity:Ft.value})})}),t}),dt=e.computed(()=>X.value!=="area"?[]:ye.value.map((t,o)=>{const a=t.data.map((h,v)=>({x:q(v),y:oe(h)}));if(a.length===0)return{linePath:"",areaPath:"",color:j(o),isHidden:I.value.has(o)};let l=`M ${a[0].x} ${a[0].y}`;re.value&&a.length>1?l=it(a):a.slice(1).forEach(h=>{l+=` L ${h.x} ${h.y}`});const s=c.value.bottom+1;let n=`M ${a[0].x} ${s}`;if(n+=` L ${a[0].x} ${a[0].y}`,re.value&&a.length>1){const h=it(a),v=h.substring(h.indexOf("C")||h.indexOf("Q")||h.indexOf("L"));v?n+=" "+v:a.slice(1).forEach(E=>{n+=` L ${E.x} ${E.y}`})}else a.slice(1).forEach(h=>{n+=` L ${h.x} ${h.y}`});n+=` L ${a[a.length-1].x} ${s} Z`;const i=b.value===o,r=b.value!==null&&b.value!==o,u=I.value.has(o),d=Tt(a);return{linePath:l,areaPath:n,color:j(o),pathLength:d,isHighlighted:i,isDimmed:r,isHidden:u}})),Rt=e.computed(()=>{if(!(["bar"].includes(X.value)||we.value))return[];const t=[],{maxX:o}=P.value,a=we.value?p.series.filter(s=>(s.type||X.value)==="bar"):ye.value,l=a.length;if(Re.value){const s=o+1,i=c.value.height/s,r=i*.8,u=r/l,d=u*.05,h=u-d;a.forEach((v,E)=>{const M=p.series.findIndex(V=>V===v),S=b.value===M,C=b.value!==null&&b.value!==M,$=I.value.has(M);v.data.forEach((V,g)=>{const k=c.value.top+(g+.5)*i-r/2+E*u+d/2,w=c.value.left,x=Math.abs(Ht(V)-c.value.left);let z="";if(re.value&&x>0){const A=Math.min(Ct.value,h/2,x/2);z=[`M ${w} ${k}`,`L ${w+x-A} ${k}`,`Q ${w+x} ${k} ${w+x} ${k+A}`,`L ${w+x} ${k+h-A}`,`Q ${w+x} ${k+h} ${w+x-A} ${k+h}`,`L ${w} ${k+h}`,"Z"].join(" ")}t.push({x:w,y:k,width:x,height:h,color:j(M),value:V,label:p.categories[g]||g.toString(),seriesName:v.name,animationDelay:(E*a.length+g)*(me.value/4),isHighlighted:S,isDimmed:C,isHidden:$,barPath:z,isSmooth:re.value&&x>0})})})}else{const s=o+1,i=c.value.width/s,r=i*.8,u=r/l,d=u*.05,h=u-d;a.forEach((v,E)=>{const M=p.series.findIndex(V=>V===v),S=b.value===M,C=b.value!==null&&b.value!==M,$=I.value.has(M);v.data.forEach((V,g)=>{const k=c.value.left+(g+.5)*i-r/2+E*u+d/2,w=oe(Math.max(0,V)),x=Math.abs(oe(0)-oe(V));let z="";if(re.value&&x>0){const A=Math.min(Ct.value,h/2,x/2);z=[`M ${k} ${w+x}`,`L ${k} ${w+A}`,`Q ${k} ${w} ${k+A} ${w}`,`L ${k+h-A} ${w}`,`Q ${k+h} ${w} ${k+h} ${w+A}`,`L ${k+h} ${w+x}`,"Z"].join(" ")}t.push({x:k,y:w,width:h,height:x,color:j(M),value:V,label:p.categories[g]||g.toString(),seriesName:v.name,animationDelay:(E*a.length+g)*(me.value/4),isHighlighted:S,isDimmed:C,isHidden:$,barPath:z,isSmooth:re.value&&x>0})})})}return t}),Ot=e.computed(()=>{if(!be.value)return[];const t=ye.value.map((n,i)=>({series:n,originalIndex:i})).filter(({originalIndex:n})=>!I.value.has(n));if(t.length===0)return[];let o=X.value==="semi-radial"?Math.PI:-Math.PI/2;const a=X.value==="semi-radial"?Math.PI:Math.PI*2,l=[];if(t.length===1){const{series:n,originalIndex:i}=t[0],r=n.data[0]||0,u=o,d=o+a-.001,h=u+a/2,v=T.value+Math.cos(u)*ee.value,E=Y.value+Math.sin(u)*ee.value,M=T.value+Math.cos(d)*ee.value,S=Y.value+Math.sin(d)*ee.value,C=T.value+Math.cos(d)*F.value,$=Y.value+Math.sin(d)*F.value,V=T.value+Math.cos(u)*F.value,g=Y.value+Math.sin(u)*F.value,_=1,y=[`M ${v} ${E}`,`A ${ee.value} ${ee.value} 0 ${_} 1 ${M} ${S}`,`L ${C} ${$}`,`A ${F.value} ${F.value} 0 ${_} 0 ${V} ${g}`,"Z"].join(" ");return l.push({path:y,color:j(i),value:r,seriesName:n.name,opacity:.8,isHighlighted:b.value===i,isDimmed:!1,isHidden:!1,startAngle:u,endAngle:d,midAngle:h}),l}const s=t.reduce((n,{series:i})=>n+(i.data[0]||0),0);return s===0?[]:(t.forEach(({series:n,originalIndex:i})=>{const r=n.data[0]||0,u=r/s*a,d=o,h=o+u,v=d+u/2,E=T.value+Math.cos(d)*ee.value,M=Y.value+Math.sin(d)*ee.value,S=T.value+Math.cos(h)*ee.value,C=Y.value+Math.sin(h)*ee.value,$=T.value+Math.cos(h)*F.value,V=Y.value+Math.sin(h)*F.value,g=T.value+Math.cos(d)*F.value,_=Y.value+Math.sin(d)*F.value,y=u>Math.PI?1:0,k=[`M ${E} ${M}`,`A ${ee.value} ${ee.value} 0 ${y} 1 ${S} ${C}`,`L ${$} ${V}`,`A ${F.value} ${F.value} 0 ${y} 0 ${g} ${_}`,"Z"].join(" ");l.push({path:k,color:j(i),value:r,seriesName:n.name,opacity:.8,isHighlighted:b.value===i,isDimmed:b.value!==null&&b.value!==i,isHidden:!1,startAngle:d,endAngle:h,midAngle:v}),o=h}),l)}),no=e.computed(()=>!Bt.value||!be.value?[]:Ot.value.map((t,o)=>{if(t.isHidden)return null;const a=xa.value,l=Ma.value,s=wa.value,n=T.value+Math.cos(t.midAngle)*F.value,i=Y.value+Math.sin(t.midAngle)*F.value,r=T.value+Math.cos(t.midAngle)*(F.value+a),u=Y.value+Math.sin(t.midAngle)*(F.value+a),d=Math.cos(t.midAngle)>=0,v=r+l*(d?1:-1),E=u,M=d?r+15:r-15,S=E-s,C=d?"start":"end";return{pointerStartX:n,pointerStartY:i,pointerEndX:r,pointerEndY:u,horizontalEndX:v,horizontalEndY:E,textX:M,textY:S,text:`${t.seriesName}: ${t.value}`,color:t.color,textAnchor:C,isRightSide:d,isHighlighted:t.isHighlighted,isDimmed:t.isDimmed}}).filter(Boolean)),ro=t=>{if(!t||t.isHidden)return 0;const o=t.opacity||Ft.value||.7;return b.value===null||b.value===void 0?o:b.value!==null?t.seriesIndex===b.value?Math.min(1,o+.1):Math.max(.5,o*.8):o},io=t=>{if(!t||t.isHidden)return 0;const o=t.radius>20?.9:.8;return b.value!==null?t.seriesIndex===b.value?Math.min(1,o+.1):o*.7:o},Pt=(t,o)=>{if(t)try{if(b.value===t.seriesIndex?b.value=null:b.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const a=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:o,chartId:p.chartId}});window.dispatchEvent(a)}}catch(a){console.error("Error in onBubbleClick:",a)}},co=(t,o)=>{const a=[`dss-bubble-fallback-${o}`];return t.isHighlighted&&a.push("dss-bubble-highlighted"),t.isDimmed&&a.push("dss-bubble-dimmed"),t.isHidden&&a.push("dss-bubble-hidden"),a.push(`dss-bubble-series-${t.seriesIndex}`),a.join(" ")},Zt=(t,o)=>{t&&(o.stopPropagation(),Ze.value=!0,b.value=t.seriesIndex,B.value.show=!1)},uo=(t,o)=>{let a;switch(t){case"x":a=o.originalX;break;case"y":a=o.originalY;break;case"size":a=o.originalSize;break;case"label":a=o.label;break;case"seriesName":a=o.seriesName;break;default:a=o[t]||""}const l=Ba.value[t];return typeof l=="function"?l(a,o):typeof a=="number"?a.toFixed(1):a?.toString()||""},mo=()=>{if(!Z.value||!B.value.data||B.value.data.length===0)return"Bubbles";const t=[],o=new Set;return B.value.data.forEach(a=>{if(a.seriesName&&a.label){const l=`${a.seriesName} - ${a.label}`;o.has(l)||(t.push(l),o.add(l))}else a.seriesName&&(o.has(a.seriesName)||(t.push(a.seriesName),o.add(a.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},jt=(t,o)=>{t&&(Ze.value=!1,b.value=null)},De=e.computed(()=>p.categories.length||Math.max(...ke.value.map(t=>t.data.length))),ho=e.computed(()=>{let t=0;return ke.value.forEach(o=>{o.data.forEach(a=>{typeof a=="number"&&(t=Math.max(t,a))})}),t||100}),Ut=e.computed(()=>{const t=[],o=De.value;for(let a=0;a<o;a++){const l=a*2*Math.PI/o-Math.PI/2,s=T.value+Math.cos(l)*F.value,n=Y.value+Math.sin(l)*F.value;t.push({x:s,y:n,angle:l,index:a})}return t}),vo=e.computed(()=>{const t=[],o=De.value;return Ut.value.forEach((a,l)=>{const s=F.value+15,n=l*2*Math.PI/o-Math.PI/2,i=T.value+Math.cos(n)*s,r=Y.value+Math.sin(n)*s+5;let u="middle",d="middle";Math.abs(Math.cos(n))>.5&&(u=Math.cos(n)>0?"start":"end"),Math.abs(Math.sin(n))>.5&&(d=Math.sin(n)>0?"hanging":"auto"),t.push({x:i,y:r,text:p.categories[l]||`Axis ${l+1}`,anchor:u,baseline:d})}),t}),go=e.ref(new Set),po=(t,o,a)=>{const l=`current-${a}`,s=go.value.has(l);return!s&&b.value===null?o.fillOpacity||_e.value:o.isHighlighted||s?(o.fillOpacity||_e.value)+.15:o.isDimmed?(o.fillOpacity||_e.value)*.3:o.fillOpacity||_e.value},fo=e.computed(()=>{if(!Ee.value)return[];const t=[],o=De.value;return ye.value.forEach((a,l)=>{const s=[],n=[],i=b.value===l,r=b.value!==null&&b.value!==l,u=I.value.has(l);for(let d=0;d<o;d++){const h=a.data[d]||0,E=h/ho.value*F.value,M=d*2*Math.PI/o-Math.PI/2,S=T.value+Math.cos(M)*E,C=Y.value+Math.sin(M)*E;s.push(`${S},${C}`),n.push({x:S,y:C,value:h,label:p.categories[d]||`Axis ${d+1}`,seriesName:a.name})}t.push({points:s.join(" "),dataPoints:n,color:j(l),fillOpacity:_e.value,seriesName:a.name,value:`${a.name}: ${a.data.join(", ")}`,isHighlighted:i,isDimmed:r,isHidden:u})}),t}),Pe=e.computed(()=>{const t=f.value;return t.logos.map((o,a)=>{const l=p.series[o.seriesIndex];if(!l||!l.data||l.data.length===0||I.value.has(o.seriesIndex))return null;let s,n;if(W.value){const r=l.data.map((u,d)=>({x:q(d),y:oe(u)}));if(t.animations.enabled&&!Ne.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(H.value.isAnimating||!H.value.hasAnimated))if(H.value.isAnimating){const u=H.value.currentFrame/H.value.totalFrames,d=Wt(t.animations.easing,Math.min(u,1)),h=So(r,d);s=h.x+(o.offsetX||0),n=h.y+(o.offsetY||0)}else s=r[0].x+(o.offsetX||0),n=r[0].y+(o.offsetY||0);else{const u=l.data.length-1,d=l.data[u];s=q(u)+(o.offsetX||0),n=oe(d)+(o.offsetY||0)}}else if(be.value||Ee.value){const r=Math.PI*2/t.logos.length*a;s=T.value+Math.cos(r)*(F.value+30)+(o.offsetX||0),n=Y.value+Math.sin(r)*(F.value+30)+(o.offsetY||0)}return{...o,x:s,y:n,seriesIndex:o.seriesIndex}}).filter(Boolean)}),yo=t=>{const o=document.querySelector(`.dss-logo-fallback-${t}`),a=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.opacity="0"),a&&(a.style.opacity="1")},ko=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const o=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.display="none")},Co=t=>{I.value.has(t)?I.value.delete(t):I.value.add(t)},xo=e.computed(()=>{if(!R.value.show&&!(ue.value&&B.value.show&&!m.value.isZooming))return{display:"none"};let t,o;if(ue.value&&B.value.show&&!m.value.isZooming){t=B.value.x+15,o=c.value.top;const a=Z.value?200:150;t+a>K.value&&(t=B.value.x-a-15),t<0&&(t=10),o<10&&(o=10)}else t=R.value.x,o=R.value.y;return{left:t+"px",top:o+"px"}}),ie=(t,o)=>{if(Le.value)return;const l=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let s=o.clientX-l.left+10,n=o.clientY-l.top-10;const i=200,r=120,u=K.value,d=se.value;s+i>u&&(s=o.clientX-l.left-i-10),n+r>d&&(n=o.clientY-l.top-r-10),s<0&&(s=10),n<0&&(n=10);let h;typeof t.categoryIndex=="number"?h=t.categoryIndex:typeof t.dataIndex=="number"?h=t.dataIndex:t.label&&p.categories.includes(t.label)&&(h=p.categories.indexOf(t.label)),R.value={show:!0,x:s,y:n,title:t.seriesName||t.label||"",value:t.value?.toString()||"",categoryIndex:h}},mt=e.ref(!1),Ze=e.ref(!1),ce=()=>{R.value.show=!1,B.value.show=!1,mt.value||(b.value=null)},Le=e.ref(!1),ze=(t,o)=>{Le.value=!0,R.value.show=!1,B.value.show=!1;const l=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let s=o.clientX-l.left+15,n=o.clientY-l.top-10;const i=250;s+i>K.value&&(s=o.clientX-l.left-i-15),s<0&&(s=10),n<0&&(n=10),lt.value={show:!0,x:s,y:n,content:t.texts,count:t.totalCount}},He=()=>{Le.value=!1,lt.value.show=!1},H=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),Wt=(t,o)=>{switch(t){case"linear":return o;case"ease":return o<.5?2*o*o:-1+(4-2*o)*o;case"ease-in":return o*o;case"ease-out":return o*(2-o);case"ease-in-out":return o<.5?2*o*o:-1+(4-2*o)*o;default:return o}},Ne=e.computed(()=>ia.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),qt=()=>{if(!$e.value||Ne.value){H.value.hasAnimated=!0;return}H.value.isAnimating=!0,H.value.currentFrame=0,H.value.totalFrames=Math.ceil(Mt.value/16.67);const t=()=>{const o=H.value.currentFrame/H.value.totalFrames,a=Wt(bt.value,Math.min(o,1));Mo(a),o<1?(H.value.currentFrame++,H.value.animationId=requestAnimationFrame(t)):wo()};H.value.animationId=requestAnimationFrame(t)},Mo=t=>{const o=document.querySelector(".dss-custom-chart-container");o&&o.style.setProperty("--dss-animation-progress",t)},wo=()=>{H.value.isAnimating=!1,H.value.hasAnimated=!0,H.value.animationId&&(cancelAnimationFrame(H.value.animationId),H.value.animationId=null)},bo=e.computed(()=>{if(!$e.value||Ne.value||H.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${Mt.value}ms`,t["--dss-animation-easing"]=Eo(bt.value),t["--dss-stagger-delay"]=`${me.value}ms`,t}),Eo=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",Bo=()=>{if(!$e.value||Ne.value)return"";const t=["dss-chart-animated"];return H.value.hasAnimated||t.push(`dss-animate-${xt.value}`),H.value.hasAnimated||(be.value?t.push("dss-animate-fill"):t.push(`dss-animate-${xt.value}`)),H.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>p.series,(t,o)=>{ra.value&&o&&H.value.hasAnimated&&(H.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>qt(),wt.value)}))},{deep:!0}),e.watch(()=>m.value.isZooming,(t,o)=>{o&&!t&&setTimeout(()=>{_t()},50)}),e.watch(()=>[m.value.scale,m.value.offsetX],()=>{!m.value.isZooming&&!m.value.isDragging&&_t()},{flush:"post"}),e.watch([la,sa],([t,o])=>{m.value.minScale=t,m.value.maxScale=o,(m.value.scale<t||m.value.scale>o)&&rt()},{immediate:!0}),e.watch(()=>p.locale,t=>{t&&t!==ht.value&&(ht.value=t)},{immediate:!0}),e.watch(()=>N.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",nt)}):document.removeEventListener("click",nt)}),e.onMounted(()=>{b.value=null,Ra(),$e.value&&!Ne.value?setTimeout(()=>qt(),wt.value):H.value.hasAnimated=!0,document.addEventListener("mousemove",Gt),document.addEventListener("mouseup",Qt),document.addEventListener("click",Lt)}),e.onUnmounted(()=>{H.value.animationId&&cancelAnimationFrame(H.value.animationId),m.value.zoomTimeout&&clearTimeout(m.value.zoomTimeout),document.removeEventListener("mousemove",Gt),document.removeEventListener("mouseup",Qt),document.removeEventListener("click",Lt),document.removeEventListener("click",nt)});const Gt=t=>{if(m.value.isDragging&&m.value.scale>1&&W.value){B.value.show=!1;const o=t.clientX-m.value.lastMouseX,{minX:a,maxX:l}=P.value,s=l-a||1,i=o*.8;m.value.offsetX+=i;const r=s/m.value.scale,u=s-r,d=0,h=-u/s*c.value.width,v=d;m.value.offsetX=Math.max(h,Math.min(v,m.value.offsetX)),m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY}},Qt=()=>{m.value.isDragging&&(m.value.isDragging=!1,setTimeout(()=>{!m.value.isDragging&&m.value.isZooming},100))},So=(t,o)=>{if(!t||t.length===0)return{x:0,y:0};if(t.length===1||o<=0)return t[0];if(o>=1)return t[t.length-1];let a=0;const l=[];for(let i=1;i<t.length;i++){const r=t[i].x-t[i-1].x,u=t[i].y-t[i-1].y,d=Math.sqrt(r*r+u*u);l.push(d),a+=d}const s=a*o;let n=0;for(let i=0;i<l.length;i++){const r=n+l[i];if(s<=r){const u=(s-n)/l[i],d=t[i],h=t[i+1];return{x:d.x+(h.x-d.x)*u,y:d.y+(h.y-d.y)*u}}n=r}return t[t.length-1]};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",Bo()]),style:e.normalizeStyle({width:K.value+"px",height:se.value+20+"px",...bo.value,cursor:Ka()}),"data-chart-type":X.value,ref_key:"containerEl",ref:We,onWheel:zt,onMousedown:Ga,onMousemove:_a,onMouseup:Qa,onMouseleave:Va,onDblclick:rt,onContextmenu:e.withModifiers(Da,["prevent"]),onClick:e.withModifiers(ve,["left"]),onWheelCapture:zt},[e.createElementVNode("div",Do,[e.createElementVNode("div",Lo,[G.value?(e.openBlock(),e.createElementBlock("div",zo,e.toDisplayString(G.value),1)):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",Ho,e.toDisplayString(J.value),1)):e.createCommentVNode("",!0)]),Xe.value?(e.openBlock(),e.createElementBlock("div",No,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.series,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${l}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":I.value.has(l),"dss-legend-hovered":b.value===l,"dss-legend-dimmed":b.value!==null&&b.value!==l}]),onClick:s=>Co(l),onMouseenter:s=>Sa(l),onMouseleave:$a,style:e.normalizeStyle({animationDelay:`${l*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:j(l)})},null,4),e.createElementVNode("span",Fo,e.toDisplayString(a.name),1)],46,Ao))),128))])):e.createCommentVNode("",!0)]),(e.openBlock(),e.createElementBlock("svg",{width:K.value,height:se.value,class:"dss-chart-svg","data-smooth":re.value,"data-animated":$e.value,ref_key:"svgEl",ref:qe},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Io,[e.createElementVNode("rect",{x:c.value.left,y:c.value.top,width:c.value.width,height:c.value.height*4},null,8,To)])]),W.value||Z.value?(e.openBlock(),e.createElementBlock("g",Yo,[yt.value?(e.openBlock(),e.createElementBlock("g",Ro,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oo.value,(a,l)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${l}`,x1:c.value.left,x2:c.value.right,y1:a.y,y2:a.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${l*50}ms`})},null,12,Oo))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Po,[e.createElementVNode("line",{x1:c.value.left,x2:c.value.right,y1:c.value.bottom,y2:c.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Zo),e.createElementVNode("line",{x1:c.value.left,x2:c.value.left,y1:c.value.top,y2:c.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,jo)]),e.createElementVNode("g",Uo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ut.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${l}`,x:a.x,y:a.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},e.toDisplayString(a.text),13,Wo))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(It.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${l}`,x:a.x,y:a.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${l*80}ms`})},e.toDisplayString(a.text),13,qo))),128)),Qe.value?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.left+c.value.width/2,y:c.value.bottom+45,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333"},e.toDisplayString(Qe.value),9,Go)):e.createCommentVNode("",!0),ft.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:15,y:c.value.top+12+c.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(-90, 15, ${c.value.top+c.value.height/2})`},e.toDisplayString(ft.value),9,Qo)):e.createCommentVNode("",!0)]),St.value.length>0?(e.openBlock(),e.createElementBlock("g",Ko,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(St.value,a=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${a.categoryIndex}`},[e.createElementVNode("g",Jo,[a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:c.value.bottom,y2:c.value.top,stroke:"#047395","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,el)):e.createCommentVNode("",!0),a.hasAuto&&!a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:c.value.bottom,y2:c.value.top,stroke:"#0dbf89","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,tl)):e.createCommentVNode("",!0),a.hasAuto&&a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:c.value.bottom,y2:c.value.top,stroke:"#047395","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,al)):e.createCommentVNode("",!0)]),a.hasManual&&a.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x+8,cy:Math.max(15,c.value.top-10),r:"14",fill:"#0dbf89",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,ol)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:a.x,cy:Math.max(15,c.value.top-10),r:"14",fill:a.hasManual&&a.hasAuto||a.hasManual?"#047395":"#0dbf89",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:l=>ze(a,l),onMouseleave:He},null,40,ll),e.createElementVNode("text",{x:a.x,y:Math.max(15,c.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(a.totalCount),9,sl)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",nl,[we.value?(e.openBlock(),e.createElementBlock("g",rl,[e.createElementVNode("g",il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rt.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${l}`},[a.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.barPath,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,cl)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x,y:a.y,width:a.width,height:a.height,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,ul))],64))),128))]),e.createElementVNode("g",dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${l}`,d:a.path,stroke:a.color,"stroke-width":a.isHighlighted?de.value+2:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${a.animationDelay}ms`})},null,14,ml))),128)),te.value>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.mixedLinePoints,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${l}`,cx:a.x,cy:a.y,r:a.isHighlighted?te.value+2:te.value,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,hl))),128)):e.createCommentVNode("",!0)])])):X.value==="line"?(e.openBlock(),e.createElementBlock("g",vl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${l}`,d:a.path,stroke:a.color,"stroke-width":a.isHighlighted?de.value+2:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${a.animationDelay}ms`})},null,14,gl))),128)),te.value>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(so.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${l}`,cx:a.x,cy:a.y,r:a.isHighlighted?te.value+2:te.value,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,pl))),128)):e.createCommentVNode("",!0)])):X.value==="area"?(e.openBlock(),e.createElementBlock("g",fl,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(dt.value,(a,l)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${l}`,id:`area-mask-${l}-${Q.chartId}`},[e.createElementVNode("rect",{x:c.value.left-10,y:c.value.top-10,width:c.value.width+20,height:c.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${c.value.width+20}px`})},null,12,kl)],8,yl))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(dt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${l}`,d:a.areaPath,fill:a.color,"fill-opacity":a.isHighlighted?kt.value+.2:kt.value,mask:`url(#area-mask-${l}-${Q.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden})},null,10,Cl))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(dt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${l}`,d:a.linePath,stroke:a.color,"stroke-width":a.isHighlighted?de.value+1:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${l*me.value}ms`})},null,14,xl))),128))])):X.value==="bar"?(e.openBlock(),e.createElementBlock("g",Ml,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rt.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${l}`},[a.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.barPath,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,wl)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x,y:a.y,width:a.width,height:a.height,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,bl))],64))),128))])):e.createCommentVNode("",!0)]),ue.value&&B.value.show&&!m.value.isZooming?(e.openBlock(),e.createElementBlock("g",El,[e.createElementVNode("line",{x1:B.value.x,x2:B.value.x,y1:c.value.top,y2:c.value.bottom,stroke:oa.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,Bl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${l}`,cx:B.value.x,cy:a.y,r:te.value+2,fill:a.color,stroke:"#fafafa","stroke-width":"2",opacity:"0.9"},null,8,Sl))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Z.value?(e.openBlock(),e.createElementBlock("g",$l,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${l}`},[a?(e.openBlock(),e.createElementBlock("g",_l,[e.createElementVNode("circle",{cx:a.x,cy:a.y,r:a.radius,fill:a.color,"fill-opacity":ro(a),stroke:a.color,"stroke-width":a.isHighlighted?3:1,"stroke-opacity":"0.8",class:e.normalizeClass(co(a,l)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:s=>Zt(a,s),onMouseleave:s=>jt(a),onClick:s=>Pt(a,s)},null,42,Vl),a.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:a.x-a.radius*.65,y:a.y-a.radius*.65,width:a.radius*1.3,height:a.radius*1.3,"xlink:href":a.imageUrl,class:e.normalizeClass(`dss-bubble-image-${l} ${a.isHighlighted?"dss-bubble-highlighted":""} ${a.isDimmed?"dss-bubble-dimmed":""} ${a.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${a.radius*.65}px at ${a.radius*.65}px ${a.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:io(a)}),onLoad:s=>Ja(l),onError:s=>eo(l),onMouseenter:s=>Zt(a,s),onMouseleave:s=>jt(a),onClick:s=>Pt(a,s)},null,46,Dl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),be.value?(e.openBlock(),e.createElementBlock("g",Ll,[X.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:T.value,cy:Y.value,r:F.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,zl)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":X.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ot.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${l}`,d:a.path,fill:a.color,"fill-opacity":a.isHighlighted?(a.opacity||.8)+.2:a.opacity||.8,stroke:a.color,"stroke-width":a.isHighlighted?2:1,class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,42,Nl))),128))],8,Hl),Bt.value?(e.openBlock(),e.createElementBlock("g",Al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(no.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${l}`,class:e.normalizeClass({"dss-label-highlighted":a.isHighlighted,"dss-label-dimmed":a.isDimmed})},[e.createElementVNode("line",{x1:a.pointerStartX,y1:a.pointerStartY,x2:a.pointerEndX,y2:a.pointerEndY,stroke:a.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},null,12,Fl),e.createElementVNode("line",{x1:a.pointerEndX,y1:a.pointerEndY,x2:a.horizontalEndX,y2:a.horizontalEndY,stroke:a.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({animationDelay:`${l*120}ms`})},null,12,Xl),e.createElementVNode("text",{x:a.textX,y:a.textY,"text-anchor":a.textAnchor,"font-size":Ca.value,"dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${l*150}ms`})},e.toDisplayString(a.text),13,Il)],2))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ee.value?(e.openBlock(),e.createElementBlock("g",Tl,[yt.value?(e.openBlock(),e.createElementBlock("g",Yl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ke.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${l}`,cx:T.value,cy:Y.value,r:a,fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${l*150}ms`})},null,12,Rl))),128)),e.createElementVNode("g",Ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ke.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${l}`},[e.createElementVNode("rect",{x:T.value-16,y:Y.value-a-7,width:"32",height:"16",fill:"#fafafa",stroke:"none"},null,8,Pl),e.createElementVNode("text",{x:T.value,y:Y.value-a+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(ua(l)),9,Zl)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ut.value,(a,l)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${l}`,x1:T.value,x2:a.x,y1:Y.value,y2:a.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},null,12,jl))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ul,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vo.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${l}`,x:a.x+Math.cos(l*2*Math.PI/De.value-Math.PI/2)*16,y:a.y+Math.sin(l*2*Math.PI/De.value-Math.PI/2)*16,"text-anchor":a.anchor,"dominant-baseline":a.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${l*120}ms`})},e.toDisplayString(a.text.charAt(0).toUpperCase()+a.text.slice(1)),13,Wl))),128))]),e.createElementVNode("g",ql,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fo.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${l}`},[e.createElementVNode("polygon",{points:a.points,fill:a.color,"fill-opacity":po("current",a,l),stroke:a.color,"stroke-width":a.isHighlighted?de.value+1:de.value,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${l*me.value}ms`,transition:"all 0.2s ease"}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,Gl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataPoints,(s,n)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${l}-${n}`,cx:s.x,cy:s.y,r:a.isHighlighted?te.value+1:te.value>0?te.value:0,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${l*me.value+n*50}ms`,transition:"all 0.2s ease"}),onMouseover:i=>ie(s,i),onMouseleave:ce},null,46,Ql))),128))]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("g",Kl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pe.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${l}`,cx:a.x,cy:a.y,r:a.width/2,fill:j(a.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${l}`),style:e.normalizeStyle({animationDelay:`${l*200}ms`})},null,14,Jl))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pe.value,(a,l)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${l}`,x:a.x-a.width/2,y:a.y-a.height/2,width:a.width,height:a.height,"xlink:href":a.url,onLoad:s=>yo(l),onError:s=>ko(l),class:e.normalizeClass(`dss-logo-image-${l}`),"clip-path":`circle(${a.width/2}px at ${a.width/2}px ${a.height/2}px)`,style:e.normalizeStyle({animationDelay:`${l*200}ms`})},null,46,es))),128))])],8,Xo)),et.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:K.value+"px",height:se.value+"px",backgroundImage:`url('${Et.value}')`,backgroundRepeat:"no-repeat",...fa.value,opacity:tt.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ga.value,(a,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+a.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:a.x+"px",top:a.y+"px",width:xe.value+"px",height:xe.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(s=>Ta(a),["stop"])},[e.createElementVNode("img",{src:$t(a),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,as)],12,ts)),[[e.vShow,ha.value]])),128)),R.value.show||ue.value&&B.value.show&&!m.value.isZooming?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":ue.value&&B.value.show&&!m.value.isZooming}]),style:e.normalizeStyle(xo.value)},[!ue.value||!B.value.show||m.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",os,[e.createElementVNode("div",ls,e.toDisplayString(R.value.title),1),e.createElementVNode("div",ss,e.toDisplayString(R.value.value),1)]),R.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[he(R.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",ns,[o[4]||(o[4]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",rs,e.toDisplayString(e.unref(L)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(R.value.categoryIndex).flagGroups,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${l}`},[e.createElementVNode("div",is,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(a.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.flags,(s,n)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${l}-${n}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",cs,[e.createElementVNode("div",us,e.toDisplayString(s.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),he(R.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",ds,[o[5]||(o[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ms,e.toDisplayString(e.unref(L)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(R.value.categoryIndex).markers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${l}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("div",hs,[e.createElementVNode("div",vs,e.toDisplayString(a.title),1),a.description?(e.openBlock(),e.createElementBlock("div",gs,e.toDisplayString(a.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ps,[e.createElementVNode("div",fs,e.toDisplayString(Z.value?mo():Q.categories[B.value.categoryIndex]||`Category ${B.value.categoryIndex+1}`),1),Z.value?(e.openBlock(),e.createElementBlock("div",ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${l}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(a.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${l}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",ks,e.toDisplayString(a.seriesName)+":",1),e.createElementVNode("span",Cs,e.toDisplayString(a.value),1)]))),128))]),he(B.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",xs,[o[6]||(o[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ms,e.toDisplayString(e.unref(L)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(B.value.categoryIndex).flagGroups,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${l}`},[e.createElementVNode("div",ws,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(a.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.flags,(s,n)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${l}-${n}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",bs,[e.createElementVNode("div",Es,e.toDisplayString(s.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),he(B.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Bs,[o[7]||(o[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ss,e.toDisplayString(e.unref(L)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(B.value.categoryIndex).markers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${l}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("div",$s,[e.createElementVNode("div",_s,e.toDisplayString(a.title),1),a.description?(e.openBlock(),e.createElementBlock("div",Vs,e.toDisplayString(a.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),W.value&&Ce.value&&m.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-zoom-indicator",onClick:rt},[o[8]||(o[8]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(m.value.scale*100))+"% "+e.toDisplayString(e.unref(L)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,Vo),N.value.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-chart-context-menu",style:e.normalizeStyle({left:N.value.x+"px",top:N.value.y+"px"}),onClick:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},[ae.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:qa},e.toDisplayString(e.unref(L)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),O.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-context-menu-item",onClick:Ya},e.toDisplayString(e.unref(L)("chart.contextMenu.clearAllMarkers")),1)):e.createCommentVNode("",!0),ae.value.addMarker&&(ae.value.downloadSvg||ae.value.downloadPng||ae.value.downloadCsv||Je.value.length>0)?(e.openBlock(),e.createElementBlock("div",Ds)):e.createCommentVNode("",!0),ae.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:Za},e.toDisplayString(e.unref(L)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),ae.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:ja},e.toDisplayString(e.unref(L)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),ae.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:5,class:"dss-context-menu-item",onClick:Ua},e.toDisplayString(e.unref(L)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),Je.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[ae.value.downloadSvg||ae.value.downloadPng||ae.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",Ls)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Je.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+l},[a.separator?(e.openBlock(),e.createElementBlock("div",zs)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(za(a)),style:e.normalizeStyle(Ha(a)),onClick:s=>Wa(a)},[a.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:La(a),class:"dss-custom-menu-content"},null,8,Ns)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.icon?(e.openBlock(),e.createElementBlock("span",As,e.toDisplayString(a.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.label),1)],64))],14,Hs)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),D.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-marker-modal-overlay",onClick:Me},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:o[3]||(o[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Fs,[e.createElementVNode("h3",null,e.toDisplayString(Ve.value?e.unref(L)("chart.modalMarker.editMarker"):e.unref(L)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:Me},"×")]),e.createElementVNode("div",Xs,[o[9]||(o[9]=e.createElementVNode("div",{class:"dss-form-group"},null,-1)),e.createElementVNode("div",Is,[e.createElementVNode("label",Ts,e.toDisplayString(e.unref(L)("chart.modalMarker.description")),1),e.withDirectives(e.createElementVNode("textarea",{id:"dss-marker-description","onUpdate:modelValue":o[1]||(o[1]=a=>D.value.description=a),placeholder:e.unref(L)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"3"},null,8,Ys),[[e.vModelText,D.value.description]])]),e.createElementVNode("div",Rs,[e.createElementVNode("label",null,e.toDisplayString(e.unref(L)("chart.modalMarker.iconPreview")),1),e.createElementVNode("div",Os,[e.createElementVNode("img",{src:$t({type:D.value.type}),alt:"Marker Icon Preview",class:"preview-icon",style:{width:"32px",height:"32px","border-radius":"50%",border:"2px solid #ddd"},onError:o[2]||(o[2]=a=>a.target.style.display="none")},null,40,Ps)])])]),e.createElementVNode("div",Zs,[e.createElementVNode("div",js,[Ve.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:Xa},e.toDisplayString(e.unref(L)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Us,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:Me},e.toDisplayString(e.unref(L)("chart.modalMarker.cancel")),1),e.createElementVNode("button",{class:"dss-btn dss-btn-primary",onClick:Fa,disabled:!(D.value.description&&D.value.description.length)},e.toDisplayString(Ve.value?e.unref(L)("chart.modalMarker.save"):e.unref(L)("chart.contextMenu.addMarker")),9,Ws)])])])])):e.createCommentVNode("",!0)],64))}}),Qs={contextMenu:{addMarker:"Add Marker",clearAllMarkers:"Clear All Markers",downloadSvg:"Download SVG",downloadPng:"Download PNG",downloadCsv:"Download CSV"},modalMarker:{editMarker:"Edit Marker",title:"Title",description:"Description",iconType:"Icon Type",defaultIcon:"Default Logo",iconPreview:"Icon Preview",deleteMarker:"Delete Marker",cancel:"Cancel",save:"Save",placeholderTitle:"Enter marker title",placeholderDescription:"Enter marker description (optional)"},zoom:{doubleClickToReset:"(Double-click to reset)"},csv:{chartTitle:"Chart Title",chartSubtitle:"Chart Subtitle",generated:"Generated"},fallback:{item:"Item",axis:"Axis"},tooltip:{flags:"Flags",markers:"Markers",manualFlags:"Manual Flags",autoFlags:"Auto Flags"}},Ks={chart:Qs},Js={contextMenu:{addMarker:"Ajouter un marqueur",clearAllMarkers:"Effacer tous les marqueurs",downloadSvg:"Télécharger SVG",downloadPng:"Télécharger PNG",downloadCsv:"Télécharger CSV"},modalMarker:{editMarker:"Modifier le marqueur",title:"Titre",description:"Description",iconType:"Type d'icône",defaultIcon:"Logo par défaut",iconPreview:"Prévisualisation de l'icône",deleteMarker:"Suprimer le marqueur",cancel:"Annuler",save:"Sauvegarder",placeholderTitle:"Entrez le titre du marqueur",placeholderDescription:"Entrez la description du marqueur (optionnel)"},zoom:{doubleClickToReset:"(Double-cliquez pour réinitialiser)"},csv:{chartTitle:"Titre du graphique",chartSubtitle:"Sous-titre du graphique",generated:"Généré"},fallback:{item:"Objet",axis:"Axe"},tooltip:{flags:"Drapeaux",markers:"Marqueurs",manualFlags:"Drapeaux manuels",autoFlags:"Drapeaux automatiques"}},en={chart:Js},tn={contextMenu:{addMarker:"Markering toevoegen",clearAllMarkers:"Wis alle markers",downloadSvg:"SVG downloaden",downloadPng:"PNG downloaden",downloadCsv:"CSV downloaden"},modalMarker:{editMarker:"Markering bewerken",title:"Titel",description:"Beschrijving",iconType:"Icoon Type",defaultIcon:"Standaard Logo",iconPreview:"Icoon Voorbeeld",deleteMarker:"Markering verwijderen",cancel:"Annuleren",save:"Opslaan",placeholderTitle:"Voer marker titel in",placeholderDescription:"Voer marker beschrijving in (optioneel)"},zoom:{doubleClickToReset:"(Dubbelklik om te resetten)"},csv:{chartTitle:"Grafiek Titel",chartSubtitle:"Grafiek Ondertitel",generated:"Gegenereerd"},fallback:{item:"Item",axis:"As"},tooltip:{flags:"Vlaggen",markers:"Markeringen",manualFlags:"Handmatige Vlaggen",autoFlags:"Automatische Vlaggen"}},an={chart:tn},je={en:Ks,fr:en,nl:an};function on(Q){if(!Q||!Q.global)return;const Ue=Q.global.availableLocales||[];Object.keys(je).forEach(L=>{Ue.includes(L)?Q.global.mergeLocaleMessage(L,je[L]):console.error(`⊗ Skipped DSP translations for: ${L} (not in app)`)})}Jt.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:je});exports.DSSChart=Gs;exports.DSSChartMessages=je;exports.addDSSChartTranslations=on;
|