dsp-semactic 0.7.13 → 0.7.15

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 CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ho=require("vue-i18n"),xs={key:0,class:"dss-datepicker__input-wrap dss-datepicker__input-wrap--readonly"},Es=["value"],Ss=["placeholder","value","disabled"],Vs=["placeholder","value"],Ns={key:0,class:"dss-datepicker__range-values"},Bs=["placeholder","value"],_s={key:0,class:"dss-datepicker__comparison-range"},Ms={class:"dss-datepicker__comparison-date"},$s={class:"dss-datepicker__comparison-date"},Ls=["placeholder","value"],Ts=["aria-label","aria-pressed"],Ds=["aria-selected","onClick"],As={class:"dss-datepicker__list-item-label"},Hs={key:0,class:"dss-datepicker__list-item-check",width:"16",height:"16",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},Rs={key:1,class:"dss-datepicker__list-empty"},Fs={key:1,class:"dss-datepicker__double-wrap"},Is={key:0,class:"dss-datepicker__side-panel"},zs={key:0,class:"dss-datepicker__quick-select","aria-label":"Quick range"},Ps=["disabled","onClick"],Os={key:1,class:"dss-datepicker__comparison-panel"},Ws={key:0,class:"dss-datepicker__comparison-modes"},qs=["onClick"],Zs={class:"dss-datepicker__double-content"},Us={class:"dss-datepicker__double-calendars"},Ys={class:"dss-datepicker__double-calendar"},Xs={class:"dss-datepicker__calendar-header"},js=["aria-label"],Ks={class:"dss-datepicker__month-year-row"},Gs=["aria-label"],Qs={class:"dss-datepicker__weekdays"},Js={class:"dss-datepicker__grid"},er=["disabled","onClick","onMouseenter"],tr={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},lr={class:"dss-datepicker__double-calendar"},nr={class:"dss-datepicker__calendar-header"},or=["aria-label"],ar={class:"dss-datepicker__month-year-row"},sr=["aria-label"],rr={class:"dss-datepicker__weekdays"},ir={class:"dss-datepicker__grid"},cr=["disabled","onClick","onMouseenter"],ur={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},dr={key:0,class:"dss-datepicker__comparison-panel dss-datepicker__comparison-panel--bottom"},mr={key:0,class:"dss-datepicker__comparison-modes dss-datepicker__comparison-modes--inline"},pr=["onClick"],vr={key:0,class:"dss-datepicker__comparison-panel dss-datepicker__comparison-panel--single"},fr={key:0,class:"dss-datepicker__comparison-modes"},hr=["onClick"],gr={class:"dss-datepicker__calendar-header"},yr=["aria-label"],kr={class:"dss-datepicker__month-year-row"},Cr=["aria-label"],br={class:"dss-datepicker__weekdays"},wr={class:"dss-datepicker__grid"},xr=["disabled","onClick","onMouseenter"],Er={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},Sr={class:"dss-datepicker__calendar-header"},Vr={class:"dss-datepicker__month-year-row"},Nr={class:"dss-datepicker__month-year dss-datepicker__month-year--static"},Br={class:"dss-datepicker__months-grid"},_r=["onClick"],Mr={class:"dss-datepicker__calendar-header dss-datepicker__calendar-header--center"},$r={class:"dss-datepicker__month-year"},Lr={class:"dss-datepicker__years-grid"},Tr=["data-year","onClick"],Aa=27,Xn=8,ga={__name:"DSSDatepicker",props:{mode:{type:String,default:"single",validator:_=>["single","range","singleFromAvailable","rangeFromAvailable","listFromAvailable","readonly"].includes(_)},modelValue:{type:[Date,Object],default:null},availableDates:{type:Array,default:()=>[]},minDate:{type:Date,default:null},maxDate:{type:Date,default:null},exceptDates:{type:Array,default:()=>[]},doubleCalendar:{type:Boolean,default:!1},quickSelect:{type:Boolean,default:!0},quickSelectOptions:{type:Array,default:null},comparisonEnabled:{type:Boolean,default:!1},comparisonValue:{type:Object,default:()=>({start:null,end:null})},comparisonControlsPlacement:{type:String,default:"side",validator:_=>["side","bottom"].includes(_)},comparisonModeOptions:{type:Array,default:null},placeholder:{type:String,default:""}},emits:["update:modelValue","update:comparisonValue"],setup(_,{emit:J}){const N=_,L=J,{t:oe,locale:W}=ho.useI18n(),A=e.ref(!1),de=e.ref("days"),dt=new Date,ee=e.computed(()=>N.minDate instanceof Date?N.minDate:dt),h=e.ref(ee.value.getMonth()),we=e.ref(ee.value.getFullYear()),ye=e.ref(ee.value.getMonth()),Q=e.ref(ee.value.getFullYear()),K=e.ref(ee.value.getMonth()),he=e.ref(ee.value.getFullYear()),Re=e.ref("start"),ge=e.ref("start"),Ae=e.ref(null),Z=e.ref(null),ze=e.ref(!1),Ye=e.ref("previousPeriod"),_e=e.ref("primary"),Xe=e.ref({start:null,end:null});function U(){const k=ee.value,w=k.getMonth(),E=k.getFullYear(),j=w===11?0:w+1,Ce=w===11?E+1:E;return{left:{month:w,year:E},right:{month:j,year:Ce}}}const He=e.ref(null),Ke=e.ref(null),ke=e.ref(null),Me=e.ref(null),rt=e.ref(null),yt=e.ref(null),mt=e.ref(null),Qt=e.ref(null),xe=new Date().getFullYear(),Jt=e.computed(()=>["single","singleFromAvailable"].includes(N.mode)),et=e.computed(()=>["range","rangeFromAvailable"].includes(N.mode)),lt=e.computed(()=>N.mode==="listFromAvailable"),kt=e.computed(()=>{if(!["single","singleFromAvailable","listFromAvailable"].includes(N.mode))return null;const k=N.modelValue;return k instanceof Date?k:null}),Rt=e.computed(()=>{if(!et.value)return{start:null,end:null};const k=N.modelValue;return!k||typeof k!="object"?{start:null,end:null}:{start:k.start instanceof Date?k.start:null,end:k.end instanceof Date?k.end:null}}),ct=e.computed(()=>Et(N.comparisonValue)),ht=e.computed(()=>N.comparisonEnabled&&et.value),pt=e.computed(()=>ht.value&&N.comparisonControlsPlacement==="side"),Xt=e.computed(()=>ht.value&&N.comparisonControlsPlacement==="bottom"),Ct=e.computed(()=>ht.value&&ze.value&&Ye.value==="custom"&&_e.value==="comparison"),Pt={previousPeriod:"datepicker.comparison.previousPeriod",previousYear:"datepicker.comparison.previousYear",custom:"datepicker.comparison.custom"},pe=[{id:"previousPeriod",labelKey:"datepicker.comparison.previousPeriod"},{id:"previousYear",labelKey:"datepicker.comparison.previousYear"},{id:"custom",labelKey:"datepicker.comparison.custom"}],H=e.computed(()=>{const w=(Array.isArray(N.comparisonModeOptions)&&N.comparisonModeOptions.length?N.comparisonModeOptions:pe).map(E=>typeof E=="string"?{id:E,labelKey:Pt[E]}:!E||typeof E!="object"||!E.id?null:{...E,labelKey:E.labelKey||Pt[E.id]}).filter(E=>E&&Pt[E.id]);return w.length?w:pe});function Y(k){return k.label?k.label:k.labelKey?oe(k.labelKey):k.id}function ie(k){return H.value.some(w=>w.id===k)}function fe(){if(ie(Ye.value))return;const k=H.value[0]?.id||"previousPeriod";Ye.value=k,_e.value=k==="custom"?"comparison":"primary",ze.value&&k!=="custom"&&Bl()}function Fe(k){if(!k||!(k instanceof Date))return"";const w=k.getDate(),E=k.getMonth()+1,j=k.getFullYear(),Ce=qe=>String(qe).padStart(2,"0");return`${Ce(w)}/${Ce(E)}/${j}`}function tt(k){return k instanceof Date&&!Number.isNaN(k.getTime())?new Date(k.getFullYear(),k.getMonth(),k.getDate()):null}function Et(k){return!k||typeof k!="object"?{start:null,end:null}:{start:tt(k.start),end:tt(k.end)}}function Se(k){const w=Et(k),{start:E,end:j}=w;return E&&j&&E>j?{start:j,end:E}:w}function ot(k){const{start:w,end:E}=Se(k);return!w&&!E?"":!w||!E?Fe(w||E):w&&E&&yl(w,E)?Fe(w):`${Fe(w||E)} - ${Fe(E||w)}`}const bt=e.computed(()=>Fe(kt.value)),el=e.computed(()=>ot(Rt.value)),re=e.computed(()=>{const{start:k,end:w}=Se(ct.value);return!k||!w?null:{start:Fe(k),end:Fe(w)}}),X=e.computed(()=>{if(N.mode!=="readonly")return"—";const k=N.modelValue;if(k instanceof Date)return Fe(k)||"—";if(k&&typeof k=="object"&&("start"in k||"end"in k)){const w=k.start instanceof Date?k.start:null,E=k.end instanceof Date?k.end:null;if(!w&&!E)return"—";const j=!E||w&&w<=E?w:E,Ce=!w||E&&E>=w?E:w;return yl(j,Ce)?Fe(j):`${Fe(j)} - ${Fe(Ce)}`}return"—"});e.computed(()=>{const k=new Date(we.value,h.value,1);return new Intl.DateTimeFormat(W.value,{month:"long",year:"numeric"}).format(k)});const te=e.computed(()=>Z.value==="left"?ye.value:Z.value==="right"?K.value:h.value),ce=e.computed(()=>Z.value==="left"?Q.value:Z.value==="right"?he.value:we.value),Ve=e.computed(()=>{const k=new Date(we.value,h.value,1);return new Intl.DateTimeFormat(W.value,{month:"long"}).format(k)}),nt=e.computed(()=>{const k=new Date(ce.value,te.value,1);return new Intl.DateTimeFormat(W.value,{month:"long"}).format(k)}),xt=e.computed(()=>{const k=new Intl.DateTimeFormat(W.value,{month:"short"});return Array.from({length:12},(w,E)=>k.format(new Date(2024,E,1)))}),dl=e.computed(()=>{const w=(Z.value?ce.value:we.value)-Math.floor(Aa/2);return Array.from({length:Aa},(E,j)=>w+j)}),Vt=e.computed(()=>{const k=dl.value;return k.length?`${k[0]} – ${k[k.length-1]}`:""});function sl(k){return k===7?0:k}function D(k){try{const w=new Intl.Locale(k);if(w.weekInfo?.firstDay!=null)return sl(w.weekInfo.firstDay)}catch{}return 1}function V(k){const w=new Date(2024,0,1),E=(w.getDay()-k+7)%7,j=new Date(w);return j.setDate(w.getDate()-E),j}const B=e.computed(()=>D(W.value)),ae=e.computed(()=>{const k=new Intl.DateTimeFormat(W.value,{weekday:"short"}),w=V(B.value),E=[];for(let j=0;j<7;j++){const Ce=new Date(w);Ce.setDate(w.getDate()+j),E.push(k.format(Ce).slice(0,2))}return E});function se(k,w,E){const j=new Date(k,w,1),Ce=new Date(k,w+1,0),qe=(j.getDay()-E+7)%7,Ie=Ce.getDate(),at=[];for(let f=0;f<qe;f++)at.push(null);for(let f=1;f<=Ie;f++)at.push(new Date(k,w,f));return at}const je=e.computed(()=>se(we.value,h.value,B.value)),St=e.computed(()=>se(Q.value,ye.value,B.value)),ut=e.computed(()=>se(he.value,K.value,B.value));e.computed(()=>{const k=new Date(Q.value,ye.value,1);return new Intl.DateTimeFormat(W.value,{month:"long",year:"numeric"}).format(k)}),e.computed(()=>{const k=new Date(he.value,K.value,1);return new Intl.DateTimeFormat(W.value,{month:"long",year:"numeric"}).format(k)});const Ge=e.computed(()=>{const k=new Date(Q.value,ye.value,1);return new Intl.DateTimeFormat(W.value,{month:"long"}).format(k)}),_t=e.computed(()=>{const k=new Date(he.value,K.value,1);return new Intl.DateTimeFormat(W.value,{month:"long"}).format(k)}),Nt=e.computed(()=>N.availableDates&&N.availableDates.length>0),vt={all:"datepicker.quickSelect.allDates",last2:"datepicker.quickSelect.last2Dates",last3:"datepicker.quickSelect.last3Dates",last4:"datepicker.quickSelect.last4Dates",last5:"datepicker.quickSelect.last5Dates",today:"datepicker.quickSelect.today",lastWeek:"datepicker.quickSelect.lastWeek",last15Days:"datepicker.quickSelect.last15Days",last30Days:"datepicker.quickSelect.last30Days",thisMonth:"datepicker.quickSelect.thisMonth",lastMonth:"datepicker.quickSelect.lastMonth",last3Months:"datepicker.quickSelect.last3Months",last6Months:"datepicker.quickSelect.last6Months",last12Months:"datepicker.quickSelect.last12Months",lastYear:"datepicker.quickSelect.lastYear"},Lt=e.computed(()=>Nt.value?[{id:"all",labelKey:"datepicker.quickSelect.allDates"},{id:"last2",labelKey:"datepicker.quickSelect.last2Dates"},{id:"last3",labelKey:"datepicker.quickSelect.last3Dates"},{id:"last4",labelKey:"datepicker.quickSelect.last4Dates"},{id:"last5",labelKey:"datepicker.quickSelect.last5Dates"}]:[{id:"today",labelKey:"datepicker.quickSelect.today"},{id:"lastWeek",labelKey:"datepicker.quickSelect.lastWeek"},{id:"last15Days",labelKey:"datepicker.quickSelect.last15Days"},{id:"last30Days",labelKey:"datepicker.quickSelect.last30Days"},{id:"thisMonth",labelKey:"datepicker.quickSelect.thisMonth"},{id:"lastMonth",labelKey:"datepicker.quickSelect.lastMonth"},{id:"last3Months",labelKey:"datepicker.quickSelect.last3Months"},{id:"last6Months",labelKey:"datepicker.quickSelect.last6Months"},{id:"last12Months",labelKey:"datepicker.quickSelect.last12Months"},{id:"lastYear",labelKey:"datepicker.quickSelect.lastYear"}]),Ht=e.computed(()=>(Array.isArray(N.quickSelectOptions)&&N.quickSelectOptions.length?N.quickSelectOptions:Lt.value).map(w=>typeof w=="string"?{id:w,labelKey:vt[w]}:!w||typeof w!="object"||!w.id?null:{...w,labelKey:w.labelKey||vt[w.id]}).filter(w=>w&&w.id));function Mt(k){return k.label?k.label:k.labelKey?oe(k.labelKey):k.id}const wl=e.ref({top:0,left:0}),jl=e.ref("left");let El=null;function rl(){A.value&&e.nextTick(()=>{A.value&&(El!==null&&window.cancelAnimationFrame(El),El=window.requestAnimationFrame(()=>{El=null,ml()}))})}function ml(){if(!rt.value||!A.value)return;const k=rt.value.getBoundingClientRect(),w=window.innerWidth||document.documentElement.clientWidth,E=window.innerHeight||document.documentElement.clientHeight;let j=k.left,Ce=k.bottom+4;const qe=yt.value;if(qe){const Ie=qe.offsetWidth,at=qe.offsetHeight;jl.value==="right"||j+Ie>w-Xn?(jl.value="right",j=k.right-Ie):jl.value="left";const g=Math.max(Xn,w-Ie-Xn);if(j=Math.min(Math.max(j,Xn),g),Ce+at>E-Xn){const S=k.top-4-at;S>=Xn?Ce=S:Ce=Math.max(Xn,E-at-Xn)}}wl.value={top:Ce,left:j}}const un=e.computed(()=>!rt.value||!A.value?{}:{position:"fixed",left:`${wl.value.left}px`,top:`${wl.value.top}px`,zIndex:1002});function yl(k,w){return!k||!w?!1:k.getFullYear()===w.getFullYear()&&k.getMonth()===w.getMonth()&&k.getDate()===w.getDate()}function ft(k){return new Date(k.getFullYear(),k.getMonth(),k.getDate()).getTime()}function zl(k){return!N.availableDates||!N.availableDates.length?!0:N.availableDates.some(w=>w instanceof Date&&yl(w,k))}function Kl(k){const w=ft(k);return!(N.minDate instanceof Date&&w<ft(N.minDate)||N.maxDate instanceof Date&&w>ft(N.maxDate))}function Hl(k){const w=new Date(k);return new Date(w.getFullYear(),w.getMonth(),w.getDate())}function Rn(k){return Math.floor(Date.UTC(k.getFullYear(),k.getMonth(),k.getDate())/864e5)}function Gl(k,w){return new Date(k.getFullYear(),k.getMonth(),k.getDate()+w)}function bn(k){return k.filter(w=>Kl(w))}function Bn(k,w){if(!(k instanceof Date)||!(w instanceof Date))return null;let E=ft(k),j=ft(w);if(E>j&&([E,j]=[j,E]),N.minDate instanceof Date){const Ce=ft(N.minDate);E=Math.max(E,Ce),j=Math.max(j,Ce)}if(N.maxDate instanceof Date){const Ce=ft(N.maxDate);E=Math.min(E,Ce),j=Math.min(j,Ce)}return E>j?null:{start:Hl(E),end:Hl(j)}}function nn(k){return!N.exceptDates||!N.exceptDates.length?!1:N.exceptDates.some(w=>w instanceof Date&&yl(w,k))}function Rl(k){return nn(k)?!1:["singleFromAvailable","rangeFromAvailable"].includes(N.mode)?zl(k)&&Kl(k):Kl(k)}function dn(k){const w=kt.value,E=Rt.value,j=ct.value,Ce=ft(k),qe=et.value&&E.start&&E.end&&Ce>Math.min(ft(E.start),ft(E.end))&&Ce<Math.max(ft(E.start),ft(E.end)),Ie=et.value&&E.start&&yl(k,E.start),at=et.value&&E.end&&yl(k,E.end),f=Ie&&at,g=ht.value&&ze.value,S=g&&j.start&&yl(k,j.start),F=g&&j.end&&yl(k,j.end),z=S&&F,Qe=g&&j.start&&j.end&&Ce>Math.min(ft(j.start),ft(j.end))&&Ce<Math.max(ft(j.start),ft(j.end)),Te=Jt.value&&w&&yl(k,w)||Ie||at;let Ft=!1,Le=!1;const st=Ct.value?j:E;if(et.value&&st.start&&!st.end&&Ae.value){const ne=ft(st.start),ll=ft(Ae.value),Ze=Math.min(ne,ll),Kn=Math.max(ne,ll);Ct.value?Le=Ce>Ze&&Ce<Kn:Ft=Ce>Ze&&Ce<Kn}return{"dss-datepicker__day--comparison-start":S&&!z&&!Te,"dss-datepicker__day--comparison-end":F&&!z&&!Te,"dss-datepicker__day--comparison-single":z&&!Te,"dss-datepicker__day--in-comparison-range":Qe&&!S&&!F&&!Ie&&!at,"dss-datepicker__day--in-comparison-preview":Le&&!S&&!F&&!Qe&&!Ie&&!at,"dss-datepicker__day--selected":Te&&!f,"dss-datepicker__day--range-start":Ie&&!f,"dss-datepicker__day--range-end":at&&!f,"dss-datepicker__day--range-single":f,"dss-datepicker__day--in-range":qe&&!Ie&&!at,"dss-datepicker__day--in-range-preview":Ft&&!Ie&&!at&&!qe,"dss-datepicker__day--disabled":!Rl(k)}}function Sl(k){if(!et.value)return;const w=Ct.value?ct.value:Rt.value;if(!w.start||w.end){Ae.value=null;return}if(!Rl(k)){Ae.value=null;return}Ae.value=new Date(k.getFullYear(),k.getMonth(),k.getDate())}function mn(){Ae.value=null}function Wl(k=Rt.value){if(!N.doubleCalendar||!et.value)return;const w=Et(k),{start:E,end:j}=w;if(E&&j){const Ie=E<=j?E:j,at=E<=j?j:E,f=Ie.getMonth(),g=Ie.getFullYear(),S=at.getMonth(),F=at.getFullYear();if(f!==S||g!==F){const z=ye.value===f&&Q.value===g,Qe=K.value===S&&he.value===F;if(z&&Qe)return;ye.value=f,Q.value=g,K.value=S,he.value=F}else{const z=f===0?11:f-1,Qe=f===0?g-1:g;ye.value===z&&Q.value===Qe&&K.value===f&&he.value===g||(ye.value=f,Q.value=g,f===11?(K.value=0,he.value=g+1):(K.value=f+1,he.value=g))}return}const Ce=E||j;if(Ce){const Ie=Ce.getMonth(),at=Ce.getFullYear(),f=ye.value===Ie&&Q.value===at,g=K.value===Ie&&he.value===at;if(f||g)return;ye.value=Ie,Q.value=at,Ie===11?(K.value=0,he.value=at+1):(K.value=Ie+1,he.value=at);return}const qe=U();ye.value=qe.left.month,Q.value=qe.left.year,K.value=qe.right.month,he.value=qe.right.year}const pn=e.computed(()=>new Intl.DateTimeFormat(W.value,{day:"2-digit",month:"long",year:"numeric"})),on=e.computed(()=>{if(!lt.value)return[];const k=(N.availableDates||[]).filter(E=>E instanceof Date&&!Number.isNaN(E.getTime())).filter(E=>!nn(E)&&Kl(E)).map(E=>new Date(E.getFullYear(),E.getMonth(),E.getDate()));k.sort((E,j)=>j.getTime()-E.getTime());const w=kt.value;return k.map(E=>({date:E,ts:E.getTime(),label:pn.value.format(E),selected:!!(w&&yl(E,w))}))});function il(){if(A.value){ql();return}rt.value=Me.value?.closest(".dss-datepicker__input-wrap"),jl.value="left",A.value=!0,rl(),e.nextTick(()=>{Qt.value?.querySelector(".dss-datepicker__list-item--selected")?.scrollIntoView({block:"nearest",behavior:"auto"})})}function jn(k){if(!(k instanceof Date))return;const w=new Date(k.getFullYear(),k.getMonth(),k.getDate());L("update:modelValue",w),ql()}function Fn(k="start"){if(N.mode==="readonly")return;Re.value=k;const w=kt.value,E=Rt.value;if(Jt.value&&w)h.value=w.getMonth(),we.value=w.getFullYear();else if(et.value)if(N.doubleCalendar)Wl();else{const j=k==="start"&&E.start?E.start:E.end||E.start;j&&(h.value=j.getMonth(),we.value=j.getFullYear())}rt.value=Jt.value?He.value?.closest(".dss-datepicker__input-wrap"):Ke.value,de.value="days",Z.value=null,jl.value="left",A.value=!0,rl()}function ql(){de.value="days",Z.value=null,Ae.value=null,A.value=!1}function vn(k,w){Z.value=k,de.value=w}function Ll(){de.value="days",Z.value=null}function In(k,w,E,j){const Ce=new Date(w,E,j);let qe,Ie;switch(k){case"today":qe=Ce,Ie=Ce;break;case"lastWeek":qe=new Date(w,E,j-6),Ie=Ce;break;case"last15Days":qe=new Date(w,E,j-14),Ie=Ce;break;case"last30Days":qe=new Date(w,E,j-29),Ie=Ce;break;case"thisMonth":qe=new Date(w,E,1),Ie=Ce;break;case"lastMonth":qe=new Date(w,E-1,1),Ie=new Date(w,E,0);break;case"last3Months":qe=new Date(w,E-3,1),Ie=new Date(w,E,0);break;case"last6Months":qe=new Date(w,E-6,1),Ie=new Date(w,E,0);break;case"last12Months":qe=new Date(w,E-12,1),Ie=new Date(w,E,0);break;case"lastYear":qe=new Date(w-1,0,1),Ie=new Date(w-1,11,31);break;default:return null}return{start:qe,end:Ie}}function fn(k){const w=new Date,E=w.getFullYear(),j=w.getMonth(),Ce=w.getDate();let qe,Ie;if(Nt.value){const at=bn([...N.availableDates].filter(f=>f instanceof Date).map(f=>new Date(f.getFullYear(),f.getMonth(),f.getDate()))).sort((f,g)=>f.getTime()-g.getTime());if(at.length===0)return null;if(k==="all")qe=at[0],Ie=at[at.length-1];else{const f=parseInt(k.replace("last",""),10);if(Number.isInteger(f)&&f>=2&&f<=5){const g=at.slice(-f);if(g.length===0)return null;qe=g[0],Ie=g[g.length-1]}else{const g=In(k,E,j,Ce);if(!g)return null;const S=hn(g);if(!S.length)return null;qe=S[0],Ie=S[S.length-1]}}}else{const at=In(k,E,j,Ce);if(!at)return null;qe=at.start,Ie=at.end}return{start:qe,end:Ie}}function cl(k){const w=fn(k);return w?Bn(w.start,w.end):null}function jt(k){return cl(k)!==null}function Kt(k){const w=cl(k);w&&(L("update:modelValue",w),Wl())}function Yt(k){return!!(k&&k.start instanceof Date&&k.end instanceof Date)}function Tl(k){L("update:comparisonValue",Et(k))}function Tt(k=ct.value){const w=Et(k);Yt(w)&&(Xe.value=w)}function wt(){return Yt(Xe.value)?(Tl(Xe.value),N.doubleCalendar&&Wl(Xe.value),!0):!1}function Vl(k){const w=Se(k);return Yt(w)?Rl(w.start)&&Rl(w.end):!1}function hn(k){const w=Se(k);if(!Yt(w))return[];const E=ft(w.start),j=ft(w.end);return(N.availableDates||[]).filter(Ce=>Ce instanceof Date&&!Number.isNaN(Ce.getTime())).map(Ce=>tt(Ce)).filter(Ce=>{const qe=ft(Ce);return qe>=E&&qe<=j&&Rl(Ce)}).sort((Ce,qe)=>ft(Ce)-ft(qe))}function Nl(k){if(!(k instanceof Date))return null;const w=new Date(k.getFullYear()-1,k.getMonth(),k.getDate());return w.getMonth()!==k.getMonth()?new Date(k.getFullYear()-1,k.getMonth()+1,0):w}function gn(k=Ye.value){const w=Se(Rt.value);if(!Yt(w))return{start:null,end:null};let E,j;if(k==="previousPeriod"){const qe=Rn(w.end)-Rn(w.start)+1;j=Gl(w.start,-1),E=Gl(j,-(qe-1))}else if(k==="previousYear")E=Nl(w.start),j=Nl(w.end);else return ct.value;let Ce=Se({start:E,end:j});if(N.mode==="rangeFromAvailable"&&N.availableDates?.length){const qe=hn(Ce);if(!qe.length)return{start:null,end:null};Ce={start:qe[0],end:qe[qe.length-1]}}return Vl(Ce)?Ce:{start:null,end:null}}function Bl(){!ht.value||!ze.value||Ye.value==="custom"||Tl(gn())}function Zl(){if(ht.value){if(ze.value=!ze.value,!ze.value){Ye.value==="custom"&&Tt(),_e.value="primary",Tl({start:null,end:null});return}if(Ye.value==="custom"){_e.value="comparison",wt();return}_e.value="primary",Bl()}}function an(k){if(ie(k)){if(Ye.value=k,Ae.value=null,k==="custom"){if(_e.value="comparison",wt())return;N.doubleCalendar&&Yt(ct.value)&&Wl(ct.value);return}_e.value="primary",Bl()}}function Dl(k,w,E){const j=Et(k);return!j.start&&!j.end?(E.value="end",{start:w,end:null}):j.start&&j.end?(E.value="end",{start:w,end:null}):E.value==="start"?(E.value="end",Se({start:w,end:j.end})):(E.value="start",Se({start:j.start,end:w}))}function Gt(k){Z.value==="left"?ye.value=k:Z.value==="right"?K.value=k:h.value=k,Ll()}function zn(k){Z.value==="left"?Q.value=k:Z.value==="right"?he.value=k:we.value=k,Ll()}function Pl(){h.value===0?(h.value=11,we.value--):h.value--}function Dt(){h.value===11?(h.value=0,we.value++):h.value++}function Pn(){ye.value===0?(ye.value=11,Q.value--):ye.value--}function tl(){ye.value===11?(ye.value=0,Q.value++):ye.value++}function _l(){K.value===0?(K.value=11,he.value--):K.value--}function yn(){K.value===11?(K.value=0,he.value++):K.value++}function sn(k){if(!Rl(k))return;const w=new Date(k.getFullYear(),k.getMonth(),k.getDate());if(Jt.value){L("update:modelValue",w),ql();return}if(Ct.value){const j=Dl(ct.value,w,ge);Yt(j)&&Tt(j),Tl(j);return}_e.value="primary";const E=Dl(Rt.value,w,Re);L("update:modelValue",E)}e.watch(Rt,()=>{N.doubleCalendar&&et.value&&A.value&&Wl(),Bl()},{deep:!0}),e.watch(()=>N.comparisonEnabled,k=>{if(fe(),!k){ze.value=!1,_e.value="primary";return}Yt(ct.value)?ze.value=!0:ze.value&&Ye.value!=="custom"&&Bl()}),e.watch(H,()=>{fe()},{deep:!0}),e.watch(ct,k=>{ht.value&&Yt(k)&&(ze.value=!0,Ye.value==="custom"&&Tt(k))},{deep:!0,immediate:!0});let Fl=null,ul=null,Ql=null;function Ul(){Fl&&(document.removeEventListener("keydown",Fl),Fl=null),ul&&(window.removeEventListener("resize",ul),ul=null),Ql&&(window.removeEventListener("scroll",Ql,!0),Ql=null)}return e.watch(de,k=>{k==="years"&&e.nextTick(()=>{mt.value?.querySelector(`[data-year="${ce.value}"]`)?.scrollIntoView({block:"center",behavior:"auto"})})}),e.watch(()=>[A.value,de.value,h.value,we.value,ye.value,Q.value,K.value,he.value,Z.value,N.doubleCalendar,N.quickSelect,N.quickSelectOptions,N.comparisonControlsPlacement],()=>{rl()}),e.watch(A,k=>{Ul(),k&&(Fl=w=>{w.key==="Escape"&&(de.value==="years"||de.value==="months"?Ll():ql())},ul=()=>{ml()},Ql=()=>{ml()},document.addEventListener("keydown",Fl),window.addEventListener("resize",ul),window.addEventListener("scroll",Ql,!0))}),e.onBeforeUnmount(()=>{El!==null&&(window.cancelAnimationFrame(El),El=null),Ul()}),(k,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-datepicker",{"dss-datepicker--readonly":_.mode==="readonly"}])},[_.mode==="readonly"?(e.openBlock(),e.createElementBlock("div",xs,[w[10]||(w[10]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{type:"text",class:"dss-datepicker__input",value:X.value,readonly:"",disabled:"",tabindex:"-1"},null,8,Es)])):Jt.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-datepicker__input-wrap",onClick:w[0]||(w[0]=E=>Fn("start"))},[w[11]||(w[11]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{ref_key:"inputSingleRef",ref:He,type:"text",class:"dss-datepicker__input",placeholder:N.placeholder||e.unref(oe)("datepicker.selectDate"),value:bt.value,readonly:"",disabled:_.mode==="readonly"},null,8,Ss)])):lt.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["dss-datepicker__input-wrap dss-datepicker__input-wrap--list",{"dss-datepicker__input-wrap--open":A.value}]),onClick:il},[w[13]||(w[13]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{ref_key:"inputListRef",ref:Me,type:"text",class:"dss-datepicker__input",placeholder:N.placeholder||e.unref(oe)("datepicker.selectFromList"),value:bt.value,readonly:""},null,8,Vs),e.createElementVNode("span",{class:e.normalizeClass(["dss-datepicker__chevron",{"dss-datepicker__chevron--open":A.value}]),"aria-hidden":"true"},[...w[12]||(w[12]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})],-1)])],2)],2)):et.value?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"inputRangeWrapRef",ref:Ke,class:e.normalizeClass(["dss-datepicker__input-wrap",{"dss-datepicker__input-wrap--with-comparison":ht.value,"dss-datepicker__input-wrap--comparison-active":ht.value&&ze.value,"dss-datepicker__input-wrap--open":A.value}]),onClick:w[1]||(w[1]=E=>Fn("start"))},[w[16]||(w[16]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),ht.value?(e.openBlock(),e.createElementBlock("div",Ns,[e.createElementVNode("input",{ref_key:"inputRangeRef",ref:ke,type:"text",class:"dss-datepicker__input",placeholder:N.placeholder||e.unref(oe)("datepicker.selectRange"),value:el.value,readonly:""},null,8,Bs),ze.value&&re.value?(e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("span",Ms,e.toDisplayString(re.value.start),1),w[14]||(w[14]=e.createElementVNode("span",{class:"dss-datepicker__comparison-sep"},"/",-1)),e.createElementVNode("span",$s,e.toDisplayString(re.value.end),1)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("input",{key:1,ref_key:"inputRangeRef",ref:ke,type:"text",class:"dss-datepicker__input",placeholder:N.placeholder||e.unref(oe)("datepicker.selectRange"),value:el.value,readonly:""},null,8,Ls)),ht.value?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["dss-datepicker__comparison-toggle dss-datepicker__comparison-toggle--icon",{"dss-datepicker__comparison-toggle--active":ze.value}]),"aria-label":ze.value?e.unref(oe)("datepicker.comparison.active"):e.unref(oe)("datepicker.comparison.compareTo"),"aria-pressed":ze.value,onClick:e.withModifiers(Zl,["stop"])},[...w[15]||(w[15]=[e.createElementVNode("svg",{class:"dss-datepicker__comparison-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M9.06387 6.587C9.16352 6.54566 9.27319 6.5348 9.37901 6.5558C9.48484 6.57679 9.58205 6.6287 9.65837 6.70495L11.84 8.88661C11.8907 8.93727 11.931 8.99742 11.9584 9.06363C11.9859 9.12984 12 9.20082 12 9.27249C12 9.34417 11.9859 9.41514 11.9584 9.48135C11.931 9.54757 11.8907 9.60772 11.84 9.65837L9.65837 11.84C9.58209 11.9164 9.48487 11.9684 9.37902 11.9895C9.27316 12.0106 9.16343 11.9998 9.06371 11.9585C8.964 11.9171 8.87879 11.8472 8.81886 11.7574C8.75894 11.6676 8.72699 11.5621 8.72708 11.4542L8.72708 9.81791L0.545845 9.81791C0.401191 9.81791 0.262463 9.76045 0.160178 9.65816C0.0578924 9.55587 0.00042901 9.41715 0.000429004 9.27249C0.000428997 9.12784 0.0578924 8.98911 0.160178 8.88683C0.262463 8.78454 0.401191 8.72708 0.545845 8.72708L8.72708 8.72708L8.72708 7.09083C8.7271 6.98296 8.75911 6.87752 8.81906 6.78783C8.87901 6.69815 8.9642 6.62826 9.06387 6.587ZM2.34162 0.159964L0.159963 2.34163C0.109252 2.39228 0.0690227 2.45243 0.0415751 2.51865C0.0141274 2.58486 -4.08447e-07 2.65583 -4.05314e-07 2.72751C-4.0218e-07 2.79918 0.0141274 2.87016 0.0415751 2.93637C0.0690227 3.00258 0.109252 3.06273 0.159963 3.11339L2.34162 5.29505C2.4179 5.37142 2.51513 5.42343 2.62098 5.44451C2.72684 5.46559 2.83657 5.45479 2.93629 5.41347C3.036 5.37216 3.12121 5.30218 3.18114 5.21241C3.24106 5.12264 3.27301 5.0171 3.27292 4.90917L3.27292 3.27292L11.4542 3.27292C11.5988 3.27292 11.7375 3.21546 11.8398 3.11317C11.9421 3.01089 11.9996 2.87216 11.9996 2.72751C11.9996 2.58285 11.9421 2.44412 11.8398 2.34184C11.7375 2.23955 11.5988 2.18209 11.4542 2.18209L3.27292 2.18209L3.27292 0.545846C3.27301 0.43791 3.24106 0.332376 3.18114 0.242604C3.12121 0.152832 3.036 0.0828592 2.93629 0.0415426C2.83657 0.000226074 2.72684 -0.0105762 2.62098 0.0105043C2.51513 0.0315849 2.4179 0.0835995 2.34162 0.159964Z"})],-1)])],10,Ts)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[A.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-datepicker__overlay",onClick:e.withModifiers(ql,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:yt,class:e.normalizeClass(["dss-datepicker__dropdown",{"dss-datepicker__dropdown--double":_.doubleCalendar&&et.value&&de.value==="days","dss-datepicker__dropdown--quick-select":_.doubleCalendar&&et.value&&de.value==="days"&&(_.quickSelect||pt.value),"dss-datepicker__dropdown--list":lt.value}]),onClick:w[9]||(w[9]=e.withModifiers(()=>{},["stop"])),style:e.normalizeStyle(un.value)},[lt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[on.value.length?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"dss-datepicker__list",role:"listbox",ref_key:"listRef",ref:Qt},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(on.value,E=>(e.openBlock(),e.createElementBlock("li",{key:E.ts,role:"option","aria-selected":E.selected,class:e.normalizeClass(["dss-datepicker__list-item",{"dss-datepicker__list-item--selected":E.selected}]),onClick:j=>jn(E.date)},[e.createElementVNode("span",As,e.toDisplayString(E.label),1),E.selected?(e.openBlock(),e.createElementBlock("svg",Hs,[...w[17]||(w[17]=[e.createElementVNode("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"},null,-1)])])):e.createCommentVNode("",!0)],10,Ds))),128))],512)):(e.openBlock(),e.createElementBlock("div",Rs,e.toDisplayString(e.unref(oe)("datepicker.noAvailableDates")),1))],64)):de.value==="days"&&_.doubleCalendar&&et.value?(e.openBlock(),e.createElementBlock("div",Fs,[_.quickSelect||pt.value?(e.openBlock(),e.createElementBlock("div",Is,[_.quickSelect?(e.openBlock(),e.createElementBlock("nav",zs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ht.value,E=>(e.openBlock(),e.createElementBlock("button",{key:E.id,type:"button",class:"dss-datepicker__quick-select-btn",disabled:!jt(E.id),onClick:j=>Kt(E.id)},e.toDisplayString(Mt(E)),9,Ps))),128))])):e.createCommentVNode("",!0),pt.value?(e.openBlock(),e.createElementBlock("div",Os,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-datepicker__comparison-toggle",{"dss-datepicker__comparison-toggle--active":ze.value}]),onClick:Zl},e.toDisplayString(ze.value?e.unref(oe)("datepicker.comparison.active"):e.unref(oe)("datepicker.comparison.compareTo")),3),ze.value?(e.openBlock(),e.createElementBlock("div",Ws,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,E=>(e.openBlock(),e.createElementBlock("button",{key:E.id,type:"button",class:e.normalizeClass(["dss-datepicker__comparison-mode",{"dss-datepicker__comparison-mode--active":Ye.value===E.id}]),onClick:j=>an(E.id)},e.toDisplayString(Y(E)),11,qs))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Zs,[e.createElementVNode("div",Us,[e.createElementVNode("div",Ys,[e.createElementVNode("div",Xs,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(oe)("datepicker.prevMonth"),onClick:Pn}," ‹ ",8,js),e.createElementVNode("div",Ks,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:w[2]||(w[2]=E=>vn("left","months"))},e.toDisplayString(Ge.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:w[3]||(w[3]=E=>vn("left","years"))},e.toDisplayString(Q.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(oe)("datepicker.nextMonth"),onClick:tl}," › ",8,Gs)]),e.createElementVNode("div",Qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,E=>(e.openBlock(),e.createElementBlock("span",{key:E,class:"dss-datepicker__weekday"},e.toDisplayString(E),1))),128))]),e.createElementVNode("div",Js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(St.value,(E,j)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"L-"+j},[E?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",dn(E)]),disabled:!Rl(E),onClick:Ce=>sn(E),onMouseenter:Ce=>Sl(E),onMouseleave:mn},e.toDisplayString(E.getDate()),43,er)):(e.openBlock(),e.createElementBlock("span",tr))],64))),128))])]),e.createElementVNode("div",lr,[e.createElementVNode("div",nr,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(oe)("datepicker.prevMonth"),onClick:_l}," ‹ ",8,or),e.createElementVNode("div",ar,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:w[4]||(w[4]=E=>vn("right","months"))},e.toDisplayString(_t.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:w[5]||(w[5]=E=>vn("right","years"))},e.toDisplayString(he.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(oe)("datepicker.nextMonth"),onClick:yn}," › ",8,sr)]),e.createElementVNode("div",rr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,E=>(e.openBlock(),e.createElementBlock("span",{key:E,class:"dss-datepicker__weekday"},e.toDisplayString(E),1))),128))]),e.createElementVNode("div",ir,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ut.value,(E,j)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"R-"+j},[E?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",dn(E)]),disabled:!Rl(E),onClick:Ce=>sn(E),onMouseenter:Ce=>Sl(E),onMouseleave:mn},e.toDisplayString(E.getDate()),43,cr)):(e.openBlock(),e.createElementBlock("span",ur))],64))),128))])])]),Xt.value?(e.openBlock(),e.createElementBlock("div",dr,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-datepicker__comparison-toggle",{"dss-datepicker__comparison-toggle--active":ze.value}]),onClick:Zl},e.toDisplayString(ze.value?e.unref(oe)("datepicker.comparison.active"):e.unref(oe)("datepicker.comparison.compareTo")),3),ze.value?(e.openBlock(),e.createElementBlock("div",mr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,E=>(e.openBlock(),e.createElementBlock("button",{key:E.id,type:"button",class:e.normalizeClass(["dss-datepicker__comparison-mode",{"dss-datepicker__comparison-mode--active":Ye.value===E.id}]),onClick:j=>an(E.id)},e.toDisplayString(Y(E)),11,pr))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])):de.value==="days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[ht.value?(e.openBlock(),e.createElementBlock("div",vr,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-datepicker__comparison-toggle",{"dss-datepicker__comparison-toggle--active":ze.value}]),onClick:Zl},e.toDisplayString(ze.value?e.unref(oe)("datepicker.comparison.active"):e.unref(oe)("datepicker.comparison.compareTo")),3),ze.value?(e.openBlock(),e.createElementBlock("div",fr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,E=>(e.openBlock(),e.createElementBlock("button",{key:E.id,type:"button",class:e.normalizeClass(["dss-datepicker__comparison-mode",{"dss-datepicker__comparison-mode--active":Ye.value===E.id}]),onClick:j=>an(E.id)},e.toDisplayString(Y(E)),11,hr))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",gr,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(oe)("datepicker.prevMonth"),onClick:Pl}," ‹ ",8,yr),e.createElementVNode("div",kr,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:w[6]||(w[6]=E=>de.value="months")},e.toDisplayString(Ve.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:w[7]||(w[7]=E=>de.value="years")},e.toDisplayString(we.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(oe)("datepicker.nextMonth"),onClick:Dt}," › ",8,Cr)]),e.createElementVNode("div",br,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,E=>(e.openBlock(),e.createElementBlock("span",{key:E,class:"dss-datepicker__weekday"},e.toDisplayString(E),1))),128))]),e.createElementVNode("div",wr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(je.value,(E,j)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:j},[E?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",dn(E)]),disabled:!Rl(E),onClick:Ce=>sn(E),onMouseenter:Ce=>Sl(E),onMouseleave:mn},e.toDisplayString(E.getDate()),43,xr)):(e.openBlock(),e.createElementBlock("span",Er))],64))),128))])],64)):de.value==="months"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",Sr,[e.createElementVNode("div",Vr,[e.createElementVNode("span",Nr,e.toDisplayString(nt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:w[8]||(w[8]=E=>de.value="years")},e.toDisplayString(ce.value),1)])]),e.createElementVNode("div",Br,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xt.value,(E,j)=>(e.openBlock(),e.createElementBlock("button",{key:j,type:"button",class:e.normalizeClass(["dss-datepicker__month-cell",{"dss-datepicker__month-cell--selected":j===te.value}]),onClick:Ce=>Gt(j)},e.toDisplayString(E),11,_r))),128))])],64)):de.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",Mr,[e.createElementVNode("span",$r,e.toDisplayString(Vt.value),1)]),e.createElementVNode("div",{class:"dss-datepicker__years-wrap",ref_key:"yearsWrapRef",ref:mt},[e.createElementVNode("div",Lr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(dl.value,E=>(e.openBlock(),e.createElementBlock("button",{key:E,type:"button",class:e.normalizeClass(["dss-datepicker__year-cell",{"dss-datepicker__year-cell--selected":E===ce.value,"dss-datepicker__year-cell--current":E===e.unref(xe)}]),"data-year":E,onClick:j=>zn(E)},e.toDisplayString(E),11,Tr))),128))])],512)],64)):e.createCommentVNode("",!0)],6)])):e.createCommentVNode("",!0)]))],2))}},Dr={class:"dss-step-bar__layout"},Ar={class:"dss-step-bar__header"},Hr={class:"dss-step-bar__label"},Rr={key:0,class:"dss-step-bar__counter"},Fr={class:"dss-step-bar__track-wrapper"},Ir=["aria-valuemax","aria-valuenow","aria-label"],zr=["onMouseenter"],Ra={__name:"DSSStepBar",props:{label:{type:String,default:"Progress"},steps:{type:Number,default:5},currentStep:{type:Number,default:0},segments:{type:Array,default:()=>[]},segmentOrder:{type:String,default:"input",validator:_=>["input","desc","asc"].includes(_)},orientation:{type:String,default:"horizontal",validator:_=>["horizontal","vertical"].includes(_)},barHeight:{type:[Number,String],default:200},labelPosition:{type:String,default:"up",validator:_=>["up","down","left","right"].includes(_)},sideLabelMaxWidth:{type:[Number,String],default:null},sideLabelWrapWidth:{type:[Number,String],default:"18ch"},totalValue:{type:Number,default:null},activeColor:{type:String,default:"#34c759"},labelColor:{type:String,default:null},counterColor:{type:String,default:null},valueLabel:{type:String,default:""},counterAsPercentage:{type:Boolean,default:!1},showCounter:{type:Boolean,default:!0},inactiveColor:{type:String,default:"#e5e7eb"},remainderLabel:{type:String,default:"Unused"},remainderTooltipSummary:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},disableTooltips:{type:Boolean,default:!1}},setup(_){const J=_,N={segmentMarker:{color:null,width:null,height:null,backgroundColor:"transparent",borderColor:"transparent"},maxSegment:{marker:{enabled:!1,color:null,width:null,height:null,backgroundColor:"transparent",borderColor:"transparent"}}},L=H=>H&&typeof H=="object"&&!Array.isArray(H),oe=(H,Y)=>{const ie=Object.assign({},H);return!L(H)||!L(Y)||Object.keys(Y).forEach(fe=>{if(L(Y[fe])){fe in H?ie[fe]=oe(H[fe],Y[fe]):Object.assign(ie,{[fe]:Y[fe]});return}Object.assign(ie,{[fe]:Y[fe]})}),ie},W=e.computed(()=>oe(N,J.options)),A=e.computed(()=>Math.max(1,Number(J.steps)||1)),de=e.computed(()=>Math.min(A.value,Math.max(0,Number(J.currentStep)||0))),dt=e.computed(()=>Array.isArray(J.segments)&&J.segments.length>0),ee=e.computed(()=>{if(!dt.value)return[];const H=J.segments.map((Y,ie)=>{const fe=Number(Y?.value);return{label:Y?.label||`Step ${ie+1}`,value:Number.isFinite(fe)&&fe>0?fe:0,color:Y?.color||J.activeColor,marker:Y?.marker}});return J.segmentOrder==="desc"?[...H].sort((Y,ie)=>ie.value-Y.value):J.segmentOrder==="asc"?[...H].sort((Y,ie)=>Y.value-ie.value):H}),h=e.computed(()=>dt.value?ee.value.reduce((H,Y)=>H+Y.value,0):de.value),we=e.computed(()=>dt.value?Number.isFinite(Number(J.totalValue))&&Number(J.totalValue)>0?Number(J.totalValue):Math.max(1,h.value):A.value),ye=e.computed(()=>dt.value&&Number.isFinite(Number(J.totalValue))&&Number(J.totalValue)>0),Q=e.computed(()=>ye.value?Math.max(0,Number(J.totalValue)-h.value):0),K=e.computed(()=>typeof J.remainderLabel=="string"&&J.remainderLabel.trim().length>0),he=e.computed(()=>Q.value>0),Re=e.computed(()=>ee.value.reduce((H,Y)=>Math.max(H,Number(Y.value)||0),0)),ge=e.computed(()=>ee.value.filter(H=>H.value>0).map(H=>`${H.label}: ${lt(H.value)}`).join(" | ")),Ae=e.computed(()=>dt.value?ye.value?ee.value.filter(H=>H.value>0):ee.value:[]),Z=e.computed(()=>{if(!J.counterAsPercentage)return`${h.value} / ${we.value}`;const H=Number(we.value);if(!Number.isFinite(H)||H<=0)return"0%";const Y=Math.round(Number(h.value)/H*100);return`${Math.min(Math.max(Y,0),100)}%`}),ze=e.computed(()=>h.value),Ye=e.computed(()=>we.value),_e=e.reactive({visible:!1,x:0,y:0,content:""}),Xe=e.computed(()=>J.orientation==="vertical"),U=e.computed(()=>{const H=J.barHeight;return H==null||H===""?"200px":typeof H=="number"?`${H}px`:String(H)}),He=e.computed(()=>{const H=J.sideLabelMaxWidth;if(!(H==null||H===""))return typeof H=="number"?`${H}px`:String(H)}),Ke=e.computed(()=>{const H=J.sideLabelWrapWidth;return H==null||H===""?"18ch":typeof H=="number"?`${H}ch`:String(H)}),ke=e.computed(()=>({left:`${_e.x}px`,top:`${_e.y}px`,transform:"translate(-50%, calc(-100% - 8px))"})),Me=H=>Xe.value?{flex:`${H} 0 0`,minHeight:H>0?"6px":"0",minWidth:"0"}:{flex:`${H} 0 0`,minWidth:H>0?"6px":"0"},rt=H=>{const Y=H?.parentElement;if(!Y)return{x:0,y:0};const ie=Y.getBoundingClientRect();return{x:ie.left+ie.width/2,y:ie.top}},yt=H=>{const Y=H.getBoundingClientRect();return{x:Y.left+Y.width/2,y:Y.top}},mt=H=>{if(ye.value){const fe=Math.max(0,Number(H.value)||0);return{...Me(fe),backgroundColor:H.color}}const Y=h.value,ie=H.value>0?H.value:Y>0?1e-4:1;return{...Me(ie),backgroundColor:H.color}},Qt=H=>Number(H?.value||0)>0&&Number(H?.value||0)===Re.value,xe=H=>{const Y=L(H?.marker)?H.marker:{},ie=H?.marker===!0||Y.enabled===!0,fe=Qt(H)&&W.value.maxSegment?.marker?.enabled===!0;if(!(ie||fe))return{enabled:!1};const tt=Y.backgroundColor??(fe?W.value.maxSegment?.marker?.backgroundColor:W.value.segmentMarker?.backgroundColor),Et=Y.borderColor??(fe?W.value.maxSegment?.marker?.borderColor:W.value.segmentMarker?.borderColor),Se=Y.color??(fe?W.value.maxSegment?.marker?.color:W.value.segmentMarker?.color),ot=Y.width??(fe?W.value.maxSegment?.marker?.width:W.value.segmentMarker?.width),bt=Y.height??(fe?W.value.maxSegment?.marker?.height:W.value.segmentMarker?.height);return{enabled:!0,backgroundColor:tt,borderColor:Et,color:Se,width:ot,height:bt,icon:Y.icon??null,...Y}},Jt=H=>{const Y=xe(H);return{backgroundColor:Y.backgroundColor??void 0,borderColor:Y.borderColor??void 0,color:Y.color??void 0}},et=H=>{const Y=xe(H);return{width:Y.width??void 0,height:Y.height??void 0}},lt=H=>`${H}${J.valueLabel}`,kt=e.computed(()=>({...Me(Q.value),backgroundColor:J.inactiveColor})),Rt=(H,Y)=>{J.disableTooltips||pt(H,Y)},ct=H=>{J.disableTooltips||Xt(H)},ht=()=>{J.disableTooltips||Ct()},pt=(H,Y)=>{if(!H||!Y?.currentTarget)return;const ie=Y.currentTarget;if(J.remainderTooltipSummary){const Fe=rt(ie);_e.x=Fe.x,_e.y=Fe.y,_e.content=ge.value,_e.visible=!!_e.content;return}const fe=yt(ie);_e.x=fe.x,_e.y=fe.y,_e.content=`${H.label}: ${lt(H.value)}`,_e.visible=!0},Xt=H=>{if(!Q.value||!H?.currentTarget)return;const Y=H.currentTarget;if(J.remainderTooltipSummary){const fe=rt(Y);_e.x=fe.x,_e.y=fe.y,_e.content=ge.value,_e.visible=!!_e.content;return}const ie=yt(Y);_e.x=ie.x,_e.y=ie.y,K.value&&(_e.content=`${J.remainderLabel}: ${lt(Q.value)}`,_e.visible=!0)},Ct=()=>{_e.visible=!1},Pt=()=>{_e.visible&&Ct()};e.onMounted(()=>{window.addEventListener("scroll",Pt,!0)}),e.onBeforeUnmount(()=>{window.removeEventListener("scroll",Pt,!0)});const pe=e.computed(()=>({"--dss-step-bar-label-color":J.labelColor??void 0,"--dss-step-bar-counter-color":J.counterColor??void 0,"--dss-step-bar-active-color":J.activeColor,"--dss-step-bar-inactive-color":J.inactiveColor,"--dss-step-bar-bar-height":Xe.value?U.value:void 0,"--dss-step-bar-side-label-max-width":He.value,"--dss-step-bar-side-label-wrap-width":Ke.value}));return(H,Y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-step-bar",[`dss-step-bar--${_.orientation}`,`dss-step-bar--label-${_.labelPosition}`]]),style:e.normalizeStyle(pe.value)},[e.createElementVNode("div",Dr,[e.createElementVNode("div",Ar,[e.createElementVNode("span",Hr,[e.renderSlot(H.$slots,"label",{label:_.label},()=>[e.createTextVNode(e.toDisplayString(_.label),1)])]),_.showCounter?(e.openBlock(),e.createElementBlock("span",Rr,[e.renderSlot(H.$slots,"counter",{counterDisplay:Z.value},()=>[e.createTextVNode(e.toDisplayString(Z.value),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Fr,[e.createElementVNode("div",{class:"dss-step-bar__track",role:"progressbar","aria-valuemin":0,"aria-valuemax":Ye.value,"aria-valuenow":ze.value,"aria-label":_.label},[dt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ae.value,(ie,fe)=>(e.openBlock(),e.createElementBlock("div",{key:`segment-${fe}-${ie.label}`,class:e.normalizeClass(["dss-step-bar__segment dss-step-bar__segment--interactive",{"dss-step-bar__segment--max":Qt(ie),"dss-step-bar__segment--marker-enabled":xe(ie).enabled}]),style:e.normalizeStyle(mt(ie)),onMouseenter:Fe=>Rt(ie,Fe),onMouseleave:ht},[xe(ie).enabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment-marker",style:e.normalizeStyle(Jt(ie)),"aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-step-bar__segment-marker-icon",style:e.normalizeStyle(et(ie))},[e.renderSlot(H.$slots,"segment-marker-icon",{segment:ie,index:fe,marker:xe(ie)},()=>[e.renderSlot(H.$slots,"max-segment-icon",{segment:ie,index:fe,marker:xe(ie)},()=>[e.createTextVNode(e.toDisplayString(xe(ie).icon||""),1)])])],4)],4)):e.createCommentVNode("",!0)],46,zr))),128)),he.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment dss-step-bar__segment--remainder",style:e.normalizeStyle(kt.value),onMouseenter:Y[0]||(Y[0]=ie=>ct(ie)),onMouseleave:ht},null,36)):e.createCommentVNode("",!0)],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(A.value,ie=>(e.openBlock(),e.createElementBlock("div",{key:ie,class:e.normalizeClass(["dss-step-bar__segment",{"dss-step-bar__segment--active":ie<=de.value}])},null,2))),128))],8,Ir)])]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[!_.disableTooltips&&_e.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__tooltip dss-step-bar__tooltip--teleported",style:e.normalizeStyle(ke.value)},e.toDisplayString(_e.content),5)):e.createCommentVNode("",!0)]))],6))}},Pr=["data-chart-type"],Or={class:"dss-chart-header-titles"},Wr={key:0,class:"dss-chart-title"},qr={key:1,class:"dss-chart-subtitle"},Zr=["onClick","onMouseenter"],Ur={class:"dss-legend-text"},Yr=["onClick","onMouseenter"],Xr={class:"dss-legend-text"},jr=["title"],Kr=["src"],Gr={class:"dss-chart-area-wrapper"},Qr={key:0,class:"dss-chart-z-axis-label"},Jr=["width","height","data-smooth","data-animated"],ei=["id"],ti=["y","width","height"],li=["id"],ni=["d"],oi=["id"],ai=["d"],si={key:0},ri=["clip-path"],ii=["x1","x2","y1","y2"],ci=["clip-path"],ui=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray","opacity"],di={class:"dss-axes"},mi=["x1","x2","y1","y2"],pi=["x1","x2","y1","y2"],vi=["x1","x2","y1","y2"],fi={class:"dss-axis-labels"},hi=["x","y"],gi=["x","y"],yi=["x","y"],ki=["x","y"],Ci=["y","transform"],bi=["x","y","transform"],wi={key:2,class:"dss-flag-markers"},xi=["clip-path"],Ei=["x1","x2","y1","y2","onMouseover"],Si=["x1","x2","y1","y2","onMouseover"],Vi=["x1","x2","y1","y2","onMouseover"],Ni=["cx","cy","onMouseover"],Bi=["cx","cy","fill","onMouseover"],_i=["x","y"],Mi=["clip-path"],$i={key:0},Li=["d","onMouseover"],Ti=["x","y","width","height","fill","onMouseover"],Di={class:"dss-line-chart"},Ai=["d","stroke","stroke-width","stroke-dasharray"],Hi=["d","stroke","stroke-width","opacity"],Ri=["cx","cy","r","fill","onMouseover"],Fi={key:1},Ii=["d","stroke","stroke-width","stroke-dasharray"],zi=["d","stroke","stroke-width","stroke-dasharray"],Pi=["d","stroke","stroke-width","opacity"],Oi=["cx","cy","r","fill","onMouseover"],Wi={key:2},qi=["id"],Zi=["x","y","width","height"],Ui=["d","fill","fill-opacity","mask"],Yi=["d","stroke","stroke-width"],Xi=["d","fill","onMouseover"],ji=["x","y","width","height","onMouseover"],Ki=["clip-path"],Gi=["x1","x2","y1","y2","stroke"],Qi=["cx","cy","r","fill"],Ji={key:1,class:"dss-bubble-chart"},ec={key:0,class:"dss-bubble-group"},tc=["cx","cy","r","fill","fill-opacity","stroke","onMouseenter","onMouseleave","onClick"],lc=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],nc=["transform"],oc=["cx","cy","r"],ac=["data-chart-type","clip-path"],sc=["d","fill","fill-opacity","stroke","stroke-width","clip-path","onMouseover"],rc={key:1,class:"dss-radial-segment-data-labels"},ic=["x","y"],cc=["x","y","font-size","fill"],uc=["x1","y1","x2","y2","stroke"],dc=["x1","y1","x2","y2","stroke"],mc=["x","y","text-anchor","font-size"],pc=["transform"],vc={key:0,class:"dss-spider-grid"},fc=["cx","cy","r"],hc={class:"dss-spider-grid-labels"},gc=["x","y"],yc=["x","y"],kc=["x1","x2","y1","y2"],Cc={class:"dss-spider-labels"},bc=["x","y","text-anchor","dominant-baseline"],wc=["points","fill","fill-opacity","stroke","stroke-width","stroke-dasharray"],xc=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],Ec={class:"dss-chart-logos"},Sc=["cx","cy","r","fill"],Vc=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],Nc={key:0,class:"dss-stepbar-grid-lines","aria-hidden":"true"},Bc=["onClick","onMouseenter"],_c=["src"],Mc={class:"dss-marker-tooltip-category"},$c={key:0,class:"dss-marker-tooltip-description"},Lc={key:0,class:"dss-tooltip-section dss-spider-tooltip-section"},Tc={class:"dss-tooltip-title dss-spider-tooltip-area-title"},Dc={class:"dss-tooltip-series-name"},Ac={class:"dss-tooltip-series-value"},Hc={key:1,class:"dss-tooltip-section"},Rc={key:0,class:"dss-tooltip-title"},Fc={class:"dss-bubble-tooltip-data"},Ic={key:2,class:"dss-tooltip-section"},zc={class:"dss-tooltip-title"},Pc={class:"dss-tooltip-value"},Oc={key:0,class:"dss-tooltip-section"},Wc={class:"dss-tooltip-section-title"},qc={class:"dss-tooltip-group-header"},Zc={class:"dss-tooltip-item-content"},Uc={class:"dss-tooltip-item-text"},Yc={key:1,class:"dss-tooltip-section"},Xc={class:"dss-tooltip-section-title"},jc={class:"dss-tooltip-item-content"},Kc={class:"dss-tooltip-item-title"},Gc={key:0,class:"dss-tooltip-item-description"},Qc={class:"dss-tooltip-section"},Jc={class:"dss-tooltip-title"},eu={key:0,class:"dss-bubble-tooltip-data"},tu={class:"dss-tooltip-series-name"},lu={class:"dss-tooltip-series-value"},nu={key:0,class:"dss-tooltip-section"},ou={class:"dss-tooltip-section-title"},au={class:"dss-tooltip-group-header"},su={class:"dss-tooltip-item-content"},ru={class:"dss-tooltip-item-text"},iu={key:1,class:"dss-tooltip-section"},cu={class:"dss-tooltip-section-title"},uu={class:"dss-tooltip-item-content"},du={class:"dss-tooltip-item-title"},mu={key:0,class:"dss-tooltip-item-description"},pu=["onClick","onMouseenter"],vu={class:"dss-legend-text"},fu={key:1,class:"dss-context-menu-separator"},hu={key:0,class:"dss-context-menu-separator"},gu={key:0,class:"dss-context-menu-separator"},yu=["onClick"],ku=["innerHTML"],Cu={key:0,class:"dss-context-menu-icon"},bu={class:"dss-marker-modal-header"},wu={class:"dss-marker-modal-body"},xu={class:"dss-form-group"},Eu={class:"dss-form-group"},Su={for:"dss-marker-description"},Vu={key:0,class:"dss-form-text-display"},Nu=["placeholder"],Bu={class:"dss-marker-modal-footer"},_u={class:"modal-footer-left"},Mu={class:"dss-modal-footer-right"},$u=["disabled"],Lu={name:"DSSChart"},Tu=Object.assign(Lu,{props:{series:{type:Array,required:!0,default:()=>[]},categories:{type:Array,default:()=>[]},flags:{type:Array,default:()=>[]},markers:{type:Array,default:()=>[]},showAddMarkerButton:{type:Boolean,default:!0},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:_=>typeof _=="object"&&_!==null},innerSize:{type:Number,default:null},old:{type:Boolean,default:!1}},emits:["add-marker","update-marker","delete-marker"],setup(_,{emit:J}){const{t:N,locale:L}=ho.useI18n(),oe=J,W=e.ref(null),A=e.ref(null);let de=null;const dt=()=>{de&&(de(),de=null);const t=A.value;if(!t||xe.value!=="stepbar")return;const o=l=>$o(l);t.addEventListener("wheel",o,{passive:!1}),de=()=>t.removeEventListener("wheel",o)},ee=e.ref(null),h=e.ref(null),we=e.ref(0),ye=e.ref(0);let Q=null,K=null;const he=20,Re=e.computed(()=>{if(ye.value,we.value,!W.value||!ee.value)return 0;try{const t=W.value.getBoundingClientRect();return ee.value.getBoundingClientRect().top-t.top}catch{return 0}}),ge=e.computed(()=>`chart-clip-${Z.chartId}`),Ae=e.computed(()=>`url(#${ge.value})`),Z=_,ze={chart:{type:"line",width:800,height:400,orientation:"vertical"},title:{text:"",style:{}},subtitle:{text:"",style:{}},zAxis:"",xAxis:{title:{text:""},type:"category"},yAxis:{min:"auto",max:"auto",title:{text:""}},legend:{show:!0,position:"top",orientation:"horizontal"},radialLabels:{show:!1,pointerLength:25,horizontalLength:35,fontSize:14,color:"#000",textOffset:8},radialBar:{dataLabels:{show:!1,minAngleDegrees:20},dataCenter:{show:!1,fontSize:16}},miniRadial:{minVisiblePercent:1,trackColor:"#E5E7EB",thresholds:{low:33,medium:66},colors:{low:"#E53E3E",medium:"#ED8936",high:"#38A169"}},grid:{show:!0,style:{}},watermark:{enabled:!0,opacity:.05,size:35,position:"bottom-right"},colors:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"],logos:[],stroke:{width:2,curve:"smooth"},bubbles:{size:4},stepbar:{totalValue:100,segmentOrder:"input",showRemainder:!0,remainderLabel:"Remaining",remainderColor:"#E5E7EB",barWidth:14,columnWidth:72,trackWidth:14,minBarWidth:12,maxBarWidth:120,barRadius:6,columnGap:16,labelReserve:48,trackAreaHeight:220,axisBars:{show:!0,showVertical:!1,color:"#d6d6d6",opacity:.75,width:1,dashArray:"3,4"},maxSegment:{marker:{enabled:!1,icon:"",radius:8,backgroundColor:null,borderColor:"#fafafa",borderWidth:2,color:"#fafafa",fontSize:10}}},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,comparison:{fillOpacity:0,strokeDasharray:"6,4",usePrimaryColor:!0,bubbleSize:0}},zoom:{enabled:!1,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},valueFormat:{extension:""},contextMenu:{enabled:!0,items:{addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0},customItems:[]}};function Ye(t,o){const l=Object.assign({},t);return Xe(t)&&Xe(o)&&Object.keys(o).forEach(r=>{Xe(o[r])?r in t?l[r]=Ye(t[r],o[r]):Object.assign(l,{[r]:o[r]}):Object.assign(l,{[r]:o[r]})}),l}const _e=()=>{let t=20,o=0,l=0;if(et.value&&(t+=30),lt.value&&(t+=25),fe.value&&Z.series.length>0){const r=Z.series.filter((m,v)=>!F.value.has(v)).length;if(Fe.value==="top"||Fe.value==="bottom"){if(tt.value==="horizontal"){const v=Math.floor(Me.value/100);o=Math.ceil(r/v)*25+10}else o=r*25+10;t+=o}else l=150}return{height:t,legendHeight:o,legendWidth:l}};function Xe(t){return t&&typeof t=="object"&&!Array.isArray(t)}const U=e.computed(()=>Ye(ze,Z.options)),He=e.computed(()=>{const t=U.value;return t&&t.chart&&t.chart.width==="auto"}),Ke=e.computed(()=>{const t=U.value;return t&&t.chart&&t.chart.height==="auto"}),ke=e.computed(()=>{const t=U.value;return t?.chart?.type==="stepbar"&&t?.chart?.height==="fit"}),Me=e.computed(()=>{const t=U.value;return He.value?we.value||800:t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),rt=e.ref(he),yt=e.computed(()=>{if(Ke.value){const t=yt.value;return t??Math.max(0,(ye.value||400)-rt.value*5)}}),mt=e.computed(()=>{const t=U.value;if(xe.value==="mini-radial")return Me.value;if(ke.value)return un.value;if(Ke.value){const o=yt.value;return o??Math.max(0,(ye.value||400)-rt.value)}return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),Qt=e.computed(()=>{if(Ke.value&&xe.value==="semi-radial"&&yt.value!=null)return rt.value+mt.value+"px";if(Ke.value)return"100%";if(xl.value)return rt.value+mt.value+"px";if(fe.value&&Fe.value==="bottom"){const t=_e();return mt.value+(t.legendHeight||35)+"px"}return mt.value+(fe.value?20:0)+"px"}),xe=e.computed(()=>{const t=U.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),Jt=e.computed(()=>{const t=Z.series.map(o=>o.type||xe.value);return new Set(t).size>1}),et=e.computed(()=>{const t=U.value;return t&&t.title&&t.title.text?t.title.text:""}),lt=e.computed(()=>{const t=U.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),kt=e.computed(()=>{const t=U.value;if(!t||!t.zAxis)return"";const o=t.zAxis;return typeof o=="string"?o:o&&typeof o.label=="string"?o.label:""}),Rt=e.computed(()=>{const t=U.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),ct=e.computed(()=>{const o=U.value?.yAxis?.title?.text;return o==null||String(o).trim()===""?"":String(o)}),ht=e.computed(()=>{const t=U.value;return t&&t.yAxis&&t.yAxis.secondary&&typeof t.yAxis.secondary=="object"?t.yAxis.secondary:null}),pt=e.computed(()=>{const t=ht.value;return t&&t.title&&t.title.text?t.title.text:""}),Xt=e.computed(()=>{const t=U.value;if(!t||!t.yAxis)return Al;const o=t.yAxis.min;return typeof o=="number"||o===Al?o:Al}),Ct=e.computed(()=>{const t=U.value;if(!t||!t.yAxis)return Al;const o=t.yAxis.max;return typeof o=="number"||o===Al?o:Al}),Pt=e.computed(()=>{const t=ht.value;if(!t)return Al;const o=t.min;return typeof o=="number"||o===Al?o:Al}),pe=e.computed(()=>{const t=ht.value;if(!t)return Al;const o=t.max;return typeof o=="number"||o===Al?o:Al}),H=e.computed(()=>{const t=U.value;return!t||!t.xAxis?null:typeof t.xAxis.min=="number"?t.xAxis.min:null}),Y=e.computed(()=>{const t=U.value;return!t||!t.xAxis?null:typeof t.xAxis.max=="number"?t.xAxis.max:null}),ie=e.computed(()=>{const t=U.value;return t&&t.grid&&t.grid.show!==!1}),fe=e.computed(()=>{const t=U.value;return t&&t.legend&&t.legend.show!==!1}),Fe=e.computed(()=>{const t=U.value;return t&&t.legend&&t.legend.position?t.legend.position:"top"}),tt=e.computed(()=>{const t=U.value;return t&&t.legend&&t.legend.orientation?t.legend.orientation:"horizontal"}),Et=e.computed(()=>{const t=U.value;return!t||!t.tooltip?!0:t.tooltip.enabled!==!1}),Se=e.computed(()=>{const t=U.value;if(!t)return!1;if(xe.value==="stepbar"){if(!t.crosshair)return!0;const l=t.crosshair.show;return l!==!1&&l!=="false"}if(!t.crosshair)return!1;const o=t.crosshair.show;return o===!0||o==="true"}),ot=e.computed(()=>{const t=U.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),bt=e.computed(()=>{const t=U.value;return!t||!t.zoom?!1:t.zoom.enabled===!0}),el=e.computed(()=>{const t=U.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),re=e.computed(()=>{const t=U.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),X=e.computed(()=>{const t=U.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),te=e.computed(()=>{if(!xl.value)return 0;const t=U.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:0}),ce=e.computed(()=>{const t=U.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),Ve=e.computed(()=>{const{maxX:t}=Bt.value;return t===0}),nt=(t,o)=>Ve.value&&o===0?5:o,xt=t=>{const o=Number(t);return!Number.isFinite(o)||o<=0?0:o},dl=e.computed(()=>{const t=U.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),Vt=e.computed(()=>{const t=U.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),sl=e.computed(()=>{const t=U.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),D=e.computed(()=>{const t=U.value;return Vt.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),V=e.computed(()=>{const t=U.value,o=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return o.length>0?o:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),B=e.computed(()=>U.value?.stepbar||{}),ae=e.computed(()=>{const t=B.value?.segmentOrder;return["asc","desc","input"].includes(t)?t:"input"}),se=e.computed(()=>{const t=Number(B.value?.totalValue);return Number.isFinite(t)&&t>0?t:100}),je=e.computed(()=>B.value?.showRemainder!==!1),St=e.computed(()=>B.value?.remainderLabel||"Remaining"),ut=e.computed(()=>B.value?.remainderColor||"#E5E7EB"),Ge=e.computed(()=>{const t=Number(B.value?.barWidth);return Number.isFinite(t)&&t>0?t:42}),_t=e.computed(()=>{const t=Number(B.value?.minBarWidth);return Number.isFinite(t)&&t>0?t:12}),Nt=e.computed(()=>{const t=Number(B.value?.maxBarWidth);return Number.isFinite(t)&&t>0?t:58});e.computed(()=>{const t=Number(B.value?.barRadius);return Number.isFinite(t)&&t>=0?t:6});const vt=e.computed(()=>B.value?.axisBars||{}),Lt=e.computed(()=>vt.value?.show!==!1);e.computed(()=>vt.value?.showVertical===!0);const Ht=e.computed(()=>vt.value?.color||"#d6d6d6"),Mt=e.computed(()=>{const t=Number(vt.value?.opacity);return Number.isFinite(t)?Math.min(Math.max(t,0),1):.75}),wl=e.computed(()=>{const t=Number(vt.value?.width);return Number.isFinite(t)&&t>0?t:1}),jl=e.computed(()=>vt.value?.dashArray||"3,4"),El=e.computed(()=>{const t=Number(B.value?.columnGap);return Number.isFinite(t)&&t>=0?t:16}),rl=e.computed(()=>{const t=Number(B.value?.labelReserve);return Number.isFinite(t)&&t>0?t:48}),ml=e.computed(()=>{const t=Number(B.value?.trackAreaHeight);return Number.isFinite(t)&&t>0?t:220}),un=e.computed(()=>{let t=0;et.value&&(t+=15),lt.value&&(t+=10);const o=50+t,l=rl.value+8;return o+ml.value+l}),yl=e.computed(()=>Math.max(P.value.height,0)),ft=e.computed(()=>{const t=Number(B.value?.columnWidth);if(Number.isFinite(t)&&t>0)return t;const o=Ge.value,l=_t.value,r=Nt.value;return Math.max(l,Math.min(r,o))}),zl=e.computed(()=>{const t=Number(B.value?.trackWidth);if(Number.isFinite(t)&&t>0)return Math.min(t,ft.value);const o=Number(B.value?.barWidth);return Number.isFinite(Number(B.value?.columnWidth))&&Number(B.value?.columnWidth)>0&&Number.isFinite(o)&&o>0?Math.min(o,ft.value):Math.min(ft.value,Math.max(10,Math.round(ft.value*.32)))}),Kl=e.computed(()=>({width:`${ft.value}px`,flex:`0 0 ${ft.value}px`,"--dss-step-bar-track-thickness":`${zl.value}px`,"--dss-stepbar-label-height":`${rl.value}px`})),Hl=e.computed(()=>{const t=Gl.value.length;return t?t*ft.value+Math.max(0,t-1)*El.value:0}),Rn=e.computed(()=>({maxSegment:{marker:{enabled:!1}}})),Gl=e.computed(()=>xe.value!=="stepbar"?[]:Dn.value.map(t=>({key:t.key,label:t.axisLabel||t.label,totalValue:t.totalValue,segments:t.segments.filter(o=>!o.isRemainder).map(o=>({label:o.label,value:o.value,color:o.color,marker:o.marker}))}))),bn=e.computed(()=>{if(xe.value!=="stepbar")return[];const{minY:t,maxY:o}=Bt.value,l=5,r=[];for(let m=0;m<=l;m++){const v=t+(o-t)*(m/l);r.push({top:Un(v)-P.value.top,value:v})}return r}),Bn=e.computed(()=>({top:`${P.value.top}px`,left:`${P.value.left}px`,width:`${P.value.width}px`,height:`${yl.value+rl.value}px`})),nn=e.computed(()=>({width:`${Hl.value}px`,minHeight:`${yl.value+rl.value}px`})),Rl=e.computed(()=>xe.value==="stepbar"&&Se.value&&Le.value.show&&!ne.value.isZooming),dn=e.computed(()=>{const t=ft.value+El.value;return{left:`${Le.value.categoryIndex*t+ft.value/2}px`,height:`${yl.value}px`,borderColor:ot.value}}),Sl=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.enabled!==!1}),mn=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),Wl=e.computed(()=>{const t=U.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),pn=e.computed(()=>{const t=U.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),on=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),il=e.computed(()=>{const t=U.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),jn=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.onDataChange!==!1}),Fn=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),ql=e.computed(()=>{const t=U.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),vn=e.computed(()=>U.value?.spider?.gridSteps||5),Ll=e.computed(()=>{const t=[],o=vn.value;for(let l=1;l<=o;l++)t.push(it.value/o*l);return t}),In=t=>{const o=fn.value;if(o&&Array.isArray(o)&&o[t]!==void 0)return o[t].toString();const l=Ll.value[t];return Math.round(l/it.value*100)+"%"},fn=e.computed(()=>U.value?.spider?.gridLabels||null),cl=e.computed(()=>{const t=U.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0}),jt=e.computed(()=>{const t=U.value,o={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...o,...t.contextMenu.items}:o}),Kt=e.computed(()=>{const t=U.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),Yt=e.computed(()=>{const t=U.value;return t&&t.markers&&t.markers.icon?t.markers.icon:Pn.value}),Tl=e.computed(()=>{const t=U.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),Tt=e.computed(()=>{const t=U.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),wt=e.computed(()=>{const o=U.value?.valueFormat?.extension;return typeof o=="string"?o:""}),Vl=t=>{const o=wt.value;if(t==null)return"";const l=String(t);return o?l+o:l},hn=e.computed(()=>!ne.value.isZooming);e.computed(()=>ll.value.map(t=>{if(t.categoryIndex!==void 0&&($l.value||Ot.value)){const o=Cl(t.categoryIndex),l=Re.value+P.value.bottom-Tt.value/2;return{...t,x:o,y:l}}return t}));function Nl(t,o){let l;if(t instanceof Date)l=new Date(t.getFullYear(),t.getMonth(),t.getDate());else if(typeof t=="string"){const[v,b,x]=t.split("-"),q=Number(x?.length===2?`20${x}`:x);l=new Date(q,Number(b)-1,Number(v))}else return 0;let r=0,m=1/0;return o.forEach((v,b)=>{const[x,q,T]=v.split("-"),I=Number(T?.length===2?`20${T}`:T),$=new Date(I,Number(q)-1,Number(x)),G=Math.abs($-l);G<m&&(m=G,r=b)}),r}const gn=e.computed(()=>{const t=Z.markers.map(l=>{const r=Nl(l.marker_date,Z.categories),m=Cl(r),v=Re.value+P.value.bottom-Tt.value/2;return{...l,x:m,y:v,categoryIndex:r,source:"props"}}),o=ll.value.map(l=>{if(l.categoryIndex!==void 0&&($l.value||Ot.value)){const r=Cl(l.categoryIndex),m=Re.value+P.value.bottom-Tt.value/2;return{...l,x:r,y:m,source:"internal"}}return{...l,source:"internal"}});return[...t,...o]}),Bl=e.computed(()=>{const t=U.value;return t&&t.watermark&&t.watermark.enabled===!0}),Zl=e.computed(()=>{const t=U.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),an=e.computed(()=>{const t=U.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:35}),Dl=e.computed(()=>{const t=U.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),Gt=e.computed(()=>{const t={left:P.value.left,top:P.value.top,width:P.value.width,height:P.value.height};let o,l;const r=String(an.value);if(r.includes("%")){const m=parseFloat(r)/100;o=t.width*m,l=o*(96/499)}else{const m=parseFloat(r)||25;o=Math.min(t.width*.25,200)*(m/25),l=o*(96/499)}return{width:o,height:l,area:t}}),zn=e.computed(()=>{const{width:t,height:o}=Gt.value,l=Dl.value;let r,m;const v=P.value.left,b=P.value.right,x=P.value.top,q=P.value.bottom,T=P.value.width,I=P.value.height;switch(l){case"center":r=v+(T-t)/2,m=x+(I-o)/2;break;case"top-left":r=v+15,m=x+5;break;case"top-right":r=b-t-15,m=x+5;break;case"bottom-left":r=v+15,m=q-o-5;break;case"bottom-right":default:r=b-t-15,m=q-o-5;break}return{backgroundPositionX:r+"px",backgroundPositionY:m+"px",backgroundSize:`${t}px ${o}px`}}),Pl=t=>!Z.flags||!Z.flags.length?[]:Z.flags.filter(o=>o.categoryIndex===t),Dt=t=>{const o=Pl(t),l=ea(t),r=o.filter(b=>b.manual),m=o.filter(b=>!b.manual),v=[];return r.length>0&&v.push({type:N("chart.tooltip.manualFlags"),color:"#698dbe",flags:r.map(b=>({text:b.text,color:"#698dbe"}))}),m.length>0&&v.push({type:N("chart.tooltip.autoFlags"),color:"#a1d499",flags:m.map(b=>({text:b.text,color:"#a1d499"}))}),{flagGroups:v,markers:l.map(b=>({title:b.title,description:b.description,type:N("chart.tooltip.markers"),color:b.color||"#9784ba"}))}},Pn=e.computed(()=>{const t=Z.old?`<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"),ha=require("vue-i18n"),xs={key:0,class:"dss-datepicker__input-wrap dss-datepicker__input-wrap--readonly"},Es=["value"],Ss=["placeholder","value","disabled"],Vs=["aria-label"],Ns=["placeholder","value"],Bs={key:0,class:"dss-datepicker__range-values"},_s=["placeholder","value"],Ms={key:0,class:"dss-datepicker__comparison-range"},$s={class:"dss-datepicker__comparison-date"},Ds={class:"dss-datepicker__comparison-date"},Ls=["placeholder","value"],Ts=["aria-label","aria-pressed"],As=["aria-selected","onClick"],Hs={class:"dss-datepicker__list-item-label"},Rs={key:0,class:"dss-datepicker__list-item-check",width:"16",height:"16",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},Fs={key:1,class:"dss-datepicker__list-empty"},Is={key:1,class:"dss-datepicker__double-wrap"},zs={key:0,class:"dss-datepicker__side-panel"},Ps={key:0,class:"dss-datepicker__quick-select","aria-label":"Quick range"},Os=["disabled","onClick"],Ws={key:1,class:"dss-datepicker__comparison-panel"},qs={key:0,class:"dss-datepicker__comparison-modes"},Zs=["onClick"],Us={class:"dss-datepicker__double-content"},Ys={class:"dss-datepicker__double-calendars"},Xs={class:"dss-datepicker__double-calendar"},js={class:"dss-datepicker__calendar-header"},Ks=["aria-label"],Gs={class:"dss-datepicker__month-year-row"},Qs=["aria-label"],Js={class:"dss-datepicker__weekdays"},er={class:"dss-datepicker__grid"},tr=["disabled","onClick","onMouseenter"],lr={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},nr={class:"dss-datepicker__double-calendar"},ar={class:"dss-datepicker__calendar-header"},or=["aria-label"],sr={class:"dss-datepicker__month-year-row"},rr=["aria-label"],ir={class:"dss-datepicker__weekdays"},cr={class:"dss-datepicker__grid"},ur=["disabled","onClick","onMouseenter"],dr={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},mr={key:0,class:"dss-datepicker__comparison-panel dss-datepicker__comparison-panel--bottom"},pr={key:0,class:"dss-datepicker__comparison-modes dss-datepicker__comparison-modes--inline"},vr=["onClick"],fr={key:0,class:"dss-datepicker__side-panel"},hr={class:"dss-datepicker__quick-select","aria-label":"Quick date"},gr=["disabled","onClick"],yr={class:"dss-datepicker__single-calendar"},kr={key:0,class:"dss-datepicker__comparison-panel dss-datepicker__comparison-panel--single"},Cr={key:0,class:"dss-datepicker__comparison-modes"},br=["onClick"],wr={class:"dss-datepicker__calendar-header"},xr=["aria-label"],Er={class:"dss-datepicker__month-year-row"},Sr=["aria-label"],Vr={class:"dss-datepicker__weekdays"},Nr={class:"dss-datepicker__grid"},Br=["disabled","onClick","onMouseenter"],_r={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},Mr={class:"dss-datepicker__calendar-header"},$r={class:"dss-datepicker__month-year-row"},Dr={class:"dss-datepicker__month-year dss-datepicker__month-year--static"},Lr={class:"dss-datepicker__months-grid"},Tr=["onClick"],Ar={class:"dss-datepicker__calendar-header dss-datepicker__calendar-header--center"},Hr={class:"dss-datepicker__month-year"},Rr={class:"dss-datepicker__years-grid"},Fr=["data-year","onClick"],Ao=27,Kn=8,go={__name:"DSSDatepicker",props:{mode:{type:String,default:"single",validator:B=>["single","range","singleFromAvailable","rangeFromAvailable","listFromAvailable","readonly"].includes(B)},modelValue:{type:[Date,Object],default:null},availableDates:{type:Array,default:()=>[]},minDate:{type:Date,default:null},maxDate:{type:Date,default:null},exceptDates:{type:Array,default:()=>[]},doubleCalendar:{type:Boolean,default:!1},quickSelect:{type:Boolean,default:!0},quickSelectOptions:{type:Array,default:null},comparisonEnabled:{type:Boolean,default:!1},comparisonValue:{type:Object,default:()=>({start:null,end:null})},comparisonControlsPlacement:{type:String,default:"side",validator:B=>["side","bottom"].includes(B)},comparisonModeOptions:{type:Array,default:null},placeholder:{type:String,default:""},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:comparisonValue"],setup(B,{emit:J}){const N=B,L=J,{t:ne,locale:W}=ha.useI18n(),R=e.ref(!1),ue=e.ref("days"),rt=new Date,ee=e.computed(()=>N.minDate instanceof Date?N.minDate:rt),g=e.ref(ee.value.getMonth()),we=e.ref(ee.value.getFullYear()),ke=e.ref(ee.value.getMonth()),G=e.ref(ee.value.getFullYear()),j=e.ref(ee.value.getMonth()),fe=e.ref(ee.value.getFullYear()),He=e.ref("start"),he=e.ref("start"),Te=e.ref(null),Z=e.ref(null),Fe=e.ref(!1),qe=e.ref("previousPeriod"),Me=e.ref("primary"),Ze=e.ref({start:null,end:null});function U(){const k=ee.value,C=k.getMonth(),x=k.getFullYear(),d=C===11?0:C+1,f=C===11?x+1:x;return{left:{month:C,year:x},right:{month:d,year:f}}}const Ae=e.ref(null),Ye=e.ref(null),Ce=e.ref(null),$e=e.ref(null),lt=e.ref(null),ft=e.ref(null),it=e.ref(null),Xt=e.ref(null),xe=new Date().getFullYear(),Lt=e.computed(()=>["single","singleFromAvailable"].includes(N.mode)),Ke=e.computed(()=>["range","rangeFromAvailable"].includes(N.mode)),Je=e.computed(()=>N.mode==="listFromAvailable"),mt=e.computed(()=>{if(!["single","singleFromAvailable","listFromAvailable"].includes(N.mode))return null;const k=N.modelValue;return k instanceof Date?k:null}),Tt=e.computed(()=>{if(!Ke.value)return{start:null,end:null};const k=N.modelValue;return!k||typeof k!="object"?{start:null,end:null}:{start:k.start instanceof Date?k.start:null,end:k.end instanceof Date?k.end:null}}),at=e.computed(()=>Ct(N.comparisonValue)),pt=e.computed(()=>N.comparisonEnabled&&Ke.value),ct=e.computed(()=>pt.value&&N.comparisonControlsPlacement==="side"),Ut=e.computed(()=>pt.value&&N.comparisonControlsPlacement==="bottom"),ht=e.computed(()=>pt.value&&Fe.value&&qe.value==="custom"&&Me.value==="comparison"),Rt={previousPeriod:"datepicker.comparison.previousPeriod",previousYear:"datepicker.comparison.previousYear",custom:"datepicker.comparison.custom"},me=[{id:"previousPeriod",labelKey:"datepicker.comparison.previousPeriod"},{id:"previousYear",labelKey:"datepicker.comparison.previousYear"},{id:"custom",labelKey:"datepicker.comparison.custom"}],F=e.computed(()=>{const C=(Array.isArray(N.comparisonModeOptions)&&N.comparisonModeOptions.length?N.comparisonModeOptions:me).map(x=>typeof x=="string"?{id:x,labelKey:Rt[x]}:!x||typeof x!="object"||!x.id?null:{...x,labelKey:x.labelKey||Rt[x.id]}).filter(x=>x&&Rt[x.id]);return C.length?C:me});function Y(k){return k.label?k.label:k.labelKey?ne(k.labelKey):k.id}function re(k){return F.value.some(C=>C.id===k)}function ve(){if(re(qe.value))return;const k=F.value[0]?.id||"previousPeriod";qe.value=k,Me.value=k==="custom"?"comparison":"primary",Fe.value&&k!=="custom"&&an()}function Re(k){if(!k||!(k instanceof Date))return"";const C=k.getDate(),x=k.getMonth()+1,d=k.getFullYear(),f=b=>String(b).padStart(2,"0");return`${f(C)}/${f(x)}/${d}`}function Ge(k){return k instanceof Date&&!Number.isNaN(k.getTime())?new Date(k.getFullYear(),k.getMonth(),k.getDate()):null}function Ct(k){return!k||typeof k!="object"?{start:null,end:null}:{start:Ge(k.start),end:Ge(k.end)}}function Se(k){const C=Ct(k),{start:x,end:d}=C;return x&&d&&x>d?{start:d,end:x}:C}function tt(k){const{start:C,end:x}=Se(k);return!C&&!x?"":!C||!x?Re(C||x):C&&x&&ml(C,x)?Re(C):`${Re(C||x)} - ${Re(x||C)}`}const gt=e.computed(()=>Re(mt.value)),jt=e.computed(()=>tt(Tt.value)),se=e.computed(()=>{const{start:k,end:C}=Se(at.value);return!k||!C?null:{start:Re(k),end:Re(C)}}),X=e.computed(()=>{if(N.mode!=="readonly")return"—";const k=N.modelValue;if(k instanceof Date)return Re(k)||"—";if(k&&typeof k=="object"&&("start"in k||"end"in k)){const C=k.start instanceof Date?k.start:null,x=k.end instanceof Date?k.end:null;if(!C&&!x)return"—";const d=!x||C&&C<=x?C:x,f=!C||x&&x>=C?x:C;return ml(d,f)?Re(d):`${Re(d)} - ${Re(f)}`}return"—"});e.computed(()=>{const k=new Date(we.value,g.value,1);return new Intl.DateTimeFormat(W.value,{month:"long",year:"numeric"}).format(k)});const te=e.computed(()=>Z.value==="left"?ke.value:Z.value==="right"?j.value:g.value),ie=e.computed(()=>Z.value==="left"?G.value:Z.value==="right"?fe.value:we.value),Ne=e.computed(()=>{const k=new Date(we.value,g.value,1);return new Intl.DateTimeFormat(W.value,{month:"long"}).format(k)}),et=e.computed(()=>{const k=new Date(ie.value,te.value,1);return new Intl.DateTimeFormat(W.value,{month:"long"}).format(k)}),yt=e.computed(()=>{const k=new Intl.DateTimeFormat(W.value,{month:"short"});return Array.from({length:12},(C,x)=>k.format(new Date(2024,x,1)))}),al=e.computed(()=>{const C=(Z.value?ie.value:we.value)-Math.floor(Ao/2);return Array.from({length:Ao},(x,d)=>C+d)}),xt=e.computed(()=>{const k=al.value;return k.length?`${k[0]} – ${k[k.length-1]}`:""});function el(k){return k===7?0:k}function H(k){try{const C=new Intl.Locale(k);if(C.weekInfo?.firstDay!=null)return el(C.weekInfo.firstDay)}catch{}return 1}function V(k){const C=new Date(2024,0,1),x=(C.getDay()-k+7)%7,d=new Date(C);return d.setDate(C.getDate()-x),d}const M=e.computed(()=>H(W.value)),ae=e.computed(()=>{const k=new Intl.DateTimeFormat(W.value,{weekday:"short"}),C=V(M.value),x=[];for(let d=0;d<7;d++){const f=new Date(C);f.setDate(C.getDate()+d),x.push(k.format(f).slice(0,2))}return x});function oe(k,C,x){const d=new Date(k,C,1),f=new Date(k,C+1,0),b=(d.getDay()-x+7)%7,_=f.getDate(),$=[];for(let ye=0;ye<b;ye++)$.push(null);for(let ye=1;ye<=_;ye++)$.push(new Date(k,C,ye));return $}const Ue=e.computed(()=>oe(we.value,g.value,M.value)),bt=e.computed(()=>oe(G.value,ke.value,M.value)),ot=e.computed(()=>oe(fe.value,j.value,M.value));e.computed(()=>{const k=new Date(G.value,ke.value,1);return new Intl.DateTimeFormat(W.value,{month:"long",year:"numeric"}).format(k)}),e.computed(()=>{const k=new Date(fe.value,j.value,1);return new Intl.DateTimeFormat(W.value,{month:"long",year:"numeric"}).format(k)});const Xe=e.computed(()=>{const k=new Date(G.value,ke.value,1);return new Intl.DateTimeFormat(W.value,{month:"long"}).format(k)}),Nt=e.computed(()=>{const k=new Date(fe.value,j.value,1);return new Intl.DateTimeFormat(W.value,{month:"long"}).format(k)}),wt=e.computed(()=>N.availableDates&&N.availableDates.length>0),ut={all:"datepicker.quickSelect.allDates",last2:"datepicker.quickSelect.last2Dates",last3:"datepicker.quickSelect.last3Dates",last4:"datepicker.quickSelect.last4Dates",last5:"datepicker.quickSelect.last5Dates",today:"datepicker.quickSelect.today",lastWeek:"datepicker.quickSelect.lastWeek",last15Days:"datepicker.quickSelect.last15Days",last30Days:"datepicker.quickSelect.last30Days",thisMonth:"datepicker.quickSelect.thisMonth",lastMonth:"datepicker.quickSelect.lastMonth",last3Months:"datepicker.quickSelect.last3Months",last6Months:"datepicker.quickSelect.last6Months",last12Months:"datepicker.quickSelect.last12Months",lastYear:"datepicker.quickSelect.lastYear",in7Days:"datepicker.quickSelect.in7Days",in14Days:"datepicker.quickSelect.in14Days",in30Days:"datepicker.quickSelect.in30Days"},_t=e.computed(()=>Lt.value&&!wt.value?[{id:"in7Days",labelKey:"datepicker.quickSelect.in7Days"},{id:"in14Days",labelKey:"datepicker.quickSelect.in14Days"},{id:"in30Days",labelKey:"datepicker.quickSelect.in30Days"}]:wt.value?[{id:"all",labelKey:"datepicker.quickSelect.allDates"},{id:"last2",labelKey:"datepicker.quickSelect.last2Dates"},{id:"last3",labelKey:"datepicker.quickSelect.last3Dates"},{id:"last4",labelKey:"datepicker.quickSelect.last4Dates"},{id:"last5",labelKey:"datepicker.quickSelect.last5Dates"}]:[{id:"today",labelKey:"datepicker.quickSelect.today"},{id:"lastWeek",labelKey:"datepicker.quickSelect.lastWeek"},{id:"last15Days",labelKey:"datepicker.quickSelect.last15Days"},{id:"last30Days",labelKey:"datepicker.quickSelect.last30Days"},{id:"thisMonth",labelKey:"datepicker.quickSelect.thisMonth"},{id:"lastMonth",labelKey:"datepicker.quickSelect.lastMonth"},{id:"last3Months",labelKey:"datepicker.quickSelect.last3Months"},{id:"last6Months",labelKey:"datepicker.quickSelect.last6Months"},{id:"last12Months",labelKey:"datepicker.quickSelect.last12Months"},{id:"lastYear",labelKey:"datepicker.quickSelect.lastYear"}]),$t=e.computed(()=>(Array.isArray(N.quickSelectOptions)&&N.quickSelectOptions.length?N.quickSelectOptions:_t.value).map(C=>typeof C=="string"?{id:C,labelKey:ut[C]}:!C||typeof C!="object"||!C.id?null:{...C,labelKey:C.labelKey||ut[C.id]}).filter(C=>C&&C.id));function Et(k){return k.label?k.label:k.labelKey?ne(k.labelKey):k.id}const kl=e.ref({top:0,left:0}),Zl=e.ref("left");let bl=null;function tl(){R.value&&e.nextTick(()=>{R.value&&(bl!==null&&window.cancelAnimationFrame(bl),bl=window.requestAnimationFrame(()=>{bl=null,ol()}))})}function ol(){if(!lt.value||!R.value)return;const k=lt.value.getBoundingClientRect(),C=window.innerWidth||document.documentElement.clientWidth,x=window.innerHeight||document.documentElement.clientHeight;let d=k.left,f=k.bottom+4;const b=ft.value;if(b){const _=b.offsetWidth,$=b.offsetHeight;Zl.value==="right"||d+_>C-Kn?(Zl.value="right",d=k.right-_):Zl.value="left";const ge=Math.max(Kn,C-_-Kn);if(d=Math.min(Math.max(d,Kn),ge),f+$>x-Kn){const st=k.top-4-$;st>=Kn?f=st:f=Math.max(Kn,x-$-Kn)}}kl.value={top:f,left:d}}const un=e.computed(()=>!lt.value||!R.value?{}:{position:"fixed",left:`${kl.value.left}px`,top:`${kl.value.top}px`,zIndex:1002});function ml(k,C){return!k||!C?!1:k.getFullYear()===C.getFullYear()&&k.getMonth()===C.getMonth()&&k.getDate()===C.getDate()}function dt(k){return new Date(k.getFullYear(),k.getMonth(),k.getDate()).getTime()}function Hl(k){return!N.availableDates||!N.availableDates.length?!0:N.availableDates.some(C=>C instanceof Date&&ml(C,k))}function Ul(k){const C=dt(k);return!(N.minDate instanceof Date&&C<dt(N.minDate)||N.maxDate instanceof Date&&C>dt(N.maxDate))}function Ll(k){const C=new Date(k);return new Date(C.getFullYear(),C.getMonth(),C.getDate())}function Wn(k){return Math.floor(Date.UTC(k.getFullYear(),k.getMonth(),k.getDate())/864e5)}function Yl(k,C){return new Date(k.getFullYear(),k.getMonth(),k.getDate()+C)}function bn(k){return k.filter(C=>Ul(C))}function $n(k,C){if(!(k instanceof Date)||!(C instanceof Date))return null;let x=dt(k),d=dt(C);if(x>d&&([x,d]=[d,x]),N.minDate instanceof Date){const f=dt(N.minDate);x=Math.max(x,f),d=Math.max(d,f)}if(N.maxDate instanceof Date){const f=dt(N.maxDate);x=Math.min(x,f),d=Math.min(d,f)}return x>d?null:{start:Ll(x),end:Ll(d)}}function tn(k){return!N.exceptDates||!N.exceptDates.length?!1:N.exceptDates.some(C=>C instanceof Date&&ml(C,k))}function _l(k){return tn(k)?!1:["singleFromAvailable","rangeFromAvailable"].includes(N.mode)?Hl(k)&&Ul(k):Ul(k)}function dn(k){const C=mt.value,x=Tt.value,d=at.value,f=dt(k),b=Ke.value&&x.start&&x.end&&f>Math.min(dt(x.start),dt(x.end))&&f<Math.max(dt(x.start),dt(x.end)),_=Ke.value&&x.start&&ml(k,x.start),$=Ke.value&&x.end&&ml(k,x.end),ye=_&&$,ge=pt.value&&Fe.value,st=ge&&d.start&&ml(k,d.start),Ve=ge&&d.end&&ml(k,d.end),Qe=st&&Ve,Q=ge&&d.start&&d.end&&f>Math.min(dt(d.start),dt(d.end))&&f<Math.max(dt(d.start),dt(d.end)),Zt=Lt.value&&C&&ml(k,C)||_||$;let Oe=!1,Jn=!1;const ea=ht.value?d:x;if(Ke.value&&ea.start&&!ea.end&&Te.value){const xn=dt(ea.start),yn=dt(Te.value),En=Math.min(xn,yn),Tn=Math.max(xn,yn);ht.value?Jn=f>En&&f<Tn:Oe=f>En&&f<Tn}return{"dss-datepicker__day--comparison-start":st&&!Qe&&!Zt,"dss-datepicker__day--comparison-end":Ve&&!Qe&&!Zt,"dss-datepicker__day--comparison-single":Qe&&!Zt,"dss-datepicker__day--in-comparison-range":Q&&!st&&!Ve&&!_&&!$,"dss-datepicker__day--in-comparison-preview":Jn&&!st&&!Ve&&!Q&&!_&&!$,"dss-datepicker__day--selected":Zt&&!ye,"dss-datepicker__day--range-start":_&&!ye,"dss-datepicker__day--range-end":$&&!ye,"dss-datepicker__day--range-single":ye,"dss-datepicker__day--in-range":b&&!_&&!$,"dss-datepicker__day--in-range-preview":Oe&&!_&&!$&&!b,"dss-datepicker__day--disabled":!_l(k)}}function wl(k){if(!Ke.value)return;const C=ht.value?at.value:Tt.value;if(!C.start||C.end){Te.value=null;return}if(!_l(k)){Te.value=null;return}Te.value=new Date(k.getFullYear(),k.getMonth(),k.getDate())}function mn(){Te.value=null}function zl(k=Tt.value){if(!N.doubleCalendar||!Ke.value)return;const C=Ct(k),{start:x,end:d}=C;if(x&&d){const _=x<=d?x:d,$=x<=d?d:x,ye=_.getMonth(),ge=_.getFullYear(),st=$.getMonth(),Ve=$.getFullYear();if(ye!==st||ge!==Ve){const Qe=ke.value===ye&&G.value===ge,Q=j.value===st&&fe.value===Ve;if(Qe&&Q)return;ke.value=ye,G.value=ge,j.value=st,fe.value=Ve}else{const Qe=ye===0?11:ye-1,Q=ye===0?ge-1:ge;ke.value===Qe&&G.value===Q&&j.value===ye&&fe.value===ge||(ke.value=ye,G.value=ge,ye===11?(j.value=0,fe.value=ge+1):(j.value=ye+1,fe.value=ge))}return}const f=x||d;if(f){const _=f.getMonth(),$=f.getFullYear(),ye=ke.value===_&&G.value===$,ge=j.value===_&&fe.value===$;if(ye||ge)return;ke.value=_,G.value=$,_===11?(j.value=0,fe.value=$+1):(j.value=_+1,fe.value=$);return}const b=U();ke.value=b.left.month,G.value=b.left.year,j.value=b.right.month,fe.value=b.right.year}const pn=e.computed(()=>new Intl.DateTimeFormat(W.value,{day:"2-digit",month:"long",year:"numeric"})),ln=e.computed(()=>{if(!Je.value)return[];const k=(N.availableDates||[]).filter(x=>x instanceof Date&&!Number.isNaN(x.getTime())).filter(x=>!tn(x)&&Ul(x)).map(x=>new Date(x.getFullYear(),x.getMonth(),x.getDate()));k.sort((x,d)=>d.getTime()-x.getTime());const C=mt.value;return k.map(x=>({date:x,ts:x.getTime(),label:pn.value.format(x),selected:!!(C&&ml(x,C))}))});function ll(){if(R.value){Rl();return}lt.value=$e.value?.closest(".dss-datepicker__input-wrap"),Zl.value="left",R.value=!0,tl(),e.nextTick(()=>{Xt.value?.querySelector(".dss-datepicker__list-item--selected")?.scrollIntoView({block:"nearest",behavior:"auto"})})}function Gn(k){if(!(k instanceof Date))return;const C=new Date(k.getFullYear(),k.getMonth(),k.getDate());L("update:modelValue",C),Rl()}function qn(k="start"){if(N.mode==="readonly")return;He.value=k;const C=mt.value,x=Tt.value;if(Lt.value&&C)g.value=C.getMonth(),we.value=C.getFullYear();else if(Ke.value)if(N.doubleCalendar)zl();else{const d=k==="start"&&x.start?x.start:x.end||x.start;d&&(g.value=d.getMonth(),we.value=d.getFullYear())}lt.value=Lt.value?Ae.value?.closest(".dss-datepicker__input-wrap"):Ye.value,ue.value="days",Z.value=null,Zl.value="left",R.value=!0,tl()}function Rl(){ue.value="days",Z.value=null,Te.value=null,R.value=!1}function vn(k,C){Z.value=k,ue.value=C}function Ml(){ue.value="days",Z.value=null}function Qn(k,C,x,d){switch(k){case"today":return new Date(C,x,d);case"in7Days":return new Date(C,x,d+7);case"in14Days":return new Date(C,x,d+14);case"in30Days":return new Date(C,x,d+30);default:return null}}function nn(k,C,x,d){const f=new Date(C,x,d);let b,_;switch(k){case"today":b=f,_=f;break;case"lastWeek":b=new Date(C,x,d-6),_=f;break;case"last15Days":b=new Date(C,x,d-14),_=f;break;case"last30Days":b=new Date(C,x,d-29),_=f;break;case"thisMonth":b=new Date(C,x,1),_=f;break;case"lastMonth":b=new Date(C,x-1,1),_=new Date(C,x,0);break;case"last3Months":b=new Date(C,x-3,1),_=new Date(C,x,0);break;case"last6Months":b=new Date(C,x-6,1),_=new Date(C,x,0);break;case"last12Months":b=new Date(C,x-12,1),_=new Date(C,x,0);break;case"lastYear":b=new Date(C-1,0,1),_=new Date(C-1,11,31);break;default:return null}return{start:b,end:_}}function sl(k){const C=new Date,x=C.getFullYear(),d=C.getMonth(),f=C.getDate();let b,_;if(wt.value){const $=bn([...N.availableDates].filter(ye=>ye instanceof Date).map(ye=>new Date(ye.getFullYear(),ye.getMonth(),ye.getDate()))).sort((ye,ge)=>ye.getTime()-ge.getTime());if($.length===0)return null;if(k==="all")b=$[0],_=$[$.length-1];else{const ye=parseInt(k.replace("last",""),10);if(Number.isInteger(ye)&&ye>=2&&ye<=5){const ge=$.slice(-ye);if(ge.length===0)return null;b=ge[0],_=ge[ge.length-1]}else{const ge=nn(k,x,d,f);if(!ge)return null;const st=hn(ge);if(!st.length)return null;b=st[0],_=st[st.length-1]}}}else{const $=nn(k,x,d,f);if(!$)return null;b=$.start,_=$.end}return{start:b,end:_}}function Wt(k){const C=new Date,x=Qn(k,C.getFullYear(),C.getMonth(),C.getDate()),d=Ge(x);return!d||!_l(d)?null:d}function qt(k){const C=sl(k);return C?$n(C.start,C.end):null}function vl(k){return Lt.value?Wt(k)!==null:qt(k)!==null}function Pl(k){const C=Wt(k);C&&(L("update:modelValue",C),Rl())}function Dt(k){if(Lt.value){Pl(k);return}xl(k)}function kt(){L("update:modelValue",null)}function xl(k){const C=qt(k);C&&(L("update:modelValue",C),zl())}function El(k){return!!(k&&k.start instanceof Date&&k.end instanceof Date)}function gl(k){L("update:comparisonValue",Ct(k))}function Xl(k=at.value){const C=Ct(k);El(C)&&(Ze.value=C)}function Fl(){return El(Ze.value)?(gl(Ze.value),N.doubleCalendar&&zl(Ze.value),!0):!1}function fn(k){const C=Se(k);return El(C)?_l(C.start)&&_l(C.end):!1}function hn(k){const C=Se(k);if(!El(C))return[];const x=dt(C.start),d=dt(C.end);return(N.availableDates||[]).filter(f=>f instanceof Date&&!Number.isNaN(f.getTime())).map(f=>Ge(f)).filter(f=>{const b=dt(f);return b>=x&&b<=d&&_l(f)}).sort((f,b)=>dt(f)-dt(b))}function $l(k){if(!(k instanceof Date))return null;const C=new Date(k.getFullYear()-1,k.getMonth(),k.getDate());return C.getMonth()!==k.getMonth()?new Date(k.getFullYear()-1,k.getMonth()+1,0):C}function Yt(k=qe.value){const C=Se(Tt.value);if(!El(C))return{start:null,end:null};let x,d;if(k==="previousPeriod"){const b=Wn(C.end)-Wn(C.start)+1;d=Yl(C.start,-1),x=Yl(d,-(b-1))}else if(k==="previousYear")x=$l(C.start),d=$l(C.end);else return at.value;let f=Se({start:x,end:d});if(N.mode==="rangeFromAvailable"&&N.availableDates?.length){const b=hn(f);if(!b.length)return{start:null,end:null};f={start:b[0],end:b[b.length-1]}}return fn(f)?f:{start:null,end:null}}function an(){!pt.value||!Fe.value||qe.value==="custom"||gl(Yt())}function Sl(){if(pt.value){if(Fe.value=!Fe.value,!Fe.value){qe.value==="custom"&&Xl(),Me.value="primary",gl({start:null,end:null});return}if(qe.value==="custom"){Me.value="comparison",Fl();return}Me.value="primary",an()}}function St(k){if(re(k)){if(qe.value=k,Te.value=null,k==="custom"){if(Me.value="comparison",Fl())return;N.doubleCalendar&&El(at.value)&&zl(at.value);return}Me.value="primary",an()}}function Dn(k,C,x){const d=Ct(k);return!d.start&&!d.end?(x.value="end",{start:C,end:null}):d.start&&d.end?(x.value="end",{start:C,end:null}):x.value==="start"?(x.value="end",Se({start:C,end:d.end})):(x.value="start",Se({start:d.start,end:C}))}function Kt(k){Z.value==="left"?ke.value=k:Z.value==="right"?j.value=k:g.value=k,Ml()}function Vl(k){Z.value==="left"?G.value=k:Z.value==="right"?fe.value=k:we.value=k,Ml()}function gn(){g.value===0?(g.value=11,we.value--):g.value--}function wn(){g.value===11?(g.value=0,we.value++):g.value++}function on(){ke.value===0?(ke.value=11,G.value--):ke.value--}function yl(){ke.value===11?(ke.value=0,G.value++):ke.value++}function Ln(){j.value===0?(j.value=11,fe.value--):j.value--}function jl(){j.value===11?(j.value=0,fe.value++):j.value++}function sn(k){if(!_l(k))return;const C=new Date(k.getFullYear(),k.getMonth(),k.getDate());if(Lt.value){L("update:modelValue",C),Rl();return}if(ht.value){const d=Dn(at.value,C,he);El(d)&&Xl(d),gl(d);return}Me.value="primary";const x=Dn(Tt.value,C,He);L("update:modelValue",x)}e.watch(Tt,()=>{N.doubleCalendar&&Ke.value&&R.value&&zl(),an()},{deep:!0}),e.watch(()=>N.comparisonEnabled,k=>{if(ve(),!k){Fe.value=!1,Me.value="primary";return}El(at.value)?Fe.value=!0:Fe.value&&qe.value!=="custom"&&an()}),e.watch(F,()=>{ve()},{deep:!0}),e.watch(at,k=>{pt.value&&El(k)&&(Fe.value=!0,qe.value==="custom"&&Xl(k))},{deep:!0,immediate:!0});let Tl=null,Kl=null,nl=null;function Ol(){Tl&&(document.removeEventListener("keydown",Tl),Tl=null),Kl&&(window.removeEventListener("resize",Kl),Kl=null),nl&&(window.removeEventListener("scroll",nl,!0),nl=null)}return e.watch(ue,k=>{k==="years"&&e.nextTick(()=>{it.value?.querySelector(`[data-year="${ie.value}"]`)?.scrollIntoView({block:"center",behavior:"auto"})})}),e.watch(()=>[R.value,ue.value,g.value,we.value,ke.value,G.value,j.value,fe.value,Z.value,N.doubleCalendar,N.quickSelect,N.quickSelectOptions,N.comparisonControlsPlacement],()=>{tl()}),e.watch(R,k=>{Ol(),k&&(Tl=C=>{C.key==="Escape"&&(ue.value==="years"||ue.value==="months"?Ml():Rl())},Kl=()=>{ol()},nl=()=>{ol()},document.addEventListener("keydown",Tl),window.addEventListener("resize",Kl),window.addEventListener("scroll",nl,!0))}),e.onBeforeUnmount(()=>{bl!==null&&(window.cancelAnimationFrame(bl),bl=null),Ol()}),(k,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-datepicker",{"dss-datepicker--readonly":B.mode==="readonly"}])},[B.mode==="readonly"?(e.openBlock(),e.createElementBlock("div",xs,[C[10]||(C[10]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{type:"text",class:"dss-datepicker__input",value:X.value,readonly:"",disabled:"",tabindex:"-1"},null,8,Es)])):Lt.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-datepicker__input-wrap",{"dss-datepicker__input-wrap--open":R.value}]),onClick:C[0]||(C[0]=x=>qn("start"))},[C[12]||(C[12]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{ref_key:"inputSingleRef",ref:Ae,type:"text",class:"dss-datepicker__input",placeholder:N.placeholder||e.unref(ne)("datepicker.selectDate"),value:gt.value,readonly:"",disabled:B.mode==="readonly"},null,8,Ss),B.clearable&&mt.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-datepicker__clear","aria-label":e.unref(ne)("datepicker.clear"),onClick:e.withModifiers(kt,["stop"])},[...C[11]||(C[11]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})],-1)])],8,Vs)):e.createCommentVNode("",!0)],2)):Je.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["dss-datepicker__input-wrap dss-datepicker__input-wrap--list",{"dss-datepicker__input-wrap--open":R.value}]),onClick:ll},[C[14]||(C[14]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{ref_key:"inputListRef",ref:$e,type:"text",class:"dss-datepicker__input",placeholder:N.placeholder||e.unref(ne)("datepicker.selectFromList"),value:gt.value,readonly:""},null,8,Ns),e.createElementVNode("span",{class:e.normalizeClass(["dss-datepicker__chevron",{"dss-datepicker__chevron--open":R.value}]),"aria-hidden":"true"},[...C[13]||(C[13]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})],-1)])],2)],2)):Ke.value?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"inputRangeWrapRef",ref:Ye,class:e.normalizeClass(["dss-datepicker__input-wrap",{"dss-datepicker__input-wrap--with-comparison":pt.value,"dss-datepicker__input-wrap--comparison-active":pt.value&&Fe.value,"dss-datepicker__input-wrap--open":R.value}]),onClick:C[1]||(C[1]=x=>qn("start"))},[C[17]||(C[17]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),pt.value?(e.openBlock(),e.createElementBlock("div",Bs,[e.createElementVNode("input",{ref_key:"inputRangeRef",ref:Ce,type:"text",class:"dss-datepicker__input",placeholder:N.placeholder||e.unref(ne)("datepicker.selectRange"),value:jt.value,readonly:""},null,8,_s),Fe.value&&se.value?(e.openBlock(),e.createElementBlock("div",Ms,[e.createElementVNode("span",$s,e.toDisplayString(se.value.start),1),C[15]||(C[15]=e.createElementVNode("span",{class:"dss-datepicker__comparison-sep"},"/",-1)),e.createElementVNode("span",Ds,e.toDisplayString(se.value.end),1)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("input",{key:1,ref_key:"inputRangeRef",ref:Ce,type:"text",class:"dss-datepicker__input",placeholder:N.placeholder||e.unref(ne)("datepicker.selectRange"),value:jt.value,readonly:""},null,8,Ls)),pt.value?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["dss-datepicker__comparison-toggle dss-datepicker__comparison-toggle--icon",{"dss-datepicker__comparison-toggle--active":Fe.value}]),"aria-label":Fe.value?e.unref(ne)("datepicker.comparison.active"):e.unref(ne)("datepicker.comparison.compareTo"),"aria-pressed":Fe.value,onClick:e.withModifiers(Sl,["stop"])},[...C[16]||(C[16]=[e.createElementVNode("svg",{class:"dss-datepicker__comparison-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M9.06387 6.587C9.16352 6.54566 9.27319 6.5348 9.37901 6.5558C9.48484 6.57679 9.58205 6.6287 9.65837 6.70495L11.84 8.88661C11.8907 8.93727 11.931 8.99742 11.9584 9.06363C11.9859 9.12984 12 9.20082 12 9.27249C12 9.34417 11.9859 9.41514 11.9584 9.48135C11.931 9.54757 11.8907 9.60772 11.84 9.65837L9.65837 11.84C9.58209 11.9164 9.48487 11.9684 9.37902 11.9895C9.27316 12.0106 9.16343 11.9998 9.06371 11.9585C8.964 11.9171 8.87879 11.8472 8.81886 11.7574C8.75894 11.6676 8.72699 11.5621 8.72708 11.4542L8.72708 9.81791L0.545845 9.81791C0.401191 9.81791 0.262463 9.76045 0.160178 9.65816C0.0578924 9.55587 0.00042901 9.41715 0.000429004 9.27249C0.000428997 9.12784 0.0578924 8.98911 0.160178 8.88683C0.262463 8.78454 0.401191 8.72708 0.545845 8.72708L8.72708 8.72708L8.72708 7.09083C8.7271 6.98296 8.75911 6.87752 8.81906 6.78783C8.87901 6.69815 8.9642 6.62826 9.06387 6.587ZM2.34162 0.159964L0.159963 2.34163C0.109252 2.39228 0.0690227 2.45243 0.0415751 2.51865C0.0141274 2.58486 -4.08447e-07 2.65583 -4.05314e-07 2.72751C-4.0218e-07 2.79918 0.0141274 2.87016 0.0415751 2.93637C0.0690227 3.00258 0.109252 3.06273 0.159963 3.11339L2.34162 5.29505C2.4179 5.37142 2.51513 5.42343 2.62098 5.44451C2.72684 5.46559 2.83657 5.45479 2.93629 5.41347C3.036 5.37216 3.12121 5.30218 3.18114 5.21241C3.24106 5.12264 3.27301 5.0171 3.27292 4.90917L3.27292 3.27292L11.4542 3.27292C11.5988 3.27292 11.7375 3.21546 11.8398 3.11317C11.9421 3.01089 11.9996 2.87216 11.9996 2.72751C11.9996 2.58285 11.9421 2.44412 11.8398 2.34184C11.7375 2.23955 11.5988 2.18209 11.4542 2.18209L3.27292 2.18209L3.27292 0.545846C3.27301 0.43791 3.24106 0.332376 3.18114 0.242604C3.12121 0.152832 3.036 0.0828592 2.93629 0.0415426C2.83657 0.000226074 2.72684 -0.0105762 2.62098 0.0105043C2.51513 0.0315849 2.4179 0.0835995 2.34162 0.159964Z"})],-1)])],10,Ts)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[R.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-datepicker__overlay",onClick:e.withModifiers(Rl,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:ft,class:e.normalizeClass(["dss-datepicker__dropdown",{"dss-datepicker__dropdown--double":B.doubleCalendar&&Ke.value&&ue.value==="days","dss-datepicker__dropdown--quick-select":ue.value==="days"&&(B.doubleCalendar&&Ke.value&&(B.quickSelect||ct.value)||Lt.value&&B.quickSelect),"dss-datepicker__dropdown--list":Je.value}]),onClick:C[9]||(C[9]=e.withModifiers(()=>{},["stop"])),style:e.normalizeStyle(un.value)},[Je.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[ln.value.length?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"dss-datepicker__list",role:"listbox",ref_key:"listRef",ref:Xt},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ln.value,x=>(e.openBlock(),e.createElementBlock("li",{key:x.ts,role:"option","aria-selected":x.selected,class:e.normalizeClass(["dss-datepicker__list-item",{"dss-datepicker__list-item--selected":x.selected}]),onClick:d=>Gn(x.date)},[e.createElementVNode("span",Hs,e.toDisplayString(x.label),1),x.selected?(e.openBlock(),e.createElementBlock("svg",Rs,[...C[18]||(C[18]=[e.createElementVNode("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"},null,-1)])])):e.createCommentVNode("",!0)],10,As))),128))],512)):(e.openBlock(),e.createElementBlock("div",Fs,e.toDisplayString(e.unref(ne)("datepicker.noAvailableDates")),1))],64)):ue.value==="days"&&B.doubleCalendar&&Ke.value?(e.openBlock(),e.createElementBlock("div",Is,[B.quickSelect||ct.value?(e.openBlock(),e.createElementBlock("div",zs,[B.quickSelect?(e.openBlock(),e.createElementBlock("nav",Ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($t.value,x=>(e.openBlock(),e.createElementBlock("button",{key:x.id,type:"button",class:"dss-datepicker__quick-select-btn",disabled:!vl(x.id),onClick:d=>Dt(x.id)},e.toDisplayString(Et(x)),9,Os))),128))])):e.createCommentVNode("",!0),ct.value?(e.openBlock(),e.createElementBlock("div",Ws,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-datepicker__comparison-toggle",{"dss-datepicker__comparison-toggle--active":Fe.value}]),onClick:Sl},e.toDisplayString(Fe.value?e.unref(ne)("datepicker.comparison.active"):e.unref(ne)("datepicker.comparison.compareTo")),3),Fe.value?(e.openBlock(),e.createElementBlock("div",qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,x=>(e.openBlock(),e.createElementBlock("button",{key:x.id,type:"button",class:e.normalizeClass(["dss-datepicker__comparison-mode",{"dss-datepicker__comparison-mode--active":qe.value===x.id}]),onClick:d=>St(x.id)},e.toDisplayString(Y(x)),11,Zs))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Us,[e.createElementVNode("div",Ys,[e.createElementVNode("div",Xs,[e.createElementVNode("div",js,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ne)("datepicker.prevMonth"),onClick:on}," ‹ ",8,Ks),e.createElementVNode("div",Gs,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:C[2]||(C[2]=x=>vn("left","months"))},e.toDisplayString(Xe.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:C[3]||(C[3]=x=>vn("left","years"))},e.toDisplayString(G.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ne)("datepicker.nextMonth"),onClick:yl}," › ",8,Qs)]),e.createElementVNode("div",Js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,x=>(e.openBlock(),e.createElementBlock("span",{key:x,class:"dss-datepicker__weekday"},e.toDisplayString(x),1))),128))]),e.createElementVNode("div",er,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bt.value,(x,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"L-"+d},[x?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",dn(x)]),disabled:!_l(x),onClick:f=>sn(x),onMouseenter:f=>wl(x),onMouseleave:mn},e.toDisplayString(x.getDate()),43,tr)):(e.openBlock(),e.createElementBlock("span",lr))],64))),128))])]),e.createElementVNode("div",nr,[e.createElementVNode("div",ar,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ne)("datepicker.prevMonth"),onClick:Ln}," ‹ ",8,or),e.createElementVNode("div",sr,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:C[4]||(C[4]=x=>vn("right","months"))},e.toDisplayString(Nt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:C[5]||(C[5]=x=>vn("right","years"))},e.toDisplayString(fe.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ne)("datepicker.nextMonth"),onClick:jl}," › ",8,rr)]),e.createElementVNode("div",ir,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,x=>(e.openBlock(),e.createElementBlock("span",{key:x,class:"dss-datepicker__weekday"},e.toDisplayString(x),1))),128))]),e.createElementVNode("div",cr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ot.value,(x,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"R-"+d},[x?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",dn(x)]),disabled:!_l(x),onClick:f=>sn(x),onMouseenter:f=>wl(x),onMouseleave:mn},e.toDisplayString(x.getDate()),43,ur)):(e.openBlock(),e.createElementBlock("span",dr))],64))),128))])])]),Ut.value?(e.openBlock(),e.createElementBlock("div",mr,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-datepicker__comparison-toggle",{"dss-datepicker__comparison-toggle--active":Fe.value}]),onClick:Sl},e.toDisplayString(Fe.value?e.unref(ne)("datepicker.comparison.active"):e.unref(ne)("datepicker.comparison.compareTo")),3),Fe.value?(e.openBlock(),e.createElementBlock("div",pr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,x=>(e.openBlock(),e.createElementBlock("button",{key:x.id,type:"button",class:e.normalizeClass(["dss-datepicker__comparison-mode",{"dss-datepicker__comparison-mode--active":qe.value===x.id}]),onClick:d=>St(x.id)},e.toDisplayString(Y(x)),11,vr))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])):ue.value==="days"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"dss-datepicker__double-wrap":B.quickSelect&&Lt.value})},[B.quickSelect&&Lt.value?(e.openBlock(),e.createElementBlock("div",fr,[e.createElementVNode("nav",hr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($t.value,x=>(e.openBlock(),e.createElementBlock("button",{key:x.id,type:"button",class:"dss-datepicker__quick-select-btn",disabled:!vl(x.id),onClick:d=>Dt(x.id)},e.toDisplayString(Et(x)),9,gr))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",yr,[pt.value?(e.openBlock(),e.createElementBlock("div",kr,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-datepicker__comparison-toggle",{"dss-datepicker__comparison-toggle--active":Fe.value}]),onClick:Sl},e.toDisplayString(Fe.value?e.unref(ne)("datepicker.comparison.active"):e.unref(ne)("datepicker.comparison.compareTo")),3),Fe.value?(e.openBlock(),e.createElementBlock("div",Cr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,x=>(e.openBlock(),e.createElementBlock("button",{key:x.id,type:"button",class:e.normalizeClass(["dss-datepicker__comparison-mode",{"dss-datepicker__comparison-mode--active":qe.value===x.id}]),onClick:d=>St(x.id)},e.toDisplayString(Y(x)),11,br))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",wr,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ne)("datepicker.prevMonth"),onClick:gn}," ‹ ",8,xr),e.createElementVNode("div",Er,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:C[6]||(C[6]=x=>ue.value="months")},e.toDisplayString(Ne.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:C[7]||(C[7]=x=>ue.value="years")},e.toDisplayString(we.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ne)("datepicker.nextMonth"),onClick:wn}," › ",8,Sr)]),e.createElementVNode("div",Vr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,x=>(e.openBlock(),e.createElementBlock("span",{key:x,class:"dss-datepicker__weekday"},e.toDisplayString(x),1))),128))]),e.createElementVNode("div",Nr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,(x,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[x?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",dn(x)]),disabled:!_l(x),onClick:f=>sn(x),onMouseenter:f=>wl(x),onMouseleave:mn},e.toDisplayString(x.getDate()),43,Br)):(e.openBlock(),e.createElementBlock("span",_r))],64))),128))])])],2)):ue.value==="months"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",Mr,[e.createElementVNode("div",$r,[e.createElementVNode("span",Dr,e.toDisplayString(et.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:C[8]||(C[8]=x=>ue.value="years")},e.toDisplayString(ie.value),1)])]),e.createElementVNode("div",Lr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt.value,(x,d)=>(e.openBlock(),e.createElementBlock("button",{key:d,type:"button",class:e.normalizeClass(["dss-datepicker__month-cell",{"dss-datepicker__month-cell--selected":d===te.value}]),onClick:f=>Kt(d)},e.toDisplayString(x),11,Tr))),128))])],64)):ue.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",Ar,[e.createElementVNode("span",Hr,e.toDisplayString(xt.value),1)]),e.createElementVNode("div",{class:"dss-datepicker__years-wrap",ref_key:"yearsWrapRef",ref:it},[e.createElementVNode("div",Rr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(al.value,x=>(e.openBlock(),e.createElementBlock("button",{key:x,type:"button",class:e.normalizeClass(["dss-datepicker__year-cell",{"dss-datepicker__year-cell--selected":x===ie.value,"dss-datepicker__year-cell--current":x===e.unref(xe)}]),"data-year":x,onClick:d=>Vl(x)},e.toDisplayString(x),11,Fr))),128))])],512)],64)):e.createCommentVNode("",!0)],6)])):e.createCommentVNode("",!0)]))],2))}},Ir={class:"dss-step-bar__layout"},zr={class:"dss-step-bar__header"},Pr={class:"dss-step-bar__label"},Or={key:0,class:"dss-step-bar__counter"},Wr={class:"dss-step-bar__track-wrapper"},qr=["aria-valuemax","aria-valuenow","aria-label"],Zr=["onMouseenter"],Ro={__name:"DSSStepBar",props:{label:{type:String,default:"Progress"},steps:{type:Number,default:5},currentStep:{type:Number,default:0},segments:{type:Array,default:()=>[]},segmentOrder:{type:String,default:"input",validator:B=>["input","desc","asc"].includes(B)},orientation:{type:String,default:"horizontal",validator:B=>["horizontal","vertical"].includes(B)},barHeight:{type:[Number,String],default:200},labelPosition:{type:String,default:"up",validator:B=>["up","down","left","right"].includes(B)},sideLabelMaxWidth:{type:[Number,String],default:null},sideLabelWrapWidth:{type:[Number,String],default:"18ch"},totalValue:{type:Number,default:null},activeColor:{type:String,default:"#34c759"},labelColor:{type:String,default:null},counterColor:{type:String,default:null},valueLabel:{type:String,default:""},counterAsPercentage:{type:Boolean,default:!1},showCounter:{type:Boolean,default:!0},inactiveColor:{type:String,default:"#e5e7eb"},remainderLabel:{type:String,default:"Unused"},remainderTooltipSummary:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},disableTooltips:{type:Boolean,default:!1}},setup(B){const J=B,N={segmentMarker:{color:null,width:null,height:null,backgroundColor:"transparent",borderColor:"transparent"},maxSegment:{marker:{enabled:!1,color:null,width:null,height:null,backgroundColor:"transparent",borderColor:"transparent"}}},L=F=>F&&typeof F=="object"&&!Array.isArray(F),ne=(F,Y)=>{const re=Object.assign({},F);return!L(F)||!L(Y)||Object.keys(Y).forEach(ve=>{if(L(Y[ve])){ve in F?re[ve]=ne(F[ve],Y[ve]):Object.assign(re,{[ve]:Y[ve]});return}Object.assign(re,{[ve]:Y[ve]})}),re},W=e.computed(()=>ne(N,J.options)),R=e.computed(()=>Math.max(1,Number(J.steps)||1)),ue=e.computed(()=>Math.min(R.value,Math.max(0,Number(J.currentStep)||0))),rt=e.computed(()=>Array.isArray(J.segments)&&J.segments.length>0),ee=e.computed(()=>{if(!rt.value)return[];const F=J.segments.map((Y,re)=>{const ve=Number(Y?.value);return{label:Y?.label||`Step ${re+1}`,value:Number.isFinite(ve)&&ve>0?ve:0,color:Y?.color||J.activeColor,marker:Y?.marker}});return J.segmentOrder==="desc"?[...F].sort((Y,re)=>re.value-Y.value):J.segmentOrder==="asc"?[...F].sort((Y,re)=>Y.value-re.value):F}),g=e.computed(()=>rt.value?ee.value.reduce((F,Y)=>F+Y.value,0):ue.value),we=e.computed(()=>rt.value?Number.isFinite(Number(J.totalValue))&&Number(J.totalValue)>0?Number(J.totalValue):Math.max(1,g.value):R.value),ke=e.computed(()=>rt.value&&Number.isFinite(Number(J.totalValue))&&Number(J.totalValue)>0),G=e.computed(()=>ke.value?Math.max(0,Number(J.totalValue)-g.value):0),j=e.computed(()=>typeof J.remainderLabel=="string"&&J.remainderLabel.trim().length>0),fe=e.computed(()=>G.value>0),He=e.computed(()=>ee.value.reduce((F,Y)=>Math.max(F,Number(Y.value)||0),0)),he=e.computed(()=>ee.value.filter(F=>F.value>0).map(F=>`${F.label}: ${Je(F.value)}`).join(" | ")),Te=e.computed(()=>rt.value?ke.value?ee.value.filter(F=>F.value>0):ee.value:[]),Z=e.computed(()=>{if(!J.counterAsPercentage)return`${g.value} / ${we.value}`;const F=Number(we.value);if(!Number.isFinite(F)||F<=0)return"0%";const Y=Math.round(Number(g.value)/F*100);return`${Math.min(Math.max(Y,0),100)}%`}),Fe=e.computed(()=>g.value),qe=e.computed(()=>we.value),Me=e.reactive({visible:!1,x:0,y:0,content:""}),Ze=e.computed(()=>J.orientation==="vertical"),U=e.computed(()=>{const F=J.barHeight;return F==null||F===""?"200px":typeof F=="number"?`${F}px`:String(F)}),Ae=e.computed(()=>{const F=J.sideLabelMaxWidth;if(!(F==null||F===""))return typeof F=="number"?`${F}px`:String(F)}),Ye=e.computed(()=>{const F=J.sideLabelWrapWidth;return F==null||F===""?"18ch":typeof F=="number"?`${F}ch`:String(F)}),Ce=e.computed(()=>({left:`${Me.x}px`,top:`${Me.y}px`,transform:"translate(-50%, calc(-100% - 8px))"})),$e=F=>Ze.value?{flex:`${F} 0 0`,minHeight:F>0?"6px":"0",minWidth:"0"}:{flex:`${F} 0 0`,minWidth:F>0?"6px":"0"},lt=F=>{const Y=F?.parentElement;if(!Y)return{x:0,y:0};const re=Y.getBoundingClientRect();return{x:re.left+re.width/2,y:re.top}},ft=F=>{const Y=F.getBoundingClientRect();return{x:Y.left+Y.width/2,y:Y.top}},it=F=>{if(ke.value){const ve=Math.max(0,Number(F.value)||0);return{...$e(ve),backgroundColor:F.color}}const Y=g.value,re=F.value>0?F.value:Y>0?1e-4:1;return{...$e(re),backgroundColor:F.color}},Xt=F=>Number(F?.value||0)>0&&Number(F?.value||0)===He.value,xe=F=>{const Y=L(F?.marker)?F.marker:{},re=F?.marker===!0||Y.enabled===!0,ve=Xt(F)&&W.value.maxSegment?.marker?.enabled===!0;if(!(re||ve))return{enabled:!1};const Ge=Y.backgroundColor??(ve?W.value.maxSegment?.marker?.backgroundColor:W.value.segmentMarker?.backgroundColor),Ct=Y.borderColor??(ve?W.value.maxSegment?.marker?.borderColor:W.value.segmentMarker?.borderColor),Se=Y.color??(ve?W.value.maxSegment?.marker?.color:W.value.segmentMarker?.color),tt=Y.width??(ve?W.value.maxSegment?.marker?.width:W.value.segmentMarker?.width),gt=Y.height??(ve?W.value.maxSegment?.marker?.height:W.value.segmentMarker?.height);return{enabled:!0,backgroundColor:Ge,borderColor:Ct,color:Se,width:tt,height:gt,icon:Y.icon??null,...Y}},Lt=F=>{const Y=xe(F);return{backgroundColor:Y.backgroundColor??void 0,borderColor:Y.borderColor??void 0,color:Y.color??void 0}},Ke=F=>{const Y=xe(F);return{width:Y.width??void 0,height:Y.height??void 0}},Je=F=>`${F}${J.valueLabel}`,mt=e.computed(()=>({...$e(G.value),backgroundColor:J.inactiveColor})),Tt=(F,Y)=>{J.disableTooltips||ct(F,Y)},at=F=>{J.disableTooltips||Ut(F)},pt=()=>{J.disableTooltips||ht()},ct=(F,Y)=>{if(!F||!Y?.currentTarget)return;const re=Y.currentTarget;if(J.remainderTooltipSummary){const Re=lt(re);Me.x=Re.x,Me.y=Re.y,Me.content=he.value,Me.visible=!!Me.content;return}const ve=ft(re);Me.x=ve.x,Me.y=ve.y,Me.content=`${F.label}: ${Je(F.value)}`,Me.visible=!0},Ut=F=>{if(!G.value||!F?.currentTarget)return;const Y=F.currentTarget;if(J.remainderTooltipSummary){const ve=lt(Y);Me.x=ve.x,Me.y=ve.y,Me.content=he.value,Me.visible=!!Me.content;return}const re=ft(Y);Me.x=re.x,Me.y=re.y,j.value&&(Me.content=`${J.remainderLabel}: ${Je(G.value)}`,Me.visible=!0)},ht=()=>{Me.visible=!1},Rt=()=>{Me.visible&&ht()};e.onMounted(()=>{window.addEventListener("scroll",Rt,!0)}),e.onBeforeUnmount(()=>{window.removeEventListener("scroll",Rt,!0)});const me=e.computed(()=>({"--dss-step-bar-label-color":J.labelColor??void 0,"--dss-step-bar-counter-color":J.counterColor??void 0,"--dss-step-bar-active-color":J.activeColor,"--dss-step-bar-inactive-color":J.inactiveColor,"--dss-step-bar-bar-height":Ze.value?U.value:void 0,"--dss-step-bar-side-label-max-width":Ae.value,"--dss-step-bar-side-label-wrap-width":Ye.value}));return(F,Y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-step-bar",[`dss-step-bar--${B.orientation}`,`dss-step-bar--label-${B.labelPosition}`]]),style:e.normalizeStyle(me.value)},[e.createElementVNode("div",Ir,[e.createElementVNode("div",zr,[e.createElementVNode("span",Pr,[e.renderSlot(F.$slots,"label",{label:B.label},()=>[e.createTextVNode(e.toDisplayString(B.label),1)])]),B.showCounter?(e.openBlock(),e.createElementBlock("span",Or,[e.renderSlot(F.$slots,"counter",{counterDisplay:Z.value},()=>[e.createTextVNode(e.toDisplayString(Z.value),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Wr,[e.createElementVNode("div",{class:"dss-step-bar__track",role:"progressbar","aria-valuemin":0,"aria-valuemax":qe.value,"aria-valuenow":Fe.value,"aria-label":B.label},[rt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Te.value,(re,ve)=>(e.openBlock(),e.createElementBlock("div",{key:`segment-${ve}-${re.label}`,class:e.normalizeClass(["dss-step-bar__segment dss-step-bar__segment--interactive",{"dss-step-bar__segment--max":Xt(re),"dss-step-bar__segment--marker-enabled":xe(re).enabled}]),style:e.normalizeStyle(it(re)),onMouseenter:Re=>Tt(re,Re),onMouseleave:pt},[xe(re).enabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment-marker",style:e.normalizeStyle(Lt(re)),"aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-step-bar__segment-marker-icon",style:e.normalizeStyle(Ke(re))},[e.renderSlot(F.$slots,"segment-marker-icon",{segment:re,index:ve,marker:xe(re)},()=>[e.renderSlot(F.$slots,"max-segment-icon",{segment:re,index:ve,marker:xe(re)},()=>[e.createTextVNode(e.toDisplayString(xe(re).icon||""),1)])])],4)],4)):e.createCommentVNode("",!0)],46,Zr))),128)),fe.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment dss-step-bar__segment--remainder",style:e.normalizeStyle(mt.value),onMouseenter:Y[0]||(Y[0]=re=>at(re)),onMouseleave:pt},null,36)):e.createCommentVNode("",!0)],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(R.value,re=>(e.openBlock(),e.createElementBlock("div",{key:re,class:e.normalizeClass(["dss-step-bar__segment",{"dss-step-bar__segment--active":re<=ue.value}])},null,2))),128))],8,qr)])]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[!B.disableTooltips&&Me.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__tooltip dss-step-bar__tooltip--teleported",style:e.normalizeStyle(Ce.value)},e.toDisplayString(Me.content),5)):e.createCommentVNode("",!0)]))],6))}},Ur=["data-chart-type"],Yr={class:"dss-chart-header-titles"},Xr={key:0,class:"dss-chart-title"},jr={key:1,class:"dss-chart-subtitle"},Kr=["onClick","onMouseenter"],Gr={class:"dss-legend-text"},Qr=["onClick","onMouseenter"],Jr={class:"dss-legend-text"},ei=["title"],ti=["src"],li={class:"dss-chart-area-wrapper"},ni={key:0,class:"dss-chart-z-axis-label"},ai=["width","height","data-smooth","data-animated"],oi=["id"],si=["y","width","height"],ri=["id"],ii=["d"],ci=["id"],ui=["d"],di={key:0},mi=["clip-path"],pi=["x1","x2","y1","y2"],vi=["clip-path"],fi=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray","opacity"],hi={class:"dss-axes"},gi=["x1","x2","y1","y2"],yi=["x1","x2","y1","y2"],ki=["x1","x2","y1","y2"],Ci={class:"dss-axis-labels"},bi=["x","y"],wi=["x","y"],xi=["x","y"],Ei=["x","y"],Si=["y","transform"],Vi=["x","y","transform"],Ni={key:2,class:"dss-flag-markers"},Bi=["clip-path"],_i=["x1","x2","y1","y2","onMouseover"],Mi=["x1","x2","y1","y2","onMouseover"],$i=["x1","x2","y1","y2","onMouseover"],Di=["cx","cy","onMouseover"],Li=["cx","cy","fill","onMouseover"],Ti=["x","y"],Ai=["clip-path"],Hi={key:0},Ri=["d","onMouseover"],Fi=["x","y","width","height","fill","onMouseover"],Ii={class:"dss-line-chart"},zi=["d","stroke","stroke-width","stroke-dasharray"],Pi=["d","stroke","stroke-width","opacity"],Oi=["cx","cy","r","fill","onMouseover"],Wi={key:1},qi=["d","stroke","stroke-width","stroke-dasharray"],Zi=["d","stroke","stroke-width","stroke-dasharray"],Ui=["d","stroke","stroke-width","opacity"],Yi=["cx","cy","r","fill","onMouseover"],Xi={key:2},ji=["id"],Ki=["x","y","width","height"],Gi=["d","fill","fill-opacity","mask"],Qi=["d","stroke","stroke-width"],Ji=["d","fill","onMouseover"],ec=["x","y","width","height","onMouseover"],tc=["clip-path"],lc=["x1","x2","y1","y2","stroke"],nc=["cx","cy","r","fill"],ac={key:1,class:"dss-bubble-chart"},oc={key:0,class:"dss-bubble-group"},sc=["cx","cy","r","fill","fill-opacity","stroke","onMouseenter","onMouseleave","onClick"],rc=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],ic=["transform"],cc=["cx","cy","r"],uc=["data-chart-type","clip-path"],dc=["d","fill","fill-opacity","stroke","stroke-width","clip-path","onMouseover"],mc={key:1,class:"dss-radial-segment-data-labels"},pc=["x","y"],vc=["x","y","font-size","fill"],fc=["x1","y1","x2","y2","stroke"],hc=["x1","y1","x2","y2","stroke"],gc=["x","y","text-anchor","font-size"],yc=["transform"],kc={key:0,class:"dss-spider-grid"},Cc=["cx","cy","r"],bc={class:"dss-spider-grid-labels"},wc=["x","y"],xc=["x","y"],Ec=["x1","x2","y1","y2"],Sc={class:"dss-spider-labels"},Vc=["x","y","text-anchor","dominant-baseline"],Nc=["points","fill","fill-opacity","stroke","stroke-width","stroke-dasharray"],Bc=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],_c={class:"dss-chart-logos"},Mc=["cx","cy","r","fill"],$c=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],Dc={key:0,class:"dss-stepbar-grid-lines","aria-hidden":"true"},Lc=["onClick","onMouseenter"],Tc=["src"],Ac={class:"dss-marker-tooltip-category"},Hc={key:0,class:"dss-marker-tooltip-description"},Rc={key:0,class:"dss-tooltip-section dss-spider-tooltip-section"},Fc={class:"dss-tooltip-title dss-spider-tooltip-area-title"},Ic={class:"dss-tooltip-series-name"},zc={class:"dss-tooltip-series-value"},Pc={key:1,class:"dss-tooltip-section"},Oc={key:0,class:"dss-tooltip-title"},Wc={class:"dss-bubble-tooltip-data"},qc={key:2,class:"dss-tooltip-section"},Zc={class:"dss-tooltip-title"},Uc={class:"dss-tooltip-value"},Yc={key:0,class:"dss-tooltip-section"},Xc={class:"dss-tooltip-section-title"},jc={class:"dss-tooltip-group-header"},Kc={class:"dss-tooltip-item-content"},Gc={class:"dss-tooltip-item-text"},Qc={key:1,class:"dss-tooltip-section"},Jc={class:"dss-tooltip-section-title"},eu={class:"dss-tooltip-item-content"},tu={class:"dss-tooltip-item-title"},lu={key:0,class:"dss-tooltip-item-description"},nu={class:"dss-tooltip-section"},au={class:"dss-tooltip-title"},ou={key:0,class:"dss-bubble-tooltip-data"},su={class:"dss-tooltip-series-name"},ru={class:"dss-tooltip-series-value"},iu={key:0,class:"dss-tooltip-section"},cu={class:"dss-tooltip-section-title"},uu={class:"dss-tooltip-group-header"},du={class:"dss-tooltip-item-content"},mu={class:"dss-tooltip-item-text"},pu={key:1,class:"dss-tooltip-section"},vu={class:"dss-tooltip-section-title"},fu={class:"dss-tooltip-item-content"},hu={class:"dss-tooltip-item-title"},gu={key:0,class:"dss-tooltip-item-description"},yu=["onClick","onMouseenter"],ku={class:"dss-legend-text"},Cu={key:1,class:"dss-context-menu-separator"},bu={key:0,class:"dss-context-menu-separator"},wu={key:0,class:"dss-context-menu-separator"},xu=["onClick"],Eu=["innerHTML"],Su={key:0,class:"dss-context-menu-icon"},Vu={class:"dss-marker-modal-header"},Nu={class:"dss-marker-modal-body"},Bu={class:"dss-form-group"},_u={class:"dss-form-group"},Mu={for:"dss-marker-description"},$u={key:0,class:"dss-form-text-display"},Du=["placeholder"],Lu={class:"dss-marker-modal-footer"},Tu={class:"modal-footer-left"},Au={class:"dss-modal-footer-right"},Hu=["disabled"],Ru={name:"DSSChart"},Fu=Object.assign(Ru,{props:{series:{type:Array,required:!0,default:()=>[]},categories:{type:Array,default:()=>[]},flags:{type:Array,default:()=>[]},markers:{type:Array,default:()=>[]},showAddMarkerButton:{type:Boolean,default:!0},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:B=>typeof B=="object"&&B!==null},innerSize:{type:Number,default:null},old:{type:Boolean,default:!1}},emits:["add-marker","update-marker","delete-marker"],setup(B,{emit:J}){const{t:N,locale:L}=ha.useI18n(),ne=J,W=e.ref(null),R=e.ref(null);let ue=null;const rt=()=>{ue&&(ue(),ue=null);const t=R.value;if(!t||xe.value!=="stepbar")return;const a=l=>$a(l);t.addEventListener("wheel",a,{passive:!1}),ue=()=>t.removeEventListener("wheel",a)},ee=e.ref(null),g=e.ref(null),we=e.ref(0),ke=e.ref(0);let G=null,j=null;const fe=20,He=e.computed(()=>{if(ke.value,we.value,!W.value||!ee.value)return 0;try{const t=W.value.getBoundingClientRect();return ee.value.getBoundingClientRect().top-t.top}catch{return 0}}),he=e.computed(()=>`chart-clip-${Z.chartId}`),Te=e.computed(()=>`url(#${he.value})`),Z=B,Fe={chart:{type:"line",width:800,height:400,orientation:"vertical"},title:{text:"",style:{}},subtitle:{text:"",style:{}},zAxis:"",xAxis:{title:{text:""},type:"category"},yAxis:{min:"auto",max:"auto",title:{text:""}},legend:{show:!0,position:"top",orientation:"horizontal"},radialLabels:{show:!1,pointerLength:25,horizontalLength:35,fontSize:14,color:"#000",textOffset:8},radialBar:{dataLabels:{show:!1,minAngleDegrees:20},dataCenter:{show:!1,fontSize:16}},miniRadial:{minVisiblePercent:1,trackColor:"#E5E7EB",thresholds:{low:33,medium:66},colors:{low:"#E53E3E",medium:"#ED8936",high:"#38A169"}},grid:{show:!0,style:{}},watermark:{enabled:!0,opacity:.05,size:35,position:"bottom-right"},colors:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"],logos:[],stroke:{width:2,curve:"smooth"},bubbles:{size:4},stepbar:{totalValue:100,segmentOrder:"input",showRemainder:!0,remainderLabel:"Remaining",remainderColor:"#E5E7EB",barWidth:14,columnWidth:72,trackWidth:14,minBarWidth:12,maxBarWidth:120,barRadius:6,columnGap:16,labelReserve:48,trackAreaHeight:220,axisBars:{show:!0,showVertical:!1,color:"#d6d6d6",opacity:.75,width:1,dashArray:"3,4"},maxSegment:{marker:{enabled:!1,icon:"",radius:8,backgroundColor:null,borderColor:"#fafafa",borderWidth:2,color:"#fafafa",fontSize:10}}},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,comparison:{fillOpacity:0,strokeDasharray:"6,4",usePrimaryColor:!0,bubbleSize:0}},zoom:{enabled:!1,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},valueFormat:{extension:""},contextMenu:{enabled:!0,items:{addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0},customItems:[]}};function qe(t,a){const l=Object.assign({},t);return Ze(t)&&Ze(a)&&Object.keys(a).forEach(r=>{Ze(a[r])?r in t?l[r]=qe(t[r],a[r]):Object.assign(l,{[r]:a[r]}):Object.assign(l,{[r]:a[r]})}),l}const Me=()=>{let t=20,a=0,l=0;if(Ke.value&&(t+=30),Je.value&&(t+=25),ve.value&&Z.series.length>0){const r=Z.series.filter((p,h)=>!_.value.has(h)).length;if(Re.value==="top"||Re.value==="bottom"){if(Ge.value==="horizontal"){const h=Math.floor($e.value/100);a=Math.ceil(r/h)*25+10}else a=r*25+10;t+=a}else l=150}return{height:t,legendHeight:a,legendWidth:l}};function Ze(t){return t&&typeof t=="object"&&!Array.isArray(t)}const U=e.computed(()=>qe(Fe,Z.options)),Ae=e.computed(()=>{const t=U.value;return t&&t.chart&&t.chart.width==="auto"}),Ye=e.computed(()=>{const t=U.value;return t&&t.chart&&t.chart.height==="auto"}),Ce=e.computed(()=>{const t=U.value;return t?.chart?.type==="stepbar"&&t?.chart?.height==="fit"}),$e=e.computed(()=>{const t=U.value;return Ae.value?we.value||800:t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),lt=e.ref(fe),ft=e.computed(()=>{if(Ye.value){const t=ft.value;return t??Math.max(0,(ke.value||400)-lt.value*5)}}),it=e.computed(()=>{const t=U.value;if(xe.value==="mini-radial")return $e.value;if(Ce.value)return un.value;if(Ye.value){const a=ft.value;return a??Math.max(0,(ke.value||400)-lt.value)}return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),Xt=e.computed(()=>{if(Ye.value&&xe.value==="semi-radial"&&ft.value!=null)return lt.value+it.value+"px";if(Ye.value)return"100%";if(Cl.value)return lt.value+it.value+"px";if(ve.value&&Re.value==="bottom"){const t=Me();return it.value+(t.legendHeight||35)+"px"}return it.value+(ve.value?20:0)+"px"}),xe=e.computed(()=>{const t=U.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),Lt=e.computed(()=>{const t=Z.series.map(a=>a.type||xe.value);return new Set(t).size>1}),Ke=e.computed(()=>{const t=U.value;return t&&t.title&&t.title.text?t.title.text:""}),Je=e.computed(()=>{const t=U.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),mt=e.computed(()=>{const t=U.value;if(!t||!t.zAxis)return"";const a=t.zAxis;return typeof a=="string"?a:a&&typeof a.label=="string"?a.label:""}),Tt=e.computed(()=>{const t=U.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),at=e.computed(()=>{const a=U.value?.yAxis?.title?.text;return a==null||String(a).trim()===""?"":String(a)}),pt=e.computed(()=>{const t=U.value;return t&&t.yAxis&&t.yAxis.secondary&&typeof t.yAxis.secondary=="object"?t.yAxis.secondary:null}),ct=e.computed(()=>{const t=pt.value;return t&&t.title&&t.title.text?t.title.text:""}),Ut=e.computed(()=>{const t=U.value;if(!t||!t.yAxis)return Dl;const a=t.yAxis.min;return typeof a=="number"||a===Dl?a:Dl}),ht=e.computed(()=>{const t=U.value;if(!t||!t.yAxis)return Dl;const a=t.yAxis.max;return typeof a=="number"||a===Dl?a:Dl}),Rt=e.computed(()=>{const t=pt.value;if(!t)return Dl;const a=t.min;return typeof a=="number"||a===Dl?a:Dl}),me=e.computed(()=>{const t=pt.value;if(!t)return Dl;const a=t.max;return typeof a=="number"||a===Dl?a:Dl}),F=e.computed(()=>{const t=U.value;return!t||!t.xAxis?null:typeof t.xAxis.min=="number"?t.xAxis.min:null}),Y=e.computed(()=>{const t=U.value;return!t||!t.xAxis?null:typeof t.xAxis.max=="number"?t.xAxis.max:null}),re=e.computed(()=>{const t=U.value;return t&&t.grid&&t.grid.show!==!1}),ve=e.computed(()=>{const t=U.value;return t&&t.legend&&t.legend.show!==!1}),Re=e.computed(()=>{const t=U.value;return t&&t.legend&&t.legend.position?t.legend.position:"top"}),Ge=e.computed(()=>{const t=U.value;return t&&t.legend&&t.legend.orientation?t.legend.orientation:"horizontal"}),Ct=e.computed(()=>{const t=U.value;return!t||!t.tooltip?!0:t.tooltip.enabled!==!1}),Se=e.computed(()=>{const t=U.value;if(!t)return!1;if(xe.value==="stepbar"){if(!t.crosshair)return!0;const l=t.crosshair.show;return l!==!1&&l!=="false"}if(!t.crosshair)return!1;const a=t.crosshair.show;return a===!0||a==="true"}),tt=e.computed(()=>{const t=U.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),gt=e.computed(()=>{const t=U.value;return!t||!t.zoom?!1:t.zoom.enabled===!0}),jt=e.computed(()=>{const t=U.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),se=e.computed(()=>{const t=U.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),X=e.computed(()=>{const t=U.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),te=e.computed(()=>{if(!Cl.value)return 0;const t=U.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:0}),ie=e.computed(()=>{const t=U.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),Ne=e.computed(()=>{const{maxX:t}=Vt.value;return t===0}),et=(t,a)=>Ne.value&&a===0?5:a,yt=t=>{const a=Number(t);return!Number.isFinite(a)||a<=0?0:a},al=e.computed(()=>{const t=U.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),xt=e.computed(()=>{const t=U.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),el=e.computed(()=>{const t=U.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),H=e.computed(()=>{const t=U.value;return xt.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),V=e.computed(()=>{const t=U.value,a=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return a.length>0?a:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),M=e.computed(()=>U.value?.stepbar||{}),ae=e.computed(()=>{const t=M.value?.segmentOrder;return["asc","desc","input"].includes(t)?t:"input"}),oe=e.computed(()=>{const t=Number(M.value?.totalValue);return Number.isFinite(t)&&t>0?t:100}),Ue=e.computed(()=>M.value?.showRemainder!==!1),bt=e.computed(()=>M.value?.remainderLabel||"Remaining"),ot=e.computed(()=>M.value?.remainderColor||"#E5E7EB"),Xe=e.computed(()=>{const t=Number(M.value?.barWidth);return Number.isFinite(t)&&t>0?t:42}),Nt=e.computed(()=>{const t=Number(M.value?.minBarWidth);return Number.isFinite(t)&&t>0?t:12}),wt=e.computed(()=>{const t=Number(M.value?.maxBarWidth);return Number.isFinite(t)&&t>0?t:58});e.computed(()=>{const t=Number(M.value?.barRadius);return Number.isFinite(t)&&t>=0?t:6});const ut=e.computed(()=>M.value?.axisBars||{}),_t=e.computed(()=>ut.value?.show!==!1);e.computed(()=>ut.value?.showVertical===!0);const $t=e.computed(()=>ut.value?.color||"#d6d6d6"),Et=e.computed(()=>{const t=Number(ut.value?.opacity);return Number.isFinite(t)?Math.min(Math.max(t,0),1):.75}),kl=e.computed(()=>{const t=Number(ut.value?.width);return Number.isFinite(t)&&t>0?t:1}),Zl=e.computed(()=>ut.value?.dashArray||"3,4"),bl=e.computed(()=>{const t=Number(M.value?.columnGap);return Number.isFinite(t)&&t>=0?t:16}),tl=e.computed(()=>{const t=Number(M.value?.labelReserve);return Number.isFinite(t)&&t>0?t:48}),ol=e.computed(()=>{const t=Number(M.value?.trackAreaHeight);return Number.isFinite(t)&&t>0?t:220}),un=e.computed(()=>{let t=0;Ke.value&&(t+=15),Je.value&&(t+=10);const a=50+t,l=tl.value+8;return a+ol.value+l}),ml=e.computed(()=>Math.max(P.value.height,0)),dt=e.computed(()=>{const t=Number(M.value?.columnWidth);if(Number.isFinite(t)&&t>0)return t;const a=Xe.value,l=Nt.value,r=wt.value;return Math.max(l,Math.min(r,a))}),Hl=e.computed(()=>{const t=Number(M.value?.trackWidth);if(Number.isFinite(t)&&t>0)return Math.min(t,dt.value);const a=Number(M.value?.barWidth);return Number.isFinite(Number(M.value?.columnWidth))&&Number(M.value?.columnWidth)>0&&Number.isFinite(a)&&a>0?Math.min(a,dt.value):Math.min(dt.value,Math.max(10,Math.round(dt.value*.32)))}),Ul=e.computed(()=>({width:`${dt.value}px`,flex:`0 0 ${dt.value}px`,"--dss-step-bar-track-thickness":`${Hl.value}px`,"--dss-stepbar-label-height":`${tl.value}px`})),Ll=e.computed(()=>{const t=Yl.value.length;return t?t*dt.value+Math.max(0,t-1)*bl.value:0}),Wn=e.computed(()=>({maxSegment:{marker:{enabled:!1}}})),Yl=e.computed(()=>xe.value!=="stepbar"?[]:zn.value.map(t=>({key:t.key,label:t.axisLabel||t.label,totalValue:t.totalValue,segments:t.segments.filter(a=>!a.isRemainder).map(a=>({label:a.label,value:a.value,color:a.color,marker:a.marker}))}))),bn=e.computed(()=>{if(xe.value!=="stepbar")return[];const{minY:t,maxY:a}=Vt.value,l=5,r=[];for(let p=0;p<=l;p++){const h=t+(a-t)*(p/l);r.push({top:Xn(h)-P.value.top,value:h})}return r}),$n=e.computed(()=>({top:`${P.value.top}px`,left:`${P.value.left}px`,width:`${P.value.width}px`,height:`${ml.value+tl.value}px`})),tn=e.computed(()=>({width:`${Ll.value}px`,minHeight:`${ml.value+tl.value}px`})),_l=e.computed(()=>xe.value==="stepbar"&&Se.value&&Ve.value.show&&!Q.value.isZooming),dn=e.computed(()=>{const t=dt.value+bl.value;return{left:`${Ve.value.categoryIndex*t+dt.value/2}px`,height:`${ml.value}px`,borderColor:tt.value}}),wl=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.enabled!==!1}),mn=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),zl=e.computed(()=>{const t=U.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),pn=e.computed(()=>{const t=U.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),ln=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),ll=e.computed(()=>{const t=U.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),Gn=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.onDataChange!==!1}),qn=e.computed(()=>{const t=U.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),Rl=e.computed(()=>{const t=U.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),vn=e.computed(()=>U.value?.spider?.gridSteps||5),Ml=e.computed(()=>{const t=[],a=vn.value;for(let l=1;l<=a;l++)t.push(nt.value/a*l);return t}),Qn=t=>{const a=nn.value;if(a&&Array.isArray(a)&&a[t]!==void 0)return a[t].toString();const l=Ml.value[t];return Math.round(l/nt.value*100)+"%"},nn=e.computed(()=>U.value?.spider?.gridLabels||null),sl=e.computed(()=>{const t=U.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0}),Wt=e.computed(()=>{const t=U.value,a={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...a,...t.contextMenu.items}:a}),qt=e.computed(()=>{const t=U.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),vl=e.computed(()=>{const t=U.value;return t&&t.markers&&t.markers.icon?t.markers.icon:Dn.value}),Pl=e.computed(()=>{const t=U.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),Dt=e.computed(()=>{const t=U.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),kt=e.computed(()=>{const a=U.value?.valueFormat?.extension;return typeof a=="string"?a:""}),xl=t=>{const a=kt.value;if(t==null)return"";const l=String(t);return a?l+a:l},El=e.computed(()=>!Q.value.isZooming);e.computed(()=>Zt.value.map(t=>{if(t.categoryIndex!==void 0&&(Bl.value||Ft.value)){const a=fl(t.categoryIndex),l=He.value+P.value.bottom-Dt.value/2;return{...t,x:a,y:l}}return t}));function gl(t,a){let l;if(t instanceof Date)l=new Date(t.getFullYear(),t.getMonth(),t.getDate());else if(typeof t=="string"){const[h,E,S]=t.split("-"),q=Number(S?.length===2?`20${S}`:S);l=new Date(q,Number(E)-1,Number(h))}else return 0;let r=0,p=1/0;return a.forEach((h,E)=>{const[S,q,A]=h.split("-"),z=Number(A?.length===2?`20${A}`:A),T=new Date(z,Number(q)-1,Number(S)),K=Math.abs(T-l);K<p&&(p=K,r=E)}),r}const Xl=e.computed(()=>{const t=Z.markers.map(l=>{const r=gl(l.marker_date,Z.categories),p=fl(r),h=He.value+P.value.bottom-Dt.value/2;return{...l,x:p,y:h,categoryIndex:r,source:"props"}}),a=Zt.value.map(l=>{if(l.categoryIndex!==void 0&&(Bl.value||Ft.value)){const r=fl(l.categoryIndex),p=He.value+P.value.bottom-Dt.value/2;return{...l,x:r,y:p,source:"internal"}}return{...l,source:"internal"}});return[...t,...a]}),Fl=e.computed(()=>{const t=U.value;return t&&t.watermark&&t.watermark.enabled===!0}),fn=e.computed(()=>{const t=U.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),hn=e.computed(()=>{const t=U.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:35}),$l=e.computed(()=>{const t=U.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),Yt=e.computed(()=>{const t={left:P.value.left,top:P.value.top,width:P.value.width,height:P.value.height};let a,l;const r=String(hn.value);if(r.includes("%")){const p=parseFloat(r)/100;a=t.width*p,l=a*(96/499)}else{const p=parseFloat(r)||25;a=Math.min(t.width*.25,200)*(p/25),l=a*(96/499)}return{width:a,height:l,area:t}}),an=e.computed(()=>{const{width:t,height:a}=Yt.value,l=$l.value;let r,p;const h=P.value.left,E=P.value.right,S=P.value.top,q=P.value.bottom,A=P.value.width,z=P.value.height;switch(l){case"center":r=h+(A-t)/2,p=S+(z-a)/2;break;case"top-left":r=h+15,p=S+5;break;case"top-right":r=E-t-15,p=S+5;break;case"bottom-left":r=h+15,p=q-a-5;break;case"bottom-right":default:r=E-t-15,p=q-a-5;break}return{backgroundPositionX:r+"px",backgroundPositionY:p+"px",backgroundSize:`${t}px ${a}px`}}),Sl=t=>!Z.flags||!Z.flags.length?[]:Z.flags.filter(a=>a.categoryIndex===t),St=t=>{const a=Sl(t),l=Ja(t),r=a.filter(E=>E.manual),p=a.filter(E=>!E.manual),h=[];return r.length>0&&h.push({type:N("chart.tooltip.manualFlags"),color:"#698dbe",flags:r.map(E=>({text:E.text,color:"#698dbe"}))}),p.length>0&&h.push({type:N("chart.tooltip.autoFlags"),color:"#a1d499",flags:p.map(E=>({text:E.text,color:"#a1d499"}))}),{flagGroups:h,markers:l.map(E=>({title:E.title,description:E.description,type:N("chart.tooltip.markers"),color:E.color||"#9784ba"}))}},Dn=e.computed(()=>{const t=Z.old?`<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="white"/>
@@ -15,7 +15,7 @@
15
15
  <rect width="57" height="57" fill="white"/>
16
16
  </clipPath>
17
17
  </defs>
18
- </svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),tl=e.computed(()=>{const t=Z.old?`<svg width="499" height="96" viewBox="0 0 499 96" fill="none" xmlns="http://www.w3.org/2000/svg">
18
+ </svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),Kt=e.computed(()=>{const t=Z.old?`<svg width="499" height="96" viewBox="0 0 499 96" fill="none" xmlns="http://www.w3.org/2000/svg">
19
19
  <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"/>
20
20
  <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"/>
21
21
  <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"/>
@@ -41,23 +41,23 @@
41
41
  <rect width="45" height="45" fill="white" transform="translate(0 1)"/>
42
42
  </clipPath>
43
43
  </defs>
44
- </svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),_l=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&t.radialLabels.show===!0}),yn=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&typeof t.radialLabels.fontSize=="number"?t.radialLabels.fontSize:12});e.computed(()=>{const t=U.value;return t&&t.radialLabels&&t.radialLabels.color?t.radialLabels.color:"#000"});const sn=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&typeof t.radialLabels.pointerLength=="number"?t.radialLabels.pointerLength:25}),Fl=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&typeof t.radialLabels.horizontalLength=="number"?t.radialLabels.horizontalLength:40}),ul=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&typeof t.radialLabels.textOffset=="number"?t.radialLabels.textOffset:8}),Ql=e.computed(()=>{const o=U.value?.radialBar?.dataLabels;return o&&(o.show===!0||o.enabled===!0)}),Ul=e.computed(()=>{const o=U.value?.radialBar?.dataLabels?.minAngleDegrees;return typeof o=="number"&&o>=0?o:20}),k=e.computed(()=>{const o=U.value?.radialBar?.dataCenter;return Zn.value?!0:Vn.value&&o&&(o.show===!0||o.enabled===!0)}),w=e.computed(()=>{if(!k.value||!An.value.length)return"";if(Zn.value){const r=An.value[1]??An.value[0];return Vl(r?.value??0)}const l=U.value?.radialBar?.dataCenter?.showValueOnly===!0?An.value[0]?.value??0:An.value.reduce((r,m)=>r+(m.value??0),0);return Vl(l)}),E=e.computed(()=>{const o=U.value?.radialBar?.dataCenter?.fontSize;return typeof o=="number"&&o>0?o:24}),j=e.computed(()=>({x:Wt.value,y:Zn.value?At.value:At.value-E.value/2})),Ce=e.computed(()=>{const o=U.value?.radialBar?.dataCenter?.color;return typeof o=="string"&&o?o:"#333"}),qe=e.computed(()=>{if(!Ql.value||!xl.value||!An.value.length)return[];const t=Ul.value*Math.PI/180,o=(kl.value+it.value)/2;return An.value.map(l=>{const m=l.endAngle-l.startAngle>=t&&!l.isHidden,v=Wt.value+Math.cos(l.midAngle)*o,b=At.value+Math.sin(l.midAngle)*o;return{value:Vl(l.value),x:v,y:b,show:m,color:l.color,contrastColor:Xa(l.color)}})}),Ie=e.computed(()=>{if(!Z.flags||!Z.flags.length)return[];const t=new Map;return Z.flags.forEach(o=>{const l=o.categoryIndex;t.has(l)||t.set(l,[]),t.get(l).push(o)}),Array.from(t.entries()).map(([o,l])=>{const r=Cl(o),m=l.filter(b=>b.manual),v=l.filter(b=>!b.manual);return{categoryIndex:parseInt(o),x:r,flags:l,manualCount:m.length,autoCount:v.length,totalCount:l.length,hasManual:m.length>0,hasAuto:v.length>0,texts:l.map(b=>b.text).join(`
45
- `)}})}),at=e.ref({show:!1,x:0,y:0,content:"",count:0}),f=e.computed(()=>U.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),g=e.computed(()=>{const t=U.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),S=e.computed(()=>U.value?.bubbles?.tooltip?.formatters||{}),F=e.ref(new Set),z=e.ref(null),Qe=e.ref(!1),Te=e.ref({show:!1,x:0,y:0,title:"",value:"",bubbleData:[],spiderAreas:[]}),Ft=e.ref({show:!1,x:0,y:0,categoryValue:"",description:""}),Le=e.ref({show:!1,x:0,categoryIndex:-1,data:[]}),st=e.ref({show:!1,x:0,y:0,mouseDataX:0,mouseDataY:0,categoryIndex:-1,chartX:0,chartY:0}),ne=e.ref({scale:1,offsetX:0,minScale:1,maxScale:2.5,isDragging:!1,lastMouseX:0,lastMouseY:0,isZooming:!1,zoomTimeout:null}),ll=e.ref([]),Ze=e.ref({show:!1,title:"",description:"",color:"#FF6B6B",type:"default",editingMarkerId:null,readonly:!1,categoryIndex:null,fromButton:!1,date:null});e.computed(()=>{const t=["default"];return Tl.value&&t.push(...Object.keys(Tl.value)),t}),e.computed(()=>{if(!Z.categories||Z.categories.length===0){const{maxX:t}=Bt.value;return Array.from({length:t+1},(o,l)=>N("chart.fallback.item",{number:l+1}))}return Z.categories});const Kn=e.computed(()=>{if(!Z.categories||Z.categories.length===0)return null;const t=Z.categories[0],[o,l,r]=String(t).split("-"),m=Number(r?.length===2?`20${r}`:r),v=Number(o),b=Number(l)-1;return!v||!l||!m?null:new Date(m,b,v)}),jo=e.computed(()=>{if(!Z.categories||Z.categories.length===0)return null;const t=Z.categories[Z.categories.length-1],[o,l,r]=String(t).split("-"),m=Number(r?.length===2?`20${r}`:r),v=Number(o),b=Number(l)-1;return!v||!l||!m?null:new Date(m,b,v)}),Gn=e.computed(()=>Ze.value.editingMarkerId!==null),On=e.computed(()=>Ze.value.readonly),Qn=t=>{F.value.has(t)||(pa.value=!0,z.value=t)},oo=()=>{pa.value=!1,z.value=null},Ko=t=>{if(Bo.value||Po.value){Le.value.show=!1;return}const l=t.currentTarget.getBoundingClientRect(),r=t.clientX-l.left,m=t.clientY-l.top,v=Ot.value?r>=P.value.left-50&&r<=P.value.right+50&&m>=P.value.top-50&&m<=P.value.bottom+100:fl.value?r>=P.value.left&&r<=P.value.right&&m>=P.value.top&&m<=P.value.bottom+rl.value:r>=P.value.left&&r<=P.value.right&&m>=P.value.top&&m<=P.value.bottom;if(Qe.value=v,Ot.value){if(!Se.value||!v||ne.value.isDragging||ne.value.isZooming){Le.value.show=!1;return}if(Io.value.find(ve=>!ve||ve.isHidden?!1:Math.sqrt(Math.pow(ve.x-r,2)+Math.pow(ve.y-m,2))<=ve.radius+3))Le.value.show=!1;else{const ve=Io.value.filter(be=>!be||be.isHidden?!1:Math.sqrt(Math.pow(be.x-r,2)+Math.pow(be.y-m,2))<=250);if(ve.length>0){let be=ve[0],Ee=Math.sqrt(Math.pow(be.x-r,2)+Math.pow(be.y-m,2));ve.forEach(Oe=>{const De=Math.sqrt(Math.pow(Oe.x-r,2)+Math.pow(Oe.y-m,2));De<Ee&&(Ee=De,be=Oe)});const me=30,Je=Io.value.filter(Oe=>!Oe||Oe.isHidden?!1:Math.abs(Oe.x-be.x)<=me).sort((Oe,De)=>Oe.y-De.y);Le.value={show:!0,x:be.x,categoryIndex:Math.round(be.originalX),data:(()=>{const Oe=f.value,De=g.value,Be=[];return Je.forEach(Pe=>{Oe.forEach($t=>{const Zt=De[$t]||$t,tn=Na($t,Pe);tn&&Be.push({seriesName:Pe.seriesName,label:Pe.label,value:`${Zt}: ${tn}`,color:Pe.color,y:Pe.y})})}),Be})()}}else Le.value.show=!1}return}if(fl.value){if(!Se.value||!v||ne.value.isDragging||ne.value.isZooming){Le.value.show=!1;return}const Ue=A.value;if(!Ue){Le.value.show=!1;return}const ve=Ue.getBoundingClientRect(),be=t.clientX-ve.left+Ue.scrollLeft,Ee=ft.value+El.value,me=Math.floor(be/Ee);if(me<0||me>=Gl.value.length){Le.value.show=!1;return}const Je=Dn.value[me];if(!Je){Le.value.show=!1;return}const Oe=me*Ee+ft.value/2,De=ve.left+Oe-Ue.scrollLeft-l.left;Le.value={show:!0,x:De,categoryIndex:me,data:Je.segments.filter(Be=>!Be.isRemainder).map(Be=>({seriesName:Be.label,value:Be.value,color:Be.color,y:null}))};return}if(ne.value.isDragging&&ne.value.scale>1&&$l.value&&bt.value&&!fl.value){Le.value.show=!1;const Ue=t.clientX-ne.value.lastMouseX,{minX:ve,maxX:be}=Bt.value,Ee=be-ve||1,Je=Ue*.8;ne.value.offsetX+=Je;const Oe=Ee/ne.value.scale,De=Ee-Oe,Be=0,Pe=-De/Ee*P.value.width,$t=Be;ne.value.offsetX=Math.max(Pe,Math.min($t,ne.value.offsetX)),ne.value.lastMouseX=t.clientX,ne.value.lastMouseY=t.clientY;return}if(!Se.value||!$l.value||fl.value||ne.value.isDragging||ne.value.isZooming||!v){Le.value.show=!1;return}const{minX:b,maxX:x}=Bt.value,q=x-b||1,T=q/ne.value.scale,I=b-ne.value.offsetX/P.value.width*q,$=(r-P.value.left)/P.value.width,G=I+$*T,Ne=Math.round(G);if(Ne>=0&&Ne<=x){const Ue=Cl(Ne),ve=qt.value.map((be,Ee)=>{const me=Z.series.findIndex(Oe=>Oe===be),Je=be.data[Ne];return{seriesName:be.name,value:Je!==void 0?Je:null,color:al(me),y:Je!==void 0?Cn(be,Je):null}}).filter(be=>be.value!==null);Le.value={show:!0,x:Ue,categoryIndex:Ne,data:ve}}},Go=()=>{Le.value.show&&(Le.value.show=!1)},$o=t=>{const o=A.value;if(!o||o.scrollWidth<=o.clientWidth)return;t.preventDefault(),t.stopPropagation();const l=Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:t.deltaY;o.scrollLeft+=l},Lo=()=>Gl.value[Le.value.categoryIndex]?.label||N("chart.fallback.item",{number:Le.value.categoryIndex+1}),To=()=>{Le.value.show=!1,Qe.value=!1,Po.value=!1,Bo.value||(at.value.show=!1),ne.value.isDragging&&(ne.value.isDragging=!1),ne.value.zoomTimeout&&(clearTimeout(ne.value.zoomTimeout),ne.value.zoomTimeout=null),ne.value.isZooming=!1,setTimeout(()=>{z.value=null,Te.value.show=!1},150)},Qo=t=>{if(t.preventDefault(),t.stopPropagation(),!cl.value)return;const o=t.currentTarget.getBoundingClientRect(),l=t.clientX-o.left,r=t.clientY-o.top;if(xl.value){st.value.show=!1,e.nextTick(()=>{st.value.show=!0,st.value.x=t.clientX,st.value.y=t.clientY,st.value.categoryIndex=null});return}const m=Math.max(0,P.value.left-20),v=P.value.right,b=P.value.top,x=P.value.bottom+80;l>=m&&l<=v&&r>=b&&r<=x&&(st.value.show=!1,e.nextTick(()=>{st.value.show=!0,st.value.x=t.clientX,st.value.y=t.clientY,st.value.categoryIndex=null;const q=Math.max(P.value.left,Math.min(l,P.value.right))-P.value.left,I=P.value.width/sa.value.length,$=Math.floor(q/I);$>=0&&$<sa.value.length&&(st.value.categoryIndex=$)}))},wn=t=>{if(!(t&&t.button===2)){if(st.value.show&&t&&t.type==="click"){const o=document.querySelector(".dss-context-menu");if(o&&o.contains(t.target))return}st.value.show=!1}},Jo=t=>{if(typeof t.template=="function"){const o={series:Z.series,categories:Z.categories,markers:ll.value},l={chartX:st.value.chartX,chartY:st.value.chartY,dataX:st.value.mouseDataX,dataY:st.value.mouseDataY,categoryIndex:st.value.categoryIndex};return t.template(o,l)}return t.template||t.label||""},Do=t=>{const o=["dss-context-menu-item"];return t.cssClass&&o.push(t.cssClass),o},Wn=t=>t.style||{},ao=t=>t.type&&Tl.value[t.type]?Tl.value[t.type]:t.customIcon?t.customIcon:Yt.value,so=t=>t==null?"":Z.categories&&Z.categories[t]?Z.categories[t]:"",ea=t=>ll.value.length?ll.value.filter(o=>o.categoryIndex===t):[],ta=t=>{if(!$l.value&&!Ot.value)return{x:0,y:0};const o=Cl(t),l=Re.value+P.value.bottom-Tt.value/2;return{x:o,y:l}},Co=()=>{ll.value.forEach(t=>{if(t.categoryIndex!==void 0&&($l.value||Ot.value)){const o=ta(t.categoryIndex);t.x=o.x,t.y=o.y}})},xn=()=>{if(Ze.value.description&&Ze.value.description.length&&Ze.value.date){if(Gn.value){const t=ll.value.findIndex(o=>o.id===Ze.value.editingMarkerId);t!==-1?(ll.value[t].description=Ze.value.description||"",ll.value[t].color=Ze.value.color||"",ll.value[t].type=Ze.value.type||"default",oe("update-marker",ll.value[t])):oe("update-marker",{id:Ze.value.editingMarkerId,description:Ze.value.description||"",color:Ze.value.color||"",type:Ze.value.type||"default"})}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let o=Nl(Ze.value.date,Z.categories||[]);if(Ot.value){const{maxX:b}=Bt.value;o=Math.max(0,Math.min(o,Math.floor(b)))}else $l.value&&(o=Math.max(0,Math.min(o,Bt.value.maxX)));const l=Cl(o),r=Re.value+P.value.bottom-Tt.value/2,m=Array.isArray(Z.categories)?Z.categories[o]:null,v={id:t,title:"",description:Ze.value.description||"",color:Ze.value.color||"",type:Ze.value.type||"default",categoryIndex:o,x:l,y:r,marker_date:m||null};Ze.value.categoryIndex=o,ll.value.push(v),oe("add-marker",v)}Il(),bo()}},Il=()=>{Ze.value.show=!1,Ze.value.title="",Ze.value.description="",Ze.value.color="#FF6B6B",Ze.value.type="default",Ze.value.editingMarkerId=null,Ze.value.readonly=!1,Ze.value.categoryIndex=null,Ze.value.fromButton=!1,Ze.value.date=null},_n=()=>{Gn.value&&(Jn(Ze.value.editingMarkerId),Il())},Jn=t=>{const o=ll.value.findIndex(l=>l.id===t);o!==-1&&(ll.value.splice(o,1),bo()),oe("delete-marker",t)},pl=t=>{if(Ze.value.show=!0,Ze.value.title=t?.title??t?.comment??"",Ze.value.description=t?.description??t?.comment??"",Ze.value.color=t?.color??"",Ze.value.type=t?.type??"default",Ze.value.editingMarkerId=t?.id??t?.marker_id??null,Ze.value.readonly=t?.readonly??!1,Ze.value.categoryIndex=t?.categoryIndex??null,t?.marker_date){const[o,l,r]=String(t.marker_date).split("-"),m=Number(r?.length===2?`20${r}`:r),v=Number(o),b=Number(l)-1;v&&l&&m?Ze.value.date=new Date(m,b,v):Ze.value.date=null}else Ze.value.date=null},bo=()=>{try{const t=`dss-chart-markers-${Z.chartId}`;localStorage.setItem(t,JSON.stringify(ll.value))}catch(t){console.warn("Could not save markers to localStorage:",t)}},Ao=()=>{try{const t=`dss-chart-markers-${Z.chartId}`,o=localStorage.getItem(t);if(o){const l=JSON.parse(o);Array.isArray(l)&&(ll.value=l.map(r=>({...r,originalYOffset:r.originalYOffset!==void 0?r.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),ll.value=[]}},Jl=t=>{const o=et.value||"Chart",l=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"}-${l}.${t}`},En=()=>{const t=Le.value.show,o=Te.value.show;return Le.value.show=!1,Te.value.show=!1,{originalCrosshair:t,originalTooltip:o}},Yl=t=>{Le.value.show=t.originalCrosshair,Te.value.show=t.originalTooltip},Mn=async(t,o=32,l=32)=>new Promise((r,m)=>{if(t.startsWith("data:")){r(t);return}const v=new Image;v.crossOrigin="anonymous";const b=setTimeout(()=>{console.warn("Image conversion timeout for:",t),r(t)},5e3);v.onload=()=>{clearTimeout(b);try{const x=document.createElement("canvas"),q=x.getContext("2d");x.width=o,x.height=l,q.fillStyle="#fafafa",q.fillRect(0,0,o,l),q.drawImage(v,0,0,o,l);const T=x.toDataURL("image/png");r(T)}catch(x){console.warn("Canvas conversion failed:",x),r(t)}},v.onerror=x=>{clearTimeout(b),console.warn("Failed to load image:",t,x),r(t)},v.src=t}),qn=async()=>{try{const t=En();setTimeout(async()=>{try{const o=ee.value;if(!o){console.error("Chart SVG element not found"),Yl(t);return}const l=_e(),r=Me.value,m=mt.value+l.height,v=o.cloneNode(!0);v.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text").forEach(me=>me.remove());const x=v.querySelectorAll("image"),q=Array.from(x).map(async me=>{const Je=me.getAttribute("xlink:href")||me.getAttribute("href");if(Je&&!Je.startsWith("data:"))try{const Oe=await Mn(Je,32,32);me.setAttribute("xlink:href",Oe),me.setAttribute("href",Oe)}catch(Oe){console.warn("Failed to convert logo to base64:",Oe)}});await Promise.all(q);const I=new XMLSerializer().serializeToString(v).replace(/<svg[^>]*>/,"").replace("</svg>","");let $="",G=30;if(et.value&&($+=`
46
- <text x="24" y="${G}"
44
+ </svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),Vl=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&t.radialLabels.show===!0}),gn=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&typeof t.radialLabels.fontSize=="number"?t.radialLabels.fontSize:12});e.computed(()=>{const t=U.value;return t&&t.radialLabels&&t.radialLabels.color?t.radialLabels.color:"#000"});const wn=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&typeof t.radialLabels.pointerLength=="number"?t.radialLabels.pointerLength:25}),on=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&typeof t.radialLabels.horizontalLength=="number"?t.radialLabels.horizontalLength:40}),yl=e.computed(()=>{const t=U.value;return t&&t.radialLabels&&typeof t.radialLabels.textOffset=="number"?t.radialLabels.textOffset:8}),Ln=e.computed(()=>{const a=U.value?.radialBar?.dataLabels;return a&&(a.show===!0||a.enabled===!0)}),jl=e.computed(()=>{const a=U.value?.radialBar?.dataLabels?.minAngleDegrees;return typeof a=="number"&&a>=0?a:20}),sn=e.computed(()=>{const a=U.value?.radialBar?.dataCenter;return Yn.value?!0:_n.value&&a&&(a.show===!0||a.enabled===!0)}),Tl=e.computed(()=>{if(!sn.value||!Pn.value.length)return"";if(Yn.value){const r=Pn.value[1]??Pn.value[0];return xl(r?.value??0)}const l=U.value?.radialBar?.dataCenter?.showValueOnly===!0?Pn.value[0]?.value??0:Pn.value.reduce((r,p)=>r+(p.value??0),0);return xl(l)}),Kl=e.computed(()=>{const a=U.value?.radialBar?.dataCenter?.fontSize;return typeof a=="number"&&a>0?a:24}),nl=e.computed(()=>({x:It.value,y:Yn.value?Mt.value:Mt.value-Kl.value/2})),Ol=e.computed(()=>{const a=U.value?.radialBar?.dataCenter?.color;return typeof a=="string"&&a?a:"#333"}),k=e.computed(()=>{if(!Ln.value||!Cl.value||!Pn.value.length)return[];const t=jl.value*Math.PI/180,a=(pl.value+nt.value)/2;return Pn.value.map(l=>{const p=l.endAngle-l.startAngle>=t&&!l.isHidden,h=It.value+Math.cos(l.midAngle)*a,E=Mt.value+Math.sin(l.midAngle)*a;return{value:xl(l.value),x:h,y:E,show:p,color:l.color,contrastColor:Xo(l.color)}})}),C=e.computed(()=>{if(!Z.flags||!Z.flags.length)return[];const t=new Map;return Z.flags.forEach(a=>{const l=a.categoryIndex;t.has(l)||t.set(l,[]),t.get(l).push(a)}),Array.from(t.entries()).map(([a,l])=>{const r=fl(a),p=l.filter(E=>E.manual),h=l.filter(E=>!E.manual);return{categoryIndex:parseInt(a),x:r,flags:l,manualCount:p.length,autoCount:h.length,totalCount:l.length,hasManual:p.length>0,hasAuto:h.length>0,texts:l.map(E=>E.text).join(`
45
+ `)}})}),x=e.ref({show:!1,x:0,y:0,content:"",count:0}),d=e.computed(()=>U.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),f=e.computed(()=>{const t=U.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),b=e.computed(()=>U.value?.bubbles?.tooltip?.formatters||{}),_=e.ref(new Set),$=e.ref(null),ye=e.ref(!1),ge=e.ref({show:!1,x:0,y:0,title:"",value:"",bubbleData:[],spiderAreas:[]}),st=e.ref({show:!1,x:0,y:0,categoryValue:"",description:""}),Ve=e.ref({show:!1,x:0,categoryIndex:-1,data:[]}),Qe=e.ref({show:!1,x:0,y:0,mouseDataX:0,mouseDataY:0,categoryIndex:-1,chartX:0,chartY:0}),Q=e.ref({scale:1,offsetX:0,minScale:1,maxScale:2.5,isDragging:!1,lastMouseX:0,lastMouseY:0,isZooming:!1,zoomTimeout:null}),Zt=e.ref([]),Oe=e.ref({show:!1,title:"",description:"",color:"#FF6B6B",type:"default",editingMarkerId:null,readonly:!1,categoryIndex:null,fromButton:!1,date:null});e.computed(()=>{const t=["default"];return Pl.value&&t.push(...Object.keys(Pl.value)),t}),e.computed(()=>{if(!Z.categories||Z.categories.length===0){const{maxX:t}=Vt.value;return Array.from({length:t+1},(a,l)=>N("chart.fallback.item",{number:l+1}))}return Z.categories});const Jn=e.computed(()=>{if(!Z.categories||Z.categories.length===0)return null;const t=Z.categories[0],[a,l,r]=String(t).split("-"),p=Number(r?.length===2?`20${r}`:r),h=Number(a),E=Number(l)-1;return!h||!l||!p?null:new Date(p,E,h)}),ea=e.computed(()=>{if(!Z.categories||Z.categories.length===0)return null;const t=Z.categories[Z.categories.length-1],[a,l,r]=String(t).split("-"),p=Number(r?.length===2?`20${r}`:r),h=Number(a),E=Number(l)-1;return!h||!l||!p?null:new Date(p,E,h)}),xn=e.computed(()=>Oe.value.editingMarkerId!==null),yn=e.computed(()=>Oe.value.readonly),En=t=>{_.value.has(t)||(po.value=!0,$.value=t)},Tn=()=>{po.value=!1,$.value=null},ja=t=>{if(Ba.value||Pa.value){Ve.value.show=!1;return}const l=t.currentTarget.getBoundingClientRect(),r=t.clientX-l.left,p=t.clientY-l.top,h=Ft.value?r>=P.value.left-50&&r<=P.value.right+50&&p>=P.value.top-50&&p<=P.value.bottom+100:cl.value?r>=P.value.left&&r<=P.value.right&&p>=P.value.top&&p<=P.value.bottom+tl.value:r>=P.value.left&&r<=P.value.right&&p>=P.value.top&&p<=P.value.bottom;if(ye.value=h,Ft.value){if(!Se.value||!h||Q.value.isDragging||Q.value.isZooming){Ve.value.show=!1;return}if(Ia.value.find(pe=>!pe||pe.isHidden?!1:Math.sqrt(Math.pow(pe.x-r,2)+Math.pow(pe.y-p,2))<=pe.radius+3))Ve.value.show=!1;else{const pe=Ia.value.filter(be=>!be||be.isHidden?!1:Math.sqrt(Math.pow(be.x-r,2)+Math.pow(be.y-p,2))<=250);if(pe.length>0){let be=pe[0],Ee=Math.sqrt(Math.pow(be.x-r,2)+Math.pow(be.y-p,2));pe.forEach(ze=>{const Le=Math.sqrt(Math.pow(ze.x-r,2)+Math.pow(ze.y-p,2));Le<Ee&&(Ee=Le,be=ze)});const de=30,je=Ia.value.filter(ze=>!ze||ze.isHidden?!1:Math.abs(ze.x-be.x)<=de).sort((ze,Le)=>ze.y-Le.y);Ve.value={show:!0,x:be.x,categoryIndex:Math.round(be.originalX),data:(()=>{const ze=d.value,Le=f.value,_e=[];return je.forEach(Ie=>{ze.forEach(Bt=>{const Pt=Le[Bt]||Bt,Jl=No(Bt,Ie);Jl&&_e.push({seriesName:Ie.seriesName,label:Ie.label,value:`${Pt}: ${Jl}`,color:Ie.color,y:Ie.y})})}),_e})()}}else Ve.value.show=!1}return}if(cl.value){if(!Se.value||!h||Q.value.isDragging||Q.value.isZooming){Ve.value.show=!1;return}const We=R.value;if(!We){Ve.value.show=!1;return}const pe=We.getBoundingClientRect(),be=t.clientX-pe.left+We.scrollLeft,Ee=dt.value+bl.value,de=Math.floor(be/Ee);if(de<0||de>=Yl.value.length){Ve.value.show=!1;return}const je=zn.value[de];if(!je){Ve.value.show=!1;return}const ze=de*Ee+dt.value/2,Le=pe.left+ze-We.scrollLeft-l.left;Ve.value={show:!0,x:Le,categoryIndex:de,data:je.segments.filter(_e=>!_e.isRemainder).map(_e=>({seriesName:_e.label,value:_e.value,color:_e.color,y:null}))};return}if(Q.value.isDragging&&Q.value.scale>1&&Bl.value&&gt.value&&!cl.value){Ve.value.show=!1;const We=t.clientX-Q.value.lastMouseX,{minX:pe,maxX:be}=Vt.value,Ee=be-pe||1,je=We*.8;Q.value.offsetX+=je;const ze=Ee/Q.value.scale,Le=Ee-ze,_e=0,Ie=-Le/Ee*P.value.width,Bt=_e;Q.value.offsetX=Math.max(Ie,Math.min(Bt,Q.value.offsetX)),Q.value.lastMouseX=t.clientX,Q.value.lastMouseY=t.clientY;return}if(!Se.value||!Bl.value||cl.value||Q.value.isDragging||Q.value.isZooming||!h){Ve.value.show=!1;return}const{minX:E,maxX:S}=Vt.value,q=S-E||1,A=q/Q.value.scale,z=E-Q.value.offsetX/P.value.width*q,T=(r-P.value.left)/P.value.width,K=z+T*A,Be=Math.round(K);if(Be>=0&&Be<=S){const We=fl(Be),pe=zt.value.map((be,Ee)=>{const de=Z.series.findIndex(ze=>ze===be),je=be.data[Be];return{seriesName:be.name,value:je!==void 0?je:null,color:Jt(de),y:je!==void 0?Cn(be,je):null}}).filter(be=>be.value!==null);Ve.value={show:!0,x:We,categoryIndex:Be,data:pe}}},Ka=()=>{Ve.value.show&&(Ve.value.show=!1)},$a=t=>{const a=R.value;if(!a||a.scrollWidth<=a.clientWidth)return;t.preventDefault(),t.stopPropagation();const l=Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:t.deltaY;a.scrollLeft+=l},Da=()=>Yl.value[Ve.value.categoryIndex]?.label||N("chart.fallback.item",{number:Ve.value.categoryIndex+1}),La=()=>{Ve.value.show=!1,ye.value=!1,Pa.value=!1,Ba.value||(x.value.show=!1),Q.value.isDragging&&(Q.value.isDragging=!1),Q.value.zoomTimeout&&(clearTimeout(Q.value.zoomTimeout),Q.value.zoomTimeout=null),Q.value.isZooming=!1,setTimeout(()=>{$.value=null,ge.value.show=!1},150)},Ga=t=>{if(t.preventDefault(),t.stopPropagation(),!sl.value)return;const a=t.currentTarget.getBoundingClientRect(),l=t.clientX-a.left,r=t.clientY-a.top;if(Cl.value){Qe.value.show=!1,e.nextTick(()=>{Qe.value.show=!0,Qe.value.x=t.clientX,Qe.value.y=t.clientY,Qe.value.categoryIndex=null});return}const p=Math.max(0,P.value.left-20),h=P.value.right,E=P.value.top,S=P.value.bottom+80;l>=p&&l<=h&&r>=E&&r<=S&&(Qe.value.show=!1,e.nextTick(()=>{Qe.value.show=!0,Qe.value.x=t.clientX,Qe.value.y=t.clientY,Qe.value.categoryIndex=null;const q=Math.max(P.value.left,Math.min(l,P.value.right))-P.value.left,z=P.value.width/oo.value.length,T=Math.floor(q/z);T>=0&&T<oo.value.length&&(Qe.value.categoryIndex=T)}))},Sn=t=>{if(!(t&&t.button===2)){if(Qe.value.show&&t&&t.type==="click"){const a=document.querySelector(".dss-context-menu");if(a&&a.contains(t.target))return}Qe.value.show=!1}},Qa=t=>{if(typeof t.template=="function"){const a={series:Z.series,categories:Z.categories,markers:Zt.value},l={chartX:Qe.value.chartX,chartY:Qe.value.chartY,dataX:Qe.value.mouseDataX,dataY:Qe.value.mouseDataY,categoryIndex:Qe.value.categoryIndex};return t.template(a,l)}return t.template||t.label||""},Ta=t=>{const a=["dss-context-menu-item"];return t.cssClass&&a.push(t.cssClass),a},Zn=t=>t.style||{},sa=t=>t.type&&Pl.value[t.type]?Pl.value[t.type]:t.customIcon?t.customIcon:vl.value,ra=t=>t==null?"":Z.categories&&Z.categories[t]?Z.categories[t]:"",Ja=t=>Zt.value.length?Zt.value.filter(a=>a.categoryIndex===t):[],eo=t=>{if(!Bl.value&&!Ft.value)return{x:0,y:0};const a=fl(t),l=He.value+P.value.bottom-Dt.value/2;return{x:a,y:l}},Ca=()=>{Zt.value.forEach(t=>{if(t.categoryIndex!==void 0&&(Bl.value||Ft.value)){const a=eo(t.categoryIndex);t.x=a.x,t.y=a.y}})},Vn=()=>{if(Oe.value.description&&Oe.value.description.length&&Oe.value.date){if(xn.value){const t=Zt.value.findIndex(a=>a.id===Oe.value.editingMarkerId);t!==-1?(Zt.value[t].description=Oe.value.description||"",Zt.value[t].color=Oe.value.color||"",Zt.value[t].type=Oe.value.type||"default",ne("update-marker",Zt.value[t])):ne("update-marker",{id:Oe.value.editingMarkerId,description:Oe.value.description||"",color:Oe.value.color||"",type:Oe.value.type||"default"})}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let a=gl(Oe.value.date,Z.categories||[]);if(Ft.value){const{maxX:E}=Vt.value;a=Math.max(0,Math.min(a,Math.floor(E)))}else Bl.value&&(a=Math.max(0,Math.min(a,Vt.value.maxX)));const l=fl(a),r=He.value+P.value.bottom-Dt.value/2,p=Array.isArray(Z.categories)?Z.categories[a]:null,h={id:t,title:"",description:Oe.value.description||"",color:Oe.value.color||"",type:Oe.value.type||"default",categoryIndex:a,x:l,y:r,marker_date:p||null};Oe.value.categoryIndex=a,Zt.value.push(h),ne("add-marker",h)}Al(),ba()}},Al=()=>{Oe.value.show=!1,Oe.value.title="",Oe.value.description="",Oe.value.color="#FF6B6B",Oe.value.type="default",Oe.value.editingMarkerId=null,Oe.value.readonly=!1,Oe.value.categoryIndex=null,Oe.value.fromButton=!1,Oe.value.date=null},An=()=>{xn.value&&(ta(Oe.value.editingMarkerId),Al())},ta=t=>{const a=Zt.value.findIndex(l=>l.id===t);a!==-1&&(Zt.value.splice(a,1),ba()),ne("delete-marker",t)},rl=t=>{if(Oe.value.show=!0,Oe.value.title=t?.title??t?.comment??"",Oe.value.description=t?.description??t?.comment??"",Oe.value.color=t?.color??"",Oe.value.type=t?.type??"default",Oe.value.editingMarkerId=t?.id??t?.marker_id??null,Oe.value.readonly=t?.readonly??!1,Oe.value.categoryIndex=t?.categoryIndex??null,t?.marker_date){const[a,l,r]=String(t.marker_date).split("-"),p=Number(r?.length===2?`20${r}`:r),h=Number(a),E=Number(l)-1;h&&l&&p?Oe.value.date=new Date(p,E,h):Oe.value.date=null}else Oe.value.date=null},ba=()=>{try{const t=`dss-chart-markers-${Z.chartId}`;localStorage.setItem(t,JSON.stringify(Zt.value))}catch(t){console.warn("Could not save markers to localStorage:",t)}},Aa=()=>{try{const t=`dss-chart-markers-${Z.chartId}`,a=localStorage.getItem(t);if(a){const l=JSON.parse(a);Array.isArray(l)&&(Zt.value=l.map(r=>({...r,originalYOffset:r.originalYOffset!==void 0?r.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),Zt.value=[]}},Gl=t=>{const a=Ke.value||"Chart",l=new Date().toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).replace(/\//g,"-");return`${a.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50).replace(/^-|-$/g,"")||"Chart"}-${l}.${t}`},Nn=()=>{const t=Ve.value.show,a=ge.value.show;return Ve.value.show=!1,ge.value.show=!1,{originalCrosshair:t,originalTooltip:a}},Wl=t=>{Ve.value.show=t.originalCrosshair,ge.value.show=t.originalTooltip},Hn=async(t,a=32,l=32)=>new Promise((r,p)=>{if(t.startsWith("data:")){r(t);return}const h=new Image;h.crossOrigin="anonymous";const E=setTimeout(()=>{console.warn("Image conversion timeout for:",t),r(t)},5e3);h.onload=()=>{clearTimeout(E);try{const S=document.createElement("canvas"),q=S.getContext("2d");S.width=a,S.height=l,q.fillStyle="#fafafa",q.fillRect(0,0,a,l),q.drawImage(h,0,0,a,l);const A=S.toDataURL("image/png");r(A)}catch(S){console.warn("Canvas conversion failed:",S),r(t)}},h.onerror=S=>{clearTimeout(E),console.warn("Failed to load image:",t,S),r(t)},h.src=t}),Un=async()=>{try{const t=Nn();setTimeout(async()=>{try{const a=ee.value;if(!a){console.error("Chart SVG element not found"),Wl(t);return}const l=Me(),r=$e.value,p=it.value+l.height,h=a.cloneNode(!0);h.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text").forEach(de=>de.remove());const S=h.querySelectorAll("image"),q=Array.from(S).map(async de=>{const je=de.getAttribute("xlink:href")||de.getAttribute("href");if(je&&!je.startsWith("data:"))try{const ze=await Hn(je,32,32);de.setAttribute("xlink:href",ze),de.setAttribute("href",ze)}catch(ze){console.warn("Failed to convert logo to base64:",ze)}});await Promise.all(q);const z=new XMLSerializer().serializeToString(h).replace(/<svg[^>]*>/,"").replace("</svg>","");let T="",K=30;if(Ke.value&&(T+=`
46
+ <text x="24" y="${K}"
47
47
  font-family="Arial, sans-serif"
48
48
  font-size="18"
49
49
  font-weight="bold"
50
50
  fill="#333">
51
- ${et.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
52
- </text>`,G+=30),lt.value&&($+=`
53
- <text x="24" y="${G}"
51
+ ${Ke.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
52
+ </text>`,K+=30),Je.value&&(T+=`
53
+ <text x="24" y="${K}"
54
54
  font-family="Arial, sans-serif"
55
55
  font-size="14"
56
56
  fill="#666">
57
- ${lt.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
58
- </text>`,G+=25),fe.value&&Z.series.length>0){let me=r-200,Je=et.value||lt.value?35:25;const Oe=Math.floor((r-250)/120);let De=0;Z.series.forEach((Be,Pe)=>{if(!F.value.has(Pe)){const $t=al(Pe),Zt=Be.name.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");$+=`<circle cx="${me+6}" cy="${Je-4}" r="6" fill="${$t}"/>`,$+=`<text x="${me+18}" y="${Je}" font-family="Arial, sans-serif" font-size="12" fill="#333">${Zt}</text>`,De++,De%Oe===0?(me=r-200,Je+=20):me+=Math.min(120,Zt.length*8+35)}})}let Ne="";if(Bl.value)try{const{width:me,height:Je}=Gt.value,Oe=Dl.value,De=P.value.left,Be=P.value.right,Pe=P.value.top,$t=P.value.bottom,Zt=P.value.width,tn=P.value.height;let bl,ln;switch(Oe){case"center":bl=De+(Zt-me)/2,ln=Pe+(tn-Je)/2;break;case"top-left":bl=De+15,ln=Pe+5;break;case"top-right":bl=Be-me-5,ln=Pe+5;break;case"bottom-left":bl=De+15,ln=$t-Je-5;break;case"bottom-right":default:bl=Be-me-5,ln=$t-Je-5;break}Ne=`
59
- <g opacity="${Zl.value}">
60
- <g transform="translate(${bl}, ${ln}) scale(${me/499})">
57
+ ${Je.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
58
+ </text>`,K+=25),ve.value&&Z.series.length>0){let de=r-200,je=Ke.value||Je.value?35:25;const ze=Math.floor((r-250)/120);let Le=0;Z.series.forEach((_e,Ie)=>{if(!_.value.has(Ie)){const Bt=Jt(Ie),Pt=_e.name.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");T+=`<circle cx="${de+6}" cy="${je-4}" r="6" fill="${Bt}"/>`,T+=`<text x="${de+18}" y="${je}" font-family="Arial, sans-serif" font-size="12" fill="#333">${Pt}</text>`,Le++,Le%ze===0?(de=r-200,je+=20):de+=Math.min(120,Pt.length*8+35)}})}let Be="";if(Fl.value)try{const{width:de,height:je}=Yt.value,ze=$l.value,Le=P.value.left,_e=P.value.right,Ie=P.value.top,Bt=P.value.bottom,Pt=P.value.width,Jl=P.value.height;let hl,en;switch(ze){case"center":hl=Le+(Pt-de)/2,en=Ie+(Jl-je)/2;break;case"top-left":hl=Le+15,en=Ie+5;break;case"top-right":hl=_e-de-5,en=Ie+5;break;case"bottom-left":hl=Le+15,en=Bt-je-5;break;case"bottom-right":default:hl=_e-de-5,en=Bt-je-5;break}Be=`
59
+ <g opacity="${fn.value}">
60
+ <g transform="translate(${hl}, ${en}) scale(${de/499})">
61
61
  <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"/>
62
62
  <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"/>
63
63
  <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"/>
@@ -72,8 +72,8 @@
72
72
  <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"/>
73
73
  <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"/>
74
74
  </g>
75
- </g>`}catch(me){console.warn("Watermark processing failed, skipping watermark in SVG:",me),Ne=""}const Ue=`<?xml version="1.0" encoding="UTF-8"?>
76
- <svg width="${r}" height="${m}"
75
+ </g>`}catch(de){console.warn("Watermark processing failed, skipping watermark in SVG:",de),Be=""}const We=`<?xml version="1.0" encoding="UTF-8"?>
76
+ <svg width="${r}" height="${p}"
77
77
  xmlns="http://www.w3.org/2000/svg"
78
78
  xmlns:xlink="http://www.w3.org/1999/xlink">
79
79
  <defs>
@@ -84,37 +84,37 @@
84
84
  </style>
85
85
  </defs>
86
86
  <rect width="100%" height="100%" fill="#fafafa"/>
87
- ${$}
87
+ ${T}
88
88
  <g transform="translate(0, ${l.height})">
89
- ${I}
90
- ${Ne}
89
+ ${z}
90
+ ${Be}
91
91
  </g>
92
- </svg>`,ve=new Blob([Ue],{type:"image/svg+xml;charset=utf-8"}),be=URL.createObjectURL(ve),Ee=document.createElement("a");Ee.href=be,Ee.download=Jl("svg"),document.body.appendChild(Ee),Ee.click(),document.body.removeChild(Ee),URL.revokeObjectURL(be),Yl(t),wn()}catch(o){console.error("Error downloading SVG:",o),Yl(t)}},50)}catch(t){console.error("Error downloading SVG:",t)}},la=async()=>{try{const t=En();W.value&&W.value.offsetHeight,await new Promise(me=>setTimeout(me,300));const o=_e(),l=Me.value,r=mt.value+o.height,m=document.createElement("canvas"),v=m.getContext("2d"),b=2;m.width=l*b,m.height=r*b,m.style.width=l+"px",m.style.height=r+"px",v.scale(b,b),v.fillStyle="#fafafa",v.fillRect(0,0,l,r);let x=30;if(et.value&&(v.fillStyle="#333",v.font="bold 18px Arial, sans-serif",v.fillText(et.value,24,x),x+=30),lt.value&&(v.fillStyle="#666",v.font="14px Arial, sans-serif",v.fillText(lt.value,24,x),x+=25),fe.value&&Z.series.length>0){let me=l-200,Je=et.value||lt.value?35:25;const Oe=Math.floor((l-250)/120);let De=0;v.font="12px Arial, sans-serif",Z.series.forEach((Be,Pe)=>{if(!F.value.has(Pe)){const $t=al(Pe);v.beginPath(),v.arc(me+6,Je-4,6,0,2*Math.PI),v.fillStyle=$t,v.fill(),v.fillStyle="#333",v.fillText(Be.name,me+18,Je),De++,De%Oe===0?(me=l-200,Je+=20):me+=Math.min(120,Be.name.length*8+35)}})}const T=ee.value.cloneNode(!0),I=T.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text"),$=T.querySelectorAll(".dss-crosshair"),G=T.querySelectorAll('[class*="tooltip"]');I.forEach(me=>me.remove()),$.forEach(me=>me.remove()),G.forEach(me=>me.remove()),T.querySelectorAll("image").forEach((me,Je)=>{const Oe=me.getAttribute("xlink:href")||me.getAttribute("href");if(Oe&&!Oe.startsWith("data:")){const De=zo.value[Je],Be=De?al(De.seriesIndex):"#3B82F6",Pe=me.getAttribute("x")||0,$t=me.getAttribute("y")||0,Zt=me.getAttribute("width")||32,tn=me.getAttribute("height")||32,bl=document.createElementNS("http://www.w3.org/2000/svg","circle");bl.setAttribute("cx",parseFloat(Pe)+parseFloat(Zt)/2),bl.setAttribute("cy",parseFloat($t)+parseFloat(tn)/2),bl.setAttribute("r",Math.min(parseFloat(Zt),parseFloat(tn))/2-1),bl.setAttribute("fill",Be),bl.setAttribute("stroke","#fafafa"),bl.setAttribute("stroke-width","2"),me.parentNode.replaceChild(bl,me)}});const Ue=new XMLSerializer().serializeToString(T),ve=new Blob([Ue],{type:"image/svg+xml;charset=utf-8"}),be=URL.createObjectURL(ve),Ee=new Image;return new Promise((me,Je)=>{Ee.onload=async()=>{try{if(v.drawImage(Ee,0,o.height),zo.value.forEach(Oe=>{const De=Oe.x,Be=Oe.y+o.height,Pe=(Oe.width||32)/2,$t=al(Oe.seriesIndex);v.save(),v.beginPath(),v.arc(De,Be,Pe-1,0,2*Math.PI),v.fillStyle=$t,v.fill(),v.strokeStyle="#fafafa",v.lineWidth=2,v.stroke(),v.restore()}),Bl.value){const Oe=new Image,De=()=>{const{width:Pe,height:$t}=Gt.value,Zt=Dl.value,tn=P.value.left,bl=P.value.right,ln=P.value.top,Wo=P.value.bottom,bs=P.value.width,ws=P.value.height;let vo,fo;switch(Zt){case"center":vo=tn+(bs-Pe)/2,fo=ln+o.height+(ws-$t)/2;break;case"top-left":vo=tn+15,fo=ln+o.height+10;break;case"top-right":vo=bl-Pe-5,fo=ln+o.height+10;break;case"bottom-left":vo=tn+15,fo=Wo+o.height-$t-5;break;case"bottom-right":default:vo=bl-Pe-5,fo=Wo+o.height-$t-5;break}v.globalAlpha=Zl.value,v.drawImage(Oe,vo,fo,Pe,$t),v.globalAlpha=1,Be()},Be=()=>{m.toBlob(Pe=>{const $t=URL.createObjectURL(Pe),Zt=document.createElement("a");Zt.href=$t,Zt.download=Jl("png"),document.body.appendChild(Zt),Zt.click(),document.body.removeChild(Zt),URL.revokeObjectURL($t),URL.revokeObjectURL(be),Yl(t),wn(),me()},"image/png")};Oe.onload=De,Oe.onerror=Be,Oe.src=tl.value}else m.toBlob(Oe=>{const De=URL.createObjectURL(Oe),Be=document.createElement("a");Be.href=De,Be.download=Jl("png"),document.body.appendChild(Be),Be.click(),document.body.removeChild(Be),URL.revokeObjectURL(De),URL.revokeObjectURL(be),Yl(t),wn(),me()},"image/png")}catch(Oe){URL.revokeObjectURL(be),Yl(t),Je(Oe)}},Ee.onerror=()=>{URL.revokeObjectURL(be),Yl(t),Je(new Error("Failed to load SVG image"))},Ee.src=be})}catch(t){console.error("Error downloading PNG:",t)}},na=()=>{try{let t="";if(et.value&&(t+=`# ${N("chart.csv.chartTitle")}: ${et.value}
93
- `),lt.value&&(t+=`# ${N("chart.csv.chartSubtitle")}: ${lt.value}
92
+ </svg>`,pe=new Blob([We],{type:"image/svg+xml;charset=utf-8"}),be=URL.createObjectURL(pe),Ee=document.createElement("a");Ee.href=be,Ee.download=Gl("svg"),document.body.appendChild(Ee),Ee.click(),document.body.removeChild(Ee),URL.revokeObjectURL(be),Wl(t),Sn()}catch(a){console.error("Error downloading SVG:",a),Wl(t)}},50)}catch(t){console.error("Error downloading SVG:",t)}},to=async()=>{try{const t=Nn();W.value&&W.value.offsetHeight,await new Promise(de=>setTimeout(de,300));const a=Me(),l=$e.value,r=it.value+a.height,p=document.createElement("canvas"),h=p.getContext("2d"),E=2;p.width=l*E,p.height=r*E,p.style.width=l+"px",p.style.height=r+"px",h.scale(E,E),h.fillStyle="#fafafa",h.fillRect(0,0,l,r);let S=30;if(Ke.value&&(h.fillStyle="#333",h.font="bold 18px Arial, sans-serif",h.fillText(Ke.value,24,S),S+=30),Je.value&&(h.fillStyle="#666",h.font="14px Arial, sans-serif",h.fillText(Je.value,24,S),S+=25),ve.value&&Z.series.length>0){let de=l-200,je=Ke.value||Je.value?35:25;const ze=Math.floor((l-250)/120);let Le=0;h.font="12px Arial, sans-serif",Z.series.forEach((_e,Ie)=>{if(!_.value.has(Ie)){const Bt=Jt(Ie);h.beginPath(),h.arc(de+6,je-4,6,0,2*Math.PI),h.fillStyle=Bt,h.fill(),h.fillStyle="#333",h.fillText(_e.name,de+18,je),Le++,Le%ze===0?(de=l-200,je+=20):de+=Math.min(120,_e.name.length*8+35)}})}const A=ee.value.cloneNode(!0),z=A.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text"),T=A.querySelectorAll(".dss-crosshair"),K=A.querySelectorAll('[class*="tooltip"]');z.forEach(de=>de.remove()),T.forEach(de=>de.remove()),K.forEach(de=>de.remove()),A.querySelectorAll("image").forEach((de,je)=>{const ze=de.getAttribute("xlink:href")||de.getAttribute("href");if(ze&&!ze.startsWith("data:")){const Le=za.value[je],_e=Le?Jt(Le.seriesIndex):"#3B82F6",Ie=de.getAttribute("x")||0,Bt=de.getAttribute("y")||0,Pt=de.getAttribute("width")||32,Jl=de.getAttribute("height")||32,hl=document.createElementNS("http://www.w3.org/2000/svg","circle");hl.setAttribute("cx",parseFloat(Ie)+parseFloat(Pt)/2),hl.setAttribute("cy",parseFloat(Bt)+parseFloat(Jl)/2),hl.setAttribute("r",Math.min(parseFloat(Pt),parseFloat(Jl))/2-1),hl.setAttribute("fill",_e),hl.setAttribute("stroke","#fafafa"),hl.setAttribute("stroke-width","2"),de.parentNode.replaceChild(hl,de)}});const We=new XMLSerializer().serializeToString(A),pe=new Blob([We],{type:"image/svg+xml;charset=utf-8"}),be=URL.createObjectURL(pe),Ee=new Image;return new Promise((de,je)=>{Ee.onload=async()=>{try{if(h.drawImage(Ee,0,a.height),za.value.forEach(ze=>{const Le=ze.x,_e=ze.y+a.height,Ie=(ze.width||32)/2,Bt=Jt(ze.seriesIndex);h.save(),h.beginPath(),h.arc(Le,_e,Ie-1,0,2*Math.PI),h.fillStyle=Bt,h.fill(),h.strokeStyle="#fafafa",h.lineWidth=2,h.stroke(),h.restore()}),Fl.value){const ze=new Image,Le=()=>{const{width:Ie,height:Bt}=Yt.value,Pt=$l.value,Jl=P.value.left,hl=P.value.right,en=P.value.top,Wa=P.value.bottom,bs=P.value.width,ws=P.value.height;let va,fa;switch(Pt){case"center":va=Jl+(bs-Ie)/2,fa=en+a.height+(ws-Bt)/2;break;case"top-left":va=Jl+15,fa=en+a.height+10;break;case"top-right":va=hl-Ie-5,fa=en+a.height+10;break;case"bottom-left":va=Jl+15,fa=Wa+a.height-Bt-5;break;case"bottom-right":default:va=hl-Ie-5,fa=Wa+a.height-Bt-5;break}h.globalAlpha=fn.value,h.drawImage(ze,va,fa,Ie,Bt),h.globalAlpha=1,_e()},_e=()=>{p.toBlob(Ie=>{const Bt=URL.createObjectURL(Ie),Pt=document.createElement("a");Pt.href=Bt,Pt.download=Gl("png"),document.body.appendChild(Pt),Pt.click(),document.body.removeChild(Pt),URL.revokeObjectURL(Bt),URL.revokeObjectURL(be),Wl(t),Sn(),de()},"image/png")};ze.onload=Le,ze.onerror=_e,ze.src=Kt.value}else p.toBlob(ze=>{const Le=URL.createObjectURL(ze),_e=document.createElement("a");_e.href=Le,_e.download=Gl("png"),document.body.appendChild(_e),_e.click(),document.body.removeChild(_e),URL.revokeObjectURL(Le),URL.revokeObjectURL(be),Wl(t),Sn(),de()},"image/png")}catch(ze){URL.revokeObjectURL(be),Wl(t),je(ze)}},Ee.onerror=()=>{URL.revokeObjectURL(be),Wl(t),je(new Error("Failed to load SVG image"))},Ee.src=be})}catch(t){console.error("Error downloading PNG:",t)}},lo=()=>{try{let t="";if(Ke.value&&(t+=`# ${N("chart.csv.chartTitle")}: ${Ke.value}
93
+ `),Je.value&&(t+=`# ${N("chart.csv.chartSubtitle")}: ${Je.value}
94
94
  `),t+=`# ${N("chart.csv.generated")}: ${new Date().toLocaleString()}
95
95
 
96
- `,fl.value){t+=`Category,Segment,Value
97
- `,Dn.value.forEach(q=>{q.segments.forEach(T=>{const I=String(q.label||"").replace(/"/g,'""'),$=String(T.label||"").replace(/"/g,'""');t+=`"${I}","${$}",${T.value}
98
- `})});const v=new Blob([t],{type:"text/csv;charset=utf-8;"}),b=URL.createObjectURL(v),x=document.createElement("a");x.href=b,x.download=Jl("csv"),document.body.appendChild(x),x.click(),document.body.removeChild(x),URL.revokeObjectURL(b),wn();return}t+="Category",Z.series.forEach(v=>{const b=v.name.replace(/"/g,'""');t+=',"'+b+'"'}),t+=`
99
- `;const o=Math.max(...Z.series.map(v=>v.data?.length||0));for(let v=0;v<o;v++){let q='"'+(Z.categories[v]||N("chart.fallback.item",{number:v+1})).toString().replace(/"/g,'""')+'"';Z.series.forEach(T=>{const I=T.data&&T.data[v]!==void 0?T.data[v]:"";q+=","+I}),t+=q+`
100
- `}const l=new Blob([t],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(l),m=document.createElement("a");m.href=r,m.download=Jl("csv"),document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(r),wn()}catch(t){console.error("Error downloading CSV:",t)}},eo=t=>{if(typeof t.action=="function"){const o={series:Z.series,categories:Z.categories,markers:ll.value},l={chartX:st.value.chartX,chartY:st.value.chartY,dataX:st.value.mouseDataX,dataY:st.value.mouseDataY,categoryIndex:clampedCategoryIndex||st.value.categoryIndex};t.action(o,l)}wn()},Ho=()=>{Il(),Ze.value.show=!0,Ze.value.categoryIndex=st.value.categoryIndex,Ze.value.fromButton=!1,wn()},to=()=>{Il(),Ze.value.show=!0,Ze.value.categoryIndex=0,Ze.value.fromButton=!0},wo=t=>{if(st.value.show){const o=document.querySelector(".dss-context-menu");o&&!o.contains(t.target)&&(st.value.show=!1)}},xo=t=>{st.value.show&&!t.target.closest(".context-menu")&&(st.value.show=!1)},Ro=t=>{if(!$l.value||!bt.value||fl.value)return;t.preventDefault(),t.stopPropagation(),ne.value.isZooming=!0,Le.value.show=!1,ne.value.zoomTimeout&&clearTimeout(ne.value.zoomTimeout);const l=t.currentTarget.getBoundingClientRect(),r=t.clientX-l.left,m=t.clientY-l.top;if(r<P.value.left-50||r>P.value.right+50||m<P.value.top-50||m>P.value.bottom+100){ne.value.isZooming=!1;return}const v=t.deltaY>0?.9:1.1,b=Math.max(ne.value.minScale,Math.min(ne.value.maxScale,ne.value.scale*v));if(b!==ne.value.scale){const{minX:x,maxX:q}=Bt.value,T=q-x||1,I=T/ne.value.scale,$=x-ne.value.offsetX/P.value.width*T,G=(r-P.value.left)/P.value.width,Ne=$+G*I;ne.value.scale=b;const Ue=T/ne.value.scale,ve=Ne-G*Ue;ne.value.offsetX=-(ve-x)/T*P.value.width,ne.value.scale<=1.01&&(ne.value.scale=1,ne.value.offsetX=0)}ne.value.zoomTimeout=setTimeout(()=>{ne.value.isZooming=!1,ne.value.zoomTimeout=null},300)},ro=t=>{if(!$l.value||!bt.value||ne.value.scale<=1)return;Le.value.show=!1;const l=t.currentTarget.getBoundingClientRect();t.clientX-l.left,t.clientY-l.top,ne.value.isDragging=!0,ne.value.lastMouseX=t.clientX,ne.value.lastMouseY=t.clientY,t.preventDefault()},Eo=()=>{ne.value.isDragging=!1},lo=()=>{!$l.value||!bt.value||(ne.value.scale=1,ne.value.offsetX=0,ne.value.isDragging=!1,ne.value.zoomTimeout&&(clearTimeout(ne.value.zoomTimeout),ne.value.zoomTimeout=null),ne.value.isZooming=!1)},oa=()=>!$l.value||!Qe.value||!bt.value?"default":ne.value.isDragging?"grabbing":ne.value.scale>1?"grab":"dss-crosshair",io=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 l=0;l<t.length-1;l++){const r=t[Math.max(l-1,0)],m=t[l],v=t[l+1],b=t[Math.min(l+2,t.length-1)],x=m.x+(v.x-r.x)/6*sl.value,q=m.y+(v.y-r.y)/6*sl.value,T=v.x-(b.x-m.x)/6*sl.value,I=v.y-(b.y-m.y)/6*sl.value;o+=` C ${x} ${q} ${T} ${I} ${v.x} ${v.y}`}return o},Ml=e.computed(()=>{const o=U.value?.chart?.padding,l=typeof o=="number"?o:null,r=o&&typeof o=="object"?o:null,m=50;let v=m+(Rt.value?30:0)+60;if(vl.value){const $={left:m+40,top:m+40,right:m+40,bottom:m+40};return l!=null?{left:l,top:l,right:l,bottom:l}:r?{left:r.left??$.left,top:r.top??$.top,right:r.right??$.right,bottom:r.bottom??$.bottom}:$}if(xl.value){const $=!fe.value,G=_l.value,Ne=G?sn.value+Fl.value+Math.max(24,yn.value+16):0,Ue=$?12:m;let ve=0;et.value&&(ve+=$?8:15),lt.value&&(ve+=$?6:10);const be=_e();let Ee=Ue+($?4:16)+(G?Ne:0),me=Ue+(G?Ne:0);fe.value&&Fe.value==="left"?Ee+=be.legendWidth||150:fe.value&&Fe.value==="right"&&(me+=be.legendWidth||150);const Oe=xe.value==="semi-radial"?G?Ne:8:G?Ne:$?8:m+80,De=G?14:0,Be=Ue+ve+De,Pe={left:Ee,top:Be,right:me,bottom:Oe};return l!=null?{left:l,top:l,right:l,bottom:l}:r?{left:r.left??Pe.left,top:r.top??Pe.top,right:r.right??Pe.right,bottom:r.bottom??Pe.bottom}:Pe}let b=0;et.value&&(b+=15),lt.value&&(b+=10);const x=_e();let q=m+16+(ct.value?30:0),T=m+(pt.value?30:0);fe.value&&Fe.value==="left"?q+=x.legendWidth||150:fe.value&&Fe.value==="right"&&(T+=x.legendWidth||150),Tn.value&&(T+=44),xe.value==="stepbar"&&(v=rl.value+8);const I={left:q,top:m+b,right:T,bottom:v};return l!=null?{left:l,top:l,right:l,bottom:l}:r?{left:r.left??I.left,top:r.top??I.top,right:r.right??I.right,bottom:r.bottom??I.bottom}:I}),P=e.computed(()=>({left:Ml.value.left,top:Ml.value.top,right:Me.value-Ml.value.right,bottom:mt.value-Ml.value.bottom,width:Me.value-(Ml.value.left+Ml.value.right),height:mt.value-(Ml.value.top+Ml.value.bottom)})),$l=e.computed(()=>["line","area","bar","stepbar"].includes(xe.value)||Jt.value),Xl=e.computed(()=>Jt.value),Zn=e.computed(()=>xe.value==="mini-radial"),xl=e.computed(()=>["radial","semi-radial","mini-radial"].includes(xe.value)),vl=e.computed(()=>xe.value==="spider"),Ot=e.computed(()=>xe.value==="bubble"),fl=e.computed(()=>xe.value==="stepbar");e.watch([A,fl,()=>Z.series],()=>{e.nextTick(dt)},{deep:!0});const hl=e.computed(()=>U.value?.chart?.orientation==="horizontal"&&(xe.value==="bar"||Xl.value)),Sn=t=>{const{minY:o,maxY:l}=Bt.value,r=l-o||1;return P.value.left+(t-o)/r*P.value.width},$n=t=>{const{maxX:o}=Bt.value,l=o+1,m=P.value.height/l;return P.value.top+(t+.5)*m},Wt=e.computed(()=>xl.value?Ml.value.left+(Me.value-Ml.value.left-Ml.value.right)/2:Me.value/2),At=e.computed(()=>vl.value?mt.value/2-40:xl.value?Ml.value.top+(mt.value-Ml.value.top-Ml.value.bottom)/2:mt.value/2),it=e.computed(()=>{if(vl.value){const t=P.value.width-80,o=P.value.height-80;return Math.min(t,o)/2}return Math.min(P.value.width,P.value.height)/2}),kl=e.computed(()=>{const t=U.value,o=t?.plotOptions?.radialBar?.innerRadiusRatio??t?.radialBar?.innerRadiusRatio,l=typeof o=="number"&&o>=0&&o<=1?o:.45;return it.value*l}),Ln=e.computed(()=>{const t=U.value,o=typeof Z.innerSize=="number"?Z.innerSize:t?.innerSize;return typeof o!="number"||o<=-100||!(xl.value||vl.value)?1:1+o/100}),co=e.computed(()=>{const t=Ln.value;if(t===1||t<=0)return;const o=Wt.value,l=At.value;return`translate(${o}, ${l}) scale(${t}) translate(${-o}, ${-l})`}),no=e.ref(0),uo=e.computed(()=>`semi-radial-fill-clip-${Z.chartId}`),Vn=e.computed(()=>xe.value==="semi-radial"),a=e.computed(()=>Vn.value&&Sl.value&&!Hn.value),n=e.computed(()=>Vn.value&&Sl.value&&!Hn.value&&mn.value==="fill"),s=e.computed(()=>{const t=a.value?no.value:1,o=Wt.value,l=At.value,r=kl.value,m=it.value,v=Math.PI,b=Math.PI+t*Math.PI;if(t<=0)return`M ${o} ${l} L ${o} ${l} Z`;const x=o+m*Math.cos(v),q=l+m*Math.sin(v),T=o+m*Math.cos(b),I=l+m*Math.sin(b),$=o+r*Math.cos(b),G=l+r*Math.sin(b),Ne=o+r*Math.cos(v),Ue=l+r*Math.sin(v),ve=t>.5?1:0;return`M ${o} ${l} L ${x} ${q} A ${m} ${m} 0 ${ve} 1 ${T} ${I} L ${$} ${G} A ${r} ${r} 0 ${ve} 1 ${Ne} ${Ue} Z`}),i=e.computed(()=>{if(!(!Vn.value||!a.value)&&!n.value)return`url(#${uo.value})`}),c=t=>{if(!(!n.value||t!==0))return`url(#${uo.value})`},d=e.ref(0),u=e.computed(()=>`radial-reveal-clip-${Z.chartId}`),p=e.computed(()=>xe.value==="radial"),y=e.computed(()=>{const t=p.value?d.value:1,o=Wt.value,l=At.value,r=Math.max(it.value*1.5,Me.value,mt.value);if(t<=0)return`M ${o} ${l} L ${o} ${l} Z`;if(t>=1){const $=o-r,G=o+r;return`M ${$} ${l} A ${r} ${r} 0 0 1 ${G} ${l} A ${r} ${r} 0 0 1 ${$} ${l} Z`}const m=-Math.PI/2,v=m+t*Math.PI*2,b=o+r*Math.cos(m),x=l+r*Math.sin(m),q=o+r*Math.cos(v),T=l+r*Math.sin(v),I=t>=.5?1:0;return`M ${o} ${l} L ${b} ${x} A ${r} ${r} 0 ${I} 1 ${q} ${T} Z`}),C=e.computed(()=>{if(i.value)return i.value;if(p.value)return`url(#${u.value})`});let R=null;const O=()=>{if(!a.value)return;no.value=0;const t=Wl.value,o=performance.now(),l=r=>{const m=r-o,v=Math.min(1,m/t);no.value=va(on.value,v),v<1&&(R=requestAnimationFrame(l))};R=requestAnimationFrame(l)},M=e.computed(()=>U.value?.bubbles?.minSize||8),ue=e.computed(()=>U.value?.bubbles?.maxSize||50),le=e.computed(()=>U.value?.bubbles?.opacity||.7),We=(t,o)=>{const l=[15,20,25,18,22],r=l[t%l.length]||20,m=1+Math.sin(o*.5)*.2;return Math.max(5,r*m)},$e=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.opacity="1")},gt=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.display="none")},Ut=e.computed(()=>Z.series),qt=e.computed(()=>Z.series.filter((t,o)=>!F.value.has(o))),nl=t=>{if(!t)return"primary";const o=t.yAxis??t.axis??t.yAxisId;return o==="secondary"||o==="right"||o===1?"secondary":"primary"},gl=t=>t?typeof t.strokeDasharray=="string"?t.strokeDasharray:Array.isArray(t.strokeDasharray)?t.strokeDasharray.join(","):t.dotted===!0?"4,4":null:null,It=t=>t?t.old===!0||t.comparison===!0||t.dotted===!0:!1,ol=e.computed(()=>{const o=U.value?.spider?.comparison||{};return{fillOpacity:typeof o.fillOpacity=="number"?o.fillOpacity:0,strokeDasharray:o.strokeDasharray||"6,4",usePrimaryColor:o.usePrimaryColor!==!1,bubbleSize:typeof o.bubbleSize=="number"?o.bubbleSize:0}}),rn=(t,o)=>typeof t?.bubbles?.size=="number"?t.bubbles.size:typeof t?.bubbleSize=="number"?t.bubbleSize:o?ol.value.bubbleSize:ce.value,kn=(t,o)=>It(t)&&ol.value.usePrimaryColor?al(0):al(o),Ol=(t,o)=>vl.value&&It(t)?kn(t,o):al(o),So=e.computed(()=>qt.value.filter(t=>nl(t)==="primary")),Vo=e.computed(()=>qt.value.filter(t=>nl(t)==="secondary")),Tn=e.computed(()=>!hl.value&&!!ht.value&&Vo.value.length>0),No=(t,o=0)=>{const l=Number(t);return Number.isFinite(l)?l:o},ya=(t,o,l)=>{if(!Array.isArray(t))return[];const r=t.map((m,v)=>{const b=m&&typeof m=="object"&&!Array.isArray(m),x=No(b?m.value:m,0);return x<=0?null:{key:`${l}-${v}-${b&&m.label||v}`,label:b?m.label||o?.name||`Segment ${v+1}`:o?.name||`Segment ${v+1}`,value:x,color:b?m.color||al(v):al(l),marker:b?m.marker:null,isRemainder:!1}}).filter(Boolean);return ae.value==="asc"?r.sort((m,v)=>m.value-v.value):ae.value==="desc"?r.sort((m,v)=>v.value-m.value):r},Fo=(t,o,l,r)=>{const m=t&&typeof t=="object"&&!Array.isArray(t),v=m?t.segments:Array.isArray(t)?t:[{label:l?.name,value:t,color:al(r)}],b=ya(v,l,r),x=b.reduce(($,G)=>$+G.value,0),q=No(m?t.totalValue??t.total??l?.totalValue??l?.total:l?.totalValue??l?.total,se.value),T=Math.max(q,x,1);je.value&&T>x&&b.push({key:`${r}-${o}-remainder`,label:St.value,value:T-x,color:ut.value,marker:null,isRemainder:!0});const I=b.filter($=>!$.isRemainder).reduce(($,G)=>!$||G.value>$.value?G:$,null);return{key:`${r}-${o}`,label:m?t.label||t.name||Z.categories?.[o]||N("chart.fallback.item",{number:o+1}):Z.categories?.[o]||N("chart.fallback.item",{number:o+1}),axisLabel:m?t.xLabel??t.label??t.name??Z.categories?.[o]??N("chart.fallback.item",{number:o+1}):Z.categories?.[o]||N("chart.fallback.item",{number:o+1}),yLabel:m?t.yLabel??null:null,totalValue:T,usedValue:x,segments:b,maxSegmentKey:I?.key||null,seriesName:l?.name||"",seriesIndex:r}},Dn=e.computed(()=>{if(!fl.value)return[];const t=[];return Ut.value.forEach((o,l)=>{F.value.has(l)||!Array.isArray(o?.data)||o.data.forEach(r=>{const m=Fo(r,t.length,o,l);m.segments.length>0&&t.push(m)})}),t}),Al="auto",cn=(t,o,l,r=0,m=100)=>{let v=1/0,b=-1/0;if(t.forEach(T=>{T?.data?.length&&T.data.forEach(I=>{typeof I=="number"&&Number.isFinite(I)&&(v=Math.min(v,I),b=Math.max(b,I))})}),v===1/0)return{minY:r,maxY:m};let x;if(o===Al){const T=b-v,I=T>0?T*.1:1;x=Math.max(0,v-I)}else if(typeof o=="number")x=o;else{const T=b-v,I=T>0?T*.1:1;x=Math.max(0,v-I)}let q;if(l===Al){const T=b-v,I=T>0?T*.1:2;q=b+I}else if(typeof l=="number")q=l;else{const T=b-v,I=T>0?T*.1:2;q=b+I}return{minY:x,maxY:q}},Bt=e.computed(()=>{if(Ot.value)return Wa();if(fl.value)return en();if(!qt.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=0;qt.value.forEach(l=>{l.data&&l.data.length&&(t=Math.max(t,l.data.length-1))}),Z.categories.length>0&&(t=Math.max(t,Z.categories.length-1));const o=cn(So.value.length?So.value:qt.value,Xt.value,Ct.value);return{minX:0,maxX:t,minY:o.minY,maxY:o.maxY}}),en=()=>{const t=Dn.value,o=t.reduce((v,b)=>Math.max(v,b.totalValue),se.value),l=typeof Xt.value=="number"?Xt.value:0,r=typeof Ct.value=="number"?Ct.value:o,m=Math.max(r,l+1);return{minX:0,maxX:Math.max(t.length-1,0),minY:l,maxY:m}},aa=e.computed(()=>Tn.value?cn(Vo.value,Pt.value,pe.value,Bt.value.minY,Bt.value.maxY):{minY:Bt.value.minY,maxY:Bt.value.maxY}),Wa=()=>{if(!qt.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,o=-1/0,l=1/0,r=-1/0,m=1/0,v=-1/0,b=!1;if(qt.value.forEach((Ne,Ue)=>{Ne?.data?.length&&Ne.data.forEach((ve,be)=>{let Ee,me,Je;if(typeof ve=="object"&&ve!==null&&!Array.isArray(ve))Ee=typeof ve.x=="number"?ve.x:be,me=typeof ve.y=="number"?ve.y:0,Je=typeof ve.size=="number"?ve.size:20;else if(Array.isArray(ve)&&ve.length>=3)Ee=typeof ve[0]=="number"?ve[0]:be,me=typeof ve[1]=="number"?ve[1]:0,Je=typeof ve[2]=="number"?ve[2]:20;else if(typeof ve=="number")Ee=be,me=ve,Je=We(Ue,be);else return;isFinite(Ee)&&isFinite(me)&&isFinite(Je)&&(t=Math.min(t,Ee),o=Math.max(o,Ee),l=Math.min(l,me),r=Math.max(r,me),m=Math.min(m,Je),v=Math.max(v,Je),b=!0)})}),!b)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===o&&(t=Math.min(t,0),o=Math.max(o,Z.categories?.length-1||8)),l===r&&(l=Math.max(0,l-10),r=l+20);const x=o-t,q=r-l;let T,I,$,G;return H.value!==null?T=H.value:T=t-x*.1,Y.value!==null?I=Y.value:I=o+x*.1,Xt.value!==null&&typeof Xt.value=="number"?$=Xt.value:$=Math.max(0,l-q*.1),Ct.value!==null&&typeof Ct.value=="number"?G=Ct.value:G=r+q*.1,{minX:T,maxX:I,minY:$,maxY:G,minSize:m,maxSize:v}},Cl=t=>{if(Ot.value){const{minX:x,maxX:q}=Bt.value,T=q-x||1;return P.value.left+(t-x)/T*P.value.width}const{minX:o,maxX:l}=Bt.value,r=l-o;if(l===0||r===0)return P.value.left+P.value.width/2;const m=r/ne.value.scale,v=o-ne.value.offsetX/P.value.width*r,b=(t-v)/m;return P.value.left+b*P.value.width},Un=t=>{const{minY:o,maxY:l}=Bt.value,r=l-o||1;return P.value.bottom-(t-o)/r*P.value.height},ka=t=>{const{minY:o,maxY:l}=aa.value,r=l-o||1;return P.value.bottom-(t-o)/r*P.value.height},Cn=(t,o)=>Tn.value&&nl(t)==="secondary"?ka(o):Un(o),qa=t=>{if(!Ot.value)return ce.value||4;const{maxSize:o}=Bt.value,l=Math.max(1,o),r=Math.min(1,Math.max(0,t/l));return M.value+r*(ue.value-M.value)},mo=(t,o=12,l="Arial, sans-serif")=>{if(typeof t!="string"||!t)return 0;if(typeof document>"u")return t.length*(o*.62);mo.canvas||(mo.canvas=document.createElement("canvas"));const r=mo.canvas.getContext("2d");return r?(r.font=`${o}px ${l}`,r.measureText(t).width):t.length*(o*.62)},Ca=(t,o,l=12)=>{if(typeof t!="string"||typeof o!="number"||o<=0||mo(t,l)<=o)return t;const r="..";if(mo(r,l)>=o)return r;let v=t.length;for(;v>0;){const b=`${t.slice(0,v)}${r}`;if(mo(b,l)<=o)return b;v-=1}return r},Za=e.computed(()=>ra.value.map(t=>({y:t.y}))),ba=e.computed(()=>!fl.value||!Lt.value?[]:ra.value.map(t=>({y:t.y}))),sa=e.computed(()=>{if(Ot.value)return Ua();if(fl.value)return[];if(xe.value==="bar"){if(hl.value){const Be=[],{minY:Pe,maxY:$t}=Bt.value,Zt=5,tn=$t-Pe||1;for(let bl=0;bl<=Zt;bl++){const ln=Pe+tn*(bl/Zt),Wo=Sn(ln);Be.push({x:Wo,y:P.value.bottom+20,text:Vl(Math.round(ln))})}return Be}const be=[],{maxX:Ee}=Bt.value,me=Ee+1,Je=5,De=(P.value.width-Je*2)/me;for(let Be=0;Be<=Ee;Be++){const Pe=P.value.left+Je+(Be+.5)*De;be.push({x:Pe,y:P.value.bottom+20,text:Ca(Z.categories[Be]||N("chart.fallback.item",{number:Be+1}),Math.max(De-8,24))})}return be}const t=[],{minX:o,maxX:l}=Bt.value,r=H.value!==null?H.value:o,m=Y.value!==null?Y.value:l,v=m-r||1,b=v/ne.value.scale,x=r-ne.value.offsetX/P.value.width*v,q=x+b,T=Math.max(0,Math.floor(x-2)),I=Math.min(m,Math.ceil(q+2)),$=I-T,G=P.value.width,Ue=Math.floor(G/60);let ve=1;$>Ue&&(ve=Math.ceil($/Ue));for(let be=T;be<=I;be+=ve)if(be>=0&&be<=m){const Ee=Cl(be);Ee>=P.value.left-100&&Ee<=P.value.right+100&&t.push({x:Ee,y:P.value.bottom+20,text:Z.categories[be]||`Item ${be+1}`})}return t}),Ua=()=>{const t=[],{minX:o,maxX:l}=Bt.value,r=l-o||1,m=Math.min(8,Math.max(4,Math.floor(P.value.width/80)));for(let v=0;v<=m;v++){const b=o+r*v/m,x=Cl(b);if(x>=P.value.left-10&&x<=P.value.right+10){const q=Math.round(b),T=Z.categories?.[q];t.push({x,y:P.value.bottom+20,text:T||(Number.isInteger(b)?b.toString():b.toFixed(1))})}}return t},ra=e.computed(()=>{if(hl.value){const m=[],{maxX:v}=Bt.value;for(let b=0;b<=v;b++)m.push({x:P.value.left-10,y:$n(b),text:Ca(Z.categories[b]||`Item ${b+1}`,Math.max(P.value.left-28,40))});return m}const t=[],{minY:o,maxY:l}=Bt.value,r=5;for(let m=0;m<=r;m++){const v=o+(l-o)*(m/r),b=Math.round(v);t.push({x:P.value.left-10,y:Un(v),text:Vl(b)})}return t}),Ya=e.computed(()=>{if(!Tn.value||hl.value)return[];const t=[],{minY:o,maxY:l}=aa.value,r=5;for(let m=0;m<=r;m++){const v=o+(l-o)*(m/r),b=Math.round(v);t.push({x:P.value.right+10,y:ka(v),text:Vl(b)})}return t}),al=t=>{const o=V.value;if(!o||o.length===0){const l=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return l[t%l.length]}return o[t%o.length]},Xa=t=>{if(!t||typeof t!="string")return"#3a3a3a";const o=t.trim();let l=0,r=0,m=0;const v=o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(v)l=Number(v[1])/255,r=Number(v[2])/255,m=Number(v[3])/255;else{const x=o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(x)l=Number(x[1])/255,r=Number(x[2])/255,m=Number(x[3])/255;else{const q=o.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(q){let T=q[1];T.length===3&&(T=T[0]+T[0]+T[1]+T[1]+T[2]+T[2]),l=parseInt(T.slice(0,2),16)/255,r=parseInt(T.slice(2,4),16)/255,m=parseInt(T.slice(4,6),16)/255}else if(typeof document<"u"){const T=document.createElement("span");T.style.color=o,T.style.display="none",document.body.appendChild(T);const I=getComputedStyle(T).color;document.body.removeChild(T);const $=I.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if($)l=Number($[1])/255,r=Number($[2])/255,m=Number($[3])/255;else return"#3a3a3a"}else return"#3a3a3a"}}return .2126*l+.7152*r+.0722*m>.5?"#3a3a3a":"#fafafa"},ia=t=>{if(!t||typeof t!="string")return t;const o=t.trim(),l=o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(l){const v=Math.max(0,Math.floor(Number(l[1])*.65)),b=Math.max(0,Math.floor(Number(l[2])*.65)),x=Math.max(0,Math.floor(Number(l[3])*.65));return`rgb(${v}, ${b}, ${x})`}const r=o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(r){const v=Math.max(0,Math.floor(Number(r[1])*.65)),b=Math.max(0,Math.floor(Number(r[2])*.65)),x=Math.max(0,Math.floor(Number(r[3])*.65));return`rgba(${v}, ${b}, ${x}, ${r[4]})`}const m=o.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(m){let v=m[1];v.length===3&&(v=v[0]+v[0]+v[1]+v[1]+v[2]+v[2]);const b=Math.max(0,Math.min(255,Math.floor(parseInt(v.slice(0,2),16)*.65))),x=Math.max(0,Math.min(255,Math.floor(parseInt(v.slice(2,4),16)*.65))),q=Math.max(0,Math.min(255,Math.floor(parseInt(v.slice(4,6),16)*.65)));return`#${[b,x,q].map(T=>T.toString(16).padStart(2,"0")).join("")}`}return o},ca=(t,o)=>{const r=U.value?.stroke?.color;return r==null?ia(o):typeof r=="string"?r:Array.isArray(r)&&r.length?r[t%r.length]??ia(o):ia(o)},ua=t=>{let o=0;for(let l=1;l<t.length;l++){const r=t[l].x-t[l-1].x,m=t[l].y-t[l-1].y;o+=Math.sqrt(r*r+m*m)}return o},wa=e.computed(()=>xe.value==="line"||Xl.value?(Xl.value?Z.series.filter(o=>(o.type||xe.value)==="line"):Ut.value).map((o,l)=>{const r=Z.series.findIndex($=>$===o),m=[];let v=[];o.data.forEach(($,G)=>{$==null?v.length>0&&(m.push([...v]),v=[]):v.push({x:hl.value?Sn($):Cl(G),y:hl.value?$n(G):Cn(o,$),index:G})}),v.length>0&&m.push(v);let b="";m.forEach($=>{if($.length>0){let G="";Vt.value?G=io($):G=`M ${$[0].x} ${$[0].y}`+$.slice(1).map(Ne=>` L ${Ne.x} ${Ne.y}`).join(""),b+=(b?" ":"")+G}});const x=m.reduce(($,G)=>$+ua(G),0),q=F.value.has(r),T=z.value===r,I=z.value!==null&&z.value!==r;return{path:b,color:al(r),strokeDasharray:gl(o),pathLength:x,seriesIndex:r,animationDelay:l*il.value,isHighlighted:T,isDimmed:I,isHidden:q}}):[]),xa=e.computed(()=>{if(!(xe.value==="line"||Xl.value))return[];const t=Xl.value?Z.series.filter(l=>(l.type||xe.value)==="line"):Ut.value,o=[];return t.forEach((l,r)=>{const m=Z.series.findIndex(v=>v===l);for(let v=0;v<l.data.length-1;v++){const b=l.data[v];if(b!=null){let x=-1,q=0;for(let T=v+1;T<l.data.length;T++){const I=l.data[T];if(I==null)q++;else{x=T;break}}if(q>0&&x!==-1){const T=l.data[x],I=hl.value?Sn(b):Cl(v),$=hl.value?$n(v):Cn(l,b),G=hl.value?Sn(T):Cl(x),Ne=hl.value?$n(x):Cn(l,T),Ue=F.value.has(m),ve=z.value===m,be=z.value!==null&&z.value!==m;o.push({path:`M ${I} ${$} L ${G} ${Ne}`,color:al(m),seriesIndex:m,animationDelay:r*il.value,isHighlighted:ve,isDimmed:be,isHidden:Ue,gapSize:q}),v=x-1}}}}),o}),ja=e.computed(()=>xe.value==="line"||Xl.value?!Sl.value||Hn.value||zt.value.hasAnimated?[]:(Xl.value?Z.series.filter(o=>(o.type||xe.value)==="line"):Ut.value).map((o,l)=>{const r=Z.series.findIndex(q=>q===o);let m="",v=null;o.data.forEach((q,T)=>{if(q!=null){const I={x:hl.value?Sn(q):Cl(T),y:hl.value?$n(T):Cn(o,q)};v===null?m+=`M ${I.x} ${I.y}`:m+=` L ${I.x} ${I.y}`,v=I}else if(v!==null){const I=o.data.findIndex(($,G)=>G>T&&$!==null&&$!==void 0);if(I!==-1){const $={x:hl.value?Sn(o.data[I]):Cl(I),y:hl.value?$n(I):Cn(o,o.data[I])};m+=` L ${$.x} ${$.y}`,v=$}}});const b=o.data.map((q,T)=>q==null?null:{x:hl.value?Sn(q):Cl(T),y:hl.value?$n(T):Cn(o,q)}).filter(q=>q!==null),x=ua(b);return{path:m,pathLength:x,color:al(r),strokeDasharray:gl(o),animationDelay:l*il.value,seriesIndex:r}}):[]),Ka=e.computed(()=>{if(xe.value!=="line")return[];const t=[];return Ut.value.forEach((o,l)=>{const r=z.value===l,m=z.value!==null&&z.value!==l,v=F.value.has(l);o.data.forEach((b,x)=>{b!=null&&t.push({x:Cl(x),y:Cn(o,b),color:al(l),value:b,label:Z.categories[x]||x.toString(),seriesName:o.name,categoryIndex:x,dataIndex:x,animationDelay:(l*o.data.length+x)*(il.value/8),isHighlighted:r,isDimmed:m,isHidden:v})})}),t}),Ga=e.computed(()=>{if(!Xl.value)return[];const t=[];return Z.series.filter(l=>(l.type||xe.value)==="line").forEach((l,r)=>{const m=Z.series.findIndex(q=>q===l),v=z.value===m,b=z.value!==null&&z.value!==m,x=F.value.has(m);l.data.forEach((q,T)=>{q!=null&&t.push({x:Cl(T),y:Cn(l,q),color:al(m),value:q,label:Z.categories[T]||T.toString(),seriesName:l.name,categoryIndex:T,dataIndex:T,animationDelay:(r*l.data.length+T)*(il.value/8),isHighlighted:v,isDimmed:b,isHidden:x})})}),t}),Io=e.computed(()=>{if(!Ot.value)return[];const t=[];return Ut.value.forEach((o,l)=>{if(!o?.data?.length)return;const r=z.value,m=r!==null&&r===l,v=r!==null&&r!==l,b=F.value.has(l);o.data.forEach((x,q)=>{let T,I,$,G,Ne;if(typeof x=="object"&&x!==null&&!Array.isArray(x))T=typeof x.x=="number"?x.x:q,I=typeof x.y=="number"?x.y:0,$=typeof x.size=="number"?x.size:20,G=x.label||Z.categories?.[q]||`Point ${q+1}`,Ne=x.image||x.imageUrl;else if(Array.isArray(x)&&x.length>=3)T=typeof x[0]=="number"?x[0]:q,I=typeof x[1]=="number"?x[1]:0,$=typeof x[2]=="number"?x[2]:20,G=x[3]||Z.categories?.[q]||`Point ${q+1}`,Ne=x[4];else if(typeof x=="number")T=q,I=x,$=We(l,q),G=Z.categories?.[q]||`Point ${q+1}`;else return;!isFinite(T)||!isFinite(I)||!isFinite($)||t.push({x:Cl(T),y:Un(I),radius:qa($),originalX:T,originalY:I,originalSize:$,color:al(l),seriesName:o.name||`Series ${l+1}`,label:G,imageUrl:Ne,seriesIndex:l,dataIndex:q,categoryIndex:Math.round(T),isHighlighted:m,isDimmed:v,isHidden:b,opacity:le.value})})}),t}),da=e.computed(()=>xe.value!=="area"?[]:Ut.value.map((t,o)=>{const l=[];let r=[];if(t.data.forEach(($,G)=>{$==null?r.length>0&&(l.push([...r]),r=[]):r.push({x:Cl(G),y:Cn(t,$),index:G})}),r.length>0&&l.push(r),l.length===0)return{linePath:"",areaPath:"",color:al(o),isHidden:F.value.has(o)};const m=P.value.bottom+1;let v="",b="";l.forEach(($,G)=>{if($.length===0)return;let Ne=`M ${$[0].x} ${$[0].y}`;Vt.value&&$.length>1?Ne=io($):$.slice(1).forEach(ve=>{Ne+=` L ${ve.x} ${ve.y}`}),v+=(v?" ":"")+Ne;let Ue=`M ${$[0].x} ${m}`;if(Ue+=` L ${$[0].x} ${$[0].y}`,Vt.value&&$.length>1){const ve=io($),be=ve.substring(ve.indexOf("C")||ve.indexOf("Q")||ve.indexOf("L"));be?Ue+=" "+be:$.slice(1).forEach(Ee=>{Ue+=` L ${Ee.x} ${Ee.y}`})}else $.slice(1).forEach(ve=>{Ue+=` L ${ve.x} ${ve.y}`});Ue+=` L ${$[$.length-1].x} ${m} Z`,b+=(b?" ":"")+Ue});const x=z.value===o,q=z.value!==null&&z.value!==o,T=F.value.has(o),I=l.reduce(($,G)=>$+ua(G),0);return{linePath:v,areaPath:b,color:al(o),pathLength:I,isHighlighted:x,isDimmed:q,isHidden:T}})),Ea=e.computed(()=>{if(!(["bar"].includes(xe.value)||Xl.value))return[];const t=[],{maxX:o}=Bt.value,l=Xl.value?Z.series.filter(m=>(m.type||xe.value)==="bar"):Ut.value,r=l.length;if(hl.value){const m=o+1,b=P.value.height/m,x=b*(2/3),q=Math.min(4,x/r*.15),T=x-(r-1)*q,I=Math.max(4,T/r);l.forEach(($,G)=>{const Ne=Z.series.findIndex(Ee=>Ee===$),Ue=z.value===Ne,ve=z.value!==null&&z.value!==Ne,be=F.value.has(Ne);$.data.forEach((Ee,me)=>{if(Ee==null||typeof Ee!="number"||!isFinite(Ee))return;const De=P.value.top+(me+.5)*b-x/2+G*(I+q),Be=P.value.left,Pe=Math.abs(Sn(Ee)-P.value.left);let $t="";if(Vt.value&&Pe>0){const Zt=Math.min(D.value,I/2,Pe/2);$t=[`M ${Be} ${De}`,`L ${Be+Pe-Zt} ${De}`,`Q ${Be+Pe} ${De} ${Be+Pe} ${De+Zt}`,`L ${Be+Pe} ${De+I-Zt}`,`Q ${Be+Pe} ${De+I} ${Be+Pe-Zt} ${De+I}`,`L ${Be} ${De+I}`,"Z"].join(" ")}t.push({x:Be,y:De,width:Pe,height:I,color:al(r===1?me:Ne),value:Ee,label:Z.categories[me]||me.toString(),seriesName:$.name,animationDelay:(G*l.length+me)*(il.value/4),isHighlighted:Ue,isDimmed:ve,isHidden:be,barPath:$t,isSmooth:Vt.value&&Pe>0})})})}else{const m=o+1,b=P.value.width/m,x=b*.8,q=x/r,T=q*.05,I=q-T;l.forEach(($,G)=>{const Ne=Z.series.findIndex(Ee=>Ee===$),Ue=z.value===Ne,ve=z.value!==null&&z.value!==Ne,be=F.value.has(Ne);$.data.forEach((Ee,me)=>{if(Ee==null||typeof Ee!="number"||!isFinite(Ee))return;const De=P.value.left+(me+.5)*b-x/2+G*q+T/2,Be=Un(Math.max(0,Ee)),Pe=Math.abs(Un(0)-Un(Ee));let $t="";if(Vt.value&&Pe>0){const Zt=Math.min(D.value,I/2,Pe/2);$t=[`M ${De} ${Be+Pe}`,`L ${De} ${Be+Zt}`,`Q ${De} ${Be} ${De+Zt} ${Be}`,`L ${De+I-Zt} ${Be}`,`Q ${De+I} ${Be} ${De+I} ${Be+Zt}`,`L ${De+I} ${Be+Pe}`,"Z"].join(" ")}t.push({x:De,y:Be,width:I,height:Pe,color:al(r===1?me:Ne),value:Ee,label:Z.categories[me]||me.toString(),seriesName:$.name,animationDelay:(G*l.length+me)*(il.value/4),isHighlighted:Ue,isDimmed:ve,isHidden:be,barPath:$t,isSmooth:Vt.value&&Pe>0})})})}return t}),An=e.computed(()=>{if(!xl.value)return[];const t=Ut.value.map((b,x)=>({series:b,originalIndex:x})).filter(({originalIndex:b})=>!F.value.has(b));if(t.length===0)return[];let o=xe.value==="semi-radial"?Math.PI:-Math.PI/2;const l=xe.value==="semi-radial"?Math.PI:Math.PI*2,r=[],m=(b,x,q,T,I,$)=>{const G=b+(x-b)/2,Ne=x-b,Ue=Wt.value+Math.cos(b)*kl.value,ve=At.value+Math.sin(b)*kl.value,be=Wt.value+Math.cos(x)*kl.value,Ee=At.value+Math.sin(x)*kl.value,me=Wt.value+Math.cos(x)*it.value,Je=At.value+Math.sin(x)*it.value,Oe=Wt.value+Math.cos(b)*it.value,De=At.value+Math.sin(b)*it.value,Be=Ne>Math.PI?1:0,Pe=[`M ${Ue} ${ve}`,`A ${kl.value} ${kl.value} 0 ${Be} 1 ${be} ${Ee}`,`L ${me} ${Je}`,`A ${it.value} ${it.value} 0 ${Be} 0 ${Oe} ${De}`,"Z"].join(" "),$t=$||al(q);return{path:Pe,color:$t,strokeWidth:te.value,strokeColor:ca(r.length,$t),value:I,seriesName:T,opacity:.8,isHighlighted:z.value===q,isDimmed:z.value!==null&&z.value!==q,isHidden:!1,startAngle:b,endAngle:x,midAngle:G}};if(Zn.value){const{series:b,originalIndex:x}=t[0],q=Number(b?.data?.[0]??0),T=Number.isFinite(q)?Math.min(Math.max(q,0),100):0,I=U.value,$=Math.min(Math.max(Number(I?.miniRadial?.minVisiblePercent??1),0),100),Ne=(T<=0?$:T)/100*l,Ue=Number(I?.miniRadial?.thresholds?.low??33),ve=Number(I?.miniRadial?.thresholds?.medium??66),be=I?.miniRadial?.colors?.low||"#E53E3E",Ee=I?.miniRadial?.colors?.medium||"#ED8936",me=I?.miniRadial?.colors?.high||"#38A169",Je=T<=Ue?be:T<=ve?Ee:me,Oe=I?.miniRadial?.trackColor||"#E5E7EB",De=b?.name||"Score";return r.push(m(o,o+l-.001,x+1,"Track",100,Oe)),r.push(m(o,o+Ne,x,De,T,Je)),r}if(t.length===1){const{series:b,originalIndex:x}=t[0],q=b.data[0]||0,T=o,I=o+l-.001,$=T+l/2,G=Wt.value+Math.cos(T)*kl.value,Ne=At.value+Math.sin(T)*kl.value,Ue=Wt.value+Math.cos(I)*kl.value,ve=At.value+Math.sin(I)*kl.value,be=Wt.value+Math.cos(I)*it.value,Ee=At.value+Math.sin(I)*it.value,me=Wt.value+Math.cos(T)*it.value,Je=At.value+Math.sin(T)*it.value,Oe=1,De=[`M ${G} ${Ne}`,`A ${kl.value} ${kl.value} 0 ${Oe} 1 ${Ue} ${ve}`,`L ${be} ${Ee}`,`A ${it.value} ${it.value} 0 ${Oe} 0 ${me} ${Je}`,"Z"].join(" "),Be=al(x);return r.push({path:De,color:Be,strokeWidth:te.value,strokeColor:ca(0,Be),value:q,seriesName:b.name,opacity:.8,isHighlighted:z.value===x,isDimmed:!1,isHidden:!1,startAngle:T,endAngle:I,midAngle:$}),r}if(n.value&&t.length===2){const b=t[0],x=t[1],q=Math.min(100,Math.max(0,b.series.data[0]||0)),T=q/100*l;return r.push(m(o,o+T,b.originalIndex,b.series.name,q)),r.push(m(o,o+l,x.originalIndex,x.series.name,100)),r}const v=t.reduce((b,{series:x})=>b+(x.data[0]||0),0);return v===0?[]:(t.forEach(({series:b,originalIndex:x})=>{const q=b.data[0]||0,T=q/v*l,I=o,$=o+T,G=I+T/2,Ne=Wt.value+Math.cos(I)*kl.value,Ue=At.value+Math.sin(I)*kl.value,ve=Wt.value+Math.cos($)*kl.value,be=At.value+Math.sin($)*kl.value,Ee=Wt.value+Math.cos($)*it.value,me=At.value+Math.sin($)*it.value,Je=Wt.value+Math.cos(I)*it.value,Oe=At.value+Math.sin(I)*it.value,De=T>Math.PI?1:0,Be=[`M ${Ne} ${Ue}`,`A ${kl.value} ${kl.value} 0 ${De} 1 ${ve} ${be}`,`L ${Ee} ${me}`,`A ${it.value} ${it.value} 0 ${De} 0 ${Je} ${Oe}`,"Z"].join(" "),Pe=al(x);r.push({path:Be,color:Pe,strokeWidth:te.value,strokeColor:ca(r.length,Pe),value:q,seriesName:b.name,opacity:.8,isHighlighted:z.value===x,isDimmed:z.value!==null&&z.value!==x,isHidden:!1,startAngle:I,endAngle:$,midAngle:G}),o=$}),r)}),Qa=e.computed(()=>{const t=An.value;return n.value&&t.length>=2?[{segment:t[1],originalIndex:1},{segment:t[0],originalIndex:0}]:t.map((o,l)=>({segment:o,originalIndex:l}))}),Ja=e.computed(()=>{if(!_l.value||!xl.value)return[];const t=yn.value,o=sn.value,l=Fl.value,r=ul.value,m=15,v=t*1.3,b=.55,x=($,G)=>{const Ne=Wt.value+Math.cos($.midAngle)*it.value,Ue=At.value+Math.sin($.midAngle)*it.value,ve=Wt.value+Math.cos($.midAngle)*(it.value+o),be=At.value+Math.sin($.midAngle)*(it.value+o),me=ve+l*(G?1:-1),Je=G?ve+m:ve-m,Oe=be-r,De=`${$.seriesName}: ${Vl($.value)}`,Be=De.length*t*b;return{pointerStartX:Ne,pointerStartY:Ue,pointerEndX:ve,pointerEndY:be,horizontalEndX:me,horizontalEndY:be,textX:Je,textY:Oe,text:De,textWidth:Be,textAnchor:G?"start":"end",isRightSide:G,pointerLineLength:Math.hypot(ve-Ne,be-Ue),horizontalLineLength:Math.hypot(me-ve,0)}},q=($,G)=>{const Ne=Math.abs($.textY-G.textY)<v,Ue=$.isRightSide?$.textX:$.textX-$.textWidth,ve=$.isRightSide?$.textX+$.textWidth:$.textX,be=G.isRightSide?G.textX:G.textX-G.textWidth,Ee=G.isRightSide?G.textX+G.textWidth:G.textX,me=Ue<Ee&&be<ve;return Ne&&me},T=An.value.filter($=>!$.isHidden),I=[];for(let $=0;$<T.length;$++){const G=T[$];let Ne=Math.cos(G.midAngle)>=0;if($>0){const ve=I[$-1],be=x(G,Ne);q(ve,be)&&(Ne=!Ne)}const Ue=x(G,Ne);I.push({...Ue,color:G.color,isHighlighted:G.isHighlighted,isDimmed:G.isDimmed})}return I}),es=t=>{if(!t||t.isHidden)return 0;const o=t.opacity||le.value||.7;return z.value===null||z.value===void 0?o:z.value!==null?t.seriesIndex===z.value?Math.min(1,o+.1):Math.max(.5,o*.8):o},ts=t=>{if(!t||t.isHidden)return 0;const o=t.radius>20?.9:.8;return z.value!==null?t.seriesIndex===z.value?Math.min(1,o+.1):o*.7:o},Sa=(t,o)=>{if(t)try{if(z.value===t.seriesIndex?z.value=null:z.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const l=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:o,chartId:Z.chartId}});window.dispatchEvent(l)}}catch(l){console.error("Error in onBubbleClick:",l)}},ls=(t,o)=>{const l=[`dss-bubble-fallback-${o}`];return t.isHighlighted&&l.push("dss-bubble-highlighted"),t.isDimmed&&l.push("dss-bubble-dimmed"),t.isHidden&&l.push("dss-bubble-hidden"),l.push(`dss-bubble-series-${t.seriesIndex}`),l.join(" ")},Va=(t,o)=>{if(!t||(o.stopPropagation(),Po.value=!0,z.value=t.seriesIndex,Le.value.show=!1,!Et.value))return;const l=o.target.closest(".dss-custom-chart-container");if(!l)return;const r=l.getBoundingClientRect();let m=o.clientX-r.left+10,v=o.clientY-r.top-10;const b=200,x=120;m+b>Me.value&&(m=o.clientX-r.left-b-10),v+x>r.height&&(v=o.clientY-r.top-x-10),m<0&&(m=10),v<0&&(v=10);const q=f.value,T=g.value,I=q.map($=>{const G=T[$]||$,Ne=Na($,t);return Ne?{seriesName:t.seriesName,label:t.label,value:`${G}: ${Ne}`,color:t.color}:null}).filter(Boolean);Te.value={show:!0,x:m,y:v,title:t.label||t.seriesName||"",value:"",bubbleData:I,categoryIndex:void 0,spiderAreas:[]}},Na=(t,o)=>{let l;switch(t){case"x":l=o.originalX;break;case"y":l=o.originalY;break;case"size":l=o.originalSize;break;case"label":l=o.label;break;case"seriesName":l=o.seriesName;break;default:l=o[t]||""}const r=S.value[t];if(typeof r=="function")return r(l,o);if(typeof l=="number"){const m=l.toFixed(1);return wt.value?m+wt.value:m}return l?.toString()||""},ns=()=>{if(!Ot.value||!Le.value.data||Le.value.data.length===0)return"Bubbles";const t=[],o=new Set;return Le.value.data.forEach(l=>{if(l.seriesName&&l.label){const r=`${l.seriesName} - ${l.label}`;o.has(r)||(t.push(r),o.add(r))}else l.seriesName&&(o.has(l.seriesName)||(t.push(l.seriesName),o.add(l.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},Ba=(t,o)=>{t&&(Po.value=!1,z.value=null,Te.value.show=!1,Te.value.bubbleData=[])},os=(t,o)=>{const l=o.target.closest(".dss-custom-chart-container");if(!l)return;const r=l.getBoundingClientRect(),m=so(t.categoryIndex),v=t.description||t.comment||"";let b=o.clientX-r.left+15,x=o.clientY-r.top-10;const q=200,T=v?80:50;b+q>Me.value&&(b=o.clientX-r.left-q-15),x+T>mt.value&&(x=o.clientY-r.top-T-10),b<0&&(b=10),x<0&&(x=10),Ft.value={show:!0,x:b,y:x,categoryValue:m,description:v}},as=()=>{Ft.value.show=!1},po=e.computed(()=>Z.categories.length||Math.max(...qt.value.map(t=>t.data.length))),ss=e.computed(()=>{let t=0;return qt.value.forEach(o=>{o.data.forEach(l=>{typeof l=="number"&&(t=Math.max(t,l))})}),t||100}),_a=e.computed(()=>{const t=[],o=po.value;for(let l=0;l<o;l++){const r=l*2*Math.PI/o-Math.PI/2,m=Wt.value+Math.cos(r)*it.value,v=At.value+Math.sin(r)*it.value;t.push({x:m,y:v,angle:r,index:l})}return t}),rs=e.computed(()=>{const t=[],o=po.value;return _a.value.forEach((l,r)=>{const m=it.value+15,v=r*2*Math.PI/o-Math.PI/2,b=Wt.value+Math.cos(v)*m,x=At.value+Math.sin(v)*m+5;let q="middle",T="middle";Math.abs(Math.cos(v))>.5&&(q=Math.cos(v)>0?"start":"end"),Math.abs(Math.sin(v))>.5&&(T=Math.sin(v)>0?"hanging":"auto"),t.push({x:b,y:x,text:Z.categories[r]||`Axis ${r+1}`,anchor:q,baseline:T})}),t}),is=e.ref(new Set),cs=(t,o,l)=>{const r=`current-${l}`,m=is.value.has(r),v=o.fillOpacity??ql.value;return!m&&z.value===null?v:o.isHighlighted||m?o.isComparison?v:v+.15:o.isDimmed?v*.3:v},Ma=e.computed(()=>{if(!vl.value)return[];const t=[],o=po.value;return Ut.value.map((r,m)=>({series:r,seriesIndex:m})).sort((r,m)=>{const v=It(r.series)?0:1,b=It(m.series)?0:1;return v-b}).forEach(({series:r,seriesIndex:m})=>{const v=It(r),b=[],x=[],q=[],T=z.value===m,I=z.value!==null&&z.value!==m,$=F.value.has(m);for(let G=0;G<o;G++){const Ne=r.data[G]||0,ve=Ne/ss.value*it.value,be=G*2*Math.PI/o-Math.PI/2,Ee=Wt.value+Math.cos(be)*ve,me=At.value+Math.sin(be)*ve;b.push(`${Ee},${me}`),x.push({x:Ee,y:me}),q.push({x:Ee,y:me,value:Ne,label:Z.categories[G]||`Axis ${G+1}`,seriesName:r.name})}t.push({points:b.join(" "),polygonPoints:x,dataPoints:q,color:kn(r,m),fillOpacity:v?ol.value.fillOpacity:ql.value,strokeDasharray:v?gl(r)||ol.value.strokeDasharray:null,pointRadius:rn(r,v),seriesName:r.name,value:`${r.name}: ${r.data.join(", ")}`,isHighlighted:T,isDimmed:I,isHidden:$,isComparison:v,seriesIndex:m})}),t}),us=(t,o)=>{if(!o||o.length<3)return!1;let l=!1;for(let r=0,m=o.length-1;r<o.length;m=r++){const v=o[r].x,b=o[r].y,x=o[m].x,q=o[m].y;b>t.y!=q>t.y&&t.x<(x-v)*(t.y-b)/(q-b)+v&&(l=!l)}return l},ds=t=>{if(!vl.value)return;const o=t.currentTarget.closest(".dss-custom-chart-container");if(!o)return;const l=o.getBoundingClientRect(),r=ee.value?.getBoundingClientRect();if(!r)return;const m=t.clientX-r.left,v=t.clientY-r.top,b=Ma.value.filter(x=>x.isHidden?!1:us({x:m,y:v},x.polygonPoints));if(b.length>0){b.length,z.value=b[0].seriesIndex;const x=t.clientX-l.left+10,q=t.clientY-l.top-10,T=b.length>1?460:260,I=70+po.value*20;let $=x,G=q;$+T>Me.value&&($=t.clientX-l.left-T-10),G+I>mt.value&&(G=t.clientY-l.top-I-10),$<0&&($=10),G<0&&(G=10);const Ne=b.map(Ue=>({seriesName:Ue.seriesName,color:Ue.color,points:Ue.dataPoints.map(ve=>({label:ve.label,value:Vl(ve.value)}))}));Te.value={show:!0,x:$,y:G,title:"",value:"",bubbleData:[],spiderAreas:Ne}}else Nn()},zo=e.computed(()=>{const t=U.value;return t.logos.map((o,l)=>{const r=Z.series[o.seriesIndex];if(!r||!r.data||r.data.length===0||F.value.has(o.seriesIndex))return null;let m,v;if($l.value){let x=-1,q=null;for(let I=r.data.length-1;I>=0;I--)if(r.data[I]!==null&&r.data[I]!==void 0){x=I,q=r.data[I];break}if(x===-1||q===null)return null;const T=r.data.map((I,$)=>I==null?null:{x:Cl($),y:Cn(r,I),index:$}).filter(I=>I!==null);if(t.animations.enabled&&!Hn.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(zt.value.isAnimating||!zt.value.hasAnimated))if(zt.value.isAnimating){const I=zt.value.currentFrame/zt.value.totalFrames,$=va(t.animations.easing,Math.min(I,1)),G=Cs(T,$);m=G.x+(o.offsetX||0),v=G.y+(o.offsetY||0)}else m=T[0].x+(o.offsetX||0),v=T[0].y+(o.offsetY||0);else m=Cl(x)+(o.offsetX||0),v=Un(q)+(o.offsetY||0)}else if(xl.value||vl.value){const x=Math.PI*2/t.logos.length*l;m=Wt.value+Math.cos(x)*(it.value+30)+(o.offsetX||0),v=At.value+Math.sin(x)*(it.value+30)+(o.offsetY||0)}return{...o,x:m,y:v,seriesIndex:o.seriesIndex}}).filter(Boolean)}),ms=t=>{const o=document.querySelector(`.dss-logo-fallback-${t}`),l=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.opacity="0"),l&&(l.style.opacity="1")},ps=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const o=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.display="none")},ma=t=>{F.value.has(t)?F.value.delete(t):F.value.add(t)},vs=e.computed(()=>{if(!Te.value.show&&!(Se.value&&Le.value.show&&!ne.value.isZooming))return{display:"none"};let t,o;if(Se.value&&Le.value.show&&!ne.value.isZooming){t=Le.value.x+15,o=P.value.top;const l=Ot.value?200:150;t+l>Me.value&&(t=Le.value.x-l-15),t<0&&(t=10),o<10&&(o=10)}else t=Te.value.x,o=Te.value.y;return{left:t+"px",top:o+"px"}}),Yn=(t,o)=>{if(!Et.value||Bo.value)return;const r=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let m=o.clientX-r.left+10,v=o.clientY-r.top-10;const b=200,x=120,q=Me.value,T=mt.value;m+b>q&&(m=o.clientX-r.left-b-10),v+x>T&&(v=o.clientY-r.top-x-10),m<0&&(m=10),v<0&&(v=10);let I;typeof t.categoryIndex=="number"?I=t.categoryIndex:typeof t.dataIndex=="number"?I=t.dataIndex:t.label&&Z.categories.includes(t.label)&&(I=Z.categories.indexOf(t.label));let $=t.seriesName||t.label||"";(hl.value||xe.value==="bar")&&t.label&&($=t.label),t.tooltipTitle&&($=t.tooltipTitle),Te.value={show:!0,x:m,y:v,title:$,value:Vl(t.value)||"",categoryIndex:I,spiderAreas:[]}},pa=e.ref(!1),Po=e.ref(!1),Nn=()=>{Te.value.show=!1,Te.value.spiderAreas=[],Te.value.bubbleData=[],Le.value.show=!1,pa.value||(z.value=null)},Bo=e.ref(!1),_o=(t,o)=>{Bo.value=!0,Te.value.show=!1,Le.value.show=!1;const r=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let m=o.clientX-r.left+15,v=o.clientY-r.top-10;const b=250;m+b>Me.value&&(m=o.clientX-r.left-b-15),m<0&&(m=10),v<0&&(v=10),at.value={show:!0,x:m,y:v,content:t.texts,count:t.totalCount}},Mo=()=>{Bo.value=!1,at.value.show=!1},zt=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),va=(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}},Hn=e.computed(()=>Fn.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),$a=()=>{if(!Sl.value||Hn.value){zt.value.hasAnimated=!0,p.value&&(d.value=1);return}p.value&&(d.value=0),zt.value.isAnimating=!0,zt.value.currentFrame=0,zt.value.totalFrames=Math.ceil(Wl.value/16.67);const t=()=>{const o=zt.value.currentFrame/zt.value.totalFrames,l=va(on.value,Math.min(o,1));fs(l),p.value&&(d.value=l),o<1?(zt.value.currentFrame++,zt.value.animationId=requestAnimationFrame(t)):hs()};zt.value.animationId=requestAnimationFrame(t)},fs=t=>{const o=W.value;o&&o.style.setProperty("--dss-animation-progress",t)},hs=()=>{zt.value.isAnimating=!1,zt.value.hasAnimated=!0,p.value&&(d.value=1),zt.value.animationId&&(cancelAnimationFrame(zt.value.animationId),zt.value.animationId=null)},fa=e.computed(()=>!xl.value||zt.value.hasAnimated?!0:p.value?d.value>=1:Vn.value?no.value>=1:!0),La=e.computed(()=>_l.value&&fa.value),Oo=e.ref(!1);e.watch(La,t=>{t?(Oo.value=!1,e.nextTick(()=>{requestAnimationFrame(()=>{Oo.value=!0})})):Oo.value=!1},{immediate:!0});const gs=e.computed(()=>{if(!Sl.value||Hn.value||zt.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${Wl.value}ms`,t["--dss-animation-easing"]=ys(on.value),t["--dss-stagger-delay"]=`${il.value}ms`,t}),ys=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",ks=()=>{if(!Sl.value||Hn.value)return"";const t=["dss-chart-animated"];return zt.value.hasAnimated||t.push(`dss-animate-${mn.value}`),zt.value.hasAnimated||(xl.value&&xe.value!=="semi-radial"?t.push("dss-animate-fill"):xl.value||t.push(`dss-animate-${mn.value}`)),zt.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>Z.series,(t,o)=>{jn.value&&o&&zt.value.hasAnimated&&(zt.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>$a(),pn.value)}))},{deep:!0}),e.watch(()=>ne.value.isZooming,(t,o)=>{o&&!t&&setTimeout(()=>{Co()},50)}),e.watch(()=>[ne.value.scale,ne.value.offsetX],()=>{!ne.value.isZooming&&!ne.value.isDragging&&Co()},{flush:"post"}),e.watch([el,re],([t,o])=>{ne.value.minScale=t,ne.value.maxScale=o,(ne.value.scale<t||ne.value.scale>o)&&lo()},{immediate:!0}),e.watch(()=>Z.locale,t=>{t&&t!==L.value&&(L.value=t)},{immediate:!0}),e.watch(()=>st.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",xo)}):document.removeEventListener("click",xo)}),e.onMounted(()=>{z.value=null,p.value&&(!Sl.value||Hn.value)&&(d.value=1),Ao(),e.nextTick(dt),W.value&&typeof ResizeObserver<"u"&&(Q=new ResizeObserver(t=>{const o=t[0];!o||!o.contentRect||(K&&cancelAnimationFrame(K),K=requestAnimationFrame(()=>{K=null;const{width:l,height:r}=o.contentRect;we.value=Math.round(l),ye.value=Math.round(r),h.value&&(rt.value=h.value.offsetHeight||he)}))}),Q.observe(W.value)),Sl.value&&!Hn.value?xe.value==="semi-radial"?setTimeout(()=>O(),pn.value):setTimeout(()=>$a(),pn.value):(zt.value.hasAnimated=!0,xe.value==="semi-radial"&&(no.value=1)),document.addEventListener("mousemove",Ta),document.addEventListener("mouseup",Da),document.addEventListener("click",wo)}),e.onUnmounted(()=>{de&&(de(),de=null),K&&cancelAnimationFrame(K),Q&&W.value&&(Q.unobserve(W.value),Q.disconnect(),Q=null),zt.value.animationId&&cancelAnimationFrame(zt.value.animationId),R&&(cancelAnimationFrame(R),R=null),ne.value.zoomTimeout&&clearTimeout(ne.value.zoomTimeout),document.removeEventListener("mousemove",Ta),document.removeEventListener("mouseup",Da),document.removeEventListener("click",wo),document.removeEventListener("click",xo)});const Ta=t=>{if(ne.value.isDragging&&ne.value.scale>1&&$l.value){Le.value.show=!1;const o=t.clientX-ne.value.lastMouseX,{minX:l,maxX:r}=Bt.value,m=r-l||1,b=o*.8;ne.value.offsetX+=b;const x=m/ne.value.scale,q=m-x,T=0,I=-q/m*P.value.width,$=T;ne.value.offsetX=Math.max(I,Math.min($,ne.value.offsetX)),ne.value.lastMouseX=t.clientX,ne.value.lastMouseY=t.clientY}},Da=()=>{ne.value.isDragging&&(ne.value.isDragging=!1,setTimeout(()=>{!ne.value.isDragging&&ne.value.isZooming},100))},Cs=(t,o)=>{const l=t.filter(x=>x!=null);if(!l||l.length===0)return{x:0,y:0};if(l.length===1||o<=0)return l[0];if(o>=1)return l[l.length-1];let r=0;const m=[];for(let x=1;x<l.length;x++){const q=l[x].x-l[x-1].x,T=l[x].y-l[x-1].y,I=Math.sqrt(q*q+T*T);m.push(I),r+=I}const v=r*o;let b=0;for(let x=0;x<m.length;x++){const q=b+m[x];if(v<=q){const T=(v-b)/m[x],I=l[x],$=l[x+1];return{x:I.x+($.x-I.x)*T,y:I.y+($.y-I.y)*T}}b=q}return l[l.length-1]};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",[ks(),{"dss-chart-fill-width":He.value,"dss-chart-fill-height":Ke.value,"dss-chart-compact":xl.value&&!fe.value}]]),style:e.normalizeStyle({width:He.value?"100%":Me.value+"px",height:Qt.value,...He.value||Ke.value?{overflow:xl.value?"visible":(fl.value,"hidden"),maxWidth:"100%",maxHeight:"100%"}:{},...gs.value,cursor:oa()}),"data-chart-type":xe.value,ref_key:"containerEl",ref:W,onWheel:Ro,onMousedown:ro,onMousemove:Ko,onMouseup:Eo,onMouseleave:To,onDblclick:lo,onContextmenu:e.withModifiers(Qo,["prevent"]),onClick:e.withModifiers(wn,["left"]),onWheelCapture:Ro},[e.createElementVNode("div",{class:"dss-chart-header",ref_key:"headerEl",ref:h},[e.createElementVNode("div",Or,[et.value?(e.openBlock(),e.createElementBlock("div",Wr,e.toDisplayString(et.value),1)):e.createCommentVNode("",!0),lt.value?(e.openBlock(),e.createElementBlock("div",qr,e.toDisplayString(lt.value),1)):e.createCommentVNode("",!0)]),fe.value&&Fe.value==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":tt.value==="horizontal","dss-legend-vertical":tt.value==="vertical","dss-legend-top":Fe.value==="top","dss-legend-bottom":Fe.value==="bottom"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.series,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":F.value.has(r),"dss-legend-hovered":z.value===r,"dss-legend-dimmed":z.value!==null&&z.value!==r}]),onClick:m=>ma(r),onMouseenter:m=>Qn(r),onMouseleave:oo,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":vl.value&&It(l)}]),style:e.normalizeStyle({backgroundColor:vl.value&&It(l)?"transparent":Ol(l,r),borderColor:Ol(l,r)})},null,6),e.createElementVNode("span",Ur,e.toDisplayString(l.name),1)],46,Zr))),128))],2)):e.createCommentVNode("",!0),fe.value&&(Fe.value==="left"||Fe.value==="right")?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-legend-side",{"dss-legend-left":Fe.value==="left","dss-legend-right":Fe.value==="right"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.series,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":F.value.has(r),"dss-legend-hovered":z.value===r,"dss-legend-dimmed":z.value!==null&&z.value!==r}]),onClick:m=>ma(r),onMouseenter:m=>Qn(r),onMouseleave:oo,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":vl.value&&It(l)}]),style:e.normalizeStyle({backgroundColor:vl.value&&It(l)?"transparent":Ol(l,r),borderColor:Ol(l,r)})},null,6),e.createElementVNode("span",Xr,e.toDisplayString(l.name),1)],46,Yr))),128))],2)):e.createCommentVNode("",!0)],512),_.showAddMarkerButton&&cl.value&&jt.value.addMarker&&($l.value||Ot.value)&&!fl.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-add-marker-button",onClick:to,title:e.unref(N)("chart.contextMenu.addMarker")},[e.createElementVNode("img",{src:Yt.value,class:"dss-add-marker-button-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,Kr),o[4]||(o[4]=e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10 4V16M4 10H16",stroke:"hsl(60, 2%, 47%)","stroke-width":"2","stroke-linecap":"round"})],-1))],8,jr)):e.createCommentVNode("",!0),e.createElementVNode("div",Gr,[Ot.value&&kt.value?(e.openBlock(),e.createElementBlock("div",Qr,"Bubble size: "+e.toDisplayString(kt.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{width:Me.value,height:mt.value,class:"dss-chart-svg","data-smooth":Vt.value,"data-animated":Sl.value,ref_key:"svgEl",ref:ee},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:ge.value},[e.createElementVNode("rect",{x:0,y:P.value.top,width:Me.value,height:P.value.height*4},null,8,ti)],8,ei),Vn.value?(e.openBlock(),e.createElementBlock("clipPath",{key:0,id:uo.value},[e.createElementVNode("path",{d:s.value},null,8,ni)],8,li)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("clipPath",{key:1,id:u.value},[e.createElementVNode("path",{d:y.value},null,8,ai)],8,oi)):e.createCommentVNode("",!0)]),$l.value||Ot.value?(e.openBlock(),e.createElementBlock("g",si,[ie.value&&!fl.value?(e.openBlock(),e.createElementBlock("g",{key:0,class:"dss-grid-lines","clip-path":Ae.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Za.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${r}`,x1:P.value.left,x2:P.value.right,y1:l.y,y2:l.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${r*50}ms`})},null,12,ii))),128))],8,ri)):e.createCommentVNode("",!0),fl.value&&ba.value.length?(e.openBlock(),e.createElementBlock("g",{key:1,class:"dss-stepbar-axis-bars dss-stepbar-axis-bars--y-only","clip-path":Ae.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ba.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{key:`stepbar-axis-bar-${r}`,x1:P.value.left,x2:P.value.right,y1:l.y,y2:l.y,stroke:Ht.value,"stroke-width":wl.value,"stroke-dasharray":jl.value,opacity:Mt.value},null,8,ui))),128))],8,ci)):e.createCommentVNode("",!0),e.createElementVNode("g",di,[e.createElementVNode("line",{x1:P.value.left,x2:P.value.right,y1:P.value.bottom,y2:P.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,mi),e.createElementVNode("line",{x1:P.value.left,x2:P.value.left,y1:P.value.top,y2:P.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,pi),Tn.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:P.value.right,x2:P.value.right,y1:P.value.top,y2:P.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,vi)):e.createCommentVNode("",!0)]),e.createElementVNode("g",fi,[fl.value?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(sa.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${r}`,x:l.x,y:l.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${r*100}ms`})},e.toDisplayString(l.text),13,hi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ra.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${r}`,x:l.x,y:l.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${r*80}ms`})},e.toDisplayString(l.text),13,gi))),128)),Tn.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Ya.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{key:`y-secondary-${r}`,x:l.x,y:l.y,"text-anchor":"start","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${r*80}ms`})},e.toDisplayString(l.text),13,yi))),128)):e.createCommentVNode("",!0),Rt.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:P.value.left+P.value.width/2,y:P.value.bottom+45,"text-anchor":"middle","font-size":"14",fill:"#666"},e.toDisplayString(Rt.value),9,ki)):e.createCommentVNode("",!0),ct.value?(e.openBlock(),e.createElementBlock("text",{key:3,x:15,y:P.value.top+12+P.value.height/2,"text-anchor":"middle","font-size":"14",fill:"#666",transform:`rotate(-90, 15, ${P.value.top+P.value.height/2})`},e.toDisplayString(ct.value),9,Ci)):e.createCommentVNode("",!0),Tn.value&&pt.value?(e.openBlock(),e.createElementBlock("text",{key:4,x:Me.value-15,y:P.value.top+12+P.value.height/2,"text-anchor":"middle","font-size":"14",fill:"#666",transform:`rotate(90, ${Me.value-15}, ${P.value.top+P.value.height/2})`},e.toDisplayString(pt.value),9,bi)):e.createCommentVNode("",!0)]),Ie.value.length>0?(e.openBlock(),e.createElementBlock("g",wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,l=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${l.categoryIndex}`},[e.createElementVNode("g",{"clip-path":Ae.value},[l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x,x2:l.x,y1:P.value.bottom,y2:P.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>_o(l,r),onMouseleave:Mo},null,40,Ei)):e.createCommentVNode("",!0),l.hasAuto&&!l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.x,x2:l.x,y1:P.value.bottom,y2:P.value.top,stroke:"#a1d499","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>_o(l,r),onMouseleave:Mo},null,40,Si)):e.createCommentVNode("",!0),l.hasAuto&&l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.x,x2:l.x,y1:P.value.bottom,y2:P.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>_o(l,r),onMouseleave:Mo},null,40,Vi)):e.createCommentVNode("",!0)],8,xi),l.hasManual&&l.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x+8,cy:Math.max(15,P.value.top-10),r:"14",fill:"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:r=>_o(l,r),onMouseleave:Mo},null,40,Ni)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:l.x,cy:Math.max(15,P.value.top-10),r:"14",fill:l.hasManual&&l.hasAuto||l.hasManual?"#698dbe":"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:r=>_o(l,r),onMouseleave:Mo},null,40,Bi),e.createElementVNode("text",{x:l.x,y:Math.max(15,P.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(l.totalCount),9,_i)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-chart-data","clip-path":Ae.value},[Xl.value?(e.openBlock(),e.createElementBlock("g",$i,[e.createElementVNode("g",{class:e.normalizeClass(["dss-bar-chart",{"dss-horizontal-bars":hl.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ea.value,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${r}`},[l.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:l.barPath,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({fill:l.color,fillOpacity:l.isDimmed?.4:1,animationDelay:`${l.animationDelay}ms`}),onMouseover:m=>Yn(l,m),onMouseleave:Nn},null,46,Li)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x,y:l.y,width:l.width,height:l.height,fill:l.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:m=>Yn(l,m),onMouseleave:Nn},null,46,Ti))],64))),128))],2),e.createElementVNode("g",Di,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wa.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${r}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?X.value+2:X.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,Ai))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xa.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-gap-connector-${r}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?X.value+2:X.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:l.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,Hi))),128)),ce.value>0||Ve.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Ga.value,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${r}`,cx:l.x,cy:l.y,r:xt(l.isHighlighted?nt(l,ce.value)+2:nt(l,ce.value)),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:m=>Yn(l,m),onMouseleave:Nn},null,46,Ri))),128)):e.createCommentVNode("",!0)])])):xe.value==="line"?(e.openBlock(),e.createElementBlock("g",Fi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ja.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`anim-${r}`,d:l.path,stroke:l.color,"stroke-width":X.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass(["dss-line-animation-overlay",{"dss-animation-complete":zt.value.hasAnimated}]),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,Ii))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wa.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${r}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?X.value+2:X.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,zi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xa.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`gap-connector-${r}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?X.value+2:X.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:l.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,Pi))),128)),ce.value>0||Ve.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Ka.value,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${r}`,cx:l.x,cy:l.y,r:xt(l.isHighlighted?nt(l,ce.value)+2:nt(l,ce.value)),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:m=>Yn(l,m),onMouseleave:Nn},null,46,Oi))),128)):e.createCommentVNode("",!0)])):xe.value==="area"?(e.openBlock(),e.createElementBlock("g",Wi,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(da.value,(l,r)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${r}`,id:`area-mask-${r}-${_.chartId}`},[e.createElementVNode("rect",{x:P.value.left-10,y:P.value.top-10,width:P.value.width+20,height:P.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${P.value.width+20}px`})},null,12,Zi)],8,qi))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(da.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${r}`,d:l.areaPath,fill:l.color,"fill-opacity":l.isHighlighted?dl.value+.2:dl.value,mask:`url(#area-mask-${r}-${_.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden})},null,10,Ui))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(da.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${r}`,d:l.linePath,stroke:l.color,"stroke-width":l.isHighlighted?X.value+1:X.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${r*il.value}ms`})},null,14,Yi))),128))])):xe.value==="bar"?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass({"dss-horizontal-bars":hl.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ea.value,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${r}`},[l.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:l.barPath,fill:l.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:m=>Yn(l,m),onMouseleave:Nn},null,46,Xi)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x,y:l.y,width:l.width,height:l.height,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({fill:l.color,fillOpacity:l.isDimmed?.4:1,animationDelay:`${l.animationDelay}ms`}),onMouseover:m=>Yn(l,m),onMouseleave:Nn},null,46,ji))],64))),128))],2)):e.createCommentVNode("",!0)],8,Mi),Se.value&&Le.value.show&&!ne.value.isZooming&&!fl.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-crosshair","clip-path":Ae.value},[e.createElementVNode("line",{x1:Le.value.x,x2:Le.value.x,y1:P.value.top,y2:P.value.bottom,stroke:ot.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,Gi),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Le.value.data,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${r}`,cx:Le.value.x,cy:l.y,r:xt(ce.value+2),fill:l.color,stroke:"none",opacity:"0.9"},null,8,Qi))),128))],8,Ki)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ot.value?(e.openBlock(),e.createElementBlock("g",Ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Io.value,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${r}`},[l?(e.openBlock(),e.createElementBlock("g",ec,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:xt(l.radius),fill:l.color,"fill-opacity":es(l),stroke:l.color,"stroke-width":"1","stroke-opacity":"0.8",class:e.normalizeClass(ls(l,r)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:m=>Va(l,m),onMouseleave:m=>Ba(l),onClick:m=>Sa(l,m)},null,42,tc),l.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:l.x-l.radius*.65,y:l.y-l.radius*.65,width:l.radius*1.3,height:l.radius*1.3,"xlink:href":l.imageUrl,class:e.normalizeClass(`dss-bubble-image-${r} ${l.isHighlighted?"dss-bubble-highlighted":""} ${l.isDimmed?"dss-bubble-dimmed":""} ${l.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${l.radius*.65}px at ${l.radius*.65}px ${l.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:ts(l)}),onLoad:m=>$e(r),onError:m=>gt(r),onMouseenter:m=>Va(l,m),onMouseleave:m=>Ba(l),onClick:m=>Sa(l,m)},null,46,lc)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),xl.value?(e.openBlock(),e.createElementBlock("g",{key:2,class:"radial-chart",transform:co.value},[xe.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:Wt.value,cy:At.value,r:it.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,oc)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":xe.value,"clip-path":C.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Qa.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${l.originalIndex}-${r}`,d:l.segment.path,fill:l.segment.color,"fill-opacity":l.segment.isHighlighted?(l.segment.opacity||.8)+.2:l.segment.opacity||.8,stroke:l.segment.strokeWidth?l.segment.strokeColor||l.segment.color:"none","stroke-width":l.segment.strokeWidth||0,"clip-path":c(l.originalIndex),class:e.normalizeClass({"dss-series-highlighted":l.segment.isHighlighted,"dss-series-dimmed":l.segment.isDimmed,"dss-series-hidden":l.segment.isHidden}),onMouseover:m=>Yn(l.segment,m),onMouseleave:Nn},null,42,sc))),128))],8,ac),Ql.value&&fa.value?(e.openBlock(),e.createElementBlock("g",rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qe.value,(l,r)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:`radial-segment-label-${r}`,x:l.x,y:l.y,"text-anchor":"middle","dominant-baseline":"middle",class:"dss-radial-segment-data-label",style:e.normalizeStyle({fill:l.contrastColor})},e.toDisplayString(l.value),13,ic)),[[e.vShow,l.show]])),128))])):e.createCommentVNode("",!0),k.value&&(fa.value||Vn.value||Zn.value)?(e.openBlock(),e.createElementBlock("text",{key:2,x:j.value.x,y:j.value.y,"text-anchor":"middle","dominant-baseline":"middle","font-size":E.value,fill:Ce.value,class:"dss-radial-data-center"},e.toDisplayString(w.value),9,cc)):e.createCommentVNode("",!0),La.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass(["dss-radial-labels dss-radial-labels-initial",{"dss-radial-labels-animated":Oo.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ja.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${r}`,class:e.normalizeClass(["dss-radial-label-group",{"dss-label-highlighted":l.isHighlighted,"dss-label-dimmed":l.isDimmed}]),style:e.normalizeStyle({"--label-delay":`${r*.08}s`})},[e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-pointer",x1:l.pointerStartX,y1:l.pointerStartY,x2:l.pointerEndX,y2:l.pointerEndY,stroke:l.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":l.pointerLineLength})},null,12,uc),e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-horizontal",x1:l.pointerEndX,y1:l.pointerEndY,x2:l.horizontalEndX,y2:l.horizontalEndY,stroke:l.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":l.horizontalLineLength})},null,12,dc),e.createElementVNode("text",{class:"dss-radial-label-text",x:l.textX,y:l.textY,"text-anchor":l.textAnchor,"font-size":yn.value,"dominant-baseline":"middle"},e.toDisplayString(l.text),9,mc)],6))),128))],2)):e.createCommentVNode("",!0)],8,nc)):e.createCommentVNode("",!0),vl.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-spider-chart",transform:co.value},[ie.value?(e.openBlock(),e.createElementBlock("g",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ll.value,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${r}`,cx:Wt.value,cy:At.value,r:xt(l),fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${r*150}ms`})},null,12,fc))),128)),e.createElementVNode("g",hc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ll.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${r}`},[e.createElementVNode("rect",{x:Wt.value-16,y:At.value-l-7,width:"32",height:"16",fill:"transparent",stroke:"none"},null,8,gc),e.createElementVNode("text",{x:Wt.value,y:At.value-l+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(In(r)),9,yc)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_a.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${r}`,x1:Wt.value,x2:l.x,y1:At.value,y2:l.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${r*100}ms`})},null,12,kc))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rs.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${r}`,x:l.x+Math.cos(r*2*Math.PI/po.value-Math.PI/2)*16,y:l.y+Math.sin(r*2*Math.PI/po.value-Math.PI/2)*16,"text-anchor":l.anchor,"dominant-baseline":l.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${r*120}ms`})},e.toDisplayString(l.text.charAt(0).toUpperCase()+l.text.slice(1)),13,bc))),128))]),e.createElementVNode("g",{class:"dss-spider-data",onMousemove:ds,onMouseleave:Nn},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ma.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${r}`},[e.createElementVNode("polygon",{points:l.points,fill:l.color,"fill-opacity":cs("current",l,r),stroke:l.color,"stroke-width":l.isHighlighted?X.value+1:X.value,"stroke-dasharray":l.strokeDasharray||void 0,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${r*il.value}ms`,transition:"all 0.2s ease"})},null,14,wc),l.pointRadius>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.dataPoints,(m,v)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${r}-${v}`,cx:m.x,cy:m.y,r:xt(l.isHighlighted?l.pointRadius+1:l.pointRadius),fill:l.isComparison?"none":l.color,stroke:l.isComparison?l.color:"none","stroke-width":l.isComparison?2:0,class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${r*il.value+v*50}ms`,transition:"all 0.2s ease"}),onMouseover:b=>Yn(m,b),onMouseleave:Nn},null,46,xc))),128)):e.createCommentVNode("",!0)]))),128))],32)],8,pc)):e.createCommentVNode("",!0),e.createElementVNode("g",Ec,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(zo.value,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${r}`,cx:l.x,cy:l.y,r:xt(l.width/2),fill:al(l.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${r}`),style:e.normalizeStyle({animationDelay:`${r*200}ms`})},null,14,Sc))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(zo.value,(l,r)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${r}`,x:l.x-l.width/2,y:l.y-l.height/2,width:l.width,height:l.height,"xlink:href":l.url,onLoad:m=>ms(r),onError:m=>ps(r),preserveAspectRatio:"xMidYMid slice",class:e.normalizeClass(`dss-logo-image-${r}`),"clip-path":`circle(${l.width/2}px at ${l.width/2}px ${l.height/2}px)`,style:e.normalizeStyle({animationDelay:`${r*200}ms`})},null,46,Vc))),128))])],8,Jr)),fl.value&&Gl.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-stepbar-chart-host",style:e.normalizeStyle(Bn.value)},[e.createElementVNode("div",{ref_key:"stepbarScrollEl",ref:A,class:"dss-stepbar-scroll",onScroll:Go},[e.createElementVNode("div",{class:"dss-stepbar-scroll-content",style:e.normalizeStyle(nn.value)},[Lt.value?(e.openBlock(),e.createElementBlock("div",Nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bn.value,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`stepbar-grid-${r}`,class:"dss-stepbar-grid-line",style:e.normalizeStyle({top:`${l.top}px`,borderTopColor:Ht.value,borderTopWidth:`${wl.value}px`,borderTopStyle:"dashed",opacity:Mt.value})},null,4))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"dss-stepbar-columns",style:e.normalizeStyle({gap:`${El.value}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Gl.value,l=>(e.openBlock(),e.createBlock(Ra,{key:l.key,class:"dss-stepbar-chart-column",style:e.normalizeStyle(Kl.value),label:l.label,segments:l.segments,"total-value":l.totalValue,"show-counter":!1,"value-label":wt.value,orientation:"vertical","label-position":"down","bar-height":yl.value,"segment-order":ae.value,"remainder-label":St.value,"inactive-color":ut.value,options:Rn.value,"disable-tooltips":""},null,8,["style","label","segments","total-value","value-label","bar-height","segment-order","remainder-label","inactive-color","options"]))),128))],4),Rl.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-stepbar-crosshair-line",style:e.normalizeStyle(dn.value)},null,4)):e.createCommentVNode("",!0)],4)],544)],4)):e.createCommentVNode("",!0)]),Bl.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:Me.value+"px",height:mt.value+"px",backgroundImage:`url('${tl.value}')`,backgroundRepeat:"no-repeat",...zn.value,opacity:Zl.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(gn.value,(l,r)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+l.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:l.x+"px",top:l.y+"px",width:Tt.value+"px",height:Tt.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(m=>pl(l),["stop"]),onMouseenter:m=>os(l,m),onMouseleave:as},[e.createElementVNode("img",{src:ao(l),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,_c)],44,Bc)),[[e.vShow,hn.value]])),128)),Ft.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-tooltip",style:e.normalizeStyle({left:Ft.value.x+"px",top:Ft.value.y+"px"})},[e.createElementVNode("div",Mc,e.toDisplayString(Ft.value.categoryValue),1),Ft.value.description?(e.openBlock(),e.createElementBlock("div",$c,e.toDisplayString(Ft.value.description),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Et.value&&(Te.value.show||Se.value&&Le.value.show&&!ne.value.isZooming)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":Se.value&&Le.value.show&&!ne.value.isZooming,"dss-spider-tooltip":vl.value&&Te.value.spiderAreas&&Te.value.spiderAreas.length>0}]),style:e.normalizeStyle(vs.value)},[!Se.value||!Le.value.show||ne.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[vl.value&&Te.value.spiderAreas&&Te.value.spiderAreas.length>0?(e.openBlock(),e.createElementBlock("div",Lc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Te.value.spiderAreas,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-area-${r}`,class:"dss-spider-tooltip-area"},[e.createElementVNode("div",Tc,[e.createElementVNode("span",{class:"dss-spider-tooltip-area-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createTextVNode(" "+e.toDisplayString(l.seriesName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.points,(m,v)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-point-${r}-${v}`,class:"dss-tooltip-series"},[e.createElementVNode("span",Dc,e.toDisplayString(m.label),1),e.createElementVNode("span",Ac,e.toDisplayString(m.value),1)]))),128))]))),128))])):Ot.value&&Te.value.bubbleData&&Te.value.bubbleData.length>0?(e.openBlock(),e.createElementBlock("div",Hc,[Te.value.title?(e.openBlock(),e.createElementBlock("div",Rc,e.toDisplayString(Te.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Fc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Te.value.bubbleData,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`bubble-tooltip-${r}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])])):(e.openBlock(),e.createElementBlock("div",Ic,[e.createElementVNode("div",zc,e.toDisplayString(Te.value.title),1),e.createElementVNode("div",Pc,e.toDisplayString(Te.value.value),1)])),Te.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[Dt(Te.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",Oc,[o[5]||(o[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Wc,e.toDisplayString(e.unref(N)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Dt(Te.value.categoryIndex).flagGroups,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${r}`},[e.createElementVNode("div",qc,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(l.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.flags,(m,v)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${r}-${v}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Zc,[e.createElementVNode("div",Uc,e.toDisplayString(m.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),Dt(Te.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Yc,[o[6]||(o[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Xc,e.toDisplayString(e.unref(N)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Dt(Te.value.categoryIndex).markers,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${r}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",jc,[e.createElementVNode("div",Kc,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",Gc,e.toDisplayString(l.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",Qc,[e.createElementVNode("div",Jc,e.toDisplayString(fl.value?Lo():Ot.value?ns():_.categories[Le.value.categoryIndex]||`Category ${Le.value.categoryIndex+1}`),1),Ot.value?(e.openBlock(),e.createElementBlock("div",eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Le.value.data,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${r}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Le.value.data,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${r}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",tu,e.toDisplayString(l.seriesName)+":",1),e.createElementVNode("span",lu,e.toDisplayString(Vl(l.value)),1)]))),128))]),Dt(Le.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",nu,[o[7]||(o[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ou,e.toDisplayString(e.unref(N)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Dt(Le.value.categoryIndex).flagGroups,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${r}`},[e.createElementVNode("div",au,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(l.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.flags,(m,v)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${r}-${v}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",su,[e.createElementVNode("div",ru,e.toDisplayString(m.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),Dt(Le.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",iu,[o[8]||(o[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",cu,e.toDisplayString(e.unref(N)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Dt(Le.value.categoryIndex).markers,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${r}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",uu,[e.createElementVNode("div",du,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",mu,e.toDisplayString(l.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),$l.value&&bt.value&&ne.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-zoom-indicator",onClick:lo},[o[9]||(o[9]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(ne.value.scale*100))+"% "+e.toDisplayString(e.unref(N)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,Pr),fe.value&&Fe.value==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":tt.value==="horizontal","dss-legend-vertical":tt.value==="vertical","dss-legend-bottom":!0}]),style:{display:"flex","flex-wrap":"wrap","justify-content":"center",padding:"6px 8px 0"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.series,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-bottom-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":F.value.has(r),"dss-legend-hovered":z.value===r,"dss-legend-dimmed":z.value!==null&&z.value!==r}]),onClick:m=>ma(r),onMouseenter:m=>Qn(r),onMouseleave:oo,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":vl.value&&It(l)}]),style:e.normalizeStyle({backgroundColor:vl.value&&It(l)?"transparent":Ol(l,r),borderColor:Ol(l,r)})},null,6),e.createElementVNode("span",vu,e.toDisplayString(l.name),1)],46,pu))),128))],2)):e.createCommentVNode("",!0),st.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-context-menu",style:e.normalizeStyle({left:st.value.x+"px",top:st.value.y+"px"}),onClick:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},[jt.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:Ho},e.toDisplayString(e.unref(N)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),jt.value.addMarker&&(jt.value.downloadSvg||jt.value.downloadPng||jt.value.downloadCsv||Kt.value.length>0)?(e.openBlock(),e.createElementBlock("div",fu)):e.createCommentVNode("",!0),jt.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-context-menu-item",onClick:qn},e.toDisplayString(e.unref(N)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),jt.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:la},e.toDisplayString(e.unref(N)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),jt.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:na},e.toDisplayString(e.unref(N)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),Kt.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[jt.value.downloadSvg||jt.value.downloadPng||jt.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",hu)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Kt.value,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+r},[l.separator?(e.openBlock(),e.createElementBlock("div",gu)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(Do(l)),style:e.normalizeStyle(Wn(l)),onClick:m=>eo(l)},[l.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:Jo(l),class:"dss-custom-menu-content"},null,8,ku)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.icon?(e.openBlock(),e.createElementBlock("span",Cu,e.toDisplayString(l.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.label),1)],64))],14,yu)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Ze.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-modal-overlay",onClick:Il},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:o[3]||(o[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",bu,[e.createElementVNode("h3",null,e.toDisplayString(On.value?e.unref(N)("chart.modalMarker.viewMarker"):Gn.value?e.unref(N)("chart.modalMarker.editMarker"):e.unref(N)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:Il},"×")]),e.createElementVNode("div",wu,[e.createElementVNode("div",xu,[e.createVNode(ga,{id:"dss-marker-date",mode:"single",modelValue:Ze.value.date,"onUpdate:modelValue":o[1]||(o[1]=l=>Ze.value.date=l),"min-date":Kn.value,"max-date":jo.value,disabled:On.value},null,8,["modelValue","min-date","max-date","disabled"])]),e.createElementVNode("div",Eu,[e.createElementVNode("label",Su,e.toDisplayString(e.unref(N)("chart.modalMarker.description")),1),On.value?(e.openBlock(),e.createElementBlock("div",Vu,e.toDisplayString(Ze.value.description),1)):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,id:"dss-marker-description","onUpdate:modelValue":o[2]||(o[2]=l=>Ze.value.description=l),placeholder:e.unref(N)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"5"},null,8,Nu)),[[e.vModelText,Ze.value.description]])])]),e.createElementVNode("div",Bu,[e.createElementVNode("div",_u,[Gn.value&&!On.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:_n},e.toDisplayString(e.unref(N)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Mu,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:Il},e.toDisplayString(On.value?e.unref(N)("chart.modalMarker.close"):e.unref(N)("chart.modalMarker.cancel")),1),On.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-primary",onClick:xn,disabled:!(Ze.value.description&&Ze.value.description.length)},e.toDisplayString(Gn.value?e.unref(N)("chart.modalMarker.save"):e.unref(N)("chart.contextMenu.addMarker")),9,$u))])])])])):e.createCommentVNode("",!0)],64))}}),Du={class:"dss-modal-title"},Au={class:"dss-modal-actions"},ha={__name:"DSSModal",props:{showModal:{type:Boolean,required:!0},backDrop:{type:Boolean,default:!0},width:{type:String,default:"800px"},height:{type:String,default:"auto"},showCloseBtn:{type:Boolean,default:!0},headerType:{type:String,default:"space-between"},titleSize:{type:String,default:"24px"}},emits:["close-modal"],setup(_,{emit:J}){const N=_,L=J,oe=e.ref(null),W=e.ref(null),A=e.computed(()=>{const K={"max-width":N.width};return N.height!=="auto"&&(K.height=N.height,K["min-height"]="0"),K}),de=e.computed(()=>({}));function dt(){L("close-modal")}function ee(){N.backDrop&&!oe.value&&L("close-modal")}function h(K){K.target.tagName==="INPUT"&&(oe.value=K.target.tagName)}function we(){setTimeout(()=>{oe.value=null},300)}function ye(){const K=document.body,he=document.documentElement;W.value={bodyOverflow:K.style.overflow,bodyPosition:K.style.position,bodyTop:K.style.top,bodyWidth:K.style.width,htmlOverflow:he.style.overflow,scrollY:window.scrollY},K.style.overflow="hidden",K.style.position="fixed",K.style.top=`-${W.value.scrollY}px`,K.style.width="100%",K.style.left="0",he.style.overflow="hidden"}function Q(){if(!W.value)return;const K=document.body,he=document.documentElement,{bodyOverflow:Re,bodyPosition:ge,bodyTop:Ae,bodyWidth:Z,htmlOverflow:ze,scrollY:Ye}=W.value;K.style.overflow=Re||"",K.style.position=ge||"",K.style.top=Ae||"",K.style.width=Z||"",K.style.left="",he.style.overflow=ze||"",window.scrollTo(0,Ye||0)}return e.watch(()=>N.showModal,K=>{if(K)ye(),document.body.classList.add("dss-modal-open"),setTimeout(()=>{const he=document.getElementById("dss-modal-backdrop");he&&(he.addEventListener("focusin",h),he.addEventListener("focusout",we))},100);else{Q(),document.body.classList.remove("dss-modal-open");const he=document.getElementById("dss-modal-backdrop");he&&(he.removeEventListener("focusin",h),he.removeEventListener("focusout",we))}},{immediate:!0}),e.onUnmounted(()=>{N.showModal&&Q()}),(K,he)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[_.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-modal-backdrop",onClick:ee},[e.withDirectives(e.createElementVNode("div",{id:"dss-modal-backdrop",class:"dss-modal",style:e.normalizeStyle(A.value)},[e.createElementVNode("div",{class:"dss-modal-content",onClick:he[0]||(he[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-modal-header",style:e.normalizeStyle({"justify-content":_.headerType,"font-size":_.titleSize})},[e.createElementVNode("h1",Du,[e.renderSlot(K.$slots,"title",{},()=>[he[1]||(he[1]=e.createTextVNode("Default Title",-1))])]),e.renderSlot(K.$slots,"title-data"),_.showCloseBtn?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-modal-close",onClick:dt,title:"Close"},"×")):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"dss-modal-body",style:e.normalizeStyle(de.value)},[e.renderSlot(K.$slots,"content",{},()=>[he[2]||(he[2]=e.createTextVNode("Default Content",-1))])],4),e.createElementVNode("div",Au,[e.renderSlot(K.$slots,"actions")])])],4),[[e.vShow,_.showModal]])])):e.createCommentVNode("",!0)]))}},Hu={key:0,class:"dss-table-toolbar"},Ru={class:"dss-table-toolbar-left"},Fu=["aria-expanded"],Iu={class:"dss-pagination-select-dropdown",role:"listbox"},zu={class:"dss-table-column-visibility-label"},Pu={class:"dss-table-checkbox-wrapper"},Ou=["checked","onChange"],Wu={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},qu={class:"dss-table-column-visibility-text"},Zu={class:"dss-table-toolbar-right"},Uu=["placeholder","aria-label"],Yu=["aria-label"],Xu=["aria-label","aria-expanded"],ju={key:1,class:"dss-table-toolbar-extra"},Ku={class:"dss-table-thead"},Gu={key:0,class:"dss-table-th dss-table-selection-column"},Qu={key:0,class:"dss-table-checkbox-wrapper"},Ju=["checked","indeterminate"],ed={key:0,class:"dss-table-checkbox__indeterminate"},td={key:1,class:"dss-table-checkbox__check","aria-hidden":"true"},ld=["aria-label"],nd=["onClick"],od={class:"dss-table-th-content"},ad={class:"dss-table-th-text"},sd={key:0},rd={key:1},id={key:2},cd=["data-filter-column-key","aria-expanded","aria-label","onClick"],ud={class:"dss-table-tbody"},dd=["onClick"],md={class:"dss-table-checkbox-wrapper"},pd=["type","name","checked","disabled","onChange"],vd={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},fd={key:1,class:"dss-table-checkbox__dot"},hd=["onClick"],gd=["aria-expanded","aria-label"],yd={key:1,class:"dss-table-expansion-placeholder","aria-hidden":"true"},kd={key:0,class:"dss-table-expansion-row"},Cd=["colspan"],bd=["colspan"],wd={key:1,class:"dss-table-pagination"},xd={class:"dss-table-pagination-left"},Ed={key:0},Sd={key:1,class:"dss-table-pagination-placeholder","aria-hidden":"true"},Vd={class:"dss-table-pagination-center"},Nd={key:0,class:"dss-pagination-controls"},Bd=["disabled","title"],_d=["disabled","title"],Md=["aria-label","onKeydown"],$d={class:"dss-pagination-of"},Ld=["disabled","title"],Td=["disabled","title"],Dd={class:"dss-table-pagination-right"},Ad={class:"dss-pagination-rows-label"},Hd=["aria-expanded"],Rd=["aria-selected","onClick"],Fd={key:0,class:"dss-table-filter-row"},Id=["value","placeholder"],zd=["min","max","value"],Pd=["min","max","value"],Od={class:"dss-table-filter-double-range-values"},Wd={key:2,class:"dss-table-filter-daterange"},qd={class:"dss-table-filter-daterange-row"},Zd={class:"dss-table-filter-daterange-label"},Ud=["value"],Yd={class:"dss-table-filter-daterange-row"},Xd={class:"dss-table-filter-daterange-label"},jd=["value"],Kd=["value","placeholder"],Gd={class:"dss-table-filter-list"},Qd=["checked","onChange"],Jd={class:"dss-table-filter-actions"},e1={name:"DSSTable"},t1=Object.assign(e1,{props:{data:{type:Array,required:!0,default:()=>[]},columns:{type:Array,required:!0,default:()=>[]},tableId:{type:String,default:()=>"table-"+Math.random().toString(36).substring(2,9)},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:_=>typeof _=="object"&&_!==null},columnVisibility:{type:Array,default:null}},emits:["row-click","row-select","row-unselect","select-all","unselect-all","row-expand","row-collapse","sort","page","download-pdf","download-excel","search","update:columnVisibility"],setup(_,{emit:J}){const{t:N,locale:L}=ho.useI18n(),oe=_,W=J,A={table:{width:"auto",height:null,rowHeight:"auto",truncated:!1,expandable:!1,expandableRowData:null,expandableRowCondition:null,striped:!1,bordered:!1,hoverable:!0,size:"default",align:"left"},title:{text:""},subtitle:{text:""},selection:{enabled:!1,mode:"single",rowCondition:null},sorting:{enabled:!0,mode:"single"},pagination:{enabled:!1,rows:10,rowsPerPageOptions:[5,10,25,50,100],showCounter:!0,showControlsGroup:!0,showControls:!0,showRowsPerPage:!0},toolbar:{downloads:{pdf:!0,excel:!0},columnVisibility:!0,search:!0},scrollable:!1,emptyMessage:null};function de(f,g){const S=Object.assign({},f);return dt(f)&&dt(g)&&Object.keys(g).forEach(F=>{dt(g[F])?F in f?S[F]=de(f[F],g[F]):Object.assign(S,{[F]:g[F]}):Object.assign(S,{[F]:g[F]})}),S}function dt(f){return f&&typeof f=="object"&&!Array.isArray(f)}const ee=e.computed(()=>de(A,oe.options)),h=e.computed(()=>{const f=ee.value.table.width;return f==="auto"?null:typeof f=="number"?f:null}),we=e.computed(()=>ee.value.table.height),ye=e.computed(()=>ee.value.table.rowHeight??"auto"),Q=e.computed(()=>({height:ye.value})),K=e.computed(()=>ee.value.table.expandable===!0),he=e.computed(()=>ee.value.table.expandableRowData??null),Re=e.computed(()=>ee.value.table.expandableRowCondition??null),ge=e.computed(()=>ee.value.table.truncated===!0),Ae=e.computed(()=>ee.value.table.striped),Z=e.computed(()=>ee.value.table.bordered),ze=e.computed(()=>ee.value.table.hoverable),Ye=e.computed(()=>ee.value.table.size),_e=e.computed(()=>ee.value.table.align||"left");e.computed(()=>ee.value.title.text),e.computed(()=>ee.value.subtitle.text);const Xe=e.computed(()=>ee.value.selection.enabled),U=e.computed(()=>ee.value.selection.mode),He=e.computed(()=>ee.value.selection.rowCondition??null),Ke=e.computed(()=>ee.value.sorting.enabled),ke=e.computed(()=>ee.value.sorting.mode),Me=e.computed(()=>ee.value.pagination.enabled),rt=e.computed(()=>ee.value.pagination.rows),yt=e.computed(()=>ee.value.pagination.rowsPerPageOptions),mt=e.computed(()=>ee.value.pagination.showCounter!==!1),Qt=e.computed(()=>ee.value.pagination.showControlsGroup),xe=e.computed(()=>Qt.value===!1?!1:ee.value.pagination.showControls!==!1),Jt=e.computed(()=>Qt.value===!1?!1:ee.value.pagination.showRowsPerPage!==!1),et=e.computed(()=>Me.value&&(mt.value||xe.value||Jt.value)),lt=e.computed(()=>ee.value.scrollable),kt=e.computed(()=>ee.value.emptyMessage||N("table.emptyMessage")),Rt=e.computed(()=>ee.value.toolbar?.downloads?.pdf!==!1),ct=e.computed(()=>ee.value.toolbar?.downloads?.excel!==!1),ht=e.computed(()=>ee.value.toolbar?.search!==!1),pt=e.computed(()=>Rt.value||ct.value||ht.value||Xt.value),Xt=e.computed(()=>ee.value.toolbar?.columnVisibility!==!1),Ct=e.ref(""),Pt=e.ref(!1),pe=e.ref(null);let H=null;function Y(){Pt.value?(H&&(clearTimeout(H),H=null),Pt.value=!1,Ct.value="",W("search",""),pe.value?.blur()):(Pt.value=!0,H=setTimeout(()=>{H=null,pe.value?.focus()},80))}function ie(){Ct.value||(Pt.value=!1)}function fe(){Ct.value="",W("search",""),pe.value?.focus()}const Fe=e.computed(()=>({"dss-table-striped":Ae.value,"dss-table-bordered":Z.value,"dss-table-hoverable":ze.value,[`dss-table-${Ye.value}`]:Ye.value!=="default","dss-table-truncated":ge.value})),tt=(f,g)=>f?.field??f?.key??g,Et=e.ref(new Set);function Se(){const f=new Set;return oe.columns.forEach((g,S)=>{g?.hidden!==!0&&f.add(tt(g,S))}),f}function ot(){const f=new Set;return oe.columns.forEach((g,S)=>{f.add(tt(g,S))}),f}function bt(f){if(!Array.isArray(f))return null;const g=ot(),S=[];return f.forEach(F=>{g.has(F)&&S.push(F)}),S}function el(){Et.value=Se()}const re=e.computed(()=>{const f=bt(oe.columnVisibility);return f===null?null:new Set(f)}),X=e.computed(()=>re.value??Et.value),te=e.computed(()=>oe.columns.filter((f,g)=>X.value.has(tt(f,g)))),ce=f=>{const g=oe.columns.findIndex(S=>S===f);return tt(f,g>=0?g:0)},Ve=(f,g)=>X.value.has(tt(f,g));function nt(f){W("update:columnVisibility",Array.from(f))}function xt(f,g){const S=tt(f,g),F=new Set(X.value);F.has(S)?F.delete(S):F.add(S),re.value===null&&(Et.value=F),nt(F)}const dl=e.ref(null),Vt=e.ref(!1);function sl(f){dl.value&&!dl.value.contains(f.target)&&(Vt.value=!1)}const D=e.computed(()=>te.value.length+(Xe.value?1:0)+(K.value?1:0)),V=(f,g)=>f?.id??f?.key??g,B=e.ref(new Set),ae=e.ref(null),se=(f,g)=>B.value.has(V(f,g)),je=(f,g)=>{if(!K.value)return!1;if(typeof Re.value=="function")return!!Re.value(f,g);if(typeof he.value=="string"&&he.value.trim()){const S=qe(f,he.value.trim());return Array.isArray(S)?S.length>0:S&&typeof S=="object"?Object.keys(S).length>0:S!=null&&S!==""}return!0},St=(f,g,S)=>{if(S&&S.stopPropagation(),!je(f,g))return;const F=V(f,g),z=new Set(B.value);z.has(F)?(z.delete(F),W("row-collapse",{data:f,index:g})):(z.add(F),W("row-expand",{data:f,index:g})),B.value=z},ut=(f,g)=>{if(!ge.value)return;const S=V(f,g);ae.value!==S&&(ae.value=S)},Ge=e.ref(null),_t=e.ref(0),Nt=e.ref([]),vt=f=>{if(ke.value==="single")return Ge.value===f.field?_t.value:0;{const g=Nt.value.find(S=>S.field===f.field);return g?g.order:0}},Lt=f=>{const g=vt(f);return{"dss-sort-active":g!==0,"dss-sort-asc":g===1,"dss-sort-desc":g===-1}},Ht=e.ref({}),Mt=e.ref(null),wl=e.ref(null),jl=220,El=e.ref(null),rl=e.computed(()=>te.value.find(f=>ce(f)===Mt.value)??null),ml=e.computed(()=>{if(!rl.value||rl.value.filter!=="range")return null;const f=rl.value,g=Mt.value,{min:S,max:F}=mn(f),z=f.filterMin??S,Qe=f.filterMax??F,Te=zl(g),Ft=Te.min??z,Le=Te.max??Qe,st=Qe-z,ne=st===0?0:(Ft-z)/st*100,ll=st===0?100:(Le-z)/st*100;return{rangeMin:z,rangeMax:Qe,currentMin:Ft,currentMax:Le,minPct:ne,maxPct:ll}}),un=e.ref(null),yl=e.ref("max");function ft(f){const g=un.value,S=ml.value;if(!g||!S)return;const F=g.getBoundingClientRect(),Qe=(f.clientX-F.left)/F.width*100,Te=(S.minPct+S.maxPct)/2;yl.value=Qe<Te?"min":"max"}function zl(f){return Ht.value[f]??{}}function Kl(f,g){Ht.value={...Ht.value,[f]:g}}function Hl(f){const g=Ht.value[f];return g?g.type==="string"?!!g.value?.trim():g.type==="range"?g.min!=null||g.max!=null:g.type==="dateRange"?!!(g.from||g.to):g.type==="list"?g.selected?.length>0:!1:!1}function Rn(f){const g={...Ht.value};delete g[f],Ht.value=g,Mt.value=null,wl.value=null}function Gl(){if(!Mt.value){wl.value=null;return}const f=El.value;if(!f)return;const g=f.querySelector(`.dss-table-filter-trigger[data-filter-column-key="${Mt.value}"]`);if(!g)return;const S=g.getBoundingClientRect();wl.value={top:S.bottom+6,left:Math.max(8,S.right-jl)}}const bn=e.computed(()=>{const f=String(Ct.value??"").trim().toLowerCase();return f?oe.data.filter(g=>te.value.some(S=>nn(Ce(g,S)).some(z=>String(z).toLowerCase().includes(f)))):oe.data}),Bn=e.computed(()=>{let f=[...bn.value];const g=(Ct.value??"").trim().toLowerCase();return g&&(f=f.filter(S=>oe.columns.some(F=>{if(!F||!F.field)return!1;const z=Ce(S,F);return String(z??"").toLowerCase().includes(g)}))),te.value.forEach(S=>{const F=ce(S),z=Ht.value[F];if(!z)return;const Qe=S.field;if(Qe){if(z.type==="string"&&z.value?.trim()){const Te=z.value.trim().toLowerCase();f=f.filter(Ft=>{const Le=Ce(Ft,S);return String(Le??"").toLowerCase().includes(Te)})}else if(z.type==="range")f=f.filter(Te=>{const Ft=qe(Te,Qe),Le=Number(Ft);return!(Number.isNaN(Le)||z.min!=null&&Le<z.min||z.max!=null&&Le>z.max)});else if(z.type==="dateRange"){const Te=z.from?new Date(z.from).getTime():null,Ft=z.to?new Date(z.to).getTime():null;f=f.filter(Le=>{const st=qe(Le,Qe),ne=st?new Date(st).getTime():NaN;return!(Number.isNaN(ne)||Te!=null&&ne<Te||Ft!=null&&ne>Ft)})}else if(z.type==="list"&&z.selected?.length){const Te=new Set(z.selected);f=f.filter(Ft=>nn(Ce(Ft,S)).some(st=>Te.has(st)))}}}),f});function nn(f){if(f==null)return[""];if(Array.isArray(f))return f.flatMap(nn);if(typeof f=="object"){const g=f?.label??f?.name??f?.value??f?.title;return[g!=null?String(g):String(f)]}return[String(f)]}function Rl(f){const g=new Set;return oe.data.forEach(S=>{nn(Ce(S,f)).forEach(z=>g.add(z))}),Array.from(g).sort((S,F)=>String(S).localeCompare(String(F)))}function dn(f,g){if(Mt.value===f){Mt.value=null,wl.value=null;return}if(Mt.value=f,g?.currentTarget){const S=g.currentTarget.getBoundingClientRect();wl.value={top:S.bottom+6,left:Math.max(8,S.right-jl)}}else Gl()}function Sl(f,g){Kl(f,{type:"string",value:g})}function mn(f){const g=f.field;if(!g)return{min:0,max:100};let S=1/0,F=-1/0;return oe.data.forEach(z=>{const Qe=qe(z,g),Te=Number(Qe);Number.isNaN(Te)||(S=Math.min(S,Te),F=Math.max(F,Te))}),{min:S===1/0?0:S,max:F===-1/0?100:F}}function Wl(f,g,S){const F={...zl(f),type:"range"},z=S===""?null:Number(S),Qe=z===null||Number.isNaN(z)?null:z;F[g]=Qe,Qe!=null&&(g==="min"&&F.max!=null&&Qe>F.max&&(F.max=Qe),g==="max"&&F.min!=null&&Qe<F.min&&(F.min=Qe)),Kl(f,F)}function pn(f,g,S){const F={...zl(f),type:"dateRange"};F[g]=S||"",Kl(f,F)}const on=e.reactive({});function il(f,g){on[f]=g}function jn(f){const g=ce(f),S=(on[g]??"").trim().toLowerCase(),F=Rl(f);return S?F.filter(z=>String(z).toLowerCase().includes(S)):F}function Fn(f,g){return(zl(f).selected??[]).includes(g!=null?String(g):"")}function ql(f,g){const F=[...zl(f).selected??[]],z=g!=null?String(g):"",Qe=F.indexOf(z);Qe>=0?F.splice(Qe,1):F.push(z),Kl(f,{type:"list",selected:F})}function vn(f){Mt.value&&!f.target.closest(".dss-table-filter-wrap")&&!f.target.closest(".dss-table-filter-dropdown")&&(Mt.value=null,wl.value=null)}function Ll(){Gl(),Kt.value&&Nl()}const In=f=>{if(!(f.sortable===!1||!Ke.value))if(ke.value==="single")Ge.value===f.field?_t.value=_t.value===1?-1:_t.value===-1?0:1:(Ge.value=f.field,_t.value=1),_t.value===0&&(Ge.value=null),W("sort",{field:Ge.value,order:_t.value});else{const g=Nt.value.findIndex(S=>S.field===f.field);g>=0?Nt.value[g].order===1?Nt.value[g].order=-1:Nt.value.splice(g,1):Nt.value.push({field:f.field,order:1}),W("sort",{multiSortMeta:Nt.value})}},fn=e.computed(()=>{if(!Ke.value)return Bn.value;let f=[...Bn.value];return ke.value==="single"&&Ge.value&&_t.value!==0?f.sort((g,S)=>{const F=qe(g,Ge.value),z=qe(S,Ge.value);return F===z?0:F==null?1:z==null?-1:(F<z?-1:F>z?1:0)*_t.value}):ke.value==="multiple"&&Nt.value.length>0&&f.sort((g,S)=>{for(const F of Nt.value){const z=qe(g,F.field),Qe=qe(S,F.field);if(z===Qe)continue;if(z==null)return 1;if(Qe==null)return-1;const Te=z<Qe?-1:z>Qe?1:0;if(Te!==0)return Te*F.order}return 0}),f}),cl=e.ref(0),jt=e.ref(rt.value),Kt=e.ref(!1),Yt=e.ref(null),Tl=e.ref(null),Tt=e.ref("bottom"),wt=e.ref(null),Vl=f=>{jt.value=f,Kt.value=!1,cl.value=0,W("page",{page:0,rows:jt.value})};function hn(f){Yt.value&&!Yt.value.contains(f.target)&&(Kt.value=!1)}function Nl(){const f=Yt.value,g=Tl.value;if(!f||!g)return;const S=f.querySelector(".dss-pagination-select-dropdown");if(!S)return;const F=g.getBoundingClientRect(),z=S.offsetHeight||0,Te=(window.innerHeight||document.documentElement.clientHeight)-F.bottom,Ft=F.top;Tt.value=Te<z+8&&Ft>Te?"top":"bottom",wt.value={width:`${Math.ceil(F.width)}px`,left:`${Math.max(0,Math.round(g.offsetLeft))}px`}}const gn=e.computed(()=>fn.value.length),Bl=e.computed(()=>Math.ceil(gn.value/jt.value)),Zl=e.computed(()=>Math.max(Bl.value,1)),an=e.computed(()=>gn.value===0?0:Gt.value+1),Dl=e.computed(()=>zn.value),Gt=e.computed(()=>Me.value?cl.value*jt.value:0),zn=e.computed(()=>Me.value?Math.min((cl.value+1)*jt.value,gn.value):gn.value),Pl=e.computed(()=>{if(!Me.value)return fn.value;const f=Gt.value,g=zn.value;return fn.value.slice(f,g)}),Dt=e.ref(new Set),Pn=e.computed(()=>fn.value.filter((f,g)=>Dt.value.has(V(f,g)))),tl=(f,g)=>{const S=He.value;return typeof S!="function"?!0:!!S(f,g)},_l=e.computed(()=>fn.value.map((f,g)=>({row:f,index:g})).filter(({row:f,index:g})=>tl(f,g))),yn=e.computed(()=>{const f=_l.value;return f.length===0?!1:f.every(({row:g,index:S})=>Dt.value.has(V(g,S)))}),sn=e.computed(()=>{const f=_l.value;if(f.length===0)return!1;const g=f.filter(({row:S,index:F})=>Dt.value.has(V(S,F))).length;return g>0&&g<f.length}),Fl=(f,g)=>Dt.value.has(V(f,g)),ul=()=>{if(yn.value)Dt.value=new Set,W("unselect-all");else{const f=new Set;_l.value.forEach(({row:g,index:S})=>f.add(V(g,S))),Dt.value=f,W("select-all",Pn.value)}},Ql=(f,g)=>{if(!tl(f,g))return;const S=V(f,g),F=new Set(Dt.value),z=F.has(S);U.value==="single"?z?(F.delete(S),W("row-unselect",f)):(F.clear(),F.add(S),W("row-select",f)):z?(F.delete(S),W("row-unselect",f)):(F.add(S),W("row-select",f)),Dt.value=F},Ul=e.ref("1"),k=()=>{const f=Number.parseInt(String(Ul.value),10);if(!Number.isFinite(f)){Ul.value=String(cl.value+1);return}const g=Math.min(Zl.value,Math.max(1,f));g!==cl.value+1?w(g-1):Ul.value=String(g)},w=f=>{f<0||f>=Bl.value||(cl.value=f,W("page",{page:f,rows:jt.value}))},E=(f,g,S)=>{W("row-click",{data:f,index:g,originalEvent:S}),ut(f,Gt.value+g)},j=(f,g)=>{const S=Gt.value+g;return{"dss-table-row-selected":Fl(f,S),"dss-table-row-even":g%2===0,"dss-table-row-odd":g%2!==0,"dss-table-row-truncated-clickable":ge.value,"dss-table-row-truncated-expanded":ae.value===V(f,S)}},Ce=(f,g)=>g.field?qe(f,g.field):"",qe=(f,g)=>g.split(".").reduce((S,F)=>S&&S[F],f),Ie=f=>{const g=f.align??_e.value;return{"dss-table-sortable":f.sortable!==!1&&Ke.value,"dss-table-align-left":g==="left","dss-table-align-center":g==="center","dss-table-align-right":g==="right",[f.className]:f.className}},at=f=>{const g={};return f.width&&(g.width=typeof f.width=="number"?`${f.width}px`:f.width),f.minWidth&&(g.minWidth=typeof f.minWidth=="number"?`${f.minWidth}px`:f.minWidth),f.maxWidth&&(g.maxWidth=typeof f.maxWidth=="number"?`${f.maxWidth}px`:f.maxWidth),g};return e.watch(()=>oe.locale,f=>{f&&f!==L.value&&(L.value=f)},{immediate:!0}),e.watch(rt,f=>{jt.value=f,cl.value=0}),e.watch(Kt,async f=>{f&&(await e.nextTick(),Nl())}),e.watch(cl,f=>{Ul.value=String(f+1)},{immediate:!0}),e.watch(Ct,f=>{W("search",f??"")}),e.watch(()=>oe.columns,()=>{if(re.value===null){el();return}const f=bt(oe.columnVisibility)??[];f.length!==oe.columnVisibility.length&&W("update:columnVisibility",f)},{immediate:!0,deep:!0}),e.onMounted(()=>{document.addEventListener("click",hn),document.addEventListener("click",sl),document.addEventListener("click",vn),window.addEventListener("resize",Ll),window.addEventListener("scroll",Ll,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",hn),document.removeEventListener("click",sl),document.removeEventListener("click",vn),window.removeEventListener("resize",Ll),window.removeEventListener("scroll",Ll,!0)}),(f,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"dss-table-container",ref_key:"tableContainerRef",ref:El,style:e.normalizeStyle({width:h.value+"px",height:we.value?we.value+"px":"auto"})},[pt.value?(e.openBlock(),e.createElementBlock("div",Hu,[e.createElementVNode("div",Ru,[Rt.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-btn",onClick:g[0]||(g[0]=S=>W("download-pdf"))},[g[22]||(g[22]=e.createStaticVNode('<span class="dss-table-toolbar-btn-icon" aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_download)"><path d="M16.59 9H15V4C15 3.45 14.55 3 14 3H10C9.45 3 9 3.45 9 4V9H7.41C6.52 9 6.07 10.08 6.7 10.71L11.29 15.3C11.68 15.69 12.31 15.69 12.7 15.3L17.29 10.71C17.92 10.08 17.48 9 16.59 9ZM5 19C5 19.55 5.45 20 6 20H18C18.55 20 19 19.55 19 19C19 18.45 18.55 18 18 18H6C5.45 18 5 18.45 5 19Z" fill="currentColor"></path></g><defs><clipPath id="clip0_download"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg></span>',1)),e.createTextVNode(" "+e.toDisplayString(e.unref(N)("table.downloadPdf")),1)])):e.createCommentVNode("",!0),ct.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-table-toolbar-btn",onClick:g[1]||(g[1]=S=>W("download-excel"))},[g[23]||(g[23]=e.createStaticVNode('<span class="dss-table-toolbar-btn-icon" aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_download_excel)"><path d="M16.59 9H15V4C15 3.45 14.55 3 14 3H10C9.45 3 9 3.45 9 4V9H7.41C6.52 9 6.07 10.08 6.7 10.71L11.29 15.3C11.68 15.69 12.31 15.69 12.7 15.3L17.29 10.71C17.92 10.08 17.48 9 16.59 9ZM5 19C5 19.55 5.45 20 6 20H18C18.55 20 19 19.55 19 19C19 18.45 18.55 18 18 18H6C5.45 18 5 18.45 5 19Z" fill="currentColor"></path></g><defs><clipPath id="clip0_download_excel"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg></span>',1)),e.createTextVNode(" "+e.toDisplayString(e.unref(N)("table.downloadExcel")),1)])):e.createCommentVNode("",!0),Xt.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-table-toolbar-column-visibility",ref_key:"columnVisibilityDropdownRef",ref:dl},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":Vt.value}]),onClick:g[2]||(g[2]=S=>Vt.value=!Vt.value),"aria-expanded":Vt.value,"aria-haspopup":"listbox"},[e.createTextVNode(e.toDisplayString(e.unref(N)("table.columnVisibility"))+" ",1),g[24]||(g[24]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,Fu),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",Iu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.columns,(S,F)=>(e.openBlock(),e.createElementBlock("li",{key:tt(S,F),role:"option",class:"dss-table-column-visibility-option",onClick:g[3]||(g[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",zu,[e.createElementVNode("span",Pu,[e.createElementVNode("input",{type:"checkbox",checked:Ve(S,F),onChange:z=>xt(S,F),class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,Ou),Ve(S,F)?(e.openBlock(),e.createElementBlock("span",Wu,[...g[25]||(g[25]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("span",qu,e.toDisplayString(S.header),1)])]))),128))],512),[[e.vShow,Vt.value]])]),_:1})],512)):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"header")]),e.createElementVNode("div",Zu,[ht.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-table-toolbar-search",{"dss-table-toolbar-search--expanded":Pt.value||Ct.value}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:pe,"onUpdate:modelValue":g[4]||(g[4]=S=>Ct.value=S),type:"text",class:"dss-table-toolbar-search-input",placeholder:e.unref(N)("table.searchPlaceholder"),"aria-label":e.unref(N)("table.searchTableAriaLabel"),onFocus:g[5]||(g[5]=S=>Pt.value=!0),onBlur:ie},null,40,Uu),[[e.vModelText,Ct.value]]),Ct.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-search-clear","aria-label":e.unref(N)("table.clearSearchAriaLabel"),onClick:fe},[...g[26]||(g[26]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])],8,Yu)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"dss-table-toolbar-search-trigger","aria-label":e.unref(N)("table.searchAriaLabel"),"aria-expanded":Pt.value||!!Ct.value,onMousedown:e.withModifiers(Y,["prevent"])},[...g[27]||(g[27]=[e.createElementVNode("span",{class:"dss-table-toolbar-search-icon","aria-hidden":"true"},[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.81738 0C7.47741 0.000327759 9.63379 2.09488 9.63379 4.67773C9.63366 5.68756 9.30172 6.62133 8.74121 7.38574L11.2324 9.80469C11.653 10.213 11.6528 10.8885 11.2324 11.2969C10.829 11.6886 10.1866 11.6886 9.7832 11.2969L7.16895 8.75781C6.47333 9.13671 5.67174 9.35439 4.81738 9.35449C2.15724 9.35449 -0.000652839 7.26049 -0.000976562 4.67773C-0.000976562 2.09468 2.15704 0 4.81738 0ZM4.81738 1.41895C2.96425 1.41895 1.46213 2.87754 1.46191 4.67676C1.46202 6.47611 2.96418 7.93555 4.81738 7.93555C6.67025 7.93519 8.17275 6.47589 8.17285 4.67676C8.17263 2.87776 6.67018 1.4193 4.81738 1.41895Z",fill:"currentColor"})])],-1)])],40,Xu)],2)):e.createCommentVNode("",!0),f.$slots["toolbar-extra"]?(e.openBlock(),e.createElementBlock("div",ju,[e.renderSlot(f.$slots,"toolbar-extra")])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-table-wrapper",{"dss-table-scrollable":lt.value}])},[e.createElementVNode("table",{class:e.normalizeClass(["dss-table",Fe.value])},[e.createElementVNode("thead",Ku,[e.createElementVNode("tr",null,[Xe.value?(e.openBlock(),e.createElementBlock("th",Gu,[U.value==="multiple"?(e.openBlock(),e.createElementBlock("span",Qu,[e.createElementVNode("input",{type:"checkbox",checked:yn.value,indeterminate:sn.value,onChange:ul,class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,Ju),sn.value?(e.openBlock(),e.createElementBlock("span",ed)):yn.value?(e.openBlock(),e.createElementBlock("span",td,[...g[28]||(g[28]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),K.value?(e.openBlock(),e.createElementBlock("th",{key:1,class:"dss-table-th dss-table-expansion-column","aria-label":e.unref(N)("table.expandRowAriaLabel")},null,8,ld)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(S,F)=>(e.openBlock(),e.createElementBlock("th",{key:ce(S),class:e.normalizeClass(["dss-table-th",Ie(S)]),style:e.normalizeStyle(at(S)),onClick:z=>In(S)},[e.createElementVNode("div",od,[e.createElementVNode("span",ad,e.toDisplayString(S.header),1),S.sortable!==!1&&Ke.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dss-table-sort-icon",Lt(S)])},[vt(S)===0?(e.openBlock(),e.createElementBlock("span",sd,[...g[29]||(g[29]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.413 9.06387C5.45434 9.16352 5.4652 9.27319 5.4442 9.37901C5.42321 9.48484 5.3713 9.58206 5.29505 9.65837L3.11339 11.84C3.06273 11.8907 3.00258 11.931 2.93637 11.9584C2.87016 11.9859 2.79918 12 2.72751 12C2.65583 12 2.58486 11.9859 2.51865 11.9584C2.45243 11.931 2.39228 11.8907 2.34163 11.84L0.159964 9.65837C0.0835992 9.58209 0.0315843 9.48487 0.0105038 9.37902C-0.0105768 9.27316 0.000224981 9.16343 0.0415416 9.06371C0.0828581 8.964 0.152832 8.87879 0.242604 8.81886C0.332376 8.75894 0.43791 8.72699 0.545845 8.72708H2.18209V0.545845C2.18209 0.401191 2.23955 0.262463 2.34184 0.160178C2.44413 0.0578925 2.58285 0.000429123 2.72751 0.000429123C2.87216 0.000429123 3.01089 0.0578925 3.11317 0.160178C3.21546 0.262463 3.27292 0.401191 3.27292 0.545845V8.72708H4.90917C5.01704 8.7271 5.12248 8.75911 5.21216 8.81906C5.30185 8.87901 5.37174 8.9642 5.413 9.06387ZM11.84 2.34162L9.65837 0.159963C9.60772 0.109252 9.54757 0.0690231 9.48135 0.0415755C9.41514 0.0141278 9.34417 0 9.27249 0C9.20082 0 9.12984 0.0141278 9.06363 0.0415755C8.99742 0.0690231 8.93727 0.109252 8.88661 0.159963L6.70495 2.34162C6.62858 2.4179 6.57657 2.51513 6.55549 2.62098C6.53441 2.72684 6.54521 2.83657 6.58653 2.93629C6.62784 3.036 6.69782 3.12121 6.78759 3.18114C6.87736 3.24107 6.9829 3.27301 7.09083 3.27292H8.72708V11.4542C8.72708 11.5988 8.78454 11.7375 8.88683 11.8398C8.98911 11.9421 9.12784 11.9996 9.27249 11.9996C9.41715 11.9996 9.55587 11.9421 9.65816 11.8398C9.76045 11.7375 9.81791 11.5988 9.81791 11.4542V3.27292H11.4542C11.5621 3.27301 11.6676 3.24107 11.7574 3.18114C11.8472 3.12121 11.9171 3.036 11.9585 2.93629C11.9998 2.83657 12.0106 2.72684 11.9895 2.62098C11.9684 2.51513 11.9164 2.4179 11.84 2.34162Z",fill:"#3a3a3a"})],-1)])])):vt(S)===1?(e.openBlock(),e.createElementBlock("span",rd,[...g[30]||(g[30]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M6 12C6.36819 12 6.66667 11.7015 6.66667 11.3333L6.66667 2.55333L8.58967 4.47098C8.84953 4.73012 9.27017 4.72983 9.52967 4.47033C9.78943 4.21057 9.78943 3.78943 9.52967 3.52967L6.70711 0.707106C6.31658 0.316582 5.68342 0.316582 5.29289 0.707107L2.47033 3.52967C2.21057 3.78943 2.21057 4.21057 2.47033 4.47033C2.72983 4.72983 3.15047 4.73012 3.41033 4.47098L5.33333 2.55333L5.33333 11.3333C5.33333 11.7015 5.63181 12 6 12Z",fill:"#7fa2cc"})],-1)])])):vt(S)===-1?(e.openBlock(),e.createElementBlock("span",id,[...g[31]||(g[31]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M6 -1.74846e-07C5.63181 -1.58751e-07 5.33333 0.298476 5.33333 0.666666L5.33333 9.44667L3.41033 7.52902C3.15047 7.26988 2.72983 7.27017 2.47033 7.52967C2.21057 7.78943 2.21057 8.21057 2.47033 8.47033L5.29289 11.2929C5.68342 11.6834 6.31658 11.6834 6.70711 11.2929L9.52967 8.47033C9.78943 8.21057 9.78943 7.78943 9.52967 7.52967C9.27017 7.27017 8.84953 7.26988 8.58967 7.52902L6.66667 9.44667L6.66667 0.666667C6.66667 0.298477 6.36819 -1.9094e-07 6 -1.74846e-07Z",fill:"#7fa2cc"})],-1)])])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),S.filter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-table-filter-wrap",{"dss-table-filter-wrap--open":Mt.value===ce(S)}]),onClick:g[6]||(g[6]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-table-filter-trigger",{"dss-table-filter-trigger--active":Hl(ce(S))}]),"data-filter-column-key":ce(S),"aria-expanded":Mt.value===ce(S),"aria-label":e.unref(N)("table.filterColumnAriaLabel"),onClick:z=>dn(ce(S),z)},[...g[32]||(g[32]=[e.createElementVNode("span",{class:"dss-table-filter-icon","aria-hidden":"true"},[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M11.7583 1.54409L11.7537 1.54928L7.84558 5.72226V8.92411C7.84581 9.07639 7.80836 9.22636 7.73658 9.36067C7.6648 9.49497 7.56091 9.60943 7.43417 9.69385L5.58772 10.9252C5.44858 11.0179 5.28688 11.071 5.11988 11.079C4.95288 11.087 4.78685 11.0494 4.63952 10.9704C4.49219 10.8914 4.36908 10.7738 4.28334 10.6303C4.1976 10.4868 4.15244 10.3226 4.15269 10.1555V5.72226L0.244567 1.54928L0.239951 1.54409C0.119785 1.41185 0.0405781 1.24758 0.0119374 1.0712C-0.0167033 0.894829 0.00645342 0.713935 0.0785984 0.550463C0.150743 0.386991 0.268776 0.247968 0.418378 0.150258C0.56798 0.0525488 0.742722 0.000352071 0.921405 0H11.0769C11.2557 1.73676e-05 11.4307 0.051972 11.5805 0.149551C11.7304 0.247131 11.8487 0.386134 11.9211 0.549673C11.9934 0.713211 12.0167 0.894244 11.9881 1.07078C11.9596 1.24731 11.8803 1.41174 11.7601 1.54409H11.7583Z",fill:"currentColor"})])],-1)])],10,cd)],2)):e.createCommentVNode("",!0)])],14,nd))),128))])]),e.createElementVNode("tbody",ud,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pl.value,(S,F)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V(S,Gt.value+F)},[e.createElementVNode("tr",{class:e.normalizeClass(["dss-table-tr",j(S,F)]),style:e.normalizeStyle(Q.value),onClick:z=>E(S,F,z)},[Xe.value?(e.openBlock(),e.createElementBlock("td",{key:0,class:"dss-table-td dss-table-selection-cell",onClick:g[7]||(g[7]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("span",md,[e.createElementVNode("input",{type:U.value==="multiple"?"checkbox":"radio",name:`dss-table-select-${_.tableId}`,checked:Fl(S,Gt.value+F),disabled:!tl(S,Gt.value+F),onChange:z=>Ql(S,Gt.value+F),class:e.normalizeClass(["dss-table-checkbox",U.value==="multiple"?"dss-table-checkbox--checkbox":"dss-table-checkbox--radio",{"dss-table-checkbox--disabled":!tl(S,Gt.value+F)}])},null,42,pd),U.value==="multiple"&&Fl(S,Gt.value+F)?(e.openBlock(),e.createElementBlock("span",vd,[...g[33]||(g[33]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):U.value==="single"&&Fl(S,Gt.value+F)?(e.openBlock(),e.createElementBlock("span",fd)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),K.value?(e.openBlock(),e.createElementBlock("td",{key:1,class:"dss-table-td dss-table-expansion-cell",onClick:e.withModifiers(z=>St(S,Gt.value+F,z),["stop"])},[je(S,Gt.value+F)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-expansion-trigger","aria-expanded":se(S,Gt.value+F),"aria-label":se(S,Gt.value+F)?e.unref(N)("table.collapseRowAriaLabel"):e.unref(N)("table.expandRowAriaLabel")},[e.createElementVNode("span",{class:e.normalizeClass(["dss-table-expansion-icon",{"dss-table-expansion-icon--expanded":se(S,Gt.value+F)}]),"aria-hidden":"true"},[...g[34]||(g[34]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10.1611 2.81093L5.99463 6.93546L1.82819 2.81093C1.4094 2.39636 0.732886 2.39636 0.314094 2.81093C-0.104698 3.22551 -0.104698 3.89522 0.314094 4.30979L5.24295 9.18907C5.66175 9.60364 6.33826 9.60364 6.75705 9.18907L11.6859 4.30979C12.1047 3.89522 12.1047 3.22551 11.6859 2.81093C11.2671 2.40699 10.5799 2.39636 10.1611 2.81093Z",fill:"#3a3a3a"})],-1)])],2)],8,gd)):(e.openBlock(),e.createElementBlock("span",yd))],8,hd)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(z,Qe)=>(e.openBlock(),e.createElementBlock("td",{key:ce(z),class:e.normalizeClass(["dss-table-td",Ie(z)]),style:e.normalizeStyle(at(z))},[e.renderSlot(f.$slots,`cell-${z.field}`,{data:S,column:z,rowIndex:F,isExpanded:ae.value===V(S,Gt.value+F)},()=>[e.createTextVNode(e.toDisplayString(Ce(S,z)),1)])],6))),128))],14,dd),K.value&&je(S,Gt.value+F)&&se(S,Gt.value+F)?(e.openBlock(),e.createElementBlock("tr",kd,[e.createElementVNode("td",{colspan:D.value,class:"dss-table-expansion-content-cell"},[e.renderSlot(f.$slots,"expansion",{data:S,rowIndex:F})],8,Cd)])):e.createCommentVNode("",!0)],64))),128)),Pl.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:"dss-table-empty",style:e.normalizeStyle(Q.value)},[e.createElementVNode("td",{colspan:D.value,class:"dss-table-empty-cell"},[e.renderSlot(f.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(kt.value),1)])],8,bd)],4))])],2)],2),et.value?(e.openBlock(),e.createElementBlock("div",wd,[e.createElementVNode("div",xd,[mt.value?(e.openBlock(),e.createElementBlock("span",Ed,e.toDisplayString(e.unref(N)("table.showingRange",{start:an.value,end:Dl.value,total:gn.value})),1)):(e.openBlock(),e.createElementBlock("span",Sd," "))]),e.createElementVNode("div",Vd,[xe.value?(e.openBlock(),e.createElementBlock("div",Nd,[e.createElementVNode("button",{class:"dss-pagination-btn",disabled:cl.value===0,onClick:g[8]||(g[8]=S=>w(0)),title:e.unref(N)("table.firstPage")},[...g[35]||(g[35]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"‹"),e.createElementVNode("span",null,"‹")],-1)])],8,Bd),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:cl.value===0,onClick:g[9]||(g[9]=S=>w(cl.value-1)),title:e.unref(N)("table.previousPage")}," ‹ ",8,_d),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[10]||(g[10]=S=>Ul.value=S),type:"text",class:"dss-pagination-page-input","aria-label":e.unref(N)("table.currentPageAriaLabel"),onBlur:k,onKeydown:e.withKeys(e.withModifiers(k,["prevent"]),["enter"])},null,40,Md),[[e.vModelText,Ul.value]]),e.createElementVNode("span",$d,e.toDisplayString(e.unref(N)("table.ofPages",{total:Zl.value})),1),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:cl.value>=Bl.value-1,onClick:g[11]||(g[11]=S=>w(cl.value+1)),title:e.unref(N)("table.nextPage")}," › ",8,Ld),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:cl.value>=Bl.value-1,onClick:g[12]||(g[12]=S=>w(Bl.value-1)),title:e.unref(N)("table.lastPage")},[...g[36]||(g[36]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"›"),e.createElementVNode("span",null,"›")],-1)])],8,Td)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Dd,[Jt.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-pagination-rows-per-page",ref_key:"rowsPerPageDropdownRef",ref:Yt},[e.createElementVNode("span",Ad,e.toDisplayString(e.unref(N)("table.rowsPerPage"))+":",1),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":Kt.value}]),onClick:g[13]||(g[13]=S=>Kt.value=!Kt.value),"aria-expanded":Kt.value,"aria-haspopup":"listbox",ref_key:"rowsPerPageTriggerRef",ref:Tl},[e.createTextVNode(e.toDisplayString(jt.value)+" ",1),g[37]||(g[37]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,Hd),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass(["dss-pagination-select-dropdown",{"dss-pagination-select-dropdown--top":Tt.value==="top"}]),style:e.normalizeStyle(wt.value),role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt.value,S=>(e.openBlock(),e.createElementBlock("li",{key:S,role:"option","aria-selected":S===jt.value,class:e.normalizeClass(["dss-pagination-select-option",{"dss-pagination-select-option--selected":S===jt.value}]),onClick:F=>Vl(S)},e.toDisplayString(S),11,Rd))),128))],6),[[e.vShow,Kt.value]])]),_:1})],512)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],4),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"dss-table-filter-dropdown dss-table-filter-dropdown--teleport",style:e.normalizeStyle(wl.value?{top:wl.value.top+"px",left:wl.value.left+"px",width:jl+"px"}:void 0),onClick:g[21]||(g[21]=e.withModifiers(()=>{},["stop"]))},[rl.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[rl.value.filter==="string"?(e.openBlock(),e.createElementBlock("div",Fd,[e.createElementVNode("input",{type:"text",value:zl(Mt.value).value??"",onInput:g[14]||(g[14]=S=>Sl(Mt.value,S.target.value)),class:"dss-table-filter-input",placeholder:e.unref(N)("table.search")},null,40,Id)])):rl.value.filter==="range"&&ml.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-table-filter-double-range",style:e.normalizeStyle({"--range-min-pct":ml.value.minPct+"%","--range-max-pct":ml.value.maxPct+"%"})},[e.createElementVNode("div",{ref_key:"doubleRangeTrackRef",ref:un,class:"dss-table-filter-double-range-track",onMousemove:ft,onMouseenter:ft},[e.createElementVNode("input",{type:"range",min:ml.value.rangeMin,max:ml.value.rangeMax,value:ml.value.currentMin,onInput:g[15]||(g[15]=S=>Wl(Mt.value,"min",S.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--min",style:e.normalizeStyle({zIndex:yl.value==="min"?2:1})},null,44,zd),e.createElementVNode("input",{type:"range",min:ml.value.rangeMin,max:ml.value.rangeMax,value:ml.value.currentMax,onInput:g[16]||(g[16]=S=>Wl(Mt.value,"max",S.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--max",style:e.normalizeStyle({zIndex:yl.value==="max"?2:1})},null,44,Pd)],544),e.createElementVNode("div",Od,e.toDisplayString(ml.value.currentMin)+" – "+e.toDisplayString(ml.value.currentMax),1)],4)):rl.value.filter==="dateRange"?(e.openBlock(),e.createElementBlock("div",Wd,[e.createElementVNode("div",qd,[e.createElementVNode("label",Zd,e.toDisplayString(e.unref(N)("table.filterFrom")),1),e.createElementVNode("input",{type:"date",value:zl(Mt.value).from??"",onInput:g[17]||(g[17]=S=>pn(Mt.value,"from",S.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,Ud)]),e.createElementVNode("div",Yd,[e.createElementVNode("label",Xd,e.toDisplayString(e.unref(N)("table.filterTo")),1),e.createElementVNode("input",{type:"date",value:zl(Mt.value).to??"",onInput:g[18]||(g[18]=S=>pn(Mt.value,"to",S.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,jd)])])):rl.value.filter==="list"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("input",{type:"text",value:on[Mt.value]??"",onInput:g[19]||(g[19]=S=>il(Mt.value,S.target.value)),class:"dss-table-filter-input dss-table-filter-list-search",placeholder:e.unref(N)("table.search")},null,40,Kd),e.createElementVNode("div",Gd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(jn(rl.value),S=>(e.openBlock(),e.createElementBlock("label",{key:S,class:"dss-table-filter-list-item"},[e.createElementVNode("input",{type:"checkbox",checked:Fn(Mt.value,S),onChange:F=>ql(Mt.value,S)},null,40,Qd),e.createElementVNode("span",null,e.toDisplayString(S),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Jd,[e.createElementVNode("button",{type:"button",class:"dss-table-filter-clear",onClick:g[20]||(g[20]=S=>Rn(Mt.value))},e.toDisplayString(e.unref(N)("table.clearFilter")),1)])],64)):e.createCommentVNode("",!0)],4),[[e.vShow,Mt.value&&rl.value&&wl.value]])]),_:1})]))],64))}}),l1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M6.008%2014V12.68H8.288V6.572L5.996%208.276V6.692L8.012%205.24H9.788V12.68H11.624V14H6.008Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",n1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M5.948%2014V12.548L8.684%209.8C9.068%209.408%209.352%209.056%209.536%208.744C9.72%208.424%209.812%208.096%209.812%207.76C9.812%207.352%209.7%207.036%209.476%206.812C9.252%206.58%208.948%206.464%208.564%206.464C8.14%206.464%207.808%206.588%207.568%206.836C7.328%207.076%207.208%207.412%207.208%207.844H5.708C5.716%207.284%205.836%206.804%206.068%206.404C6.308%205.996%206.644%205.68%207.076%205.456C7.508%205.232%208.012%205.12%208.588%205.12C9.14%205.12%209.62%205.224%2010.028%205.432C10.436%205.64%2010.752%205.932%2010.976%206.308C11.2%206.684%2011.312%207.132%2011.312%207.652C11.312%208.188%2011.172%208.712%2010.892%209.224C10.62%209.728%2010.18%2010.272%209.572%2010.856L7.748%2012.644H11.42V14H5.948Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",o1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.516%2014.12C7.948%2014.12%207.452%2014.016%207.028%2013.808C6.612%2013.6%206.288%2013.308%206.056%2012.932C5.824%2012.556%205.708%2012.112%205.708%2011.6H7.22C7.22%2011.992%207.332%2012.3%207.556%2012.524C7.788%2012.74%208.112%2012.848%208.528%2012.848C8.944%2012.848%209.264%2012.736%209.488%2012.512C9.712%2012.288%209.824%2011.984%209.824%2011.6V10.916C9.824%2010.524%209.712%2010.22%209.488%2010.004C9.264%209.78%208.944%209.668%208.528%209.668H7.544V8.312L9.476%206.524H6.104V5.24H11V6.596L8.528%208.864V8.384C9.392%208.384%2010.076%208.612%2010.58%209.068C11.084%209.524%2011.336%2010.14%2011.336%2010.916V11.6C11.336%2012.112%2011.22%2012.556%2010.988%2012.932C10.756%2013.308%2010.428%2013.6%2010.004%2013.808C9.58%2014.016%209.084%2014.12%208.516%2014.12Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",a1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M9.68%2014V12.26H5.78V10.088L9.152%205.24H10.832L7.22%2010.484V10.94H9.68V8.96H11.18V14H9.68Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",s1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.588%2014.12C7.78%2014.12%207.132%2013.92%206.644%2013.52C6.156%2013.112%205.888%2012.56%205.84%2011.864H7.34C7.372%2012.168%207.492%2012.404%207.7%2012.572C7.916%2012.732%208.212%2012.812%208.588%2012.812C9.004%2012.812%209.32%2012.704%209.536%2012.488C9.752%2012.264%209.86%2011.956%209.86%2011.564V10.712C9.86%2010.312%209.752%2010.008%209.536%209.8C9.32%209.584%209.004%209.476%208.588%209.476C8.332%209.476%208.112%209.528%207.928%209.632C7.744%209.736%207.604%209.88%207.508%2010.064H6.044L6.104%205.24H11.036V6.596H7.52L7.496%209.14H7.844L7.484%209.44C7.484%209.072%207.628%208.784%207.916%208.576C8.212%208.36%208.608%208.252%209.104%208.252C9.816%208.244%2010.368%208.46%2010.76%208.9C11.16%209.332%2011.36%209.936%2011.36%2010.712V11.564C11.36%2012.356%2011.112%2012.98%2010.616%2013.436C10.128%2013.892%209.452%2014.12%208.588%2014.12Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",r1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.6%2014.12C8.016%2014.12%207.5%2014%207.052%2013.76C6.612%2013.512%206.268%2013.168%206.02%2012.728C5.78%2012.28%205.66%2011.764%205.66%2011.18C5.66%2010.764%205.728%2010.328%205.864%209.872C6.008%209.416%206.204%208.988%206.452%208.588L8.516%205.24H10.184L7.592%209.32L7.664%209.368C7.824%209.12%208.04%208.932%208.312%208.804C8.584%208.676%208.888%208.612%209.224%208.612C9.696%208.612%2010.104%208.724%2010.448%208.948C10.792%209.172%2011.06%209.484%2011.252%209.884C11.444%2010.284%2011.54%2010.752%2011.54%2011.288C11.54%2011.856%2011.416%2012.352%2011.168%2012.776C10.928%2013.2%2010.588%2013.532%2010.148%2013.772C9.716%2014.004%209.2%2014.12%208.6%2014.12ZM8.6%2012.848C9.04%2012.848%209.396%2012.708%209.668%2012.428C9.94%2012.14%2010.076%2011.768%2010.076%2011.312C10.076%2010.84%209.94%2010.464%209.668%2010.184C9.396%209.896%209.04%209.752%208.6%209.752C8.16%209.752%207.804%209.896%207.532%2010.184C7.26%2010.464%207.124%2010.84%207.124%2011.312C7.124%2011.768%207.26%2012.14%207.532%2012.428C7.804%2012.708%208.16%2012.848%208.6%2012.848Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",i1={class:"dss-toolbar-left"},c1=["title"],u1=["title"],d1={class:"dss-toolbar-dropdown-wrapper"},m1=["title"],p1=["src"],v1=["src"],f1=["src"],h1=["src"],g1=["src"],y1=["src"],k1={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},C1=["src"],b1=["src"],w1=["src"],x1=["src"],E1=["src"],S1=["src"],V1=["title"],N1=["title"],B1=["title"],_1=["title"],M1=["title"],$1=["title"],L1=["title"],T1=["title"],D1=["title"],A1={key:2,class:"dss-toolbar-separator"},H1=["title"],R1={key:4,class:"dss-toolbar-separator"},F1={key:5,class:"dss-toolbar-dropdown-wrapper"},I1=["title"],z1={class:"dss-toolbar-dropdown-ai"},P1={class:"dss-toolbar-right"},O1={key:0,class:"dss-toolbar-custom-group"},W1={key:1,class:"dss-toolbar-separator"},q1={class:"dss-link-modal-content"},Z1={class:"dss-link-modal-field"},U1={class:"dss-link-modal-label"},Y1=["placeholder"],X1={class:"dss-link-modal-field"},j1={class:"dss-link-modal-label"},K1=["placeholder"],G1={class:"dss-image-modal-tabs"},Q1={key:0,class:"dss-image-tab-content"},J1={class:"dss-link-modal-content"},em={class:"dss-link-modal-field"},tm={key:0,class:"dss-link-modal-label"},lm=["src"],nm={class:"dss-link-modal-field"},om={class:"dss-link-modal-label"},am=["placeholder"],sm={class:"dss-link-modal-field"},rm={class:"dss-link-modal-label"},im=["placeholder"],cm={class:"dss-link-modal-field"},um={class:"dss-link-modal-label"},dm=["placeholder"],mm={key:1,class:"dss-image-tab-content"},pm={class:"dss-link-modal-content"},vm={class:"dss-link-modal-field"},fm={class:"dss-link-modal-label"},hm=["placeholder"],gm={class:"dss-link-modal-field"},ym={class:"dss-link-modal-label"},km=["placeholder"],Cm={class:"dss-link-modal-field"},bm={class:"dss-link-modal-label"},wm=["placeholder"],xm={class:"dss-link-modal-field"},Em={class:"dss-link-modal-label"},Sm=["placeholder"],Vm={class:"dss-text-editor-title-input-container"},Nm={key:0,class:"dss-text-editor-title-preview"},Bm={key:0},_m={key:1,class:"dss-text-editor-preview-placeholder"},Mm=["value","placeholder","disabled"],$m={key:3,class:"dss-text-editor-title-slot dss-text-editor-slot-last"},Lm={class:"dss-text-editor-description-input-container"},Tm={key:0,class:"dss-text-editor-description-preview"},Dm={key:0},Am={key:1,class:"dss-text-editor-preview-placeholder"},Hm=["value","placeholder","disabled"],Rm={key:5,class:"dss-text-editor-description-slot dss-text-editor-slot-last"},Fm=["data-comment-id","onMouseenter"],Im=["onClick"],zm=["src","alt"],Pm={key:1},Om=["onClick"],Wm=["src","alt"],qm={key:1},Zm=["data-has-second-user","onClick"],Um={class:"editor-comment-marker-count"},Ym={key:7,class:"dss-text-editor-textarea-wrapper"},Xm=["value","placeholder","rows","disabled"],jm={class:"dss-text-editor-footer"},Km={class:"dss-text-editor-footer-content"},Gm={class:"dss-text-editor-footer-stat"},Qm={class:"dss-text-editor-footer-stat"},Jm={key:8,class:"dss-text-editor-content-wrapper"},e2={key:0,class:"dss-comment-overlay-body"},t2={class:"dss-comment-selection-wrapper"},l2=["innerHTML"],n2={class:"dss-comment-messages-wrapper"},o2={key:0,class:"dss-comment-avatar-wrapper"},a2={class:"dss-comment-avatar"},s2=["src","alt"],r2={key:1},i2={class:"dss-comment-header"},c2={class:"dss-comment-header-text"},u2={class:"dss-comment-author"},d2={key:0,class:"dss-comment-date"},m2=["onClick","title"],p2={class:"dss-comment-overlay-inner"},v2=["placeholder","onKeydown"],f2={class:"dss-text-editor-footer"},h2={class:"dss-text-editor-footer-content"},g2={class:"dss-text-editor-footer-stat"},y2={class:"dss-text-editor-footer-stat"},k2=["title"],C2=["title"],b2={xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"512",height:"512",x:"0",y:"0",viewBox:"0 0 32 32",style:{"enable-background":"new 0 0 512 512"},"xml:space":"preserve",class:""},w2={class:"dss-image-popup-content"},x2={key:0,class:"dss-image-popup-no-alt-icon"},E2=["title"],S2=["title"],V2={xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"512",height:"512",x:"0",y:"0",viewBox:"0 0 32 32",style:{"enable-background":"new 0 0 512 512"},"xml:space":"preserve",class:""},N2={class:"dss-toolbar-left"},B2=["title"],_2=["title"],M2={class:"dss-toolbar-dropdown-wrapper"},$2=["title"],L2=["src"],T2=["src"],D2=["src"],A2=["src"],H2=["src"],R2=["src"],F2={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},I2=["title"],z2=["title"],P2=["title"],O2=["title"],W2=["title"],q2=["title"],Z2=["title"],U2=["title"],Y2=["title"],X2={key:2,class:"dss-toolbar-separator"},j2=["title"],K2={key:4,class:"dss-toolbar-separator"},G2={key:5,class:"dss-toolbar-dropdown-wrapper"},Q2=["title"],J2={class:"dss-toolbar-dropdown-ai"},ep={key:0,class:"dss-toolbar-right"},tp={key:0,class:"dss-toolbar-separator"},lp={key:0,class:"dss-toolbar-custom-group"},np={key:1,class:"dss-toolbar-separator"},op={name:"DSSTextEditor"},ap=Object.assign(op,{props:{modelValue:{type:String,default:""},title:{type:String,default:""},description:{type:String,default:""},titlePlaceholder:{type:String,default:null},descriptionPlaceholder:{type:String,default:null},placeholder:{type:String,default:null},rows:{type:Number,default:10},fullHeight:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},richText:{type:Boolean,default:!1},border:{type:Boolean,default:!0},rounded:{type:Boolean,default:!1},fixedHeight:{type:Boolean,default:!1},options:{type:Object,default:()=>({}),validator:_=>typeof _=="object"&&_!==null},floatingToolbar:{type:Boolean,default:!1},askAi:{type:Boolean,default:!1},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},commentUser:{type:Object,default:null},customToolbarSlots:{type:Array,default:()=>["custom-tool-1","custom-tool-2","custom-tool-3"]},customToolbarFloatingMap:{type:Object,default:()=>({}),validator:_=>typeof _=="object"&&_!==null},locale:{type:String,default:null},comments:{type:Array,default:()=>[]}},emits:["update:modelValue","update:title","update:description","update:comments","change","blur","title-change","description-change","comment-submitted","comment-marker-clicked","comment-deleted"],setup(_,{expose:J,emit:N}){const{t:L,locale:oe}=ho.useI18n(),W={h1:l1,h2:n1,h3:o1,h4:a1,h5:s1,h6:r1},A=_,de=N,dt=e.useSlots(),ee=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
96
+ `,cl.value){t+=`Category,Segment,Value
97
+ `,zn.value.forEach(q=>{q.segments.forEach(A=>{const z=String(q.label||"").replace(/"/g,'""'),T=String(A.label||"").replace(/"/g,'""');t+=`"${z}","${T}",${A.value}
98
+ `})});const h=new Blob([t],{type:"text/csv;charset=utf-8;"}),E=URL.createObjectURL(h),S=document.createElement("a");S.href=E,S.download=Gl("csv"),document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(E),Sn();return}t+="Category",Z.series.forEach(h=>{const E=h.name.replace(/"/g,'""');t+=',"'+E+'"'}),t+=`
99
+ `;const a=Math.max(...Z.series.map(h=>h.data?.length||0));for(let h=0;h<a;h++){let q='"'+(Z.categories[h]||N("chart.fallback.item",{number:h+1})).toString().replace(/"/g,'""')+'"';Z.series.forEach(A=>{const z=A.data&&A.data[h]!==void 0?A.data[h]:"";q+=","+z}),t+=q+`
100
+ `}const l=new Blob([t],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(l),p=document.createElement("a");p.href=r,p.download=Gl("csv"),document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(r),Sn()}catch(t){console.error("Error downloading CSV:",t)}},la=t=>{if(typeof t.action=="function"){const a={series:Z.series,categories:Z.categories,markers:Zt.value},l={chartX:Qe.value.chartX,chartY:Qe.value.chartY,dataX:Qe.value.mouseDataX,dataY:Qe.value.mouseDataY,categoryIndex:clampedCategoryIndex||Qe.value.categoryIndex};t.action(a,l)}Sn()},Ha=()=>{Al(),Oe.value.show=!0,Oe.value.categoryIndex=Qe.value.categoryIndex,Oe.value.fromButton=!1,Sn()},na=()=>{Al(),Oe.value.show=!0,Oe.value.categoryIndex=0,Oe.value.fromButton=!0},wa=t=>{if(Qe.value.show){const a=document.querySelector(".dss-context-menu");a&&!a.contains(t.target)&&(Qe.value.show=!1)}},xa=t=>{Qe.value.show&&!t.target.closest(".context-menu")&&(Qe.value.show=!1)},Ra=t=>{if(!Bl.value||!gt.value||cl.value)return;t.preventDefault(),t.stopPropagation(),Q.value.isZooming=!0,Ve.value.show=!1,Q.value.zoomTimeout&&clearTimeout(Q.value.zoomTimeout);const l=t.currentTarget.getBoundingClientRect(),r=t.clientX-l.left,p=t.clientY-l.top;if(r<P.value.left-50||r>P.value.right+50||p<P.value.top-50||p>P.value.bottom+100){Q.value.isZooming=!1;return}const h=t.deltaY>0?.9:1.1,E=Math.max(Q.value.minScale,Math.min(Q.value.maxScale,Q.value.scale*h));if(E!==Q.value.scale){const{minX:S,maxX:q}=Vt.value,A=q-S||1,z=A/Q.value.scale,T=S-Q.value.offsetX/P.value.width*A,K=(r-P.value.left)/P.value.width,Be=T+K*z;Q.value.scale=E;const We=A/Q.value.scale,pe=Be-K*We;Q.value.offsetX=-(pe-S)/A*P.value.width,Q.value.scale<=1.01&&(Q.value.scale=1,Q.value.offsetX=0)}Q.value.zoomTimeout=setTimeout(()=>{Q.value.isZooming=!1,Q.value.zoomTimeout=null},300)},ia=t=>{if(!Bl.value||!gt.value||Q.value.scale<=1)return;Ve.value.show=!1;const l=t.currentTarget.getBoundingClientRect();t.clientX-l.left,t.clientY-l.top,Q.value.isDragging=!0,Q.value.lastMouseX=t.clientX,Q.value.lastMouseY=t.clientY,t.preventDefault()},Ea=()=>{Q.value.isDragging=!1},aa=()=>{!Bl.value||!gt.value||(Q.value.scale=1,Q.value.offsetX=0,Q.value.isDragging=!1,Q.value.zoomTimeout&&(clearTimeout(Q.value.zoomTimeout),Q.value.zoomTimeout=null),Q.value.isZooming=!1)},no=()=>!Bl.value||!ye.value||!gt.value?"default":Q.value.isDragging?"grabbing":Q.value.scale>1?"grab":"dss-crosshair",ca=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 a=`M ${t[0].x} ${t[0].y}`;for(let l=0;l<t.length-1;l++){const r=t[Math.max(l-1,0)],p=t[l],h=t[l+1],E=t[Math.min(l+2,t.length-1)],S=p.x+(h.x-r.x)/6*el.value,q=p.y+(h.y-r.y)/6*el.value,A=h.x-(E.x-p.x)/6*el.value,z=h.y-(E.y-p.y)/6*el.value;a+=` C ${S} ${q} ${A} ${z} ${h.x} ${h.y}`}return a},Nl=e.computed(()=>{const a=U.value?.chart?.padding,l=typeof a=="number"?a:null,r=a&&typeof a=="object"?a:null,p=50;let h=p+(Tt.value?30:0)+60;if(il.value){const T={left:p+40,top:p+40,right:p+40,bottom:p+40};return l!=null?{left:l,top:l,right:l,bottom:l}:r?{left:r.left??T.left,top:r.top??T.top,right:r.right??T.right,bottom:r.bottom??T.bottom}:T}if(Cl.value){const T=!ve.value,K=Vl.value,Be=K?wn.value+on.value+Math.max(24,gn.value+16):0,We=T?12:p;let pe=0;Ke.value&&(pe+=T?8:15),Je.value&&(pe+=T?6:10);const be=Me();let Ee=We+(T?4:16)+(K?Be:0),de=We+(K?Be:0);ve.value&&Re.value==="left"?Ee+=be.legendWidth||150:ve.value&&Re.value==="right"&&(de+=be.legendWidth||150);const ze=xe.value==="semi-radial"?K?Be:8:K?Be:T?8:p+80,Le=K?14:0,_e=We+pe+Le,Ie={left:Ee,top:_e,right:de,bottom:ze};return l!=null?{left:l,top:l,right:l,bottom:l}:r?{left:r.left??Ie.left,top:r.top??Ie.top,right:r.right??Ie.right,bottom:r.bottom??Ie.bottom}:Ie}let E=0;Ke.value&&(E+=15),Je.value&&(E+=10);const S=Me();let q=p+16+(at.value?30:0),A=p+(ct.value?30:0);ve.value&&Re.value==="left"?q+=S.legendWidth||150:ve.value&&Re.value==="right"&&(A+=S.legendWidth||150),In.value&&(A+=44),xe.value==="stepbar"&&(h=tl.value+8);const z={left:q,top:p+E,right:A,bottom:h};return l!=null?{left:l,top:l,right:l,bottom:l}:r?{left:r.left??z.left,top:r.top??z.top,right:r.right??z.right,bottom:r.bottom??z.bottom}:z}),P=e.computed(()=>({left:Nl.value.left,top:Nl.value.top,right:$e.value-Nl.value.right,bottom:it.value-Nl.value.bottom,width:$e.value-(Nl.value.left+Nl.value.right),height:it.value-(Nl.value.top+Nl.value.bottom)})),Bl=e.computed(()=>["line","area","bar","stepbar"].includes(xe.value)||Lt.value),ql=e.computed(()=>Lt.value),Yn=e.computed(()=>xe.value==="mini-radial"),Cl=e.computed(()=>["radial","semi-radial","mini-radial"].includes(xe.value)),il=e.computed(()=>xe.value==="spider"),Ft=e.computed(()=>xe.value==="bubble"),cl=e.computed(()=>xe.value==="stepbar");e.watch([R,cl,()=>Z.series],()=>{e.nextTick(rt)},{deep:!0});const ul=e.computed(()=>U.value?.chart?.orientation==="horizontal"&&(xe.value==="bar"||ql.value)),Bn=t=>{const{minY:a,maxY:l}=Vt.value,r=l-a||1;return P.value.left+(t-a)/r*P.value.width},Rn=t=>{const{maxX:a}=Vt.value,l=a+1,p=P.value.height/l;return P.value.top+(t+.5)*p},It=e.computed(()=>Cl.value?Nl.value.left+($e.value-Nl.value.left-Nl.value.right)/2:$e.value/2),Mt=e.computed(()=>il.value?it.value/2-40:Cl.value?Nl.value.top+(it.value-Nl.value.top-Nl.value.bottom)/2:it.value/2),nt=e.computed(()=>{if(il.value){const t=P.value.width-80,a=P.value.height-80;return Math.min(t,a)/2}return Math.min(P.value.width,P.value.height)/2}),pl=e.computed(()=>{const t=U.value,a=t?.plotOptions?.radialBar?.innerRadiusRatio??t?.radialBar?.innerRadiusRatio,l=typeof a=="number"&&a>=0&&a<=1?a:.45;return nt.value*l}),Fn=e.computed(()=>{const t=U.value,a=typeof Z.innerSize=="number"?Z.innerSize:t?.innerSize;return typeof a!="number"||a<=-100||!(Cl.value||il.value)?1:1+a/100}),ua=e.computed(()=>{const t=Fn.value;if(t===1||t<=0)return;const a=It.value,l=Mt.value;return`translate(${a}, ${l}) scale(${t}) translate(${-a}, ${-l})`}),oa=e.ref(0),da=e.computed(()=>`semi-radial-fill-clip-${Z.chartId}`),_n=e.computed(()=>xe.value==="semi-radial"),o=e.computed(()=>_n.value&&wl.value&&!On.value),n=e.computed(()=>_n.value&&wl.value&&!On.value&&mn.value==="fill"),s=e.computed(()=>{const t=o.value?oa.value:1,a=It.value,l=Mt.value,r=pl.value,p=nt.value,h=Math.PI,E=Math.PI+t*Math.PI;if(t<=0)return`M ${a} ${l} L ${a} ${l} Z`;const S=a+p*Math.cos(h),q=l+p*Math.sin(h),A=a+p*Math.cos(E),z=l+p*Math.sin(E),T=a+r*Math.cos(E),K=l+r*Math.sin(E),Be=a+r*Math.cos(h),We=l+r*Math.sin(h),pe=t>.5?1:0;return`M ${a} ${l} L ${S} ${q} A ${p} ${p} 0 ${pe} 1 ${A} ${z} L ${T} ${K} A ${r} ${r} 0 ${pe} 1 ${Be} ${We} Z`}),i=e.computed(()=>{if(!(!_n.value||!o.value)&&!n.value)return`url(#${da.value})`}),c=t=>{if(!(!n.value||t!==0))return`url(#${da.value})`},m=e.ref(0),u=e.computed(()=>`radial-reveal-clip-${Z.chartId}`),v=e.computed(()=>xe.value==="radial"),y=e.computed(()=>{const t=v.value?m.value:1,a=It.value,l=Mt.value,r=Math.max(nt.value*1.5,$e.value,it.value);if(t<=0)return`M ${a} ${l} L ${a} ${l} Z`;if(t>=1){const T=a-r,K=a+r;return`M ${T} ${l} A ${r} ${r} 0 0 1 ${K} ${l} A ${r} ${r} 0 0 1 ${T} ${l} Z`}const p=-Math.PI/2,h=p+t*Math.PI*2,E=a+r*Math.cos(p),S=l+r*Math.sin(p),q=a+r*Math.cos(h),A=l+r*Math.sin(h),z=t>=.5?1:0;return`M ${a} ${l} L ${E} ${S} A ${r} ${r} 0 ${z} 1 ${q} ${A} Z`}),w=e.computed(()=>{if(i.value)return i.value;if(v.value)return`url(#${u.value})`});let I=null;const O=()=>{if(!o.value)return;oa.value=0;const t=zl.value,a=performance.now(),l=r=>{const p=r-a,h=Math.min(1,p/t);oa.value=vo(ln.value,h),h<1&&(I=requestAnimationFrame(l))};I=requestAnimationFrame(l)},D=e.computed(()=>U.value?.bubbles?.minSize||8),ce=e.computed(()=>U.value?.bubbles?.maxSize||50),le=e.computed(()=>U.value?.bubbles?.opacity||.7),Pe=(t,a)=>{const l=[15,20,25,18,22],r=l[t%l.length]||20,p=1+Math.sin(a*.5)*.2;return Math.max(5,r*p)},De=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.opacity="1")},vt=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.display="none")},Ot=e.computed(()=>Z.series),zt=e.computed(()=>Z.series.filter((t,a)=>!_.value.has(a))),Gt=t=>{if(!t)return"primary";const a=t.yAxis??t.axis??t.yAxisId;return a==="secondary"||a==="right"||a===1?"secondary":"primary"},dl=t=>t?typeof t.strokeDasharray=="string"?t.strokeDasharray:Array.isArray(t.strokeDasharray)?t.strokeDasharray.join(","):t.dotted===!0?"4,4":null:null,At=t=>t?t.old===!0||t.comparison===!0||t.dotted===!0:!1,Qt=e.computed(()=>{const a=U.value?.spider?.comparison||{};return{fillOpacity:typeof a.fillOpacity=="number"?a.fillOpacity:0,strokeDasharray:a.strokeDasharray||"6,4",usePrimaryColor:a.usePrimaryColor!==!1,bubbleSize:typeof a.bubbleSize=="number"?a.bubbleSize:0}}),rn=(t,a)=>typeof t?.bubbles?.size=="number"?t.bubbles.size:typeof t?.bubbleSize=="number"?t.bubbleSize:a?Qt.value.bubbleSize:ie.value,kn=(t,a)=>At(t)&&Qt.value.usePrimaryColor?Jt(0):Jt(a),Il=(t,a)=>il.value&&At(t)?kn(t,a):Jt(a),Sa=e.computed(()=>zt.value.filter(t=>Gt(t)==="primary")),Va=e.computed(()=>zt.value.filter(t=>Gt(t)==="secondary")),In=e.computed(()=>!ul.value&&!!pt.value&&Va.value.length>0),Na=(t,a=0)=>{const l=Number(t);return Number.isFinite(l)?l:a},yo=(t,a,l)=>{if(!Array.isArray(t))return[];const r=t.map((p,h)=>{const E=p&&typeof p=="object"&&!Array.isArray(p),S=Na(E?p.value:p,0);return S<=0?null:{key:`${l}-${h}-${E&&p.label||h}`,label:E?p.label||a?.name||`Segment ${h+1}`:a?.name||`Segment ${h+1}`,value:S,color:E?p.color||Jt(h):Jt(l),marker:E?p.marker:null,isRemainder:!1}}).filter(Boolean);return ae.value==="asc"?r.sort((p,h)=>p.value-h.value):ae.value==="desc"?r.sort((p,h)=>h.value-p.value):r},Fa=(t,a,l,r)=>{const p=t&&typeof t=="object"&&!Array.isArray(t),h=p?t.segments:Array.isArray(t)?t:[{label:l?.name,value:t,color:Jt(r)}],E=yo(h,l,r),S=E.reduce((T,K)=>T+K.value,0),q=Na(p?t.totalValue??t.total??l?.totalValue??l?.total:l?.totalValue??l?.total,oe.value),A=Math.max(q,S,1);Ue.value&&A>S&&E.push({key:`${r}-${a}-remainder`,label:bt.value,value:A-S,color:ot.value,marker:null,isRemainder:!0});const z=E.filter(T=>!T.isRemainder).reduce((T,K)=>!T||K.value>T.value?K:T,null);return{key:`${r}-${a}`,label:p?t.label||t.name||Z.categories?.[a]||N("chart.fallback.item",{number:a+1}):Z.categories?.[a]||N("chart.fallback.item",{number:a+1}),axisLabel:p?t.xLabel??t.label??t.name??Z.categories?.[a]??N("chart.fallback.item",{number:a+1}):Z.categories?.[a]||N("chart.fallback.item",{number:a+1}),yLabel:p?t.yLabel??null:null,totalValue:A,usedValue:S,segments:E,maxSegmentKey:z?.key||null,seriesName:l?.name||"",seriesIndex:r}},zn=e.computed(()=>{if(!cl.value)return[];const t=[];return Ot.value.forEach((a,l)=>{_.value.has(l)||!Array.isArray(a?.data)||a.data.forEach(r=>{const p=Fa(r,t.length,a,l);p.segments.length>0&&t.push(p)})}),t}),Dl="auto",cn=(t,a,l,r=0,p=100)=>{let h=1/0,E=-1/0;if(t.forEach(A=>{A?.data?.length&&A.data.forEach(z=>{typeof z=="number"&&Number.isFinite(z)&&(h=Math.min(h,z),E=Math.max(E,z))})}),h===1/0)return{minY:r,maxY:p};let S;if(a===Dl){const A=E-h,z=A>0?A*.1:1;S=Math.max(0,h-z)}else if(typeof a=="number")S=a;else{const A=E-h,z=A>0?A*.1:1;S=Math.max(0,h-z)}let q;if(l===Dl){const A=E-h,z=A>0?A*.1:2;q=E+z}else if(typeof l=="number")q=l;else{const A=E-h,z=A>0?A*.1:2;q=E+z}return{minY:S,maxY:q}},Vt=e.computed(()=>{if(Ft.value)return Wo();if(cl.value)return Ql();if(!zt.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=0;zt.value.forEach(l=>{l.data&&l.data.length&&(t=Math.max(t,l.data.length-1))}),Z.categories.length>0&&(t=Math.max(t,Z.categories.length-1));const a=cn(Sa.value.length?Sa.value:zt.value,Ut.value,ht.value);return{minX:0,maxX:t,minY:a.minY,maxY:a.maxY}}),Ql=()=>{const t=zn.value,a=t.reduce((h,E)=>Math.max(h,E.totalValue),oe.value),l=typeof Ut.value=="number"?Ut.value:0,r=typeof ht.value=="number"?ht.value:a,p=Math.max(r,l+1);return{minX:0,maxX:Math.max(t.length-1,0),minY:l,maxY:p}},ao=e.computed(()=>In.value?cn(Va.value,Rt.value,me.value,Vt.value.minY,Vt.value.maxY):{minY:Vt.value.minY,maxY:Vt.value.maxY}),Wo=()=>{if(!zt.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,a=-1/0,l=1/0,r=-1/0,p=1/0,h=-1/0,E=!1;if(zt.value.forEach((Be,We)=>{Be?.data?.length&&Be.data.forEach((pe,be)=>{let Ee,de,je;if(typeof pe=="object"&&pe!==null&&!Array.isArray(pe))Ee=typeof pe.x=="number"?pe.x:be,de=typeof pe.y=="number"?pe.y:0,je=typeof pe.size=="number"?pe.size:20;else if(Array.isArray(pe)&&pe.length>=3)Ee=typeof pe[0]=="number"?pe[0]:be,de=typeof pe[1]=="number"?pe[1]:0,je=typeof pe[2]=="number"?pe[2]:20;else if(typeof pe=="number")Ee=be,de=pe,je=Pe(We,be);else return;isFinite(Ee)&&isFinite(de)&&isFinite(je)&&(t=Math.min(t,Ee),a=Math.max(a,Ee),l=Math.min(l,de),r=Math.max(r,de),p=Math.min(p,je),h=Math.max(h,je),E=!0)})}),!E)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===a&&(t=Math.min(t,0),a=Math.max(a,Z.categories?.length-1||8)),l===r&&(l=Math.max(0,l-10),r=l+20);const S=a-t,q=r-l;let A,z,T,K;return F.value!==null?A=F.value:A=t-S*.1,Y.value!==null?z=Y.value:z=a+S*.1,Ut.value!==null&&typeof Ut.value=="number"?T=Ut.value:T=Math.max(0,l-q*.1),ht.value!==null&&typeof ht.value=="number"?K=ht.value:K=r+q*.1,{minX:A,maxX:z,minY:T,maxY:K,minSize:p,maxSize:h}},fl=t=>{if(Ft.value){const{minX:S,maxX:q}=Vt.value,A=q-S||1;return P.value.left+(t-S)/A*P.value.width}const{minX:a,maxX:l}=Vt.value,r=l-a;if(l===0||r===0)return P.value.left+P.value.width/2;const p=r/Q.value.scale,h=a-Q.value.offsetX/P.value.width*r,E=(t-h)/p;return P.value.left+E*P.value.width},Xn=t=>{const{minY:a,maxY:l}=Vt.value,r=l-a||1;return P.value.bottom-(t-a)/r*P.value.height},ko=t=>{const{minY:a,maxY:l}=ao.value,r=l-a||1;return P.value.bottom-(t-a)/r*P.value.height},Cn=(t,a)=>In.value&&Gt(t)==="secondary"?ko(a):Xn(a),qo=t=>{if(!Ft.value)return ie.value||4;const{maxSize:a}=Vt.value,l=Math.max(1,a),r=Math.min(1,Math.max(0,t/l));return D.value+r*(ce.value-D.value)},ma=(t,a=12,l="Arial, sans-serif")=>{if(typeof t!="string"||!t)return 0;if(typeof document>"u")return t.length*(a*.62);ma.canvas||(ma.canvas=document.createElement("canvas"));const r=ma.canvas.getContext("2d");return r?(r.font=`${a}px ${l}`,r.measureText(t).width):t.length*(a*.62)},Co=(t,a,l=12)=>{if(typeof t!="string"||typeof a!="number"||a<=0||ma(t,l)<=a)return t;const r="..";if(ma(r,l)>=a)return r;let h=t.length;for(;h>0;){const E=`${t.slice(0,h)}${r}`;if(ma(E,l)<=a)return E;h-=1}return r},Zo=e.computed(()=>so.value.map(t=>({y:t.y}))),bo=e.computed(()=>!cl.value||!_t.value?[]:so.value.map(t=>({y:t.y}))),oo=e.computed(()=>{if(Ft.value)return Uo();if(cl.value)return[];if(xe.value==="bar"){if(ul.value){const _e=[],{minY:Ie,maxY:Bt}=Vt.value,Pt=5,Jl=Bt-Ie||1;for(let hl=0;hl<=Pt;hl++){const en=Ie+Jl*(hl/Pt),Wa=Bn(en);_e.push({x:Wa,y:P.value.bottom+20,text:xl(Math.round(en))})}return _e}const be=[],{maxX:Ee}=Vt.value,de=Ee+1,je=5,Le=(P.value.width-je*2)/de;for(let _e=0;_e<=Ee;_e++){const Ie=P.value.left+je+(_e+.5)*Le;be.push({x:Ie,y:P.value.bottom+20,text:Co(Z.categories[_e]||N("chart.fallback.item",{number:_e+1}),Math.max(Le-8,24))})}return be}const t=[],{minX:a,maxX:l}=Vt.value,r=F.value!==null?F.value:a,p=Y.value!==null?Y.value:l,h=p-r||1,E=h/Q.value.scale,S=r-Q.value.offsetX/P.value.width*h,q=S+E,A=Math.max(0,Math.floor(S-2)),z=Math.min(p,Math.ceil(q+2)),T=z-A,K=P.value.width,We=Math.floor(K/60);let pe=1;T>We&&(pe=Math.ceil(T/We));for(let be=A;be<=z;be+=pe)if(be>=0&&be<=p){const Ee=fl(be);Ee>=P.value.left-100&&Ee<=P.value.right+100&&t.push({x:Ee,y:P.value.bottom+20,text:Z.categories[be]||`Item ${be+1}`})}return t}),Uo=()=>{const t=[],{minX:a,maxX:l}=Vt.value,r=l-a||1,p=Math.min(8,Math.max(4,Math.floor(P.value.width/80)));for(let h=0;h<=p;h++){const E=a+r*h/p,S=fl(E);if(S>=P.value.left-10&&S<=P.value.right+10){const q=Math.round(E),A=Z.categories?.[q];t.push({x:S,y:P.value.bottom+20,text:A||(Number.isInteger(E)?E.toString():E.toFixed(1))})}}return t},so=e.computed(()=>{if(ul.value){const p=[],{maxX:h}=Vt.value;for(let E=0;E<=h;E++)p.push({x:P.value.left-10,y:Rn(E),text:Co(Z.categories[E]||`Item ${E+1}`,Math.max(P.value.left-28,40))});return p}const t=[],{minY:a,maxY:l}=Vt.value,r=5;for(let p=0;p<=r;p++){const h=a+(l-a)*(p/r),E=Math.round(h);t.push({x:P.value.left-10,y:Xn(h),text:xl(E)})}return t}),Yo=e.computed(()=>{if(!In.value||ul.value)return[];const t=[],{minY:a,maxY:l}=ao.value,r=5;for(let p=0;p<=r;p++){const h=a+(l-a)*(p/r),E=Math.round(h);t.push({x:P.value.right+10,y:ko(h),text:xl(E)})}return t}),Jt=t=>{const a=V.value;if(!a||a.length===0){const l=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return l[t%l.length]}return a[t%a.length]},Xo=t=>{if(!t||typeof t!="string")return"#3a3a3a";const a=t.trim();let l=0,r=0,p=0;const h=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(h)l=Number(h[1])/255,r=Number(h[2])/255,p=Number(h[3])/255;else{const S=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(S)l=Number(S[1])/255,r=Number(S[2])/255,p=Number(S[3])/255;else{const q=a.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(q){let A=q[1];A.length===3&&(A=A[0]+A[0]+A[1]+A[1]+A[2]+A[2]),l=parseInt(A.slice(0,2),16)/255,r=parseInt(A.slice(2,4),16)/255,p=parseInt(A.slice(4,6),16)/255}else if(typeof document<"u"){const A=document.createElement("span");A.style.color=a,A.style.display="none",document.body.appendChild(A);const z=getComputedStyle(A).color;document.body.removeChild(A);const T=z.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(T)l=Number(T[1])/255,r=Number(T[2])/255,p=Number(T[3])/255;else return"#3a3a3a"}else return"#3a3a3a"}}return .2126*l+.7152*r+.0722*p>.5?"#3a3a3a":"#fafafa"},ro=t=>{if(!t||typeof t!="string")return t;const a=t.trim(),l=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(l){const h=Math.max(0,Math.floor(Number(l[1])*.65)),E=Math.max(0,Math.floor(Number(l[2])*.65)),S=Math.max(0,Math.floor(Number(l[3])*.65));return`rgb(${h}, ${E}, ${S})`}const r=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(r){const h=Math.max(0,Math.floor(Number(r[1])*.65)),E=Math.max(0,Math.floor(Number(r[2])*.65)),S=Math.max(0,Math.floor(Number(r[3])*.65));return`rgba(${h}, ${E}, ${S}, ${r[4]})`}const p=a.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(p){let h=p[1];h.length===3&&(h=h[0]+h[0]+h[1]+h[1]+h[2]+h[2]);const E=Math.max(0,Math.min(255,Math.floor(parseInt(h.slice(0,2),16)*.65))),S=Math.max(0,Math.min(255,Math.floor(parseInt(h.slice(2,4),16)*.65))),q=Math.max(0,Math.min(255,Math.floor(parseInt(h.slice(4,6),16)*.65)));return`#${[E,S,q].map(A=>A.toString(16).padStart(2,"0")).join("")}`}return a},io=(t,a)=>{const r=U.value?.stroke?.color;return r==null?ro(a):typeof r=="string"?r:Array.isArray(r)&&r.length?r[t%r.length]??ro(a):ro(a)},co=t=>{let a=0;for(let l=1;l<t.length;l++){const r=t[l].x-t[l-1].x,p=t[l].y-t[l-1].y;a+=Math.sqrt(r*r+p*p)}return a},wo=e.computed(()=>xe.value==="line"||ql.value?(ql.value?Z.series.filter(a=>(a.type||xe.value)==="line"):Ot.value).map((a,l)=>{const r=Z.series.findIndex(T=>T===a),p=[];let h=[];a.data.forEach((T,K)=>{T==null?h.length>0&&(p.push([...h]),h=[]):h.push({x:ul.value?Bn(T):fl(K),y:ul.value?Rn(K):Cn(a,T),index:K})}),h.length>0&&p.push(h);let E="";p.forEach(T=>{if(T.length>0){let K="";xt.value?K=ca(T):K=`M ${T[0].x} ${T[0].y}`+T.slice(1).map(Be=>` L ${Be.x} ${Be.y}`).join(""),E+=(E?" ":"")+K}});const S=p.reduce((T,K)=>T+co(K),0),q=_.value.has(r),A=$.value===r,z=$.value!==null&&$.value!==r;return{path:E,color:Jt(r),strokeDasharray:dl(a),pathLength:S,seriesIndex:r,animationDelay:l*ll.value,isHighlighted:A,isDimmed:z,isHidden:q}}):[]),xo=e.computed(()=>{if(!(xe.value==="line"||ql.value))return[];const t=ql.value?Z.series.filter(l=>(l.type||xe.value)==="line"):Ot.value,a=[];return t.forEach((l,r)=>{const p=Z.series.findIndex(h=>h===l);for(let h=0;h<l.data.length-1;h++){const E=l.data[h];if(E!=null){let S=-1,q=0;for(let A=h+1;A<l.data.length;A++){const z=l.data[A];if(z==null)q++;else{S=A;break}}if(q>0&&S!==-1){const A=l.data[S],z=ul.value?Bn(E):fl(h),T=ul.value?Rn(h):Cn(l,E),K=ul.value?Bn(A):fl(S),Be=ul.value?Rn(S):Cn(l,A),We=_.value.has(p),pe=$.value===p,be=$.value!==null&&$.value!==p;a.push({path:`M ${z} ${T} L ${K} ${Be}`,color:Jt(p),seriesIndex:p,animationDelay:r*ll.value,isHighlighted:pe,isDimmed:be,isHidden:We,gapSize:q}),h=S-1}}}}),a}),jo=e.computed(()=>xe.value==="line"||ql.value?!wl.value||On.value||Ht.value.hasAnimated?[]:(ql.value?Z.series.filter(a=>(a.type||xe.value)==="line"):Ot.value).map((a,l)=>{const r=Z.series.findIndex(q=>q===a);let p="",h=null;a.data.forEach((q,A)=>{if(q!=null){const z={x:ul.value?Bn(q):fl(A),y:ul.value?Rn(A):Cn(a,q)};h===null?p+=`M ${z.x} ${z.y}`:p+=` L ${z.x} ${z.y}`,h=z}else if(h!==null){const z=a.data.findIndex((T,K)=>K>A&&T!==null&&T!==void 0);if(z!==-1){const T={x:ul.value?Bn(a.data[z]):fl(z),y:ul.value?Rn(z):Cn(a,a.data[z])};p+=` L ${T.x} ${T.y}`,h=T}}});const E=a.data.map((q,A)=>q==null?null:{x:ul.value?Bn(q):fl(A),y:ul.value?Rn(A):Cn(a,q)}).filter(q=>q!==null),S=co(E);return{path:p,pathLength:S,color:Jt(r),strokeDasharray:dl(a),animationDelay:l*ll.value,seriesIndex:r}}):[]),Ko=e.computed(()=>{if(xe.value!=="line")return[];const t=[];return Ot.value.forEach((a,l)=>{const r=$.value===l,p=$.value!==null&&$.value!==l,h=_.value.has(l);a.data.forEach((E,S)=>{E!=null&&t.push({x:fl(S),y:Cn(a,E),color:Jt(l),value:E,label:Z.categories[S]||S.toString(),seriesName:a.name,categoryIndex:S,dataIndex:S,animationDelay:(l*a.data.length+S)*(ll.value/8),isHighlighted:r,isDimmed:p,isHidden:h})})}),t}),Go=e.computed(()=>{if(!ql.value)return[];const t=[];return Z.series.filter(l=>(l.type||xe.value)==="line").forEach((l,r)=>{const p=Z.series.findIndex(q=>q===l),h=$.value===p,E=$.value!==null&&$.value!==p,S=_.value.has(p);l.data.forEach((q,A)=>{q!=null&&t.push({x:fl(A),y:Cn(l,q),color:Jt(p),value:q,label:Z.categories[A]||A.toString(),seriesName:l.name,categoryIndex:A,dataIndex:A,animationDelay:(r*l.data.length+A)*(ll.value/8),isHighlighted:h,isDimmed:E,isHidden:S})})}),t}),Ia=e.computed(()=>{if(!Ft.value)return[];const t=[];return Ot.value.forEach((a,l)=>{if(!a?.data?.length)return;const r=$.value,p=r!==null&&r===l,h=r!==null&&r!==l,E=_.value.has(l);a.data.forEach((S,q)=>{let A,z,T,K,Be;if(typeof S=="object"&&S!==null&&!Array.isArray(S))A=typeof S.x=="number"?S.x:q,z=typeof S.y=="number"?S.y:0,T=typeof S.size=="number"?S.size:20,K=S.label||Z.categories?.[q]||`Point ${q+1}`,Be=S.image||S.imageUrl;else if(Array.isArray(S)&&S.length>=3)A=typeof S[0]=="number"?S[0]:q,z=typeof S[1]=="number"?S[1]:0,T=typeof S[2]=="number"?S[2]:20,K=S[3]||Z.categories?.[q]||`Point ${q+1}`,Be=S[4];else if(typeof S=="number")A=q,z=S,T=Pe(l,q),K=Z.categories?.[q]||`Point ${q+1}`;else return;!isFinite(A)||!isFinite(z)||!isFinite(T)||t.push({x:fl(A),y:Xn(z),radius:qo(T),originalX:A,originalY:z,originalSize:T,color:Jt(l),seriesName:a.name||`Series ${l+1}`,label:K,imageUrl:Be,seriesIndex:l,dataIndex:q,categoryIndex:Math.round(A),isHighlighted:p,isDimmed:h,isHidden:E,opacity:le.value})})}),t}),uo=e.computed(()=>xe.value!=="area"?[]:Ot.value.map((t,a)=>{const l=[];let r=[];if(t.data.forEach((T,K)=>{T==null?r.length>0&&(l.push([...r]),r=[]):r.push({x:fl(K),y:Cn(t,T),index:K})}),r.length>0&&l.push(r),l.length===0)return{linePath:"",areaPath:"",color:Jt(a),isHidden:_.value.has(a)};const p=P.value.bottom+1;let h="",E="";l.forEach((T,K)=>{if(T.length===0)return;let Be=`M ${T[0].x} ${T[0].y}`;xt.value&&T.length>1?Be=ca(T):T.slice(1).forEach(pe=>{Be+=` L ${pe.x} ${pe.y}`}),h+=(h?" ":"")+Be;let We=`M ${T[0].x} ${p}`;if(We+=` L ${T[0].x} ${T[0].y}`,xt.value&&T.length>1){const pe=ca(T),be=pe.substring(pe.indexOf("C")||pe.indexOf("Q")||pe.indexOf("L"));be?We+=" "+be:T.slice(1).forEach(Ee=>{We+=` L ${Ee.x} ${Ee.y}`})}else T.slice(1).forEach(pe=>{We+=` L ${pe.x} ${pe.y}`});We+=` L ${T[T.length-1].x} ${p} Z`,E+=(E?" ":"")+We});const S=$.value===a,q=$.value!==null&&$.value!==a,A=_.value.has(a),z=l.reduce((T,K)=>T+co(K),0);return{linePath:h,areaPath:E,color:Jt(a),pathLength:z,isHighlighted:S,isDimmed:q,isHidden:A}})),Eo=e.computed(()=>{if(!(["bar"].includes(xe.value)||ql.value))return[];const t=[],{maxX:a}=Vt.value,l=ql.value?Z.series.filter(p=>(p.type||xe.value)==="bar"):Ot.value,r=l.length;if(ul.value){const p=a+1,E=P.value.height/p,S=E*(2/3),q=Math.min(4,S/r*.15),A=S-(r-1)*q,z=Math.max(4,A/r);l.forEach((T,K)=>{const Be=Z.series.findIndex(Ee=>Ee===T),We=$.value===Be,pe=$.value!==null&&$.value!==Be,be=_.value.has(Be);T.data.forEach((Ee,de)=>{if(Ee==null||typeof Ee!="number"||!isFinite(Ee))return;const Le=P.value.top+(de+.5)*E-S/2+K*(z+q),_e=P.value.left,Ie=Math.abs(Bn(Ee)-P.value.left);let Bt="";if(xt.value&&Ie>0){const Pt=Math.min(H.value,z/2,Ie/2);Bt=[`M ${_e} ${Le}`,`L ${_e+Ie-Pt} ${Le}`,`Q ${_e+Ie} ${Le} ${_e+Ie} ${Le+Pt}`,`L ${_e+Ie} ${Le+z-Pt}`,`Q ${_e+Ie} ${Le+z} ${_e+Ie-Pt} ${Le+z}`,`L ${_e} ${Le+z}`,"Z"].join(" ")}t.push({x:_e,y:Le,width:Ie,height:z,color:Jt(r===1?de:Be),value:Ee,label:Z.categories[de]||de.toString(),seriesName:T.name,animationDelay:(K*l.length+de)*(ll.value/4),isHighlighted:We,isDimmed:pe,isHidden:be,barPath:Bt,isSmooth:xt.value&&Ie>0})})})}else{const p=a+1,E=P.value.width/p,S=E*.8,q=S/r,A=q*.05,z=q-A;l.forEach((T,K)=>{const Be=Z.series.findIndex(Ee=>Ee===T),We=$.value===Be,pe=$.value!==null&&$.value!==Be,be=_.value.has(Be);T.data.forEach((Ee,de)=>{if(Ee==null||typeof Ee!="number"||!isFinite(Ee))return;const Le=P.value.left+(de+.5)*E-S/2+K*q+A/2,_e=Xn(Math.max(0,Ee)),Ie=Math.abs(Xn(0)-Xn(Ee));let Bt="";if(xt.value&&Ie>0){const Pt=Math.min(H.value,z/2,Ie/2);Bt=[`M ${Le} ${_e+Ie}`,`L ${Le} ${_e+Pt}`,`Q ${Le} ${_e} ${Le+Pt} ${_e}`,`L ${Le+z-Pt} ${_e}`,`Q ${Le+z} ${_e} ${Le+z} ${_e+Pt}`,`L ${Le+z} ${_e+Ie}`,"Z"].join(" ")}t.push({x:Le,y:_e,width:z,height:Ie,color:Jt(r===1?de:Be),value:Ee,label:Z.categories[de]||de.toString(),seriesName:T.name,animationDelay:(K*l.length+de)*(ll.value/4),isHighlighted:We,isDimmed:pe,isHidden:be,barPath:Bt,isSmooth:xt.value&&Ie>0})})})}return t}),Pn=e.computed(()=>{if(!Cl.value)return[];const t=Ot.value.map((E,S)=>({series:E,originalIndex:S})).filter(({originalIndex:E})=>!_.value.has(E));if(t.length===0)return[];let a=xe.value==="semi-radial"?Math.PI:-Math.PI/2;const l=xe.value==="semi-radial"?Math.PI:Math.PI*2,r=[],p=(E,S,q,A,z,T)=>{const K=E+(S-E)/2,Be=S-E,We=It.value+Math.cos(E)*pl.value,pe=Mt.value+Math.sin(E)*pl.value,be=It.value+Math.cos(S)*pl.value,Ee=Mt.value+Math.sin(S)*pl.value,de=It.value+Math.cos(S)*nt.value,je=Mt.value+Math.sin(S)*nt.value,ze=It.value+Math.cos(E)*nt.value,Le=Mt.value+Math.sin(E)*nt.value,_e=Be>Math.PI?1:0,Ie=[`M ${We} ${pe}`,`A ${pl.value} ${pl.value} 0 ${_e} 1 ${be} ${Ee}`,`L ${de} ${je}`,`A ${nt.value} ${nt.value} 0 ${_e} 0 ${ze} ${Le}`,"Z"].join(" "),Bt=T||Jt(q);return{path:Ie,color:Bt,strokeWidth:te.value,strokeColor:io(r.length,Bt),value:z,seriesName:A,opacity:.8,isHighlighted:$.value===q,isDimmed:$.value!==null&&$.value!==q,isHidden:!1,startAngle:E,endAngle:S,midAngle:K}};if(Yn.value){const{series:E,originalIndex:S}=t[0],q=Number(E?.data?.[0]??0),A=Number.isFinite(q)?Math.min(Math.max(q,0),100):0,z=U.value,T=Math.min(Math.max(Number(z?.miniRadial?.minVisiblePercent??1),0),100),Be=(A<=0?T:A)/100*l,We=Number(z?.miniRadial?.thresholds?.low??33),pe=Number(z?.miniRadial?.thresholds?.medium??66),be=z?.miniRadial?.colors?.low||"#E53E3E",Ee=z?.miniRadial?.colors?.medium||"#ED8936",de=z?.miniRadial?.colors?.high||"#38A169",je=A<=We?be:A<=pe?Ee:de,ze=z?.miniRadial?.trackColor||"#E5E7EB",Le=E?.name||"Score";return r.push(p(a,a+l-.001,S+1,"Track",100,ze)),r.push(p(a,a+Be,S,Le,A,je)),r}if(t.length===1){const{series:E,originalIndex:S}=t[0],q=E.data[0]||0,A=a,z=a+l-.001,T=A+l/2,K=It.value+Math.cos(A)*pl.value,Be=Mt.value+Math.sin(A)*pl.value,We=It.value+Math.cos(z)*pl.value,pe=Mt.value+Math.sin(z)*pl.value,be=It.value+Math.cos(z)*nt.value,Ee=Mt.value+Math.sin(z)*nt.value,de=It.value+Math.cos(A)*nt.value,je=Mt.value+Math.sin(A)*nt.value,ze=1,Le=[`M ${K} ${Be}`,`A ${pl.value} ${pl.value} 0 ${ze} 1 ${We} ${pe}`,`L ${be} ${Ee}`,`A ${nt.value} ${nt.value} 0 ${ze} 0 ${de} ${je}`,"Z"].join(" "),_e=Jt(S);return r.push({path:Le,color:_e,strokeWidth:te.value,strokeColor:io(0,_e),value:q,seriesName:E.name,opacity:.8,isHighlighted:$.value===S,isDimmed:!1,isHidden:!1,startAngle:A,endAngle:z,midAngle:T}),r}if(n.value&&t.length===2){const E=t[0],S=t[1],q=Math.min(100,Math.max(0,E.series.data[0]||0)),A=q/100*l;return r.push(p(a,a+A,E.originalIndex,E.series.name,q)),r.push(p(a,a+l,S.originalIndex,S.series.name,100)),r}const h=t.reduce((E,{series:S})=>E+(S.data[0]||0),0);return h===0?[]:(t.forEach(({series:E,originalIndex:S})=>{const q=E.data[0]||0,A=q/h*l,z=a,T=a+A,K=z+A/2,Be=It.value+Math.cos(z)*pl.value,We=Mt.value+Math.sin(z)*pl.value,pe=It.value+Math.cos(T)*pl.value,be=Mt.value+Math.sin(T)*pl.value,Ee=It.value+Math.cos(T)*nt.value,de=Mt.value+Math.sin(T)*nt.value,je=It.value+Math.cos(z)*nt.value,ze=Mt.value+Math.sin(z)*nt.value,Le=A>Math.PI?1:0,_e=[`M ${Be} ${We}`,`A ${pl.value} ${pl.value} 0 ${Le} 1 ${pe} ${be}`,`L ${Ee} ${de}`,`A ${nt.value} ${nt.value} 0 ${Le} 0 ${je} ${ze}`,"Z"].join(" "),Ie=Jt(S);r.push({path:_e,color:Ie,strokeWidth:te.value,strokeColor:io(r.length,Ie),value:q,seriesName:E.name,opacity:.8,isHighlighted:$.value===S,isDimmed:$.value!==null&&$.value!==S,isHidden:!1,startAngle:z,endAngle:T,midAngle:K}),a=T}),r)}),Qo=e.computed(()=>{const t=Pn.value;return n.value&&t.length>=2?[{segment:t[1],originalIndex:1},{segment:t[0],originalIndex:0}]:t.map((a,l)=>({segment:a,originalIndex:l}))}),Jo=e.computed(()=>{if(!Vl.value||!Cl.value)return[];const t=gn.value,a=wn.value,l=on.value,r=yl.value,p=15,h=t*1.3,E=.55,S=(T,K)=>{const Be=It.value+Math.cos(T.midAngle)*nt.value,We=Mt.value+Math.sin(T.midAngle)*nt.value,pe=It.value+Math.cos(T.midAngle)*(nt.value+a),be=Mt.value+Math.sin(T.midAngle)*(nt.value+a),de=pe+l*(K?1:-1),je=K?pe+p:pe-p,ze=be-r,Le=`${T.seriesName}: ${xl(T.value)}`,_e=Le.length*t*E;return{pointerStartX:Be,pointerStartY:We,pointerEndX:pe,pointerEndY:be,horizontalEndX:de,horizontalEndY:be,textX:je,textY:ze,text:Le,textWidth:_e,textAnchor:K?"start":"end",isRightSide:K,pointerLineLength:Math.hypot(pe-Be,be-We),horizontalLineLength:Math.hypot(de-pe,0)}},q=(T,K)=>{const Be=Math.abs(T.textY-K.textY)<h,We=T.isRightSide?T.textX:T.textX-T.textWidth,pe=T.isRightSide?T.textX+T.textWidth:T.textX,be=K.isRightSide?K.textX:K.textX-K.textWidth,Ee=K.isRightSide?K.textX+K.textWidth:K.textX,de=We<Ee&&be<pe;return Be&&de},A=Pn.value.filter(T=>!T.isHidden),z=[];for(let T=0;T<A.length;T++){const K=A[T];let Be=Math.cos(K.midAngle)>=0;if(T>0){const pe=z[T-1],be=S(K,Be);q(pe,be)&&(Be=!Be)}const We=S(K,Be);z.push({...We,color:K.color,isHighlighted:K.isHighlighted,isDimmed:K.isDimmed})}return z}),es=t=>{if(!t||t.isHidden)return 0;const a=t.opacity||le.value||.7;return $.value===null||$.value===void 0?a:$.value!==null?t.seriesIndex===$.value?Math.min(1,a+.1):Math.max(.5,a*.8):a},ts=t=>{if(!t||t.isHidden)return 0;const a=t.radius>20?.9:.8;return $.value!==null?t.seriesIndex===$.value?Math.min(1,a+.1):a*.7:a},So=(t,a)=>{if(t)try{if($.value===t.seriesIndex?$.value=null:$.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const l=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:a,chartId:Z.chartId}});window.dispatchEvent(l)}}catch(l){console.error("Error in onBubbleClick:",l)}},ls=(t,a)=>{const l=[`dss-bubble-fallback-${a}`];return t.isHighlighted&&l.push("dss-bubble-highlighted"),t.isDimmed&&l.push("dss-bubble-dimmed"),t.isHidden&&l.push("dss-bubble-hidden"),l.push(`dss-bubble-series-${t.seriesIndex}`),l.join(" ")},Vo=(t,a)=>{if(!t||(a.stopPropagation(),Pa.value=!0,$.value=t.seriesIndex,Ve.value.show=!1,!Ct.value))return;const l=a.target.closest(".dss-custom-chart-container");if(!l)return;const r=l.getBoundingClientRect();let p=a.clientX-r.left+10,h=a.clientY-r.top-10;const E=200,S=120;p+E>$e.value&&(p=a.clientX-r.left-E-10),h+S>r.height&&(h=a.clientY-r.top-S-10),p<0&&(p=10),h<0&&(h=10);const q=d.value,A=f.value,z=q.map(T=>{const K=A[T]||T,Be=No(T,t);return Be?{seriesName:t.seriesName,label:t.label,value:`${K}: ${Be}`,color:t.color}:null}).filter(Boolean);ge.value={show:!0,x:p,y:h,title:t.label||t.seriesName||"",value:"",bubbleData:z,categoryIndex:void 0,spiderAreas:[]}},No=(t,a)=>{let l;switch(t){case"x":l=a.originalX;break;case"y":l=a.originalY;break;case"size":l=a.originalSize;break;case"label":l=a.label;break;case"seriesName":l=a.seriesName;break;default:l=a[t]||""}const r=b.value[t];if(typeof r=="function")return r(l,a);if(typeof l=="number"){const p=l.toFixed(1);return kt.value?p+kt.value:p}return l?.toString()||""},ns=()=>{if(!Ft.value||!Ve.value.data||Ve.value.data.length===0)return"Bubbles";const t=[],a=new Set;return Ve.value.data.forEach(l=>{if(l.seriesName&&l.label){const r=`${l.seriesName} - ${l.label}`;a.has(r)||(t.push(r),a.add(r))}else l.seriesName&&(a.has(l.seriesName)||(t.push(l.seriesName),a.add(l.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},Bo=(t,a)=>{t&&(Pa.value=!1,$.value=null,ge.value.show=!1,ge.value.bubbleData=[])},as=(t,a)=>{const l=a.target.closest(".dss-custom-chart-container");if(!l)return;const r=l.getBoundingClientRect(),p=ra(t.categoryIndex),h=t.description||t.comment||"";let E=a.clientX-r.left+15,S=a.clientY-r.top-10;const q=200,A=h?80:50;E+q>$e.value&&(E=a.clientX-r.left-q-15),S+A>it.value&&(S=a.clientY-r.top-A-10),E<0&&(E=10),S<0&&(S=10),st.value={show:!0,x:E,y:S,categoryValue:p,description:h}},os=()=>{st.value.show=!1},pa=e.computed(()=>Z.categories.length||Math.max(...zt.value.map(t=>t.data.length))),ss=e.computed(()=>{let t=0;return zt.value.forEach(a=>{a.data.forEach(l=>{typeof l=="number"&&(t=Math.max(t,l))})}),t||100}),_o=e.computed(()=>{const t=[],a=pa.value;for(let l=0;l<a;l++){const r=l*2*Math.PI/a-Math.PI/2,p=It.value+Math.cos(r)*nt.value,h=Mt.value+Math.sin(r)*nt.value;t.push({x:p,y:h,angle:r,index:l})}return t}),rs=e.computed(()=>{const t=[],a=pa.value;return _o.value.forEach((l,r)=>{const p=nt.value+15,h=r*2*Math.PI/a-Math.PI/2,E=It.value+Math.cos(h)*p,S=Mt.value+Math.sin(h)*p+5;let q="middle",A="middle";Math.abs(Math.cos(h))>.5&&(q=Math.cos(h)>0?"start":"end"),Math.abs(Math.sin(h))>.5&&(A=Math.sin(h)>0?"hanging":"auto"),t.push({x:E,y:S,text:Z.categories[r]||`Axis ${r+1}`,anchor:q,baseline:A})}),t}),is=e.ref(new Set),cs=(t,a,l)=>{const r=`current-${l}`,p=is.value.has(r),h=a.fillOpacity??Rl.value;return!p&&$.value===null?h:a.isHighlighted||p?a.isComparison?h:h+.15:a.isDimmed?h*.3:h},Mo=e.computed(()=>{if(!il.value)return[];const t=[],a=pa.value;return Ot.value.map((r,p)=>({series:r,seriesIndex:p})).sort((r,p)=>{const h=At(r.series)?0:1,E=At(p.series)?0:1;return h-E}).forEach(({series:r,seriesIndex:p})=>{const h=At(r),E=[],S=[],q=[],A=$.value===p,z=$.value!==null&&$.value!==p,T=_.value.has(p);for(let K=0;K<a;K++){const Be=r.data[K]||0,pe=Be/ss.value*nt.value,be=K*2*Math.PI/a-Math.PI/2,Ee=It.value+Math.cos(be)*pe,de=Mt.value+Math.sin(be)*pe;E.push(`${Ee},${de}`),S.push({x:Ee,y:de}),q.push({x:Ee,y:de,value:Be,label:Z.categories[K]||`Axis ${K+1}`,seriesName:r.name})}t.push({points:E.join(" "),polygonPoints:S,dataPoints:q,color:kn(r,p),fillOpacity:h?Qt.value.fillOpacity:Rl.value,strokeDasharray:h?dl(r)||Qt.value.strokeDasharray:null,pointRadius:rn(r,h),seriesName:r.name,value:`${r.name}: ${r.data.join(", ")}`,isHighlighted:A,isDimmed:z,isHidden:T,isComparison:h,seriesIndex:p})}),t}),us=(t,a)=>{if(!a||a.length<3)return!1;let l=!1;for(let r=0,p=a.length-1;r<a.length;p=r++){const h=a[r].x,E=a[r].y,S=a[p].x,q=a[p].y;E>t.y!=q>t.y&&t.x<(S-h)*(t.y-E)/(q-E)+h&&(l=!l)}return l},ds=t=>{if(!il.value)return;const a=t.currentTarget.closest(".dss-custom-chart-container");if(!a)return;const l=a.getBoundingClientRect(),r=ee.value?.getBoundingClientRect();if(!r)return;const p=t.clientX-r.left,h=t.clientY-r.top,E=Mo.value.filter(S=>S.isHidden?!1:us({x:p,y:h},S.polygonPoints));if(E.length>0){E.length,$.value=E[0].seriesIndex;const S=t.clientX-l.left+10,q=t.clientY-l.top-10,A=E.length>1?460:260,z=70+pa.value*20;let T=S,K=q;T+A>$e.value&&(T=t.clientX-l.left-A-10),K+z>it.value&&(K=t.clientY-l.top-z-10),T<0&&(T=10),K<0&&(K=10);const Be=E.map(We=>({seriesName:We.seriesName,color:We.color,points:We.dataPoints.map(pe=>({label:pe.label,value:xl(pe.value)}))}));ge.value={show:!0,x:T,y:K,title:"",value:"",bubbleData:[],spiderAreas:Be}}else Mn()},za=e.computed(()=>{const t=U.value;return t.logos.map((a,l)=>{const r=Z.series[a.seriesIndex];if(!r||!r.data||r.data.length===0||_.value.has(a.seriesIndex))return null;let p,h;if(Bl.value){let S=-1,q=null;for(let z=r.data.length-1;z>=0;z--)if(r.data[z]!==null&&r.data[z]!==void 0){S=z,q=r.data[z];break}if(S===-1||q===null)return null;const A=r.data.map((z,T)=>z==null?null:{x:fl(T),y:Cn(r,z),index:T}).filter(z=>z!==null);if(t.animations.enabled&&!On.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(Ht.value.isAnimating||!Ht.value.hasAnimated))if(Ht.value.isAnimating){const z=Ht.value.currentFrame/Ht.value.totalFrames,T=vo(t.animations.easing,Math.min(z,1)),K=Cs(A,T);p=K.x+(a.offsetX||0),h=K.y+(a.offsetY||0)}else p=A[0].x+(a.offsetX||0),h=A[0].y+(a.offsetY||0);else p=fl(S)+(a.offsetX||0),h=Xn(q)+(a.offsetY||0)}else if(Cl.value||il.value){const S=Math.PI*2/t.logos.length*l;p=It.value+Math.cos(S)*(nt.value+30)+(a.offsetX||0),h=Mt.value+Math.sin(S)*(nt.value+30)+(a.offsetY||0)}return{...a,x:p,y:h,seriesIndex:a.seriesIndex}}).filter(Boolean)}),ms=t=>{const a=document.querySelector(`.dss-logo-fallback-${t}`),l=document.querySelector(`.dss-logo-image-${t}`);a&&(a.style.opacity="0"),l&&(l.style.opacity="1")},ps=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const a=document.querySelector(`.dss-logo-image-${t}`);a&&(a.style.display="none")},mo=t=>{_.value.has(t)?_.value.delete(t):_.value.add(t)},vs=e.computed(()=>{if(!ge.value.show&&!(Se.value&&Ve.value.show&&!Q.value.isZooming))return{display:"none"};let t,a;if(Se.value&&Ve.value.show&&!Q.value.isZooming){t=Ve.value.x+15,a=P.value.top;const l=Ft.value?200:150;t+l>$e.value&&(t=Ve.value.x-l-15),t<0&&(t=10),a<10&&(a=10)}else t=ge.value.x,a=ge.value.y;return{left:t+"px",top:a+"px"}}),jn=(t,a)=>{if(!Ct.value||Ba.value)return;const r=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-r.left+10,h=a.clientY-r.top-10;const E=200,S=120,q=$e.value,A=it.value;p+E>q&&(p=a.clientX-r.left-E-10),h+S>A&&(h=a.clientY-r.top-S-10),p<0&&(p=10),h<0&&(h=10);let z;typeof t.categoryIndex=="number"?z=t.categoryIndex:typeof t.dataIndex=="number"?z=t.dataIndex:t.label&&Z.categories.includes(t.label)&&(z=Z.categories.indexOf(t.label));let T=t.seriesName||t.label||"";(ul.value||xe.value==="bar")&&t.label&&(T=t.label),t.tooltipTitle&&(T=t.tooltipTitle),ge.value={show:!0,x:p,y:h,title:T,value:xl(t.value)||"",categoryIndex:z,spiderAreas:[]}},po=e.ref(!1),Pa=e.ref(!1),Mn=()=>{ge.value.show=!1,ge.value.spiderAreas=[],ge.value.bubbleData=[],Ve.value.show=!1,po.value||($.value=null)},Ba=e.ref(!1),_a=(t,a)=>{Ba.value=!0,ge.value.show=!1,Ve.value.show=!1;const r=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-r.left+15,h=a.clientY-r.top-10;const E=250;p+E>$e.value&&(p=a.clientX-r.left-E-15),p<0&&(p=10),h<0&&(h=10),x.value={show:!0,x:p,y:h,content:t.texts,count:t.totalCount}},Ma=()=>{Ba.value=!1,x.value.show=!1},Ht=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),vo=(t,a)=>{switch(t){case"linear":return a;case"ease":return a<.5?2*a*a:-1+(4-2*a)*a;case"ease-in":return a*a;case"ease-out":return a*(2-a);case"ease-in-out":return a<.5?2*a*a:-1+(4-2*a)*a;default:return a}},On=e.computed(()=>qn.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),$o=()=>{if(!wl.value||On.value){Ht.value.hasAnimated=!0,v.value&&(m.value=1);return}v.value&&(m.value=0),Ht.value.isAnimating=!0,Ht.value.currentFrame=0,Ht.value.totalFrames=Math.ceil(zl.value/16.67);const t=()=>{const a=Ht.value.currentFrame/Ht.value.totalFrames,l=vo(ln.value,Math.min(a,1));fs(l),v.value&&(m.value=l),a<1?(Ht.value.currentFrame++,Ht.value.animationId=requestAnimationFrame(t)):hs()};Ht.value.animationId=requestAnimationFrame(t)},fs=t=>{const a=W.value;a&&a.style.setProperty("--dss-animation-progress",t)},hs=()=>{Ht.value.isAnimating=!1,Ht.value.hasAnimated=!0,v.value&&(m.value=1),Ht.value.animationId&&(cancelAnimationFrame(Ht.value.animationId),Ht.value.animationId=null)},fo=e.computed(()=>!Cl.value||Ht.value.hasAnimated?!0:v.value?m.value>=1:_n.value?oa.value>=1:!0),Do=e.computed(()=>Vl.value&&fo.value),Oa=e.ref(!1);e.watch(Do,t=>{t?(Oa.value=!1,e.nextTick(()=>{requestAnimationFrame(()=>{Oa.value=!0})})):Oa.value=!1},{immediate:!0});const gs=e.computed(()=>{if(!wl.value||On.value||Ht.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${zl.value}ms`,t["--dss-animation-easing"]=ys(ln.value),t["--dss-stagger-delay"]=`${ll.value}ms`,t}),ys=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",ks=()=>{if(!wl.value||On.value)return"";const t=["dss-chart-animated"];return Ht.value.hasAnimated||t.push(`dss-animate-${mn.value}`),Ht.value.hasAnimated||(Cl.value&&xe.value!=="semi-radial"?t.push("dss-animate-fill"):Cl.value||t.push(`dss-animate-${mn.value}`)),Ht.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>Z.series,(t,a)=>{Gn.value&&a&&Ht.value.hasAnimated&&(Ht.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>$o(),pn.value)}))},{deep:!0}),e.watch(()=>Q.value.isZooming,(t,a)=>{a&&!t&&setTimeout(()=>{Ca()},50)}),e.watch(()=>[Q.value.scale,Q.value.offsetX],()=>{!Q.value.isZooming&&!Q.value.isDragging&&Ca()},{flush:"post"}),e.watch([jt,se],([t,a])=>{Q.value.minScale=t,Q.value.maxScale=a,(Q.value.scale<t||Q.value.scale>a)&&aa()},{immediate:!0}),e.watch(()=>Z.locale,t=>{t&&t!==L.value&&(L.value=t)},{immediate:!0}),e.watch(()=>Qe.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",xa)}):document.removeEventListener("click",xa)}),e.onMounted(()=>{$.value=null,v.value&&(!wl.value||On.value)&&(m.value=1),Aa(),e.nextTick(rt),W.value&&typeof ResizeObserver<"u"&&(G=new ResizeObserver(t=>{const a=t[0];!a||!a.contentRect||(j&&cancelAnimationFrame(j),j=requestAnimationFrame(()=>{j=null;const{width:l,height:r}=a.contentRect;we.value=Math.round(l),ke.value=Math.round(r),g.value&&(lt.value=g.value.offsetHeight||fe)}))}),G.observe(W.value)),wl.value&&!On.value?xe.value==="semi-radial"?setTimeout(()=>O(),pn.value):setTimeout(()=>$o(),pn.value):(Ht.value.hasAnimated=!0,xe.value==="semi-radial"&&(oa.value=1)),document.addEventListener("mousemove",Lo),document.addEventListener("mouseup",To),document.addEventListener("click",wa)}),e.onUnmounted(()=>{ue&&(ue(),ue=null),j&&cancelAnimationFrame(j),G&&W.value&&(G.unobserve(W.value),G.disconnect(),G=null),Ht.value.animationId&&cancelAnimationFrame(Ht.value.animationId),I&&(cancelAnimationFrame(I),I=null),Q.value.zoomTimeout&&clearTimeout(Q.value.zoomTimeout),document.removeEventListener("mousemove",Lo),document.removeEventListener("mouseup",To),document.removeEventListener("click",wa),document.removeEventListener("click",xa)});const Lo=t=>{if(Q.value.isDragging&&Q.value.scale>1&&Bl.value){Ve.value.show=!1;const a=t.clientX-Q.value.lastMouseX,{minX:l,maxX:r}=Vt.value,p=r-l||1,E=a*.8;Q.value.offsetX+=E;const S=p/Q.value.scale,q=p-S,A=0,z=-q/p*P.value.width,T=A;Q.value.offsetX=Math.max(z,Math.min(T,Q.value.offsetX)),Q.value.lastMouseX=t.clientX,Q.value.lastMouseY=t.clientY}},To=()=>{Q.value.isDragging&&(Q.value.isDragging=!1,setTimeout(()=>{!Q.value.isDragging&&Q.value.isZooming},100))},Cs=(t,a)=>{const l=t.filter(S=>S!=null);if(!l||l.length===0)return{x:0,y:0};if(l.length===1||a<=0)return l[0];if(a>=1)return l[l.length-1];let r=0;const p=[];for(let S=1;S<l.length;S++){const q=l[S].x-l[S-1].x,A=l[S].y-l[S-1].y,z=Math.sqrt(q*q+A*A);p.push(z),r+=z}const h=r*a;let E=0;for(let S=0;S<p.length;S++){const q=E+p[S];if(h<=q){const A=(h-E)/p[S],z=l[S],T=l[S+1];return{x:z.x+(T.x-z.x)*A,y:z.y+(T.y-z.y)*A}}E=q}return l[l.length-1]};return(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",[ks(),{"dss-chart-fill-width":Ae.value,"dss-chart-fill-height":Ye.value,"dss-chart-compact":Cl.value&&!ve.value}]]),style:e.normalizeStyle({width:Ae.value?"100%":$e.value+"px",height:Xt.value,...Ae.value||Ye.value?{overflow:Cl.value?"visible":(cl.value,"hidden"),maxWidth:"100%",maxHeight:"100%"}:{},...gs.value,cursor:no()}),"data-chart-type":xe.value,ref_key:"containerEl",ref:W,onWheel:Ra,onMousedown:ia,onMousemove:ja,onMouseup:Ea,onMouseleave:La,onDblclick:aa,onContextmenu:e.withModifiers(Ga,["prevent"]),onClick:e.withModifiers(Sn,["left"]),onWheelCapture:Ra},[e.createElementVNode("div",{class:"dss-chart-header",ref_key:"headerEl",ref:g},[e.createElementVNode("div",Yr,[Ke.value?(e.openBlock(),e.createElementBlock("div",Xr,e.toDisplayString(Ke.value),1)):e.createCommentVNode("",!0),Je.value?(e.openBlock(),e.createElementBlock("div",jr,e.toDisplayString(Je.value),1)):e.createCommentVNode("",!0)]),ve.value&&Re.value==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Ge.value==="horizontal","dss-legend-vertical":Ge.value==="vertical","dss-legend-top":Re.value==="top","dss-legend-bottom":Re.value==="bottom"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.series,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":_.value.has(r),"dss-legend-hovered":$.value===r,"dss-legend-dimmed":$.value!==null&&$.value!==r}]),onClick:p=>mo(r),onMouseenter:p=>En(r),onMouseleave:Tn,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":il.value&&At(l)}]),style:e.normalizeStyle({backgroundColor:il.value&&At(l)?"transparent":Il(l,r),borderColor:Il(l,r)})},null,6),e.createElementVNode("span",Gr,e.toDisplayString(l.name),1)],46,Kr))),128))],2)):e.createCommentVNode("",!0),ve.value&&(Re.value==="left"||Re.value==="right")?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-legend-side",{"dss-legend-left":Re.value==="left","dss-legend-right":Re.value==="right"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.series,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":_.value.has(r),"dss-legend-hovered":$.value===r,"dss-legend-dimmed":$.value!==null&&$.value!==r}]),onClick:p=>mo(r),onMouseenter:p=>En(r),onMouseleave:Tn,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":il.value&&At(l)}]),style:e.normalizeStyle({backgroundColor:il.value&&At(l)?"transparent":Il(l,r),borderColor:Il(l,r)})},null,6),e.createElementVNode("span",Jr,e.toDisplayString(l.name),1)],46,Qr))),128))],2)):e.createCommentVNode("",!0)],512),B.showAddMarkerButton&&sl.value&&Wt.value.addMarker&&(Bl.value||Ft.value)&&!cl.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-add-marker-button",onClick:na,title:e.unref(N)("chart.contextMenu.addMarker")},[e.createElementVNode("img",{src:vl.value,class:"dss-add-marker-button-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,ti),a[4]||(a[4]=e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10 4V16M4 10H16",stroke:"hsl(60, 2%, 47%)","stroke-width":"2","stroke-linecap":"round"})],-1))],8,ei)):e.createCommentVNode("",!0),e.createElementVNode("div",li,[Ft.value&&mt.value?(e.openBlock(),e.createElementBlock("div",ni,"Bubble size: "+e.toDisplayString(mt.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{width:$e.value,height:it.value,class:"dss-chart-svg","data-smooth":xt.value,"data-animated":wl.value,ref_key:"svgEl",ref:ee},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:he.value},[e.createElementVNode("rect",{x:0,y:P.value.top,width:$e.value,height:P.value.height*4},null,8,si)],8,oi),_n.value?(e.openBlock(),e.createElementBlock("clipPath",{key:0,id:da.value},[e.createElementVNode("path",{d:s.value},null,8,ii)],8,ri)):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("clipPath",{key:1,id:u.value},[e.createElementVNode("path",{d:y.value},null,8,ui)],8,ci)):e.createCommentVNode("",!0)]),Bl.value||Ft.value?(e.openBlock(),e.createElementBlock("g",di,[re.value&&!cl.value?(e.openBlock(),e.createElementBlock("g",{key:0,class:"dss-grid-lines","clip-path":Te.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Zo.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${r}`,x1:P.value.left,x2:P.value.right,y1:l.y,y2:l.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${r*50}ms`})},null,12,pi))),128))],8,mi)):e.createCommentVNode("",!0),cl.value&&bo.value.length?(e.openBlock(),e.createElementBlock("g",{key:1,class:"dss-stepbar-axis-bars dss-stepbar-axis-bars--y-only","clip-path":Te.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bo.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{key:`stepbar-axis-bar-${r}`,x1:P.value.left,x2:P.value.right,y1:l.y,y2:l.y,stroke:$t.value,"stroke-width":kl.value,"stroke-dasharray":Zl.value,opacity:Et.value},null,8,fi))),128))],8,vi)):e.createCommentVNode("",!0),e.createElementVNode("g",hi,[e.createElementVNode("line",{x1:P.value.left,x2:P.value.right,y1:P.value.bottom,y2:P.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,gi),e.createElementVNode("line",{x1:P.value.left,x2:P.value.left,y1:P.value.top,y2:P.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,yi),In.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:P.value.right,x2:P.value.right,y1:P.value.top,y2:P.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,ki)):e.createCommentVNode("",!0)]),e.createElementVNode("g",Ci,[cl.value?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(oo.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${r}`,x:l.x,y:l.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${r*100}ms`})},e.toDisplayString(l.text),13,bi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(so.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${r}`,x:l.x,y:l.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${r*80}ms`})},e.toDisplayString(l.text),13,wi))),128)),In.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Yo.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{key:`y-secondary-${r}`,x:l.x,y:l.y,"text-anchor":"start","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${r*80}ms`})},e.toDisplayString(l.text),13,xi))),128)):e.createCommentVNode("",!0),Tt.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:P.value.left+P.value.width/2,y:P.value.bottom+45,"text-anchor":"middle","font-size":"14",fill:"#666"},e.toDisplayString(Tt.value),9,Ei)):e.createCommentVNode("",!0),at.value?(e.openBlock(),e.createElementBlock("text",{key:3,x:15,y:P.value.top+12+P.value.height/2,"text-anchor":"middle","font-size":"14",fill:"#666",transform:`rotate(-90, 15, ${P.value.top+P.value.height/2})`},e.toDisplayString(at.value),9,Si)):e.createCommentVNode("",!0),In.value&&ct.value?(e.openBlock(),e.createElementBlock("text",{key:4,x:$e.value-15,y:P.value.top+12+P.value.height/2,"text-anchor":"middle","font-size":"14",fill:"#666",transform:`rotate(90, ${$e.value-15}, ${P.value.top+P.value.height/2})`},e.toDisplayString(ct.value),9,Vi)):e.createCommentVNode("",!0)]),C.value.length>0?(e.openBlock(),e.createElementBlock("g",Ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,l=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${l.categoryIndex}`},[e.createElementVNode("g",{"clip-path":Te.value},[l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x,x2:l.x,y1:P.value.bottom,y2:P.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>_a(l,r),onMouseleave:Ma},null,40,_i)):e.createCommentVNode("",!0),l.hasAuto&&!l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.x,x2:l.x,y1:P.value.bottom,y2:P.value.top,stroke:"#a1d499","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>_a(l,r),onMouseleave:Ma},null,40,Mi)):e.createCommentVNode("",!0),l.hasAuto&&l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.x,x2:l.x,y1:P.value.bottom,y2:P.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>_a(l,r),onMouseleave:Ma},null,40,$i)):e.createCommentVNode("",!0)],8,Bi),l.hasManual&&l.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x+8,cy:Math.max(15,P.value.top-10),r:"14",fill:"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:r=>_a(l,r),onMouseleave:Ma},null,40,Di)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:l.x,cy:Math.max(15,P.value.top-10),r:"14",fill:l.hasManual&&l.hasAuto||l.hasManual?"#698dbe":"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:r=>_a(l,r),onMouseleave:Ma},null,40,Li),e.createElementVNode("text",{x:l.x,y:Math.max(15,P.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(l.totalCount),9,Ti)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-chart-data","clip-path":Te.value},[ql.value?(e.openBlock(),e.createElementBlock("g",Hi,[e.createElementVNode("g",{class:e.normalizeClass(["dss-bar-chart",{"dss-horizontal-bars":ul.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Eo.value,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${r}`},[l.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:l.barPath,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({fill:l.color,fillOpacity:l.isDimmed?.4:1,animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>jn(l,p),onMouseleave:Mn},null,46,Ri)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x,y:l.y,width:l.width,height:l.height,fill:l.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>jn(l,p),onMouseleave:Mn},null,46,Fi))],64))),128))],2),e.createElementVNode("g",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wo.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${r}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?X.value+2:X.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,zi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xo.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-gap-connector-${r}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?X.value+2:X.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:l.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,Pi))),128)),ie.value>0||Ne.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Go.value,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${r}`,cx:l.x,cy:l.y,r:yt(l.isHighlighted?et(l,ie.value)+2:et(l,ie.value)),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>jn(l,p),onMouseleave:Mn},null,46,Oi))),128)):e.createCommentVNode("",!0)])])):xe.value==="line"?(e.openBlock(),e.createElementBlock("g",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(jo.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`anim-${r}`,d:l.path,stroke:l.color,"stroke-width":X.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass(["dss-line-animation-overlay",{"dss-animation-complete":Ht.value.hasAnimated}]),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,qi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wo.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${r}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?X.value+2:X.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,Zi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xo.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`gap-connector-${r}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?X.value+2:X.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:l.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,Ui))),128)),ie.value>0||Ne.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Ko.value,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${r}`,cx:l.x,cy:l.y,r:yt(l.isHighlighted?et(l,ie.value)+2:et(l,ie.value)),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>jn(l,p),onMouseleave:Mn},null,46,Yi))),128)):e.createCommentVNode("",!0)])):xe.value==="area"?(e.openBlock(),e.createElementBlock("g",Xi,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(uo.value,(l,r)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${r}`,id:`area-mask-${r}-${B.chartId}`},[e.createElementVNode("rect",{x:P.value.left-10,y:P.value.top-10,width:P.value.width+20,height:P.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${P.value.width+20}px`})},null,12,Ki)],8,ji))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(uo.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${r}`,d:l.areaPath,fill:l.color,"fill-opacity":l.isHighlighted?al.value+.2:al.value,mask:`url(#area-mask-${r}-${B.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden})},null,10,Gi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(uo.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${r}`,d:l.linePath,stroke:l.color,"stroke-width":l.isHighlighted?X.value+1:X.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${r*ll.value}ms`})},null,14,Qi))),128))])):xe.value==="bar"?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass({"dss-horizontal-bars":ul.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Eo.value,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${r}`},[l.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:l.barPath,fill:l.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>jn(l,p),onMouseleave:Mn},null,46,Ji)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x,y:l.y,width:l.width,height:l.height,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({fill:l.color,fillOpacity:l.isDimmed?.4:1,animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>jn(l,p),onMouseleave:Mn},null,46,ec))],64))),128))],2)):e.createCommentVNode("",!0)],8,Ai),Se.value&&Ve.value.show&&!Q.value.isZooming&&!cl.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-crosshair","clip-path":Te.value},[e.createElementVNode("line",{x1:Ve.value.x,x2:Ve.value.x,y1:P.value.top,y2:P.value.bottom,stroke:tt.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,lc),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value.data,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${r}`,cx:Ve.value.x,cy:l.y,r:yt(ie.value+2),fill:l.color,stroke:"none",opacity:"0.9"},null,8,nc))),128))],8,tc)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ft.value?(e.openBlock(),e.createElementBlock("g",ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ia.value,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${r}`},[l?(e.openBlock(),e.createElementBlock("g",oc,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:yt(l.radius),fill:l.color,"fill-opacity":es(l),stroke:l.color,"stroke-width":"1","stroke-opacity":"0.8",class:e.normalizeClass(ls(l,r)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:p=>Vo(l,p),onMouseleave:p=>Bo(l),onClick:p=>So(l,p)},null,42,sc),l.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:l.x-l.radius*.65,y:l.y-l.radius*.65,width:l.radius*1.3,height:l.radius*1.3,"xlink:href":l.imageUrl,class:e.normalizeClass(`dss-bubble-image-${r} ${l.isHighlighted?"dss-bubble-highlighted":""} ${l.isDimmed?"dss-bubble-dimmed":""} ${l.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${l.radius*.65}px at ${l.radius*.65}px ${l.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:ts(l)}),onLoad:p=>De(r),onError:p=>vt(r),onMouseenter:p=>Vo(l,p),onMouseleave:p=>Bo(l),onClick:p=>So(l,p)},null,46,rc)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),Cl.value?(e.openBlock(),e.createElementBlock("g",{key:2,class:"radial-chart",transform:ua.value},[xe.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:It.value,cy:Mt.value,r:nt.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,cc)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":xe.value,"clip-path":w.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Qo.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${l.originalIndex}-${r}`,d:l.segment.path,fill:l.segment.color,"fill-opacity":l.segment.isHighlighted?(l.segment.opacity||.8)+.2:l.segment.opacity||.8,stroke:l.segment.strokeWidth?l.segment.strokeColor||l.segment.color:"none","stroke-width":l.segment.strokeWidth||0,"clip-path":c(l.originalIndex),class:e.normalizeClass({"dss-series-highlighted":l.segment.isHighlighted,"dss-series-dimmed":l.segment.isDimmed,"dss-series-hidden":l.segment.isHidden}),onMouseover:p=>jn(l.segment,p),onMouseleave:Mn},null,42,dc))),128))],8,uc),Ln.value&&fo.value?(e.openBlock(),e.createElementBlock("g",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(l,r)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:`radial-segment-label-${r}`,x:l.x,y:l.y,"text-anchor":"middle","dominant-baseline":"middle",class:"dss-radial-segment-data-label",style:e.normalizeStyle({fill:l.contrastColor})},e.toDisplayString(l.value),13,pc)),[[e.vShow,l.show]])),128))])):e.createCommentVNode("",!0),sn.value&&(fo.value||_n.value||Yn.value)?(e.openBlock(),e.createElementBlock("text",{key:2,x:nl.value.x,y:nl.value.y,"text-anchor":"middle","dominant-baseline":"middle","font-size":Kl.value,fill:Ol.value,class:"dss-radial-data-center"},e.toDisplayString(Tl.value),9,vc)):e.createCommentVNode("",!0),Do.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass(["dss-radial-labels dss-radial-labels-initial",{"dss-radial-labels-animated":Oa.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Jo.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${r}`,class:e.normalizeClass(["dss-radial-label-group",{"dss-label-highlighted":l.isHighlighted,"dss-label-dimmed":l.isDimmed}]),style:e.normalizeStyle({"--label-delay":`${r*.08}s`})},[e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-pointer",x1:l.pointerStartX,y1:l.pointerStartY,x2:l.pointerEndX,y2:l.pointerEndY,stroke:l.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":l.pointerLineLength})},null,12,fc),e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-horizontal",x1:l.pointerEndX,y1:l.pointerEndY,x2:l.horizontalEndX,y2:l.horizontalEndY,stroke:l.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":l.horizontalLineLength})},null,12,hc),e.createElementVNode("text",{class:"dss-radial-label-text",x:l.textX,y:l.textY,"text-anchor":l.textAnchor,"font-size":gn.value,"dominant-baseline":"middle"},e.toDisplayString(l.text),9,gc)],6))),128))],2)):e.createCommentVNode("",!0)],8,ic)):e.createCommentVNode("",!0),il.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-spider-chart",transform:ua.value},[re.value?(e.openBlock(),e.createElementBlock("g",kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ml.value,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${r}`,cx:It.value,cy:Mt.value,r:yt(l),fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${r*150}ms`})},null,12,Cc))),128)),e.createElementVNode("g",bc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ml.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${r}`},[e.createElementVNode("rect",{x:It.value-16,y:Mt.value-l-7,width:"32",height:"16",fill:"transparent",stroke:"none"},null,8,wc),e.createElementVNode("text",{x:It.value,y:Mt.value-l+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(Qn(r)),9,xc)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_o.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${r}`,x1:It.value,x2:l.x,y1:Mt.value,y2:l.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${r*100}ms`})},null,12,Ec))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rs.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${r}`,x:l.x+Math.cos(r*2*Math.PI/pa.value-Math.PI/2)*16,y:l.y+Math.sin(r*2*Math.PI/pa.value-Math.PI/2)*16,"text-anchor":l.anchor,"dominant-baseline":l.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${r*120}ms`})},e.toDisplayString(l.text.charAt(0).toUpperCase()+l.text.slice(1)),13,Vc))),128))]),e.createElementVNode("g",{class:"dss-spider-data",onMousemove:ds,onMouseleave:Mn},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Mo.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${r}`},[e.createElementVNode("polygon",{points:l.points,fill:l.color,"fill-opacity":cs("current",l,r),stroke:l.color,"stroke-width":l.isHighlighted?X.value+1:X.value,"stroke-dasharray":l.strokeDasharray||void 0,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${r*ll.value}ms`,transition:"all 0.2s ease"})},null,14,Nc),l.pointRadius>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.dataPoints,(p,h)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${r}-${h}`,cx:p.x,cy:p.y,r:yt(l.isHighlighted?l.pointRadius+1:l.pointRadius),fill:l.isComparison?"none":l.color,stroke:l.isComparison?l.color:"none","stroke-width":l.isComparison?2:0,class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${r*ll.value+h*50}ms`,transition:"all 0.2s ease"}),onMouseover:E=>jn(p,E),onMouseleave:Mn},null,46,Bc))),128)):e.createCommentVNode("",!0)]))),128))],32)],8,yc)):e.createCommentVNode("",!0),e.createElementVNode("g",_c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(za.value,(l,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${r}`,cx:l.x,cy:l.y,r:yt(l.width/2),fill:Jt(l.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${r}`),style:e.normalizeStyle({animationDelay:`${r*200}ms`})},null,14,Mc))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(za.value,(l,r)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${r}`,x:l.x-l.width/2,y:l.y-l.height/2,width:l.width,height:l.height,"xlink:href":l.url,onLoad:p=>ms(r),onError:p=>ps(r),preserveAspectRatio:"xMidYMid slice",class:e.normalizeClass(`dss-logo-image-${r}`),"clip-path":`circle(${l.width/2}px at ${l.width/2}px ${l.height/2}px)`,style:e.normalizeStyle({animationDelay:`${r*200}ms`})},null,46,$c))),128))])],8,ai)),cl.value&&Yl.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-stepbar-chart-host",style:e.normalizeStyle($n.value)},[e.createElementVNode("div",{ref_key:"stepbarScrollEl",ref:R,class:"dss-stepbar-scroll",onScroll:Ka},[e.createElementVNode("div",{class:"dss-stepbar-scroll-content",style:e.normalizeStyle(tn.value)},[_t.value?(e.openBlock(),e.createElementBlock("div",Dc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bn.value,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`stepbar-grid-${r}`,class:"dss-stepbar-grid-line",style:e.normalizeStyle({top:`${l.top}px`,borderTopColor:$t.value,borderTopWidth:`${kl.value}px`,borderTopStyle:"dashed",opacity:Et.value})},null,4))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"dss-stepbar-columns",style:e.normalizeStyle({gap:`${bl.value}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yl.value,l=>(e.openBlock(),e.createBlock(Ro,{key:l.key,class:"dss-stepbar-chart-column",style:e.normalizeStyle(Ul.value),label:l.label,segments:l.segments,"total-value":l.totalValue,"show-counter":!1,"value-label":kt.value,orientation:"vertical","label-position":"down","bar-height":ml.value,"segment-order":ae.value,"remainder-label":bt.value,"inactive-color":ot.value,options:Wn.value,"disable-tooltips":""},null,8,["style","label","segments","total-value","value-label","bar-height","segment-order","remainder-label","inactive-color","options"]))),128))],4),_l.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-stepbar-crosshair-line",style:e.normalizeStyle(dn.value)},null,4)):e.createCommentVNode("",!0)],4)],544)],4)):e.createCommentVNode("",!0)]),Fl.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:$e.value+"px",height:it.value+"px",backgroundImage:`url('${Kt.value}')`,backgroundRepeat:"no-repeat",...an.value,opacity:fn.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xl.value,(l,r)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+l.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:l.x+"px",top:l.y+"px",width:Dt.value+"px",height:Dt.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(p=>rl(l),["stop"]),onMouseenter:p=>as(l,p),onMouseleave:os},[e.createElementVNode("img",{src:sa(l),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,Tc)],44,Lc)),[[e.vShow,El.value]])),128)),st.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-tooltip",style:e.normalizeStyle({left:st.value.x+"px",top:st.value.y+"px"})},[e.createElementVNode("div",Ac,e.toDisplayString(st.value.categoryValue),1),st.value.description?(e.openBlock(),e.createElementBlock("div",Hc,e.toDisplayString(st.value.description),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Ct.value&&(ge.value.show||Se.value&&Ve.value.show&&!Q.value.isZooming)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":Se.value&&Ve.value.show&&!Q.value.isZooming,"dss-spider-tooltip":il.value&&ge.value.spiderAreas&&ge.value.spiderAreas.length>0}]),style:e.normalizeStyle(vs.value)},[!Se.value||!Ve.value.show||Q.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[il.value&&ge.value.spiderAreas&&ge.value.spiderAreas.length>0?(e.openBlock(),e.createElementBlock("div",Rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value.spiderAreas,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-area-${r}`,class:"dss-spider-tooltip-area"},[e.createElementVNode("div",Fc,[e.createElementVNode("span",{class:"dss-spider-tooltip-area-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createTextVNode(" "+e.toDisplayString(l.seriesName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.points,(p,h)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-point-${r}-${h}`,class:"dss-tooltip-series"},[e.createElementVNode("span",Ic,e.toDisplayString(p.label),1),e.createElementVNode("span",zc,e.toDisplayString(p.value),1)]))),128))]))),128))])):Ft.value&&ge.value.bubbleData&&ge.value.bubbleData.length>0?(e.openBlock(),e.createElementBlock("div",Pc,[ge.value.title?(e.openBlock(),e.createElementBlock("div",Oc,e.toDisplayString(ge.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value.bubbleData,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`bubble-tooltip-${r}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])])):(e.openBlock(),e.createElementBlock("div",qc,[e.createElementVNode("div",Zc,e.toDisplayString(ge.value.title),1),e.createElementVNode("div",Uc,e.toDisplayString(ge.value.value),1)])),ge.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[St(ge.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",Yc,[a[5]||(a[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Xc,e.toDisplayString(e.unref(N)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(St(ge.value.categoryIndex).flagGroups,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${r}`},[e.createElementVNode("div",jc,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(l.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.flags,(p,h)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${r}-${h}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Kc,[e.createElementVNode("div",Gc,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),St(ge.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Qc,[a[6]||(a[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Jc,e.toDisplayString(e.unref(N)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(St(ge.value.categoryIndex).markers,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${r}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",eu,[e.createElementVNode("div",tu,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",lu,e.toDisplayString(l.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",nu,[e.createElementVNode("div",au,e.toDisplayString(cl.value?Da():Ft.value?ns():B.categories[Ve.value.categoryIndex]||`Category ${Ve.value.categoryIndex+1}`),1),Ft.value?(e.openBlock(),e.createElementBlock("div",ou,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value.data,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${r}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Ve.value.data,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${r}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",su,e.toDisplayString(l.seriesName)+":",1),e.createElementVNode("span",ru,e.toDisplayString(xl(l.value)),1)]))),128))]),St(Ve.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",iu,[a[7]||(a[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",cu,e.toDisplayString(e.unref(N)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(St(Ve.value.categoryIndex).flagGroups,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${r}`},[e.createElementVNode("div",uu,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(l.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.flags,(p,h)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${r}-${h}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",du,[e.createElementVNode("div",mu,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),St(Ve.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",pu,[a[8]||(a[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",vu,e.toDisplayString(e.unref(N)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(St(Ve.value.categoryIndex).markers,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${r}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",fu,[e.createElementVNode("div",hu,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",gu,e.toDisplayString(l.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),Bl.value&&gt.value&&Q.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-zoom-indicator",onClick:aa},[a[9]||(a[9]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(Q.value.scale*100))+"% "+e.toDisplayString(e.unref(N)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,Ur),ve.value&&Re.value==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Ge.value==="horizontal","dss-legend-vertical":Ge.value==="vertical","dss-legend-bottom":!0}]),style:{display:"flex","flex-wrap":"wrap","justify-content":"center",padding:"6px 8px 0"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.series,(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-bottom-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":_.value.has(r),"dss-legend-hovered":$.value===r,"dss-legend-dimmed":$.value!==null&&$.value!==r}]),onClick:p=>mo(r),onMouseenter:p=>En(r),onMouseleave:Tn,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":il.value&&At(l)}]),style:e.normalizeStyle({backgroundColor:il.value&&At(l)?"transparent":Il(l,r),borderColor:Il(l,r)})},null,6),e.createElementVNode("span",ku,e.toDisplayString(l.name),1)],46,yu))),128))],2)):e.createCommentVNode("",!0),Qe.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-context-menu",style:e.normalizeStyle({left:Qe.value.x+"px",top:Qe.value.y+"px"}),onClick:a[0]||(a[0]=e.withModifiers(()=>{},["stop"]))},[Wt.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:Ha},e.toDisplayString(e.unref(N)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),Wt.value.addMarker&&(Wt.value.downloadSvg||Wt.value.downloadPng||Wt.value.downloadCsv||qt.value.length>0)?(e.openBlock(),e.createElementBlock("div",Cu)):e.createCommentVNode("",!0),Wt.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-context-menu-item",onClick:Un},e.toDisplayString(e.unref(N)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),Wt.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:to},e.toDisplayString(e.unref(N)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),Wt.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:lo},e.toDisplayString(e.unref(N)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),qt.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[Wt.value.downloadSvg||Wt.value.downloadPng||Wt.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",bu)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qt.value,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+r},[l.separator?(e.openBlock(),e.createElementBlock("div",wu)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(Ta(l)),style:e.normalizeStyle(Zn(l)),onClick:p=>la(l)},[l.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:Qa(l),class:"dss-custom-menu-content"},null,8,Eu)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.icon?(e.openBlock(),e.createElementBlock("span",Su,e.toDisplayString(l.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.label),1)],64))],14,xu)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Oe.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-modal-overlay",onClick:Al},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:a[3]||(a[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Vu,[e.createElementVNode("h3",null,e.toDisplayString(yn.value?e.unref(N)("chart.modalMarker.viewMarker"):xn.value?e.unref(N)("chart.modalMarker.editMarker"):e.unref(N)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:Al},"×")]),e.createElementVNode("div",Nu,[e.createElementVNode("div",Bu,[e.createVNode(go,{id:"dss-marker-date",mode:"single",modelValue:Oe.value.date,"onUpdate:modelValue":a[1]||(a[1]=l=>Oe.value.date=l),"min-date":Jn.value,"max-date":ea.value,disabled:yn.value},null,8,["modelValue","min-date","max-date","disabled"])]),e.createElementVNode("div",_u,[e.createElementVNode("label",Mu,e.toDisplayString(e.unref(N)("chart.modalMarker.description")),1),yn.value?(e.openBlock(),e.createElementBlock("div",$u,e.toDisplayString(Oe.value.description),1)):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,id:"dss-marker-description","onUpdate:modelValue":a[2]||(a[2]=l=>Oe.value.description=l),placeholder:e.unref(N)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"5"},null,8,Du)),[[e.vModelText,Oe.value.description]])])]),e.createElementVNode("div",Lu,[e.createElementVNode("div",Tu,[xn.value&&!yn.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:An},e.toDisplayString(e.unref(N)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Au,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:Al},e.toDisplayString(yn.value?e.unref(N)("chart.modalMarker.close"):e.unref(N)("chart.modalMarker.cancel")),1),yn.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-primary",onClick:Vn,disabled:!(Oe.value.description&&Oe.value.description.length)},e.toDisplayString(xn.value?e.unref(N)("chart.modalMarker.save"):e.unref(N)("chart.contextMenu.addMarker")),9,Hu))])])])])):e.createCommentVNode("",!0)],64))}}),Iu={class:"dss-modal-title"},zu={class:"dss-modal-actions"},ho={__name:"DSSModal",props:{showModal:{type:Boolean,required:!0},backDrop:{type:Boolean,default:!0},width:{type:String,default:"800px"},height:{type:String,default:"auto"},showCloseBtn:{type:Boolean,default:!0},headerType:{type:String,default:"space-between"},titleSize:{type:String,default:"24px"}},emits:["close-modal"],setup(B,{emit:J}){const N=B,L=J,ne=e.ref(null),W=e.ref(null),R=e.computed(()=>{const j={"max-width":N.width};return N.height!=="auto"&&(j.height=N.height,j["min-height"]="0"),j}),ue=e.computed(()=>({}));function rt(){L("close-modal")}function ee(){N.backDrop&&!ne.value&&L("close-modal")}function g(j){j.target.tagName==="INPUT"&&(ne.value=j.target.tagName)}function we(){setTimeout(()=>{ne.value=null},300)}function ke(){const j=document.body,fe=document.documentElement;W.value={bodyOverflow:j.style.overflow,bodyPosition:j.style.position,bodyTop:j.style.top,bodyWidth:j.style.width,htmlOverflow:fe.style.overflow,scrollY:window.scrollY},j.style.overflow="hidden",j.style.position="fixed",j.style.top=`-${W.value.scrollY}px`,j.style.width="100%",j.style.left="0",fe.style.overflow="hidden"}function G(){if(!W.value)return;const j=document.body,fe=document.documentElement,{bodyOverflow:He,bodyPosition:he,bodyTop:Te,bodyWidth:Z,htmlOverflow:Fe,scrollY:qe}=W.value;j.style.overflow=He||"",j.style.position=he||"",j.style.top=Te||"",j.style.width=Z||"",j.style.left="",fe.style.overflow=Fe||"",window.scrollTo(0,qe||0)}return e.watch(()=>N.showModal,j=>{if(j)ke(),document.body.classList.add("dss-modal-open"),setTimeout(()=>{const fe=document.getElementById("dss-modal-backdrop");fe&&(fe.addEventListener("focusin",g),fe.addEventListener("focusout",we))},100);else{G(),document.body.classList.remove("dss-modal-open");const fe=document.getElementById("dss-modal-backdrop");fe&&(fe.removeEventListener("focusin",g),fe.removeEventListener("focusout",we))}},{immediate:!0}),e.onUnmounted(()=>{N.showModal&&G()}),(j,fe)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[B.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-modal-backdrop",onClick:ee},[e.withDirectives(e.createElementVNode("div",{id:"dss-modal-backdrop",class:"dss-modal",style:e.normalizeStyle(R.value)},[e.createElementVNode("div",{class:"dss-modal-content",onClick:fe[0]||(fe[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-modal-header",style:e.normalizeStyle({"justify-content":B.headerType,"font-size":B.titleSize})},[e.createElementVNode("h1",Iu,[e.renderSlot(j.$slots,"title",{},()=>[fe[1]||(fe[1]=e.createTextVNode("Default Title",-1))])]),e.renderSlot(j.$slots,"title-data"),B.showCloseBtn?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-modal-close",onClick:rt,title:"Close"},"×")):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"dss-modal-body",style:e.normalizeStyle(ue.value)},[e.renderSlot(j.$slots,"content",{},()=>[fe[2]||(fe[2]=e.createTextVNode("Default Content",-1))])],4),e.createElementVNode("div",zu,[e.renderSlot(j.$slots,"actions")])])],4),[[e.vShow,B.showModal]])])):e.createCommentVNode("",!0)]))}},Pu={key:0,class:"dss-table-toolbar"},Ou={class:"dss-table-toolbar-left"},Wu=["aria-expanded"],qu={class:"dss-pagination-select-dropdown",role:"listbox"},Zu={class:"dss-table-column-visibility-label"},Uu={class:"dss-table-checkbox-wrapper"},Yu=["checked","onChange"],Xu={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},ju={class:"dss-table-column-visibility-text"},Ku={class:"dss-table-toolbar-right"},Gu=["placeholder","aria-label"],Qu=["aria-label"],Ju=["aria-label","aria-expanded"],ed={key:1,class:"dss-table-toolbar-extra"},td={class:"dss-table-thead"},ld={key:0,class:"dss-table-th dss-table-selection-column"},nd={key:0,class:"dss-table-checkbox-wrapper"},ad=["checked","indeterminate"],od={key:0,class:"dss-table-checkbox__indeterminate"},sd={key:1,class:"dss-table-checkbox__check","aria-hidden":"true"},rd=["aria-label"],id=["onClick"],cd={class:"dss-table-th-content"},ud={class:"dss-table-th-text"},dd={key:0},md={key:1},pd={key:2},vd=["data-filter-column-key","aria-expanded","aria-label","onClick"],fd={class:"dss-table-tbody"},hd=["onClick"],gd={class:"dss-table-checkbox-wrapper"},yd=["type","name","checked","disabled","onChange"],kd={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Cd={key:1,class:"dss-table-checkbox__dot"},bd=["onClick"],wd=["aria-expanded","aria-label"],xd={key:1,class:"dss-table-expansion-placeholder","aria-hidden":"true"},Ed={key:0,class:"dss-table-expansion-row"},Sd=["colspan"],Vd=["colspan"],Nd={key:1,class:"dss-table-pagination"},Bd={class:"dss-table-pagination-left"},_d={key:0},Md={key:1,class:"dss-table-pagination-placeholder","aria-hidden":"true"},$d={class:"dss-table-pagination-center"},Dd={key:0,class:"dss-pagination-controls"},Ld=["disabled","title"],Td=["disabled","title"],Ad=["aria-label","onKeydown"],Hd={class:"dss-pagination-of"},Rd=["disabled","title"],Fd=["disabled","title"],Id={class:"dss-table-pagination-right"},zd={class:"dss-pagination-rows-label"},Pd=["aria-expanded"],Od=["aria-selected","onClick"],Wd={key:0,class:"dss-table-filter-row"},qd=["value","placeholder"],Zd=["min","max","value"],Ud=["min","max","value"],Yd={class:"dss-table-filter-double-range-values"},Xd={key:2,class:"dss-table-filter-daterange"},jd={class:"dss-table-filter-daterange-row"},Kd={class:"dss-table-filter-daterange-label"},Gd=["value"],Qd={class:"dss-table-filter-daterange-row"},Jd={class:"dss-table-filter-daterange-label"},e1=["value"],t1=["value","placeholder"],l1={class:"dss-table-filter-list"},n1=["checked","onChange"],a1={class:"dss-table-filter-actions"},o1={name:"DSSTable"},s1=Object.assign(o1,{props:{data:{type:Array,required:!0,default:()=>[]},columns:{type:Array,required:!0,default:()=>[]},tableId:{type:String,default:()=>"table-"+Math.random().toString(36).substring(2,9)},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:B=>typeof B=="object"&&B!==null},columnVisibility:{type:Array,default:null}},emits:["row-click","row-select","row-unselect","select-all","unselect-all","row-expand","row-collapse","sort","page","download-pdf","download-excel","search","update:columnVisibility"],setup(B,{emit:J}){const{t:N,locale:L}=ha.useI18n(),ne=B,W=J,R={table:{width:"auto",height:null,rowHeight:"auto",truncated:!1,expandable:!1,expandableRowData:null,expandableRowCondition:null,striped:!1,bordered:!1,hoverable:!0,size:"default",align:"left"},title:{text:""},subtitle:{text:""},selection:{enabled:!1,mode:"single",rowCondition:null},sorting:{enabled:!0,mode:"single"},pagination:{enabled:!1,rows:10,rowsPerPageOptions:[5,10,25,50,100],showCounter:!0,showControlsGroup:!0,showControls:!0,showRowsPerPage:!0},toolbar:{downloads:{pdf:!0,excel:!0},columnVisibility:!0,search:!0},scrollable:!1,emptyMessage:null};function ue(d,f){const b=Object.assign({},d);return rt(d)&&rt(f)&&Object.keys(f).forEach(_=>{rt(f[_])?_ in d?b[_]=ue(d[_],f[_]):Object.assign(b,{[_]:f[_]}):Object.assign(b,{[_]:f[_]})}),b}function rt(d){return d&&typeof d=="object"&&!Array.isArray(d)}const ee=e.computed(()=>ue(R,ne.options)),g=e.computed(()=>{const d=ee.value.table.width;return d==="auto"?null:typeof d=="number"?d:null}),we=e.computed(()=>ee.value.table.height),ke=e.computed(()=>ee.value.table.rowHeight??"auto"),G=e.computed(()=>({height:ke.value})),j=e.computed(()=>ee.value.table.expandable===!0),fe=e.computed(()=>ee.value.table.expandableRowData??null),He=e.computed(()=>ee.value.table.expandableRowCondition??null),he=e.computed(()=>ee.value.table.truncated===!0),Te=e.computed(()=>ee.value.table.striped),Z=e.computed(()=>ee.value.table.bordered),Fe=e.computed(()=>ee.value.table.hoverable),qe=e.computed(()=>ee.value.table.size),Me=e.computed(()=>ee.value.table.align||"left");e.computed(()=>ee.value.title.text),e.computed(()=>ee.value.subtitle.text);const Ze=e.computed(()=>ee.value.selection.enabled),U=e.computed(()=>ee.value.selection.mode),Ae=e.computed(()=>ee.value.selection.rowCondition??null),Ye=e.computed(()=>ee.value.sorting.enabled),Ce=e.computed(()=>ee.value.sorting.mode),$e=e.computed(()=>ee.value.pagination.enabled),lt=e.computed(()=>ee.value.pagination.rows),ft=e.computed(()=>ee.value.pagination.rowsPerPageOptions),it=e.computed(()=>ee.value.pagination.showCounter!==!1),Xt=e.computed(()=>ee.value.pagination.showControlsGroup),xe=e.computed(()=>Xt.value===!1?!1:ee.value.pagination.showControls!==!1),Lt=e.computed(()=>Xt.value===!1?!1:ee.value.pagination.showRowsPerPage!==!1),Ke=e.computed(()=>$e.value&&(it.value||xe.value||Lt.value)),Je=e.computed(()=>ee.value.scrollable),mt=e.computed(()=>ee.value.emptyMessage||N("table.emptyMessage")),Tt=e.computed(()=>ee.value.toolbar?.downloads?.pdf!==!1),at=e.computed(()=>ee.value.toolbar?.downloads?.excel!==!1),pt=e.computed(()=>ee.value.toolbar?.search!==!1),ct=e.computed(()=>Tt.value||at.value||pt.value||Ut.value),Ut=e.computed(()=>ee.value.toolbar?.columnVisibility!==!1),ht=e.ref(""),Rt=e.ref(!1),me=e.ref(null);let F=null;function Y(){Rt.value?(F&&(clearTimeout(F),F=null),Rt.value=!1,ht.value="",W("search",""),me.value?.blur()):(Rt.value=!0,F=setTimeout(()=>{F=null,me.value?.focus()},80))}function re(){ht.value||(Rt.value=!1)}function ve(){ht.value="",W("search",""),me.value?.focus()}const Re=e.computed(()=>({"dss-table-striped":Te.value,"dss-table-bordered":Z.value,"dss-table-hoverable":Fe.value,[`dss-table-${qe.value}`]:qe.value!=="default","dss-table-truncated":he.value})),Ge=(d,f)=>d?.field??d?.key??f,Ct=e.ref(new Set);function Se(){const d=new Set;return ne.columns.forEach((f,b)=>{f?.hidden!==!0&&d.add(Ge(f,b))}),d}function tt(){const d=new Set;return ne.columns.forEach((f,b)=>{d.add(Ge(f,b))}),d}function gt(d){if(!Array.isArray(d))return null;const f=tt(),b=[];return d.forEach(_=>{f.has(_)&&b.push(_)}),b}function jt(){Ct.value=Se()}const se=e.computed(()=>{const d=gt(ne.columnVisibility);return d===null?null:new Set(d)}),X=e.computed(()=>se.value??Ct.value),te=e.computed(()=>ne.columns.filter((d,f)=>X.value.has(Ge(d,f)))),ie=d=>{const f=ne.columns.findIndex(b=>b===d);return Ge(d,f>=0?f:0)},Ne=(d,f)=>X.value.has(Ge(d,f));function et(d){W("update:columnVisibility",Array.from(d))}function yt(d,f){const b=Ge(d,f),_=new Set(X.value);_.has(b)?_.delete(b):_.add(b),se.value===null&&(Ct.value=_),et(_)}const al=e.ref(null),xt=e.ref(!1);function el(d){al.value&&!al.value.contains(d.target)&&(xt.value=!1)}const H=e.computed(()=>te.value.length+(Ze.value?1:0)+(j.value?1:0)),V=(d,f)=>d?.id??d?.key??f,M=e.ref(new Set),ae=e.ref(null),oe=(d,f)=>M.value.has(V(d,f)),Ue=(d,f)=>{if(!j.value)return!1;if(typeof He.value=="function")return!!He.value(d,f);if(typeof fe.value=="string"&&fe.value.trim()){const b=k(d,fe.value.trim());return Array.isArray(b)?b.length>0:b&&typeof b=="object"?Object.keys(b).length>0:b!=null&&b!==""}return!0},bt=(d,f,b)=>{if(b&&b.stopPropagation(),!Ue(d,f))return;const _=V(d,f),$=new Set(M.value);$.has(_)?($.delete(_),W("row-collapse",{data:d,index:f})):($.add(_),W("row-expand",{data:d,index:f})),M.value=$},ot=(d,f)=>{if(!he.value)return;const b=V(d,f);ae.value!==b&&(ae.value=b)},Xe=e.ref(null),Nt=e.ref(0),wt=e.ref([]),ut=d=>{if(Ce.value==="single")return Xe.value===d.field?Nt.value:0;{const f=wt.value.find(b=>b.field===d.field);return f?f.order:0}},_t=d=>{const f=ut(d);return{"dss-sort-active":f!==0,"dss-sort-asc":f===1,"dss-sort-desc":f===-1}},$t=e.ref({}),Et=e.ref(null),kl=e.ref(null),Zl=220,bl=e.ref(null),tl=e.computed(()=>te.value.find(d=>ie(d)===Et.value)??null),ol=e.computed(()=>{if(!tl.value||tl.value.filter!=="range")return null;const d=tl.value,f=Et.value,{min:b,max:_}=mn(d),$=d.filterMin??b,ye=d.filterMax??_,ge=Hl(f),st=ge.min??$,Ve=ge.max??ye,Qe=ye-$,Q=Qe===0?0:(st-$)/Qe*100,Zt=Qe===0?100:(Ve-$)/Qe*100;return{rangeMin:$,rangeMax:ye,currentMin:st,currentMax:Ve,minPct:Q,maxPct:Zt}}),un=e.ref(null),ml=e.ref("max");function dt(d){const f=un.value,b=ol.value;if(!f||!b)return;const _=f.getBoundingClientRect(),ye=(d.clientX-_.left)/_.width*100,ge=(b.minPct+b.maxPct)/2;ml.value=ye<ge?"min":"max"}function Hl(d){return $t.value[d]??{}}function Ul(d,f){$t.value={...$t.value,[d]:f}}function Ll(d){const f=$t.value[d];return f?f.type==="string"?!!f.value?.trim():f.type==="range"?f.min!=null||f.max!=null:f.type==="dateRange"?!!(f.from||f.to):f.type==="list"?f.selected?.length>0:!1:!1}function Wn(d){const f={...$t.value};delete f[d],$t.value=f,Et.value=null,kl.value=null}function Yl(){if(!Et.value){kl.value=null;return}const d=bl.value;if(!d)return;const f=d.querySelector(`.dss-table-filter-trigger[data-filter-column-key="${Et.value}"]`);if(!f)return;const b=f.getBoundingClientRect();kl.value={top:b.bottom+6,left:Math.max(8,b.right-Zl)}}const bn=e.computed(()=>{const d=String(ht.value??"").trim().toLowerCase();return d?ne.data.filter(f=>te.value.some(b=>tn(Ol(f,b)).some($=>String($).toLowerCase().includes(d)))):ne.data}),$n=e.computed(()=>{let d=[...bn.value];const f=(ht.value??"").trim().toLowerCase();return f&&(d=d.filter(b=>ne.columns.some(_=>{if(!_||!_.field)return!1;const $=Ol(b,_);return String($??"").toLowerCase().includes(f)}))),te.value.forEach(b=>{const _=ie(b),$=$t.value[_];if(!$)return;const ye=b.field;if(ye){if($.type==="string"&&$.value?.trim()){const ge=$.value.trim().toLowerCase();d=d.filter(st=>{const Ve=Ol(st,b);return String(Ve??"").toLowerCase().includes(ge)})}else if($.type==="range")d=d.filter(ge=>{const st=k(ge,ye),Ve=Number(st);return!(Number.isNaN(Ve)||$.min!=null&&Ve<$.min||$.max!=null&&Ve>$.max)});else if($.type==="dateRange"){const ge=$.from?new Date($.from).getTime():null,st=$.to?new Date($.to).getTime():null;d=d.filter(Ve=>{const Qe=k(Ve,ye),Q=Qe?new Date(Qe).getTime():NaN;return!(Number.isNaN(Q)||ge!=null&&Q<ge||st!=null&&Q>st)})}else if($.type==="list"&&$.selected?.length){const ge=new Set($.selected);d=d.filter(st=>tn(Ol(st,b)).some(Qe=>ge.has(Qe)))}}}),d});function tn(d){if(d==null)return[""];if(Array.isArray(d))return d.flatMap(tn);if(typeof d=="object"){const f=d?.label??d?.name??d?.value??d?.title;return[f!=null?String(f):String(d)]}return[String(d)]}function _l(d){const f=new Set;return ne.data.forEach(b=>{tn(Ol(b,d)).forEach($=>f.add($))}),Array.from(f).sort((b,_)=>String(b).localeCompare(String(_)))}function dn(d,f){if(Et.value===d){Et.value=null,kl.value=null;return}if(Et.value=d,f?.currentTarget){const b=f.currentTarget.getBoundingClientRect();kl.value={top:b.bottom+6,left:Math.max(8,b.right-Zl)}}else Yl()}function wl(d,f){Ul(d,{type:"string",value:f})}function mn(d){const f=d.field;if(!f)return{min:0,max:100};let b=1/0,_=-1/0;return ne.data.forEach($=>{const ye=k($,f),ge=Number(ye);Number.isNaN(ge)||(b=Math.min(b,ge),_=Math.max(_,ge))}),{min:b===1/0?0:b,max:_===-1/0?100:_}}function zl(d,f,b){const _={...Hl(d),type:"range"},$=b===""?null:Number(b),ye=$===null||Number.isNaN($)?null:$;_[f]=ye,ye!=null&&(f==="min"&&_.max!=null&&ye>_.max&&(_.max=ye),f==="max"&&_.min!=null&&ye<_.min&&(_.min=ye)),Ul(d,_)}function pn(d,f,b){const _={...Hl(d),type:"dateRange"};_[f]=b||"",Ul(d,_)}const ln=e.reactive({});function ll(d,f){ln[d]=f}function Gn(d){const f=ie(d),b=(ln[f]??"").trim().toLowerCase(),_=_l(d);return b?_.filter($=>String($).toLowerCase().includes(b)):_}function qn(d,f){return(Hl(d).selected??[]).includes(f!=null?String(f):"")}function Rl(d,f){const _=[...Hl(d).selected??[]],$=f!=null?String(f):"",ye=_.indexOf($);ye>=0?_.splice(ye,1):_.push($),Ul(d,{type:"list",selected:_})}function vn(d){Et.value&&!d.target.closest(".dss-table-filter-wrap")&&!d.target.closest(".dss-table-filter-dropdown")&&(Et.value=null,kl.value=null)}function Ml(){Yl(),qt.value&&gl()}const Qn=d=>{if(!(d.sortable===!1||!Ye.value))if(Ce.value==="single")Xe.value===d.field?Nt.value=Nt.value===1?-1:Nt.value===-1?0:1:(Xe.value=d.field,Nt.value=1),Nt.value===0&&(Xe.value=null),W("sort",{field:Xe.value,order:Nt.value});else{const f=wt.value.findIndex(b=>b.field===d.field);f>=0?wt.value[f].order===1?wt.value[f].order=-1:wt.value.splice(f,1):wt.value.push({field:d.field,order:1}),W("sort",{multiSortMeta:wt.value})}},nn=e.computed(()=>{if(!Ye.value)return $n.value;let d=[...$n.value];return Ce.value==="single"&&Xe.value&&Nt.value!==0?d.sort((f,b)=>{const _=k(f,Xe.value),$=k(b,Xe.value);return _===$?0:_==null?1:$==null?-1:(_<$?-1:_>$?1:0)*Nt.value}):Ce.value==="multiple"&&wt.value.length>0&&d.sort((f,b)=>{for(const _ of wt.value){const $=k(f,_.field),ye=k(b,_.field);if($===ye)continue;if($==null)return 1;if(ye==null)return-1;const ge=$<ye?-1:$>ye?1:0;if(ge!==0)return ge*_.order}return 0}),d}),sl=e.ref(0),Wt=e.ref(lt.value),qt=e.ref(!1),vl=e.ref(null),Pl=e.ref(null),Dt=e.ref("bottom"),kt=e.ref(null),xl=d=>{Wt.value=d,qt.value=!1,sl.value=0,W("page",{page:0,rows:Wt.value})};function El(d){vl.value&&!vl.value.contains(d.target)&&(qt.value=!1)}function gl(){const d=vl.value,f=Pl.value;if(!d||!f)return;const b=d.querySelector(".dss-pagination-select-dropdown");if(!b)return;const _=f.getBoundingClientRect(),$=b.offsetHeight||0,ge=(window.innerHeight||document.documentElement.clientHeight)-_.bottom,st=_.top;Dt.value=ge<$+8&&st>ge?"top":"bottom",kt.value={width:`${Math.ceil(_.width)}px`,left:`${Math.max(0,Math.round(f.offsetLeft))}px`}}const Xl=e.computed(()=>nn.value.length),Fl=e.computed(()=>Math.ceil(Xl.value/Wt.value)),fn=e.computed(()=>Math.max(Fl.value,1)),hn=e.computed(()=>Xl.value===0?0:Yt.value+1),$l=e.computed(()=>an.value),Yt=e.computed(()=>$e.value?sl.value*Wt.value:0),an=e.computed(()=>$e.value?Math.min((sl.value+1)*Wt.value,Xl.value):Xl.value),Sl=e.computed(()=>{if(!$e.value)return nn.value;const d=Yt.value,f=an.value;return nn.value.slice(d,f)}),St=e.ref(new Set),Dn=e.computed(()=>nn.value.filter((d,f)=>St.value.has(V(d,f)))),Kt=(d,f)=>{const b=Ae.value;return typeof b!="function"?!0:!!b(d,f)},Vl=e.computed(()=>nn.value.map((d,f)=>({row:d,index:f})).filter(({row:d,index:f})=>Kt(d,f))),gn=e.computed(()=>{const d=Vl.value;return d.length===0?!1:d.every(({row:f,index:b})=>St.value.has(V(f,b)))}),wn=e.computed(()=>{const d=Vl.value;if(d.length===0)return!1;const f=d.filter(({row:b,index:_})=>St.value.has(V(b,_))).length;return f>0&&f<d.length}),on=(d,f)=>St.value.has(V(d,f)),yl=()=>{if(gn.value)St.value=new Set,W("unselect-all");else{const d=new Set;Vl.value.forEach(({row:f,index:b})=>d.add(V(f,b))),St.value=d,W("select-all",Dn.value)}},Ln=(d,f)=>{if(!Kt(d,f))return;const b=V(d,f),_=new Set(St.value),$=_.has(b);U.value==="single"?$?(_.delete(b),W("row-unselect",d)):(_.clear(),_.add(b),W("row-select",d)):$?(_.delete(b),W("row-unselect",d)):(_.add(b),W("row-select",d)),St.value=_},jl=e.ref("1"),sn=()=>{const d=Number.parseInt(String(jl.value),10);if(!Number.isFinite(d)){jl.value=String(sl.value+1);return}const f=Math.min(fn.value,Math.max(1,d));f!==sl.value+1?Tl(f-1):jl.value=String(f)},Tl=d=>{d<0||d>=Fl.value||(sl.value=d,W("page",{page:d,rows:Wt.value}))},Kl=(d,f,b)=>{W("row-click",{data:d,index:f,originalEvent:b}),ot(d,Yt.value+f)},nl=(d,f)=>{const b=Yt.value+f;return{"dss-table-row-selected":on(d,b),"dss-table-row-even":f%2===0,"dss-table-row-odd":f%2!==0,"dss-table-row-truncated-clickable":he.value,"dss-table-row-truncated-expanded":ae.value===V(d,b)}},Ol=(d,f)=>f.field?k(d,f.field):"",k=(d,f)=>f.split(".").reduce((b,_)=>b&&b[_],d),C=d=>{const f=d.align??Me.value;return{"dss-table-sortable":d.sortable!==!1&&Ye.value,"dss-table-align-left":f==="left","dss-table-align-center":f==="center","dss-table-align-right":f==="right",[d.className]:d.className}},x=d=>{const f={};return d.width&&(f.width=typeof d.width=="number"?`${d.width}px`:d.width),d.minWidth&&(f.minWidth=typeof d.minWidth=="number"?`${d.minWidth}px`:d.minWidth),d.maxWidth&&(f.maxWidth=typeof d.maxWidth=="number"?`${d.maxWidth}px`:d.maxWidth),f};return e.watch(()=>ne.locale,d=>{d&&d!==L.value&&(L.value=d)},{immediate:!0}),e.watch(lt,d=>{Wt.value=d,sl.value=0}),e.watch(qt,async d=>{d&&(await e.nextTick(),gl())}),e.watch(sl,d=>{jl.value=String(d+1)},{immediate:!0}),e.watch(ht,d=>{W("search",d??"")}),e.watch(()=>ne.columns,()=>{if(se.value===null){jt();return}const d=gt(ne.columnVisibility)??[];d.length!==ne.columnVisibility.length&&W("update:columnVisibility",d)},{immediate:!0,deep:!0}),e.onMounted(()=>{document.addEventListener("click",El),document.addEventListener("click",el),document.addEventListener("click",vn),window.addEventListener("resize",Ml),window.addEventListener("scroll",Ml,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",El),document.removeEventListener("click",el),document.removeEventListener("click",vn),window.removeEventListener("resize",Ml),window.removeEventListener("scroll",Ml,!0)}),(d,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"dss-table-container",ref_key:"tableContainerRef",ref:bl,style:e.normalizeStyle({width:g.value+"px",height:we.value?we.value+"px":"auto"})},[ct.value?(e.openBlock(),e.createElementBlock("div",Pu,[e.createElementVNode("div",Ou,[Tt.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-btn",onClick:f[0]||(f[0]=b=>W("download-pdf"))},[f[22]||(f[22]=e.createStaticVNode('<span class="dss-table-toolbar-btn-icon" aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_download)"><path d="M16.59 9H15V4C15 3.45 14.55 3 14 3H10C9.45 3 9 3.45 9 4V9H7.41C6.52 9 6.07 10.08 6.7 10.71L11.29 15.3C11.68 15.69 12.31 15.69 12.7 15.3L17.29 10.71C17.92 10.08 17.48 9 16.59 9ZM5 19C5 19.55 5.45 20 6 20H18C18.55 20 19 19.55 19 19C19 18.45 18.55 18 18 18H6C5.45 18 5 18.45 5 19Z" fill="currentColor"></path></g><defs><clipPath id="clip0_download"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg></span>',1)),e.createTextVNode(" "+e.toDisplayString(e.unref(N)("table.downloadPdf")),1)])):e.createCommentVNode("",!0),at.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-table-toolbar-btn",onClick:f[1]||(f[1]=b=>W("download-excel"))},[f[23]||(f[23]=e.createStaticVNode('<span class="dss-table-toolbar-btn-icon" aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_download_excel)"><path d="M16.59 9H15V4C15 3.45 14.55 3 14 3H10C9.45 3 9 3.45 9 4V9H7.41C6.52 9 6.07 10.08 6.7 10.71L11.29 15.3C11.68 15.69 12.31 15.69 12.7 15.3L17.29 10.71C17.92 10.08 17.48 9 16.59 9ZM5 19C5 19.55 5.45 20 6 20H18C18.55 20 19 19.55 19 19C19 18.45 18.55 18 18 18H6C5.45 18 5 18.45 5 19Z" fill="currentColor"></path></g><defs><clipPath id="clip0_download_excel"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg></span>',1)),e.createTextVNode(" "+e.toDisplayString(e.unref(N)("table.downloadExcel")),1)])):e.createCommentVNode("",!0),Ut.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-table-toolbar-column-visibility",ref_key:"columnVisibilityDropdownRef",ref:al},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":xt.value}]),onClick:f[2]||(f[2]=b=>xt.value=!xt.value),"aria-expanded":xt.value,"aria-haspopup":"listbox"},[e.createTextVNode(e.toDisplayString(e.unref(N)("table.columnVisibility"))+" ",1),f[24]||(f[24]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,Wu),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",qu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.columns,(b,_)=>(e.openBlock(),e.createElementBlock("li",{key:Ge(b,_),role:"option",class:"dss-table-column-visibility-option",onClick:f[3]||(f[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",Zu,[e.createElementVNode("span",Uu,[e.createElementVNode("input",{type:"checkbox",checked:Ne(b,_),onChange:$=>yt(b,_),class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,Yu),Ne(b,_)?(e.openBlock(),e.createElementBlock("span",Xu,[...f[25]||(f[25]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("span",ju,e.toDisplayString(b.header),1)])]))),128))],512),[[e.vShow,xt.value]])]),_:1})],512)):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"header")]),e.createElementVNode("div",Ku,[pt.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-table-toolbar-search",{"dss-table-toolbar-search--expanded":Rt.value||ht.value}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:me,"onUpdate:modelValue":f[4]||(f[4]=b=>ht.value=b),type:"text",class:"dss-table-toolbar-search-input",placeholder:e.unref(N)("table.searchPlaceholder"),"aria-label":e.unref(N)("table.searchTableAriaLabel"),onFocus:f[5]||(f[5]=b=>Rt.value=!0),onBlur:re},null,40,Gu),[[e.vModelText,ht.value]]),ht.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-search-clear","aria-label":e.unref(N)("table.clearSearchAriaLabel"),onClick:ve},[...f[26]||(f[26]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])],8,Qu)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"dss-table-toolbar-search-trigger","aria-label":e.unref(N)("table.searchAriaLabel"),"aria-expanded":Rt.value||!!ht.value,onMousedown:e.withModifiers(Y,["prevent"])},[...f[27]||(f[27]=[e.createElementVNode("span",{class:"dss-table-toolbar-search-icon","aria-hidden":"true"},[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.81738 0C7.47741 0.000327759 9.63379 2.09488 9.63379 4.67773C9.63366 5.68756 9.30172 6.62133 8.74121 7.38574L11.2324 9.80469C11.653 10.213 11.6528 10.8885 11.2324 11.2969C10.829 11.6886 10.1866 11.6886 9.7832 11.2969L7.16895 8.75781C6.47333 9.13671 5.67174 9.35439 4.81738 9.35449C2.15724 9.35449 -0.000652839 7.26049 -0.000976562 4.67773C-0.000976562 2.09468 2.15704 0 4.81738 0ZM4.81738 1.41895C2.96425 1.41895 1.46213 2.87754 1.46191 4.67676C1.46202 6.47611 2.96418 7.93555 4.81738 7.93555C6.67025 7.93519 8.17275 6.47589 8.17285 4.67676C8.17263 2.87776 6.67018 1.4193 4.81738 1.41895Z",fill:"currentColor"})])],-1)])],40,Ju)],2)):e.createCommentVNode("",!0),d.$slots["toolbar-extra"]?(e.openBlock(),e.createElementBlock("div",ed,[e.renderSlot(d.$slots,"toolbar-extra")])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-table-wrapper",{"dss-table-scrollable":Je.value}])},[e.createElementVNode("table",{class:e.normalizeClass(["dss-table",Re.value])},[e.createElementVNode("thead",td,[e.createElementVNode("tr",null,[Ze.value?(e.openBlock(),e.createElementBlock("th",ld,[U.value==="multiple"?(e.openBlock(),e.createElementBlock("span",nd,[e.createElementVNode("input",{type:"checkbox",checked:gn.value,indeterminate:wn.value,onChange:yl,class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,ad),wn.value?(e.openBlock(),e.createElementBlock("span",od)):gn.value?(e.openBlock(),e.createElementBlock("span",sd,[...f[28]||(f[28]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),j.value?(e.openBlock(),e.createElementBlock("th",{key:1,class:"dss-table-th dss-table-expansion-column","aria-label":e.unref(N)("table.expandRowAriaLabel")},null,8,rd)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(b,_)=>(e.openBlock(),e.createElementBlock("th",{key:ie(b),class:e.normalizeClass(["dss-table-th",C(b)]),style:e.normalizeStyle(x(b)),onClick:$=>Qn(b)},[e.createElementVNode("div",cd,[e.createElementVNode("span",ud,e.toDisplayString(b.header),1),b.sortable!==!1&&Ye.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dss-table-sort-icon",_t(b)])},[ut(b)===0?(e.openBlock(),e.createElementBlock("span",dd,[...f[29]||(f[29]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.413 9.06387C5.45434 9.16352 5.4652 9.27319 5.4442 9.37901C5.42321 9.48484 5.3713 9.58206 5.29505 9.65837L3.11339 11.84C3.06273 11.8907 3.00258 11.931 2.93637 11.9584C2.87016 11.9859 2.79918 12 2.72751 12C2.65583 12 2.58486 11.9859 2.51865 11.9584C2.45243 11.931 2.39228 11.8907 2.34163 11.84L0.159964 9.65837C0.0835992 9.58209 0.0315843 9.48487 0.0105038 9.37902C-0.0105768 9.27316 0.000224981 9.16343 0.0415416 9.06371C0.0828581 8.964 0.152832 8.87879 0.242604 8.81886C0.332376 8.75894 0.43791 8.72699 0.545845 8.72708H2.18209V0.545845C2.18209 0.401191 2.23955 0.262463 2.34184 0.160178C2.44413 0.0578925 2.58285 0.000429123 2.72751 0.000429123C2.87216 0.000429123 3.01089 0.0578925 3.11317 0.160178C3.21546 0.262463 3.27292 0.401191 3.27292 0.545845V8.72708H4.90917C5.01704 8.7271 5.12248 8.75911 5.21216 8.81906C5.30185 8.87901 5.37174 8.9642 5.413 9.06387ZM11.84 2.34162L9.65837 0.159963C9.60772 0.109252 9.54757 0.0690231 9.48135 0.0415755C9.41514 0.0141278 9.34417 0 9.27249 0C9.20082 0 9.12984 0.0141278 9.06363 0.0415755C8.99742 0.0690231 8.93727 0.109252 8.88661 0.159963L6.70495 2.34162C6.62858 2.4179 6.57657 2.51513 6.55549 2.62098C6.53441 2.72684 6.54521 2.83657 6.58653 2.93629C6.62784 3.036 6.69782 3.12121 6.78759 3.18114C6.87736 3.24107 6.9829 3.27301 7.09083 3.27292H8.72708V11.4542C8.72708 11.5988 8.78454 11.7375 8.88683 11.8398C8.98911 11.9421 9.12784 11.9996 9.27249 11.9996C9.41715 11.9996 9.55587 11.9421 9.65816 11.8398C9.76045 11.7375 9.81791 11.5988 9.81791 11.4542V3.27292H11.4542C11.5621 3.27301 11.6676 3.24107 11.7574 3.18114C11.8472 3.12121 11.9171 3.036 11.9585 2.93629C11.9998 2.83657 12.0106 2.72684 11.9895 2.62098C11.9684 2.51513 11.9164 2.4179 11.84 2.34162Z",fill:"#3a3a3a"})],-1)])])):ut(b)===1?(e.openBlock(),e.createElementBlock("span",md,[...f[30]||(f[30]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M6 12C6.36819 12 6.66667 11.7015 6.66667 11.3333L6.66667 2.55333L8.58967 4.47098C8.84953 4.73012 9.27017 4.72983 9.52967 4.47033C9.78943 4.21057 9.78943 3.78943 9.52967 3.52967L6.70711 0.707106C6.31658 0.316582 5.68342 0.316582 5.29289 0.707107L2.47033 3.52967C2.21057 3.78943 2.21057 4.21057 2.47033 4.47033C2.72983 4.72983 3.15047 4.73012 3.41033 4.47098L5.33333 2.55333L5.33333 11.3333C5.33333 11.7015 5.63181 12 6 12Z",fill:"#7fa2cc"})],-1)])])):ut(b)===-1?(e.openBlock(),e.createElementBlock("span",pd,[...f[31]||(f[31]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M6 -1.74846e-07C5.63181 -1.58751e-07 5.33333 0.298476 5.33333 0.666666L5.33333 9.44667L3.41033 7.52902C3.15047 7.26988 2.72983 7.27017 2.47033 7.52967C2.21057 7.78943 2.21057 8.21057 2.47033 8.47033L5.29289 11.2929C5.68342 11.6834 6.31658 11.6834 6.70711 11.2929L9.52967 8.47033C9.78943 8.21057 9.78943 7.78943 9.52967 7.52967C9.27017 7.27017 8.84953 7.26988 8.58967 7.52902L6.66667 9.44667L6.66667 0.666667C6.66667 0.298477 6.36819 -1.9094e-07 6 -1.74846e-07Z",fill:"#7fa2cc"})],-1)])])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),b.filter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-table-filter-wrap",{"dss-table-filter-wrap--open":Et.value===ie(b)}]),onClick:f[6]||(f[6]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-table-filter-trigger",{"dss-table-filter-trigger--active":Ll(ie(b))}]),"data-filter-column-key":ie(b),"aria-expanded":Et.value===ie(b),"aria-label":e.unref(N)("table.filterColumnAriaLabel"),onClick:$=>dn(ie(b),$)},[...f[32]||(f[32]=[e.createElementVNode("span",{class:"dss-table-filter-icon","aria-hidden":"true"},[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M11.7583 1.54409L11.7537 1.54928L7.84558 5.72226V8.92411C7.84581 9.07639 7.80836 9.22636 7.73658 9.36067C7.6648 9.49497 7.56091 9.60943 7.43417 9.69385L5.58772 10.9252C5.44858 11.0179 5.28688 11.071 5.11988 11.079C4.95288 11.087 4.78685 11.0494 4.63952 10.9704C4.49219 10.8914 4.36908 10.7738 4.28334 10.6303C4.1976 10.4868 4.15244 10.3226 4.15269 10.1555V5.72226L0.244567 1.54928L0.239951 1.54409C0.119785 1.41185 0.0405781 1.24758 0.0119374 1.0712C-0.0167033 0.894829 0.00645342 0.713935 0.0785984 0.550463C0.150743 0.386991 0.268776 0.247968 0.418378 0.150258C0.56798 0.0525488 0.742722 0.000352071 0.921405 0H11.0769C11.2557 1.73676e-05 11.4307 0.051972 11.5805 0.149551C11.7304 0.247131 11.8487 0.386134 11.9211 0.549673C11.9934 0.713211 12.0167 0.894244 11.9881 1.07078C11.9596 1.24731 11.8803 1.41174 11.7601 1.54409H11.7583Z",fill:"currentColor"})])],-1)])],10,vd)],2)):e.createCommentVNode("",!0)])],14,id))),128))])]),e.createElementVNode("tbody",fd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Sl.value,(b,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V(b,Yt.value+_)},[e.createElementVNode("tr",{class:e.normalizeClass(["dss-table-tr",nl(b,_)]),style:e.normalizeStyle(G.value),onClick:$=>Kl(b,_,$)},[Ze.value?(e.openBlock(),e.createElementBlock("td",{key:0,class:"dss-table-td dss-table-selection-cell",onClick:f[7]||(f[7]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("span",gd,[e.createElementVNode("input",{type:U.value==="multiple"?"checkbox":"radio",name:`dss-table-select-${B.tableId}`,checked:on(b,Yt.value+_),disabled:!Kt(b,Yt.value+_),onChange:$=>Ln(b,Yt.value+_),class:e.normalizeClass(["dss-table-checkbox",U.value==="multiple"?"dss-table-checkbox--checkbox":"dss-table-checkbox--radio",{"dss-table-checkbox--disabled":!Kt(b,Yt.value+_)}])},null,42,yd),U.value==="multiple"&&on(b,Yt.value+_)?(e.openBlock(),e.createElementBlock("span",kd,[...f[33]||(f[33]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):U.value==="single"&&on(b,Yt.value+_)?(e.openBlock(),e.createElementBlock("span",Cd)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),j.value?(e.openBlock(),e.createElementBlock("td",{key:1,class:"dss-table-td dss-table-expansion-cell",onClick:e.withModifiers($=>bt(b,Yt.value+_,$),["stop"])},[Ue(b,Yt.value+_)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-expansion-trigger","aria-expanded":oe(b,Yt.value+_),"aria-label":oe(b,Yt.value+_)?e.unref(N)("table.collapseRowAriaLabel"):e.unref(N)("table.expandRowAriaLabel")},[e.createElementVNode("span",{class:e.normalizeClass(["dss-table-expansion-icon",{"dss-table-expansion-icon--expanded":oe(b,Yt.value+_)}]),"aria-hidden":"true"},[...f[34]||(f[34]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10.1611 2.81093L5.99463 6.93546L1.82819 2.81093C1.4094 2.39636 0.732886 2.39636 0.314094 2.81093C-0.104698 3.22551 -0.104698 3.89522 0.314094 4.30979L5.24295 9.18907C5.66175 9.60364 6.33826 9.60364 6.75705 9.18907L11.6859 4.30979C12.1047 3.89522 12.1047 3.22551 11.6859 2.81093C11.2671 2.40699 10.5799 2.39636 10.1611 2.81093Z",fill:"#3a3a3a"})],-1)])],2)],8,wd)):(e.openBlock(),e.createElementBlock("span",xd))],8,bd)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,($,ye)=>(e.openBlock(),e.createElementBlock("td",{key:ie($),class:e.normalizeClass(["dss-table-td",C($)]),style:e.normalizeStyle(x($))},[e.renderSlot(d.$slots,`cell-${$.field}`,{data:b,column:$,rowIndex:_,isExpanded:ae.value===V(b,Yt.value+_)},()=>[e.createTextVNode(e.toDisplayString(Ol(b,$)),1)])],6))),128))],14,hd),j.value&&Ue(b,Yt.value+_)&&oe(b,Yt.value+_)?(e.openBlock(),e.createElementBlock("tr",Ed,[e.createElementVNode("td",{colspan:H.value,class:"dss-table-expansion-content-cell"},[e.renderSlot(d.$slots,"expansion",{data:b,rowIndex:_})],8,Sd)])):e.createCommentVNode("",!0)],64))),128)),Sl.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:"dss-table-empty",style:e.normalizeStyle(G.value)},[e.createElementVNode("td",{colspan:H.value,class:"dss-table-empty-cell"},[e.renderSlot(d.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(mt.value),1)])],8,Vd)],4))])],2)],2),Ke.value?(e.openBlock(),e.createElementBlock("div",Nd,[e.createElementVNode("div",Bd,[it.value?(e.openBlock(),e.createElementBlock("span",_d,e.toDisplayString(e.unref(N)("table.showingRange",{start:hn.value,end:$l.value,total:Xl.value})),1)):(e.openBlock(),e.createElementBlock("span",Md," "))]),e.createElementVNode("div",$d,[xe.value?(e.openBlock(),e.createElementBlock("div",Dd,[e.createElementVNode("button",{class:"dss-pagination-btn",disabled:sl.value===0,onClick:f[8]||(f[8]=b=>Tl(0)),title:e.unref(N)("table.firstPage")},[...f[35]||(f[35]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"‹"),e.createElementVNode("span",null,"‹")],-1)])],8,Ld),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:sl.value===0,onClick:f[9]||(f[9]=b=>Tl(sl.value-1)),title:e.unref(N)("table.previousPage")}," ‹ ",8,Td),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":f[10]||(f[10]=b=>jl.value=b),type:"text",class:"dss-pagination-page-input","aria-label":e.unref(N)("table.currentPageAriaLabel"),onBlur:sn,onKeydown:e.withKeys(e.withModifiers(sn,["prevent"]),["enter"])},null,40,Ad),[[e.vModelText,jl.value]]),e.createElementVNode("span",Hd,e.toDisplayString(e.unref(N)("table.ofPages",{total:fn.value})),1),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:sl.value>=Fl.value-1,onClick:f[11]||(f[11]=b=>Tl(sl.value+1)),title:e.unref(N)("table.nextPage")}," › ",8,Rd),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:sl.value>=Fl.value-1,onClick:f[12]||(f[12]=b=>Tl(Fl.value-1)),title:e.unref(N)("table.lastPage")},[...f[36]||(f[36]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"›"),e.createElementVNode("span",null,"›")],-1)])],8,Fd)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Id,[Lt.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-pagination-rows-per-page",ref_key:"rowsPerPageDropdownRef",ref:vl},[e.createElementVNode("span",zd,e.toDisplayString(e.unref(N)("table.rowsPerPage"))+":",1),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":qt.value}]),onClick:f[13]||(f[13]=b=>qt.value=!qt.value),"aria-expanded":qt.value,"aria-haspopup":"listbox",ref_key:"rowsPerPageTriggerRef",ref:Pl},[e.createTextVNode(e.toDisplayString(Wt.value)+" ",1),f[37]||(f[37]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,Pd),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass(["dss-pagination-select-dropdown",{"dss-pagination-select-dropdown--top":Dt.value==="top"}]),style:e.normalizeStyle(kt.value),role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ft.value,b=>(e.openBlock(),e.createElementBlock("li",{key:b,role:"option","aria-selected":b===Wt.value,class:e.normalizeClass(["dss-pagination-select-option",{"dss-pagination-select-option--selected":b===Wt.value}]),onClick:_=>xl(b)},e.toDisplayString(b),11,Od))),128))],6),[[e.vShow,qt.value]])]),_:1})],512)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],4),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"dss-table-filter-dropdown dss-table-filter-dropdown--teleport",style:e.normalizeStyle(kl.value?{top:kl.value.top+"px",left:kl.value.left+"px",width:Zl+"px"}:void 0),onClick:f[21]||(f[21]=e.withModifiers(()=>{},["stop"]))},[tl.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[tl.value.filter==="string"?(e.openBlock(),e.createElementBlock("div",Wd,[e.createElementVNode("input",{type:"text",value:Hl(Et.value).value??"",onInput:f[14]||(f[14]=b=>wl(Et.value,b.target.value)),class:"dss-table-filter-input",placeholder:e.unref(N)("table.search")},null,40,qd)])):tl.value.filter==="range"&&ol.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-table-filter-double-range",style:e.normalizeStyle({"--range-min-pct":ol.value.minPct+"%","--range-max-pct":ol.value.maxPct+"%"})},[e.createElementVNode("div",{ref_key:"doubleRangeTrackRef",ref:un,class:"dss-table-filter-double-range-track",onMousemove:dt,onMouseenter:dt},[e.createElementVNode("input",{type:"range",min:ol.value.rangeMin,max:ol.value.rangeMax,value:ol.value.currentMin,onInput:f[15]||(f[15]=b=>zl(Et.value,"min",b.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--min",style:e.normalizeStyle({zIndex:ml.value==="min"?2:1})},null,44,Zd),e.createElementVNode("input",{type:"range",min:ol.value.rangeMin,max:ol.value.rangeMax,value:ol.value.currentMax,onInput:f[16]||(f[16]=b=>zl(Et.value,"max",b.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--max",style:e.normalizeStyle({zIndex:ml.value==="max"?2:1})},null,44,Ud)],544),e.createElementVNode("div",Yd,e.toDisplayString(ol.value.currentMin)+" – "+e.toDisplayString(ol.value.currentMax),1)],4)):tl.value.filter==="dateRange"?(e.openBlock(),e.createElementBlock("div",Xd,[e.createElementVNode("div",jd,[e.createElementVNode("label",Kd,e.toDisplayString(e.unref(N)("table.filterFrom")),1),e.createElementVNode("input",{type:"date",value:Hl(Et.value).from??"",onInput:f[17]||(f[17]=b=>pn(Et.value,"from",b.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,Gd)]),e.createElementVNode("div",Qd,[e.createElementVNode("label",Jd,e.toDisplayString(e.unref(N)("table.filterTo")),1),e.createElementVNode("input",{type:"date",value:Hl(Et.value).to??"",onInput:f[18]||(f[18]=b=>pn(Et.value,"to",b.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,e1)])])):tl.value.filter==="list"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("input",{type:"text",value:ln[Et.value]??"",onInput:f[19]||(f[19]=b=>ll(Et.value,b.target.value)),class:"dss-table-filter-input dss-table-filter-list-search",placeholder:e.unref(N)("table.search")},null,40,t1),e.createElementVNode("div",l1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Gn(tl.value),b=>(e.openBlock(),e.createElementBlock("label",{key:b,class:"dss-table-filter-list-item"},[e.createElementVNode("input",{type:"checkbox",checked:qn(Et.value,b),onChange:_=>Rl(Et.value,b)},null,40,n1),e.createElementVNode("span",null,e.toDisplayString(b),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",a1,[e.createElementVNode("button",{type:"button",class:"dss-table-filter-clear",onClick:f[20]||(f[20]=b=>Wn(Et.value))},e.toDisplayString(e.unref(N)("table.clearFilter")),1)])],64)):e.createCommentVNode("",!0)],4),[[e.vShow,Et.value&&tl.value&&kl.value]])]),_:1})]))],64))}}),r1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M6.008%2014V12.68H8.288V6.572L5.996%208.276V6.692L8.012%205.24H9.788V12.68H11.624V14H6.008Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",i1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M5.948%2014V12.548L8.684%209.8C9.068%209.408%209.352%209.056%209.536%208.744C9.72%208.424%209.812%208.096%209.812%207.76C9.812%207.352%209.7%207.036%209.476%206.812C9.252%206.58%208.948%206.464%208.564%206.464C8.14%206.464%207.808%206.588%207.568%206.836C7.328%207.076%207.208%207.412%207.208%207.844H5.708C5.716%207.284%205.836%206.804%206.068%206.404C6.308%205.996%206.644%205.68%207.076%205.456C7.508%205.232%208.012%205.12%208.588%205.12C9.14%205.12%209.62%205.224%2010.028%205.432C10.436%205.64%2010.752%205.932%2010.976%206.308C11.2%206.684%2011.312%207.132%2011.312%207.652C11.312%208.188%2011.172%208.712%2010.892%209.224C10.62%209.728%2010.18%2010.272%209.572%2010.856L7.748%2012.644H11.42V14H5.948Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",c1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.516%2014.12C7.948%2014.12%207.452%2014.016%207.028%2013.808C6.612%2013.6%206.288%2013.308%206.056%2012.932C5.824%2012.556%205.708%2012.112%205.708%2011.6H7.22C7.22%2011.992%207.332%2012.3%207.556%2012.524C7.788%2012.74%208.112%2012.848%208.528%2012.848C8.944%2012.848%209.264%2012.736%209.488%2012.512C9.712%2012.288%209.824%2011.984%209.824%2011.6V10.916C9.824%2010.524%209.712%2010.22%209.488%2010.004C9.264%209.78%208.944%209.668%208.528%209.668H7.544V8.312L9.476%206.524H6.104V5.24H11V6.596L8.528%208.864V8.384C9.392%208.384%2010.076%208.612%2010.58%209.068C11.084%209.524%2011.336%2010.14%2011.336%2010.916V11.6C11.336%2012.112%2011.22%2012.556%2010.988%2012.932C10.756%2013.308%2010.428%2013.6%2010.004%2013.808C9.58%2014.016%209.084%2014.12%208.516%2014.12Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",u1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M9.68%2014V12.26H5.78V10.088L9.152%205.24H10.832L7.22%2010.484V10.94H9.68V8.96H11.18V14H9.68Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",d1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.588%2014.12C7.78%2014.12%207.132%2013.92%206.644%2013.52C6.156%2013.112%205.888%2012.56%205.84%2011.864H7.34C7.372%2012.168%207.492%2012.404%207.7%2012.572C7.916%2012.732%208.212%2012.812%208.588%2012.812C9.004%2012.812%209.32%2012.704%209.536%2012.488C9.752%2012.264%209.86%2011.956%209.86%2011.564V10.712C9.86%2010.312%209.752%2010.008%209.536%209.8C9.32%209.584%209.004%209.476%208.588%209.476C8.332%209.476%208.112%209.528%207.928%209.632C7.744%209.736%207.604%209.88%207.508%2010.064H6.044L6.104%205.24H11.036V6.596H7.52L7.496%209.14H7.844L7.484%209.44C7.484%209.072%207.628%208.784%207.916%208.576C8.212%208.36%208.608%208.252%209.104%208.252C9.816%208.244%2010.368%208.46%2010.76%208.9C11.16%209.332%2011.36%209.936%2011.36%2010.712V11.564C11.36%2012.356%2011.112%2012.98%2010.616%2013.436C10.128%2013.892%209.452%2014.12%208.588%2014.12Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",m1="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.6%2014.12C8.016%2014.12%207.5%2014%207.052%2013.76C6.612%2013.512%206.268%2013.168%206.02%2012.728C5.78%2012.28%205.66%2011.764%205.66%2011.18C5.66%2010.764%205.728%2010.328%205.864%209.872C6.008%209.416%206.204%208.988%206.452%208.588L8.516%205.24H10.184L7.592%209.32L7.664%209.368C7.824%209.12%208.04%208.932%208.312%208.804C8.584%208.676%208.888%208.612%209.224%208.612C9.696%208.612%2010.104%208.724%2010.448%208.948C10.792%209.172%2011.06%209.484%2011.252%209.884C11.444%2010.284%2011.54%2010.752%2011.54%2011.288C11.54%2011.856%2011.416%2012.352%2011.168%2012.776C10.928%2013.2%2010.588%2013.532%2010.148%2013.772C9.716%2014.004%209.2%2014.12%208.6%2014.12ZM8.6%2012.848C9.04%2012.848%209.396%2012.708%209.668%2012.428C9.94%2012.14%2010.076%2011.768%2010.076%2011.312C10.076%2010.84%209.94%2010.464%209.668%2010.184C9.396%209.896%209.04%209.752%208.6%209.752C8.16%209.752%207.804%209.896%207.532%2010.184C7.26%2010.464%207.124%2010.84%207.124%2011.312C7.124%2011.768%207.26%2012.14%207.532%2012.428C7.804%2012.708%208.16%2012.848%208.6%2012.848Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",p1={class:"dss-toolbar-left"},v1=["title"],f1=["title"],h1={class:"dss-toolbar-dropdown-wrapper"},g1=["title"],y1=["src"],k1=["src"],C1=["src"],b1=["src"],w1=["src"],x1=["src"],E1={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},S1=["src"],V1=["src"],N1=["src"],B1=["src"],_1=["src"],M1=["src"],$1=["title"],D1=["title"],L1=["title"],T1=["title"],A1=["title"],H1=["title"],R1=["title"],F1=["title"],I1=["title"],z1={key:2,class:"dss-toolbar-separator"},P1=["title"],O1={key:4,class:"dss-toolbar-separator"},W1={key:5,class:"dss-toolbar-dropdown-wrapper"},q1=["title"],Z1={class:"dss-toolbar-dropdown-ai"},U1={class:"dss-toolbar-right"},Y1={key:0,class:"dss-toolbar-custom-group"},X1={key:1,class:"dss-toolbar-separator"},j1={class:"dss-link-modal-content"},K1={class:"dss-link-modal-field"},G1={class:"dss-link-modal-label"},Q1=["placeholder"],J1={class:"dss-link-modal-field"},em={class:"dss-link-modal-label"},tm=["placeholder"],lm={class:"dss-image-modal-tabs"},nm={key:0,class:"dss-image-tab-content"},am={class:"dss-link-modal-content"},om={class:"dss-link-modal-field"},sm={key:0,class:"dss-link-modal-label"},rm=["src"],im={class:"dss-link-modal-field"},cm={class:"dss-link-modal-label"},um=["placeholder"],dm={class:"dss-link-modal-field"},mm={class:"dss-link-modal-label"},pm=["placeholder"],vm={class:"dss-link-modal-field"},fm={class:"dss-link-modal-label"},hm=["placeholder"],gm={key:1,class:"dss-image-tab-content"},ym={class:"dss-link-modal-content"},km={class:"dss-link-modal-field"},Cm={class:"dss-link-modal-label"},bm=["placeholder"],wm={class:"dss-link-modal-field"},xm={class:"dss-link-modal-label"},Em=["placeholder"],Sm={class:"dss-link-modal-field"},Vm={class:"dss-link-modal-label"},Nm=["placeholder"],Bm={class:"dss-link-modal-field"},_m={class:"dss-link-modal-label"},Mm=["placeholder"],$m={class:"dss-text-editor-title-input-container"},Dm={key:0,class:"dss-text-editor-title-preview"},Lm={key:0},Tm={key:1,class:"dss-text-editor-preview-placeholder"},Am=["value","placeholder","disabled"],Hm={key:3,class:"dss-text-editor-title-slot dss-text-editor-slot-last"},Rm={class:"dss-text-editor-description-input-container"},Fm={key:0,class:"dss-text-editor-description-preview"},Im={key:0},zm={key:1,class:"dss-text-editor-preview-placeholder"},Pm=["value","placeholder","disabled"],Om={key:5,class:"dss-text-editor-description-slot dss-text-editor-slot-last"},Wm=["data-comment-id","onMouseenter"],qm=["onClick"],Zm=["src","alt"],Um={key:1},Ym=["onClick"],Xm=["src","alt"],jm={key:1},Km=["data-has-second-user","onClick"],Gm={class:"editor-comment-marker-count"},Qm={key:7,class:"dss-text-editor-textarea-wrapper"},Jm=["value","placeholder","rows","disabled"],e2={class:"dss-text-editor-footer"},t2={class:"dss-text-editor-footer-content"},l2={class:"dss-text-editor-footer-stat"},n2={class:"dss-text-editor-footer-stat"},a2={key:8,class:"dss-text-editor-content-wrapper"},o2={key:0,class:"dss-comment-overlay-body"},s2={class:"dss-comment-selection-wrapper"},r2=["innerHTML"],i2={class:"dss-comment-messages-wrapper"},c2={key:0,class:"dss-comment-avatar-wrapper"},u2={class:"dss-comment-avatar"},d2=["src","alt"],m2={key:1},p2={class:"dss-comment-header"},v2={class:"dss-comment-header-text"},f2={class:"dss-comment-author"},h2={key:0,class:"dss-comment-date"},g2=["onClick","title"],y2={class:"dss-comment-overlay-inner"},k2=["placeholder","onKeydown"],C2={class:"dss-text-editor-footer"},b2={class:"dss-text-editor-footer-content"},w2={class:"dss-text-editor-footer-stat"},x2={class:"dss-text-editor-footer-stat"},E2=["title"],S2=["title"],V2={xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"512",height:"512",x:"0",y:"0",viewBox:"0 0 32 32",style:{"enable-background":"new 0 0 512 512"},"xml:space":"preserve",class:""},N2={class:"dss-image-popup-content"},B2={key:0,class:"dss-image-popup-no-alt-icon"},_2=["title"],M2=["title"],$2={xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"512",height:"512",x:"0",y:"0",viewBox:"0 0 32 32",style:{"enable-background":"new 0 0 512 512"},"xml:space":"preserve",class:""},D2={class:"dss-toolbar-left"},L2=["title"],T2=["title"],A2={class:"dss-toolbar-dropdown-wrapper"},H2=["title"],R2=["src"],F2=["src"],I2=["src"],z2=["src"],P2=["src"],O2=["src"],W2={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},q2=["title"],Z2=["title"],U2=["title"],Y2=["title"],X2=["title"],j2=["title"],K2=["title"],G2=["title"],Q2=["title"],J2={key:2,class:"dss-toolbar-separator"},ep=["title"],tp={key:4,class:"dss-toolbar-separator"},lp={key:5,class:"dss-toolbar-dropdown-wrapper"},np=["title"],ap={class:"dss-toolbar-dropdown-ai"},op={key:0,class:"dss-toolbar-right"},sp={key:0,class:"dss-toolbar-separator"},rp={key:0,class:"dss-toolbar-custom-group"},ip={key:1,class:"dss-toolbar-separator"},cp={name:"DSSTextEditor"},up=Object.assign(cp,{props:{modelValue:{type:String,default:""},title:{type:String,default:""},description:{type:String,default:""},titlePlaceholder:{type:String,default:null},descriptionPlaceholder:{type:String,default:null},placeholder:{type:String,default:null},rows:{type:Number,default:10},fullHeight:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},richText:{type:Boolean,default:!1},border:{type:Boolean,default:!0},rounded:{type:Boolean,default:!1},fixedHeight:{type:Boolean,default:!1},options:{type:Object,default:()=>({}),validator:B=>typeof B=="object"&&B!==null},floatingToolbar:{type:Boolean,default:!1},askAi:{type:Boolean,default:!1},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},commentUser:{type:Object,default:null},customToolbarSlots:{type:Array,default:()=>["custom-tool-1","custom-tool-2","custom-tool-3"]},customToolbarFloatingMap:{type:Object,default:()=>({}),validator:B=>typeof B=="object"&&B!==null},locale:{type:String,default:null},comments:{type:Array,default:()=>[]}},emits:["update:modelValue","update:title","update:description","update:comments","change","blur","title-change","description-change","comment-submitted","comment-marker-clicked","comment-deleted"],setup(B,{expose:J,emit:N}){const{t:L,locale:ne}=ha.useI18n(),W={h1:r1,h2:i1,h3:c1,h4:u1,h5:d1,h6:m1},R=B,ue=N,rt=e.useSlots(),ee=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
101
101
  <path d="M10 0C4.5 0 0 4.5 0 10C0 15.5 4.5 20 10 20C15.5 20 20 15.5 20 10C20 4.5 15.5 0 10 0ZM2 10C2 5.6 5.6 2 10 2C11.8 2 13.5 2.6 14.9 3.7L3.7 14.9C2.6 13.5 2 11.8 2 10ZM10 18C8.2 18 6.5 17.4 5.1 16.3L16.3 5.1C17.4 6.5 18 8.2 18 10C18 14.4 14.4 18 10 18Z" fill="#c13340"/>
102
- </svg>`,h=e.ref(null),we=e.ref(null),ye=e.ref(!1),Q=e.ref(!1),K=e.ref(!1),he=e.ref(""),Re=e.ref({}),ge=e.ref(!1),Ae=e.ref(!1),Z=e.ref(""),ze=e.ref(""),Ye=e.ref(null),_e=e.ref(null),Xe=e.ref(null),U=e.ref(null),He=e.ref(""),Ke=e.ref(!1),ke=e.ref({}),Me=e.ref(!1),rt=e.ref({}),yt=e.ref(null),mt=e.ref(null),Qt=e.ref(!1),xe=e.ref(""),Jt=e.ref(null),et=e.ref(""),lt=e.ref(""),kt=e.ref(""),Rt=e.ref(null),ct=e.ref(null),ht=e.ref(null),pt=e.ref(null),Xt=e.ref(null),Ct=e.ref(!1),Pt=e.ref(""),pe=e.ref({}),H=e.ref(!1),Y=e.ref("upload"),ie=e.ref(""),fe=e.ref(null),Fe=e.ref(null),tt=e.ref([]),Et=e.ref([]),Se=e.ref(null),ot=e.ref(!1),bt=e.ref(""),el=e.ref(""),re=e.ref(""),X=e.ref(""),te=e.ref(""),ce=e.ref(""),Ve=e.ref(null),nt=e.ref(null),xt=e.ref(null),dl=e.ref(!1),Vt=e.ref(null),sl=e.ref(!1),D=e.ref(!1),V=e.ref(null),B=e.ref("p"),ae=e.ref(!1),se=e.ref([]),je=e.ref(null),St=e.ref(null),ut=e.ref(null),Ge=e.ref(!1),_t=e.ref(0),Nt=100,vt=e.ref(null),Lt=e.computed(()=>!!A.commentUser),Ht=e.computed(()=>({"dss-text-editor-no-border":!A.border,"dss-text-editor-rounded":A.rounded,"dss-text-editor-full-height":A.fullHeight,"dss-comment-overlay-open":Lt.value&&Ie.value!==null})),Mt=e.computed(()=>({})),wl=e.computed(()=>!A.fixedHeight||A.fullHeight?{}:{height:`${1.6*14*A.rows+24+2}px`,resize:"none",overflowY:"auto"}),jl=e.computed(()=>!A.fixedHeight||A.fullHeight?{}:{height:`${1.6*14*A.rows+32}px`,overflowY:"auto"}),El=e.computed(()=>A.richText&&Et.value.length>0),rl=e.computed(()=>{if(!A.modelValue)return"";if(A.richText){let a=A.modelValue.replace(/<script[^>]*>[\s\S]*?<\/script>/gi,"");return a=a.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,""),a=a.replace(/<[^>]+>/g,""),a=a.replace(/&nbsp;/g," "),a=a.replace(/&amp;/g,"&"),a=a.replace(/&lt;/g,"<"),a=a.replace(/&gt;/g,">"),a=a.replace(/&quot;/g,'"'),a=a.replace(/&#39;/g,"'"),a=a.replace(/\s+/g," ").trim(),a}return A.modelValue}),ml=e.computed(()=>{const a=rl.value.trim();return a?a.split(/\s+/).filter(n=>n.length>0).length:0}),un=e.computed(()=>rl.value.length),yl=e.computed(()=>pt.value!==null&&Y.value==="upload"&&et.value&&et.value.startsWith("data:")),ft=e.computed(()=>A.titlePlaceholder||L("textEditor.placeholders.title")),zl=e.computed(()=>A.descriptionPlaceholder||L("textEditor.placeholders.description")),Kl=e.computed(()=>A.placeholder||L("textEditor.placeholders.startTyping")),Hl=a=>dt&&dt[a]!==void 0,Rn=a=>{for(let n=a+1;n<A.customToolbarSlots.length;n++)if(Hl(A.customToolbarSlots[n]))return!0;return!1},Gl=a=>{for(let n=a+1;n<A.customToolbarSlots.length;n++){const s=A.customToolbarSlots[n];if(Hl(s)&&bn(s))return!0}return!1},bn=a=>A.customToolbarFloatingMap.hasOwnProperty(a)?A.customToolbarFloatingMap[a]===!0:!0,Bn=e.computed(()=>A.customToolbarSlots.some(a=>Hl(a)&&bn(a))),nn=e.computed(()=>Hl("title-slot")),Rl=e.computed(()=>Hl("description-slot")),dn=a=>{if(!a||a.trim()==="")return"<html></html>";const n=a.trim();return n.startsWith("<html>")&&n.endsWith("</html>")?a:`<html>${a}</html>`},Sl=a=>{if(!a||a.trim()==="")return"";const n=a.replace(/<!--[\s\S]*?-->/g,""),s=n.trim();return s.startsWith("<html>")&&s.endsWith("</html>")?s.slice(6,-7).trim():n},mn=a=>{if(!a)return;const n=document.createTreeWalker(a,NodeFilter.SHOW_COMMENT,null,!1),s=[];let i=n.nextNode();for(;i;)s.push(i),i=n.nextNode();s.forEach(c=>c.remove())},Wl=a=>{try{const n=String(a.getDate()).padStart(2,"0"),i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][a.getMonth()],c=a.getFullYear();return`${n} ${i} ${c}`}catch{return""}},pn=a=>{if(!a||typeof a!="string")return!1;const n=a.trim();if(!n)return!1;if(["Started conversation","A démarré la conversation","started_conversation","conv_started"].includes(n))return!0;try{const c=L("textEditor.started_conversation");if(c&&n===c)return!0}catch{}const i=n.toLowerCase();return i.includes("started conversation")||i.includes("démarré la conversation")||i==="started conversation"||i==="a démarré la conversation"},on=a=>{const n=a.target.value;de("update:modelValue",n),de("change",n)},il=()=>{if(!Ve.value)return;const a=Ve.value;if(a.style.setProperty("text-overflow","","important"),a.style.setProperty("white-space","","important"),a.style.setProperty("overflow-x","","important"),a.style.setProperty("height","auto","important"),a.value.trim()===""){const i=a.value;a.value="M";const c=a.scrollHeight;a.value=i,a.style.setProperty("height",`${c}px`,"important"),a.style.setProperty("overflow-y","hidden","important");return}a.offsetHeight;const s=a.scrollHeight;a.style.setProperty("height",`${s}px`,"important"),a.style.setProperty("overflow-y","hidden","important")},jn=()=>{sl.value=!0,il()},Fn=()=>{sl.value=!1,ql()},ql=()=>{if(!Ve.value)return;const a=Ve.value;a.style.setProperty("text-overflow","","important"),a.style.setProperty("white-space","","important"),a.style.setProperty("overflow-x","","important"),a.style.setProperty("height","auto","important");const n=a.value;a.value="M";const s=a.scrollHeight;a.value=n,a.offsetHeight,a.style.setProperty("height",`${s}px`,"important"),a.style.setProperty("overflow-y","hidden","important"),a.style.setProperty("overflow-x","hidden","important"),a.style.setProperty("text-overflow","ellipsis","important"),a.style.setProperty("white-space","nowrap","important")},vn=a=>{const s=a.target.value;sl.value&&il(),de("update:title",s),de("title-change",s),xt.value="title",A.richText&&(ot.value||(el.value=bt.value,te.value=re.value,ce.value=X.value),Se.value&&clearTimeout(Se.value),ot.value=!0,Se.value=setTimeout(()=>{ot.value=!1,Tt()},500))},Ll=()=>{if(!nt.value)return;const a=nt.value;if(a.style.setProperty("text-overflow","","important"),a.style.setProperty("white-space","","important"),a.style.setProperty("overflow-x","","important"),a.style.setProperty("height","auto","important"),a.value.trim()===""){const i=a.value;a.value="M";const c=a.scrollHeight;a.value=i,a.style.setProperty("height",`${c}px`,"important"),a.style.setProperty("overflow-y","hidden","important");return}a.offsetHeight;const s=a.scrollHeight;a.style.setProperty("height",`${s}px`,"important"),a.style.setProperty("overflow-y","hidden","important")},In=()=>{D.value=!0,Ll()},fn=()=>{D.value=!1,cl()},cl=()=>{if(!nt.value)return;const a=nt.value;a.style.setProperty("text-overflow","","important"),a.style.setProperty("white-space","","important"),a.style.setProperty("overflow-x","","important"),a.style.setProperty("height","auto","important");const n=a.value;a.value="M";const s=a.scrollHeight;a.value=n,a.offsetHeight,a.style.setProperty("height",`${s}px`,"important"),a.style.setProperty("overflow-y","hidden","important"),a.style.setProperty("overflow-x","hidden","important"),a.style.setProperty("text-overflow","ellipsis","important"),a.style.setProperty("white-space","nowrap","important")},jt=a=>{const s=a.target.value;D.value&&Ll(),de("update:description",s),de("description-change",s),xt.value="description",A.richText&&(ot.value||(el.value=bt.value,te.value=re.value,ce.value=X.value),Se.value&&clearTimeout(Se.value),ot.value=!0,Se.value=setTimeout(()=>{ot.value=!1,Tt()},500))},Kt=()=>{const a=window.getSelection();if(a.rangeCount===0)return null;const n=a.getRangeAt(0);if(n.startContainer.nodeType===1)return{type:"element",element:n.startContainer,offset:n.startOffset};const s=n.cloneRange();return s.selectNodeContents(h.value),s.setEnd(n.startContainer,n.startOffset),{type:"text",start:s.toString().length,end:s.toString().length+n.toString().length}},Yt=a=>{if(!(!a||!h.value))try{const n=window.getSelection(),s=document.createRange();if(a.type==="element"&&a.element)if(h.value.contains(a.element)){s.setStart(a.element,a.offset),s.collapse(!0),n.removeAllRanges(),n.addRange(s);return}else{h.value.focus();return}let i=0;const c=[h.value];let d=null,u=!1,p=!1;for(;!p&&(d=c.pop());)if(d.nodeType===3){const y=i+d.length;!u&&a.start>=i&&a.start<=y&&(s.setStart(d,a.start-i),u=!0),u&&a.end>=i&&a.end<=y&&(s.setEnd(d,a.end-i),p=!0),i=y}else{let y=d.childNodes.length;for(;y--;)c.push(d.childNodes[y])}n.removeAllRanges(),n.addRange(s)}catch{h.value.focus()}},Tl=()=>{if(!h.value)return;h.value.focus();const a=window.getSelection(),n=document.createRange(),s=c=>{if(c.nodeType===3||c.childNodes.length===0)return c;for(let d=c.childNodes.length-1;d>=0;d--){const u=c.childNodes[d],p=s(u);if(p)return p}return c},i=s(h.value);if(i.nodeType===3)n.setStart(i,i.length),n.setEnd(i,i.length);else if(i.childNodes.length>0){const c=s(i);c&&c.nodeType===3?(n.setStart(c,c.length),n.setEnd(c,c.length)):(n.selectNodeContents(i),n.collapse(!1))}else n.setStart(i,0),n.setEnd(i,0);a.removeAllRanges(),a.addRange(n)},Tt=(a=!1)=>{if(!h.value)return;const n=h.value.innerHTML,s=A.title||"",i=A.description||"";if(!a&&n===bt.value&&s===re.value&&i===X.value)return;const c={content:el.value||bt.value,title:te.value!==void 0?te.value:re.value,description:ce.value!==void 0?ce.value:X.value},d=tt.value.length>0?tt.value[tt.value.length-1]:null;let u=!0;d&&(typeof d=="string"?u=c.content!==d:u=c.content!==d.content||c.title!==d.title||c.description!==d.description),u&&(tt.value.push(c),tt.value.length>50&&tt.value.shift(),Et.value=[]),bt.value=n,re.value=s,X.value=i,el.value=n,te.value=s,ce.value=i},wt=a=>{if(!h.value)return;Vl(),h.value&&mn(h.value);let n=null;h.value&&(h.value.querySelector("p")||(n=Kt(),hn()));const s=a&&a.inputType&&(a.inputType==="insertText"||a.inputType==="insertCompositionText"||a.inputType==="deleteContentBackward"||a.inputType==="deleteContentForward");s&&V.value&&(V.value=null),Q.value=!0;const i=h.value.innerHTML.replace(/<!--[\s\S]*?-->/g,"").replace(/&nbsp;|\u00A0/g," "),c=dn(i);de("update:modelValue",c),de("change",c),xt.value="editor",ot.value||(el.value=bt.value,te.value=re.value,ce.value=X.value),Se.value&&clearTimeout(Se.value),ot.value=!0,Se.value=setTimeout(()=>{ot.value=!1,Tt(),lo(),io()},500),e.nextTick(()=>{n&&Yt(n),Vl();const d=["bold","italic","underline"],u=window.getSelection(),p=u.rangeCount>0?u.getRangeAt(0):null,y=p&&p.collapsed;if(d.forEach(C=>{try{if(y&&V.value?.command===C){ke.value[C]=V.value.state;return}if(C==="bold")if(p){const R=p.commonAncestorContainer,O=R.nodeType===3?R.parentElement:R;let M=!1;if(O&&((O.tagName==="STRONG"||O.tagName==="B"||O.closest&&O.closest("strong, b"))&&(M=!0),!M&&O.style&&parseInt(O.style.fontWeight)>=600&&(M=!0),!M))try{const ue=window.getComputedStyle(O);parseInt(ue.fontWeight)>=600&&(M=!0)}catch{}ke.value[C]=M}else ke.value.hasOwnProperty(C)||(ke.value[C]=!1);else if(C==="italic")if(p){const R=p.commonAncestorContainer,O=R.nodeType===3?R.parentElement:R,M=O&&(O.tagName==="EM"||O.tagName==="I"||O.closest&&O.closest("em, i"));ke.value[C]=!!M}else{const R=document.queryCommandState(C);ke.value[C]=R}else{const R=document.queryCommandState(C);ke.value[C]=R}}catch{}}),j(),Nl(),Dl(),pl(),xn(),it("handleRichTextInput"),s&&(a.inputType==="insertText"||a.inputType==="insertCompositionText")){const C=a.data||"";C&&C.length===1&&setTimeout(()=>io(C),0),(C===" "||C===`
103
- `||/[.,;:!?]/.test(C))&&setTimeout(()=>{lo()},100)}Q.value=!1})},Vl=()=>{if(!h.value)return;const a=window.getSelection();if(!a||a.rangeCount===0)return;const n=a.getRangeAt(0),s=n.commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(!i)return;const c=i.closest(".dss-image-wrapper");if(c){const d=c.querySelector("img");if(i!==d&&!d?.contains(i)){const u=n.startContainer.nodeType===3?n.startContainer.parentElement:n.startContainer,p=n.endContainer.nodeType===3?n.endContainer.parentElement:n.endContainer;if(c.contains(u)&&u!==d||c.contains(p)&&p!==d){const y=document.createRange();y.setStartAfter(c),y.collapse(!0),a.removeAllRanges(),a.addRange(y)}}}},hn=()=>{if(!h.value)return;const a=h.value;if(a.querySelector&&a.querySelector("p"))return;const n=new Set(["P","H1","H2","H3","H4","H5","H6","BLOCKQUOTE","UL","OL","DIV"]),s=Array.from(a.childNodes);let i=null;s.forEach(c=>{if(c.nodeType===Node.TEXT_NODE){if((c.textContent||"").trim()===""){c.parentNode===a&&a.removeChild(c);return}i||(i=document.createElement("p"),a.insertBefore(i,c)),i.appendChild(c);return}if(c.nodeType===Node.ELEMENT_NODE){const d=c,u=d.tagName;if(u==="BR"){i=null;return}if(n.has(u)){i=null;return}i||(i=document.createElement("p"),a.insertBefore(i,d)),i.appendChild(d)}})},Nl=()=>{if(h.value&&!dl.value){dl.value=!0;try{h.value.querySelectorAll(".dss-image-wrapper").forEach(i=>{i.querySelector("img")||i.remove()}),h.value.querySelectorAll(".dss-image-no-alt-icon").forEach(i=>{const c=i.parentElement;!c||!c.classList.contains("dss-image-wrapper")?i.remove():c.querySelector("img")||i.remove()}),h.value.querySelectorAll("img").forEach(i=>{let c=i.getAttribute("alt");c===null&&(c=i.alt||"");const d=i.getAttribute("src")||i.src||"";if(c){const C=d.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),R=c===d||c===C;(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("data:")||R||R)&&(c="")}i.setAttribute("alt",c),i.setAttribute("data-alt",c);const u=!c||c.trim()==="";let p=i.parentElement;const y=p&&p.classList.contains("dss-image-wrapper");if(y){const C=p.querySelector(".dss-image-no-alt-icon");C&&C.remove()}else{const C=i.nextElementSibling?.classList.contains("dss-image-no-alt-icon")?i.nextElementSibling:null;C&&C.remove()}if(u){y?p.setAttribute("contenteditable","false"):(p=document.createElement("span"),p.className="dss-image-wrapper",p.setAttribute("contenteditable","false"),i.parentNode.insertBefore(p,i),p.appendChild(i));const C=document.createElement("div");C.className="dss-image-no-alt-icon",C.setAttribute("contenteditable","false"),C.innerHTML=ee,p.appendChild(C)}else if(y&&p.children.length===1){const C=p.parentNode;C.insertBefore(i,p),C.removeChild(p)}})}finally{dl.value=!1}}},gn=a=>{lo(),de("blur",a),Jn()},Bl=()=>{if(A.disabled||!A.richText||!h.value)return;tl(),Se.value&&(clearTimeout(Se.value),Se.value=null),ot.value&&(Tt(),ot.value=!1);const a=xt.value==="title",n=xt.value==="description",s=xt.value==="editor";if(tt.value.length===0){a&&Ve.value?Ve.value.focus():n&&nt.value?nt.value.focus():h.value.focus(),document.execCommand("undo",!1),e.nextTick(()=>{wt()});return}const i={content:h.value.innerHTML,title:A.title||"",description:A.description||""};Et.value.push(i);const c=tt.value.pop();if(c!==void 0){Q.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",p=typeof c=="object"&&c.description||"";h.value.innerHTML=d,bt.value=d,re.value=u,X.value=p,el.value=d,te.value=u,ce.value=p,e.nextTick(()=>{j(),ul(),Il(),pl();const y=dn(d);de("update:modelValue",y),de("update:title",u),de("update:description",p),de("change",y),de("title-change",u),de("description-change",p),Q.value=!1,e.nextTick(()=>{setTimeout(()=>{if(a){if(Ve.value){Ve.value.focus();const C=u.length;Ve.value.setSelectionRange&&Ve.value.setSelectionRange(C,C),il()}}else if(n){if(nt.value){nt.value.focus();const C=p.length;nt.value.setSelectionRange(C,C)}}else if(s)Tl();else if(Ve.value&&document.activeElement===Ve.value){const C=u.length;Ve.value.setSelectionRange&&Ve.value.setSelectionRange(C,C),il()}else if(nt.value&&document.activeElement===nt.value){const C=p.length;nt.value.setSelectionRange(C,C)}else h.value&&Tl()},10)})})}},Zl=()=>{if(A.disabled||!A.richText||!h.value)return;tl();const a=xt.value==="title",n=xt.value==="description",s=xt.value==="editor";if(Et.value.length===0){a&&Ve.value?Ve.value.focus():n&&nt.value?nt.value.focus():h.value.focus(),document.execCommand("redo",!1),e.nextTick(()=>{wt()});return}const i={content:h.value.innerHTML,title:A.title||"",description:A.description||""};tt.value.push(i);const c=Et.value.pop();if(c!==void 0){Q.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",p=typeof c=="object"&&c.description||"";h.value.innerHTML=d,bt.value=d,re.value=u,X.value=p,el.value=d,te.value=u,ce.value=p,e.nextTick(()=>{j(),ul(),Il(),pl();const y=dn(d);de("update:modelValue",y),de("update:title",u),de("update:description",p),de("change",y),de("title-change",u),de("description-change",p),Q.value=!1,e.nextTick(()=>{setTimeout(()=>{if(a){if(Ve.value){Ve.value.focus();const C=u.length;Ve.value.setSelectionRange&&Ve.value.setSelectionRange(C,C),il()}}else if(n){if(nt.value){nt.value.focus();const C=p.length;nt.value.setSelectionRange(C,C)}}else if(s)Tl();else if(Ve.value&&document.activeElement===Ve.value){const C=u.length;Ve.value.setSelectionRange&&Ve.value.setSelectionRange(C,C),il()}else if(nt.value&&document.activeElement===nt.value){const C=p.length;nt.value.setSelectionRange(C,C)}else h.value&&Tl()},10)})})}},an=()=>{if(!h.value)return;h.value.querySelectorAll('span[style*="font-weight"]').forEach(i=>{const c=i.style.fontWeight;if(c==="normal"||c==="400"){const d=document.createDocumentFragment();for(;i.firstChild;)d.appendChild(i.firstChild);i.parentNode&&i.parentNode.replaceChild(d,i)}}),h.value.querySelectorAll('span[style*="font-weight"]').forEach(i=>{if(parseInt(i.style.fontWeight)>=600){const d=document.createElement("b");for(d.style.fontWeight="600";i.firstChild;)d.appendChild(i.firstChild);i.parentNode&&i.parentNode.replaceChild(d,i)}}),h.value.querySelectorAll("b, strong").forEach(i=>{i.style.fontWeight="600"})},Dl=()=>{if(!h.value)return;h.value.querySelectorAll("i, em").forEach(n=>{n.style.fontStyle="italic"})},Gt=()=>{const a=window.getSelection();if(!a||a.rangeCount===0)return!1;const n=a.getRangeAt(0);let s=!1;if(n.collapsed){const i=n.startContainer;let c=i.nodeType===3?i.parentElement:i;for(;c&&c!==h.value;){if(c.tagName==="EM"||c.tagName==="I"){s=!0;break}if(c.style&&c.style.fontStyle==="italic"){s=!0;break}c=c.parentElement}}else{const i=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer:n.commonAncestorContainer.parentNode;if(i){const c=document.createTreeWalker(i,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let d;for(;d=c.nextNode();)if(!(typeof n.intersectsNode=="function"&&!n.intersectsNode(d))){if(d.nodeType===3){let u=d.parentElement;for(;u&&u!==h.value;){if(u.tagName==="EM"||u.tagName==="I"){s=!0;break}if(u.style&&u.style.fontStyle==="italic"){s=!0;break}u=u.parentElement}}else if(d.nodeType===1){const u=d;if(u.tagName==="EM"||u.tagName==="I"){s=!0;break}if(u.style&&u.style.fontStyle==="italic"){s=!0;break}}if(s)break}}}if(s)return document.execCommand("italic",!1),e.nextTick(()=>{Dl()}),!1;if(n.collapsed)document.execCommand("italic",!1),e.nextTick(()=>{Dl()});else try{const i=n.extractContents(),c=document.createElement("em");c.style.fontStyle="italic",c.appendChild(i),n.insertNode(c),n.setStartAfter(c),n.collapse(!0),a.removeAllRanges(),a.addRange(n),e.nextTick(()=>{Dl()})}catch{document.execCommand("italic",!1),e.nextTick(()=>{Dl()})}return!0},zn=()=>{const a=window.getSelection();if(!a||a.rangeCount===0)return!1;const n=a.getRangeAt(0);let s=!1;if(n.collapsed){const i=n.startContainer;let c=i.nodeType===3?i.parentElement:i;for(;c&&c!==h.value;){if(c.tagName==="STRONG"||c.tagName==="B"){s=!0;break}if(c.style&&parseInt(c.style.fontWeight)>=600){s=!0;break}c=c.parentElement}}else{const i=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer:n.commonAncestorContainer.parentNode;if(i){const c=document.createTreeWalker(i,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let d;for(;d=c.nextNode();)if(!(typeof n.intersectsNode=="function"&&!n.intersectsNode(d))){if(d.nodeType===3){let u=d.parentElement;for(;u&&u!==h.value;){if(u.tagName==="STRONG"||u.tagName==="B"){s=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){s=!0;break}u=u.parentElement}}else if(d.nodeType===1){const u=d;if(u.tagName==="STRONG"||u.tagName==="B"){s=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){s=!0;break}}if(s)break}}}if(s)return document.execCommand("bold",!1),e.nextTick(()=>{an()}),!1;if(n.collapsed)document.execCommand("bold",!1),e.nextTick(()=>{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0),d=c.startContainer;let u=d.nodeType===3?d.parentElement:d;for(;u&&u!==h.value;){if(u.tagName==="SPAN"&&u.style.fontWeight){const p=u.style.fontWeight;if(p==="normal"||p==="400"){const y=document.createElement("b");y.style.fontWeight="600";const C=document.createDocumentFragment();for(;u.firstChild;)C.appendChild(u.firstChild);y.appendChild(C),u.parentNode&&u.parentNode.replaceChild(y,u),c.setStart(y,0),c.collapse(!0),i.removeAllRanges(),i.addRange(c);break}}else if(u.tagName==="STRONG"||u.tagName==="B"){u.style.fontWeight="600";break}u=u.parentElement}if(!u||u===h.value){const p=document.createElement("b");p.style.fontWeight="600",p.innerHTML="<br>",c.insertNode(p),c.setStart(p,0),c.collapse(!0),i.removeAllRanges(),i.addRange(c)}}an()});else try{const i=n.extractContents(),c=document.createElement("b");c.style.fontWeight="600",c.appendChild(i),n.insertNode(c),n.setStartAfter(c),n.collapse(!0),a.removeAllRanges(),a.addRange(n),e.nextTick(()=>{an()})}catch{document.execCommand("bold",!1),e.nextTick(()=>{an()})}return!0},Pl=(a,n=null)=>{if(A.disabled||!A.richText||!h.value)return;ot.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Tt(),ot.value=!1):Tt(),tl(),h.value.focus();const s=window.getSelection();let i=null;if(s&&s.rangeCount>0){const d=s.getRangeAt(0);!d.collapsed&&_n(d)&&(i=Kt())}if(a==="createLink"&&n){const d=window.getSelection();if(d.rangeCount>0){const u=d.getRangeAt(0);if(u.collapsed)try{u.expand("word")}catch{const y=document.createTextNode(n);u.insertNode(y),u.selectNodeContents(y)}}}if(a==="bold"){const d=zn();ke.value.bold=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(V.value={command:"bold",state:d}),e.nextTick(()=>{i&&(Yt(i),e.nextTick(()=>{const p=Dt("bold");ke.value.bold=p})),wt(),ul(),pl()});return}if(a==="italic"){const d=Gt();ke.value.italic=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(V.value={command:"italic",state:d}),e.nextTick(()=>{i&&(Yt(i),e.nextTick(()=>{const p=Dt("italic");ke.value.italic=p})),wt(),Dl(),ul(),pl()});return}let c=!1;try{c=document.execCommand(a,!1,n)}catch{}e.nextTick(()=>{if(i&&Yt(i),["bold","italic","underline"].includes(a))try{if(a==="bold")i&&e.nextTick(()=>{const u=Dt("bold");ke.value.bold=u});else if(a==="italic")if(i)e.nextTick(()=>{const u=Dt("italic");ke.value.italic=u});else{const u=document.queryCommandState(a);ke.value[a]=u}else{const u=document.queryCommandState(a);ke.value[a]=u}}catch{ke.value.hasOwnProperty(a)?ke.value[a]=!ke.value[a]:ke.value[a]=!0}if(a==="createLink"&&n){const u=window.getSelection();if(u.rangeCount>0){const y=u.getRangeAt(0),C=y.commonAncestorContainer.nodeType===1?y.commonAncestorContainer.closest("a"):y.commonAncestorContainer.parentElement?.closest("a");C&&(!C.getAttribute("href")||C.getAttribute("href")==="")&&C.setAttribute("href",n)}h.value.querySelectorAll("a").forEach(y=>{const C=y.getAttribute("href");(!C||C===""||C==="#")&&y.setAttribute("href",n)})}wt(),ul(),pl()})},Dt=(a,n=null)=>{if(A.disabled||!h.value)return!1;try{if(a==="formatBlock"&&n){const i=document.queryCommandValue("formatBlock");if(n==="<blockquote>"){const c=i.toLowerCase();if(c==="blockquote"||c==="<blockquote>")return!0;const d=window.getSelection();if(d.rangeCount>0){const p=d.getRangeAt(0).commonAncestorContainer;return!!(p.nodeType===1?p.tagName==="BLOCKQUOTE"?p:p.closest("blockquote"):p.parentElement?.closest("blockquote"))}}return i===n||i.toLowerCase()===n.toLowerCase()}if(["bold","italic","underline"].includes(a))try{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0);if(a==="bold"){let u=!1;if(c.collapsed){const p=c.commonAncestorContainer,y=p.nodeType===3?p.parentElement:p;if(y&&((y.tagName==="STRONG"||y.tagName==="B"||y.closest&&y.closest("strong, b"))&&(u=!0),!u&&y.style&&parseInt(y.style.fontWeight)>=600&&(u=!0),!u))try{const C=window.getComputedStyle(y);parseInt(C.fontWeight)>=600&&(u=!0)}catch{}return ke.value.hasOwnProperty(a)?ke.value[a]:(ke.value[a]=u,u)}else{const p=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let y=!1;if(p){const C=document.createTreeWalker(p,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let R;for(;R=C.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(R))){if(R.nodeType===3){if(!(R.textContent||"").trim())continue;y=!0;let M=R.parentElement;for(;M&&M!==h.value;){if(M.tagName==="STRONG"||M.tagName==="B"){u=!0;break}if(M.style&&parseInt(M.style.fontWeight)>=600){u=!0;break}M=M.parentElement}}else if(R.nodeType===1){const O=R;if(O.tagName==="STRONG"||O.tagName==="B"){u=!0;break}if(O.style&&parseInt(O.style.fontWeight)>=600){u=!0;break}}if(u)break}}return ke.value[a]=u&&y,u&&y}}if(a==="italic"){let u=!1;if(c.collapsed){const p=c.commonAncestorContainer,y=p.nodeType===3?p.parentElement:p;if(y&&((y.tagName==="EM"||y.tagName==="I"||y.closest&&y.closest("em, i"))&&(u=!0),!u&&y.style&&y.style.fontStyle==="italic"&&(u=!0),!u))try{window.getComputedStyle(y).fontStyle==="italic"&&(u=!0)}catch{}return ke.value.hasOwnProperty(a)?ke.value[a]:(ke.value[a]=u,u)}else{const p=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let y=!1;if(p){const C=document.createTreeWalker(p,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let R;for(;R=C.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(R))){if(R.nodeType===3){if(!(R.textContent||"").trim())continue;y=!0;let M=R.parentElement;for(;M&&M!==h.value;){if(M.tagName==="EM"||M.tagName==="I"){u=!0;break}if(M.style&&M.style.fontStyle==="italic"){u=!0;break}M=M.parentElement}}else if(R.nodeType===1){const O=R;if(O.tagName==="EM"||O.tagName==="I"){u=!0;break}if(O.style&&O.style.fontStyle==="italic"){u=!0;break}}if(u)break}}return ke.value[a]=u&&y,u&&y}}const d=document.queryCommandState(a);return c.collapsed&&ke.value.hasOwnProperty(a)?ke.value[a]:(ke.value[a]=d,d)}return ke.value.hasOwnProperty(a)?ke.value[a]:!1}catch{return ke.value.hasOwnProperty(a)?ke.value[a]:!1}try{return document.queryCommandState(a)}catch{return!1}}catch{return!1}},Pn=a=>{A.disabled||!A.richText||(we.value=we.value===a?null:a,a==="askAi"&&(mt.value=null))},tl=()=>{we.value=null,fe.value=null},_l=a=>{Pl("formatBlock",a),tl()},yn=a=>{if(!a||!h.value)return a;const n=We=>{let $e=We.nodeType===Node.TEXT_NODE?We.parentElement:We;for(;$e&&$e!==h.value;){const gt=$e.tagName;if(gt==="P"){const Ut=$e.parentElement;if(Ut===h.value||Ut.tagName==="BLOCKQUOTE")return $e}if(gt==="BLOCKQUOTE")break;$e=$e.parentElement}return null},s=n(a.startContainer),i=n(a.endContainer);if(!s||!i)return a;const c=[],d=document.createTreeWalker(h.value,NodeFilter.SHOW_ELEMENT,{acceptNode:We=>{const $e=We.tagName;if($e==="P"){const gt=We.parentElement;if(gt===h.value||gt.tagName==="BLOCKQUOTE")return NodeFilter.FILTER_ACCEPT}return $e==="BLOCKQUOTE"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}});let u;for(;u=d.nextNode();)c.push(u);const p=c.indexOf(s),y=c.indexOf(i);if(p===-1||y===-1)return a;const C=Math.min(p,y),R=Math.max(p,y),O=c.slice(C,R+1);if(O.length===0)return a;const M=O[0],ue=O[O.length-1],le=document.createRange();return le.setStartBefore(M),le.setEndAfter(ue),le},sn=()=>{if(A.disabled||!A.richText||!h.value)return;ot.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Tt(),ot.value=!1):Tt(),tl(),h.value.focus();const a=window.getSelection();if(a.rangeCount===0)return;let n=a.getRangeAt(0);!n.collapsed&&_n(n)&&(n=yn(n),a.removeAllRanges(),a.addRange(n));let s=null;!n.collapsed&&_n(n)&&(s=Kt());const i=n.commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&h.value.contains(c))){if(c){const u=c.parentNode;Array.from(c.childNodes).forEach(y=>{if(y.nodeType===Node.ELEMENT_NODE)if(y.tagName==="P"||y.tagName==="DIV")u.insertBefore(y,c);else{const C=document.createElement("p");C.appendChild(y.cloneNode(!0)),u.insertBefore(C,c)}else if(y.nodeType===Node.TEXT_NODE&&y.textContent.trim()){const C=document.createElement("p");C.appendChild(y.cloneNode(!0)),u.insertBefore(C,c)}}),c.remove()}}else if(n.collapsed)document.execCommand("formatBlock",!1,"<blockquote>");else{const u=document.createElement("blockquote"),p=n.extractContents();u.appendChild(p),n.insertNode(u);const y=[],C=document.createTreeWalker(u,NodeFilter.SHOW_TEXT,{acceptNode:M=>M.parentNode===u&&M.textContent.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let R;for(;R=C.nextNode();)y.push(R);if(y.forEach(M=>{const ue=document.createElement("p");M.parentNode.insertBefore(ue,M),ue.appendChild(M)}),u.querySelectorAll("p, div").forEach(M=>{M.textContent.trim()===""&&!M.querySelector("img")&&(M.innerHTML="<br>")}),u.children.length===0&&u.textContent.trim()===""){const M=document.createElement("p");M.innerHTML="<br>",u.appendChild(M)}}e.nextTick(()=>{s&&Yt(s),Il(),wt(),pl()})},Fl=()=>{if(!h.value)return;const a=window.getSelection();if(a.rangeCount===0)return;const s=a.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.tagName==="BLOCKQUOTE"?s:s.closest("blockquote"):s.parentElement?.closest("blockquote");if(!i||!h.value.contains(i))return;const c=R=>{if(!R)return!1;const O=R.textContent||"",ue=(R.innerHTML||"").trim();return O.trim()===""||ue===""||ue==="<br>"||ue==="<br/>"||ue==="<p></p>"||ue==="<p><br></p>"||ue==="<p><br/></p>"||ue==="<p> </p>"||ue==="<p><br> </p>"||ue==="<div></div>"||ue==="<div><br></div>"||ue==="<div><br/></div>"};let d=null;for(s.nodeType===3?d=s.parentElement:s.tagName==="P"||s.tagName==="DIV"?d=s:d=s.closest("p, div"),d&&i.contains(d)&&c(d)&&d.remove();i.lastChild;){const R=i.lastChild;if(R.nodeType===1&&R.tagName==="BR")R.remove();else if(R.nodeType===3)if((R.textContent||"").trim()==="")R.remove();else break;else break}if(i.children.length>0)for(let R=i.children.length-1;R>=0;R--){const O=i.children[R];if((O.tagName==="P"||O.tagName==="DIV")&&c(O))O.remove();else break}let u=i.innerHTML;const p=u;u=u.replace(/(<br\s*\/?>)+$/gi,""),u!==p&&(i.innerHTML=u);const y=document.createElement("p");y.innerHTML="<br>",i.parentNode?i.nextSibling?i.parentNode.insertBefore(y,i.nextSibling):i.parentNode.appendChild(y):h.value&&h.value.appendChild(y);const C=document.createRange();C.selectNodeContents(y),C.collapse(!0),a.removeAllRanges(),a.addRange(C),e.nextTick(()=>{Il(),wt()})},ul=()=>{if(!h.value){ye.value=!1;return}try{const a=window.getSelection();if(a.rangeCount>0){const s=a.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");ye.value=!!i}else ye.value=!1}catch{ye.value=!1}},Ql=()=>{if(!h.value)return;const a=window.getSelection();a&&a.rangeCount>0&&a.getRangeAt(0),U.value=Kt();const n=window.getSelection();let s="";n.rangeCount>0&&(s=n.getRangeAt(0).toString()),Z.value="",ze.value=s,He.value="",Xe.value=null,Ae.value=!0,tl(),e.nextTick(()=>{Ye.value&&Ye.value.focus()})},Ul=()=>{if(!h.value)return;ot.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Tt(),ot.value=!1):Tt();const a=window.getSelection();let n=null;if(a.rangeCount>0){const i=a.getRangeAt(0).commonAncestorContainer;n=i.nodeType===1?i.closest("a"):i.parentElement?.closest("a")}if(!n&&Xe.value&&(n=Xe.value),n&&n.parentNode){const s=document.createDocumentFragment();for(;n.firstChild;)s.appendChild(n.firstChild);if(n.parentNode.replaceChild(s,n),s.firstChild){const i=document.createRange();i.setStartBefore(s.firstChild),i.setEndAfter(s.lastChild||s.firstChild),a.removeAllRanges(),a.addRange(i),document.execCommand("removeFormat",!1),i.collapse(!1),a.removeAllRanges(),a.addRange(i)}Xe.value=null}else Pl("unlink");ye.value=!1,tl(),e.nextTick(()=>{wt(),ul()})},k=()=>{A.disabled||!A.richText||h.value&&(ot.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Tt(),ot.value=!1):Tt(),tl(),h.value.focus(),document.execCommand("insertUnorderedList",!1),e.nextTick(()=>{j(),wt(),pl()}))},w=()=>{A.disabled||!A.richText||h.value&&(ot.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Tt(),ot.value=!1):Tt(),tl(),h.value.focus(),document.execCommand("insertOrderedList",!1),e.nextTick(()=>{j(),wt(),pl()}))},E=a=>{const n=a.parentElement;if(!n||n.tagName!=="OL")return null;let s=0,i=a.previousElementSibling;for(;i;)i.tagName==="LI"&&s++,i=i.previousElementSibling;return s+1},j=()=>{if(!h.value)return;h.value.querySelectorAll("li > ol").forEach(n=>{const s=n.parentElement;if(s&&s.tagName==="LI"){const i=E(s);i!==null&&Array.from(n.children).filter(d=>d.tagName==="LI").forEach(d=>{d.setAttribute("data-parent-num",String(i))})}})},Ce=()=>{if(A.disabled||!A.richText||!h.value)return;tl(),h.value.focus();const a=window.getSelection();if(a.rangeCount===0)return;const n=a.getRangeAt(0),s=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer.closest("li"):n.commonAncestorContainer.parentElement?.closest("li");if(!s){document.execCommand("indent",!1),e.nextTick(()=>{j(),wt()});return}const i=s.parentElement;if(!i||i.tagName!=="OL"&&i.tagName!=="UL")return;const c=s.previousElementSibling;if(c&&c.tagName==="LI"){const d=i.tagName.toLowerCase();let u=c.querySelector(`:scope > ${d}`);u||(u=document.createElement(d),c.appendChild(u));const p=E(c);u.appendChild(s),p!==null&&i.tagName==="OL"&&s.setAttribute("data-parent-num",String(p)),j();const y=document.createRange();y.selectNodeContents(s),y.collapse(!1),a.removeAllRanges(),a.addRange(y),e.nextTick(()=>{wt(),pl()})}else document.execCommand("indent",!1),e.nextTick(()=>{j(),wt(),pl()})},qe=()=>{if(A.disabled||!A.richText||!h.value)return;tl(),h.value.focus();const a=window.getSelection();if(a.rangeCount===0)return;const n=a.getRangeAt(0),s=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer.closest("li"):n.commonAncestorContainer.parentElement?.closest("li");if(!s){document.execCommand("outdent",!1),e.nextTick(()=>{j(),wt()});return}const i=s.parentElement;if(!i||i.tagName!=="OL"&&i.tagName!=="UL")return;const c=i.parentElement;if(c&&c.tagName==="LI"){const d=c.parentElement;if(d&&(d.tagName==="OL"||d.tagName==="UL")){i.tagName==="OL"&&s.removeAttribute("data-parent-num"),d.insertBefore(s,c.nextSibling),i.children.length===0&&i.remove(),j();const u=document.createRange();u.selectNodeContents(s),u.collapse(!1),a.removeAllRanges(),a.addRange(u),e.nextTick(()=>{wt(),pl()});return}}document.execCommand("outdent",!1),e.nextTick(()=>{j(),wt(),pl()})},Ie=e.ref(null),at=e.ref(null),f=e.ref({}),g=e.ref(""),S=e.ref(null),F=e.ref("");e.ref("");const z=e.ref(null);e.ref("");const Qe=e.ref([]),Te=e.ref(!1),Ft=e.ref(!1),Le=a=>{if(!a)return"";const n=a.cloneRange(),s=document.createElement("div");return s.appendChild(n.cloneContents()),s.innerHTML},st=()=>{if(!A.commentUser||A.disabled||!A.richText||!h.value)return;if(Ie.value!==null){Ie.value=null,g.value="",F.value="",z.value=null,Qe.value=[],Ln(!0);return}tl(),h.value.focus();const a=window.getSelection();if(!a||a.rangeCount===0)return;const n=a.getRangeAt(0);if(n.collapsed||!_n(n))return;F.value=Le(n)||"",z.value=Kt();const s=n.getBoundingClientRect(),i=h.value.parentElement;if(!i)return;const c=i.getBoundingClientRect(),d=s.bottom-c.top,p=Math.max(d+8,0);f.value={top:`${p}px`,bottom:"auto"},Ie.value=Date.now(),e.nextTick(()=>{if(g.value="",S.value){const C=S.value;C.style.height="auto",C.style.height=`${C.scrollHeight}px`,C.focus()}const y=i.querySelector(".dss-comment-overlay");if(y&&i){const C=i.querySelector(".dss-text-editor-footer");if(C){const R=i.getBoundingClientRect(),O=y.getBoundingClientRect(),M=C.getBoundingClientRect(),ue=O.bottom-R.top,le=M.top-R.top,We=8;if(ue>le-We){const $e=M.height;f.value={bottom:`${$e+We}px`,top:"auto"}}else f.value={top:`${p}px`,bottom:"auto"}}}})},ne=()=>{if(!g.value.trim())return;const a=g.value.trim(),n=new Date,s={text:a,selectionText:F.value,selectionRange:z.value,commentId:Ie.value,user:A.commentUser||null,createdAt:n.toISOString()};Qe.value=[...Qe.value,s],de("comment-submitted",s),Gn(s),z.value&&!Ze(z.value)&&jo(Ie.value,z.value),g.value="",e.nextTick(()=>{if(S.value){const i=S.value;i.style.height="auto",i.style.height=`${i.scrollHeight}px`,i.focus()}it("sendComment")})},ll=(a,n)=>{if(!(!A.commentUser||!a.user||a.user.id!==A.commentUser.id)){if(Qe.value=Qe.value.filter((s,i)=>i!==n),Ie.value!==null&&h.value){const s=String(Ie.value),i=h.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`);if(i&&Qe.value.length>0){const c=[],d=new Set;Qe.value.forEach(u=>{u.user&&u.user.id&&!d.has(u.user.id)&&(d.add(u.user.id),c.push(u.user))}),c.length>0?i.setAttribute("data-comment-user",JSON.stringify(c[0])):i.removeAttribute("data-comment-user"),c.length>1?i.setAttribute("data-comment-user-2",JSON.stringify(c[1])):i.removeAttribute("data-comment-user-2"),i.setAttribute("data-comment-count",String(Qe.value.length))}else i&&Qe.value.length===0&&(i.removeAttribute("data-comment-user"),i.removeAttribute("data-comment-user-2"),i.setAttribute("data-comment-count","0"))}if(de("comment-deleted",{comment:a,index:n,commentId:Ie.value}),A.comments&&Array.isArray(A.comments)){const s=A.comments.filter(i=>!(i.commentId===a.commentId&&i.text===a.text&&i.user?.id===a.user?.id));de("update:comments",s)}e.nextTick(()=>{it("deleteComment")})}},Ze=a=>{if(!a||!h.value)return!1;try{const n=Kn(a);if(!n)return!1;const s=n.commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(i)return!!i.closest("[data-comment], [data-fake-comment]")}catch{}return!1},Kn=a=>{if(!a||!h.value)return null;try{const n=document.createRange();if(a.type==="element"&&a.element)return h.value.contains(a.element)?(n.setStart(a.element,a.offset),n.collapse(!0),n):null;let s=0;const i=[h.value];let c=null,d=!1,u=!1;for(;!u&&(c=i.pop());)if(c.nodeType===3){const p=s+c.length;!d&&a.start>=s&&a.start<=p&&(n.setStart(c,a.start-s),d=!0),d&&a.end>=s&&a.end<=p&&(n.setEnd(c,a.end-s),u=!0),s=p}else{let p=c.childNodes.length;for(;p--;)i.push(c.childNodes[p])}return d?n:null}catch{return null}},jo=(a,n)=>{if(!(!a||!n||!h.value))try{const s=Kn(n);if(!s||s.collapsed)return;const i=s.commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;if(c){const p=c.closest("[data-comment], [data-fake-comment]");if(p){p.getAttribute("data-comment")!==String(a)&&p.getAttribute("data-fake-comment")!==String(a)&&p.setAttribute("data-comment",String(a));return}}const d=document.createElement("span");d.setAttribute("data-comment",String(a));try{const p=s.startContainer,y=s.endContainer,C=s.startOffset,R=s.endOffset,O=p.nodeType===3?p.parentNode:p,M=y.nodeType===3?y.parentNode:y;if(O===M&&C===0&&R===(y.nodeType===3?y.length:M.childNodes.length)&&(O.tagName==="P"||O.tagName==="DIV"||O.tagName==="H1"||O.tagName==="H2"||O.tagName==="H3"||O.tagName==="H4"||O.tagName==="H5"||O.tagName==="H6")){const le=s.extractContents();d.appendChild(le),s.insertNode(d)}else s.surroundContents(d)}catch{const y=s.extractContents();d.appendChild(y),s.insertNode(d)}const u=h.value.querySelector(`[data-comment="${String(a)}"]`);e.nextTick(()=>{it("wrapSelectionWithCommentMarker"),wt()})}catch{}},Gn=a=>{if(!a||!a.commentId)return;const n=Array.isArray(A.comments)?[...A.comments]:[],s=typeof a.commentId=="string"&&a.commentId.startsWith("comment-")?Date.now():Number(a.commentId)||a.commentId;let i=n.findIndex(d=>typeof d.conversation_id=="string"&&d.conversation_id.startsWith("comment-")?null:Number(d.conversation_id)===Number(s)||d.conversation_id===s);const c={text:a.text,user:a.user,createdAt:a.createdAt,created_at:a.createdAt,updated_at:a.createdAt};if(i>=0){const d=n[i];if(d.conversation||(d.conversation=[]),d.conversation.push(c),d.updated_at=a.createdAt,!d.article_id&&n.length>0){const u=n.find(p=>p.article_id);u&&(d.article_id=u.article_id)}}else{const d=a.selectionRange,u=n.length>0&&n.find(y=>y.article_id)?.article_id||null,p={conversation_id:s,article_id:u,selection_range:d?{start:d.start||0,end:d.end||0,type:d.type||"text"}:null,selection_text:a.selectionText||"",conversation:[c],created_by_user:a.user,created_at:a.createdAt,updated_at:a.createdAt,status:"active"};n.push(p)}Te.value=!0,de("update:comments",n)},On=(a,n=[])=>{if(!A.commentUser||A.disabled||!A.richText||!h.value)return;const s=h.value;let i=null;try{i=s.querySelector(a)}catch{return}if(!i)return;tl(),s.focus();const c=document.createRange();c.selectNodeContents(i);const d=window.getSelection();d&&(d.removeAllRanges(),d.addRange(c)),F.value=i.innerHTML||"",z.value=Kt();const u=c.getBoundingClientRect(),p=s.parentElement;if(p){const R=p.getBoundingClientRect(),O=u.bottom-R.top,ue=Math.max(O+8,0);f.value={top:`${ue}px`,bottom:"auto"}}const y=i.getAttribute("data-comment")||i.getAttribute("data-fake-comment");let C=[];if(y&&A.comments&&Array.isArray(A.comments)){const R=A.comments.find(O=>String(O.conversation_id)===String(y));if(R&&R.conversation&&Array.isArray(R.conversation)){const O=R.conversation.map(M=>({id:M.id||M.commentary_id,commentary_id:M.id||M.commentary_id,conversation_id:R.id||R.conversation_id,text:M.text,user:M.user,createdAt:M.created_at||M.createdAt,updated_at:M.updated_at||M.updatedAt}));C.push(...O)}}C.length===0&&Array.isArray(n)&&n.length>0&&(C=n.slice()),C.sort((R,O)=>{const M=We=>{if(!We)return 0;const $e=new Date(We).getTime();return isNaN($e)?0:$e},ue=M(R.createdAt),le=M(O.createdAt);return ue===le?0:ue-le}),Qe.value=C,Ln(!0),Ie.value=y||null,i&&(at.value=i,i.classList.add("editor-comment-highlighted")),e.nextTick(()=>{if(g.value="",S.value){const R=S.value;R.style.height="auto",R.style.height=`${R.scrollHeight}px`,R.focus()}if(p){const R=p.querySelector(".dss-comment-overlay");if(R){const O=p.querySelector(".dss-text-editor-footer");if(O){const M=p.getBoundingClientRect(),ue=R.getBoundingClientRect(),le=O.getBoundingClientRect(),We=ue.bottom-M.top,$e=le.top-M.top,gt=8;if(We>$e-gt){const Ut=le.height;f.value={bottom:`${Ut+gt}px`,top:"auto"}}}}}it("openCommentOverlayForSelector")})},Qn=e.ref(null),oo=e.ref(0),Ko=a=>{if(!(A.disabled||!A.richText)){if(a.key==="Escape"){const n=window.getSelection();if(n.rangeCount>0){const i=n.getRangeAt(0).commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&h.value&&h.value.contains(c))){a.preventDefault();let u=null;i.nodeType===3?u=i.parentElement:i.tagName==="P"||i.tagName==="DIV"?u=i:u=i.closest("p, div");const p=document.createElement("p");p.innerHTML="<br>",u&&c.contains(u)&&u.nextSibling?c.insertBefore(p,u.nextSibling):c.appendChild(p),setTimeout(()=>{Fl()},50);return}}}if(a.key.length===1||a.key==="Enter"){const n=window.getSelection();if(n&&n.rangeCount>0){const s=n.getRangeAt(0),i=s.commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;if(c){const d=c.closest(".dss-image-wrapper");if(d){const u=d.querySelector("img");if(c!==u&&!u?.contains(c)){const p=s.startContainer.nodeType===3?s.startContainer.parentElement:s.startContainer,y=s.endContainer.nodeType===3?s.endContainer.parentElement:s.endContainer;if(d.contains(p)&&p!==u||d.contains(y)&&y!==u){a.preventDefault();const C=document.createRange();C.setStartAfter(d),C.collapse(!0),n.removeAllRanges(),n.addRange(C);return}}}}}}if(a.key==="Backspace"||a.key==="Delete"){const n=window.getSelection();if(n.rangeCount>0){const s=n.getRangeAt(0);let i=null,c=null;if(s.collapsed)if(a.key==="Backspace"){const d=s.startContainer;let u=d;d.nodeType===3&&(s.startOffset===0?u=d.previousSibling||d.parentNode:u=d.parentNode);const p=u.previousSibling;p&&(p.classList&&p.classList.contains("dss-image-wrapper")?c=p:p.tagName==="IMG"&&(i=p,c=i.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(i=c.querySelector("img")))}else{const d=s.startContainer;let u=d;d.nodeType===3&&(s.startOffset===d.length?u=d.nextSibling||d.parentNode:u=d.parentNode);const p=u.nextSibling;p&&(p.classList&&p.classList.contains("dss-image-wrapper")?c=p:p.tagName==="IMG"&&(i=p,c=i.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(i=c.querySelector("img")))}else{const d=s.commonAncestorContainer,u=s.startContainer.nodeType===3?s.startContainer.parentElement:s.startContainer,p=s.endContainer.nodeType===3?s.endContainer.parentElement:s.endContainer;if(d.nodeType===1&&d.tagName==="IMG"?(i=d,c=i.closest(".dss-image-wrapper")):(i=d.querySelector("img"),i&&(c=i.closest(".dss-image-wrapper"))),c){const y=c.contains(u)||u===c,C=c.contains(p)||p===c,O=s.cloneContents().textContent?.trim()||"",M=c.textContent?.trim()||"";(!y||!C||O.length>M.length)&&(c=null,i=null)}}if(c){a.preventDefault(),a.stopPropagation();const d=c.parentNode;if(d){const u=document.createTextNode("");d.insertBefore(u,c),c.remove();const p=document.createRange();p.setStartAfter(u),p.collapse(!0),n.removeAllRanges(),n.addRange(p),e.nextTick(()=>{wt()});return}}}}if(a.key==="Tab"){a.preventDefault(),a.shiftKey?qe():Ce();return}if(a.key==="Enter"){const n=window.getSelection();if(n.rangeCount>0){const s=n.getRangeAt(0);if(s.collapsed){const u=s.startContainer,p=y=>{if(!y)return!1;let C=y.previousSibling;for(;C;){if(C.classList&&C.classList.contains("dss-image-wrapper")||C.tagName==="IMG"||C.querySelector&&C.querySelector(".dss-image-wrapper")||C.querySelector&&C.querySelector("img"))return!0;C=C.previousSibling}const R=y.parentElement;return R&&R!==h.value?p(R):!1};if(u.nodeType===3){const y=u.parentElement;if(y&&(p(y)||p(u))){const C=y.closest("p, div");if(C&&C!==h.value){a.preventDefault(),a.stopPropagation();let R=null;const O=s.startOffset;O<u.length&&(R=u.splitText(O));const M=document.createElement("p");if(R?M.appendChild(R):M.innerHTML="<br>",u.length===0){const le=u.parentElement;le&&(le.removeChild(u),le.childNodes.length===0&&le.appendChild(document.createElement("br")))}C.nextSibling?C.parentNode.insertBefore(M,C.nextSibling):C.parentNode.appendChild(M);const ue=document.createRange();R?ue.setStart(R,0):ue.setStart(M,0),ue.collapse(!0),n.removeAllRanges(),n.addRange(ue),e.nextTick(()=>{wt()});return}}}}const i=s.commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&h.value&&h.value.contains(c))){let u=null;i.nodeType===3?u=i.parentElement:i.tagName==="P"||i.tagName==="DIV"?u=i:u=i.closest("p, div");const p=le=>{if(!le)return!1;const We=le.textContent||"",gt=(le.innerHTML||"").trim(),Ut=gt.replace(/<br\s*\/?>/gi,"").trim();return We.trim()===""||gt===""||Ut===""||gt==="<br>"||gt==="<br/>"||gt==="<p></p>"||gt==="<p><br></p>"||gt==="<p><br/></p>"||gt==="<p> </p>"||gt==="<p><br> </p>"||gt==="<div></div>"||gt==="<div><br></div>"||gt==="<div><br/></div>"},y=c.lastChild,C=y&&y.nodeType===1&&y.tagName==="BR",R=s.startContainer,O=R.nodeType===3?R.parentElement:R,M=O===c||O&&O.parentElement===c;if(u&&p(u)||C&&M){a.preventDefault(),setTimeout(()=>{Fl()},50);return}}}}if(a.key===" "){const n=Date.now(),s=n-oo.value;if(Qn.value===" "&&s<300){const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0),d=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer.closest("li"):c.commonAncestorContainer.parentElement?.closest("li");if(d){const u=c.startContainer.textContent?.substring(0,c.startOffset)||"";if((d.textContent||"").indexOf(u.trim())<=10||u.trim().length<=2){a.preventDefault(),Ce();return}}}}Qn.value=" ",oo.value=n}else Qn.value=a.key}},Go=a=>{if(A.disabled||!A.richText)return;a.preventDefault();let n=a.clipboardData.getData("text/html"),s=a.clipboardData.getData("text/plain");n&&(n=n.replace(/<!--[\s\S]*?-->/g,"")),s&&(s=s.replace(/<!--[\s\S]*?-->/g,"")),Tt();const i=window.getSelection();let c=null;if(i&&i.rangeCount>0){let p=i.getRangeAt(0).commonAncestorContainer;p.nodeType===3&&(p=p.parentNode),c=p.closest("p, h1, h2, h3, h4, h5, h6, li, blockquote")}const d=u=>{const y=new DOMParser().parseFromString(u,"text/html");let C=h.value.querySelector("h1")?1:0;if(y.querySelectorAll("h1").forEach(O=>{if(C>0){const M=y.createElement("p");M.innerHTML=O.innerHTML,O.parentNode.replaceChild(M,O)}else C++}),c){const O=["P","H1","H2","H3","H4","H5","H6","DIV","BLOCKQUOTE","UL","OL","LI"],M=Array.from(y.body.children).filter(ue=>O.includes(ue.tagName));if(M.length===1){const ue=M[0].tagName,le=c.tagName,We=c.textContent.trim()===""&&!c.querySelector("img");let $e=!1;if(["H1","H2","H3","H4","H5","H6"].includes(le)?$e=!0:We||(ue===le||ue==="P")&&($e=!0),$e)return M[0].innerHTML.trim()}}return y.body.innerHTML.trim()};if(n){const u=d(n);document.execCommand("insertHTML",!1,u)}else if(s)if(/<[a-z][\s\S]*>/i.test(s)){const p=d(s);document.execCommand("insertHTML",!1,p)}else document.execCommand("insertText",!1,s);wt()},$o=a=>{if(we.value){const s=a.target;!s.closest(".dss-toolbar-dropdown")&&!s.closest(".dss-toolbar-dropdown-toggle")&&tl()}if(Me.value){const s=a.target,i=s.closest(".dss-floating-toolbar"),c=h.value&&s.closest(".dss-text-editor-content");!i&&!c&&Jn()}if(mt.value){const s=a.target,i=s.closest(".dss-floating-toolbar"),c=s.closest(".dss-toolbar-dropdown");!i&&!c&&Ao()}const n=a.target;if(!n.closest(".dss-toolbar-dropdown")&&!n.closest(".dss-toolbar-dropdown-submenu")&&(fe.value=null),!h.value||!n.closest(".dss-text-editor-content")){const s=window.getSelection();if(s&&s.rangeCount>0){const i=s.getRangeAt(0);ae.value=!i.collapsed&&_n(i)}else ae.value=!1}if(Ie.value!==null){const s=document.querySelector(".dss-comment-overlay");let i=!1;if(s){const u=s.getBoundingClientRect(),p=a.clientX,y=a.clientY;i=p>=u.left&&p<=u.right&&y>=u.top&&y<=u.bottom}const c=n.closest(".dss-toolbar-button"),d=c&&c.getAttribute("title")==="Comment";!i&&!d&&(Ie.value=null,g.value="",F.value="",z.value=null,Qe.value=[],Ln(!0))}},Lo=(a,n)=>{a&&a.stopPropagation&&a.stopPropagation(),Fe.value&&(clearTimeout(Fe.value),Fe.value=null),fe.value=n},To=a=>{const n=a.relatedTarget;if(n){const s=n.closest(".dss-toolbar-dropdown-submenu"),i=n.closest(".dss-toolbar-dropdown-item-has-submenu");if(s||i)return}Fe.value&&clearTimeout(Fe.value),Fe.value=setTimeout(()=>{fe.value=null,Fe.value=null},150)},Qo=a=>{fe.value=null};let wn=0;const Jo=a=>{if(!a)return;const n=Array.from(a.children);n.forEach(s=>{s.classList.contains("dss-toolbar-dropdown-submenu")||s.classList.contains("dss-toolbar-dropdown-item-has-submenu")||(s.tagName==="BUTTON"||s.tagName==="DIV")&&!s.classList.contains("dss-toolbar-dropdown-item")&&s.classList.add("dss-toolbar-dropdown-item")}),n.forEach((s,i)=>{if(s.classList.contains("dss-toolbar-dropdown-item-has-submenu")||s.classList.contains("dss-toolbar-dropdown-submenu")||!s.classList.contains("dss-toolbar-dropdown-item"))return;const c=Array.from(s.children).find(p=>p.tagName==="DIV"?p.classList.contains("dss-toolbar-dropdown-item")?!1:Array.from(p.children).filter(C=>C.tagName==="BUTTON"||C.tagName==="DIV").length>0:!1),d=s.nextElementSibling,u=d&&!d.classList.contains("dss-toolbar-dropdown-submenu")&&!d.classList.contains("dss-toolbar-dropdown-item-has-submenu")&&d.tagName==="DIV"&&!d.classList.contains("dss-toolbar-dropdown-item")&&Array.from(d.children).some(p=>p.tagName==="BUTTON"||p.tagName==="DIV");if(c||u){const p=`submenu-auto-${++wn}`;s.classList.add("dss-toolbar-dropdown-item-has-submenu"),s.setAttribute("data-submenu-id",p);let y=null;c?(s.tagName==="BUTTON"&&s.parentNode.insertBefore(c,s.nextSibling),c.classList.add("dss-toolbar-dropdown-submenu"),y=c):u&&(d.classList.add("dss-toolbar-dropdown-submenu"),y=d),y&&(y.setAttribute("data-submenu-id",p),y.setAttribute("data-processed","true"),c&&s.tagName!=="BUTTON"?y.dataset.originalParentRef="inside":y.dataset.originalParentRef="sibling",Array.from(y.children).forEach(R=>{(R.tagName==="BUTTON"||R.tagName==="DIV")&&!R.classList.contains("dss-toolbar-dropdown-item")&&R.classList.add("dss-toolbar-dropdown-item")}))}})},Do=()=>{document.querySelectorAll(".dss-toolbar-dropdown").forEach(n=>{Jo(n),n.querySelectorAll(".dss-toolbar-dropdown-item-has-submenu").forEach(c=>{const d=c._subMenuHandlers;d&&(c.removeEventListener("mouseenter",d.enter),c.removeEventListener("mouseleave",d.leave));const u=y=>{const C=c.getAttribute("data-submenu-id");C&&Lo(y,C)},p=To;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",p),c._subMenuHandlers={enter:u,leave:p}}),n.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(c=>{const d=c._subMenuHandlers;d&&(c.removeEventListener("mouseenter",d.enter),c.removeEventListener("mouseleave",d.leave));const u=C=>{const R=c.getAttribute("data-submenu-id");R&&Lo(C,R)},p=To;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",p),c._subMenuHandlers={enter:u,leave:p},c.querySelectorAll(".dss-toolbar-dropdown-item").forEach(C=>{C.addEventListener("click",Qo)})})})};let Wn=null;const ao=()=>{if(fe.value){const a=document.querySelector(`.dss-toolbar-dropdown-submenu[data-submenu-id="${fe.value}"]`),n=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${fe.value}"]`);a&&n&&Vn(a,n)}if(Me.value&&pl(),A.richText){if(Wn!==null)return;Wn=setTimeout(()=>{Wn=null,it("handleWindowResize")},150)}},so=()=>{if(!A.richText)return;document.querySelectorAll(".dss-toolbar-custom-group").forEach(n=>{Array.from(n.children).filter(i=>i.tagName==="DIV"&&!i.classList.contains("dss-toolbar-button")).forEach(i=>{i.classList.add("dss-toolbar-button")})})},ea=()=>{const a=document.querySelectorAll(".dss-text-editor-footer, .dss-text-editor-footer-content, .dss-text-editor-footer-stat, .dss-text-editor-footer-separator"),n=s=>{if(s.preventDefault(),s.stopPropagation(),window.getSelection){const i=window.getSelection();i.removeAllRanges?i.removeAllRanges():i.empty&&i.empty()}return!1};a.forEach(s=>{s.addEventListener("selectstart",n),s.addEventListener("mousedown",n),s.addEventListener("dragstart",n),s.addEventListener("contextmenu",n),s.addEventListener("click",i=>{if(window.getSelection){const c=window.getSelection();c.removeAllRanges&&c.removeAllRanges()}})})};e.onMounted(()=>{if(e.nextTick(()=>{requestAnimationFrame(()=>{sl.value?il():ql(),D.value?Ll():cl()})}),e.nextTick(()=>{ea()}),A.richText&&h.value){try{document.execCommand("defaultParagraphSeparator",!1,"p")}catch{}document.addEventListener("click",$o),window.addEventListener("resize",ao);let a=null;const n=()=>{a===null&&(a=setTimeout(()=>{a=null,ao()},150))};window.addEventListener("scroll",n,!0),h.value._windowScrollHandler=n,h.value._windowScrollTimeout=a,h.value.closest(".editor-with-comments"),h.value.closest(".dss-text-editor-content-wrapper");const s=h.value.closest(".dss-text-editor-content");let i=null;const c=()=>{i===null&&(i=setTimeout(()=>{i=null,ao()},150))};s&&(s.addEventListener("scroll",c),h.value._scrollHandlers={wrapper:null,content:s,handler:c}),e.nextTick(()=>{Do(),so()}),h.value.addEventListener("click",p=>{const y=p.target;y.closest("a")&&!A.disabled&&p.preventDefault();const R=y.closest(".dss-image-no-alt-icon"),O=y.closest(".dss-image-wrapper");if(R||O&&y===O){p.preventDefault(),p.stopPropagation();const M=window.getSelection(),ue=document.createRange();ue.setStartAfter(O),ue.collapse(!0),M.removeAllRanges(),M.addRange(ue)}else O&&y.tagName!=="IMG"&&(p.preventDefault(),e.nextTick(()=>{const M=window.getSelection();if(M.rangeCount>0){const le=M.getRangeAt(0).commonAncestorContainer,We=le.nodeType===3?le.parentElement:le;if(O.contains(We)&&We!==O.querySelector("img")){const $e=document.createRange();$e.setStartAfter(O),$e.collapse(!0),M.removeAllRanges(),M.addRange($e)}}else{const ue=document.createRange();ue.setStartAfter(O),ue.collapse(!0),M.addRange(ue)}}))},!0),h.value.addEventListener("mousedown",p=>{const y=p.target,C=y.closest(".dss-image-no-alt-icon"),R=y.closest(".dss-image-wrapper");if(C||R&&y.tagName!=="IMG"){p.preventDefault();const O=window.getSelection(),M=document.createRange();R&&(M.setStartAfter(R),M.collapse(!0),O.removeAllRanges(),O.addRange(M))}},!0),h.value.addEventListener("paste",p=>{e.nextTick(()=>{if(!h.value)return;h.value.querySelectorAll("img").forEach(C=>{if(!C.closest(".dss-image-wrapper"))C.removeAttribute("alt"),C.removeAttribute("data-alt"),C.setAttribute("alt",""),C.setAttribute("data-alt",""),C.alt="";else{const O=C.getAttribute("alt")||C.alt||"";if(O){const M=C.getAttribute("src")||C.src||"",ue=M.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),le=O===M||O===ue;(O.startsWith("http://")||O.startsWith("https://")||O.startsWith("data:")||le||le)&&(C.setAttribute("alt",""),C.setAttribute("data-alt",""),C.alt="")}}}),Nl()})}),h.value.addEventListener("dragstart",p=>{const y=p.target,C=y.tagName==="IMG"?y:y.closest("img"),R=C?.closest(".dss-image-wrapper");C&&h.value.contains(C)&&(Vt.value=R||C,p.dataTransfer.effectAllowed="move",p.dataTransfer.setData("text/html","image-drag"))}),h.value.addEventListener("dragover",p=>{Vt.value&&(p.preventDefault(),p.stopPropagation(),p.dataTransfer.dropEffect="move")}),h.value.addEventListener("dragenter",p=>{Vt.value&&(p.preventDefault(),p.stopPropagation())}),h.value.addEventListener("drop",p=>{if(!Vt.value||!h.value)return;p.preventDefault(),p.stopPropagation();const y=Vt.value,C=y.classList?.contains("dss-image-wrapper"),R=C?y.querySelector("img"):y,O=C?y:R?.closest(".dss-image-wrapper");if(!R||!h.value.contains(R)){Vt.value=null;return}let M=null;const ue=p.clientX,le=p.clientY;if(document.caretRangeFromPoint)M=document.caretRangeFromPoint(ue,le);else{const nl=window.getSelection();nl.rangeCount>0?M=nl.getRangeAt(0).cloneRange():(M=document.createRange(),M.selectNodeContents(h.value),M.collapse(!1))}if(!M){Vt.value=null;return}const We=M.commonAncestorContainer,$e=We.nodeType===3?We.parentElement:We;if($e?.closest(".dss-image-wrapper")===O||O&&O.contains($e)){Vt.value=null;return}if(O&&($e===O||O.contains($e))){Vt.value=null;return}const Ut=R.getAttribute("src");let qt=null;O?qt=O.cloneNode(!0):qt=R.cloneNode(!0);try{let nl=M.startContainer;if(nl.nodeType===3&&(nl=nl.parentElement),O&&(nl===O||O.contains(nl))){const ol=document.createRange();ol.setStartAfter(O),ol.collapse(!0),M=ol}M.insertNode(qt);const gl=document.createRange();gl.setStartAfter(qt),gl.collapse(!0);const It=window.getSelection();It.removeAllRanges(),It.addRange(gl)}catch{if(h.value.childNodes.length===0){const gl=document.createElement("p");gl.appendChild(qt),h.value.appendChild(gl)}else{const gl=h.value.lastChild;if(gl&&gl.nodeType===1)gl.appendChild(qt);else{const It=document.createElement("p");It.appendChild(qt),h.value.appendChild(It)}}}O?O.remove():R.remove(),Vt.value=null,e.nextTick(()=>{const nl=h.value.querySelectorAll("img");let gl=!1;nl.forEach(It=>{if(It.getAttribute("src")===Ut)if(!gl)gl=!0;else{const ol=It.closest(".dss-image-wrapper");ol?ol.remove():It.remove()}}),Nl(),wt()})}),h.value.addEventListener("dragend",p=>{Vt.value=null});let d=null;const u=new MutationObserver(p=>{p.forEach(y=>{y.addedNodes.forEach(C=>{if(C.nodeType===1){C.tagName==="IMG"&&(C.removeAttribute("alt"),C.removeAttribute("data-alt"),C.setAttribute("alt",""),C.setAttribute("data-alt",""),C.alt="");const R=C.querySelectorAll&&C.querySelectorAll("img");R&&R.forEach(O=>{O.removeAttribute("alt"),O.removeAttribute("data-alt"),O.setAttribute("alt",""),O.setAttribute("data-alt",""),O.alt=""})}})}),d&&clearTimeout(d),d=setTimeout(()=>{Nl(),so(),d=null},100)});if(u.observe(h.value,{childList:!0,subtree:!0}),e.nextTick(()=>{const p=document.querySelector(".dss-text-editor-toolbar");if(p){const y=new MutationObserver(()=>{e.nextTick(()=>{so()})});y.observe(p,{childList:!0,subtree:!0}),p._toolbarMutationObserver=y}}),A.modelValue){const p=Sl(A.modelValue);h.value.innerHTML=p,hn()}e.nextTick(()=>{const p=h.value.innerHTML||"",y=A.title||"",C=A.description||"";bt.value=p,re.value=y,X.value=C,te.value=y,ce.value=C,j(),Nl(),Dl(),xn(),uo(),fl()}),ul(),Il(),h.value._mutationObserver=u}}),e.onUnmounted(()=>{if(document.removeEventListener("click",$o),window.removeEventListener("resize",ao),h.value&&h.value._windowScrollHandler&&window.removeEventListener("scroll",h.value._windowScrollHandler,!0),Wn!==null&&(clearTimeout(Wn),Wn=null),h.value&&h.value._windowScrollTimeout!==null&&clearTimeout(h.value._windowScrollTimeout),Se.value&&clearTimeout(Se.value),Fe.value&&clearTimeout(Fe.value),h.value&&h.value._mutationObserver&&h.value._mutationObserver.disconnect(),je.value&&je.value.disconnect(),St.value!==null&&(cancelAnimationFrame(St.value),St.value=null),ut.value!==null&&(clearTimeout(ut.value),ut.value=null),vt.value!==null&&(clearTimeout(vt.value),vt.value=null),Ln(!0),h.value&&h.value._scrollHandlers){const{wrapper:n,content:s,handler:i}=h.value._scrollHandlers;n&&n.removeEventListener("scroll",i),s&&s.removeEventListener("scroll",i)}const a=document.querySelector(".dss-text-editor-toolbar");a&&a._toolbarMutationObserver&&a._toolbarMutationObserver.disconnect()});const ta=a=>{const n=a.target,s=n.closest("a");if(s&&!A.disabled){a.preventDefault();const c=document.createRange();c.selectNodeContents(s);const d=window.getSelection();d.removeAllRanges(),d.addRange(c)}const i=n.closest(".dss-image-wrapper");i&&n.tagName!=="IMG"?e.nextTick(()=>{const c=window.getSelection();if(c.rangeCount>0){const u=c.getRangeAt(0).commonAncestorContainer,p=u.nodeType===3?u.parentElement:u;if(i.contains(p)&&p!==i.querySelector("img")){const y=document.createRange();y.setStartAfter(i),y.collapse(!0),c.removeAllRanges(),c.addRange(y)}}Nl(),ul(),Il(),pl(),xn()}):e.nextTick(()=>{Nl(),ul(),Il(),pl(),xn()})},Co=()=>{Vl();const a=window.getSelection();if(a&&a.rangeCount>0){const s=a.getRangeAt(0);ae.value=!s.collapsed&&_n(s),!s.collapsed&&V.value&&(V.value=null)}else ae.value=!1;if(Nl(),ul(),Il(),pl(),xn(),a&&a.rangeCount>0){const i=a.getRangeAt(0).commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;if(c&&c.closest(".dss-text-editor-footer")){a.removeAllRanges(),ae.value=!1;return}}["bold","italic","underline"].forEach(s=>{try{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0);if(!c.collapsed)if(s==="bold"){const d=c.commonAncestorContainer,u=d.nodeType===3?d.parentElement:d;let p=!1;if(u&&((u.tagName==="STRONG"||u.tagName==="B"||u.closest&&u.closest("strong, b"))&&(p=!0),!p&&u.style&&parseInt(u.style.fontWeight)>=600&&(p=!0),!p))try{const y=window.getComputedStyle(u);parseInt(y.fontWeight)>=600&&(p=!0)}catch{}ke.value[s]=p}else{const d=document.queryCommandState(s);ke.value[s]=d}}}catch{}})},xn=()=>{if(!A.richText||A.disabled||!h.value){B.value="p";return}try{const a=window.getSelection();if(!a||a.rangeCount===0){B.value="p";return}const s=a.getRangeAt(0).commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(!i||!h.value.contains(i)){B.value="p";return}const c=i.closest("h1, h2, h3, h4, h5, h6, p");if(!c){B.value="p";return}const d=c.tagName.toLowerCase();["h1","h2","h3","h4","h5","h6","p"].includes(d)?B.value=d:B.value="p"}catch{B.value="p"}},Il=()=>{if(!h.value){Ke.value=!1;return}try{const a=window.getSelection();let n=!1;if(a.rangeCount>0){const i=a.getRangeAt(0).commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");n=!!(c&&h.value.contains(c))}Ke.value=n}catch{Ke.value=!1}},_n=a=>{if(!a||!h.value)return!1;const n=a.commonAncestorContainer;if(!n)return!1;const s=n.nodeType===3?n.parentElement:n;return s?h.value.contains(s):!1},Jn=()=>{Me.value=!1},pl=()=>{if(!A.floatingToolbar||!A.richText||A.disabled){Me.value=!1;return}const a=window.getSelection();if(!a||a.rangeCount===0){Me.value=!1;return}const n=a.getRangeAt(0);if(n.collapsed||!_n(n)){Me.value=!1;return}const s=n.getBoundingClientRect();if(!s||s.width===0&&s.height===0){Me.value=!1;return}const i=h.value;if(!i){Me.value=!1;return}const c=i.getBoundingClientRect();if(!c||c.width===0){Me.value=!1;return}const d=40,u=8,p=s.top-d/2+15;let y=s.left+s.width/2;const C=window.innerWidth||document.documentElement.clientWidth||0;let R=0;yt.value&&(R=yt.value.getBoundingClientRect().width);const O=(R||320)/2;let M=c.left+O,ue=c.right-O;if(ue<M){const le=c.left+c.width/2;M=le,ue=le}if(C>0){const le=O+u,We=C-O-u;if(M=Math.max(M,le),ue=Math.min(ue,We),ue<M){const $e=C/2;M=$e,ue=$e}}y<M?y=M:y>ue&&(y=ue),rt.value={position:"fixed",top:`${Math.max(p,8)}px`,left:`${y}px`,transform:"translate(-50%, -100%)",zIndex:10003},Me.value=!0},bo=a=>{A.disabled||!A.richText||(mt.value=mt.value===a?null:a,a==="askAi"&&(we.value=null))},Ao=()=>{mt.value=null,fe.value=null},Jl=a=>{_l(a),Ao()};let En=null,Yl=null,Mn=null,qn=null;const la=a=>{if(A.disabled||!A.richText){eo(),to();return}const n=a.target,s=n.closest("a"),i=n.closest("img");if(En&&(clearTimeout(En),En=null),Mn&&(clearTimeout(Mn),Mn=null),s&&s!==Yl){to(),Yl=s;let c=s.getAttribute("href")||"";(!c||c==="#"||c==="")&&(c=s.textContent||""),Xe.value=s,he.value=c,K.value=!0,ge.value=!0,Ho(s)}else!s&&Yl?(Yl=null,En=setTimeout(()=>{ge.value||eo()},150)):s&&s===Yl&&Ho(s);if(i&&i!==qn){eo(),qn=i;let c=i.getAttribute("alt");c===null&&(c=i.alt||"");let d=i.getAttribute("data-alt");d===null&&(d=c),i.hasAttribute("alt")||i.setAttribute("alt",c),i.hasAttribute("data-alt")||i.setAttribute("data-alt",d),pt.value=i,Pt.value=c.trim()||L("textEditor.image.noAlt"),Ct.value=!0,H.value=!0,wo(i)}else!i&&qn?(qn=null,Mn=setTimeout(()=>{H.value||to()},150)):i&&i===qn&&wo(i)},na=a=>{const n=a.relatedTarget;(!n||!n.closest(".dss-text-editor-content")&&!n.closest(".dss-link-popup"))&&(Yl=null,qn=null,En&&(clearTimeout(En),En=null),Mn&&(clearTimeout(Mn),Mn=null),eo(),to())},eo=()=>{ge.value=!1,setTimeout(()=>{ge.value||(K.value=!1,he.value="",Ae.value||(Xe.value=null))},100)},Ho=a=>{if(!a||!h.value)return;const n=a.getBoundingClientRect(),c=n.top-32-8,d=n.left+n.width/2;Re.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},to=()=>{H.value=!1,setTimeout(()=>{H.value||(Ct.value=!1,Pt.value="",Qt.value||(pt.value=null))},100)},wo=a=>{if(!a||!h.value)return;const n=a.getBoundingClientRect(),c=n.top-32-8,d=n.left+n.width/2;pe.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},xo=()=>{if(!he.value||!Xe.value)return;let n=Xe.value.getAttribute("href")||he.value;!n.startsWith("http://")&&!n.startsWith("https://")&&!n.startsWith("mailto:")&&(n="https://"+n),window.open(n,"_blank","noopener,noreferrer")},Ro=()=>{if(Xe.value){const a=Xe.value.textContent||"",n=Xe.value.getAttribute("href")||"",s=Xe.value;Z.value=n,ze.value=a,He.value=a,ge.value=!1,K.value=!1,he.value="",Xe.value=s,Ae.value=!0}else if(ye.value){const a=window.getSelection();if(a.rangeCount>0){const s=a.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");if(i){const c=i.textContent||"",d=i.getAttribute("href")||"";Z.value=d,ze.value=c,He.value=c,Xe.value=i,Ae.value=!0}}}else{U.value=Kt();const a=window.getSelection();let n="";a.rangeCount>0&&(n=a.getRangeAt(0).toString()),Z.value="",ze.value=n,He.value="",Xe.value=null,Ae.value=!0}e.nextTick(()=>{Ye.value&&(Ye.value.focus(),Ye.value.select())})},ro=()=>{Ae.value=!1,Z.value="",ze.value="",He.value="",Xe.value=null,U.value=null},Eo=()=>{if(!Z.value.trim()){ro();return}if(ot.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Tt(),ot.value=!1):Tt(),ze.value.trim()||(ze.value=Z.value.trim()),Xe.value&&h.value&&h.value.contains(Xe.value)){const a=window.getSelection();a.rangeCount>0&&a.removeAllRanges();const n=Xe.value;if(n.setAttribute("href",Z.value.trim()),ze.value.trim()!==He.value.trim()){for(;n.firstChild;)n.removeChild(n.firstChild);n.textContent=ze.value.trim()}n.style.color="#60afdf",n.style.textDecoration="underline";const s=document.createRange();s.selectNodeContents(n),s.collapse(!1),a.removeAllRanges(),a.addRange(s),wt()}else if(h.value){h.value.focus();const a=window.getSelection();a.removeAllRanges(),U.value&&Yt(U.value);let n=null;if(a.rangeCount>0&&(n=a.getRangeAt(0)),n&&!n.collapsed){n.toString();const s=document.createElement("a");s.href=Z.value.trim(),s.textContent=ze.value.trim(),s.style.color="#60afdf",s.style.textDecoration="underline",n.deleteContents(),n.insertNode(s);const i=document.createTextNode(" ");n.setStartAfter(s),n.insertNode(i),n.setStartAfter(i),n.collapse(!0),a.removeAllRanges(),a.addRange(n)}else{n||(n=document.createRange(),n.selectNodeContents(h.value),n.collapse(!1));const s=n.startContainer,i=s.nodeType===3,c=i&&n.startOffset===s.textContent.length,d=document.createElement("a");if(d.href=Z.value.trim(),d.textContent=ze.value.trim(),d.style.color="#60afdf",d.style.textDecoration="underline",c){let u=s.parentElement;for(;u&&u!==h.value&&!["P","DIV","H1","H2","H3","H4","H5","H6"].includes(u.tagName);)u=u.parentElement;if(u&&u!==h.value){let p=u.nextElementSibling;if(p&&(p.innerHTML==="<br>"||p.innerHTML==="<br/>"||p.textContent.trim()==="")){p.textContent="",p.appendChild(d);const y=document.createTextNode(" ");p.appendChild(y);const C=document.createRange();C.setStartAfter(d),C.collapse(!0),a.removeAllRanges(),a.addRange(C)}else{if(n.startOffset>0){const C=s.textContent.substring(0,n.startOffset),R=C[C.length-1];if(R&&R!==" "&&R!==" "&&R!==`
104
- `){const O=document.createTextNode(" ");n.insertNode(O),n.setStartAfter(O)}}n.insertNode(d);const y=document.createTextNode(" ");n.setStartAfter(d),n.insertNode(y),n.setStartAfter(y),n.collapse(!0),a.removeAllRanges(),a.addRange(n)}}}else{if(i&&n.startOffset>0){const p=s.textContent.substring(0,n.startOffset),y=p[p.length-1];if(y&&y!==" "&&y!==" "&&y!==`
105
- `){const C=document.createTextNode(" ");n.insertNode(C),n.setStartAfter(C)}}n.insertNode(d);const u=document.createTextNode(" ");n.setStartAfter(d),n.insertNode(u),n.setStartAfter(u),n.collapse(!0),a.removeAllRanges(),a.addRange(n)}}wt()}e.nextTick(()=>{ul(),ro()})},lo=()=>{if(!h.value||Q.value)return;const a=window.getSelection();let n=null;a&&a.rangeCount>0&&(n=Kt());const s=/(https?:\/\/[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|(www\.[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.([a-zA-Z]{2,})(\/[^\s<>"{}|\\^`\[\]]*)?)/gi,i=document.createTreeWalker(h.value,NodeFilter.SHOW_TEXT,{acceptNode:p=>{const y=p.parentElement;return!y||y.closest("a")||y.closest(".dss-image-wrapper")||!p.textContent||p.textContent.trim()===""?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),c=[];let d;for(;d=i.nextNode();)c.push(d);let u=!1;for(let p=c.length-1;p>=0;p--){const y=c[p],C=y.textContent;s.lastIndex=0;const R=[...C.matchAll(s)];if(R.length===0)continue;const O=R.filter(le=>{const We=le[0],$e=le.index;if($e>0&&C[$e-1]==="@"||$e+We.length<C.length&&C[$e+We.length]==="@")return!1;const gt=y.parentElement;return!(gt&&gt.closest("a"))});if(O.length===0)continue;if(O.length===1&&O[0][0]===C.trim()){const le=O[0][0],We=le.startsWith("http://")||le.startsWith("https://")?le:`https://${le}`,$e=document.createElement("a");$e.href=We,$e.textContent=le,$e.style.color="#60afdf",$e.style.textDecoration="underline",y.parentNode&&(y.parentNode.replaceChild($e,y),u=!0);continue}let M=0;const ue=document.createDocumentFragment();if(O.forEach(le=>{const We=le.index,$e=le[0];if(We>M){const qt=C.substring(M,We);qt&&ue.appendChild(document.createTextNode(qt))}const gt=$e.startsWith("http://")||$e.startsWith("https://")?$e:`https://${$e}`,Ut=document.createElement("a");Ut.href=gt,Ut.textContent=$e,Ut.style.color="#60afdf",Ut.style.textDecoration="underline",ue.appendChild(Ut),M=We+$e.length}),M<C.length){const le=C.substring(M);le&&ue.appendChild(document.createTextNode(le))}y.parentNode&&ue.childNodes.length>0&&(y.parentNode.replaceChild(ue,y),u=!0)}u&&n&&e.nextTick(()=>{Yt(n),ul()})},oa=()=>{if(!h.value)return;const a=/<u>([\s\S]*?)<\/u>|<ins>([\s\S]*?)<\/ins>/gi,n=document.createTreeWalker(h.value,NodeFilter.SHOW_TEXT,{acceptNode:c=>{const d=c.parentElement;return!d||d.closest("a, code, pre, u, ins")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),s=[];let i;for(;i=n.nextNode();)s.push(i);for(let c=s.length-1;c>=0;c--){const d=s[c],u=d.textContent,p=[...u.matchAll(a)];if(p.length===0)continue;let y=0;const C=document.createDocumentFragment();p.forEach(R=>{const O=R.index,M=R[0].startsWith("<u>")?"u":"ins",ue=R[1]||R[2]||"";O>y&&C.appendChild(document.createTextNode(u.substring(y,O)));const le=document.createElement(M);le.textContent=ue,C.appendChild(le),y=O+R[0].length}),y<u.length&&C.appendChild(document.createTextNode(u.substring(y))),d.parentNode&&C.childNodes.length>0&&d.parentNode.replaceChild(C,d)}},io=a=>{if(!h.value||Q.value)return;if(!a){oa();return}if(!["*","_",">"].includes(a))return;const s=window.getSelection();if(!s||s.rangeCount===0)return;const i=s.getRangeAt(0);if(!i.collapsed)return;const c=i.startContainer.nodeType===Node.TEXT_NODE?i.startContainer.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div"):i.startContainer.closest?.("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div");if(!c||c===h.value||!h.value.contains(c))return;const d=()=>{let qt="",nl=0,gl=!1;const It=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:rn=>rn.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});document.createTreeWalker(c,NodeFilter.SHOW_TEXT,null);let ol=0;for(;It.nextNode();){const rn=It.currentNode,kn=rn.textContent||"",Ol=ol;if(ol+=kn.length,rn===i.startContainer){qt+=kn.substring(0,i.startOffset),nl=Ol+i.startOffset,gl=!0;break}qt+=kn}return gl||(nl=qt.length),{textBeforeCursor:qt,cursorCharOffset:nl}},{textBeforeCursor:u}=d();if(!u.length)return;let p=null,y=null;if(u.endsWith("**")&&(p=u.match(/\*\*(.+?)\*\*$/s))||u.endsWith("__")&&(p=u.match(/__(.+?)__$/s))?y="strong":u.endsWith("*")&&!u.endsWith("**")&&(p=u.match(new RegExp("(?<!\\*)\\*([^*]+)\\*$")))||u.endsWith("_")&&!u.endsWith("__")&&(p=u.match(new RegExp("(?<!_)_([^_]+)_$")))?y="em":a===">"&&((p=u.match(/<u>(.+?)<\/u>$/s))||(p=u.match(/<ins>(.+?)<\/ins>$/s)))&&(y=p[0].startsWith("<u>")?"u":"ins",p[0].startsWith("<u>"),p[0].startsWith("<u>")),!p||!p[1])return;const C=p[0],R=p[1],O=u.length-C.length,ue=(qt=>{let nl=0;const gl=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:ol=>ol.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let It;for(;It=gl.nextNode();){const ol=(It.textContent||"").length;if(nl+ol>=qt)return{node:It,offset:qt-nl};nl+=ol}return null})(O);if(!ue)return;const le=document.createRange();le.setStart(ue.node,ue.offset),le.setEnd(i.endContainer,i.endOffset);const We=document.createElement(y);We.textContent=R,le.deleteContents(),le.insertNode(We);const $e=window.getSelection(),gt=document.createRange();gt.setStartAfter(We),gt.collapse(!0),$e.removeAllRanges(),$e.addRange(gt);const Ut=Kt();e.nextTick(()=>{wt(),Ut&&Yt(Ut)})},Ml=()=>{h.value&&(Xt.value=Kt(),xe.value="",et.value="",ie.value="",lt.value="",kt.value="",Jt.value=null,pt.value=null,Y.value="upload",Qt.value=!0,tl(),e.nextTick(()=>{Rt.value&&Rt.value.focus(),ct.value&&(ct.value.value="")}))},P=a=>{const n=a.target?.files?.[0];if(!n){Jt.value=null,et.value="";return}Jt.value=n;const s=new FileReader;s.onload=i=>{et.value=i.target?.result||""},s.readAsDataURL(n)},$l=()=>{ct.value&&ct.value.click()},Xl=()=>{lt.value&&(kt.value="")},Zn=()=>{kt.value&&(lt.value="")},xl=()=>{let a=pt.value;if(!a){const n=window.getSelection();if(n&&n.rangeCount>0){const i=n.getRangeAt(0).commonAncestorContainer;a=i.nodeType===1?i.closest("img"):i.parentElement?.closest("img")}}if(a){const n=a.getAttribute("data-alt")||a.getAttribute("alt")||"";pt.value=a,xe.value=n.trim()===""||n.trim()==="Image"?"":n;const s=a.getAttribute("src")||a.src||"";s.startsWith("http://")||s.startsWith("https://")?(ie.value=s,et.value="",Y.value="url"):(et.value=s,ie.value="",Y.value="upload");const c=a.style.width||a.getAttribute("width")||"",d=a.style.height||a.getAttribute("height")||"";lt.value=c.endsWith("px")?c.replace("px",""):c,kt.value=d.endsWith("px")?d.replace("px",""):d,Xt.value=null}else{Ml();return}Qt.value=!0,H.value=!1,Ct.value=!1,e.nextTick(()=>{Y.value==="url"&&ht.value?(ht.value.focus(),ht.value.select()):Rt.value&&(Rt.value.focus(),Rt.value.select()),ct.value&&(ct.value.value="")})},vl=()=>{Qt.value=!1,xe.value="",et.value="",ie.value="",lt.value="",kt.value="",Jt.value=null,pt.value=null,Xt.value=null,Y.value="upload"},Ot=()=>{const a=(xe.value||"").trim(),n=h.value?._mutationObserver;n&&n.disconnect(),ot.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Tt(),ot.value=!1):Tt();const s=Y.value==="url"?ie.value.trim():et.value;if(pt.value&&h.value&&h.value.contains(pt.value)){s&&(pt.value.src=s),pt.value.setAttribute("alt",a),pt.value.setAttribute("data-alt",a),lt.value?(pt.value.style.width=`${lt.value}px`,pt.value.setAttribute("width",lt.value)):(pt.value.style.removeProperty("width"),pt.value.removeAttribute("width")),kt.value?(pt.value.style.height=`${kt.value}px`,pt.value.setAttribute("height",kt.value)):(pt.value.style.removeProperty("height"),pt.value.removeAttribute("height"));const i=window.getSelection();if(i){i.removeAllRanges();const c=document.createRange();c.setStartAfter(pt.value),c.collapse(!0),i.addRange(c)}wt()}else{if(!s){n&&h.value&&n.observe(h.value,{childList:!0,subtree:!0}),vl();return}if(h.value){h.value.focus();const i=window.getSelection();i&&i.rangeCount>0&&i.removeAllRanges();const c=window.getSelection();let d=null;if(Xt.value&&(Yt(Xt.value),c&&c.rangeCount>0&&(d=c.getRangeAt(0))),!d&&c&&c.rangeCount>0&&(d=c.getRangeAt(0)),!d&&h.value){if(d=document.createRange(),h.value.childNodes.length===0){const C=document.createElement("p");C.innerHTML="<br>",h.value.appendChild(C),d.setStart(C,0),d.collapse(!0)}else d.selectNodeContents(h.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}if(!d){vl();return}const u=d.commonAncestorContainer,p=u.nodeType===3?u.parentElement:u;if(!h.value.contains(p)){if(d=document.createRange(),h.value.childNodes.length===0){const C=document.createElement("p");C.innerHTML="<br>",h.value.appendChild(C),d.setStart(C,0),d.collapse(!0)}else d.selectNodeContents(h.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}const y=document.createElement("img");y.src=s,y.setAttribute("alt",a),y.setAttribute("data-alt",a),lt.value&&(y.style.width=`${lt.value}px`,y.setAttribute("width",lt.value)),kt.value&&(y.style.height=`${kt.value}px`,y.setAttribute("height",kt.value));try{d.insertNode(y),d.setStartAfter(y),d.collapse(!0),c&&(c.removeAllRanges(),c.addRange(d))}catch{if(h.value){if(h.value.childNodes.length===0){const O=document.createElement("p");h.value.appendChild(O),O.appendChild(y)}else{const O=h.value.lastChild;if(O&&O.nodeType===1)O.appendChild(y);else{const M=document.createElement("p");h.value.appendChild(M),M.appendChild(y)}}const R=document.createRange();R.setStartAfter(y),R.collapse(!0),c&&(c.removeAllRanges(),c.addRange(R))}}pt.value=y,wt()}}e.nextTick(()=>{n&&h.value&&n.observe(h.value,{childList:!0,subtree:!0}),ul(),pl(),vl()})};e.watch(()=>A.modelValue,a=>{if(A.richText&&h.value&&!Q.value){const n=Sl(a||""),i=h.value.innerHTML.replace(/&nbsp;|\u00A0/g," "),c=n.replace(/&nbsp;|\u00A0/g," ");if(i!==c){const d=Kt();h.value.innerHTML=n,e.nextTick(()=>{hn();const u=h.value.innerHTML||"",p=A.title||"",y=A.description||"";bt.value=u,re.value=p,X.value=y,el.value=u,te.value=p,ce.value=y,tt.value=[],Et.value=[],Se.value&&(clearTimeout(Se.value),Se.value=null),ot.value=!1,d&&Yt(d),j(),Nl(),Dl(),ul(),pl(),xn(),it("watch-modelValue")})}}},{immediate:!0}),e.watch(()=>A.richText,a=>{a?(pl(),e.nextTick(()=>{uo()})):(Jn(),se.value=[],je.value&&(je.value.disconnect(),je.value=null)),xn()}),e.watch(()=>A.floatingToolbar,a=>{a?pl():Jn()}),e.watch(()=>A.disabled,a=>{a&&Jn(),xn()}),e.watch(()=>A.description,()=>{e.nextTick(()=>{D.value?Ll():cl()})}),e.watch(()=>A.title,()=>{e.nextTick(()=>{sl.value?il():ql()})}),e.watch(()=>A.customToolbarSlots,()=>{e.nextTick(()=>{so()})},{deep:!0}),e.watch(()=>A.comments,(a,n)=>{if(A.commentUser){if(Te.value){Te.value=!1;return}Ft.value||A.richText&&h.value&&e.nextTick(()=>{fl()})}},{deep:!0,immediate:!1});const fl=()=>{if(A.commentUser&&!Ft.value&&!(!A.comments||!Array.isArray(A.comments)||A.comments.length===0)&&!(!A.richText||!h.value)){Ft.value=!0;try{const a=new Set,n=A.comments.filter(u=>{const p=String(u.conversation_id||u.id);return a.has(p)?!1:(a.add(p),!0)}),s=h.value.querySelectorAll("[data-comment], [data-fake-comment]"),i=s.length;s.forEach(u=>{const p=u.parentNode;if(p){for(;u.firstChild;)p.insertBefore(u.firstChild,u);p.removeChild(u)}});let c=0;const d=new Set;n.forEach(u=>{if(!u.conversation_id||!u.selection_range)return;const p=typeof u.conversation_id=="string"&&u.conversation_id.startsWith("comment-")?null:Number(u.conversation_id)||u.conversation_id;if(!p)return;const y=String(p);if(d.has(y))return;const C=h.value.querySelector(`[data-comment="${y}"]`);if(C){At(C,u),d.add(y);return}try{const R=Wt(u.selection_range,u.selection_text);if(R&&!R.collapsed){const O=R.commonAncestorContainer,M=O.nodeType===3?O.parentElement:O;if(M){const We=M.closest("[data-comment], [data-fake-comment]");if(We){const $e=We.getAttribute("data-comment")||We.getAttribute("data-fake-comment");if(String($e)===String(p)){We.setAttribute("data-comment",y),We.removeAttribute("data-fake-comment"),At(We,u),d.add(y);return}else return}}const ue=h.value.querySelector(`[data-comment="${y}"]`);if(ue){At(ue,u),d.add(y);return}const le=document.createElement("span");le.setAttribute("data-comment",y),At(le,u);try{R.surroundContents(le),c++,d.add(y)}catch{try{const $e=document.createRange();$e.setStart(R.startContainer,R.startOffset),$e.setEnd(R.endContainer,R.endOffset),hl($e),$e.surroundContents(le),c++,d.add(y)}catch{try{const gt=R.extractContents();le.appendChild(gt),R.insertNode(le),c++,d.add(y)}catch(gt){console.warn("Failed to create comment marker:",gt)}}}}}catch{}}),e.nextTick(()=>{it("restoreCommentsFromModel"),wt(),Ft.value=!1})}catch{Ft.value=!1}}},hl=a=>{if(!a||!h.value)return a;try{const n=["P","DIV","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"];let s=a.startContainer,i=a.startOffset;if(s.nodeType===3){const u=s.parentElement;u&&n.includes(u.tagName)&&(i===0&&!Sn(s)||a.setStartBefore(u))}else s.nodeType===1&&n.includes(s.tagName)&&i>0&&a.setStartBefore(s);let c=a.endContainer,d=a.endOffset;if(c.nodeType===3){const u=c.parentElement;u&&n.includes(u.tagName)&&(d===c.length&&!$n(c)||a.setEndAfter(u))}else c.nodeType===1&&n.includes(c.tagName)&&d<c.childNodes.length&&a.setEndAfter(c);return a}catch{return a}},Sn=a=>{let n=a.previousSibling;for(;n;){if(n.nodeType===3&&n.textContent.trim().length>0||n.nodeType===1&&n.textContent.trim().length>0)return!0;n=n.previousSibling}return!1},$n=a=>{let n=a.nextSibling;for(;n;){if(n.nodeType===3&&n.textContent.trim().length>0||n.nodeType===1&&n.textContent.trim().length>0)return!0;n=n.nextSibling}return!1},Wt=(a,n)=>{if(!a||!h.value)return null;try{const s=document.createRange();if(a.type==="text"&&typeof a.start=="number"&&typeof a.end=="number"){let i=0;const c=[h.value];let d=null,u=!1,p=!1;for(;!p&&(d=c.pop());)if(d.nodeType===3){const y=i+d.length;!u&&a.start>=i&&a.start<=y&&(s.setStart(d,a.start-i),u=!0),u&&a.end>=i&&a.end<=y&&(s.setEnd(d,a.end-i),p=!0),i=y}else{let y=d.childNodes.length;for(;y--;)c.push(d.childNodes[y])}return u?hl(s):null}}catch{return null}return null},At=(a,n)=>{if(!a||!n)return;const s=n.conversation||[],i=new Set,c=[],d=p=>{p&&p.id&&!i.has(p.id)&&(i.add(p.id),c.push(p))};s.length>0&&s.forEach(p=>{p.user&&d(p.user)}),c.length>0?a.setAttribute("data-comment-user",JSON.stringify(c[0])):a.removeAttribute("data-comment-user"),c.length>1?a.setAttribute("data-comment-user-2",JSON.stringify(c[1])):a.removeAttribute("data-comment-user-2");const u=s.length;u>0?a.setAttribute("data-comment-count",String(u)):a.removeAttribute("data-comment-count")},it=(a="unknown")=>{if(!A.commentUser||!A.richText||!h.value){se.value=[];return}Date.now()-_t.value<Nt&&St.value!==null||St.value===null&&(St.value=requestAnimationFrame(()=>{if(St.value=null,_t.value=Date.now(),Ge.value)return;Ge.value=!0;const s={},i=h.value;if(!i){Ge.value=!1;return}const c=i.closest(".editor-with-comments");if(!c){Ge.value=!1;return}const d=i.querySelectorAll("[data-comment], [data-fake-comment]"),u=[],p=new Set;d.forEach(M=>{const ue=M.getAttribute("data-comment")||M.getAttribute("data-fake-comment");ue&&M.tagName==="SPAN"&&(p.has(ue)||(u.push(M),p.add(ue)))}),d.forEach(M=>{const ue=M.getAttribute("data-comment")||M.getAttribute("data-fake-comment");!ue||p.has(ue)||(["P","DIV","H1","H2","H3","H4","H5","H6"].includes(M.tagName)?M.querySelector(`span[data-comment="${ue}"], span[data-fake-comment="${ue}"]`)||(u.push(M),p.add(ue)):M.tagName!=="SPAN"&&(u.push(M),p.add(ue)))});const y=c.getBoundingClientRect(),C=i.getBoundingClientRect();u.forEach((M,ue)=>{let le=M.getAttribute("data-comment")||M.getAttribute("data-fake-comment");if(!le)return;if(typeof le=="string"&&le.startsWith("comment-")){const cn=M.textContent?.trim(),Bt=A.comments?.find(en=>(typeof en.conversation_id=="string"&&en.conversation_id.startsWith("comment-")?null:en.conversation_id)&&en.selection_text?.trim()===cn);Bt?(le=String(Bt.conversation_id),M.setAttribute("data-comment",le),M.removeAttribute("data-fake-comment")):(le=String(Date.now()),M.setAttribute("data-comment",le),M.removeAttribute("data-fake-comment"))}const We=M.getBoundingClientRect(),$e=window.getComputedStyle(M),gt=parseFloat($e.lineHeight)||parseFloat($e.fontSize)*1.2,nl=We.top-C.top+gt/2-15,It=C.top-y.top+nl;let ol=null,rn=null,kn=0;const Ol=[],So=new Set;if(le&&A.comments){const cn=A.comments.find(Bt=>String(Bt.conversation_id||Bt.id)===String(le));if(cn){const Bt=cn.conversation||[];Bt.length>0?(Bt.forEach(en=>{en.user&&en.user.id&&!So.has(en.user.id)&&(So.add(en.user.id),Ol.push(en.user))}),kn=Bt.length):(kn=0,ol=null,rn=null),Ol.length>0?ol=Ol[0]:ol=null,Ol.length>1?rn=Ol[1]:rn=null}}const Vo=We.top+gt/2-15,Tn=Vo+30,No=5,Fo=Tn>C.top+No&&Vo<C.bottom-No?1:0;se.value.find(cn=>cn.id===le);let Dn=M;if(!Dn&&le&&h.value){const cn=String(le);Dn=h.value.querySelector(`[data-comment="${cn}"], [data-fake-comment="${cn}"]`)}const Al=Ol.length;s[le]?(s[le].top=It,s[le].opacity=Fo,s[le].element=Dn,s[le].firstUser=ol,s[le].secondUser=rn,s[le].totalCount=kn,s[le].uniqueUserCount=Al):s[le]={id:le,top:It,opacity:Fo,element:Dn,firstUser:ol,secondUser:rn,totalCount:kn,uniqueUserCount:Al}});const R=Object.values(s).map(M=>{const ue=Math.max(0,(M.uniqueUserCount??0)-2);if(!M.element&&M.id&&h.value){const We=String(M.id);M.element=h.value.querySelector(`[data-comment="${We}"], [data-fake-comment="${We}"]`)}return{...M,firstUser:M.firstUser||null,secondUser:M.secondUser||null,totalCount:M.totalCount,additionalCount:ue}});(se.value.length!==R.length||R.some((M,ue)=>{const le=se.value[ue];if(!le)return!0;const We=(le.firstUser?.id||null)!==(M.firstUser?.id||null),$e=(le.secondUser?.id||null)!==(M.secondUser?.id||null);return le.id!==M.id||Math.abs(le.top-M.top)>1||le.opacity!==M.opacity||le.totalCount!==M.totalCount||le.additionalCount!==M.additionalCount||We||$e||le.element!==M.element}))&&(se.value=R),Ge.value=!1}))},kl=a=>{if(!a)return;let n=a.element;if(!n&&a.id&&h.value){const s=String(a.id);n=h.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`)}n&&(Ln(),at.value=n,n.classList.add("editor-comment-highlighted"))},Ln=(a=!1)=>{!a&&Ie.value!==null&&at.value&&(at.value.getAttribute("data-comment")||at.value.getAttribute("data-fake-comment"))===Ie.value||(h.value&&h.value.querySelectorAll(".editor-comment-highlighted").forEach(s=>{s.classList.remove("editor-comment-highlighted")}),at.value&&(at.value.classList.remove("editor-comment-highlighted"),at.value=null))},co=a=>{if(!a||!a.element)return;Ln(!0);const n=a.element.getAttribute("data-comment")||a.element.getAttribute("data-fake-comment");if(!n)return;const s=`[data-comment="${n}"], [data-fake-comment="${n}"]`;de("comment-marker-clicked",{commentId:n,selector:s,element:a.element})},no=()=>{Ln()},uo=()=>{!A.richText||!h.value||(je.value&&je.value.disconnect(),vt.value!==null&&(clearTimeout(vt.value),vt.value=null),je.value=new MutationObserver(()=>{vt.value===null&&(vt.value=setTimeout(()=>{vt.value=null,e.nextTick(()=>{it("MutationObserver")})},200))}),je.value.observe(h.value,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-comment","data-fake-comment","data-comment-user","data-comment-user-2","data-comment-count"]}),it("setupCommentMarkersObserver-initial"))},Vn=(a,n)=>{if(!a||!n)return;const s=n.getBoundingClientRect();let i=s.top,c=s.right+4;a.style.top=`${i}px`,a.style.left=`${c}px`,a.offsetHeight;const d=a.getBoundingClientRect(),u=window.innerWidth,p=window.innerHeight;if(d.right>u){const y=s.left-d.width-4;a.style.left=`${y}px`}if(d.bottom>p){const y=Math.max(8,p-d.height-8);a.style.top=`${y}px`}d.top<0&&(a.style.top="8px")};return e.watch(()=>fe.value,a=>{e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(s=>{const i=s.getAttribute("data-submenu-id");if(i===a&&a){const c=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${i}"]`);if(c){if(s.parentNode!==document.body){const d=s.parentNode;s.dataset.originalParentRef=d===c?"inside":"sibling",document.body.appendChild(s)}s.style.display="block",s.style.visibility="hidden",s.style.opacity="0",requestAnimationFrame(()=>{requestAnimationFrame(()=>{Vn(s,c),s.offsetHeight,s.setAttribute("data-active","true"),s.style.visibility="visible",s.style.opacity="1"})})}else s.setAttribute("data-active","true")}else s.setAttribute("data-active","false"),s.style.display="none",s.style.top="",s.style.left="",s.style.visibility="",s.style.opacity=""})})}),e.watch(()=>[we.value,mt.value],()=>{we.value==="askAi"||mt.value==="askAi"?e.nextTick(()=>{Do()}):(fe.value=null,e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(n=>{if(n.parentNode===document.body){const s=n.getAttribute("data-submenu-id");if(s){const i=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${s}"]`);if(i)if(n.dataset.originalParentRef==="inside")i.appendChild(n);else{const d=i.closest(".dss-toolbar-dropdown");d&&d.insertBefore(n,i.nextSibling)}}}})}))}),e.watch(()=>A.locale,a=>{a&&a!==oe.value&&(oe.value=a)},{immediate:!0}),J({openCommentOverlayForSelector:On,updateCommentMarkers:it,restoreCommentsFromModel:fl}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-text-editor-container",[{"editor-with-comments":Lt.value},Ht.value]]),style:e.normalizeStyle(Mt.value)},[_.richText?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-text-editor-toolbar",onMousedown:n[14]||(n[14]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",i1,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:Bl,title:e.unref(L)("textEditor.toolbar.undo")},[...n[45]||(n[45]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M9.23302 0.888889C6.90278 0.888889 4.79238 1.76889 3.16561 3.2L0 0V8H7.91402L4.73083 4.78222C5.9531 3.75111 7.50953 3.11111 9.23302 3.11111C12.3459 3.11111 14.9927 5.16444 15.916 8L18 7.30667C16.7777 3.58222 13.3219 0.888889 9.23302 0.888889Z",fill:"#323232"})],-1)])],8,c1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!El.value}]),onClick:Zl,title:e.unref(L)("textEditor.toolbar.redo")},[...n[46]||(n[46]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.8328 3.2C13.2053 1.76889 11.0938 0.888889 8.76246 0.888889C4.67155 0.888889 1.21408 3.58222 0 7.30667L2.07625 8C3 5.16444 5.6393 3.11111 8.76246 3.11111C10.478 3.11111 12.044 3.75111 13.2669 4.78222L10.0821 8H18V0L14.8328 3.2Z",fill:"#323232"})],-1)])],10,u1),n[61]||(n[61]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",d1,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:n[0]||(n[0]=s=>Pn("paragraph")),title:e.unref(L)("textEditor.toolbar.paragraphFormat")},[B.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:W.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,p1)):B.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:W.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,v1)):B.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:W.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,f1)):B.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:W.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,h1)):B.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:W.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,g1)):B.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:W.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,y1)):(e.openBlock(),e.createElementBlock("svg",k1,[...n[47]||(n[47]=[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"},null,-1)])])),n[48]||(n[48]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,m1),we.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[8]||(n[8]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[1]||(n[1]=s=>_l("<h1>"))},[e.createElementVNode("img",{src:W.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,C1),e.createElementVNode("h1",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[2]||(n[2]=s=>_l("<h2>"))},[e.createElementVNode("img",{src:W.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,b1),e.createElementVNode("h2",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[3]||(n[3]=s=>_l("<h3>"))},[e.createElementVNode("img",{src:W.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,w1),e.createElementVNode("h3",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[4]||(n[4]=s=>_l("<h4>"))},[e.createElementVNode("img",{src:W.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,x1),e.createElementVNode("h4",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[5]||(n[5]=s=>_l("<h5>"))},[e.createElementVNode("img",{src:W.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,E1),e.createElementVNode("h5",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[6]||(n[6]=s=>_l("<h6>"))},[e.createElementVNode("img",{src:W.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,S1),e.createElementVNode("h6",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[7]||(n[7]=s=>_l("<p>"))},[n[49]||(n[49]=e.createElementVNode("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"})],-1)),e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("bold")}]),onClick:n[9]||(n[9]=s=>Pl("bold")),title:e.unref(L)("textEditor.toolbar.bold")},[...n[50]||(n[50]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M8.8 6.79C9.79256 6.12 10.4884 5.02 10.4884 4C10.4884 1.74 8.69767 0 6.39535 0H0V14H7.20372C9.34233 14 11 12.3 11 10.21C11 8.69 10.12 7.39 8.8 6.79ZM3.06977 2.5H6.13953C6.98884 2.5 7.67442 3.17 7.67442 4C7.67442 4.83 6.98884 5.5 6.13953 5.5H3.06977V2.5ZM6.65116 11.5H3.06977V8.5H6.65116C7.50047 8.5 8.18605 9.17 8.18605 10C8.18605 10.83 7.50047 11.5 6.65116 11.5Z",fill:"currentColor"})],-1)])],10,V1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("italic")}]),onClick:n[10]||(n[10]=s=>Pl("italic")),title:e.unref(L)("textEditor.toolbar.italic")},[...n[51]||(n[51]=[e.createElementVNode("svg",{viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4 0V3H6.21L2.79 11H0V14H8V11H5.79L9.21 3H12V0H4Z",fill:"#323232"})],-1)])],10,N1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("underline")}]),onClick:n[11]||(n[11]=s=>Pl("underline")),title:e.unref(L)("textEditor.toolbar.underline")},[...n[52]||(n[52]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.5 10.8889C8.10071 10.8889 10.2143 8.79667 10.2143 6.22222V0H8.25V6.22222C8.25 7.72333 7.01643 8.94444 5.5 8.94444C3.98357 8.94444 2.75 7.72333 2.75 6.22222V0H0.785714V6.22222C0.785714 8.79667 2.89929 10.8889 5.5 10.8889ZM0 12.4444V14H11V12.4444H0Z",fill:"#323232"})],-1)])],10,B1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Ke.value}]),onClick:sn,title:e.unref(L)("textEditor.toolbar.citation")},[...n[53]||(n[53]=[e.createElementVNode("svg",{viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.42857 14H5.71429L8.57143 8.4V0H0V8.4H4.28571L1.42857 14ZM12.8571 14H17.1429L20 8.4V0H11.4286V8.4H15.7143L12.8571 14Z",fill:"currentColor"})],-1)])],10,_1),n[62]||(n[62]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ye.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:Ul,title:e.unref(L)("textEditor.toolbar.removeLink")},[...n[55]||(n[55]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18 4.88889H13.2V7.21111H18C20.052 7.21111 21.72 8.91 21.72 11C21.72 12.7478 20.544 14.2144 18.948 14.6422L20.7 16.4267C22.656 15.4122 24 13.3833 24 11C24 7.62667 21.312 4.88889 18 4.88889ZM16.8 9.77778H14.172L16.572 12.2222H16.8V9.77778ZM0 1.55222L3.732 5.35333C1.548 6.25778 0 8.44556 0 11C0 14.3733 2.688 17.1111 6 17.1111H10.8V14.7889H6C3.948 14.7889 2.28 13.09 2.28 11C2.28 9.05667 3.732 7.45556 5.592 7.24778L8.076 9.77778H7.2V12.2222H10.476L13.2 14.9967V17.1111H15.276L20.088 22L21.6 20.46L1.524 0L0 1.55222Z",fill:"#323232"})],-1)])],8,$1)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:Ql,title:e.unref(L)("textEditor.toolbar.insertLink")},[...n[54]||(n[54]=[e.createElementVNode("svg",{width:"20",height:"14",viewBox:"0 0 27 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.565 7C2.565 4.606 4.4415 2.66 6.75 2.66H12.15V0H6.75C3.024 0 0 3.136 0 7C0 10.864 3.024 14 6.75 14H12.15V11.34H6.75C4.4415 11.34 2.565 9.394 2.565 7ZM8.1 8.4H18.9V5.6H8.1V8.4ZM20.25 0H14.85V2.66H20.25C22.5585 2.66 24.435 4.606 24.435 7C24.435 9.394 22.5585 11.34 20.25 11.34H14.85V14H20.25C23.976 14 27 10.864 27 7C27 3.136 23.976 0 20.25 0Z",fill:"#323232"})],-1)])],8,M1)),n[63]||(n[63]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("insertUnorderedList")}]),onClick:k,title:e.unref(L)("textEditor.toolbar.bulletList")},[...n[56]||(n[56]=[e.createElementVNode("svg",{viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.37838 5.2C0.615676 5.2 0 5.78067 0 6.5C0 7.21933 0.615676 7.8 1.37838 7.8C2.14108 7.8 2.75676 7.21933 2.75676 6.5C2.75676 5.78067 2.14108 5.2 1.37838 5.2ZM1.37838 0C0.615676 0 0 0.580667 0 1.3C0 2.01933 0.615676 2.6 1.37838 2.6C2.14108 2.6 2.75676 2.01933 2.75676 1.3C2.75676 0.580667 2.14108 0 1.37838 0ZM1.37838 10.4C0.615676 10.4 0 10.9893 0 11.7C0 12.4107 0.624865 13 1.37838 13C2.13189 13 2.75676 12.4107 2.75676 11.7C2.75676 10.9893 2.14108 10.4 1.37838 10.4ZM4.13514 12.5667H17V10.8333H4.13514V12.5667ZM4.13514 7.36667H17V5.63333H4.13514V7.36667ZM4.13514 0.433333V2.16667H17V0.433333H4.13514Z",fill:"#323232"})],-1)])],10,L1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("insertOrderedList")}]),onClick:w,title:e.unref(L)("textEditor.toolbar.numberList")},[...n[57]||(n[57]=[e.createElementVNode("svg",{viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 12.1875H1.89474V12.6562H0.947368V13.5938H1.89474V14.0625H0V15H2.84211V11.25H0V12.1875ZM0.947368 3.75H1.89474V0H0V0.9375H0.947368V3.75ZM0 6.5625H1.70526L0 8.53125V9.375H2.84211V8.4375H1.13684L2.84211 6.46875V5.625H0V6.5625ZM4.73684 0.9375V2.8125H18V0.9375H4.73684ZM4.73684 14.0625H18V12.1875H4.73684V14.0625ZM4.73684 8.4375H18V6.5625H4.73684V8.4375Z",fill:"#323232"})],-1)])],10,T1),n[64]||(n[64]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:Ml,title:e.unref(L)("textEditor.toolbar.image")},[...n[58]||(n[58]=[e.createElementVNode("svg",{viewBox:"1.5 1.5 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.15065 15.8414L2.13398 15.8581C1.90898 15.3664 1.76732 14.8081 1.70898 14.1914C1.76732 14.7997 1.92565 15.3497 2.15065 15.8414Z",fill:"#323232"}),e.createElementVNode("path",{d:"M7.50091 8.65026C8.59628 8.65026 9.48425 7.76229 9.48425 6.66693C9.48425 5.57156 8.59628 4.68359 7.50091 4.68359C6.40555 4.68359 5.51758 5.57156 5.51758 6.66693C5.51758 7.76229 6.40555 8.65026 7.50091 8.65026Z",fill:"#323232"}),e.createElementVNode("path",{d:"M13.491 1.66699H6.50768C3.47435 1.66699 1.66602 3.47533 1.66602 6.50866V13.492C1.66602 14.4003 1.82435 15.192 2.13268 15.8587C2.84935 17.442 4.38268 18.3337 6.50768 18.3337H13.491C16.5243 18.3337 18.3327 16.5253 18.3327 13.492V11.5837V6.50866C18.3327 3.47533 16.5243 1.66699 13.491 1.66699ZM16.9743 10.417C16.3243 9.85866 15.2743 9.85866 14.6243 10.417L11.1577 13.392C10.5077 13.9503 9.45768 13.9503 8.80768 13.392L8.52435 13.1587C7.93268 12.642 6.99102 12.592 6.32435 13.042L3.20768 15.1337C3.02435 14.667 2.91602 14.1253 2.91602 13.492V6.50866C2.91602 4.15866 4.15768 2.91699 6.50768 2.91699H13.491C15.841 2.91699 17.0827 4.15866 17.0827 6.50866V10.5087L16.9743 10.417Z",fill:"#323232"})],-1)])],8,D1),Lt.value&&ae.value?(e.openBlock(),e.createElementBlock("div",A1)):e.createCommentVNode("",!0),Lt.value&&ae.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(L)("textEditor.toolbar.comment"),onClick:st},[...n[59]||(n[59]=[e.createElementVNode("svg",{viewBox:"2 2 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.19 6H6.79C6.53 6 6.28 6.01 6.04 6.04C3.35 6.27 2 7.86 2 10.79V14.79C2 18.79 3.6 19.58 6.79 19.58H7.19C7.41 19.58 7.7 19.73 7.83 19.9L9.03 21.5C9.56 22.21 10.42 22.21 10.95 21.5L12.15 19.9C12.3 19.7 12.54 19.58 12.79 19.58H13.19C16.12 19.58 17.71 18.24 17.94 15.54C17.97 15.3 17.98 15.05 17.98 14.79V10.79C17.98 7.6 16.38 6 13.19 6ZM6.5 14C5.94 14 5.5 13.55 5.5 13C5.5 12.45 5.95 12 6.5 12C7.05 12 7.5 12.45 7.5 13C7.5 13.55 7.05 14 6.5 14ZM9.99 14C9.43 14 8.99 13.55 8.99 13C8.99 12.45 9.44 12 9.99 12C10.54 12 10.99 12.45 10.99 13C10.99 13.55 10.55 14 9.99 14ZM13.49 14C12.93 14 12.49 13.55 12.49 13C12.49 12.45 12.94 12 13.49 12C14.04 12 14.49 12.45 14.49 13C14.49 13.55 14.04 14 13.49 14Z",fill:"#323232"}),e.createElementVNode("path",{d:"M21.9802 6.79V10.79C21.9802 12.79 21.3602 14.15 20.1202 14.9C19.8202 15.08 19.4702 14.84 19.4702 14.49L19.4802 10.79C19.4802 6.79 17.1902 4.5 13.1902 4.5L7.10025 4.51C6.75025 4.51 6.51025 4.16 6.69025 3.86C7.44025 2.62 8.80025 2 10.7902 2H17.1902C20.3802 2 21.9802 3.6 21.9802 6.79Z",fill:"#323232"})],-1)])],8,H1)):e.createCommentVNode("",!0),_.askAi?(e.openBlock(),e.createElementBlock("div",R1)):e.createCommentVNode("",!0),_.askAi?(e.openBlock(),e.createElementBlock("div",F1,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-dropdown-toggle",onClick:n[12]||(n[12]=s=>Pn("askAi")),title:e.unref(L)("textEditor.toolbar.askAi")},[n[60]||(n[60]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.97363 4.34473C5.4926 6.769 7.88838 8.45732 10.7598 9.01855C9.21102 10.2499 7.99851 11.8959 7.30762 13.8027C7.21982 14.066 6.82404 14.066 6.69238 13.8027C5.59521 10.7746 3.18158 8.40476 0.197266 7.30762C-0.0658032 7.21978 -0.0656958 6.82515 0.197266 6.69336C1.62341 6.17665 2.90369 5.36753 3.97363 4.34473Z",fill:"#9784ba"}),e.createElementVNode("path",{d:"M6.66895 0.197266C6.75687 -0.0657415 7.1515 -0.0657945 7.2832 0.197266C8.38035 3.22532 10.7941 5.5952 13.7783 6.69238C14.0416 6.78015 14.0416 7.17497 13.7783 7.30664C12.6735 7.71282 11.6469 8.29371 10.7363 9.01758C7.86425 8.45633 5.46822 6.76786 3.94922 4.34277C5.15088 3.1939 6.08858 1.77583 6.66895 0.197266Z",fill:"#cfbeed"})],-1)),e.createElementVNode("span",z1,e.toDisplayString(e.unref(L)("textEditor.toolbar.askAi")),1)],8,I1),we.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[13]||(n[13]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(a.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",P1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.customToolbarSlots,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[Hl(s)?(e.openBlock(),e.createElementBlock("div",O1,[e.renderSlot(a.$slots,s)])):e.createCommentVNode("",!0),Hl(s)&&i<_.customToolbarSlots.length-1&&Rn(i)?(e.openBlock(),e.createElementBlock("div",W1)):e.createCommentVNode("",!0)],64))),128))])],32)):e.createCommentVNode("",!0),(we.value==="paragraph"||we.value==="askAi")&&_.richText?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-dropdown-overlay",onClick:tl})):e.createCommentVNode("",!0),e.createVNode(ha,{showModal:Ae.value,width:"500px",height:"55vh",onCloseModal:ro},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(L)("textEditor.link.editLink")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",q1,[e.createElementVNode("div",Z1,[e.createElementVNode("label",U1,e.toDisplayString(e.unref(L)("textEditor.link.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkAltInput",ref:_e,type:"text","onUpdate:modelValue":n[15]||(n[15]=s=>ze.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.link.enterAltText"),onKeyup:e.withKeys(Eo,["enter"])},null,40,Y1),[[e.vModelText,ze.value]])]),e.createElementVNode("div",X1,[e.createElementVNode("label",j1,e.toDisplayString(e.unref(L)("textEditor.link.url")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkUrlInput",ref:Ye,type:"text","onUpdate:modelValue":n[16]||(n[16]=s=>Z.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.link.enterUrl"),onKeyup:e.withKeys(Eo,["enter"])},null,40,K1),[[e.vModelText,Z.value]])])])]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:ro},e.toDisplayString(e.unref(L)("textEditor.link.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:Eo},e.toDisplayString(e.unref(L)("textEditor.link.save")),1)]),_:1},8,["showModal"]),e.createVNode(ha,{showModal:Qt.value,width:"500px",height:"80vh",onCloseModal:vl},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(pt.value?e.unref(L)("textEditor.image.editImage"):e.unref(L)("textEditor.image.addImage")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",G1,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Y.value==="upload"}]),onClick:n[17]||(n[17]=s=>Y.value="upload")},e.toDisplayString(e.unref(L)("textEditor.image.upload")),3),n[65]||(n[65]=e.createElementVNode("div",{class:"dss-image-modal-tab-separator"},null,-1)),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Y.value==="url"}]),onClick:n[18]||(n[18]=s=>Y.value="url")},e.toDisplayString(e.unref(L)("textEditor.image.imageLink")),3)]),Y.value==="upload"?(e.openBlock(),e.createElementBlock("div",Q1,[e.createElementVNode("div",J1,[e.createElementVNode("div",em,[yl.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("label",tm,e.toDisplayString(e.unref(L)("textEditor.image.uploadImage")),1)),yl.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-image-upload-preview",onClick:$l},[e.createElementVNode("img",{src:et.value,alt:"Preview",class:"dss-image-preview-image"},null,8,lm),n[66]||(n[66]=e.createElementVNode("div",{class:"dss-image-preview-overlay"},[e.createElementVNode("svg",{width:"35",height:"35",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.1 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z",fill:"white"})])],-1)),e.createElementVNode("input",{ref_key:"imageFileInput",ref:ct,type:"file",accept:"image/*",class:"dss-image-file-input-hidden",onChange:P},null,544)])):(e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"imageFileInput",ref:ct,type:"file",accept:"image/*",class:"dss-link-modal-input dss-link-modal-input-image",onChange:P},null,544))]),e.createElementVNode("div",nm,[e.createElementVNode("label",om,e.toDisplayString(e.unref(L)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageAltInput",ref:Rt,type:"text","onUpdate:modelValue":n[19]||(n[19]=s=>xe.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterAltText"),onKeyup:e.withKeys(Ot,["enter"])},null,40,am),[[e.vModelText,xe.value]])]),e.createElementVNode("div",sm,[e.createElementVNode("label",rm,e.toDisplayString(e.unref(L)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[20]||(n[20]=s=>lt.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Ot,["enter"]),onInput:Xl},null,40,im),[[e.vModelText,lt.value]])]),e.createElementVNode("div",cm,[e.createElementVNode("label",um,e.toDisplayString(e.unref(L)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[21]||(n[21]=s=>kt.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Ot,["enter"]),onInput:Zn},null,40,dm),[[e.vModelText,kt.value]])])])])):e.createCommentVNode("",!0),Y.value==="url"?(e.openBlock(),e.createElementBlock("div",mm,[e.createElementVNode("div",pm,[e.createElementVNode("div",vm,[e.createElementVNode("label",fm,e.toDisplayString(e.unref(L)("textEditor.image.imageUrl")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageUrlInput",ref:ht,type:"text","onUpdate:modelValue":n[22]||(n[22]=s=>ie.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterImageUrl"),onKeyup:e.withKeys(Ot,["enter"])},null,40,hm),[[e.vModelText,ie.value]])]),e.createElementVNode("div",gm,[e.createElementVNode("label",ym,e.toDisplayString(e.unref(L)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[23]||(n[23]=s=>xe.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterAltText"),onKeyup:e.withKeys(Ot,["enter"])},null,40,km),[[e.vModelText,xe.value]])]),e.createElementVNode("div",Cm,[e.createElementVNode("label",bm,e.toDisplayString(e.unref(L)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[24]||(n[24]=s=>lt.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Ot,["enter"]),onInput:Xl},null,40,wm),[[e.vModelText,lt.value]])]),e.createElementVNode("div",xm,[e.createElementVNode("label",Em,e.toDisplayString(e.unref(L)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[25]||(n[25]=s=>kt.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Ot,["enter"]),onInput:Zn},null,40,Sm),[[e.vModelText,kt.value]])])])])):e.createCommentVNode("",!0)]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:vl},e.toDisplayString(e.unref(L)("textEditor.image.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:Ot},e.toDisplayString(e.unref(L)("textEditor.image.save")),1)]),_:1},8,["showModal"]),_.showTitle?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["dss-text-editor-title-wrapper",{"dss-text-editor-no-border-bottom":nn.value&&sl.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.labels.title")),1),e.createElementVNode("div",Vm,[sl.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Nm,[_.title?(e.openBlock(),e.createElementBlock("span",Bm,e.toDisplayString(_.title),1)):(e.openBlock(),e.createElementBlock("span",_m,e.toDisplayString(ft.value),1))])),e.createElementVNode("textarea",{ref_key:"titleInputRef",ref:Ve,value:_.title,onInput:vn,onFocus:jn,onBlur:Fn,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-title-input",{"dss-text-editor-title-input-blurred":!sl.value}]),placeholder:ft.value,disabled:_.disabled,rows:"1"},null,42,Mm)])],2)):e.createCommentVNode("",!0),_.showTitle&&nn.value&&sl.value?(e.openBlock(),e.createElementBlock("div",$m,[e.renderSlot(a.$slots,"title-slot")])):e.createCommentVNode("",!0),_.showDescription?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["dss-text-editor-description-wrapper",{"dss-text-editor-no-border-bottom":Rl.value&&D.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.labels.description")),1),e.createElementVNode("div",Lm,[D.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Tm,[_.description?(e.openBlock(),e.createElementBlock("span",Dm,e.toDisplayString(_.description),1)):(e.openBlock(),e.createElementBlock("span",Am,e.toDisplayString(zl.value),1))])),e.createElementVNode("textarea",{ref_key:"descriptionInputRef",ref:nt,value:_.description,onInput:jt,onFocus:In,onBlur:fn,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-description-input",{"dss-text-editor-description-input-blurred":!D.value}]),placeholder:zl.value,disabled:_.disabled,rows:"1"},null,42,Hm)])],2)):e.createCommentVNode("",!0),_.showDescription&&Rl.value&&D.value?(e.openBlock(),e.createElementBlock("div",Rm,[e.renderSlot(a.$slots,"description-slot")])):e.createCommentVNode("",!0),Lt.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(se.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass(["editor-comment-marker-group",{"editor-comment-marker-active":Ie.value===s.id,"editor-comment-marker-group-out-of-view":s.opacity===0}]),"data-comment-id":s.id,style:e.normalizeStyle({top:s.top+"px"}),onMouseenter:i=>kl(s),onMouseleave:no},[s.firstUser?(e.openBlock(),e.createElementBlock("div",{key:0,class:"editor-comment-marker editor-comment-marker-first",onClick:e.withModifiers(i=>co(s),["stop"])},[s.firstUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.firstUser.avatar,alt:s.firstUser.name||"avatar"},null,8,zm)):(e.openBlock(),e.createElementBlock("span",Pm,e.toDisplayString(s.firstUser.initials||(s.firstUser.name?s.firstUser.name.charAt(0):"")),1))],8,Im)):e.createCommentVNode("",!0),s.secondUser?(e.openBlock(),e.createElementBlock("div",{key:1,class:"editor-comment-marker editor-comment-marker-second",onClick:e.withModifiers(i=>co(s),["stop"])},[s.secondUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.secondUser.avatar,alt:s.secondUser.name||"avatar"},null,8,Wm)):(e.openBlock(),e.createElementBlock("span",qm,e.toDisplayString(s.secondUser.initials||(s.secondUser.name?s.secondUser.name.charAt(0):"")),1))],8,Om)):e.createCommentVNode("",!0),s.additionalCount>0?(e.openBlock(),e.createElementBlock("div",{key:2,class:"editor-comment-marker editor-comment-marker-additional",style:e.normalizeStyle({top:s.secondUser?"30px":"15px"}),"data-has-second-user":s.secondUser?"true":"false",onClick:e.withModifiers(i=>co(s),["stop"])},[e.createElementVNode("span",Um,"+"+e.toDisplayString(s.additionalCount),1)],12,Zm)):e.createCommentVNode("",!0)],46,Fm))),128)):e.createCommentVNode("",!0),_.richText?(e.openBlock(),e.createElementBlock("div",Jm,[e.createElementVNode("div",{ref_key:"editorRef",ref:h,contenteditable:"true",spellcheck:"false",class:e.normalizeClass(["dss-text-editor-content",{"dss-text-editor-content-disabled":_.disabled,"dss-text-editor-fixed-height":_.fixedHeight}]),style:e.normalizeStyle(jl.value),onInput:wt,onBlur:gn,onClick:ta,onMouseup:Co,onKeyup:Co,onKeydown:Ko,onPaste:Go,onMousemove:la,onMouseleave:na},null,38),e.createVNode(e.Transition,{name:"comment-overlay"},{default:e.withCtx(()=>[Lt.value&&Ie.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-overlay",style:e.normalizeStyle(f.value)},[F.value||Qe.value.length>0?(e.openBlock(),e.createElementBlock("div",e2,[e.createElementVNode("div",t2,[F.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-selection",innerHTML:F.value},null,8,l2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",n2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Qe.value,(s,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:"dss-comment-message"},[s.user&&(s.user.avatar||s.user.initials||s.user.name)?(e.openBlock(),e.createElementBlock("div",o2,[e.createElementVNode("div",a2,[s.user.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.user.avatar,alt:s.user.name||"avatar"},null,8,s2)):(e.openBlock(),e.createElementBlock("span",r2,e.toDisplayString(s.user.initials||(s.user.name?s.user.name.charAt(0):"")),1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",i2,[e.createElementVNode("div",c2,[e.createElementVNode("div",u2,e.toDisplayString(s.user&&s.user.name||"Comment"),1),s.createdAt?(e.openBlock(),e.createElementBlock("div",d2,e.toDisplayString(Wl(new Date(s.createdAt))),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-comment-body-text",{"comment-started":pn(s.text)||s.class==="comment-started"}])},e.toDisplayString(s.text||""),3)]),A.commentUser&&s.user&&s.user.id===A.commentUser.id&&!pn(s.text)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-comment-delete-button",onClick:e.withModifiers(c=>ll(s,i),["stop"]),title:e.unref(L)("textEditor.comment.delete")||"Delete comment"},[...n[68]||(n[68]=[e.createElementVNode("svg",{width:"22",height:"25",viewBox:"0 0 22 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M19.5986 21.3535C19.5985 23.3679 18.1282 25 16.2891 25H5.30957C3.48166 24.9997 2.00011 23.3702 2 21.3535V8H19.5986V21.3535ZM8 11C7.44772 11 7 11.4477 7 12V20C7 20.5523 7.44772 21 8 21C8.55229 21 9 20.5523 9 20V12C9 11.4477 8.55229 11 8 11ZM14 11C13.4477 11 13 11.4477 13 12V20C13 20.5523 13.4477 21 14 21C14.5523 21 15 20.5523 15 20V12C15 11.4477 14.5523 11 14 11ZM13.2002 0C15.0227 0.000104554 16.4999 1.46937 16.5 3.27246V4.36328H20.9092C21.5117 4.36348 21.9998 4.84789 22 5.4541C22 6.05615 21.4986 6.54569 20.9092 6.5459H1.09082C0.488195 6.54569 0 6.06052 0 5.4541C0.000246661 4.85225 0.50153 4.36349 1.09082 4.36328H5.5L5.50098 3.27246C5.50112 1.46505 6.98382 0.000171185 8.80078 0H13.2002ZM8.79004 2.18164C8.19615 2.18167 7.70034 2.67042 7.7002 3.27246C7.7002 3.87899 8.18837 4.36325 8.79004 4.36328H13.21C13.8039 4.36325 14.2998 3.87462 14.2998 3.27246C14.2997 2.66606 13.8115 2.18167 13.21 2.18164H8.79004Z",fill:"#323232"})],-1)])],8,m2)):e.createCommentVNode("",!0)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",p2,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"commentInputRef",ref:S,"onUpdate:modelValue":n[26]||(n[26]=s=>g.value=s),class:"dss-comment-input",rows:"1",placeholder:e.unref(L)("textEditor.comment.placeholder"),onKeydown:e.withKeys(e.withModifiers(ne,["prevent","stop"]),["enter"]),onInput:n[27]||(n[27]=()=>{if(S.value){const s=S.value;s.style.height="auto",s.style.height=`${s.scrollHeight}px`}})},null,40,v2),[[e.vModelText,g.value]]),e.createElementVNode("button",{type:"button",class:"dss-comment-send-button",onClick:e.withModifiers(ne,["stop"])},[...n[69]||(n[69]=[e.createElementVNode("svg",{width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0.00999999 18L21 9L0.00999999 0L0 7L15 9L0 11L0.00999999 18Z",fill:"#31312F"})],-1)])])])],4)):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",f2,[e.createElementVNode("div",h2,[e.createElementVNode("span",g2,e.toDisplayString(ml.value)+" "+e.toDisplayString(ml.value===1?e.unref(L)("textEditor.footer.word"):e.unref(L)("textEditor.footer.words")),1),n[70]||(n[70]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",y2,e.toDisplayString(un.value)+" "+e.toDisplayString(un.value===1?e.unref(L)("textEditor.footer.character"):e.unref(L)("textEditor.footer.characters")),1)])])])):(e.openBlock(),e.createElementBlock("div",Ym,[e.createElementVNode("textarea",{value:_.modelValue,onInput:on,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-textarea",{"dss-text-editor-fixed-height":_.fixedHeight}]),placeholder:Kl.value,rows:_.rows,disabled:_.disabled,style:e.normalizeStyle(wl.value)},null,46,Xm),e.createElementVNode("div",jm,[e.createElementVNode("div",Km,[e.createElementVNode("span",Gm,e.toDisplayString(ml.value)+" "+e.toDisplayString(ml.value===1?e.unref(L)("textEditor.footer.word"):e.unref(L)("textEditor.footer.words")),1),n[67]||(n[67]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",Qm,e.toDisplayString(un.value)+" "+e.toDisplayString(un.value===1?e.unref(L)("textEditor.footer.character"):e.unref(L)("textEditor.footer.characters")),1)])])])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[K.value&&he.value&&h.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(Re.value),onMouseenter:n[28]||(n[28]=s=>ge.value=!0),onMouseleave:eo},[e.createElementVNode("span",{class:"dss-link-popup-url",onClick:e.withModifiers(xo,["stop"]),title:he.value},e.toDisplayString(he.value),9,k2),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(Ro,["stop"]),title:e.unref(L)("textEditor.link.editLink")},[(e.openBlock(),e.createElementBlock("svg",b2,[...n[71]||(n[71]=[e.createElementVNode("g",null,[e.createElementVNode("path",{d:"M25.264 1.008c-.524 0-1.049.197-1.443.592l-2.248 2.248 6.58 6.578 2.246-2.248a2.058 2.058 0 0 0 0-2.887L26.707 1.6a2.032 2.032 0 0 0-1.443-.592zm-5.106 4.254L3.889 21.532a1.022 1.022 0 0 0-.242.391c-.729 2.187-2.035 5.759-2.6 7.803a1 1 0 0 0 1.188 1.24c2.432-.562 5.687-1.896 7.84-2.613a1.03 1.03 0 0 0 .392-.236l16.269-16.275z",fill:"hsl(0, 0%, 98%)",opacity:"1","data-original":"#000000",class:""})],-1)])]))],8,C2)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Ct.value&&Pt.value&&h.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(pe.value),onMouseenter:n[29]||(n[29]=s=>H.value=!0),onMouseleave:to},[e.createElementVNode("div",w2,[Pt.value===e.unref(L)("textEditor.image.noAlt")?(e.openBlock(),e.createElementBlock("div",x2,[...n[72]||(n[72]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10 0C4.5 0 0 4.5 0 10C0 15.5 4.5 20 10 20C15.5 20 20 15.5 20 10C20 4.5 15.5 0 10 0ZM2 10C2 5.6 5.6 2 10 2C11.8 2 13.5 2.6 14.9 3.7L3.7 14.9C2.6 13.5 2 11.8 2 10ZM10 18C8.2 18 6.5 17.4 5.1 16.3L16.3 5.1C17.4 6.5 18 8.2 18 10C18 14.4 14.4 18 10 18Z",fill:"#fafafa"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:"dss-image-popup-alt",title:Pt.value},e.toDisplayString(Pt.value),9,E2)]),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(xl,["stop"]),title:e.unref(L)("textEditor.image.editImage")},[(e.openBlock(),e.createElementBlock("svg",V2,[...n[73]||(n[73]=[e.createElementVNode("g",null,[e.createElementVNode("path",{d:"M25.264 1.008c-.524 0-1.049.197-1.443.592l-2.248 2.248 6.58 6.578 2.246-2.248a2.058 2.058 0 0 0 0-2.887L26.707 1.6a2.032 2.032 0 0 0-1.443-.592zm-5.106 4.254L3.889 21.532a1.022 1.022 0 0 0-.242.391c-.729 2.187-2.035 5.759-2.6 7.803a1 1 0 0 0 1.188 1.24c2.432-.562 5.687-1.896 7.84-2.613a1.03 1.03 0 0 0 .392-.236l16.269-16.275z",fill:"hsl(0, 0%, 98%)",opacity:"1","data-original":"#000000",class:""})],-1)])]))],8,S2)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[_.floatingToolbar&&_.richText&&Me.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floatingToolbarRef",ref:yt,class:"dss-floating-toolbar",style:e.normalizeStyle(rt.value),onMousedown:n[44]||(n[44]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",N2,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(Bl,["stop"]),title:e.unref(L)("textEditor.toolbar.undo")},[...n[74]||(n[74]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M9.23302 0.888889C6.90278 0.888889 4.79238 1.76889 3.16561 3.2L0 0V8H7.91402L4.73083 4.78222C5.9531 3.75111 7.50953 3.11111 9.23302 3.11111C12.3459 3.11111 14.9927 5.16444 15.916 8L18 7.30667C16.7777 3.58222 13.3219 0.888889 9.23302 0.888889Z",fill:"#323232"})],-1)])],8,B2),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!El.value}]),onClick:e.withModifiers(Zl,["stop"]),title:e.unref(L)("textEditor.toolbar.redo")},[...n[75]||(n[75]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.8328 3.2C13.2053 1.76889 11.0938 0.888889 8.76246 0.888889C4.67155 0.888889 1.21408 3.58222 0 7.30667L2.07625 8C3 5.16444 5.6393 3.11111 8.76246 3.11111C10.478 3.11111 12.044 3.75111 13.2669 4.78222L10.0821 8H18V0L14.8328 3.2Z",fill:"#323232"})],-1)])],10,_2),n[89]||(n[89]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",M2,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:n[30]||(n[30]=e.withModifiers(s=>bo("paragraph"),["stop"])),title:e.unref(L)("textEditor.toolbar.paragraphFormat")},[B.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:W.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,L2)):B.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:W.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,T2)):B.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:W.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,D2)):B.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:W.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,A2)):B.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:W.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,H2)):B.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:W.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,R2)):(e.openBlock(),e.createElementBlock("svg",F2,[...n[76]||(n[76]=[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"},null,-1)])])),n[77]||(n[77]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,$2),mt.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[38]||(n[38]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[31]||(n[31]=s=>Jl("<h1>"))},[e.createElementVNode("h1",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[32]||(n[32]=s=>Jl("<h2>"))},[e.createElementVNode("h2",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[33]||(n[33]=s=>Jl("<h3>"))},[e.createElementVNode("h3",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[34]||(n[34]=s=>Jl("<h4>"))},[e.createElementVNode("h4",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[35]||(n[35]=s=>Jl("<h5>"))},[e.createElementVNode("h5",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[36]||(n[36]=s=>Jl("<h6>"))},[e.createElementVNode("h6",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[37]||(n[37]=s=>Jl("<p>"))},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),n[90]||(n[90]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("bold")}]),onClick:n[39]||(n[39]=e.withModifiers(s=>Pl("bold"),["stop"])),title:e.unref(L)("textEditor.toolbar.bold")},[...n[78]||(n[78]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M8.8 6.79C9.79256 6.12 10.4884 5.02 10.4884 4C10.4884 1.74 8.69767 0 6.39535 0H0V14H7.20372C9.34233 14 11 12.3 11 10.21C11 8.69 10.12 7.39 8.8 6.79ZM3.06977 2.5H6.13953C6.98884 2.5 7.67442 3.17 7.67442 4C7.67442 4.83 6.98884 5.5 6.13953 5.5H3.06977V2.5ZM6.65116 11.5H3.06977V8.5H6.65116C7.50047 8.5 8.18605 9.17 8.18605 10C8.18605 10.83 7.50047 11.5 6.65116 11.5Z",fill:"currentColor"})],-1)])],10,I2),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("italic")}]),onClick:n[40]||(n[40]=e.withModifiers(s=>Pl("italic"),["stop"])),title:e.unref(L)("textEditor.toolbar.italic")},[...n[79]||(n[79]=[e.createElementVNode("svg",{viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4 0V3H6.21L2.79 11H0V14H8V11H5.79L9.21 3H12V0H4Z",fill:"#323232"})],-1)])],10,z2),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("underline")}]),onClick:n[41]||(n[41]=e.withModifiers(s=>Pl("underline"),["stop"])),title:e.unref(L)("textEditor.toolbar.underline")},[...n[80]||(n[80]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.5 10.8889C8.10071 10.8889 10.2143 8.79667 10.2143 6.22222V0H8.25V6.22222C8.25 7.72333 7.01643 8.94444 5.5 8.94444C3.98357 8.94444 2.75 7.72333 2.75 6.22222V0H0.785714V6.22222C0.785714 8.79667 2.89929 10.8889 5.5 10.8889ZM0 12.4444V14H11V12.4444H0Z",fill:"#323232"})],-1)])],10,P2),n[91]||(n[91]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Ke.value}]),onClick:e.withModifiers(sn,["stop"]),title:e.unref(L)("textEditor.toolbar.citation")},[...n[81]||(n[81]=[e.createElementVNode("svg",{viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.42857 14H5.71429L8.57143 8.4V0H0V8.4H4.28571L1.42857 14ZM12.8571 14H17.1429L20 8.4V0H11.4286V8.4H15.7143L12.8571 14Z",fill:"currentColor"})],-1)])],10,O2),n[92]||(n[92]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ye.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:e.withModifiers(Ul,["stop"]),title:e.unref(L)("textEditor.toolbar.removeLink")},[...n[83]||(n[83]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18 4.88889H13.2V7.21111H18C20.052 7.21111 21.72 8.91 21.72 11C21.72 12.7478 20.544 14.2144 18.948 14.6422L20.7 16.4267C22.656 15.4122 24 13.3833 24 11C24 7.62667 21.312 4.88889 18 4.88889ZM16.8 9.77778H14.172L16.572 12.2222H16.8V9.77778ZM0 1.55222L3.732 5.35333C1.548 6.25778 0 8.44556 0 11C0 14.3733 2.688 17.1111 6 17.1111H10.8V14.7889H6C3.948 14.7889 2.28 13.09 2.28 11C2.28 9.05667 3.732 7.45556 5.592 7.24778L8.076 9.77778H7.2V12.2222H10.476L13.2 14.9967V17.1111H15.276L20.088 22L21.6 20.46L1.524 0L0 1.55222Z",fill:"#323232"})],-1)])],8,q2)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:e.withModifiers(Ql,["stop"]),title:e.unref(L)("textEditor.toolbar.insertLink")},[...n[82]||(n[82]=[e.createElementVNode("svg",{width:"20",height:"14",viewBox:"0 0 27 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.565 7C2.565 4.606 4.4415 2.66 6.75 2.66H12.15V0H6.75C3.024 0 0 3.136 0 7C0 10.864 3.024 14 6.75 14H12.15V11.34H6.75C4.4415 11.34 2.565 9.394 2.565 7ZM8.1 8.4H18.9V5.6H8.1V8.4ZM20.25 0H14.85V2.66H20.25C22.5585 2.66 24.435 4.606 24.435 7C24.435 9.394 22.5585 11.34 20.25 11.34H14.85V14H20.25C23.976 14 27 10.864 27 7C27 3.136 23.976 0 20.25 0Z",fill:"#323232"})],-1)])],8,W2)),n[93]||(n[93]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("insertUnorderedList")}]),onClick:e.withModifiers(k,["stop"]),title:e.unref(L)("textEditor.toolbar.bulletList")},[...n[84]||(n[84]=[e.createElementVNode("svg",{viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.37838 5.2C0.615676 5.2 0 5.78067 0 6.5C0 7.21933 0.615676 7.8 1.37838 7.8C2.14108 7.8 2.75676 7.21933 2.75676 6.5C2.75676 5.78067 2.14108 5.2 1.37838 5.2ZM1.37838 0C0.615676 0 0 0.580667 0 1.3C0 2.01933 0.615676 2.6 1.37838 2.6C2.14108 2.6 2.75676 2.01933 2.75676 1.3C2.75676 0.580667 2.14108 0 1.37838 0ZM1.37838 10.4C0.615676 10.4 0 10.9893 0 11.7C0 12.4107 0.624865 13 1.37838 13C2.13189 13 2.75676 12.4107 2.75676 11.7C2.75676 10.9893 2.14108 10.4 1.37838 10.4ZM4.13514 12.5667H17V10.8333H4.13514V12.5667ZM4.13514 7.36667H17V5.63333H4.13514V7.36667ZM4.13514 0.433333V2.16667H17V0.433333H4.13514Z",fill:"#323232"})],-1)])],10,Z2),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Dt("insertOrderedList")}]),onClick:e.withModifiers(w,["stop"]),title:e.unref(L)("textEditor.toolbar.numberList")},[...n[85]||(n[85]=[e.createElementVNode("svg",{viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 12.1875H1.89474V12.6562H0.947368V13.5938H1.89474V14.0625H0V15H2.84211V11.25H0V12.1875ZM0.947368 3.75H1.89474V0H0V0.9375H0.947368V3.75ZM0 6.5625H1.70526L0 8.53125V9.375H2.84211V8.4375H1.13684L2.84211 6.46875V5.625H0V6.5625ZM4.73684 0.9375V2.8125H18V0.9375H4.73684ZM4.73684 14.0625H18V12.1875H4.73684V14.0625ZM4.73684 8.4375H18V6.5625H4.73684V8.4375Z",fill:"#323232"})],-1)])],10,U2),n[94]||(n[94]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(Ml,["stop"]),title:e.unref(L)("textEditor.toolbar.image")},[...n[86]||(n[86]=[e.createElementVNode("svg",{viewBox:"1.5 1.5 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.15065 15.8414L2.13398 15.8581C1.90898 15.3664 1.76732 14.8081 1.70898 14.1914C1.76732 14.7997 1.92565 15.3497 2.15065 15.8414Z",fill:"#323232"}),e.createElementVNode("path",{d:"M7.50091 8.65026C8.59628 8.65026 9.48425 7.76229 9.48425 6.66693C9.48425 5.57156 8.59628 4.68359 7.50091 4.68359C6.40555 4.68359 5.51758 5.57156 5.51758 6.66693C5.51758 7.76229 6.40555 8.65026 7.50091 8.65026Z",fill:"#323232"}),e.createElementVNode("path",{d:"M13.491 1.66699H6.50768C3.47435 1.66699 1.66602 3.47533 1.66602 6.50866V13.492C1.66602 14.4003 1.82435 15.192 2.13268 15.8587C2.84935 17.442 4.38268 18.3337 6.50768 18.3337H13.491C16.5243 18.3337 18.3327 16.5253 18.3327 13.492V11.5837V6.50866C18.3327 3.47533 16.5243 1.66699 13.491 1.66699ZM16.9743 10.417C16.3243 9.85866 15.2743 9.85866 14.6243 10.417L11.1577 13.392C10.5077 13.9503 9.45768 13.9503 8.80768 13.392L8.52435 13.1587C7.93268 12.642 6.99102 12.592 6.32435 13.042L3.20768 15.1337C3.02435 14.667 2.91602 14.1253 2.91602 13.492V6.50866C2.91602 4.15866 4.15768 2.91699 6.50768 2.91699H13.491C15.841 2.91699 17.0827 4.15866 17.0827 6.50866V10.5087L16.9743 10.417Z",fill:"#323232"})],-1)])],8,Y2),Lt.value?(e.openBlock(),e.createElementBlock("div",X2)):e.createCommentVNode("",!0),Lt.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(L)("textEditor.toolbar.comment"),onClick:e.withModifiers(st,["stop"])},[...n[87]||(n[87]=[e.createElementVNode("svg",{viewBox:"2 2 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.19 6H6.79C6.53 6 6.28 6.01 6.04 6.04C3.35 6.27 2 7.86 2 10.79V14.79C2 18.79 3.6 19.58 6.79 19.58H7.19C7.41 19.58 7.7 19.73 7.83 19.9L9.03 21.5C9.56 22.21 10.42 22.21 10.95 21.5L12.15 19.9C12.3 19.7 12.54 19.58 12.79 19.58H13.19C16.12 19.58 17.71 18.24 17.94 15.54C17.97 15.3 17.98 15.05 17.98 14.79V10.79C17.98 7.6 16.38 6 13.19 6ZM6.5 14C5.94 14 5.5 13.55 5.5 13C5.5 12.45 5.95 12 6.5 12C7.05 12 7.5 12.45 7.5 13C7.5 13.55 7.05 14 6.5 14ZM9.99 14C9.43 14 8.99 13.55 8.99 13C8.99 12.45 9.44 12 9.99 12C10.54 12 10.99 12.45 10.99 13C10.99 13.55 10.55 14 9.99 14ZM13.49 14C12.93 14 12.49 13.55 12.49 13C12.49 12.45 12.94 12 13.49 12C14.04 12 14.49 12.45 14.49 13C14.49 13.55 14.04 14 13.49 14Z",fill:"#323232"}),e.createElementVNode("path",{d:"M21.9802 6.79V10.79C21.9802 12.79 21.3602 14.15 20.1202 14.9C19.8202 15.08 19.4702 14.84 19.4702 14.49L19.4802 10.79C19.4802 6.79 17.1902 4.5 13.1902 4.5L7.10025 4.51C6.75025 4.51 6.51025 4.16 6.69025 3.86C7.44025 2.62 8.80025 2 10.7902 2H17.1902C20.3802 2 21.9802 3.6 21.9802 6.79Z",fill:"#323232"})],-1)])],8,j2)):e.createCommentVNode("",!0),_.askAi?(e.openBlock(),e.createElementBlock("div",K2)):e.createCommentVNode("",!0),_.askAi?(e.openBlock(),e.createElementBlock("div",G2,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-ai-float dss-toolbar-dropdown-toggle",onClick:n[42]||(n[42]=e.withModifiers(s=>bo("askAi"),["stop"])),title:e.unref(L)("textEditor.toolbar.askAi")},[n[88]||(n[88]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.97363 4.34473C5.4926 6.769 7.88838 8.45732 10.7598 9.01855C9.21102 10.2499 7.99851 11.8959 7.30762 13.8027C7.21982 14.066 6.82404 14.066 6.69238 13.8027C5.59521 10.7746 3.18158 8.40476 0.197266 7.30762C-0.0658032 7.21978 -0.0656958 6.82515 0.197266 6.69336C1.62341 6.17665 2.90369 5.36753 3.97363 4.34473Z",fill:"#9784ba"}),e.createElementVNode("path",{d:"M6.66895 0.197266C6.75687 -0.0657415 7.1515 -0.0657945 7.2832 0.197266C8.38035 3.22532 10.7941 5.5952 13.7783 6.69238C14.0416 6.78015 14.0416 7.17497 13.7783 7.30664C12.6735 7.71282 11.6469 8.29371 10.7363 9.01758C7.86425 8.45633 5.46822 6.76786 3.94922 4.34277C5.15088 3.1939 6.08858 1.77583 6.66895 0.197266Z",fill:"#cfbeed"})],-1)),e.createElementVNode("span",J2,e.toDisplayString(e.unref(L)("textEditor.toolbar.askAi")),1)],8,Q2),mt.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[43]||(n[43]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(a.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),Bn.value?(e.openBlock(),e.createElementBlock("div",ep,[_.askAi&&Bn.value?(e.openBlock(),e.createElementBlock("div",tp)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.customToolbarSlots,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[Hl(s)&&bn(s)?(e.openBlock(),e.createElementBlock("div",lp,[e.renderSlot(a.$slots,s)])):e.createCommentVNode("",!0),Hl(s)&&bn(s)&&i<_.customToolbarSlots.length-1&&Gl(i)?(e.openBlock(),e.createElementBlock("div",np)):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)]))],6))}}),sp={class:"dss-color-picker__section-title"},rp={class:"dss-color-picker__presets-row"},ip=["title","onClick"],cp={key:1,class:"dss-color-picker__section"},up={class:"dss-color-picker__presets-row"},dp=["title","onClick"],mp={key:2,class:"dss-color-picker__section"},pp={class:"dss-color-picker__section-header"},vp={class:"dss-color-picker__presets-row"},fp=["title","onClick"],hp=["onClick"],gp={key:1,class:"dss-color-picker__presets-row dss-color-picker__presets-row--standalone"},yp=["title","onClick"],kp={class:"dss-color-picker__input-row"},Cp=["value"],bp={__name:"DSSColorPicker",props:{modelValue:{type:String,default:"#b8a5de"},disabled:{type:Boolean,default:!1},presetColors:{type:Array,default:()=>[]},presetGroups:{type:Array,default:null},max:{type:Number,default:12},initialPresetCount:{type:Number,default:null},disableCustomColors:{type:Boolean,default:!1}},emits:["update:modelValue","update:presetColors"],setup(_,{emit:J}){function N(re){const X=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(re);if(!X)return{h:0,s:0,l:50};const te=parseInt(X[1],16)/255,ce=parseInt(X[2],16)/255,Ve=parseInt(X[3],16)/255,nt=Math.max(te,ce,Ve),xt=Math.min(te,ce,Ve);let dl=0,Vt=0;const sl=(nt+xt)/2;if(nt!==xt){const D=nt-xt;switch(Vt=sl>.5?D/(2-nt-xt):D/(nt+xt),nt){case te:dl=((ce-Ve)/D+(ce<Ve?6:0))/6;break;case ce:dl=((Ve-te)/D+2)/6;break;case Ve:dl=((te-ce)/D+4)/6;break}}return{h:dl*360,s:Vt*100,l:sl*100}}function L(re,X,te){X/=100,te/=100;const ce=X*Math.min(te,1-te),Ve=nt=>{const xt=(nt+re/30)%12,dl=te-ce*Math.max(Math.min(xt-3,9-xt,1),-1);return Math.round(255*dl).toString(16).padStart(2,"0")};return`#${Ve(0)}${Ve(8)}${Ve(4)}`}function oe(re){const X=re.replace(/^#/,"").match(/^([a-f\d]{6}|[a-f\d]{3})$/i);if(!X)return null;let te=X[1];return te.length===3&&(te=te.split("").map(ce=>ce+ce).join("")),"#"+te}function W(re){const X=re.match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,\/]+[\d.]+)?\s*\)$/i);if(!X)return null;const te=Math.max(0,Math.min(255,Number.parseInt(X[1],10))),ce=Math.max(0,Math.min(255,Number.parseInt(X[2],10))),Ve=Math.max(0,Math.min(255,Number.parseInt(X[3],10)));return`#${te.toString(16).padStart(2,"0")}${ce.toString(16).padStart(2,"0")}${Ve.toString(16).padStart(2,"0")}`}function A(re){if(typeof re!="string")return null;const X=re.trim();return oe(X)||W(X)}function de(re,X,te){X/=100,te/=100;const ce=te+X*Math.min(te,1-te),Ve=ce===0?0:2-2*te/ce;return{h:re,s:Ve*100,v:ce*100}}function dt(re,X,te){X/=100,te/=100;const ce=te*(1-X/2),Ve=ce===0||ce===1?0:(te-ce)/Math.min(ce,1-ce);return{h:re,s:Ve*100,l:ce*100}}const ee=_,h=J,we=e.ref(!1),ye=e.ref(!1),Q=e.ref(!1),K=e.ref(-1),he=e.ref(-1),Re=e.ref(null),ge=e.ref(null),Ae=e.ref(null),Z=e.ref(null),ze=e.ref({top:0,left:0}),Ye=e.ref(N(ee.modelValue||"#b8a5de")),_e=e.computed(()=>Array.isArray(ee.presetGroups)&&ee.presetGroups.length>0),Xe=e.computed(()=>!ee.disableCustomColors),U=e.computed(()=>_e.value?0:ee.initialPresetCount!=null?ee.initialPresetCount:he.value<0?null:he.value),He=e.computed(()=>{const re=U.value;return re==null?!0:Math.max(0,ee.presetColors.length-re)<ee.max}),Ke=e.computed(()=>!!(ye.value||K.value>=0||!ke.value&&ee.presetColors.length===0));e.computed(()=>{const re=U.value;return re!=null&&ee.presetColors.length>re});const ke=e.computed(()=>_e.value||U.value!=null),Me=e.computed(()=>{const re=U.value;return re==null?[]:ee.presetColors.slice(0,re)}),rt=e.computed(()=>{const re=U.value;return re==null?[]:ee.presetColors.slice(re)});function yt(re){const X=U.value;return X!=null?X+re:-1}function mt(re){const X=U.value;return X!=null&&re>=X}function Qt(re){mt(re)&&(K.value=re,Ye.value=N(ee.presetColors[re]),ye.value=!0,e.nextTick(()=>Z.value?.focus()))}function xe(re){if(!mt(re))return;const X=ee.presetColors.filter((Ve,nt)=>nt!==re);h("update:presetColors",X);const te=oe(ee.modelValue),ce=oe(ee.presetColors[re]);if(te&&ce&&te.toLowerCase()===ce.toLowerCase()){const Ve=X[Math.max(0,re-1)]||X[0];Ve&&h("update:modelValue",Ve)}}function Jt(){Q.value=!Q.value,Q.value||(K.value=-1,ye.value=!1)}function et(){if(!Xe.value||K.value<0)return;const re=ct.value,X=oe(re);if(X){const te=[...ee.presetColors];te[K.value]=X,h("update:presetColors",te),h("update:modelValue",X),K.value=-1,ye.value=!1}}function lt(){ee.disabled||!Xe.value||(K.value=-1,ye.value=!ye.value,ye.value&&(H(),e.nextTick(()=>Z.value?.focus())))}function kt(re){const X=A(re),te=A(ee.modelValue);return X&&te&&X.toLowerCase()===te.toLowerCase()}function Rt(){if(ee.disabled||!Xe.value||!He.value)return;const re=ct.value,X=oe(re);if(X){const te=[...ee.presetColors,X];h("update:presetColors",te),h("update:modelValue",X);const ce=U.value??he.value;ce>=0&&te.length-ce>=ee.max&&(ye.value=!1)}}const ct=e.computed(()=>{const{h:re,s:X,l:te}=Ye.value;return L(re,X,te)}),ht=e.computed(()=>ct.value.toLowerCase()),pt=e.computed(()=>({background:`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${Ye.value.h}, 100%, 50%))`})),Xt=e.computed(()=>{const re=de(Ye.value.h,Ye.value.s,Ye.value.l);return{left:`${re.s}%`,bottom:`${re.v}%`,transform:"translate(-50%, 50%)"}}),Ct=e.computed(()=>({left:`${Ye.value.h/360*100}%`,transform:"translateX(-50%)"})),Pt=e.computed(()=>({position:"fixed",left:`${ze.value.left}px`,top:`${ze.value.top}px`,zIndex:1002}));function pe(){if(!Re.value||!we.value)return;const re=Re.value.getBoundingClientRect(),X=window.innerHeight||document.documentElement.clientHeight;let te=re.bottom+4;const ce=ge.value;ce&&te+ce.offsetHeight>X-8&&(te=re.top-4-ce.offsetHeight),ze.value={top:te,left:re.left}}function H(){const re=ee.modelValue||"#b8a5de",X=A(re);X&&(Ye.value=N(X))}function Y(){h("update:modelValue",ct.value)}function ie(){ee.disabled||(we.value=!we.value,we.value&&(H(),e.nextTick(()=>{pe(),Z.value?.focus()})))}function fe(){const re=ct.value,X=oe(re);if(X){if(K.value>=0){const te=[...ee.presetColors];te[K.value]=X,h("update:presetColors",te),h("update:modelValue",X)}else if(Xe.value&&(ee.presetColors.length>0||_e.value)&&ye.value&&He.value&&!ee.presetColors.some(ce=>oe(ce)?.toLowerCase()===X.toLowerCase())){const ce=[...ee.presetColors,X];h("update:presetColors",ce),h("update:modelValue",X)}}we.value=!1,ye.value=!1,Q.value=!1,K.value=-1}function Fe(re){if(!Ae.value)return;const X=Ae.value.getBoundingClientRect(),te=ce=>{const Ve=Math.max(0,Math.min(1,(ce.clientX-X.left)/X.width)),nt=Math.max(0,Math.min(1,1-(ce.clientY-X.top)/X.height)),xt={h:Ye.value.h,s:Ve*100,v:nt*100};Ye.value=dt(xt.h,xt.s,xt.v)};te(re),document.addEventListener("mousemove",te),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",te),Y()},{once:!0})}function tt(re){if(!re.currentTarget)return;const te=re.currentTarget.getBoundingClientRect(),ce=Ve=>{const nt=Math.max(0,Math.min(1,(Ve.clientX-te.left)/te.width));Ye.value={...Ye.value,h:nt*360}};ce(re),document.addEventListener("mousemove",ce),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",ce),Y()},{once:!0})}function Et(re){const X=re.target.value,te=A(X);te&&(Ye.value=N(te),h("update:modelValue",te))}function Se(re){if(ee.disabled)return;const X=A(re);X&&(Ye.value=N(X),h("update:modelValue",X))}let ot=null,bt=null;function el(){ot&&(document.removeEventListener("keydown",ot),ot=null),bt&&(window.removeEventListener("resize",bt),bt=null)}return e.watch(we,re=>{if(el(),re){if(!_e.value&&ee.initialPresetCount==null){const X=ee.presetColors.length;X>0&&(he.value<0||X<he.value)&&(he.value=X)}ot=X=>{X.key==="Escape"&&fe()},bt=pe,document.addEventListener("keydown",ot),window.addEventListener("resize",bt)}}),e.watch(()=>ee.modelValue,()=>{we.value&&H()},{immediate:!1}),e.watch(rt,re=>{re.length===0&&(Q.value=!1,K.value=-1,ye.value=!1)}),e.onBeforeUnmount(el),(re,X)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-color-picker",{"dss-color-picker--disabled":_.disabled}])},[e.createElementVNode("div",{ref_key:"triggerRef",ref:Re,class:e.normalizeClass(["dss-color-picker__trigger",{"dss-color-picker__trigger--open":we.value}]),onClick:ie},[e.createElementVNode("span",{class:"dss-color-picker__swatch",style:e.normalizeStyle({backgroundColor:ct.value})},[...X[0]||(X[0]=[e.createElementVNode("span",{class:"dss-color-picker__hover-layer"},[e.createElementVNode("svg",{class:"dss-color-picker__pen-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M0 9.64033V11.6667C0 11.8534 0.146646 12 0.333287 12H2.35967C2.44633 12 2.53298 11.9667 2.59297 11.9L9.87196 4.62769L7.37231 2.12804L0.0999862 9.40036C0.0333288 9.46702 0 9.54701 0 9.64033ZM11.805 2.69463C12.065 2.43466 12.065 2.01472 11.805 1.75476L10.2452 0.194973C9.98528 -0.064991 9.56534 -0.064991 9.30537 0.194973L8.08554 1.4148L10.5852 3.91446L11.805 2.69463Z",fill:"currentColor"})])],-1)])],4)],2),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[we.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-color-picker__overlay",onClick:e.withModifiers(fe,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:ge,class:"dss-color-picker__dropdown",style:e.normalizeStyle(Pt.value)},[ke.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[_e.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(_.presetGroups,(te,ce)=>(e.openBlock(),e.createElementBlock("div",{key:"g-"+ce,class:"dss-color-picker__section"},[e.createElementVNode("span",sp,e.toDisplayString(te.title),1),e.createElementVNode("div",rp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.colors,(Ve,nt)=>(e.openBlock(),e.createElementBlock("button",{key:"g-"+ce+"-"+nt,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":kt(Ve)}]),style:e.normalizeStyle({backgroundColor:Ve,"--dss-preset-color":Ve}),title:Ve,onClick:e.withModifiers(xt=>Se(Ve),["stop"])},null,14,ip))),128))])]))),128)):Me.value.length?(e.openBlock(),e.createElementBlock("div",cp,[X[1]||(X[1]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Preset colors",-1)),e.createElementVNode("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me.value,(te,ce)=>(e.openBlock(),e.createElementBlock("button",{key:"p-"+ce,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":kt(te)}]),style:e.normalizeStyle({backgroundColor:te,"--dss-preset-color":te}),title:te,onClick:e.withModifiers(Ve=>Se(te),["stop"])},null,14,dp))),128))])])):e.createCommentVNode("",!0),Xe.value?(e.openBlock(),e.createElementBlock("div",mp,[e.createElementVNode("div",pp,[X[3]||(X[3]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Custom Colors",-1)),rt.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__manage-icon",{"dss-color-picker__manage-icon--active":Q.value}]),title:"Manage custom colors",onClick:e.withModifiers(Jt,["stop"])},[...X[2]||(X[2]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 9.64V11.67c0 .19.15.33.33.33h2.03c.09 0 .17-.03.23-.1l7.28-7.27-2.5-2.5L.1 9.4A.33.33 0 0 0 0 9.64ZM11.8 2.69c.26-.26.26-.68 0-.94L10.25.2a.66.66 0 0 0-.94 0L8.09 1.41l2.5 2.5 1.22-1.22Z",fill:"currentColor"})],-1)])],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",vp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value,(te,ce)=>(e.openBlock(),e.createElementBlock("div",{key:"c-"+ce,class:e.normalizeClass(["dss-color-picker__preset-wrap",{"dss-color-picker__preset-wrap--manage":Q.value}])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":!Q.value&&kt(te),"dss-color-picker__preset-bubble--editing":Q.value&&K.value===yt(ce)}]),style:e.normalizeStyle({backgroundColor:K.value===yt(ce)?ct.value:te,"--dss-preset-color":K.value===yt(ce)?ct.value:te}),title:K.value===yt(ce)?ct.value:te,onClick:e.withModifiers(Ve=>Q.value?Qt(yt(ce)):Se(te),["stop"])},null,14,fp),Q.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__preset-action dss-color-picker__preset-action--delete",title:"Delete",onClick:e.withModifiers(Ve=>xe(yt(ce)),["stop"])},[...X[4]||(X[4]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2 2l8 8M10 2L2 10",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)])],8,hp)):e.createCommentVNode("",!0)],2))),128)),He.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":ye.value}]),onClick:e.withModifiers(lt,["stop"])}," + ",2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],64)):_.presetColors.length?(e.openBlock(),e.createElementBlock("div",gp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.presetColors,(te,ce)=>(e.openBlock(),e.createElementBlock("button",{key:ce,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":kt(te)}]),style:e.normalizeStyle({backgroundColor:te,"--dss-preset-color":te}),title:te,onClick:e.withModifiers(Ve=>Se(te),["stop"])},null,14,yp))),128)),Xe.value&&He.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":ye.value}]),onClick:e.withModifiers(lt,["stop"])}," + ",2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ke.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",{class:"dss-color-picker__sl-area",ref_key:"slAreaRef",ref:Ae,onMousedown:Fe},[e.createElementVNode("div",{class:"dss-color-picker__sl-bg",style:e.normalizeStyle(pt.value)},null,4),e.createElementVNode("div",{class:"dss-color-picker__sl-pointer",style:e.normalizeStyle(Xt.value)},null,4)],544),e.createElementVNode("div",{class:"dss-color-picker__hue-wrap",onMousedown:tt},[X[5]||(X[5]=e.createElementVNode("div",{class:"dss-color-picker__hue-track"},null,-1)),e.createElementVNode("div",{class:"dss-color-picker__hue-pointer",style:e.normalizeStyle(Ct.value)},null,4)],32),e.createElementVNode("div",kp,[e.createElementVNode("input",{ref_key:"hexInputRef",ref:Z,type:"text",class:"dss-color-picker__hex-input",value:ht.value,onInput:Et},null,40,Cp)]),Xe.value&&ke.value&&(_.presetColors.length||_e.value)&&He.value&&K.value<0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__add-btn",onClick:Rt}," Save color ")):e.createCommentVNode("",!0),Xe.value&&ke.value&&K.value>=0?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-color-picker__add-btn",onClick:et}," Save color ")):e.createCommentVNode("",!0),ke.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"dss-color-picker__add-btn",onClick:fe}," Save color "))],64)):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]))],2))}},wp={key:0,class:"dss-loader"},xp={key:0,class:"dss-loader-label"},Ep={key:1,class:"dss-loader"},Sp={key:0,class:"dss-loader-label"},Vp={key:2,class:"dss-loader"},Np={key:0,class:"dss-loader-label"},Bp={key:3,class:"dss-loader"},_p={key:0,class:"dss-loader-label"},Mp={key:4,class:"dss-loader"},$p={key:0,class:"dss-loader-label"},Lp={key:5,class:"dss-loader dss-loader--inline"},Tp={class:"dss-loader-inline-text"},Dp={__name:"DSSLoaders",props:{type:{type:String,default:"spinner"},label:{type:String,default:""},size:{type:[String,Number],default:"medium"},color:{type:String,default:""}},setup(_){const J=_,N=e.computed(()=>J.size==="small"?"dss-loaders--size-small":J.size==="large"?"dss-loaders--size-large":J.size==="medium"||J.size==null?"dss-loaders--size-medium":null),L=e.computed(()=>{const oe={};if(!(J.size==="small"||J.size==="medium"||J.size==="large"||J.size==null)){const W=typeof J.size=="number"?`${J.size}px`:String(J.size);oe["--dss-loader-size"]=W}return J.color&&(oe["--dss-loader-accent"]=J.color,oe["--dss-loader-accent-soft"]=`color-mix(in srgb, ${J.color} 30%, white)`),oe});return(oe,W)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-loaders",N.value]),style:e.normalizeStyle(L.value)},[_.type==="spinner"?(e.openBlock(),e.createElementBlock("div",wp,[W[0]||(W[0]=e.createElementVNode("span",{class:"dss-loader-spinner","aria-hidden":"true"},null,-1)),_.label?(e.openBlock(),e.createElementBlock("span",xp,e.toDisplayString(_.label),1)):e.createCommentVNode("",!0)])):_.type==="dots"?(e.openBlock(),e.createElementBlock("div",Ep,[W[1]||(W[1]=e.createElementVNode("span",{class:"dss-loader-dots","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-dot"}),e.createElementVNode("span",{class:"dss-loader-dot"}),e.createElementVNode("span",{class:"dss-loader-dot"})],-1)),_.label?(e.openBlock(),e.createElementBlock("span",Sp,e.toDisplayString(_.label),1)):e.createCommentVNode("",!0)])):_.type==="battery"?(e.openBlock(),e.createElementBlock("div",Vp,[W[2]||(W[2]=e.createElementVNode("div",{class:"battery","aria-hidden":"true"},null,-1)),_.label?(e.openBlock(),e.createElementBlock("span",Np,e.toDisplayString(_.label),1)):e.createCommentVNode("",!0)])):_.type==="double-circle"?(e.openBlock(),e.createElementBlock("div",Bp,[W[3]||(W[3]=e.createElementVNode("span",{class:"dss-loader-double-circle","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-double-circle-outer"}),e.createElementVNode("span",{class:"dss-loader-double-circle-inner"})],-1)),_.label?(e.openBlock(),e.createElementBlock("span",_p,e.toDisplayString(_.label),1)):e.createCommentVNode("",!0)])):_.type==="bars"?(e.openBlock(),e.createElementBlock("div",Mp,[W[4]||(W[4]=e.createElementVNode("span",{class:"dss-loader-bars","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-bar"}),e.createElementVNode("span",{class:"dss-loader-bar"}),e.createElementVNode("span",{class:"dss-loader-bar"})],-1)),_.label?(e.openBlock(),e.createElementBlock("span",$p,e.toDisplayString(_.label),1)):e.createCommentVNode("",!0)])):_.type==="inline"?(e.openBlock(),e.createElementBlock("div",Lp,[W[5]||(W[5]=e.createElementVNode("span",{class:"dss-loader-inline-spinner","aria-hidden":"true"},null,-1)),e.createElementVNode("span",Tp,[e.renderSlot(oe.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(_.label),1)])])])):e.createCommentVNode("",!0)],6))}},Ha="dss-skeleton-item",Ap={__name:"DSSSkeleton",props:{loading:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},borderRadius:{type:String,default:"16px"},shimmer:{type:Boolean,default:!0},mode:{type:String,default:"single",validator:_=>["single","multiple"].includes(_)},targetClass:{type:String,default:Ha},bgColor:{type:String,default:null},shimmerColor:{type:String,default:null},bgDark:{type:String,default:null},shimmerDark:{type:String,default:null}},setup(_){const J=_,N=e.computed(()=>{const W={"dss-skeleton--loading":J.loading,"dss-skeleton--static":!J.shimmer,"dss-skeleton--multiple":J.mode==="multiple","dss-skeleton--dark":J.darkMode};return J.mode==="multiple"&&J.targetClass!==Ha&&(W[`dss-skeleton--target-${J.targetClass}`]=!0),W}),L=e.computed(()=>{const W={};return J.borderRadius&&(W.borderRadius=J.borderRadius),W}),oe=e.computed(()=>{const W={};return J.borderRadius&&(W["--dss-skeleton-border-radius"]=J.borderRadius),J.darkMode?(W["--dss-skeleton-bg"]=J.bgDark||"#322c3f",W["--dss-skeleton-shimmer"]=J.shimmerDark||"#3e3f41",W):(J.bgColor&&(W["--dss-skeleton-bg"]=J.bgColor),J.shimmerColor&&(W["--dss-skeleton-shimmer"]=J.shimmerColor),W)});return(W,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-skeleton",N.value]),style:e.normalizeStyle(oe.value)},[_.loading&&_.mode==="single"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-skeleton-overlay",style:e.normalizeStyle(L.value),"aria-hidden":"true"},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-skeleton-content",{"dss-skeleton-content--hidden":_.loading&&_.mode==="single"}])},[e.renderSlot(W.$slots,"default")],2)],6))}},Hp={key:0,class:"dss-dnd-column-header"},Rp={class:"dss-dnd-column-title"},Fp={class:"dss-dnd-column-count"},Ip=["data-column"],zp={key:0,class:"dss-dnd-indicator"},Pp=["onPointerdown"],Op=["onPointerdown"],Wp={class:"dss-dnd-item-content"},qp={class:"dss-dnd-item-default"},Zp={key:0,class:"dss-dnd-empty"},Up={name:"DSSDnd"},Yp=Object.assign(Up,{props:{items:{type:Array,required:!0},columns:{type:Array,required:!0},columnKey:{type:String,default:"status"},positionKey:{type:String,default:"position"},itemKey:{type:String,default:"id"},options:{type:Object,default:()=>({})}},emits:["move","delete"],setup(_,{emit:J}){const N=_,L=J,oe=e.useSlots(),W=e.computed(()=>!!oe["delete-zone"]),A={columnMinWidth:"280px",columnMaxWidth:"none",columnGap:"12px",indicatorColor:"#7c6bc4",dragGhostOpacity:.75,dragSourceBackground:"#f5f5f5",dragSourceBorder:"#e0e0e0",useHandle:!1,columnBodyMaxHeight:"none",showHeader:!0,unstyled:!1,deleteZoneAlwaysVisible:!1,ColColor:!1},de=e.computed(()=>({...A,...N.options})),dt=e.computed(()=>({"--dss-dnd-col-min-w":de.value.columnMinWidth,"--dss-dnd-col-max-w":de.value.columnMaxWidth,"--dss-dnd-col-gap":de.value.columnGap,"--dss-dnd-indicator-color":de.value.indicatorColor,"--dss-dnd-body-max-h":de.value.columnBodyMaxHeight}));function ee(pe){if(!de.value.ColColor||!pe)return{};const H=pe.background||pe.color;return H?{background:H}:{}}const h=e.ref(null),we=e.ref(null),ye=e.ref(!1),Q=e.ref(-1),K=e.ref(null);let he=null,Re=null,ge=null,Ae=null,Z=0,ze=0,Ye="",_e=null;const Xe=5,U=e.computed(()=>{const pe={};for(const H of N.columns)pe[H.value]=N.items.filter(Y=>Y[N.columnKey]===H.value).sort((Y,ie)=>(Y[N.positionKey]??0)-(ie[N.positionKey]??0));return pe}),He=e.computed(()=>{const pe={},H=!!h.value,Y=h.value?.[N.itemKey],ie=we.value,fe=Q.value;for(const Fe of N.columns){const tt=U.value[Fe.value]||[],Et=[],Se=ie==Fe.value;let ot=0;for(let bt=0;bt<tt.length;bt++){const el=tt[bt],re=H&&el[N.itemKey]===Y;!re&&Se&&fe===ot&&Et.push({type:"indicator",key:`ind-${ot}`}),re||ot++,Et.push({type:"item",item:el,isDragged:re,key:`item-${el[N.itemKey]}`})}Se&&fe>=ot&&Et.push({type:"indicator",key:"ind-end"}),pe[Fe.value]=Et}return pe});function Ke(pe,H){const ie=(U.value[pe]||[]).filter(tt=>tt[N.itemKey]!==h.value?.[N.itemKey]);if(ie.length===0)return 1;if(H<=0){const tt=ie[0][N.positionKey];return tt!=null&&tt>0?tt/2:.5}if(H>=ie.length){const tt=ie[ie.length-1][N.positionKey];return(tt??0)+1}const fe=ie[H-1][N.positionKey]??0,Fe=ie[H][N.positionKey]??0;return(fe+Fe)/2}function ke(pe,H,Y){ge&&ge.remove();const ie=pe.getBoundingClientRect(),fe=pe.cloneNode(!0);fe.classList.add("dss-dnd-ghost"),fe.style.cssText=`
102
+ </svg>`,g=e.ref(null),we=e.ref(null),ke=e.ref(!1),G=e.ref(!1),j=e.ref(!1),fe=e.ref(""),He=e.ref({}),he=e.ref(!1),Te=e.ref(!1),Z=e.ref(""),Fe=e.ref(""),qe=e.ref(null),Me=e.ref(null),Ze=e.ref(null),U=e.ref(null),Ae=e.ref(""),Ye=e.ref(!1),Ce=e.ref({}),$e=e.ref(!1),lt=e.ref({}),ft=e.ref(null),it=e.ref(null),Xt=e.ref(!1),xe=e.ref(""),Lt=e.ref(null),Ke=e.ref(""),Je=e.ref(""),mt=e.ref(""),Tt=e.ref(null),at=e.ref(null),pt=e.ref(null),ct=e.ref(null),Ut=e.ref(null),ht=e.ref(!1),Rt=e.ref(""),me=e.ref({}),F=e.ref(!1),Y=e.ref("upload"),re=e.ref(""),ve=e.ref(null),Re=e.ref(null),Ge=e.ref([]),Ct=e.ref([]),Se=e.ref(null),tt=e.ref(!1),gt=e.ref(""),jt=e.ref(""),se=e.ref(""),X=e.ref(""),te=e.ref(""),ie=e.ref(""),Ne=e.ref(null),et=e.ref(null),yt=e.ref(null),al=e.ref(!1),xt=e.ref(null),el=e.ref(!1),H=e.ref(!1),V=e.ref(null),M=e.ref("p"),ae=e.ref(!1),oe=e.ref([]),Ue=e.ref(null),bt=e.ref(null),ot=e.ref(null),Xe=e.ref(!1),Nt=e.ref(0),wt=100,ut=e.ref(null),_t=e.computed(()=>!!R.commentUser),$t=e.computed(()=>({"dss-text-editor-no-border":!R.border,"dss-text-editor-rounded":R.rounded,"dss-text-editor-full-height":R.fullHeight,"dss-comment-overlay-open":_t.value&&C.value!==null})),Et=e.computed(()=>({})),kl=e.computed(()=>!R.fixedHeight||R.fullHeight?{}:{height:`${1.6*14*R.rows+24+2}px`,resize:"none",overflowY:"auto"}),Zl=e.computed(()=>!R.fixedHeight||R.fullHeight?{}:{height:`${1.6*14*R.rows+32}px`,overflowY:"auto"}),bl=e.computed(()=>R.richText&&Ct.value.length>0),tl=e.computed(()=>{if(!R.modelValue)return"";if(R.richText){let o=R.modelValue.replace(/<script[^>]*>[\s\S]*?<\/script>/gi,"");return o=o.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,""),o=o.replace(/<[^>]+>/g,""),o=o.replace(/&nbsp;/g," "),o=o.replace(/&amp;/g,"&"),o=o.replace(/&lt;/g,"<"),o=o.replace(/&gt;/g,">"),o=o.replace(/&quot;/g,'"'),o=o.replace(/&#39;/g,"'"),o=o.replace(/\s+/g," ").trim(),o}return R.modelValue}),ol=e.computed(()=>{const o=tl.value.trim();return o?o.split(/\s+/).filter(n=>n.length>0).length:0}),un=e.computed(()=>tl.value.length),ml=e.computed(()=>ct.value!==null&&Y.value==="upload"&&Ke.value&&Ke.value.startsWith("data:")),dt=e.computed(()=>R.titlePlaceholder||L("textEditor.placeholders.title")),Hl=e.computed(()=>R.descriptionPlaceholder||L("textEditor.placeholders.description")),Ul=e.computed(()=>R.placeholder||L("textEditor.placeholders.startTyping")),Ll=o=>rt&&rt[o]!==void 0,Wn=o=>{for(let n=o+1;n<R.customToolbarSlots.length;n++)if(Ll(R.customToolbarSlots[n]))return!0;return!1},Yl=o=>{for(let n=o+1;n<R.customToolbarSlots.length;n++){const s=R.customToolbarSlots[n];if(Ll(s)&&bn(s))return!0}return!1},bn=o=>R.customToolbarFloatingMap.hasOwnProperty(o)?R.customToolbarFloatingMap[o]===!0:!0,$n=e.computed(()=>R.customToolbarSlots.some(o=>Ll(o)&&bn(o))),tn=e.computed(()=>Ll("title-slot")),_l=e.computed(()=>Ll("description-slot")),dn=o=>{if(!o||o.trim()==="")return"<html></html>";const n=o.trim();return n.startsWith("<html>")&&n.endsWith("</html>")?o:`<html>${o}</html>`},wl=o=>{if(!o||o.trim()==="")return"";const n=o.replace(/<!--[\s\S]*?-->/g,""),s=n.trim();return s.startsWith("<html>")&&s.endsWith("</html>")?s.slice(6,-7).trim():n},mn=o=>{if(!o)return;const n=document.createTreeWalker(o,NodeFilter.SHOW_COMMENT,null,!1),s=[];let i=n.nextNode();for(;i;)s.push(i),i=n.nextNode();s.forEach(c=>c.remove())},zl=o=>{try{const n=String(o.getDate()).padStart(2,"0"),i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o.getMonth()],c=o.getFullYear();return`${n} ${i} ${c}`}catch{return""}},pn=o=>{if(!o||typeof o!="string")return!1;const n=o.trim();if(!n)return!1;if(["Started conversation","A démarré la conversation","started_conversation","conv_started"].includes(n))return!0;try{const c=L("textEditor.started_conversation");if(c&&n===c)return!0}catch{}const i=n.toLowerCase();return i.includes("started conversation")||i.includes("démarré la conversation")||i==="started conversation"||i==="a démarré la conversation"},ln=o=>{const n=o.target.value;ue("update:modelValue",n),ue("change",n)},ll=()=>{if(!Ne.value)return;const o=Ne.value;if(o.style.setProperty("text-overflow","","important"),o.style.setProperty("white-space","","important"),o.style.setProperty("overflow-x","","important"),o.style.setProperty("height","auto","important"),o.value.trim()===""){const i=o.value;o.value="M";const c=o.scrollHeight;o.value=i,o.style.setProperty("height",`${c}px`,"important"),o.style.setProperty("overflow-y","hidden","important");return}o.offsetHeight;const s=o.scrollHeight;o.style.setProperty("height",`${s}px`,"important"),o.style.setProperty("overflow-y","hidden","important")},Gn=()=>{el.value=!0,ll()},qn=()=>{el.value=!1,Rl()},Rl=()=>{if(!Ne.value)return;const o=Ne.value;o.style.setProperty("text-overflow","","important"),o.style.setProperty("white-space","","important"),o.style.setProperty("overflow-x","","important"),o.style.setProperty("height","auto","important");const n=o.value;o.value="M";const s=o.scrollHeight;o.value=n,o.offsetHeight,o.style.setProperty("height",`${s}px`,"important"),o.style.setProperty("overflow-y","hidden","important"),o.style.setProperty("overflow-x","hidden","important"),o.style.setProperty("text-overflow","ellipsis","important"),o.style.setProperty("white-space","nowrap","important")},vn=o=>{const s=o.target.value;el.value&&ll(),ue("update:title",s),ue("title-change",s),yt.value="title",R.richText&&(tt.value||(jt.value=gt.value,te.value=se.value,ie.value=X.value),Se.value&&clearTimeout(Se.value),tt.value=!0,Se.value=setTimeout(()=>{tt.value=!1,Dt()},500))},Ml=()=>{if(!et.value)return;const o=et.value;if(o.style.setProperty("text-overflow","","important"),o.style.setProperty("white-space","","important"),o.style.setProperty("overflow-x","","important"),o.style.setProperty("height","auto","important"),o.value.trim()===""){const i=o.value;o.value="M";const c=o.scrollHeight;o.value=i,o.style.setProperty("height",`${c}px`,"important"),o.style.setProperty("overflow-y","hidden","important");return}o.offsetHeight;const s=o.scrollHeight;o.style.setProperty("height",`${s}px`,"important"),o.style.setProperty("overflow-y","hidden","important")},Qn=()=>{H.value=!0,Ml()},nn=()=>{H.value=!1,sl()},sl=()=>{if(!et.value)return;const o=et.value;o.style.setProperty("text-overflow","","important"),o.style.setProperty("white-space","","important"),o.style.setProperty("overflow-x","","important"),o.style.setProperty("height","auto","important");const n=o.value;o.value="M";const s=o.scrollHeight;o.value=n,o.offsetHeight,o.style.setProperty("height",`${s}px`,"important"),o.style.setProperty("overflow-y","hidden","important"),o.style.setProperty("overflow-x","hidden","important"),o.style.setProperty("text-overflow","ellipsis","important"),o.style.setProperty("white-space","nowrap","important")},Wt=o=>{const s=o.target.value;H.value&&Ml(),ue("update:description",s),ue("description-change",s),yt.value="description",R.richText&&(tt.value||(jt.value=gt.value,te.value=se.value,ie.value=X.value),Se.value&&clearTimeout(Se.value),tt.value=!0,Se.value=setTimeout(()=>{tt.value=!1,Dt()},500))},qt=()=>{const o=window.getSelection();if(o.rangeCount===0)return null;const n=o.getRangeAt(0);if(n.startContainer.nodeType===1)return{type:"element",element:n.startContainer,offset:n.startOffset};const s=n.cloneRange();return s.selectNodeContents(g.value),s.setEnd(n.startContainer,n.startOffset),{type:"text",start:s.toString().length,end:s.toString().length+n.toString().length}},vl=o=>{if(!(!o||!g.value))try{const n=window.getSelection(),s=document.createRange();if(o.type==="element"&&o.element)if(g.value.contains(o.element)){s.setStart(o.element,o.offset),s.collapse(!0),n.removeAllRanges(),n.addRange(s);return}else{g.value.focus();return}let i=0;const c=[g.value];let m=null,u=!1,v=!1;for(;!v&&(m=c.pop());)if(m.nodeType===3){const y=i+m.length;!u&&o.start>=i&&o.start<=y&&(s.setStart(m,o.start-i),u=!0),u&&o.end>=i&&o.end<=y&&(s.setEnd(m,o.end-i),v=!0),i=y}else{let y=m.childNodes.length;for(;y--;)c.push(m.childNodes[y])}n.removeAllRanges(),n.addRange(s)}catch{g.value.focus()}},Pl=()=>{if(!g.value)return;g.value.focus();const o=window.getSelection(),n=document.createRange(),s=c=>{if(c.nodeType===3||c.childNodes.length===0)return c;for(let m=c.childNodes.length-1;m>=0;m--){const u=c.childNodes[m],v=s(u);if(v)return v}return c},i=s(g.value);if(i.nodeType===3)n.setStart(i,i.length),n.setEnd(i,i.length);else if(i.childNodes.length>0){const c=s(i);c&&c.nodeType===3?(n.setStart(c,c.length),n.setEnd(c,c.length)):(n.selectNodeContents(i),n.collapse(!1))}else n.setStart(i,0),n.setEnd(i,0);o.removeAllRanges(),o.addRange(n)},Dt=(o=!1)=>{if(!g.value)return;const n=g.value.innerHTML,s=R.title||"",i=R.description||"";if(!o&&n===gt.value&&s===se.value&&i===X.value)return;const c={content:jt.value||gt.value,title:te.value!==void 0?te.value:se.value,description:ie.value!==void 0?ie.value:X.value},m=Ge.value.length>0?Ge.value[Ge.value.length-1]:null;let u=!0;m&&(typeof m=="string"?u=c.content!==m:u=c.content!==m.content||c.title!==m.title||c.description!==m.description),u&&(Ge.value.push(c),Ge.value.length>50&&Ge.value.shift(),Ct.value=[]),gt.value=n,se.value=s,X.value=i,jt.value=n,te.value=s,ie.value=i},kt=o=>{if(!g.value)return;xl(),g.value&&mn(g.value);let n=null;g.value&&(g.value.querySelector("p")||(n=qt(),El()));const s=o&&o.inputType&&(o.inputType==="insertText"||o.inputType==="insertCompositionText"||o.inputType==="deleteContentBackward"||o.inputType==="deleteContentForward");s&&V.value&&(V.value=null),G.value=!0;const i=g.value.innerHTML.replace(/<!--[\s\S]*?-->/g,"").replace(/&nbsp;|\u00A0/g," "),c=dn(i);ue("update:modelValue",c),ue("change",c),yt.value="editor",tt.value||(jt.value=gt.value,te.value=se.value,ie.value=X.value),Se.value&&clearTimeout(Se.value),tt.value=!0,Se.value=setTimeout(()=>{tt.value=!1,Dt(),aa(),ca()},500),e.nextTick(()=>{n&&vl(n),xl();const m=["bold","italic","underline"],u=window.getSelection(),v=u.rangeCount>0?u.getRangeAt(0):null,y=v&&v.collapsed;if(m.forEach(w=>{try{if(y&&V.value?.command===w){Ce.value[w]=V.value.state;return}if(w==="bold")if(v){const I=v.commonAncestorContainer,O=I.nodeType===3?I.parentElement:I;let D=!1;if(O&&((O.tagName==="STRONG"||O.tagName==="B"||O.closest&&O.closest("strong, b"))&&(D=!0),!D&&O.style&&parseInt(O.style.fontWeight)>=600&&(D=!0),!D))try{const ce=window.getComputedStyle(O);parseInt(ce.fontWeight)>=600&&(D=!0)}catch{}Ce.value[w]=D}else Ce.value.hasOwnProperty(w)||(Ce.value[w]=!1);else if(w==="italic")if(v){const I=v.commonAncestorContainer,O=I.nodeType===3?I.parentElement:I,D=O&&(O.tagName==="EM"||O.tagName==="I"||O.closest&&O.closest("em, i"));Ce.value[w]=!!D}else{const I=document.queryCommandState(w);Ce.value[w]=I}else{const I=document.queryCommandState(w);Ce.value[w]=I}}catch{}}),nl(),gl(),$l(),rl(),Vn(),nt("handleRichTextInput"),s&&(o.inputType==="insertText"||o.inputType==="insertCompositionText")){const w=o.data||"";w&&w.length===1&&setTimeout(()=>ca(w),0),(w===" "||w===`
103
+ `||/[.,;:!?]/.test(w))&&setTimeout(()=>{aa()},100)}G.value=!1})},xl=()=>{if(!g.value)return;const o=window.getSelection();if(!o||o.rangeCount===0)return;const n=o.getRangeAt(0),s=n.commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(!i)return;const c=i.closest(".dss-image-wrapper");if(c){const m=c.querySelector("img");if(i!==m&&!m?.contains(i)){const u=n.startContainer.nodeType===3?n.startContainer.parentElement:n.startContainer,v=n.endContainer.nodeType===3?n.endContainer.parentElement:n.endContainer;if(c.contains(u)&&u!==m||c.contains(v)&&v!==m){const y=document.createRange();y.setStartAfter(c),y.collapse(!0),o.removeAllRanges(),o.addRange(y)}}}},El=()=>{if(!g.value)return;const o=g.value;if(o.querySelector&&o.querySelector("p"))return;const n=new Set(["P","H1","H2","H3","H4","H5","H6","BLOCKQUOTE","UL","OL","DIV"]),s=Array.from(o.childNodes);let i=null;s.forEach(c=>{if(c.nodeType===Node.TEXT_NODE){if((c.textContent||"").trim()===""){c.parentNode===o&&o.removeChild(c);return}i||(i=document.createElement("p"),o.insertBefore(i,c)),i.appendChild(c);return}if(c.nodeType===Node.ELEMENT_NODE){const m=c,u=m.tagName;if(u==="BR"){i=null;return}if(n.has(u)){i=null;return}i||(i=document.createElement("p"),o.insertBefore(i,m)),i.appendChild(m)}})},gl=()=>{if(g.value&&!al.value){al.value=!0;try{g.value.querySelectorAll(".dss-image-wrapper").forEach(i=>{i.querySelector("img")||i.remove()}),g.value.querySelectorAll(".dss-image-no-alt-icon").forEach(i=>{const c=i.parentElement;!c||!c.classList.contains("dss-image-wrapper")?i.remove():c.querySelector("img")||i.remove()}),g.value.querySelectorAll("img").forEach(i=>{let c=i.getAttribute("alt");c===null&&(c=i.alt||"");const m=i.getAttribute("src")||i.src||"";if(c){const w=m.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),I=c===m||c===w;(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("data:")||I||I)&&(c="")}i.setAttribute("alt",c),i.setAttribute("data-alt",c);const u=!c||c.trim()==="";let v=i.parentElement;const y=v&&v.classList.contains("dss-image-wrapper");if(y){const w=v.querySelector(".dss-image-no-alt-icon");w&&w.remove()}else{const w=i.nextElementSibling?.classList.contains("dss-image-no-alt-icon")?i.nextElementSibling:null;w&&w.remove()}if(u){y?v.setAttribute("contenteditable","false"):(v=document.createElement("span"),v.className="dss-image-wrapper",v.setAttribute("contenteditable","false"),i.parentNode.insertBefore(v,i),v.appendChild(i));const w=document.createElement("div");w.className="dss-image-no-alt-icon",w.setAttribute("contenteditable","false"),w.innerHTML=ee,v.appendChild(w)}else if(y&&v.children.length===1){const w=v.parentNode;w.insertBefore(i,v),w.removeChild(v)}})}finally{al.value=!1}}},Xl=o=>{aa(),ue("blur",o),ta()},Fl=()=>{if(R.disabled||!R.richText||!g.value)return;Kt(),Se.value&&(clearTimeout(Se.value),Se.value=null),tt.value&&(Dt(),tt.value=!1);const o=yt.value==="title",n=yt.value==="description",s=yt.value==="editor";if(Ge.value.length===0){o&&Ne.value?Ne.value.focus():n&&et.value?et.value.focus():g.value.focus(),document.execCommand("undo",!1),e.nextTick(()=>{kt()});return}const i={content:g.value.innerHTML,title:R.title||"",description:R.description||""};Ct.value.push(i);const c=Ge.value.pop();if(c!==void 0){G.value=!0;const m=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",v=typeof c=="object"&&c.description||"";g.value.innerHTML=m,gt.value=m,se.value=u,X.value=v,jt.value=m,te.value=u,ie.value=v,e.nextTick(()=>{nl(),yl(),Al(),rl();const y=dn(m);ue("update:modelValue",y),ue("update:title",u),ue("update:description",v),ue("change",y),ue("title-change",u),ue("description-change",v),G.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(Ne.value){Ne.value.focus();const w=u.length;Ne.value.setSelectionRange&&Ne.value.setSelectionRange(w,w),ll()}}else if(n){if(et.value){et.value.focus();const w=v.length;et.value.setSelectionRange(w,w)}}else if(s)Pl();else if(Ne.value&&document.activeElement===Ne.value){const w=u.length;Ne.value.setSelectionRange&&Ne.value.setSelectionRange(w,w),ll()}else if(et.value&&document.activeElement===et.value){const w=v.length;et.value.setSelectionRange(w,w)}else g.value&&Pl()},10)})})}},fn=()=>{if(R.disabled||!R.richText||!g.value)return;Kt();const o=yt.value==="title",n=yt.value==="description",s=yt.value==="editor";if(Ct.value.length===0){o&&Ne.value?Ne.value.focus():n&&et.value?et.value.focus():g.value.focus(),document.execCommand("redo",!1),e.nextTick(()=>{kt()});return}const i={content:g.value.innerHTML,title:R.title||"",description:R.description||""};Ge.value.push(i);const c=Ct.value.pop();if(c!==void 0){G.value=!0;const m=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",v=typeof c=="object"&&c.description||"";g.value.innerHTML=m,gt.value=m,se.value=u,X.value=v,jt.value=m,te.value=u,ie.value=v,e.nextTick(()=>{nl(),yl(),Al(),rl();const y=dn(m);ue("update:modelValue",y),ue("update:title",u),ue("update:description",v),ue("change",y),ue("title-change",u),ue("description-change",v),G.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(Ne.value){Ne.value.focus();const w=u.length;Ne.value.setSelectionRange&&Ne.value.setSelectionRange(w,w),ll()}}else if(n){if(et.value){et.value.focus();const w=v.length;et.value.setSelectionRange(w,w)}}else if(s)Pl();else if(Ne.value&&document.activeElement===Ne.value){const w=u.length;Ne.value.setSelectionRange&&Ne.value.setSelectionRange(w,w),ll()}else if(et.value&&document.activeElement===et.value){const w=v.length;et.value.setSelectionRange(w,w)}else g.value&&Pl()},10)})})}},hn=()=>{if(!g.value)return;g.value.querySelectorAll('span[style*="font-weight"]').forEach(i=>{const c=i.style.fontWeight;if(c==="normal"||c==="400"){const m=document.createDocumentFragment();for(;i.firstChild;)m.appendChild(i.firstChild);i.parentNode&&i.parentNode.replaceChild(m,i)}}),g.value.querySelectorAll('span[style*="font-weight"]').forEach(i=>{if(parseInt(i.style.fontWeight)>=600){const m=document.createElement("b");for(m.style.fontWeight="600";i.firstChild;)m.appendChild(i.firstChild);i.parentNode&&i.parentNode.replaceChild(m,i)}}),g.value.querySelectorAll("b, strong").forEach(i=>{i.style.fontWeight="600"})},$l=()=>{if(!g.value)return;g.value.querySelectorAll("i, em").forEach(n=>{n.style.fontStyle="italic"})},Yt=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const n=o.getRangeAt(0);let s=!1;if(n.collapsed){const i=n.startContainer;let c=i.nodeType===3?i.parentElement:i;for(;c&&c!==g.value;){if(c.tagName==="EM"||c.tagName==="I"){s=!0;break}if(c.style&&c.style.fontStyle==="italic"){s=!0;break}c=c.parentElement}}else{const i=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer:n.commonAncestorContainer.parentNode;if(i){const c=document.createTreeWalker(i,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let m;for(;m=c.nextNode();)if(!(typeof n.intersectsNode=="function"&&!n.intersectsNode(m))){if(m.nodeType===3){let u=m.parentElement;for(;u&&u!==g.value;){if(u.tagName==="EM"||u.tagName==="I"){s=!0;break}if(u.style&&u.style.fontStyle==="italic"){s=!0;break}u=u.parentElement}}else if(m.nodeType===1){const u=m;if(u.tagName==="EM"||u.tagName==="I"){s=!0;break}if(u.style&&u.style.fontStyle==="italic"){s=!0;break}}if(s)break}}}if(s)return document.execCommand("italic",!1),e.nextTick(()=>{$l()}),!1;if(n.collapsed)document.execCommand("italic",!1),e.nextTick(()=>{$l()});else try{const i=n.extractContents(),c=document.createElement("em");c.style.fontStyle="italic",c.appendChild(i),n.insertNode(c),n.setStartAfter(c),n.collapse(!0),o.removeAllRanges(),o.addRange(n),e.nextTick(()=>{$l()})}catch{document.execCommand("italic",!1),e.nextTick(()=>{$l()})}return!0},an=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const n=o.getRangeAt(0);let s=!1;if(n.collapsed){const i=n.startContainer;let c=i.nodeType===3?i.parentElement:i;for(;c&&c!==g.value;){if(c.tagName==="STRONG"||c.tagName==="B"){s=!0;break}if(c.style&&parseInt(c.style.fontWeight)>=600){s=!0;break}c=c.parentElement}}else{const i=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer:n.commonAncestorContainer.parentNode;if(i){const c=document.createTreeWalker(i,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let m;for(;m=c.nextNode();)if(!(typeof n.intersectsNode=="function"&&!n.intersectsNode(m))){if(m.nodeType===3){let u=m.parentElement;for(;u&&u!==g.value;){if(u.tagName==="STRONG"||u.tagName==="B"){s=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){s=!0;break}u=u.parentElement}}else if(m.nodeType===1){const u=m;if(u.tagName==="STRONG"||u.tagName==="B"){s=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){s=!0;break}}if(s)break}}}if(s)return document.execCommand("bold",!1),e.nextTick(()=>{hn()}),!1;if(n.collapsed)document.execCommand("bold",!1),e.nextTick(()=>{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0),m=c.startContainer;let u=m.nodeType===3?m.parentElement:m;for(;u&&u!==g.value;){if(u.tagName==="SPAN"&&u.style.fontWeight){const v=u.style.fontWeight;if(v==="normal"||v==="400"){const y=document.createElement("b");y.style.fontWeight="600";const w=document.createDocumentFragment();for(;u.firstChild;)w.appendChild(u.firstChild);y.appendChild(w),u.parentNode&&u.parentNode.replaceChild(y,u),c.setStart(y,0),c.collapse(!0),i.removeAllRanges(),i.addRange(c);break}}else if(u.tagName==="STRONG"||u.tagName==="B"){u.style.fontWeight="600";break}u=u.parentElement}if(!u||u===g.value){const v=document.createElement("b");v.style.fontWeight="600",v.innerHTML="<br>",c.insertNode(v),c.setStart(v,0),c.collapse(!0),i.removeAllRanges(),i.addRange(c)}}hn()});else try{const i=n.extractContents(),c=document.createElement("b");c.style.fontWeight="600",c.appendChild(i),n.insertNode(c),n.setStartAfter(c),n.collapse(!0),o.removeAllRanges(),o.addRange(n),e.nextTick(()=>{hn()})}catch{document.execCommand("bold",!1),e.nextTick(()=>{hn()})}return!0},Sl=(o,n=null)=>{if(R.disabled||!R.richText||!g.value)return;tt.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Dt(),tt.value=!1):Dt(),Kt(),g.value.focus();const s=window.getSelection();let i=null;if(s&&s.rangeCount>0){const m=s.getRangeAt(0);!m.collapsed&&An(m)&&(i=qt())}if(o==="createLink"&&n){const m=window.getSelection();if(m.rangeCount>0){const u=m.getRangeAt(0);if(u.collapsed)try{u.expand("word")}catch{const y=document.createTextNode(n);u.insertNode(y),u.selectNodeContents(y)}}}if(o==="bold"){const m=an();Ce.value.bold=m;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(V.value={command:"bold",state:m}),e.nextTick(()=>{i&&(vl(i),e.nextTick(()=>{const v=St("bold");Ce.value.bold=v})),kt(),yl(),rl()});return}if(o==="italic"){const m=Yt();Ce.value.italic=m;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(V.value={command:"italic",state:m}),e.nextTick(()=>{i&&(vl(i),e.nextTick(()=>{const v=St("italic");Ce.value.italic=v})),kt(),$l(),yl(),rl()});return}let c=!1;try{c=document.execCommand(o,!1,n)}catch{}e.nextTick(()=>{if(i&&vl(i),["bold","italic","underline"].includes(o))try{if(o==="bold")i&&e.nextTick(()=>{const u=St("bold");Ce.value.bold=u});else if(o==="italic")if(i)e.nextTick(()=>{const u=St("italic");Ce.value.italic=u});else{const u=document.queryCommandState(o);Ce.value[o]=u}else{const u=document.queryCommandState(o);Ce.value[o]=u}}catch{Ce.value.hasOwnProperty(o)?Ce.value[o]=!Ce.value[o]:Ce.value[o]=!0}if(o==="createLink"&&n){const u=window.getSelection();if(u.rangeCount>0){const y=u.getRangeAt(0),w=y.commonAncestorContainer.nodeType===1?y.commonAncestorContainer.closest("a"):y.commonAncestorContainer.parentElement?.closest("a");w&&(!w.getAttribute("href")||w.getAttribute("href")==="")&&w.setAttribute("href",n)}g.value.querySelectorAll("a").forEach(y=>{const w=y.getAttribute("href");(!w||w===""||w==="#")&&y.setAttribute("href",n)})}kt(),yl(),rl()})},St=(o,n=null)=>{if(R.disabled||!g.value)return!1;try{if(o==="formatBlock"&&n){const i=document.queryCommandValue("formatBlock");if(n==="<blockquote>"){const c=i.toLowerCase();if(c==="blockquote"||c==="<blockquote>")return!0;const m=window.getSelection();if(m.rangeCount>0){const v=m.getRangeAt(0).commonAncestorContainer;return!!(v.nodeType===1?v.tagName==="BLOCKQUOTE"?v:v.closest("blockquote"):v.parentElement?.closest("blockquote"))}}return i===n||i.toLowerCase()===n.toLowerCase()}if(["bold","italic","underline"].includes(o))try{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0);if(o==="bold"){let u=!1;if(c.collapsed){const v=c.commonAncestorContainer,y=v.nodeType===3?v.parentElement:v;if(y&&((y.tagName==="STRONG"||y.tagName==="B"||y.closest&&y.closest("strong, b"))&&(u=!0),!u&&y.style&&parseInt(y.style.fontWeight)>=600&&(u=!0),!u))try{const w=window.getComputedStyle(y);parseInt(w.fontWeight)>=600&&(u=!0)}catch{}return Ce.value.hasOwnProperty(o)?Ce.value[o]:(Ce.value[o]=u,u)}else{const v=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let y=!1;if(v){const w=document.createTreeWalker(v,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let I;for(;I=w.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(I))){if(I.nodeType===3){if(!(I.textContent||"").trim())continue;y=!0;let D=I.parentElement;for(;D&&D!==g.value;){if(D.tagName==="STRONG"||D.tagName==="B"){u=!0;break}if(D.style&&parseInt(D.style.fontWeight)>=600){u=!0;break}D=D.parentElement}}else if(I.nodeType===1){const O=I;if(O.tagName==="STRONG"||O.tagName==="B"){u=!0;break}if(O.style&&parseInt(O.style.fontWeight)>=600){u=!0;break}}if(u)break}}return Ce.value[o]=u&&y,u&&y}}if(o==="italic"){let u=!1;if(c.collapsed){const v=c.commonAncestorContainer,y=v.nodeType===3?v.parentElement:v;if(y&&((y.tagName==="EM"||y.tagName==="I"||y.closest&&y.closest("em, i"))&&(u=!0),!u&&y.style&&y.style.fontStyle==="italic"&&(u=!0),!u))try{window.getComputedStyle(y).fontStyle==="italic"&&(u=!0)}catch{}return Ce.value.hasOwnProperty(o)?Ce.value[o]:(Ce.value[o]=u,u)}else{const v=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let y=!1;if(v){const w=document.createTreeWalker(v,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let I;for(;I=w.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(I))){if(I.nodeType===3){if(!(I.textContent||"").trim())continue;y=!0;let D=I.parentElement;for(;D&&D!==g.value;){if(D.tagName==="EM"||D.tagName==="I"){u=!0;break}if(D.style&&D.style.fontStyle==="italic"){u=!0;break}D=D.parentElement}}else if(I.nodeType===1){const O=I;if(O.tagName==="EM"||O.tagName==="I"){u=!0;break}if(O.style&&O.style.fontStyle==="italic"){u=!0;break}}if(u)break}}return Ce.value[o]=u&&y,u&&y}}const m=document.queryCommandState(o);return c.collapsed&&Ce.value.hasOwnProperty(o)?Ce.value[o]:(Ce.value[o]=m,m)}return Ce.value.hasOwnProperty(o)?Ce.value[o]:!1}catch{return Ce.value.hasOwnProperty(o)?Ce.value[o]:!1}try{return document.queryCommandState(o)}catch{return!1}}catch{return!1}},Dn=o=>{R.disabled||!R.richText||(we.value=we.value===o?null:o,o==="askAi"&&(it.value=null))},Kt=()=>{we.value=null,ve.value=null},Vl=o=>{Sl("formatBlock",o),Kt()},gn=o=>{if(!o||!g.value)return o;const n=Pe=>{let De=Pe.nodeType===Node.TEXT_NODE?Pe.parentElement:Pe;for(;De&&De!==g.value;){const vt=De.tagName;if(vt==="P"){const Ot=De.parentElement;if(Ot===g.value||Ot.tagName==="BLOCKQUOTE")return De}if(vt==="BLOCKQUOTE")break;De=De.parentElement}return null},s=n(o.startContainer),i=n(o.endContainer);if(!s||!i)return o;const c=[],m=document.createTreeWalker(g.value,NodeFilter.SHOW_ELEMENT,{acceptNode:Pe=>{const De=Pe.tagName;if(De==="P"){const vt=Pe.parentElement;if(vt===g.value||vt.tagName==="BLOCKQUOTE")return NodeFilter.FILTER_ACCEPT}return De==="BLOCKQUOTE"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}});let u;for(;u=m.nextNode();)c.push(u);const v=c.indexOf(s),y=c.indexOf(i);if(v===-1||y===-1)return o;const w=Math.min(v,y),I=Math.max(v,y),O=c.slice(w,I+1);if(O.length===0)return o;const D=O[0],ce=O[O.length-1],le=document.createRange();return le.setStartBefore(D),le.setEndAfter(ce),le},wn=()=>{if(R.disabled||!R.richText||!g.value)return;tt.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Dt(),tt.value=!1):Dt(),Kt(),g.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;let n=o.getRangeAt(0);!n.collapsed&&An(n)&&(n=gn(n),o.removeAllRanges(),o.addRange(n));let s=null;!n.collapsed&&An(n)&&(s=qt());const i=n.commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&g.value.contains(c))){if(c){const u=c.parentNode;Array.from(c.childNodes).forEach(y=>{if(y.nodeType===Node.ELEMENT_NODE)if(y.tagName==="P"||y.tagName==="DIV")u.insertBefore(y,c);else{const w=document.createElement("p");w.appendChild(y.cloneNode(!0)),u.insertBefore(w,c)}else if(y.nodeType===Node.TEXT_NODE&&y.textContent.trim()){const w=document.createElement("p");w.appendChild(y.cloneNode(!0)),u.insertBefore(w,c)}}),c.remove()}}else if(n.collapsed)document.execCommand("formatBlock",!1,"<blockquote>");else{const u=document.createElement("blockquote"),v=n.extractContents();u.appendChild(v),n.insertNode(u);const y=[],w=document.createTreeWalker(u,NodeFilter.SHOW_TEXT,{acceptNode:D=>D.parentNode===u&&D.textContent.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let I;for(;I=w.nextNode();)y.push(I);if(y.forEach(D=>{const ce=document.createElement("p");D.parentNode.insertBefore(ce,D),ce.appendChild(D)}),u.querySelectorAll("p, div").forEach(D=>{D.textContent.trim()===""&&!D.querySelector("img")&&(D.innerHTML="<br>")}),u.children.length===0&&u.textContent.trim()===""){const D=document.createElement("p");D.innerHTML="<br>",u.appendChild(D)}}e.nextTick(()=>{s&&vl(s),Al(),kt(),rl()})},on=()=>{if(!g.value)return;const o=window.getSelection();if(o.rangeCount===0)return;const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.tagName==="BLOCKQUOTE"?s:s.closest("blockquote"):s.parentElement?.closest("blockquote");if(!i||!g.value.contains(i))return;const c=I=>{if(!I)return!1;const O=I.textContent||"",ce=(I.innerHTML||"").trim();return O.trim()===""||ce===""||ce==="<br>"||ce==="<br/>"||ce==="<p></p>"||ce==="<p><br></p>"||ce==="<p><br/></p>"||ce==="<p> </p>"||ce==="<p><br> </p>"||ce==="<div></div>"||ce==="<div><br></div>"||ce==="<div><br/></div>"};let m=null;for(s.nodeType===3?m=s.parentElement:s.tagName==="P"||s.tagName==="DIV"?m=s:m=s.closest("p, div"),m&&i.contains(m)&&c(m)&&m.remove();i.lastChild;){const I=i.lastChild;if(I.nodeType===1&&I.tagName==="BR")I.remove();else if(I.nodeType===3)if((I.textContent||"").trim()==="")I.remove();else break;else break}if(i.children.length>0)for(let I=i.children.length-1;I>=0;I--){const O=i.children[I];if((O.tagName==="P"||O.tagName==="DIV")&&c(O))O.remove();else break}let u=i.innerHTML;const v=u;u=u.replace(/(<br\s*\/?>)+$/gi,""),u!==v&&(i.innerHTML=u);const y=document.createElement("p");y.innerHTML="<br>",i.parentNode?i.nextSibling?i.parentNode.insertBefore(y,i.nextSibling):i.parentNode.appendChild(y):g.value&&g.value.appendChild(y);const w=document.createRange();w.selectNodeContents(y),w.collapse(!0),o.removeAllRanges(),o.addRange(w),e.nextTick(()=>{Al(),kt()})},yl=()=>{if(!g.value){ke.value=!1;return}try{const o=window.getSelection();if(o.rangeCount>0){const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");ke.value=!!i}else ke.value=!1}catch{ke.value=!1}},Ln=()=>{if(!g.value)return;const o=window.getSelection();o&&o.rangeCount>0&&o.getRangeAt(0),U.value=qt();const n=window.getSelection();let s="";n.rangeCount>0&&(s=n.getRangeAt(0).toString()),Z.value="",Fe.value=s,Ae.value="",Ze.value=null,Te.value=!0,Kt(),e.nextTick(()=>{qe.value&&qe.value.focus()})},jl=()=>{if(!g.value)return;tt.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Dt(),tt.value=!1):Dt();const o=window.getSelection();let n=null;if(o.rangeCount>0){const i=o.getRangeAt(0).commonAncestorContainer;n=i.nodeType===1?i.closest("a"):i.parentElement?.closest("a")}if(!n&&Ze.value&&(n=Ze.value),n&&n.parentNode){const s=document.createDocumentFragment();for(;n.firstChild;)s.appendChild(n.firstChild);if(n.parentNode.replaceChild(s,n),s.firstChild){const i=document.createRange();i.setStartBefore(s.firstChild),i.setEndAfter(s.lastChild||s.firstChild),o.removeAllRanges(),o.addRange(i),document.execCommand("removeFormat",!1),i.collapse(!1),o.removeAllRanges(),o.addRange(i)}Ze.value=null}else Sl("unlink");ke.value=!1,Kt(),e.nextTick(()=>{kt(),yl()})},sn=()=>{R.disabled||!R.richText||g.value&&(tt.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Dt(),tt.value=!1):Dt(),Kt(),g.value.focus(),document.execCommand("insertUnorderedList",!1),e.nextTick(()=>{nl(),kt(),rl()}))},Tl=()=>{R.disabled||!R.richText||g.value&&(tt.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Dt(),tt.value=!1):Dt(),Kt(),g.value.focus(),document.execCommand("insertOrderedList",!1),e.nextTick(()=>{nl(),kt(),rl()}))},Kl=o=>{const n=o.parentElement;if(!n||n.tagName!=="OL")return null;let s=0,i=o.previousElementSibling;for(;i;)i.tagName==="LI"&&s++,i=i.previousElementSibling;return s+1},nl=()=>{if(!g.value)return;g.value.querySelectorAll("li > ol").forEach(n=>{const s=n.parentElement;if(s&&s.tagName==="LI"){const i=Kl(s);i!==null&&Array.from(n.children).filter(m=>m.tagName==="LI").forEach(m=>{m.setAttribute("data-parent-num",String(i))})}})},Ol=()=>{if(R.disabled||!R.richText||!g.value)return;Kt(),g.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const n=o.getRangeAt(0),s=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer.closest("li"):n.commonAncestorContainer.parentElement?.closest("li");if(!s){document.execCommand("indent",!1),e.nextTick(()=>{nl(),kt()});return}const i=s.parentElement;if(!i||i.tagName!=="OL"&&i.tagName!=="UL")return;const c=s.previousElementSibling;if(c&&c.tagName==="LI"){const m=i.tagName.toLowerCase();let u=c.querySelector(`:scope > ${m}`);u||(u=document.createElement(m),c.appendChild(u));const v=Kl(c);u.appendChild(s),v!==null&&i.tagName==="OL"&&s.setAttribute("data-parent-num",String(v)),nl();const y=document.createRange();y.selectNodeContents(s),y.collapse(!1),o.removeAllRanges(),o.addRange(y),e.nextTick(()=>{kt(),rl()})}else document.execCommand("indent",!1),e.nextTick(()=>{nl(),kt(),rl()})},k=()=>{if(R.disabled||!R.richText||!g.value)return;Kt(),g.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const n=o.getRangeAt(0),s=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer.closest("li"):n.commonAncestorContainer.parentElement?.closest("li");if(!s){document.execCommand("outdent",!1),e.nextTick(()=>{nl(),kt()});return}const i=s.parentElement;if(!i||i.tagName!=="OL"&&i.tagName!=="UL")return;const c=i.parentElement;if(c&&c.tagName==="LI"){const m=c.parentElement;if(m&&(m.tagName==="OL"||m.tagName==="UL")){i.tagName==="OL"&&s.removeAttribute("data-parent-num"),m.insertBefore(s,c.nextSibling),i.children.length===0&&i.remove(),nl();const u=document.createRange();u.selectNodeContents(s),u.collapse(!1),o.removeAllRanges(),o.addRange(u),e.nextTick(()=>{kt(),rl()});return}}document.execCommand("outdent",!1),e.nextTick(()=>{nl(),kt(),rl()})},C=e.ref(null),x=e.ref(null),d=e.ref({}),f=e.ref(""),b=e.ref(null),_=e.ref("");e.ref("");const $=e.ref(null);e.ref("");const ye=e.ref([]),ge=e.ref(!1),st=e.ref(!1),Ve=o=>{if(!o)return"";const n=o.cloneRange(),s=document.createElement("div");return s.appendChild(n.cloneContents()),s.innerHTML},Qe=()=>{if(!R.commentUser||R.disabled||!R.richText||!g.value)return;if(C.value!==null){C.value=null,f.value="",_.value="",$.value=null,ye.value=[],Fn(!0);return}Kt(),g.value.focus();const o=window.getSelection();if(!o||o.rangeCount===0)return;const n=o.getRangeAt(0);if(n.collapsed||!An(n))return;_.value=Ve(n)||"",$.value=qt();const s=n.getBoundingClientRect(),i=g.value.parentElement;if(!i)return;const c=i.getBoundingClientRect(),m=s.bottom-c.top,v=Math.max(m+8,0);d.value={top:`${v}px`,bottom:"auto"},C.value=Date.now(),e.nextTick(()=>{if(f.value="",b.value){const w=b.value;w.style.height="auto",w.style.height=`${w.scrollHeight}px`,w.focus()}const y=i.querySelector(".dss-comment-overlay");if(y&&i){const w=i.querySelector(".dss-text-editor-footer");if(w){const I=i.getBoundingClientRect(),O=y.getBoundingClientRect(),D=w.getBoundingClientRect(),ce=O.bottom-I.top,le=D.top-I.top,Pe=8;if(ce>le-Pe){const De=D.height;d.value={bottom:`${De+Pe}px`,top:"auto"}}else d.value={top:`${v}px`,bottom:"auto"}}}})},Q=()=>{if(!f.value.trim())return;const o=f.value.trim(),n=new Date,s={text:o,selectionText:_.value,selectionRange:$.value,commentId:C.value,user:R.commentUser||null,createdAt:n.toISOString()};ye.value=[...ye.value,s],ue("comment-submitted",s),xn(s),$.value&&!Oe($.value)&&ea(C.value,$.value),f.value="",e.nextTick(()=>{if(b.value){const i=b.value;i.style.height="auto",i.style.height=`${i.scrollHeight}px`,i.focus()}nt("sendComment")})},Zt=(o,n)=>{if(!(!R.commentUser||!o.user||o.user.id!==R.commentUser.id)){if(ye.value=ye.value.filter((s,i)=>i!==n),C.value!==null&&g.value){const s=String(C.value),i=g.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`);if(i&&ye.value.length>0){const c=[],m=new Set;ye.value.forEach(u=>{u.user&&u.user.id&&!m.has(u.user.id)&&(m.add(u.user.id),c.push(u.user))}),c.length>0?i.setAttribute("data-comment-user",JSON.stringify(c[0])):i.removeAttribute("data-comment-user"),c.length>1?i.setAttribute("data-comment-user-2",JSON.stringify(c[1])):i.removeAttribute("data-comment-user-2"),i.setAttribute("data-comment-count",String(ye.value.length))}else i&&ye.value.length===0&&(i.removeAttribute("data-comment-user"),i.removeAttribute("data-comment-user-2"),i.setAttribute("data-comment-count","0"))}if(ue("comment-deleted",{comment:o,index:n,commentId:C.value}),R.comments&&Array.isArray(R.comments)){const s=R.comments.filter(i=>!(i.commentId===o.commentId&&i.text===o.text&&i.user?.id===o.user?.id));ue("update:comments",s)}e.nextTick(()=>{nt("deleteComment")})}},Oe=o=>{if(!o||!g.value)return!1;try{const n=Jn(o);if(!n)return!1;const s=n.commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(i)return!!i.closest("[data-comment], [data-fake-comment]")}catch{}return!1},Jn=o=>{if(!o||!g.value)return null;try{const n=document.createRange();if(o.type==="element"&&o.element)return g.value.contains(o.element)?(n.setStart(o.element,o.offset),n.collapse(!0),n):null;let s=0;const i=[g.value];let c=null,m=!1,u=!1;for(;!u&&(c=i.pop());)if(c.nodeType===3){const v=s+c.length;!m&&o.start>=s&&o.start<=v&&(n.setStart(c,o.start-s),m=!0),m&&o.end>=s&&o.end<=v&&(n.setEnd(c,o.end-s),u=!0),s=v}else{let v=c.childNodes.length;for(;v--;)i.push(c.childNodes[v])}return m?n:null}catch{return null}},ea=(o,n)=>{if(!(!o||!n||!g.value))try{const s=Jn(n);if(!s||s.collapsed)return;const i=s.commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;if(c){const v=c.closest("[data-comment], [data-fake-comment]");if(v){v.getAttribute("data-comment")!==String(o)&&v.getAttribute("data-fake-comment")!==String(o)&&v.setAttribute("data-comment",String(o));return}}const m=document.createElement("span");m.setAttribute("data-comment",String(o));try{const v=s.startContainer,y=s.endContainer,w=s.startOffset,I=s.endOffset,O=v.nodeType===3?v.parentNode:v,D=y.nodeType===3?y.parentNode:y;if(O===D&&w===0&&I===(y.nodeType===3?y.length:D.childNodes.length)&&(O.tagName==="P"||O.tagName==="DIV"||O.tagName==="H1"||O.tagName==="H2"||O.tagName==="H3"||O.tagName==="H4"||O.tagName==="H5"||O.tagName==="H6")){const le=s.extractContents();m.appendChild(le),s.insertNode(m)}else s.surroundContents(m)}catch{const y=s.extractContents();m.appendChild(y),s.insertNode(m)}const u=g.value.querySelector(`[data-comment="${String(o)}"]`);e.nextTick(()=>{nt("wrapSelectionWithCommentMarker"),kt()})}catch{}},xn=o=>{if(!o||!o.commentId)return;const n=Array.isArray(R.comments)?[...R.comments]:[],s=typeof o.commentId=="string"&&o.commentId.startsWith("comment-")?Date.now():Number(o.commentId)||o.commentId;let i=n.findIndex(m=>typeof m.conversation_id=="string"&&m.conversation_id.startsWith("comment-")?null:Number(m.conversation_id)===Number(s)||m.conversation_id===s);const c={text:o.text,user:o.user,createdAt:o.createdAt,created_at:o.createdAt,updated_at:o.createdAt};if(i>=0){const m=n[i];if(m.conversation||(m.conversation=[]),m.conversation.push(c),m.updated_at=o.createdAt,!m.article_id&&n.length>0){const u=n.find(v=>v.article_id);u&&(m.article_id=u.article_id)}}else{const m=o.selectionRange,u=n.length>0&&n.find(y=>y.article_id)?.article_id||null,v={conversation_id:s,article_id:u,selection_range:m?{start:m.start||0,end:m.end||0,type:m.type||"text"}:null,selection_text:o.selectionText||"",conversation:[c],created_by_user:o.user,created_at:o.createdAt,updated_at:o.createdAt,status:"active"};n.push(v)}ge.value=!0,ue("update:comments",n)},yn=(o,n=[])=>{if(!R.commentUser||R.disabled||!R.richText||!g.value)return;const s=g.value;let i=null;try{i=s.querySelector(o)}catch{return}if(!i)return;Kt(),s.focus();const c=document.createRange();c.selectNodeContents(i);const m=window.getSelection();m&&(m.removeAllRanges(),m.addRange(c)),_.value=i.innerHTML||"",$.value=qt();const u=c.getBoundingClientRect(),v=s.parentElement;if(v){const I=v.getBoundingClientRect(),O=u.bottom-I.top,ce=Math.max(O+8,0);d.value={top:`${ce}px`,bottom:"auto"}}const y=i.getAttribute("data-comment")||i.getAttribute("data-fake-comment");let w=[];if(y&&R.comments&&Array.isArray(R.comments)){const I=R.comments.find(O=>String(O.conversation_id)===String(y));if(I&&I.conversation&&Array.isArray(I.conversation)){const O=I.conversation.map(D=>({id:D.id||D.commentary_id,commentary_id:D.id||D.commentary_id,conversation_id:I.id||I.conversation_id,text:D.text,user:D.user,createdAt:D.created_at||D.createdAt,updated_at:D.updated_at||D.updatedAt}));w.push(...O)}}w.length===0&&Array.isArray(n)&&n.length>0&&(w=n.slice()),w.sort((I,O)=>{const D=Pe=>{if(!Pe)return 0;const De=new Date(Pe).getTime();return isNaN(De)?0:De},ce=D(I.createdAt),le=D(O.createdAt);return ce===le?0:ce-le}),ye.value=w,Fn(!0),C.value=y||null,i&&(x.value=i,i.classList.add("editor-comment-highlighted")),e.nextTick(()=>{if(f.value="",b.value){const I=b.value;I.style.height="auto",I.style.height=`${I.scrollHeight}px`,I.focus()}if(v){const I=v.querySelector(".dss-comment-overlay");if(I){const O=v.querySelector(".dss-text-editor-footer");if(O){const D=v.getBoundingClientRect(),ce=I.getBoundingClientRect(),le=O.getBoundingClientRect(),Pe=ce.bottom-D.top,De=le.top-D.top,vt=8;if(Pe>De-vt){const Ot=le.height;d.value={bottom:`${Ot+vt}px`,top:"auto"}}}}}nt("openCommentOverlayForSelector")})},En=e.ref(null),Tn=e.ref(0),ja=o=>{if(!(R.disabled||!R.richText)){if(o.key==="Escape"){const n=window.getSelection();if(n.rangeCount>0){const i=n.getRangeAt(0).commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&g.value&&g.value.contains(c))){o.preventDefault();let u=null;i.nodeType===3?u=i.parentElement:i.tagName==="P"||i.tagName==="DIV"?u=i:u=i.closest("p, div");const v=document.createElement("p");v.innerHTML="<br>",u&&c.contains(u)&&u.nextSibling?c.insertBefore(v,u.nextSibling):c.appendChild(v),setTimeout(()=>{on()},50);return}}}if(o.key.length===1||o.key==="Enter"){const n=window.getSelection();if(n&&n.rangeCount>0){const s=n.getRangeAt(0),i=s.commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;if(c){const m=c.closest(".dss-image-wrapper");if(m){const u=m.querySelector("img");if(c!==u&&!u?.contains(c)){const v=s.startContainer.nodeType===3?s.startContainer.parentElement:s.startContainer,y=s.endContainer.nodeType===3?s.endContainer.parentElement:s.endContainer;if(m.contains(v)&&v!==u||m.contains(y)&&y!==u){o.preventDefault();const w=document.createRange();w.setStartAfter(m),w.collapse(!0),n.removeAllRanges(),n.addRange(w);return}}}}}}if(o.key==="Backspace"||o.key==="Delete"){const n=window.getSelection();if(n.rangeCount>0){const s=n.getRangeAt(0);let i=null,c=null;if(s.collapsed)if(o.key==="Backspace"){const m=s.startContainer;let u=m;m.nodeType===3&&(s.startOffset===0?u=m.previousSibling||m.parentNode:u=m.parentNode);const v=u.previousSibling;v&&(v.classList&&v.classList.contains("dss-image-wrapper")?c=v:v.tagName==="IMG"&&(i=v,c=i.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(i=c.querySelector("img")))}else{const m=s.startContainer;let u=m;m.nodeType===3&&(s.startOffset===m.length?u=m.nextSibling||m.parentNode:u=m.parentNode);const v=u.nextSibling;v&&(v.classList&&v.classList.contains("dss-image-wrapper")?c=v:v.tagName==="IMG"&&(i=v,c=i.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(i=c.querySelector("img")))}else{const m=s.commonAncestorContainer,u=s.startContainer.nodeType===3?s.startContainer.parentElement:s.startContainer,v=s.endContainer.nodeType===3?s.endContainer.parentElement:s.endContainer;if(m.nodeType===1&&m.tagName==="IMG"?(i=m,c=i.closest(".dss-image-wrapper")):(i=m.querySelector("img"),i&&(c=i.closest(".dss-image-wrapper"))),c){const y=c.contains(u)||u===c,w=c.contains(v)||v===c,O=s.cloneContents().textContent?.trim()||"",D=c.textContent?.trim()||"";(!y||!w||O.length>D.length)&&(c=null,i=null)}}if(c){o.preventDefault(),o.stopPropagation();const m=c.parentNode;if(m){const u=document.createTextNode("");m.insertBefore(u,c),c.remove();const v=document.createRange();v.setStartAfter(u),v.collapse(!0),n.removeAllRanges(),n.addRange(v),e.nextTick(()=>{kt()});return}}}}if(o.key==="Tab"){o.preventDefault(),o.shiftKey?k():Ol();return}if(o.key==="Enter"){const n=window.getSelection();if(n.rangeCount>0){const s=n.getRangeAt(0);if(s.collapsed){const u=s.startContainer,v=y=>{if(!y)return!1;let w=y.previousSibling;for(;w;){if(w.classList&&w.classList.contains("dss-image-wrapper")||w.tagName==="IMG"||w.querySelector&&w.querySelector(".dss-image-wrapper")||w.querySelector&&w.querySelector("img"))return!0;w=w.previousSibling}const I=y.parentElement;return I&&I!==g.value?v(I):!1};if(u.nodeType===3){const y=u.parentElement;if(y&&(v(y)||v(u))){const w=y.closest("p, div");if(w&&w!==g.value){o.preventDefault(),o.stopPropagation();let I=null;const O=s.startOffset;O<u.length&&(I=u.splitText(O));const D=document.createElement("p");if(I?D.appendChild(I):D.innerHTML="<br>",u.length===0){const le=u.parentElement;le&&(le.removeChild(u),le.childNodes.length===0&&le.appendChild(document.createElement("br")))}w.nextSibling?w.parentNode.insertBefore(D,w.nextSibling):w.parentNode.appendChild(D);const ce=document.createRange();I?ce.setStart(I,0):ce.setStart(D,0),ce.collapse(!0),n.removeAllRanges(),n.addRange(ce),e.nextTick(()=>{kt()});return}}}}const i=s.commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&g.value&&g.value.contains(c))){let u=null;i.nodeType===3?u=i.parentElement:i.tagName==="P"||i.tagName==="DIV"?u=i:u=i.closest("p, div");const v=le=>{if(!le)return!1;const Pe=le.textContent||"",vt=(le.innerHTML||"").trim(),Ot=vt.replace(/<br\s*\/?>/gi,"").trim();return Pe.trim()===""||vt===""||Ot===""||vt==="<br>"||vt==="<br/>"||vt==="<p></p>"||vt==="<p><br></p>"||vt==="<p><br/></p>"||vt==="<p> </p>"||vt==="<p><br> </p>"||vt==="<div></div>"||vt==="<div><br></div>"||vt==="<div><br/></div>"},y=c.lastChild,w=y&&y.nodeType===1&&y.tagName==="BR",I=s.startContainer,O=I.nodeType===3?I.parentElement:I,D=O===c||O&&O.parentElement===c;if(u&&v(u)||w&&D){o.preventDefault(),setTimeout(()=>{on()},50);return}}}}if(o.key===" "){const n=Date.now(),s=n-Tn.value;if(En.value===" "&&s<300){const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0),m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer.closest("li"):c.commonAncestorContainer.parentElement?.closest("li");if(m){const u=c.startContainer.textContent?.substring(0,c.startOffset)||"";if((m.textContent||"").indexOf(u.trim())<=10||u.trim().length<=2){o.preventDefault(),Ol();return}}}}En.value=" ",Tn.value=n}else En.value=o.key}},Ka=o=>{if(R.disabled||!R.richText)return;o.preventDefault();let n=o.clipboardData.getData("text/html"),s=o.clipboardData.getData("text/plain");n&&(n=n.replace(/<!--[\s\S]*?-->/g,"")),s&&(s=s.replace(/<!--[\s\S]*?-->/g,"")),Dt();const i=window.getSelection();let c=null;if(i&&i.rangeCount>0){let v=i.getRangeAt(0).commonAncestorContainer;v.nodeType===3&&(v=v.parentNode),c=v.closest("p, h1, h2, h3, h4, h5, h6, li, blockquote")}const m=u=>{const y=new DOMParser().parseFromString(u,"text/html");let w=g.value.querySelector("h1")?1:0;if(y.querySelectorAll("h1").forEach(O=>{if(w>0){const D=y.createElement("p");D.innerHTML=O.innerHTML,O.parentNode.replaceChild(D,O)}else w++}),c){const O=["P","H1","H2","H3","H4","H5","H6","DIV","BLOCKQUOTE","UL","OL","LI"],D=Array.from(y.body.children).filter(ce=>O.includes(ce.tagName));if(D.length===1){const ce=D[0].tagName,le=c.tagName,Pe=c.textContent.trim()===""&&!c.querySelector("img");let De=!1;if(["H1","H2","H3","H4","H5","H6"].includes(le)?De=!0:Pe||(ce===le||ce==="P")&&(De=!0),De)return D[0].innerHTML.trim()}}return y.body.innerHTML.trim()};if(n){const u=m(n);document.execCommand("insertHTML",!1,u)}else if(s)if(/<[a-z][\s\S]*>/i.test(s)){const v=m(s);document.execCommand("insertHTML",!1,v)}else document.execCommand("insertText",!1,s);kt()},$a=o=>{if(we.value){const s=o.target;!s.closest(".dss-toolbar-dropdown")&&!s.closest(".dss-toolbar-dropdown-toggle")&&Kt()}if($e.value){const s=o.target,i=s.closest(".dss-floating-toolbar"),c=g.value&&s.closest(".dss-text-editor-content");!i&&!c&&ta()}if(it.value){const s=o.target,i=s.closest(".dss-floating-toolbar"),c=s.closest(".dss-toolbar-dropdown");!i&&!c&&Aa()}const n=o.target;if(!n.closest(".dss-toolbar-dropdown")&&!n.closest(".dss-toolbar-dropdown-submenu")&&(ve.value=null),!g.value||!n.closest(".dss-text-editor-content")){const s=window.getSelection();if(s&&s.rangeCount>0){const i=s.getRangeAt(0);ae.value=!i.collapsed&&An(i)}else ae.value=!1}if(C.value!==null){const s=document.querySelector(".dss-comment-overlay");let i=!1;if(s){const u=s.getBoundingClientRect(),v=o.clientX,y=o.clientY;i=v>=u.left&&v<=u.right&&y>=u.top&&y<=u.bottom}const c=n.closest(".dss-toolbar-button"),m=c&&c.getAttribute("title")==="Comment";!i&&!m&&(C.value=null,f.value="",_.value="",$.value=null,ye.value=[],Fn(!0))}},Da=(o,n)=>{o&&o.stopPropagation&&o.stopPropagation(),Re.value&&(clearTimeout(Re.value),Re.value=null),ve.value=n},La=o=>{const n=o.relatedTarget;if(n){const s=n.closest(".dss-toolbar-dropdown-submenu"),i=n.closest(".dss-toolbar-dropdown-item-has-submenu");if(s||i)return}Re.value&&clearTimeout(Re.value),Re.value=setTimeout(()=>{ve.value=null,Re.value=null},150)},Ga=o=>{ve.value=null};let Sn=0;const Qa=o=>{if(!o)return;const n=Array.from(o.children);n.forEach(s=>{s.classList.contains("dss-toolbar-dropdown-submenu")||s.classList.contains("dss-toolbar-dropdown-item-has-submenu")||(s.tagName==="BUTTON"||s.tagName==="DIV")&&!s.classList.contains("dss-toolbar-dropdown-item")&&s.classList.add("dss-toolbar-dropdown-item")}),n.forEach((s,i)=>{if(s.classList.contains("dss-toolbar-dropdown-item-has-submenu")||s.classList.contains("dss-toolbar-dropdown-submenu")||!s.classList.contains("dss-toolbar-dropdown-item"))return;const c=Array.from(s.children).find(v=>v.tagName==="DIV"?v.classList.contains("dss-toolbar-dropdown-item")?!1:Array.from(v.children).filter(w=>w.tagName==="BUTTON"||w.tagName==="DIV").length>0:!1),m=s.nextElementSibling,u=m&&!m.classList.contains("dss-toolbar-dropdown-submenu")&&!m.classList.contains("dss-toolbar-dropdown-item-has-submenu")&&m.tagName==="DIV"&&!m.classList.contains("dss-toolbar-dropdown-item")&&Array.from(m.children).some(v=>v.tagName==="BUTTON"||v.tagName==="DIV");if(c||u){const v=`submenu-auto-${++Sn}`;s.classList.add("dss-toolbar-dropdown-item-has-submenu"),s.setAttribute("data-submenu-id",v);let y=null;c?(s.tagName==="BUTTON"&&s.parentNode.insertBefore(c,s.nextSibling),c.classList.add("dss-toolbar-dropdown-submenu"),y=c):u&&(m.classList.add("dss-toolbar-dropdown-submenu"),y=m),y&&(y.setAttribute("data-submenu-id",v),y.setAttribute("data-processed","true"),c&&s.tagName!=="BUTTON"?y.dataset.originalParentRef="inside":y.dataset.originalParentRef="sibling",Array.from(y.children).forEach(I=>{(I.tagName==="BUTTON"||I.tagName==="DIV")&&!I.classList.contains("dss-toolbar-dropdown-item")&&I.classList.add("dss-toolbar-dropdown-item")}))}})},Ta=()=>{document.querySelectorAll(".dss-toolbar-dropdown").forEach(n=>{Qa(n),n.querySelectorAll(".dss-toolbar-dropdown-item-has-submenu").forEach(c=>{const m=c._subMenuHandlers;m&&(c.removeEventListener("mouseenter",m.enter),c.removeEventListener("mouseleave",m.leave));const u=y=>{const w=c.getAttribute("data-submenu-id");w&&Da(y,w)},v=La;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",v),c._subMenuHandlers={enter:u,leave:v}}),n.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(c=>{const m=c._subMenuHandlers;m&&(c.removeEventListener("mouseenter",m.enter),c.removeEventListener("mouseleave",m.leave));const u=w=>{const I=c.getAttribute("data-submenu-id");I&&Da(w,I)},v=La;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",v),c._subMenuHandlers={enter:u,leave:v},c.querySelectorAll(".dss-toolbar-dropdown-item").forEach(w=>{w.addEventListener("click",Ga)})})})};let Zn=null;const sa=()=>{if(ve.value){const o=document.querySelector(`.dss-toolbar-dropdown-submenu[data-submenu-id="${ve.value}"]`),n=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${ve.value}"]`);o&&n&&_n(o,n)}if($e.value&&rl(),R.richText){if(Zn!==null)return;Zn=setTimeout(()=>{Zn=null,nt("handleWindowResize")},150)}},ra=()=>{if(!R.richText)return;document.querySelectorAll(".dss-toolbar-custom-group").forEach(n=>{Array.from(n.children).filter(i=>i.tagName==="DIV"&&!i.classList.contains("dss-toolbar-button")).forEach(i=>{i.classList.add("dss-toolbar-button")})})},Ja=()=>{const o=document.querySelectorAll(".dss-text-editor-footer, .dss-text-editor-footer-content, .dss-text-editor-footer-stat, .dss-text-editor-footer-separator"),n=s=>{if(s.preventDefault(),s.stopPropagation(),window.getSelection){const i=window.getSelection();i.removeAllRanges?i.removeAllRanges():i.empty&&i.empty()}return!1};o.forEach(s=>{s.addEventListener("selectstart",n),s.addEventListener("mousedown",n),s.addEventListener("dragstart",n),s.addEventListener("contextmenu",n),s.addEventListener("click",i=>{if(window.getSelection){const c=window.getSelection();c.removeAllRanges&&c.removeAllRanges()}})})};e.onMounted(()=>{if(e.nextTick(()=>{requestAnimationFrame(()=>{el.value?ll():Rl(),H.value?Ml():sl()})}),e.nextTick(()=>{Ja()}),R.richText&&g.value){try{document.execCommand("defaultParagraphSeparator",!1,"p")}catch{}document.addEventListener("click",$a),window.addEventListener("resize",sa);let o=null;const n=()=>{o===null&&(o=setTimeout(()=>{o=null,sa()},150))};window.addEventListener("scroll",n,!0),g.value._windowScrollHandler=n,g.value._windowScrollTimeout=o,g.value.closest(".editor-with-comments"),g.value.closest(".dss-text-editor-content-wrapper");const s=g.value.closest(".dss-text-editor-content");let i=null;const c=()=>{i===null&&(i=setTimeout(()=>{i=null,sa()},150))};s&&(s.addEventListener("scroll",c),g.value._scrollHandlers={wrapper:null,content:s,handler:c}),e.nextTick(()=>{Ta(),ra()}),g.value.addEventListener("click",v=>{const y=v.target;y.closest("a")&&!R.disabled&&v.preventDefault();const I=y.closest(".dss-image-no-alt-icon"),O=y.closest(".dss-image-wrapper");if(I||O&&y===O){v.preventDefault(),v.stopPropagation();const D=window.getSelection(),ce=document.createRange();ce.setStartAfter(O),ce.collapse(!0),D.removeAllRanges(),D.addRange(ce)}else O&&y.tagName!=="IMG"&&(v.preventDefault(),e.nextTick(()=>{const D=window.getSelection();if(D.rangeCount>0){const le=D.getRangeAt(0).commonAncestorContainer,Pe=le.nodeType===3?le.parentElement:le;if(O.contains(Pe)&&Pe!==O.querySelector("img")){const De=document.createRange();De.setStartAfter(O),De.collapse(!0),D.removeAllRanges(),D.addRange(De)}}else{const ce=document.createRange();ce.setStartAfter(O),ce.collapse(!0),D.addRange(ce)}}))},!0),g.value.addEventListener("mousedown",v=>{const y=v.target,w=y.closest(".dss-image-no-alt-icon"),I=y.closest(".dss-image-wrapper");if(w||I&&y.tagName!=="IMG"){v.preventDefault();const O=window.getSelection(),D=document.createRange();I&&(D.setStartAfter(I),D.collapse(!0),O.removeAllRanges(),O.addRange(D))}},!0),g.value.addEventListener("paste",v=>{e.nextTick(()=>{if(!g.value)return;g.value.querySelectorAll("img").forEach(w=>{if(!w.closest(".dss-image-wrapper"))w.removeAttribute("alt"),w.removeAttribute("data-alt"),w.setAttribute("alt",""),w.setAttribute("data-alt",""),w.alt="";else{const O=w.getAttribute("alt")||w.alt||"";if(O){const D=w.getAttribute("src")||w.src||"",ce=D.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),le=O===D||O===ce;(O.startsWith("http://")||O.startsWith("https://")||O.startsWith("data:")||le||le)&&(w.setAttribute("alt",""),w.setAttribute("data-alt",""),w.alt="")}}}),gl()})}),g.value.addEventListener("dragstart",v=>{const y=v.target,w=y.tagName==="IMG"?y:y.closest("img"),I=w?.closest(".dss-image-wrapper");w&&g.value.contains(w)&&(xt.value=I||w,v.dataTransfer.effectAllowed="move",v.dataTransfer.setData("text/html","image-drag"))}),g.value.addEventListener("dragover",v=>{xt.value&&(v.preventDefault(),v.stopPropagation(),v.dataTransfer.dropEffect="move")}),g.value.addEventListener("dragenter",v=>{xt.value&&(v.preventDefault(),v.stopPropagation())}),g.value.addEventListener("drop",v=>{if(!xt.value||!g.value)return;v.preventDefault(),v.stopPropagation();const y=xt.value,w=y.classList?.contains("dss-image-wrapper"),I=w?y.querySelector("img"):y,O=w?y:I?.closest(".dss-image-wrapper");if(!I||!g.value.contains(I)){xt.value=null;return}let D=null;const ce=v.clientX,le=v.clientY;if(document.caretRangeFromPoint)D=document.caretRangeFromPoint(ce,le);else{const Gt=window.getSelection();Gt.rangeCount>0?D=Gt.getRangeAt(0).cloneRange():(D=document.createRange(),D.selectNodeContents(g.value),D.collapse(!1))}if(!D){xt.value=null;return}const Pe=D.commonAncestorContainer,De=Pe.nodeType===3?Pe.parentElement:Pe;if(De?.closest(".dss-image-wrapper")===O||O&&O.contains(De)){xt.value=null;return}if(O&&(De===O||O.contains(De))){xt.value=null;return}const Ot=I.getAttribute("src");let zt=null;O?zt=O.cloneNode(!0):zt=I.cloneNode(!0);try{let Gt=D.startContainer;if(Gt.nodeType===3&&(Gt=Gt.parentElement),O&&(Gt===O||O.contains(Gt))){const Qt=document.createRange();Qt.setStartAfter(O),Qt.collapse(!0),D=Qt}D.insertNode(zt);const dl=document.createRange();dl.setStartAfter(zt),dl.collapse(!0);const At=window.getSelection();At.removeAllRanges(),At.addRange(dl)}catch{if(g.value.childNodes.length===0){const dl=document.createElement("p");dl.appendChild(zt),g.value.appendChild(dl)}else{const dl=g.value.lastChild;if(dl&&dl.nodeType===1)dl.appendChild(zt);else{const At=document.createElement("p");At.appendChild(zt),g.value.appendChild(At)}}}O?O.remove():I.remove(),xt.value=null,e.nextTick(()=>{const Gt=g.value.querySelectorAll("img");let dl=!1;Gt.forEach(At=>{if(At.getAttribute("src")===Ot)if(!dl)dl=!0;else{const Qt=At.closest(".dss-image-wrapper");Qt?Qt.remove():At.remove()}}),gl(),kt()})}),g.value.addEventListener("dragend",v=>{xt.value=null});let m=null;const u=new MutationObserver(v=>{v.forEach(y=>{y.addedNodes.forEach(w=>{if(w.nodeType===1){w.tagName==="IMG"&&(w.removeAttribute("alt"),w.removeAttribute("data-alt"),w.setAttribute("alt",""),w.setAttribute("data-alt",""),w.alt="");const I=w.querySelectorAll&&w.querySelectorAll("img");I&&I.forEach(O=>{O.removeAttribute("alt"),O.removeAttribute("data-alt"),O.setAttribute("alt",""),O.setAttribute("data-alt",""),O.alt=""})}})}),m&&clearTimeout(m),m=setTimeout(()=>{gl(),ra(),m=null},100)});if(u.observe(g.value,{childList:!0,subtree:!0}),e.nextTick(()=>{const v=document.querySelector(".dss-text-editor-toolbar");if(v){const y=new MutationObserver(()=>{e.nextTick(()=>{ra()})});y.observe(v,{childList:!0,subtree:!0}),v._toolbarMutationObserver=y}}),R.modelValue){const v=wl(R.modelValue);g.value.innerHTML=v,El()}e.nextTick(()=>{const v=g.value.innerHTML||"",y=R.title||"",w=R.description||"";gt.value=v,se.value=y,X.value=w,te.value=y,ie.value=w,nl(),gl(),$l(),Vn(),da(),cl()}),yl(),Al(),g.value._mutationObserver=u}}),e.onUnmounted(()=>{if(document.removeEventListener("click",$a),window.removeEventListener("resize",sa),g.value&&g.value._windowScrollHandler&&window.removeEventListener("scroll",g.value._windowScrollHandler,!0),Zn!==null&&(clearTimeout(Zn),Zn=null),g.value&&g.value._windowScrollTimeout!==null&&clearTimeout(g.value._windowScrollTimeout),Se.value&&clearTimeout(Se.value),Re.value&&clearTimeout(Re.value),g.value&&g.value._mutationObserver&&g.value._mutationObserver.disconnect(),Ue.value&&Ue.value.disconnect(),bt.value!==null&&(cancelAnimationFrame(bt.value),bt.value=null),ot.value!==null&&(clearTimeout(ot.value),ot.value=null),ut.value!==null&&(clearTimeout(ut.value),ut.value=null),Fn(!0),g.value&&g.value._scrollHandlers){const{wrapper:n,content:s,handler:i}=g.value._scrollHandlers;n&&n.removeEventListener("scroll",i),s&&s.removeEventListener("scroll",i)}const o=document.querySelector(".dss-text-editor-toolbar");o&&o._toolbarMutationObserver&&o._toolbarMutationObserver.disconnect()});const eo=o=>{const n=o.target,s=n.closest("a");if(s&&!R.disabled){o.preventDefault();const c=document.createRange();c.selectNodeContents(s);const m=window.getSelection();m.removeAllRanges(),m.addRange(c)}const i=n.closest(".dss-image-wrapper");i&&n.tagName!=="IMG"?e.nextTick(()=>{const c=window.getSelection();if(c.rangeCount>0){const u=c.getRangeAt(0).commonAncestorContainer,v=u.nodeType===3?u.parentElement:u;if(i.contains(v)&&v!==i.querySelector("img")){const y=document.createRange();y.setStartAfter(i),y.collapse(!0),c.removeAllRanges(),c.addRange(y)}}gl(),yl(),Al(),rl(),Vn()}):e.nextTick(()=>{gl(),yl(),Al(),rl(),Vn()})},Ca=()=>{xl();const o=window.getSelection();if(o&&o.rangeCount>0){const s=o.getRangeAt(0);ae.value=!s.collapsed&&An(s),!s.collapsed&&V.value&&(V.value=null)}else ae.value=!1;if(gl(),yl(),Al(),rl(),Vn(),o&&o.rangeCount>0){const i=o.getRangeAt(0).commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;if(c&&c.closest(".dss-text-editor-footer")){o.removeAllRanges(),ae.value=!1;return}}["bold","italic","underline"].forEach(s=>{try{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0);if(!c.collapsed)if(s==="bold"){const m=c.commonAncestorContainer,u=m.nodeType===3?m.parentElement:m;let v=!1;if(u&&((u.tagName==="STRONG"||u.tagName==="B"||u.closest&&u.closest("strong, b"))&&(v=!0),!v&&u.style&&parseInt(u.style.fontWeight)>=600&&(v=!0),!v))try{const y=window.getComputedStyle(u);parseInt(y.fontWeight)>=600&&(v=!0)}catch{}Ce.value[s]=v}else{const m=document.queryCommandState(s);Ce.value[s]=m}}}catch{}})},Vn=()=>{if(!R.richText||R.disabled||!g.value){M.value="p";return}try{const o=window.getSelection();if(!o||o.rangeCount===0){M.value="p";return}const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(!i||!g.value.contains(i)){M.value="p";return}const c=i.closest("h1, h2, h3, h4, h5, h6, p");if(!c){M.value="p";return}const m=c.tagName.toLowerCase();["h1","h2","h3","h4","h5","h6","p"].includes(m)?M.value=m:M.value="p"}catch{M.value="p"}},Al=()=>{if(!g.value){Ye.value=!1;return}try{const o=window.getSelection();let n=!1;if(o.rangeCount>0){const i=o.getRangeAt(0).commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");n=!!(c&&g.value.contains(c))}Ye.value=n}catch{Ye.value=!1}},An=o=>{if(!o||!g.value)return!1;const n=o.commonAncestorContainer;if(!n)return!1;const s=n.nodeType===3?n.parentElement:n;return s?g.value.contains(s):!1},ta=()=>{$e.value=!1},rl=()=>{if(!R.floatingToolbar||!R.richText||R.disabled){$e.value=!1;return}const o=window.getSelection();if(!o||o.rangeCount===0){$e.value=!1;return}const n=o.getRangeAt(0);if(n.collapsed||!An(n)){$e.value=!1;return}const s=n.getBoundingClientRect();if(!s||s.width===0&&s.height===0){$e.value=!1;return}const i=g.value;if(!i){$e.value=!1;return}const c=i.getBoundingClientRect();if(!c||c.width===0){$e.value=!1;return}const m=40,u=8,v=s.top-m/2+15;let y=s.left+s.width/2;const w=window.innerWidth||document.documentElement.clientWidth||0;let I=0;ft.value&&(I=ft.value.getBoundingClientRect().width);const O=(I||320)/2;let D=c.left+O,ce=c.right-O;if(ce<D){const le=c.left+c.width/2;D=le,ce=le}if(w>0){const le=O+u,Pe=w-O-u;if(D=Math.max(D,le),ce=Math.min(ce,Pe),ce<D){const De=w/2;D=De,ce=De}}y<D?y=D:y>ce&&(y=ce),lt.value={position:"fixed",top:`${Math.max(v,8)}px`,left:`${y}px`,transform:"translate(-50%, -100%)",zIndex:10003},$e.value=!0},ba=o=>{R.disabled||!R.richText||(it.value=it.value===o?null:o,o==="askAi"&&(we.value=null))},Aa=()=>{it.value=null,ve.value=null},Gl=o=>{Vl(o),Aa()};let Nn=null,Wl=null,Hn=null,Un=null;const to=o=>{if(R.disabled||!R.richText){la(),na();return}const n=o.target,s=n.closest("a"),i=n.closest("img");if(Nn&&(clearTimeout(Nn),Nn=null),Hn&&(clearTimeout(Hn),Hn=null),s&&s!==Wl){na(),Wl=s;let c=s.getAttribute("href")||"";(!c||c==="#"||c==="")&&(c=s.textContent||""),Ze.value=s,fe.value=c,j.value=!0,he.value=!0,Ha(s)}else!s&&Wl?(Wl=null,Nn=setTimeout(()=>{he.value||la()},150)):s&&s===Wl&&Ha(s);if(i&&i!==Un){la(),Un=i;let c=i.getAttribute("alt");c===null&&(c=i.alt||"");let m=i.getAttribute("data-alt");m===null&&(m=c),i.hasAttribute("alt")||i.setAttribute("alt",c),i.hasAttribute("data-alt")||i.setAttribute("data-alt",m),ct.value=i,Rt.value=c.trim()||L("textEditor.image.noAlt"),ht.value=!0,F.value=!0,wa(i)}else!i&&Un?(Un=null,Hn=setTimeout(()=>{F.value||na()},150)):i&&i===Un&&wa(i)},lo=o=>{const n=o.relatedTarget;(!n||!n.closest(".dss-text-editor-content")&&!n.closest(".dss-link-popup"))&&(Wl=null,Un=null,Nn&&(clearTimeout(Nn),Nn=null),Hn&&(clearTimeout(Hn),Hn=null),la(),na())},la=()=>{he.value=!1,setTimeout(()=>{he.value||(j.value=!1,fe.value="",Te.value||(Ze.value=null))},100)},Ha=o=>{if(!o||!g.value)return;const n=o.getBoundingClientRect(),c=n.top-32-8,m=n.left+n.width/2;He.value={position:"fixed",top:`${c}px`,left:`${m}px`,transform:"translateX(-50%)",zIndex:10002}},na=()=>{F.value=!1,setTimeout(()=>{F.value||(ht.value=!1,Rt.value="",Xt.value||(ct.value=null))},100)},wa=o=>{if(!o||!g.value)return;const n=o.getBoundingClientRect(),c=n.top-32-8,m=n.left+n.width/2;me.value={position:"fixed",top:`${c}px`,left:`${m}px`,transform:"translateX(-50%)",zIndex:10002}},xa=()=>{if(!fe.value||!Ze.value)return;let n=Ze.value.getAttribute("href")||fe.value;!n.startsWith("http://")&&!n.startsWith("https://")&&!n.startsWith("mailto:")&&(n="https://"+n),window.open(n,"_blank","noopener,noreferrer")},Ra=()=>{if(Ze.value){const o=Ze.value.textContent||"",n=Ze.value.getAttribute("href")||"",s=Ze.value;Z.value=n,Fe.value=o,Ae.value=o,he.value=!1,j.value=!1,fe.value="",Ze.value=s,Te.value=!0}else if(ke.value){const o=window.getSelection();if(o.rangeCount>0){const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");if(i){const c=i.textContent||"",m=i.getAttribute("href")||"";Z.value=m,Fe.value=c,Ae.value=c,Ze.value=i,Te.value=!0}}}else{U.value=qt();const o=window.getSelection();let n="";o.rangeCount>0&&(n=o.getRangeAt(0).toString()),Z.value="",Fe.value=n,Ae.value="",Ze.value=null,Te.value=!0}e.nextTick(()=>{qe.value&&(qe.value.focus(),qe.value.select())})},ia=()=>{Te.value=!1,Z.value="",Fe.value="",Ae.value="",Ze.value=null,U.value=null},Ea=()=>{if(!Z.value.trim()){ia();return}if(tt.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Dt(),tt.value=!1):Dt(),Fe.value.trim()||(Fe.value=Z.value.trim()),Ze.value&&g.value&&g.value.contains(Ze.value)){const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges();const n=Ze.value;if(n.setAttribute("href",Z.value.trim()),Fe.value.trim()!==Ae.value.trim()){for(;n.firstChild;)n.removeChild(n.firstChild);n.textContent=Fe.value.trim()}n.style.color="#60afdf",n.style.textDecoration="underline";const s=document.createRange();s.selectNodeContents(n),s.collapse(!1),o.removeAllRanges(),o.addRange(s),kt()}else if(g.value){g.value.focus();const o=window.getSelection();o.removeAllRanges(),U.value&&vl(U.value);let n=null;if(o.rangeCount>0&&(n=o.getRangeAt(0)),n&&!n.collapsed){n.toString();const s=document.createElement("a");s.href=Z.value.trim(),s.textContent=Fe.value.trim(),s.style.color="#60afdf",s.style.textDecoration="underline",n.deleteContents(),n.insertNode(s);const i=document.createTextNode(" ");n.setStartAfter(s),n.insertNode(i),n.setStartAfter(i),n.collapse(!0),o.removeAllRanges(),o.addRange(n)}else{n||(n=document.createRange(),n.selectNodeContents(g.value),n.collapse(!1));const s=n.startContainer,i=s.nodeType===3,c=i&&n.startOffset===s.textContent.length,m=document.createElement("a");if(m.href=Z.value.trim(),m.textContent=Fe.value.trim(),m.style.color="#60afdf",m.style.textDecoration="underline",c){let u=s.parentElement;for(;u&&u!==g.value&&!["P","DIV","H1","H2","H3","H4","H5","H6"].includes(u.tagName);)u=u.parentElement;if(u&&u!==g.value){let v=u.nextElementSibling;if(v&&(v.innerHTML==="<br>"||v.innerHTML==="<br/>"||v.textContent.trim()==="")){v.textContent="",v.appendChild(m);const y=document.createTextNode(" ");v.appendChild(y);const w=document.createRange();w.setStartAfter(m),w.collapse(!0),o.removeAllRanges(),o.addRange(w)}else{if(n.startOffset>0){const w=s.textContent.substring(0,n.startOffset),I=w[w.length-1];if(I&&I!==" "&&I!==" "&&I!==`
104
+ `){const O=document.createTextNode(" ");n.insertNode(O),n.setStartAfter(O)}}n.insertNode(m);const y=document.createTextNode(" ");n.setStartAfter(m),n.insertNode(y),n.setStartAfter(y),n.collapse(!0),o.removeAllRanges(),o.addRange(n)}}}else{if(i&&n.startOffset>0){const v=s.textContent.substring(0,n.startOffset),y=v[v.length-1];if(y&&y!==" "&&y!==" "&&y!==`
105
+ `){const w=document.createTextNode(" ");n.insertNode(w),n.setStartAfter(w)}}n.insertNode(m);const u=document.createTextNode(" ");n.setStartAfter(m),n.insertNode(u),n.setStartAfter(u),n.collapse(!0),o.removeAllRanges(),o.addRange(n)}}kt()}e.nextTick(()=>{yl(),ia()})},aa=()=>{if(!g.value||G.value)return;const o=window.getSelection();let n=null;o&&o.rangeCount>0&&(n=qt());const s=/(https?:\/\/[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|(www\.[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.([a-zA-Z]{2,})(\/[^\s<>"{}|\\^`\[\]]*)?)/gi,i=document.createTreeWalker(g.value,NodeFilter.SHOW_TEXT,{acceptNode:v=>{const y=v.parentElement;return!y||y.closest("a")||y.closest(".dss-image-wrapper")||!v.textContent||v.textContent.trim()===""?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),c=[];let m;for(;m=i.nextNode();)c.push(m);let u=!1;for(let v=c.length-1;v>=0;v--){const y=c[v],w=y.textContent;s.lastIndex=0;const I=[...w.matchAll(s)];if(I.length===0)continue;const O=I.filter(le=>{const Pe=le[0],De=le.index;if(De>0&&w[De-1]==="@"||De+Pe.length<w.length&&w[De+Pe.length]==="@")return!1;const vt=y.parentElement;return!(vt&&vt.closest("a"))});if(O.length===0)continue;if(O.length===1&&O[0][0]===w.trim()){const le=O[0][0],Pe=le.startsWith("http://")||le.startsWith("https://")?le:`https://${le}`,De=document.createElement("a");De.href=Pe,De.textContent=le,De.style.color="#60afdf",De.style.textDecoration="underline",y.parentNode&&(y.parentNode.replaceChild(De,y),u=!0);continue}let D=0;const ce=document.createDocumentFragment();if(O.forEach(le=>{const Pe=le.index,De=le[0];if(Pe>D){const zt=w.substring(D,Pe);zt&&ce.appendChild(document.createTextNode(zt))}const vt=De.startsWith("http://")||De.startsWith("https://")?De:`https://${De}`,Ot=document.createElement("a");Ot.href=vt,Ot.textContent=De,Ot.style.color="#60afdf",Ot.style.textDecoration="underline",ce.appendChild(Ot),D=Pe+De.length}),D<w.length){const le=w.substring(D);le&&ce.appendChild(document.createTextNode(le))}y.parentNode&&ce.childNodes.length>0&&(y.parentNode.replaceChild(ce,y),u=!0)}u&&n&&e.nextTick(()=>{vl(n),yl()})},no=()=>{if(!g.value)return;const o=/<u>([\s\S]*?)<\/u>|<ins>([\s\S]*?)<\/ins>/gi,n=document.createTreeWalker(g.value,NodeFilter.SHOW_TEXT,{acceptNode:c=>{const m=c.parentElement;return!m||m.closest("a, code, pre, u, ins")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),s=[];let i;for(;i=n.nextNode();)s.push(i);for(let c=s.length-1;c>=0;c--){const m=s[c],u=m.textContent,v=[...u.matchAll(o)];if(v.length===0)continue;let y=0;const w=document.createDocumentFragment();v.forEach(I=>{const O=I.index,D=I[0].startsWith("<u>")?"u":"ins",ce=I[1]||I[2]||"";O>y&&w.appendChild(document.createTextNode(u.substring(y,O)));const le=document.createElement(D);le.textContent=ce,w.appendChild(le),y=O+I[0].length}),y<u.length&&w.appendChild(document.createTextNode(u.substring(y))),m.parentNode&&w.childNodes.length>0&&m.parentNode.replaceChild(w,m)}},ca=o=>{if(!g.value||G.value)return;if(!o){no();return}if(!["*","_",">"].includes(o))return;const s=window.getSelection();if(!s||s.rangeCount===0)return;const i=s.getRangeAt(0);if(!i.collapsed)return;const c=i.startContainer.nodeType===Node.TEXT_NODE?i.startContainer.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div"):i.startContainer.closest?.("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div");if(!c||c===g.value||!g.value.contains(c))return;const m=()=>{let zt="",Gt=0,dl=!1;const At=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:rn=>rn.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});document.createTreeWalker(c,NodeFilter.SHOW_TEXT,null);let Qt=0;for(;At.nextNode();){const rn=At.currentNode,kn=rn.textContent||"",Il=Qt;if(Qt+=kn.length,rn===i.startContainer){zt+=kn.substring(0,i.startOffset),Gt=Il+i.startOffset,dl=!0;break}zt+=kn}return dl||(Gt=zt.length),{textBeforeCursor:zt,cursorCharOffset:Gt}},{textBeforeCursor:u}=m();if(!u.length)return;let v=null,y=null;if(u.endsWith("**")&&(v=u.match(/\*\*(.+?)\*\*$/s))||u.endsWith("__")&&(v=u.match(/__(.+?)__$/s))?y="strong":u.endsWith("*")&&!u.endsWith("**")&&(v=u.match(new RegExp("(?<!\\*)\\*([^*]+)\\*$")))||u.endsWith("_")&&!u.endsWith("__")&&(v=u.match(new RegExp("(?<!_)_([^_]+)_$")))?y="em":o===">"&&((v=u.match(/<u>(.+?)<\/u>$/s))||(v=u.match(/<ins>(.+?)<\/ins>$/s)))&&(y=v[0].startsWith("<u>")?"u":"ins",v[0].startsWith("<u>"),v[0].startsWith("<u>")),!v||!v[1])return;const w=v[0],I=v[1],O=u.length-w.length,ce=(zt=>{let Gt=0;const dl=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:Qt=>Qt.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let At;for(;At=dl.nextNode();){const Qt=(At.textContent||"").length;if(Gt+Qt>=zt)return{node:At,offset:zt-Gt};Gt+=Qt}return null})(O);if(!ce)return;const le=document.createRange();le.setStart(ce.node,ce.offset),le.setEnd(i.endContainer,i.endOffset);const Pe=document.createElement(y);Pe.textContent=I,le.deleteContents(),le.insertNode(Pe);const De=window.getSelection(),vt=document.createRange();vt.setStartAfter(Pe),vt.collapse(!0),De.removeAllRanges(),De.addRange(vt);const Ot=qt();e.nextTick(()=>{kt(),Ot&&vl(Ot)})},Nl=()=>{g.value&&(Ut.value=qt(),xe.value="",Ke.value="",re.value="",Je.value="",mt.value="",Lt.value=null,ct.value=null,Y.value="upload",Xt.value=!0,Kt(),e.nextTick(()=>{Tt.value&&Tt.value.focus(),at.value&&(at.value.value="")}))},P=o=>{const n=o.target?.files?.[0];if(!n){Lt.value=null,Ke.value="";return}Lt.value=n;const s=new FileReader;s.onload=i=>{Ke.value=i.target?.result||""},s.readAsDataURL(n)},Bl=()=>{at.value&&at.value.click()},ql=()=>{Je.value&&(mt.value="")},Yn=()=>{mt.value&&(Je.value="")},Cl=()=>{let o=ct.value;if(!o){const n=window.getSelection();if(n&&n.rangeCount>0){const i=n.getRangeAt(0).commonAncestorContainer;o=i.nodeType===1?i.closest("img"):i.parentElement?.closest("img")}}if(o){const n=o.getAttribute("data-alt")||o.getAttribute("alt")||"";ct.value=o,xe.value=n.trim()===""||n.trim()==="Image"?"":n;const s=o.getAttribute("src")||o.src||"";s.startsWith("http://")||s.startsWith("https://")?(re.value=s,Ke.value="",Y.value="url"):(Ke.value=s,re.value="",Y.value="upload");const c=o.style.width||o.getAttribute("width")||"",m=o.style.height||o.getAttribute("height")||"";Je.value=c.endsWith("px")?c.replace("px",""):c,mt.value=m.endsWith("px")?m.replace("px",""):m,Ut.value=null}else{Nl();return}Xt.value=!0,F.value=!1,ht.value=!1,e.nextTick(()=>{Y.value==="url"&&pt.value?(pt.value.focus(),pt.value.select()):Tt.value&&(Tt.value.focus(),Tt.value.select()),at.value&&(at.value.value="")})},il=()=>{Xt.value=!1,xe.value="",Ke.value="",re.value="",Je.value="",mt.value="",Lt.value=null,ct.value=null,Ut.value=null,Y.value="upload"},Ft=()=>{const o=(xe.value||"").trim(),n=g.value?._mutationObserver;n&&n.disconnect(),tt.value?(Se.value&&(clearTimeout(Se.value),Se.value=null),Dt(),tt.value=!1):Dt();const s=Y.value==="url"?re.value.trim():Ke.value;if(ct.value&&g.value&&g.value.contains(ct.value)){s&&(ct.value.src=s),ct.value.setAttribute("alt",o),ct.value.setAttribute("data-alt",o),Je.value?(ct.value.style.width=`${Je.value}px`,ct.value.setAttribute("width",Je.value)):(ct.value.style.removeProperty("width"),ct.value.removeAttribute("width")),mt.value?(ct.value.style.height=`${mt.value}px`,ct.value.setAttribute("height",mt.value)):(ct.value.style.removeProperty("height"),ct.value.removeAttribute("height"));const i=window.getSelection();if(i){i.removeAllRanges();const c=document.createRange();c.setStartAfter(ct.value),c.collapse(!0),i.addRange(c)}kt()}else{if(!s){n&&g.value&&n.observe(g.value,{childList:!0,subtree:!0}),il();return}if(g.value){g.value.focus();const i=window.getSelection();i&&i.rangeCount>0&&i.removeAllRanges();const c=window.getSelection();let m=null;if(Ut.value&&(vl(Ut.value),c&&c.rangeCount>0&&(m=c.getRangeAt(0))),!m&&c&&c.rangeCount>0&&(m=c.getRangeAt(0)),!m&&g.value){if(m=document.createRange(),g.value.childNodes.length===0){const w=document.createElement("p");w.innerHTML="<br>",g.value.appendChild(w),m.setStart(w,0),m.collapse(!0)}else m.selectNodeContents(g.value),m.collapse(!1);c&&(c.removeAllRanges(),c.addRange(m))}if(!m){il();return}const u=m.commonAncestorContainer,v=u.nodeType===3?u.parentElement:u;if(!g.value.contains(v)){if(m=document.createRange(),g.value.childNodes.length===0){const w=document.createElement("p");w.innerHTML="<br>",g.value.appendChild(w),m.setStart(w,0),m.collapse(!0)}else m.selectNodeContents(g.value),m.collapse(!1);c&&(c.removeAllRanges(),c.addRange(m))}const y=document.createElement("img");y.src=s,y.setAttribute("alt",o),y.setAttribute("data-alt",o),Je.value&&(y.style.width=`${Je.value}px`,y.setAttribute("width",Je.value)),mt.value&&(y.style.height=`${mt.value}px`,y.setAttribute("height",mt.value));try{m.insertNode(y),m.setStartAfter(y),m.collapse(!0),c&&(c.removeAllRanges(),c.addRange(m))}catch{if(g.value){if(g.value.childNodes.length===0){const O=document.createElement("p");g.value.appendChild(O),O.appendChild(y)}else{const O=g.value.lastChild;if(O&&O.nodeType===1)O.appendChild(y);else{const D=document.createElement("p");g.value.appendChild(D),D.appendChild(y)}}const I=document.createRange();I.setStartAfter(y),I.collapse(!0),c&&(c.removeAllRanges(),c.addRange(I))}}ct.value=y,kt()}}e.nextTick(()=>{n&&g.value&&n.observe(g.value,{childList:!0,subtree:!0}),yl(),rl(),il()})};e.watch(()=>R.modelValue,o=>{if(R.richText&&g.value&&!G.value){const n=wl(o||""),i=g.value.innerHTML.replace(/&nbsp;|\u00A0/g," "),c=n.replace(/&nbsp;|\u00A0/g," ");if(i!==c){const m=qt();g.value.innerHTML=n,e.nextTick(()=>{El();const u=g.value.innerHTML||"",v=R.title||"",y=R.description||"";gt.value=u,se.value=v,X.value=y,jt.value=u,te.value=v,ie.value=y,Ge.value=[],Ct.value=[],Se.value&&(clearTimeout(Se.value),Se.value=null),tt.value=!1,m&&vl(m),nl(),gl(),$l(),yl(),rl(),Vn(),nt("watch-modelValue")})}}},{immediate:!0}),e.watch(()=>R.richText,o=>{o?(rl(),e.nextTick(()=>{da()})):(ta(),oe.value=[],Ue.value&&(Ue.value.disconnect(),Ue.value=null)),Vn()}),e.watch(()=>R.floatingToolbar,o=>{o?rl():ta()}),e.watch(()=>R.disabled,o=>{o&&ta(),Vn()}),e.watch(()=>R.description,()=>{e.nextTick(()=>{H.value?Ml():sl()})}),e.watch(()=>R.title,()=>{e.nextTick(()=>{el.value?ll():Rl()})}),e.watch(()=>R.customToolbarSlots,()=>{e.nextTick(()=>{ra()})},{deep:!0}),e.watch(()=>R.comments,(o,n)=>{if(R.commentUser){if(ge.value){ge.value=!1;return}st.value||R.richText&&g.value&&e.nextTick(()=>{cl()})}},{deep:!0,immediate:!1});const cl=()=>{if(R.commentUser&&!st.value&&!(!R.comments||!Array.isArray(R.comments)||R.comments.length===0)&&!(!R.richText||!g.value)){st.value=!0;try{const o=new Set,n=R.comments.filter(u=>{const v=String(u.conversation_id||u.id);return o.has(v)?!1:(o.add(v),!0)}),s=g.value.querySelectorAll("[data-comment], [data-fake-comment]"),i=s.length;s.forEach(u=>{const v=u.parentNode;if(v){for(;u.firstChild;)v.insertBefore(u.firstChild,u);v.removeChild(u)}});let c=0;const m=new Set;n.forEach(u=>{if(!u.conversation_id||!u.selection_range)return;const v=typeof u.conversation_id=="string"&&u.conversation_id.startsWith("comment-")?null:Number(u.conversation_id)||u.conversation_id;if(!v)return;const y=String(v);if(m.has(y))return;const w=g.value.querySelector(`[data-comment="${y}"]`);if(w){Mt(w,u),m.add(y);return}try{const I=It(u.selection_range,u.selection_text);if(I&&!I.collapsed){const O=I.commonAncestorContainer,D=O.nodeType===3?O.parentElement:O;if(D){const Pe=D.closest("[data-comment], [data-fake-comment]");if(Pe){const De=Pe.getAttribute("data-comment")||Pe.getAttribute("data-fake-comment");if(String(De)===String(v)){Pe.setAttribute("data-comment",y),Pe.removeAttribute("data-fake-comment"),Mt(Pe,u),m.add(y);return}else return}}const ce=g.value.querySelector(`[data-comment="${y}"]`);if(ce){Mt(ce,u),m.add(y);return}const le=document.createElement("span");le.setAttribute("data-comment",y),Mt(le,u);try{I.surroundContents(le),c++,m.add(y)}catch{try{const De=document.createRange();De.setStart(I.startContainer,I.startOffset),De.setEnd(I.endContainer,I.endOffset),ul(De),De.surroundContents(le),c++,m.add(y)}catch{try{const vt=I.extractContents();le.appendChild(vt),I.insertNode(le),c++,m.add(y)}catch(vt){console.warn("Failed to create comment marker:",vt)}}}}}catch{}}),e.nextTick(()=>{nt("restoreCommentsFromModel"),kt(),st.value=!1})}catch{st.value=!1}}},ul=o=>{if(!o||!g.value)return o;try{const n=["P","DIV","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"];let s=o.startContainer,i=o.startOffset;if(s.nodeType===3){const u=s.parentElement;u&&n.includes(u.tagName)&&(i===0&&!Bn(s)||o.setStartBefore(u))}else s.nodeType===1&&n.includes(s.tagName)&&i>0&&o.setStartBefore(s);let c=o.endContainer,m=o.endOffset;if(c.nodeType===3){const u=c.parentElement;u&&n.includes(u.tagName)&&(m===c.length&&!Rn(c)||o.setEndAfter(u))}else c.nodeType===1&&n.includes(c.tagName)&&m<c.childNodes.length&&o.setEndAfter(c);return o}catch{return o}},Bn=o=>{let n=o.previousSibling;for(;n;){if(n.nodeType===3&&n.textContent.trim().length>0||n.nodeType===1&&n.textContent.trim().length>0)return!0;n=n.previousSibling}return!1},Rn=o=>{let n=o.nextSibling;for(;n;){if(n.nodeType===3&&n.textContent.trim().length>0||n.nodeType===1&&n.textContent.trim().length>0)return!0;n=n.nextSibling}return!1},It=(o,n)=>{if(!o||!g.value)return null;try{const s=document.createRange();if(o.type==="text"&&typeof o.start=="number"&&typeof o.end=="number"){let i=0;const c=[g.value];let m=null,u=!1,v=!1;for(;!v&&(m=c.pop());)if(m.nodeType===3){const y=i+m.length;!u&&o.start>=i&&o.start<=y&&(s.setStart(m,o.start-i),u=!0),u&&o.end>=i&&o.end<=y&&(s.setEnd(m,o.end-i),v=!0),i=y}else{let y=m.childNodes.length;for(;y--;)c.push(m.childNodes[y])}return u?ul(s):null}}catch{return null}return null},Mt=(o,n)=>{if(!o||!n)return;const s=n.conversation||[],i=new Set,c=[],m=v=>{v&&v.id&&!i.has(v.id)&&(i.add(v.id),c.push(v))};s.length>0&&s.forEach(v=>{v.user&&m(v.user)}),c.length>0?o.setAttribute("data-comment-user",JSON.stringify(c[0])):o.removeAttribute("data-comment-user"),c.length>1?o.setAttribute("data-comment-user-2",JSON.stringify(c[1])):o.removeAttribute("data-comment-user-2");const u=s.length;u>0?o.setAttribute("data-comment-count",String(u)):o.removeAttribute("data-comment-count")},nt=(o="unknown")=>{if(!R.commentUser||!R.richText||!g.value){oe.value=[];return}Date.now()-Nt.value<wt&&bt.value!==null||bt.value===null&&(bt.value=requestAnimationFrame(()=>{if(bt.value=null,Nt.value=Date.now(),Xe.value)return;Xe.value=!0;const s={},i=g.value;if(!i){Xe.value=!1;return}const c=i.closest(".editor-with-comments");if(!c){Xe.value=!1;return}const m=i.querySelectorAll("[data-comment], [data-fake-comment]"),u=[],v=new Set;m.forEach(D=>{const ce=D.getAttribute("data-comment")||D.getAttribute("data-fake-comment");ce&&D.tagName==="SPAN"&&(v.has(ce)||(u.push(D),v.add(ce)))}),m.forEach(D=>{const ce=D.getAttribute("data-comment")||D.getAttribute("data-fake-comment");!ce||v.has(ce)||(["P","DIV","H1","H2","H3","H4","H5","H6"].includes(D.tagName)?D.querySelector(`span[data-comment="${ce}"], span[data-fake-comment="${ce}"]`)||(u.push(D),v.add(ce)):D.tagName!=="SPAN"&&(u.push(D),v.add(ce)))});const y=c.getBoundingClientRect(),w=i.getBoundingClientRect();u.forEach((D,ce)=>{let le=D.getAttribute("data-comment")||D.getAttribute("data-fake-comment");if(!le)return;if(typeof le=="string"&&le.startsWith("comment-")){const cn=D.textContent?.trim(),Vt=R.comments?.find(Ql=>(typeof Ql.conversation_id=="string"&&Ql.conversation_id.startsWith("comment-")?null:Ql.conversation_id)&&Ql.selection_text?.trim()===cn);Vt?(le=String(Vt.conversation_id),D.setAttribute("data-comment",le),D.removeAttribute("data-fake-comment")):(le=String(Date.now()),D.setAttribute("data-comment",le),D.removeAttribute("data-fake-comment"))}const Pe=D.getBoundingClientRect(),De=window.getComputedStyle(D),vt=parseFloat(De.lineHeight)||parseFloat(De.fontSize)*1.2,Gt=Pe.top-w.top+vt/2-15,At=w.top-y.top+Gt;let Qt=null,rn=null,kn=0;const Il=[],Sa=new Set;if(le&&R.comments){const cn=R.comments.find(Vt=>String(Vt.conversation_id||Vt.id)===String(le));if(cn){const Vt=cn.conversation||[];Vt.length>0?(Vt.forEach(Ql=>{Ql.user&&Ql.user.id&&!Sa.has(Ql.user.id)&&(Sa.add(Ql.user.id),Il.push(Ql.user))}),kn=Vt.length):(kn=0,Qt=null,rn=null),Il.length>0?Qt=Il[0]:Qt=null,Il.length>1?rn=Il[1]:rn=null}}const Va=Pe.top+vt/2-15,In=Va+30,Na=5,Fa=In>w.top+Na&&Va<w.bottom-Na?1:0;oe.value.find(cn=>cn.id===le);let zn=D;if(!zn&&le&&g.value){const cn=String(le);zn=g.value.querySelector(`[data-comment="${cn}"], [data-fake-comment="${cn}"]`)}const Dl=Il.length;s[le]?(s[le].top=At,s[le].opacity=Fa,s[le].element=zn,s[le].firstUser=Qt,s[le].secondUser=rn,s[le].totalCount=kn,s[le].uniqueUserCount=Dl):s[le]={id:le,top:At,opacity:Fa,element:zn,firstUser:Qt,secondUser:rn,totalCount:kn,uniqueUserCount:Dl}});const I=Object.values(s).map(D=>{const ce=Math.max(0,(D.uniqueUserCount??0)-2);if(!D.element&&D.id&&g.value){const Pe=String(D.id);D.element=g.value.querySelector(`[data-comment="${Pe}"], [data-fake-comment="${Pe}"]`)}return{...D,firstUser:D.firstUser||null,secondUser:D.secondUser||null,totalCount:D.totalCount,additionalCount:ce}});(oe.value.length!==I.length||I.some((D,ce)=>{const le=oe.value[ce];if(!le)return!0;const Pe=(le.firstUser?.id||null)!==(D.firstUser?.id||null),De=(le.secondUser?.id||null)!==(D.secondUser?.id||null);return le.id!==D.id||Math.abs(le.top-D.top)>1||le.opacity!==D.opacity||le.totalCount!==D.totalCount||le.additionalCount!==D.additionalCount||Pe||De||le.element!==D.element}))&&(oe.value=I),Xe.value=!1}))},pl=o=>{if(!o)return;let n=o.element;if(!n&&o.id&&g.value){const s=String(o.id);n=g.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`)}n&&(Fn(),x.value=n,n.classList.add("editor-comment-highlighted"))},Fn=(o=!1)=>{!o&&C.value!==null&&x.value&&(x.value.getAttribute("data-comment")||x.value.getAttribute("data-fake-comment"))===C.value||(g.value&&g.value.querySelectorAll(".editor-comment-highlighted").forEach(s=>{s.classList.remove("editor-comment-highlighted")}),x.value&&(x.value.classList.remove("editor-comment-highlighted"),x.value=null))},ua=o=>{if(!o||!o.element)return;Fn(!0);const n=o.element.getAttribute("data-comment")||o.element.getAttribute("data-fake-comment");if(!n)return;const s=`[data-comment="${n}"], [data-fake-comment="${n}"]`;ue("comment-marker-clicked",{commentId:n,selector:s,element:o.element})},oa=()=>{Fn()},da=()=>{!R.richText||!g.value||(Ue.value&&Ue.value.disconnect(),ut.value!==null&&(clearTimeout(ut.value),ut.value=null),Ue.value=new MutationObserver(()=>{ut.value===null&&(ut.value=setTimeout(()=>{ut.value=null,e.nextTick(()=>{nt("MutationObserver")})},200))}),Ue.value.observe(g.value,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-comment","data-fake-comment","data-comment-user","data-comment-user-2","data-comment-count"]}),nt("setupCommentMarkersObserver-initial"))},_n=(o,n)=>{if(!o||!n)return;const s=n.getBoundingClientRect();let i=s.top,c=s.right+4;o.style.top=`${i}px`,o.style.left=`${c}px`,o.offsetHeight;const m=o.getBoundingClientRect(),u=window.innerWidth,v=window.innerHeight;if(m.right>u){const y=s.left-m.width-4;o.style.left=`${y}px`}if(m.bottom>v){const y=Math.max(8,v-m.height-8);o.style.top=`${y}px`}m.top<0&&(o.style.top="8px")};return e.watch(()=>ve.value,o=>{e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(s=>{const i=s.getAttribute("data-submenu-id");if(i===o&&o){const c=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${i}"]`);if(c){if(s.parentNode!==document.body){const m=s.parentNode;s.dataset.originalParentRef=m===c?"inside":"sibling",document.body.appendChild(s)}s.style.display="block",s.style.visibility="hidden",s.style.opacity="0",requestAnimationFrame(()=>{requestAnimationFrame(()=>{_n(s,c),s.offsetHeight,s.setAttribute("data-active","true"),s.style.visibility="visible",s.style.opacity="1"})})}else s.setAttribute("data-active","true")}else s.setAttribute("data-active","false"),s.style.display="none",s.style.top="",s.style.left="",s.style.visibility="",s.style.opacity=""})})}),e.watch(()=>[we.value,it.value],()=>{we.value==="askAi"||it.value==="askAi"?e.nextTick(()=>{Ta()}):(ve.value=null,e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(n=>{if(n.parentNode===document.body){const s=n.getAttribute("data-submenu-id");if(s){const i=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${s}"]`);if(i)if(n.dataset.originalParentRef==="inside")i.appendChild(n);else{const m=i.closest(".dss-toolbar-dropdown");m&&m.insertBefore(n,i.nextSibling)}}}})}))}),e.watch(()=>R.locale,o=>{o&&o!==ne.value&&(ne.value=o)},{immediate:!0}),J({openCommentOverlayForSelector:yn,updateCommentMarkers:nt,restoreCommentsFromModel:cl}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-text-editor-container",[{"editor-with-comments":_t.value},$t.value]]),style:e.normalizeStyle(Et.value)},[B.richText?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-text-editor-toolbar",onMousedown:n[14]||(n[14]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",p1,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:Fl,title:e.unref(L)("textEditor.toolbar.undo")},[...n[45]||(n[45]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M9.23302 0.888889C6.90278 0.888889 4.79238 1.76889 3.16561 3.2L0 0V8H7.91402L4.73083 4.78222C5.9531 3.75111 7.50953 3.11111 9.23302 3.11111C12.3459 3.11111 14.9927 5.16444 15.916 8L18 7.30667C16.7777 3.58222 13.3219 0.888889 9.23302 0.888889Z",fill:"#323232"})],-1)])],8,v1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!bl.value}]),onClick:fn,title:e.unref(L)("textEditor.toolbar.redo")},[...n[46]||(n[46]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.8328 3.2C13.2053 1.76889 11.0938 0.888889 8.76246 0.888889C4.67155 0.888889 1.21408 3.58222 0 7.30667L2.07625 8C3 5.16444 5.6393 3.11111 8.76246 3.11111C10.478 3.11111 12.044 3.75111 13.2669 4.78222L10.0821 8H18V0L14.8328 3.2Z",fill:"#323232"})],-1)])],10,f1),n[61]||(n[61]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",h1,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:n[0]||(n[0]=s=>Dn("paragraph")),title:e.unref(L)("textEditor.toolbar.paragraphFormat")},[M.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:W.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,y1)):M.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:W.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,k1)):M.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:W.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,C1)):M.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:W.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,b1)):M.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:W.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,w1)):M.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:W.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,x1)):(e.openBlock(),e.createElementBlock("svg",E1,[...n[47]||(n[47]=[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"},null,-1)])])),n[48]||(n[48]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,g1),we.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[8]||(n[8]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[1]||(n[1]=s=>Vl("<h1>"))},[e.createElementVNode("img",{src:W.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,S1),e.createElementVNode("h1",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[2]||(n[2]=s=>Vl("<h2>"))},[e.createElementVNode("img",{src:W.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,V1),e.createElementVNode("h2",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[3]||(n[3]=s=>Vl("<h3>"))},[e.createElementVNode("img",{src:W.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,N1),e.createElementVNode("h3",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[4]||(n[4]=s=>Vl("<h4>"))},[e.createElementVNode("img",{src:W.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,B1),e.createElementVNode("h4",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[5]||(n[5]=s=>Vl("<h5>"))},[e.createElementVNode("img",{src:W.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,_1),e.createElementVNode("h5",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[6]||(n[6]=s=>Vl("<h6>"))},[e.createElementVNode("img",{src:W.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,M1),e.createElementVNode("h6",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[7]||(n[7]=s=>Vl("<p>"))},[n[49]||(n[49]=e.createElementVNode("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"})],-1)),e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("bold")}]),onClick:n[9]||(n[9]=s=>Sl("bold")),title:e.unref(L)("textEditor.toolbar.bold")},[...n[50]||(n[50]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M8.8 6.79C9.79256 6.12 10.4884 5.02 10.4884 4C10.4884 1.74 8.69767 0 6.39535 0H0V14H7.20372C9.34233 14 11 12.3 11 10.21C11 8.69 10.12 7.39 8.8 6.79ZM3.06977 2.5H6.13953C6.98884 2.5 7.67442 3.17 7.67442 4C7.67442 4.83 6.98884 5.5 6.13953 5.5H3.06977V2.5ZM6.65116 11.5H3.06977V8.5H6.65116C7.50047 8.5 8.18605 9.17 8.18605 10C8.18605 10.83 7.50047 11.5 6.65116 11.5Z",fill:"currentColor"})],-1)])],10,$1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("italic")}]),onClick:n[10]||(n[10]=s=>Sl("italic")),title:e.unref(L)("textEditor.toolbar.italic")},[...n[51]||(n[51]=[e.createElementVNode("svg",{viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4 0V3H6.21L2.79 11H0V14H8V11H5.79L9.21 3H12V0H4Z",fill:"#323232"})],-1)])],10,D1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("underline")}]),onClick:n[11]||(n[11]=s=>Sl("underline")),title:e.unref(L)("textEditor.toolbar.underline")},[...n[52]||(n[52]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.5 10.8889C8.10071 10.8889 10.2143 8.79667 10.2143 6.22222V0H8.25V6.22222C8.25 7.72333 7.01643 8.94444 5.5 8.94444C3.98357 8.94444 2.75 7.72333 2.75 6.22222V0H0.785714V6.22222C0.785714 8.79667 2.89929 10.8889 5.5 10.8889ZM0 12.4444V14H11V12.4444H0Z",fill:"#323232"})],-1)])],10,L1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Ye.value}]),onClick:wn,title:e.unref(L)("textEditor.toolbar.citation")},[...n[53]||(n[53]=[e.createElementVNode("svg",{viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.42857 14H5.71429L8.57143 8.4V0H0V8.4H4.28571L1.42857 14ZM12.8571 14H17.1429L20 8.4V0H11.4286V8.4H15.7143L12.8571 14Z",fill:"currentColor"})],-1)])],10,T1),n[62]||(n[62]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ke.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:jl,title:e.unref(L)("textEditor.toolbar.removeLink")},[...n[55]||(n[55]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18 4.88889H13.2V7.21111H18C20.052 7.21111 21.72 8.91 21.72 11C21.72 12.7478 20.544 14.2144 18.948 14.6422L20.7 16.4267C22.656 15.4122 24 13.3833 24 11C24 7.62667 21.312 4.88889 18 4.88889ZM16.8 9.77778H14.172L16.572 12.2222H16.8V9.77778ZM0 1.55222L3.732 5.35333C1.548 6.25778 0 8.44556 0 11C0 14.3733 2.688 17.1111 6 17.1111H10.8V14.7889H6C3.948 14.7889 2.28 13.09 2.28 11C2.28 9.05667 3.732 7.45556 5.592 7.24778L8.076 9.77778H7.2V12.2222H10.476L13.2 14.9967V17.1111H15.276L20.088 22L21.6 20.46L1.524 0L0 1.55222Z",fill:"#323232"})],-1)])],8,H1)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:Ln,title:e.unref(L)("textEditor.toolbar.insertLink")},[...n[54]||(n[54]=[e.createElementVNode("svg",{width:"20",height:"14",viewBox:"0 0 27 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.565 7C2.565 4.606 4.4415 2.66 6.75 2.66H12.15V0H6.75C3.024 0 0 3.136 0 7C0 10.864 3.024 14 6.75 14H12.15V11.34H6.75C4.4415 11.34 2.565 9.394 2.565 7ZM8.1 8.4H18.9V5.6H8.1V8.4ZM20.25 0H14.85V2.66H20.25C22.5585 2.66 24.435 4.606 24.435 7C24.435 9.394 22.5585 11.34 20.25 11.34H14.85V14H20.25C23.976 14 27 10.864 27 7C27 3.136 23.976 0 20.25 0Z",fill:"#323232"})],-1)])],8,A1)),n[63]||(n[63]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("insertUnorderedList")}]),onClick:sn,title:e.unref(L)("textEditor.toolbar.bulletList")},[...n[56]||(n[56]=[e.createElementVNode("svg",{viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.37838 5.2C0.615676 5.2 0 5.78067 0 6.5C0 7.21933 0.615676 7.8 1.37838 7.8C2.14108 7.8 2.75676 7.21933 2.75676 6.5C2.75676 5.78067 2.14108 5.2 1.37838 5.2ZM1.37838 0C0.615676 0 0 0.580667 0 1.3C0 2.01933 0.615676 2.6 1.37838 2.6C2.14108 2.6 2.75676 2.01933 2.75676 1.3C2.75676 0.580667 2.14108 0 1.37838 0ZM1.37838 10.4C0.615676 10.4 0 10.9893 0 11.7C0 12.4107 0.624865 13 1.37838 13C2.13189 13 2.75676 12.4107 2.75676 11.7C2.75676 10.9893 2.14108 10.4 1.37838 10.4ZM4.13514 12.5667H17V10.8333H4.13514V12.5667ZM4.13514 7.36667H17V5.63333H4.13514V7.36667ZM4.13514 0.433333V2.16667H17V0.433333H4.13514Z",fill:"#323232"})],-1)])],10,R1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("insertOrderedList")}]),onClick:Tl,title:e.unref(L)("textEditor.toolbar.numberList")},[...n[57]||(n[57]=[e.createElementVNode("svg",{viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 12.1875H1.89474V12.6562H0.947368V13.5938H1.89474V14.0625H0V15H2.84211V11.25H0V12.1875ZM0.947368 3.75H1.89474V0H0V0.9375H0.947368V3.75ZM0 6.5625H1.70526L0 8.53125V9.375H2.84211V8.4375H1.13684L2.84211 6.46875V5.625H0V6.5625ZM4.73684 0.9375V2.8125H18V0.9375H4.73684ZM4.73684 14.0625H18V12.1875H4.73684V14.0625ZM4.73684 8.4375H18V6.5625H4.73684V8.4375Z",fill:"#323232"})],-1)])],10,F1),n[64]||(n[64]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:Nl,title:e.unref(L)("textEditor.toolbar.image")},[...n[58]||(n[58]=[e.createElementVNode("svg",{viewBox:"1.5 1.5 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.15065 15.8414L2.13398 15.8581C1.90898 15.3664 1.76732 14.8081 1.70898 14.1914C1.76732 14.7997 1.92565 15.3497 2.15065 15.8414Z",fill:"#323232"}),e.createElementVNode("path",{d:"M7.50091 8.65026C8.59628 8.65026 9.48425 7.76229 9.48425 6.66693C9.48425 5.57156 8.59628 4.68359 7.50091 4.68359C6.40555 4.68359 5.51758 5.57156 5.51758 6.66693C5.51758 7.76229 6.40555 8.65026 7.50091 8.65026Z",fill:"#323232"}),e.createElementVNode("path",{d:"M13.491 1.66699H6.50768C3.47435 1.66699 1.66602 3.47533 1.66602 6.50866V13.492C1.66602 14.4003 1.82435 15.192 2.13268 15.8587C2.84935 17.442 4.38268 18.3337 6.50768 18.3337H13.491C16.5243 18.3337 18.3327 16.5253 18.3327 13.492V11.5837V6.50866C18.3327 3.47533 16.5243 1.66699 13.491 1.66699ZM16.9743 10.417C16.3243 9.85866 15.2743 9.85866 14.6243 10.417L11.1577 13.392C10.5077 13.9503 9.45768 13.9503 8.80768 13.392L8.52435 13.1587C7.93268 12.642 6.99102 12.592 6.32435 13.042L3.20768 15.1337C3.02435 14.667 2.91602 14.1253 2.91602 13.492V6.50866C2.91602 4.15866 4.15768 2.91699 6.50768 2.91699H13.491C15.841 2.91699 17.0827 4.15866 17.0827 6.50866V10.5087L16.9743 10.417Z",fill:"#323232"})],-1)])],8,I1),_t.value&&ae.value?(e.openBlock(),e.createElementBlock("div",z1)):e.createCommentVNode("",!0),_t.value&&ae.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(L)("textEditor.toolbar.comment"),onClick:Qe},[...n[59]||(n[59]=[e.createElementVNode("svg",{viewBox:"2 2 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.19 6H6.79C6.53 6 6.28 6.01 6.04 6.04C3.35 6.27 2 7.86 2 10.79V14.79C2 18.79 3.6 19.58 6.79 19.58H7.19C7.41 19.58 7.7 19.73 7.83 19.9L9.03 21.5C9.56 22.21 10.42 22.21 10.95 21.5L12.15 19.9C12.3 19.7 12.54 19.58 12.79 19.58H13.19C16.12 19.58 17.71 18.24 17.94 15.54C17.97 15.3 17.98 15.05 17.98 14.79V10.79C17.98 7.6 16.38 6 13.19 6ZM6.5 14C5.94 14 5.5 13.55 5.5 13C5.5 12.45 5.95 12 6.5 12C7.05 12 7.5 12.45 7.5 13C7.5 13.55 7.05 14 6.5 14ZM9.99 14C9.43 14 8.99 13.55 8.99 13C8.99 12.45 9.44 12 9.99 12C10.54 12 10.99 12.45 10.99 13C10.99 13.55 10.55 14 9.99 14ZM13.49 14C12.93 14 12.49 13.55 12.49 13C12.49 12.45 12.94 12 13.49 12C14.04 12 14.49 12.45 14.49 13C14.49 13.55 14.04 14 13.49 14Z",fill:"#323232"}),e.createElementVNode("path",{d:"M21.9802 6.79V10.79C21.9802 12.79 21.3602 14.15 20.1202 14.9C19.8202 15.08 19.4702 14.84 19.4702 14.49L19.4802 10.79C19.4802 6.79 17.1902 4.5 13.1902 4.5L7.10025 4.51C6.75025 4.51 6.51025 4.16 6.69025 3.86C7.44025 2.62 8.80025 2 10.7902 2H17.1902C20.3802 2 21.9802 3.6 21.9802 6.79Z",fill:"#323232"})],-1)])],8,P1)):e.createCommentVNode("",!0),B.askAi?(e.openBlock(),e.createElementBlock("div",O1)):e.createCommentVNode("",!0),B.askAi?(e.openBlock(),e.createElementBlock("div",W1,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-dropdown-toggle",onClick:n[12]||(n[12]=s=>Dn("askAi")),title:e.unref(L)("textEditor.toolbar.askAi")},[n[60]||(n[60]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.97363 4.34473C5.4926 6.769 7.88838 8.45732 10.7598 9.01855C9.21102 10.2499 7.99851 11.8959 7.30762 13.8027C7.21982 14.066 6.82404 14.066 6.69238 13.8027C5.59521 10.7746 3.18158 8.40476 0.197266 7.30762C-0.0658032 7.21978 -0.0656958 6.82515 0.197266 6.69336C1.62341 6.17665 2.90369 5.36753 3.97363 4.34473Z",fill:"#9784ba"}),e.createElementVNode("path",{d:"M6.66895 0.197266C6.75687 -0.0657415 7.1515 -0.0657945 7.2832 0.197266C8.38035 3.22532 10.7941 5.5952 13.7783 6.69238C14.0416 6.78015 14.0416 7.17497 13.7783 7.30664C12.6735 7.71282 11.6469 8.29371 10.7363 9.01758C7.86425 8.45633 5.46822 6.76786 3.94922 4.34277C5.15088 3.1939 6.08858 1.77583 6.66895 0.197266Z",fill:"#cfbeed"})],-1)),e.createElementVNode("span",Z1,e.toDisplayString(e.unref(L)("textEditor.toolbar.askAi")),1)],8,q1),we.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[13]||(n[13]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(o.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",U1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.customToolbarSlots,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[Ll(s)?(e.openBlock(),e.createElementBlock("div",Y1,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),Ll(s)&&i<B.customToolbarSlots.length-1&&Wn(i)?(e.openBlock(),e.createElementBlock("div",X1)):e.createCommentVNode("",!0)],64))),128))])],32)):e.createCommentVNode("",!0),(we.value==="paragraph"||we.value==="askAi")&&B.richText?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-dropdown-overlay",onClick:Kt})):e.createCommentVNode("",!0),e.createVNode(ho,{showModal:Te.value,width:"500px",height:"55vh",onCloseModal:ia},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(L)("textEditor.link.editLink")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",j1,[e.createElementVNode("div",K1,[e.createElementVNode("label",G1,e.toDisplayString(e.unref(L)("textEditor.link.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkAltInput",ref:Me,type:"text","onUpdate:modelValue":n[15]||(n[15]=s=>Fe.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.link.enterAltText"),onKeyup:e.withKeys(Ea,["enter"])},null,40,Q1),[[e.vModelText,Fe.value]])]),e.createElementVNode("div",J1,[e.createElementVNode("label",em,e.toDisplayString(e.unref(L)("textEditor.link.url")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkUrlInput",ref:qe,type:"text","onUpdate:modelValue":n[16]||(n[16]=s=>Z.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.link.enterUrl"),onKeyup:e.withKeys(Ea,["enter"])},null,40,tm),[[e.vModelText,Z.value]])])])]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:ia},e.toDisplayString(e.unref(L)("textEditor.link.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:Ea},e.toDisplayString(e.unref(L)("textEditor.link.save")),1)]),_:1},8,["showModal"]),e.createVNode(ho,{showModal:Xt.value,width:"500px",height:"80vh",onCloseModal:il},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ct.value?e.unref(L)("textEditor.image.editImage"):e.unref(L)("textEditor.image.addImage")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",lm,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Y.value==="upload"}]),onClick:n[17]||(n[17]=s=>Y.value="upload")},e.toDisplayString(e.unref(L)("textEditor.image.upload")),3),n[65]||(n[65]=e.createElementVNode("div",{class:"dss-image-modal-tab-separator"},null,-1)),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Y.value==="url"}]),onClick:n[18]||(n[18]=s=>Y.value="url")},e.toDisplayString(e.unref(L)("textEditor.image.imageLink")),3)]),Y.value==="upload"?(e.openBlock(),e.createElementBlock("div",nm,[e.createElementVNode("div",am,[e.createElementVNode("div",om,[ml.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("label",sm,e.toDisplayString(e.unref(L)("textEditor.image.uploadImage")),1)),ml.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-image-upload-preview",onClick:Bl},[e.createElementVNode("img",{src:Ke.value,alt:"Preview",class:"dss-image-preview-image"},null,8,rm),n[66]||(n[66]=e.createElementVNode("div",{class:"dss-image-preview-overlay"},[e.createElementVNode("svg",{width:"35",height:"35",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.1 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z",fill:"white"})])],-1)),e.createElementVNode("input",{ref_key:"imageFileInput",ref:at,type:"file",accept:"image/*",class:"dss-image-file-input-hidden",onChange:P},null,544)])):(e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"imageFileInput",ref:at,type:"file",accept:"image/*",class:"dss-link-modal-input dss-link-modal-input-image",onChange:P},null,544))]),e.createElementVNode("div",im,[e.createElementVNode("label",cm,e.toDisplayString(e.unref(L)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageAltInput",ref:Tt,type:"text","onUpdate:modelValue":n[19]||(n[19]=s=>xe.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterAltText"),onKeyup:e.withKeys(Ft,["enter"])},null,40,um),[[e.vModelText,xe.value]])]),e.createElementVNode("div",dm,[e.createElementVNode("label",mm,e.toDisplayString(e.unref(L)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[20]||(n[20]=s=>Je.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Ft,["enter"]),onInput:ql},null,40,pm),[[e.vModelText,Je.value]])]),e.createElementVNode("div",vm,[e.createElementVNode("label",fm,e.toDisplayString(e.unref(L)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[21]||(n[21]=s=>mt.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Ft,["enter"]),onInput:Yn},null,40,hm),[[e.vModelText,mt.value]])])])])):e.createCommentVNode("",!0),Y.value==="url"?(e.openBlock(),e.createElementBlock("div",gm,[e.createElementVNode("div",ym,[e.createElementVNode("div",km,[e.createElementVNode("label",Cm,e.toDisplayString(e.unref(L)("textEditor.image.imageUrl")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageUrlInput",ref:pt,type:"text","onUpdate:modelValue":n[22]||(n[22]=s=>re.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterImageUrl"),onKeyup:e.withKeys(Ft,["enter"])},null,40,bm),[[e.vModelText,re.value]])]),e.createElementVNode("div",wm,[e.createElementVNode("label",xm,e.toDisplayString(e.unref(L)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[23]||(n[23]=s=>xe.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterAltText"),onKeyup:e.withKeys(Ft,["enter"])},null,40,Em),[[e.vModelText,xe.value]])]),e.createElementVNode("div",Sm,[e.createElementVNode("label",Vm,e.toDisplayString(e.unref(L)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[24]||(n[24]=s=>Je.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Ft,["enter"]),onInput:ql},null,40,Nm),[[e.vModelText,Je.value]])]),e.createElementVNode("div",Bm,[e.createElementVNode("label",_m,e.toDisplayString(e.unref(L)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[25]||(n[25]=s=>mt.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Ft,["enter"]),onInput:Yn},null,40,Mm),[[e.vModelText,mt.value]])])])])):e.createCommentVNode("",!0)]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:il},e.toDisplayString(e.unref(L)("textEditor.image.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:Ft},e.toDisplayString(e.unref(L)("textEditor.image.save")),1)]),_:1},8,["showModal"]),B.showTitle?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["dss-text-editor-title-wrapper",{"dss-text-editor-no-border-bottom":tn.value&&el.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.labels.title")),1),e.createElementVNode("div",$m,[el.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Dm,[B.title?(e.openBlock(),e.createElementBlock("span",Lm,e.toDisplayString(B.title),1)):(e.openBlock(),e.createElementBlock("span",Tm,e.toDisplayString(dt.value),1))])),e.createElementVNode("textarea",{ref_key:"titleInputRef",ref:Ne,value:B.title,onInput:vn,onFocus:Gn,onBlur:qn,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-title-input",{"dss-text-editor-title-input-blurred":!el.value}]),placeholder:dt.value,disabled:B.disabled,rows:"1"},null,42,Am)])],2)):e.createCommentVNode("",!0),B.showTitle&&tn.value&&el.value?(e.openBlock(),e.createElementBlock("div",Hm,[e.renderSlot(o.$slots,"title-slot")])):e.createCommentVNode("",!0),B.showDescription?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["dss-text-editor-description-wrapper",{"dss-text-editor-no-border-bottom":_l.value&&H.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.labels.description")),1),e.createElementVNode("div",Rm,[H.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Fm,[B.description?(e.openBlock(),e.createElementBlock("span",Im,e.toDisplayString(B.description),1)):(e.openBlock(),e.createElementBlock("span",zm,e.toDisplayString(Hl.value),1))])),e.createElementVNode("textarea",{ref_key:"descriptionInputRef",ref:et,value:B.description,onInput:Wt,onFocus:Qn,onBlur:nn,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-description-input",{"dss-text-editor-description-input-blurred":!H.value}]),placeholder:Hl.value,disabled:B.disabled,rows:"1"},null,42,Pm)])],2)):e.createCommentVNode("",!0),B.showDescription&&_l.value&&H.value?(e.openBlock(),e.createElementBlock("div",Om,[e.renderSlot(o.$slots,"description-slot")])):e.createCommentVNode("",!0),_t.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(oe.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass(["editor-comment-marker-group",{"editor-comment-marker-active":C.value===s.id,"editor-comment-marker-group-out-of-view":s.opacity===0}]),"data-comment-id":s.id,style:e.normalizeStyle({top:s.top+"px"}),onMouseenter:i=>pl(s),onMouseleave:oa},[s.firstUser?(e.openBlock(),e.createElementBlock("div",{key:0,class:"editor-comment-marker editor-comment-marker-first",onClick:e.withModifiers(i=>ua(s),["stop"])},[s.firstUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.firstUser.avatar,alt:s.firstUser.name||"avatar"},null,8,Zm)):(e.openBlock(),e.createElementBlock("span",Um,e.toDisplayString(s.firstUser.initials||(s.firstUser.name?s.firstUser.name.charAt(0):"")),1))],8,qm)):e.createCommentVNode("",!0),s.secondUser?(e.openBlock(),e.createElementBlock("div",{key:1,class:"editor-comment-marker editor-comment-marker-second",onClick:e.withModifiers(i=>ua(s),["stop"])},[s.secondUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.secondUser.avatar,alt:s.secondUser.name||"avatar"},null,8,Xm)):(e.openBlock(),e.createElementBlock("span",jm,e.toDisplayString(s.secondUser.initials||(s.secondUser.name?s.secondUser.name.charAt(0):"")),1))],8,Ym)):e.createCommentVNode("",!0),s.additionalCount>0?(e.openBlock(),e.createElementBlock("div",{key:2,class:"editor-comment-marker editor-comment-marker-additional",style:e.normalizeStyle({top:s.secondUser?"30px":"15px"}),"data-has-second-user":s.secondUser?"true":"false",onClick:e.withModifiers(i=>ua(s),["stop"])},[e.createElementVNode("span",Gm,"+"+e.toDisplayString(s.additionalCount),1)],12,Km)):e.createCommentVNode("",!0)],46,Wm))),128)):e.createCommentVNode("",!0),B.richText?(e.openBlock(),e.createElementBlock("div",a2,[e.createElementVNode("div",{ref_key:"editorRef",ref:g,contenteditable:"true",spellcheck:"false",class:e.normalizeClass(["dss-text-editor-content",{"dss-text-editor-content-disabled":B.disabled,"dss-text-editor-fixed-height":B.fixedHeight}]),style:e.normalizeStyle(Zl.value),onInput:kt,onBlur:Xl,onClick:eo,onMouseup:Ca,onKeyup:Ca,onKeydown:ja,onPaste:Ka,onMousemove:to,onMouseleave:lo},null,38),e.createVNode(e.Transition,{name:"comment-overlay"},{default:e.withCtx(()=>[_t.value&&C.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-overlay",style:e.normalizeStyle(d.value)},[_.value||ye.value.length>0?(e.openBlock(),e.createElementBlock("div",o2,[e.createElementVNode("div",s2,[_.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-selection",innerHTML:_.value},null,8,r2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",i2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,(s,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:"dss-comment-message"},[s.user&&(s.user.avatar||s.user.initials||s.user.name)?(e.openBlock(),e.createElementBlock("div",c2,[e.createElementVNode("div",u2,[s.user.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.user.avatar,alt:s.user.name||"avatar"},null,8,d2)):(e.openBlock(),e.createElementBlock("span",m2,e.toDisplayString(s.user.initials||(s.user.name?s.user.name.charAt(0):"")),1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",p2,[e.createElementVNode("div",v2,[e.createElementVNode("div",f2,e.toDisplayString(s.user&&s.user.name||"Comment"),1),s.createdAt?(e.openBlock(),e.createElementBlock("div",h2,e.toDisplayString(zl(new Date(s.createdAt))),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-comment-body-text",{"comment-started":pn(s.text)||s.class==="comment-started"}])},e.toDisplayString(s.text||""),3)]),R.commentUser&&s.user&&s.user.id===R.commentUser.id&&!pn(s.text)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-comment-delete-button",onClick:e.withModifiers(c=>Zt(s,i),["stop"]),title:e.unref(L)("textEditor.comment.delete")||"Delete comment"},[...n[68]||(n[68]=[e.createElementVNode("svg",{width:"22",height:"25",viewBox:"0 0 22 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M19.5986 21.3535C19.5985 23.3679 18.1282 25 16.2891 25H5.30957C3.48166 24.9997 2.00011 23.3702 2 21.3535V8H19.5986V21.3535ZM8 11C7.44772 11 7 11.4477 7 12V20C7 20.5523 7.44772 21 8 21C8.55229 21 9 20.5523 9 20V12C9 11.4477 8.55229 11 8 11ZM14 11C13.4477 11 13 11.4477 13 12V20C13 20.5523 13.4477 21 14 21C14.5523 21 15 20.5523 15 20V12C15 11.4477 14.5523 11 14 11ZM13.2002 0C15.0227 0.000104554 16.4999 1.46937 16.5 3.27246V4.36328H20.9092C21.5117 4.36348 21.9998 4.84789 22 5.4541C22 6.05615 21.4986 6.54569 20.9092 6.5459H1.09082C0.488195 6.54569 0 6.06052 0 5.4541C0.000246661 4.85225 0.50153 4.36349 1.09082 4.36328H5.5L5.50098 3.27246C5.50112 1.46505 6.98382 0.000171185 8.80078 0H13.2002ZM8.79004 2.18164C8.19615 2.18167 7.70034 2.67042 7.7002 3.27246C7.7002 3.87899 8.18837 4.36325 8.79004 4.36328H13.21C13.8039 4.36325 14.2998 3.87462 14.2998 3.27246C14.2997 2.66606 13.8115 2.18167 13.21 2.18164H8.79004Z",fill:"#323232"})],-1)])],8,g2)):e.createCommentVNode("",!0)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",y2,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"commentInputRef",ref:b,"onUpdate:modelValue":n[26]||(n[26]=s=>f.value=s),class:"dss-comment-input",rows:"1",placeholder:e.unref(L)("textEditor.comment.placeholder"),onKeydown:e.withKeys(e.withModifiers(Q,["prevent","stop"]),["enter"]),onInput:n[27]||(n[27]=()=>{if(b.value){const s=b.value;s.style.height="auto",s.style.height=`${s.scrollHeight}px`}})},null,40,k2),[[e.vModelText,f.value]]),e.createElementVNode("button",{type:"button",class:"dss-comment-send-button",onClick:e.withModifiers(Q,["stop"])},[...n[69]||(n[69]=[e.createElementVNode("svg",{width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0.00999999 18L21 9L0.00999999 0L0 7L15 9L0 11L0.00999999 18Z",fill:"#31312F"})],-1)])])])],4)):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",C2,[e.createElementVNode("div",b2,[e.createElementVNode("span",w2,e.toDisplayString(ol.value)+" "+e.toDisplayString(ol.value===1?e.unref(L)("textEditor.footer.word"):e.unref(L)("textEditor.footer.words")),1),n[70]||(n[70]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",x2,e.toDisplayString(un.value)+" "+e.toDisplayString(un.value===1?e.unref(L)("textEditor.footer.character"):e.unref(L)("textEditor.footer.characters")),1)])])])):(e.openBlock(),e.createElementBlock("div",Qm,[e.createElementVNode("textarea",{value:B.modelValue,onInput:ln,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-textarea",{"dss-text-editor-fixed-height":B.fixedHeight}]),placeholder:Ul.value,rows:B.rows,disabled:B.disabled,style:e.normalizeStyle(kl.value)},null,46,Jm),e.createElementVNode("div",e2,[e.createElementVNode("div",t2,[e.createElementVNode("span",l2,e.toDisplayString(ol.value)+" "+e.toDisplayString(ol.value===1?e.unref(L)("textEditor.footer.word"):e.unref(L)("textEditor.footer.words")),1),n[67]||(n[67]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",n2,e.toDisplayString(un.value)+" "+e.toDisplayString(un.value===1?e.unref(L)("textEditor.footer.character"):e.unref(L)("textEditor.footer.characters")),1)])])])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[j.value&&fe.value&&g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(He.value),onMouseenter:n[28]||(n[28]=s=>he.value=!0),onMouseleave:la},[e.createElementVNode("span",{class:"dss-link-popup-url",onClick:e.withModifiers(xa,["stop"]),title:fe.value},e.toDisplayString(fe.value),9,E2),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(Ra,["stop"]),title:e.unref(L)("textEditor.link.editLink")},[(e.openBlock(),e.createElementBlock("svg",V2,[...n[71]||(n[71]=[e.createElementVNode("g",null,[e.createElementVNode("path",{d:"M25.264 1.008c-.524 0-1.049.197-1.443.592l-2.248 2.248 6.58 6.578 2.246-2.248a2.058 2.058 0 0 0 0-2.887L26.707 1.6a2.032 2.032 0 0 0-1.443-.592zm-5.106 4.254L3.889 21.532a1.022 1.022 0 0 0-.242.391c-.729 2.187-2.035 5.759-2.6 7.803a1 1 0 0 0 1.188 1.24c2.432-.562 5.687-1.896 7.84-2.613a1.03 1.03 0 0 0 .392-.236l16.269-16.275z",fill:"hsl(0, 0%, 98%)",opacity:"1","data-original":"#000000",class:""})],-1)])]))],8,S2)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[ht.value&&Rt.value&&g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(me.value),onMouseenter:n[29]||(n[29]=s=>F.value=!0),onMouseleave:na},[e.createElementVNode("div",N2,[Rt.value===e.unref(L)("textEditor.image.noAlt")?(e.openBlock(),e.createElementBlock("div",B2,[...n[72]||(n[72]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10 0C4.5 0 0 4.5 0 10C0 15.5 4.5 20 10 20C15.5 20 20 15.5 20 10C20 4.5 15.5 0 10 0ZM2 10C2 5.6 5.6 2 10 2C11.8 2 13.5 2.6 14.9 3.7L3.7 14.9C2.6 13.5 2 11.8 2 10ZM10 18C8.2 18 6.5 17.4 5.1 16.3L16.3 5.1C17.4 6.5 18 8.2 18 10C18 14.4 14.4 18 10 18Z",fill:"#fafafa"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:"dss-image-popup-alt",title:Rt.value},e.toDisplayString(Rt.value),9,_2)]),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(Cl,["stop"]),title:e.unref(L)("textEditor.image.editImage")},[(e.openBlock(),e.createElementBlock("svg",$2,[...n[73]||(n[73]=[e.createElementVNode("g",null,[e.createElementVNode("path",{d:"M25.264 1.008c-.524 0-1.049.197-1.443.592l-2.248 2.248 6.58 6.578 2.246-2.248a2.058 2.058 0 0 0 0-2.887L26.707 1.6a2.032 2.032 0 0 0-1.443-.592zm-5.106 4.254L3.889 21.532a1.022 1.022 0 0 0-.242.391c-.729 2.187-2.035 5.759-2.6 7.803a1 1 0 0 0 1.188 1.24c2.432-.562 5.687-1.896 7.84-2.613a1.03 1.03 0 0 0 .392-.236l16.269-16.275z",fill:"hsl(0, 0%, 98%)",opacity:"1","data-original":"#000000",class:""})],-1)])]))],8,M2)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[B.floatingToolbar&&B.richText&&$e.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floatingToolbarRef",ref:ft,class:"dss-floating-toolbar",style:e.normalizeStyle(lt.value),onMousedown:n[44]||(n[44]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",D2,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(Fl,["stop"]),title:e.unref(L)("textEditor.toolbar.undo")},[...n[74]||(n[74]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M9.23302 0.888889C6.90278 0.888889 4.79238 1.76889 3.16561 3.2L0 0V8H7.91402L4.73083 4.78222C5.9531 3.75111 7.50953 3.11111 9.23302 3.11111C12.3459 3.11111 14.9927 5.16444 15.916 8L18 7.30667C16.7777 3.58222 13.3219 0.888889 9.23302 0.888889Z",fill:"#323232"})],-1)])],8,L2),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!bl.value}]),onClick:e.withModifiers(fn,["stop"]),title:e.unref(L)("textEditor.toolbar.redo")},[...n[75]||(n[75]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.8328 3.2C13.2053 1.76889 11.0938 0.888889 8.76246 0.888889C4.67155 0.888889 1.21408 3.58222 0 7.30667L2.07625 8C3 5.16444 5.6393 3.11111 8.76246 3.11111C10.478 3.11111 12.044 3.75111 13.2669 4.78222L10.0821 8H18V0L14.8328 3.2Z",fill:"#323232"})],-1)])],10,T2),n[89]||(n[89]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",A2,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:n[30]||(n[30]=e.withModifiers(s=>ba("paragraph"),["stop"])),title:e.unref(L)("textEditor.toolbar.paragraphFormat")},[M.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:W.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,R2)):M.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:W.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,F2)):M.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:W.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,I2)):M.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:W.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,z2)):M.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:W.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,P2)):M.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:W.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,O2)):(e.openBlock(),e.createElementBlock("svg",W2,[...n[76]||(n[76]=[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"},null,-1)])])),n[77]||(n[77]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,H2),it.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[38]||(n[38]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[31]||(n[31]=s=>Gl("<h1>"))},[e.createElementVNode("h1",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[32]||(n[32]=s=>Gl("<h2>"))},[e.createElementVNode("h2",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[33]||(n[33]=s=>Gl("<h3>"))},[e.createElementVNode("h3",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[34]||(n[34]=s=>Gl("<h4>"))},[e.createElementVNode("h4",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[35]||(n[35]=s=>Gl("<h5>"))},[e.createElementVNode("h5",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[36]||(n[36]=s=>Gl("<h6>"))},[e.createElementVNode("h6",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[37]||(n[37]=s=>Gl("<p>"))},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),n[90]||(n[90]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("bold")}]),onClick:n[39]||(n[39]=e.withModifiers(s=>Sl("bold"),["stop"])),title:e.unref(L)("textEditor.toolbar.bold")},[...n[78]||(n[78]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M8.8 6.79C9.79256 6.12 10.4884 5.02 10.4884 4C10.4884 1.74 8.69767 0 6.39535 0H0V14H7.20372C9.34233 14 11 12.3 11 10.21C11 8.69 10.12 7.39 8.8 6.79ZM3.06977 2.5H6.13953C6.98884 2.5 7.67442 3.17 7.67442 4C7.67442 4.83 6.98884 5.5 6.13953 5.5H3.06977V2.5ZM6.65116 11.5H3.06977V8.5H6.65116C7.50047 8.5 8.18605 9.17 8.18605 10C8.18605 10.83 7.50047 11.5 6.65116 11.5Z",fill:"currentColor"})],-1)])],10,q2),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("italic")}]),onClick:n[40]||(n[40]=e.withModifiers(s=>Sl("italic"),["stop"])),title:e.unref(L)("textEditor.toolbar.italic")},[...n[79]||(n[79]=[e.createElementVNode("svg",{viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4 0V3H6.21L2.79 11H0V14H8V11H5.79L9.21 3H12V0H4Z",fill:"#323232"})],-1)])],10,Z2),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("underline")}]),onClick:n[41]||(n[41]=e.withModifiers(s=>Sl("underline"),["stop"])),title:e.unref(L)("textEditor.toolbar.underline")},[...n[80]||(n[80]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.5 10.8889C8.10071 10.8889 10.2143 8.79667 10.2143 6.22222V0H8.25V6.22222C8.25 7.72333 7.01643 8.94444 5.5 8.94444C3.98357 8.94444 2.75 7.72333 2.75 6.22222V0H0.785714V6.22222C0.785714 8.79667 2.89929 10.8889 5.5 10.8889ZM0 12.4444V14H11V12.4444H0Z",fill:"#323232"})],-1)])],10,U2),n[91]||(n[91]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Ye.value}]),onClick:e.withModifiers(wn,["stop"]),title:e.unref(L)("textEditor.toolbar.citation")},[...n[81]||(n[81]=[e.createElementVNode("svg",{viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.42857 14H5.71429L8.57143 8.4V0H0V8.4H4.28571L1.42857 14ZM12.8571 14H17.1429L20 8.4V0H11.4286V8.4H15.7143L12.8571 14Z",fill:"currentColor"})],-1)])],10,Y2),n[92]||(n[92]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ke.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:e.withModifiers(jl,["stop"]),title:e.unref(L)("textEditor.toolbar.removeLink")},[...n[83]||(n[83]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18 4.88889H13.2V7.21111H18C20.052 7.21111 21.72 8.91 21.72 11C21.72 12.7478 20.544 14.2144 18.948 14.6422L20.7 16.4267C22.656 15.4122 24 13.3833 24 11C24 7.62667 21.312 4.88889 18 4.88889ZM16.8 9.77778H14.172L16.572 12.2222H16.8V9.77778ZM0 1.55222L3.732 5.35333C1.548 6.25778 0 8.44556 0 11C0 14.3733 2.688 17.1111 6 17.1111H10.8V14.7889H6C3.948 14.7889 2.28 13.09 2.28 11C2.28 9.05667 3.732 7.45556 5.592 7.24778L8.076 9.77778H7.2V12.2222H10.476L13.2 14.9967V17.1111H15.276L20.088 22L21.6 20.46L1.524 0L0 1.55222Z",fill:"#323232"})],-1)])],8,j2)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:e.withModifiers(Ln,["stop"]),title:e.unref(L)("textEditor.toolbar.insertLink")},[...n[82]||(n[82]=[e.createElementVNode("svg",{width:"20",height:"14",viewBox:"0 0 27 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.565 7C2.565 4.606 4.4415 2.66 6.75 2.66H12.15V0H6.75C3.024 0 0 3.136 0 7C0 10.864 3.024 14 6.75 14H12.15V11.34H6.75C4.4415 11.34 2.565 9.394 2.565 7ZM8.1 8.4H18.9V5.6H8.1V8.4ZM20.25 0H14.85V2.66H20.25C22.5585 2.66 24.435 4.606 24.435 7C24.435 9.394 22.5585 11.34 20.25 11.34H14.85V14H20.25C23.976 14 27 10.864 27 7C27 3.136 23.976 0 20.25 0Z",fill:"#323232"})],-1)])],8,X2)),n[93]||(n[93]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("insertUnorderedList")}]),onClick:e.withModifiers(sn,["stop"]),title:e.unref(L)("textEditor.toolbar.bulletList")},[...n[84]||(n[84]=[e.createElementVNode("svg",{viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.37838 5.2C0.615676 5.2 0 5.78067 0 6.5C0 7.21933 0.615676 7.8 1.37838 7.8C2.14108 7.8 2.75676 7.21933 2.75676 6.5C2.75676 5.78067 2.14108 5.2 1.37838 5.2ZM1.37838 0C0.615676 0 0 0.580667 0 1.3C0 2.01933 0.615676 2.6 1.37838 2.6C2.14108 2.6 2.75676 2.01933 2.75676 1.3C2.75676 0.580667 2.14108 0 1.37838 0ZM1.37838 10.4C0.615676 10.4 0 10.9893 0 11.7C0 12.4107 0.624865 13 1.37838 13C2.13189 13 2.75676 12.4107 2.75676 11.7C2.75676 10.9893 2.14108 10.4 1.37838 10.4ZM4.13514 12.5667H17V10.8333H4.13514V12.5667ZM4.13514 7.36667H17V5.63333H4.13514V7.36667ZM4.13514 0.433333V2.16667H17V0.433333H4.13514Z",fill:"#323232"})],-1)])],10,K2),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":St("insertOrderedList")}]),onClick:e.withModifiers(Tl,["stop"]),title:e.unref(L)("textEditor.toolbar.numberList")},[...n[85]||(n[85]=[e.createElementVNode("svg",{viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 12.1875H1.89474V12.6562H0.947368V13.5938H1.89474V14.0625H0V15H2.84211V11.25H0V12.1875ZM0.947368 3.75H1.89474V0H0V0.9375H0.947368V3.75ZM0 6.5625H1.70526L0 8.53125V9.375H2.84211V8.4375H1.13684L2.84211 6.46875V5.625H0V6.5625ZM4.73684 0.9375V2.8125H18V0.9375H4.73684ZM4.73684 14.0625H18V12.1875H4.73684V14.0625ZM4.73684 8.4375H18V6.5625H4.73684V8.4375Z",fill:"#323232"})],-1)])],10,G2),n[94]||(n[94]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(Nl,["stop"]),title:e.unref(L)("textEditor.toolbar.image")},[...n[86]||(n[86]=[e.createElementVNode("svg",{viewBox:"1.5 1.5 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.15065 15.8414L2.13398 15.8581C1.90898 15.3664 1.76732 14.8081 1.70898 14.1914C1.76732 14.7997 1.92565 15.3497 2.15065 15.8414Z",fill:"#323232"}),e.createElementVNode("path",{d:"M7.50091 8.65026C8.59628 8.65026 9.48425 7.76229 9.48425 6.66693C9.48425 5.57156 8.59628 4.68359 7.50091 4.68359C6.40555 4.68359 5.51758 5.57156 5.51758 6.66693C5.51758 7.76229 6.40555 8.65026 7.50091 8.65026Z",fill:"#323232"}),e.createElementVNode("path",{d:"M13.491 1.66699H6.50768C3.47435 1.66699 1.66602 3.47533 1.66602 6.50866V13.492C1.66602 14.4003 1.82435 15.192 2.13268 15.8587C2.84935 17.442 4.38268 18.3337 6.50768 18.3337H13.491C16.5243 18.3337 18.3327 16.5253 18.3327 13.492V11.5837V6.50866C18.3327 3.47533 16.5243 1.66699 13.491 1.66699ZM16.9743 10.417C16.3243 9.85866 15.2743 9.85866 14.6243 10.417L11.1577 13.392C10.5077 13.9503 9.45768 13.9503 8.80768 13.392L8.52435 13.1587C7.93268 12.642 6.99102 12.592 6.32435 13.042L3.20768 15.1337C3.02435 14.667 2.91602 14.1253 2.91602 13.492V6.50866C2.91602 4.15866 4.15768 2.91699 6.50768 2.91699H13.491C15.841 2.91699 17.0827 4.15866 17.0827 6.50866V10.5087L16.9743 10.417Z",fill:"#323232"})],-1)])],8,Q2),_t.value?(e.openBlock(),e.createElementBlock("div",J2)):e.createCommentVNode("",!0),_t.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(L)("textEditor.toolbar.comment"),onClick:e.withModifiers(Qe,["stop"])},[...n[87]||(n[87]=[e.createElementVNode("svg",{viewBox:"2 2 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.19 6H6.79C6.53 6 6.28 6.01 6.04 6.04C3.35 6.27 2 7.86 2 10.79V14.79C2 18.79 3.6 19.58 6.79 19.58H7.19C7.41 19.58 7.7 19.73 7.83 19.9L9.03 21.5C9.56 22.21 10.42 22.21 10.95 21.5L12.15 19.9C12.3 19.7 12.54 19.58 12.79 19.58H13.19C16.12 19.58 17.71 18.24 17.94 15.54C17.97 15.3 17.98 15.05 17.98 14.79V10.79C17.98 7.6 16.38 6 13.19 6ZM6.5 14C5.94 14 5.5 13.55 5.5 13C5.5 12.45 5.95 12 6.5 12C7.05 12 7.5 12.45 7.5 13C7.5 13.55 7.05 14 6.5 14ZM9.99 14C9.43 14 8.99 13.55 8.99 13C8.99 12.45 9.44 12 9.99 12C10.54 12 10.99 12.45 10.99 13C10.99 13.55 10.55 14 9.99 14ZM13.49 14C12.93 14 12.49 13.55 12.49 13C12.49 12.45 12.94 12 13.49 12C14.04 12 14.49 12.45 14.49 13C14.49 13.55 14.04 14 13.49 14Z",fill:"#323232"}),e.createElementVNode("path",{d:"M21.9802 6.79V10.79C21.9802 12.79 21.3602 14.15 20.1202 14.9C19.8202 15.08 19.4702 14.84 19.4702 14.49L19.4802 10.79C19.4802 6.79 17.1902 4.5 13.1902 4.5L7.10025 4.51C6.75025 4.51 6.51025 4.16 6.69025 3.86C7.44025 2.62 8.80025 2 10.7902 2H17.1902C20.3802 2 21.9802 3.6 21.9802 6.79Z",fill:"#323232"})],-1)])],8,ep)):e.createCommentVNode("",!0),B.askAi?(e.openBlock(),e.createElementBlock("div",tp)):e.createCommentVNode("",!0),B.askAi?(e.openBlock(),e.createElementBlock("div",lp,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-ai-float dss-toolbar-dropdown-toggle",onClick:n[42]||(n[42]=e.withModifiers(s=>ba("askAi"),["stop"])),title:e.unref(L)("textEditor.toolbar.askAi")},[n[88]||(n[88]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.97363 4.34473C5.4926 6.769 7.88838 8.45732 10.7598 9.01855C9.21102 10.2499 7.99851 11.8959 7.30762 13.8027C7.21982 14.066 6.82404 14.066 6.69238 13.8027C5.59521 10.7746 3.18158 8.40476 0.197266 7.30762C-0.0658032 7.21978 -0.0656958 6.82515 0.197266 6.69336C1.62341 6.17665 2.90369 5.36753 3.97363 4.34473Z",fill:"#9784ba"}),e.createElementVNode("path",{d:"M6.66895 0.197266C6.75687 -0.0657415 7.1515 -0.0657945 7.2832 0.197266C8.38035 3.22532 10.7941 5.5952 13.7783 6.69238C14.0416 6.78015 14.0416 7.17497 13.7783 7.30664C12.6735 7.71282 11.6469 8.29371 10.7363 9.01758C7.86425 8.45633 5.46822 6.76786 3.94922 4.34277C5.15088 3.1939 6.08858 1.77583 6.66895 0.197266Z",fill:"#cfbeed"})],-1)),e.createElementVNode("span",ap,e.toDisplayString(e.unref(L)("textEditor.toolbar.askAi")),1)],8,np),it.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[43]||(n[43]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(o.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),$n.value?(e.openBlock(),e.createElementBlock("div",op,[B.askAi&&$n.value?(e.openBlock(),e.createElementBlock("div",sp)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.customToolbarSlots,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[Ll(s)&&bn(s)?(e.openBlock(),e.createElementBlock("div",rp,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),Ll(s)&&bn(s)&&i<B.customToolbarSlots.length-1&&Yl(i)?(e.openBlock(),e.createElementBlock("div",ip)):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)]))],6))}}),dp={class:"dss-color-picker__section-title"},mp={class:"dss-color-picker__presets-row"},pp=["title","onClick"],vp={key:1,class:"dss-color-picker__section"},fp={class:"dss-color-picker__presets-row"},hp=["title","onClick"],gp={key:2,class:"dss-color-picker__section"},yp={class:"dss-color-picker__section-header"},kp={class:"dss-color-picker__presets-row"},Cp=["title","onClick"],bp=["onClick"],wp={key:1,class:"dss-color-picker__presets-row dss-color-picker__presets-row--standalone"},xp=["title","onClick"],Ep={class:"dss-color-picker__input-row"},Sp=["value"],Vp={__name:"DSSColorPicker",props:{modelValue:{type:String,default:"#b8a5de"},disabled:{type:Boolean,default:!1},presetColors:{type:Array,default:()=>[]},presetGroups:{type:Array,default:null},max:{type:Number,default:12},initialPresetCount:{type:Number,default:null},disableCustomColors:{type:Boolean,default:!1}},emits:["update:modelValue","update:presetColors"],setup(B,{emit:J}){function N(se){const X=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(se);if(!X)return{h:0,s:0,l:50};const te=parseInt(X[1],16)/255,ie=parseInt(X[2],16)/255,Ne=parseInt(X[3],16)/255,et=Math.max(te,ie,Ne),yt=Math.min(te,ie,Ne);let al=0,xt=0;const el=(et+yt)/2;if(et!==yt){const H=et-yt;switch(xt=el>.5?H/(2-et-yt):H/(et+yt),et){case te:al=((ie-Ne)/H+(ie<Ne?6:0))/6;break;case ie:al=((Ne-te)/H+2)/6;break;case Ne:al=((te-ie)/H+4)/6;break}}return{h:al*360,s:xt*100,l:el*100}}function L(se,X,te){X/=100,te/=100;const ie=X*Math.min(te,1-te),Ne=et=>{const yt=(et+se/30)%12,al=te-ie*Math.max(Math.min(yt-3,9-yt,1),-1);return Math.round(255*al).toString(16).padStart(2,"0")};return`#${Ne(0)}${Ne(8)}${Ne(4)}`}function ne(se){const X=se.replace(/^#/,"").match(/^([a-f\d]{6}|[a-f\d]{3})$/i);if(!X)return null;let te=X[1];return te.length===3&&(te=te.split("").map(ie=>ie+ie).join("")),"#"+te}function W(se){const X=se.match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,\/]+[\d.]+)?\s*\)$/i);if(!X)return null;const te=Math.max(0,Math.min(255,Number.parseInt(X[1],10))),ie=Math.max(0,Math.min(255,Number.parseInt(X[2],10))),Ne=Math.max(0,Math.min(255,Number.parseInt(X[3],10)));return`#${te.toString(16).padStart(2,"0")}${ie.toString(16).padStart(2,"0")}${Ne.toString(16).padStart(2,"0")}`}function R(se){if(typeof se!="string")return null;const X=se.trim();return ne(X)||W(X)}function ue(se,X,te){X/=100,te/=100;const ie=te+X*Math.min(te,1-te),Ne=ie===0?0:2-2*te/ie;return{h:se,s:Ne*100,v:ie*100}}function rt(se,X,te){X/=100,te/=100;const ie=te*(1-X/2),Ne=ie===0||ie===1?0:(te-ie)/Math.min(ie,1-ie);return{h:se,s:Ne*100,l:ie*100}}const ee=B,g=J,we=e.ref(!1),ke=e.ref(!1),G=e.ref(!1),j=e.ref(-1),fe=e.ref(-1),He=e.ref(null),he=e.ref(null),Te=e.ref(null),Z=e.ref(null),Fe=e.ref({top:0,left:0}),qe=e.ref(N(ee.modelValue||"#b8a5de")),Me=e.computed(()=>Array.isArray(ee.presetGroups)&&ee.presetGroups.length>0),Ze=e.computed(()=>!ee.disableCustomColors),U=e.computed(()=>Me.value?0:ee.initialPresetCount!=null?ee.initialPresetCount:fe.value<0?null:fe.value),Ae=e.computed(()=>{const se=U.value;return se==null?!0:Math.max(0,ee.presetColors.length-se)<ee.max}),Ye=e.computed(()=>!!(ke.value||j.value>=0||!Ce.value&&ee.presetColors.length===0));e.computed(()=>{const se=U.value;return se!=null&&ee.presetColors.length>se});const Ce=e.computed(()=>Me.value||U.value!=null),$e=e.computed(()=>{const se=U.value;return se==null?[]:ee.presetColors.slice(0,se)}),lt=e.computed(()=>{const se=U.value;return se==null?[]:ee.presetColors.slice(se)});function ft(se){const X=U.value;return X!=null?X+se:-1}function it(se){const X=U.value;return X!=null&&se>=X}function Xt(se){it(se)&&(j.value=se,qe.value=N(ee.presetColors[se]),ke.value=!0,e.nextTick(()=>Z.value?.focus()))}function xe(se){if(!it(se))return;const X=ee.presetColors.filter((Ne,et)=>et!==se);g("update:presetColors",X);const te=ne(ee.modelValue),ie=ne(ee.presetColors[se]);if(te&&ie&&te.toLowerCase()===ie.toLowerCase()){const Ne=X[Math.max(0,se-1)]||X[0];Ne&&g("update:modelValue",Ne)}}function Lt(){G.value=!G.value,G.value||(j.value=-1,ke.value=!1)}function Ke(){if(!Ze.value||j.value<0)return;const se=at.value,X=ne(se);if(X){const te=[...ee.presetColors];te[j.value]=X,g("update:presetColors",te),g("update:modelValue",X),j.value=-1,ke.value=!1}}function Je(){ee.disabled||!Ze.value||(j.value=-1,ke.value=!ke.value,ke.value&&(F(),e.nextTick(()=>Z.value?.focus())))}function mt(se){const X=R(se),te=R(ee.modelValue);return X&&te&&X.toLowerCase()===te.toLowerCase()}function Tt(){if(ee.disabled||!Ze.value||!Ae.value)return;const se=at.value,X=ne(se);if(X){const te=[...ee.presetColors,X];g("update:presetColors",te),g("update:modelValue",X);const ie=U.value??fe.value;ie>=0&&te.length-ie>=ee.max&&(ke.value=!1)}}const at=e.computed(()=>{const{h:se,s:X,l:te}=qe.value;return L(se,X,te)}),pt=e.computed(()=>at.value.toLowerCase()),ct=e.computed(()=>({background:`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${qe.value.h}, 100%, 50%))`})),Ut=e.computed(()=>{const se=ue(qe.value.h,qe.value.s,qe.value.l);return{left:`${se.s}%`,bottom:`${se.v}%`,transform:"translate(-50%, 50%)"}}),ht=e.computed(()=>({left:`${qe.value.h/360*100}%`,transform:"translateX(-50%)"})),Rt=e.computed(()=>({position:"fixed",left:`${Fe.value.left}px`,top:`${Fe.value.top}px`,zIndex:1002}));function me(){if(!He.value||!we.value)return;const se=He.value.getBoundingClientRect(),X=window.innerHeight||document.documentElement.clientHeight;let te=se.bottom+4;const ie=he.value;ie&&te+ie.offsetHeight>X-8&&(te=se.top-4-ie.offsetHeight),Fe.value={top:te,left:se.left}}function F(){const se=ee.modelValue||"#b8a5de",X=R(se);X&&(qe.value=N(X))}function Y(){g("update:modelValue",at.value)}function re(){ee.disabled||(we.value=!we.value,we.value&&(F(),e.nextTick(()=>{me(),Z.value?.focus()})))}function ve(){const se=at.value,X=ne(se);if(X){if(j.value>=0){const te=[...ee.presetColors];te[j.value]=X,g("update:presetColors",te),g("update:modelValue",X)}else if(Ze.value&&(ee.presetColors.length>0||Me.value)&&ke.value&&Ae.value&&!ee.presetColors.some(ie=>ne(ie)?.toLowerCase()===X.toLowerCase())){const ie=[...ee.presetColors,X];g("update:presetColors",ie),g("update:modelValue",X)}}we.value=!1,ke.value=!1,G.value=!1,j.value=-1}function Re(se){if(!Te.value)return;const X=Te.value.getBoundingClientRect(),te=ie=>{const Ne=Math.max(0,Math.min(1,(ie.clientX-X.left)/X.width)),et=Math.max(0,Math.min(1,1-(ie.clientY-X.top)/X.height)),yt={h:qe.value.h,s:Ne*100,v:et*100};qe.value=rt(yt.h,yt.s,yt.v)};te(se),document.addEventListener("mousemove",te),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",te),Y()},{once:!0})}function Ge(se){if(!se.currentTarget)return;const te=se.currentTarget.getBoundingClientRect(),ie=Ne=>{const et=Math.max(0,Math.min(1,(Ne.clientX-te.left)/te.width));qe.value={...qe.value,h:et*360}};ie(se),document.addEventListener("mousemove",ie),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",ie),Y()},{once:!0})}function Ct(se){const X=se.target.value,te=R(X);te&&(qe.value=N(te),g("update:modelValue",te))}function Se(se){if(ee.disabled)return;const X=R(se);X&&(qe.value=N(X),g("update:modelValue",X))}let tt=null,gt=null;function jt(){tt&&(document.removeEventListener("keydown",tt),tt=null),gt&&(window.removeEventListener("resize",gt),gt=null)}return e.watch(we,se=>{if(jt(),se){if(!Me.value&&ee.initialPresetCount==null){const X=ee.presetColors.length;X>0&&(fe.value<0||X<fe.value)&&(fe.value=X)}tt=X=>{X.key==="Escape"&&ve()},gt=me,document.addEventListener("keydown",tt),window.addEventListener("resize",gt)}}),e.watch(()=>ee.modelValue,()=>{we.value&&F()},{immediate:!1}),e.watch(lt,se=>{se.length===0&&(G.value=!1,j.value=-1,ke.value=!1)}),e.onBeforeUnmount(jt),(se,X)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-color-picker",{"dss-color-picker--disabled":B.disabled}])},[e.createElementVNode("div",{ref_key:"triggerRef",ref:He,class:e.normalizeClass(["dss-color-picker__trigger",{"dss-color-picker__trigger--open":we.value}]),onClick:re},[e.createElementVNode("span",{class:"dss-color-picker__swatch",style:e.normalizeStyle({backgroundColor:at.value})},[...X[0]||(X[0]=[e.createElementVNode("span",{class:"dss-color-picker__hover-layer"},[e.createElementVNode("svg",{class:"dss-color-picker__pen-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M0 9.64033V11.6667C0 11.8534 0.146646 12 0.333287 12H2.35967C2.44633 12 2.53298 11.9667 2.59297 11.9L9.87196 4.62769L7.37231 2.12804L0.0999862 9.40036C0.0333288 9.46702 0 9.54701 0 9.64033ZM11.805 2.69463C12.065 2.43466 12.065 2.01472 11.805 1.75476L10.2452 0.194973C9.98528 -0.064991 9.56534 -0.064991 9.30537 0.194973L8.08554 1.4148L10.5852 3.91446L11.805 2.69463Z",fill:"currentColor"})])],-1)])],4)],2),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[we.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-color-picker__overlay",onClick:e.withModifiers(ve,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:he,class:"dss-color-picker__dropdown",style:e.normalizeStyle(Rt.value)},[Ce.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Me.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(B.presetGroups,(te,ie)=>(e.openBlock(),e.createElementBlock("div",{key:"g-"+ie,class:"dss-color-picker__section"},[e.createElementVNode("span",dp,e.toDisplayString(te.title),1),e.createElementVNode("div",mp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.colors,(Ne,et)=>(e.openBlock(),e.createElementBlock("button",{key:"g-"+ie+"-"+et,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":mt(Ne)}]),style:e.normalizeStyle({backgroundColor:Ne,"--dss-preset-color":Ne}),title:Ne,onClick:e.withModifiers(yt=>Se(Ne),["stop"])},null,14,pp))),128))])]))),128)):$e.value.length?(e.openBlock(),e.createElementBlock("div",vp,[X[1]||(X[1]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Preset colors",-1)),e.createElementVNode("div",fp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($e.value,(te,ie)=>(e.openBlock(),e.createElementBlock("button",{key:"p-"+ie,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":mt(te)}]),style:e.normalizeStyle({backgroundColor:te,"--dss-preset-color":te}),title:te,onClick:e.withModifiers(Ne=>Se(te),["stop"])},null,14,hp))),128))])])):e.createCommentVNode("",!0),Ze.value?(e.openBlock(),e.createElementBlock("div",gp,[e.createElementVNode("div",yp,[X[3]||(X[3]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Custom Colors",-1)),lt.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__manage-icon",{"dss-color-picker__manage-icon--active":G.value}]),title:"Manage custom colors",onClick:e.withModifiers(Lt,["stop"])},[...X[2]||(X[2]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 9.64V11.67c0 .19.15.33.33.33h2.03c.09 0 .17-.03.23-.1l7.28-7.27-2.5-2.5L.1 9.4A.33.33 0 0 0 0 9.64ZM11.8 2.69c.26-.26.26-.68 0-.94L10.25.2a.66.66 0 0 0-.94 0L8.09 1.41l2.5 2.5 1.22-1.22Z",fill:"currentColor"})],-1)])],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",kp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,(te,ie)=>(e.openBlock(),e.createElementBlock("div",{key:"c-"+ie,class:e.normalizeClass(["dss-color-picker__preset-wrap",{"dss-color-picker__preset-wrap--manage":G.value}])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":!G.value&&mt(te),"dss-color-picker__preset-bubble--editing":G.value&&j.value===ft(ie)}]),style:e.normalizeStyle({backgroundColor:j.value===ft(ie)?at.value:te,"--dss-preset-color":j.value===ft(ie)?at.value:te}),title:j.value===ft(ie)?at.value:te,onClick:e.withModifiers(Ne=>G.value?Xt(ft(ie)):Se(te),["stop"])},null,14,Cp),G.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__preset-action dss-color-picker__preset-action--delete",title:"Delete",onClick:e.withModifiers(Ne=>xe(ft(ie)),["stop"])},[...X[4]||(X[4]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2 2l8 8M10 2L2 10",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)])],8,bp)):e.createCommentVNode("",!0)],2))),128)),Ae.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":ke.value}]),onClick:e.withModifiers(Je,["stop"])}," + ",2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],64)):B.presetColors.length?(e.openBlock(),e.createElementBlock("div",wp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.presetColors,(te,ie)=>(e.openBlock(),e.createElementBlock("button",{key:ie,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":mt(te)}]),style:e.normalizeStyle({backgroundColor:te,"--dss-preset-color":te}),title:te,onClick:e.withModifiers(Ne=>Se(te),["stop"])},null,14,xp))),128)),Ze.value&&Ae.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":ke.value}]),onClick:e.withModifiers(Je,["stop"])}," + ",2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ye.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",{class:"dss-color-picker__sl-area",ref_key:"slAreaRef",ref:Te,onMousedown:Re},[e.createElementVNode("div",{class:"dss-color-picker__sl-bg",style:e.normalizeStyle(ct.value)},null,4),e.createElementVNode("div",{class:"dss-color-picker__sl-pointer",style:e.normalizeStyle(Ut.value)},null,4)],544),e.createElementVNode("div",{class:"dss-color-picker__hue-wrap",onMousedown:Ge},[X[5]||(X[5]=e.createElementVNode("div",{class:"dss-color-picker__hue-track"},null,-1)),e.createElementVNode("div",{class:"dss-color-picker__hue-pointer",style:e.normalizeStyle(ht.value)},null,4)],32),e.createElementVNode("div",Ep,[e.createElementVNode("input",{ref_key:"hexInputRef",ref:Z,type:"text",class:"dss-color-picker__hex-input",value:pt.value,onInput:Ct},null,40,Sp)]),Ze.value&&Ce.value&&(B.presetColors.length||Me.value)&&Ae.value&&j.value<0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__add-btn",onClick:Tt}," Save color ")):e.createCommentVNode("",!0),Ze.value&&Ce.value&&j.value>=0?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-color-picker__add-btn",onClick:Ke}," Save color ")):e.createCommentVNode("",!0),Ce.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"dss-color-picker__add-btn",onClick:ve}," Save color "))],64)):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]))],2))}},Np={key:0,class:"dss-loader"},Bp={key:0,class:"dss-loader-label"},_p={key:1,class:"dss-loader"},Mp={key:0,class:"dss-loader-label"},$p={key:2,class:"dss-loader"},Dp={key:0,class:"dss-loader-label"},Lp={key:3,class:"dss-loader"},Tp={key:0,class:"dss-loader-label"},Ap={key:4,class:"dss-loader"},Hp={key:0,class:"dss-loader-label"},Rp={key:5,class:"dss-loader dss-loader--inline"},Fp={class:"dss-loader-inline-text"},Ip={__name:"DSSLoaders",props:{type:{type:String,default:"spinner"},label:{type:String,default:""},size:{type:[String,Number],default:"medium"},color:{type:String,default:""}},setup(B){const J=B,N=e.computed(()=>J.size==="small"?"dss-loaders--size-small":J.size==="large"?"dss-loaders--size-large":J.size==="medium"||J.size==null?"dss-loaders--size-medium":null),L=e.computed(()=>{const ne={};if(!(J.size==="small"||J.size==="medium"||J.size==="large"||J.size==null)){const W=typeof J.size=="number"?`${J.size}px`:String(J.size);ne["--dss-loader-size"]=W}return J.color&&(ne["--dss-loader-accent"]=J.color,ne["--dss-loader-accent-soft"]=`color-mix(in srgb, ${J.color} 30%, white)`),ne});return(ne,W)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-loaders",N.value]),style:e.normalizeStyle(L.value)},[B.type==="spinner"?(e.openBlock(),e.createElementBlock("div",Np,[W[0]||(W[0]=e.createElementVNode("span",{class:"dss-loader-spinner","aria-hidden":"true"},null,-1)),B.label?(e.openBlock(),e.createElementBlock("span",Bp,e.toDisplayString(B.label),1)):e.createCommentVNode("",!0)])):B.type==="dots"?(e.openBlock(),e.createElementBlock("div",_p,[W[1]||(W[1]=e.createElementVNode("span",{class:"dss-loader-dots","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-dot"}),e.createElementVNode("span",{class:"dss-loader-dot"}),e.createElementVNode("span",{class:"dss-loader-dot"})],-1)),B.label?(e.openBlock(),e.createElementBlock("span",Mp,e.toDisplayString(B.label),1)):e.createCommentVNode("",!0)])):B.type==="battery"?(e.openBlock(),e.createElementBlock("div",$p,[W[2]||(W[2]=e.createElementVNode("div",{class:"battery","aria-hidden":"true"},null,-1)),B.label?(e.openBlock(),e.createElementBlock("span",Dp,e.toDisplayString(B.label),1)):e.createCommentVNode("",!0)])):B.type==="double-circle"?(e.openBlock(),e.createElementBlock("div",Lp,[W[3]||(W[3]=e.createElementVNode("span",{class:"dss-loader-double-circle","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-double-circle-outer"}),e.createElementVNode("span",{class:"dss-loader-double-circle-inner"})],-1)),B.label?(e.openBlock(),e.createElementBlock("span",Tp,e.toDisplayString(B.label),1)):e.createCommentVNode("",!0)])):B.type==="bars"?(e.openBlock(),e.createElementBlock("div",Ap,[W[4]||(W[4]=e.createElementVNode("span",{class:"dss-loader-bars","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-bar"}),e.createElementVNode("span",{class:"dss-loader-bar"}),e.createElementVNode("span",{class:"dss-loader-bar"})],-1)),B.label?(e.openBlock(),e.createElementBlock("span",Hp,e.toDisplayString(B.label),1)):e.createCommentVNode("",!0)])):B.type==="inline"?(e.openBlock(),e.createElementBlock("div",Rp,[W[5]||(W[5]=e.createElementVNode("span",{class:"dss-loader-inline-spinner","aria-hidden":"true"},null,-1)),e.createElementVNode("span",Fp,[e.renderSlot(ne.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(B.label),1)])])])):e.createCommentVNode("",!0)],6))}},Ho="dss-skeleton-item",zp={__name:"DSSSkeleton",props:{loading:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},borderRadius:{type:String,default:"16px"},shimmer:{type:Boolean,default:!0},mode:{type:String,default:"single",validator:B=>["single","multiple"].includes(B)},targetClass:{type:String,default:Ho},bgColor:{type:String,default:null},shimmerColor:{type:String,default:null},bgDark:{type:String,default:null},shimmerDark:{type:String,default:null}},setup(B){const J=B,N=e.computed(()=>{const W={"dss-skeleton--loading":J.loading,"dss-skeleton--static":!J.shimmer,"dss-skeleton--multiple":J.mode==="multiple","dss-skeleton--dark":J.darkMode};return J.mode==="multiple"&&J.targetClass!==Ho&&(W[`dss-skeleton--target-${J.targetClass}`]=!0),W}),L=e.computed(()=>{const W={};return J.borderRadius&&(W.borderRadius=J.borderRadius),W}),ne=e.computed(()=>{const W={};return J.borderRadius&&(W["--dss-skeleton-border-radius"]=J.borderRadius),J.darkMode?(W["--dss-skeleton-bg"]=J.bgDark||"#322c3f",W["--dss-skeleton-shimmer"]=J.shimmerDark||"#3e3f41",W):(J.bgColor&&(W["--dss-skeleton-bg"]=J.bgColor),J.shimmerColor&&(W["--dss-skeleton-shimmer"]=J.shimmerColor),W)});return(W,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-skeleton",N.value]),style:e.normalizeStyle(ne.value)},[B.loading&&B.mode==="single"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-skeleton-overlay",style:e.normalizeStyle(L.value),"aria-hidden":"true"},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-skeleton-content",{"dss-skeleton-content--hidden":B.loading&&B.mode==="single"}])},[e.renderSlot(W.$slots,"default")],2)],6))}},Pp={key:0,class:"dss-dnd-column-header"},Op={class:"dss-dnd-column-title"},Wp={class:"dss-dnd-column-count"},qp=["data-column"],Zp={key:0,class:"dss-dnd-indicator"},Up=["onPointerdown"],Yp=["onPointerdown"],Xp={class:"dss-dnd-item-content"},jp={class:"dss-dnd-item-default"},Kp={key:0,class:"dss-dnd-empty"},Gp={name:"DSSDnd"},Qp=Object.assign(Gp,{props:{items:{type:Array,required:!0},columns:{type:Array,required:!0},columnKey:{type:String,default:"status"},positionKey:{type:String,default:"position"},itemKey:{type:String,default:"id"},options:{type:Object,default:()=>({})}},emits:["move","delete"],setup(B,{emit:J}){const N=B,L=J,ne=e.useSlots(),W=e.computed(()=>!!ne["delete-zone"]),R={columnMinWidth:"280px",columnMaxWidth:"none",columnGap:"12px",indicatorColor:"#7c6bc4",dragGhostOpacity:.75,dragSourceBackground:"#f5f5f5",dragSourceBorder:"#e0e0e0",useHandle:!1,columnBodyMaxHeight:"none",showHeader:!0,unstyled:!1,deleteZoneAlwaysVisible:!1,ColColor:!1},ue=e.computed(()=>({...R,...N.options})),rt=e.computed(()=>({"--dss-dnd-col-min-w":ue.value.columnMinWidth,"--dss-dnd-col-max-w":ue.value.columnMaxWidth,"--dss-dnd-col-gap":ue.value.columnGap,"--dss-dnd-indicator-color":ue.value.indicatorColor,"--dss-dnd-body-max-h":ue.value.columnBodyMaxHeight}));function ee(me){if(!ue.value.ColColor||!me)return{};const F=me.background||me.color;return F?{background:F}:{}}const g=e.ref(null),we=e.ref(null),ke=e.ref(!1),G=e.ref(-1),j=e.ref(null);let fe=null,He=null,he=null,Te=null,Z=0,Fe=0,qe="",Me=null;const Ze=5,U=e.computed(()=>{const me={};for(const F of N.columns)me[F.value]=N.items.filter(Y=>Y[N.columnKey]===F.value).sort((Y,re)=>(Y[N.positionKey]??0)-(re[N.positionKey]??0));return me}),Ae=e.computed(()=>{const me={},F=!!g.value,Y=g.value?.[N.itemKey],re=we.value,ve=G.value;for(const Re of N.columns){const Ge=U.value[Re.value]||[],Ct=[],Se=re==Re.value;let tt=0;for(let gt=0;gt<Ge.length;gt++){const jt=Ge[gt],se=F&&jt[N.itemKey]===Y;!se&&Se&&ve===tt&&Ct.push({type:"indicator",key:`ind-${tt}`}),se||tt++,Ct.push({type:"item",item:jt,isDragged:se,key:`item-${jt[N.itemKey]}`})}Se&&ve>=tt&&Ct.push({type:"indicator",key:"ind-end"}),me[Re.value]=Ct}return me});function Ye(me,F){const re=(U.value[me]||[]).filter(Ge=>Ge[N.itemKey]!==g.value?.[N.itemKey]);if(re.length===0)return 1;if(F<=0){const Ge=re[0][N.positionKey];return Ge!=null&&Ge>0?Ge/2:.5}if(F>=re.length){const Ge=re[re.length-1][N.positionKey];return(Ge??0)+1}const ve=re[F-1][N.positionKey]??0,Re=re[F][N.positionKey]??0;return(ve+Re)/2}function Ce(me,F,Y){he&&he.remove();const re=me.getBoundingClientRect(),ve=me.cloneNode(!0);ve.classList.add("dss-dnd-ghost"),ve.style.cssText=`
106
106
  position: fixed;
107
- left: ${H-Z}px;
108
- top: ${Y-ze}px;
109
- width: ${ie.width}px;
110
- height: ${ie.height}px;
107
+ left: ${F-Z}px;
108
+ top: ${Y-Fe}px;
109
+ width: ${re.width}px;
110
+ height: ${re.height}px;
111
111
  z-index: 9999;
112
112
  pointer-events: none;
113
- opacity: ${de.value.dragGhostOpacity};
113
+ opacity: ${ue.value.dragGhostOpacity};
114
114
  box-sizing: border-box;
115
115
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
116
- background-color: ${de.value.dragSourceBackground};
116
+ background-color: ${ue.value.dragSourceBackground};
117
117
  font-family: 'Work Sans', sans-serif;
118
118
  cursor: grabbing;
119
- `,document.body.appendChild(fe),ge=fe}function Me(pe,H){ge&&(ge.style.left=`${pe-Z}px`,ge.style.top=`${H-ze}px`)}function rt(pe){pe.classList.add("dss-dnd-item--dragging"),pe.style.background=de.value.dragSourceBackground,pe.style.borderColor=de.value.dragSourceBorder,pe.style.transform="scale(0.97)"}function yt(pe){pe.classList.remove("dss-dnd-item--dragging"),pe.style.background="",pe.style.borderColor="",pe.style.transform=""}function mt(pe,H){return document.elementFromPoint(pe,H)?.closest(".dss-dnd-column-body")??null}function Qt(pe,H){return!!document.elementFromPoint(pe,H)?.closest("[data-dss-dnd-delete-zone]")}function xe(pe,H){if(W.value&&Qt(pe,H)){ye.value=!0,we.value=null,Q.value=-1;return}ye.value=!1;const Y=mt(pe,H),ie=Y?.getAttribute("data-column")??null;if(!ie){we.value=null,Q.value=-1;return}we.value=ie;const fe=Y.querySelectorAll(".dss-dnd-item:not(.dss-dnd-item--dragging)");let Fe=fe.length;for(let tt=0;tt<fe.length;tt++){const Et=fe[tt].getBoundingClientRect();if(H<Et.top+Et.height/2){Fe=tt;break}}Q.value=Fe}function Jt(pe){pe.preventDefault(),Me(pe.clientX,pe.clientY),!he&&(he=requestAnimationFrame(()=>{he=null,xe(pe.clientX,pe.clientY)}))}function et(pe){window.removeEventListener("pointermove",Jt),window.removeEventListener("pointerup",et),window.removeEventListener("pointercancel",et),Ae?.releasePointerCapture?.(pe.pointerId),yt(Ae),Ae=null;const H=W.value&&Qt(pe.clientX,pe.clientY);if(h.value&&H)L("delete",{item:h.value});else{const ie=mt(pe.clientX,pe.clientY)?.getAttribute("data-column")??null;if(h.value&&ie){const fe=h.value[N.columnKey],Fe=ie,Et=(U.value[Fe]||[]).filter(el=>el[N.itemKey]!==h.value[N.itemKey]),Se=Math.max(0,Math.min(Q.value,Et.length)),ot=Ke(Fe,Se),bt=h.value[N.itemKey];L("move",{item:h.value,from:fe,to:Fe,position:ot,index:Se}),Re&&clearTimeout(Re),K.value={id:bt,from:fe,to:Fe},Re=setTimeout(()=>{K.value=null},3500)}}ge&&(ge.remove(),ge=null),Ye!==null&&(document.body.style.cursor=Ye,Ye=""),Pt()}function lt(pe,H){pe.preventDefault();const Y=pe.target.closest(".dss-dnd-item");if(!Y)return;const ie=Y.getBoundingClientRect();Z=pe.clientX-ie.left,ze=pe.clientY-ie.top,Ye=document.body.style.cursor,document.body.style.cursor="grabbing",h.value=H,Ae=Y,ke(Y,pe.clientX,pe.clientY),requestAnimationFrame(()=>rt(Y)),Y.setPointerCapture?.(pe.pointerId),window.addEventListener("pointermove",Jt),window.addEventListener("pointerup",et,{once:!0}),window.addEventListener("pointercancel",et,{once:!0})}function kt(){_e&&(window.removeEventListener("pointermove",Rt),window.removeEventListener("pointerup",ct),window.removeEventListener("pointercancel",ct),_e=null)}function Rt(pe){if(!_e||pe.pointerId!==_e.pointerId)return;const H=pe.clientX-_e.startX,Y=pe.clientY-_e.startY;if(Math.abs(H)>=Xe||Math.abs(Y)>=Xe){const ie=_e.item;kt(),lt(pe,ie)}}function ct(pe){!_e||pe.pointerId!==_e.pointerId||kt()}function ht(pe,H){kt(),_e={item:H,startX:pe.clientX,startY:pe.clientY,pointerId:pe.pointerId},window.addEventListener("pointermove",Rt),window.addEventListener("pointerup",ct),window.addEventListener("pointercancel",ct)}function pt(pe,H){de.value.useHandle||ht(pe,H)}function Xt(pe,H){ht(pe,H)}function Ct(){he&&(cancelAnimationFrame(he),he=null)}function Pt(){Ct(),h.value=null,we.value=null,ye.value=!1,Q.value=-1}return e.onBeforeUnmount(()=>{Ct(),kt(),Re&&clearTimeout(Re),ge&&(ge.remove(),ge=null)}),(pe,H)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-dnd",{"dss-dnd--unstyled":de.value.unstyled}]),style:e.normalizeStyle(dt.value)},[W.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["dss-dnd-delete-zone",{"dss-dnd-delete-zone--drag-over":ye.value}]),"data-dss-dnd-delete-zone":""},[e.renderSlot(pe.$slots,"delete-zone",{isDragging:!!h.value,isOver:ye.value})],2),[[e.vShow,!!h.value||de.value.deleteZoneAlwaysVisible]])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.columns,Y=>(e.openBlock(),e.createElementBlock("div",{key:Y.value,class:e.normalizeClass(["dss-dnd-column",[{"dss-dnd-column--drag-over":we.value==Y.value},Y.class||""]]),style:e.normalizeStyle(ee(Y))},[de.value.showHeader?(e.openBlock(),e.createElementBlock("div",Hp,[e.renderSlot(pe.$slots,"column-header",{column:Y,items:U.value[Y.value]||[]},()=>[e.createElementVNode("span",Rp,e.toDisplayString(Y.title||Y.value),1),e.createElementVNode("span",Fp,e.toDisplayString((U.value[Y.value]||[]).length),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"dss-dnd-column-body","data-column":Y.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(He.value[Y.value],ie=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ie.key},[ie.type==="indicator"?(e.openBlock(),e.createElementBlock("div",zp)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-dnd-item",{"dss-dnd-item--dragging":ie.isDragged,"dss-dnd-item--no-handle":!de.value.useHandle}]),onPointerdown:fe=>pt(fe,ie.item)},[de.value.useHandle?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-dnd-handle",onPointerdown:e.withModifiers(fe=>Xt(fe,ie.item),["stop"])},[e.renderSlot(pe.$slots,"handle",{},()=>[H[0]||(H[0]=e.createElementVNode("span",{class:"dss-dnd-handle-icon"},"⠿",-1))])],40,Op)):e.createCommentVNode("",!0),e.createElementVNode("div",Wp,[e.renderSlot(pe.$slots,"item",{item:ie.item,column:Y,justDropped:K.value?.id===ie.item[_.itemKey],droppedFrom:K.value?.id===ie.item[_.itemKey]?K.value.from:null,droppedTo:K.value?.id===ie.item[_.itemKey]?K.value.to:null},()=>[e.createElementVNode("div",qp,e.toDisplayString(ie.item[_.itemKey]),1)])])],42,Pp))],64))),128)),(U.value[Y.value]||[]).length===0&&we.value!=Y.value?(e.openBlock(),e.createElementBlock("div",Zp,[e.renderSlot(pe.$slots,"empty",{column:Y},()=>[H[1]||(H[1]=e.createElementVNode("span",{class:"dss-dnd-empty-text"},"No items",-1))])])):e.createCommentVNode("",!0)],8,Ip)],6))),128))],6))}}),Xp={name:"DSSConfetti"},jp=Object.assign(Xp,{props:{trigger:{type:Boolean,default:!1},duration:{type:Number,default:3e3},fadeStart:{type:Number,default:2e3},count:{type:Number,default:90},colors:{type:Array,default:()=>["#047395","#ffc230","#0897c1","#fe3b59","#11e1a2","#b3b2fb","#fadb8d","#ffa25b","#feaab1"]},delay:{type:Number,default:300}},setup(_){const J=_,N=e.ref(null),L=e.ref(!1);let oe=[],W=null,A=null;function de(Q,K){const he=[];for(let Re=0;Re<J.count;Re++)he.push(dt(Q));return he}function dt(Q,K){return{x:Math.random()*Q,y:-Math.random()*150-20,r:Math.random()*8+3,d:Math.random()*50,color:J.colors[Math.floor(Math.random()*J.colors.length)],tilt:Math.floor(Math.random()*10)-10,tiltInc:Math.random()*.08+.04,tiltAngle:0,opacity:Math.random()*.7+.3,speed:Math.random()*4+1.5}}function ee(Q,K,he,Re){Q.clearRect(0,0,K,he);for(const ge of oe)Q.save(),Q.globalAlpha=ge.opacity*Re,Q.beginPath(),Q.lineWidth=ge.r,Q.strokeStyle=ge.color,Q.moveTo(ge.x+ge.tilt+ge.r/2,ge.y),Q.lineTo(ge.x+ge.tilt,ge.y+ge.tilt+ge.r/2),Q.stroke(),Q.restore()}function h(Q,K,he){const Re=.3+he*.7;for(let ge=0;ge<oe.length;ge++){const Ae=oe[ge];Ae.tiltAngle+=Ae.tiltInc,Ae.y+=Ae.speed*Re,Ae.x+=Math.sin(Ae.d)*.5*Re,Ae.tilt=Math.sin(Ae.tiltAngle)*15,he>=.99&&Ae.y>K+20&&(oe[ge]=dt(Q))}}function we(){L.value=!0,e.nextTick(()=>{const Q=N.value;if(!Q)return;const K=Q.getContext("2d"),he=Q.parentElement;if(!he)return;const Re=he.getBoundingClientRect();Q.width=Re.width,Q.height=Re.height,oe=de(Q.width,Q.height);const ge=Date.now(),Ae=ge+J.duration,Z=()=>{const ze=Date.now(),Ye=ze-ge;if(ze<Ae){let _e=1;Ye>J.fadeStart&&(_e=1-(Ye-J.fadeStart)/(J.duration-J.fadeStart)),ee(K,Q.width,Q.height,_e),h(Q.width,Q.height,_e),W=requestAnimationFrame(Z)}else ye()};Z()})}function ye(){W&&(cancelAnimationFrame(W),W=null),oe=[],L.value=!1}return e.watch(()=>J.trigger,Q=>{Q&&(A&&clearTimeout(A),A=setTimeout(we,J.delay))},{immediate:!0}),e.onBeforeUnmount(()=>{ye(),A&&clearTimeout(A)}),(Q,K)=>L.value?(e.openBlock(),e.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:N,class:"dss-confetti-canvas"},null,512)):e.createCommentVNode("",!0)}}),Kp={class:"dss-filter-global-inner"},Gp=["placeholder","value"],Qp=["title"],Jp={key:0,class:"dss-filter-funnel-badge"},e0={key:1,class:"dss-filter-sortby"},t0=["value"],l0=["value"],n0=["disabled","title"],o0={key:0,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a0={key:1,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s0={key:2,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r0={class:"dss-filter-panel"},i0={key:0,class:"dss-filter-empty"},c0={class:"dss-filter-row-prefix"},u0={class:"dss-filter-cell"},d0=["onClick"],m0={class:"dss-filter-trigger-text"},p0=["placeholder"],v0={class:"dss-filter-popup-list"},f0=["onClick"],h0={key:0,class:"dss-filter-popup-empty"},g0={key:0,class:"dss-filter-cell"},y0=["onClick"],k0={class:"dss-filter-trigger-text"},C0={class:"dss-filter-popup-list"},b0=["onClick"],w0={key:1,class:"dss-filter-cell dss-filter-cell--value"},x0=["placeholder","onUpdate:modelValue"],E0={key:1,class:"dss-filter-date-wrap"},S0=["placeholder","onUpdate:modelValue"],V0=["placeholder","value","onInput","step"],N0={key:4,class:"dss-filter-between"},B0=["placeholder","value","onInput","step"],_0={class:"dss-filter-between-sep"},M0=["placeholder","value","onInput","step"],$0={key:5,class:"dss-filter-multiselect"},L0=["onClick"],T0={class:"dss-filter-trigger-text"},D0=["placeholder"],A0={class:"dss-filter-popup-list dss-filter-popup-list--check"},H0=["onClick"],R0=["checked"],F0={key:0,class:"dss-filter-popup-empty"},I0=["onClick"],z0={class:"dss-filter-foot"},P0={class:"dss-filter-cell"},O0=["placeholder"],W0={class:"dss-filter-popup-list"},q0=["onClick"],Z0={key:0,class:"dss-filter-popup-divider"},U0=["onClick"],Y0=["placeholder"],X0={class:"dss-filter-popup-list"},j0=["onClick"],K0={key:0,class:"dss-filter-popup-empty"},G0=["placeholder"],Q0={class:"dss-filter-popup-list"},J0=["onClick"],e9={key:0,class:"dss-filter-popup-empty"},t9={name:"DSSFilter"},l9=Object.assign(t9,{props:{data:{type:Array,required:!0},modelValue:{type:Array,default:void 0},exclude:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})},showSortBy:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(_,{expose:J,emit:N}){const{t:L}=ho.useI18n(),oe=_,W=N,A={unstyled:!1,maxUniqueForSelect:30,maxUniqueForEnum:15},de=e.computed(()=>({...A,...oe.options})),dt={text:[{value:"contains"},{value:"not_contains"},{value:"equals"},{value:"not_equals"},{value:"starts_with"},{value:"ends_with"},{value:"is_empty"},{value:"is_not_empty"}],select:[{value:"is_any_of"},{value:"is_none_of"},{value:"is_empty"},{value:"is_not_empty"}],range:[{value:"eq"},{value:"neq"},{value:"gt"},{value:"gte"},{value:"lt"},{value:"lte"},{value:"between"},{value:"is_empty"},{value:"is_not_empty"}],int:[{value:"eq"},{value:"neq"},{value:"gt"},{value:"gte"},{value:"lt"},{value:"lte"},{value:"between"},{value:"is_empty"},{value:"is_not_empty"}],arraySelect:[{value:"contains_any"},{value:"contains_all"},{value:"not_contains_any"},{value:"is_empty"},{value:"is_not_empty"}],arrayText:[{value:"contains"},{value:"not_contains"},{value:"is_empty"},{value:"is_not_empty"}],date:[{value:"eq"},{value:"before"},{value:"after"},{value:"is_empty"},{value:"is_not_empty"}],boolean:[{value:"is_true"},{value:"is_false"},{value:"is_empty"},{value:"is_not_empty"}]},ee=new Set(["is_empty","is_not_empty","is_true","is_false"]),h=["label","name","title","keyword","full_name","value","text"],we=e.ref(""),ye=e.ref([]),Q=e.ref(null),K=e.ref(!1),he=e.ref(null),Re=e.ref(""),ge=e.ref(null),Ae=e.ref(""),Z=e.ref("asc");let ze=1;function Ye(D){const V=D.find(B=>B&&typeof B=="object");if(!V)return null;for(const B of h)if(B in V&&typeof V[B]=="string")return B;return Object.keys(V).find(B=>typeof V[B]=="string")||null}function _e(D,V){const B=V.filter(ae=>ae!=null&&ae!=="NULL");if(B.length===0)return null;if(B.every(ae=>Array.isArray(ae))){const ae=B.flatMap(je=>je).filter(je=>je!=null);return ae.length===0?null:typeof ae.find(je=>je!=null)=="object"?"arraySelect":"arrayText"}return B.every(ae=>typeof ae=="boolean")?"boolean":B.every(ae=>typeof ae=="number")?new Set(B).size<=de.value.maxUniqueForEnum?"select":"range":B.every(ae=>typeof ae=="string")?new Set(B).size<=de.value.maxUniqueForSelect?"select":"text":B.some(ae=>typeof ae=="object"&&!Array.isArray(ae))?null:"text"}const Xe=e.computed(()=>{if(!oe.data?.length)return[];const D=new Set;for(const se of oe.data)if(se&&typeof se=="object")for(const je of Object.keys(se))D.add(je);const V=new Set(oe.exclude),B=[];for(const se of D){if(V.has(se))continue;const je=oe.config[se]||{},St=oe.data.map(vt=>vt?.[se]),ut=je.type||_e(se,St);if(!ut)continue;const Ge=je.filterMode||"contain",_t=Ge==="date"?"date":Ge==="string"?"text":ut,Nt={key:se,label:je.label||Vt(se),type:_t,filterMode:Ge};if(ut==="select"){const vt=St.filter(Lt=>Lt!=null&&Lt!=="NULL");Nt.uniqueValues=[...new Set(vt)].sort((Lt,Ht)=>typeof Lt=="number"&&typeof Ht=="number"?Lt-Ht:String(Lt).localeCompare(String(Ht)))}else if(ut==="range"||ut==="int"){const vt=St.filter(Lt=>typeof Lt=="number");Nt.min=Math.min(...vt),Nt.max=Math.max(...vt)}else if(ut==="arraySelect"){const vt=je.displayKey||Ye(St.flatMap(Lt=>Array.isArray(Lt)?Lt:[]));if(Nt.displayKey=vt,Array.isArray(je.uniqueValues)&&je.uniqueValues.length>0)Nt.uniqueValues=je.uniqueValues.map(Lt=>String(Lt));else{const Lt=St.flatMap(Ht=>Array.isArray(Ht)?Ht:[]).filter(Ht=>Ht!=null).map(Ht=>vt&&typeof Ht=="object"?Ht[vt]:String(Ht)).filter(Ht=>Ht!=null&&Ht!=="");Nt.uniqueValues=[...new Set(Lt)].sort((Ht,Mt)=>String(Ht).localeCompare(String(Mt)))}}B.push(Nt)}const ae=oe.config._order;return ae&&B.sort((se,je)=>{const St=ae.indexOf(se.key),ut=ae.indexOf(je.key);return St===-1&&ut===-1?0:St===-1?1:ut===-1?-1:St-ut}),B}),U=e.computed(()=>{const D={};for(const V of Xe.value)D[V.key]=V;return D}),He=e.computed(()=>Array.isArray(oe.config.groups)&&oe.config.groups.length>0),Ke=e.computed(()=>{if(!He.value)return[];const D=new Set(Xe.value.map(V=>V.key));return oe.config.groups.map(V=>({...V,keys:V.keys.filter(B=>D.has(B))})).filter(V=>V.keys.length>0)}),ke=e.computed(()=>{if(!He.value)return[];const D=new Set(oe.config.groups.flatMap(V=>V.keys));return Xe.value.filter(V=>!D.has(V.key))}),Me=e.computed(()=>{if(!ge.value)return[];const D=new Set(ge.value.keys),V=Xe.value.filter(ae=>D.has(ae.key));if(!Re.value)return V;const B=Re.value.toLowerCase();return V.filter(ae=>ae.label.toLowerCase().includes(B))}),rt=e.computed(()=>{if(!Re.value)return Xe.value;const D=Re.value.toLowerCase();return Xe.value.filter(V=>V.label.toLowerCase().includes(D))}),yt=e.computed(()=>Xe.value.filter(D=>!["arraySelect","arrayText"].includes(D.type))),mt=e.computed(()=>Ae.value?Z.value==="asc"?"Ascending":"Descending":"No sort selected");function Qt(D){Q.value===D?xe():(Q.value=D,Re.value="",ge.value=null)}function xe(){Q.value=null,Re.value="",ge.value=null}function Jt(D){const V=D.target.closest(".dss-datepicker__overlay, .dss-datepicker__dropdown");Q.value&&!V&&!D.target.closest(".dss-filter-popup")&&!D.target.closest(".dss-filter-trigger")&&!D.target.closest(".dss-filter-add-btn")&&xe(),K.value&&he.value&&!he.value.contains(D.target)&&(V||(K.value=!1))}e.onMounted(()=>document.addEventListener("click",Jt)),e.onBeforeUnmount(()=>document.removeEventListener("click",Jt));function et(D){return U.value[D]?.label||Vt(D)}function lt(D){return U.value[D.key]?.filterMode||"contain"}function kt(D){return L(`filter.operators.${D}`)}function Rt(D){const V=U.value[D.key];return(dt[V?.type]||dt.text).map(B=>({...B,label:L(`filter.operators.${B.value}`)}))}function ct(D){return ee.has(D)}function ht(D){const V=U.value[D.key];return V?V.type==="date"?"date":V.type==="boolean"?"boolean":V.type==="text"||V.type==="arrayText"?"text":V.type==="select"||V.type==="arraySelect"?"multiselect":V.type==="range"||V.type==="int"?D.operator==="between"?"between":"number":"text":"text"}function pt(D){return dt[D]?.[0]?.value||"contains"}function Xt(D,V){return ee.has(V)||D==="date"?null:D==="select"||D==="arraySelect"?[]:(D==="range"||D==="int")&&V==="between"?{min:null,max:null}:D==="range"||D==="int"?null:""}function Ct(D){return U.value[D.key]?.uniqueValues||[]}function Pt(D){const V=Ct(D);if(!Re.value)return V;const B=Re.value.toLowerCase();return V.filter(ae=>String(ae).toLowerCase().includes(B))}function pe(D){const V=D.value;return!V||V.length===0?L("filter.select"):V.length<=2?V.join(", "):L("filter.selectedCount",{count:V.length})}function H(D){const V=U.value[D],B=V?.filterMode||"contain",ae=V?.type||"text",se=B==="string"?"contains":pt(ae);ye.value.push(e.reactive({id:ze++,key:D,operator:se,value:Xt(ae,se)})),xe()}function Y(D){ye.value=ye.value.filter(V=>V.id!==D)}function ie(D,V){const ae=U.value[V]?.type||"text";D.key=V,D.operator=pt(ae),D.value=Xt(ae,D.operator),xe()}function fe(D,V){const B=ht(D);D.operator=V;const ae=ht(D);if(B!==ae||ee.has(V)){const se=U.value[D.key];D.value=Xt(se?.type||"text",V)}xe()}function Fe(D,V){const B=V.target.value;D.value=B===""?null:Number(B)}function tt(D,V,B){const ae=B.target.value,se=ae===""?null:Number(ae);(!D.value||typeof D.value!="object")&&(D.value={min:null,max:null}),D.value={...D.value,[V]:isNaN(se)?null:se}}function Et(D,V){const B=D.value||[],ae=B.indexOf(V);D.value=ae>=0?B.filter(se=>se!==V):[...B,V]}function Se(){ye.value=[],we.value="",xe()}function ot(D){we.value=D.target.value}function bt(D){Ae.value=D.target.value}function el(){Z.value=Z.value==="asc"?"desc":"asc"}const re=e.computed(()=>{if(!oe.data)return[];let D=oe.data;if(we.value){const V=we.value.toLowerCase();D=D.filter(B=>{for(const ae of Object.keys(B)){const se=B[ae];if(typeof se=="string"&&se.toLowerCase().includes(V)||typeof se=="number"&&String(se).includes(V)||Array.isArray(se)&&se.some(je=>je!=null&&(typeof je=="string"?je.toLowerCase().includes(V):typeof je=="object"?Object.values(je).some(St=>typeof St=="string"&&St.toLowerCase().includes(V)):!1)))return!0}return!1})}for(const V of ye.value){if(!ce(V))continue;const B=U.value[V.key];B&&(D=D.filter(ae=>Ve(ae,V,B)))}if(oe.showSortBy&&Ae.value){const V=Ae.value,B=Z.value==="asc"?1:-1;D=[...D].sort((ae,se)=>X(ae?.[V],se?.[V])*B)}return D});function X(D,V){const B=te(D),ae=te(V);return B==null&&ae==null?0:B==null?1:ae==null?-1:typeof B=="number"&&typeof ae=="number"?B-ae:String(B).localeCompare(String(ae),void 0,{numeric:!0,sensitivity:"base"})}function te(D){return D==null||D==="NULL"?null:typeof D=="string"||typeof D=="number"||typeof D=="boolean"?D:D instanceof Date?D.getTime():null}function ce(D){return ee.has(D.operator)?!0:D.value==null||typeof D.value=="string"&&D.value===""||Array.isArray(D.value)&&D.value.length===0?!1:D.value instanceof Date?!isNaN(D.value.getTime()):!(typeof D.value=="object"&&!Array.isArray(D.value)&&D.value.min==null&&D.value.max==null)}function Ve(D,V,B){const ae=D?.[V.key],se=V.value,je=V.operator;if(je==="is_empty")return dl(ae);if(je==="is_not_empty")return!dl(ae);const St=B.type;if(St==="text"||St==="arrayText"){const ut=St==="arrayText"&&Array.isArray(ae)?ae.filter(Nt=>Nt!=null).map(String).join(" "):ae!=null?String(ae):"",Ge=String(se).toLowerCase(),_t=ut.toLowerCase();switch(je){case"contains":return _t.includes(Ge);case"not_contains":return!_t.includes(Ge);case"equals":return _t===Ge;case"not_equals":return _t!==Ge;case"starts_with":return _t.startsWith(Ge);case"ends_with":return _t.endsWith(Ge);default:return!0}}if(St==="select")switch(je){case"is_any_of":return se.includes(ae);case"is_none_of":return!se.includes(ae);default:return!0}if(St==="range"||St==="int"){const ut=typeof ae=="number"?ae:Number(ae);if(typeof ut!="number"||isNaN(ut))return!1;if(je==="between"){const _t=se?.min!=null?Number(se.min):null,Nt=se?.max!=null?Number(se.max):null,vt=_t!=null&&!isNaN(_t)?_t:null,Lt=Nt!=null&&!isNaN(Nt)?Nt:null;return(vt==null||ut>=vt)&&(Lt==null||ut<=Lt)}const Ge=typeof se=="number"&&!isNaN(se)?se:Number(se);if(je==="contains"||je==="not_contains"){const _t=String(ut),Nt=String(se??"").toLowerCase(),vt=_t.toLowerCase().includes(Nt);return je==="contains"?vt:!vt}if(typeof Ge!="number"||isNaN(Ge))return!1;switch(je){case"eq":return ut===Ge;case"neq":return ut!==Ge;case"gt":return ut>Ge;case"gte":return ut>=Ge;case"lt":return ut<Ge;case"lte":return ut<=Ge;default:return!0}}if(St==="arraySelect"){if(!Array.isArray(ae))return!1;const ut=ae.filter(Ge=>Ge!=null).map(Ge=>B.displayKey&&typeof Ge=="object"?Ge[B.displayKey]:String(Ge));switch(je){case"contains_any":return ut.some(Ge=>se.includes(Ge));case"contains_all":return se.every(Ge=>ut.includes(Ge));case"not_contains_any":return!ut.some(Ge=>se.includes(Ge));default:return!0}}if(St==="date"){const ut=nt(se);if(!ut||isNaN(ut.getTime()))return!1;const Ge=nt(ae);if(!Ge||isNaN(Ge.getTime()))return!1;const _t=xt(Ge),Nt=xt(ut);switch(je){case"eq":return _t===Nt;case"before":return _t<Nt;case"after":return _t>Nt;default:return!0}}if(St==="boolean"){const ut=ae===!0||ae==="true"||ae===1,Ge=ae===!1||ae==="false"||ae===0;switch(je){case"is_true":return ut;case"is_false":return Ge;default:return!0}}return!0}function nt(D){if(D==null)return null;if(D instanceof Date)return isNaN(D.getTime())?null:D;if(typeof D=="number")return new Date(D>1e10?D:D*1e3);if(typeof D=="string"){const V=new Date(D);return isNaN(V.getTime())?null:V}return null}function xt(D){const V=D.getFullYear(),B=String(D.getMonth()+1).padStart(2,"0"),ae=String(D.getDate()).padStart(2,"0");return`${V}-${B}-${ae}`}function dl(D){return!!(D==null||D===""||D==="NULL"||Array.isArray(D)&&D.length===0||Array.isArray(D)&&D.every(V=>V==null))}e.watch(re,D=>W("update:modelValue",D),{immediate:!0}),e.watch(()=>oe.data,()=>{ye.value=[],we.value="",K.value=!1,Ae.value="",Z.value="asc",xe()});function Vt(D){return D.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,V=>V.toUpperCase())}function sl(){const D=V=>{if(V==null)return V;if(V instanceof Date)return{_type:"Date",value:V.toISOString(),local:V.toLocaleDateString()};if(Array.isArray(V))return V.map(D);if(typeof V=="object"&&!Array.isArray(V)){const B={};for(const ae of Object.keys(V))B[ae]=D(V[ae]);return B}return V};return{globalSearch:we.value,rows:ye.value.map(V=>({key:V.key,operator:V.operator,value:D(V.value),defType:U.value[V.key]?.type,defFilterMode:U.value[V.key]?.filterMode})),filteredCount:re.value?.length??0}}return J({getDebugState:sl}),(D,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-filter",{"dss-filter--unstyled":de.value.unstyled}])},[e.createElementVNode("div",{class:"dss-filter-global",ref_key:"globalRef",ref:he},[e.createElementVNode("div",Kp,[V[20]||(V[20]=e.createElementVNode("svg",{class:"dss-filter-global-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),e.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),e.createElementVNode("input",{type:"text",class:"dss-filter-global-input",placeholder:e.unref(L)("filter.searchAcrossFields"),value:we.value,onInput:ot},null,40,Gp),we.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-global-clear",onClick:V[0]||(V[0]=B=>we.value="")},"×")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["dss-filter-funnel-btn",{active:K.value||ye.value.length>0,"dss-filter-funnel-btn--with-sort":oe.showSortBy}]),onClick:V[1]||(V[1]=B=>K.value=!K.value),type:"button",title:K.value?e.unref(L)("filter.closeAdvancedFilter"):e.unref(L)("filter.openAdvancedFilter")},[V[14]||(V[14]=e.createElementVNode("svg",{class:"dss-filter-funnel-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M11.7583 2.00407L11.7537 2.00926L7.84558 6.18223V9.38409C7.84581 9.53637 7.80836 9.68634 7.73658 9.82064C7.6648 9.95494 7.56091 10.0694 7.43417 10.1538L5.58772 11.3852C5.44858 11.4779 5.28688 11.531 5.11988 11.539C4.95288 11.5469 4.78685 11.5094 4.63952 11.4304C4.49219 11.3514 4.36908 11.2338 4.28334 11.0903C4.1976 10.9467 4.15244 10.7826 4.15269 10.6154V6.18223L0.244567 2.00926L0.239951 2.00407C0.119785 1.87182 0.0405781 1.70755 0.0119374 1.53118C-0.0167033 1.35481 0.00645342 1.17391 0.0785984 1.01044C0.150743 0.846967 0.268776 0.707944 0.418378 0.610235C0.56798 0.512525 0.742722 0.460328 0.921405 0.459976H11.0769C11.2557 0.459994 11.4307 0.511948 11.5805 0.609528C11.7304 0.707107 11.8487 0.846111 11.9211 1.00965C11.9934 1.17319 12.0167 1.35422 11.9881 1.53075C11.9596 1.70728 11.8803 1.87172 11.7601 2.00407H11.7583Z",fill:"currentColor"})],-1)),ye.value.length>0?(e.openBlock(),e.createElementBlock("span",Jp,e.toDisplayString(ye.value.length),1)):e.createCommentVNode("",!0)],10,Qp),oe.showSortBy?(e.openBlock(),e.createElementBlock("div",e0,[V[19]||(V[19]=e.createElementVNode("label",{class:"dss-filter-sortby-label",for:"dss-filter-sort-select"},"Sort by",-1)),e.createElementVNode("select",{id:"dss-filter-sort-select",class:"dss-filter-sortby-select",value:Ae.value,onChange:bt},[V[15]||(V[15]=e.createElementVNode("option",{value:""},"None",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt.value,B=>(e.openBlock(),e.createElementBlock("option",{key:B.key,value:B.key},e.toDisplayString(B.label),9,l0))),128))],40,t0),e.createElementVNode("button",{class:"dss-filter-sortby-order",type:"button",onClick:el,disabled:!Ae.value,title:mt.value},[Ae.value?Z.value==="asc"?(e.openBlock(),e.createElementBlock("svg",a0,[...V[17]||(V[17]=[e.createElementVNode("path",{d:"M6 12C6.36819 12 6.66667 11.7015 6.66667 11.3333L6.66667 2.55333L8.58967 4.47098C8.84953 4.73012 9.27017 4.72983 9.52967 4.47033C9.78943 4.21057 9.78943 3.78943 9.52967 3.52967L6.70711 0.707106C6.31658 0.316582 5.68342 0.316582 5.29289 0.707107L2.47033 3.52967C2.21057 3.78943 2.21057 4.21057 2.47033 4.47033C2.72983 4.72983 3.15047 4.73012 3.41033 4.47098L5.33333 2.55333L5.33333 11.3333C5.33333 11.7015 5.63181 12 6 12Z",fill:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",s0,[...V[18]||(V[18]=[e.createElementVNode("path",{d:"M6 -1.74846e-07C5.63181 -1.58751e-07 5.33333 0.298476 5.33333 0.666666L5.33333 9.44667L3.41033 7.52902C3.15047 7.26988 2.72983 7.27017 2.47033 7.52967C2.21057 7.78943 2.21057 8.21057 2.47033 8.47033L5.29289 11.2929C5.68342 11.6834 6.31658 11.6834 6.70711 11.2929L9.52967 8.47033C9.78943 8.21057 9.78943 7.78943 9.52967 7.52967C9.27017 7.27017 8.84953 7.26988 8.58967 7.52902L6.66667 9.44667L6.66667 0.666667C6.66667 0.298477 6.36819 -1.9094e-07 6 -1.74846e-07Z",fill:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",o0,[...V[16]||(V[16]=[e.createElementVNode("path",{d:"M5.413 9.06387C5.45434 9.16352 5.4652 9.27319 5.4442 9.37901C5.42321 9.48484 5.3713 9.58206 5.29505 9.65837L3.11339 11.84C3.06273 11.8907 3.00258 11.931 2.93637 11.9584C2.87016 11.9859 2.79918 12 2.72751 12C2.65583 12 2.58486 11.9859 2.51865 11.9584C2.45243 11.931 2.39228 11.8907 2.34163 11.84L0.159964 9.65837C0.0835992 9.58209 0.0315843 9.48487 0.0105038 9.37902C-0.0105768 9.27316 0.000224981 9.16343 0.0415416 9.06371C0.0828581 8.964 0.152832 8.87879 0.242604 8.81886C0.332376 8.75894 0.43791 8.72699 0.545845 8.72708H2.18209V0.545845C2.18209 0.401191 2.23955 0.262463 2.34184 0.160178C2.44413 0.0578925 2.58285 0.000429123 2.72751 0.000429123C2.87216 0.000429123 3.01089 0.0578925 3.11317 0.160178C3.21546 0.262463 3.27292 0.401191 3.27292 0.545845V8.72708H4.90917C5.01704 8.7271 5.12248 8.75911 5.21216 8.81906C5.30185 8.87901 5.37174 8.9642 5.413 9.06387ZM11.84 2.34162L9.65837 0.159963C9.60772 0.109252 9.54757 0.0690231 9.48135 0.0415755C9.41514 0.0141278 9.34417 0 9.27249 0C9.20082 0 9.12984 0.0141278 9.06363 0.0415755C8.99742 0.0690231 8.93727 0.109252 8.88661 0.159963L6.70495 2.34162C6.62858 2.4179 6.57657 2.51513 6.55549 2.62098C6.53441 2.72684 6.54521 2.83657 6.58653 2.93629C6.62784 3.036 6.69782 3.12121 6.78759 3.18114C6.87736 3.24107 6.9829 3.27301 7.09083 3.27292H8.72708V11.4542C8.72708 11.5988 8.78454 11.7375 8.88683 11.8398C8.98911 11.9421 9.12784 11.9996 9.27249 11.9996C9.41715 11.9996 9.55587 11.9421 9.65816 11.8398C9.76045 11.7375 9.81791 11.5988 9.81791 11.4542V3.27292H11.4542C11.5621 3.27301 11.6676 3.24107 11.7574 3.18114C11.8472 3.12121 11.9171 3.036 11.9585 2.93629C11.9998 2.83657 12.0106 2.72684 11.9895 2.62098C11.9684 2.51513 11.9164 2.4179 11.84 2.34162Z",fill:"currentColor"},null,-1)])]))],8,n0)])):e.createCommentVNode("",!0)]),K.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-advanced-popup",onClick:V[13]||(V[13]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",r0,[ye.value.length===0?(e.openBlock(),e.createElementBlock("div",i0,e.toDisplayString(e.unref(L)("filter.noConditionsApplied")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,(B,ae)=>(e.openBlock(),e.createElementBlock("div",{key:B.id,class:"dss-filter-row"},[e.createElementVNode("span",c0,e.toDisplayString(ae===0?e.unref(L)("filter.where"):e.unref(L)("filter.and")),1),e.createElementVNode("div",u0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(se=>Qt(`${B.id}:field`),["stop"])},[e.createElementVNode("span",m0,e.toDisplayString(et(B.key)),1),V[21]||(V[21]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,d0),Q.value===`${B.id}:field`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:V[3]||(V[3]=e.withModifiers(()=>{},["stop"]))},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[2]||(V[2]=se=>Re.value=se),placeholder:e.unref(L)("filter.searchAttributes")},null,8,p0),[[e.vModelText,Re.value]]),e.createElementVNode("ul",v0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value,se=>(e.openBlock(),e.createElementBlock("li",{key:se.key,class:"dss-filter-popup-item",onClick:je=>ie(B,se.key)},e.toDisplayString(se.label),9,f0))),128)),rt.value.length===0?(e.openBlock(),e.createElementBlock("li",h0,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),lt(B)==="contain"||lt(B)==="date"?(e.openBlock(),e.createElementBlock("div",g0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(se=>Qt(`${B.id}:op`),["stop"])},[e.createElementVNode("span",k0,e.toDisplayString(kt(B.operator)),1),V[22]||(V[22]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,y0),Q.value===`${B.id}:op`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:V[4]||(V[4]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("ul",C0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rt(B),se=>(e.openBlock(),e.createElementBlock("li",{key:se.value,class:e.normalizeClass(["dss-filter-popup-item",{selected:B.operator===se.value}]),onClick:je=>fe(B,se.value)},e.toDisplayString(se.label),11,b0))),128))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),ct(B.operator)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",w0,[lt(B)==="string"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),"onUpdate:modelValue":se=>B.value=se},null,8,x0)),[[e.vModelText,B.value]]):lt(B)==="date"?(e.openBlock(),e.createElementBlock("div",E0,[e.createVNode(ga,{mode:"single",modelValue:B.value,"onUpdate:modelValue":se=>B.value=se},null,8,["modelValue","onUpdate:modelValue"])])):ht(B)==="text"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,type:"text",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),"onUpdate:modelValue":se=>B.value=se},null,8,S0)),[[e.vModelText,B.value]]):ht(B)==="number"?(e.openBlock(),e.createElementBlock("input",{key:3,type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),value:B.value,onInput:se=>Fe(B,se),step:U.value[B.key]?.type==="int"?1:void 0},null,40,V0)):ht(B)==="between"?(e.openBlock(),e.createElementBlock("div",N0,[e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.min"),value:B.value?.min,onInput:se=>tt(B,"min",se),step:U.value[B.key]?.type==="int"?1:void 0},null,40,B0),e.createElementVNode("span",_0,e.toDisplayString(e.unref(L)("filter.and")),1),e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.max"),value:B.value?.max,onInput:se=>tt(B,"max",se),step:U.value[B.key]?.type==="int"?1:void 0},null,40,M0)])):ht(B)==="multiselect"?(e.openBlock(),e.createElementBlock("div",$0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(se=>Qt(`${B.id}:val`),["stop"])},[e.createElementVNode("span",T0,e.toDisplayString(pe(B)),1),V[23]||(V[23]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,L0),Q.value===`${B.id}:val`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:V[6]||(V[6]=e.withModifiers(()=>{},["stop"]))},[Ct(B).length>6?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[5]||(V[5]=se=>Re.value=se),placeholder:e.unref(L)("filter.search")},null,8,D0)),[[e.vModelText,Re.value]]):e.createCommentVNode("",!0),e.createElementVNode("ul",A0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pt(B),se=>(e.openBlock(),e.createElementBlock("li",{key:se,class:"dss-filter-popup-item",onClick:je=>Et(B,se)},[e.createElementVNode("input",{type:"checkbox",checked:(B.value||[]).includes(se),tabindex:"-1"},null,8,R0),e.createElementVNode("span",null,e.toDisplayString(se),1)],8,H0))),128)),Pt(B).length===0?(e.openBlock(),e.createElementBlock("li",F0,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])),e.createElementVNode("button",{class:"dss-filter-row-remove",onClick:se=>Y(B.id)},[...V[24]||(V[24]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,I0)]))),128)),e.createElementVNode("div",z0,[e.createElementVNode("div",P0,[e.createElementVNode("button",{class:"dss-filter-add-btn",onClick:V[7]||(V[7]=e.withModifiers(B=>Qt("add"),["stop"]))},e.toDisplayString(e.unref(L)("filter.addFilter")),1),Q.value==="add"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup dss-filter-add-popup",onClick:V[12]||(V[12]=e.withModifiers(()=>{},["stop"]))},[He.value&&!ge.value&&!Re.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[8]||(V[8]=B=>Re.value=B),placeholder:e.unref(L)("filter.searchAttributes")},null,8,O0),[[e.vModelText,Re.value]]),e.createElementVNode("ul",W0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ke.value,B=>(e.openBlock(),e.createElementBlock("li",{key:B.label,class:"dss-filter-popup-item dss-filter-popup-group",onClick:ae=>ge.value=B},[e.createElementVNode("span",null,e.toDisplayString(B.label),1),V[25]||(V[25]=e.createElementVNode("svg",{class:"dss-filter-chevron-right",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1))],8,q0))),128)),ke.value.length>0?(e.openBlock(),e.createElementBlock("li",Z0)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,B=>(e.openBlock(),e.createElementBlock("li",{key:B.key,class:"dss-filter-popup-item",onClick:ae=>H(B.key)},e.toDisplayString(B.label),9,U0))),128))])],64)):ge.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dss-filter-popup-back",onClick:V[9]||(V[9]=B=>ge.value=null)},[V[26]||(V[26]=e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)),e.createElementVNode("span",null,e.toDisplayString(ge.value.label),1)]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[10]||(V[10]=B=>Re.value=B),placeholder:e.unref(L)("filter.searchAttributes")},null,8,Y0),[[e.vModelText,Re.value]]),e.createElementVNode("ul",X0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me.value,B=>(e.openBlock(),e.createElementBlock("li",{key:B.key,class:"dss-filter-popup-item",onClick:ae=>H(B.key)},e.toDisplayString(B.label),9,j0))),128)),Me.value.length===0?(e.openBlock(),e.createElementBlock("li",K0,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[11]||(V[11]=B=>Re.value=B),placeholder:e.unref(L)("filter.searchAttributes")},null,8,G0),[[e.vModelText,Re.value]]),e.createElementVNode("ul",Q0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value,B=>(e.openBlock(),e.createElementBlock("li",{key:B.key,class:"dss-filter-popup-item",onClick:ae=>H(B.key)},e.toDisplayString(B.label),9,J0))),128)),rt.value.length===0?(e.openBlock(),e.createElementBlock("li",e9,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64))])):e.createCommentVNode("",!0)]),ye.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-clear-all",onClick:Se},e.toDisplayString(e.unref(L)("filter.clearAllFilters")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],512)],2))}}),n9={class:"dss-pill-field__pills"},o9=["data-value"],a9=["disabled"],s9={class:"dss-pill-field__pill-text"},r9={key:0,class:"dss-pill-field__pill-actions"},i9=["onClick"],c9=["onClick"],u9=["placeholder","disabled"],d9=e.defineComponent({__name:"DSSPillField",props:{modelValue:{default:()=>[]},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(_,{emit:J}){const N=_,L=J,oe=e.ref(""),W=e.ref([...N.modelValue]),A=e.ref(null);let de=null;const dt=e.ref(null),ee=e.ref(""),h=e.ref(null),we=e.ref(null),ye=e.computed(()=>{if(!we.value)return;const{width:He,height:Ke}=we.value;return{minWidth:`${He}px`,height:`${Ke}px`}});function Q(He,Ke){dt.value===Ke&&(h.value=He)}function K(){dt.value=null,ee.value="",we.value=null,h.value=null}const he=e.computed(()=>new Set(W.value.map(He=>He.trim()).filter(Boolean)));function Re(He){A.value=He,de&&clearTimeout(de),de=setTimeout(()=>{A.value=null,de=null},900)}function ge(He){const Ke=He.trim();return Ke?he.value.has(Ke)?(Re(Ke),!1):(W.value=[...W.value,Ke],L("update:modelValue",[...W.value]),!0):!1}function Ae(He){const Ke=He.split(/\r?\n/g).map(yt=>yt.trim()).filter(Boolean);if(!Ke.length)return;const ke=new Set(W.value.map(yt=>yt.trim()).filter(Boolean)),Me=[...W.value];let rt=null;for(const yt of Ke){if(ke.has(yt)){rt??=yt;continue}ke.add(yt),Me.push(yt)}Me.length!==W.value.length&&(W.value=Me,L("update:modelValue",[...W.value])),rt&&Re(rt)}function Z(He){N.disabled||(dt.value===He&&K(),W.value=W.value.filter((Ke,ke)=>ke!==He),L("update:modelValue",[...W.value]))}async function ze(He,Ke){if(N.disabled)return;const ke=Ke.currentTarget.closest(".dss-pill-field__pill");ke&&(we.value={width:ke.offsetWidth,height:ke.offsetHeight}),dt.value=He,ee.value=W.value[He]??"",await e.nextTick();const Me=h.value;if(!Me)return;Me.focus();const rt=Me.value.length;Me.setSelectionRange(rt,rt)}function Ye(){K()}function _e(){if(N.disabled||dt.value===null)return;const He=dt.value,Ke=W.value[He]??"",ke=ee.value.trim();if(K(),ke!==Ke&&he.value.has(ke)){Re(ke);return}if(!ke){W.value=W.value.filter((rt,yt)=>yt!==He),L("update:modelValue",[...W.value]);return}const Me=W.value.map((rt,yt)=>yt===He?ke:rt);W.value=Me,L("update:modelValue",[...W.value])}function Xe(He){He.preventDefault(),!N.disabled&&(ge(oe.value),oe.value="")}function U(He){if(N.disabled)return;const Ke=He.clipboardData?.getData("text")??"";!Ke.includes(`
120
- `)&&!Ke.includes("\r")||(He.preventDefault(),Ae(Ke),oe.value="")}return e.watch(()=>N.modelValue,He=>{W.value=Array.isArray(He)?[...He]:[]},{deep:!0}),e.onBeforeUnmount(()=>{de&&clearTimeout(de)}),(He,Ke)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-pill-field",{"dss-pill-field--disabled":He.disabled}])},[e.createElementVNode("div",n9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(ke,Me)=>(e.openBlock(),e.createElementBlock("span",{key:ke,class:e.normalizeClass(["dss-pill-field__pill",{"dss-pill-field__pill--highlight":A.value===ke,"dss-pill-field__pill--editing":dt.value===Me}]),style:e.normalizeStyle(dt.value===Me&&we.value?ye.value:void 0)},[dt.value===Me?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-pill-field__pill-edit-wrap","data-value":ee.value||" "},[e.withDirectives(e.createElementVNode("input",{ref_for:!0,ref:rt=>Q(rt,Me),"onUpdate:modelValue":Ke[0]||(Ke[0]=rt=>ee.value=rt),class:"dss-pill-field__pill-edit",type:"text",disabled:He.disabled,onKeydown:[e.withKeys(_e,["enter"]),e.withKeys(Ye,["esc"])],onBlur:_e},null,40,a9),[[e.vModelText,ee.value]])],8,o9)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",s9,e.toDisplayString(ke),1),He.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",r9,[e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action",onClick:rt=>ze(Me,rt)},[...Ke[2]||(Ke[2]=[e.createElementVNode("svg",{class:"dss-pill-field__pill-action-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 9.64033V11.6667C0 11.8534 0.146646 12 0.333287 12H2.35967C2.44633 12 2.53298 11.9667 2.59297 11.9L9.87196 4.62769L7.37231 2.12804L0.0999862 9.40036C0.0333288 9.46702 0 9.54701 0 9.64033ZM11.805 2.69463C12.065 2.43466 12.065 2.01472 11.805 1.75476L10.2452 0.194973C9.98528 -0.064991 9.56534 -0.064991 9.30537 0.194973L8.08554 1.4148L10.5852 3.91446L11.805 2.69463Z",fill:"currentColor"})],-1)])],8,i9),e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action dss-pill-field__pill-action--remove",onClick:rt=>Z(Me)}," × ",8,c9)]))],64))],6))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":Ke[1]||(Ke[1]=ke=>oe.value=ke),class:"dss-pill-field__input",type:"text",placeholder:W.value.length?"":He.placeholder,disabled:He.disabled,onPaste:U,onKeydown:e.withKeys(Xe,["enter"])},null,40,u9),[[e.vModelText,oe.value]])])],2))}}),m9={key:0,class:"dss-title dss-title--separator"},p9={__name:"DSSTitle",props:{type:{type:String,default:"main",validator:_=>["main","separator","subtitle"].includes(_)},h:{type:Number,default:null,validator:_=>_===null||Number.isInteger(_)&&_>=1&&_<=6},size:{type:[String,Number],default:null},weight:{type:[String,Number],default:null},color:{type:String,default:null},editable:{type:Boolean,default:!1},modelValue:{type:String,default:""}},emits:["update:modelValue","change"],setup(_,{expose:J,emit:N}){const L=_,oe=N,W=e.ref(null),A=e.computed(()=>`dss-title--${L.type}`),de=e.computed(()=>L.h!=null?`dss-title--h${L.h}`:null),dt={main:"div",subtitle:"p",separator:"span"},ee=e.computed(()=>L.h!=null?`h${L.h}`:dt[L.type]??"div"),h=e.computed(()=>L.editable?"plaintext-only":void 0),we=e.computed(()=>{const ge={};return L.size!=null&&(ge.fontSize=typeof L.size=="number"?`${L.size}px`:L.size),L.weight!=null&&(ge.fontWeight=L.weight),L.color!=null&&(ge.color=L.color),Object.keys(ge).length?ge:void 0}),ye=e.computed(()=>L.editable?{input:K,keydown:he,paste:Re}:{}),Q=()=>{const ge=W.value;!L.editable||!ge||document.activeElement!==ge&&(ge.innerText=L.modelValue??"")},K=ge=>{const Ae=ge.target.innerText;oe("update:modelValue",Ae),oe("change",Ae)},he=ge=>{ge.key==="Enter"&&ge.preventDefault()},Re=ge=>{ge.preventDefault();const Ae=(ge.clipboardData||window.clipboardData).getData("text/plain");document.execCommand("insertText",!1,Ae)};return e.watch(()=>L.modelValue,()=>{Q()}),e.watch(()=>L.editable,()=>{e.nextTick(Q)}),e.onMounted(()=>{e.nextTick(Q)}),J({focus:()=>W.value?.focus()}),(ge,Ae)=>_.type==="separator"?(e.openBlock(),e.createElementBlock("div",m9,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ee.value),e.mergeProps({ref_key:"titleRef",ref:W,class:["dss-title__separator-label",de.value,{"dss-title--editable":_.editable}],style:we.value,contenteditable:h.value,spellcheck:_.editable?!1:void 0},e.toHandlers(ye.value)),{default:e.withCtx(()=>[_.editable?e.createCommentVNode("",!0):e.renderSlot(ge.$slots,"default",{key:0},()=>[e.createTextVNode(e.toDisplayString(_.modelValue),1)])]),_:3},16,["class","style","contenteditable","spellcheck"]))])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ee.value),e.mergeProps({key:1,ref_key:"titleRef",ref:W,class:["dss-title",[A.value,de.value,{"dss-title--editable":_.editable}]],style:we.value,contenteditable:h.value,spellcheck:_.editable?!1:void 0},e.toHandlers(ye.value)),{default:e.withCtx(()=>[_.editable?e.createCommentVNode("",!0):e.renderSlot(ge.$slots,"default",{key:0},()=>[e.createTextVNode(e.toDisplayString(_.modelValue),1)])]),_:3},16,["class","style","contenteditable","spellcheck"]))}},v9={contextMenu:{addMarker:"Add Marker",clearAllMarkers:"Clear All Markers",downloadSvg:"Download SVG",downloadPng:"Download PNG",downloadCsv:"Download CSV"},modalMarker:{editMarker:"Edit Marker",viewMarker:"View Marker",title:"Title",description:"Description",iconType:"Icon Type",defaultIcon:"Default Logo",iconPreview:"Icon Preview",deleteMarker:"Delete Marker",cancel:"Cancel",close:"Close",save:"Save",placeholderTitle:"Enter marker title",placeholderDescription:"Enter marker description (required)"},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"}},f9={firstPage:"First page",previousPage:"Previous page",nextPage:"Next page",lastPage:"Last page",currentPageAriaLabel:"Current page",rowsPerPage:"Rows per page",searchPlaceholder:"Search...",searchAriaLabel:"Search",searchTableAriaLabel:"Search table",clearSearchAriaLabel:"Clear search",downloadPdf:"Download PDF",downloadExcel:"Download Excel",columnVisibility:"Columns Visibility",expandRowAriaLabel:"Expand row",collapseRowAriaLabel:"Collapse row",filterColumnAriaLabel:"Filter column",clearFilter:"Clear",search:"Search...",filterFrom:"From:",filterTo:"To:",dateFormat:"dd/mm/yyyy",showingRange:"Showing {start}-{end} from {total}",ofPages:"of {total}",emptyMessage:"No data available"},h9={searchAcrossFields:"Search across all fields...",openAdvancedFilter:"Open advanced filter",closeAdvancedFilter:"Close advanced filter",noConditionsApplied:"No filter conditions are applied to this view",where:"Where",and:"And",searchAttributes:"Search attributes...",noMatch:"No match",enterValue:"Enter value...",min:"Min",max:"Max",search:"Search...",addFilter:"Add filter",clearAllFilters:"Clear all filters",select:"Select...",selectedCount:"{count} selected",operators:{contains:"contains",not_contains:"does not contain",equals:"equals",not_equals:"does not equal",starts_with:"starts with",ends_with:"ends with",is_empty:"is empty",is_not_empty:"is not empty",is_any_of:"is any of",is_none_of:"is none of",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"between",contains_any:"contains any of",contains_all:"contains all of",not_contains_any:"does not contain",before:"before",after:"after",is_true:"is true",is_false:"is false"}},g9={selectDate:"Select Date",selectRange:"Select range",selectFromList:"Select a date",noAvailableDates:"No dates available",startDate:"Start date",endDate:"End date",prevMonth:"Previous month",nextMonth:"Next month",comparison:{compareTo:"Compare to",active:"Comparison",previousPeriod:"Previous period",previousYear:"Previous year",custom:"Custom"},quickSelect:{today:"Today",lastWeek:"Last week",last15Days:"Last 15 days",last30Days:"Last 30 days",thisMonth:"This month",lastMonth:"Last month",last3Months:"Last 3 months",last6Months:"Last 6 months",last12Months:"Last 12 months",lastYear:"Last year",allDates:"All dates",last2Dates:"Last 2 dates",last3Dates:"Last 3 dates",last4Dates:"Last 4 dates",last5Dates:"Last 5 dates"}},y9={toolbar:{undo:"Undo",redo:"Redo",paragraphFormat:"Paragraph Format",bold:"Bold",italic:"Italic",underline:"Underline",citation:"Citation",insertLink:"Insert Link",removeLink:"Remove Link",bulletList:"Bullet List",numberList:"Number List",image:"Image",comment:"Comment",askAi:"Ask AI"},paragraph:{heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",paragraph:"Paragraph"},link:{editLink:"Edit Link",altText:"Alt text:",url:"URL:",enterAltText:"Enter alt text...",enterUrl:"Enter URL...",cancel:"Cancel",save:"Save"},image:{addImage:"Add Image",editImage:"Edit Image",upload:"Upload",imageLink:"Image Link",uploadImage:"Upload image:",imageUrl:"Image URL:",altText:"Alt text:",width:"Width (px):",height:"Height (px):",enterAltText:"Enter alt text...",enterImageUrl:"https://example.com/image.jpg",auto:"Auto",noAlt:"No alt",cancel:"Cancel",save:"Save"},comment:{placeholder:"Add a comment",send:"Send",delete:"Delete comment"},started_conversation:"Started conversation",labels:{title:"Title",description:"Description"},placeholders:{title:"Enter title...",description:"Enter description...",startTyping:"Start typing..."},footer:{word:"word",words:"words",character:"character",characters:"characters"}},go={chart:v9,table:f9,filter:h9,datepicker:g9,textEditor:y9},k9={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",viewMarker:"Voir le marqueur",title:"Titre",description:"Description",iconType:"Type d'icône",defaultIcon:"Logo par défaut",iconPreview:"Aperçu de l'icône",deleteMarker:"Supprimer le marqueur",cancel:"Annuler",close:"Fermer",save:"Enregistrer",placeholderTitle:"Entrez le titre du marqueur",placeholderDescription:"Entrez la description du marqueur (requise)"},zoom:{doubleClickToReset:"(Double-cliquez pour réinitialiser)"},csv:{chartTitle:"Titre du graphique",chartSubtitle:"Sous-titre du graphique",generated:"Généré"},fallback:{item:"Élément",axis:"Axe"},tooltip:{flags:"Drapeaux",markers:"Marqueurs",manualFlags:"Drapeaux manuels",autoFlags:"Drapeaux automatiques"}},C9={firstPage:"Première page",previousPage:"Page précédente",nextPage:"Page suivante",lastPage:"Dernière page",currentPageAriaLabel:"Page actuelle",rowsPerPage:"Lignes par page",searchPlaceholder:"Rechercher...",searchAriaLabel:"Rechercher",searchTableAriaLabel:"Rechercher dans le tableau",clearSearchAriaLabel:"Effacer la recherche",downloadPdf:"Télécharger PDF",downloadExcel:"Télécharger Excel",columnVisibility:"Visibilité des colonnes",expandRowAriaLabel:"Développer la ligne",collapseRowAriaLabel:"Réduire la ligne",filterColumnAriaLabel:"Filtrer la colonne",clearFilter:"Effacer",search:"Rechercher...",filterFrom:"Du :",filterTo:"Au :",dateFormat:"jj/mm/aaaa",showingRange:"Affichage de {start}-{end} sur {total}",ofPages:"sur {total}",emptyMessage:"Aucune donnée disponible"},b9={searchAcrossFields:"Rechercher dans tous les champs...",openAdvancedFilter:"Ouvrir le filtre avancé",closeAdvancedFilter:"Fermer le filtre avancé",noConditionsApplied:"Aucune condition de filtre n'est appliquée à cette vue",where:"Où",and:"Et",searchAttributes:"Rechercher des attributs...",noMatch:"Aucun résultat",enterValue:"Saisir une valeur...",min:"Min",max:"Max",search:"Rechercher...",addFilter:"Ajouter un filtre",clearAllFilters:"Effacer tous les filtres",select:"Sélectionner...",selectedCount:"{count} sélectionnés",operators:{contains:"contient",not_contains:"ne contient pas",equals:"est égal à",not_equals:"est différent de",starts_with:"commence par",ends_with:"se termine par",is_empty:"est vide",is_not_empty:"n'est pas vide",is_any_of:"est l'un de",is_none_of:"n'est aucun de",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"entre",contains_any:"contient l'un de",contains_all:"contient tous",not_contains_any:"ne contient pas",before:"avant",after:"après",is_true:"est vrai",is_false:"est faux"}},w9={selectDate:"Sélectionner une date",selectRange:"Sélectionner une plage",selectFromList:"Sélectionner une date",noAvailableDates:"Aucune date disponible",startDate:"Date de début",endDate:"Date de fin",prevMonth:"Mois précédent",nextMonth:"Mois suivant",comparison:{compareTo:"Comparer à",active:"Comparaison",previousPeriod:"Période précédente",previousYear:"Année précédente",custom:"Personnalisée"},quickSelect:{today:"Aujourd'hui",lastWeek:"Dernière semaine",last15Days:"15 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois",lastMonth:"Mois dernier",last3Months:"3 derniers mois",last6Months:"6 derniers mois",last12Months:"12 derniers mois",lastYear:"Dernière année",allDates:"Toutes les dates",last2Dates:"2 dernières dates",last3Dates:"3 dernières dates",last4Dates:"4 dernières dates",last5Dates:"5 dernières dates"}},x9={toolbar:{undo:"Annuler",redo:"Rétablir",paragraphFormat:"Format de paragraphe",bold:"Gras",italic:"Italique",underline:"Souligné",citation:"Citation",insertLink:"Insérer un lien",removeLink:"Supprimer le lien",bulletList:"Liste à puces",numberList:"Liste numérotée",image:"Image",comment:"Commentaire",askAi:"Demander à l'IA"},paragraph:{heading1:"En-tête 1",heading2:"En-tête 2",heading3:"En-tête 3",heading4:"En-tête 4",heading5:"En-tête 5",heading6:"En-tête 6",paragraph:"Paragraphe"},link:{editLink:"Modifier le lien",altText:"Texte alternatif :",url:"URL :",enterAltText:"Entrez le texte alternatif...",enterUrl:"Entrez l'URL...",cancel:"Annuler",save:"Enregistrer"},image:{addImage:"Ajouter une image",editImage:"Modifier l'image",upload:"Télécharger",imageLink:"Lien de l'image",uploadImage:"Télécharger l'image :",imageUrl:"URL de l'image :",altText:"Texte alternatif :",width:"Largeur (px) :",height:"Hauteur (px) :",enterAltText:"Entrez le texte alternatif...",enterImageUrl:"https://exemple.com/image.jpg",auto:"Auto",noAlt:"Pas de texte alternatif",cancel:"Annuler",save:"Enregistrer"},comment:{placeholder:"Ajouter un commentaire",send:"Envoyer",delete:"Supprimer le commentaire"},started_conversation:"A démarré la conversation",labels:{title:"Titre",description:"Description"},placeholders:{title:"Entrez le titre...",description:"Entrez la description...",startTyping:"Commencez à taper..."},footer:{word:"mot",words:"mots",character:"caractère",characters:"caractères"}},yo={chart:k9,table:C9,filter:b9,datepicker:w9,textEditor:x9},E9={contextMenu:{addMarker:"Markering toevoegen",clearAllMarkers:"Alle markeringen wissen",downloadSvg:"SVG downloaden",downloadPng:"PNG downloaden",downloadCsv:"CSV downloaden"},modalMarker:{editMarker:"Markering bewerken",viewMarker:"Markering bekijken",title:"Titel",description:"Beschrijving",iconType:"Pictogramtype",defaultIcon:"Standaard logo",iconPreview:"Pictogramvoorbeeld",deleteMarker:"Markering verwijderen",cancel:"Annuleren",close:"Sluiten",save:"Opslaan",placeholderTitle:"Voer markeringstitel in",placeholderDescription:"Voer markeringsbeschrijving 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"}},S9={firstPage:"Eerste pagina",previousPage:"Vorige pagina",nextPage:"Volgende pagina",lastPage:"Laatste pagina",currentPageAriaLabel:"Huidige pagina",rowsPerPage:"Rijen per pagina",searchPlaceholder:"Zoeken...",searchAriaLabel:"Zoeken",searchTableAriaLabel:"Zoeken in tabel",clearSearchAriaLabel:"Zoekopdracht wissen",downloadPdf:"PDF downloaden",downloadExcel:"Excel downloaden",columnVisibility:"Kolommen weer te geven",expandRowAriaLabel:"Rij uitklappen",collapseRowAriaLabel:"Rij inklappen",filterColumnAriaLabel:"Kolom filteren",clearFilter:"Wissen",search:"Zoeken...",filterFrom:"Van:",filterTo:"Tot:",dateFormat:"dd-mm-jjjj",showingRange:"{start}-{end} van {total} weergegeven",ofPages:"van {total}",emptyMessage:"Geen gegevens beschikbaar"},V9={searchAcrossFields:"Zoeken in alle velden...",openAdvancedFilter:"Geavanceerde filter openen",closeAdvancedFilter:"Geavanceerde filter sluiten",noConditionsApplied:"Er zijn geen filtervoorwaarden toegepast op deze weergave",where:"Waar",and:"En",searchAttributes:"Zoek attributen...",noMatch:"Geen overeenkomst",enterValue:"Voer waarde in...",min:"Min",max:"Max",search:"Zoeken...",addFilter:"Filter toevoegen",clearAllFilters:"Alle filters wissen",select:"Selecteren...",selectedCount:"{count} geselecteerd",operators:{contains:"bevat",not_contains:"bevat niet",equals:"is gelijk aan",not_equals:"is niet gelijk aan",starts_with:"begint met",ends_with:"eindigt op",is_empty:"is leeg",is_not_empty:"is niet leeg",is_any_of:"is een van",is_none_of:"is geen van",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"tussen",contains_any:"bevat een van",contains_all:"bevat alle",not_contains_any:"bevat niet",before:"voor",after:"na",is_true:"is waar",is_false:"is onwaar"}},N9={selectDate:"Selecteer datum",selectRange:"Selecteer bereik",selectFromList:"Selecteer een datum",noAvailableDates:"Geen datums beschikbaar",startDate:"Startdatum",endDate:"Einddatum",prevMonth:"Vorige maand",nextMonth:"Volgende maand",comparison:{compareTo:"Vergelijken met",active:"Vergelijking",previousPeriod:"Vorige periode",previousYear:"Vorig jaar",custom:"Aangepast"},quickSelect:{today:"Vandaag",lastWeek:"Afgelopen week",last15Days:"Laatste 15 dagen",last30Days:"Laatste 30 dagen",thisMonth:"Deze maand",lastMonth:"Vorige maand",last3Months:"Laatste 3 maanden",last6Months:"Laatste 6 maanden",last12Months:"Laatste 12 maanden",lastYear:"Afgelopen jaar",allDates:"Alle datums",last2Dates:"Laatste 2 datums",last3Dates:"Laatste 3 datums",last4Dates:"Laatste 4 datums",last5Dates:"Laatste 5 datums"}},B9={toolbar:{undo:"Ongedaan maken",redo:"Opnieuw",paragraphFormat:"Alineaopmaak",bold:"Vet",italic:"Cursief",underline:"Onderstreept",citation:"Citaat",insertLink:"Link invoegen",removeLink:"Link verwijderen",bulletList:"Lijst met opsommingstekens",numberList:"Genummerde lijst",image:"Afbeelding",comment:"Commentaar",askAi:"Vraag AI"},paragraph:{heading1:"Kop 1",heading2:"Kop 2",heading3:"Kop 3",heading4:"Kop 4",heading5:"Kop 5",heading6:"Kop 6",paragraph:"Alinea"},link:{editLink:"Link bewerken",altText:"Alt-tekst:",url:"URL:",enterAltText:"Voer alt-tekst in...",enterUrl:"Voer URL in...",cancel:"Annuleren",save:"Opslaan"},image:{addImage:"Afbeelding toevoegen",editImage:"Afbeelding bewerken",upload:"Uploaden",imageLink:"Afbeeldingslink",uploadImage:"Afbeelding uploaden:",imageUrl:"Afbeeldings-URL:",altText:"Alt-tekst:",width:"Breedte (px):",height:"Hoogte (px):",enterAltText:"Voer alt-tekst in...",enterImageUrl:"https://voorbeeld.com/afbeelding.jpg",auto:"Auto",noAlt:"Geen alt-tekst",cancel:"Annuleren",save:"Opslaan"},comment:{placeholder:"Voeg een opmerking toe",send:"Verzenden",delete:"Opmerking verwijderen"},started_conversation:"Gesprek gestart",labels:{title:"Titel",description:"Beschrijving"},placeholders:{title:"Voer titel in...",description:"Voer beschrijving in...",startTyping:"Begin met typen..."},footer:{word:"woord",words:"woorden",character:"teken",characters:"tekens"}},ko={chart:E9,table:S9,filter:V9,datepicker:N9,textEditor:B9},qo={en:go,fr:yo,nl:ko};function Fa(_){if(!_||!_.global)return;const J=_.global.availableLocales||[];Object.keys(qo).forEach(N=>{J.includes(N)&&_.global.mergeLocaleMessage(N,qo[N])})}const Zo={en:{textEditor:go.textEditor},fr:{textEditor:yo.textEditor},nl:{textEditor:ko.textEditor}};function Ia(_){if(!_||!_.global)return;const J=_.global.availableLocales||[];Object.keys(Zo).forEach(N=>{J.includes(N)&&_.global.mergeLocaleMessage(N,Zo[N])})}const Uo={en:{table:go.table},fr:{table:yo.table},nl:{table:ko.table}};function za(_){if(!_||!_.global)return;const J=_.global.availableLocales||[];Object.keys(Uo).forEach(N=>{J.includes(N)&&_.global.mergeLocaleMessage(N,Uo[N])})}const Yo={en:{datepicker:go.datepicker},fr:{datepicker:yo.datepicker},nl:{datepicker:ko.datepicker}};function Pa(_){if(!_||!_.global)return;const J=_.global.availableLocales||[];Object.keys(Yo).forEach(N=>{J.includes(N)&&_.global.mergeLocaleMessage(N,Yo[N])})}const Xo={en:{filter:go.filter},fr:{filter:yo.filter},nl:{filter:ko.filter}};function Oa(_){if(!_||!_.global)return;const J=_.global.availableLocales||[];Object.keys(Xo).forEach(N=>{J.includes(N)&&_.global.mergeLocaleMessage(N,Xo[N])})}const _9={chart:qo,textEditor:Zo,table:Uo,datepicker:Yo,filter:Xo};function M9(_){!_||!_.global||(Fa(_),Ia(_),za(_),Pa(_),Oa(_))}const $9={en:{...go},fr:{...yo},nl:{...ko}};ho.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:$9});exports.DSSChart=Tu;exports.DSSChartMessages=qo;exports.DSSColorPicker=bp;exports.DSSConfetti=jp;exports.DSSDatepicker=ga;exports.DSSDatepickerMessages=Yo;exports.DSSDnd=Yp;exports.DSSFilter=l9;exports.DSSFilterMessages=Xo;exports.DSSLoader=Dp;exports.DSSMessages=_9;exports.DSSModal=ha;exports.DSSPillField=d9;exports.DSSSkeleton=Ap;exports.DSSStepBar=Ra;exports.DSSTable=t1;exports.DSSTableMessages=Uo;exports.DSSTextEditor=ap;exports.DSSTextEditorMessages=Zo;exports.DSSTitle=p9;exports.addDSSChartTranslations=Fa;exports.addDSSDatepickerTranslations=Pa;exports.addDSSFilterTranslations=Oa;exports.addDSSTableTranslations=za;exports.addDSSTextEditorTranslations=Ia;exports.addDSSTranslations=M9;
119
+ `,document.body.appendChild(ve),he=ve}function $e(me,F){he&&(he.style.left=`${me-Z}px`,he.style.top=`${F-Fe}px`)}function lt(me){me.classList.add("dss-dnd-item--dragging"),me.style.background=ue.value.dragSourceBackground,me.style.borderColor=ue.value.dragSourceBorder,me.style.transform="scale(0.97)"}function ft(me){me.classList.remove("dss-dnd-item--dragging"),me.style.background="",me.style.borderColor="",me.style.transform=""}function it(me,F){return document.elementFromPoint(me,F)?.closest(".dss-dnd-column-body")??null}function Xt(me,F){return!!document.elementFromPoint(me,F)?.closest("[data-dss-dnd-delete-zone]")}function xe(me,F){if(W.value&&Xt(me,F)){ke.value=!0,we.value=null,G.value=-1;return}ke.value=!1;const Y=it(me,F),re=Y?.getAttribute("data-column")??null;if(!re){we.value=null,G.value=-1;return}we.value=re;const ve=Y.querySelectorAll(".dss-dnd-item:not(.dss-dnd-item--dragging)");let Re=ve.length;for(let Ge=0;Ge<ve.length;Ge++){const Ct=ve[Ge].getBoundingClientRect();if(F<Ct.top+Ct.height/2){Re=Ge;break}}G.value=Re}function Lt(me){me.preventDefault(),$e(me.clientX,me.clientY),!fe&&(fe=requestAnimationFrame(()=>{fe=null,xe(me.clientX,me.clientY)}))}function Ke(me){window.removeEventListener("pointermove",Lt),window.removeEventListener("pointerup",Ke),window.removeEventListener("pointercancel",Ke),Te?.releasePointerCapture?.(me.pointerId),ft(Te),Te=null;const F=W.value&&Xt(me.clientX,me.clientY);if(g.value&&F)L("delete",{item:g.value});else{const re=it(me.clientX,me.clientY)?.getAttribute("data-column")??null;if(g.value&&re){const ve=g.value[N.columnKey],Re=re,Ct=(U.value[Re]||[]).filter(jt=>jt[N.itemKey]!==g.value[N.itemKey]),Se=Math.max(0,Math.min(G.value,Ct.length)),tt=Ye(Re,Se),gt=g.value[N.itemKey];L("move",{item:g.value,from:ve,to:Re,position:tt,index:Se}),He&&clearTimeout(He),j.value={id:gt,from:ve,to:Re},He=setTimeout(()=>{j.value=null},3500)}}he&&(he.remove(),he=null),qe!==null&&(document.body.style.cursor=qe,qe=""),Rt()}function Je(me,F){me.preventDefault();const Y=me.target.closest(".dss-dnd-item");if(!Y)return;const re=Y.getBoundingClientRect();Z=me.clientX-re.left,Fe=me.clientY-re.top,qe=document.body.style.cursor,document.body.style.cursor="grabbing",g.value=F,Te=Y,Ce(Y,me.clientX,me.clientY),requestAnimationFrame(()=>lt(Y)),Y.setPointerCapture?.(me.pointerId),window.addEventListener("pointermove",Lt),window.addEventListener("pointerup",Ke,{once:!0}),window.addEventListener("pointercancel",Ke,{once:!0})}function mt(){Me&&(window.removeEventListener("pointermove",Tt),window.removeEventListener("pointerup",at),window.removeEventListener("pointercancel",at),Me=null)}function Tt(me){if(!Me||me.pointerId!==Me.pointerId)return;const F=me.clientX-Me.startX,Y=me.clientY-Me.startY;if(Math.abs(F)>=Ze||Math.abs(Y)>=Ze){const re=Me.item;mt(),Je(me,re)}}function at(me){!Me||me.pointerId!==Me.pointerId||mt()}function pt(me,F){mt(),Me={item:F,startX:me.clientX,startY:me.clientY,pointerId:me.pointerId},window.addEventListener("pointermove",Tt),window.addEventListener("pointerup",at),window.addEventListener("pointercancel",at)}function ct(me,F){ue.value.useHandle||pt(me,F)}function Ut(me,F){pt(me,F)}function ht(){fe&&(cancelAnimationFrame(fe),fe=null)}function Rt(){ht(),g.value=null,we.value=null,ke.value=!1,G.value=-1}return e.onBeforeUnmount(()=>{ht(),mt(),He&&clearTimeout(He),he&&(he.remove(),he=null)}),(me,F)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-dnd",{"dss-dnd--unstyled":ue.value.unstyled}]),style:e.normalizeStyle(rt.value)},[W.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["dss-dnd-delete-zone",{"dss-dnd-delete-zone--drag-over":ke.value}]),"data-dss-dnd-delete-zone":""},[e.renderSlot(me.$slots,"delete-zone",{isDragging:!!g.value,isOver:ke.value})],2),[[e.vShow,!!g.value||ue.value.deleteZoneAlwaysVisible]])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.columns,Y=>(e.openBlock(),e.createElementBlock("div",{key:Y.value,class:e.normalizeClass(["dss-dnd-column",[{"dss-dnd-column--drag-over":we.value==Y.value},Y.class||""]]),style:e.normalizeStyle(ee(Y))},[ue.value.showHeader?(e.openBlock(),e.createElementBlock("div",Pp,[e.renderSlot(me.$slots,"column-header",{column:Y,items:U.value[Y.value]||[]},()=>[e.createElementVNode("span",Op,e.toDisplayString(Y.title||Y.value),1),e.createElementVNode("span",Wp,e.toDisplayString((U.value[Y.value]||[]).length),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"dss-dnd-column-body","data-column":Y.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ae.value[Y.value],re=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:re.key},[re.type==="indicator"?(e.openBlock(),e.createElementBlock("div",Zp)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-dnd-item",{"dss-dnd-item--dragging":re.isDragged,"dss-dnd-item--no-handle":!ue.value.useHandle}]),onPointerdown:ve=>ct(ve,re.item)},[ue.value.useHandle?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-dnd-handle",onPointerdown:e.withModifiers(ve=>Ut(ve,re.item),["stop"])},[e.renderSlot(me.$slots,"handle",{},()=>[F[0]||(F[0]=e.createElementVNode("span",{class:"dss-dnd-handle-icon"},"⠿",-1))])],40,Yp)):e.createCommentVNode("",!0),e.createElementVNode("div",Xp,[e.renderSlot(me.$slots,"item",{item:re.item,column:Y,justDropped:j.value?.id===re.item[B.itemKey],droppedFrom:j.value?.id===re.item[B.itemKey]?j.value.from:null,droppedTo:j.value?.id===re.item[B.itemKey]?j.value.to:null},()=>[e.createElementVNode("div",jp,e.toDisplayString(re.item[B.itemKey]),1)])])],42,Up))],64))),128)),(U.value[Y.value]||[]).length===0&&we.value!=Y.value?(e.openBlock(),e.createElementBlock("div",Kp,[e.renderSlot(me.$slots,"empty",{column:Y},()=>[F[1]||(F[1]=e.createElementVNode("span",{class:"dss-dnd-empty-text"},"No items",-1))])])):e.createCommentVNode("",!0)],8,qp)],6))),128))],6))}}),Jp={name:"DSSConfetti"},e0=Object.assign(Jp,{props:{trigger:{type:Boolean,default:!1},duration:{type:Number,default:3e3},fadeStart:{type:Number,default:2e3},count:{type:Number,default:90},colors:{type:Array,default:()=>["#047395","#ffc230","#0897c1","#fe3b59","#11e1a2","#b3b2fb","#fadb8d","#ffa25b","#feaab1"]},delay:{type:Number,default:300}},setup(B){const J=B,N=e.ref(null),L=e.ref(!1);let ne=[],W=null,R=null;function ue(G,j){const fe=[];for(let He=0;He<J.count;He++)fe.push(rt(G));return fe}function rt(G,j){return{x:Math.random()*G,y:-Math.random()*150-20,r:Math.random()*8+3,d:Math.random()*50,color:J.colors[Math.floor(Math.random()*J.colors.length)],tilt:Math.floor(Math.random()*10)-10,tiltInc:Math.random()*.08+.04,tiltAngle:0,opacity:Math.random()*.7+.3,speed:Math.random()*4+1.5}}function ee(G,j,fe,He){G.clearRect(0,0,j,fe);for(const he of ne)G.save(),G.globalAlpha=he.opacity*He,G.beginPath(),G.lineWidth=he.r,G.strokeStyle=he.color,G.moveTo(he.x+he.tilt+he.r/2,he.y),G.lineTo(he.x+he.tilt,he.y+he.tilt+he.r/2),G.stroke(),G.restore()}function g(G,j,fe){const He=.3+fe*.7;for(let he=0;he<ne.length;he++){const Te=ne[he];Te.tiltAngle+=Te.tiltInc,Te.y+=Te.speed*He,Te.x+=Math.sin(Te.d)*.5*He,Te.tilt=Math.sin(Te.tiltAngle)*15,fe>=.99&&Te.y>j+20&&(ne[he]=rt(G))}}function we(){L.value=!0,e.nextTick(()=>{const G=N.value;if(!G)return;const j=G.getContext("2d"),fe=G.parentElement;if(!fe)return;const He=fe.getBoundingClientRect();G.width=He.width,G.height=He.height,ne=ue(G.width,G.height);const he=Date.now(),Te=he+J.duration,Z=()=>{const Fe=Date.now(),qe=Fe-he;if(Fe<Te){let Me=1;qe>J.fadeStart&&(Me=1-(qe-J.fadeStart)/(J.duration-J.fadeStart)),ee(j,G.width,G.height,Me),g(G.width,G.height,Me),W=requestAnimationFrame(Z)}else ke()};Z()})}function ke(){W&&(cancelAnimationFrame(W),W=null),ne=[],L.value=!1}return e.watch(()=>J.trigger,G=>{G&&(R&&clearTimeout(R),R=setTimeout(we,J.delay))},{immediate:!0}),e.onBeforeUnmount(()=>{ke(),R&&clearTimeout(R)}),(G,j)=>L.value?(e.openBlock(),e.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:N,class:"dss-confetti-canvas"},null,512)):e.createCommentVNode("",!0)}}),t0={class:"dss-filter-global-inner"},l0=["placeholder","value"],n0=["title"],a0={key:0,class:"dss-filter-funnel-badge"},o0={key:1,class:"dss-filter-sortby"},s0=["value"],r0=["value"],i0=["disabled","title"],c0={key:0,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u0={key:1,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d0={key:2,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m0={class:"dss-filter-panel"},p0={key:0,class:"dss-filter-empty"},v0={class:"dss-filter-row-prefix"},f0={class:"dss-filter-cell"},h0=["onClick"],g0={class:"dss-filter-trigger-text"},y0=["placeholder"],k0={class:"dss-filter-popup-list"},C0=["onClick"],b0={key:0,class:"dss-filter-popup-empty"},w0={key:0,class:"dss-filter-cell"},x0=["onClick"],E0={class:"dss-filter-trigger-text"},S0={class:"dss-filter-popup-list"},V0=["onClick"],N0={key:1,class:"dss-filter-cell dss-filter-cell--value"},B0=["placeholder","onUpdate:modelValue"],_0={key:1,class:"dss-filter-date-wrap"},M0=["placeholder","onUpdate:modelValue"],$0=["placeholder","value","onInput","step"],D0={key:4,class:"dss-filter-between"},L0=["placeholder","value","onInput","step"],T0={class:"dss-filter-between-sep"},A0=["placeholder","value","onInput","step"],H0={key:5,class:"dss-filter-multiselect"},R0=["onClick"],F0={class:"dss-filter-trigger-text"},I0=["placeholder"],z0={class:"dss-filter-popup-list dss-filter-popup-list--check"},P0=["onClick"],O0=["checked"],W0={key:0,class:"dss-filter-popup-empty"},q0=["onClick"],Z0={class:"dss-filter-foot"},U0={class:"dss-filter-cell"},Y0=["placeholder"],X0={class:"dss-filter-popup-list"},j0=["onClick"],K0={key:0,class:"dss-filter-popup-divider"},G0=["onClick"],Q0=["placeholder"],J0={class:"dss-filter-popup-list"},e9=["onClick"],t9={key:0,class:"dss-filter-popup-empty"},l9=["placeholder"],n9={class:"dss-filter-popup-list"},a9=["onClick"],o9={key:0,class:"dss-filter-popup-empty"},s9={name:"DSSFilter"},r9=Object.assign(s9,{props:{data:{type:Array,required:!0},modelValue:{type:Array,default:void 0},exclude:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})},showSortBy:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(B,{expose:J,emit:N}){const{t:L}=ha.useI18n(),ne=B,W=N,R={unstyled:!1,maxUniqueForSelect:30,maxUniqueForEnum:15},ue=e.computed(()=>({...R,...ne.options})),rt={text:[{value:"contains"},{value:"not_contains"},{value:"equals"},{value:"not_equals"},{value:"starts_with"},{value:"ends_with"},{value:"is_empty"},{value:"is_not_empty"}],select:[{value:"is_any_of"},{value:"is_none_of"},{value:"is_empty"},{value:"is_not_empty"}],range:[{value:"eq"},{value:"neq"},{value:"gt"},{value:"gte"},{value:"lt"},{value:"lte"},{value:"between"},{value:"is_empty"},{value:"is_not_empty"}],int:[{value:"eq"},{value:"neq"},{value:"gt"},{value:"gte"},{value:"lt"},{value:"lte"},{value:"between"},{value:"is_empty"},{value:"is_not_empty"}],arraySelect:[{value:"contains_any"},{value:"contains_all"},{value:"not_contains_any"},{value:"is_empty"},{value:"is_not_empty"}],arrayText:[{value:"contains"},{value:"not_contains"},{value:"is_empty"},{value:"is_not_empty"}],date:[{value:"eq"},{value:"before"},{value:"after"},{value:"is_empty"},{value:"is_not_empty"}],boolean:[{value:"is_true"},{value:"is_false"},{value:"is_empty"},{value:"is_not_empty"}]},ee=new Set(["is_empty","is_not_empty","is_true","is_false"]),g=["label","name","title","keyword","full_name","value","text"],we=e.ref(""),ke=e.ref([]),G=e.ref(null),j=e.ref(!1),fe=e.ref(null),He=e.ref(""),he=e.ref(null),Te=e.ref(""),Z=e.ref("asc");let Fe=1;function qe(H){const V=H.find(M=>M&&typeof M=="object");if(!V)return null;for(const M of g)if(M in V&&typeof V[M]=="string")return M;return Object.keys(V).find(M=>typeof V[M]=="string")||null}function Me(H,V){const M=V.filter(ae=>ae!=null&&ae!=="NULL");if(M.length===0)return null;if(M.every(ae=>Array.isArray(ae))){const ae=M.flatMap(Ue=>Ue).filter(Ue=>Ue!=null);return ae.length===0?null:typeof ae.find(Ue=>Ue!=null)=="object"?"arraySelect":"arrayText"}return M.every(ae=>typeof ae=="boolean")?"boolean":M.every(ae=>typeof ae=="number")?new Set(M).size<=ue.value.maxUniqueForEnum?"select":"range":M.every(ae=>typeof ae=="string")?new Set(M).size<=ue.value.maxUniqueForSelect?"select":"text":M.some(ae=>typeof ae=="object"&&!Array.isArray(ae))?null:"text"}const Ze=e.computed(()=>{if(!ne.data?.length)return[];const H=new Set;for(const oe of ne.data)if(oe&&typeof oe=="object")for(const Ue of Object.keys(oe))H.add(Ue);const V=new Set(ne.exclude),M=[];for(const oe of H){if(V.has(oe))continue;const Ue=ne.config[oe]||{},bt=ne.data.map(ut=>ut?.[oe]),ot=Ue.type||Me(oe,bt);if(!ot)continue;const Xe=Ue.filterMode||"contain",Nt=Xe==="date"?"date":Xe==="string"?"text":ot,wt={key:oe,label:Ue.label||xt(oe),type:Nt,filterMode:Xe};if(ot==="select"){const ut=bt.filter(_t=>_t!=null&&_t!=="NULL");wt.uniqueValues=[...new Set(ut)].sort((_t,$t)=>typeof _t=="number"&&typeof $t=="number"?_t-$t:String(_t).localeCompare(String($t)))}else if(ot==="range"||ot==="int"){const ut=bt.filter(_t=>typeof _t=="number");wt.min=Math.min(...ut),wt.max=Math.max(...ut)}else if(ot==="arraySelect"){const ut=Ue.displayKey||qe(bt.flatMap(_t=>Array.isArray(_t)?_t:[]));if(wt.displayKey=ut,Array.isArray(Ue.uniqueValues)&&Ue.uniqueValues.length>0)wt.uniqueValues=Ue.uniqueValues.map(_t=>String(_t));else{const _t=bt.flatMap($t=>Array.isArray($t)?$t:[]).filter($t=>$t!=null).map($t=>ut&&typeof $t=="object"?$t[ut]:String($t)).filter($t=>$t!=null&&$t!=="");wt.uniqueValues=[...new Set(_t)].sort(($t,Et)=>String($t).localeCompare(String(Et)))}}M.push(wt)}const ae=ne.config._order;return ae&&M.sort((oe,Ue)=>{const bt=ae.indexOf(oe.key),ot=ae.indexOf(Ue.key);return bt===-1&&ot===-1?0:bt===-1?1:ot===-1?-1:bt-ot}),M}),U=e.computed(()=>{const H={};for(const V of Ze.value)H[V.key]=V;return H}),Ae=e.computed(()=>Array.isArray(ne.config.groups)&&ne.config.groups.length>0),Ye=e.computed(()=>{if(!Ae.value)return[];const H=new Set(Ze.value.map(V=>V.key));return ne.config.groups.map(V=>({...V,keys:V.keys.filter(M=>H.has(M))})).filter(V=>V.keys.length>0)}),Ce=e.computed(()=>{if(!Ae.value)return[];const H=new Set(ne.config.groups.flatMap(V=>V.keys));return Ze.value.filter(V=>!H.has(V.key))}),$e=e.computed(()=>{if(!he.value)return[];const H=new Set(he.value.keys),V=Ze.value.filter(ae=>H.has(ae.key));if(!He.value)return V;const M=He.value.toLowerCase();return V.filter(ae=>ae.label.toLowerCase().includes(M))}),lt=e.computed(()=>{if(!He.value)return Ze.value;const H=He.value.toLowerCase();return Ze.value.filter(V=>V.label.toLowerCase().includes(H))}),ft=e.computed(()=>Ze.value.filter(H=>!["arraySelect","arrayText"].includes(H.type))),it=e.computed(()=>Te.value?Z.value==="asc"?"Ascending":"Descending":"No sort selected");function Xt(H){G.value===H?xe():(G.value=H,He.value="",he.value=null)}function xe(){G.value=null,He.value="",he.value=null}function Lt(H){const V=H.target.closest(".dss-datepicker__overlay, .dss-datepicker__dropdown");G.value&&!V&&!H.target.closest(".dss-filter-popup")&&!H.target.closest(".dss-filter-trigger")&&!H.target.closest(".dss-filter-add-btn")&&xe(),j.value&&fe.value&&!fe.value.contains(H.target)&&(V||(j.value=!1))}e.onMounted(()=>document.addEventListener("click",Lt)),e.onBeforeUnmount(()=>document.removeEventListener("click",Lt));function Ke(H){return U.value[H]?.label||xt(H)}function Je(H){return U.value[H.key]?.filterMode||"contain"}function mt(H){return L(`filter.operators.${H}`)}function Tt(H){const V=U.value[H.key];return(rt[V?.type]||rt.text).map(M=>({...M,label:L(`filter.operators.${M.value}`)}))}function at(H){return ee.has(H)}function pt(H){const V=U.value[H.key];return V?V.type==="date"?"date":V.type==="boolean"?"boolean":V.type==="text"||V.type==="arrayText"?"text":V.type==="select"||V.type==="arraySelect"?"multiselect":V.type==="range"||V.type==="int"?H.operator==="between"?"between":"number":"text":"text"}function ct(H){return rt[H]?.[0]?.value||"contains"}function Ut(H,V){return ee.has(V)||H==="date"?null:H==="select"||H==="arraySelect"?[]:(H==="range"||H==="int")&&V==="between"?{min:null,max:null}:H==="range"||H==="int"?null:""}function ht(H){return U.value[H.key]?.uniqueValues||[]}function Rt(H){const V=ht(H);if(!He.value)return V;const M=He.value.toLowerCase();return V.filter(ae=>String(ae).toLowerCase().includes(M))}function me(H){const V=H.value;return!V||V.length===0?L("filter.select"):V.length<=2?V.join(", "):L("filter.selectedCount",{count:V.length})}function F(H){const V=U.value[H],M=V?.filterMode||"contain",ae=V?.type||"text",oe=M==="string"?"contains":ct(ae);ke.value.push(e.reactive({id:Fe++,key:H,operator:oe,value:Ut(ae,oe)})),xe()}function Y(H){ke.value=ke.value.filter(V=>V.id!==H)}function re(H,V){const ae=U.value[V]?.type||"text";H.key=V,H.operator=ct(ae),H.value=Ut(ae,H.operator),xe()}function ve(H,V){const M=pt(H);H.operator=V;const ae=pt(H);if(M!==ae||ee.has(V)){const oe=U.value[H.key];H.value=Ut(oe?.type||"text",V)}xe()}function Re(H,V){const M=V.target.value;H.value=M===""?null:Number(M)}function Ge(H,V,M){const ae=M.target.value,oe=ae===""?null:Number(ae);(!H.value||typeof H.value!="object")&&(H.value={min:null,max:null}),H.value={...H.value,[V]:isNaN(oe)?null:oe}}function Ct(H,V){const M=H.value||[],ae=M.indexOf(V);H.value=ae>=0?M.filter(oe=>oe!==V):[...M,V]}function Se(){ke.value=[],we.value="",xe()}function tt(H){we.value=H.target.value}function gt(H){Te.value=H.target.value}function jt(){Z.value=Z.value==="asc"?"desc":"asc"}const se=e.computed(()=>{if(!ne.data)return[];let H=ne.data;if(we.value){const V=we.value.toLowerCase();H=H.filter(M=>{for(const ae of Object.keys(M)){const oe=M[ae];if(typeof oe=="string"&&oe.toLowerCase().includes(V)||typeof oe=="number"&&String(oe).includes(V)||Array.isArray(oe)&&oe.some(Ue=>Ue!=null&&(typeof Ue=="string"?Ue.toLowerCase().includes(V):typeof Ue=="object"?Object.values(Ue).some(bt=>typeof bt=="string"&&bt.toLowerCase().includes(V)):!1)))return!0}return!1})}for(const V of ke.value){if(!ie(V))continue;const M=U.value[V.key];M&&(H=H.filter(ae=>Ne(ae,V,M)))}if(ne.showSortBy&&Te.value){const V=Te.value,M=Z.value==="asc"?1:-1;H=[...H].sort((ae,oe)=>X(ae?.[V],oe?.[V])*M)}return H});function X(H,V){const M=te(H),ae=te(V);return M==null&&ae==null?0:M==null?1:ae==null?-1:typeof M=="number"&&typeof ae=="number"?M-ae:String(M).localeCompare(String(ae),void 0,{numeric:!0,sensitivity:"base"})}function te(H){return H==null||H==="NULL"?null:typeof H=="string"||typeof H=="number"||typeof H=="boolean"?H:H instanceof Date?H.getTime():null}function ie(H){return ee.has(H.operator)?!0:H.value==null||typeof H.value=="string"&&H.value===""||Array.isArray(H.value)&&H.value.length===0?!1:H.value instanceof Date?!isNaN(H.value.getTime()):!(typeof H.value=="object"&&!Array.isArray(H.value)&&H.value.min==null&&H.value.max==null)}function Ne(H,V,M){const ae=H?.[V.key],oe=V.value,Ue=V.operator;if(Ue==="is_empty")return al(ae);if(Ue==="is_not_empty")return!al(ae);const bt=M.type;if(bt==="text"||bt==="arrayText"){const ot=bt==="arrayText"&&Array.isArray(ae)?ae.filter(wt=>wt!=null).map(String).join(" "):ae!=null?String(ae):"",Xe=String(oe).toLowerCase(),Nt=ot.toLowerCase();switch(Ue){case"contains":return Nt.includes(Xe);case"not_contains":return!Nt.includes(Xe);case"equals":return Nt===Xe;case"not_equals":return Nt!==Xe;case"starts_with":return Nt.startsWith(Xe);case"ends_with":return Nt.endsWith(Xe);default:return!0}}if(bt==="select")switch(Ue){case"is_any_of":return oe.includes(ae);case"is_none_of":return!oe.includes(ae);default:return!0}if(bt==="range"||bt==="int"){const ot=typeof ae=="number"?ae:Number(ae);if(typeof ot!="number"||isNaN(ot))return!1;if(Ue==="between"){const Nt=oe?.min!=null?Number(oe.min):null,wt=oe?.max!=null?Number(oe.max):null,ut=Nt!=null&&!isNaN(Nt)?Nt:null,_t=wt!=null&&!isNaN(wt)?wt:null;return(ut==null||ot>=ut)&&(_t==null||ot<=_t)}const Xe=typeof oe=="number"&&!isNaN(oe)?oe:Number(oe);if(Ue==="contains"||Ue==="not_contains"){const Nt=String(ot),wt=String(oe??"").toLowerCase(),ut=Nt.toLowerCase().includes(wt);return Ue==="contains"?ut:!ut}if(typeof Xe!="number"||isNaN(Xe))return!1;switch(Ue){case"eq":return ot===Xe;case"neq":return ot!==Xe;case"gt":return ot>Xe;case"gte":return ot>=Xe;case"lt":return ot<Xe;case"lte":return ot<=Xe;default:return!0}}if(bt==="arraySelect"){if(!Array.isArray(ae))return!1;const ot=ae.filter(Xe=>Xe!=null).map(Xe=>M.displayKey&&typeof Xe=="object"?Xe[M.displayKey]:String(Xe));switch(Ue){case"contains_any":return ot.some(Xe=>oe.includes(Xe));case"contains_all":return oe.every(Xe=>ot.includes(Xe));case"not_contains_any":return!ot.some(Xe=>oe.includes(Xe));default:return!0}}if(bt==="date"){const ot=et(oe);if(!ot||isNaN(ot.getTime()))return!1;const Xe=et(ae);if(!Xe||isNaN(Xe.getTime()))return!1;const Nt=yt(Xe),wt=yt(ot);switch(Ue){case"eq":return Nt===wt;case"before":return Nt<wt;case"after":return Nt>wt;default:return!0}}if(bt==="boolean"){const ot=ae===!0||ae==="true"||ae===1,Xe=ae===!1||ae==="false"||ae===0;switch(Ue){case"is_true":return ot;case"is_false":return Xe;default:return!0}}return!0}function et(H){if(H==null)return null;if(H instanceof Date)return isNaN(H.getTime())?null:H;if(typeof H=="number")return new Date(H>1e10?H:H*1e3);if(typeof H=="string"){const V=new Date(H);return isNaN(V.getTime())?null:V}return null}function yt(H){const V=H.getFullYear(),M=String(H.getMonth()+1).padStart(2,"0"),ae=String(H.getDate()).padStart(2,"0");return`${V}-${M}-${ae}`}function al(H){return!!(H==null||H===""||H==="NULL"||Array.isArray(H)&&H.length===0||Array.isArray(H)&&H.every(V=>V==null))}e.watch(se,H=>W("update:modelValue",H),{immediate:!0}),e.watch(()=>ne.data,()=>{ke.value=[],we.value="",j.value=!1,Te.value="",Z.value="asc",xe()});function xt(H){return H.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,V=>V.toUpperCase())}function el(){const H=V=>{if(V==null)return V;if(V instanceof Date)return{_type:"Date",value:V.toISOString(),local:V.toLocaleDateString()};if(Array.isArray(V))return V.map(H);if(typeof V=="object"&&!Array.isArray(V)){const M={};for(const ae of Object.keys(V))M[ae]=H(V[ae]);return M}return V};return{globalSearch:we.value,rows:ke.value.map(V=>({key:V.key,operator:V.operator,value:H(V.value),defType:U.value[V.key]?.type,defFilterMode:U.value[V.key]?.filterMode})),filteredCount:se.value?.length??0}}return J({getDebugState:el}),(H,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-filter",{"dss-filter--unstyled":ue.value.unstyled}])},[e.createElementVNode("div",{class:"dss-filter-global",ref_key:"globalRef",ref:fe},[e.createElementVNode("div",t0,[V[20]||(V[20]=e.createElementVNode("svg",{class:"dss-filter-global-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),e.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),e.createElementVNode("input",{type:"text",class:"dss-filter-global-input",placeholder:e.unref(L)("filter.searchAcrossFields"),value:we.value,onInput:tt},null,40,l0),we.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-global-clear",onClick:V[0]||(V[0]=M=>we.value="")},"×")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["dss-filter-funnel-btn",{active:j.value||ke.value.length>0,"dss-filter-funnel-btn--with-sort":ne.showSortBy}]),onClick:V[1]||(V[1]=M=>j.value=!j.value),type:"button",title:j.value?e.unref(L)("filter.closeAdvancedFilter"):e.unref(L)("filter.openAdvancedFilter")},[V[14]||(V[14]=e.createElementVNode("svg",{class:"dss-filter-funnel-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M11.7583 2.00407L11.7537 2.00926L7.84558 6.18223V9.38409C7.84581 9.53637 7.80836 9.68634 7.73658 9.82064C7.6648 9.95494 7.56091 10.0694 7.43417 10.1538L5.58772 11.3852C5.44858 11.4779 5.28688 11.531 5.11988 11.539C4.95288 11.5469 4.78685 11.5094 4.63952 11.4304C4.49219 11.3514 4.36908 11.2338 4.28334 11.0903C4.1976 10.9467 4.15244 10.7826 4.15269 10.6154V6.18223L0.244567 2.00926L0.239951 2.00407C0.119785 1.87182 0.0405781 1.70755 0.0119374 1.53118C-0.0167033 1.35481 0.00645342 1.17391 0.0785984 1.01044C0.150743 0.846967 0.268776 0.707944 0.418378 0.610235C0.56798 0.512525 0.742722 0.460328 0.921405 0.459976H11.0769C11.2557 0.459994 11.4307 0.511948 11.5805 0.609528C11.7304 0.707107 11.8487 0.846111 11.9211 1.00965C11.9934 1.17319 12.0167 1.35422 11.9881 1.53075C11.9596 1.70728 11.8803 1.87172 11.7601 2.00407H11.7583Z",fill:"currentColor"})],-1)),ke.value.length>0?(e.openBlock(),e.createElementBlock("span",a0,e.toDisplayString(ke.value.length),1)):e.createCommentVNode("",!0)],10,n0),ne.showSortBy?(e.openBlock(),e.createElementBlock("div",o0,[V[19]||(V[19]=e.createElementVNode("label",{class:"dss-filter-sortby-label",for:"dss-filter-sort-select"},"Sort by",-1)),e.createElementVNode("select",{id:"dss-filter-sort-select",class:"dss-filter-sortby-select",value:Te.value,onChange:gt},[V[15]||(V[15]=e.createElementVNode("option",{value:""},"None",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ft.value,M=>(e.openBlock(),e.createElementBlock("option",{key:M.key,value:M.key},e.toDisplayString(M.label),9,r0))),128))],40,s0),e.createElementVNode("button",{class:"dss-filter-sortby-order",type:"button",onClick:jt,disabled:!Te.value,title:it.value},[Te.value?Z.value==="asc"?(e.openBlock(),e.createElementBlock("svg",u0,[...V[17]||(V[17]=[e.createElementVNode("path",{d:"M6 12C6.36819 12 6.66667 11.7015 6.66667 11.3333L6.66667 2.55333L8.58967 4.47098C8.84953 4.73012 9.27017 4.72983 9.52967 4.47033C9.78943 4.21057 9.78943 3.78943 9.52967 3.52967L6.70711 0.707106C6.31658 0.316582 5.68342 0.316582 5.29289 0.707107L2.47033 3.52967C2.21057 3.78943 2.21057 4.21057 2.47033 4.47033C2.72983 4.72983 3.15047 4.73012 3.41033 4.47098L5.33333 2.55333L5.33333 11.3333C5.33333 11.7015 5.63181 12 6 12Z",fill:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",d0,[...V[18]||(V[18]=[e.createElementVNode("path",{d:"M6 -1.74846e-07C5.63181 -1.58751e-07 5.33333 0.298476 5.33333 0.666666L5.33333 9.44667L3.41033 7.52902C3.15047 7.26988 2.72983 7.27017 2.47033 7.52967C2.21057 7.78943 2.21057 8.21057 2.47033 8.47033L5.29289 11.2929C5.68342 11.6834 6.31658 11.6834 6.70711 11.2929L9.52967 8.47033C9.78943 8.21057 9.78943 7.78943 9.52967 7.52967C9.27017 7.27017 8.84953 7.26988 8.58967 7.52902L6.66667 9.44667L6.66667 0.666667C6.66667 0.298477 6.36819 -1.9094e-07 6 -1.74846e-07Z",fill:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",c0,[...V[16]||(V[16]=[e.createElementVNode("path",{d:"M5.413 9.06387C5.45434 9.16352 5.4652 9.27319 5.4442 9.37901C5.42321 9.48484 5.3713 9.58206 5.29505 9.65837L3.11339 11.84C3.06273 11.8907 3.00258 11.931 2.93637 11.9584C2.87016 11.9859 2.79918 12 2.72751 12C2.65583 12 2.58486 11.9859 2.51865 11.9584C2.45243 11.931 2.39228 11.8907 2.34163 11.84L0.159964 9.65837C0.0835992 9.58209 0.0315843 9.48487 0.0105038 9.37902C-0.0105768 9.27316 0.000224981 9.16343 0.0415416 9.06371C0.0828581 8.964 0.152832 8.87879 0.242604 8.81886C0.332376 8.75894 0.43791 8.72699 0.545845 8.72708H2.18209V0.545845C2.18209 0.401191 2.23955 0.262463 2.34184 0.160178C2.44413 0.0578925 2.58285 0.000429123 2.72751 0.000429123C2.87216 0.000429123 3.01089 0.0578925 3.11317 0.160178C3.21546 0.262463 3.27292 0.401191 3.27292 0.545845V8.72708H4.90917C5.01704 8.7271 5.12248 8.75911 5.21216 8.81906C5.30185 8.87901 5.37174 8.9642 5.413 9.06387ZM11.84 2.34162L9.65837 0.159963C9.60772 0.109252 9.54757 0.0690231 9.48135 0.0415755C9.41514 0.0141278 9.34417 0 9.27249 0C9.20082 0 9.12984 0.0141278 9.06363 0.0415755C8.99742 0.0690231 8.93727 0.109252 8.88661 0.159963L6.70495 2.34162C6.62858 2.4179 6.57657 2.51513 6.55549 2.62098C6.53441 2.72684 6.54521 2.83657 6.58653 2.93629C6.62784 3.036 6.69782 3.12121 6.78759 3.18114C6.87736 3.24107 6.9829 3.27301 7.09083 3.27292H8.72708V11.4542C8.72708 11.5988 8.78454 11.7375 8.88683 11.8398C8.98911 11.9421 9.12784 11.9996 9.27249 11.9996C9.41715 11.9996 9.55587 11.9421 9.65816 11.8398C9.76045 11.7375 9.81791 11.5988 9.81791 11.4542V3.27292H11.4542C11.5621 3.27301 11.6676 3.24107 11.7574 3.18114C11.8472 3.12121 11.9171 3.036 11.9585 2.93629C11.9998 2.83657 12.0106 2.72684 11.9895 2.62098C11.9684 2.51513 11.9164 2.4179 11.84 2.34162Z",fill:"currentColor"},null,-1)])]))],8,i0)])):e.createCommentVNode("",!0)]),j.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-advanced-popup",onClick:V[13]||(V[13]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",m0,[ke.value.length===0?(e.openBlock(),e.createElementBlock("div",p0,e.toDisplayString(e.unref(L)("filter.noConditionsApplied")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(M,ae)=>(e.openBlock(),e.createElementBlock("div",{key:M.id,class:"dss-filter-row"},[e.createElementVNode("span",v0,e.toDisplayString(ae===0?e.unref(L)("filter.where"):e.unref(L)("filter.and")),1),e.createElementVNode("div",f0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(oe=>Xt(`${M.id}:field`),["stop"])},[e.createElementVNode("span",g0,e.toDisplayString(Ke(M.key)),1),V[21]||(V[21]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,h0),G.value===`${M.id}:field`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:V[3]||(V[3]=e.withModifiers(()=>{},["stop"]))},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[2]||(V[2]=oe=>He.value=oe),placeholder:e.unref(L)("filter.searchAttributes")},null,8,y0),[[e.vModelText,He.value]]),e.createElementVNode("ul",k0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,oe=>(e.openBlock(),e.createElementBlock("li",{key:oe.key,class:"dss-filter-popup-item",onClick:Ue=>re(M,oe.key)},e.toDisplayString(oe.label),9,C0))),128)),lt.value.length===0?(e.openBlock(),e.createElementBlock("li",b0,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),Je(M)==="contain"||Je(M)==="date"?(e.openBlock(),e.createElementBlock("div",w0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(oe=>Xt(`${M.id}:op`),["stop"])},[e.createElementVNode("span",E0,e.toDisplayString(mt(M.operator)),1),V[22]||(V[22]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,x0),G.value===`${M.id}:op`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:V[4]||(V[4]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("ul",S0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt(M),oe=>(e.openBlock(),e.createElementBlock("li",{key:oe.value,class:e.normalizeClass(["dss-filter-popup-item",{selected:M.operator===oe.value}]),onClick:Ue=>ve(M,oe.value)},e.toDisplayString(oe.label),11,V0))),128))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),at(M.operator)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",N0,[Je(M)==="string"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),"onUpdate:modelValue":oe=>M.value=oe},null,8,B0)),[[e.vModelText,M.value]]):Je(M)==="date"?(e.openBlock(),e.createElementBlock("div",_0,[e.createVNode(go,{mode:"single",modelValue:M.value,"onUpdate:modelValue":oe=>M.value=oe},null,8,["modelValue","onUpdate:modelValue"])])):pt(M)==="text"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,type:"text",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),"onUpdate:modelValue":oe=>M.value=oe},null,8,M0)),[[e.vModelText,M.value]]):pt(M)==="number"?(e.openBlock(),e.createElementBlock("input",{key:3,type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),value:M.value,onInput:oe=>Re(M,oe),step:U.value[M.key]?.type==="int"?1:void 0},null,40,$0)):pt(M)==="between"?(e.openBlock(),e.createElementBlock("div",D0,[e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.min"),value:M.value?.min,onInput:oe=>Ge(M,"min",oe),step:U.value[M.key]?.type==="int"?1:void 0},null,40,L0),e.createElementVNode("span",T0,e.toDisplayString(e.unref(L)("filter.and")),1),e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.max"),value:M.value?.max,onInput:oe=>Ge(M,"max",oe),step:U.value[M.key]?.type==="int"?1:void 0},null,40,A0)])):pt(M)==="multiselect"?(e.openBlock(),e.createElementBlock("div",H0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(oe=>Xt(`${M.id}:val`),["stop"])},[e.createElementVNode("span",F0,e.toDisplayString(me(M)),1),V[23]||(V[23]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,R0),G.value===`${M.id}:val`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:V[6]||(V[6]=e.withModifiers(()=>{},["stop"]))},[ht(M).length>6?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[5]||(V[5]=oe=>He.value=oe),placeholder:e.unref(L)("filter.search")},null,8,I0)),[[e.vModelText,He.value]]):e.createCommentVNode("",!0),e.createElementVNode("ul",z0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rt(M),oe=>(e.openBlock(),e.createElementBlock("li",{key:oe,class:"dss-filter-popup-item",onClick:Ue=>Ct(M,oe)},[e.createElementVNode("input",{type:"checkbox",checked:(M.value||[]).includes(oe),tabindex:"-1"},null,8,O0),e.createElementVNode("span",null,e.toDisplayString(oe),1)],8,P0))),128)),Rt(M).length===0?(e.openBlock(),e.createElementBlock("li",W0,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])),e.createElementVNode("button",{class:"dss-filter-row-remove",onClick:oe=>Y(M.id)},[...V[24]||(V[24]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,q0)]))),128)),e.createElementVNode("div",Z0,[e.createElementVNode("div",U0,[e.createElementVNode("button",{class:"dss-filter-add-btn",onClick:V[7]||(V[7]=e.withModifiers(M=>Xt("add"),["stop"]))},e.toDisplayString(e.unref(L)("filter.addFilter")),1),G.value==="add"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup dss-filter-add-popup",onClick:V[12]||(V[12]=e.withModifiers(()=>{},["stop"]))},[Ae.value&&!he.value&&!He.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[8]||(V[8]=M=>He.value=M),placeholder:e.unref(L)("filter.searchAttributes")},null,8,Y0),[[e.vModelText,He.value]]),e.createElementVNode("ul",X0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ye.value,M=>(e.openBlock(),e.createElementBlock("li",{key:M.label,class:"dss-filter-popup-item dss-filter-popup-group",onClick:ae=>he.value=M},[e.createElementVNode("span",null,e.toDisplayString(M.label),1),V[25]||(V[25]=e.createElementVNode("svg",{class:"dss-filter-chevron-right",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1))],8,j0))),128)),Ce.value.length>0?(e.openBlock(),e.createElementBlock("li",K0)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,M=>(e.openBlock(),e.createElementBlock("li",{key:M.key,class:"dss-filter-popup-item",onClick:ae=>F(M.key)},e.toDisplayString(M.label),9,G0))),128))])],64)):he.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dss-filter-popup-back",onClick:V[9]||(V[9]=M=>he.value=null)},[V[26]||(V[26]=e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)),e.createElementVNode("span",null,e.toDisplayString(he.value.label),1)]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[10]||(V[10]=M=>He.value=M),placeholder:e.unref(L)("filter.searchAttributes")},null,8,Q0),[[e.vModelText,He.value]]),e.createElementVNode("ul",J0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($e.value,M=>(e.openBlock(),e.createElementBlock("li",{key:M.key,class:"dss-filter-popup-item",onClick:ae=>F(M.key)},e.toDisplayString(M.label),9,e9))),128)),$e.value.length===0?(e.openBlock(),e.createElementBlock("li",t9,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":V[11]||(V[11]=M=>He.value=M),placeholder:e.unref(L)("filter.searchAttributes")},null,8,l9),[[e.vModelText,He.value]]),e.createElementVNode("ul",n9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,M=>(e.openBlock(),e.createElementBlock("li",{key:M.key,class:"dss-filter-popup-item",onClick:ae=>F(M.key)},e.toDisplayString(M.label),9,a9))),128)),lt.value.length===0?(e.openBlock(),e.createElementBlock("li",o9,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64))])):e.createCommentVNode("",!0)]),ke.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-clear-all",onClick:Se},e.toDisplayString(e.unref(L)("filter.clearAllFilters")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],512)],2))}}),i9={class:"dss-pill-field__pills"},c9=["data-value"],u9=["disabled"],d9={class:"dss-pill-field__pill-text"},m9={key:0,class:"dss-pill-field__pill-actions"},p9=["onClick"],v9=["onClick"],f9=["placeholder","disabled"],h9=e.defineComponent({__name:"DSSPillField",props:{modelValue:{default:()=>[]},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(B,{emit:J}){const N=B,L=J,ne=e.ref(""),W=e.ref([...N.modelValue]),R=e.ref(null);let ue=null;const rt=e.ref(null),ee=e.ref(""),g=e.ref(null),we=e.ref(null),ke=e.computed(()=>{if(!we.value)return;const{width:Ae,height:Ye}=we.value;return{minWidth:`${Ae}px`,height:`${Ye}px`}});function G(Ae,Ye){rt.value===Ye&&(g.value=Ae)}function j(){rt.value=null,ee.value="",we.value=null,g.value=null}const fe=e.computed(()=>new Set(W.value.map(Ae=>Ae.trim()).filter(Boolean)));function He(Ae){R.value=Ae,ue&&clearTimeout(ue),ue=setTimeout(()=>{R.value=null,ue=null},900)}function he(Ae){const Ye=Ae.trim();return Ye?fe.value.has(Ye)?(He(Ye),!1):(W.value=[...W.value,Ye],L("update:modelValue",[...W.value]),!0):!1}function Te(Ae){const Ye=Ae.split(/\r?\n/g).map(ft=>ft.trim()).filter(Boolean);if(!Ye.length)return;const Ce=new Set(W.value.map(ft=>ft.trim()).filter(Boolean)),$e=[...W.value];let lt=null;for(const ft of Ye){if(Ce.has(ft)){lt??=ft;continue}Ce.add(ft),$e.push(ft)}$e.length!==W.value.length&&(W.value=$e,L("update:modelValue",[...W.value])),lt&&He(lt)}function Z(Ae){N.disabled||(rt.value===Ae&&j(),W.value=W.value.filter((Ye,Ce)=>Ce!==Ae),L("update:modelValue",[...W.value]))}async function Fe(Ae,Ye){if(N.disabled)return;const Ce=Ye.currentTarget.closest(".dss-pill-field__pill");Ce&&(we.value={width:Ce.offsetWidth,height:Ce.offsetHeight}),rt.value=Ae,ee.value=W.value[Ae]??"",await e.nextTick();const $e=g.value;if(!$e)return;$e.focus();const lt=$e.value.length;$e.setSelectionRange(lt,lt)}function qe(){j()}function Me(){if(N.disabled||rt.value===null)return;const Ae=rt.value,Ye=W.value[Ae]??"",Ce=ee.value.trim();if(j(),Ce!==Ye&&fe.value.has(Ce)){He(Ce);return}if(!Ce){W.value=W.value.filter((lt,ft)=>ft!==Ae),L("update:modelValue",[...W.value]);return}const $e=W.value.map((lt,ft)=>ft===Ae?Ce:lt);W.value=$e,L("update:modelValue",[...W.value])}function Ze(Ae){Ae.preventDefault(),!N.disabled&&(he(ne.value),ne.value="")}function U(Ae){if(N.disabled)return;const Ye=Ae.clipboardData?.getData("text")??"";!Ye.includes(`
120
+ `)&&!Ye.includes("\r")||(Ae.preventDefault(),Te(Ye),ne.value="")}return e.watch(()=>N.modelValue,Ae=>{W.value=Array.isArray(Ae)?[...Ae]:[]},{deep:!0}),e.onBeforeUnmount(()=>{ue&&clearTimeout(ue)}),(Ae,Ye)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-pill-field",{"dss-pill-field--disabled":Ae.disabled}])},[e.createElementVNode("div",i9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(Ce,$e)=>(e.openBlock(),e.createElementBlock("span",{key:Ce,class:e.normalizeClass(["dss-pill-field__pill",{"dss-pill-field__pill--highlight":R.value===Ce,"dss-pill-field__pill--editing":rt.value===$e}]),style:e.normalizeStyle(rt.value===$e&&we.value?ke.value:void 0)},[rt.value===$e?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-pill-field__pill-edit-wrap","data-value":ee.value||" "},[e.withDirectives(e.createElementVNode("input",{ref_for:!0,ref:lt=>G(lt,$e),"onUpdate:modelValue":Ye[0]||(Ye[0]=lt=>ee.value=lt),class:"dss-pill-field__pill-edit",type:"text",disabled:Ae.disabled,onKeydown:[e.withKeys(Me,["enter"]),e.withKeys(qe,["esc"])],onBlur:Me},null,40,u9),[[e.vModelText,ee.value]])],8,c9)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",d9,e.toDisplayString(Ce),1),Ae.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",m9,[e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action",onClick:lt=>Fe($e,lt)},[...Ye[2]||(Ye[2]=[e.createElementVNode("svg",{class:"dss-pill-field__pill-action-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 9.64033V11.6667C0 11.8534 0.146646 12 0.333287 12H2.35967C2.44633 12 2.53298 11.9667 2.59297 11.9L9.87196 4.62769L7.37231 2.12804L0.0999862 9.40036C0.0333288 9.46702 0 9.54701 0 9.64033ZM11.805 2.69463C12.065 2.43466 12.065 2.01472 11.805 1.75476L10.2452 0.194973C9.98528 -0.064991 9.56534 -0.064991 9.30537 0.194973L8.08554 1.4148L10.5852 3.91446L11.805 2.69463Z",fill:"currentColor"})],-1)])],8,p9),e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action dss-pill-field__pill-action--remove",onClick:lt=>Z($e)}," × ",8,v9)]))],64))],6))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":Ye[1]||(Ye[1]=Ce=>ne.value=Ce),class:"dss-pill-field__input",type:"text",placeholder:W.value.length?"":Ae.placeholder,disabled:Ae.disabled,onPaste:U,onKeydown:e.withKeys(Ze,["enter"])},null,40,f9),[[e.vModelText,ne.value]])])],2))}}),g9={key:0,class:"dss-title dss-title--separator"},y9={__name:"DSSTitle",props:{type:{type:String,default:"main",validator:B=>["main","separator","subtitle"].includes(B)},h:{type:Number,default:null,validator:B=>B===null||Number.isInteger(B)&&B>=1&&B<=6},size:{type:[String,Number],default:null},weight:{type:[String,Number],default:null},color:{type:String,default:null},editable:{type:Boolean,default:!1},modelValue:{type:String,default:""}},emits:["update:modelValue","change"],setup(B,{expose:J,emit:N}){const L=B,ne=N,W=e.ref(null),R=e.computed(()=>`dss-title--${L.type}`),ue=e.computed(()=>L.h!=null?`dss-title--h${L.h}`:null),rt={main:"div",subtitle:"p",separator:"span"},ee=e.computed(()=>L.h!=null?`h${L.h}`:rt[L.type]??"div"),g=e.computed(()=>L.editable?"plaintext-only":void 0),we=e.computed(()=>{const he={};return L.size!=null&&(he.fontSize=typeof L.size=="number"?`${L.size}px`:L.size),L.weight!=null&&(he.fontWeight=L.weight),L.color!=null&&(he.color=L.color),Object.keys(he).length?he:void 0}),ke=e.computed(()=>L.editable?{input:j,keydown:fe,paste:He}:{}),G=()=>{const he=W.value;!L.editable||!he||document.activeElement!==he&&(he.innerText=L.modelValue??"")},j=he=>{const Te=he.target.innerText;ne("update:modelValue",Te),ne("change",Te)},fe=he=>{he.key==="Enter"&&he.preventDefault()},He=he=>{he.preventDefault();const Te=(he.clipboardData||window.clipboardData).getData("text/plain");document.execCommand("insertText",!1,Te)};return e.watch(()=>L.modelValue,()=>{G()}),e.watch(()=>L.editable,()=>{e.nextTick(G)}),e.onMounted(()=>{e.nextTick(G)}),J({focus:()=>W.value?.focus()}),(he,Te)=>B.type==="separator"?(e.openBlock(),e.createElementBlock("div",g9,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ee.value),e.mergeProps({ref_key:"titleRef",ref:W,class:["dss-title__separator-label",ue.value,{"dss-title--editable":B.editable}],style:we.value,contenteditable:g.value,spellcheck:B.editable?!1:void 0},e.toHandlers(ke.value)),{default:e.withCtx(()=>[B.editable?e.createCommentVNode("",!0):e.renderSlot(he.$slots,"default",{key:0},()=>[e.createTextVNode(e.toDisplayString(B.modelValue),1)])]),_:3},16,["class","style","contenteditable","spellcheck"]))])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ee.value),e.mergeProps({key:1,ref_key:"titleRef",ref:W,class:["dss-title",[R.value,ue.value,{"dss-title--editable":B.editable}]],style:we.value,contenteditable:g.value,spellcheck:B.editable?!1:void 0},e.toHandlers(ke.value)),{default:e.withCtx(()=>[B.editable?e.createCommentVNode("",!0):e.renderSlot(he.$slots,"default",{key:0},()=>[e.createTextVNode(e.toDisplayString(B.modelValue),1)])]),_:3},16,["class","style","contenteditable","spellcheck"]))}},k9={contextMenu:{addMarker:"Add Marker",clearAllMarkers:"Clear All Markers",downloadSvg:"Download SVG",downloadPng:"Download PNG",downloadCsv:"Download CSV"},modalMarker:{editMarker:"Edit Marker",viewMarker:"View Marker",title:"Title",description:"Description",iconType:"Icon Type",defaultIcon:"Default Logo",iconPreview:"Icon Preview",deleteMarker:"Delete Marker",cancel:"Cancel",close:"Close",save:"Save",placeholderTitle:"Enter marker title",placeholderDescription:"Enter marker description (required)"},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"}},C9={firstPage:"First page",previousPage:"Previous page",nextPage:"Next page",lastPage:"Last page",currentPageAriaLabel:"Current page",rowsPerPage:"Rows per page",searchPlaceholder:"Search...",searchAriaLabel:"Search",searchTableAriaLabel:"Search table",clearSearchAriaLabel:"Clear search",downloadPdf:"Download PDF",downloadExcel:"Download Excel",columnVisibility:"Columns Visibility",expandRowAriaLabel:"Expand row",collapseRowAriaLabel:"Collapse row",filterColumnAriaLabel:"Filter column",clearFilter:"Clear",search:"Search...",filterFrom:"From:",filterTo:"To:",dateFormat:"dd/mm/yyyy",showingRange:"Showing {start}-{end} from {total}",ofPages:"of {total}",emptyMessage:"No data available"},b9={searchAcrossFields:"Search across all fields...",openAdvancedFilter:"Open advanced filter",closeAdvancedFilter:"Close advanced filter",noConditionsApplied:"No filter conditions are applied to this view",where:"Where",and:"And",searchAttributes:"Search attributes...",noMatch:"No match",enterValue:"Enter value...",min:"Min",max:"Max",search:"Search...",addFilter:"Add filter",clearAllFilters:"Clear all filters",select:"Select...",selectedCount:"{count} selected",operators:{contains:"contains",not_contains:"does not contain",equals:"equals",not_equals:"does not equal",starts_with:"starts with",ends_with:"ends with",is_empty:"is empty",is_not_empty:"is not empty",is_any_of:"is any of",is_none_of:"is none of",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"between",contains_any:"contains any of",contains_all:"contains all of",not_contains_any:"does not contain",before:"before",after:"after",is_true:"is true",is_false:"is false"}},w9={selectDate:"Select Date",selectRange:"Select range",selectFromList:"Select a date",noAvailableDates:"No dates available",startDate:"Start date",endDate:"End date",prevMonth:"Previous month",nextMonth:"Next month",clear:"Clear date",comparison:{compareTo:"Compare to",active:"Comparison",previousPeriod:"Previous period",previousYear:"Previous year",custom:"Custom"},quickSelect:{today:"Today",lastWeek:"Last week",last15Days:"Last 15 days",last30Days:"Last 30 days",thisMonth:"This month",lastMonth:"Last month",last3Months:"Last 3 months",last6Months:"Last 6 months",last12Months:"Last 12 months",lastYear:"Last year",allDates:"All dates",last2Dates:"Last 2 dates",last3Dates:"Last 3 dates",last4Dates:"Last 4 dates",last5Dates:"Last 5 dates",in7Days:"In 7 days",in14Days:"In 14 days",in30Days:"In 30 days"}},x9={toolbar:{undo:"Undo",redo:"Redo",paragraphFormat:"Paragraph Format",bold:"Bold",italic:"Italic",underline:"Underline",citation:"Citation",insertLink:"Insert Link",removeLink:"Remove Link",bulletList:"Bullet List",numberList:"Number List",image:"Image",comment:"Comment",askAi:"Ask AI"},paragraph:{heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",paragraph:"Paragraph"},link:{editLink:"Edit Link",altText:"Alt text:",url:"URL:",enterAltText:"Enter alt text...",enterUrl:"Enter URL...",cancel:"Cancel",save:"Save"},image:{addImage:"Add Image",editImage:"Edit Image",upload:"Upload",imageLink:"Image Link",uploadImage:"Upload image:",imageUrl:"Image URL:",altText:"Alt text:",width:"Width (px):",height:"Height (px):",enterAltText:"Enter alt text...",enterImageUrl:"https://example.com/image.jpg",auto:"Auto",noAlt:"No alt",cancel:"Cancel",save:"Save"},comment:{placeholder:"Add a comment",send:"Send",delete:"Delete comment"},started_conversation:"Started conversation",labels:{title:"Title",description:"Description"},placeholders:{title:"Enter title...",description:"Enter description...",startTyping:"Start typing..."},footer:{word:"word",words:"words",character:"character",characters:"characters"}},ga={chart:k9,table:C9,filter:b9,datepicker:w9,textEditor:x9},E9={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",viewMarker:"Voir le marqueur",title:"Titre",description:"Description",iconType:"Type d'icône",defaultIcon:"Logo par défaut",iconPreview:"Aperçu de l'icône",deleteMarker:"Supprimer le marqueur",cancel:"Annuler",close:"Fermer",save:"Enregistrer",placeholderTitle:"Entrez le titre du marqueur",placeholderDescription:"Entrez la description du marqueur (requise)"},zoom:{doubleClickToReset:"(Double-cliquez pour réinitialiser)"},csv:{chartTitle:"Titre du graphique",chartSubtitle:"Sous-titre du graphique",generated:"Généré"},fallback:{item:"Élément",axis:"Axe"},tooltip:{flags:"Drapeaux",markers:"Marqueurs",manualFlags:"Drapeaux manuels",autoFlags:"Drapeaux automatiques"}},S9={firstPage:"Première page",previousPage:"Page précédente",nextPage:"Page suivante",lastPage:"Dernière page",currentPageAriaLabel:"Page actuelle",rowsPerPage:"Lignes par page",searchPlaceholder:"Rechercher...",searchAriaLabel:"Rechercher",searchTableAriaLabel:"Rechercher dans le tableau",clearSearchAriaLabel:"Effacer la recherche",downloadPdf:"Télécharger PDF",downloadExcel:"Télécharger Excel",columnVisibility:"Visibilité des colonnes",expandRowAriaLabel:"Développer la ligne",collapseRowAriaLabel:"Réduire la ligne",filterColumnAriaLabel:"Filtrer la colonne",clearFilter:"Effacer",search:"Rechercher...",filterFrom:"Du :",filterTo:"Au :",dateFormat:"jj/mm/aaaa",showingRange:"Affichage de {start}-{end} sur {total}",ofPages:"sur {total}",emptyMessage:"Aucune donnée disponible"},V9={searchAcrossFields:"Rechercher dans tous les champs...",openAdvancedFilter:"Ouvrir le filtre avancé",closeAdvancedFilter:"Fermer le filtre avancé",noConditionsApplied:"Aucune condition de filtre n'est appliquée à cette vue",where:"Où",and:"Et",searchAttributes:"Rechercher des attributs...",noMatch:"Aucun résultat",enterValue:"Saisir une valeur...",min:"Min",max:"Max",search:"Rechercher...",addFilter:"Ajouter un filtre",clearAllFilters:"Effacer tous les filtres",select:"Sélectionner...",selectedCount:"{count} sélectionnés",operators:{contains:"contient",not_contains:"ne contient pas",equals:"est égal à",not_equals:"est différent de",starts_with:"commence par",ends_with:"se termine par",is_empty:"est vide",is_not_empty:"n'est pas vide",is_any_of:"est l'un de",is_none_of:"n'est aucun de",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"entre",contains_any:"contient l'un de",contains_all:"contient tous",not_contains_any:"ne contient pas",before:"avant",after:"après",is_true:"est vrai",is_false:"est faux"}},N9={selectDate:"Sélectionner une date",selectRange:"Sélectionner une plage",selectFromList:"Sélectionner une date",noAvailableDates:"Aucune date disponible",startDate:"Date de début",endDate:"Date de fin",prevMonth:"Mois précédent",nextMonth:"Mois suivant",clear:"Effacer la date",comparison:{compareTo:"Comparer à",active:"Comparaison",previousPeriod:"Période précédente",previousYear:"Année précédente",custom:"Personnalisée"},quickSelect:{today:"Aujourd'hui",lastWeek:"Dernière semaine",last15Days:"15 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois",lastMonth:"Mois dernier",last3Months:"3 derniers mois",last6Months:"6 derniers mois",last12Months:"12 derniers mois",lastYear:"Dernière année",allDates:"Toutes les dates",last2Dates:"2 dernières dates",last3Dates:"3 dernières dates",last4Dates:"4 dernières dates",last5Dates:"5 dernières dates",in7Days:"Dans 7 jours",in14Days:"Dans 14 jours",in30Days:"Dans 30 jours"}},B9={toolbar:{undo:"Annuler",redo:"Rétablir",paragraphFormat:"Format de paragraphe",bold:"Gras",italic:"Italique",underline:"Souligné",citation:"Citation",insertLink:"Insérer un lien",removeLink:"Supprimer le lien",bulletList:"Liste à puces",numberList:"Liste numérotée",image:"Image",comment:"Commentaire",askAi:"Demander à l'IA"},paragraph:{heading1:"En-tête 1",heading2:"En-tête 2",heading3:"En-tête 3",heading4:"En-tête 4",heading5:"En-tête 5",heading6:"En-tête 6",paragraph:"Paragraphe"},link:{editLink:"Modifier le lien",altText:"Texte alternatif :",url:"URL :",enterAltText:"Entrez le texte alternatif...",enterUrl:"Entrez l'URL...",cancel:"Annuler",save:"Enregistrer"},image:{addImage:"Ajouter une image",editImage:"Modifier l'image",upload:"Télécharger",imageLink:"Lien de l'image",uploadImage:"Télécharger l'image :",imageUrl:"URL de l'image :",altText:"Texte alternatif :",width:"Largeur (px) :",height:"Hauteur (px) :",enterAltText:"Entrez le texte alternatif...",enterImageUrl:"https://exemple.com/image.jpg",auto:"Auto",noAlt:"Pas de texte alternatif",cancel:"Annuler",save:"Enregistrer"},comment:{placeholder:"Ajouter un commentaire",send:"Envoyer",delete:"Supprimer le commentaire"},started_conversation:"A démarré la conversation",labels:{title:"Titre",description:"Description"},placeholders:{title:"Entrez le titre...",description:"Entrez la description...",startTyping:"Commencez à taper..."},footer:{word:"mot",words:"mots",character:"caractère",characters:"caractères"}},ya={chart:E9,table:S9,filter:V9,datepicker:N9,textEditor:B9},_9={contextMenu:{addMarker:"Markering toevoegen",clearAllMarkers:"Alle markeringen wissen",downloadSvg:"SVG downloaden",downloadPng:"PNG downloaden",downloadCsv:"CSV downloaden"},modalMarker:{editMarker:"Markering bewerken",viewMarker:"Markering bekijken",title:"Titel",description:"Beschrijving",iconType:"Pictogramtype",defaultIcon:"Standaard logo",iconPreview:"Pictogramvoorbeeld",deleteMarker:"Markering verwijderen",cancel:"Annuleren",close:"Sluiten",save:"Opslaan",placeholderTitle:"Voer markeringstitel in",placeholderDescription:"Voer markeringsbeschrijving 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"}},M9={firstPage:"Eerste pagina",previousPage:"Vorige pagina",nextPage:"Volgende pagina",lastPage:"Laatste pagina",currentPageAriaLabel:"Huidige pagina",rowsPerPage:"Rijen per pagina",searchPlaceholder:"Zoeken...",searchAriaLabel:"Zoeken",searchTableAriaLabel:"Zoeken in tabel",clearSearchAriaLabel:"Zoekopdracht wissen",downloadPdf:"PDF downloaden",downloadExcel:"Excel downloaden",columnVisibility:"Kolommen weer te geven",expandRowAriaLabel:"Rij uitklappen",collapseRowAriaLabel:"Rij inklappen",filterColumnAriaLabel:"Kolom filteren",clearFilter:"Wissen",search:"Zoeken...",filterFrom:"Van:",filterTo:"Tot:",dateFormat:"dd-mm-jjjj",showingRange:"{start}-{end} van {total} weergegeven",ofPages:"van {total}",emptyMessage:"Geen gegevens beschikbaar"},$9={searchAcrossFields:"Zoeken in alle velden...",openAdvancedFilter:"Geavanceerde filter openen",closeAdvancedFilter:"Geavanceerde filter sluiten",noConditionsApplied:"Er zijn geen filtervoorwaarden toegepast op deze weergave",where:"Waar",and:"En",searchAttributes:"Zoek attributen...",noMatch:"Geen overeenkomst",enterValue:"Voer waarde in...",min:"Min",max:"Max",search:"Zoeken...",addFilter:"Filter toevoegen",clearAllFilters:"Alle filters wissen",select:"Selecteren...",selectedCount:"{count} geselecteerd",operators:{contains:"bevat",not_contains:"bevat niet",equals:"is gelijk aan",not_equals:"is niet gelijk aan",starts_with:"begint met",ends_with:"eindigt op",is_empty:"is leeg",is_not_empty:"is niet leeg",is_any_of:"is een van",is_none_of:"is geen van",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"tussen",contains_any:"bevat een van",contains_all:"bevat alle",not_contains_any:"bevat niet",before:"voor",after:"na",is_true:"is waar",is_false:"is onwaar"}},D9={selectDate:"Selecteer datum",selectRange:"Selecteer bereik",selectFromList:"Selecteer een datum",noAvailableDates:"Geen datums beschikbaar",startDate:"Startdatum",endDate:"Einddatum",prevMonth:"Vorige maand",nextMonth:"Volgende maand",clear:"Datum wissen",comparison:{compareTo:"Vergelijken met",active:"Vergelijking",previousPeriod:"Vorige periode",previousYear:"Vorig jaar",custom:"Aangepast"},quickSelect:{today:"Vandaag",lastWeek:"Afgelopen week",last15Days:"Laatste 15 dagen",last30Days:"Laatste 30 dagen",thisMonth:"Deze maand",lastMonth:"Vorige maand",last3Months:"Laatste 3 maanden",last6Months:"Laatste 6 maanden",last12Months:"Laatste 12 maanden",lastYear:"Afgelopen jaar",allDates:"Alle datums",last2Dates:"Laatste 2 datums",last3Dates:"Laatste 3 datums",last4Dates:"Laatste 4 datums",last5Dates:"Laatste 5 datums",in7Days:"Over 7 dagen",in14Days:"Over 14 dagen",in30Days:"Over 30 dagen"}},L9={toolbar:{undo:"Ongedaan maken",redo:"Opnieuw",paragraphFormat:"Alineaopmaak",bold:"Vet",italic:"Cursief",underline:"Onderstreept",citation:"Citaat",insertLink:"Link invoegen",removeLink:"Link verwijderen",bulletList:"Lijst met opsommingstekens",numberList:"Genummerde lijst",image:"Afbeelding",comment:"Commentaar",askAi:"Vraag AI"},paragraph:{heading1:"Kop 1",heading2:"Kop 2",heading3:"Kop 3",heading4:"Kop 4",heading5:"Kop 5",heading6:"Kop 6",paragraph:"Alinea"},link:{editLink:"Link bewerken",altText:"Alt-tekst:",url:"URL:",enterAltText:"Voer alt-tekst in...",enterUrl:"Voer URL in...",cancel:"Annuleren",save:"Opslaan"},image:{addImage:"Afbeelding toevoegen",editImage:"Afbeelding bewerken",upload:"Uploaden",imageLink:"Afbeeldingslink",uploadImage:"Afbeelding uploaden:",imageUrl:"Afbeeldings-URL:",altText:"Alt-tekst:",width:"Breedte (px):",height:"Hoogte (px):",enterAltText:"Voer alt-tekst in...",enterImageUrl:"https://voorbeeld.com/afbeelding.jpg",auto:"Auto",noAlt:"Geen alt-tekst",cancel:"Annuleren",save:"Opslaan"},comment:{placeholder:"Voeg een opmerking toe",send:"Verzenden",delete:"Opmerking verwijderen"},started_conversation:"Gesprek gestart",labels:{title:"Titel",description:"Beschrijving"},placeholders:{title:"Voer titel in...",description:"Voer beschrijving in...",startTyping:"Begin met typen..."},footer:{word:"woord",words:"woorden",character:"teken",characters:"tekens"}},ka={chart:_9,table:M9,filter:$9,datepicker:D9,textEditor:L9},qa={en:ga,fr:ya,nl:ka};function Fo(B){if(!B||!B.global)return;const J=B.global.availableLocales||[];Object.keys(qa).forEach(N=>{J.includes(N)&&B.global.mergeLocaleMessage(N,qa[N])})}const Za={en:{textEditor:ga.textEditor},fr:{textEditor:ya.textEditor},nl:{textEditor:ka.textEditor}};function Io(B){if(!B||!B.global)return;const J=B.global.availableLocales||[];Object.keys(Za).forEach(N=>{J.includes(N)&&B.global.mergeLocaleMessage(N,Za[N])})}const Ua={en:{table:ga.table},fr:{table:ya.table},nl:{table:ka.table}};function zo(B){if(!B||!B.global)return;const J=B.global.availableLocales||[];Object.keys(Ua).forEach(N=>{J.includes(N)&&B.global.mergeLocaleMessage(N,Ua[N])})}const Ya={en:{datepicker:ga.datepicker},fr:{datepicker:ya.datepicker},nl:{datepicker:ka.datepicker}};function Po(B){if(!B||!B.global)return;const J=B.global.availableLocales||[];Object.keys(Ya).forEach(N=>{J.includes(N)&&B.global.mergeLocaleMessage(N,Ya[N])})}const Xa={en:{filter:ga.filter},fr:{filter:ya.filter},nl:{filter:ka.filter}};function Oo(B){if(!B||!B.global)return;const J=B.global.availableLocales||[];Object.keys(Xa).forEach(N=>{J.includes(N)&&B.global.mergeLocaleMessage(N,Xa[N])})}const T9={chart:qa,textEditor:Za,table:Ua,datepicker:Ya,filter:Xa};function A9(B){!B||!B.global||(Fo(B),Io(B),zo(B),Po(B),Oo(B))}const H9={en:{...ga},fr:{...ya},nl:{...ka}};ha.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:H9});exports.DSSChart=Fu;exports.DSSChartMessages=qa;exports.DSSColorPicker=Vp;exports.DSSConfetti=e0;exports.DSSDatepicker=go;exports.DSSDatepickerMessages=Ya;exports.DSSDnd=Qp;exports.DSSFilter=r9;exports.DSSFilterMessages=Xa;exports.DSSLoader=Ip;exports.DSSMessages=T9;exports.DSSModal=ho;exports.DSSPillField=h9;exports.DSSSkeleton=zp;exports.DSSStepBar=Ro;exports.DSSTable=s1;exports.DSSTableMessages=Ua;exports.DSSTextEditor=up;exports.DSSTextEditorMessages=Za;exports.DSSTitle=y9;exports.addDSSChartTranslations=Fo;exports.addDSSDatepickerTranslations=Po;exports.addDSSFilterTranslations=Oo;exports.addDSSTableTranslations=zo;exports.addDSSTextEditorTranslations=Io;exports.addDSSTranslations=A9;