dsp-semactic 0.6.48 → 0.6.49
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 +33 -33
- package/dist/index.es.js +6104 -6009
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Gn=require("vue-i18n"),ca={key:0,class:"dss-datepicker__input-wrap dss-datepicker__input-wrap--readonly"},ua=["value"],da=["placeholder","value","disabled"],ma=["placeholder","value"],pa={key:0,class:"dss-datepicker__double-wrap"},fa={key:0,class:"dss-datepicker__quick-select","aria-label":"Quick range"},va=["onClick"],ga={class:"dss-datepicker__double-calendars"},ha={class:"dss-datepicker__double-calendar"},ya={class:"dss-datepicker__calendar-header"},ka=["aria-label"],Ca={class:"dss-datepicker__month-year-row"},ba=["aria-label"],wa={class:"dss-datepicker__weekdays"},xa={class:"dss-datepicker__grid"},Ea=["disabled","onClick","onMouseenter"],Sa={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},Va={class:"dss-datepicker__double-calendar"},Na={class:"dss-datepicker__calendar-header"},Ba=["aria-label"],Ma={class:"dss-datepicker__month-year-row"},_a=["aria-label"],$a={class:"dss-datepicker__weekdays"},La={class:"dss-datepicker__grid"},Ta=["disabled","onClick","onMouseenter"],Aa={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},Da={class:"dss-datepicker__calendar-header"},Ha=["aria-label"],Ra={class:"dss-datepicker__month-year-row"},Ia=["aria-label"],Fa={class:"dss-datepicker__weekdays"},za={class:"dss-datepicker__grid"},Pa=["disabled","onClick","onMouseenter"],Oa={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},qa={class:"dss-datepicker__calendar-header"},Wa={class:"dss-datepicker__month-year-row"},Za={class:"dss-datepicker__month-year dss-datepicker__month-year--static"},Ua={class:"dss-datepicker__months-grid"},Xa=["onClick"],Ya={class:"dss-datepicker__calendar-header dss-datepicker__calendar-header--center"},ja={class:"dss-datepicker__month-year"},Ka={class:"dss-datepicker__years-grid"},Ga=["data-year","onClick"],Yo=27,Wo={__name:"DSSDatepicker",props:{mode:{type:String,default:"single",validator:$=>["single","range","singleFromAvailable","rangeFromAvailable","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},placeholder:{type:String,default:""}},emits:["update:modelValue"],setup($,{emit:J}){const B=$,_=J,{t:ie,locale:F}=Gn.useI18n(),A=e.ref(!1),X=e.ref("days"),Ke=new Date,ge=e.computed(()=>B.minDate instanceof Date?B.minDate:Ke),f=e.ref(ge.value.getMonth()),Ce=e.ref(ge.value.getFullYear()),ve=e.ref(ge.value.getMonth()),ee=e.ref(ge.value.getFullYear()),ne=e.ref(ge.value.getMonth()),pe=e.ref(ge.value.getFullYear()),H=e.ref("start"),ye=e.ref(null),Te=e.ref(null);function We(){const z=ge.value,Z=z.getMonth(),P=z.getFullYear(),ue=Z===11?0:Z+1,He=Z===11?P+1:P;return{left:{month:Z,year:P},right:{month:ue,year:He}}}const it=e.ref(null),I=e.ref(null),we=e.ref(null),_e=e.ref(null),ke=e.ref(null),ft=e.ref(null),yt=new Date().getFullYear(),de=e.computed(()=>["single","singleFromAvailable"].includes(B.mode)),kt=e.computed(()=>["range","rangeFromAvailable"].includes(B.mode)),Ze=e.computed(()=>{if(B.mode!=="single"&&B.mode!=="singleFromAvailable")return null;const z=B.modelValue;return z instanceof Date?z:null}),Pt=e.computed(()=>{if(!kt.value)return{start:null,end:null};const z=B.modelValue;return!z||typeof z!="object"?{start:null,end:null}:{start:z.start instanceof Date?z.start:null,end:z.end instanceof Date?z.end:null}});function st(z){if(!z||!(z instanceof Date))return"";const Z=z.getDate(),P=z.getMonth()+1,ue=z.getFullYear(),He=dt=>String(dt).padStart(2,"0");return`${He(Z)}/${He(P)}/${ue}`}const St=e.computed(()=>st(Ze.value)),At=e.computed(()=>{const{start:z,end:Z}=Pt.value;if(!z&&!Z)return"";const P=!Z||z&&z<=Z?z:Z,ue=!z||Z&&Z>=z?Z:z;return q(P,ue)?st(P):`${st(P)} - ${st(ue)}`}),Ut=e.computed(()=>{if(B.mode!=="readonly")return"—";const z=B.modelValue;if(z instanceof Date)return st(z)||"—";if(z&&typeof z=="object"&&("start"in z||"end"in z)){const Z=z.start instanceof Date?z.start:null,P=z.end instanceof Date?z.end:null;if(!Z&&!P)return"—";const ue=!P||Z&&Z<=P?Z:P,He=!Z||P&&P>=Z?P:Z;return q(ue,He)?st(ue):`${st(ue)} - ${st(He)}`}return"—"});e.computed(()=>{const z=new Date(Ce.value,f.value,1);return new Intl.DateTimeFormat(F.value,{month:"long",year:"numeric"}).format(z)});const Ft=e.computed(()=>Te.value==="left"?ve.value:Te.value==="right"?ne.value:f.value),j=e.computed(()=>Te.value==="left"?ee.value:Te.value==="right"?pe.value:Ce.value),ce=e.computed(()=>{const z=new Date(Ce.value,f.value,1);return new Intl.DateTimeFormat(F.value,{month:"long"}).format(z)}),Ie=e.computed(()=>{const z=new Date(j.value,Ft.value,1);return new Intl.DateTimeFormat(F.value,{month:"long"}).format(z)}),Xe=e.computed(()=>{const z=new Intl.DateTimeFormat(F.value,{month:"short"});return Array.from({length:12},(Z,P)=>z.format(new Date(2024,P,1)))}),Ot=e.computed(()=>{const Z=(Te.value?j.value:Ce.value)-Math.floor(Yo/2);return Array.from({length:Yo},(P,ue)=>Z+ue)}),Qe=e.computed(()=>{const z=Ot.value;return z.length?`${z[0]} – ${z[z.length-1]}`:""}),lt=e.computed(()=>{const z=new Intl.DateTimeFormat(F.value,{weekday:"short"}),Z=new Date(2024,0,1),P=[];for(let ue=0;ue<7;ue++){const He=new Date(Z);He.setDate(Z.getDate()+ue),P.push(z.format(He).slice(0,2))}return P});function Bt(z,Z){const P=new Date(z,Z,1),ue=new Date(z,Z+1,0),He=P.getDay(),dt=ue.getDate(),mt=[];for(let Je=0;Je<He;Je++)mt.push(null);for(let Je=1;Je<=dt;Je++)mt.push(new Date(z,Z,Je));return mt}const qt=e.computed(()=>Bt(Ce.value,f.value)),te=e.computed(()=>Bt(ee.value,ve.value)),Ae=e.computed(()=>Bt(pe.value,ne.value));e.computed(()=>{const z=new Date(ee.value,ve.value,1);return new Intl.DateTimeFormat(F.value,{month:"long",year:"numeric"}).format(z)}),e.computed(()=>{const z=new Date(pe.value,ne.value,1);return new Intl.DateTimeFormat(F.value,{month:"long",year:"numeric"}).format(z)});const Me=e.computed(()=>{const z=new Date(ee.value,ve.value,1);return new Intl.DateTimeFormat(F.value,{month:"long"}).format(z)}),je=e.computed(()=>{const z=new Date(pe.value,ne.value,1);return new Intl.DateTimeFormat(F.value,{month:"long"}).format(z)}),ct=e.computed(()=>B.availableDates&&B.availableDates.length>0),Ge=e.computed(()=>ct.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:"last3Months",labelKey:"datepicker.quickSelect.last3Months"},{id:"last6Months",labelKey:"datepicker.quickSelect.last6Months"},{id:"last12Months",labelKey:"datepicker.quickSelect.last12Months"},{id:"lastYear",labelKey:"datepicker.quickSelect.lastYear"}]),tt=e.ref({top:0,left:0});function vt(){if(!_e.value||!A.value)return;const z=_e.value.getBoundingClientRect(),Z=window.innerWidth||document.documentElement.clientWidth,P=window.innerHeight||document.documentElement.clientHeight;let ue=z.left,He=z.bottom+4;const dt=ke.value;if(dt){const mt=dt.offsetWidth,Je=dt.offsetHeight;if(ue+mt>Z-8&&(ue=z.right-mt,ue<8&&(ue=8)),He+Je>P-8){const xt=z.top-4-Je;xt>=8?He=xt:He=Math.max(8,P-Je-8)}}tt.value={top:He,left:ue}}const De=e.computed(()=>!_e.value||!A.value?{}:{position:"fixed",left:`${tt.value.left}px`,top:`${tt.value.top}px`,zIndex:1002});function q(z,Z){return!z||!Z?!1:z.getFullYear()===Z.getFullYear()&&z.getMonth()===Z.getMonth()&&z.getDate()===Z.getDate()}function U(z){return new Date(z.getFullYear(),z.getMonth(),z.getDate()).getTime()}function le(z){return!B.availableDates||!B.availableDates.length?!0:B.availableDates.some(Z=>Z instanceof Date&&q(Z,z))}function re(z){const Z=U(z);return!(B.minDate instanceof Date&&Z<U(B.minDate)||B.maxDate instanceof Date&&Z>U(B.maxDate))}function Fe(z){return!B.exceptDates||!B.exceptDates.length?!1:B.exceptDates.some(Z=>Z instanceof Date&&q(Z,z))}function ut(z){return Fe(z)?!1:["singleFromAvailable","rangeFromAvailable"].includes(B.mode)?le(z):re(z)}function Vt(z){const Z=Ze.value,P=Pt.value,ue=U(z),He=kt.value&&P.start&&P.end&&ue>U(P.start)&&ue<U(P.end),dt=kt.value&&P.start&&q(z,P.start),mt=kt.value&&P.end&&q(z,P.end),Je=dt&&mt,xt=de.value&&Z&&q(z,Z)||dt||mt;let Yt=!1;if(kt.value&&P.start&&!P.end&&ye.value){const kl=U(P.start),Zl=U(ye.value),Ml=Math.min(kl,Zl),Ul=Math.max(kl,Zl);Yt=ue>Ml&&ue<Ul}return{"dss-datepicker__day--selected":xt&&!Je,"dss-datepicker__day--range-start":dt&&!Je,"dss-datepicker__day--range-end":mt&&!Je,"dss-datepicker__day--range-single":Je,"dss-datepicker__day--in-range":He&&!dt&&!mt,"dss-datepicker__day--in-range-preview":Yt&&!dt&&!mt&&!He,"dss-datepicker__day--disabled":!ut(z)}}function ze(z){if(!kt.value)return;const Z=Pt.value;if(!Z.start||Z.end){ye.value=null;return}if(!ut(z)){ye.value=null;return}ye.value=new Date(z.getFullYear(),z.getMonth(),z.getDate())}function bt(){ye.value=null}function zt(){if(!B.doubleCalendar||!kt.value)return;const z=Pt.value,{start:Z,end:P}=z;if(Z&&P){const dt=Z<=P?Z:P,mt=Z<=P?P:Z,Je=dt.getMonth(),xt=dt.getFullYear(),Yt=mt.getMonth(),kl=mt.getFullYear();if(Je!==Yt||xt!==kl){const Zl=ve.value===Je&&ee.value===xt,Ml=ne.value===Yt&&pe.value===kl;if(Zl&&Ml)return;ve.value=Je,ee.value=xt,ne.value=Yt,pe.value=kl}else{const Zl=Je===0?11:Je-1,Ml=Je===0?xt-1:xt;ve.value===Zl&&ee.value===Ml&&ne.value===Je&&pe.value===xt||(ve.value=Je,ee.value=xt,Je===11?(ne.value=0,pe.value=xt+1):(ne.value=Je+1,pe.value=xt))}return}const ue=Z||P;if(ue){const dt=ue.getMonth(),mt=ue.getFullYear(),Je=ve.value===dt&&ee.value===mt,xt=ne.value===dt&&pe.value===mt;if(Je||xt)return;ve.value=dt,ee.value=mt,dt===11?(ne.value=0,pe.value=mt+1):(ne.value=dt+1,pe.value=mt);return}const He=We();ve.value=He.left.month,ee.value=He.left.year,ne.value=He.right.month,pe.value=He.right.year}function el(z="start"){if(B.mode==="readonly")return;H.value=z;const Z=Ze.value,P=Pt.value;if(de.value&&Z)f.value=Z.getMonth(),Ce.value=Z.getFullYear();else if(kt.value)if(B.doubleCalendar)zt();else{const ue=z==="start"&&P.start?P.start:P.end||P.start;ue&&(f.value=ue.getMonth(),Ce.value=ue.getFullYear())}_e.value=de.value?it.value?.closest(".dss-datepicker__input-wrap"):I.value,X.value="days",Te.value=null,A.value=!0,e.nextTick(()=>{vt()})}function Xt(){X.value="days",Te.value=null,ye.value=null,A.value=!1}function Rt(z,Z){Te.value=z,X.value=Z}function V(){X.value="days",Te.value=null}function w(z){const Z=new Date,P=Z.getFullYear(),ue=Z.getMonth(),He=Z.getDate();let dt,mt;if(ct.value){const Je=[...B.availableDates].filter(xt=>xt instanceof Date).map(xt=>new Date(xt.getFullYear(),xt.getMonth(),xt.getDate()));if(Je.sort((xt,Yt)=>xt.getTime()-Yt.getTime()),Je.length===0)return;if(z==="all")dt=Je[0],mt=Je[Je.length-1];else{const xt=parseInt(z.replace("last",""),10);if(xt<2||xt>5)return;const Yt=Je.slice(-xt);dt=Yt[0],mt=Yt[Yt.length-1]}}else{const Je=new Date(P,ue,He);switch(z){case"today":dt=Je,mt=Je;break;case"lastWeek":dt=new Date(P,ue,He-6),mt=Je;break;case"last15Days":dt=new Date(P,ue,He-14),mt=Je;break;case"last30Days":dt=new Date(P,ue,He-29),mt=Je;break;case"thisMonth":dt=new Date(P,ue,1),mt=Je;break;case"last3Months":dt=new Date(P,ue-3,1),mt=new Date(P,ue,0);break;case"last6Months":dt=new Date(P,ue-6,1),mt=new Date(P,ue,0);break;case"last12Months":dt=new Date(P,ue-12,1),mt=new Date(P,ue,0);break;case"lastYear":dt=new Date(P-1,0,1),mt=new Date(P-1,11,31);break;default:return}}_("update:modelValue",{start:dt,end:mt}),zt()}function S(z){Te.value==="left"?ve.value=z:Te.value==="right"?ne.value=z:f.value=z,V()}function K(z){Te.value==="left"?ee.value=z:Te.value==="right"?pe.value=z:Ce.value=z,V()}function Q(){f.value===0?(f.value=11,Ce.value--):f.value--}function Ye(){f.value===11?(f.value=0,Ce.value++):f.value++}function gt(){ve.value===0?(ve.value=11,ee.value--):ve.value--}function Ve(){ve.value===11?(ve.value=0,ee.value++):ve.value++}function Ne(){ne.value===0?(ne.value=11,pe.value--):ne.value--}function Dt(){ne.value===11?(ne.value=0,pe.value++):ne.value++}function Ht(z){if(!ut(z))return;const Z=new Date(z.getFullYear(),z.getMonth(),z.getDate());if(de.value){_("update:modelValue",Z),Xt();return}const P=Pt.value;if(!P.start&&!P.end){_("update:modelValue",{start:Z,end:null}),H.value="end";return}if(P.start&&P.end){_("update:modelValue",{start:Z,end:null}),H.value="end";return}if(H.value==="start"){let ue=Z,He=P.end;ue&&He&&ue>He&&([ue,He]=[He,ue]),_("update:modelValue",{start:ue||He,end:He||ue}),H.value="end"}else{let ue=P.start,He=Z;ue&&He&&He<ue&&([ue,He]=[He,ue]),_("update:modelValue",{start:ue||He,end:He||ue}),H.value="start"}}e.watch(Pt,()=>{B.doubleCalendar&&kt.value&&A.value&&zt()},{deep:!0});let nt=null,ot=null,Tt=null;function fl(){nt&&(document.removeEventListener("keydown",nt),nt=null),ot&&(window.removeEventListener("resize",ot),ot=null),Tt&&(window.removeEventListener("scroll",Tt,!0),Tt=null)}return e.watch(X,z=>{z==="years"&&e.nextTick(()=>{ft.value?.querySelector(`[data-year="${j.value}"]`)?.scrollIntoView({block:"center",behavior:"auto"})})}),e.watch(A,z=>{fl(),z&&(nt=Z=>{Z.key==="Escape"&&(X.value==="years"||X.value==="months"?V():Xt())},ot=()=>{vt()},Tt=()=>{vt()},document.addEventListener("keydown",nt),window.addEventListener("resize",ot),window.addEventListener("scroll",Tt,!0))}),e.onBeforeUnmount(()=>{fl()}),(z,Z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-datepicker",{"dss-datepicker--readonly":$.mode==="readonly"}])},[$.mode==="readonly"?(e.openBlock(),e.createElementBlock("div",ca,[Z[10]||(Z[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:Ut.value,readonly:"",disabled:"",tabindex:"-1"},null,8,ua)])):de.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-datepicker__input-wrap",onClick:Z[0]||(Z[0]=P=>el("start"))},[Z[11]||(Z[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:it,type:"text",class:"dss-datepicker__input",placeholder:B.placeholder||e.unref(ie)("datepicker.selectDate"),value:St.value,readonly:"",disabled:$.mode==="readonly"},null,8,da)])):kt.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-datepicker__input-wrap",ref_key:"inputRangeWrapRef",ref:I,onClick:Z[1]||(Z[1]=P=>el("start"))},[Z[12]||(Z[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:"inputRangeRef",ref:we,type:"text",class:"dss-datepicker__input",placeholder:B.placeholder||e.unref(ie)("datepicker.selectRange"),value:At.value,readonly:""},null,8,ma)],512)):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(Xt,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:ke,class:e.normalizeClass(["dss-datepicker__dropdown",{"dss-datepicker__dropdown--double":$.doubleCalendar&&kt.value&&X.value==="days","dss-datepicker__dropdown--quick-select":$.doubleCalendar&&kt.value&&X.value==="days"&&$.quickSelect}]),onClick:Z[9]||(Z[9]=e.withModifiers(()=>{},["stop"])),style:e.normalizeStyle(De.value)},[X.value==="days"&&$.doubleCalendar&&kt.value?(e.openBlock(),e.createElementBlock("div",pa,[$.quickSelect?(e.openBlock(),e.createElementBlock("nav",fa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ge.value,P=>(e.openBlock(),e.createElementBlock("button",{key:P.id,type:"button",class:"dss-datepicker__quick-select-btn",onClick:ue=>w(P.id)},e.toDisplayString(e.unref(ie)(P.labelKey)),9,va))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",ga,[e.createElementVNode("div",ha,[e.createElementVNode("div",ya,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ie)("datepicker.prevMonth"),onClick:gt}," ‹ ",8,ka),e.createElementVNode("div",Ca,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:Z[2]||(Z[2]=P=>Rt("left","months"))},e.toDisplayString(Me.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:Z[3]||(Z[3]=P=>Rt("left","years"))},e.toDisplayString(ee.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ie)("datepicker.nextMonth"),onClick:Ve}," › ",8,ba)]),e.createElementVNode("div",wa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,P=>(e.openBlock(),e.createElementBlock("span",{key:P,class:"dss-datepicker__weekday"},e.toDisplayString(P),1))),128))]),e.createElementVNode("div",xa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(P,ue)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"L-"+ue},[P?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",Vt(P)]),disabled:!ut(P),onClick:He=>Ht(P),onMouseenter:He=>ze(P),onMouseleave:bt},e.toDisplayString(P.getDate()),43,Ea)):(e.openBlock(),e.createElementBlock("span",Sa))],64))),128))])]),e.createElementVNode("div",Va,[e.createElementVNode("div",Na,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ie)("datepicker.prevMonth"),onClick:Ne}," ‹ ",8,Ba),e.createElementVNode("div",Ma,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:Z[4]||(Z[4]=P=>Rt("right","months"))},e.toDisplayString(je.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:Z[5]||(Z[5]=P=>Rt("right","years"))},e.toDisplayString(pe.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ie)("datepicker.nextMonth"),onClick:Dt}," › ",8,_a)]),e.createElementVNode("div",$a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,P=>(e.openBlock(),e.createElementBlock("span",{key:P,class:"dss-datepicker__weekday"},e.toDisplayString(P),1))),128))]),e.createElementVNode("div",La,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ae.value,(P,ue)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"R-"+ue},[P?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",Vt(P)]),disabled:!ut(P),onClick:He=>Ht(P),onMouseenter:He=>ze(P),onMouseleave:bt},e.toDisplayString(P.getDate()),43,Ta)):(e.openBlock(),e.createElementBlock("span",Aa))],64))),128))])])])])):X.value==="days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Da,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ie)("datepicker.prevMonth"),onClick:Q}," ‹ ",8,Ha),e.createElementVNode("div",Ra,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:Z[6]||(Z[6]=P=>X.value="months")},e.toDisplayString(ce.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:Z[7]||(Z[7]=P=>X.value="years")},e.toDisplayString(Ce.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ie)("datepicker.nextMonth"),onClick:Ye}," › ",8,Ia)]),e.createElementVNode("div",Fa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,P=>(e.openBlock(),e.createElementBlock("span",{key:P,class:"dss-datepicker__weekday"},e.toDisplayString(P),1))),128))]),e.createElementVNode("div",za,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qt.value,(P,ue)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ue},[P?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",Vt(P)]),disabled:!ut(P),onClick:He=>Ht(P),onMouseenter:He=>ze(P),onMouseleave:bt},e.toDisplayString(P.getDate()),43,Pa)):(e.openBlock(),e.createElementBlock("span",Oa))],64))),128))])],64)):X.value==="months"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",qa,[e.createElementVNode("div",Wa,[e.createElementVNode("span",Za,e.toDisplayString(Ie.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:Z[8]||(Z[8]=P=>X.value="years")},e.toDisplayString(j.value),1)])]),e.createElementVNode("div",Ua,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe.value,(P,ue)=>(e.openBlock(),e.createElementBlock("button",{key:ue,type:"button",class:e.normalizeClass(["dss-datepicker__month-cell",{"dss-datepicker__month-cell--selected":ue===Ft.value}]),onClick:He=>S(ue)},e.toDisplayString(P),11,Xa))),128))])],64)):X.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",Ya,[e.createElementVNode("span",ja,e.toDisplayString(Qe.value),1)]),e.createElementVNode("div",{class:"dss-datepicker__years-wrap",ref_key:"yearsWrapRef",ref:ft},[e.createElementVNode("div",Ka,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ot.value,P=>(e.openBlock(),e.createElementBlock("button",{key:P,type:"button",class:e.normalizeClass(["dss-datepicker__year-cell",{"dss-datepicker__year-cell--selected":P===j.value,"dss-datepicker__year-cell--current":P===e.unref(yt)}]),"data-year":P,onClick:ue=>K(P)},e.toDisplayString(P),11,Ga))),128))])],512)],64)):e.createCommentVNode("",!0)],6)])):e.createCommentVNode("",!0)]))],2))}},Qa=["data-chart-type"],Ja={class:"dss-chart-header-titles"},es={key:0,class:"dss-chart-title"},ts={key:1,class:"dss-chart-subtitle"},ls=["onClick","onMouseenter"],ns={class:"dss-legend-text"},os=["onClick","onMouseenter"],as={class:"dss-legend-text"},ss=["title"],rs=["src"],is={class:"dss-chart-area-wrapper"},cs={key:0,class:"dss-chart-z-axis-label"},us=["width","height","data-smooth","data-animated"],ds=["id"],ms=["y","width","height"],ps=["id"],fs=["d"],vs=["id"],gs=["d"],hs={key:0},ys=["clip-path"],ks=["x1","x2","y1","y2"],Cs={class:"dss-axes"},bs=["x1","x2","y1","y2"],ws=["x1","x2","y1","y2"],xs={class:"dss-axis-labels"},Es=["x","y"],Ss=["x","y"],Vs=["x","y"],Ns=["y","transform"],Bs={key:1,class:"dss-flag-markers"},Ms=["clip-path"],_s=["x1","x2","y1","y2","onMouseover"],$s=["x1","x2","y1","y2","onMouseover"],Ls=["x1","x2","y1","y2","onMouseover"],Ts=["cx","cy","onMouseover"],As=["cx","cy","fill","onMouseover"],Ds=["x","y"],Hs=["clip-path"],Rs={key:0},Is=["d","onMouseover"],Fs=["x","y","width","height","fill","onMouseover"],zs={class:"dss-line-chart"},Ps=["d","stroke","stroke-width"],Os=["d","stroke","stroke-width","opacity"],qs=["cx","cy","r","fill","onMouseover"],Ws={key:1},Zs=["d","stroke","stroke-width"],Us=["d","stroke","stroke-width"],Xs=["d","stroke","stroke-width","opacity"],Ys=["cx","cy","r","fill","onMouseover"],js={key:2},Ks=["id"],Gs=["x","y","width","height"],Qs=["d","fill","fill-opacity","mask"],Js=["d","stroke","stroke-width"],er=["d","fill","onMouseover"],tr=["x","y","width","height","onMouseover"],lr=["clip-path"],nr=["x1","x2","y1","y2","stroke"],or=["cx","cy","r","fill"],ar={key:1,class:"dss-bubble-chart"},sr={key:0,class:"dss-bubble-group"},rr=["cx","cy","r","fill","fill-opacity","stroke","onMouseenter","onMouseleave","onClick"],ir=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],cr=["transform"],ur=["cx","cy","r"],dr=["data-chart-type","clip-path"],mr=["d","fill","fill-opacity","stroke","stroke-width","clip-path","onMouseover"],pr={key:1,class:"dss-radial-segment-data-labels"},fr=["x","y"],vr=["x","y","font-size","fill"],gr=["x1","y1","x2","y2","stroke"],hr=["x1","y1","x2","y2","stroke"],yr=["x","y","text-anchor","font-size"],kr=["transform"],Cr={key:0,class:"dss-spider-grid"},br=["cx","cy","r"],wr={class:"dss-spider-grid-labels"},xr=["x","y"],Er=["x","y"],Sr=["x1","x2","y1","y2"],Vr={class:"dss-spider-labels"},Nr=["x","y","text-anchor","dominant-baseline"],Br=["points","fill","fill-opacity","stroke","stroke-width"],Mr=["cx","cy","r","fill","onMouseover"],_r={class:"dss-chart-logos"},$r=["cx","cy","r","fill"],Lr=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],Tr=["onClick","onMouseenter"],Ar=["src"],Dr={class:"dss-marker-tooltip-category"},Hr={key:0,class:"dss-marker-tooltip-description"},Rr={key:0,class:"dss-tooltip-section dss-spider-tooltip-section"},Ir={class:"dss-tooltip-title dss-spider-tooltip-area-title"},Fr={class:"dss-tooltip-series-name"},zr={class:"dss-tooltip-series-value"},Pr={key:1,class:"dss-tooltip-section"},Or={key:0,class:"dss-tooltip-title"},qr={class:"dss-bubble-tooltip-data"},Wr={key:2,class:"dss-tooltip-section"},Zr={class:"dss-tooltip-title"},Ur={class:"dss-tooltip-value"},Xr={key:0,class:"dss-tooltip-section"},Yr={class:"dss-tooltip-section-title"},jr={class:"dss-tooltip-group-header"},Kr={class:"dss-tooltip-item-content"},Gr={class:"dss-tooltip-item-text"},Qr={key:1,class:"dss-tooltip-section"},Jr={class:"dss-tooltip-section-title"},ei={class:"dss-tooltip-item-content"},ti={class:"dss-tooltip-item-title"},li={key:0,class:"dss-tooltip-item-description"},ni={class:"dss-tooltip-section"},oi={class:"dss-tooltip-title"},ai={key:0,class:"dss-bubble-tooltip-data"},si={class:"dss-tooltip-series-name"},ri={class:"dss-tooltip-series-value"},ii={key:0,class:"dss-tooltip-section"},ci={class:"dss-tooltip-section-title"},ui={class:"dss-tooltip-group-header"},di={class:"dss-tooltip-item-content"},mi={class:"dss-tooltip-item-text"},pi={key:1,class:"dss-tooltip-section"},fi={class:"dss-tooltip-section-title"},vi={class:"dss-tooltip-item-content"},gi={class:"dss-tooltip-item-title"},hi={key:0,class:"dss-tooltip-item-description"},yi=["onClick","onMouseenter"],ki={class:"dss-legend-text"},Ci={key:1,class:"dss-context-menu-separator"},bi={key:0,class:"dss-context-menu-separator"},wi={key:0,class:"dss-context-menu-separator"},xi=["onClick"],Ei=["innerHTML"],Si={key:0,class:"dss-context-menu-icon"},Vi={class:"dss-marker-modal-header"},Ni={class:"dss-marker-modal-body"},Bi={class:"dss-form-group"},Mi={class:"dss-form-group"},_i={for:"dss-marker-description"},$i={key:0,class:"dss-form-text-display"},Li=["placeholder"],Ti={class:"dss-marker-modal-footer"},Ai={class:"modal-footer-left"},Di={class:"dss-modal-footer-right"},Hi=["disabled"],Ri={name:"DSSChart"},Ii=Object.assign(Ri,{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:B,locale:_}=Gn.useI18n(),ie=J,F=e.ref(null),A=e.ref(null),X=e.ref(null),Ke=e.ref(0),ge=e.ref(0);let f=null,Ce=null;const ve=20,ee=e.computed(()=>{if(ge.value,Ke.value,!F.value||!A.value)return 0;try{const t=F.value.getBoundingClientRect();return A.value.getBoundingClientRect().top-t.top}catch{return 0}}),ne=e.computed(()=>`chart-clip-${H.chartId}`),pe=e.computed(()=>`url(#${ne.value})`),H=$,ye={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},markers:{show:!0,icon:null,iconSize:25,customIcons:{}},fill:{area:{opacity:.3},spider:{opacity:.15}},crosshair:{show:!1,color:"#666"},bubbles:{size:4,tooltip:{fields:["x","y","size"],labels:{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},formatters:{}}},spider:{gridLabels:null,gridSteps:5},zoom:{enabled:!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 Te(t,s){const l=Object.assign({},t);return it(t)&&it(s)&&Object.keys(s).forEach(i=>{it(s[i])?i in t?l[i]=Te(t[i],s[i]):Object.assign(l,{[i]:s[i]}):Object.assign(l,{[i]:s[i]})}),l}const We=()=>{let t=20,s=0,l=0;if(st.value&&(t+=30),St.value&&(t+=25),Qe.value&&H.series.length>0){const i=H.series.filter((p,g)=>!Wt.value.has(g)).length;if(lt.value==="top"||lt.value==="bottom"){if(Bt.value==="horizontal"){const g=Math.floor(ke.value/100);s=Math.ceil(i/g)*25+10}else s=i*25+10;t+=s}else l=150}return{height:t,legendHeight:s,legendWidth:l}};function it(t){return t&&typeof t=="object"&&!Array.isArray(t)}const I=e.computed(()=>Te(ye,H.options)),we=e.computed(()=>{const t=I.value;return t&&t.chart&&t.chart.width==="auto"}),_e=e.computed(()=>{const t=I.value;return t&&t.chart&&t.chart.height==="auto"}),ke=e.computed(()=>{const t=I.value;return we.value?Ke.value||800:t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),ft=e.ref(ve),yt=e.computed(()=>{if(_e.value){const t=yt.value;return t??Math.max(0,(ge.value||400)-ft.value*5)}}),de=e.computed(()=>{const t=I.value;if(Ze.value==="mini-radial")return ke.value;if(_e.value){const s=yt.value;return s??Math.max(0,(ge.value||400)-ft.value)}return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),kt=e.computed(()=>{if(_e.value&&Ze.value==="semi-radial"&&yt.value!=null)return ft.value+de.value+"px";if(_e.value)return"100%";if(vl.value)return ft.value+de.value+"px";if(Qe.value&<.value==="bottom"){const t=We();return de.value+(t.legendHeight||35)+"px"}return de.value+(Qe.value?20:0)+"px"}),Ze=e.computed(()=>{const t=I.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),Pt=e.computed(()=>{const t=H.series.map(s=>s.type||Ze.value);return new Set(t).size>1}),st=e.computed(()=>{const t=I.value;return t&&t.title&&t.title.text?t.title.text:""}),St=e.computed(()=>{const t=I.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),At=e.computed(()=>{const t=I.value;if(!t||!t.zAxis)return"";const s=t.zAxis;return typeof s=="string"?s:s&&typeof s.label=="string"?s.label:""}),Ut=e.computed(()=>{const t=I.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),Ft=e.computed(()=>{const t=I.value;return t&&t.yAxis&&t.yAxis.title&&t.yAxis.title.text?t.yAxis.title.text:""}),j=e.computed(()=>{const t=I.value;if(!t||!t.yAxis)return sn;const s=t.yAxis.min;return typeof s=="number"||s===sn?s:sn}),ce=e.computed(()=>{const t=I.value;if(!t||!t.yAxis)return sn;const s=t.yAxis.max;return typeof s=="number"||s===sn?s:sn}),Ie=e.computed(()=>{const t=I.value;return!t||!t.xAxis?null:typeof t.xAxis.min=="number"?t.xAxis.min:null}),Xe=e.computed(()=>{const t=I.value;return!t||!t.xAxis?null:typeof t.xAxis.max=="number"?t.xAxis.max:null}),Ot=e.computed(()=>{const t=I.value;return t&&t.grid&&t.grid.show!==!1}),Qe=e.computed(()=>{const t=I.value;return t&&t.legend&&t.legend.show!==!1}),lt=e.computed(()=>{const t=I.value;return t&&t.legend&&t.legend.position?t.legend.position:"top"}),Bt=e.computed(()=>{const t=I.value;return t&&t.legend&&t.legend.orientation?t.legend.orientation:"horizontal"}),qt=e.computed(()=>{const t=I.value;return!t||!t.tooltip?!0:t.tooltip.enabled!==!1}),te=e.computed(()=>{const t=I.value;if(!t||!t.crosshair)return!1;const s=t.crosshair.show;return s===!0||s==="true"}),Ae=e.computed(()=>{const t=I.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),Me=e.computed(()=>{const t=I.value;return!t||!t.zoom?!1:t.zoom.enabled===!0}),je=e.computed(()=>{const t=I.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),ct=e.computed(()=>{const t=I.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),Ge=e.computed(()=>{const t=I.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),tt=e.computed(()=>{if(!vl.value)return 0;const t=I.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:0}),vt=e.computed(()=>{const t=I.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),De=e.computed(()=>{const{maxX:t}=Qt.value;return t===0}),q=(t,s)=>De.value&&s===0?5:s,U=t=>{const s=Number(t);return!Number.isFinite(s)||s<=0?0:s},le=e.computed(()=>{const t=I.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),re=e.computed(()=>{const t=I.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),Fe=e.computed(()=>{const t=I.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),ut=e.computed(()=>{const t=I.value;return re.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),Vt=e.computed(()=>{const t=I.value,s=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return s.length>0?s:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),ze=e.computed(()=>{const t=I.value;return t&&t.animations&&t.animations.enabled!==!1}),bt=e.computed(()=>{const t=I.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),zt=e.computed(()=>{const t=I.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),el=e.computed(()=>{const t=I.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),Xt=e.computed(()=>{const t=I.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),Rt=e.computed(()=>{const t=I.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),V=e.computed(()=>{const t=I.value;return t&&t.animations&&t.animations.onDataChange!==!1}),w=e.computed(()=>{const t=I.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),S=e.computed(()=>{const t=I.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),K=e.computed(()=>I.value?.spider?.gridSteps||5),Q=e.computed(()=>{const t=[],s=K.value;for(let l=1;l<=s;l++)t.push(Et.value/s*l);return t}),Ye=t=>{const s=gt.value;if(s&&Array.isArray(s)&&s[t]!==void 0)return s[t].toString();const l=Q.value[t];return Math.round(l/Et.value*100)+"%"},gt=e.computed(()=>I.value?.spider?.gridLabels||null),Ve=e.computed(()=>{const t=I.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0}),Ne=e.computed(()=>{const t=I.value,s={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...s,...t.contextMenu.items}:s}),Dt=e.computed(()=>{const t=I.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),Ht=e.computed(()=>{const t=I.value;return t&&t.markers&&t.markers.icon?t.markers.icon:Zl.value}),nt=e.computed(()=>{const t=I.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),ot=e.computed(()=>{const t=I.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),Tt=e.computed(()=>{const s=I.value?.valueFormat?.extension;return typeof s=="string"?s:""}),fl=t=>{const s=Tt.value;if(t==null)return"";const l=String(t);return s?l+s:l},z=e.computed(()=>!ae.value.isZooming);e.computed(()=>at.value.map(t=>{if(t.categoryIndex!==void 0&&(xl.value||al.value)){const s=sl(t.categoryIndex),l=ee.value+O.value.bottom-ot.value/2;return{...t,x:s,y:l}}return t}));function Z(t,s){let l;if(t instanceof Date)l=new Date(t.getFullYear(),t.getMonth(),t.getDate());else if(typeof t=="string"){const[g,b,C]=t.split("-"),D=Number(C?.length===2?`20${C}`:C);l=new Date(D,Number(b)-1,Number(g))}else return 0;let i=0,p=1/0;return s.forEach((g,b)=>{const[C,D,L]=g.split("-"),R=Number(L?.length===2?`20${L}`:L),N=new Date(R,Number(D)-1,Number(C)),G=Math.abs(N-l);G<p&&(p=G,i=b)}),i}const P=e.computed(()=>{const t=H.markers.map(l=>{const i=Z(l.marker_date,H.categories),p=sl(i),g=ee.value+O.value.bottom-ot.value/2;return{...l,x:p,y:g,categoryIndex:i,source:"props"}}),s=at.value.map(l=>{if(l.categoryIndex!==void 0&&(xl.value||al.value)){const i=sl(l.categoryIndex),p=ee.value+O.value.bottom-ot.value/2;return{...l,x:i,y:p,source:"internal"}}return{...l,source:"internal"}});return[...t,...s]}),ue=e.computed(()=>{const t=I.value;return t&&t.watermark&&t.watermark.enabled===!0}),He=e.computed(()=>{const t=I.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),dt=e.computed(()=>{const t=I.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:35}),mt=e.computed(()=>{const t=I.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),Je=e.computed(()=>{const t={left:O.value.left,top:O.value.top,width:O.value.width,height:O.value.height};let s,l;const i=String(dt.value);if(i.includes("%")){const p=parseFloat(i)/100;s=t.width*p,l=s*(96/499)}else{const p=parseFloat(i)||25;s=Math.min(t.width*.25,200)*(p/25),l=s*(96/499)}return{width:s,height:l,area:t}}),xt=e.computed(()=>{const{width:t,height:s}=Je.value,l=mt.value;let i,p;const g=O.value.left,b=O.value.right,C=O.value.top,D=O.value.bottom,L=O.value.width,R=O.value.height;switch(l){case"center":i=g+(L-t)/2,p=C+(R-s)/2;break;case"top-left":i=g+15,p=C+5;break;case"top-right":i=b-t-15,p=C+5;break;case"bottom-left":i=g+15,p=D-s-5;break;case"bottom-right":default:i=b-t-15,p=D-s-5;break}return{backgroundPositionX:i+"px",backgroundPositionY:p+"px",backgroundSize:`${t}px ${s}px`}}),Yt=t=>!H.flags||!H.flags.length?[]:H.flags.filter(s=>s.categoryIndex===t),kl=t=>{const s=Yt(t),l=Hn(t),i=s.filter(b=>b.manual),p=s.filter(b=>!b.manual),g=[];return i.length>0&&g.push({type:B("chart.tooltip.manualFlags"),color:"#698dbe",flags:i.map(b=>({text:b.text,color:"#698dbe"}))}),p.length>0&&g.push({type:B("chart.tooltip.autoFlags"),color:"#a1d499",flags:p.map(b=>({text:b.text,color:"#a1d499"}))}),{flagGroups:g,markers:l.map(b=>({title:b.title,description:b.description,type:B("chart.tooltip.markers"),color:b.color||"#9784ba"}))}},Zl=e.computed(()=>{const t=H.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"),Gl=require("vue-i18n"),xa={key:0,class:"dss-datepicker__input-wrap dss-datepicker__input-wrap--readonly"},Ea=["value"],Sa=["placeholder","value","disabled"],Va=["placeholder","value"],Na={key:0,class:"dss-datepicker__double-wrap"},Ba={key:0,class:"dss-datepicker__quick-select","aria-label":"Quick range"},Ma=["onClick"],_a={class:"dss-datepicker__double-calendars"},$a={class:"dss-datepicker__double-calendar"},La={class:"dss-datepicker__calendar-header"},Ta=["aria-label"],Aa={class:"dss-datepicker__month-year-row"},Da=["aria-label"],Ha={class:"dss-datepicker__weekdays"},Ra={class:"dss-datepicker__grid"},Fa=["disabled","onClick","onMouseenter"],Ia={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},za={class:"dss-datepicker__double-calendar"},Pa={class:"dss-datepicker__calendar-header"},Oa=["aria-label"],qa={class:"dss-datepicker__month-year-row"},Wa=["aria-label"],Za={class:"dss-datepicker__weekdays"},Ua={class:"dss-datepicker__grid"},Xa=["disabled","onClick","onMouseenter"],Ya={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},ja={class:"dss-datepicker__calendar-header"},Ka=["aria-label"],Ga={class:"dss-datepicker__month-year-row"},Qa=["aria-label"],Ja={class:"dss-datepicker__weekdays"},es={class:"dss-datepicker__grid"},ts=["disabled","onClick","onMouseenter"],ns={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},ls={class:"dss-datepicker__calendar-header"},os={class:"dss-datepicker__month-year-row"},as={class:"dss-datepicker__month-year dss-datepicker__month-year--static"},ss={class:"dss-datepicker__months-grid"},rs=["onClick"],is={class:"dss-datepicker__calendar-header dss-datepicker__calendar-header--center"},cs={class:"dss-datepicker__month-year"},us={class:"dss-datepicker__years-grid"},ds=["data-year","onClick"],sa=27,Jo={__name:"DSSDatepicker",props:{mode:{type:String,default:"single",validator:T=>["single","range","singleFromAvailable","rangeFromAvailable","readonly"].includes(T)},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},placeholder:{type:String,default:""}},emits:["update:modelValue"],setup(T,{emit:te}){const M=T,L=te,{t:ce,locale:z}=Gl.useI18n(),A=e.ref(!1),U=e.ref("days"),Ke=new Date,he=e.computed(()=>M.minDate instanceof Date?M.minDate:Ke),f=e.ref(he.value.getMonth()),we=e.ref(he.value.getFullYear()),ge=e.ref(he.value.getMonth()),ne=e.ref(he.value.getFullYear()),ae=e.ref(he.value.getMonth()),ve=e.ref(he.value.getFullYear()),H=e.ref("start"),Ce=e.ref(null),Ae=e.ref(null);function qe(){const O=he.value,W=O.getMonth(),q=O.getFullYear(),se=W===11?0:W+1,Ie=W===11?q+1:q;return{left:{month:W,year:q},right:{month:se,year:Ie}}}const it=e.ref(null),R=e.ref(null),xe=e.ref(null),Be=e.ref(null),ke=e.ref(null),dt=e.ref(null),ft=new Date().getFullYear(),de=e.computed(()=>["single","singleFromAvailable"].includes(M.mode)),vt=e.computed(()=>["range","rangeFromAvailable"].includes(M.mode)),We=e.computed(()=>{if(M.mode!=="single"&&M.mode!=="singleFromAvailable")return null;const O=M.modelValue;return O instanceof Date?O:null}),Pt=e.computed(()=>{if(!vt.value)return{start:null,end:null};const O=M.modelValue;return!O||typeof O!="object"?{start:null,end:null}:{start:O.start instanceof Date?O.start:null,end:O.end instanceof Date?O.end:null}});function rt(O){if(!O||!(O instanceof Date))return"";const W=O.getDate(),q=O.getMonth()+1,se=O.getFullYear(),Ie=ct=>String(ct).padStart(2,"0");return`${Ie(W)}/${Ie(q)}/${se}`}const Et=e.computed(()=>rt(We.value)),Tt=e.computed(()=>{const{start:O,end:W}=Pt.value;if(!O&&!W)return"";const q=!W||O&&O<=W?O:W,se=!O||W&&W>=O?W:O;return P(q,se)?rt(q):`${rt(q)} - ${rt(se)}`}),Wt=e.computed(()=>{if(M.mode!=="readonly")return"—";const O=M.modelValue;if(O instanceof Date)return rt(O)||"—";if(O&&typeof O=="object"&&("start"in O||"end"in O)){const W=O.start instanceof Date?O.start:null,q=O.end instanceof Date?O.end:null;if(!W&&!q)return"—";const se=!q||W&&W<=q?W:q,Ie=!W||q&&q>=W?q:W;return P(se,Ie)?rt(se):`${rt(se)} - ${rt(Ie)}`}return"—"});e.computed(()=>{const O=new Date(we.value,f.value,1);return new Intl.DateTimeFormat(z.value,{month:"long",year:"numeric"}).format(O)});const Ft=e.computed(()=>Ae.value==="left"?ge.value:Ae.value==="right"?ae.value:f.value),G=e.computed(()=>Ae.value==="left"?ne.value:Ae.value==="right"?ve.value:we.value),ue=e.computed(()=>{const O=new Date(we.value,f.value,1);return new Intl.DateTimeFormat(z.value,{month:"long"}).format(O)}),He=e.computed(()=>{const O=new Date(G.value,Ft.value,1);return new Intl.DateTimeFormat(z.value,{month:"long"}).format(O)}),Xe=e.computed(()=>{const O=new Intl.DateTimeFormat(z.value,{month:"short"});return Array.from({length:12},(W,q)=>O.format(new Date(2024,q,1)))}),Zt=e.computed(()=>{const W=(Ae.value?G.value:we.value)-Math.floor(sa/2);return Array.from({length:sa},(q,se)=>W+se)}),kt=e.computed(()=>{const O=Zt.value;return O.length?`${O[0]} – ${O[O.length-1]}`:""}),xt=e.computed(()=>{const O=new Intl.DateTimeFormat(z.value,{weekday:"short"}),W=new Date(2024,0,1),q=[];for(let se=0;se<7;se++){const Ie=new Date(W);Ie.setDate(W.getDate()+se),q.push(O.format(Ie).slice(0,2))}return q});function Mt(O,W){const q=new Date(O,W,1),se=new Date(O,W+1,0),Ie=q.getDay(),ct=se.getDate(),pt=[];for(let Qe=0;Qe<Ie;Qe++)pt.push(null);for(let Qe=1;Qe<=ct;Qe++)pt.push(new Date(O,W,Qe));return pt}const Ut=e.computed(()=>Mt(we.value,f.value)),Q=e.computed(()=>Mt(ne.value,ge.value)),be=e.computed(()=>Mt(ve.value,ae.value));e.computed(()=>{const O=new Date(ne.value,ge.value,1);return new Intl.DateTimeFormat(z.value,{month:"long",year:"numeric"}).format(O)}),e.computed(()=>{const O=new Date(ve.value,ae.value,1);return new Intl.DateTimeFormat(z.value,{month:"long",year:"numeric"}).format(O)});const Me=e.computed(()=>{const O=new Date(ne.value,ge.value,1);return new Intl.DateTimeFormat(z.value,{month:"long"}).format(O)}),Ze=e.computed(()=>{const O=new Date(ve.value,ae.value,1);return new Intl.DateTimeFormat(z.value,{month:"long"}).format(O)}),et=e.computed(()=>M.availableDates&&M.availableDates.length>0),mt=e.computed(()=>et.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:"last3Months",labelKey:"datepicker.quickSelect.last3Months"},{id:"last6Months",labelKey:"datepicker.quickSelect.last6Months"},{id:"last12Months",labelKey:"datepicker.quickSelect.last12Months"},{id:"lastYear",labelKey:"datepicker.quickSelect.lastYear"}]),je=e.ref({top:0,left:0});function _t(){if(!Be.value||!A.value)return;const O=Be.value.getBoundingClientRect(),W=window.innerWidth||document.documentElement.clientWidth,q=window.innerHeight||document.documentElement.clientHeight;let se=O.left,Ie=O.bottom+4;const ct=ke.value;if(ct){const pt=ct.offsetWidth,Qe=ct.offsetHeight;if(se+pt>W-8&&(se=O.right-pt,se<8&&(se=8)),Ie+Qe>q-8){const Ct=O.top-4-Qe;Ct>=8?Ie=Ct:Ie=Math.max(8,q-Qe-8)}}je.value={top:Ie,left:se}}const Re=e.computed(()=>!Be.value||!A.value?{}:{position:"fixed",left:`${je.value.left}px`,top:`${je.value.top}px`,zIndex:1002});function P(O,W){return!O||!W?!1:O.getFullYear()===W.getFullYear()&&O.getMonth()===W.getMonth()&&O.getDate()===W.getDate()}function X(O){return new Date(O.getFullYear(),O.getMonth(),O.getDate()).getTime()}function j(O){return!M.availableDates||!M.availableDates.length?!0:M.availableDates.some(W=>W instanceof Date&&P(W,O))}function me(O){const W=X(O);return!(M.minDate instanceof Date&&W<X(M.minDate)||M.maxDate instanceof Date&&W>X(M.maxDate))}function ze(O){return!M.exceptDates||!M.exceptDates.length?!1:M.exceptDates.some(W=>W instanceof Date&&P(W,O))}function nt(O){return ze(O)?!1:["singleFromAvailable","rangeFromAvailable"].includes(M.mode)?j(O):me(O)}function St(O){const W=We.value,q=Pt.value,se=X(O),Ie=vt.value&&q.start&&q.end&&se>X(q.start)&&se<X(q.end),ct=vt.value&&q.start&&P(O,q.start),pt=vt.value&&q.end&&P(O,q.end),Qe=ct&&pt,Ct=de.value&&W&&P(O,W)||ct||pt;let Xt=!1;if(vt.value&&q.start&&!q.end&&Ce.value){const An=X(q.start),Dn=X(Ce.value),Hn=Math.min(An,Dn),sl=Math.max(An,Dn);Xt=se>Hn&&se<sl}return{"dss-datepicker__day--selected":Ct&&!Qe,"dss-datepicker__day--range-start":ct&&!Qe,"dss-datepicker__day--range-end":pt&&!Qe,"dss-datepicker__day--range-single":Qe,"dss-datepicker__day--in-range":Ie&&!ct&&!pt,"dss-datepicker__day--in-range-preview":Xt&&!ct&&!pt&&!Ie,"dss-datepicker__day--disabled":!nt(O)}}function Pe(O){if(!vt.value)return;const W=Pt.value;if(!W.start||W.end){Ce.value=null;return}if(!nt(O)){Ce.value=null;return}Ce.value=new Date(O.getFullYear(),O.getMonth(),O.getDate())}function gt(){Ce.value=null}function Ot(){if(!M.doubleCalendar||!vt.value)return;const O=Pt.value,{start:W,end:q}=O;if(W&&q){const ct=W<=q?W:q,pt=W<=q?q:W,Qe=ct.getMonth(),Ct=ct.getFullYear(),Xt=pt.getMonth(),An=pt.getFullYear();if(Qe!==Xt||Ct!==An){const Dn=ge.value===Qe&&ne.value===Ct,Hn=ae.value===Xt&&ve.value===An;if(Dn&&Hn)return;ge.value=Qe,ne.value=Ct,ae.value=Xt,ve.value=An}else{const Dn=Qe===0?11:Qe-1,Hn=Qe===0?Ct-1:Ct;ge.value===Dn&&ne.value===Hn&&ae.value===Qe&&ve.value===Ct||(ge.value=Qe,ne.value=Ct,Qe===11?(ae.value=0,ve.value=Ct+1):(ae.value=Qe+1,ve.value=Ct))}return}const se=W||q;if(se){const ct=se.getMonth(),pt=se.getFullYear(),Qe=ge.value===ct&&ne.value===pt,Ct=ae.value===ct&&ve.value===pt;if(Qe||Ct)return;ge.value=ct,ne.value=pt,ct===11?(ae.value=0,ve.value=pt+1):(ae.value=ct+1,ve.value=pt);return}const Ie=qe();ge.value=Ie.left.month,ne.value=Ie.left.year,ae.value=Ie.right.month,ve.value=Ie.right.year}function an(O="start"){if(M.mode==="readonly")return;H.value=O;const W=We.value,q=Pt.value;if(de.value&&W)f.value=W.getMonth(),we.value=W.getFullYear();else if(vt.value)if(M.doubleCalendar)Ot();else{const se=O==="start"&&q.start?q.start:q.end||q.start;se&&(f.value=se.getMonth(),we.value=se.getFullYear())}Be.value=de.value?it.value?.closest(".dss-datepicker__input-wrap"):R.value,U.value="days",Ae.value=null,A.value=!0,e.nextTick(()=>{_t()})}function $t(){U.value="days",Ae.value=null,Ce.value=null,A.value=!1}function sn(O,W){Ae.value=O,U.value=W}function V(){U.value="days",Ae.value=null}function w(O){const W=new Date,q=W.getFullYear(),se=W.getMonth(),Ie=W.getDate();let ct,pt;if(et.value){const Qe=[...M.availableDates].filter(Ct=>Ct instanceof Date).map(Ct=>new Date(Ct.getFullYear(),Ct.getMonth(),Ct.getDate()));if(Qe.sort((Ct,Xt)=>Ct.getTime()-Xt.getTime()),Qe.length===0)return;if(O==="all")ct=Qe[0],pt=Qe[Qe.length-1];else{const Ct=parseInt(O.replace("last",""),10);if(Ct<2||Ct>5)return;const Xt=Qe.slice(-Ct);ct=Xt[0],pt=Xt[Xt.length-1]}}else{const Qe=new Date(q,se,Ie);switch(O){case"today":ct=Qe,pt=Qe;break;case"lastWeek":ct=new Date(q,se,Ie-6),pt=Qe;break;case"last15Days":ct=new Date(q,se,Ie-14),pt=Qe;break;case"last30Days":ct=new Date(q,se,Ie-29),pt=Qe;break;case"thisMonth":ct=new Date(q,se,1),pt=Qe;break;case"last3Months":ct=new Date(q,se-3,1),pt=new Date(q,se,0);break;case"last6Months":ct=new Date(q,se-6,1),pt=new Date(q,se,0);break;case"last12Months":ct=new Date(q,se-12,1),pt=new Date(q,se,0);break;case"lastYear":ct=new Date(q-1,0,1),pt=new Date(q-1,11,31);break;default:return}}L("update:modelValue",{start:ct,end:pt}),Ot()}function E(O){Ae.value==="left"?ge.value=O:Ae.value==="right"?ae.value=O:f.value=O,V()}function Y(O){Ae.value==="left"?ne.value=O:Ae.value==="right"?ve.value=O:we.value=O,V()}function le(){f.value===0?(f.value=11,we.value--):f.value--}function Ye(){f.value===11?(f.value=0,we.value++):f.value++}function ot(){ge.value===0?(ge.value=11,ne.value--):ge.value--}function Ve(){ge.value===11?(ge.value=0,ne.value++):ge.value++}function Fe(){ae.value===0?(ae.value=11,ve.value--):ae.value--}function It(){ae.value===11?(ae.value=0,ve.value++):ae.value++}function Ht(O){if(!nt(O))return;const W=new Date(O.getFullYear(),O.getMonth(),O.getDate());if(de.value){L("update:modelValue",W),$t();return}const q=Pt.value;if(!q.start&&!q.end){L("update:modelValue",{start:W,end:null}),H.value="end";return}if(q.start&&q.end){L("update:modelValue",{start:W,end:null}),H.value="end";return}if(H.value==="start"){let se=W,Ie=q.end;se&&Ie&&se>Ie&&([se,Ie]=[Ie,se]),L("update:modelValue",{start:se||Ie,end:Ie||se}),H.value="end"}else{let se=q.start,Ie=W;se&&Ie&&Ie<se&&([se,Ie]=[Ie,se]),L("update:modelValue",{start:se||Ie,end:Ie||se}),H.value="start"}}e.watch(Pt,()=>{M.doubleCalendar&&vt.value&&A.value&&Ot()},{deep:!0});let at=null,Ge=null,Lt=null;function In(){at&&(document.removeEventListener("keydown",at),at=null),Ge&&(window.removeEventListener("resize",Ge),Ge=null),Lt&&(window.removeEventListener("scroll",Lt,!0),Lt=null)}return e.watch(U,O=>{O==="years"&&e.nextTick(()=>{dt.value?.querySelector(`[data-year="${G.value}"]`)?.scrollIntoView({block:"center",behavior:"auto"})})}),e.watch(A,O=>{In(),O&&(at=W=>{W.key==="Escape"&&(U.value==="years"||U.value==="months"?V():$t())},Ge=()=>{_t()},Lt=()=>{_t()},document.addEventListener("keydown",at),window.addEventListener("resize",Ge),window.addEventListener("scroll",Lt,!0))}),e.onBeforeUnmount(()=>{In()}),(O,W)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-datepicker",{"dss-datepicker--readonly":T.mode==="readonly"}])},[T.mode==="readonly"?(e.openBlock(),e.createElementBlock("div",xa,[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:Wt.value,readonly:"",disabled:"",tabindex:"-1"},null,8,Ea)])):de.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-datepicker__input-wrap",onClick:W[0]||(W[0]=q=>an("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:it,type:"text",class:"dss-datepicker__input",placeholder:M.placeholder||e.unref(ce)("datepicker.selectDate"),value:Et.value,readonly:"",disabled:T.mode==="readonly"},null,8,Sa)])):vt.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-datepicker__input-wrap",ref_key:"inputRangeWrapRef",ref:R,onClick:W[1]||(W[1]=q=>an("start"))},[W[12]||(W[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:"inputRangeRef",ref:xe,type:"text",class:"dss-datepicker__input",placeholder:M.placeholder||e.unref(ce)("datepicker.selectRange"),value:Tt.value,readonly:""},null,8,Va)],512)):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($t,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:ke,class:e.normalizeClass(["dss-datepicker__dropdown",{"dss-datepicker__dropdown--double":T.doubleCalendar&&vt.value&&U.value==="days","dss-datepicker__dropdown--quick-select":T.doubleCalendar&&vt.value&&U.value==="days"&&T.quickSelect}]),onClick:W[9]||(W[9]=e.withModifiers(()=>{},["stop"])),style:e.normalizeStyle(Re.value)},[U.value==="days"&&T.doubleCalendar&&vt.value?(e.openBlock(),e.createElementBlock("div",Na,[T.quickSelect?(e.openBlock(),e.createElementBlock("nav",Ba,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(mt.value,q=>(e.openBlock(),e.createElementBlock("button",{key:q.id,type:"button",class:"dss-datepicker__quick-select-btn",onClick:se=>w(q.id)},e.toDisplayString(e.unref(ce)(q.labelKey)),9,Ma))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",_a,[e.createElementVNode("div",$a,[e.createElementVNode("div",La,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.prevMonth"),onClick:ot}," ‹ ",8,Ta),e.createElementVNode("div",Aa,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:W[2]||(W[2]=q=>sn("left","months"))},e.toDisplayString(Me.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:W[3]||(W[3]=q=>sn("left","years"))},e.toDisplayString(ne.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.nextMonth"),onClick:Ve}," › ",8,Da)]),e.createElementVNode("div",Ha,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xt.value,q=>(e.openBlock(),e.createElementBlock("span",{key:q,class:"dss-datepicker__weekday"},e.toDisplayString(q),1))),128))]),e.createElementVNode("div",Ra,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,(q,se)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"L-"+se},[q?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",St(q)]),disabled:!nt(q),onClick:Ie=>Ht(q),onMouseenter:Ie=>Pe(q),onMouseleave:gt},e.toDisplayString(q.getDate()),43,Fa)):(e.openBlock(),e.createElementBlock("span",Ia))],64))),128))])]),e.createElementVNode("div",za,[e.createElementVNode("div",Pa,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.prevMonth"),onClick:Fe}," ‹ ",8,Oa),e.createElementVNode("div",qa,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:W[4]||(W[4]=q=>sn("right","months"))},e.toDisplayString(Ze.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:W[5]||(W[5]=q=>sn("right","years"))},e.toDisplayString(ve.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.nextMonth"),onClick:It}," › ",8,Wa)]),e.createElementVNode("div",Za,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xt.value,q=>(e.openBlock(),e.createElementBlock("span",{key:q,class:"dss-datepicker__weekday"},e.toDisplayString(q),1))),128))]),e.createElementVNode("div",Ua,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(be.value,(q,se)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"R-"+se},[q?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",St(q)]),disabled:!nt(q),onClick:Ie=>Ht(q),onMouseenter:Ie=>Pe(q),onMouseleave:gt},e.toDisplayString(q.getDate()),43,Xa)):(e.openBlock(),e.createElementBlock("span",Ya))],64))),128))])])])])):U.value==="days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ja,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.prevMonth"),onClick:le}," ‹ ",8,Ka),e.createElementVNode("div",Ga,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:W[6]||(W[6]=q=>U.value="months")},e.toDisplayString(ue.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:W[7]||(W[7]=q=>U.value="years")},e.toDisplayString(we.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.nextMonth"),onClick:Ye}," › ",8,Qa)]),e.createElementVNode("div",Ja,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xt.value,q=>(e.openBlock(),e.createElementBlock("span",{key:q,class:"dss-datepicker__weekday"},e.toDisplayString(q),1))),128))]),e.createElementVNode("div",es,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ut.value,(q,se)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:se},[q?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",St(q)]),disabled:!nt(q),onClick:Ie=>Ht(q),onMouseenter:Ie=>Pe(q),onMouseleave:gt},e.toDisplayString(q.getDate()),43,ts)):(e.openBlock(),e.createElementBlock("span",ns))],64))),128))])],64)):U.value==="months"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",ls,[e.createElementVNode("div",os,[e.createElementVNode("span",as,e.toDisplayString(He.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:W[8]||(W[8]=q=>U.value="years")},e.toDisplayString(G.value),1)])]),e.createElementVNode("div",ss,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe.value,(q,se)=>(e.openBlock(),e.createElementBlock("button",{key:se,type:"button",class:e.normalizeClass(["dss-datepicker__month-cell",{"dss-datepicker__month-cell--selected":se===Ft.value}]),onClick:Ie=>E(se)},e.toDisplayString(q),11,rs))),128))])],64)):U.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",is,[e.createElementVNode("span",cs,e.toDisplayString(kt.value),1)]),e.createElementVNode("div",{class:"dss-datepicker__years-wrap",ref_key:"yearsWrapRef",ref:dt},[e.createElementVNode("div",us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Zt.value,q=>(e.openBlock(),e.createElementBlock("button",{key:q,type:"button",class:e.normalizeClass(["dss-datepicker__year-cell",{"dss-datepicker__year-cell--selected":q===G.value,"dss-datepicker__year-cell--current":q===e.unref(ft)}]),"data-year":q,onClick:se=>Y(q)},e.toDisplayString(q),11,ds))),128))])],512)],64)):e.createCommentVNode("",!0)],6)])):e.createCommentVNode("",!0)]))],2))}},ms=["data-chart-type"],ps={class:"dss-chart-header-titles"},fs={key:0,class:"dss-chart-title"},vs={key:1,class:"dss-chart-subtitle"},gs=["onClick","onMouseenter"],hs={class:"dss-legend-text"},ys=["onClick","onMouseenter"],ks={class:"dss-legend-text"},Cs=["title"],bs=["src"],ws={class:"dss-chart-area-wrapper"},xs={key:0,class:"dss-chart-z-axis-label"},Es=["width","height","data-smooth","data-animated"],Ss=["id"],Vs=["y","width","height"],Ns=["id"],Bs=["d"],Ms=["id"],_s=["d"],$s={key:0},Ls=["clip-path"],Ts=["x1","x2","y1","y2"],As={class:"dss-axes"},Ds=["x1","x2","y1","y2"],Hs=["x1","x2","y1","y2"],Rs=["x1","x2","y1","y2"],Fs={class:"dss-axis-labels"},Is=["x","y"],zs=["x","y"],Ps=["x","y"],Os=["x","y"],qs=["y","transform"],Ws=["x","y","transform"],Zs={key:1,class:"dss-flag-markers"},Us=["clip-path"],Xs=["x1","x2","y1","y2","onMouseover"],Ys=["x1","x2","y1","y2","onMouseover"],js=["x1","x2","y1","y2","onMouseover"],Ks=["cx","cy","onMouseover"],Gs=["cx","cy","fill","onMouseover"],Qs=["x","y"],Js=["clip-path"],er={key:0},tr=["d","onMouseover"],nr=["x","y","width","height","fill","onMouseover"],lr={class:"dss-line-chart"},or=["d","stroke","stroke-width","stroke-dasharray"],ar=["d","stroke","stroke-width","opacity"],sr=["cx","cy","r","fill","onMouseover"],rr={key:1},ir=["d","stroke","stroke-width","stroke-dasharray"],cr=["d","stroke","stroke-width","stroke-dasharray"],ur=["d","stroke","stroke-width","opacity"],dr=["cx","cy","r","fill","onMouseover"],mr={key:2},pr=["id"],fr=["x","y","width","height"],vr=["d","fill","fill-opacity","mask"],gr=["d","stroke","stroke-width"],hr=["d","fill","onMouseover"],yr=["x","y","width","height","onMouseover"],kr=["clip-path"],Cr=["x1","x2","y1","y2","stroke"],br=["cx","cy","r","fill"],wr={key:1,class:"dss-bubble-chart"},xr={key:0,class:"dss-bubble-group"},Er=["cx","cy","r","fill","fill-opacity","stroke","onMouseenter","onMouseleave","onClick"],Sr=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],Vr=["transform"],Nr=["cx","cy","r"],Br=["data-chart-type","clip-path"],Mr=["d","fill","fill-opacity","stroke","stroke-width","clip-path","onMouseover"],_r={key:1,class:"dss-radial-segment-data-labels"},$r=["x","y"],Lr=["x","y","font-size","fill"],Tr=["x1","y1","x2","y2","stroke"],Ar=["x1","y1","x2","y2","stroke"],Dr=["x","y","text-anchor","font-size"],Hr=["transform"],Rr={key:0,class:"dss-spider-grid"},Fr=["cx","cy","r"],Ir={class:"dss-spider-grid-labels"},zr=["x","y"],Pr=["x","y"],Or=["x1","x2","y1","y2"],qr={class:"dss-spider-labels"},Wr=["x","y","text-anchor","dominant-baseline"],Zr=["points","fill","fill-opacity","stroke","stroke-width"],Ur=["cx","cy","r","fill","onMouseover"],Xr={class:"dss-chart-logos"},Yr=["cx","cy","r","fill"],jr=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],Kr=["onClick","onMouseenter"],Gr=["src"],Qr={class:"dss-marker-tooltip-category"},Jr={key:0,class:"dss-marker-tooltip-description"},ei={key:0,class:"dss-tooltip-section dss-spider-tooltip-section"},ti={class:"dss-tooltip-title dss-spider-tooltip-area-title"},ni={class:"dss-tooltip-series-name"},li={class:"dss-tooltip-series-value"},oi={key:1,class:"dss-tooltip-section"},ai={key:0,class:"dss-tooltip-title"},si={class:"dss-bubble-tooltip-data"},ri={key:2,class:"dss-tooltip-section"},ii={class:"dss-tooltip-title"},ci={class:"dss-tooltip-value"},ui={key:0,class:"dss-tooltip-section"},di={class:"dss-tooltip-section-title"},mi={class:"dss-tooltip-group-header"},pi={class:"dss-tooltip-item-content"},fi={class:"dss-tooltip-item-text"},vi={key:1,class:"dss-tooltip-section"},gi={class:"dss-tooltip-section-title"},hi={class:"dss-tooltip-item-content"},yi={class:"dss-tooltip-item-title"},ki={key:0,class:"dss-tooltip-item-description"},Ci={class:"dss-tooltip-section"},bi={class:"dss-tooltip-title"},wi={key:0,class:"dss-bubble-tooltip-data"},xi={class:"dss-tooltip-series-name"},Ei={class:"dss-tooltip-series-value"},Si={key:0,class:"dss-tooltip-section"},Vi={class:"dss-tooltip-section-title"},Ni={class:"dss-tooltip-group-header"},Bi={class:"dss-tooltip-item-content"},Mi={class:"dss-tooltip-item-text"},_i={key:1,class:"dss-tooltip-section"},$i={class:"dss-tooltip-section-title"},Li={class:"dss-tooltip-item-content"},Ti={class:"dss-tooltip-item-title"},Ai={key:0,class:"dss-tooltip-item-description"},Di=["onClick","onMouseenter"],Hi={class:"dss-legend-text"},Ri={key:1,class:"dss-context-menu-separator"},Fi={key:0,class:"dss-context-menu-separator"},Ii={key:0,class:"dss-context-menu-separator"},zi=["onClick"],Pi=["innerHTML"],Oi={key:0,class:"dss-context-menu-icon"},qi={class:"dss-marker-modal-header"},Wi={class:"dss-marker-modal-body"},Zi={class:"dss-form-group"},Ui={class:"dss-form-group"},Xi={for:"dss-marker-description"},Yi={key:0,class:"dss-form-text-display"},ji=["placeholder"],Ki={class:"dss-marker-modal-footer"},Gi={class:"modal-footer-left"},Qi={class:"dss-modal-footer-right"},Ji=["disabled"],ec={name:"DSSChart"},tc=Object.assign(ec,{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:T=>typeof T=="object"&&T!==null},innerSize:{type:Number,default:null},old:{type:Boolean,default:!1}},emits:["add-marker","update-marker","delete-marker"],setup(T,{emit:te}){const{t:M,locale:L}=Gl.useI18n(),ce=te,z=e.ref(null),A=e.ref(null),U=e.ref(null),Ke=e.ref(0),he=e.ref(0);let f=null,we=null;const ge=20,ne=e.computed(()=>{if(he.value,Ke.value,!z.value||!A.value)return 0;try{const t=z.value.getBoundingClientRect();return A.value.getBoundingClientRect().top-t.top}catch{return 0}}),ae=e.computed(()=>`chart-clip-${H.chartId}`),ve=e.computed(()=>`url(#${ae.value})`),H=T,Ce={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},markers:{show:!0,icon:null,iconSize:25,customIcons:{}},fill:{area:{opacity:.3},spider:{opacity:.15}},crosshair:{show:!1,color:"#666"},bubbles:{size:4,tooltip:{fields:["x","y","size"],labels:{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},formatters:{}}},spider:{gridLabels:null,gridSteps:5},zoom:{enabled:!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 Ae(t,s){const n=Object.assign({},t);return it(t)&&it(s)&&Object.keys(s).forEach(i=>{it(s[i])?i in t?n[i]=Ae(t[i],s[i]):Object.assign(n,{[i]:s[i]}):Object.assign(n,{[i]:s[i]})}),n}const qe=()=>{let t=20,s=0,n=0;if(rt.value&&(t+=30),Et.value&&(t+=25),Q.value&&H.series.length>0){const i=H.series.filter((p,g)=>!tt.value.has(g)).length;if(be.value==="top"||be.value==="bottom"){if(Me.value==="horizontal"){const g=Math.floor(ke.value/100);s=Math.ceil(i/g)*25+10}else s=i*25+10;t+=s}else n=150}return{height:t,legendHeight:s,legendWidth:n}};function it(t){return t&&typeof t=="object"&&!Array.isArray(t)}const R=e.computed(()=>Ae(Ce,H.options)),xe=e.computed(()=>{const t=R.value;return t&&t.chart&&t.chart.width==="auto"}),Be=e.computed(()=>{const t=R.value;return t&&t.chart&&t.chart.height==="auto"}),ke=e.computed(()=>{const t=R.value;return xe.value?Ke.value||800:t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),dt=e.ref(ge),ft=e.computed(()=>{if(Be.value){const t=ft.value;return t??Math.max(0,(he.value||400)-dt.value*5)}}),de=e.computed(()=>{const t=R.value;if(We.value==="mini-radial")return ke.value;if(Be.value){const s=ft.value;return s??Math.max(0,(he.value||400)-dt.value)}return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),vt=e.computed(()=>{if(Be.value&&We.value==="semi-radial"&&ft.value!=null)return dt.value+de.value+"px";if(Be.value)return"100%";if(fn.value)return dt.value+de.value+"px";if(Q.value&&be.value==="bottom"){const t=qe();return de.value+(t.legendHeight||35)+"px"}return de.value+(Q.value?20:0)+"px"}),We=e.computed(()=>{const t=R.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),Pt=e.computed(()=>{const t=H.series.map(s=>s.type||We.value);return new Set(t).size>1}),rt=e.computed(()=>{const t=R.value;return t&&t.title&&t.title.text?t.title.text:""}),Et=e.computed(()=>{const t=R.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),Tt=e.computed(()=>{const t=R.value;if(!t||!t.zAxis)return"";const s=t.zAxis;return typeof s=="string"?s:s&&typeof s.label=="string"?s.label:""}),Wt=e.computed(()=>{const t=R.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),Ft=e.computed(()=>{const t=R.value;return t&&t.yAxis&&t.yAxis.title&&t.yAxis.title.text?t.yAxis.title.text:""}),G=e.computed(()=>{const t=R.value;return t&&t.yAxis&&t.yAxis.secondary&&typeof t.yAxis.secondary=="object"?t.yAxis.secondary:null}),ue=e.computed(()=>{const t=G.value;return t&&t.title&&t.title.text?t.title.text:""}),He=e.computed(()=>{const t=R.value;if(!t||!t.yAxis)return bn;const s=t.yAxis.min;return typeof s=="number"||s===bn?s:bn}),Xe=e.computed(()=>{const t=R.value;if(!t||!t.yAxis)return bn;const s=t.yAxis.max;return typeof s=="number"||s===bn?s:bn}),Zt=e.computed(()=>{const t=G.value;if(!t)return bn;const s=t.min;return typeof s=="number"||s===bn?s:bn}),kt=e.computed(()=>{const t=G.value;if(!t)return bn;const s=t.max;return typeof s=="number"||s===bn?s:bn}),xt=e.computed(()=>{const t=R.value;return!t||!t.xAxis?null:typeof t.xAxis.min=="number"?t.xAxis.min:null}),Mt=e.computed(()=>{const t=R.value;return!t||!t.xAxis?null:typeof t.xAxis.max=="number"?t.xAxis.max:null}),Ut=e.computed(()=>{const t=R.value;return t&&t.grid&&t.grid.show!==!1}),Q=e.computed(()=>{const t=R.value;return t&&t.legend&&t.legend.show!==!1}),be=e.computed(()=>{const t=R.value;return t&&t.legend&&t.legend.position?t.legend.position:"top"}),Me=e.computed(()=>{const t=R.value;return t&&t.legend&&t.legend.orientation?t.legend.orientation:"horizontal"}),Ze=e.computed(()=>{const t=R.value;return!t||!t.tooltip?!0:t.tooltip.enabled!==!1}),et=e.computed(()=>{const t=R.value;if(!t||!t.crosshair)return!1;const s=t.crosshair.show;return s===!0||s==="true"}),mt=e.computed(()=>{const t=R.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),je=e.computed(()=>{const t=R.value;return!t||!t.zoom?!1:t.zoom.enabled===!0}),_t=e.computed(()=>{const t=R.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),Re=e.computed(()=>{const t=R.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),P=e.computed(()=>{const t=R.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),X=e.computed(()=>{if(!fn.value)return 0;const t=R.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:0}),j=e.computed(()=>{const t=R.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),me=e.computed(()=>{const{maxX:t}=qt.value;return t===0}),ze=(t,s)=>me.value&&s===0?5:s,nt=t=>{const s=Number(t);return!Number.isFinite(s)||s<=0?0:s},St=e.computed(()=>{const t=R.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),Pe=e.computed(()=>{const t=R.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),gt=e.computed(()=>{const t=R.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),Ot=e.computed(()=>{const t=R.value;return Pe.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),an=e.computed(()=>{const t=R.value,s=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return s.length>0?s:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),$t=e.computed(()=>{const t=R.value;return t&&t.animations&&t.animations.enabled!==!1}),sn=e.computed(()=>{const t=R.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),V=e.computed(()=>{const t=R.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),w=e.computed(()=>{const t=R.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),E=e.computed(()=>{const t=R.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),Y=e.computed(()=>{const t=R.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),le=e.computed(()=>{const t=R.value;return t&&t.animations&&t.animations.onDataChange!==!1}),Ye=e.computed(()=>{const t=R.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),ot=e.computed(()=>{const t=R.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),Ve=e.computed(()=>R.value?.spider?.gridSteps||5),Fe=e.computed(()=>{const t=[],s=Ve.value;for(let n=1;n<=s;n++)t.push(ut.value/s*n);return t}),It=t=>{const s=Ht.value;if(s&&Array.isArray(s)&&s[t]!==void 0)return s[t].toString();const n=Fe.value[t];return Math.round(n/ut.value*100)+"%"},Ht=e.computed(()=>R.value?.spider?.gridLabels||null),at=e.computed(()=>{const t=R.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0}),Ge=e.computed(()=>{const t=R.value,s={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...s,...t.contextMenu.items}:s}),Lt=e.computed(()=>{const t=R.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),In=e.computed(()=>{const t=R.value;return t&&t.markers&&t.markers.icon?t.markers.icon:yl.value}),O=e.computed(()=>{const t=R.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),W=e.computed(()=>{const t=R.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),q=e.computed(()=>{const s=R.value?.valueFormat?.extension;return typeof s=="string"?s:""}),se=t=>{const s=q.value;if(t==null)return"";const n=String(t);return s?n+s:n},Ie=e.computed(()=>!J.value.isZooming);e.computed(()=>Gt.value.map(t=>{if(t.categoryIndex!==void 0&&(Cn.value||jt.value)){const s=Kt(t.categoryIndex),n=ne.value+F.value.bottom-W.value/2;return{...t,x:s,y:n}}return t}));function ct(t,s){let n;if(t instanceof Date)n=new Date(t.getFullYear(),t.getMonth(),t.getDate());else if(typeof t=="string"){const[g,C,b]=t.split("-"),I=Number(b?.length===2?`20${b}`:b);n=new Date(I,Number(C)-1,Number(g))}else return 0;let i=0,p=1/0;return s.forEach((g,C)=>{const[b,I,N]=g.split("-"),$=Number(N?.length===2?`20${N}`:N),B=new Date($,Number(I)-1,Number(b)),ee=Math.abs(B-n);ee<p&&(p=ee,i=C)}),i}const pt=e.computed(()=>{const t=H.markers.map(n=>{const i=ct(n.marker_date,H.categories),p=Kt(i),g=ne.value+F.value.bottom-W.value/2;return{...n,x:p,y:g,categoryIndex:i,source:"props"}}),s=Gt.value.map(n=>{if(n.categoryIndex!==void 0&&(Cn.value||jt.value)){const i=Kt(n.categoryIndex),p=ne.value+F.value.bottom-W.value/2;return{...n,x:i,y:p,source:"internal"}}return{...n,source:"internal"}});return[...t,...s]}),Qe=e.computed(()=>{const t=R.value;return t&&t.watermark&&t.watermark.enabled===!0}),Ct=e.computed(()=>{const t=R.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),Xt=e.computed(()=>{const t=R.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:35}),An=e.computed(()=>{const t=R.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),Dn=e.computed(()=>{const t={left:F.value.left,top:F.value.top,width:F.value.width,height:F.value.height};let s,n;const i=String(Xt.value);if(i.includes("%")){const p=parseFloat(i)/100;s=t.width*p,n=s*(96/499)}else{const p=parseFloat(i)||25;s=Math.min(t.width*.25,200)*(p/25),n=s*(96/499)}return{width:s,height:n,area:t}}),Hn=e.computed(()=>{const{width:t,height:s}=Dn.value,n=An.value;let i,p;const g=F.value.left,C=F.value.right,b=F.value.top,I=F.value.bottom,N=F.value.width,$=F.value.height;switch(n){case"center":i=g+(N-t)/2,p=b+($-s)/2;break;case"top-left":i=g+15,p=b+5;break;case"top-right":i=C-t-15,p=b+5;break;case"bottom-left":i=g+15,p=I-s-5;break;case"bottom-right":default:i=C-t-15,p=I-s-5;break}return{backgroundPositionX:i+"px",backgroundPositionY:p+"px",backgroundSize:`${t}px ${s}px`}}),sl=t=>!H.flags||!H.flags.length?[]:H.flags.filter(s=>s.categoryIndex===t),Rn=t=>{const s=sl(t),n=S(t),i=s.filter(C=>C.manual),p=s.filter(C=>!C.manual),g=[];return i.length>0&&g.push({type:M("chart.tooltip.manualFlags"),color:"#698dbe",flags:i.map(C=>({text:C.text,color:"#698dbe"}))}),p.length>0&&g.push({type:M("chart.tooltip.autoFlags"),color:"#a1d499",flags:p.map(C=>({text:C.text,color:"#a1d499"}))}),{flagGroups:g,markers:n.map(C=>({title:C.title,description:C.description,type:M("chart.tooltip.markers"),color:C.color||"#9784ba"}))}},yl=e.computed(()=>{const t=H.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)}`}),
|
|
18
|
+
</svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),kl=e.computed(()=>{const t=H.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)}`}),
|
|
45
|
-
`)}})}),Il=e.ref({show:!1,x:0,y:0,content:"",count:0}),Tn=e.computed(()=>I.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),An=e.computed(()=>{const t=I.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),Vn=e.computed(()=>I.value?.bubbles?.tooltip?.formatters||{}),Wt=e.ref(new Set),be=e.ref(null),El=e.ref(!1),rt=e.ref({show:!1,x:0,y:0,title:"",value:"",bubbleData:[],spiderAreas:[]}),Mt=e.ref({show:!1,x:0,y:0,categoryValue:"",description:""}),xe=e.ref({show:!1,x:0,categoryIndex:-1,data:[]}),wt=e.ref({show:!1,x:0,y:0,mouseDataX:0,mouseDataY:0,categoryIndex:-1,chartX:0,chartY:0}),ae=e.ref({scale:1,offsetX:0,minScale:1,maxScale:2.5,isDragging:!1,lastMouseX:0,lastMouseY:0,isZooming:!1,zoomTimeout:null}),at=e.ref([]),Pe=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 nt.value&&t.push(...Object.keys(nt.value)),t}),e.computed(()=>{if(!H.categories||H.categories.length===0){const{maxX:t}=Qt.value;return Array.from({length:t+1},(s,l)=>B("chart.fallback.item",{number:l+1}))}return H.categories});const Dn=e.computed(()=>{if(!H.categories||H.categories.length===0)return null;const t=H.categories[0],[s,l,i]=String(t).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(s),b=Number(l)-1;return!g||!l||!p?null:new Date(p,b,g)}),Fl=e.computed(()=>{if(!H.categories||H.categories.length===0)return null;const t=H.categories[H.categories.length-1],[s,l,i]=String(t).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(s),b=Number(l)-1;return!g||!l||!p?null:new Date(p,b,g)}),Yl=e.computed(()=>Pe.value.editingMarkerId!==null),Cl=e.computed(()=>Pe.value.readonly),Nn=t=>{Wt.value.has(t)||(mo.value=!0,be.value=t)},un=()=>{mo.value=!1,be.value=null},jl=t=>{if($n.value||On.value){xe.value.show=!1;return}const l=t.currentTarget.getBoundingClientRect(),i=t.clientX-l.left,p=t.clientY-l.top,g=al.value?i>=O.value.left-50&&i<=O.value.right+50&&p>=O.value.top-50&&p<=O.value.bottom+100:i>=O.value.left&&i<=O.value.right&&p>=O.value.top&&p<=O.value.bottom;if(El.value=g,al.value){if(!te.value||!g||ae.value.isDragging||ae.value.isZooming){xe.value.show=!1;return}if(Pn.value.find(se=>!se||se.isHidden?!1:Math.sqrt(Math.pow(se.x-i,2)+Math.pow(se.y-p,2))<=se.radius+3))xe.value.show=!1;else{const se=Pn.value.filter(he=>!he||he.isHidden?!1:Math.sqrt(Math.pow(he.x-i,2)+Math.pow(he.y-p,2))<=250);if(se.length>0){let he=se[0],Be=Math.sqrt(Math.pow(he.x-i,2)+Math.pow(he.y-p,2));se.forEach(qe=>{const Le=Math.sqrt(Math.pow(qe.x-i,2)+Math.pow(qe.y-p,2));Le<Be&&(Be=Le,he=qe)});const me=30,et=Pn.value.filter(qe=>!qe||qe.isHidden?!1:Math.abs(qe.x-he.x)<=me).sort((qe,Le)=>qe.y-Le.y);xe.value={show:!0,x:he.x,categoryIndex:Math.round(he.originalX),data:(()=>{const qe=Tn.value,Le=An.value,$e=[];return et.forEach(Re=>{qe.forEach(Nt=>{const It=Le[Nt]||Nt,ql=h(Nt,Re);ql&&$e.push({seriesName:Re.seriesName,label:Re.label,value:`${It}: ${ql}`,color:Re.color,y:Re.y})})}),$e})()}}else xe.value.show=!1}return}if(ae.value.isDragging&&ae.value.scale>1&&xl.value&&Me.value){xe.value.show=!1;const Ue=t.clientX-ae.value.lastMouseX,{minX:se,maxX:he}=Qt.value,Be=he-se||1,et=Ue*.8;ae.value.offsetX+=et;const qe=Be/ae.value.scale,Le=Be-qe,$e=0,Re=-Le/Be*O.value.width,Nt=$e;ae.value.offsetX=Math.max(Re,Math.min(Nt,ae.value.offsetX)),ae.value.lastMouseX=t.clientX,ae.value.lastMouseY=t.clientY;return}if(!te.value||!xl.value||ae.value.isDragging||ae.value.isZooming||!g){xe.value.show=!1;return}const{minX:b,maxX:C}=Qt.value,D=C-b||1,L=D/ae.value.scale,R=b-ae.value.offsetX/O.value.width*D,N=(i-O.value.left)/O.value.width,G=R+N*L,Ee=Math.round(G);if(Ee>=0&&Ee<=C){const Ue=sl(Ee),se=Cn.value.map((he,Be)=>{const me=H.series.findIndex(qe=>qe===he),et=he.data[Ee];return{seriesName:he.name,value:et!==void 0?et:null,color:Kt(me),y:et!==void 0?hl(et):null}}).filter(he=>he.value!==null);xe.value={show:!0,x:Ue,categoryIndex:Ee,data:se}}},wl=()=>{xe.value.show=!1,El.value=!1,On.value=!1,$n.value||(Il.value.show=!1),ae.value.isDragging&&(ae.value.isDragging=!1),ae.value.zoomTimeout&&(clearTimeout(ae.value.zoomTimeout),ae.value.zoomTimeout=null),ae.value.isZooming=!1,setTimeout(()=>{be.value=null,rt.value.show=!1},150)},en=t=>{if(t.preventDefault(),t.stopPropagation(),!Ve.value)return;const s=t.currentTarget.getBoundingClientRect(),l=t.clientX-s.left,i=t.clientY-s.top;if(vl.value){wt.value.show=!1,e.nextTick(()=>{wt.value.show=!0,wt.value.x=t.clientX,wt.value.y=t.clientY,wt.value.categoryIndex=null});return}const p=Math.max(0,O.value.left-20),g=O.value.right,b=O.value.top,C=O.value.bottom+80;l>=p&&l<=g&&i>=b&&i<=C&&(wt.value.show=!1,e.nextTick(()=>{wt.value.show=!0,wt.value.x=t.clientX,wt.value.y=t.clientY,wt.value.categoryIndex=null;const D=Math.max(O.value.left,Math.min(l,O.value.right))-O.value.left,R=O.value.width/bn.value.length,N=Math.floor(D/R);N>=0&&N<bn.value.length&&(wt.value.categoryIndex=N)}))},Zt=t=>{if(!(t&&t.button===2)){if(wt.value.show&&t&&t.type==="click"){const s=document.querySelector(".dss-context-menu");if(s&&s.contains(t.target))return}wt.value.show=!1}},Nl=t=>{if(typeof t.template=="function"){const s={series:H.series,categories:H.categories,markers:at.value},l={chartX:wt.value.chartX,chartY:wt.value.chartY,dataX:wt.value.mouseDataX,dataY:wt.value.mouseDataY,categoryIndex:wt.value.categoryIndex};return t.template(s,l)}return t.template||t.label||""},lo=t=>{const s=["dss-context-menu-item"];return t.cssClass&&s.push(t.cssClass),s},Zn=t=>t.style||{},tn=t=>t.type&&nt.value[t.type]?nt.value[t.type]:t.customIcon?t.customIcon:Ht.value,jt=t=>t==null?"":H.categories&&H.categories[t]?H.categories[t]:"",Hn=t=>at.value.length?at.value.filter(s=>s.categoryIndex===t):[],Rn=t=>{if(!xl.value&&!al.value)return{x:0,y:0};const s=sl(t),l=ee.value+O.value.bottom-ot.value/2;return{x:s,y:l}},k=()=>{at.value.forEach(t=>{if(t.categoryIndex!==void 0&&(xl.value||al.value)){const s=Rn(t.categoryIndex);t.x=s.x,t.y=s.y}})},y=()=>{if(Pe.value.description&&Pe.value.description.length&&Pe.value.date){if(Yl.value){const t=at.value.findIndex(s=>s.id===Pe.value.editingMarkerId);t!==-1?(at.value[t].description=Pe.value.description||"",at.value[t].color=Pe.value.color||"",at.value[t].type=Pe.value.type||"default",ie("update-marker",at.value[t])):ie("update-marker",{id:Pe.value.editingMarkerId,description:Pe.value.description||"",color:Pe.value.color||"",type:Pe.value.type||"default"})}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let s=Z(Pe.value.date,H.categories||[]);if(al.value){const{maxX:b}=Qt.value;s=Math.max(0,Math.min(s,Math.floor(b)))}else xl.value&&(s=Math.max(0,Math.min(s,Qt.value.maxX)));const l=sl(s),i=ee.value+O.value.bottom-ot.value/2,p=Array.isArray(H.categories)?H.categories[s]:null,g={id:t,title:"",description:Pe.value.description||"",color:Pe.value.color||"",type:Pe.value.type||"default",categoryIndex:s,x:l,y:i,marker_date:p||null};Pe.value.categoryIndex=s,at.value.push(g),ie("add-marker",g)}x(),pt()}},x=()=>{Pe.value.show=!1,Pe.value.title="",Pe.value.description="",Pe.value.color="#FF6B6B",Pe.value.type="default",Pe.value.editingMarkerId=null,Pe.value.readonly=!1,Pe.value.categoryIndex=null,Pe.value.fromButton=!1,Pe.value.date=null},W=()=>{Yl.value&&(fe(Pe.value.editingMarkerId),x())},fe=t=>{const s=at.value.findIndex(l=>l.id===t);s!==-1&&(at.value.splice(s,1),pt()),ie("delete-marker",t)},_t=t=>{if(Pe.value.show=!0,Pe.value.title=t?.title??t?.comment??"",Pe.value.description=t?.description??t?.comment??"",Pe.value.color=t?.color??"",Pe.value.type=t?.type??"default",Pe.value.editingMarkerId=t?.id??t?.marker_id??null,Pe.value.readonly=t?.readonly??!1,Pe.value.categoryIndex=t?.categoryIndex??null,t?.marker_date){const[s,l,i]=String(t.marker_date).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(s),b=Number(l)-1;g&&l&&p?Pe.value.date=new Date(p,b,g):Pe.value.date=null}else Pe.value.date=null},pt=()=>{try{const t=`dss-chart-markers-${H.chartId}`;localStorage.setItem(t,JSON.stringify(at.value))}catch(t){console.warn("Could not save markers to localStorage:",t)}},tl=()=>{try{const t=`dss-chart-markers-${H.chartId}`,s=localStorage.getItem(t);if(s){const l=JSON.parse(s);Array.isArray(l)&&(at.value=l.map(i=>({...i,originalYOffset:i.originalYOffset!==void 0?i.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),at.value=[]}},nl=t=>{const s=st.value||"Chart",l=new Date().toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).replace(/\//g,"-");return`${s.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50).replace(/^-|-$/g,"")||"Chart"}-${l}.${t}`},rl=()=>{const t=xe.value.show,s=rt.value.show;return xe.value.show=!1,rt.value.show=!1,{originalCrosshair:t,originalTooltip:s}},ol=t=>{xe.value.show=t.originalCrosshair,rt.value.show=t.originalTooltip},Kl=async(t,s=32,l=32)=>new Promise((i,p)=>{if(t.startsWith("data:")){i(t);return}const g=new Image;g.crossOrigin="anonymous";const b=setTimeout(()=>{console.warn("Image conversion timeout for:",t),i(t)},5e3);g.onload=()=>{clearTimeout(b);try{const C=document.createElement("canvas"),D=C.getContext("2d");C.width=s,C.height=l,D.fillStyle="#fafafa",D.fillRect(0,0,s,l),D.drawImage(g,0,0,s,l);const L=C.toDataURL("image/png");i(L)}catch(C){console.warn("Canvas conversion failed:",C),i(t)}},g.onerror=C=>{clearTimeout(b),console.warn("Failed to load image:",t,C),i(t)},g.src=t}),dn=async()=>{try{const t=rl();setTimeout(async()=>{try{const s=A.value;if(!s){console.error("Chart SVG element not found"),ol(t);return}const l=We(),i=ke.value,p=de.value+l.height,g=s.cloneNode(!0);g.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text").forEach(me=>me.remove());const C=g.querySelectorAll("image"),D=Array.from(C).map(async me=>{const et=me.getAttribute("xlink:href")||me.getAttribute("href");if(et&&!et.startsWith("data:"))try{const qe=await Kl(et,32,32);me.setAttribute("xlink:href",qe),me.setAttribute("href",qe)}catch(qe){console.warn("Failed to convert logo to base64:",qe)}});await Promise.all(D);const R=new XMLSerializer().serializeToString(g).replace(/<svg[^>]*>/,"").replace("</svg>","");let N="",G=30;if(st.value&&(N+=`
|
|
46
|
-
<text x="24" y="${
|
|
44
|
+
</svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),Cl=e.computed(()=>{const t=R.value;return t&&t.radialLabels&&t.radialLabels.show===!0}),Bl=e.computed(()=>{const t=R.value;return t&&t.radialLabels&&typeof t.radialLabels.fontSize=="number"?t.radialLabels.fontSize:12});e.computed(()=>{const t=R.value;return t&&t.radialLabels&&t.radialLabels.color?t.radialLabels.color:"#000"});const Fl=e.computed(()=>{const t=R.value;return t&&t.radialLabels&&typeof t.radialLabels.pointerLength=="number"?t.radialLabels.pointerLength:25}),bl=e.computed(()=>{const t=R.value;return t&&t.radialLabels&&typeof t.radialLabels.horizontalLength=="number"?t.radialLabels.horizontalLength:40}),wl=e.computed(()=>{const t=R.value;return t&&t.radialLabels&&typeof t.radialLabels.textOffset=="number"?t.radialLabels.textOffset:8}),zn=e.computed(()=>{const s=R.value?.radialBar?.dataLabels;return s&&(s.show===!0||s.enabled===!0)}),Jn=e.computed(()=>{const s=R.value?.radialBar?.dataLabels?.minAngleDegrees;return typeof s=="number"&&s>=0?s:20}),gn=e.computed(()=>{const s=R.value?.radialBar?.dataCenter;return Tl.value?!0:Tn.value&&s&&(s.show===!0||s.enabled===!0)}),Vn=e.computed(()=>{if(!gn.value||!$e.value.length)return"";if(Tl.value){const i=$e.value[1]??$e.value[0];return se(i?.value??0)}const n=R.value?.radialBar?.dataCenter?.showValueOnly===!0?$e.value[0]?.value??0:$e.value.reduce((i,p)=>i+(p.value??0),0);return se(n)}),Fn=e.computed(()=>{const s=R.value?.radialBar?.dataCenter?.fontSize;return typeof s=="number"&&s>0?s:24}),Un=e.computed(()=>({x:At.value,y:Tl.value?wt.value:wt.value-Fn.value/2})),Il=e.computed(()=>{const s=R.value?.radialBar?.dataCenter?.color;return typeof s=="string"&&s?s:"#333"}),zl=e.computed(()=>{if(!zn.value||!fn.value||!$e.value.length)return[];const t=Jn.value*Math.PI/180,s=(zt.value+ut.value)/2;return $e.value.map(n=>{const p=n.endAngle-n.startAngle>=t&&!n.isHidden,g=At.value+Math.cos(n.midAngle)*s,C=wt.value+Math.sin(n.midAngle)*s;return{value:se(n.value),x:g,y:C,show:p,color:n.color,contrastColor:r(n.color)}})}),ul=e.computed(()=>{if(!H.flags||!H.flags.length)return[];const t=new Map;return H.flags.forEach(s=>{const n=s.categoryIndex;t.has(n)||t.set(n,[]),t.get(n).push(s)}),Array.from(t.entries()).map(([s,n])=>{const i=Kt(s),p=n.filter(C=>C.manual),g=n.filter(C=>!C.manual);return{categoryIndex:parseInt(s),x:i,flags:n,manualCount:p.length,autoCount:g.length,totalCount:n.length,hasManual:p.length>0,hasAuto:g.length>0,texts:n.map(C=>C.text).join(`
|
|
45
|
+
`)}})}),Ml=e.ref({show:!1,x:0,y:0,content:"",count:0}),wn=e.computed(()=>R.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),Nn=e.computed(()=>{const t=R.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),Xn=e.computed(()=>R.value?.bubbles?.tooltip?.formatters||{}),tt=e.ref(new Set),re=e.ref(null),dl=e.ref(!1),ht=e.ref({show:!1,x:0,y:0,title:"",value:"",bubbleData:[],spiderAreas:[]}),Vt=e.ref({show:!1,x:0,y:0,categoryValue:"",description:""}),st=e.ref({show:!1,x:0,categoryIndex:-1,data:[]}),bt=e.ref({show:!1,x:0,y:0,mouseDataX:0,mouseDataY:0,categoryIndex:-1,chartX:0,chartY:0}),J=e.ref({scale:1,offsetX:0,minScale:1,maxScale:2.5,isDragging:!1,lastMouseX:0,lastMouseY:0,isZooming:!1,zoomTimeout:null}),Gt=e.ref([]),_e=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 O.value&&t.push(...Object.keys(O.value)),t}),e.computed(()=>{if(!H.categories||H.categories.length===0){const{maxX:t}=qt.value;return Array.from({length:t+1},(s,n)=>M("chart.fallback.item",{number:n+1}))}return H.categories});const Pl=e.computed(()=>{if(!H.categories||H.categories.length===0)return null;const t=H.categories[0],[s,n,i]=String(t).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(s),C=Number(n)-1;return!g||!n||!p?null:new Date(p,C,g)}),xl=e.computed(()=>{if(!H.categories||H.categories.length===0)return null;const t=H.categories[H.categories.length-1],[s,n,i]=String(t).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(s),C=Number(n)-1;return!g||!n||!p?null:new Date(p,C,g)}),Bn=e.computed(()=>_e.value.editingMarkerId!==null),nn=e.computed(()=>_e.value.readonly),Pn=t=>{tt.value.has(t)||(jo.value=!0,re.value=t)},ln=()=>{jo.value=!1,re.value=null},Mn=t=>{if(po.value||$o.value){st.value.show=!1;return}const n=t.currentTarget.getBoundingClientRect(),i=t.clientX-n.left,p=t.clientY-n.top,g=jt.value?i>=F.value.left-50&&i<=F.value.right+50&&p>=F.value.top-50&&p<=F.value.bottom+100:i>=F.value.left&&i<=F.value.right&&p>=F.value.top&&p<=F.value.bottom;if(dl.value=g,jt.value){if(!et.value||!g||J.value.isDragging||J.value.isZooming){st.value.show=!1;return}if(x.value.find(ie=>!ie||ie.isHidden?!1:Math.sqrt(Math.pow(ie.x-i,2)+Math.pow(ie.y-p,2))<=ie.radius+3))st.value.show=!1;else{const ie=x.value.filter(ye=>!ye||ye.isHidden?!1:Math.sqrt(Math.pow(ye.x-i,2)+Math.pow(ye.y-p,2))<=250);if(ie.length>0){let ye=ie[0],Ne=Math.sqrt(Math.pow(ye.x-i,2)+Math.pow(ye.y-p,2));ie.forEach(Oe=>{const Te=Math.sqrt(Math.pow(Oe.x-i,2)+Math.pow(Oe.y-p,2));Te<Ne&&(Ne=Te,ye=Oe)});const fe=30,Je=x.value.filter(Oe=>!Oe||Oe.isHidden?!1:Math.abs(Oe.x-ye.x)<=fe).sort((Oe,Te)=>Oe.y-Te.y);st.value={show:!0,x:ye.x,categoryIndex:Math.round(ye.originalX),data:(()=>{const Oe=wn.value,Te=Nn.value,Le=[];return Je.forEach(De=>{Oe.forEach(Nt=>{const Rt=Te[Nt]||Nt,Wn=on(Nt,De);Wn&&Le.push({seriesName:De.seriesName,label:De.label,value:`${Rt}: ${Wn}`,color:De.color,y:De.y})})}),Le})()}}else st.value.show=!1}return}if(J.value.isDragging&&J.value.scale>1&&Cn.value&&je.value){st.value.show=!1;const Ue=t.clientX-J.value.lastMouseX,{minX:ie,maxX:ye}=qt.value,Ne=ye-ie||1,Je=Ue*.8;J.value.offsetX+=Je;const Oe=Ne/J.value.scale,Te=Ne-Oe,Le=0,De=-Te/Ne*F.value.width,Nt=Le;J.value.offsetX=Math.max(De,Math.min(Nt,J.value.offsetX)),J.value.lastMouseX=t.clientX,J.value.lastMouseY=t.clientY;return}if(!et.value||!Cn.value||J.value.isDragging||J.value.isZooming||!g){st.value.show=!1;return}const{minX:C,maxX:b}=qt.value,I=b-C||1,N=I/J.value.scale,$=C-J.value.offsetX/F.value.width*I,B=(i-F.value.left)/F.value.width,ee=$+B*N,Ee=Math.round(ee);if(Ee>=0&&Ee<=b){const Ue=Kt(Ee),ie=Gn.value.map((ye,Ne)=>{const fe=H.series.findIndex(Oe=>Oe===ye),Je=ye.data[Ee];return{seriesName:ye.name,value:Je!==void 0?Je:null,color:a(fe),y:Je!==void 0?yn(ye,Je):null}}).filter(ye=>ye.value!==null);st.value={show:!0,x:Ue,categoryIndex:Ee,data:ie}}},to=()=>{st.value.show=!1,dl.value=!1,$o.value=!1,po.value||(Ml.value.show=!1),J.value.isDragging&&(J.value.isDragging=!1),J.value.zoomTimeout&&(clearTimeout(J.value.zoomTimeout),J.value.zoomTimeout=null),J.value.isZooming=!1,setTimeout(()=>{re.value=null,ht.value.show=!1},150)},Ol=t=>{if(t.preventDefault(),t.stopPropagation(),!at.value)return;const s=t.currentTarget.getBoundingClientRect(),n=t.clientX-s.left,i=t.clientY-s.top;if(fn.value){bt.value.show=!1,e.nextTick(()=>{bt.value.show=!0,bt.value.x=t.clientX,bt.value.y=t.clientY,bt.value.categoryIndex=null});return}const p=Math.max(0,F.value.left-20),g=F.value.right,C=F.value.top,b=F.value.bottom+80;n>=p&&n<=g&&i>=C&&i<=b&&(bt.value.show=!1,e.nextTick(()=>{bt.value.show=!0,bt.value.x=t.clientX,bt.value.y=t.clientY,bt.value.categoryIndex=null;const I=Math.max(F.value.left,Math.min(n,F.value.right))-F.value.left,$=F.value.width/Xl.value.length,B=Math.floor(I/$);B>=0&&B<Xl.value.length&&(bt.value.categoryIndex=B)}))},xn=t=>{if(!(t&&t.button===2)){if(bt.value.show&&t&&t.type==="click"){const s=document.querySelector(".dss-context-menu");if(s&&s.contains(t.target))return}bt.value.show=!1}},Yt=t=>{if(typeof t.template=="function"){const s={series:H.series,categories:H.categories,markers:Gt.value},n={chartX:bt.value.chartX,chartY:bt.value.chartY,dataX:bt.value.mouseDataX,dataY:bt.value.mouseDataY,categoryIndex:bt.value.categoryIndex};return t.template(s,n)}return t.template||t.label||""},_l=t=>{const s=["dss-context-menu-item"];return t.cssClass&&s.push(t.cssClass),s},$l=t=>t.style||{},k=t=>t.type&&O.value[t.type]?O.value[t.type]:t.customIcon?t.customIcon:In.value,y=t=>t==null?"":H.categories&&H.categories[t]?H.categories[t]:"",S=t=>Gt.value.length?Gt.value.filter(s=>s.categoryIndex===t):[],Z=t=>{if(!Cn.value&&!jt.value)return{x:0,y:0};const s=Kt(t),n=ne.value+F.value.bottom-W.value/2;return{x:s,y:n}},pe=()=>{Gt.value.forEach(t=>{if(t.categoryIndex!==void 0&&(Cn.value||jt.value)){const s=Z(t.categoryIndex);t.x=s.x,t.y=s.y}})},Bt=()=>{if(_e.value.description&&_e.value.description.length&&_e.value.date){if(Bn.value){const t=Gt.value.findIndex(s=>s.id===_e.value.editingMarkerId);t!==-1?(Gt.value[t].description=_e.value.description||"",Gt.value[t].color=_e.value.color||"",Gt.value[t].type=_e.value.type||"default",ce("update-marker",Gt.value[t])):ce("update-marker",{id:_e.value.editingMarkerId,description:_e.value.description||"",color:_e.value.color||"",type:_e.value.type||"default"})}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let s=ct(_e.value.date,H.categories||[]);if(jt.value){const{maxX:C}=qt.value;s=Math.max(0,Math.min(s,Math.floor(C)))}else Cn.value&&(s=Math.max(0,Math.min(s,qt.value.maxX)));const n=Kt(s),i=ne.value+F.value.bottom-W.value/2,p=Array.isArray(H.categories)?H.categories[s]:null,g={id:t,title:"",description:_e.value.description||"",color:_e.value.color||"",type:_e.value.type||"default",categoryIndex:s,x:n,y:i,marker_date:p||null};_e.value.categoryIndex=s,Gt.value.push(g),ce("add-marker",g)}lt(),kn()}},lt=()=>{_e.value.show=!1,_e.value.title="",_e.value.description="",_e.value.color="#FF6B6B",_e.value.type="default",_e.value.editingMarkerId=null,_e.value.readonly=!1,_e.value.categoryIndex=null,_e.value.fromButton=!1,_e.value.date=null},Jt=()=>{Bn.value&&(pn(_e.value.editingMarkerId),lt())},pn=t=>{const s=Gt.value.findIndex(n=>n.id===t);s!==-1&&(Gt.value.splice(s,1),kn()),ce("delete-marker",t)},cn=t=>{if(_e.value.show=!0,_e.value.title=t?.title??t?.comment??"",_e.value.description=t?.description??t?.comment??"",_e.value.color=t?.color??"",_e.value.type=t?.type??"default",_e.value.editingMarkerId=t?.id??t?.marker_id??null,_e.value.readonly=t?.readonly??!1,_e.value.categoryIndex=t?.categoryIndex??null,t?.marker_date){const[s,n,i]=String(t.marker_date).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(s),C=Number(n)-1;g&&n&&p?_e.value.date=new Date(p,C,g):_e.value.date=null}else _e.value.date=null},kn=()=>{try{const t=`dss-chart-markers-${H.chartId}`;localStorage.setItem(t,JSON.stringify(Gt.value))}catch(t){console.warn("Could not save markers to localStorage:",t)}},Yn=()=>{try{const t=`dss-chart-markers-${H.chartId}`,s=localStorage.getItem(t);if(s){const n=JSON.parse(s);Array.isArray(n)&&(Gt.value=n.map(i=>({...i,originalYOffset:i.originalYOffset!==void 0?i.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),Gt.value=[]}},On=t=>{const s=rt.value||"Chart",n=new Date().toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).replace(/\//g,"-");return`${s.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50).replace(/^-|-$/g,"")||"Chart"}-${n}.${t}`},_n=()=>{const t=st.value.show,s=ht.value.show;return st.value.show=!1,ht.value.show=!1,{originalCrosshair:t,originalTooltip:s}},el=t=>{st.value.show=t.originalCrosshair,ht.value.show=t.originalTooltip},Ll=async(t,s=32,n=32)=>new Promise((i,p)=>{if(t.startsWith("data:")){i(t);return}const g=new Image;g.crossOrigin="anonymous";const C=setTimeout(()=>{console.warn("Image conversion timeout for:",t),i(t)},5e3);g.onload=()=>{clearTimeout(C);try{const b=document.createElement("canvas"),I=b.getContext("2d");b.width=s,b.height=n,I.fillStyle="#fafafa",I.fillRect(0,0,s,n),I.drawImage(g,0,0,s,n);const N=b.toDataURL("image/png");i(N)}catch(b){console.warn("Canvas conversion failed:",b),i(t)}},g.onerror=b=>{clearTimeout(C),console.warn("Failed to load image:",t,b),i(t)},g.src=t}),Io=async()=>{try{const t=_n();setTimeout(async()=>{try{const s=A.value;if(!s){console.error("Chart SVG element not found"),el(t);return}const n=qe(),i=ke.value,p=de.value+n.height,g=s.cloneNode(!0);g.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text").forEach(fe=>fe.remove());const b=g.querySelectorAll("image"),I=Array.from(b).map(async fe=>{const Je=fe.getAttribute("xlink:href")||fe.getAttribute("href");if(Je&&!Je.startsWith("data:"))try{const Oe=await Ll(Je,32,32);fe.setAttribute("xlink:href",Oe),fe.setAttribute("href",Oe)}catch(Oe){console.warn("Failed to convert logo to base64:",Oe)}});await Promise.all(I);const $=new XMLSerializer().serializeToString(g).replace(/<svg[^>]*>/,"").replace("</svg>","");let B="",ee=30;if(rt.value&&(B+=`
|
|
46
|
+
<text x="24" y="${ee}"
|
|
47
47
|
font-family="Arial, sans-serif"
|
|
48
48
|
font-size="18"
|
|
49
49
|
font-weight="bold"
|
|
50
50
|
fill="#333">
|
|
51
|
-
${
|
|
52
|
-
</text>`,
|
|
53
|
-
<text x="24" y="${
|
|
51
|
+
${rt.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}
|
|
52
|
+
</text>`,ee+=30),Et.value&&(B+=`
|
|
53
|
+
<text x="24" y="${ee}"
|
|
54
54
|
font-family="Arial, sans-serif"
|
|
55
55
|
font-size="14"
|
|
56
56
|
fill="#666">
|
|
57
|
-
${
|
|
58
|
-
</text>`,
|
|
59
|
-
<g opacity="${
|
|
60
|
-
<g transform="translate(${
|
|
57
|
+
${Et.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}
|
|
58
|
+
</text>`,ee+=25),Q.value&&H.series.length>0){let fe=i-200,Je=rt.value||Et.value?35:25;const Oe=Math.floor((i-250)/120);let Te=0;H.series.forEach((Le,De)=>{if(!tt.value.has(De)){const Nt=a(De),Rt=Le.name.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");B+=`<circle cx="${fe+6}" cy="${Je-4}" r="6" fill="${Nt}"/>`,B+=`<text x="${fe+18}" y="${Je}" font-family="Arial, sans-serif" font-size="12" fill="#333">${Rt}</text>`,Te++,Te%Oe===0?(fe=i-200,Je+=20):fe+=Math.min(120,Rt.length*8+35)}})}let Ee="";if(Qe.value)try{const{width:fe,height:Je}=Dn.value,Oe=An.value,Te=F.value.left,Le=F.value.right,De=F.value.top,Nt=F.value.bottom,Rt=F.value.width,Wn=F.value.height;let mn,Zn;switch(Oe){case"center":mn=Te+(Rt-fe)/2,Zn=De+(Wn-Je)/2;break;case"top-left":mn=Te+15,Zn=De+5;break;case"top-right":mn=Le-fe-5,Zn=De+5;break;case"bottom-left":mn=Te+15,Zn=Nt-Je-5;break;case"bottom-right":default:mn=Le-fe-5,Zn=Nt-Je-5;break}Ee=`
|
|
59
|
+
<g opacity="${Ct.value}">
|
|
60
|
+
<g transform="translate(${mn}, ${Zn}) scale(${fe/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,7 +72,7 @@
|
|
|
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(
|
|
75
|
+
</g>`}catch(fe){console.warn("Watermark processing failed, skipping watermark in SVG:",fe),Ee=""}const Ue=`<?xml version="1.0" encoding="UTF-8"?>
|
|
76
76
|
<svg width="${i}" height="${p}"
|
|
77
77
|
xmlns="http://www.w3.org/2000/svg"
|
|
78
78
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
@@ -84,35 +84,35 @@
|
|
|
84
84
|
</style>
|
|
85
85
|
</defs>
|
|
86
86
|
<rect width="100%" height="100%" fill="#fafafa"/>
|
|
87
|
-
${
|
|
88
|
-
<g transform="translate(0, ${
|
|
89
|
-
${
|
|
87
|
+
${B}
|
|
88
|
+
<g transform="translate(0, ${n.height})">
|
|
89
|
+
${$}
|
|
90
90
|
${Ee}
|
|
91
91
|
</g>
|
|
92
|
-
</svg>`,
|
|
93
|
-
`),
|
|
94
|
-
`),t+=`# ${
|
|
92
|
+
</svg>`,ie=new Blob([Ue],{type:"image/svg+xml;charset=utf-8"}),ye=URL.createObjectURL(ie),Ne=document.createElement("a");Ne.href=ye,Ne.download=On("svg"),document.body.appendChild(Ne),Ne.click(),document.body.removeChild(Ne),URL.revokeObjectURL(ye),el(t),xn()}catch(s){console.error("Error downloading SVG:",s),el(t)}},50)}catch(t){console.error("Error downloading SVG:",t)}},go=async()=>{try{const t=_n();z.value&&z.value.offsetHeight,await new Promise(fe=>setTimeout(fe,300));const s=qe(),n=ke.value,i=de.value+s.height,p=document.createElement("canvas"),g=p.getContext("2d"),C=2;p.width=n*C,p.height=i*C,p.style.width=n+"px",p.style.height=i+"px",g.scale(C,C),g.fillStyle="#fafafa",g.fillRect(0,0,n,i);let b=30;if(rt.value&&(g.fillStyle="#333",g.font="bold 18px Arial, sans-serif",g.fillText(rt.value,24,b),b+=30),Et.value&&(g.fillStyle="#666",g.font="14px Arial, sans-serif",g.fillText(Et.value,24,b),b+=25),Q.value&&H.series.length>0){let fe=n-200,Je=rt.value||Et.value?35:25;const Oe=Math.floor((n-250)/120);let Te=0;g.font="12px Arial, sans-serif",H.series.forEach((Le,De)=>{if(!tt.value.has(De)){const Nt=a(De);g.beginPath(),g.arc(fe+6,Je-4,6,0,2*Math.PI),g.fillStyle=Nt,g.fill(),g.fillStyle="#333",g.fillText(Le.name,fe+18,Je),Te++,Te%Oe===0?(fe=n-200,Je+=20):fe+=Math.min(120,Le.name.length*8+35)}})}const N=A.value.cloneNode(!0),$=N.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text"),B=N.querySelectorAll(".dss-crosshair"),ee=N.querySelectorAll('[class*="tooltip"]');$.forEach(fe=>fe.remove()),B.forEach(fe=>fe.remove()),ee.forEach(fe=>fe.remove()),N.querySelectorAll("image").forEach((fe,Je)=>{const Oe=fe.getAttribute("xlink:href")||fe.getAttribute("href");if(Oe&&!Oe.startsWith("data:")){const Te=Ln.value[Je],Le=Te?a(Te.seriesIndex):"#3B82F6",De=fe.getAttribute("x")||0,Nt=fe.getAttribute("y")||0,Rt=fe.getAttribute("width")||32,Wn=fe.getAttribute("height")||32,mn=document.createElementNS("http://www.w3.org/2000/svg","circle");mn.setAttribute("cx",parseFloat(De)+parseFloat(Rt)/2),mn.setAttribute("cy",parseFloat(Nt)+parseFloat(Wn)/2),mn.setAttribute("r",Math.min(parseFloat(Rt),parseFloat(Wn))/2-1),mn.setAttribute("fill",Le),mn.setAttribute("stroke","#fafafa"),mn.setAttribute("stroke-width","2"),fe.parentNode.replaceChild(mn,fe)}});const Ue=new XMLSerializer().serializeToString(N),ie=new Blob([Ue],{type:"image/svg+xml;charset=utf-8"}),ye=URL.createObjectURL(ie),Ne=new Image;return new Promise((fe,Je)=>{Ne.onload=async()=>{try{if(g.drawImage(Ne,0,s.height),Ln.value.forEach(Oe=>{const Te=Oe.x,Le=Oe.y+s.height,De=(Oe.width||32)/2,Nt=a(Oe.seriesIndex);g.save(),g.beginPath(),g.arc(Te,Le,De-1,0,2*Math.PI),g.fillStyle=Nt,g.fill(),g.strokeStyle="#fafafa",g.lineWidth=2,g.stroke(),g.restore()}),Qe.value){const Oe=new Image,Te=()=>{const{width:De,height:Nt}=Dn.value,Rt=An.value,Wn=F.value.left,mn=F.value.right,Zn=F.value.top,To=F.value.bottom,ba=F.value.width,wa=F.value.height;let jl,Kl;switch(Rt){case"center":jl=Wn+(ba-De)/2,Kl=Zn+s.height+(wa-Nt)/2;break;case"top-left":jl=Wn+15,Kl=Zn+s.height+10;break;case"top-right":jl=mn-De-5,Kl=Zn+s.height+10;break;case"bottom-left":jl=Wn+15,Kl=To+s.height-Nt-5;break;case"bottom-right":default:jl=mn-De-5,Kl=To+s.height-Nt-5;break}g.globalAlpha=Ct.value,g.drawImage(Oe,jl,Kl,De,Nt),g.globalAlpha=1,Le()},Le=()=>{p.toBlob(De=>{const Nt=URL.createObjectURL(De),Rt=document.createElement("a");Rt.href=Nt,Rt.download=On("png"),document.body.appendChild(Rt),Rt.click(),document.body.removeChild(Rt),URL.revokeObjectURL(Nt),URL.revokeObjectURL(ye),el(t),xn(),fe()},"image/png")};Oe.onload=Te,Oe.onerror=Le,Oe.src=kl.value}else p.toBlob(Oe=>{const Te=URL.createObjectURL(Oe),Le=document.createElement("a");Le.href=Te,Le.download=On("png"),document.body.appendChild(Le),Le.click(),document.body.removeChild(Le),URL.revokeObjectURL(Te),URL.revokeObjectURL(ye),el(t),xn(),fe()},"image/png")}catch(Oe){URL.revokeObjectURL(ye),el(t),Je(Oe)}},Ne.onerror=()=>{URL.revokeObjectURL(ye),el(t),Je(new Error("Failed to load SVG image"))},Ne.src=ye})}catch(t){console.error("Error downloading PNG:",t)}},ho=()=>{try{let t="";rt.value&&(t+=`# ${M("chart.csv.chartTitle")}: ${rt.value}
|
|
93
|
+
`),Et.value&&(t+=`# ${M("chart.csv.chartSubtitle")}: ${Et.value}
|
|
94
|
+
`),t+=`# ${M("chart.csv.generated")}: ${new Date().toLocaleString()}
|
|
95
95
|
|
|
96
|
-
`,t+="Category",H.series.forEach(g=>{const
|
|
97
|
-
`;const s=Math.max(...H.series.map(g=>g.data?.length||0));for(let g=0;g<s;g++){let
|
|
98
|
-
`}const l=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(l),p=document.createElement("a");p.href=i,p.download=nl("csv"),document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(i),Zt()}catch(t){console.error("Error downloading CSV:",t)}},In=t=>{if(typeof t.action=="function"){const s={series:H.series,categories:H.categories,markers:at.value},l={chartX:wt.value.chartX,chartY:wt.value.chartY,dataX:wt.value.mouseDataX,dataY:wt.value.mouseDataY,categoryIndex:clampedCategoryIndex||wt.value.categoryIndex};t.action(s,l)}Zt()},To=()=>{x(),Pe.value.show=!0,Pe.value.categoryIndex=wt.value.categoryIndex,Pe.value.fromButton=!1,Zt()},po=()=>{x(),Pe.value.show=!0,Pe.value.categoryIndex=0,Pe.value.fromButton=!0},oo=t=>{if(wt.value.show){const s=document.querySelector(".dss-context-menu");s&&!s.contains(t.target)&&(wt.value.show=!1)}},ao=t=>{wt.value.show&&!t.target.closest(".context-menu")&&(wt.value.show=!1)},fo=t=>{if(!xl.value||!Me.value)return;t.preventDefault(),t.stopPropagation(),ae.value.isZooming=!0,xe.value.show=!1,ae.value.zoomTimeout&&clearTimeout(ae.value.zoomTimeout);const l=t.currentTarget.getBoundingClientRect(),i=t.clientX-l.left,p=t.clientY-l.top;if(i<O.value.left-50||i>O.value.right+50||p<O.value.top-50||p>O.value.bottom+100){ae.value.isZooming=!1;return}const g=t.deltaY>0?.9:1.1,b=Math.max(ae.value.minScale,Math.min(ae.value.maxScale,ae.value.scale*g));if(b!==ae.value.scale){const{minX:C,maxX:D}=Qt.value,L=D-C||1,R=L/ae.value.scale,N=C-ae.value.offsetX/O.value.width*L,G=(i-O.value.left)/O.value.width,Ee=N+G*R;ae.value.scale=b;const Ue=L/ae.value.scale,se=Ee-G*Ue;ae.value.offsetX=-(se-C)/L*O.value.width,ae.value.scale<=1.01&&(ae.value.scale=1,ae.value.offsetX=0)}ae.value.zoomTimeout=setTimeout(()=>{ae.value.isZooming=!1,ae.value.zoomTimeout=null},300)},vo=t=>{if(!xl.value||!Me.value||ae.value.scale<=1)return;xe.value.show=!1;const l=t.currentTarget.getBoundingClientRect();t.clientX-l.left,t.clientY-l.top,ae.value.isDragging=!0,ae.value.lastMouseX=t.clientX,ae.value.lastMouseY=t.clientY,t.preventDefault()},Ao=()=>{ae.value.isDragging=!1},so=()=>{!xl.value||!Me.value||(ae.value.scale=1,ae.value.offsetX=0,ae.value.isDragging=!1,ae.value.zoomTimeout&&(clearTimeout(ae.value.zoomTimeout),ae.value.zoomTimeout=null),ae.value.isZooming=!1)},Do=()=>!xl.value||!El.value||!Me.value?"default":ae.value.isDragging?"grabbing":ae.value.scale>1?"grab":"dss-crosshair",Fn=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 s=`M ${t[0].x} ${t[0].y}`;for(let l=0;l<t.length-1;l++){const i=t[Math.max(l-1,0)],p=t[l],g=t[l+1],b=t[Math.min(l+2,t.length-1)],C=p.x+(g.x-i.x)/6*Fe.value,D=p.y+(g.y-i.y)/6*Fe.value,L=g.x-(b.x-p.x)/6*Fe.value,R=g.y-(b.y-p.y)/6*Fe.value;s+=` C ${C} ${D} ${L} ${R} ${g.x} ${g.y}`}return s},Sl=e.computed(()=>{const s=I.value?.chart?.padding,l=typeof s=="number"?s:null,i=s&&typeof s=="object"?s:null,p=50;let g=p+(Ut.value?30:0)+60;if(Gl.value){const N={left:p+40,top:p+40,right:p+40,bottom:p+40};return l!=null?{left:l,top:l,right:l,bottom:l}:i?{left:i.left??N.left,top:i.top??N.top,right:i.right??N.right,bottom:i.bottom??N.bottom}:N}if(vl.value){const N=!Qe.value,G=Ul.value,Ee=G?yn.value+xn.value+Math.max(24,hn.value+16):0,Ue=N?12:p;let se=0;st.value&&(se+=N?8:15),St.value&&(se+=N?6:10);const he=We();let Be=Ue+(N?4:16)+(G?Ee:0),me=Ue+(G?Ee:0);Qe.value&<.value==="left"?Be+=he.legendWidth||150:Qe.value&<.value==="right"&&(me+=he.legendWidth||150);const qe=Ze.value==="semi-radial"?G?Ee:8:G?Ee:N?8:p+80,Le=G?14:0,$e=Ue+se+Le,Re={left:Be,top:$e,right:me,bottom:qe};return l!=null?{left:l,top:l,right:l,bottom:l}:i?{left:i.left??Re.left,top:i.top??Re.top,right:i.right??Re.right,bottom:i.bottom??Re.bottom}:Re}let b=0;st.value&&(b+=15),St.value&&(b+=10);const C=We();let D=p+16,L=p;Qe.value&<.value==="left"?D+=C.legendWidth||150:Qe.value&<.value==="right"&&(L+=C.legendWidth||150);const R={left:D,top:p+b,right:L,bottom:g};return l!=null?{left:l,top:l,right:l,bottom:l}:i?{left:i.left??R.left,top:i.top??R.top,right:i.right??R.right,bottom:i.bottom??R.bottom}:R}),O=e.computed(()=>({left:Sl.value.left,top:Sl.value.top,right:ke.value-Sl.value.right,bottom:de.value-Sl.value.bottom,width:ke.value-(Sl.value.left+Sl.value.right),height:de.value-(Sl.value.top+Sl.value.bottom)})),xl=e.computed(()=>["line","area","bar"].includes(Ze.value)||Pt.value),Ll=e.computed(()=>Pt.value),Bn=e.computed(()=>Ze.value==="mini-radial"),vl=e.computed(()=>["radial","semi-radial","mini-radial"].includes(Ze.value)),Gl=e.computed(()=>Ze.value==="spider"),al=e.computed(()=>Ze.value==="bubble"),gl=e.computed(()=>I.value?.chart?.orientation==="horizontal"&&(Ze.value==="bar"||Ll.value)),ln=t=>{const{minY:s,maxY:l}=Qt.value,i=l-s||1;return O.value.left+(t-s)/i*O.value.width},Tl=t=>{const{maxX:s}=Qt.value,l=s+1,p=O.value.height/l;return O.value.top+(t+.5)*p},Lt=e.computed(()=>vl.value?Sl.value.left+(ke.value-Sl.value.left-Sl.value.right)/2:ke.value/2),$t=e.computed(()=>Gl.value?de.value/2-40:vl.value?Sl.value.top+(de.value-Sl.value.top-Sl.value.bottom)/2:de.value/2),Et=e.computed(()=>{if(Gl.value){const t=O.value.width-80,s=O.value.height-80;return Math.min(t,s)/2}return Math.min(O.value.width,O.value.height)/2}),il=e.computed(()=>{const t=I.value,s=t?.plotOptions?.radialBar?.innerRadiusRatio??t?.radialBar?.innerRadiusRatio,l=typeof s=="number"&&s>=0&&s<=1?s:.45;return Et.value*l}),go=e.computed(()=>{const t=I.value,s=typeof H.innerSize=="number"?H.innerSize:t?.innerSize;return typeof s!="number"||s<=-100||!(vl.value||Gl.value)?1:1+s/100}),nn=e.computed(()=>{const t=go.value;if(t===1||t<=0)return;const s=Lt.value,l=$t.value;return`translate(${s}, ${l}) scale(${t}) translate(${-s}, ${-l})`}),Al=e.ref(0),on=e.computed(()=>`semi-radial-fill-clip-${H.chartId}`),zl=e.computed(()=>Ze.value==="semi-radial"),Gt=e.computed(()=>zl.value&&ze.value&&!ml.value),zn=e.computed(()=>zl.value&&ze.value&&!ml.value&&bt.value==="fill"),ho=e.computed(()=>{const t=Gt.value?Al.value:1,s=Lt.value,l=$t.value,i=il.value,p=Et.value,g=Math.PI,b=Math.PI+t*Math.PI;if(t<=0)return`M ${s} ${l} L ${s} ${l} Z`;const C=s+p*Math.cos(g),D=l+p*Math.sin(g),L=s+p*Math.cos(b),R=l+p*Math.sin(b),N=s+i*Math.cos(b),G=l+i*Math.sin(b),Ee=s+i*Math.cos(g),Ue=l+i*Math.sin(g),se=t>.5?1:0;return`M ${s} ${l} L ${C} ${D} A ${p} ${p} 0 ${se} 1 ${L} ${R} L ${N} ${G} A ${i} ${i} 0 ${se} 1 ${Ee} ${Ue} Z`}),mn=e.computed(()=>{if(!(!zl.value||!Gt.value)&&!zn.value)return`url(#${on.value})`}),kn=t=>{if(!(!zn.value||t!==0))return`url(#${on.value})`},Dl=e.ref(0),pn=e.computed(()=>`radial-reveal-clip-${H.chartId}`),Bl=e.computed(()=>Ze.value==="radial"),Ho=e.computed(()=>{const t=Bl.value?Dl.value:1,s=Lt.value,l=$t.value,i=Math.max(Et.value*1.5,ke.value,de.value);if(t<=0)return`M ${s} ${l} L ${s} ${l} Z`;if(t>=1){const N=s-i,G=s+i;return`M ${N} ${l} A ${i} ${i} 0 0 1 ${G} ${l} A ${i} ${i} 0 0 1 ${N} ${l} Z`}const p=-Math.PI/2,g=p+t*Math.PI*2,b=s+i*Math.cos(p),C=l+i*Math.sin(p),D=s+i*Math.cos(g),L=l+i*Math.sin(g),R=t>=.5?1:0;return`M ${s} ${l} L ${b} ${C} A ${i} ${i} 0 ${R} 1 ${D} ${L} Z`}),Ro=e.computed(()=>{if(mn.value)return mn.value;if(Bl.value)return`url(#${pn.value})`});let an=null;const yo=()=>{if(!Gt.value)return;Al.value=0;const t=zt.value,s=performance.now(),l=i=>{const p=i-s,g=Math.min(1,p/t);Al.value=Ol(Xt.value,g),g<1&&(an=requestAnimationFrame(l))};an=requestAnimationFrame(l)},Mn=e.computed(()=>I.value?.bubbles?.minSize||8),ko=e.computed(()=>I.value?.bubbles?.maxSize||50),Co=e.computed(()=>I.value?.bubbles?.opacity||.7),bo=(t,s)=>{const l=[15,20,25,18,22],i=l[t%l.length]||20,p=1+Math.sin(s*.5)*.2;return Math.max(5,i*p)},Un=t=>{const s=document.querySelector(`.dss-bubble-image-${t}`);s&&(s.style.opacity="1")},ro=t=>{const s=document.querySelector(`.dss-bubble-image-${t}`);s&&(s.style.display="none")},Pl=e.computed(()=>H.series),Cn=e.computed(()=>H.series.filter((t,s)=>!Wt.value.has(s))),sn="auto",Qt=e.computed(()=>{if(al.value)return wo();if(!Cn.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=1/0,s=-1/0,l=0;Cn.value.forEach(C=>{C.data&&C.data.length&&(l=Math.max(l,C.data.length-1),C.data.forEach(D=>{typeof D=="number"&&(t=Math.min(t,D),s=Math.max(s,D))}))}),H.categories.length>0&&(l=Math.max(l,H.categories.length-1)),t===1/0&&(t=0,s=100);const i=j.value,p=ce.value;let g,b;if(i===sn){const C=s-t,D=C>0?C*.1:1;g=Math.max(0,t-D)}else if(typeof i=="number")g=i;else{const C=s-t,D=C>0?C*.1:1;g=Math.max(0,t-D)}if(p===sn){const C=s-t,D=C>0?C*.1:2;b=s+D}else if(typeof p=="number")b=p;else{const C=s-t,D=C>0?C*.1:2;b=s+D}return{minX:0,maxX:l,minY:g,maxY:b}}),wo=()=>{if(!Cn.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,s=-1/0,l=1/0,i=-1/0,p=1/0,g=-1/0,b=!1;if(Cn.value.forEach((Ee,Ue)=>{Ee?.data?.length&&Ee.data.forEach((se,he)=>{let Be,me,et;if(typeof se=="object"&&se!==null&&!Array.isArray(se))Be=typeof se.x=="number"?se.x:he,me=typeof se.y=="number"?se.y:0,et=typeof se.size=="number"?se.size:20;else if(Array.isArray(se)&&se.length>=3)Be=typeof se[0]=="number"?se[0]:he,me=typeof se[1]=="number"?se[1]:0,et=typeof se[2]=="number"?se[2]:20;else if(typeof se=="number")Be=he,me=se,et=bo(Ue,he);else return;isFinite(Be)&&isFinite(me)&&isFinite(et)&&(t=Math.min(t,Be),s=Math.max(s,Be),l=Math.min(l,me),i=Math.max(i,me),p=Math.min(p,et),g=Math.max(g,et),b=!0)})}),!b)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===s&&(t=Math.min(t,0),s=Math.max(s,H.categories?.length-1||8)),l===i&&(l=Math.max(0,l-10),i=l+20);const C=s-t,D=i-l;let L,R,N,G;return Ie.value!==null?L=Ie.value:L=t-C*.1,Xe.value!==null?R=Xe.value:R=s+C*.1,j.value!==null&&typeof j.value=="number"?N=j.value:N=Math.max(0,l-D*.1),ce.value!==null&&typeof ce.value=="number"?G=ce.value:G=i+D*.1,{minX:L,maxX:R,minY:N,maxY:G,minSize:p,maxSize:g}},sl=t=>{if(al.value){const{minX:C,maxX:D}=Qt.value,L=D-C||1;return O.value.left+(t-C)/L*O.value.width}const{minX:s,maxX:l}=Qt.value,i=l-s;if(l===0||i===0)return O.value.left+O.value.width/2;const p=i/ae.value.scale,g=s-ae.value.offsetX/O.value.width*i,b=(t-g)/p;return O.value.left+b*O.value.width},hl=t=>{const{minY:s,maxY:l}=Qt.value,i=l-s||1;return O.value.bottom-(t-s)/i*O.value.height},xo=t=>{if(!al.value)return vt.value||4;const{maxSize:s}=Qt.value,l=Math.max(1,s),i=Math.min(1,Math.max(0,t/l));return Mn.value+i*(ko.value-Mn.value)},Io=e.computed(()=>Xn.value.map(t=>({y:t.y}))),bn=e.computed(()=>{if(al.value)return fn();if(Ze.value==="bar"){if(gl.value){const $e=[],{minY:Re,maxY:Nt}=Qt.value,It=5,ql=Nt-Re||1;for(let pl=0;pl<=It;pl++){const Wl=Re+ql*(pl/It),No=ln(Wl);$e.push({x:No,y:O.value.bottom+20,text:fl(Math.round(Wl))})}return $e}const he=[],{maxX:Be}=Qt.value,me=Be+1,et=5,Le=(O.value.width-et*2)/me;for(let $e=0;$e<=Be;$e++){const Re=O.value.left+et+($e+.5)*Le;he.push({x:Re,y:O.value.bottom+20,text:H.categories[$e]||B("chart.fallback.item",{number:$e+1})})}return he}const t=[],{minX:s,maxX:l}=Qt.value,i=Ie.value!==null?Ie.value:s,p=Xe.value!==null?Xe.value:l,g=p-i||1,b=g/ae.value.scale,C=i-ae.value.offsetX/O.value.width*g,D=C+b,L=Math.max(0,Math.floor(C-2)),R=Math.min(p,Math.ceil(D+2)),N=R-L,G=O.value.width,Ue=Math.floor(G/60);let se=1;N>Ue&&(se=Math.ceil(N/Ue));for(let he=L;he<=R;he+=se)if(he>=0&&he<=p){const Be=sl(he);Be>=O.value.left-100&&Be<=O.value.right+100&&t.push({x:Be,y:O.value.bottom+20,text:H.categories[he]||`Item ${he+1}`})}return t}),fn=()=>{const t=[],{minX:s,maxX:l}=Qt.value,i=l-s||1,p=Math.min(8,Math.max(4,Math.floor(O.value.width/80)));for(let g=0;g<=p;g++){const b=s+i*g/p,C=sl(b);if(C>=O.value.left-10&&C<=O.value.right+10){const D=Math.round(b),L=H.categories?.[D];t.push({x:C,y:O.value.bottom+20,text:L||(Number.isInteger(b)?b.toString():b.toFixed(1))})}}return t},Xn=e.computed(()=>{if(gl.value){const p=[],{maxX:g}=Qt.value;for(let b=0;b<=g;b++)p.push({x:O.value.left-10,y:Tl(b),text:H.categories[b]||`Item ${b+1}`});return p}const t=[],{minY:s,maxY:l}=Qt.value,i=5;for(let p=0;p<=i;p++){const g=s+(l-s)*(p/i),b=Math.round(g);t.push({x:O.value.left-10,y:hl(g),text:fl(b)})}return t}),Kt=t=>{const s=Vt.value;if(!s||s.length===0){const l=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return l[t%l.length]}return s[t%s.length]},Fo=t=>{if(!t||typeof t!="string")return"#3a3a3a";const s=t.trim();let l=0,i=0,p=0;const g=s.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(g)l=Number(g[1])/255,i=Number(g[2])/255,p=Number(g[3])/255;else{const C=s.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(C)l=Number(C[1])/255,i=Number(C[2])/255,p=Number(C[3])/255;else{const D=s.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(D){let L=D[1];L.length===3&&(L=L[0]+L[0]+L[1]+L[1]+L[2]+L[2]),l=parseInt(L.slice(0,2),16)/255,i=parseInt(L.slice(2,4),16)/255,p=parseInt(L.slice(4,6),16)/255}else if(typeof document<"u"){const L=document.createElement("span");L.style.color=s,L.style.display="none",document.body.appendChild(L);const R=getComputedStyle(L).color;document.body.removeChild(L);const N=R.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(N)l=Number(N[1])/255,i=Number(N[2])/255,p=Number(N[3])/255;else return"#3a3a3a"}else return"#3a3a3a"}}return .2126*l+.7152*i+.0722*p>.5?"#3a3a3a":"#fafafa"},io=t=>{if(!t||typeof t!="string")return t;const s=t.trim(),l=s.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(l){const g=Math.max(0,Math.floor(Number(l[1])*.65)),b=Math.max(0,Math.floor(Number(l[2])*.65)),C=Math.max(0,Math.floor(Number(l[3])*.65));return`rgb(${g}, ${b}, ${C})`}const i=s.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(i){const g=Math.max(0,Math.floor(Number(i[1])*.65)),b=Math.max(0,Math.floor(Number(i[2])*.65)),C=Math.max(0,Math.floor(Number(i[3])*.65));return`rgba(${g}, ${b}, ${C}, ${i[4]})`}const p=s.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(p){let g=p[1];g.length===3&&(g=g[0]+g[0]+g[1]+g[1]+g[2]+g[2]);const b=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(0,2),16)*.65))),C=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(2,4),16)*.65))),D=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(4,6),16)*.65)));return`#${[b,C,D].map(L=>L.toString(16).padStart(2,"0")).join("")}`}return s},co=(t,s)=>{const i=I.value?.stroke?.color;return i==null?io(s):typeof i=="string"?i:Array.isArray(i)&&i.length?i[t%i.length]??io(s):io(s)},_n=t=>{let s=0;for(let l=1;l<t.length;l++){const i=t[l].x-t[l-1].x,p=t[l].y-t[l-1].y;s+=Math.sqrt(i*i+p*p)}return s},Hl=e.computed(()=>Ze.value==="line"||Ll.value?(Ll.value?H.series.filter(s=>(s.type||Ze.value)==="line"):Pl.value).map((s,l)=>{const i=H.series.findIndex(N=>N===s),p=[];let g=[];s.data.forEach((N,G)=>{N==null?g.length>0&&(p.push([...g]),g=[]):g.push({x:gl.value?ln(N):sl(G),y:gl.value?Tl(G):hl(N),index:G})}),g.length>0&&p.push(g);let b="";p.forEach(N=>{if(N.length>0){let G="";re.value?G=Fn(N):G=`M ${N[0].x} ${N[0].y}`+N.slice(1).map(Ee=>` L ${Ee.x} ${Ee.y}`).join(""),b+=(b?" ":"")+G}});const C=p.reduce((N,G)=>N+_n(G),0),D=Wt.value.has(i),L=be.value===i,R=be.value!==null&&be.value!==i;return{path:b,color:Kt(i),pathLength:C,seriesIndex:i,animationDelay:l*Rt.value,isHighlighted:L,isDimmed:R,isHidden:D}}):[]),Eo=e.computed(()=>{if(!(Ze.value==="line"||Ll.value))return[];const t=Ll.value?H.series.filter(l=>(l.type||Ze.value)==="line"):Pl.value,s=[];return t.forEach((l,i)=>{const p=H.series.findIndex(g=>g===l);for(let g=0;g<l.data.length-1;g++){const b=l.data[g];if(b!=null){let C=-1,D=0;for(let L=g+1;L<l.data.length;L++){const R=l.data[L];if(R==null)D++;else{C=L;break}}if(D>0&&C!==-1){const L=l.data[C],R=gl.value?ln(b):sl(g),N=gl.value?Tl(g):hl(b),G=gl.value?ln(L):sl(C),Ee=gl.value?Tl(C):hl(L),Ue=Wt.value.has(p),se=be.value===p,he=be.value!==null&&be.value!==p;s.push({path:`M ${R} ${N} L ${G} ${Ee}`,color:Kt(p),seriesIndex:p,animationDelay:i*Rt.value,isHighlighted:se,isDimmed:he,isHidden:Ue,gapSize:D}),g=C-1}}}}),s}),wn=e.computed(()=>Ze.value==="line"||Ll.value?!ze.value||ml.value||ht.value.hasAnimated?[]:(Ll.value?H.series.filter(s=>(s.type||Ze.value)==="line"):Pl.value).map((s,l)=>{const i=H.series.findIndex(D=>D===s);let p="",g=null;s.data.forEach((D,L)=>{if(D!=null){const R={x:gl.value?ln(D):sl(L),y:gl.value?Tl(L):hl(D)};g===null?p+=`M ${R.x} ${R.y}`:p+=` L ${R.x} ${R.y}`,g=R}else if(g!==null){const R=s.data.findIndex((N,G)=>G>L&&N!==null&&N!==void 0);if(R!==-1){const N={x:gl.value?ln(s.data[R]):sl(R),y:gl.value?Tl(R):hl(s.data[R])};p+=` L ${N.x} ${N.y}`,g=N}}});const b=s.data.map((D,L)=>D==null?null:{x:gl.value?ln(D):sl(L),y:gl.value?Tl(L):hl(D)}).filter(D=>D!==null),C=_n(b);return{path:p,pathLength:C,color:Kt(i),animationDelay:l*Rt.value,seriesIndex:i}}):[]),uo=e.computed(()=>{if(Ze.value!=="line")return[];const t=[];return Pl.value.forEach((s,l)=>{const i=be.value===l,p=be.value!==null&&be.value!==l,g=Wt.value.has(l);s.data.forEach((b,C)=>{b!=null&&t.push({x:sl(C),y:hl(b),color:Kt(l),value:b,label:H.categories[C]||C.toString(),seriesName:s.name,categoryIndex:C,dataIndex:C,animationDelay:(l*s.data.length+C)*(Rt.value/8),isHighlighted:i,isDimmed:p,isHidden:g})})}),t}),zo=e.computed(()=>{if(!Ll.value)return[];const t=[];return H.series.filter(l=>(l.type||Ze.value)==="line").forEach((l,i)=>{const p=H.series.findIndex(D=>D===l),g=be.value===p,b=be.value!==null&&be.value!==p,C=Wt.value.has(p);l.data.forEach((D,L)=>{D!=null&&t.push({x:sl(L),y:hl(D),color:Kt(p),value:D,label:H.categories[L]||L.toString(),seriesName:l.name,categoryIndex:L,dataIndex:L,animationDelay:(i*l.data.length+L)*(Rt.value/8),isHighlighted:g,isDimmed:b,isHidden:C})})}),t}),Pn=e.computed(()=>{if(!al.value)return[];const t=[];return Pl.value.forEach((s,l)=>{if(!s?.data?.length)return;const i=be.value,p=i!==null&&i===l,g=i!==null&&i!==l,b=Wt.value.has(l);s.data.forEach((C,D)=>{let L,R,N,G,Ee;if(typeof C=="object"&&C!==null&&!Array.isArray(C))L=typeof C.x=="number"?C.x:D,R=typeof C.y=="number"?C.y:0,N=typeof C.size=="number"?C.size:20,G=C.label||H.categories?.[D]||`Point ${D+1}`,Ee=C.image||C.imageUrl;else if(Array.isArray(C)&&C.length>=3)L=typeof C[0]=="number"?C[0]:D,R=typeof C[1]=="number"?C[1]:0,N=typeof C[2]=="number"?C[2]:20,G=C[3]||H.categories?.[D]||`Point ${D+1}`,Ee=C[4];else if(typeof C=="number")L=D,R=C,N=bo(l,D),G=H.categories?.[D]||`Point ${D+1}`;else return;!isFinite(L)||!isFinite(R)||!isFinite(N)||t.push({x:sl(L),y:hl(R),radius:xo(N),originalX:L,originalY:R,originalSize:N,color:Kt(l),seriesName:s.name||`Series ${l+1}`,label:G,imageUrl:Ee,seriesIndex:l,dataIndex:D,categoryIndex:Math.round(L),isHighlighted:p,isDimmed:g,isHidden:b,opacity:Co.value})})}),t}),Yn=e.computed(()=>Ze.value!=="area"?[]:Pl.value.map((t,s)=>{const l=[];let i=[];if(t.data.forEach((N,G)=>{N==null?i.length>0&&(l.push([...i]),i=[]):i.push({x:sl(G),y:hl(N),index:G})}),i.length>0&&l.push(i),l.length===0)return{linePath:"",areaPath:"",color:Kt(s),isHidden:Wt.value.has(s)};const p=O.value.bottom+1;let g="",b="";l.forEach((N,G)=>{if(N.length===0)return;let Ee=`M ${N[0].x} ${N[0].y}`;re.value&&N.length>1?Ee=Fn(N):N.slice(1).forEach(se=>{Ee+=` L ${se.x} ${se.y}`}),g+=(g?" ":"")+Ee;let Ue=`M ${N[0].x} ${p}`;if(Ue+=` L ${N[0].x} ${N[0].y}`,re.value&&N.length>1){const se=Fn(N),he=se.substring(se.indexOf("C")||se.indexOf("Q")||se.indexOf("L"));he?Ue+=" "+he:N.slice(1).forEach(Be=>{Ue+=` L ${Be.x} ${Be.y}`})}else N.slice(1).forEach(se=>{Ue+=` L ${se.x} ${se.y}`});Ue+=` L ${N[N.length-1].x} ${p} Z`,b+=(b?" ":"")+Ue});const C=be.value===s,D=be.value!==null&&be.value!==s,L=Wt.value.has(s),R=l.reduce((N,G)=>N+_n(G),0);return{linePath:g,areaPath:b,color:Kt(s),pathLength:R,isHighlighted:C,isDimmed:D,isHidden:L}})),o=e.computed(()=>{if(!(["bar"].includes(Ze.value)||Ll.value))return[];const t=[],{maxX:s}=Qt.value,l=Ll.value?H.series.filter(p=>(p.type||Ze.value)==="bar"):Pl.value,i=l.length;if(gl.value){const p=s+1,b=O.value.height/p,C=b*(2/3),D=Math.min(4,C/i*.15),L=C-(i-1)*D,R=Math.max(4,L/i);l.forEach((N,G)=>{const Ee=H.series.findIndex(Be=>Be===N),Ue=be.value===Ee,se=be.value!==null&&be.value!==Ee,he=Wt.value.has(Ee);N.data.forEach((Be,me)=>{if(Be==null||typeof Be!="number"||!isFinite(Be))return;const Le=O.value.top+(me+.5)*b-C/2+G*(R+D),$e=O.value.left,Re=Math.abs(ln(Be)-O.value.left);let Nt="";if(re.value&&Re>0){const It=Math.min(ut.value,R/2,Re/2);Nt=[`M ${$e} ${Le}`,`L ${$e+Re-It} ${Le}`,`Q ${$e+Re} ${Le} ${$e+Re} ${Le+It}`,`L ${$e+Re} ${Le+R-It}`,`Q ${$e+Re} ${Le+R} ${$e+Re-It} ${Le+R}`,`L ${$e} ${Le+R}`,"Z"].join(" ")}t.push({x:$e,y:Le,width:Re,height:R,color:Kt(i===1?me:Ee),value:Be,label:H.categories[me]||me.toString(),seriesName:N.name,animationDelay:(G*l.length+me)*(Rt.value/4),isHighlighted:Ue,isDimmed:se,isHidden:he,barPath:Nt,isSmooth:re.value&&Re>0})})})}else{const p=s+1,b=O.value.width/p,C=b*.8,D=C/i,L=D*.05,R=D-L;l.forEach((N,G)=>{const Ee=H.series.findIndex(Be=>Be===N),Ue=be.value===Ee,se=be.value!==null&&be.value!==Ee,he=Wt.value.has(Ee);N.data.forEach((Be,me)=>{if(Be==null||typeof Be!="number"||!isFinite(Be))return;const Le=O.value.left+(me+.5)*b-C/2+G*D+L/2,$e=hl(Math.max(0,Be)),Re=Math.abs(hl(0)-hl(Be));let Nt="";if(re.value&&Re>0){const It=Math.min(ut.value,R/2,Re/2);Nt=[`M ${Le} ${$e+Re}`,`L ${Le} ${$e+It}`,`Q ${Le} ${$e} ${Le+It} ${$e}`,`L ${Le+R-It} ${$e}`,`Q ${Le+R} ${$e} ${Le+R} ${$e+It}`,`L ${Le+R} ${$e+Re}`,"Z"].join(" ")}t.push({x:Le,y:$e,width:R,height:Re,color:Kt(i===1?me:Ee),value:Be,label:H.categories[me]||me.toString(),seriesName:N.name,animationDelay:(G*l.length+me)*(Rt.value/4),isHighlighted:Ue,isDimmed:se,isHidden:he,barPath:Nt,isSmooth:re.value&&Re>0})})})}return t}),n=e.computed(()=>{if(!vl.value)return[];const t=Pl.value.map((b,C)=>({series:b,originalIndex:C})).filter(({originalIndex:b})=>!Wt.value.has(b));if(t.length===0)return[];let s=Ze.value==="semi-radial"?Math.PI:-Math.PI/2;const l=Ze.value==="semi-radial"?Math.PI:Math.PI*2,i=[],p=(b,C,D,L,R,N)=>{const G=b+(C-b)/2,Ee=C-b,Ue=Lt.value+Math.cos(b)*il.value,se=$t.value+Math.sin(b)*il.value,he=Lt.value+Math.cos(C)*il.value,Be=$t.value+Math.sin(C)*il.value,me=Lt.value+Math.cos(C)*Et.value,et=$t.value+Math.sin(C)*Et.value,qe=Lt.value+Math.cos(b)*Et.value,Le=$t.value+Math.sin(b)*Et.value,$e=Ee>Math.PI?1:0,Re=[`M ${Ue} ${se}`,`A ${il.value} ${il.value} 0 ${$e} 1 ${he} ${Be}`,`L ${me} ${et}`,`A ${Et.value} ${Et.value} 0 ${$e} 0 ${qe} ${Le}`,"Z"].join(" "),Nt=N||Kt(D);return{path:Re,color:Nt,strokeWidth:tt.value,strokeColor:co(i.length,Nt),value:R,seriesName:L,opacity:.8,isHighlighted:be.value===D,isDimmed:be.value!==null&&be.value!==D,isHidden:!1,startAngle:b,endAngle:C,midAngle:G}};if(Bn.value){const{series:b,originalIndex:C}=t[0],D=Number(b?.data?.[0]??0),L=Number.isFinite(D)?Math.min(Math.max(D,0),100):0,R=I.value,N=Math.min(Math.max(Number(R?.miniRadial?.minVisiblePercent??1),0),100),Ee=(L<=0?N:L)/100*l,Ue=Number(R?.miniRadial?.thresholds?.low??33),se=Number(R?.miniRadial?.thresholds?.medium??66),he=R?.miniRadial?.colors?.low||"#E53E3E",Be=R?.miniRadial?.colors?.medium||"#ED8936",me=R?.miniRadial?.colors?.high||"#38A169",et=L<=Ue?he:L<=se?Be:me,qe=R?.miniRadial?.trackColor||"#E5E7EB",Le=b?.name||"Score";return i.push(p(s,s+l-.001,C+1,"Track",100,qe)),i.push(p(s,s+Ee,C,Le,L,et)),i}if(t.length===1){const{series:b,originalIndex:C}=t[0],D=b.data[0]||0,L=s,R=s+l-.001,N=L+l/2,G=Lt.value+Math.cos(L)*il.value,Ee=$t.value+Math.sin(L)*il.value,Ue=Lt.value+Math.cos(R)*il.value,se=$t.value+Math.sin(R)*il.value,he=Lt.value+Math.cos(R)*Et.value,Be=$t.value+Math.sin(R)*Et.value,me=Lt.value+Math.cos(L)*Et.value,et=$t.value+Math.sin(L)*Et.value,qe=1,Le=[`M ${G} ${Ee}`,`A ${il.value} ${il.value} 0 ${qe} 1 ${Ue} ${se}`,`L ${he} ${Be}`,`A ${Et.value} ${Et.value} 0 ${qe} 0 ${me} ${et}`,"Z"].join(" "),$e=Kt(C);return i.push({path:Le,color:$e,strokeWidth:tt.value,strokeColor:co(0,$e),value:D,seriesName:b.name,opacity:.8,isHighlighted:be.value===C,isDimmed:!1,isHidden:!1,startAngle:L,endAngle:R,midAngle:N}),i}if(zn.value&&t.length===2){const b=t[0],C=t[1],D=Math.min(100,Math.max(0,b.series.data[0]||0)),L=D/100*l;return i.push(p(s,s+L,b.originalIndex,b.series.name,D)),i.push(p(s,s+l,C.originalIndex,C.series.name,100)),i}const g=t.reduce((b,{series:C})=>b+(C.data[0]||0),0);return g===0?[]:(t.forEach(({series:b,originalIndex:C})=>{const D=b.data[0]||0,L=D/g*l,R=s,N=s+L,G=R+L/2,Ee=Lt.value+Math.cos(R)*il.value,Ue=$t.value+Math.sin(R)*il.value,se=Lt.value+Math.cos(N)*il.value,he=$t.value+Math.sin(N)*il.value,Be=Lt.value+Math.cos(N)*Et.value,me=$t.value+Math.sin(N)*Et.value,et=Lt.value+Math.cos(R)*Et.value,qe=$t.value+Math.sin(R)*Et.value,Le=L>Math.PI?1:0,$e=[`M ${Ee} ${Ue}`,`A ${il.value} ${il.value} 0 ${Le} 1 ${se} ${he}`,`L ${Be} ${me}`,`A ${Et.value} ${Et.value} 0 ${Le} 0 ${et} ${qe}`,"Z"].join(" "),Re=Kt(C);i.push({path:$e,color:Re,strokeWidth:tt.value,strokeColor:co(i.length,Re),value:D,seriesName:b.name,opacity:.8,isHighlighted:be.value===C,isDimmed:be.value!==null&&be.value!==C,isHidden:!1,startAngle:R,endAngle:N,midAngle:G}),s=N}),i)}),a=e.computed(()=>{const t=n.value;return zn.value&&t.length>=2?[{segment:t[1],originalIndex:1},{segment:t[0],originalIndex:0}]:t.map((s,l)=>({segment:s,originalIndex:l}))}),r=e.computed(()=>{if(!Ul.value||!vl.value)return[];const t=hn.value,s=yn.value,l=xn.value,i=qn.value,p=15,g=t*1.3,b=.55,C=(N,G)=>{const Ee=Lt.value+Math.cos(N.midAngle)*Et.value,Ue=$t.value+Math.sin(N.midAngle)*Et.value,se=Lt.value+Math.cos(N.midAngle)*(Et.value+s),he=$t.value+Math.sin(N.midAngle)*(Et.value+s),me=se+l*(G?1:-1),et=G?se+p:se-p,qe=he-i,Le=`${N.seriesName}: ${fl(N.value)}`,$e=Le.length*t*b;return{pointerStartX:Ee,pointerStartY:Ue,pointerEndX:se,pointerEndY:he,horizontalEndX:me,horizontalEndY:he,textX:et,textY:qe,text:Le,textWidth:$e,textAnchor:G?"start":"end",isRightSide:G,pointerLineLength:Math.hypot(se-Ee,he-Ue),horizontalLineLength:Math.hypot(me-se,0)}},D=(N,G)=>{const Ee=Math.abs(N.textY-G.textY)<g,Ue=N.isRightSide?N.textX:N.textX-N.textWidth,se=N.isRightSide?N.textX+N.textWidth:N.textX,he=G.isRightSide?G.textX:G.textX-G.textWidth,Be=G.isRightSide?G.textX+G.textWidth:G.textX,me=Ue<Be&&he<se;return Ee&&me},L=n.value.filter(N=>!N.isHidden),R=[];for(let N=0;N<L.length;N++){const G=L[N];let Ee=Math.cos(G.midAngle)>=0;if(N>0){const se=R[N-1],he=C(G,Ee);D(se,he)&&(Ee=!Ee)}const Ue=C(G,Ee);R.push({...Ue,color:G.color,isHighlighted:G.isHighlighted,isDimmed:G.isDimmed})}return R}),c=t=>{if(!t||t.isHidden)return 0;const s=t.opacity||Co.value||.7;return be.value===null||be.value===void 0?s:be.value!==null?t.seriesIndex===be.value?Math.min(1,s+.1):Math.max(.5,s*.8):s},d=t=>{if(!t||t.isHidden)return 0;const s=t.radius>20?.9:.8;return be.value!==null?t.seriesIndex===be.value?Math.min(1,s+.1):s*.7:s},u=(t,s)=>{if(t)try{if(be.value===t.seriesIndex?be.value=null:be.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const l=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:s,chartId:H.chartId}});window.dispatchEvent(l)}}catch(l){console.error("Error in onBubbleClick:",l)}},m=(t,s)=>{const l=[`dss-bubble-fallback-${s}`];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(" ")},v=(t,s)=>{if(!t||(s.stopPropagation(),On.value=!0,be.value=t.seriesIndex,xe.value.show=!1,!qt.value))return;const l=s.target.closest(".dss-custom-chart-container");if(!l)return;const i=l.getBoundingClientRect();let p=s.clientX-i.left+10,g=s.clientY-i.top-10;const b=200,C=120;p+b>ke.value&&(p=s.clientX-i.left-b-10),g+C>i.height&&(g=s.clientY-i.top-C-10),p<0&&(p=10),g<0&&(g=10);const D=Tn.value,L=An.value,R=D.map(N=>{const G=L[N]||N,Ee=h(N,t);return Ee?{seriesName:t.seriesName,label:t.label,value:`${G}: ${Ee}`,color:t.color}:null}).filter(Boolean);rt.value={show:!0,x:p,y:g,title:t.label||t.seriesName||"",value:"",bubbleData:R,categoryIndex:void 0,spiderAreas:[]}},h=(t,s)=>{let l;switch(t){case"x":l=s.originalX;break;case"y":l=s.originalY;break;case"size":l=s.originalSize;break;case"label":l=s.label;break;case"seriesName":l=s.seriesName;break;default:l=s[t]||""}const i=Vn.value[t];if(typeof i=="function")return i(l,s);if(typeof l=="number"){const p=l.toFixed(1);return Tt.value?p+Tt.value:p}return l?.toString()||""},M=()=>{if(!al.value||!xe.value.data||xe.value.data.length===0)return"Bubbles";const t=[],s=new Set;return xe.value.data.forEach(l=>{if(l.seriesName&&l.label){const i=`${l.seriesName} - ${l.label}`;s.has(i)||(t.push(i),s.add(i))}else l.seriesName&&(s.has(l.seriesName)||(t.push(l.seriesName),s.add(l.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},T=(t,s)=>{t&&(On.value=!1,be.value=null,rt.value.show=!1,rt.value.bubbleData=[])},E=(t,s)=>{const l=s.target.closest(".dss-custom-chart-container");if(!l)return;const i=l.getBoundingClientRect(),p=jt(t.categoryIndex),g=t.description||t.comment||"";let b=s.clientX-i.left+15,C=s.clientY-i.top-10;const D=200,L=g?80:50;b+D>ke.value&&(b=s.clientX-i.left-D-15),C+L>de.value&&(C=s.clientY-i.top-L-10),b<0&&(b=10),C<0&&(C=10),Mt.value={show:!0,x:b,y:C,categoryValue:p,description:g}},oe=()=>{Mt.value.show=!1},Y=e.computed(()=>H.categories.length||Math.max(...Cn.value.map(t=>t.data.length))),Oe=e.computed(()=>{let t=0;return Cn.value.forEach(s=>{s.data.forEach(l=>{typeof l=="number"&&(t=Math.max(t,l))})}),t||100}),Se=e.computed(()=>{const t=[],s=Y.value;for(let l=0;l<s;l++){const i=l*2*Math.PI/s-Math.PI/2,p=Lt.value+Math.cos(i)*Et.value,g=$t.value+Math.sin(i)*Et.value;t.push({x:p,y:g,angle:i,index:l})}return t}),Ct=e.computed(()=>{const t=[],s=Y.value;return Se.value.forEach((l,i)=>{const p=Et.value+15,g=i*2*Math.PI/s-Math.PI/2,b=Lt.value+Math.cos(g)*p,C=$t.value+Math.sin(g)*p+5;let D="middle",L="middle";Math.abs(Math.cos(g))>.5&&(D=Math.cos(g)>0?"start":"end"),Math.abs(Math.sin(g))>.5&&(L=Math.sin(g)>0?"hanging":"auto"),t.push({x:b,y:C,text:H.categories[i]||`Axis ${i+1}`,anchor:D,baseline:L})}),t}),yl=e.ref(new Set),cl=(t,s,l)=>{const i=`current-${l}`,p=yl.value.has(i);return!p&&be.value===null?s.fillOpacity||S.value:s.isHighlighted||p?(s.fillOpacity||S.value)+.15:s.isDimmed?(s.fillOpacity||S.value)*.3:s.fillOpacity||S.value},ll=e.computed(()=>{if(!Gl.value)return[];const t=[],s=Y.value;return Pl.value.forEach((l,i)=>{const p=[],g=[],b=[],C=be.value===i,D=be.value!==null&&be.value!==i,L=Wt.value.has(i);for(let R=0;R<s;R++){const N=l.data[R]||0,Ee=N/Oe.value*Et.value,Ue=R*2*Math.PI/s-Math.PI/2,se=Lt.value+Math.cos(Ue)*Ee,he=$t.value+Math.sin(Ue)*Ee;p.push(`${se},${he}`),g.push({x:se,y:he}),b.push({x:se,y:he,value:N,label:H.categories[R]||`Axis ${R+1}`,seriesName:l.name})}t.push({points:p.join(" "),polygonPoints:g,dataPoints:b,color:Kt(i),fillOpacity:S.value,seriesName:l.name,value:`${l.name}: ${l.data.join(", ")}`,isHighlighted:C,isDimmed:D,isHidden:L,seriesIndex:i})}),t}),ul=(t,s)=>{if(!s||s.length<3)return!1;let l=!1;for(let i=0,p=s.length-1;i<s.length;p=i++){const g=s[i].x,b=s[i].y,C=s[p].x,D=s[p].y;b>t.y!=D>t.y&&t.x<(C-g)*(t.y-b)/(D-b)+g&&(l=!l)}return l},dl=t=>{if(!Gl.value)return;const s=t.currentTarget.closest(".dss-custom-chart-container");if(!s)return;const l=s.getBoundingClientRect(),i=A.value?.getBoundingClientRect();if(!i)return;const p=t.clientX-i.left,g=t.clientY-i.top,b=ll.value.filter(C=>C.isHidden?!1:ul({x:p,y:g},C.polygonPoints));if(b.length>0){b.length,be.value=b[0].seriesIndex;const C=t.clientX-l.left+10,D=t.clientY-l.top-10,L=b.length>1?460:260,R=70+Y.value*20;let N=C,G=D;N+L>ke.value&&(N=t.clientX-l.left-L-10),G+R>de.value&&(G=t.clientY-l.top-R-10),N<0&&(N=10),G<0&&(G=10);const Ee=b.map(Ue=>({seriesName:Ue.seriesName,color:Ue.color,points:Ue.dataPoints.map(se=>({label:se.label,value:fl(se.value)}))}));rt.value={show:!0,x:N,y:G,title:"",value:"",bubbleData:[],spiderAreas:Ee}}else cn()},Jt=e.computed(()=>{const t=I.value;return t.logos.map((s,l)=>{const i=H.series[s.seriesIndex];if(!i||!i.data||i.data.length===0||Wt.value.has(s.seriesIndex))return null;let p,g;if(xl.value){let C=-1,D=null;for(let R=i.data.length-1;R>=0;R--)if(i.data[R]!==null&&i.data[R]!==void 0){C=R,D=i.data[R];break}if(C===-1||D===null)return null;const L=i.data.map((R,N)=>R==null?null:{x:sl(N),y:hl(R),index:N}).filter(R=>R!==null);if(t.animations.enabled&&!ml.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(ht.value.isAnimating||!ht.value.hasAnimated))if(ht.value.isAnimating){const R=ht.value.currentFrame/ht.value.totalFrames,N=Ol(t.animations.easing,Math.min(R,1)),G=sa(L,N);p=G.x+(s.offsetX||0),g=G.y+(s.offsetY||0)}else p=L[0].x+(s.offsetX||0),g=L[0].y+(s.offsetY||0);else p=sl(C)+(s.offsetX||0),g=hl(D)+(s.offsetY||0)}else if(vl.value||Gl.value){const C=Math.PI*2/t.logos.length*l;p=Lt.value+Math.cos(C)*(Et.value+30)+(s.offsetX||0),g=$t.value+Math.sin(C)*(Et.value+30)+(s.offsetY||0)}return{...s,x:p,y:g,seriesIndex:s.seriesIndex}}).filter(Boolean)}),Ql=t=>{const s=document.querySelector(`.dss-logo-fallback-${t}`),l=document.querySelector(`.dss-logo-image-${t}`);s&&(s.style.opacity="0"),l&&(l.style.opacity="1")},vn=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const s=document.querySelector(`.dss-logo-image-${t}`);s&&(s.style.display="none")},Jl=t=>{Wt.value.has(t)?Wt.value.delete(t):Wt.value.add(t)},So=e.computed(()=>{if(!rt.value.show&&!(te.value&&xe.value.show&&!ae.value.isZooming))return{display:"none"};let t,s;if(te.value&&xe.value.show&&!ae.value.isZooming){t=xe.value.x+15,s=O.value.top;const l=al.value?200:150;t+l>ke.value&&(t=xe.value.x-l-15),t<0&&(t=10),s<10&&(s=10)}else t=rt.value.x,s=rt.value.y;return{left:t+"px",top:s+"px"}}),rn=(t,s)=>{if(!qt.value||$n.value)return;const i=s.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=s.clientX-i.left+10,g=s.clientY-i.top-10;const b=200,C=120,D=ke.value,L=de.value;p+b>D&&(p=s.clientX-i.left-b-10),g+C>L&&(g=s.clientY-i.top-C-10),p<0&&(p=10),g<0&&(g=10);let R;typeof t.categoryIndex=="number"?R=t.categoryIndex:typeof t.dataIndex=="number"?R=t.dataIndex:t.label&&H.categories.includes(t.label)&&(R=H.categories.indexOf(t.label));const N=(gl.value||Ze.value==="bar")&&t.label?t.label:t.seriesName||t.label||"";rt.value={show:!0,x:p,y:g,title:N,value:fl(t.value)||"",categoryIndex:R,spiderAreas:[]}},mo=e.ref(!1),On=e.ref(!1),cn=()=>{rt.value.show=!1,rt.value.spiderAreas=[],rt.value.bubbleData=[],xe.value.show=!1,mo.value||(be.value=null)},$n=e.ref(!1),gn=(t,s)=>{$n.value=!0,rt.value.show=!1,xe.value.show=!1;const i=s.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=s.clientX-i.left+15,g=s.clientY-i.top-10;const b=250;p+b>ke.value&&(p=s.clientX-i.left-b-15),p<0&&(p=10),g<0&&(g=10),Il.value={show:!0,x:p,y:g,content:t.texts,count:t.totalCount}},Ln=()=>{$n.value=!1,Il.value.show=!1},ht=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),Ol=(t,s)=>{switch(t){case"linear":return s;case"ease":return s<.5?2*s*s:-1+(4-2*s)*s;case"ease-in":return s*s;case"ease-out":return s*(2-s);case"ease-in-out":return s<.5?2*s*s:-1+(4-2*s)*s;default:return s}},ml=e.computed(()=>w.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),Po=()=>{if(!ze.value||ml.value){ht.value.hasAnimated=!0,Bl.value&&(Dl.value=1);return}Bl.value&&(Dl.value=0),ht.value.isAnimating=!0,ht.value.currentFrame=0,ht.value.totalFrames=Math.ceil(zt.value/16.67);const t=()=>{const s=ht.value.currentFrame/ht.value.totalFrames,l=Ol(Xt.value,Math.min(s,1));ta(l),Bl.value&&(Dl.value=l),s<1?(ht.value.currentFrame++,ht.value.animationId=requestAnimationFrame(t)):la()};ht.value.animationId=requestAnimationFrame(t)},ta=t=>{const s=F.value;s&&s.style.setProperty("--dss-animation-progress",t)},la=()=>{ht.value.isAnimating=!1,ht.value.hasAnimated=!0,Bl.value&&(Dl.value=1),ht.value.animationId&&(cancelAnimationFrame(ht.value.animationId),ht.value.animationId=null)},Oo=e.computed(()=>!vl.value||ht.value.hasAnimated?!0:Bl.value?Dl.value>=1:zl.value?Al.value>=1:!0),Zo=e.computed(()=>Ul.value&&Oo.value),Vo=e.ref(!1);e.watch(Zo,t=>{t?(Vo.value=!1,e.nextTick(()=>{requestAnimationFrame(()=>{Vo.value=!0})})):Vo.value=!1},{immediate:!0});const na=e.computed(()=>{if(!ze.value||ml.value||ht.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${zt.value}ms`,t["--dss-animation-easing"]=oa(Xt.value),t["--dss-stagger-delay"]=`${Rt.value}ms`,t}),oa=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",aa=()=>{if(!ze.value||ml.value)return"";const t=["dss-chart-animated"];return ht.value.hasAnimated||t.push(`dss-animate-${bt.value}`),ht.value.hasAnimated||(vl.value&&Ze.value!=="semi-radial"?t.push("dss-animate-fill"):vl.value||t.push(`dss-animate-${bt.value}`)),ht.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>H.series,(t,s)=>{V.value&&s&&ht.value.hasAnimated&&(ht.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>Po(),el.value)}))},{deep:!0}),e.watch(()=>ae.value.isZooming,(t,s)=>{s&&!t&&setTimeout(()=>{k()},50)}),e.watch(()=>[ae.value.scale,ae.value.offsetX],()=>{!ae.value.isZooming&&!ae.value.isDragging&&k()},{flush:"post"}),e.watch([je,ct],([t,s])=>{ae.value.minScale=t,ae.value.maxScale=s,(ae.value.scale<t||ae.value.scale>s)&&so()},{immediate:!0}),e.watch(()=>H.locale,t=>{t&&t!==_.value&&(_.value=t)},{immediate:!0}),e.watch(()=>wt.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",ao)}):document.removeEventListener("click",ao)}),e.onMounted(()=>{be.value=null,Bl.value&&(!ze.value||ml.value)&&(Dl.value=1),tl(),F.value&&typeof ResizeObserver<"u"&&(f=new ResizeObserver(t=>{const s=t[0];!s||!s.contentRect||(Ce&&cancelAnimationFrame(Ce),Ce=requestAnimationFrame(()=>{Ce=null;const{width:l,height:i}=s.contentRect;Ke.value=Math.round(l),ge.value=Math.round(i),X.value&&(ft.value=X.value.offsetHeight||ve)}))}),f.observe(F.value)),ze.value&&!ml.value?Ze.value==="semi-radial"?setTimeout(()=>yo(),el.value):setTimeout(()=>Po(),el.value):(ht.value.hasAnimated=!0,Ze.value==="semi-radial"&&(Al.value=1)),document.addEventListener("mousemove",Uo),document.addEventListener("mouseup",Xo),document.addEventListener("click",oo)}),e.onUnmounted(()=>{Ce&&cancelAnimationFrame(Ce),f&&F.value&&(f.unobserve(F.value),f.disconnect(),f=null),ht.value.animationId&&cancelAnimationFrame(ht.value.animationId),an&&(cancelAnimationFrame(an),an=null),ae.value.zoomTimeout&&clearTimeout(ae.value.zoomTimeout),document.removeEventListener("mousemove",Uo),document.removeEventListener("mouseup",Xo),document.removeEventListener("click",oo),document.removeEventListener("click",ao)});const Uo=t=>{if(ae.value.isDragging&&ae.value.scale>1&&xl.value){xe.value.show=!1;const s=t.clientX-ae.value.lastMouseX,{minX:l,maxX:i}=Qt.value,p=i-l||1,b=s*.8;ae.value.offsetX+=b;const C=p/ae.value.scale,D=p-C,L=0,R=-D/p*O.value.width,N=L;ae.value.offsetX=Math.max(R,Math.min(N,ae.value.offsetX)),ae.value.lastMouseX=t.clientX,ae.value.lastMouseY=t.clientY}},Xo=()=>{ae.value.isDragging&&(ae.value.isDragging=!1,setTimeout(()=>{!ae.value.isDragging&&ae.value.isZooming},100))},sa=(t,s)=>{const l=t.filter(C=>C!=null);if(!l||l.length===0)return{x:0,y:0};if(l.length===1||s<=0)return l[0];if(s>=1)return l[l.length-1];let i=0;const p=[];for(let C=1;C<l.length;C++){const D=l[C].x-l[C-1].x,L=l[C].y-l[C-1].y,R=Math.sqrt(D*D+L*L);p.push(R),i+=R}const g=i*s;let b=0;for(let C=0;C<p.length;C++){const D=b+p[C];if(g<=D){const L=(g-b)/p[C],R=l[C],N=l[C+1];return{x:R.x+(N.x-R.x)*L,y:R.y+(N.y-R.y)*L}}b=D}return l[l.length-1]};return(t,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",[aa(),{"dss-chart-fill-width":we.value,"dss-chart-fill-height":_e.value,"dss-chart-compact":vl.value&&!Qe.value}]]),style:e.normalizeStyle({width:we.value?"100%":ke.value+"px",height:kt.value,...we.value||_e.value?{overflow:vl.value?"visible":"hidden",maxWidth:"100%",maxHeight:"100%"}:{},...na.value,cursor:Do()}),"data-chart-type":Ze.value,ref_key:"containerEl",ref:F,onWheel:fo,onMousedown:vo,onMousemove:jl,onMouseup:Ao,onMouseleave:wl,onDblclick:so,onContextmenu:e.withModifiers(en,["prevent"]),onClick:e.withModifiers(Zt,["left"]),onWheelCapture:fo},[e.createElementVNode("div",{class:"dss-chart-header",ref_key:"headerEl",ref:X},[e.createElementVNode("div",Ja,[st.value?(e.openBlock(),e.createElementBlock("div",es,e.toDisplayString(st.value),1)):e.createCommentVNode("",!0),St.value?(e.openBlock(),e.createElementBlock("div",ts,e.toDisplayString(St.value),1)):e.createCommentVNode("",!0)]),Qe.value&<.value==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Bt.value==="horizontal","dss-legend-vertical":Bt.value==="vertical","dss-legend-top":lt.value==="top","dss-legend-bottom":lt.value==="bottom"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.series,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":Wt.value.has(i),"dss-legend-hovered":be.value===i,"dss-legend-dimmed":be.value!==null&&be.value!==i}]),onClick:p=>Jl(i),onMouseenter:p=>Nn(i),onMouseleave:un,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:Kt(i)})},null,4),e.createElementVNode("span",ns,e.toDisplayString(l.name),1)],46,ls))),128))],2)):e.createCommentVNode("",!0),Qe.value&&(lt.value==="left"||lt.value==="right")?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-legend-side",{"dss-legend-left":lt.value==="left","dss-legend-right":lt.value==="right"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.series,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":Wt.value.has(i),"dss-legend-hovered":be.value===i,"dss-legend-dimmed":be.value!==null&&be.value!==i}]),onClick:p=>Jl(i),onMouseenter:p=>Nn(i),onMouseleave:un,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:Kt(i)})},null,4),e.createElementVNode("span",as,e.toDisplayString(l.name),1)],46,os))),128))],2)):e.createCommentVNode("",!0)],512),$.showAddMarkerButton&&Ve.value&&Ne.value.addMarker&&(xl.value||al.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-add-marker-button",onClick:po,title:e.unref(B)("chart.contextMenu.addMarker")},[e.createElementVNode("img",{src:Ht.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,rs),s[4]||(s[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,ss)):e.createCommentVNode("",!0),e.createElementVNode("div",is,[al.value&&At.value?(e.openBlock(),e.createElementBlock("div",cs,"Bubble size: "+e.toDisplayString(At.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{width:ke.value,height:de.value,class:"dss-chart-svg","data-smooth":re.value,"data-animated":ze.value,ref_key:"svgEl",ref:A},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:ne.value},[e.createElementVNode("rect",{x:0,y:O.value.top,width:ke.value,height:O.value.height*4},null,8,ms)],8,ds),zl.value?(e.openBlock(),e.createElementBlock("clipPath",{key:0,id:on.value},[e.createElementVNode("path",{d:ho.value},null,8,fs)],8,ps)):e.createCommentVNode("",!0),Bl.value?(e.openBlock(),e.createElementBlock("clipPath",{key:1,id:pn.value},[e.createElementVNode("path",{d:Ho.value},null,8,gs)],8,vs)):e.createCommentVNode("",!0)]),xl.value||al.value?(e.openBlock(),e.createElementBlock("g",hs,[Ot.value?(e.openBlock(),e.createElementBlock("g",{key:0,class:"dss-grid-lines","clip-path":pe.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Io.value,(l,i)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${i}`,x1:O.value.left,x2:O.value.right,y1:l.y,y2:l.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${i*50}ms`})},null,12,ks))),128))],8,ys)):e.createCommentVNode("",!0),e.createElementVNode("g",Cs,[e.createElementVNode("line",{x1:O.value.left,x2:O.value.right,y1:O.value.bottom,y2:O.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,bs),e.createElementVNode("line",{x1:O.value.left,x2:O.value.left,y1:O.value.top,y2:O.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,ws)]),e.createElementVNode("g",xs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bn.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${i}`,x:l.x,y:l.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},e.toDisplayString(l.text),13,Es))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xn.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${i}`,x:l.x,y:l.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${i*80}ms`})},e.toDisplayString(l.text),13,Ss))),128)),Ut.value?(e.openBlock(),e.createElementBlock("text",{key:0,x:O.value.left+O.value.width/2,y:O.value.bottom+45,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333"},e.toDisplayString(Ut.value),9,Vs)):e.createCommentVNode("",!0),Ft.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:15,y:O.value.top+12+O.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(-90, 15, ${O.value.top+O.value.height/2})`},e.toDisplayString(Ft.value),9,Ns)):e.createCommentVNode("",!0)]),$l.value.length>0?(e.openBlock(),e.createElementBlock("g",Bs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($l.value,l=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${l.categoryIndex}`},[e.createElementVNode("g",{"clip-path":pe.value},[l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x,x2:l.x,y1:O.value.bottom,y2:O.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>gn(l,i),onMouseleave:Ln},null,40,_s)):e.createCommentVNode("",!0),l.hasAuto&&!l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.x,x2:l.x,y1:O.value.bottom,y2:O.value.top,stroke:"#a1d499","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>gn(l,i),onMouseleave:Ln},null,40,$s)):e.createCommentVNode("",!0),l.hasAuto&&l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.x,x2:l.x,y1:O.value.bottom,y2:O.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>gn(l,i),onMouseleave:Ln},null,40,Ls)):e.createCommentVNode("",!0)],8,Ms),l.hasManual&&l.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x+8,cy:Math.max(15,O.value.top-10),r:"14",fill:"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:i=>gn(l,i),onMouseleave:Ln},null,40,Ts)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:l.x,cy:Math.max(15,O.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:i=>gn(l,i),onMouseleave:Ln},null,40,As),e.createElementVNode("text",{x:l.x,y:Math.max(15,O.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,Ds)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-chart-data","clip-path":pe.value},[Ll.value?(e.openBlock(),e.createElementBlock("g",Rs,[e.createElementVNode("g",{class:e.normalizeClass(["dss-bar-chart",{"dss-horizontal-bars":gl.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${i}`},[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=>rn(l,p),onMouseleave:cn},null,46,Is)):(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=>rn(l,p),onMouseleave:cn},null,46,Fs))],64))),128))],2),e.createElementVNode("g",zs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Hl.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Ge.value+2:Ge.value,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,Ps))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Eo.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-gap-connector-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Ge.value+2:Ge.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,Os))),128)),vt.value>0||De.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(zo.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${i}`,cx:l.x,cy:l.y,r:U(l.isHighlighted?q(l,vt.value)+2:q(l,vt.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=>rn(l,p),onMouseleave:cn},null,46,qs))),128)):e.createCommentVNode("",!0)])])):Ze.value==="line"?(e.openBlock(),e.createElementBlock("g",Ws,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wn.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`anim-${i}`,d:l.path,stroke:l.color,"stroke-width":Ge.value,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,Zs))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Hl.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Ge.value+2:Ge.value,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,Us))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Eo.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`gap-connector-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Ge.value+2:Ge.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,Xs))),128)),vt.value>0||De.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(uo.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${i}`,cx:l.x,cy:l.y,r:U(l.isHighlighted?q(l,vt.value)+2:q(l,vt.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=>rn(l,p),onMouseleave:cn},null,46,Ys))),128)):e.createCommentVNode("",!0)])):Ze.value==="area"?(e.openBlock(),e.createElementBlock("g",js,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yn.value,(l,i)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${i}`,id:`area-mask-${i}-${$.chartId}`},[e.createElementVNode("rect",{x:O.value.left-10,y:O.value.top-10,width:O.value.width+20,height:O.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${O.value.width+20}px`})},null,12,Gs)],8,Ks))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yn.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${i}`,d:l.areaPath,fill:l.color,"fill-opacity":l.isHighlighted?le.value+.2:le.value,mask:`url(#area-mask-${i}-${$.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,Qs))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yn.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${i}`,d:l.linePath,stroke:l.color,"stroke-width":l.isHighlighted?Ge.value+1:Ge.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:`${i*Rt.value}ms`})},null,14,Js))),128))])):Ze.value==="bar"?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass({"dss-horizontal-bars":gl.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${i}`},[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=>rn(l,p),onMouseleave:cn},null,46,er)):(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=>rn(l,p),onMouseleave:cn},null,46,tr))],64))),128))],2)):e.createCommentVNode("",!0)],8,Hs),te.value&&xe.value.show&&!ae.value.isZooming?(e.openBlock(),e.createElementBlock("g",{key:2,class:"dss-crosshair","clip-path":pe.value},[e.createElementVNode("line",{x1:xe.value.x,x2:xe.value.x,y1:O.value.top,y2:O.value.bottom,stroke:Ae.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,nr),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value.data,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${i}`,cx:xe.value.x,cy:l.y,r:U(vt.value+2),fill:l.color,stroke:"none",opacity:"0.9"},null,8,or))),128))],8,lr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),al.value?(e.openBlock(),e.createElementBlock("g",ar,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pn.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${i}`},[l?(e.openBlock(),e.createElementBlock("g",sr,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:U(l.radius),fill:l.color,"fill-opacity":c(l),stroke:l.color,"stroke-width":"1","stroke-opacity":"0.8",class:e.normalizeClass(m(l,i)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:p=>v(l,p),onMouseleave:p=>T(l),onClick:p=>u(l,p)},null,42,rr),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-${i} ${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:d(l)}),onLoad:p=>Un(i),onError:p=>ro(i),onMouseenter:p=>v(l,p),onMouseleave:p=>T(l),onClick:p=>u(l,p)},null,46,ir)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),vl.value?(e.openBlock(),e.createElementBlock("g",{key:2,class:"radial-chart",transform:nn.value},[Ze.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:Lt.value,cy:$t.value,r:Et.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,ur)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":Ze.value,"clip-path":Ro.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${l.originalIndex}-${i}`,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":kn(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=>rn(l.segment,p),onMouseleave:cn},null,42,mr))),128))],8,dr),Wn.value&&Oo.value?(e.openBlock(),e.createElementBlock("g",pr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Vl.value,(l,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:`radial-segment-label-${i}`,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,fr)),[[e.vShow,l.show]])),128))])):e.createCommentVNode("",!0),En.value&&(Oo.value||zl.value||Bn.value)?(e.openBlock(),e.createElementBlock("text",{key:2,x:Xl.value.x,y:Xl.value.y,"text-anchor":"middle","dominant-baseline":"middle","font-size":Rl.value,fill:bl.value,class:"dss-radial-data-center"},e.toDisplayString(Sn.value),9,vr)):e.createCommentVNode("",!0),Zo.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass(["dss-radial-labels dss-radial-labels-initial",{"dss-radial-labels-animated":Vo.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${i}`,class:e.normalizeClass(["dss-radial-label-group",{"dss-label-highlighted":l.isHighlighted,"dss-label-dimmed":l.isDimmed}]),style:e.normalizeStyle({"--label-delay":`${i*.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,gr),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,hr),e.createElementVNode("text",{class:"dss-radial-label-text",x:l.textX,y:l.textY,"text-anchor":l.textAnchor,"font-size":hn.value,"dominant-baseline":"middle"},e.toDisplayString(l.text),9,yr)],6))),128))],2)):e.createCommentVNode("",!0)],8,cr)):e.createCommentVNode("",!0),Gl.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-spider-chart",transform:nn.value},[Ot.value?(e.openBlock(),e.createElementBlock("g",Cr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${i}`,cx:Lt.value,cy:$t.value,r:U(l),fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*150}ms`})},null,12,br))),128)),e.createElementVNode("g",wr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${i}`},[e.createElementVNode("rect",{x:Lt.value-16,y:$t.value-l-7,width:"32",height:"16",fill:"transparent",stroke:"none"},null,8,xr),e.createElementVNode("text",{x:Lt.value,y:$t.value-l+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(Ye(i)),9,Er)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,(l,i)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${i}`,x1:Lt.value,x2:l.x,y1:$t.value,y2:l.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},null,12,Sr))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Vr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ct.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${i}`,x:l.x+Math.cos(i*2*Math.PI/Y.value-Math.PI/2)*16,y:l.y+Math.sin(i*2*Math.PI/Y.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:`${i*120}ms`})},e.toDisplayString(l.text.charAt(0).toUpperCase()+l.text.slice(1)),13,Nr))),128))]),e.createElementVNode("g",{class:"dss-spider-data",onMousemove:dl,onMouseleave:cn},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ll.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${i}`},[e.createElementVNode("polygon",{points:l.points,fill:l.color,"fill-opacity":cl("current",l,i),stroke:l.color,"stroke-width":l.isHighlighted?Ge.value+1:Ge.value,"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:`${i*Rt.value}ms`,transition:"all 0.2s ease"})},null,14,Br),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataPoints,(p,g)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${i}-${g}`,cx:p.x,cy:p.y,r:U(l.isHighlighted?vt.value+1:vt.value>0?vt.value:0),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:`${i*Rt.value+g*50}ms`,transition:"all 0.2s ease"}),onMouseover:b=>rn(p,b),onMouseleave:cn},null,46,Mr))),128))]))),128))],32)],8,kr)):e.createCommentVNode("",!0),e.createElementVNode("g",_r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Jt.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${i}`,cx:l.x,cy:l.y,r:U(l.width/2),fill:Kt(l.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${i}`),style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,14,$r))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Jt.value,(l,i)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${i}`,x:l.x-l.width/2,y:l.y-l.height/2,width:l.width,height:l.height,"xlink:href":l.url,onLoad:p=>Ql(i),onError:p=>vn(i),preserveAspectRatio:"xMidYMid slice",class:e.normalizeClass(`dss-logo-image-${i}`),"clip-path":`circle(${l.width/2}px at ${l.width/2}px ${l.height/2}px)`,style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,46,Lr))),128))])],8,us))]),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:ke.value+"px",height:de.value+"px",backgroundImage:`url('${Ml.value}')`,backgroundRepeat:"no-repeat",...xt.value,opacity:He.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(l,i)=>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:ot.value+"px",height:ot.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(p=>_t(l),["stop"]),onMouseenter:p=>E(l,p),onMouseleave:oe},[e.createElementVNode("img",{src:tn(l),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,Ar)],44,Tr)),[[e.vShow,z.value]])),128)),Mt.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-tooltip",style:e.normalizeStyle({left:Mt.value.x+"px",top:Mt.value.y+"px"})},[e.createElementVNode("div",Dr,e.toDisplayString(Mt.value.categoryValue),1),Mt.value.description?(e.openBlock(),e.createElementBlock("div",Hr,e.toDisplayString(Mt.value.description),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),qt.value&&(rt.value.show||te.value&&xe.value.show&&!ae.value.isZooming)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":te.value&&xe.value.show&&!ae.value.isZooming,"dss-spider-tooltip":Gl.value&&rt.value.spiderAreas&&rt.value.spiderAreas.length>0}]),style:e.normalizeStyle(So.value)},[!te.value||!xe.value.show||ae.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Gl.value&&rt.value.spiderAreas&&rt.value.spiderAreas.length>0?(e.openBlock(),e.createElementBlock("div",Rr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value.spiderAreas,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-area-${i}`,class:"dss-spider-tooltip-area"},[e.createElementVNode("div",Ir,[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,g)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-point-${i}-${g}`,class:"dss-tooltip-series"},[e.createElementVNode("span",Fr,e.toDisplayString(p.label),1),e.createElementVNode("span",zr,e.toDisplayString(p.value),1)]))),128))]))),128))])):al.value&&rt.value.bubbleData&&rt.value.bubbleData.length>0?(e.openBlock(),e.createElementBlock("div",Pr,[rt.value.title?(e.openBlock(),e.createElementBlock("div",Or,e.toDisplayString(rt.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",qr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value.bubbleData,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`bubble-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])])):(e.openBlock(),e.createElementBlock("div",Wr,[e.createElementVNode("div",Zr,e.toDisplayString(rt.value.title),1),e.createElementVNode("div",Ur,e.toDisplayString(rt.value.value),1)])),rt.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[kl(rt.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",Xr,[s[5]||(s[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Yr,e.toDisplayString(e.unref(B)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kl(rt.value.categoryIndex).flagGroups,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${i}`},[e.createElementVNode("div",jr,[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,g)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${i}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Kr,[e.createElementVNode("div",Gr,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),kl(rt.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Qr,[s[6]||(s[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Jr,e.toDisplayString(e.unref(B)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kl(rt.value.categoryIndex).markers,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${i}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",ei,[e.createElementVNode("div",ti,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",li,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",ni,[e.createElementVNode("div",oi,e.toDisplayString(al.value?M():$.categories[xe.value.categoryIndex]||`Category ${xe.value.categoryIndex+1}`),1),al.value?(e.openBlock(),e.createElementBlock("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value.data,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(xe.value.data,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${i}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",si,e.toDisplayString(l.seriesName)+":",1),e.createElementVNode("span",ri,e.toDisplayString(fl(l.value)),1)]))),128))]),kl(xe.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",ii,[s[7]||(s[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ci,e.toDisplayString(e.unref(B)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kl(xe.value.categoryIndex).flagGroups,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${i}`},[e.createElementVNode("div",ui,[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,g)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${i}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",di,[e.createElementVNode("div",mi,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),kl(xe.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",pi,[s[8]||(s[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",fi,e.toDisplayString(e.unref(B)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kl(xe.value.categoryIndex).markers,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${i}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",vi,[e.createElementVNode("div",gi,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",hi,e.toDisplayString(l.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),xl.value&&Me.value&&ae.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-zoom-indicator",onClick:so},[s[9]||(s[9]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(ae.value.scale*100))+"% "+e.toDisplayString(e.unref(B)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,Qa),Qe.value&<.value==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Bt.value==="horizontal","dss-legend-vertical":Bt.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(H.series,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-bottom-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":Wt.value.has(i),"dss-legend-hovered":be.value===i,"dss-legend-dimmed":be.value!==null&&be.value!==i}]),onClick:p=>Jl(i),onMouseenter:p=>Nn(i),onMouseleave:un,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:Kt(i)})},null,4),e.createElementVNode("span",ki,e.toDisplayString(l.name),1)],46,yi))),128))],2)):e.createCommentVNode("",!0),wt.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-context-menu",style:e.normalizeStyle({left:wt.value.x+"px",top:wt.value.y+"px"}),onClick:s[0]||(s[0]=e.withModifiers(()=>{},["stop"]))},[Ne.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:To},e.toDisplayString(e.unref(B)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),Ne.value.addMarker&&(Ne.value.downloadSvg||Ne.value.downloadPng||Ne.value.downloadCsv||Dt.value.length>0)?(e.openBlock(),e.createElementBlock("div",Ci)):e.createCommentVNode("",!0),Ne.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-context-menu-item",onClick:dn},e.toDisplayString(e.unref(B)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),Ne.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:_l},e.toDisplayString(e.unref(B)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),Ne.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:no},e.toDisplayString(e.unref(B)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),Dt.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[Ne.value.downloadSvg||Ne.value.downloadPng||Ne.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",bi)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Dt.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+i},[l.separator?(e.openBlock(),e.createElementBlock("div",wi)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(lo(l)),style:e.normalizeStyle(Zn(l)),onClick:p=>In(l)},[l.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:Nl(l),class:"dss-custom-menu-content"},null,8,Ei)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.icon?(e.openBlock(),e.createElementBlock("span",Si,e.toDisplayString(l.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.label),1)],64))],14,xi)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Pe.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-modal-overlay",onClick:x},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:s[3]||(s[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Vi,[e.createElementVNode("h3",null,e.toDisplayString(Cl.value?e.unref(B)("chart.modalMarker.viewMarker"):Yl.value?e.unref(B)("chart.modalMarker.editMarker"):e.unref(B)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:x},"×")]),e.createElementVNode("div",Ni,[e.createElementVNode("div",Bi,[e.createVNode(Wo,{id:"dss-marker-date",mode:"single",modelValue:Pe.value.date,"onUpdate:modelValue":s[1]||(s[1]=l=>Pe.value.date=l),"min-date":Dn.value,"max-date":Fl.value,disabled:Cl.value},null,8,["modelValue","min-date","max-date","disabled"])]),e.createElementVNode("div",Mi,[e.createElementVNode("label",_i,e.toDisplayString(e.unref(B)("chart.modalMarker.description")),1),Cl.value?(e.openBlock(),e.createElementBlock("div",$i,e.toDisplayString(Pe.value.description),1)):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,id:"dss-marker-description","onUpdate:modelValue":s[2]||(s[2]=l=>Pe.value.description=l),placeholder:e.unref(B)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"5"},null,8,Li)),[[e.vModelText,Pe.value.description]])])]),e.createElementVNode("div",Ti,[e.createElementVNode("div",Ai,[Yl.value&&!Cl.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:W},e.toDisplayString(e.unref(B)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Di,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:x},e.toDisplayString(Cl.value?e.unref(B)("chart.modalMarker.close"):e.unref(B)("chart.modalMarker.cancel")),1),Cl.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-primary",onClick:y,disabled:!(Pe.value.description&&Pe.value.description.length)},e.toDisplayString(Yl.value?e.unref(B)("chart.modalMarker.save"):e.unref(B)("chart.contextMenu.addMarker")),9,Hi))])])])])):e.createCommentVNode("",!0)],64))}}),Fi={class:"dss-modal-title"},zi={class:"dss-modal-actions"},qo={__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 B=$,_=J,ie=e.ref(null),F=e.ref(null),A=e.computed(()=>{const ne={"max-width":B.width};return B.height!=="auto"&&(ne.height=B.height,ne["min-height"]="0"),ne}),X=e.computed(()=>({}));function Ke(){_("close-modal")}function ge(){B.backDrop&&!ie.value&&_("close-modal")}function f(ne){ne.target.tagName==="INPUT"&&(ie.value=ne.target.tagName)}function Ce(){setTimeout(()=>{ie.value=null},300)}function ve(){const ne=document.body,pe=document.documentElement;F.value={bodyOverflow:ne.style.overflow,bodyPosition:ne.style.position,bodyTop:ne.style.top,bodyWidth:ne.style.width,htmlOverflow:pe.style.overflow,scrollY:window.scrollY},ne.style.overflow="hidden",ne.style.position="fixed",ne.style.top=`-${F.value.scrollY}px`,ne.style.width="100%",ne.style.left="0",pe.style.overflow="hidden"}function ee(){if(!F.value)return;const ne=document.body,pe=document.documentElement,{bodyOverflow:H,bodyPosition:ye,bodyTop:Te,bodyWidth:We,htmlOverflow:it,scrollY:I}=F.value;ne.style.overflow=H||"",ne.style.position=ye||"",ne.style.top=Te||"",ne.style.width=We||"",ne.style.left="",pe.style.overflow=it||"",window.scrollTo(0,I||0)}return e.watch(()=>B.showModal,ne=>{if(ne)ve(),document.body.classList.add("dss-modal-open"),setTimeout(()=>{const pe=document.getElementById("dss-modal-backdrop");pe&&(pe.addEventListener("focusin",f),pe.addEventListener("focusout",Ce))},100);else{ee(),document.body.classList.remove("dss-modal-open");const pe=document.getElementById("dss-modal-backdrop");pe&&(pe.removeEventListener("focusin",f),pe.removeEventListener("focusout",Ce))}},{immediate:!0}),e.onUnmounted(()=>{B.showModal&&ee()}),(ne,pe)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[$.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-modal-backdrop",onClick:ge},[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:pe[0]||(pe[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-modal-header",style:e.normalizeStyle({"justify-content":$.headerType,"font-size":$.titleSize})},[e.createElementVNode("h1",Fi,[e.renderSlot(ne.$slots,"title",{},()=>[pe[1]||(pe[1]=e.createTextVNode("Default Title",-1))])]),e.renderSlot(ne.$slots,"title-data"),$.showCloseBtn?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-modal-close",onClick:Ke,title:"Close"},"×")):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"dss-modal-body",style:e.normalizeStyle(X.value)},[e.renderSlot(ne.$slots,"content",{},()=>[pe[2]||(pe[2]=e.createTextVNode("Default Content",-1))])],4),e.createElementVNode("div",zi,[e.renderSlot(ne.$slots,"actions")])])],4),[[e.vShow,$.showModal]])])):e.createCommentVNode("",!0)]))}},Pi={key:0,class:"dss-table-toolbar"},Oi={class:"dss-table-toolbar-left"},qi=["aria-expanded"],Wi={class:"dss-pagination-select-dropdown",role:"listbox"},Zi={class:"dss-table-column-visibility-label"},Ui={class:"dss-table-checkbox-wrapper"},Xi=["checked","onChange"],Yi={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},ji={class:"dss-table-column-visibility-text"},Ki={class:"dss-table-toolbar-right"},Gi=["placeholder","aria-label"],Qi=["aria-label"],Ji=["aria-label","aria-expanded"],ec={key:1,class:"dss-table-toolbar-extra"},tc={class:"dss-table-thead"},lc={key:0,class:"dss-table-th dss-table-selection-column"},nc={key:0,class:"dss-table-checkbox-wrapper"},oc=["checked","indeterminate"],ac={key:0,class:"dss-table-checkbox__indeterminate"},sc={key:1,class:"dss-table-checkbox__check","aria-hidden":"true"},rc=["aria-label"],ic=["onClick"],cc={class:"dss-table-th-content"},uc={class:"dss-table-th-text"},dc={key:0},mc={key:1},pc={key:2},fc=["data-filter-column-key","aria-expanded","aria-label","onClick"],vc={class:"dss-table-tbody"},gc=["onClick"],hc={class:"dss-table-checkbox-wrapper"},yc=["type","name","checked","onChange"],kc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Cc={key:1,class:"dss-table-checkbox__dot"},bc=["onClick"],wc=["aria-expanded","aria-label"],xc={key:1,class:"dss-table-expansion-placeholder","aria-hidden":"true"},Ec={key:0,class:"dss-table-expansion-row"},Sc=["colspan"],Vc=["colspan"],Nc={key:1,class:"dss-table-pagination"},Bc={class:"dss-table-pagination-left"},Mc={key:0},_c={key:1,class:"dss-table-pagination-placeholder","aria-hidden":"true"},$c={class:"dss-table-pagination-center"},Lc={key:0,class:"dss-pagination-controls"},Tc=["disabled","title"],Ac=["disabled","title"],Dc=["aria-label","onKeydown"],Hc={class:"dss-pagination-of"},Rc=["disabled","title"],Ic=["disabled","title"],Fc={class:"dss-table-pagination-right"},zc={class:"dss-pagination-rows-label"},Pc=["aria-expanded"],Oc=["aria-selected","onClick"],qc={key:0,class:"dss-table-filter-row"},Wc=["value","placeholder"],Zc=["min","max","value"],Uc=["min","max","value"],Xc={class:"dss-table-filter-double-range-values"},Yc={key:2,class:"dss-table-filter-daterange"},jc={class:"dss-table-filter-daterange-row"},Kc={class:"dss-table-filter-daterange-label"},Gc=["value"],Qc={class:"dss-table-filter-daterange-row"},Jc={class:"dss-table-filter-daterange-label"},eu=["value"],tu=["value","placeholder"],lu={class:"dss-table-filter-list"},nu=["checked","onChange"],ou={class:"dss-table-filter-actions"},au={name:"DSSTable"},su=Object.assign(au,{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}},emits:["row-click","row-select","row-unselect","select-all","unselect-all","row-expand","row-collapse","sort","page","download-pdf","download-excel","search"],setup($,{emit:J}){const{t:B,locale:_}=Gn.useI18n(),ie=$,F=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"},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 X(k,y){const x=Object.assign({},k);return Ke(k)&&Ke(y)&&Object.keys(y).forEach(W=>{Ke(y[W])?W in k?x[W]=X(k[W],y[W]):Object.assign(x,{[W]:y[W]}):Object.assign(x,{[W]:y[W]})}),x}function Ke(k){return k&&typeof k=="object"&&!Array.isArray(k)}const ge=e.computed(()=>X(A,ie.options)),f=e.computed(()=>{const k=ge.value.table.width;return k==="auto"?null:typeof k=="number"?k:null}),Ce=e.computed(()=>ge.value.table.height),ve=e.computed(()=>ge.value.table.rowHeight??"auto"),ee=e.computed(()=>({height:ve.value})),ne=e.computed(()=>ge.value.table.expandable===!0),pe=e.computed(()=>ge.value.table.expandableRowData??null),H=e.computed(()=>ge.value.table.expandableRowCondition??null),ye=e.computed(()=>ge.value.table.truncated===!0),Te=e.computed(()=>ge.value.table.striped),We=e.computed(()=>ge.value.table.bordered),it=e.computed(()=>ge.value.table.hoverable),I=e.computed(()=>ge.value.table.size),we=e.computed(()=>ge.value.table.align||"left");e.computed(()=>ge.value.title.text),e.computed(()=>ge.value.subtitle.text);const _e=e.computed(()=>ge.value.selection.enabled),ke=e.computed(()=>ge.value.selection.mode),ft=e.computed(()=>ge.value.sorting.enabled),yt=e.computed(()=>ge.value.sorting.mode),de=e.computed(()=>ge.value.pagination.enabled),kt=e.computed(()=>ge.value.pagination.rows),Ze=e.computed(()=>ge.value.pagination.rowsPerPageOptions),Pt=e.computed(()=>ge.value.pagination.showCounter!==!1),st=e.computed(()=>ge.value.pagination.showControlsGroup),St=e.computed(()=>st.value===!1?!1:ge.value.pagination.showControls!==!1),At=e.computed(()=>st.value===!1?!1:ge.value.pagination.showRowsPerPage!==!1),Ut=e.computed(()=>de.value&&(Pt.value||St.value||At.value)),Ft=e.computed(()=>ge.value.scrollable),j=e.computed(()=>ge.value.emptyMessage||B("table.emptyMessage")),ce=e.computed(()=>ge.value.toolbar?.downloads?.pdf!==!1),Ie=e.computed(()=>ge.value.toolbar?.downloads?.excel!==!1),Xe=e.computed(()=>ge.value.toolbar?.search!==!1),Ot=e.computed(()=>ce.value||Ie.value||Xe.value||Qe.value),Qe=e.computed(()=>ge.value.toolbar?.columnVisibility!==!1),lt=e.ref(""),Bt=e.ref(!1),qt=e.ref(null);let te=null;function Ae(){Bt.value?(te&&(clearTimeout(te),te=null),Bt.value=!1,lt.value="",F("search",""),qt.value?.blur()):(Bt.value=!0,te=setTimeout(()=>{te=null,qt.value?.focus()},80))}function Me(){lt.value||(Bt.value=!1)}function je(){lt.value="",F("search",""),qt.value?.focus()}const ct=e.computed(()=>({"dss-table-striped":Te.value,"dss-table-bordered":We.value,"dss-table-hoverable":it.value,[`dss-table-${I.value}`]:I.value!=="default","dss-table-truncated":ye.value})),Ge=(k,y)=>k?.field??k?.key??y,tt=e.ref(new Set);function vt(){const k=new Set;ie.columns.forEach((y,x)=>{y?.hidden!==!0&&k.add(Ge(y,x))}),tt.value=k}const De=e.computed(()=>ie.columns.filter((k,y)=>tt.value.has(Ge(k,y)))),q=k=>{const y=ie.columns.findIndex(x=>x===k);return Ge(k,y>=0?y:0)},U=(k,y)=>tt.value.has(Ge(k,y));function le(k,y){const x=Ge(k,y),W=new Set(tt.value);W.has(x)?W.delete(x):W.add(x),tt.value=W}const re=e.ref(null),Fe=e.ref(!1);function ut(k){re.value&&!re.value.contains(k.target)&&(Fe.value=!1)}const Vt=e.computed(()=>De.value.length+(_e.value?1:0)+(ne.value?1:0)),ze=(k,y)=>k?.id??k?.key??y,bt=e.ref(new Set),zt=e.ref(null),el=(k,y)=>bt.value.has(ze(k,y)),Xt=(k,y)=>{if(!ne.value)return!1;if(typeof H.value=="function")return!!H.value(k,y);if(typeof pe.value=="string"&&pe.value.trim()){const x=jt(k,pe.value.trim());return Array.isArray(x)?x.length>0:x&&typeof x=="object"?Object.keys(x).length>0:x!=null&&x!==""}return!0},Rt=(k,y,x)=>{if(x&&x.stopPropagation(),!Xt(k,y))return;const W=ze(k,y),fe=new Set(bt.value);fe.has(W)?(fe.delete(W),F("row-collapse",{data:k,index:y})):(fe.add(W),F("row-expand",{data:k,index:y})),bt.value=fe},V=(k,y)=>{if(!ye.value)return;const x=ze(k,y);zt.value!==x&&(zt.value=x)},w=e.ref(null),S=e.ref(0),K=e.ref([]),Q=k=>{if(yt.value==="single")return w.value===k.field?S.value:0;{const y=K.value.find(x=>x.field===k.field);return y?y.order:0}},Ye=k=>{const y=Q(k);return{"dss-sort-active":y!==0,"dss-sort-asc":y===1,"dss-sort-desc":y===-1}},gt=e.ref({}),Ve=e.ref(null),Ne=e.ref(null),Dt=220,Ht=e.ref(null),nt=e.computed(()=>De.value.find(k=>q(k)===Ve.value)??null),ot=e.computed(()=>{if(!nt.value||nt.value.filter!=="range")return null;const k=nt.value,y=Ve.value,{min:x,max:W}=Ml(k),fe=k.filterMin??x,_t=k.filterMax??W,pt=Z(y),tl=pt.min??fe,nl=pt.max??_t,rl=_t-fe,ol=rl===0?0:(tl-fe)/rl*100,Kl=rl===0?100:(nl-fe)/rl*100;return{rangeMin:fe,rangeMax:_t,currentMin:tl,currentMax:nl,minPct:ol,maxPct:Kl}}),Tt=e.ref(null),fl=e.ref("max");function z(k){const y=Tt.value,x=ot.value;if(!y||!x)return;const W=y.getBoundingClientRect(),_t=(k.clientX-W.left)/W.width*100,pt=(x.minPct+x.maxPct)/2;fl.value=_t<pt?"min":"max"}function Z(k){return gt.value[k]??{}}function P(k,y){gt.value={...gt.value,[k]:y}}function ue(k){const y=gt.value[k];return y?y.type==="string"?!!y.value?.trim():y.type==="range"?y.min!=null||y.max!=null:y.type==="dateRange"?!!(y.from||y.to):y.type==="list"?y.selected?.length>0:!1:!1}function He(k){const y={...gt.value};delete y[k],gt.value=y,Ve.value=null,Ne.value=null}function dt(){if(!Ve.value){Ne.value=null;return}const k=Ht.value;if(!k)return;const y=k.querySelector(`.dss-table-filter-trigger[data-filter-column-key="${Ve.value}"]`);if(!y)return;const x=y.getBoundingClientRect();Ne.value={top:x.bottom+6,left:Math.max(8,x.right-Dt)}}const mt=e.computed(()=>{const k=String(lt.value??"").trim().toLowerCase();return k?ie.data.filter(y=>De.value.some(x=>xt(tn(y,x)).some(fe=>String(fe).toLowerCase().includes(k)))):ie.data}),Je=e.computed(()=>{let k=[...mt.value];const y=(lt.value??"").trim().toLowerCase();return y&&(k=k.filter(x=>ie.columns.some(W=>{if(!W||!W.field)return!1;const fe=tn(x,W);return String(fe??"").toLowerCase().includes(y)}))),De.value.forEach(x=>{const W=q(x),fe=gt.value[W];if(!fe)return;const _t=x.field;if(_t){if(fe.type==="string"&&fe.value?.trim()){const pt=fe.value.trim().toLowerCase();k=k.filter(tl=>{const nl=tn(tl,x);return String(nl??"").toLowerCase().includes(pt)})}else if(fe.type==="range")k=k.filter(pt=>{const tl=jt(pt,_t),nl=Number(tl);return!(Number.isNaN(nl)||fe.min!=null&&nl<fe.min||fe.max!=null&&nl>fe.max)});else if(fe.type==="dateRange"){const pt=fe.from?new Date(fe.from).getTime():null,tl=fe.to?new Date(fe.to).getTime():null;k=k.filter(nl=>{const rl=jt(nl,_t),ol=rl?new Date(rl).getTime():NaN;return!(Number.isNaN(ol)||pt!=null&&ol<pt||tl!=null&&ol>tl)})}else if(fe.type==="list"&&fe.selected?.length){const pt=new Set(fe.selected);k=k.filter(tl=>xt(tn(tl,x)).some(rl=>pt.has(rl)))}}}),k});function xt(k){if(k==null)return[""];if(Array.isArray(k))return k.flatMap(xt);if(typeof k=="object"){const y=k?.label??k?.name??k?.value??k?.title;return[y!=null?String(y):String(k)]}return[String(k)]}function Yt(k){const y=new Set;return ie.data.forEach(x=>{xt(tn(x,k)).forEach(fe=>y.add(fe))}),Array.from(y).sort((x,W)=>String(x).localeCompare(String(W)))}function kl(k,y){if(Ve.value===k){Ve.value=null,Ne.value=null;return}if(Ve.value=k,y?.currentTarget){const x=y.currentTarget.getBoundingClientRect();Ne.value={top:x.bottom+6,left:Math.max(8,x.right-Dt)}}else dt()}function Zl(k,y){P(k,{type:"string",value:y})}function Ml(k){const y=k.field;if(!y)return{min:0,max:100};let x=1/0,W=-1/0;return ie.data.forEach(fe=>{const _t=jt(fe,y),pt=Number(_t);Number.isNaN(pt)||(x=Math.min(x,pt),W=Math.max(W,pt))}),{min:x===1/0?0:x,max:W===-1/0?100:W}}function Ul(k,y,x){const W={...Z(k),type:"range"},fe=x===""?null:Number(x),_t=fe===null||Number.isNaN(fe)?null:fe;W[y]=_t,_t!=null&&(y==="min"&&W.max!=null&&_t>W.max&&(W.max=_t),y==="max"&&W.min!=null&&_t<W.min&&(W.min=_t)),P(k,W)}function hn(k,y,x){const W={...Z(k),type:"dateRange"};W[y]=x||"",P(k,W)}const yn=e.reactive({});function xn(k,y){yn[k]=y}function qn(k){const y=q(k),x=(yn[y]??"").trim().toLowerCase(),W=Yt(k);return x?W.filter(fe=>String(fe).toLowerCase().includes(x)):W}function Wn(k,y){return(Z(k).selected??[]).includes(y!=null?String(y):"")}function to(k,y){const W=[...Z(k).selected??[]],fe=y!=null?String(y):"",_t=W.indexOf(fe);_t>=0?W.splice(_t,1):W.push(fe),P(k,{type:"list",selected:W})}function En(k){Ve.value&&!k.target.closest(".dss-table-filter-wrap")&&!k.target.closest(".dss-table-filter-dropdown")&&(Ve.value=null,Ne.value=null)}function Sn(){dt(),$l.value&&El()}const Rl=k=>{if(!(k.sortable===!1||!ft.value))if(yt.value==="single")w.value===k.field?S.value=S.value===1?-1:S.value===-1?0:1:(w.value=k.field,S.value=1),S.value===0&&(w.value=null),F("sort",{field:w.value,order:S.value});else{const y=K.value.findIndex(x=>x.field===k.field);y>=0?K.value[y].order===1?K.value[y].order=-1:K.value.splice(y,1):K.value.push({field:k.field,order:1}),F("sort",{multiSortMeta:K.value})}},Xl=e.computed(()=>{if(!ft.value)return Je.value;let k=[...Je.value];return yt.value==="single"&&w.value&&S.value!==0?k.sort((y,x)=>{const W=jt(y,w.value),fe=jt(x,w.value);return W===fe?0:W==null?1:fe==null?-1:(W<fe?-1:W>fe?1:0)*S.value}):yt.value==="multiple"&&K.value.length>0&&k.sort((y,x)=>{for(const W of K.value){const fe=jt(y,W.field),_t=jt(x,W.field);if(fe===_t)continue;if(fe==null)return 1;if(_t==null)return-1;const pt=fe<_t?-1:fe>_t?1:0;if(pt!==0)return pt*W.order}return 0}),k}),bl=e.ref(0),Vl=e.ref(kt.value),$l=e.ref(!1),Il=e.ref(null),Tn=e.ref(null),An=e.ref("bottom"),Vn=e.ref(null),Wt=k=>{Vl.value=k,$l.value=!1,bl.value=0,F("page",{page:0,rows:Vl.value})};function be(k){Il.value&&!Il.value.contains(k.target)&&($l.value=!1)}function El(){const k=Il.value,y=Tn.value;if(!k||!y)return;const x=k.querySelector(".dss-pagination-select-dropdown");if(!x)return;const W=y.getBoundingClientRect(),fe=x.offsetHeight||0,pt=(window.innerHeight||document.documentElement.clientHeight)-W.bottom,tl=W.top;An.value=pt<fe+8&&tl>pt?"top":"bottom",Vn.value={width:`${Math.ceil(W.width)}px`,left:`${Math.max(0,Math.round(y.offsetLeft))}px`}}const rt=e.computed(()=>Xl.value.length),Mt=e.computed(()=>Math.ceil(rt.value/Vl.value)),xe=e.computed(()=>Math.max(Mt.value,1)),wt=e.computed(()=>rt.value===0?0:at.value+1),ae=e.computed(()=>Pe.value),at=e.computed(()=>de.value?bl.value*Vl.value:0),Pe=e.computed(()=>de.value?Math.min((bl.value+1)*Vl.value,rt.value):rt.value),Dn=e.computed(()=>{if(!de.value)return Xl.value;const k=at.value,y=Pe.value;return Xl.value.slice(k,y)}),Fl=e.ref(new Set),Yl=e.computed(()=>Xl.value.filter((k,y)=>Fl.value.has(ze(k,y)))),Cl=e.computed(()=>{const k=Xl.value.length;return k>0&&Fl.value.size===k}),Nn=e.computed(()=>{const k=Xl.value.length,y=Fl.value.size;return y>0&&y<k}),un=(k,y)=>Fl.value.has(ze(k,y)),jl=()=>{if(Cl.value)Fl.value=new Set,F("unselect-all");else{const k=new Set;Xl.value.forEach((y,x)=>k.add(ze(y,x))),Fl.value=k,F("select-all",Yl.value)}},wl=(k,y)=>{const x=ze(k,y),W=new Set(Fl.value),fe=W.has(x);ke.value==="single"?fe?(W.delete(x),F("row-unselect",k)):(W.clear(),W.add(x),F("row-select",k)):fe?(W.delete(x),F("row-unselect",k)):(W.add(x),F("row-select",k)),Fl.value=W},en=e.ref("1"),Zt=()=>{const k=Number.parseInt(String(en.value),10);if(!Number.isFinite(k)){en.value=String(bl.value+1);return}const y=Math.min(xe.value,Math.max(1,k));y!==bl.value+1?Nl(y-1):en.value=String(y)},Nl=k=>{k<0||k>=Mt.value||(bl.value=k,F("page",{page:k,rows:Vl.value}))},lo=(k,y,x)=>{F("row-click",{data:k,index:y,originalEvent:x}),V(k,at.value+y)},Zn=(k,y)=>{const x=at.value+y;return{"dss-table-row-selected":un(k,x),"dss-table-row-even":y%2===0,"dss-table-row-odd":y%2!==0,"dss-table-row-truncated-clickable":ye.value,"dss-table-row-truncated-expanded":zt.value===ze(k,x)}},tn=(k,y)=>y.field?jt(k,y.field):"",jt=(k,y)=>y.split(".").reduce((x,W)=>x&&x[W],k),Hn=k=>{const y=k.align??we.value;return{"dss-table-sortable":k.sortable!==!1&&ft.value,"dss-table-align-left":y==="left","dss-table-align-center":y==="center","dss-table-align-right":y==="right",[k.className]:k.className}},Rn=k=>{const y={};return k.width&&(y.width=typeof k.width=="number"?`${k.width}px`:k.width),k.minWidth&&(y.minWidth=typeof k.minWidth=="number"?`${k.minWidth}px`:k.minWidth),k.maxWidth&&(y.maxWidth=typeof k.maxWidth=="number"?`${k.maxWidth}px`:k.maxWidth),y};return e.watch(()=>ie.locale,k=>{k&&k!==_.value&&(_.value=k)},{immediate:!0}),e.watch(kt,k=>{Vl.value=k,bl.value=0}),e.watch($l,async k=>{k&&(await e.nextTick(),El())}),e.watch(bl,k=>{en.value=String(k+1)},{immediate:!0}),e.watch(lt,k=>{F("search",k??"")}),e.watch(()=>ie.columns,()=>{vt()},{immediate:!0,deep:!0}),e.onMounted(()=>{document.addEventListener("click",be),document.addEventListener("click",ut),document.addEventListener("click",En),window.addEventListener("resize",Sn),window.addEventListener("scroll",Sn,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",be),document.removeEventListener("click",ut),document.removeEventListener("click",En),window.removeEventListener("resize",Sn),window.removeEventListener("scroll",Sn,!0)}),(k,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"dss-table-container",ref_key:"tableContainerRef",ref:Ht,style:e.normalizeStyle({width:f.value+"px",height:Ce.value?Ce.value+"px":"auto"})},[Ot.value?(e.openBlock(),e.createElementBlock("div",Pi,[e.createElementVNode("div",Oi,[ce.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-btn",onClick:y[0]||(y[0]=x=>F("download-pdf"))},[y[22]||(y[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(B)("table.downloadPdf")),1)])):e.createCommentVNode("",!0),Ie.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-table-toolbar-btn",onClick:y[1]||(y[1]=x=>F("download-excel"))},[y[23]||(y[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(B)("table.downloadExcel")),1)])):e.createCommentVNode("",!0),Qe.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-table-toolbar-column-visibility",ref_key:"columnVisibilityDropdownRef",ref:re},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":Fe.value}]),onClick:y[2]||(y[2]=x=>Fe.value=!Fe.value),"aria-expanded":Fe.value,"aria-haspopup":"listbox"},[e.createTextVNode(e.toDisplayString(e.unref(B)("table.columnVisibility"))+" ",1),y[24]||(y[24]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,qi),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.columns,(x,W)=>(e.openBlock(),e.createElementBlock("li",{key:Ge(x,W),role:"option",class:"dss-table-column-visibility-option",onClick:y[3]||(y[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",Zi,[e.createElementVNode("span",Ui,[e.createElementVNode("input",{type:"checkbox",checked:U(x,W),onChange:fe=>le(x,W),class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,Xi),U(x,W)?(e.openBlock(),e.createElementBlock("span",Yi,[...y[25]||(y[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",ji,e.toDisplayString(x.header),1)])]))),128))],512),[[e.vShow,Fe.value]])]),_:1})],512)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ki,[Xe.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-table-toolbar-search",{"dss-table-toolbar-search--expanded":Bt.value||lt.value}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:qt,"onUpdate:modelValue":y[4]||(y[4]=x=>lt.value=x),type:"text",class:"dss-table-toolbar-search-input",placeholder:e.unref(B)("table.searchPlaceholder"),"aria-label":e.unref(B)("table.searchTableAriaLabel"),onFocus:y[5]||(y[5]=x=>Bt.value=!0),onBlur:Me},null,40,Gi),[[e.vModelText,lt.value]]),lt.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-search-clear","aria-label":e.unref(B)("table.clearSearchAriaLabel"),onClick:je},[...y[26]||(y[26]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])],8,Qi)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"dss-table-toolbar-search-trigger","aria-label":e.unref(B)("table.searchAriaLabel"),"aria-expanded":Bt.value||!!lt.value,onMousedown:e.withModifiers(Ae,["prevent"])},[...y[27]||(y[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,Ji)],2)):e.createCommentVNode("",!0),k.$slots["toolbar-extra"]?(e.openBlock(),e.createElementBlock("div",ec,[e.renderSlot(k.$slots,"toolbar-extra")])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-table-wrapper",{"dss-table-scrollable":Ft.value}])},[e.createElementVNode("table",{class:e.normalizeClass(["dss-table",ct.value])},[e.createElementVNode("thead",tc,[e.createElementVNode("tr",null,[_e.value?(e.openBlock(),e.createElementBlock("th",lc,[ke.value==="multiple"?(e.openBlock(),e.createElementBlock("span",nc,[e.createElementVNode("input",{type:"checkbox",checked:Cl.value,indeterminate:Nn.value,onChange:jl,class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,oc),Nn.value?(e.openBlock(),e.createElementBlock("span",ac)):Cl.value?(e.openBlock(),e.createElementBlock("span",sc,[...y[28]||(y[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),ne.value?(e.openBlock(),e.createElementBlock("th",{key:1,class:"dss-table-th dss-table-expansion-column","aria-label":e.unref(B)("table.expandRowAriaLabel")},null,8,rc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De.value,(x,W)=>(e.openBlock(),e.createElementBlock("th",{key:q(x),class:e.normalizeClass(["dss-table-th",Hn(x)]),style:e.normalizeStyle(Rn(x)),onClick:fe=>Rl(x)},[e.createElementVNode("div",cc,[e.createElementVNode("span",uc,e.toDisplayString(x.header),1),x.sortable!==!1&&ft.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dss-table-sort-icon",Ye(x)])},[Q(x)===0?(e.openBlock(),e.createElementBlock("span",dc,[...y[29]||(y[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)])])):Q(x)===1?(e.openBlock(),e.createElementBlock("span",mc,[...y[30]||(y[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)])])):Q(x)===-1?(e.openBlock(),e.createElementBlock("span",pc,[...y[31]||(y[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),x.filter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-table-filter-wrap",{"dss-table-filter-wrap--open":Ve.value===q(x)}]),onClick:y[6]||(y[6]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-table-filter-trigger",{"dss-table-filter-trigger--active":ue(q(x))}]),"data-filter-column-key":q(x),"aria-expanded":Ve.value===q(x),"aria-label":e.unref(B)("table.filterColumnAriaLabel"),onClick:fe=>kl(q(x),fe)},[...y[32]||(y[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,fc)],2)):e.createCommentVNode("",!0)])],14,ic))),128))])]),e.createElementVNode("tbody",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Dn.value,(x,W)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ze(x,at.value+W)},[e.createElementVNode("tr",{class:e.normalizeClass(["dss-table-tr",Zn(x,W)]),style:e.normalizeStyle(ee.value),onClick:fe=>lo(x,W,fe)},[_e.value?(e.openBlock(),e.createElementBlock("td",{key:0,class:"dss-table-td dss-table-selection-cell",onClick:y[7]||(y[7]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("span",hc,[e.createElementVNode("input",{type:ke.value==="multiple"?"checkbox":"radio",name:`dss-table-select-${$.tableId}`,checked:un(x,at.value+W),onChange:fe=>wl(x,at.value+W),class:e.normalizeClass(["dss-table-checkbox",ke.value==="multiple"?"dss-table-checkbox--checkbox":"dss-table-checkbox--radio"])},null,42,yc),ke.value==="multiple"&&un(x,at.value+W)?(e.openBlock(),e.createElementBlock("span",kc,[...y[33]||(y[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)])])):ke.value==="single"&&un(x,at.value+W)?(e.openBlock(),e.createElementBlock("span",Cc)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("td",{key:1,class:"dss-table-td dss-table-expansion-cell",onClick:e.withModifiers(fe=>Rt(x,at.value+W,fe),["stop"])},[Xt(x,at.value+W)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-expansion-trigger","aria-expanded":el(x,at.value+W),"aria-label":el(x,at.value+W)?e.unref(B)("table.collapseRowAriaLabel"):e.unref(B)("table.expandRowAriaLabel")},[e.createElementVNode("span",{class:e.normalizeClass(["dss-table-expansion-icon",{"dss-table-expansion-icon--expanded":el(x,at.value+W)}]),"aria-hidden":"true"},[...y[34]||(y[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,wc)):(e.openBlock(),e.createElementBlock("span",xc))],8,bc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De.value,(fe,_t)=>(e.openBlock(),e.createElementBlock("td",{key:q(fe),class:e.normalizeClass(["dss-table-td",Hn(fe)]),style:e.normalizeStyle(Rn(fe))},[e.renderSlot(k.$slots,`cell-${fe.field}`,{data:x,column:fe,rowIndex:W,isExpanded:zt.value===ze(x,at.value+W)},()=>[e.createTextVNode(e.toDisplayString(tn(x,fe)),1)])],6))),128))],14,gc),ne.value&&Xt(x,at.value+W)&&el(x,at.value+W)?(e.openBlock(),e.createElementBlock("tr",Ec,[e.createElementVNode("td",{colspan:Vt.value,class:"dss-table-expansion-content-cell"},[e.renderSlot(k.$slots,"expansion",{data:x,rowIndex:W})],8,Sc)])):e.createCommentVNode("",!0)],64))),128)),Dn.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:"dss-table-empty",style:e.normalizeStyle(ee.value)},[e.createElementVNode("td",{colspan:Vt.value,class:"dss-table-empty-cell"},[e.renderSlot(k.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(j.value),1)])],8,Vc)],4))])],2)],2),Ut.value?(e.openBlock(),e.createElementBlock("div",Nc,[e.createElementVNode("div",Bc,[Pt.value?(e.openBlock(),e.createElementBlock("span",Mc,e.toDisplayString(e.unref(B)("table.showingRange",{start:wt.value,end:ae.value,total:rt.value})),1)):(e.openBlock(),e.createElementBlock("span",_c," "))]),e.createElementVNode("div",$c,[St.value?(e.openBlock(),e.createElementBlock("div",Lc,[e.createElementVNode("button",{class:"dss-pagination-btn",disabled:bl.value===0,onClick:y[8]||(y[8]=x=>Nl(0)),title:e.unref(B)("table.firstPage")},[...y[35]||(y[35]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"‹"),e.createElementVNode("span",null,"‹")],-1)])],8,Tc),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:bl.value===0,onClick:y[9]||(y[9]=x=>Nl(bl.value-1)),title:e.unref(B)("table.previousPage")}," ‹ ",8,Ac),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":y[10]||(y[10]=x=>en.value=x),type:"text",class:"dss-pagination-page-input","aria-label":e.unref(B)("table.currentPageAriaLabel"),onBlur:Zt,onKeydown:e.withKeys(e.withModifiers(Zt,["prevent"]),["enter"])},null,40,Dc),[[e.vModelText,en.value]]),e.createElementVNode("span",Hc,e.toDisplayString(e.unref(B)("table.ofPages",{total:xe.value})),1),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:bl.value>=Mt.value-1,onClick:y[11]||(y[11]=x=>Nl(bl.value+1)),title:e.unref(B)("table.nextPage")}," › ",8,Rc),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:bl.value>=Mt.value-1,onClick:y[12]||(y[12]=x=>Nl(Mt.value-1)),title:e.unref(B)("table.lastPage")},[...y[36]||(y[36]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"›"),e.createElementVNode("span",null,"›")],-1)])],8,Ic)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Fc,[At.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-pagination-rows-per-page",ref_key:"rowsPerPageDropdownRef",ref:Il},[e.createElementVNode("span",zc,e.toDisplayString(e.unref(B)("table.rowsPerPage"))+":",1),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":$l.value}]),onClick:y[13]||(y[13]=x=>$l.value=!$l.value),"aria-expanded":$l.value,"aria-haspopup":"listbox",ref_key:"rowsPerPageTriggerRef",ref:Tn},[e.createTextVNode(e.toDisplayString(Vl.value)+" ",1),y[37]||(y[37]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,Pc),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":An.value==="top"}]),style:e.normalizeStyle(Vn.value),role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ze.value,x=>(e.openBlock(),e.createElementBlock("li",{key:x,role:"option","aria-selected":x===Vl.value,class:e.normalizeClass(["dss-pagination-select-option",{"dss-pagination-select-option--selected":x===Vl.value}]),onClick:W=>Wt(x)},e.toDisplayString(x),11,Oc))),128))],6),[[e.vShow,$l.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(Ne.value?{top:Ne.value.top+"px",left:Ne.value.left+"px",width:Dt+"px"}:void 0),onClick:y[21]||(y[21]=e.withModifiers(()=>{},["stop"]))},[nt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[nt.value.filter==="string"?(e.openBlock(),e.createElementBlock("div",qc,[e.createElementVNode("input",{type:"text",value:Z(Ve.value).value??"",onInput:y[14]||(y[14]=x=>Zl(Ve.value,x.target.value)),class:"dss-table-filter-input",placeholder:e.unref(B)("table.search")},null,40,Wc)])):nt.value.filter==="range"&&ot.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-table-filter-double-range",style:e.normalizeStyle({"--range-min-pct":ot.value.minPct+"%","--range-max-pct":ot.value.maxPct+"%"})},[e.createElementVNode("div",{ref_key:"doubleRangeTrackRef",ref:Tt,class:"dss-table-filter-double-range-track",onMousemove:z,onMouseenter:z},[e.createElementVNode("input",{type:"range",min:ot.value.rangeMin,max:ot.value.rangeMax,value:ot.value.currentMin,onInput:y[15]||(y[15]=x=>Ul(Ve.value,"min",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--min",style:e.normalizeStyle({zIndex:fl.value==="min"?2:1})},null,44,Zc),e.createElementVNode("input",{type:"range",min:ot.value.rangeMin,max:ot.value.rangeMax,value:ot.value.currentMax,onInput:y[16]||(y[16]=x=>Ul(Ve.value,"max",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--max",style:e.normalizeStyle({zIndex:fl.value==="max"?2:1})},null,44,Uc)],544),e.createElementVNode("div",Xc,e.toDisplayString(ot.value.currentMin)+" – "+e.toDisplayString(ot.value.currentMax),1)],4)):nt.value.filter==="dateRange"?(e.openBlock(),e.createElementBlock("div",Yc,[e.createElementVNode("div",jc,[e.createElementVNode("label",Kc,e.toDisplayString(e.unref(B)("table.filterFrom")),1),e.createElementVNode("input",{type:"date",value:Z(Ve.value).from??"",onInput:y[17]||(y[17]=x=>hn(Ve.value,"from",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,Gc)]),e.createElementVNode("div",Qc,[e.createElementVNode("label",Jc,e.toDisplayString(e.unref(B)("table.filterTo")),1),e.createElementVNode("input",{type:"date",value:Z(Ve.value).to??"",onInput:y[18]||(y[18]=x=>hn(Ve.value,"to",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,eu)])])):nt.value.filter==="list"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("input",{type:"text",value:yn[Ve.value]??"",onInput:y[19]||(y[19]=x=>xn(Ve.value,x.target.value)),class:"dss-table-filter-input dss-table-filter-list-search",placeholder:e.unref(B)("table.search")},null,40,tu),e.createElementVNode("div",lu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qn(nt.value),x=>(e.openBlock(),e.createElementBlock("label",{key:x,class:"dss-table-filter-list-item"},[e.createElementVNode("input",{type:"checkbox",checked:Wn(Ve.value,x),onChange:W=>to(Ve.value,x)},null,40,nu),e.createElementVNode("span",null,e.toDisplayString(x),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",ou,[e.createElementVNode("button",{type:"button",class:"dss-table-filter-clear",onClick:y[20]||(y[20]=x=>He(Ve.value))},e.toDisplayString(e.unref(B)("table.clearFilter")),1)])],64)):e.createCommentVNode("",!0)],4),[[e.vShow,Ve.value&&nt.value&&Ne.value]])]),_:1})]))],64))}}),ru="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",iu="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",cu="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",uu="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",du="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",mu="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",pu={class:"dss-toolbar-left"},fu=["title"],vu=["title"],gu={class:"dss-toolbar-dropdown-wrapper"},hu=["title"],yu=["src"],ku=["src"],Cu=["src"],bu=["src"],wu=["src"],xu=["src"],Eu={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},Su=["src"],Vu=["src"],Nu=["src"],Bu=["src"],Mu=["src"],_u=["src"],$u=["title"],Lu=["title"],Tu=["title"],Au=["title"],Du=["title"],Hu=["title"],Ru=["title"],Iu=["title"],Fu=["title"],zu={key:2,class:"dss-toolbar-separator"},Pu=["title"],Ou={key:4,class:"dss-toolbar-separator"},qu={key:5,class:"dss-toolbar-dropdown-wrapper"},Wu=["title"],Zu={class:"dss-toolbar-dropdown-ai"},Uu={class:"dss-toolbar-right"},Xu={key:0,class:"dss-toolbar-custom-group"},Yu={key:1,class:"dss-toolbar-separator"},ju={class:"dss-link-modal-content"},Ku={class:"dss-link-modal-field"},Gu={class:"dss-link-modal-label"},Qu=["placeholder"],Ju={class:"dss-link-modal-field"},ed={class:"dss-link-modal-label"},td=["placeholder"],ld={class:"dss-image-modal-tabs"},nd={key:0,class:"dss-image-tab-content"},od={class:"dss-link-modal-content"},ad={class:"dss-link-modal-field"},sd={key:0,class:"dss-link-modal-label"},rd=["src"],id={class:"dss-link-modal-field"},cd={class:"dss-link-modal-label"},ud=["placeholder"],dd={class:"dss-link-modal-field"},md={class:"dss-link-modal-label"},pd=["placeholder"],fd={class:"dss-link-modal-field"},vd={class:"dss-link-modal-label"},gd=["placeholder"],hd={key:1,class:"dss-image-tab-content"},yd={class:"dss-link-modal-content"},kd={class:"dss-link-modal-field"},Cd={class:"dss-link-modal-label"},bd=["placeholder"],wd={class:"dss-link-modal-field"},xd={class:"dss-link-modal-label"},Ed=["placeholder"],Sd={class:"dss-link-modal-field"},Vd={class:"dss-link-modal-label"},Nd=["placeholder"],Bd={class:"dss-link-modal-field"},Md={class:"dss-link-modal-label"},_d=["placeholder"],$d={class:"dss-text-editor-title-input-container"},Ld={key:0,class:"dss-text-editor-title-preview"},Td={key:0},Ad={key:1,class:"dss-text-editor-preview-placeholder"},Dd=["value","placeholder","disabled"],Hd={key:2,class:"dss-text-editor-title-slot dss-text-editor-slot-last"},Rd={class:"dss-text-editor-description-input-container"},Id={key:0,class:"dss-text-editor-description-preview"},Fd={key:0},zd={key:1,class:"dss-text-editor-preview-placeholder"},Pd=["value","placeholder","disabled"],Od={key:3,class:"dss-text-editor-description-slot dss-text-editor-slot-last"},qd=["data-comment-id","onMouseenter"],Wd=["onClick"],Zd=["src","alt"],Ud={key:1},Xd=["onClick"],Yd=["src","alt"],jd={key:1},Kd=["data-has-second-user","onClick"],Gd={class:"editor-comment-marker-count"},Qd={key:4,class:"dss-text-editor-textarea-wrapper"},Jd=["value","placeholder","rows","disabled"],e1={class:"dss-text-editor-footer"},t1={class:"dss-text-editor-footer-content"},l1={class:"dss-text-editor-footer-stat"},n1={class:"dss-text-editor-footer-stat"},o1={key:5,class:"dss-text-editor-content-wrapper"},a1={key:0,class:"dss-comment-overlay-body"},s1={class:"dss-comment-selection-wrapper"},r1=["innerHTML"],i1={class:"dss-comment-messages-wrapper"},c1={key:0,class:"dss-comment-avatar-wrapper"},u1={class:"dss-comment-avatar"},d1=["src","alt"],m1={key:1},p1={class:"dss-comment-header"},f1={class:"dss-comment-header-text"},v1={class:"dss-comment-author"},g1={key:0,class:"dss-comment-date"},h1=["onClick","title"],y1={class:"dss-comment-overlay-inner"},k1=["placeholder","onKeydown"],C1={class:"dss-text-editor-footer"},b1={class:"dss-text-editor-footer-content"},w1={class:"dss-text-editor-footer-stat"},x1={class:"dss-text-editor-footer-stat"},E1=["title"],S1=["title"],V1={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:""},N1={class:"dss-image-popup-content"},B1={key:0,class:"dss-image-popup-no-alt-icon"},M1=["title"],_1=["title"],$1={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:""},L1={class:"dss-toolbar-left"},T1=["title"],A1=["title"],D1={class:"dss-toolbar-dropdown-wrapper"},H1=["title"],R1=["src"],I1=["src"],F1=["src"],z1=["src"],P1=["src"],O1=["src"],q1={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},W1=["title"],Z1=["title"],U1=["title"],X1=["title"],Y1=["title"],j1=["title"],K1=["title"],G1=["title"],Q1=["title"],J1=["title"],em={key:2,class:"dss-toolbar-separator"},tm={key:3,class:"dss-toolbar-dropdown-wrapper"},lm=["title"],nm={class:"dss-toolbar-dropdown-ai"},om={key:0,class:"dss-toolbar-right"},am={key:0,class:"dss-toolbar-separator"},sm={key:0,class:"dss-toolbar-custom-group"},rm={key:1,class:"dss-toolbar-separator"},im={name:"DSSTextEditor"},cm=Object.assign(im,{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},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:B}){const{t:_,locale:ie}=Gn.useI18n(),F={h1:ru,h2:iu,h3:cu,h4:uu,h5:du,h6:mu},A=$,X=B,Ke=e.useSlots(),ge=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
96
|
+
`,t+="Category",H.series.forEach(g=>{const C=g.name.replace(/"/g,'""');t+=',"'+C+'"'}),t+=`
|
|
97
|
+
`;const s=Math.max(...H.series.map(g=>g.data?.length||0));for(let g=0;g<s;g++){let I='"'+(H.categories[g]||M("chart.fallback.item",{number:g+1})).toString().replace(/"/g,'""')+'"';H.series.forEach(N=>{const $=N.data&&N.data[g]!==void 0?N.data[g]:"";I+=","+$}),t+=I+`
|
|
98
|
+
`}const n=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(n),p=document.createElement("a");p.href=i,p.download=On("csv"),document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(i),xn()}catch(t){console.error("Error downloading CSV:",t)}},zo=t=>{if(typeof t.action=="function"){const s={series:H.series,categories:H.categories,markers:Gt.value},n={chartX:bt.value.chartX,chartY:bt.value.chartY,dataX:bt.value.mouseDataX,dataY:bt.value.mouseDataY,categoryIndex:clampedCategoryIndex||bt.value.categoryIndex};t.action(s,n)}xn()},Po=()=>{lt(),_e.value.show=!0,_e.value.categoryIndex=bt.value.categoryIndex,_e.value.fromButton=!1,xn()},yo=()=>{lt(),_e.value.show=!0,_e.value.categoryIndex=0,_e.value.fromButton=!0},ko=t=>{if(bt.value.show){const s=document.querySelector(".dss-context-menu");s&&!s.contains(t.target)&&(bt.value.show=!1)}},no=t=>{bt.value.show&&!t.target.closest(".context-menu")&&(bt.value.show=!1)},Co=t=>{if(!Cn.value||!je.value)return;t.preventDefault(),t.stopPropagation(),J.value.isZooming=!0,st.value.show=!1,J.value.zoomTimeout&&clearTimeout(J.value.zoomTimeout);const n=t.currentTarget.getBoundingClientRect(),i=t.clientX-n.left,p=t.clientY-n.top;if(i<F.value.left-50||i>F.value.right+50||p<F.value.top-50||p>F.value.bottom+100){J.value.isZooming=!1;return}const g=t.deltaY>0?.9:1.1,C=Math.max(J.value.minScale,Math.min(J.value.maxScale,J.value.scale*g));if(C!==J.value.scale){const{minX:b,maxX:I}=qt.value,N=I-b||1,$=N/J.value.scale,B=b-J.value.offsetX/F.value.width*N,ee=(i-F.value.left)/F.value.width,Ee=B+ee*$;J.value.scale=C;const Ue=N/J.value.scale,ie=Ee-ee*Ue;J.value.offsetX=-(ie-b)/N*F.value.width,J.value.scale<=1.01&&(J.value.scale=1,J.value.offsetX=0)}J.value.zoomTimeout=setTimeout(()=>{J.value.isZooming=!1,J.value.zoomTimeout=null},300)},lo=t=>{if(!Cn.value||!je.value||J.value.scale<=1)return;st.value.show=!1;const n=t.currentTarget.getBoundingClientRect();t.clientX-n.left,t.clientY-n.top,J.value.isDragging=!0,J.value.lastMouseX=t.clientX,J.value.lastMouseY=t.clientY,t.preventDefault()},bo=()=>{J.value.isDragging=!1},oo=()=>{!Cn.value||!je.value||(J.value.scale=1,J.value.offsetX=0,J.value.isDragging=!1,J.value.zoomTimeout&&(clearTimeout(J.value.zoomTimeout),J.value.zoomTimeout=null),J.value.isZooming=!1)},Oo=()=>!Cn.value||!dl.value||!je.value?"default":J.value.isDragging?"grabbing":J.value.scale>1?"grab":"dss-crosshair",ql=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 s=`M ${t[0].x} ${t[0].y}`;for(let n=0;n<t.length-1;n++){const i=t[Math.max(n-1,0)],p=t[n],g=t[n+1],C=t[Math.min(n+2,t.length-1)],b=p.x+(g.x-i.x)/6*gt.value,I=p.y+(g.y-i.y)/6*gt.value,N=g.x-(C.x-p.x)/6*gt.value,$=g.y-(C.y-p.y)/6*gt.value;s+=` C ${b} ${I} ${N} ${$} ${g.x} ${g.y}`}return s},En=e.computed(()=>{const s=R.value?.chart?.padding,n=typeof s=="number"?s:null,i=s&&typeof s=="object"?s:null,p=50;let g=p+(Wt.value?30:0)+60;if(Sn.value){const B={left:p+40,top:p+40,right:p+40,bottom:p+40};return n!=null?{left:n,top:n,right:n,bottom:n}:i?{left:i.left??B.left,top:i.top??B.top,right:i.right??B.right,bottom:i.bottom??B.bottom}:B}if(fn.value){const B=!Q.value,ee=Cl.value,Ee=ee?Fl.value+bl.value+Math.max(24,Bl.value+16):0,Ue=B?12:p;let ie=0;rt.value&&(ie+=B?8:15),Et.value&&(ie+=B?6:10);const ye=qe();let Ne=Ue+(B?4:16)+(ee?Ee:0),fe=Ue+(ee?Ee:0);Q.value&&be.value==="left"?Ne+=ye.legendWidth||150:Q.value&&be.value==="right"&&(fe+=ye.legendWidth||150);const Oe=We.value==="semi-radial"?ee?Ee:8:ee?Ee:B?8:p+80,Te=ee?14:0,Le=Ue+ie+Te,De={left:Ne,top:Le,right:fe,bottom:Oe};return n!=null?{left:n,top:n,right:n,bottom:n}:i?{left:i.left??De.left,top:i.top??De.top,right:i.right??De.right,bottom:i.bottom??De.bottom}:De}let C=0;rt.value&&(C+=15),Et.value&&(C+=10);const b=qe();let I=p+16,N=p;Q.value&&be.value==="left"?I+=b.legendWidth||150:Q.value&&be.value==="right"&&(N+=b.legendWidth||150),$n.value&&(N+=44);const $={left:I,top:p+C,right:N,bottom:g};return n!=null?{left:n,top:n,right:n,bottom:n}:i?{left:i.left??$.left,top:i.top??$.top,right:i.right??$.right,bottom:i.bottom??$.bottom}:$}),F=e.computed(()=>({left:En.value.left,top:En.value.top,right:ke.value-En.value.right,bottom:de.value-En.value.bottom,width:ke.value-(En.value.left+En.value.right),height:de.value-(En.value.top+En.value.bottom)})),Cn=e.computed(()=>["line","area","bar"].includes(We.value)||Pt.value),qn=e.computed(()=>Pt.value),Tl=e.computed(()=>We.value==="mini-radial"),fn=e.computed(()=>["radial","semi-radial","mini-radial"].includes(We.value)),Sn=e.computed(()=>We.value==="spider"),jt=e.computed(()=>We.value==="bubble"),Qt=e.computed(()=>R.value?.chart?.orientation==="horizontal"&&(We.value==="bar"||qn.value)),rl=t=>{const{minY:s,maxY:n}=qt.value,i=n-s||1;return F.value.left+(t-s)/i*F.value.width},ml=t=>{const{maxX:s}=qt.value,n=s+1,p=F.value.height/n;return F.value.top+(t+.5)*p},At=e.computed(()=>fn.value?En.value.left+(ke.value-En.value.left-En.value.right)/2:ke.value/2),wt=e.computed(()=>Sn.value?de.value/2-40:fn.value?En.value.top+(de.value-En.value.top-En.value.bottom)/2:de.value/2),ut=e.computed(()=>{if(Sn.value){const t=F.value.width-80,s=F.value.height-80;return Math.min(t,s)/2}return Math.min(F.value.width,F.value.height)/2}),zt=e.computed(()=>{const t=R.value,s=t?.plotOptions?.radialBar?.innerRadiusRatio??t?.radialBar?.innerRadiusRatio,n=typeof s=="number"&&s>=0&&s<=1?s:.45;return ut.value*n}),Al=e.computed(()=>{const t=R.value,s=typeof H.innerSize=="number"?H.innerSize:t?.innerSize;return typeof s!="number"||s<=-100||!(fn.value||Sn.value)?1:1+s/100}),en=e.computed(()=>{const t=Al.value;if(t===1||t<=0)return;const s=At.value,n=wt.value;return`translate(${s}, ${n}) scale(${t}) translate(${-s}, ${-n})`}),El=e.ref(0),Wl=e.computed(()=>`semi-radial-fill-clip-${H.chartId}`),Tn=e.computed(()=>We.value==="semi-radial"),tl=e.computed(()=>Tn.value&&$t.value&&!hl.value),nl=e.computed(()=>Tn.value&&$t.value&&!hl.value&&sn.value==="fill"),pl=e.computed(()=>{const t=tl.value?El.value:1,s=At.value,n=wt.value,i=zt.value,p=ut.value,g=Math.PI,C=Math.PI+t*Math.PI;if(t<=0)return`M ${s} ${n} L ${s} ${n} Z`;const b=s+p*Math.cos(g),I=n+p*Math.sin(g),N=s+p*Math.cos(C),$=n+p*Math.sin(C),B=s+i*Math.cos(C),ee=n+i*Math.sin(C),Ee=s+i*Math.cos(g),Ue=n+i*Math.sin(g),ie=t>.5?1:0;return`M ${s} ${n} L ${b} ${I} A ${p} ${p} 0 ${ie} 1 ${N} ${$} L ${B} ${ee} A ${i} ${i} 0 ${ie} 1 ${Ee} ${Ue} Z`}),fl=e.computed(()=>{if(!(!Tn.value||!tl.value)&&!nl.value)return`url(#${Wl.value})`}),qo=t=>{if(!(!nl.value||t!==0))return`url(#${Wl.value})`},vl=e.ref(0),Sl=e.computed(()=>`radial-reveal-clip-${H.chartId}`),jn=e.computed(()=>We.value==="radial"),Dl=e.computed(()=>{const t=jn.value?vl.value:1,s=At.value,n=wt.value,i=Math.max(ut.value*1.5,ke.value,de.value);if(t<=0)return`M ${s} ${n} L ${s} ${n} Z`;if(t>=1){const B=s-i,ee=s+i;return`M ${B} ${n} A ${i} ${i} 0 0 1 ${ee} ${n} A ${i} ${i} 0 0 1 ${B} ${n} Z`}const p=-Math.PI/2,g=p+t*Math.PI*2,C=s+i*Math.cos(p),b=n+i*Math.sin(p),I=s+i*Math.cos(g),N=n+i*Math.sin(g),$=t>=.5?1:0;return`M ${s} ${n} L ${C} ${b} A ${i} ${i} 0 ${$} 1 ${I} ${N} Z`}),wo=e.computed(()=>{if(fl.value)return fl.value;if(jn.value)return`url(#${Sl.value})`});let Hl=null;const Wo=()=>{if(!tl.value)return;El.value=0;const t=V.value,s=performance.now(),n=i=>{const p=i-s,g=Math.min(1,p/t);El.value=Ko(E.value,g),g<1&&(Hl=requestAnimationFrame(n))};Hl=requestAnimationFrame(n)},Rl=e.computed(()=>R.value?.bubbles?.minSize||8),ao=e.computed(()=>R.value?.bubbles?.maxSize||50),Zl=e.computed(()=>R.value?.bubbles?.opacity||.7),xo=(t,s)=>{const n=[15,20,25,18,22],i=n[t%n.length]||20,p=1+Math.sin(s*.5)*.2;return Math.max(5,i*p)},Eo=t=>{const s=document.querySelector(`.dss-bubble-image-${t}`);s&&(s.style.opacity="1")},so=t=>{const s=document.querySelector(`.dss-bubble-image-${t}`);s&&(s.style.display="none")},Kn=e.computed(()=>H.series),Gn=e.computed(()=>H.series.filter((t,s)=>!tt.value.has(s))),Ul=t=>{if(!t)return"primary";const s=t.yAxis??t.axis??t.yAxisId;return s==="secondary"||s==="right"||s===1?"secondary":"primary"},ro=t=>t?typeof t.strokeDasharray=="string"?t.strokeDasharray:Array.isArray(t.strokeDasharray)?t.strokeDasharray.join(","):t.dotted===!0?"4,4":null:null,So=e.computed(()=>Gn.value.filter(t=>Ul(t)==="primary")),Vl=e.computed(()=>Gn.value.filter(t=>Ul(t)==="secondary")),$n=e.computed(()=>!Qt.value&&!!G.value&&Vl.value.length>0),bn="auto",io=(t,s,n,i=0,p=100)=>{let g=1/0,C=-1/0;if(t.forEach(N=>{N?.data?.length&&N.data.forEach($=>{typeof $=="number"&&Number.isFinite($)&&(g=Math.min(g,$),C=Math.max(C,$))})}),g===1/0)return{minY:i,maxY:p};let b;if(s===bn){const N=C-g,$=N>0?N*.1:1;b=Math.max(0,g-$)}else if(typeof s=="number")b=s;else{const N=C-g,$=N>0?N*.1:1;b=Math.max(0,g-$)}let I;if(n===bn){const N=C-g,$=N>0?N*.1:2;I=C+$}else if(typeof n=="number")I=n;else{const N=C-g,$=N>0?N*.1:2;I=C+$}return{minY:b,maxY:I}},qt=e.computed(()=>{if(jt.value)return Zo();if(!Gn.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=0;Gn.value.forEach(n=>{n.data&&n.data.length&&(t=Math.max(t,n.data.length-1))}),H.categories.length>0&&(t=Math.max(t,H.categories.length-1));const s=io(So.value.length?So.value:Gn.value,He.value,Xe.value);return{minX:0,maxX:t,minY:s.minY,maxY:s.maxY}}),Vo=e.computed(()=>$n.value?io(Vl.value,Zt.value,kt.value,qt.value.minY,qt.value.maxY):{minY:qt.value.minY,maxY:qt.value.maxY}),Zo=()=>{if(!Gn.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,s=-1/0,n=1/0,i=-1/0,p=1/0,g=-1/0,C=!1;if(Gn.value.forEach((Ee,Ue)=>{Ee?.data?.length&&Ee.data.forEach((ie,ye)=>{let Ne,fe,Je;if(typeof ie=="object"&&ie!==null&&!Array.isArray(ie))Ne=typeof ie.x=="number"?ie.x:ye,fe=typeof ie.y=="number"?ie.y:0,Je=typeof ie.size=="number"?ie.size:20;else if(Array.isArray(ie)&&ie.length>=3)Ne=typeof ie[0]=="number"?ie[0]:ye,fe=typeof ie[1]=="number"?ie[1]:0,Je=typeof ie[2]=="number"?ie[2]:20;else if(typeof ie=="number")Ne=ye,fe=ie,Je=xo(Ue,ye);else return;isFinite(Ne)&&isFinite(fe)&&isFinite(Je)&&(t=Math.min(t,Ne),s=Math.max(s,Ne),n=Math.min(n,fe),i=Math.max(i,fe),p=Math.min(p,Je),g=Math.max(g,Je),C=!0)})}),!C)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===s&&(t=Math.min(t,0),s=Math.max(s,H.categories?.length-1||8)),n===i&&(n=Math.max(0,n-10),i=n+20);const b=s-t,I=i-n;let N,$,B,ee;return xt.value!==null?N=xt.value:N=t-b*.1,Mt.value!==null?$=Mt.value:$=s+b*.1,He.value!==null&&typeof He.value=="number"?B=He.value:B=Math.max(0,n-I*.1),Xe.value!==null&&typeof Xe.value=="number"?ee=Xe.value:ee=i+I*.1,{minX:N,maxX:$,minY:B,maxY:ee,minSize:p,maxSize:g}},Kt=t=>{if(jt.value){const{minX:b,maxX:I}=qt.value,N=I-b||1;return F.value.left+(t-b)/N*F.value.width}const{minX:s,maxX:n}=qt.value,i=n-s;if(n===0||i===0)return F.value.left+F.value.width/2;const p=i/J.value.scale,g=s-J.value.offsetX/F.value.width*i,C=(t-g)/p;return F.value.left+C*F.value.width},hn=t=>{const{minY:s,maxY:n}=qt.value,i=n-s||1;return F.value.bottom-(t-s)/i*F.value.height},No=t=>{const{minY:s,maxY:n}=Vo.value,i=n-s||1;return F.value.bottom-(t-s)/i*F.value.height},yn=(t,s)=>$n.value&&Ul(t)==="secondary"?No(s):hn(s),co=t=>{if(!jt.value)return j.value||4;const{maxSize:s}=qt.value,n=Math.max(1,s),i=Math.min(1,Math.max(0,t/n));return Rl.value+i*(ao.value-Rl.value)},Uo=e.computed(()=>o.value.map(t=>({y:t.y}))),Xl=e.computed(()=>{if(jt.value)return Bo();if(We.value==="bar"){if(Qt.value){const Le=[],{minY:De,maxY:Nt}=qt.value,Rt=5,Wn=Nt-De||1;for(let mn=0;mn<=Rt;mn++){const Zn=De+Wn*(mn/Rt),To=rl(Zn);Le.push({x:To,y:F.value.bottom+20,text:se(Math.round(Zn))})}return Le}const ye=[],{maxX:Ne}=qt.value,fe=Ne+1,Je=5,Te=(F.value.width-Je*2)/fe;for(let Le=0;Le<=Ne;Le++){const De=F.value.left+Je+(Le+.5)*Te;ye.push({x:De,y:F.value.bottom+20,text:H.categories[Le]||M("chart.fallback.item",{number:Le+1})})}return ye}const t=[],{minX:s,maxX:n}=qt.value,i=xt.value!==null?xt.value:s,p=Mt.value!==null?Mt.value:n,g=p-i||1,C=g/J.value.scale,b=i-J.value.offsetX/F.value.width*g,I=b+C,N=Math.max(0,Math.floor(b-2)),$=Math.min(p,Math.ceil(I+2)),B=$-N,ee=F.value.width,Ue=Math.floor(ee/60);let ie=1;B>Ue&&(ie=Math.ceil(B/Ue));for(let ye=N;ye<=$;ye+=ie)if(ye>=0&&ye<=p){const Ne=Kt(ye);Ne>=F.value.left-100&&Ne<=F.value.right+100&&t.push({x:Ne,y:F.value.bottom+20,text:H.categories[ye]||`Item ${ye+1}`})}return t}),Bo=()=>{const t=[],{minX:s,maxX:n}=qt.value,i=n-s||1,p=Math.min(8,Math.max(4,Math.floor(F.value.width/80)));for(let g=0;g<=p;g++){const C=s+i*g/p,b=Kt(C);if(b>=F.value.left-10&&b<=F.value.right+10){const I=Math.round(C),N=H.categories?.[I];t.push({x:b,y:F.value.bottom+20,text:N||(Number.isInteger(C)?C.toString():C.toFixed(1))})}}return t},o=e.computed(()=>{if(Qt.value){const p=[],{maxX:g}=qt.value;for(let C=0;C<=g;C++)p.push({x:F.value.left-10,y:ml(C),text:H.categories[C]||`Item ${C+1}`});return p}const t=[],{minY:s,maxY:n}=qt.value,i=5;for(let p=0;p<=i;p++){const g=s+(n-s)*(p/i),C=Math.round(g);t.push({x:F.value.left-10,y:hn(g),text:se(C)})}return t}),l=e.computed(()=>{if(!$n.value||Qt.value)return[];const t=[],{minY:s,maxY:n}=Vo.value,i=5;for(let p=0;p<=i;p++){const g=s+(n-s)*(p/i),C=Math.round(g);t.push({x:F.value.right+10,y:No(g),text:se(C)})}return t}),a=t=>{const s=an.value;if(!s||s.length===0){const n=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return n[t%n.length]}return s[t%s.length]},r=t=>{if(!t||typeof t!="string")return"#3a3a3a";const s=t.trim();let n=0,i=0,p=0;const g=s.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(g)n=Number(g[1])/255,i=Number(g[2])/255,p=Number(g[3])/255;else{const b=s.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(b)n=Number(b[1])/255,i=Number(b[2])/255,p=Number(b[3])/255;else{const I=s.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(I){let N=I[1];N.length===3&&(N=N[0]+N[0]+N[1]+N[1]+N[2]+N[2]),n=parseInt(N.slice(0,2),16)/255,i=parseInt(N.slice(2,4),16)/255,p=parseInt(N.slice(4,6),16)/255}else if(typeof document<"u"){const N=document.createElement("span");N.style.color=s,N.style.display="none",document.body.appendChild(N);const $=getComputedStyle(N).color;document.body.removeChild(N);const B=$.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(B)n=Number(B[1])/255,i=Number(B[2])/255,p=Number(B[3])/255;else return"#3a3a3a"}else return"#3a3a3a"}}return .2126*n+.7152*i+.0722*p>.5?"#3a3a3a":"#fafafa"},c=t=>{if(!t||typeof t!="string")return t;const s=t.trim(),n=s.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(n){const g=Math.max(0,Math.floor(Number(n[1])*.65)),C=Math.max(0,Math.floor(Number(n[2])*.65)),b=Math.max(0,Math.floor(Number(n[3])*.65));return`rgb(${g}, ${C}, ${b})`}const i=s.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(i){const g=Math.max(0,Math.floor(Number(i[1])*.65)),C=Math.max(0,Math.floor(Number(i[2])*.65)),b=Math.max(0,Math.floor(Number(i[3])*.65));return`rgba(${g}, ${C}, ${b}, ${i[4]})`}const p=s.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(p){let g=p[1];g.length===3&&(g=g[0]+g[0]+g[1]+g[1]+g[2]+g[2]);const C=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(0,2),16)*.65))),b=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(2,4),16)*.65))),I=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(4,6),16)*.65)));return`#${[C,b,I].map(N=>N.toString(16).padStart(2,"0")).join("")}`}return s},d=(t,s)=>{const i=R.value?.stroke?.color;return i==null?c(s):typeof i=="string"?i:Array.isArray(i)&&i.length?i[t%i.length]??c(s):c(s)},u=t=>{let s=0;for(let n=1;n<t.length;n++){const i=t[n].x-t[n-1].x,p=t[n].y-t[n-1].y;s+=Math.sqrt(i*i+p*p)}return s},m=e.computed(()=>We.value==="line"||qn.value?(qn.value?H.series.filter(s=>(s.type||We.value)==="line"):Kn.value).map((s,n)=>{const i=H.series.findIndex(B=>B===s),p=[];let g=[];s.data.forEach((B,ee)=>{B==null?g.length>0&&(p.push([...g]),g=[]):g.push({x:Qt.value?rl(B):Kt(ee),y:Qt.value?ml(ee):yn(s,B),index:ee})}),g.length>0&&p.push(g);let C="";p.forEach(B=>{if(B.length>0){let ee="";Pe.value?ee=ql(B):ee=`M ${B[0].x} ${B[0].y}`+B.slice(1).map(Ee=>` L ${Ee.x} ${Ee.y}`).join(""),C+=(C?" ":"")+ee}});const b=p.reduce((B,ee)=>B+u(ee),0),I=tt.value.has(i),N=re.value===i,$=re.value!==null&&re.value!==i;return{path:C,color:a(i),strokeDasharray:ro(s),pathLength:b,seriesIndex:i,animationDelay:n*Y.value,isHighlighted:N,isDimmed:$,isHidden:I}}):[]),v=e.computed(()=>{if(!(We.value==="line"||qn.value))return[];const t=qn.value?H.series.filter(n=>(n.type||We.value)==="line"):Kn.value,s=[];return t.forEach((n,i)=>{const p=H.series.findIndex(g=>g===n);for(let g=0;g<n.data.length-1;g++){const C=n.data[g];if(C!=null){let b=-1,I=0;for(let N=g+1;N<n.data.length;N++){const $=n.data[N];if($==null)I++;else{b=N;break}}if(I>0&&b!==-1){const N=n.data[b],$=Qt.value?rl(C):Kt(g),B=Qt.value?ml(g):yn(n,C),ee=Qt.value?rl(N):Kt(b),Ee=Qt.value?ml(b):yn(n,N),Ue=tt.value.has(p),ie=re.value===p,ye=re.value!==null&&re.value!==p;s.push({path:`M ${$} ${B} L ${ee} ${Ee}`,color:a(p),seriesIndex:p,animationDelay:i*Y.value,isHighlighted:ie,isDimmed:ye,isHidden:Ue,gapSize:I}),g=b-1}}}}),s}),h=e.computed(()=>We.value==="line"||qn.value?!$t.value||hl.value||Dt.value.hasAnimated?[]:(qn.value?H.series.filter(s=>(s.type||We.value)==="line"):Kn.value).map((s,n)=>{const i=H.series.findIndex(I=>I===s);let p="",g=null;s.data.forEach((I,N)=>{if(I!=null){const $={x:Qt.value?rl(I):Kt(N),y:Qt.value?ml(N):yn(s,I)};g===null?p+=`M ${$.x} ${$.y}`:p+=` L ${$.x} ${$.y}`,g=$}else if(g!==null){const $=s.data.findIndex((B,ee)=>ee>N&&B!==null&&B!==void 0);if($!==-1){const B={x:Qt.value?rl(s.data[$]):Kt($),y:Qt.value?ml($):yn(s,s.data[$])};p+=` L ${B.x} ${B.y}`,g=B}}});const C=s.data.map((I,N)=>I==null?null:{x:Qt.value?rl(I):Kt(N),y:Qt.value?ml(N):yn(s,I)}).filter(I=>I!==null),b=u(C);return{path:p,pathLength:b,color:a(i),strokeDasharray:ro(s),animationDelay:n*Y.value,seriesIndex:i}}):[]),_=e.computed(()=>{if(We.value!=="line")return[];const t=[];return Kn.value.forEach((s,n)=>{const i=re.value===n,p=re.value!==null&&re.value!==n,g=tt.value.has(n);s.data.forEach((C,b)=>{C!=null&&t.push({x:Kt(b),y:yn(s,C),color:a(n),value:C,label:H.categories[b]||b.toString(),seriesName:s.name,categoryIndex:b,dataIndex:b,animationDelay:(n*s.data.length+b)*(Y.value/8),isHighlighted:i,isDimmed:p,isHidden:g})})}),t}),D=e.computed(()=>{if(!qn.value)return[];const t=[];return H.series.filter(n=>(n.type||We.value)==="line").forEach((n,i)=>{const p=H.series.findIndex(I=>I===n),g=re.value===p,C=re.value!==null&&re.value!==p,b=tt.value.has(p);n.data.forEach((I,N)=>{I!=null&&t.push({x:Kt(N),y:yn(n,I),color:a(p),value:I,label:H.categories[N]||N.toString(),seriesName:n.name,categoryIndex:N,dataIndex:N,animationDelay:(i*n.data.length+N)*(Y.value/8),isHighlighted:g,isDimmed:C,isHidden:b})})}),t}),x=e.computed(()=>{if(!jt.value)return[];const t=[];return Kn.value.forEach((s,n)=>{if(!s?.data?.length)return;const i=re.value,p=i!==null&&i===n,g=i!==null&&i!==n,C=tt.value.has(n);s.data.forEach((b,I)=>{let N,$,B,ee,Ee;if(typeof b=="object"&&b!==null&&!Array.isArray(b))N=typeof b.x=="number"?b.x:I,$=typeof b.y=="number"?b.y:0,B=typeof b.size=="number"?b.size:20,ee=b.label||H.categories?.[I]||`Point ${I+1}`,Ee=b.image||b.imageUrl;else if(Array.isArray(b)&&b.length>=3)N=typeof b[0]=="number"?b[0]:I,$=typeof b[1]=="number"?b[1]:0,B=typeof b[2]=="number"?b[2]:20,ee=b[3]||H.categories?.[I]||`Point ${I+1}`,Ee=b[4];else if(typeof b=="number")N=I,$=b,B=xo(n,I),ee=H.categories?.[I]||`Point ${I+1}`;else return;!isFinite(N)||!isFinite($)||!isFinite(B)||t.push({x:Kt(N),y:hn($),radius:co(B),originalX:N,originalY:$,originalSize:B,color:a(n),seriesName:s.name||`Series ${n+1}`,label:ee,imageUrl:Ee,seriesIndex:n,dataIndex:I,categoryIndex:Math.round(N),isHighlighted:p,isDimmed:g,isHidden:C,opacity:Zl.value})})}),t}),oe=e.computed(()=>We.value!=="area"?[]:Kn.value.map((t,s)=>{const n=[];let i=[];if(t.data.forEach((B,ee)=>{B==null?i.length>0&&(n.push([...i]),i=[]):i.push({x:Kt(ee),y:yn(t,B),index:ee})}),i.length>0&&n.push(i),n.length===0)return{linePath:"",areaPath:"",color:a(s),isHidden:tt.value.has(s)};const p=F.value.bottom+1;let g="",C="";n.forEach((B,ee)=>{if(B.length===0)return;let Ee=`M ${B[0].x} ${B[0].y}`;Pe.value&&B.length>1?Ee=ql(B):B.slice(1).forEach(ie=>{Ee+=` L ${ie.x} ${ie.y}`}),g+=(g?" ":"")+Ee;let Ue=`M ${B[0].x} ${p}`;if(Ue+=` L ${B[0].x} ${B[0].y}`,Pe.value&&B.length>1){const ie=ql(B),ye=ie.substring(ie.indexOf("C")||ie.indexOf("Q")||ie.indexOf("L"));ye?Ue+=" "+ye:B.slice(1).forEach(Ne=>{Ue+=` L ${Ne.x} ${Ne.y}`})}else B.slice(1).forEach(ie=>{Ue+=` L ${ie.x} ${ie.y}`});Ue+=` L ${B[B.length-1].x} ${p} Z`,C+=(C?" ":"")+Ue});const b=re.value===s,I=re.value!==null&&re.value!==s,N=tt.value.has(s),$=n.reduce((B,ee)=>B+u(ee),0);return{linePath:g,areaPath:C,color:a(s),pathLength:$,isHighlighted:b,isDimmed:I,isHidden:N}})),K=e.computed(()=>{if(!(["bar"].includes(We.value)||qn.value))return[];const t=[],{maxX:s}=qt.value,n=qn.value?H.series.filter(p=>(p.type||We.value)==="bar"):Kn.value,i=n.length;if(Qt.value){const p=s+1,C=F.value.height/p,b=C*(2/3),I=Math.min(4,b/i*.15),N=b-(i-1)*I,$=Math.max(4,N/i);n.forEach((B,ee)=>{const Ee=H.series.findIndex(Ne=>Ne===B),Ue=re.value===Ee,ie=re.value!==null&&re.value!==Ee,ye=tt.value.has(Ee);B.data.forEach((Ne,fe)=>{if(Ne==null||typeof Ne!="number"||!isFinite(Ne))return;const Te=F.value.top+(fe+.5)*C-b/2+ee*($+I),Le=F.value.left,De=Math.abs(rl(Ne)-F.value.left);let Nt="";if(Pe.value&&De>0){const Rt=Math.min(Ot.value,$/2,De/2);Nt=[`M ${Le} ${Te}`,`L ${Le+De-Rt} ${Te}`,`Q ${Le+De} ${Te} ${Le+De} ${Te+Rt}`,`L ${Le+De} ${Te+$-Rt}`,`Q ${Le+De} ${Te+$} ${Le+De-Rt} ${Te+$}`,`L ${Le} ${Te+$}`,"Z"].join(" ")}t.push({x:Le,y:Te,width:De,height:$,color:a(i===1?fe:Ee),value:Ne,label:H.categories[fe]||fe.toString(),seriesName:B.name,animationDelay:(ee*n.length+fe)*(Y.value/4),isHighlighted:Ue,isDimmed:ie,isHidden:ye,barPath:Nt,isSmooth:Pe.value&&De>0})})})}else{const p=s+1,C=F.value.width/p,b=C*.8,I=b/i,N=I*.05,$=I-N;n.forEach((B,ee)=>{const Ee=H.series.findIndex(Ne=>Ne===B),Ue=re.value===Ee,ie=re.value!==null&&re.value!==Ee,ye=tt.value.has(Ee);B.data.forEach((Ne,fe)=>{if(Ne==null||typeof Ne!="number"||!isFinite(Ne))return;const Te=F.value.left+(fe+.5)*C-b/2+ee*I+N/2,Le=hn(Math.max(0,Ne)),De=Math.abs(hn(0)-hn(Ne));let Nt="";if(Pe.value&&De>0){const Rt=Math.min(Ot.value,$/2,De/2);Nt=[`M ${Te} ${Le+De}`,`L ${Te} ${Le+Rt}`,`Q ${Te} ${Le} ${Te+Rt} ${Le}`,`L ${Te+$-Rt} ${Le}`,`Q ${Te+$} ${Le} ${Te+$} ${Le+Rt}`,`L ${Te+$} ${Le+De}`,"Z"].join(" ")}t.push({x:Te,y:Le,width:$,height:De,color:a(i===1?fe:Ee),value:Ne,label:H.categories[fe]||fe.toString(),seriesName:B.name,animationDelay:(ee*n.length+fe)*(Y.value/4),isHighlighted:Ue,isDimmed:ie,isHidden:ye,barPath:Nt,isSmooth:Pe.value&&De>0})})})}return t}),$e=e.computed(()=>{if(!fn.value)return[];const t=Kn.value.map((C,b)=>({series:C,originalIndex:b})).filter(({originalIndex:C})=>!tt.value.has(C));if(t.length===0)return[];let s=We.value==="semi-radial"?Math.PI:-Math.PI/2;const n=We.value==="semi-radial"?Math.PI:Math.PI*2,i=[],p=(C,b,I,N,$,B)=>{const ee=C+(b-C)/2,Ee=b-C,Ue=At.value+Math.cos(C)*zt.value,ie=wt.value+Math.sin(C)*zt.value,ye=At.value+Math.cos(b)*zt.value,Ne=wt.value+Math.sin(b)*zt.value,fe=At.value+Math.cos(b)*ut.value,Je=wt.value+Math.sin(b)*ut.value,Oe=At.value+Math.cos(C)*ut.value,Te=wt.value+Math.sin(C)*ut.value,Le=Ee>Math.PI?1:0,De=[`M ${Ue} ${ie}`,`A ${zt.value} ${zt.value} 0 ${Le} 1 ${ye} ${Ne}`,`L ${fe} ${Je}`,`A ${ut.value} ${ut.value} 0 ${Le} 0 ${Oe} ${Te}`,"Z"].join(" "),Nt=B||a(I);return{path:De,color:Nt,strokeWidth:X.value,strokeColor:d(i.length,Nt),value:$,seriesName:N,opacity:.8,isHighlighted:re.value===I,isDimmed:re.value!==null&&re.value!==I,isHidden:!1,startAngle:C,endAngle:b,midAngle:ee}};if(Tl.value){const{series:C,originalIndex:b}=t[0],I=Number(C?.data?.[0]??0),N=Number.isFinite(I)?Math.min(Math.max(I,0),100):0,$=R.value,B=Math.min(Math.max(Number($?.miniRadial?.minVisiblePercent??1),0),100),Ee=(N<=0?B:N)/100*n,Ue=Number($?.miniRadial?.thresholds?.low??33),ie=Number($?.miniRadial?.thresholds?.medium??66),ye=$?.miniRadial?.colors?.low||"#E53E3E",Ne=$?.miniRadial?.colors?.medium||"#ED8936",fe=$?.miniRadial?.colors?.high||"#38A169",Je=N<=Ue?ye:N<=ie?Ne:fe,Oe=$?.miniRadial?.trackColor||"#E5E7EB",Te=C?.name||"Score";return i.push(p(s,s+n-.001,b+1,"Track",100,Oe)),i.push(p(s,s+Ee,b,Te,N,Je)),i}if(t.length===1){const{series:C,originalIndex:b}=t[0],I=C.data[0]||0,N=s,$=s+n-.001,B=N+n/2,ee=At.value+Math.cos(N)*zt.value,Ee=wt.value+Math.sin(N)*zt.value,Ue=At.value+Math.cos($)*zt.value,ie=wt.value+Math.sin($)*zt.value,ye=At.value+Math.cos($)*ut.value,Ne=wt.value+Math.sin($)*ut.value,fe=At.value+Math.cos(N)*ut.value,Je=wt.value+Math.sin(N)*ut.value,Oe=1,Te=[`M ${ee} ${Ee}`,`A ${zt.value} ${zt.value} 0 ${Oe} 1 ${Ue} ${ie}`,`L ${ye} ${Ne}`,`A ${ut.value} ${ut.value} 0 ${Oe} 0 ${fe} ${Je}`,"Z"].join(" "),Le=a(b);return i.push({path:Te,color:Le,strokeWidth:X.value,strokeColor:d(0,Le),value:I,seriesName:C.name,opacity:.8,isHighlighted:re.value===b,isDimmed:!1,isHidden:!1,startAngle:N,endAngle:$,midAngle:B}),i}if(nl.value&&t.length===2){const C=t[0],b=t[1],I=Math.min(100,Math.max(0,C.series.data[0]||0)),N=I/100*n;return i.push(p(s,s+N,C.originalIndex,C.series.name,I)),i.push(p(s,s+n,b.originalIndex,b.series.name,100)),i}const g=t.reduce((C,{series:b})=>C+(b.data[0]||0),0);return g===0?[]:(t.forEach(({series:C,originalIndex:b})=>{const I=C.data[0]||0,N=I/g*n,$=s,B=s+N,ee=$+N/2,Ee=At.value+Math.cos($)*zt.value,Ue=wt.value+Math.sin($)*zt.value,ie=At.value+Math.cos(B)*zt.value,ye=wt.value+Math.sin(B)*zt.value,Ne=At.value+Math.cos(B)*ut.value,fe=wt.value+Math.sin(B)*ut.value,Je=At.value+Math.cos($)*ut.value,Oe=wt.value+Math.sin($)*ut.value,Te=N>Math.PI?1:0,Le=[`M ${Ee} ${Ue}`,`A ${zt.value} ${zt.value} 0 ${Te} 1 ${ie} ${ye}`,`L ${Ne} ${fe}`,`A ${ut.value} ${ut.value} 0 ${Te} 0 ${Je} ${Oe}`,"Z"].join(" "),De=a(b);i.push({path:Le,color:De,strokeWidth:X.value,strokeColor:d(i.length,De),value:I,seriesName:C.name,opacity:.8,isHighlighted:re.value===b,isDimmed:re.value!==null&&re.value!==b,isHidden:!1,startAngle:$,endAngle:B,midAngle:ee}),s=B}),i)}),Se=e.computed(()=>{const t=$e.value;return nl.value&&t.length>=2?[{segment:t[1],originalIndex:1},{segment:t[0],originalIndex:0}]:t.map((s,n)=>({segment:s,originalIndex:n}))}),yt=e.computed(()=>{if(!Cl.value||!fn.value)return[];const t=Bl.value,s=Fl.value,n=bl.value,i=wl.value,p=15,g=t*1.3,C=.55,b=(B,ee)=>{const Ee=At.value+Math.cos(B.midAngle)*ut.value,Ue=wt.value+Math.sin(B.midAngle)*ut.value,ie=At.value+Math.cos(B.midAngle)*(ut.value+s),ye=wt.value+Math.sin(B.midAngle)*(ut.value+s),fe=ie+n*(ee?1:-1),Je=ee?ie+p:ie-p,Oe=ye-i,Te=`${B.seriesName}: ${se(B.value)}`,Le=Te.length*t*C;return{pointerStartX:Ee,pointerStartY:Ue,pointerEndX:ie,pointerEndY:ye,horizontalEndX:fe,horizontalEndY:ye,textX:Je,textY:Oe,text:Te,textWidth:Le,textAnchor:ee?"start":"end",isRightSide:ee,pointerLineLength:Math.hypot(ie-Ee,ye-Ue),horizontalLineLength:Math.hypot(fe-ie,0)}},I=(B,ee)=>{const Ee=Math.abs(B.textY-ee.textY)<g,Ue=B.isRightSide?B.textX:B.textX-B.textWidth,ie=B.isRightSide?B.textX+B.textWidth:B.textX,ye=ee.isRightSide?ee.textX:ee.textX-ee.textWidth,Ne=ee.isRightSide?ee.textX+ee.textWidth:ee.textX,fe=Ue<Ne&&ye<ie;return Ee&&fe},N=$e.value.filter(B=>!B.isHidden),$=[];for(let B=0;B<N.length;B++){const ee=N[B];let Ee=Math.cos(ee.midAngle)>=0;if(B>0){const ie=$[B-1],ye=b(ee,Ee);I(ie,ye)&&(Ee=!Ee)}const Ue=b(ee,Ee);$.push({...Ue,color:ee.color,isHighlighted:ee.isHighlighted,isDimmed:ee.isDimmed})}return $}),vn=t=>{if(!t||t.isHidden)return 0;const s=t.opacity||Zl.value||.7;return re.value===null||re.value===void 0?s:re.value!==null?t.seriesIndex===re.value?Math.min(1,s+.1):Math.max(.5,s*.8):s},un=t=>{if(!t||t.isHidden)return 0;const s=t.radius>20?.9:.8;return re.value!==null?t.seriesIndex===re.value?Math.min(1,s+.1):s*.7:s},tn=(t,s)=>{if(t)try{if(re.value===t.seriesIndex?re.value=null:re.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const n=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:s,chartId:H.chartId}});window.dispatchEvent(n)}}catch(n){console.error("Error in onBubbleClick:",n)}},dn=(t,s)=>{const n=[`dss-bubble-fallback-${s}`];return t.isHighlighted&&n.push("dss-bubble-highlighted"),t.isDimmed&&n.push("dss-bubble-dimmed"),t.isHidden&&n.push("dss-bubble-hidden"),n.push(`dss-bubble-series-${t.seriesIndex}`),n.join(" ")},rn=(t,s)=>{if(!t||(s.stopPropagation(),$o.value=!0,re.value=t.seriesIndex,st.value.show=!1,!Ze.value))return;const n=s.target.closest(".dss-custom-chart-container");if(!n)return;const i=n.getBoundingClientRect();let p=s.clientX-i.left+10,g=s.clientY-i.top-10;const C=200,b=120;p+C>ke.value&&(p=s.clientX-i.left-C-10),g+b>i.height&&(g=s.clientY-i.top-b-10),p<0&&(p=10),g<0&&(g=10);const I=wn.value,N=Nn.value,$=I.map(B=>{const ee=N[B]||B,Ee=on(B,t);return Ee?{seriesName:t.seriesName,label:t.label,value:`${ee}: ${Ee}`,color:t.color}:null}).filter(Boolean);ht.value={show:!0,x:p,y:g,title:t.label||t.seriesName||"",value:"",bubbleData:$,categoryIndex:void 0,spiderAreas:[]}},on=(t,s)=>{let n;switch(t){case"x":n=s.originalX;break;case"y":n=s.originalY;break;case"size":n=s.originalSize;break;case"label":n=s.label;break;case"seriesName":n=s.seriesName;break;default:n=s[t]||""}const i=Xn.value[t];if(typeof i=="function")return i(n,s);if(typeof n=="number"){const p=n.toFixed(1);return q.value?p+q.value:p}return n?.toString()||""},Qn=()=>{if(!jt.value||!st.value.data||st.value.data.length===0)return"Bubbles";const t=[],s=new Set;return st.value.data.forEach(n=>{if(n.seriesName&&n.label){const i=`${n.seriesName} - ${n.label}`;s.has(i)||(t.push(i),s.add(i))}else n.seriesName&&(s.has(n.seriesName)||(t.push(n.seriesName),s.add(n.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},ll=(t,s)=>{t&&($o.value=!1,re.value=null,ht.value.show=!1,ht.value.bubbleData=[])},il=(t,s)=>{const n=s.target.closest(".dss-custom-chart-container");if(!n)return;const i=n.getBoundingClientRect(),p=y(t.categoryIndex),g=t.description||t.comment||"";let C=s.clientX-i.left+15,b=s.clientY-i.top-10;const I=200,N=g?80:50;C+I>ke.value&&(C=s.clientX-i.left-I-15),b+N>de.value&&(b=s.clientY-i.top-N-10),C<0&&(C=10),b<0&&(b=10),Vt.value={show:!0,x:C,y:b,categoryValue:p,description:g}},Mo=()=>{Vt.value.show=!1},gl=e.computed(()=>H.categories.length||Math.max(...Gn.value.map(t=>t.data.length))),Xo=e.computed(()=>{let t=0;return Gn.value.forEach(s=>{s.data.forEach(n=>{typeof n=="number"&&(t=Math.max(t,n))})}),t||100}),uo=e.computed(()=>{const t=[],s=gl.value;for(let n=0;n<s;n++){const i=n*2*Math.PI/s-Math.PI/2,p=At.value+Math.cos(i)*ut.value,g=wt.value+Math.sin(i)*ut.value;t.push({x:p,y:g,angle:i,index:n})}return t}),ea=e.computed(()=>{const t=[],s=gl.value;return uo.value.forEach((n,i)=>{const p=ut.value+15,g=i*2*Math.PI/s-Math.PI/2,C=At.value+Math.cos(g)*p,b=wt.value+Math.sin(g)*p+5;let I="middle",N="middle";Math.abs(Math.cos(g))>.5&&(I=Math.cos(g)>0?"start":"end"),Math.abs(Math.sin(g))>.5&&(N=Math.sin(g)>0?"hanging":"auto"),t.push({x:C,y:b,text:H.categories[i]||`Axis ${i+1}`,anchor:I,baseline:N})}),t}),_o=e.ref(new Set),Yl=(t,s,n)=>{const i=`current-${n}`,p=_o.value.has(i);return!p&&re.value===null?s.fillOpacity||ot.value:s.isHighlighted||p?(s.fillOpacity||ot.value)+.15:s.isDimmed?(s.fillOpacity||ot.value)*.3:s.fillOpacity||ot.value},mo=e.computed(()=>{if(!Sn.value)return[];const t=[],s=gl.value;return Kn.value.forEach((n,i)=>{const p=[],g=[],C=[],b=re.value===i,I=re.value!==null&&re.value!==i,N=tt.value.has(i);for(let $=0;$<s;$++){const B=n.data[$]||0,Ee=B/Xo.value*ut.value,Ue=$*2*Math.PI/s-Math.PI/2,ie=At.value+Math.cos(Ue)*Ee,ye=wt.value+Math.sin(Ue)*Ee;p.push(`${ie},${ye}`),g.push({x:ie,y:ye}),C.push({x:ie,y:ye,value:B,label:H.categories[$]||`Axis ${$+1}`,seriesName:n.name})}t.push({points:p.join(" "),polygonPoints:g,dataPoints:C,color:a(i),fillOpacity:ot.value,seriesName:n.name,value:`${n.name}: ${n.data.join(", ")}`,isHighlighted:b,isDimmed:I,isHidden:N,seriesIndex:i})}),t}),ol=(t,s)=>{if(!s||s.length<3)return!1;let n=!1;for(let i=0,p=s.length-1;i<s.length;p=i++){const g=s[i].x,C=s[i].y,b=s[p].x,I=s[p].y;C>t.y!=I>t.y&&t.x<(b-g)*(t.y-C)/(I-C)+g&&(n=!n)}return n},al=t=>{if(!Sn.value)return;const s=t.currentTarget.closest(".dss-custom-chart-container");if(!s)return;const n=s.getBoundingClientRect(),i=A.value?.getBoundingClientRect();if(!i)return;const p=t.clientX-i.left,g=t.clientY-i.top,C=mo.value.filter(b=>b.isHidden?!1:ol({x:p,y:g},b.polygonPoints));if(C.length>0){C.length,re.value=C[0].seriesIndex;const b=t.clientX-n.left+10,I=t.clientY-n.top-10,N=C.length>1?460:260,$=70+gl.value*20;let B=b,ee=I;B+N>ke.value&&(B=t.clientX-n.left-N-10),ee+$>de.value&&(ee=t.clientY-n.top-$-10),B<0&&(B=10),ee<0&&(ee=10);const Ee=C.map(Ue=>({seriesName:Ue.seriesName,color:Ue.color,points:Ue.dataPoints.map(ie=>({label:ie.label,value:se(ie.value)}))}));ht.value={show:!0,x:B,y:ee,title:"",value:"",bubbleData:[],spiderAreas:Ee}}else cl()},Ln=e.computed(()=>{const t=R.value;return t.logos.map((s,n)=>{const i=H.series[s.seriesIndex];if(!i||!i.data||i.data.length===0||tt.value.has(s.seriesIndex))return null;let p,g;if(Cn.value){let b=-1,I=null;for(let $=i.data.length-1;$>=0;$--)if(i.data[$]!==null&&i.data[$]!==void 0){b=$,I=i.data[$];break}if(b===-1||I===null)return null;const N=i.data.map(($,B)=>$==null?null:{x:Kt(B),y:yn(i,$),index:B}).filter($=>$!==null);if(t.animations.enabled&&!hl.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(Dt.value.isAnimating||!Dt.value.hasAnimated))if(Dt.value.isAnimating){const $=Dt.value.currentFrame/Dt.value.totalFrames,B=Ko(t.animations.easing,Math.min($,1)),ee=Ca(N,B);p=ee.x+(s.offsetX||0),g=ee.y+(s.offsetY||0)}else p=N[0].x+(s.offsetX||0),g=N[0].y+(s.offsetY||0);else p=Kt(b)+(s.offsetX||0),g=hn(I)+(s.offsetY||0)}else if(fn.value||Sn.value){const b=Math.PI*2/t.logos.length*n;p=At.value+Math.cos(b)*(ut.value+30)+(s.offsetX||0),g=wt.value+Math.sin(b)*(ut.value+30)+(s.offsetY||0)}return{...s,x:p,y:g,seriesIndex:s.seriesIndex}}).filter(Boolean)}),ta=t=>{const s=document.querySelector(`.dss-logo-fallback-${t}`),n=document.querySelector(`.dss-logo-image-${t}`);s&&(s.style.opacity="0"),n&&(n.style.opacity="1")},pa=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const s=document.querySelector(`.dss-logo-image-${t}`);s&&(s.style.display="none")},Yo=t=>{tt.value.has(t)?tt.value.delete(t):tt.value.add(t)},fa=e.computed(()=>{if(!ht.value.show&&!(et.value&&st.value.show&&!J.value.isZooming))return{display:"none"};let t,s;if(et.value&&st.value.show&&!J.value.isZooming){t=st.value.x+15,s=F.value.top;const n=jt.value?200:150;t+n>ke.value&&(t=st.value.x-n-15),t<0&&(t=10),s<10&&(s=10)}else t=ht.value.x,s=ht.value.y;return{left:t+"px",top:s+"px"}}),Nl=(t,s)=>{if(!Ze.value||po.value)return;const i=s.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=s.clientX-i.left+10,g=s.clientY-i.top-10;const C=200,b=120,I=ke.value,N=de.value;p+C>I&&(p=s.clientX-i.left-C-10),g+b>N&&(g=s.clientY-i.top-b-10),p<0&&(p=10),g<0&&(g=10);let $;typeof t.categoryIndex=="number"?$=t.categoryIndex:typeof t.dataIndex=="number"?$=t.dataIndex:t.label&&H.categories.includes(t.label)&&($=H.categories.indexOf(t.label));const B=(Qt.value||We.value==="bar")&&t.label?t.label:t.seriesName||t.label||"";ht.value={show:!0,x:p,y:g,title:B,value:se(t.value)||"",categoryIndex:$,spiderAreas:[]}},jo=e.ref(!1),$o=e.ref(!1),cl=()=>{ht.value.show=!1,ht.value.spiderAreas=[],ht.value.bubbleData=[],st.value.show=!1,jo.value||(re.value=null)},po=e.ref(!1),fo=(t,s)=>{po.value=!0,ht.value.show=!1,st.value.show=!1;const i=s.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=s.clientX-i.left+15,g=s.clientY-i.top-10;const C=250;p+C>ke.value&&(p=s.clientX-i.left-C-15),p<0&&(p=10),g<0&&(g=10),Ml.value={show:!0,x:p,y:g,content:t.texts,count:t.totalCount}},vo=()=>{po.value=!1,Ml.value.show=!1},Dt=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),Ko=(t,s)=>{switch(t){case"linear":return s;case"ease":return s<.5?2*s*s:-1+(4-2*s)*s;case"ease-in":return s*s;case"ease-out":return s*(2-s);case"ease-in-out":return s<.5?2*s*s:-1+(4-2*s)*s;default:return s}},hl=e.computed(()=>Ye.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),na=()=>{if(!$t.value||hl.value){Dt.value.hasAnimated=!0,jn.value&&(vl.value=1);return}jn.value&&(vl.value=0),Dt.value.isAnimating=!0,Dt.value.currentFrame=0,Dt.value.totalFrames=Math.ceil(V.value/16.67);const t=()=>{const s=Dt.value.currentFrame/Dt.value.totalFrames,n=Ko(E.value,Math.min(s,1));va(n),jn.value&&(vl.value=n),s<1?(Dt.value.currentFrame++,Dt.value.animationId=requestAnimationFrame(t)):ga()};Dt.value.animationId=requestAnimationFrame(t)},va=t=>{const s=z.value;s&&s.style.setProperty("--dss-animation-progress",t)},ga=()=>{Dt.value.isAnimating=!1,Dt.value.hasAnimated=!0,jn.value&&(vl.value=1),Dt.value.animationId&&(cancelAnimationFrame(Dt.value.animationId),Dt.value.animationId=null)},Go=e.computed(()=>!fn.value||Dt.value.hasAnimated?!0:jn.value?vl.value>=1:Tn.value?El.value>=1:!0),la=e.computed(()=>Cl.value&&Go.value),Lo=e.ref(!1);e.watch(la,t=>{t?(Lo.value=!1,e.nextTick(()=>{requestAnimationFrame(()=>{Lo.value=!0})})):Lo.value=!1},{immediate:!0});const ha=e.computed(()=>{if(!$t.value||hl.value||Dt.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${V.value}ms`,t["--dss-animation-easing"]=ya(E.value),t["--dss-stagger-delay"]=`${Y.value}ms`,t}),ya=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",ka=()=>{if(!$t.value||hl.value)return"";const t=["dss-chart-animated"];return Dt.value.hasAnimated||t.push(`dss-animate-${sn.value}`),Dt.value.hasAnimated||(fn.value&&We.value!=="semi-radial"?t.push("dss-animate-fill"):fn.value||t.push(`dss-animate-${sn.value}`)),Dt.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>H.series,(t,s)=>{le.value&&s&&Dt.value.hasAnimated&&(Dt.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>na(),w.value)}))},{deep:!0}),e.watch(()=>J.value.isZooming,(t,s)=>{s&&!t&&setTimeout(()=>{pe()},50)}),e.watch(()=>[J.value.scale,J.value.offsetX],()=>{!J.value.isZooming&&!J.value.isDragging&&pe()},{flush:"post"}),e.watch([_t,Re],([t,s])=>{J.value.minScale=t,J.value.maxScale=s,(J.value.scale<t||J.value.scale>s)&&oo()},{immediate:!0}),e.watch(()=>H.locale,t=>{t&&t!==L.value&&(L.value=t)},{immediate:!0}),e.watch(()=>bt.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",no)}):document.removeEventListener("click",no)}),e.onMounted(()=>{re.value=null,jn.value&&(!$t.value||hl.value)&&(vl.value=1),Yn(),z.value&&typeof ResizeObserver<"u"&&(f=new ResizeObserver(t=>{const s=t[0];!s||!s.contentRect||(we&&cancelAnimationFrame(we),we=requestAnimationFrame(()=>{we=null;const{width:n,height:i}=s.contentRect;Ke.value=Math.round(n),he.value=Math.round(i),U.value&&(dt.value=U.value.offsetHeight||ge)}))}),f.observe(z.value)),$t.value&&!hl.value?We.value==="semi-radial"?setTimeout(()=>Wo(),w.value):setTimeout(()=>na(),w.value):(Dt.value.hasAnimated=!0,We.value==="semi-radial"&&(El.value=1)),document.addEventListener("mousemove",oa),document.addEventListener("mouseup",aa),document.addEventListener("click",ko)}),e.onUnmounted(()=>{we&&cancelAnimationFrame(we),f&&z.value&&(f.unobserve(z.value),f.disconnect(),f=null),Dt.value.animationId&&cancelAnimationFrame(Dt.value.animationId),Hl&&(cancelAnimationFrame(Hl),Hl=null),J.value.zoomTimeout&&clearTimeout(J.value.zoomTimeout),document.removeEventListener("mousemove",oa),document.removeEventListener("mouseup",aa),document.removeEventListener("click",ko),document.removeEventListener("click",no)});const oa=t=>{if(J.value.isDragging&&J.value.scale>1&&Cn.value){st.value.show=!1;const s=t.clientX-J.value.lastMouseX,{minX:n,maxX:i}=qt.value,p=i-n||1,C=s*.8;J.value.offsetX+=C;const b=p/J.value.scale,I=p-b,N=0,$=-I/p*F.value.width,B=N;J.value.offsetX=Math.max($,Math.min(B,J.value.offsetX)),J.value.lastMouseX=t.clientX,J.value.lastMouseY=t.clientY}},aa=()=>{J.value.isDragging&&(J.value.isDragging=!1,setTimeout(()=>{!J.value.isDragging&&J.value.isZooming},100))},Ca=(t,s)=>{const n=t.filter(b=>b!=null);if(!n||n.length===0)return{x:0,y:0};if(n.length===1||s<=0)return n[0];if(s>=1)return n[n.length-1];let i=0;const p=[];for(let b=1;b<n.length;b++){const I=n[b].x-n[b-1].x,N=n[b].y-n[b-1].y,$=Math.sqrt(I*I+N*N);p.push($),i+=$}const g=i*s;let C=0;for(let b=0;b<p.length;b++){const I=C+p[b];if(g<=I){const N=(g-C)/p[b],$=n[b],B=n[b+1];return{x:$.x+(B.x-$.x)*N,y:$.y+(B.y-$.y)*N}}C=I}return n[n.length-1]};return(t,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",[ka(),{"dss-chart-fill-width":xe.value,"dss-chart-fill-height":Be.value,"dss-chart-compact":fn.value&&!Q.value}]]),style:e.normalizeStyle({width:xe.value?"100%":ke.value+"px",height:vt.value,...xe.value||Be.value?{overflow:fn.value?"visible":"hidden",maxWidth:"100%",maxHeight:"100%"}:{},...ha.value,cursor:Oo()}),"data-chart-type":We.value,ref_key:"containerEl",ref:z,onWheel:Co,onMousedown:lo,onMousemove:Mn,onMouseup:bo,onMouseleave:to,onDblclick:oo,onContextmenu:e.withModifiers(Ol,["prevent"]),onClick:e.withModifiers(xn,["left"]),onWheelCapture:Co},[e.createElementVNode("div",{class:"dss-chart-header",ref_key:"headerEl",ref:U},[e.createElementVNode("div",ps,[rt.value?(e.openBlock(),e.createElementBlock("div",fs,e.toDisplayString(rt.value),1)):e.createCommentVNode("",!0),Et.value?(e.openBlock(),e.createElementBlock("div",vs,e.toDisplayString(Et.value),1)):e.createCommentVNode("",!0)]),Q.value&&be.value==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Me.value==="horizontal","dss-legend-vertical":Me.value==="vertical","dss-legend-top":be.value==="top","dss-legend-bottom":be.value==="bottom"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.series,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":tt.value.has(i),"dss-legend-hovered":re.value===i,"dss-legend-dimmed":re.value!==null&&re.value!==i}]),onClick:p=>Yo(i),onMouseenter:p=>Pn(i),onMouseleave:ln,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:a(i)})},null,4),e.createElementVNode("span",hs,e.toDisplayString(n.name),1)],46,gs))),128))],2)):e.createCommentVNode("",!0),Q.value&&(be.value==="left"||be.value==="right")?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-legend-side",{"dss-legend-left":be.value==="left","dss-legend-right":be.value==="right"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.series,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":tt.value.has(i),"dss-legend-hovered":re.value===i,"dss-legend-dimmed":re.value!==null&&re.value!==i}]),onClick:p=>Yo(i),onMouseenter:p=>Pn(i),onMouseleave:ln,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:a(i)})},null,4),e.createElementVNode("span",ks,e.toDisplayString(n.name),1)],46,ys))),128))],2)):e.createCommentVNode("",!0)],512),T.showAddMarkerButton&&at.value&&Ge.value.addMarker&&(Cn.value||jt.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-add-marker-button",onClick:yo,title:e.unref(M)("chart.contextMenu.addMarker")},[e.createElementVNode("img",{src:In.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,bs),s[4]||(s[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,Cs)):e.createCommentVNode("",!0),e.createElementVNode("div",ws,[jt.value&&Tt.value?(e.openBlock(),e.createElementBlock("div",xs,"Bubble size: "+e.toDisplayString(Tt.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{width:ke.value,height:de.value,class:"dss-chart-svg","data-smooth":Pe.value,"data-animated":$t.value,ref_key:"svgEl",ref:A},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:ae.value},[e.createElementVNode("rect",{x:0,y:F.value.top,width:ke.value,height:F.value.height*4},null,8,Vs)],8,Ss),Tn.value?(e.openBlock(),e.createElementBlock("clipPath",{key:0,id:Wl.value},[e.createElementVNode("path",{d:pl.value},null,8,Bs)],8,Ns)):e.createCommentVNode("",!0),jn.value?(e.openBlock(),e.createElementBlock("clipPath",{key:1,id:Sl.value},[e.createElementVNode("path",{d:Dl.value},null,8,_s)],8,Ms)):e.createCommentVNode("",!0)]),Cn.value||jt.value?(e.openBlock(),e.createElementBlock("g",$s,[Ut.value?(e.openBlock(),e.createElementBlock("g",{key:0,class:"dss-grid-lines","clip-path":ve.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Uo.value,(n,i)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${i}`,x1:F.value.left,x2:F.value.right,y1:n.y,y2:n.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${i*50}ms`})},null,12,Ts))),128))],8,Ls)):e.createCommentVNode("",!0),e.createElementVNode("g",As,[e.createElementVNode("line",{x1:F.value.left,x2:F.value.right,y1:F.value.bottom,y2:F.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Ds),e.createElementVNode("line",{x1:F.value.left,x2:F.value.left,y1:F.value.top,y2:F.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Hs),$n.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:F.value.right,x2:F.value.right,y1:F.value.top,y2:F.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Rs)):e.createCommentVNode("",!0)]),e.createElementVNode("g",Fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xl.value,(n,i)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${i}`,x:n.x,y:n.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},e.toDisplayString(n.text),13,Is))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(n,i)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${i}`,x:n.x,y:n.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${i*80}ms`})},e.toDisplayString(n.text),13,zs))),128)),$n.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.value,(n,i)=>(e.openBlock(),e.createElementBlock("text",{key:`y-secondary-${i}`,x:n.x,y:n.y,"text-anchor":"start","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${i*80}ms`})},e.toDisplayString(n.text),13,Ps))),128)):e.createCommentVNode("",!0),Wt.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:F.value.left+F.value.width/2,y:F.value.bottom+45,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333"},e.toDisplayString(Wt.value),9,Os)):e.createCommentVNode("",!0),Ft.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:15,y:F.value.top+12+F.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(-90, 15, ${F.value.top+F.value.height/2})`},e.toDisplayString(Ft.value),9,qs)):e.createCommentVNode("",!0),$n.value&&ue.value?(e.openBlock(),e.createElementBlock("text",{key:3,x:ke.value-15,y:F.value.top+12+F.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(90, ${ke.value-15}, ${F.value.top+F.value.height/2})`},e.toDisplayString(ue.value),9,Ws)):e.createCommentVNode("",!0)]),ul.value.length>0?(e.openBlock(),e.createElementBlock("g",Zs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ul.value,n=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${n.categoryIndex}`},[e.createElementVNode("g",{"clip-path":ve.value},[n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:n.x,x2:n.x,y1:F.value.bottom,y2:F.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>fo(n,i),onMouseleave:vo},null,40,Xs)):e.createCommentVNode("",!0),n.hasAuto&&!n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:n.x,x2:n.x,y1:F.value.bottom,y2:F.value.top,stroke:"#a1d499","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>fo(n,i),onMouseleave:vo},null,40,Ys)):e.createCommentVNode("",!0),n.hasAuto&&n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:n.x,x2:n.x,y1:F.value.bottom,y2:F.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>fo(n,i),onMouseleave:vo},null,40,js)):e.createCommentVNode("",!0)],8,Us),n.hasManual&&n.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:n.x+8,cy:Math.max(15,F.value.top-10),r:"14",fill:"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:i=>fo(n,i),onMouseleave:vo},null,40,Ks)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:n.x,cy:Math.max(15,F.value.top-10),r:"14",fill:n.hasManual&&n.hasAuto||n.hasManual?"#698dbe":"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:i=>fo(n,i),onMouseleave:vo},null,40,Gs),e.createElementVNode("text",{x:n.x,y:Math.max(15,F.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(n.totalCount),9,Qs)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-chart-data","clip-path":ve.value},[qn.value?(e.openBlock(),e.createElementBlock("g",er,[e.createElementVNode("g",{class:e.normalizeClass(["dss-bar-chart",{"dss-horizontal-bars":Qt.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value,(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${i}`},[n.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:n.barPath,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":n.isHighlighted,"dss-bar-dimmed":n.isDimmed,"dss-bar-hidden":n.isHidden}),style:e.normalizeStyle({fill:n.color,fillOpacity:n.isDimmed?.4:1,animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Nl(n,p),onMouseleave:cl},null,46,tr)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:n.x,y:n.y,width:n.width,height:n.height,fill:n.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":n.isHighlighted,"dss-bar-dimmed":n.isDimmed,"dss-bar-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Nl(n,p),onMouseleave:cl},null,46,nr))],64))),128))],2),e.createElementVNode("g",lr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${i}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?P.value+2:P.value,"stroke-dasharray":n.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({"--dss-path-length":n.pathLength,animationDelay:`${n.animationDelay}ms`})},null,14,or))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-gap-connector-${i}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?P.value+2:P.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:n.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,ar))),128)),j.value>0||me.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(D.value,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${i}`,cx:n.x,cy:n.y,r:nt(n.isHighlighted?ze(n,j.value)+2:ze(n,j.value)),fill:n.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":n.isHighlighted,"dss-point-dimmed":n.isDimmed,"dss-point-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Nl(n,p),onMouseleave:cl},null,46,sr))),128)):e.createCommentVNode("",!0)])])):We.value==="line"?(e.openBlock(),e.createElementBlock("g",rr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`anim-${i}`,d:n.path,stroke:n.color,"stroke-width":P.value,"stroke-dasharray":n.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass(["dss-line-animation-overlay",{"dss-animation-complete":Dt.value.hasAnimated}]),style:e.normalizeStyle({"--dss-path-length":n.pathLength,animationDelay:`${n.animationDelay}ms`})},null,14,ir))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${i}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?P.value+2:P.value,"stroke-dasharray":n.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({"--dss-path-length":n.pathLength,animationDelay:`${n.animationDelay}ms`})},null,14,cr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`gap-connector-${i}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?P.value+2:P.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:n.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,ur))),128)),j.value>0||me.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(_.value,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${i}`,cx:n.x,cy:n.y,r:nt(n.isHighlighted?ze(n,j.value)+2:ze(n,j.value)),fill:n.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":n.isHighlighted,"dss-point-dimmed":n.isDimmed,"dss-point-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Nl(n,p),onMouseleave:cl},null,46,dr))),128)):e.createCommentVNode("",!0)])):We.value==="area"?(e.openBlock(),e.createElementBlock("g",mr,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe.value,(n,i)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${i}`,id:`area-mask-${i}-${T.chartId}`},[e.createElementVNode("rect",{x:F.value.left-10,y:F.value.top-10,width:F.value.width+20,height:F.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${F.value.width+20}px`})},null,12,fr)],8,pr))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${i}`,d:n.areaPath,fill:n.color,"fill-opacity":n.isHighlighted?St.value+.2:St.value,mask:`url(#area-mask-${i}-${T.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden})},null,10,vr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${i}`,d:n.linePath,stroke:n.color,"stroke-width":n.isHighlighted?P.value+1:P.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({"--dss-path-length":n.pathLength,animationDelay:`${i*Y.value}ms`})},null,14,gr))),128))])):We.value==="bar"?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass({"dss-horizontal-bars":Qt.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value,(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${i}`},[n.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:n.barPath,fill:n.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":n.isHighlighted,"dss-bar-dimmed":n.isDimmed,"dss-bar-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Nl(n,p),onMouseleave:cl},null,46,hr)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:n.x,y:n.y,width:n.width,height:n.height,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":n.isHighlighted,"dss-bar-dimmed":n.isDimmed,"dss-bar-hidden":n.isHidden}),style:e.normalizeStyle({fill:n.color,fillOpacity:n.isDimmed?.4:1,animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Nl(n,p),onMouseleave:cl},null,46,yr))],64))),128))],2)):e.createCommentVNode("",!0)],8,Js),et.value&&st.value.show&&!J.value.isZooming?(e.openBlock(),e.createElementBlock("g",{key:2,class:"dss-crosshair","clip-path":ve.value},[e.createElementVNode("line",{x1:st.value.x,x2:st.value.x,y1:F.value.top,y2:F.value.bottom,stroke:mt.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,Cr),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.value.data,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${i}`,cx:st.value.x,cy:n.y,r:nt(j.value+2),fill:n.color,stroke:"none",opacity:"0.9"},null,8,br))),128))],8,kr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),jt.value?(e.openBlock(),e.createElementBlock("g",wr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${i}`},[n?(e.openBlock(),e.createElementBlock("g",xr,[e.createElementVNode("circle",{cx:n.x,cy:n.y,r:nt(n.radius),fill:n.color,"fill-opacity":vn(n),stroke:n.color,"stroke-width":"1","stroke-opacity":"0.8",class:e.normalizeClass(dn(n,i)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:p=>rn(n,p),onMouseleave:p=>ll(n),onClick:p=>tn(n,p)},null,42,Er),n.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:n.x-n.radius*.65,y:n.y-n.radius*.65,width:n.radius*1.3,height:n.radius*1.3,"xlink:href":n.imageUrl,class:e.normalizeClass(`dss-bubble-image-${i} ${n.isHighlighted?"dss-bubble-highlighted":""} ${n.isDimmed?"dss-bubble-dimmed":""} ${n.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${n.radius*.65}px at ${n.radius*.65}px ${n.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:un(n)}),onLoad:p=>Eo(i),onError:p=>so(i),onMouseenter:p=>rn(n,p),onMouseleave:p=>ll(n),onClick:p=>tn(n,p)},null,46,Sr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),fn.value?(e.openBlock(),e.createElementBlock("g",{key:2,class:"radial-chart",transform:en.value},[We.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:At.value,cy:wt.value,r:ut.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,Nr)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":We.value,"clip-path":wo.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${n.originalIndex}-${i}`,d:n.segment.path,fill:n.segment.color,"fill-opacity":n.segment.isHighlighted?(n.segment.opacity||.8)+.2:n.segment.opacity||.8,stroke:n.segment.strokeWidth?n.segment.strokeColor||n.segment.color:"none","stroke-width":n.segment.strokeWidth||0,"clip-path":qo(n.originalIndex),class:e.normalizeClass({"dss-series-highlighted":n.segment.isHighlighted,"dss-series-dimmed":n.segment.isDimmed,"dss-series-hidden":n.segment.isHidden}),onMouseover:p=>Nl(n.segment,p),onMouseleave:cl},null,42,Mr))),128))],8,Br),zn.value&&Go.value?(e.openBlock(),e.createElementBlock("g",_r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(zl.value,(n,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:`radial-segment-label-${i}`,x:n.x,y:n.y,"text-anchor":"middle","dominant-baseline":"middle",class:"dss-radial-segment-data-label",style:e.normalizeStyle({fill:n.contrastColor})},e.toDisplayString(n.value),13,$r)),[[e.vShow,n.show]])),128))])):e.createCommentVNode("",!0),gn.value&&(Go.value||Tn.value||Tl.value)?(e.openBlock(),e.createElementBlock("text",{key:2,x:Un.value.x,y:Un.value.y,"text-anchor":"middle","dominant-baseline":"middle","font-size":Fn.value,fill:Il.value,class:"dss-radial-data-center"},e.toDisplayString(Vn.value),9,Lr)):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":Lo.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt.value,(n,i)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${i}`,class:e.normalizeClass(["dss-radial-label-group",{"dss-label-highlighted":n.isHighlighted,"dss-label-dimmed":n.isDimmed}]),style:e.normalizeStyle({"--label-delay":`${i*.08}s`})},[e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-pointer",x1:n.pointerStartX,y1:n.pointerStartY,x2:n.pointerEndX,y2:n.pointerEndY,stroke:n.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":n.pointerLineLength})},null,12,Tr),e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-horizontal",x1:n.pointerEndX,y1:n.pointerEndY,x2:n.horizontalEndX,y2:n.horizontalEndY,stroke:n.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":n.horizontalLineLength})},null,12,Ar),e.createElementVNode("text",{class:"dss-radial-label-text",x:n.textX,y:n.textY,"text-anchor":n.textAnchor,"font-size":Bl.value,"dominant-baseline":"middle"},e.toDisplayString(n.text),9,Dr)],6))),128))],2)):e.createCommentVNode("",!0)],8,Vr)):e.createCommentVNode("",!0),Sn.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-spider-chart",transform:en.value},[Ut.value?(e.openBlock(),e.createElementBlock("g",Rr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Fe.value,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${i}`,cx:At.value,cy:wt.value,r:nt(n),fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*150}ms`})},null,12,Fr))),128)),e.createElementVNode("g",Ir,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Fe.value,(n,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${i}`},[e.createElementVNode("rect",{x:At.value-16,y:wt.value-n-7,width:"32",height:"16",fill:"transparent",stroke:"none"},null,8,zr),e.createElementVNode("text",{x:At.value,y:wt.value-n+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(It(i)),9,Pr)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(uo.value,(n,i)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${i}`,x1:At.value,x2:n.x,y1:wt.value,y2:n.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},null,12,Or))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",qr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ea.value,(n,i)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${i}`,x:n.x+Math.cos(i*2*Math.PI/gl.value-Math.PI/2)*16,y:n.y+Math.sin(i*2*Math.PI/gl.value-Math.PI/2)*16,"text-anchor":n.anchor,"dominant-baseline":n.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${i*120}ms`})},e.toDisplayString(n.text.charAt(0).toUpperCase()+n.text.slice(1)),13,Wr))),128))]),e.createElementVNode("g",{class:"dss-spider-data",onMousemove:al,onMouseleave:cl},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(mo.value,(n,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${i}`},[e.createElementVNode("polygon",{points:n.points,fill:n.color,"fill-opacity":Yl("current",n,i),stroke:n.color,"stroke-width":n.isHighlighted?P.value+1:P.value,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${i*Y.value}ms`,transition:"all 0.2s ease"})},null,14,Zr),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataPoints,(p,g)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${i}-${g}`,cx:p.x,cy:p.y,r:nt(n.isHighlighted?j.value+1:j.value>0?j.value:0),fill:n.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":n.isHighlighted,"dss-point-dimmed":n.isDimmed,"dss-point-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${i*Y.value+g*50}ms`,transition:"all 0.2s ease"}),onMouseover:C=>Nl(p,C),onMouseleave:cl},null,46,Ur))),128))]))),128))],32)],8,Hr)):e.createCommentVNode("",!0),e.createElementVNode("g",Xr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ln.value,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${i}`,cx:n.x,cy:n.y,r:nt(n.width/2),fill:a(n.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${i}`),style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,14,Yr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ln.value,(n,i)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${i}`,x:n.x-n.width/2,y:n.y-n.height/2,width:n.width,height:n.height,"xlink:href":n.url,onLoad:p=>ta(i),onError:p=>pa(i),preserveAspectRatio:"xMidYMid slice",class:e.normalizeClass(`dss-logo-image-${i}`),"clip-path":`circle(${n.width/2}px at ${n.width/2}px ${n.height/2}px)`,style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,46,jr))),128))])],8,Es))]),Qe.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:ke.value+"px",height:de.value+"px",backgroundImage:`url('${kl.value}')`,backgroundRepeat:"no-repeat",...Hn.value,opacity:Ct.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pt.value,(n,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+n.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:n.x+"px",top:n.y+"px",width:W.value+"px",height:W.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(p=>cn(n),["stop"]),onMouseenter:p=>il(n,p),onMouseleave:Mo},[e.createElementVNode("img",{src:k(n),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,Gr)],44,Kr)),[[e.vShow,Ie.value]])),128)),Vt.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-tooltip",style:e.normalizeStyle({left:Vt.value.x+"px",top:Vt.value.y+"px"})},[e.createElementVNode("div",Qr,e.toDisplayString(Vt.value.categoryValue),1),Vt.value.description?(e.openBlock(),e.createElementBlock("div",Jr,e.toDisplayString(Vt.value.description),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Ze.value&&(ht.value.show||et.value&&st.value.show&&!J.value.isZooming)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":et.value&&st.value.show&&!J.value.isZooming,"dss-spider-tooltip":Sn.value&&ht.value.spiderAreas&&ht.value.spiderAreas.length>0}]),style:e.normalizeStyle(fa.value)},[!et.value||!st.value.show||J.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Sn.value&&ht.value.spiderAreas&&ht.value.spiderAreas.length>0?(e.openBlock(),e.createElementBlock("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ht.value.spiderAreas,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-area-${i}`,class:"dss-spider-tooltip-area"},[e.createElementVNode("div",ti,[e.createElementVNode("span",{class:"dss-spider-tooltip-area-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createTextVNode(" "+e.toDisplayString(n.seriesName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.points,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-point-${i}-${g}`,class:"dss-tooltip-series"},[e.createElementVNode("span",ni,e.toDisplayString(p.label),1),e.createElementVNode("span",li,e.toDisplayString(p.value),1)]))),128))]))),128))])):jt.value&&ht.value.bubbleData&&ht.value.bubbleData.length>0?(e.openBlock(),e.createElementBlock("div",oi,[ht.value.title?(e.openBlock(),e.createElementBlock("div",ai,e.toDisplayString(ht.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ht.value.bubbleData,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`bubble-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(n.value),1))),128))])])):(e.openBlock(),e.createElementBlock("div",ri,[e.createElementVNode("div",ii,e.toDisplayString(ht.value.title),1),e.createElementVNode("div",ci,e.toDisplayString(ht.value.value),1)])),ht.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[Rn(ht.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",ui,[s[5]||(s[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",di,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rn(ht.value.categoryIndex).flagGroups,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${i}`},[e.createElementVNode("div",mi,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(n.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.flags,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${i}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",pi,[e.createElementVNode("div",fi,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),Rn(ht.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",vi,[s[6]||(s[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",gi,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rn(ht.value.categoryIndex).markers,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${i}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("div",hi,[e.createElementVNode("div",yi,e.toDisplayString(n.title),1),n.description?(e.openBlock(),e.createElementBlock("div",ki,e.toDisplayString(n.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",Ci,[e.createElementVNode("div",bi,e.toDisplayString(jt.value?Qn():T.categories[st.value.categoryIndex]||`Category ${st.value.categoryIndex+1}`),1),jt.value?(e.openBlock(),e.createElementBlock("div",wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.value.data,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(n.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(st.value.data,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${i}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("span",xi,e.toDisplayString(n.seriesName)+":",1),e.createElementVNode("span",Ei,e.toDisplayString(se(n.value)),1)]))),128))]),Rn(st.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",Si,[s[7]||(s[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Vi,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rn(st.value.categoryIndex).flagGroups,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${i}`},[e.createElementVNode("div",Ni,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(n.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.flags,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${i}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Mi,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),Rn(st.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",_i,[s[8]||(s[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",$i,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rn(st.value.categoryIndex).markers,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${i}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("div",Li,[e.createElementVNode("div",Ti,e.toDisplayString(n.title),1),n.description?(e.openBlock(),e.createElementBlock("div",Ai,e.toDisplayString(n.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),Cn.value&&je.value&&J.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-zoom-indicator",onClick:oo},[s[9]||(s[9]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(J.value.scale*100))+"% "+e.toDisplayString(e.unref(M)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,ms),Q.value&&be.value==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Me.value==="horizontal","dss-legend-vertical":Me.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(H.series,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-bottom-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":tt.value.has(i),"dss-legend-hovered":re.value===i,"dss-legend-dimmed":re.value!==null&&re.value!==i}]),onClick:p=>Yo(i),onMouseenter:p=>Pn(i),onMouseleave:ln,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:a(i)})},null,4),e.createElementVNode("span",Hi,e.toDisplayString(n.name),1)],46,Di))),128))],2)):e.createCommentVNode("",!0),bt.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-context-menu",style:e.normalizeStyle({left:bt.value.x+"px",top:bt.value.y+"px"}),onClick:s[0]||(s[0]=e.withModifiers(()=>{},["stop"]))},[Ge.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:Po},e.toDisplayString(e.unref(M)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),Ge.value.addMarker&&(Ge.value.downloadSvg||Ge.value.downloadPng||Ge.value.downloadCsv||Lt.value.length>0)?(e.openBlock(),e.createElementBlock("div",Ri)):e.createCommentVNode("",!0),Ge.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-context-menu-item",onClick:Io},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),Ge.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:go},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),Ge.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:ho},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),Lt.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[Ge.value.downloadSvg||Ge.value.downloadPng||Ge.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",Fi)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Lt.value,(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+i},[n.separator?(e.openBlock(),e.createElementBlock("div",Ii)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(_l(n)),style:e.normalizeStyle($l(n)),onClick:p=>zo(n)},[n.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:Yt(n),class:"dss-custom-menu-content"},null,8,Pi)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.icon?(e.openBlock(),e.createElementBlock("span",Oi,e.toDisplayString(n.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label),1)],64))],14,zi)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),_e.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-modal-overlay",onClick:lt},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:s[3]||(s[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",qi,[e.createElementVNode("h3",null,e.toDisplayString(nn.value?e.unref(M)("chart.modalMarker.viewMarker"):Bn.value?e.unref(M)("chart.modalMarker.editMarker"):e.unref(M)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:lt},"×")]),e.createElementVNode("div",Wi,[e.createElementVNode("div",Zi,[e.createVNode(Jo,{id:"dss-marker-date",mode:"single",modelValue:_e.value.date,"onUpdate:modelValue":s[1]||(s[1]=n=>_e.value.date=n),"min-date":Pl.value,"max-date":xl.value,disabled:nn.value},null,8,["modelValue","min-date","max-date","disabled"])]),e.createElementVNode("div",Ui,[e.createElementVNode("label",Xi,e.toDisplayString(e.unref(M)("chart.modalMarker.description")),1),nn.value?(e.openBlock(),e.createElementBlock("div",Yi,e.toDisplayString(_e.value.description),1)):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,id:"dss-marker-description","onUpdate:modelValue":s[2]||(s[2]=n=>_e.value.description=n),placeholder:e.unref(M)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"5"},null,8,ji)),[[e.vModelText,_e.value.description]])])]),e.createElementVNode("div",Ki,[e.createElementVNode("div",Gi,[Bn.value&&!nn.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:Jt},e.toDisplayString(e.unref(M)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Qi,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:lt},e.toDisplayString(nn.value?e.unref(M)("chart.modalMarker.close"):e.unref(M)("chart.modalMarker.cancel")),1),nn.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-primary",onClick:Bt,disabled:!(_e.value.description&&_e.value.description.length)},e.toDisplayString(Bn.value?e.unref(M)("chart.modalMarker.save"):e.unref(M)("chart.contextMenu.addMarker")),9,Ji))])])])])):e.createCommentVNode("",!0)],64))}}),nc={class:"dss-modal-title"},lc={class:"dss-modal-actions"},Qo={__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(T,{emit:te}){const M=T,L=te,ce=e.ref(null),z=e.ref(null),A=e.computed(()=>{const ae={"max-width":M.width};return M.height!=="auto"&&(ae.height=M.height,ae["min-height"]="0"),ae}),U=e.computed(()=>({}));function Ke(){L("close-modal")}function he(){M.backDrop&&!ce.value&&L("close-modal")}function f(ae){ae.target.tagName==="INPUT"&&(ce.value=ae.target.tagName)}function we(){setTimeout(()=>{ce.value=null},300)}function ge(){const ae=document.body,ve=document.documentElement;z.value={bodyOverflow:ae.style.overflow,bodyPosition:ae.style.position,bodyTop:ae.style.top,bodyWidth:ae.style.width,htmlOverflow:ve.style.overflow,scrollY:window.scrollY},ae.style.overflow="hidden",ae.style.position="fixed",ae.style.top=`-${z.value.scrollY}px`,ae.style.width="100%",ae.style.left="0",ve.style.overflow="hidden"}function ne(){if(!z.value)return;const ae=document.body,ve=document.documentElement,{bodyOverflow:H,bodyPosition:Ce,bodyTop:Ae,bodyWidth:qe,htmlOverflow:it,scrollY:R}=z.value;ae.style.overflow=H||"",ae.style.position=Ce||"",ae.style.top=Ae||"",ae.style.width=qe||"",ae.style.left="",ve.style.overflow=it||"",window.scrollTo(0,R||0)}return e.watch(()=>M.showModal,ae=>{if(ae)ge(),document.body.classList.add("dss-modal-open"),setTimeout(()=>{const ve=document.getElementById("dss-modal-backdrop");ve&&(ve.addEventListener("focusin",f),ve.addEventListener("focusout",we))},100);else{ne(),document.body.classList.remove("dss-modal-open");const ve=document.getElementById("dss-modal-backdrop");ve&&(ve.removeEventListener("focusin",f),ve.removeEventListener("focusout",we))}},{immediate:!0}),e.onUnmounted(()=>{M.showModal&&ne()}),(ae,ve)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[T.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-modal-backdrop",onClick:he},[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:ve[0]||(ve[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-modal-header",style:e.normalizeStyle({"justify-content":T.headerType,"font-size":T.titleSize})},[e.createElementVNode("h1",nc,[e.renderSlot(ae.$slots,"title",{},()=>[ve[1]||(ve[1]=e.createTextVNode("Default Title",-1))])]),e.renderSlot(ae.$slots,"title-data"),T.showCloseBtn?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-modal-close",onClick:Ke,title:"Close"},"×")):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"dss-modal-body",style:e.normalizeStyle(U.value)},[e.renderSlot(ae.$slots,"content",{},()=>[ve[2]||(ve[2]=e.createTextVNode("Default Content",-1))])],4),e.createElementVNode("div",lc,[e.renderSlot(ae.$slots,"actions")])])],4),[[e.vShow,T.showModal]])])):e.createCommentVNode("",!0)]))}},oc={key:0,class:"dss-table-toolbar"},ac={class:"dss-table-toolbar-left"},sc=["aria-expanded"],rc={class:"dss-pagination-select-dropdown",role:"listbox"},ic={class:"dss-table-column-visibility-label"},cc={class:"dss-table-checkbox-wrapper"},uc=["checked","onChange"],dc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},mc={class:"dss-table-column-visibility-text"},pc={class:"dss-table-toolbar-right"},fc=["placeholder","aria-label"],vc=["aria-label"],gc=["aria-label","aria-expanded"],hc={key:1,class:"dss-table-toolbar-extra"},yc={class:"dss-table-thead"},kc={key:0,class:"dss-table-th dss-table-selection-column"},Cc={key:0,class:"dss-table-checkbox-wrapper"},bc=["checked","indeterminate"],wc={key:0,class:"dss-table-checkbox__indeterminate"},xc={key:1,class:"dss-table-checkbox__check","aria-hidden":"true"},Ec=["aria-label"],Sc=["onClick"],Vc={class:"dss-table-th-content"},Nc={class:"dss-table-th-text"},Bc={key:0},Mc={key:1},_c={key:2},$c=["data-filter-column-key","aria-expanded","aria-label","onClick"],Lc={class:"dss-table-tbody"},Tc=["onClick"],Ac={class:"dss-table-checkbox-wrapper"},Dc=["type","name","checked","onChange"],Hc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Rc={key:1,class:"dss-table-checkbox__dot"},Fc=["onClick"],Ic=["aria-expanded","aria-label"],zc={key:1,class:"dss-table-expansion-placeholder","aria-hidden":"true"},Pc={key:0,class:"dss-table-expansion-row"},Oc=["colspan"],qc=["colspan"],Wc={key:1,class:"dss-table-pagination"},Zc={class:"dss-table-pagination-left"},Uc={key:0},Xc={key:1,class:"dss-table-pagination-placeholder","aria-hidden":"true"},Yc={class:"dss-table-pagination-center"},jc={key:0,class:"dss-pagination-controls"},Kc=["disabled","title"],Gc=["disabled","title"],Qc=["aria-label","onKeydown"],Jc={class:"dss-pagination-of"},eu=["disabled","title"],tu=["disabled","title"],nu={class:"dss-table-pagination-right"},lu={class:"dss-pagination-rows-label"},ou=["aria-expanded"],au=["aria-selected","onClick"],su={key:0,class:"dss-table-filter-row"},ru=["value","placeholder"],iu=["min","max","value"],cu=["min","max","value"],uu={class:"dss-table-filter-double-range-values"},du={key:2,class:"dss-table-filter-daterange"},mu={class:"dss-table-filter-daterange-row"},pu={class:"dss-table-filter-daterange-label"},fu=["value"],vu={class:"dss-table-filter-daterange-row"},gu={class:"dss-table-filter-daterange-label"},hu=["value"],yu=["value","placeholder"],ku={class:"dss-table-filter-list"},Cu=["checked","onChange"],bu={class:"dss-table-filter-actions"},wu={name:"DSSTable"},xu=Object.assign(wu,{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:T=>typeof T=="object"&&T!==null}},emits:["row-click","row-select","row-unselect","select-all","unselect-all","row-expand","row-collapse","sort","page","download-pdf","download-excel","search"],setup(T,{emit:te}){const{t:M,locale:L}=Gl.useI18n(),ce=T,z=te,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"},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 U(k,y){const S=Object.assign({},k);return Ke(k)&&Ke(y)&&Object.keys(y).forEach(Z=>{Ke(y[Z])?Z in k?S[Z]=U(k[Z],y[Z]):Object.assign(S,{[Z]:y[Z]}):Object.assign(S,{[Z]:y[Z]})}),S}function Ke(k){return k&&typeof k=="object"&&!Array.isArray(k)}const he=e.computed(()=>U(A,ce.options)),f=e.computed(()=>{const k=he.value.table.width;return k==="auto"?null:typeof k=="number"?k:null}),we=e.computed(()=>he.value.table.height),ge=e.computed(()=>he.value.table.rowHeight??"auto"),ne=e.computed(()=>({height:ge.value})),ae=e.computed(()=>he.value.table.expandable===!0),ve=e.computed(()=>he.value.table.expandableRowData??null),H=e.computed(()=>he.value.table.expandableRowCondition??null),Ce=e.computed(()=>he.value.table.truncated===!0),Ae=e.computed(()=>he.value.table.striped),qe=e.computed(()=>he.value.table.bordered),it=e.computed(()=>he.value.table.hoverable),R=e.computed(()=>he.value.table.size),xe=e.computed(()=>he.value.table.align||"left");e.computed(()=>he.value.title.text),e.computed(()=>he.value.subtitle.text);const Be=e.computed(()=>he.value.selection.enabled),ke=e.computed(()=>he.value.selection.mode),dt=e.computed(()=>he.value.sorting.enabled),ft=e.computed(()=>he.value.sorting.mode),de=e.computed(()=>he.value.pagination.enabled),vt=e.computed(()=>he.value.pagination.rows),We=e.computed(()=>he.value.pagination.rowsPerPageOptions),Pt=e.computed(()=>he.value.pagination.showCounter!==!1),rt=e.computed(()=>he.value.pagination.showControlsGroup),Et=e.computed(()=>rt.value===!1?!1:he.value.pagination.showControls!==!1),Tt=e.computed(()=>rt.value===!1?!1:he.value.pagination.showRowsPerPage!==!1),Wt=e.computed(()=>de.value&&(Pt.value||Et.value||Tt.value)),Ft=e.computed(()=>he.value.scrollable),G=e.computed(()=>he.value.emptyMessage||M("table.emptyMessage")),ue=e.computed(()=>he.value.toolbar?.downloads?.pdf!==!1),He=e.computed(()=>he.value.toolbar?.downloads?.excel!==!1),Xe=e.computed(()=>he.value.toolbar?.search!==!1),Zt=e.computed(()=>ue.value||He.value||Xe.value||kt.value),kt=e.computed(()=>he.value.toolbar?.columnVisibility!==!1),xt=e.ref(""),Mt=e.ref(!1),Ut=e.ref(null);let Q=null;function be(){Mt.value?(Q&&(clearTimeout(Q),Q=null),Mt.value=!1,xt.value="",z("search",""),Ut.value?.blur()):(Mt.value=!0,Q=setTimeout(()=>{Q=null,Ut.value?.focus()},80))}function Me(){xt.value||(Mt.value=!1)}function Ze(){xt.value="",z("search",""),Ut.value?.focus()}const et=e.computed(()=>({"dss-table-striped":Ae.value,"dss-table-bordered":qe.value,"dss-table-hoverable":it.value,[`dss-table-${R.value}`]:R.value!=="default","dss-table-truncated":Ce.value})),mt=(k,y)=>k?.field??k?.key??y,je=e.ref(new Set);function _t(){const k=new Set;ce.columns.forEach((y,S)=>{y?.hidden!==!0&&k.add(mt(y,S))}),je.value=k}const Re=e.computed(()=>ce.columns.filter((k,y)=>je.value.has(mt(k,y)))),P=k=>{const y=ce.columns.findIndex(S=>S===k);return mt(k,y>=0?y:0)},X=(k,y)=>je.value.has(mt(k,y));function j(k,y){const S=mt(k,y),Z=new Set(je.value);Z.has(S)?Z.delete(S):Z.add(S),je.value=Z}const me=e.ref(null),ze=e.ref(!1);function nt(k){me.value&&!me.value.contains(k.target)&&(ze.value=!1)}const St=e.computed(()=>Re.value.length+(Be.value?1:0)+(ae.value?1:0)),Pe=(k,y)=>k?.id??k?.key??y,gt=e.ref(new Set),Ot=e.ref(null),an=(k,y)=>gt.value.has(Pe(k,y)),$t=(k,y)=>{if(!ae.value)return!1;if(typeof H.value=="function")return!!H.value(k,y);if(typeof ve.value=="string"&&ve.value.trim()){const S=Yt(k,ve.value.trim());return Array.isArray(S)?S.length>0:S&&typeof S=="object"?Object.keys(S).length>0:S!=null&&S!==""}return!0},sn=(k,y,S)=>{if(S&&S.stopPropagation(),!$t(k,y))return;const Z=Pe(k,y),pe=new Set(gt.value);pe.has(Z)?(pe.delete(Z),z("row-collapse",{data:k,index:y})):(pe.add(Z),z("row-expand",{data:k,index:y})),gt.value=pe},V=(k,y)=>{if(!Ce.value)return;const S=Pe(k,y);Ot.value!==S&&(Ot.value=S)},w=e.ref(null),E=e.ref(0),Y=e.ref([]),le=k=>{if(ft.value==="single")return w.value===k.field?E.value:0;{const y=Y.value.find(S=>S.field===k.field);return y?y.order:0}},Ye=k=>{const y=le(k);return{"dss-sort-active":y!==0,"dss-sort-asc":y===1,"dss-sort-desc":y===-1}},ot=e.ref({}),Ve=e.ref(null),Fe=e.ref(null),It=220,Ht=e.ref(null),at=e.computed(()=>Re.value.find(k=>P(k)===Ve.value)??null),Ge=e.computed(()=>{if(!at.value||at.value.filter!=="range")return null;const k=at.value,y=Ve.value,{min:S,max:Z}=Hn(k),pe=k.filterMin??S,Bt=k.filterMax??Z,lt=W(y),Jt=lt.min??pe,pn=lt.max??Bt,cn=Bt-pe,kn=cn===0?0:(Jt-pe)/cn*100,Yn=cn===0?100:(pn-pe)/cn*100;return{rangeMin:pe,rangeMax:Bt,currentMin:Jt,currentMax:pn,minPct:kn,maxPct:Yn}}),Lt=e.ref(null),In=e.ref("max");function O(k){const y=Lt.value,S=Ge.value;if(!y||!S)return;const Z=y.getBoundingClientRect(),Bt=(k.clientX-Z.left)/Z.width*100,lt=(S.minPct+S.maxPct)/2;In.value=Bt<lt?"min":"max"}function W(k){return ot.value[k]??{}}function q(k,y){ot.value={...ot.value,[k]:y}}function se(k){const y=ot.value[k];return y?y.type==="string"?!!y.value?.trim():y.type==="range"?y.min!=null||y.max!=null:y.type==="dateRange"?!!(y.from||y.to):y.type==="list"?y.selected?.length>0:!1:!1}function Ie(k){const y={...ot.value};delete y[k],ot.value=y,Ve.value=null,Fe.value=null}function ct(){if(!Ve.value){Fe.value=null;return}const k=Ht.value;if(!k)return;const y=k.querySelector(`.dss-table-filter-trigger[data-filter-column-key="${Ve.value}"]`);if(!y)return;const S=y.getBoundingClientRect();Fe.value={top:S.bottom+6,left:Math.max(8,S.right-It)}}const pt=e.computed(()=>{const k=String(xt.value??"").trim().toLowerCase();return k?ce.data.filter(y=>Re.value.some(S=>Ct(xn(y,S)).some(pe=>String(pe).toLowerCase().includes(k)))):ce.data}),Qe=e.computed(()=>{let k=[...pt.value];const y=(xt.value??"").trim().toLowerCase();return y&&(k=k.filter(S=>ce.columns.some(Z=>{if(!Z||!Z.field)return!1;const pe=xn(S,Z);return String(pe??"").toLowerCase().includes(y)}))),Re.value.forEach(S=>{const Z=P(S),pe=ot.value[Z];if(!pe)return;const Bt=S.field;if(Bt){if(pe.type==="string"&&pe.value?.trim()){const lt=pe.value.trim().toLowerCase();k=k.filter(Jt=>{const pn=xn(Jt,S);return String(pn??"").toLowerCase().includes(lt)})}else if(pe.type==="range")k=k.filter(lt=>{const Jt=Yt(lt,Bt),pn=Number(Jt);return!(Number.isNaN(pn)||pe.min!=null&&pn<pe.min||pe.max!=null&&pn>pe.max)});else if(pe.type==="dateRange"){const lt=pe.from?new Date(pe.from).getTime():null,Jt=pe.to?new Date(pe.to).getTime():null;k=k.filter(pn=>{const cn=Yt(pn,Bt),kn=cn?new Date(cn).getTime():NaN;return!(Number.isNaN(kn)||lt!=null&&kn<lt||Jt!=null&&kn>Jt)})}else if(pe.type==="list"&&pe.selected?.length){const lt=new Set(pe.selected);k=k.filter(Jt=>Ct(xn(Jt,S)).some(cn=>lt.has(cn)))}}}),k});function Ct(k){if(k==null)return[""];if(Array.isArray(k))return k.flatMap(Ct);if(typeof k=="object"){const y=k?.label??k?.name??k?.value??k?.title;return[y!=null?String(y):String(k)]}return[String(k)]}function Xt(k){const y=new Set;return ce.data.forEach(S=>{Ct(xn(S,k)).forEach(pe=>y.add(pe))}),Array.from(y).sort((S,Z)=>String(S).localeCompare(String(Z)))}function An(k,y){if(Ve.value===k){Ve.value=null,Fe.value=null;return}if(Ve.value=k,y?.currentTarget){const S=y.currentTarget.getBoundingClientRect();Fe.value={top:S.bottom+6,left:Math.max(8,S.right-It)}}else ct()}function Dn(k,y){q(k,{type:"string",value:y})}function Hn(k){const y=k.field;if(!y)return{min:0,max:100};let S=1/0,Z=-1/0;return ce.data.forEach(pe=>{const Bt=Yt(pe,y),lt=Number(Bt);Number.isNaN(lt)||(S=Math.min(S,lt),Z=Math.max(Z,lt))}),{min:S===1/0?0:S,max:Z===-1/0?100:Z}}function sl(k,y,S){const Z={...W(k),type:"range"},pe=S===""?null:Number(S),Bt=pe===null||Number.isNaN(pe)?null:pe;Z[y]=Bt,Bt!=null&&(y==="min"&&Z.max!=null&&Bt>Z.max&&(Z.max=Bt),y==="max"&&Z.min!=null&&Bt<Z.min&&(Z.min=Bt)),q(k,Z)}function Rn(k,y,S){const Z={...W(k),type:"dateRange"};Z[y]=S||"",q(k,Z)}const yl=e.reactive({});function kl(k,y){yl[k]=y}function Cl(k){const y=P(k),S=(yl[y]??"").trim().toLowerCase(),Z=Xt(k);return S?Z.filter(pe=>String(pe).toLowerCase().includes(S)):Z}function Bl(k,y){return(W(k).selected??[]).includes(y!=null?String(y):"")}function Fl(k,y){const Z=[...W(k).selected??[]],pe=y!=null?String(y):"",Bt=Z.indexOf(pe);Bt>=0?Z.splice(Bt,1):Z.push(pe),q(k,{type:"list",selected:Z})}function bl(k){Ve.value&&!k.target.closest(".dss-table-filter-wrap")&&!k.target.closest(".dss-table-filter-dropdown")&&(Ve.value=null,Fe.value=null)}function wl(){ct(),Fn.value&&Nn()}const zn=k=>{if(!(k.sortable===!1||!dt.value))if(ft.value==="single")w.value===k.field?E.value=E.value===1?-1:E.value===-1?0:1:(w.value=k.field,E.value=1),E.value===0&&(w.value=null),z("sort",{field:w.value,order:E.value});else{const y=Y.value.findIndex(S=>S.field===k.field);y>=0?Y.value[y].order===1?Y.value[y].order=-1:Y.value.splice(y,1):Y.value.push({field:k.field,order:1}),z("sort",{multiSortMeta:Y.value})}},Jn=e.computed(()=>{if(!dt.value)return Qe.value;let k=[...Qe.value];return ft.value==="single"&&w.value&&E.value!==0?k.sort((y,S)=>{const Z=Yt(y,w.value),pe=Yt(S,w.value);return Z===pe?0:Z==null?1:pe==null?-1:(Z<pe?-1:Z>pe?1:0)*E.value}):ft.value==="multiple"&&Y.value.length>0&&k.sort((y,S)=>{for(const Z of Y.value){const pe=Yt(y,Z.field),Bt=Yt(S,Z.field);if(pe===Bt)continue;if(pe==null)return 1;if(Bt==null)return-1;const lt=pe<Bt?-1:pe>Bt?1:0;if(lt!==0)return lt*Z.order}return 0}),k}),gn=e.ref(0),Vn=e.ref(vt.value),Fn=e.ref(!1),Un=e.ref(null),Il=e.ref(null),zl=e.ref("bottom"),ul=e.ref(null),Ml=k=>{Vn.value=k,Fn.value=!1,gn.value=0,z("page",{page:0,rows:Vn.value})};function wn(k){Un.value&&!Un.value.contains(k.target)&&(Fn.value=!1)}function Nn(){const k=Un.value,y=Il.value;if(!k||!y)return;const S=k.querySelector(".dss-pagination-select-dropdown");if(!S)return;const Z=y.getBoundingClientRect(),pe=S.offsetHeight||0,lt=(window.innerHeight||document.documentElement.clientHeight)-Z.bottom,Jt=Z.top;zl.value=lt<pe+8&&Jt>lt?"top":"bottom",ul.value={width:`${Math.ceil(Z.width)}px`,left:`${Math.max(0,Math.round(y.offsetLeft))}px`}}const Xn=e.computed(()=>Jn.value.length),tt=e.computed(()=>Math.ceil(Xn.value/Vn.value)),re=e.computed(()=>Math.max(tt.value,1)),dl=e.computed(()=>Xn.value===0?0:Vt.value+1),ht=e.computed(()=>st.value),Vt=e.computed(()=>de.value?gn.value*Vn.value:0),st=e.computed(()=>de.value?Math.min((gn.value+1)*Vn.value,Xn.value):Xn.value),bt=e.computed(()=>{if(!de.value)return Jn.value;const k=Vt.value,y=st.value;return Jn.value.slice(k,y)}),J=e.ref(new Set),Gt=e.computed(()=>Jn.value.filter((k,y)=>J.value.has(Pe(k,y)))),_e=e.computed(()=>{const k=Jn.value.length;return k>0&&J.value.size===k}),Pl=e.computed(()=>{const k=Jn.value.length,y=J.value.size;return y>0&&y<k}),xl=(k,y)=>J.value.has(Pe(k,y)),Bn=()=>{if(_e.value)J.value=new Set,z("unselect-all");else{const k=new Set;Jn.value.forEach((y,S)=>k.add(Pe(y,S))),J.value=k,z("select-all",Gt.value)}},nn=(k,y)=>{const S=Pe(k,y),Z=new Set(J.value),pe=Z.has(S);ke.value==="single"?pe?(Z.delete(S),z("row-unselect",k)):(Z.clear(),Z.add(S),z("row-select",k)):pe?(Z.delete(S),z("row-unselect",k)):(Z.add(S),z("row-select",k)),J.value=Z},Pn=e.ref("1"),ln=()=>{const k=Number.parseInt(String(Pn.value),10);if(!Number.isFinite(k)){Pn.value=String(gn.value+1);return}const y=Math.min(re.value,Math.max(1,k));y!==gn.value+1?Mn(y-1):Pn.value=String(y)},Mn=k=>{k<0||k>=tt.value||(gn.value=k,z("page",{page:k,rows:Vn.value}))},to=(k,y,S)=>{z("row-click",{data:k,index:y,originalEvent:S}),V(k,Vt.value+y)},Ol=(k,y)=>{const S=Vt.value+y;return{"dss-table-row-selected":xl(k,S),"dss-table-row-even":y%2===0,"dss-table-row-odd":y%2!==0,"dss-table-row-truncated-clickable":Ce.value,"dss-table-row-truncated-expanded":Ot.value===Pe(k,S)}},xn=(k,y)=>y.field?Yt(k,y.field):"",Yt=(k,y)=>y.split(".").reduce((S,Z)=>S&&S[Z],k),_l=k=>{const y=k.align??xe.value;return{"dss-table-sortable":k.sortable!==!1&&dt.value,"dss-table-align-left":y==="left","dss-table-align-center":y==="center","dss-table-align-right":y==="right",[k.className]:k.className}},$l=k=>{const y={};return k.width&&(y.width=typeof k.width=="number"?`${k.width}px`:k.width),k.minWidth&&(y.minWidth=typeof k.minWidth=="number"?`${k.minWidth}px`:k.minWidth),k.maxWidth&&(y.maxWidth=typeof k.maxWidth=="number"?`${k.maxWidth}px`:k.maxWidth),y};return e.watch(()=>ce.locale,k=>{k&&k!==L.value&&(L.value=k)},{immediate:!0}),e.watch(vt,k=>{Vn.value=k,gn.value=0}),e.watch(Fn,async k=>{k&&(await e.nextTick(),Nn())}),e.watch(gn,k=>{Pn.value=String(k+1)},{immediate:!0}),e.watch(xt,k=>{z("search",k??"")}),e.watch(()=>ce.columns,()=>{_t()},{immediate:!0,deep:!0}),e.onMounted(()=>{document.addEventListener("click",wn),document.addEventListener("click",nt),document.addEventListener("click",bl),window.addEventListener("resize",wl),window.addEventListener("scroll",wl,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",wn),document.removeEventListener("click",nt),document.removeEventListener("click",bl),window.removeEventListener("resize",wl),window.removeEventListener("scroll",wl,!0)}),(k,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"dss-table-container",ref_key:"tableContainerRef",ref:Ht,style:e.normalizeStyle({width:f.value+"px",height:we.value?we.value+"px":"auto"})},[Zt.value?(e.openBlock(),e.createElementBlock("div",oc,[e.createElementVNode("div",ac,[ue.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-btn",onClick:y[0]||(y[0]=S=>z("download-pdf"))},[y[22]||(y[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(M)("table.downloadPdf")),1)])):e.createCommentVNode("",!0),He.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-table-toolbar-btn",onClick:y[1]||(y[1]=S=>z("download-excel"))},[y[23]||(y[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(M)("table.downloadExcel")),1)])):e.createCommentVNode("",!0),kt.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-table-toolbar-column-visibility",ref_key:"columnVisibilityDropdownRef",ref:me},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":ze.value}]),onClick:y[2]||(y[2]=S=>ze.value=!ze.value),"aria-expanded":ze.value,"aria-haspopup":"listbox"},[e.createTextVNode(e.toDisplayString(e.unref(M)("table.columnVisibility"))+" ",1),y[24]||(y[24]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,sc),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.columns,(S,Z)=>(e.openBlock(),e.createElementBlock("li",{key:mt(S,Z),role:"option",class:"dss-table-column-visibility-option",onClick:y[3]||(y[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",ic,[e.createElementVNode("span",cc,[e.createElementVNode("input",{type:"checkbox",checked:X(S,Z),onChange:pe=>j(S,Z),class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,uc),X(S,Z)?(e.openBlock(),e.createElementBlock("span",dc,[...y[25]||(y[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",mc,e.toDisplayString(S.header),1)])]))),128))],512),[[e.vShow,ze.value]])]),_:1})],512)):e.createCommentVNode("",!0)]),e.createElementVNode("div",pc,[Xe.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-table-toolbar-search",{"dss-table-toolbar-search--expanded":Mt.value||xt.value}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:Ut,"onUpdate:modelValue":y[4]||(y[4]=S=>xt.value=S),type:"text",class:"dss-table-toolbar-search-input",placeholder:e.unref(M)("table.searchPlaceholder"),"aria-label":e.unref(M)("table.searchTableAriaLabel"),onFocus:y[5]||(y[5]=S=>Mt.value=!0),onBlur:Me},null,40,fc),[[e.vModelText,xt.value]]),xt.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-search-clear","aria-label":e.unref(M)("table.clearSearchAriaLabel"),onClick:Ze},[...y[26]||(y[26]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])],8,vc)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"dss-table-toolbar-search-trigger","aria-label":e.unref(M)("table.searchAriaLabel"),"aria-expanded":Mt.value||!!xt.value,onMousedown:e.withModifiers(be,["prevent"])},[...y[27]||(y[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,gc)],2)):e.createCommentVNode("",!0),k.$slots["toolbar-extra"]?(e.openBlock(),e.createElementBlock("div",hc,[e.renderSlot(k.$slots,"toolbar-extra")])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-table-wrapper",{"dss-table-scrollable":Ft.value}])},[e.createElementVNode("table",{class:e.normalizeClass(["dss-table",et.value])},[e.createElementVNode("thead",yc,[e.createElementVNode("tr",null,[Be.value?(e.openBlock(),e.createElementBlock("th",kc,[ke.value==="multiple"?(e.openBlock(),e.createElementBlock("span",Cc,[e.createElementVNode("input",{type:"checkbox",checked:_e.value,indeterminate:Pl.value,onChange:Bn,class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,bc),Pl.value?(e.openBlock(),e.createElementBlock("span",wc)):_e.value?(e.openBlock(),e.createElementBlock("span",xc,[...y[28]||(y[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),ae.value?(e.openBlock(),e.createElementBlock("th",{key:1,class:"dss-table-th dss-table-expansion-column","aria-label":e.unref(M)("table.expandRowAriaLabel")},null,8,Ec)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Re.value,(S,Z)=>(e.openBlock(),e.createElementBlock("th",{key:P(S),class:e.normalizeClass(["dss-table-th",_l(S)]),style:e.normalizeStyle($l(S)),onClick:pe=>zn(S)},[e.createElementVNode("div",Vc,[e.createElementVNode("span",Nc,e.toDisplayString(S.header),1),S.sortable!==!1&&dt.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dss-table-sort-icon",Ye(S)])},[le(S)===0?(e.openBlock(),e.createElementBlock("span",Bc,[...y[29]||(y[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)])])):le(S)===1?(e.openBlock(),e.createElementBlock("span",Mc,[...y[30]||(y[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)])])):le(S)===-1?(e.openBlock(),e.createElementBlock("span",_c,[...y[31]||(y[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":Ve.value===P(S)}]),onClick:y[6]||(y[6]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-table-filter-trigger",{"dss-table-filter-trigger--active":se(P(S))}]),"data-filter-column-key":P(S),"aria-expanded":Ve.value===P(S),"aria-label":e.unref(M)("table.filterColumnAriaLabel"),onClick:pe=>An(P(S),pe)},[...y[32]||(y[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,$c)],2)):e.createCommentVNode("",!0)])],14,Sc))),128))])]),e.createElementVNode("tbody",Lc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bt.value,(S,Z)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Pe(S,Vt.value+Z)},[e.createElementVNode("tr",{class:e.normalizeClass(["dss-table-tr",Ol(S,Z)]),style:e.normalizeStyle(ne.value),onClick:pe=>to(S,Z,pe)},[Be.value?(e.openBlock(),e.createElementBlock("td",{key:0,class:"dss-table-td dss-table-selection-cell",onClick:y[7]||(y[7]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("span",Ac,[e.createElementVNode("input",{type:ke.value==="multiple"?"checkbox":"radio",name:`dss-table-select-${T.tableId}`,checked:xl(S,Vt.value+Z),onChange:pe=>nn(S,Vt.value+Z),class:e.normalizeClass(["dss-table-checkbox",ke.value==="multiple"?"dss-table-checkbox--checkbox":"dss-table-checkbox--radio"])},null,42,Dc),ke.value==="multiple"&&xl(S,Vt.value+Z)?(e.openBlock(),e.createElementBlock("span",Hc,[...y[33]||(y[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)])])):ke.value==="single"&&xl(S,Vt.value+Z)?(e.openBlock(),e.createElementBlock("span",Rc)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),ae.value?(e.openBlock(),e.createElementBlock("td",{key:1,class:"dss-table-td dss-table-expansion-cell",onClick:e.withModifiers(pe=>sn(S,Vt.value+Z,pe),["stop"])},[$t(S,Vt.value+Z)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-expansion-trigger","aria-expanded":an(S,Vt.value+Z),"aria-label":an(S,Vt.value+Z)?e.unref(M)("table.collapseRowAriaLabel"):e.unref(M)("table.expandRowAriaLabel")},[e.createElementVNode("span",{class:e.normalizeClass(["dss-table-expansion-icon",{"dss-table-expansion-icon--expanded":an(S,Vt.value+Z)}]),"aria-hidden":"true"},[...y[34]||(y[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,Ic)):(e.openBlock(),e.createElementBlock("span",zc))],8,Fc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Re.value,(pe,Bt)=>(e.openBlock(),e.createElementBlock("td",{key:P(pe),class:e.normalizeClass(["dss-table-td",_l(pe)]),style:e.normalizeStyle($l(pe))},[e.renderSlot(k.$slots,`cell-${pe.field}`,{data:S,column:pe,rowIndex:Z,isExpanded:Ot.value===Pe(S,Vt.value+Z)},()=>[e.createTextVNode(e.toDisplayString(xn(S,pe)),1)])],6))),128))],14,Tc),ae.value&&$t(S,Vt.value+Z)&&an(S,Vt.value+Z)?(e.openBlock(),e.createElementBlock("tr",Pc,[e.createElementVNode("td",{colspan:St.value,class:"dss-table-expansion-content-cell"},[e.renderSlot(k.$slots,"expansion",{data:S,rowIndex:Z})],8,Oc)])):e.createCommentVNode("",!0)],64))),128)),bt.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:"dss-table-empty",style:e.normalizeStyle(ne.value)},[e.createElementVNode("td",{colspan:St.value,class:"dss-table-empty-cell"},[e.renderSlot(k.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(G.value),1)])],8,qc)],4))])],2)],2),Wt.value?(e.openBlock(),e.createElementBlock("div",Wc,[e.createElementVNode("div",Zc,[Pt.value?(e.openBlock(),e.createElementBlock("span",Uc,e.toDisplayString(e.unref(M)("table.showingRange",{start:dl.value,end:ht.value,total:Xn.value})),1)):(e.openBlock(),e.createElementBlock("span",Xc," "))]),e.createElementVNode("div",Yc,[Et.value?(e.openBlock(),e.createElementBlock("div",jc,[e.createElementVNode("button",{class:"dss-pagination-btn",disabled:gn.value===0,onClick:y[8]||(y[8]=S=>Mn(0)),title:e.unref(M)("table.firstPage")},[...y[35]||(y[35]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"‹"),e.createElementVNode("span",null,"‹")],-1)])],8,Kc),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:gn.value===0,onClick:y[9]||(y[9]=S=>Mn(gn.value-1)),title:e.unref(M)("table.previousPage")}," ‹ ",8,Gc),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":y[10]||(y[10]=S=>Pn.value=S),type:"text",class:"dss-pagination-page-input","aria-label":e.unref(M)("table.currentPageAriaLabel"),onBlur:ln,onKeydown:e.withKeys(e.withModifiers(ln,["prevent"]),["enter"])},null,40,Qc),[[e.vModelText,Pn.value]]),e.createElementVNode("span",Jc,e.toDisplayString(e.unref(M)("table.ofPages",{total:re.value})),1),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:gn.value>=tt.value-1,onClick:y[11]||(y[11]=S=>Mn(gn.value+1)),title:e.unref(M)("table.nextPage")}," › ",8,eu),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:gn.value>=tt.value-1,onClick:y[12]||(y[12]=S=>Mn(tt.value-1)),title:e.unref(M)("table.lastPage")},[...y[36]||(y[36]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"›"),e.createElementVNode("span",null,"›")],-1)])],8,tu)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",nu,[Tt.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-pagination-rows-per-page",ref_key:"rowsPerPageDropdownRef",ref:Un},[e.createElementVNode("span",lu,e.toDisplayString(e.unref(M)("table.rowsPerPage"))+":",1),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":Fn.value}]),onClick:y[13]||(y[13]=S=>Fn.value=!Fn.value),"aria-expanded":Fn.value,"aria-haspopup":"listbox",ref_key:"rowsPerPageTriggerRef",ref:Il},[e.createTextVNode(e.toDisplayString(Vn.value)+" ",1),y[37]||(y[37]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,ou),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":zl.value==="top"}]),style:e.normalizeStyle(ul.value),role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(We.value,S=>(e.openBlock(),e.createElementBlock("li",{key:S,role:"option","aria-selected":S===Vn.value,class:e.normalizeClass(["dss-pagination-select-option",{"dss-pagination-select-option--selected":S===Vn.value}]),onClick:Z=>Ml(S)},e.toDisplayString(S),11,au))),128))],6),[[e.vShow,Fn.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(Fe.value?{top:Fe.value.top+"px",left:Fe.value.left+"px",width:It+"px"}:void 0),onClick:y[21]||(y[21]=e.withModifiers(()=>{},["stop"]))},[at.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[at.value.filter==="string"?(e.openBlock(),e.createElementBlock("div",su,[e.createElementVNode("input",{type:"text",value:W(Ve.value).value??"",onInput:y[14]||(y[14]=S=>Dn(Ve.value,S.target.value)),class:"dss-table-filter-input",placeholder:e.unref(M)("table.search")},null,40,ru)])):at.value.filter==="range"&&Ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-table-filter-double-range",style:e.normalizeStyle({"--range-min-pct":Ge.value.minPct+"%","--range-max-pct":Ge.value.maxPct+"%"})},[e.createElementVNode("div",{ref_key:"doubleRangeTrackRef",ref:Lt,class:"dss-table-filter-double-range-track",onMousemove:O,onMouseenter:O},[e.createElementVNode("input",{type:"range",min:Ge.value.rangeMin,max:Ge.value.rangeMax,value:Ge.value.currentMin,onInput:y[15]||(y[15]=S=>sl(Ve.value,"min",S.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--min",style:e.normalizeStyle({zIndex:In.value==="min"?2:1})},null,44,iu),e.createElementVNode("input",{type:"range",min:Ge.value.rangeMin,max:Ge.value.rangeMax,value:Ge.value.currentMax,onInput:y[16]||(y[16]=S=>sl(Ve.value,"max",S.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--max",style:e.normalizeStyle({zIndex:In.value==="max"?2:1})},null,44,cu)],544),e.createElementVNode("div",uu,e.toDisplayString(Ge.value.currentMin)+" – "+e.toDisplayString(Ge.value.currentMax),1)],4)):at.value.filter==="dateRange"?(e.openBlock(),e.createElementBlock("div",du,[e.createElementVNode("div",mu,[e.createElementVNode("label",pu,e.toDisplayString(e.unref(M)("table.filterFrom")),1),e.createElementVNode("input",{type:"date",value:W(Ve.value).from??"",onInput:y[17]||(y[17]=S=>Rn(Ve.value,"from",S.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,fu)]),e.createElementVNode("div",vu,[e.createElementVNode("label",gu,e.toDisplayString(e.unref(M)("table.filterTo")),1),e.createElementVNode("input",{type:"date",value:W(Ve.value).to??"",onInput:y[18]||(y[18]=S=>Rn(Ve.value,"to",S.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,hu)])])):at.value.filter==="list"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("input",{type:"text",value:yl[Ve.value]??"",onInput:y[19]||(y[19]=S=>kl(Ve.value,S.target.value)),class:"dss-table-filter-input dss-table-filter-list-search",placeholder:e.unref(M)("table.search")},null,40,yu),e.createElementVNode("div",ku,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cl(at.value),S=>(e.openBlock(),e.createElementBlock("label",{key:S,class:"dss-table-filter-list-item"},[e.createElementVNode("input",{type:"checkbox",checked:Bl(Ve.value,S),onChange:Z=>Fl(Ve.value,S)},null,40,Cu),e.createElementVNode("span",null,e.toDisplayString(S),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",bu,[e.createElementVNode("button",{type:"button",class:"dss-table-filter-clear",onClick:y[20]||(y[20]=S=>Ie(Ve.value))},e.toDisplayString(e.unref(M)("table.clearFilter")),1)])],64)):e.createCommentVNode("",!0)],4),[[e.vShow,Ve.value&&at.value&&Fe.value]])]),_:1})]))],64))}}),Eu="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",Su="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",Vu="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",Nu="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",Bu="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",Mu="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",_u={class:"dss-toolbar-left"},$u=["title"],Lu=["title"],Tu={class:"dss-toolbar-dropdown-wrapper"},Au=["title"],Du=["src"],Hu=["src"],Ru=["src"],Fu=["src"],Iu=["src"],zu=["src"],Pu={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},Ou=["src"],qu=["src"],Wu=["src"],Zu=["src"],Uu=["src"],Xu=["src"],Yu=["title"],ju=["title"],Ku=["title"],Gu=["title"],Qu=["title"],Ju=["title"],ed=["title"],td=["title"],nd=["title"],ld={key:2,class:"dss-toolbar-separator"},od=["title"],ad={key:4,class:"dss-toolbar-separator"},sd={key:5,class:"dss-toolbar-dropdown-wrapper"},rd=["title"],id={class:"dss-toolbar-dropdown-ai"},cd={class:"dss-toolbar-right"},ud={key:0,class:"dss-toolbar-custom-group"},dd={key:1,class:"dss-toolbar-separator"},md={class:"dss-link-modal-content"},pd={class:"dss-link-modal-field"},fd={class:"dss-link-modal-label"},vd=["placeholder"],gd={class:"dss-link-modal-field"},hd={class:"dss-link-modal-label"},yd=["placeholder"],kd={class:"dss-image-modal-tabs"},Cd={key:0,class:"dss-image-tab-content"},bd={class:"dss-link-modal-content"},wd={class:"dss-link-modal-field"},xd={key:0,class:"dss-link-modal-label"},Ed=["src"],Sd={class:"dss-link-modal-field"},Vd={class:"dss-link-modal-label"},Nd=["placeholder"],Bd={class:"dss-link-modal-field"},Md={class:"dss-link-modal-label"},_d=["placeholder"],$d={class:"dss-link-modal-field"},Ld={class:"dss-link-modal-label"},Td=["placeholder"],Ad={key:1,class:"dss-image-tab-content"},Dd={class:"dss-link-modal-content"},Hd={class:"dss-link-modal-field"},Rd={class:"dss-link-modal-label"},Fd=["placeholder"],Id={class:"dss-link-modal-field"},zd={class:"dss-link-modal-label"},Pd=["placeholder"],Od={class:"dss-link-modal-field"},qd={class:"dss-link-modal-label"},Wd=["placeholder"],Zd={class:"dss-link-modal-field"},Ud={class:"dss-link-modal-label"},Xd=["placeholder"],Yd={class:"dss-text-editor-title-input-container"},jd={key:0,class:"dss-text-editor-title-preview"},Kd={key:0},Gd={key:1,class:"dss-text-editor-preview-placeholder"},Qd=["value","placeholder","disabled"],Jd={key:2,class:"dss-text-editor-title-slot dss-text-editor-slot-last"},e1={class:"dss-text-editor-description-input-container"},t1={key:0,class:"dss-text-editor-description-preview"},n1={key:0},l1={key:1,class:"dss-text-editor-preview-placeholder"},o1=["value","placeholder","disabled"],a1={key:3,class:"dss-text-editor-description-slot dss-text-editor-slot-last"},s1=["data-comment-id","onMouseenter"],r1=["onClick"],i1=["src","alt"],c1={key:1},u1=["onClick"],d1=["src","alt"],m1={key:1},p1=["data-has-second-user","onClick"],f1={class:"editor-comment-marker-count"},v1={key:4,class:"dss-text-editor-textarea-wrapper"},g1=["value","placeholder","rows","disabled"],h1={class:"dss-text-editor-footer"},y1={class:"dss-text-editor-footer-content"},k1={class:"dss-text-editor-footer-stat"},C1={class:"dss-text-editor-footer-stat"},b1={key:5,class:"dss-text-editor-content-wrapper"},w1={key:0,class:"dss-comment-overlay-body"},x1={class:"dss-comment-selection-wrapper"},E1=["innerHTML"],S1={class:"dss-comment-messages-wrapper"},V1={key:0,class:"dss-comment-avatar-wrapper"},N1={class:"dss-comment-avatar"},B1=["src","alt"],M1={key:1},_1={class:"dss-comment-header"},$1={class:"dss-comment-header-text"},L1={class:"dss-comment-author"},T1={key:0,class:"dss-comment-date"},A1=["onClick","title"],D1={class:"dss-comment-overlay-inner"},H1=["placeholder","onKeydown"],R1={class:"dss-text-editor-footer"},F1={class:"dss-text-editor-footer-content"},I1={class:"dss-text-editor-footer-stat"},z1={class:"dss-text-editor-footer-stat"},P1=["title"],O1=["title"],q1={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:""},W1={class:"dss-image-popup-content"},Z1={key:0,class:"dss-image-popup-no-alt-icon"},U1=["title"],X1=["title"],Y1={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:""},j1={class:"dss-toolbar-left"},K1=["title"],G1=["title"],Q1={class:"dss-toolbar-dropdown-wrapper"},J1=["title"],em=["src"],tm=["src"],nm=["src"],lm=["src"],om=["src"],am=["src"],sm={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},rm=["title"],im=["title"],cm=["title"],um=["title"],dm=["title"],mm=["title"],pm=["title"],fm=["title"],vm=["title"],gm=["title"],hm={key:2,class:"dss-toolbar-separator"},ym={key:3,class:"dss-toolbar-dropdown-wrapper"},km=["title"],Cm={class:"dss-toolbar-dropdown-ai"},bm={key:0,class:"dss-toolbar-right"},wm={key:0,class:"dss-toolbar-separator"},xm={key:0,class:"dss-toolbar-custom-group"},Em={key:1,class:"dss-toolbar-separator"},Sm={name:"DSSTextEditor"},Vm=Object.assign(Sm,{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:T=>typeof T=="object"&&T!==null},floatingToolbar:{type:Boolean,default:!1},askAi:{type:Boolean,default:!1},commentUser:{type:Object,default:null},customToolbarSlots:{type:Array,default:()=>["custom-tool-1","custom-tool-2","custom-tool-3"]},customToolbarFloatingMap:{type:Object,default:()=>({}),validator:T=>typeof T=="object"&&T!==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(T,{expose:te,emit:M}){const{t:L,locale:ce}=Gl.useI18n(),z={h1:Eu,h2:Su,h3:Vu,h4:Nu,h5:Bu,h6:Mu},A=T,U=M,Ke=e.useSlots(),he=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
99
99
|
<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"/>
|
|
100
|
-
</svg>`,f=e.ref(null),Ce=e.ref(null),ve=e.ref(!1),ee=e.ref(!1),ne=e.ref(!1),pe=e.ref(""),H=e.ref({}),ye=e.ref(!1),Te=e.ref(!1),We=e.ref(""),it=e.ref(""),I=e.ref(null),we=e.ref(null),_e=e.ref(null),ke=e.ref(null),ft=e.ref(""),yt=e.ref(!1),de=e.ref({}),kt=e.ref(!1),Ze=e.ref({}),Pt=e.ref(null),st=e.ref(null),St=e.ref(!1),At=e.ref(""),Ut=e.ref(null),Ft=e.ref(""),j=e.ref(""),ce=e.ref(""),Ie=e.ref(null),Xe=e.ref(null),Ot=e.ref(null),Qe=e.ref(null),lt=e.ref(null),Bt=e.ref(!1),qt=e.ref(""),te=e.ref({}),Ae=e.ref(!1),Me=e.ref("upload"),je=e.ref(""),ct=e.ref(null),Ge=e.ref(null),tt=e.ref([]),vt=e.ref([]),De=e.ref(null),q=e.ref(!1),U=e.ref(""),le=e.ref(""),re=e.ref(""),Fe=e.ref(""),ut=e.ref(""),Vt=e.ref(""),ze=e.ref(null),bt=e.ref(null),zt=e.ref(null),el=e.ref(!1),Xt=e.ref(null),Rt=e.ref(!1),V=e.ref(!1),w=e.ref(null),S=e.ref("p"),K=e.ref(!1),Q=e.ref([]),Ye=e.ref(null),gt=e.ref(null),Ve=e.ref(null),Ne=e.ref(!1),Dt=e.ref(0),Ht=100,nt=e.ref(null),ot=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":pt.value!==null})),Tt=e.computed(()=>({})),fl=e.computed(()=>!A.fixedHeight||A.fullHeight?{}:{height:`${1.6*14*A.rows+24+2}px`,resize:"none",overflowY:"auto"}),z=e.computed(()=>!A.fixedHeight||A.fullHeight?{}:{height:`${1.6*14*A.rows+32}px`,overflowY:"auto"}),Z=e.computed(()=>A.richText&&vt.value.length>0),P=e.computed(()=>{if(!A.modelValue)return"";if(A.richText){let o=A.modelValue.replace(/<script[^>]*>[\s\S]*?<\/script>/gi,"");return o=o.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,""),o=o.replace(/<[^>]+>/g,""),o=o.replace(/ /g," "),o=o.replace(/&/g,"&"),o=o.replace(/</g,"<"),o=o.replace(/>/g,">"),o=o.replace(/"/g,'"'),o=o.replace(/'/g,"'"),o=o.replace(/\s+/g," ").trim(),o}return A.modelValue}),ue=e.computed(()=>{const o=P.value.trim();return o?o.split(/\s+/).filter(n=>n.length>0).length:0}),He=e.computed(()=>P.value.length),dt=e.computed(()=>Qe.value!==null&&Me.value==="upload"&&Ft.value&&Ft.value.startsWith("data:")),mt=e.computed(()=>A.titlePlaceholder||_("textEditor.placeholders.title")),Je=e.computed(()=>A.descriptionPlaceholder||_("textEditor.placeholders.description")),xt=e.computed(()=>A.placeholder||_("textEditor.placeholders.startTyping")),Yt=o=>Ke&&Ke[o]!==void 0,kl=o=>{for(let n=o+1;n<A.customToolbarSlots.length;n++)if(Yt(A.customToolbarSlots[n]))return!0;return!1},Zl=o=>{for(let n=o+1;n<A.customToolbarSlots.length;n++){const a=A.customToolbarSlots[n];if(Yt(a)&&Ml(a))return!0}return!1},Ml=o=>A.customToolbarFloatingMap.hasOwnProperty(o)?A.customToolbarFloatingMap[o]===!0:!0,Ul=e.computed(()=>A.customToolbarSlots.some(o=>Yt(o)&&Ml(o))),hn=e.computed(()=>Yt("title-slot")),yn=e.computed(()=>Yt("description-slot")),xn=o=>{if(!o||o.trim()==="")return"<html></html>";const n=o.trim();return n.startsWith("<html>")&&n.endsWith("</html>")?o:`<html>${o}</html>`},qn=o=>{if(!o||o.trim()==="")return"";const n=o.replace(/<!--[\s\S]*?-->/g,""),a=n.trim();return a.startsWith("<html>")&&a.endsWith("</html>")?a.slice(6,-7).trim():n},Wn=o=>{if(!o)return;const n=document.createTreeWalker(o,NodeFilter.SHOW_COMMENT,null,!1),a=[];let r=n.nextNode();for(;r;)a.push(r),r=n.nextNode();a.forEach(c=>c.remove())},to=o=>{try{const n=String(o.getDate()).padStart(2,"0"),r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o.getMonth()],c=o.getFullYear();return`${n} ${r} ${c}`}catch{return""}},En=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=_("textEditor.started_conversation");if(c&&n===c)return!0}catch{}const r=n.toLowerCase();return r.includes("started conversation")||r.includes("démarré la conversation")||r==="started conversation"||r==="a démarré la conversation"},Sn=o=>{const n=o.target.value;X("update:modelValue",n),X("change",n)},Rl=()=>{if(!ze.value)return;const o=ze.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 r=o.value;o.value="M";const c=o.scrollHeight;o.value=r,o.style.setProperty("height",`${c}px`,"important"),o.style.setProperty("overflow-y","hidden","important");return}o.offsetHeight;const a=o.scrollHeight;o.style.setProperty("height",`${a}px`,"important"),o.style.setProperty("overflow-y","hidden","important")},Xl=()=>{Rt.value=!0,Rl()},bl=()=>{Rt.value=!1,Vl()},Vl=()=>{if(!ze.value)return;const o=ze.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 a=o.scrollHeight;o.value=n,o.offsetHeight,o.style.setProperty("height",`${a}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")},$l=o=>{const a=o.target.value;Rt.value&&Rl(),X("update:title",a),X("title-change",a),zt.value="title",A.richText&&(q.value||(le.value=U.value,ut.value=re.value,Vt.value=Fe.value),De.value&&clearTimeout(De.value),q.value=!0,De.value=setTimeout(()=>{q.value=!1,Mt()},500))},Il=()=>{if(!bt.value)return;const o=bt.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 r=o.value;o.value="M";const c=o.scrollHeight;o.value=r,o.style.setProperty("height",`${c}px`,"important"),o.style.setProperty("overflow-y","hidden","important");return}o.offsetHeight;const a=o.scrollHeight;o.style.setProperty("height",`${a}px`,"important"),o.style.setProperty("overflow-y","hidden","important")},Tn=()=>{V.value=!0,Il()},An=()=>{V.value=!1,Vn()},Vn=()=>{if(!bt.value)return;const o=bt.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 a=o.scrollHeight;o.value=n,o.offsetHeight,o.style.setProperty("height",`${a}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 a=o.target.value;V.value&&Il(),X("update:description",a),X("description-change",a),zt.value="description",A.richText&&(q.value||(le.value=U.value,ut.value=re.value,Vt.value=Fe.value),De.value&&clearTimeout(De.value),q.value=!0,De.value=setTimeout(()=>{q.value=!1,Mt()},500))},be=()=>{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 a=n.cloneRange();return a.selectNodeContents(f.value),a.setEnd(n.startContainer,n.startOffset),{type:"text",start:a.toString().length,end:a.toString().length+n.toString().length}},El=o=>{if(!(!o||!f.value))try{const n=window.getSelection(),a=document.createRange();if(o.type==="element"&&o.element)if(f.value.contains(o.element)){a.setStart(o.element,o.offset),a.collapse(!0),n.removeAllRanges(),n.addRange(a);return}else{f.value.focus();return}let r=0;const c=[f.value];let d=null,u=!1,m=!1;for(;!m&&(d=c.pop());)if(d.nodeType===3){const v=r+d.length;!u&&o.start>=r&&o.start<=v&&(a.setStart(d,o.start-r),u=!0),u&&o.end>=r&&o.end<=v&&(a.setEnd(d,o.end-r),m=!0),r=v}else{let v=d.childNodes.length;for(;v--;)c.push(d.childNodes[v])}n.removeAllRanges(),n.addRange(a)}catch{f.value.focus()}},rt=()=>{if(!f.value)return;f.value.focus();const o=window.getSelection(),n=document.createRange(),a=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],m=a(u);if(m)return m}return c},r=a(f.value);if(r.nodeType===3)n.setStart(r,r.length),n.setEnd(r,r.length);else if(r.childNodes.length>0){const c=a(r);c&&c.nodeType===3?(n.setStart(c,c.length),n.setEnd(c,c.length)):(n.selectNodeContents(r),n.collapse(!1))}else n.setStart(r,0),n.setEnd(r,0);o.removeAllRanges(),o.addRange(n)},Mt=(o=!1)=>{if(!f.value)return;const n=f.value.innerHTML,a=A.title||"",r=A.description||"";if(!o&&n===U.value&&a===re.value&&r===Fe.value)return;const c={content:le.value||U.value,title:ut.value!==void 0?ut.value:re.value,description:Vt.value!==void 0?Vt.value:Fe.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(),vt.value=[]),U.value=n,re.value=a,Fe.value=r,le.value=n,ut.value=a,Vt.value=r},xe=o=>{if(!f.value)return;wt(),f.value&&Wn(f.value);let n=null;f.value&&(f.value.querySelector("p")||(n=be(),ae()));const a=o&&o.inputType&&(o.inputType==="insertText"||o.inputType==="insertCompositionText"||o.inputType==="deleteContentBackward"||o.inputType==="deleteContentForward");a&&w.value&&(w.value=null),ee.value=!0;const r=f.value.innerHTML.replace(/<!--[\s\S]*?-->/g,"").replace(/ |\u00A0/g," "),c=xn(r);X("update:modelValue",c),X("change",c),zt.value="editor",q.value||(le.value=U.value,ut.value=re.value,Vt.value=Fe.value),De.value&&clearTimeout(De.value),q.value=!0,De.value=setTimeout(()=>{q.value=!1,Mt(),Pl(),sn()},500),e.nextTick(()=>{n&&El(n),wt();const d=["bold","italic","underline"],u=window.getSelection(),m=u.rangeCount>0?u.getRangeAt(0):null,v=m&&m.collapsed;if(d.forEach(h=>{try{if(v&&w.value?.command===h){de.value[h]=w.value.state;return}if(h==="bold")if(m){const M=m.commonAncestorContainer,T=M.nodeType===3?M.parentElement:M;let E=!1;if(T&&((T.tagName==="STRONG"||T.tagName==="B"||T.closest&&T.closest("strong, b"))&&(E=!0),!E&&T.style&&parseInt(T.style.fontWeight)>=600&&(E=!0),!E))try{const oe=window.getComputedStyle(T);parseInt(oe.fontWeight)>=600&&(E=!0)}catch{}de.value[h]=E}else de.value.hasOwnProperty(h)||(de.value[h]=!1);else if(h==="italic")if(m){const M=m.commonAncestorContainer,T=M.nodeType===3?M.parentElement:M,E=T&&(T.tagName==="EM"||T.tagName==="I"||T.closest&&T.closest("em, i"));de.value[h]=!!E}else{const M=document.queryCommandState(h);de.value[h]=M}else{const M=document.queryCommandState(h);de.value[h]=M}}catch{}}),W(),at(),Cl(),Gt(),nn(),Hl("handleRichTextInput"),a&&(o.inputType==="insertText"||o.inputType==="insertCompositionText")){const h=o.data||"";h&&h.length===1&&setTimeout(()=>sn(h),0),(h===" "||h===`
|
|
101
|
-
`||/[.,;:!?]/.test(h))&&setTimeout(()=>{Pl()},100)}ee.value=!1})},wt=()=>{if(!f.value)return;const o=window.getSelection();if(!o||o.rangeCount===0)return;const n=o.getRangeAt(0),a=n.commonAncestorContainer,r=a.nodeType===3?a.parentElement:a;if(!r)return;const c=r.closest(".dss-image-wrapper");if(c){const d=c.querySelector("img");if(r!==d&&!d?.contains(r)){const u=n.startContainer.nodeType===3?n.startContainer.parentElement:n.startContainer,m=n.endContainer.nodeType===3?n.endContainer.parentElement:n.endContainer;if(c.contains(u)&&u!==d||c.contains(m)&&m!==d){const v=document.createRange();v.setStartAfter(c),v.collapse(!0),o.removeAllRanges(),o.addRange(v)}}}},ae=()=>{if(!f.value)return;const o=f.value;if(o.querySelector&&o.querySelector("p"))return;const n=new Set(["P","H1","H2","H3","H4","H5","H6","BLOCKQUOTE","UL","OL","DIV"]),a=Array.from(o.childNodes);let r=null;a.forEach(c=>{if(c.nodeType===Node.TEXT_NODE){if((c.textContent||"").trim()===""){c.parentNode===o&&o.removeChild(c);return}r||(r=document.createElement("p"),o.insertBefore(r,c)),r.appendChild(c);return}if(c.nodeType===Node.ELEMENT_NODE){const d=c,u=d.tagName;if(u==="BR"){r=null;return}if(n.has(u)){r=null;return}r||(r=document.createElement("p"),o.insertBefore(r,d)),r.appendChild(d)}})},at=()=>{if(f.value&&!el.value){el.value=!0;try{f.value.querySelectorAll(".dss-image-wrapper").forEach(r=>{r.querySelector("img")||r.remove()}),f.value.querySelectorAll(".dss-image-no-alt-icon").forEach(r=>{const c=r.parentElement;!c||!c.classList.contains("dss-image-wrapper")?r.remove():c.querySelector("img")||r.remove()}),f.value.querySelectorAll("img").forEach(r=>{let c=r.getAttribute("alt");c===null&&(c=r.alt||"");const d=r.getAttribute("src")||r.src||"";if(c){const h=d.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),M=c===d||c===h;(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("data:")||M||M)&&(c="")}r.setAttribute("alt",c),r.setAttribute("data-alt",c);const u=!c||c.trim()==="";let m=r.parentElement;const v=m&&m.classList.contains("dss-image-wrapper");if(v){const h=m.querySelector(".dss-image-no-alt-icon");h&&h.remove()}else{const h=r.nextElementSibling?.classList.contains("dss-image-no-alt-icon")?r.nextElementSibling:null;h&&h.remove()}if(u){v?m.setAttribute("contenteditable","false"):(m=document.createElement("span"),m.className="dss-image-wrapper",m.setAttribute("contenteditable","false"),r.parentNode.insertBefore(m,r),m.appendChild(r));const h=document.createElement("div");h.className="dss-image-no-alt-icon",h.setAttribute("contenteditable","false"),h.innerHTML=ge,m.appendChild(h)}else if(v&&m.children.length===1){const h=m.parentNode;h.insertBefore(r,m),h.removeChild(m)}})}finally{el.value=!1}}},Pe=o=>{Pl(),X("blur",o),zl()},Dn=()=>{if(A.disabled||!A.richText||!f.value)return;Zt(),De.value&&(clearTimeout(De.value),De.value=null),q.value&&(Mt(),q.value=!1);const o=zt.value==="title",n=zt.value==="description",a=zt.value==="editor";if(tt.value.length===0){o&&ze.value?ze.value.focus():n&&bt.value?bt.value.focus():f.value.focus(),document.execCommand("undo",!1),e.nextTick(()=>{xe()});return}const r={content:f.value.innerHTML,title:A.title||"",description:A.description||""};vt.value.push(r);const c=tt.value.pop();if(c!==void 0){ee.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",m=typeof c=="object"&&c.description||"";f.value.innerHTML=d,U.value=d,re.value=u,Fe.value=m,le.value=d,ut.value=u,Vt.value=m,e.nextTick(()=>{W(),jt(),Al(),Gt();const v=xn(d);X("update:modelValue",v),X("update:title",u),X("update:description",m),X("change",v),X("title-change",u),X("description-change",m),ee.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(ze.value){ze.value.focus();const h=u.length;ze.value.setSelectionRange&&ze.value.setSelectionRange(h,h),Rl()}}else if(n){if(bt.value){bt.value.focus();const h=m.length;bt.value.setSelectionRange(h,h)}}else if(a)rt();else if(ze.value&&document.activeElement===ze.value){const h=u.length;ze.value.setSelectionRange&&ze.value.setSelectionRange(h,h),Rl()}else if(bt.value&&document.activeElement===bt.value){const h=m.length;bt.value.setSelectionRange(h,h)}else f.value&&rt()},10)})})}},Fl=()=>{if(A.disabled||!A.richText||!f.value)return;Zt();const o=zt.value==="title",n=zt.value==="description",a=zt.value==="editor";if(vt.value.length===0){o&&ze.value?ze.value.focus():n&&bt.value?bt.value.focus():f.value.focus(),document.execCommand("redo",!1),e.nextTick(()=>{xe()});return}const r={content:f.value.innerHTML,title:A.title||"",description:A.description||""};tt.value.push(r);const c=vt.value.pop();if(c!==void 0){ee.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",m=typeof c=="object"&&c.description||"";f.value.innerHTML=d,U.value=d,re.value=u,Fe.value=m,le.value=d,ut.value=u,Vt.value=m,e.nextTick(()=>{W(),jt(),Al(),Gt();const v=xn(d);X("update:modelValue",v),X("update:title",u),X("update:description",m),X("change",v),X("title-change",u),X("description-change",m),ee.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(ze.value){ze.value.focus();const h=u.length;ze.value.setSelectionRange&&ze.value.setSelectionRange(h,h),Rl()}}else if(n){if(bt.value){bt.value.focus();const h=m.length;bt.value.setSelectionRange(h,h)}}else if(a)rt();else if(ze.value&&document.activeElement===ze.value){const h=u.length;ze.value.setSelectionRange&&ze.value.setSelectionRange(h,h),Rl()}else if(bt.value&&document.activeElement===bt.value){const h=m.length;bt.value.setSelectionRange(h,h)}else f.value&&rt()},10)})})}},Yl=()=>{if(!f.value)return;f.value.querySelectorAll('span[style*="font-weight"]').forEach(r=>{const c=r.style.fontWeight;if(c==="normal"||c==="400"){const d=document.createDocumentFragment();for(;r.firstChild;)d.appendChild(r.firstChild);r.parentNode&&r.parentNode.replaceChild(d,r)}}),f.value.querySelectorAll('span[style*="font-weight"]').forEach(r=>{if(parseInt(r.style.fontWeight)>=600){const d=document.createElement("b");for(d.style.fontWeight="600";r.firstChild;)d.appendChild(r.firstChild);r.parentNode&&r.parentNode.replaceChild(d,r)}}),f.value.querySelectorAll("b, strong").forEach(r=>{r.style.fontWeight="600"})},Cl=()=>{if(!f.value)return;f.value.querySelectorAll("i, em").forEach(n=>{n.style.fontStyle="italic"})},Nn=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const n=o.getRangeAt(0);let a=!1;if(n.collapsed){const r=n.startContainer;let c=r.nodeType===3?r.parentElement:r;for(;c&&c!==f.value;){if(c.tagName==="EM"||c.tagName==="I"){a=!0;break}if(c.style&&c.style.fontStyle==="italic"){a=!0;break}c=c.parentElement}}else{const r=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer:n.commonAncestorContainer.parentNode;if(r){const c=document.createTreeWalker(r,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!==f.value;){if(u.tagName==="EM"||u.tagName==="I"){a=!0;break}if(u.style&&u.style.fontStyle==="italic"){a=!0;break}u=u.parentElement}}else if(d.nodeType===1){const u=d;if(u.tagName==="EM"||u.tagName==="I"){a=!0;break}if(u.style&&u.style.fontStyle==="italic"){a=!0;break}}if(a)break}}}if(a)return document.execCommand("italic",!1),e.nextTick(()=>{Cl()}),!1;if(n.collapsed)document.execCommand("italic",!1),e.nextTick(()=>{Cl()});else try{const r=n.extractContents(),c=document.createElement("em");c.style.fontStyle="italic",c.appendChild(r),n.insertNode(c),n.setStartAfter(c),n.collapse(!0),o.removeAllRanges(),o.addRange(n),e.nextTick(()=>{Cl()})}catch{document.execCommand("italic",!1),e.nextTick(()=>{Cl()})}return!0},un=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const n=o.getRangeAt(0);let a=!1;if(n.collapsed){const r=n.startContainer;let c=r.nodeType===3?r.parentElement:r;for(;c&&c!==f.value;){if(c.tagName==="STRONG"||c.tagName==="B"){a=!0;break}if(c.style&&parseInt(c.style.fontWeight)>=600){a=!0;break}c=c.parentElement}}else{const r=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer:n.commonAncestorContainer.parentNode;if(r){const c=document.createTreeWalker(r,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!==f.value;){if(u.tagName==="STRONG"||u.tagName==="B"){a=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){a=!0;break}u=u.parentElement}}else if(d.nodeType===1){const u=d;if(u.tagName==="STRONG"||u.tagName==="B"){a=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){a=!0;break}}if(a)break}}}if(a)return document.execCommand("bold",!1),e.nextTick(()=>{Yl()}),!1;if(n.collapsed)document.execCommand("bold",!1),e.nextTick(()=>{const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0),d=c.startContainer;let u=d.nodeType===3?d.parentElement:d;for(;u&&u!==f.value;){if(u.tagName==="SPAN"&&u.style.fontWeight){const m=u.style.fontWeight;if(m==="normal"||m==="400"){const v=document.createElement("b");v.style.fontWeight="600";const h=document.createDocumentFragment();for(;u.firstChild;)h.appendChild(u.firstChild);v.appendChild(h),u.parentNode&&u.parentNode.replaceChild(v,u),c.setStart(v,0),c.collapse(!0),r.removeAllRanges(),r.addRange(c);break}}else if(u.tagName==="STRONG"||u.tagName==="B"){u.style.fontWeight="600";break}u=u.parentElement}if(!u||u===f.value){const m=document.createElement("b");m.style.fontWeight="600",m.innerHTML="<br>",c.insertNode(m),c.setStart(m,0),c.collapse(!0),r.removeAllRanges(),r.addRange(c)}}Yl()});else try{const r=n.extractContents(),c=document.createElement("b");c.style.fontWeight="600",c.appendChild(r),n.insertNode(c),n.setStartAfter(c),n.collapse(!0),o.removeAllRanges(),o.addRange(n),e.nextTick(()=>{Yl()})}catch{document.execCommand("bold",!1),e.nextTick(()=>{Yl()})}return!0},jl=(o,n=null)=>{if(A.disabled||!A.richText||!f.value)return;q.value?(De.value&&(clearTimeout(De.value),De.value=null),Mt(),q.value=!1):Mt(),Zt(),f.value.focus();const a=window.getSelection();let r=null;if(a&&a.rangeCount>0){const d=a.getRangeAt(0);!d.collapsed&&on(d)&&(r=be())}if(o==="createLink"&&n){const d=window.getSelection();if(d.rangeCount>0){const u=d.getRangeAt(0);if(u.collapsed)try{u.expand("word")}catch{const v=document.createTextNode(n);u.insertNode(v),u.selectNodeContents(v)}}}if(o==="bold"){const d=un();de.value.bold=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(w.value={command:"bold",state:d}),e.nextTick(()=>{r&&(El(r),e.nextTick(()=>{const m=wl("bold");de.value.bold=m})),xe(),jt(),Gt()});return}if(o==="italic"){const d=Nn();de.value.italic=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(w.value={command:"italic",state:d}),e.nextTick(()=>{r&&(El(r),e.nextTick(()=>{const m=wl("italic");de.value.italic=m})),xe(),Cl(),jt(),Gt()});return}let c=!1;try{c=document.execCommand(o,!1,n)}catch{}e.nextTick(()=>{if(r&&El(r),["bold","italic","underline"].includes(o))try{if(o==="bold")r&&e.nextTick(()=>{const u=wl("bold");de.value.bold=u});else if(o==="italic")if(r)e.nextTick(()=>{const u=wl("italic");de.value.italic=u});else{const u=document.queryCommandState(o);de.value[o]=u}else{const u=document.queryCommandState(o);de.value[o]=u}}catch{de.value.hasOwnProperty(o)?de.value[o]=!de.value[o]:de.value[o]=!0}if(o==="createLink"&&n){const u=window.getSelection();if(u.rangeCount>0){const v=u.getRangeAt(0),h=v.commonAncestorContainer.nodeType===1?v.commonAncestorContainer.closest("a"):v.commonAncestorContainer.parentElement?.closest("a");h&&(!h.getAttribute("href")||h.getAttribute("href")==="")&&h.setAttribute("href",n)}f.value.querySelectorAll("a").forEach(v=>{const h=v.getAttribute("href");(!h||h===""||h==="#")&&v.setAttribute("href",n)})}xe(),jt(),Gt()})},wl=(o,n=null)=>{if(A.disabled||!f.value)return!1;try{if(o==="formatBlock"&&n){const r=document.queryCommandValue("formatBlock");if(n==="<blockquote>"){const c=r.toLowerCase();if(c==="blockquote"||c==="<blockquote>")return!0;const d=window.getSelection();if(d.rangeCount>0){const m=d.getRangeAt(0).commonAncestorContainer;return!!(m.nodeType===1?m.tagName==="BLOCKQUOTE"?m:m.closest("blockquote"):m.parentElement?.closest("blockquote"))}}return r===n||r.toLowerCase()===n.toLowerCase()}if(["bold","italic","underline"].includes(o))try{const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0);if(o==="bold"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,v=m.nodeType===3?m.parentElement:m;if(v&&((v.tagName==="STRONG"||v.tagName==="B"||v.closest&&v.closest("strong, b"))&&(u=!0),!u&&v.style&&parseInt(v.style.fontWeight)>=600&&(u=!0),!u))try{const h=window.getComputedStyle(v);parseInt(h.fontWeight)>=600&&(u=!0)}catch{}return de.value.hasOwnProperty(o)?de.value[o]:(de.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let v=!1;if(m){const h=document.createTreeWalker(m,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let M;for(;M=h.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(M))){if(M.nodeType===3){if(!(M.textContent||"").trim())continue;v=!0;let E=M.parentElement;for(;E&&E!==f.value;){if(E.tagName==="STRONG"||E.tagName==="B"){u=!0;break}if(E.style&&parseInt(E.style.fontWeight)>=600){u=!0;break}E=E.parentElement}}else if(M.nodeType===1){const T=M;if(T.tagName==="STRONG"||T.tagName==="B"){u=!0;break}if(T.style&&parseInt(T.style.fontWeight)>=600){u=!0;break}}if(u)break}}return de.value[o]=u&&v,u&&v}}if(o==="italic"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,v=m.nodeType===3?m.parentElement:m;if(v&&((v.tagName==="EM"||v.tagName==="I"||v.closest&&v.closest("em, i"))&&(u=!0),!u&&v.style&&v.style.fontStyle==="italic"&&(u=!0),!u))try{window.getComputedStyle(v).fontStyle==="italic"&&(u=!0)}catch{}return de.value.hasOwnProperty(o)?de.value[o]:(de.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let v=!1;if(m){const h=document.createTreeWalker(m,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let M;for(;M=h.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(M))){if(M.nodeType===3){if(!(M.textContent||"").trim())continue;v=!0;let E=M.parentElement;for(;E&&E!==f.value;){if(E.tagName==="EM"||E.tagName==="I"){u=!0;break}if(E.style&&E.style.fontStyle==="italic"){u=!0;break}E=E.parentElement}}else if(M.nodeType===1){const T=M;if(T.tagName==="EM"||T.tagName==="I"){u=!0;break}if(T.style&&T.style.fontStyle==="italic"){u=!0;break}}if(u)break}}return de.value[o]=u&&v,u&&v}}const d=document.queryCommandState(o);return c.collapsed&&de.value.hasOwnProperty(o)?de.value[o]:(de.value[o]=d,d)}return de.value.hasOwnProperty(o)?de.value[o]:!1}catch{return de.value.hasOwnProperty(o)?de.value[o]:!1}try{return document.queryCommandState(o)}catch{return!1}}catch{return!1}},en=o=>{A.disabled||!A.richText||(Ce.value=Ce.value===o?null:o,o==="askAi"&&(st.value=null))},Zt=()=>{Ce.value=null,ct.value=null},Nl=o=>{jl("formatBlock",o),Zt()},lo=o=>{if(!o||!f.value)return o;const n=Oe=>{let Se=Oe.nodeType===Node.TEXT_NODE?Oe.parentElement:Oe;for(;Se&&Se!==f.value;){const Ct=Se.tagName;if(Ct==="P"){const yl=Se.parentElement;if(yl===f.value||yl.tagName==="BLOCKQUOTE")return Se}if(Ct==="BLOCKQUOTE")break;Se=Se.parentElement}return null},a=n(o.startContainer),r=n(o.endContainer);if(!a||!r)return o;const c=[],d=document.createTreeWalker(f.value,NodeFilter.SHOW_ELEMENT,{acceptNode:Oe=>{const Se=Oe.tagName;if(Se==="P"){const Ct=Oe.parentElement;if(Ct===f.value||Ct.tagName==="BLOCKQUOTE")return NodeFilter.FILTER_ACCEPT}return Se==="BLOCKQUOTE"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}});let u;for(;u=d.nextNode();)c.push(u);const m=c.indexOf(a),v=c.indexOf(r);if(m===-1||v===-1)return o;const h=Math.min(m,v),M=Math.max(m,v),T=c.slice(h,M+1);if(T.length===0)return o;const E=T[0],oe=T[T.length-1],Y=document.createRange();return Y.setStartBefore(E),Y.setEndAfter(oe),Y},Zn=()=>{if(A.disabled||!A.richText||!f.value)return;q.value?(De.value&&(clearTimeout(De.value),De.value=null),Mt(),q.value=!1):Mt(),Zt(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;let n=o.getRangeAt(0);!n.collapsed&&on(n)&&(n=lo(n),o.removeAllRanges(),o.addRange(n));let a=null;!n.collapsed&&on(n)&&(a=be());const r=n.commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");if(!!(c&&f.value.contains(c))){if(c){const u=c.parentNode;Array.from(c.childNodes).forEach(v=>{if(v.nodeType===Node.ELEMENT_NODE)if(v.tagName==="P"||v.tagName==="DIV")u.insertBefore(v,c);else{const h=document.createElement("p");h.appendChild(v.cloneNode(!0)),u.insertBefore(h,c)}else if(v.nodeType===Node.TEXT_NODE&&v.textContent.trim()){const h=document.createElement("p");h.appendChild(v.cloneNode(!0)),u.insertBefore(h,c)}}),c.remove()}}else if(n.collapsed)document.execCommand("formatBlock",!1,"<blockquote>");else{const u=document.createElement("blockquote"),m=n.extractContents();u.appendChild(m),n.insertNode(u);const v=[],h=document.createTreeWalker(u,NodeFilter.SHOW_TEXT,{acceptNode:E=>E.parentNode===u&&E.textContent.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let M;for(;M=h.nextNode();)v.push(M);if(v.forEach(E=>{const oe=document.createElement("p");E.parentNode.insertBefore(oe,E),oe.appendChild(E)}),u.querySelectorAll("p, div").forEach(E=>{E.textContent.trim()===""&&!E.querySelector("img")&&(E.innerHTML="<br>")}),u.children.length===0&&u.textContent.trim()===""){const E=document.createElement("p");E.innerHTML="<br>",u.appendChild(E)}}e.nextTick(()=>{a&&El(a),Al(),xe(),Gt()})},tn=()=>{if(!f.value)return;const o=window.getSelection();if(o.rangeCount===0)return;const a=o.getRangeAt(0).commonAncestorContainer,r=a.nodeType===1?a.tagName==="BLOCKQUOTE"?a:a.closest("blockquote"):a.parentElement?.closest("blockquote");if(!r||!f.value.contains(r))return;const c=M=>{if(!M)return!1;const T=M.textContent||"",oe=(M.innerHTML||"").trim();return T.trim()===""||oe===""||oe==="<br>"||oe==="<br/>"||oe==="<p></p>"||oe==="<p><br></p>"||oe==="<p><br/></p>"||oe==="<p> </p>"||oe==="<p><br> </p>"||oe==="<div></div>"||oe==="<div><br></div>"||oe==="<div><br/></div>"};let d=null;for(a.nodeType===3?d=a.parentElement:a.tagName==="P"||a.tagName==="DIV"?d=a:d=a.closest("p, div"),d&&r.contains(d)&&c(d)&&d.remove();r.lastChild;){const M=r.lastChild;if(M.nodeType===1&&M.tagName==="BR")M.remove();else if(M.nodeType===3)if((M.textContent||"").trim()==="")M.remove();else break;else break}if(r.children.length>0)for(let M=r.children.length-1;M>=0;M--){const T=r.children[M];if((T.tagName==="P"||T.tagName==="DIV")&&c(T))T.remove();else break}let u=r.innerHTML;const m=u;u=u.replace(/(<br\s*\/?>)+$/gi,""),u!==m&&(r.innerHTML=u);const v=document.createElement("p");v.innerHTML="<br>",r.parentNode?r.nextSibling?r.parentNode.insertBefore(v,r.nextSibling):r.parentNode.appendChild(v):f.value&&f.value.appendChild(v);const h=document.createRange();h.selectNodeContents(v),h.collapse(!0),o.removeAllRanges(),o.addRange(h),e.nextTick(()=>{Al(),xe()})},jt=()=>{if(!f.value){ve.value=!1;return}try{const o=window.getSelection();if(o.rangeCount>0){const a=o.getRangeAt(0).commonAncestorContainer,r=a.nodeType===1?a.closest("a"):a.parentElement?.closest("a");ve.value=!!r}else ve.value=!1}catch{ve.value=!1}},Hn=()=>{if(!f.value)return;const o=window.getSelection();o&&o.rangeCount>0&&o.getRangeAt(0),ke.value=be();const n=window.getSelection();let a="";n.rangeCount>0&&(a=n.getRangeAt(0).toString()),We.value="",it.value=a,ft.value="",_e.value=null,Te.value=!0,Zt(),e.nextTick(()=>{I.value&&I.value.focus()})},Rn=()=>{if(!f.value)return;q.value?(De.value&&(clearTimeout(De.value),De.value=null),Mt(),q.value=!1):Mt();const o=window.getSelection();let n=null;if(o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer;n=r.nodeType===1?r.closest("a"):r.parentElement?.closest("a")}if(!n&&_e.value&&(n=_e.value),n&&n.parentNode){const a=document.createDocumentFragment();for(;n.firstChild;)a.appendChild(n.firstChild);if(n.parentNode.replaceChild(a,n),a.firstChild){const r=document.createRange();r.setStartBefore(a.firstChild),r.setEndAfter(a.lastChild||a.firstChild),o.removeAllRanges(),o.addRange(r),document.execCommand("removeFormat",!1),r.collapse(!1),o.removeAllRanges(),o.addRange(r)}_e.value=null}else jl("unlink");ve.value=!1,Zt(),e.nextTick(()=>{xe(),jt()})},k=()=>{A.disabled||!A.richText||f.value&&(q.value?(De.value&&(clearTimeout(De.value),De.value=null),Mt(),q.value=!1):Mt(),Zt(),f.value.focus(),document.execCommand("insertUnorderedList",!1),e.nextTick(()=>{W(),xe(),Gt()}))},y=()=>{A.disabled||!A.richText||f.value&&(q.value?(De.value&&(clearTimeout(De.value),De.value=null),Mt(),q.value=!1):Mt(),Zt(),f.value.focus(),document.execCommand("insertOrderedList",!1),e.nextTick(()=>{W(),xe(),Gt()}))},x=o=>{const n=o.parentElement;if(!n||n.tagName!=="OL")return null;let a=0,r=o.previousElementSibling;for(;r;)r.tagName==="LI"&&a++,r=r.previousElementSibling;return a+1},W=()=>{if(!f.value)return;f.value.querySelectorAll("li > ol").forEach(n=>{const a=n.parentElement;if(a&&a.tagName==="LI"){const r=x(a);r!==null&&Array.from(n.children).filter(d=>d.tagName==="LI").forEach(d=>{d.setAttribute("data-parent-num",String(r))})}})},fe=()=>{if(A.disabled||!A.richText||!f.value)return;Zt(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const n=o.getRangeAt(0),a=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer.closest("li"):n.commonAncestorContainer.parentElement?.closest("li");if(!a){document.execCommand("indent",!1),e.nextTick(()=>{W(),xe()});return}const r=a.parentElement;if(!r||r.tagName!=="OL"&&r.tagName!=="UL")return;const c=a.previousElementSibling;if(c&&c.tagName==="LI"){const d=r.tagName.toLowerCase();let u=c.querySelector(`:scope > ${d}`);u||(u=document.createElement(d),c.appendChild(u));const m=x(c);u.appendChild(a),m!==null&&r.tagName==="OL"&&a.setAttribute("data-parent-num",String(m)),W();const v=document.createRange();v.selectNodeContents(a),v.collapse(!1),o.removeAllRanges(),o.addRange(v),e.nextTick(()=>{xe(),Gt()})}else document.execCommand("indent",!1),e.nextTick(()=>{W(),xe(),Gt()})},_t=()=>{if(A.disabled||!A.richText||!f.value)return;Zt(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const n=o.getRangeAt(0),a=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer.closest("li"):n.commonAncestorContainer.parentElement?.closest("li");if(!a){document.execCommand("outdent",!1),e.nextTick(()=>{W(),xe()});return}const r=a.parentElement;if(!r||r.tagName!=="OL"&&r.tagName!=="UL")return;const c=r.parentElement;if(c&&c.tagName==="LI"){const d=c.parentElement;if(d&&(d.tagName==="OL"||d.tagName==="UL")){r.tagName==="OL"&&a.removeAttribute("data-parent-num"),d.insertBefore(a,c.nextSibling),r.children.length===0&&r.remove(),W();const u=document.createRange();u.selectNodeContents(a),u.collapse(!1),o.removeAllRanges(),o.addRange(u),e.nextTick(()=>{xe(),Gt()});return}}document.execCommand("outdent",!1),e.nextTick(()=>{W(),xe(),Gt()})},pt=e.ref(null),tl=e.ref(null),nl=e.ref({}),rl=e.ref(""),ol=e.ref(null),Kl=e.ref("");e.ref("");const dn=e.ref(null);e.ref("");const _l=e.ref([]),no=e.ref(!1),In=e.ref(!1),To=o=>{if(!o)return"";const n=o.cloneRange(),a=document.createElement("div");return a.appendChild(n.cloneContents()),a.innerHTML},po=()=>{if(A.disabled||!A.richText||!f.value)return;if(pt.value!==null){pt.value=null,rl.value="",Kl.value="",dn.value=null,_l.value=[],wn(!0);return}Zt(),f.value.focus();const o=window.getSelection();if(!o||o.rangeCount===0)return;const n=o.getRangeAt(0);if(n.collapsed||!on(n))return;Kl.value=To(n)||"",dn.value=be();const a=n.getBoundingClientRect(),r=f.value.parentElement;if(!r)return;const c=r.getBoundingClientRect(),d=a.bottom-c.top,m=Math.max(d+8,0);nl.value={top:`${m}px`,bottom:"auto"},pt.value=Date.now(),e.nextTick(()=>{if(rl.value="",ol.value){const h=ol.value;h.style.height="auto",h.style.height=`${h.scrollHeight}px`,h.focus()}const v=r.querySelector(".dss-comment-overlay");if(v&&r){const h=r.querySelector(".dss-text-editor-footer");if(h){const M=r.getBoundingClientRect(),T=v.getBoundingClientRect(),E=h.getBoundingClientRect(),oe=T.bottom-M.top,Y=E.top-M.top,Oe=8;if(oe>Y-Oe){const Se=E.height;nl.value={bottom:`${Se+Oe}px`,top:"auto"}}else nl.value={top:`${m}px`,bottom:"auto"}}}})},oo=()=>{if(!rl.value.trim())return;const o=rl.value.trim(),n=new Date,a={text:o,selectionText:Kl.value,selectionRange:dn.value,commentId:pt.value,user:A.commentUser||null,createdAt:n.toISOString()};_l.value=[..._l.value,a],X("comment-submitted",a),so(a),dn.value&&!fo(dn.value)&&Ao(pt.value,dn.value),rl.value="",e.nextTick(()=>{if(ol.value){const r=ol.value;r.style.height="auto",r.style.height=`${r.scrollHeight}px`,r.focus()}Hl("sendComment")})},ao=(o,n)=>{if(!(!A.commentUser||!o.user||o.user.id!==A.commentUser.id)){if(_l.value=_l.value.filter((a,r)=>r!==n),pt.value!==null&&f.value){const a=String(pt.value),r=f.value.querySelector(`[data-comment="${a}"], [data-fake-comment="${a}"]`);if(r&&_l.value.length>0){const c=[],d=new Set;_l.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?r.setAttribute("data-comment-user",JSON.stringify(c[0])):r.removeAttribute("data-comment-user"),c.length>1?r.setAttribute("data-comment-user-2",JSON.stringify(c[1])):r.removeAttribute("data-comment-user-2"),r.setAttribute("data-comment-count",String(_l.value.length))}else r&&_l.value.length===0&&(r.removeAttribute("data-comment-user"),r.removeAttribute("data-comment-user-2"),r.setAttribute("data-comment-count","0"))}if(X("comment-deleted",{comment:o,index:n,commentId:pt.value}),A.comments&&Array.isArray(A.comments)){const a=A.comments.filter(r=>!(r.commentId===o.commentId&&r.text===o.text&&r.user?.id===o.user?.id));X("update:comments",a)}e.nextTick(()=>{Hl("deleteComment")})}},fo=o=>{if(!o||!f.value)return!1;try{const n=vo(o);if(!n)return!1;const a=n.commonAncestorContainer,r=a.nodeType===3?a.parentElement:a;if(r)return!!r.closest("[data-comment], [data-fake-comment]")}catch{}return!1},vo=o=>{if(!o||!f.value)return null;try{const n=document.createRange();if(o.type==="element"&&o.element)return f.value.contains(o.element)?(n.setStart(o.element,o.offset),n.collapse(!0),n):null;let a=0;const r=[f.value];let c=null,d=!1,u=!1;for(;!u&&(c=r.pop());)if(c.nodeType===3){const m=a+c.length;!d&&o.start>=a&&o.start<=m&&(n.setStart(c,o.start-a),d=!0),d&&o.end>=a&&o.end<=m&&(n.setEnd(c,o.end-a),u=!0),a=m}else{let m=c.childNodes.length;for(;m--;)r.push(c.childNodes[m])}return d?n:null}catch{return null}},Ao=(o,n)=>{if(!(!o||!n||!f.value))try{const a=vo(n);if(!a||a.collapsed)return;const r=a.commonAncestorContainer,c=r.nodeType===3?r.parentElement:r;if(c){const m=c.closest("[data-comment], [data-fake-comment]");if(m){m.getAttribute("data-comment")!==String(o)&&m.getAttribute("data-fake-comment")!==String(o)&&m.setAttribute("data-comment",String(o));return}}const d=document.createElement("span");d.setAttribute("data-comment",String(o));try{const m=a.startContainer,v=a.endContainer,h=a.startOffset,M=a.endOffset,T=m.nodeType===3?m.parentNode:m,E=v.nodeType===3?v.parentNode:v;if(T===E&&h===0&&M===(v.nodeType===3?v.length:E.childNodes.length)&&(T.tagName==="P"||T.tagName==="DIV"||T.tagName==="H1"||T.tagName==="H2"||T.tagName==="H3"||T.tagName==="H4"||T.tagName==="H5"||T.tagName==="H6")){const Y=a.extractContents();d.appendChild(Y),a.insertNode(d)}else a.surroundContents(d)}catch{const v=a.extractContents();d.appendChild(v),a.insertNode(d)}const u=f.value.querySelector(`[data-comment="${String(o)}"]`);e.nextTick(()=>{Hl("wrapSelectionWithCommentMarker"),xe()})}catch{}},so=o=>{if(!o||!o.commentId)return;const n=Array.isArray(A.comments)?[...A.comments]:[],a=typeof o.commentId=="string"&&o.commentId.startsWith("comment-")?Date.now():Number(o.commentId)||o.commentId;let r=n.findIndex(d=>typeof d.conversation_id=="string"&&d.conversation_id.startsWith("comment-")?null:Number(d.conversation_id)===Number(a)||d.conversation_id===a);const c={text:o.text,user:o.user,createdAt:o.createdAt,created_at:o.createdAt,updated_at:o.createdAt};if(r>=0){const d=n[r];if(d.conversation||(d.conversation=[]),d.conversation.push(c),d.updated_at=o.createdAt,!d.article_id&&n.length>0){const u=n.find(m=>m.article_id);u&&(d.article_id=u.article_id)}}else{const d=o.selectionRange,u=n.length>0&&n.find(v=>v.article_id)?.article_id||null,m={conversation_id:a,article_id:u,selection_range:d?{start:d.start||0,end:d.end||0,type:d.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(m)}no.value=!0,X("update:comments",n)},Do=(o,n=[])=>{if(A.disabled||!A.richText||!f.value)return;const a=f.value;let r=null;try{r=a.querySelector(o)}catch{return}if(!r)return;Zt(),a.focus();const c=document.createRange();c.selectNodeContents(r);const d=window.getSelection();d&&(d.removeAllRanges(),d.addRange(c)),Kl.value=r.innerHTML||"",dn.value=be();const u=c.getBoundingClientRect(),m=a.parentElement;if(m){const M=m.getBoundingClientRect(),T=u.bottom-M.top,oe=Math.max(T+8,0);nl.value={top:`${oe}px`,bottom:"auto"}}const v=r.getAttribute("data-comment")||r.getAttribute("data-fake-comment");let h=[];if(v&&A.comments&&Array.isArray(A.comments)){const M=A.comments.find(T=>String(T.conversation_id)===String(v));if(M&&M.conversation&&Array.isArray(M.conversation)){const T=M.conversation.map(E=>({id:E.id||E.commentary_id,commentary_id:E.id||E.commentary_id,conversation_id:M.id||M.conversation_id,text:E.text,user:E.user,createdAt:E.created_at||E.createdAt,updated_at:E.updated_at||E.updatedAt}));h.push(...T)}}h.length===0&&Array.isArray(n)&&n.length>0&&(h=n.slice()),h.sort((M,T)=>{const E=Oe=>{if(!Oe)return 0;const Se=new Date(Oe).getTime();return isNaN(Se)?0:Se},oe=E(M.createdAt),Y=E(T.createdAt);return oe===Y?0:oe-Y}),_l.value=h,wn(!0),pt.value=v||null,r&&(tl.value=r,r.classList.add("editor-comment-highlighted")),e.nextTick(()=>{if(rl.value="",ol.value){const M=ol.value;M.style.height="auto",M.style.height=`${M.scrollHeight}px`,M.focus()}if(m){const M=m.querySelector(".dss-comment-overlay");if(M){const T=m.querySelector(".dss-text-editor-footer");if(T){const E=m.getBoundingClientRect(),oe=M.getBoundingClientRect(),Y=T.getBoundingClientRect(),Oe=oe.bottom-E.top,Se=Y.top-E.top,Ct=8;if(Oe>Se-Ct){const yl=Y.height;nl.value={bottom:`${yl+Ct}px`,top:"auto"}}}}}Hl("openCommentOverlayForSelector")})},Fn=e.ref(null),Sl=e.ref(0),O=o=>{if(!(A.disabled||!A.richText)){if(o.key==="Escape"){const n=window.getSelection();if(n.rangeCount>0){const r=n.getRangeAt(0).commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");if(!!(c&&f.value&&f.value.contains(c))){o.preventDefault();let u=null;r.nodeType===3?u=r.parentElement:r.tagName==="P"||r.tagName==="DIV"?u=r:u=r.closest("p, div");const m=document.createElement("p");m.innerHTML="<br>",u&&c.contains(u)&&u.nextSibling?c.insertBefore(m,u.nextSibling):c.appendChild(m),setTimeout(()=>{tn()},50);return}}}if(o.key.length===1||o.key==="Enter"){const n=window.getSelection();if(n&&n.rangeCount>0){const a=n.getRangeAt(0),r=a.commonAncestorContainer,c=r.nodeType===3?r.parentElement:r;if(c){const d=c.closest(".dss-image-wrapper");if(d){const u=d.querySelector("img");if(c!==u&&!u?.contains(c)){const m=a.startContainer.nodeType===3?a.startContainer.parentElement:a.startContainer,v=a.endContainer.nodeType===3?a.endContainer.parentElement:a.endContainer;if(d.contains(m)&&m!==u||d.contains(v)&&v!==u){o.preventDefault();const h=document.createRange();h.setStartAfter(d),h.collapse(!0),n.removeAllRanges(),n.addRange(h);return}}}}}}if(o.key==="Backspace"||o.key==="Delete"){const n=window.getSelection();if(n.rangeCount>0){const a=n.getRangeAt(0);let r=null,c=null;if(a.collapsed)if(o.key==="Backspace"){const d=a.startContainer;let u=d;d.nodeType===3&&(a.startOffset===0?u=d.previousSibling||d.parentNode:u=d.parentNode);const m=u.previousSibling;m&&(m.classList&&m.classList.contains("dss-image-wrapper")?c=m:m.tagName==="IMG"&&(r=m,c=r.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(r=c.querySelector("img")))}else{const d=a.startContainer;let u=d;d.nodeType===3&&(a.startOffset===d.length?u=d.nextSibling||d.parentNode:u=d.parentNode);const m=u.nextSibling;m&&(m.classList&&m.classList.contains("dss-image-wrapper")?c=m:m.tagName==="IMG"&&(r=m,c=r.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(r=c.querySelector("img")))}else{const d=a.commonAncestorContainer,u=a.startContainer.nodeType===3?a.startContainer.parentElement:a.startContainer,m=a.endContainer.nodeType===3?a.endContainer.parentElement:a.endContainer;if(d.nodeType===1&&d.tagName==="IMG"?(r=d,c=r.closest(".dss-image-wrapper")):(r=d.querySelector("img"),r&&(c=r.closest(".dss-image-wrapper"))),c){const v=c.contains(u)||u===c,h=c.contains(m)||m===c,T=a.cloneContents().textContent?.trim()||"",E=c.textContent?.trim()||"";(!v||!h||T.length>E.length)&&(c=null,r=null)}}if(c){o.preventDefault(),o.stopPropagation();const d=c.parentNode;if(d){const u=document.createTextNode("");d.insertBefore(u,c),c.remove();const m=document.createRange();m.setStartAfter(u),m.collapse(!0),n.removeAllRanges(),n.addRange(m),e.nextTick(()=>{xe()});return}}}}if(o.key==="Tab"){o.preventDefault(),o.shiftKey?_t():fe();return}if(o.key==="Enter"){const n=window.getSelection();if(n.rangeCount>0){const a=n.getRangeAt(0);if(a.collapsed){const u=a.startContainer,m=v=>{if(!v)return!1;let h=v.previousSibling;for(;h;){if(h.classList&&h.classList.contains("dss-image-wrapper")||h.tagName==="IMG"||h.querySelector&&h.querySelector(".dss-image-wrapper")||h.querySelector&&h.querySelector("img"))return!0;h=h.previousSibling}const M=v.parentElement;return M&&M!==f.value?m(M):!1};if(u.nodeType===3){const v=u.parentElement;if(v&&(m(v)||m(u))){const h=v.closest("p, div");if(h&&h!==f.value){o.preventDefault(),o.stopPropagation();let M=null;const T=a.startOffset;T<u.length&&(M=u.splitText(T));const E=document.createElement("p");if(M?E.appendChild(M):E.innerHTML="<br>",u.length===0){const Y=u.parentElement;Y&&(Y.removeChild(u),Y.childNodes.length===0&&Y.appendChild(document.createElement("br")))}h.nextSibling?h.parentNode.insertBefore(E,h.nextSibling):h.parentNode.appendChild(E);const oe=document.createRange();M?oe.setStart(M,0):oe.setStart(E,0),oe.collapse(!0),n.removeAllRanges(),n.addRange(oe),e.nextTick(()=>{xe()});return}}}}const r=a.commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");if(!!(c&&f.value&&f.value.contains(c))){let u=null;r.nodeType===3?u=r.parentElement:r.tagName==="P"||r.tagName==="DIV"?u=r:u=r.closest("p, div");const m=Y=>{if(!Y)return!1;const Oe=Y.textContent||"",Ct=(Y.innerHTML||"").trim(),yl=Ct.replace(/<br\s*\/?>/gi,"").trim();return Oe.trim()===""||Ct===""||yl===""||Ct==="<br>"||Ct==="<br/>"||Ct==="<p></p>"||Ct==="<p><br></p>"||Ct==="<p><br/></p>"||Ct==="<p> </p>"||Ct==="<p><br> </p>"||Ct==="<div></div>"||Ct==="<div><br></div>"||Ct==="<div><br/></div>"},v=c.lastChild,h=v&&v.nodeType===1&&v.tagName==="BR",M=a.startContainer,T=M.nodeType===3?M.parentElement:M,E=T===c||T&&T.parentElement===c;if(u&&m(u)||h&&E){o.preventDefault(),setTimeout(()=>{tn()},50);return}}}}if(o.key===" "){const n=Date.now(),a=n-Sl.value;if(Fn.value===" "&&a<300){const r=window.getSelection();if(r.rangeCount>0){const c=r.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){o.preventDefault(),fe();return}}}}Fn.value=" ",Sl.value=n}else Fn.value=o.key}},xl=o=>{if(A.disabled||!A.richText)return;o.preventDefault();let n=o.clipboardData.getData("text/html"),a=o.clipboardData.getData("text/plain");n&&(n=n.replace(/<!--[\s\S]*?-->/g,"")),a&&(a=a.replace(/<!--[\s\S]*?-->/g,"")),Mt();const r=window.getSelection();let c=null;if(r&&r.rangeCount>0){let m=r.getRangeAt(0).commonAncestorContainer;m.nodeType===3&&(m=m.parentNode),c=m.closest("p, h1, h2, h3, h4, h5, h6, li, blockquote")}const d=u=>{const v=new DOMParser().parseFromString(u,"text/html");let h=f.value.querySelector("h1")?1:0;if(v.querySelectorAll("h1").forEach(T=>{if(h>0){const E=v.createElement("p");E.innerHTML=T.innerHTML,T.parentNode.replaceChild(E,T)}else h++}),c){const T=["P","H1","H2","H3","H4","H5","H6","DIV","BLOCKQUOTE","UL","OL","LI"],E=Array.from(v.body.children).filter(oe=>T.includes(oe.tagName));if(E.length===1){const oe=E[0].tagName,Y=c.tagName,Oe=c.textContent.trim()===""&&!c.querySelector("img");let Se=!1;if(["H1","H2","H3","H4","H5","H6"].includes(Y)?Se=!0:Oe||(oe===Y||oe==="P")&&(Se=!0),Se)return E[0].innerHTML.trim()}}return v.body.innerHTML.trim()};if(n){const u=d(n);document.execCommand("insertHTML",!1,u)}else if(a)if(/<[a-z][\s\S]*>/i.test(a)){const m=d(a);document.execCommand("insertHTML",!1,m)}else document.execCommand("insertText",!1,a);xe()},Ll=o=>{if(Ce.value){const a=o.target;!a.closest(".dss-toolbar-dropdown")&&!a.closest(".dss-toolbar-dropdown-toggle")&&Zt()}if(kt.value){const a=o.target,r=a.closest(".dss-floating-toolbar"),c=f.value&&a.closest(".dss-text-editor-content");!r&&!c&&zl()}if(st.value){const a=o.target,r=a.closest(".dss-floating-toolbar"),c=a.closest(".dss-toolbar-dropdown");!r&&!c&&ho()}const n=o.target;if(!n.closest(".dss-toolbar-dropdown")&&!n.closest(".dss-toolbar-dropdown-submenu")&&(ct.value=null),!f.value||!n.closest(".dss-text-editor-content")){const a=window.getSelection();if(a&&a.rangeCount>0){const r=a.getRangeAt(0);K.value=!r.collapsed&&on(r)}else K.value=!1}if(pt.value!==null){const a=document.querySelector(".dss-comment-overlay");let r=!1;if(a){const u=a.getBoundingClientRect(),m=o.clientX,v=o.clientY;r=m>=u.left&&m<=u.right&&v>=u.top&&v<=u.bottom}const c=n.closest(".dss-toolbar-button"),d=c&&c.getAttribute("title")==="Comment";!r&&!d&&(pt.value=null,rl.value="",Kl.value="",dn.value=null,_l.value=[],wn(!0))}},Bn=(o,n)=>{o&&o.stopPropagation&&o.stopPropagation(),Ge.value&&(clearTimeout(Ge.value),Ge.value=null),ct.value=n},vl=o=>{const n=o.relatedTarget;if(n){const a=n.closest(".dss-toolbar-dropdown-submenu"),r=n.closest(".dss-toolbar-dropdown-item-has-submenu");if(a||r)return}Ge.value&&clearTimeout(Ge.value),Ge.value=setTimeout(()=>{ct.value=null,Ge.value=null},150)},Gl=o=>{ct.value=null};let al=0;const gl=o=>{if(!o)return;const n=Array.from(o.children);n.forEach(a=>{a.classList.contains("dss-toolbar-dropdown-submenu")||a.classList.contains("dss-toolbar-dropdown-item-has-submenu")||(a.tagName==="BUTTON"||a.tagName==="DIV")&&!a.classList.contains("dss-toolbar-dropdown-item")&&a.classList.add("dss-toolbar-dropdown-item")}),n.forEach((a,r)=>{if(a.classList.contains("dss-toolbar-dropdown-item-has-submenu")||a.classList.contains("dss-toolbar-dropdown-submenu")||!a.classList.contains("dss-toolbar-dropdown-item"))return;const c=Array.from(a.children).find(m=>m.tagName==="DIV"?m.classList.contains("dss-toolbar-dropdown-item")?!1:Array.from(m.children).filter(h=>h.tagName==="BUTTON"||h.tagName==="DIV").length>0:!1),d=a.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(m=>m.tagName==="BUTTON"||m.tagName==="DIV");if(c||u){const m=`submenu-auto-${++al}`;a.classList.add("dss-toolbar-dropdown-item-has-submenu"),a.setAttribute("data-submenu-id",m);let v=null;c?(a.tagName==="BUTTON"&&a.parentNode.insertBefore(c,a.nextSibling),c.classList.add("dss-toolbar-dropdown-submenu"),v=c):u&&(d.classList.add("dss-toolbar-dropdown-submenu"),v=d),v&&(v.setAttribute("data-submenu-id",m),v.setAttribute("data-processed","true"),c&&a.tagName!=="BUTTON"?v.dataset.originalParentRef="inside":v.dataset.originalParentRef="sibling",Array.from(v.children).forEach(M=>{(M.tagName==="BUTTON"||M.tagName==="DIV")&&!M.classList.contains("dss-toolbar-dropdown-item")&&M.classList.add("dss-toolbar-dropdown-item")}))}})},ln=()=>{document.querySelectorAll(".dss-toolbar-dropdown").forEach(n=>{gl(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=v=>{const h=c.getAttribute("data-submenu-id");h&&Bn(v,h)},m=vl;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",m),c._subMenuHandlers={enter:u,leave:m}}),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=h=>{const M=c.getAttribute("data-submenu-id");M&&Bn(h,M)},m=vl;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",m),c._subMenuHandlers={enter:u,leave:m},c.querySelectorAll(".dss-toolbar-dropdown-item").forEach(h=>{h.addEventListener("click",Gl)})})})};let Tl=null;const Lt=()=>{if(ct.value){const o=document.querySelector(`.dss-toolbar-dropdown-submenu[data-submenu-id="${ct.value}"]`),n=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${ct.value}"]`);o&&n&&Yn(o,n)}if(kt.value&&Gt(),A.richText){if(Tl!==null)return;Tl=setTimeout(()=>{Tl=null,Hl("handleWindowResize")},150)}},$t=()=>{if(!A.richText)return;document.querySelectorAll(".dss-toolbar-custom-group").forEach(n=>{Array.from(n.children).filter(r=>r.tagName==="DIV"&&!r.classList.contains("dss-toolbar-button")).forEach(r=>{r.classList.add("dss-toolbar-button")})})},Et=()=>{const o=document.querySelectorAll(".dss-text-editor-footer, .dss-text-editor-footer-content, .dss-text-editor-footer-stat, .dss-text-editor-footer-separator"),n=a=>{if(a.preventDefault(),a.stopPropagation(),window.getSelection){const r=window.getSelection();r.removeAllRanges?r.removeAllRanges():r.empty&&r.empty()}return!1};o.forEach(a=>{a.addEventListener("selectstart",n),a.addEventListener("mousedown",n),a.addEventListener("dragstart",n),a.addEventListener("contextmenu",n),a.addEventListener("click",r=>{if(window.getSelection){const c=window.getSelection();c.removeAllRanges&&c.removeAllRanges()}})})};e.onMounted(()=>{if(e.nextTick(()=>{requestAnimationFrame(()=>{Rt.value?Rl():Vl(),V.value?Il():Vn()})}),e.nextTick(()=>{Et()}),A.richText&&f.value){try{document.execCommand("defaultParagraphSeparator",!1,"p")}catch{}document.addEventListener("click",Ll),window.addEventListener("resize",Lt);let o=null;const n=()=>{o===null&&(o=setTimeout(()=>{o=null,Lt()},150))};window.addEventListener("scroll",n,!0),f.value._windowScrollHandler=n,f.value._windowScrollTimeout=o,f.value.closest(".editor-with-comments"),f.value.closest(".dss-text-editor-content-wrapper");const a=f.value.closest(".dss-text-editor-content");let r=null;const c=()=>{r===null&&(r=setTimeout(()=>{r=null,Lt()},150))};a&&(a.addEventListener("scroll",c),f.value._scrollHandlers={wrapper:null,content:a,handler:c}),e.nextTick(()=>{ln(),$t()}),f.value.addEventListener("click",m=>{const v=m.target;v.closest("a")&&!A.disabled&&m.preventDefault();const M=v.closest(".dss-image-no-alt-icon"),T=v.closest(".dss-image-wrapper");if(M||T&&v===T){m.preventDefault(),m.stopPropagation();const E=window.getSelection(),oe=document.createRange();oe.setStartAfter(T),oe.collapse(!0),E.removeAllRanges(),E.addRange(oe)}else T&&v.tagName!=="IMG"&&(m.preventDefault(),e.nextTick(()=>{const E=window.getSelection();if(E.rangeCount>0){const Y=E.getRangeAt(0).commonAncestorContainer,Oe=Y.nodeType===3?Y.parentElement:Y;if(T.contains(Oe)&&Oe!==T.querySelector("img")){const Se=document.createRange();Se.setStartAfter(T),Se.collapse(!0),E.removeAllRanges(),E.addRange(Se)}}else{const oe=document.createRange();oe.setStartAfter(T),oe.collapse(!0),E.addRange(oe)}}))},!0),f.value.addEventListener("mousedown",m=>{const v=m.target,h=v.closest(".dss-image-no-alt-icon"),M=v.closest(".dss-image-wrapper");if(h||M&&v.tagName!=="IMG"){m.preventDefault();const T=window.getSelection(),E=document.createRange();M&&(E.setStartAfter(M),E.collapse(!0),T.removeAllRanges(),T.addRange(E))}},!0),f.value.addEventListener("paste",m=>{e.nextTick(()=>{if(!f.value)return;f.value.querySelectorAll("img").forEach(h=>{if(!h.closest(".dss-image-wrapper"))h.removeAttribute("alt"),h.removeAttribute("data-alt"),h.setAttribute("alt",""),h.setAttribute("data-alt",""),h.alt="";else{const T=h.getAttribute("alt")||h.alt||"";if(T){const E=h.getAttribute("src")||h.src||"",oe=E.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),Y=T===E||T===oe;(T.startsWith("http://")||T.startsWith("https://")||T.startsWith("data:")||Y||Y)&&(h.setAttribute("alt",""),h.setAttribute("data-alt",""),h.alt="")}}}),at()})}),f.value.addEventListener("dragstart",m=>{const v=m.target,h=v.tagName==="IMG"?v:v.closest("img"),M=h?.closest(".dss-image-wrapper");h&&f.value.contains(h)&&(Xt.value=M||h,m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/html","image-drag"))}),f.value.addEventListener("dragover",m=>{Xt.value&&(m.preventDefault(),m.stopPropagation(),m.dataTransfer.dropEffect="move")}),f.value.addEventListener("dragenter",m=>{Xt.value&&(m.preventDefault(),m.stopPropagation())}),f.value.addEventListener("drop",m=>{if(!Xt.value||!f.value)return;m.preventDefault(),m.stopPropagation();const v=Xt.value,h=v.classList?.contains("dss-image-wrapper"),M=h?v.querySelector("img"):v,T=h?v:M?.closest(".dss-image-wrapper");if(!M||!f.value.contains(M)){Xt.value=null;return}let E=null;const oe=m.clientX,Y=m.clientY;if(document.caretRangeFromPoint)E=document.caretRangeFromPoint(oe,Y);else{const ll=window.getSelection();ll.rangeCount>0?E=ll.getRangeAt(0).cloneRange():(E=document.createRange(),E.selectNodeContents(f.value),E.collapse(!1))}if(!E){Xt.value=null;return}const Oe=E.commonAncestorContainer,Se=Oe.nodeType===3?Oe.parentElement:Oe;if(Se?.closest(".dss-image-wrapper")===T||T&&T.contains(Se)){Xt.value=null;return}if(T&&(Se===T||T.contains(Se))){Xt.value=null;return}const yl=M.getAttribute("src");let cl=null;T?cl=T.cloneNode(!0):cl=M.cloneNode(!0);try{let ll=E.startContainer;if(ll.nodeType===3&&(ll=ll.parentElement),T&&(ll===T||T.contains(ll))){const Jt=document.createRange();Jt.setStartAfter(T),Jt.collapse(!0),E=Jt}E.insertNode(cl);const ul=document.createRange();ul.setStartAfter(cl),ul.collapse(!0);const dl=window.getSelection();dl.removeAllRanges(),dl.addRange(ul)}catch{if(f.value.childNodes.length===0){const ul=document.createElement("p");ul.appendChild(cl),f.value.appendChild(ul)}else{const ul=f.value.lastChild;if(ul&&ul.nodeType===1)ul.appendChild(cl);else{const dl=document.createElement("p");dl.appendChild(cl),f.value.appendChild(dl)}}}T?T.remove():M.remove(),Xt.value=null,e.nextTick(()=>{const ll=f.value.querySelectorAll("img");let ul=!1;ll.forEach(dl=>{if(dl.getAttribute("src")===yl)if(!ul)ul=!0;else{const Jt=dl.closest(".dss-image-wrapper");Jt?Jt.remove():dl.remove()}}),at(),xe()})}),f.value.addEventListener("dragend",m=>{Xt.value=null});let d=null;const u=new MutationObserver(m=>{m.forEach(v=>{v.addedNodes.forEach(h=>{if(h.nodeType===1){h.tagName==="IMG"&&(h.removeAttribute("alt"),h.removeAttribute("data-alt"),h.setAttribute("alt",""),h.setAttribute("data-alt",""),h.alt="");const M=h.querySelectorAll&&h.querySelectorAll("img");M&&M.forEach(T=>{T.removeAttribute("alt"),T.removeAttribute("data-alt"),T.setAttribute("alt",""),T.setAttribute("data-alt",""),T.alt=""})}})}),d&&clearTimeout(d),d=setTimeout(()=>{at(),$t(),d=null},100)});if(u.observe(f.value,{childList:!0,subtree:!0}),e.nextTick(()=>{const m=document.querySelector(".dss-text-editor-toolbar");if(m){const v=new MutationObserver(()=>{e.nextTick(()=>{$t()})});v.observe(m,{childList:!0,subtree:!0}),m._toolbarMutationObserver=v}}),A.modelValue){const m=qn(A.modelValue);f.value.innerHTML=m,ae()}e.nextTick(()=>{const m=f.value.innerHTML||"",v=A.title||"",h=A.description||"";U.value=m,re.value=v,Fe.value=h,ut.value=v,Vt.value=h,W(),at(),Cl(),nn(),Pn(),Xn()}),jt(),Al(),f.value._mutationObserver=u}}),e.onUnmounted(()=>{if(document.removeEventListener("click",Ll),window.removeEventListener("resize",Lt),f.value&&f.value._windowScrollHandler&&window.removeEventListener("scroll",f.value._windowScrollHandler,!0),Tl!==null&&(clearTimeout(Tl),Tl=null),f.value&&f.value._windowScrollTimeout!==null&&clearTimeout(f.value._windowScrollTimeout),De.value&&clearTimeout(De.value),Ge.value&&clearTimeout(Ge.value),f.value&&f.value._mutationObserver&&f.value._mutationObserver.disconnect(),Ye.value&&Ye.value.disconnect(),gt.value!==null&&(cancelAnimationFrame(gt.value),gt.value=null),Ve.value!==null&&(clearTimeout(Ve.value),Ve.value=null),nt.value!==null&&(clearTimeout(nt.value),nt.value=null),wn(!0),f.value&&f.value._scrollHandlers){const{wrapper:n,content:a,handler:r}=f.value._scrollHandlers;n&&n.removeEventListener("scroll",r),a&&a.removeEventListener("scroll",r)}const o=document.querySelector(".dss-text-editor-toolbar");o&&o._toolbarMutationObserver&&o._toolbarMutationObserver.disconnect()});const il=o=>{const n=o.target,a=n.closest("a");if(a&&!A.disabled){o.preventDefault();const c=document.createRange();c.selectNodeContents(a);const d=window.getSelection();d.removeAllRanges(),d.addRange(c)}const r=n.closest(".dss-image-wrapper");r&&n.tagName!=="IMG"?e.nextTick(()=>{const c=window.getSelection();if(c.rangeCount>0){const u=c.getRangeAt(0).commonAncestorContainer,m=u.nodeType===3?u.parentElement:u;if(r.contains(m)&&m!==r.querySelector("img")){const v=document.createRange();v.setStartAfter(r),v.collapse(!0),c.removeAllRanges(),c.addRange(v)}}at(),jt(),Al(),Gt(),nn()}):e.nextTick(()=>{at(),jt(),Al(),Gt(),nn()})},go=()=>{wt();const o=window.getSelection();if(o&&o.rangeCount>0){const a=o.getRangeAt(0);K.value=!a.collapsed&&on(a),!a.collapsed&&w.value&&(w.value=null)}else K.value=!1;if(at(),jt(),Al(),Gt(),nn(),o&&o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer,c=r.nodeType===3?r.parentElement:r;if(c&&c.closest(".dss-text-editor-footer")){o.removeAllRanges(),K.value=!1;return}}["bold","italic","underline"].forEach(a=>{try{const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0);if(!c.collapsed)if(a==="bold"){const d=c.commonAncestorContainer,u=d.nodeType===3?d.parentElement:d;let m=!1;if(u&&((u.tagName==="STRONG"||u.tagName==="B"||u.closest&&u.closest("strong, b"))&&(m=!0),!m&&u.style&&parseInt(u.style.fontWeight)>=600&&(m=!0),!m))try{const v=window.getComputedStyle(u);parseInt(v.fontWeight)>=600&&(m=!0)}catch{}de.value[a]=m}else{const d=document.queryCommandState(a);de.value[a]=d}}}catch{}})},nn=()=>{if(!A.richText||A.disabled||!f.value){S.value="p";return}try{const o=window.getSelection();if(!o||o.rangeCount===0){S.value="p";return}const a=o.getRangeAt(0).commonAncestorContainer,r=a.nodeType===3?a.parentElement:a;if(!r||!f.value.contains(r)){S.value="p";return}const c=r.closest("h1, h2, h3, h4, h5, h6, p");if(!c){S.value="p";return}const d=c.tagName.toLowerCase();["h1","h2","h3","h4","h5","h6","p"].includes(d)?S.value=d:S.value="p"}catch{S.value="p"}},Al=()=>{if(!f.value){yt.value=!1;return}try{const o=window.getSelection();let n=!1;if(o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");n=!!(c&&f.value.contains(c))}yt.value=n}catch{yt.value=!1}},on=o=>{if(!o||!f.value)return!1;const n=o.commonAncestorContainer;if(!n)return!1;const a=n.nodeType===3?n.parentElement:n;return a?f.value.contains(a):!1},zl=()=>{kt.value=!1},Gt=()=>{if(!A.floatingToolbar||!A.richText||A.disabled){kt.value=!1;return}const o=window.getSelection();if(!o||o.rangeCount===0){kt.value=!1;return}const n=o.getRangeAt(0);if(n.collapsed||!on(n)){kt.value=!1;return}const a=n.getBoundingClientRect();if(!a||a.width===0&&a.height===0){kt.value=!1;return}const r=f.value;if(!r){kt.value=!1;return}const c=r.getBoundingClientRect();if(!c||c.width===0){kt.value=!1;return}const d=40,u=8,m=a.top-d/2+15;let v=a.left+a.width/2;const h=window.innerWidth||document.documentElement.clientWidth||0;let M=0;Pt.value&&(M=Pt.value.getBoundingClientRect().width);const T=(M||320)/2;let E=c.left+T,oe=c.right-T;if(oe<E){const Y=c.left+c.width/2;E=Y,oe=Y}if(h>0){const Y=T+u,Oe=h-T-u;if(E=Math.max(E,Y),oe=Math.min(oe,Oe),oe<E){const Se=h/2;E=Se,oe=Se}}v<E?v=E:v>oe&&(v=oe),Ze.value={position:"fixed",top:`${Math.max(m,8)}px`,left:`${v}px`,transform:"translate(-50%, -100%)",zIndex:10003},kt.value=!0},zn=o=>{A.disabled||!A.richText||(st.value=st.value===o?null:o,o==="askAi"&&(Ce.value=null))},ho=()=>{st.value=null,ct.value=null},mn=o=>{Nl(o),ho()};let kn=null,Dl=null,pn=null,Bl=null;const Ho=o=>{if(A.disabled||!A.richText){an(),Mn();return}const n=o.target,a=n.closest("a"),r=n.closest("img");if(kn&&(clearTimeout(kn),kn=null),pn&&(clearTimeout(pn),pn=null),a&&a!==Dl){Mn(),Dl=a;let c=a.getAttribute("href")||"";(!c||c==="#"||c==="")&&(c=a.textContent||""),_e.value=a,pe.value=c,ne.value=!0,ye.value=!0,yo(a)}else!a&&Dl?(Dl=null,kn=setTimeout(()=>{ye.value||an()},150)):a&&a===Dl&&yo(a);if(r&&r!==Bl){an(),Bl=r;let c=r.getAttribute("alt");c===null&&(c=r.alt||"");let d=r.getAttribute("data-alt");d===null&&(d=c),r.hasAttribute("alt")||r.setAttribute("alt",c),r.hasAttribute("data-alt")||r.setAttribute("data-alt",d),Qe.value=r,qt.value=c.trim()||_("textEditor.image.noAlt"),Bt.value=!0,Ae.value=!0,ko(r)}else!r&&Bl?(Bl=null,pn=setTimeout(()=>{Ae.value||Mn()},150)):r&&r===Bl&&ko(r)},Ro=o=>{const n=o.relatedTarget;(!n||!n.closest(".dss-text-editor-content")&&!n.closest(".dss-link-popup"))&&(Dl=null,Bl=null,kn&&(clearTimeout(kn),kn=null),pn&&(clearTimeout(pn),pn=null),an(),Mn())},an=()=>{ye.value=!1,setTimeout(()=>{ye.value||(ne.value=!1,pe.value="",Te.value||(_e.value=null))},100)},yo=o=>{if(!o||!f.value)return;const n=o.getBoundingClientRect(),c=n.top-32-8,d=n.left+n.width/2;H.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},Mn=()=>{Ae.value=!1,setTimeout(()=>{Ae.value||(Bt.value=!1,qt.value="",St.value||(Qe.value=null))},100)},ko=o=>{if(!o||!f.value)return;const n=o.getBoundingClientRect(),c=n.top-32-8,d=n.left+n.width/2;te.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},Co=()=>{if(!pe.value||!_e.value)return;let n=_e.value.getAttribute("href")||pe.value;!n.startsWith("http://")&&!n.startsWith("https://")&&!n.startsWith("mailto:")&&(n="https://"+n),window.open(n,"_blank","noopener,noreferrer")},bo=()=>{if(_e.value){const o=_e.value.textContent||"",n=_e.value.getAttribute("href")||"",a=_e.value;We.value=n,it.value=o,ft.value=o,ye.value=!1,ne.value=!1,pe.value="",_e.value=a,Te.value=!0}else if(ve.value){const o=window.getSelection();if(o.rangeCount>0){const a=o.getRangeAt(0).commonAncestorContainer,r=a.nodeType===1?a.closest("a"):a.parentElement?.closest("a");if(r){const c=r.textContent||"",d=r.getAttribute("href")||"";We.value=d,it.value=c,ft.value=c,_e.value=r,Te.value=!0}}}else{ke.value=be();const o=window.getSelection();let n="";o.rangeCount>0&&(n=o.getRangeAt(0).toString()),We.value="",it.value=n,ft.value="",_e.value=null,Te.value=!0}e.nextTick(()=>{I.value&&(I.value.focus(),I.value.select())})},Un=()=>{Te.value=!1,We.value="",it.value="",ft.value="",_e.value=null,ke.value=null},ro=()=>{if(!We.value.trim()){Un();return}if(q.value?(De.value&&(clearTimeout(De.value),De.value=null),Mt(),q.value=!1):Mt(),it.value.trim()||(it.value=We.value.trim()),_e.value&&f.value&&f.value.contains(_e.value)){const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges();const n=_e.value;if(n.setAttribute("href",We.value.trim()),it.value.trim()!==ft.value.trim()){for(;n.firstChild;)n.removeChild(n.firstChild);n.textContent=it.value.trim()}n.style.color="#60afdf",n.style.textDecoration="underline";const a=document.createRange();a.selectNodeContents(n),a.collapse(!1),o.removeAllRanges(),o.addRange(a),xe()}else if(f.value){f.value.focus();const o=window.getSelection();o.removeAllRanges(),ke.value&&El(ke.value);let n=null;if(o.rangeCount>0&&(n=o.getRangeAt(0)),n&&!n.collapsed){n.toString();const a=document.createElement("a");a.href=We.value.trim(),a.textContent=it.value.trim(),a.style.color="#60afdf",a.style.textDecoration="underline",n.deleteContents(),n.insertNode(a);const r=document.createTextNode(" ");n.setStartAfter(a),n.insertNode(r),n.setStartAfter(r),n.collapse(!0),o.removeAllRanges(),o.addRange(n)}else{n||(n=document.createRange(),n.selectNodeContents(f.value),n.collapse(!1));const a=n.startContainer,r=a.nodeType===3,c=r&&n.startOffset===a.textContent.length,d=document.createElement("a");if(d.href=We.value.trim(),d.textContent=it.value.trim(),d.style.color="#60afdf",d.style.textDecoration="underline",c){let u=a.parentElement;for(;u&&u!==f.value&&!["P","DIV","H1","H2","H3","H4","H5","H6"].includes(u.tagName);)u=u.parentElement;if(u&&u!==f.value){let m=u.nextElementSibling;if(m&&(m.innerHTML==="<br>"||m.innerHTML==="<br/>"||m.textContent.trim()==="")){m.textContent="",m.appendChild(d);const v=document.createTextNode(" ");m.appendChild(v);const h=document.createRange();h.setStartAfter(d),h.collapse(!0),o.removeAllRanges(),o.addRange(h)}else{if(n.startOffset>0){const h=a.textContent.substring(0,n.startOffset),M=h[h.length-1];if(M&&M!==" "&&M!==" "&&M!==`
|
|
102
|
-
`){const
|
|
103
|
-
`){const h=document.createTextNode(" ");n.insertNode(h),n.setStartAfter(h)}}n.insertNode(d);const u=document.createTextNode(" ");n.setStartAfter(d),n.insertNode(u),n.setStartAfter(u),n.collapse(!0),o.removeAllRanges(),o.addRange(n)}}xe()}e.nextTick(()=>{jt(),Un()})},Pl=()=>{if(!f.value||ee.value)return;const o=window.getSelection();let n=null;o&&o.rangeCount>0&&(n=be());const a=/(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,r=document.createTreeWalker(f.value,NodeFilter.SHOW_TEXT,{acceptNode:m=>{const v=m.parentElement;return!v||v.closest("a")||v.closest(".dss-image-wrapper")||!m.textContent||m.textContent.trim()===""?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),c=[];let d;for(;d=r.nextNode();)c.push(d);let u=!1;for(let m=c.length-1;m>=0;m--){const v=c[m],h=v.textContent;a.lastIndex=0;const M=[...h.matchAll(a)];if(M.length===0)continue;const T=M.filter(Y=>{const Oe=Y[0],Se=Y.index;if(Se>0&&h[Se-1]==="@"||Se+Oe.length<h.length&&h[Se+Oe.length]==="@")return!1;const Ct=v.parentElement;return!(Ct&&Ct.closest("a"))});if(T.length===0)continue;if(T.length===1&&T[0][0]===h.trim()){const Y=T[0][0],Oe=Y.startsWith("http://")||Y.startsWith("https://")?Y:`https://${Y}`,Se=document.createElement("a");Se.href=Oe,Se.textContent=Y,Se.style.color="#60afdf",Se.style.textDecoration="underline",v.parentNode&&(v.parentNode.replaceChild(Se,v),u=!0);continue}let E=0;const oe=document.createDocumentFragment();if(T.forEach(Y=>{const Oe=Y.index,Se=Y[0];if(Oe>E){const cl=h.substring(E,Oe);cl&&oe.appendChild(document.createTextNode(cl))}const Ct=Se.startsWith("http://")||Se.startsWith("https://")?Se:`https://${Se}`,yl=document.createElement("a");yl.href=Ct,yl.textContent=Se,yl.style.color="#60afdf",yl.style.textDecoration="underline",oe.appendChild(yl),E=Oe+Se.length}),E<h.length){const Y=h.substring(E);Y&&oe.appendChild(document.createTextNode(Y))}v.parentNode&&oe.childNodes.length>0&&(v.parentNode.replaceChild(oe,v),u=!0)}u&&n&&e.nextTick(()=>{El(n),jt()})},Cn=()=>{if(!f.value)return;const o=/<u>([\s\S]*?)<\/u>|<ins>([\s\S]*?)<\/ins>/gi,n=document.createTreeWalker(f.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}}),a=[];let r;for(;r=n.nextNode();)a.push(r);for(let c=a.length-1;c>=0;c--){const d=a[c],u=d.textContent,m=[...u.matchAll(o)];if(m.length===0)continue;let v=0;const h=document.createDocumentFragment();m.forEach(M=>{const T=M.index,E=M[0].startsWith("<u>")?"u":"ins",oe=M[1]||M[2]||"";T>v&&h.appendChild(document.createTextNode(u.substring(v,T)));const Y=document.createElement(E);Y.textContent=oe,h.appendChild(Y),v=T+M[0].length}),v<u.length&&h.appendChild(document.createTextNode(u.substring(v))),d.parentNode&&h.childNodes.length>0&&d.parentNode.replaceChild(h,d)}},sn=o=>{if(!f.value||ee.value)return;if(!o){Cn();return}if(!["*","_",">"].includes(o))return;const a=window.getSelection();if(!a||a.rangeCount===0)return;const r=a.getRangeAt(0);if(!r.collapsed)return;const c=r.startContainer.nodeType===Node.TEXT_NODE?r.startContainer.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div"):r.startContainer.closest?.("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div");if(!c||c===f.value||!f.value.contains(c))return;const d=()=>{let cl="",ll=0,ul=!1;const dl=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:Ql=>Ql.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});document.createTreeWalker(c,NodeFilter.SHOW_TEXT,null);let Jt=0;for(;dl.nextNode();){const Ql=dl.currentNode,vn=Ql.textContent||"",Jl=Jt;if(Jt+=vn.length,Ql===r.startContainer){cl+=vn.substring(0,r.startOffset),ll=Jl+r.startOffset,ul=!0;break}cl+=vn}return ul||(ll=cl.length),{textBeforeCursor:cl,cursorCharOffset:ll}},{textBeforeCursor:u}=d();if(!u.length)return;let m=null,v=null;if(u.endsWith("**")&&(m=u.match(/\*\*(.+?)\*\*$/s))||u.endsWith("__")&&(m=u.match(/__(.+?)__$/s))?v="strong":u.endsWith("*")&&!u.endsWith("**")&&(m=u.match(new RegExp("(?<!\\*)\\*([^*]+)\\*$")))||u.endsWith("_")&&!u.endsWith("__")&&(m=u.match(new RegExp("(?<!_)_([^_]+)_$")))?v="em":o===">"&&((m=u.match(/<u>(.+?)<\/u>$/s))||(m=u.match(/<ins>(.+?)<\/ins>$/s)))&&(v=m[0].startsWith("<u>")?"u":"ins",m[0].startsWith("<u>"),m[0].startsWith("<u>")),!m||!m[1])return;const h=m[0],M=m[1],T=u.length-h.length,oe=(cl=>{let ll=0;const ul=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:Jt=>Jt.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let dl;for(;dl=ul.nextNode();){const Jt=(dl.textContent||"").length;if(ll+Jt>=cl)return{node:dl,offset:cl-ll};ll+=Jt}return null})(T);if(!oe)return;const Y=document.createRange();Y.setStart(oe.node,oe.offset),Y.setEnd(r.endContainer,r.endOffset);const Oe=document.createElement(v);Oe.textContent=M,Y.deleteContents(),Y.insertNode(Oe);const Se=window.getSelection(),Ct=document.createRange();Ct.setStartAfter(Oe),Ct.collapse(!0),Se.removeAllRanges(),Se.addRange(Ct);const yl=be();e.nextTick(()=>{xe(),yl&&El(yl)})},Qt=()=>{f.value&&(lt.value=be(),At.value="",Ft.value="",je.value="",j.value="",ce.value="",Ut.value=null,Qe.value=null,Me.value="upload",St.value=!0,Zt(),e.nextTick(()=>{Ie.value&&Ie.value.focus(),Xe.value&&(Xe.value.value="")}))},wo=o=>{const n=o.target?.files?.[0];if(!n){Ut.value=null,Ft.value="";return}Ut.value=n;const a=new FileReader;a.onload=r=>{Ft.value=r.target?.result||""},a.readAsDataURL(n)},sl=()=>{Xe.value&&Xe.value.click()},hl=()=>{j.value&&(ce.value="")},xo=()=>{ce.value&&(j.value="")},Io=()=>{let o=Qe.value;if(!o){const n=window.getSelection();if(n&&n.rangeCount>0){const r=n.getRangeAt(0).commonAncestorContainer;o=r.nodeType===1?r.closest("img"):r.parentElement?.closest("img")}}if(o){const n=o.getAttribute("data-alt")||o.getAttribute("alt")||"";Qe.value=o,At.value=n.trim()===""||n.trim()==="Image"?"":n;const a=o.getAttribute("src")||o.src||"";a.startsWith("http://")||a.startsWith("https://")?(je.value=a,Ft.value="",Me.value="url"):(Ft.value=a,je.value="",Me.value="upload");const c=o.style.width||o.getAttribute("width")||"",d=o.style.height||o.getAttribute("height")||"";j.value=c.endsWith("px")?c.replace("px",""):c,ce.value=d.endsWith("px")?d.replace("px",""):d,lt.value=null}else{Qt();return}St.value=!0,Ae.value=!1,Bt.value=!1,e.nextTick(()=>{Me.value==="url"&&Ot.value?(Ot.value.focus(),Ot.value.select()):Ie.value&&(Ie.value.focus(),Ie.value.select()),Xe.value&&(Xe.value.value="")})},bn=()=>{St.value=!1,At.value="",Ft.value="",je.value="",j.value="",ce.value="",Ut.value=null,Qe.value=null,lt.value=null,Me.value="upload"},fn=()=>{const o=(At.value||"").trim(),n=f.value?._mutationObserver;n&&n.disconnect(),q.value?(De.value&&(clearTimeout(De.value),De.value=null),Mt(),q.value=!1):Mt();const a=Me.value==="url"?je.value.trim():Ft.value;if(Qe.value&&f.value&&f.value.contains(Qe.value)){a&&(Qe.value.src=a),Qe.value.setAttribute("alt",o),Qe.value.setAttribute("data-alt",o),j.value?(Qe.value.style.width=`${j.value}px`,Qe.value.setAttribute("width",j.value)):(Qe.value.style.removeProperty("width"),Qe.value.removeAttribute("width")),ce.value?(Qe.value.style.height=`${ce.value}px`,Qe.value.setAttribute("height",ce.value)):(Qe.value.style.removeProperty("height"),Qe.value.removeAttribute("height"));const r=window.getSelection();if(r){r.removeAllRanges();const c=document.createRange();c.setStartAfter(Qe.value),c.collapse(!0),r.addRange(c)}xe()}else{if(!a){n&&f.value&&n.observe(f.value,{childList:!0,subtree:!0}),bn();return}if(f.value){f.value.focus();const r=window.getSelection();r&&r.rangeCount>0&&r.removeAllRanges();const c=window.getSelection();let d=null;if(lt.value&&(El(lt.value),c&&c.rangeCount>0&&(d=c.getRangeAt(0))),!d&&c&&c.rangeCount>0&&(d=c.getRangeAt(0)),!d&&f.value){if(d=document.createRange(),f.value.childNodes.length===0){const h=document.createElement("p");h.innerHTML="<br>",f.value.appendChild(h),d.setStart(h,0),d.collapse(!0)}else d.selectNodeContents(f.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}if(!d){bn();return}const u=d.commonAncestorContainer,m=u.nodeType===3?u.parentElement:u;if(!f.value.contains(m)){if(d=document.createRange(),f.value.childNodes.length===0){const h=document.createElement("p");h.innerHTML="<br>",f.value.appendChild(h),d.setStart(h,0),d.collapse(!0)}else d.selectNodeContents(f.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}const v=document.createElement("img");v.src=a,v.setAttribute("alt",o),v.setAttribute("data-alt",o),j.value&&(v.style.width=`${j.value}px`,v.setAttribute("width",j.value)),ce.value&&(v.style.height=`${ce.value}px`,v.setAttribute("height",ce.value));try{d.insertNode(v),d.setStartAfter(v),d.collapse(!0),c&&(c.removeAllRanges(),c.addRange(d))}catch{if(f.value){if(f.value.childNodes.length===0){const T=document.createElement("p");f.value.appendChild(T),T.appendChild(v)}else{const T=f.value.lastChild;if(T&&T.nodeType===1)T.appendChild(v);else{const E=document.createElement("p");f.value.appendChild(E),E.appendChild(v)}}const M=document.createRange();M.setStartAfter(v),M.collapse(!0),c&&(c.removeAllRanges(),c.addRange(M))}}Qe.value=v,xe()}}e.nextTick(()=>{n&&f.value&&n.observe(f.value,{childList:!0,subtree:!0}),jt(),Gt(),bn()})};e.watch(()=>A.modelValue,o=>{if(A.richText&&f.value&&!ee.value){const n=qn(o||""),r=f.value.innerHTML.replace(/ |\u00A0/g," "),c=n.replace(/ |\u00A0/g," ");if(r!==c){const d=be();f.value.innerHTML=n,e.nextTick(()=>{ae();const u=f.value.innerHTML||"",m=A.title||"",v=A.description||"";U.value=u,re.value=m,Fe.value=v,le.value=u,ut.value=m,Vt.value=v,tt.value=[],vt.value=[],De.value&&(clearTimeout(De.value),De.value=null),q.value=!1,d&&El(d),W(),at(),Cl(),jt(),Gt(),nn(),Hl("watch-modelValue")})}}},{immediate:!0}),e.watch(()=>A.richText,o=>{o?(Gt(),e.nextTick(()=>{Pn()})):(zl(),Q.value=[],Ye.value&&(Ye.value.disconnect(),Ye.value=null)),nn()}),e.watch(()=>A.floatingToolbar,o=>{o?Gt():zl()}),e.watch(()=>A.disabled,o=>{o&&zl(),nn()}),e.watch(()=>A.description,()=>{e.nextTick(()=>{V.value?Il():Vn()})}),e.watch(()=>A.title,()=>{e.nextTick(()=>{Rt.value?Rl():Vl()})}),e.watch(()=>A.customToolbarSlots,()=>{e.nextTick(()=>{$t()})},{deep:!0}),e.watch(()=>A.comments,(o,n)=>{if(no.value){no.value=!1;return}In.value||A.richText&&f.value&&e.nextTick(()=>{Xn()})},{deep:!0,immediate:!1});const Xn=()=>{if(!In.value&&!(!A.comments||!Array.isArray(A.comments)||A.comments.length===0)&&!(!A.richText||!f.value)){In.value=!0;try{const o=new Set,n=A.comments.filter(u=>{const m=String(u.conversation_id||u.id);return o.has(m)?!1:(o.add(m),!0)}),a=f.value.querySelectorAll("[data-comment], [data-fake-comment]"),r=a.length;a.forEach(u=>{const m=u.parentNode;if(m){for(;u.firstChild;)m.insertBefore(u.firstChild,u);m.removeChild(u)}});let c=0;const d=new Set;n.forEach(u=>{if(!u.conversation_id||!u.selection_range)return;const m=typeof u.conversation_id=="string"&&u.conversation_id.startsWith("comment-")?null:Number(u.conversation_id)||u.conversation_id;if(!m)return;const v=String(m);if(d.has(v))return;const h=f.value.querySelector(`[data-comment="${v}"]`);if(h){_n(h,u),d.add(v);return}try{const M=co(u.selection_range,u.selection_text);if(M&&!M.collapsed){const T=M.commonAncestorContainer,E=T.nodeType===3?T.parentElement:T;if(E){const Oe=E.closest("[data-comment], [data-fake-comment]");if(Oe){const Se=Oe.getAttribute("data-comment")||Oe.getAttribute("data-fake-comment");if(String(Se)===String(m)){Oe.setAttribute("data-comment",v),Oe.removeAttribute("data-fake-comment"),_n(Oe,u),d.add(v);return}else return}}const oe=f.value.querySelector(`[data-comment="${v}"]`);if(oe){_n(oe,u),d.add(v);return}const Y=document.createElement("span");Y.setAttribute("data-comment",v),_n(Y,u);try{M.surroundContents(Y),c++,d.add(v)}catch{try{const Se=document.createRange();Se.setStart(M.startContainer,M.startOffset),Se.setEnd(M.endContainer,M.endOffset),Kt(Se),Se.surroundContents(Y),c++,d.add(v)}catch{try{const Ct=M.extractContents();Y.appendChild(Ct),M.insertNode(Y),c++,d.add(v)}catch(Ct){console.warn("Failed to create comment marker:",Ct)}}}}}catch{}}),e.nextTick(()=>{Hl("restoreCommentsFromModel"),xe(),In.value=!1})}catch{In.value=!1}}},Kt=o=>{if(!o||!f.value)return o;try{const n=["P","DIV","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"];let a=o.startContainer,r=o.startOffset;if(a.nodeType===3){const u=a.parentElement;u&&n.includes(u.tagName)&&(r===0&&!Fo(a)||o.setStartBefore(u))}else a.nodeType===1&&n.includes(a.tagName)&&r>0&&o.setStartBefore(a);let c=o.endContainer,d=o.endOffset;if(c.nodeType===3){const u=c.parentElement;u&&n.includes(u.tagName)&&(d===c.length&&!io(c)||o.setEndAfter(u))}else c.nodeType===1&&n.includes(c.tagName)&&d<c.childNodes.length&&o.setEndAfter(c);return o}catch{return o}},Fo=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},io=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},co=(o,n)=>{if(!o||!f.value)return null;try{const a=document.createRange();if(o.type==="text"&&typeof o.start=="number"&&typeof o.end=="number"){let r=0;const c=[f.value];let d=null,u=!1,m=!1;for(;!m&&(d=c.pop());)if(d.nodeType===3){const v=r+d.length;!u&&o.start>=r&&o.start<=v&&(a.setStart(d,o.start-r),u=!0),u&&o.end>=r&&o.end<=v&&(a.setEnd(d,o.end-r),m=!0),r=v}else{let v=d.childNodes.length;for(;v--;)c.push(d.childNodes[v])}return u?Kt(a):null}}catch{return null}return null},_n=(o,n)=>{if(!o||!n)return;const a=n.conversation||[],r=new Set,c=[],d=m=>{m&&m.id&&!r.has(m.id)&&(r.add(m.id),c.push(m))};a.length>0&&a.forEach(m=>{m.user&&d(m.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=a.length;u>0?o.setAttribute("data-comment-count",String(u)):o.removeAttribute("data-comment-count")},Hl=(o="unknown")=>{if(!A.richText||!f.value){Q.value=[];return}Date.now()-Dt.value<Ht&>.value!==null||gt.value===null&&(gt.value=requestAnimationFrame(()=>{if(gt.value=null,Dt.value=Date.now(),Ne.value)return;Ne.value=!0;const a={},r=f.value;if(!r){Ne.value=!1;return}const c=r.closest(".editor-with-comments");if(!c){Ne.value=!1;return}const d=r.querySelectorAll("[data-comment], [data-fake-comment]"),u=[],m=new Set;d.forEach(E=>{const oe=E.getAttribute("data-comment")||E.getAttribute("data-fake-comment");oe&&E.tagName==="SPAN"&&(m.has(oe)||(u.push(E),m.add(oe)))}),d.forEach(E=>{const oe=E.getAttribute("data-comment")||E.getAttribute("data-fake-comment");!oe||m.has(oe)||(["P","DIV","H1","H2","H3","H4","H5","H6"].includes(E.tagName)?E.querySelector(`span[data-comment="${oe}"], span[data-fake-comment="${oe}"]`)||(u.push(E),m.add(oe)):E.tagName!=="SPAN"&&(u.push(E),m.add(oe)))});const v=c.getBoundingClientRect(),h=r.getBoundingClientRect();u.forEach((E,oe)=>{let Y=E.getAttribute("data-comment")||E.getAttribute("data-fake-comment");if(!Y)return;if(typeof Y=="string"&&Y.startsWith("comment-")){const ht=E.textContent?.trim(),Ol=A.comments?.find(ml=>(typeof ml.conversation_id=="string"&&ml.conversation_id.startsWith("comment-")?null:ml.conversation_id)&&ml.selection_text?.trim()===ht);Ol?(Y=String(Ol.conversation_id),E.setAttribute("data-comment",Y),E.removeAttribute("data-fake-comment")):(Y=String(Date.now()),E.setAttribute("data-comment",Y),E.removeAttribute("data-fake-comment"))}const Oe=E.getBoundingClientRect(),Se=window.getComputedStyle(E),Ct=parseFloat(Se.lineHeight)||parseFloat(Se.fontSize)*1.2,ll=Oe.top-h.top+Ct/2-15,dl=h.top-v.top+ll;let Jt=null,Ql=null,vn=0;const Jl=[],So=new Set;if(Y&&A.comments){const ht=A.comments.find(Ol=>String(Ol.conversation_id||Ol.id)===String(Y));if(ht){const Ol=ht.conversation||[];Ol.length>0?(Ol.forEach(ml=>{ml.user&&ml.user.id&&!So.has(ml.user.id)&&(So.add(ml.user.id),Jl.push(ml.user))}),vn=Ol.length):(vn=0,Jt=null,Ql=null),Jl.length>0?Jt=Jl[0]:Jt=null,Jl.length>1?Ql=Jl[1]:Ql=null}}const rn=Oe.top+Ct/2-15,mo=rn+30,On=5,$n=mo>h.top+On&&rn<h.bottom-On?1:0;Q.value.find(ht=>ht.id===Y);let gn=E;if(!gn&&Y&&f.value){const ht=String(Y);gn=f.value.querySelector(`[data-comment="${ht}"], [data-fake-comment="${ht}"]`)}const Ln=Jl.length;a[Y]?(a[Y].top=dl,a[Y].opacity=$n,a[Y].element=gn,a[Y].firstUser=Jt,a[Y].secondUser=Ql,a[Y].totalCount=vn,a[Y].uniqueUserCount=Ln):a[Y]={id:Y,top:dl,opacity:$n,element:gn,firstUser:Jt,secondUser:Ql,totalCount:vn,uniqueUserCount:Ln}});const M=Object.values(a).map(E=>{const oe=Math.max(0,(E.uniqueUserCount??0)-2);if(!E.element&&E.id&&f.value){const Oe=String(E.id);E.element=f.value.querySelector(`[data-comment="${Oe}"], [data-fake-comment="${Oe}"]`)}return{...E,firstUser:E.firstUser||null,secondUser:E.secondUser||null,totalCount:E.totalCount,additionalCount:oe}});(Q.value.length!==M.length||M.some((E,oe)=>{const Y=Q.value[oe];if(!Y)return!0;const Oe=(Y.firstUser?.id||null)!==(E.firstUser?.id||null),Se=(Y.secondUser?.id||null)!==(E.secondUser?.id||null);return Y.id!==E.id||Math.abs(Y.top-E.top)>1||Y.opacity!==E.opacity||Y.totalCount!==E.totalCount||Y.additionalCount!==E.additionalCount||Oe||Se||Y.element!==E.element}))&&(Q.value=M),Ne.value=!1}))},Eo=o=>{if(!o)return;let n=o.element;if(!n&&o.id&&f.value){const a=String(o.id);n=f.value.querySelector(`[data-comment="${a}"], [data-fake-comment="${a}"]`)}n&&(wn(),tl.value=n,n.classList.add("editor-comment-highlighted"))},wn=(o=!1)=>{!o&&pt.value!==null&&tl.value&&(tl.value.getAttribute("data-comment")||tl.value.getAttribute("data-fake-comment"))===pt.value||(f.value&&f.value.querySelectorAll(".editor-comment-highlighted").forEach(a=>{a.classList.remove("editor-comment-highlighted")}),tl.value&&(tl.value.classList.remove("editor-comment-highlighted"),tl.value=null))},uo=o=>{if(!o||!o.element)return;wn(!0);const n=o.element.getAttribute("data-comment")||o.element.getAttribute("data-fake-comment");if(!n)return;const a=`[data-comment="${n}"], [data-fake-comment="${n}"]`;X("comment-marker-clicked",{commentId:n,selector:a,element:o.element})},zo=()=>{wn()},Pn=()=>{!A.richText||!f.value||(Ye.value&&Ye.value.disconnect(),nt.value!==null&&(clearTimeout(nt.value),nt.value=null),Ye.value=new MutationObserver(()=>{nt.value===null&&(nt.value=setTimeout(()=>{nt.value=null,e.nextTick(()=>{Hl("MutationObserver")})},200))}),Ye.value.observe(f.value,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-comment","data-fake-comment","data-comment-user","data-comment-user-2","data-comment-count"]}),Hl("setupCommentMarkersObserver-initial"))},Yn=(o,n)=>{if(!o||!n)return;const a=n.getBoundingClientRect();let r=a.top,c=a.right+4;o.style.top=`${r}px`,o.style.left=`${c}px`,o.offsetHeight;const d=o.getBoundingClientRect(),u=window.innerWidth,m=window.innerHeight;if(d.right>u){const v=a.left-d.width-4;o.style.left=`${v}px`}if(d.bottom>m){const v=Math.max(8,m-d.height-8);o.style.top=`${v}px`}d.top<0&&(o.style.top="8px")};return e.watch(()=>ct.value,o=>{e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(a=>{const r=a.getAttribute("data-submenu-id");if(r===o&&o){const c=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${r}"]`);if(c){if(a.parentNode!==document.body){const d=a.parentNode;a.dataset.originalParentRef=d===c?"inside":"sibling",document.body.appendChild(a)}a.style.display="block",a.style.visibility="hidden",a.style.opacity="0",requestAnimationFrame(()=>{requestAnimationFrame(()=>{Yn(a,c),a.offsetHeight,a.setAttribute("data-active","true"),a.style.visibility="visible",a.style.opacity="1"})})}else a.setAttribute("data-active","true")}else a.setAttribute("data-active","false"),a.style.display="none",a.style.top="",a.style.left="",a.style.visibility="",a.style.opacity=""})})}),e.watch(()=>[Ce.value,st.value],()=>{Ce.value==="askAi"||st.value==="askAi"?e.nextTick(()=>{ln()}):(ct.value=null,e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(n=>{if(n.parentNode===document.body){const a=n.getAttribute("data-submenu-id");if(a){const r=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${a}"]`);if(r)if(n.dataset.originalParentRef==="inside")r.appendChild(n);else{const d=r.closest(".dss-toolbar-dropdown");d&&d.insertBefore(n,r.nextSibling)}}}})}))}),e.watch(()=>A.locale,o=>{o&&o!==ie.value&&(ie.value=o)},{immediate:!0}),J({openCommentOverlayForSelector:Do,updateCommentMarkers:Hl,restoreCommentsFromModel:Xn}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-text-editor-container editor-with-comments",ot.value]),style:e.normalizeStyle(Tt.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",pu,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:Dn,title:e.unref(_)("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,fu),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!Z.value}]),onClick:Fl,title:e.unref(_)("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,vu),n[61]||(n[61]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",gu,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:n[0]||(n[0]=a=>en("paragraph")),title:e.unref(_)("textEditor.toolbar.paragraphFormat")},[S.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:F.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,yu)):S.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:F.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,ku)):S.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:F.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,Cu)):S.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:F.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,bu)):S.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:F.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,wu)):S.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:F.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,xu)):(e.openBlock(),e.createElementBlock("svg",Eu,[...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,hu),Ce.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]=a=>Nl("<h1>"))},[e.createElementVNode("img",{src:F.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,Su),e.createElementVNode("h1",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[2]||(n[2]=a=>Nl("<h2>"))},[e.createElementVNode("img",{src:F.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,Vu),e.createElementVNode("h2",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[3]||(n[3]=a=>Nl("<h3>"))},[e.createElementVNode("img",{src:F.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,Nu),e.createElementVNode("h3",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[4]||(n[4]=a=>Nl("<h4>"))},[e.createElementVNode("img",{src:F.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,Bu),e.createElementVNode("h4",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[5]||(n[5]=a=>Nl("<h5>"))},[e.createElementVNode("img",{src:F.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,Mu),e.createElementVNode("h5",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[6]||(n[6]=a=>Nl("<h6>"))},[e.createElementVNode("img",{src:F.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,_u),e.createElementVNode("h6",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[7]||(n[7]=a=>Nl("<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(_)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":wl("bold")}]),onClick:n[9]||(n[9]=a=>jl("bold")),title:e.unref(_)("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,$u),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":wl("italic")}]),onClick:n[10]||(n[10]=a=>jl("italic")),title:e.unref(_)("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,Lu),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":wl("underline")}]),onClick:n[11]||(n[11]=a=>jl("underline")),title:e.unref(_)("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,Tu),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":yt.value}]),onClick:Zn,title:e.unref(_)("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,Au),n[62]||(n[62]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:Rn,title:e.unref(_)("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,Hu)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:Hn,title:e.unref(_)("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,Du)),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":wl("insertUnorderedList")}]),onClick:k,title:e.unref(_)("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,Ru),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":wl("insertOrderedList")}]),onClick:y,title:e.unref(_)("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,Iu),n[64]||(n[64]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:Qt,title:e.unref(_)("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,Fu),K.value?(e.openBlock(),e.createElementBlock("div",zu)):e.createCommentVNode("",!0),K.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(_)("textEditor.toolbar.comment"),onClick:po},[...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,Pu)):e.createCommentVNode("",!0),$.askAi?(e.openBlock(),e.createElementBlock("div",Ou)):e.createCommentVNode("",!0),$.askAi?(e.openBlock(),e.createElementBlock("div",qu,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-dropdown-toggle",onClick:n[12]||(n[12]=a=>en("askAi")),title:e.unref(_)("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",Zu,e.toDisplayString(e.unref(_)("textEditor.toolbar.askAi")),1)],8,Wu),Ce.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",Uu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.customToolbarSlots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[Yt(a)?(e.openBlock(),e.createElementBlock("div",Xu,[e.renderSlot(o.$slots,a)])):e.createCommentVNode("",!0),Yt(a)&&r<$.customToolbarSlots.length-1&&kl(r)?(e.openBlock(),e.createElementBlock("div",Yu)):e.createCommentVNode("",!0)],64))),128))])],32)):e.createCommentVNode("",!0),(Ce.value==="paragraph"||Ce.value==="askAi")&&$.richText?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-dropdown-overlay",onClick:Zt})):e.createCommentVNode("",!0),e.createVNode(qo,{showModal:Te.value,width:"500px",height:"55vh",onCloseModal:Un},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(_)("textEditor.link.editLink")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",ju,[e.createElementVNode("div",Ku,[e.createElementVNode("label",Gu,e.toDisplayString(e.unref(_)("textEditor.link.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkAltInput",ref:we,type:"text","onUpdate:modelValue":n[15]||(n[15]=a=>it.value=a),class:"dss-link-modal-input",placeholder:e.unref(_)("textEditor.link.enterAltText"),onKeyup:e.withKeys(ro,["enter"])},null,40,Qu),[[e.vModelText,it.value]])]),e.createElementVNode("div",Ju,[e.createElementVNode("label",ed,e.toDisplayString(e.unref(_)("textEditor.link.url")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkUrlInput",ref:I,type:"text","onUpdate:modelValue":n[16]||(n[16]=a=>We.value=a),class:"dss-link-modal-input",placeholder:e.unref(_)("textEditor.link.enterUrl"),onKeyup:e.withKeys(ro,["enter"])},null,40,td),[[e.vModelText,We.value]])])])]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:Un},e.toDisplayString(e.unref(_)("textEditor.link.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:ro},e.toDisplayString(e.unref(_)("textEditor.link.save")),1)]),_:1},8,["showModal"]),e.createVNode(qo,{showModal:St.value,width:"500px",height:"80vh",onCloseModal:bn},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Qe.value?e.unref(_)("textEditor.image.editImage"):e.unref(_)("textEditor.image.addImage")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",ld,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Me.value==="upload"}]),onClick:n[17]||(n[17]=a=>Me.value="upload")},e.toDisplayString(e.unref(_)("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":Me.value==="url"}]),onClick:n[18]||(n[18]=a=>Me.value="url")},e.toDisplayString(e.unref(_)("textEditor.image.imageLink")),3)]),Me.value==="upload"?(e.openBlock(),e.createElementBlock("div",nd,[e.createElementVNode("div",od,[e.createElementVNode("div",ad,[dt.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("label",sd,e.toDisplayString(e.unref(_)("textEditor.image.uploadImage")),1)),dt.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-image-upload-preview",onClick:sl},[e.createElementVNode("img",{src:Ft.value,alt:"Preview",class:"dss-image-preview-image"},null,8,rd),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:Xe,type:"file",accept:"image/*",class:"dss-image-file-input-hidden",onChange:wo},null,544)])):(e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"imageFileInput",ref:Xe,type:"file",accept:"image/*",class:"dss-link-modal-input dss-link-modal-input-image",onChange:wo},null,544))]),e.createElementVNode("div",id,[e.createElementVNode("label",cd,e.toDisplayString(e.unref(_)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageAltInput",ref:Ie,type:"text","onUpdate:modelValue":n[19]||(n[19]=a=>At.value=a),class:"dss-link-modal-input",placeholder:e.unref(_)("textEditor.image.enterAltText"),onKeyup:e.withKeys(fn,["enter"])},null,40,ud),[[e.vModelText,At.value]])]),e.createElementVNode("div",dd,[e.createElementVNode("label",md,e.toDisplayString(e.unref(_)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[20]||(n[20]=a=>j.value=a),class:"dss-link-modal-input",placeholder:e.unref(_)("textEditor.image.auto"),onKeyup:e.withKeys(fn,["enter"]),onInput:hl},null,40,pd),[[e.vModelText,j.value]])]),e.createElementVNode("div",fd,[e.createElementVNode("label",vd,e.toDisplayString(e.unref(_)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[21]||(n[21]=a=>ce.value=a),class:"dss-link-modal-input",placeholder:e.unref(_)("textEditor.image.auto"),onKeyup:e.withKeys(fn,["enter"]),onInput:xo},null,40,gd),[[e.vModelText,ce.value]])])])])):e.createCommentVNode("",!0),Me.value==="url"?(e.openBlock(),e.createElementBlock("div",hd,[e.createElementVNode("div",yd,[e.createElementVNode("div",kd,[e.createElementVNode("label",Cd,e.toDisplayString(e.unref(_)("textEditor.image.imageUrl")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageUrlInput",ref:Ot,type:"text","onUpdate:modelValue":n[22]||(n[22]=a=>je.value=a),class:"dss-link-modal-input",placeholder:e.unref(_)("textEditor.image.enterImageUrl"),onKeyup:e.withKeys(fn,["enter"])},null,40,bd),[[e.vModelText,je.value]])]),e.createElementVNode("div",wd,[e.createElementVNode("label",xd,e.toDisplayString(e.unref(_)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[23]||(n[23]=a=>At.value=a),class:"dss-link-modal-input",placeholder:e.unref(_)("textEditor.image.enterAltText"),onKeyup:e.withKeys(fn,["enter"])},null,40,Ed),[[e.vModelText,At.value]])]),e.createElementVNode("div",Sd,[e.createElementVNode("label",Vd,e.toDisplayString(e.unref(_)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[24]||(n[24]=a=>j.value=a),class:"dss-link-modal-input",placeholder:e.unref(_)("textEditor.image.auto"),onKeyup:e.withKeys(fn,["enter"]),onInput:hl},null,40,Nd),[[e.vModelText,j.value]])]),e.createElementVNode("div",Bd,[e.createElementVNode("label",Md,e.toDisplayString(e.unref(_)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[25]||(n[25]=a=>ce.value=a),class:"dss-link-modal-input",placeholder:e.unref(_)("textEditor.image.auto"),onKeyup:e.withKeys(fn,["enter"]),onInput:xo},null,40,_d),[[e.vModelText,ce.value]])])])])):e.createCommentVNode("",!0)]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:bn},e.toDisplayString(e.unref(_)("textEditor.image.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:fn},e.toDisplayString(e.unref(_)("textEditor.image.save")),1)]),_:1},8,["showModal"]),e.createElementVNode("div",{class:e.normalizeClass(["dss-text-editor-title-wrapper",{"dss-text-editor-no-border-bottom":hn.value&&Rt.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(_)("textEditor.labels.title")),1),e.createElementVNode("div",$d,[Rt.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ld,[$.title?(e.openBlock(),e.createElementBlock("span",Td,e.toDisplayString($.title),1)):(e.openBlock(),e.createElementBlock("span",Ad,e.toDisplayString(mt.value),1))])),e.createElementVNode("textarea",{ref_key:"titleInputRef",ref:ze,value:$.title,onInput:$l,onFocus:Xl,onBlur:bl,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-title-input",{"dss-text-editor-title-input-blurred":!Rt.value}]),placeholder:mt.value,disabled:$.disabled,rows:"1"},null,42,Dd)])],2),hn.value&&Rt.value?(e.openBlock(),e.createElementBlock("div",Hd,[e.renderSlot(o.$slots,"title-slot")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-text-editor-description-wrapper",{"dss-text-editor-no-border-bottom":yn.value&&V.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(_)("textEditor.labels.description")),1),e.createElementVNode("div",Rd,[V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Id,[$.description?(e.openBlock(),e.createElementBlock("span",Fd,e.toDisplayString($.description),1)):(e.openBlock(),e.createElementBlock("span",zd,e.toDisplayString(Je.value),1))])),e.createElementVNode("textarea",{ref_key:"descriptionInputRef",ref:bt,value:$.description,onInput:Wt,onFocus:Tn,onBlur:An,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-description-input",{"dss-text-editor-description-input-blurred":!V.value}]),placeholder:Je.value,disabled:$.disabled,rows:"1"},null,42,Pd)])],2),yn.value&&V.value?(e.openBlock(),e.createElementBlock("div",Od,[e.renderSlot(o.$slots,"description-slot")])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:e.normalizeClass(["editor-comment-marker-group",{"editor-comment-marker-active":pt.value===a.id,"editor-comment-marker-group-out-of-view":a.opacity===0}]),"data-comment-id":a.id,style:e.normalizeStyle({top:a.top+"px"}),onMouseenter:r=>Eo(a),onMouseleave:zo},[a.firstUser?(e.openBlock(),e.createElementBlock("div",{key:0,class:"editor-comment-marker editor-comment-marker-first",onClick:e.withModifiers(r=>uo(a),["stop"])},[a.firstUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.firstUser.avatar,alt:a.firstUser.name||"avatar"},null,8,Zd)):(e.openBlock(),e.createElementBlock("span",Ud,e.toDisplayString(a.firstUser.initials||(a.firstUser.name?a.firstUser.name.charAt(0):"")),1))],8,Wd)):e.createCommentVNode("",!0),a.secondUser?(e.openBlock(),e.createElementBlock("div",{key:1,class:"editor-comment-marker editor-comment-marker-second",onClick:e.withModifiers(r=>uo(a),["stop"])},[a.secondUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.secondUser.avatar,alt:a.secondUser.name||"avatar"},null,8,Yd)):(e.openBlock(),e.createElementBlock("span",jd,e.toDisplayString(a.secondUser.initials||(a.secondUser.name?a.secondUser.name.charAt(0):"")),1))],8,Xd)):e.createCommentVNode("",!0),a.additionalCount>0?(e.openBlock(),e.createElementBlock("div",{key:2,class:"editor-comment-marker editor-comment-marker-additional",style:e.normalizeStyle({top:a.secondUser?"30px":"15px"}),"data-has-second-user":a.secondUser?"true":"false",onClick:e.withModifiers(r=>uo(a),["stop"])},[e.createElementVNode("span",Gd,"+"+e.toDisplayString(a.additionalCount),1)],12,Kd)):e.createCommentVNode("",!0)],46,qd))),128)),$.richText?(e.openBlock(),e.createElementBlock("div",o1,[e.createElementVNode("div",{ref_key:"editorRef",ref:f,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(z.value),onInput:xe,onBlur:Pe,onClick:il,onMouseup:go,onKeyup:go,onKeydown:O,onPaste:xl,onMousemove:Ho,onMouseleave:Ro},null,38),e.createVNode(e.Transition,{name:"comment-overlay"},{default:e.withCtx(()=>[pt.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-overlay",style:e.normalizeStyle(nl.value)},[Kl.value||_l.value.length>0?(e.openBlock(),e.createElementBlock("div",a1,[e.createElementVNode("div",s1,[Kl.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-selection",innerHTML:Kl.value},null,8,r1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",i1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_l.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:"dss-comment-message"},[a.user&&(a.user.avatar||a.user.initials||a.user.name)?(e.openBlock(),e.createElementBlock("div",c1,[e.createElementVNode("div",u1,[a.user.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.user.avatar,alt:a.user.name||"avatar"},null,8,d1)):(e.openBlock(),e.createElementBlock("span",m1,e.toDisplayString(a.user.initials||(a.user.name?a.user.name.charAt(0):"")),1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",p1,[e.createElementVNode("div",f1,[e.createElementVNode("div",v1,e.toDisplayString(a.user&&a.user.name||"Comment"),1),a.createdAt?(e.openBlock(),e.createElementBlock("div",g1,e.toDisplayString(to(new Date(a.createdAt))),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-comment-body-text",{"comment-started":En(a.text)||a.class==="comment-started"}])},e.toDisplayString(a.text||""),3)]),A.commentUser&&a.user&&a.user.id===A.commentUser.id&&!En(a.text)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-comment-delete-button",onClick:e.withModifiers(c=>ao(a,r),["stop"]),title:e.unref(_)("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,h1)):e.createCommentVNode("",!0)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",y1,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"commentInputRef",ref:ol,"onUpdate:modelValue":n[26]||(n[26]=a=>rl.value=a),class:"dss-comment-input",rows:"1",placeholder:e.unref(_)("textEditor.comment.placeholder"),onKeydown:e.withKeys(e.withModifiers(oo,["prevent","stop"]),["enter"]),onInput:n[27]||(n[27]=()=>{if(ol.value){const a=ol.value;a.style.height="auto",a.style.height=`${a.scrollHeight}px`}})},null,40,k1),[[e.vModelText,rl.value]]),e.createElementVNode("button",{type:"button",class:"dss-comment-send-button",onClick:e.withModifiers(oo,["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",C1,[e.createElementVNode("div",b1,[e.createElementVNode("span",w1,e.toDisplayString(ue.value)+" "+e.toDisplayString(ue.value===1?e.unref(_)("textEditor.footer.word"):e.unref(_)("textEditor.footer.words")),1),n[70]||(n[70]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",x1,e.toDisplayString(He.value)+" "+e.toDisplayString(He.value===1?e.unref(_)("textEditor.footer.character"):e.unref(_)("textEditor.footer.characters")),1)])])])):(e.openBlock(),e.createElementBlock("div",Qd,[e.createElementVNode("textarea",{value:$.modelValue,onInput:Sn,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-textarea",{"dss-text-editor-fixed-height":$.fixedHeight}]),placeholder:xt.value,rows:$.rows,disabled:$.disabled,style:e.normalizeStyle(fl.value)},null,46,Jd),e.createElementVNode("div",e1,[e.createElementVNode("div",t1,[e.createElementVNode("span",l1,e.toDisplayString(ue.value)+" "+e.toDisplayString(ue.value===1?e.unref(_)("textEditor.footer.word"):e.unref(_)("textEditor.footer.words")),1),n[67]||(n[67]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",n1,e.toDisplayString(He.value)+" "+e.toDisplayString(He.value===1?e.unref(_)("textEditor.footer.character"):e.unref(_)("textEditor.footer.characters")),1)])])])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[ne.value&&pe.value&&f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(H.value),onMouseenter:n[28]||(n[28]=a=>ye.value=!0),onMouseleave:an},[e.createElementVNode("span",{class:"dss-link-popup-url",onClick:e.withModifiers(Co,["stop"]),title:pe.value},e.toDisplayString(pe.value),9,E1),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(bo,["stop"]),title:e.unref(_)("textEditor.link.editLink")},[(e.openBlock(),e.createElementBlock("svg",V1,[...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,S1)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Bt.value&&qt.value&&f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(te.value),onMouseenter:n[29]||(n[29]=a=>Ae.value=!0),onMouseleave:Mn},[e.createElementVNode("div",N1,[qt.value===e.unref(_)("textEditor.image.noAlt")?(e.openBlock(),e.createElementBlock("div",B1,[...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:qt.value},e.toDisplayString(qt.value),9,M1)]),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(Io,["stop"]),title:e.unref(_)("textEditor.image.editImage")},[(e.openBlock(),e.createElementBlock("svg",$1,[...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,_1)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[$.floatingToolbar&&$.richText&&kt.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floatingToolbarRef",ref:Pt,class:"dss-floating-toolbar",style:e.normalizeStyle(Ze.value),onMousedown:n[44]||(n[44]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",L1,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(Dn,["stop"]),title:e.unref(_)("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,T1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!Z.value}]),onClick:e.withModifiers(Fl,["stop"]),title:e.unref(_)("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,A1),n[89]||(n[89]=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[30]||(n[30]=e.withModifiers(a=>zn("paragraph"),["stop"])),title:e.unref(_)("textEditor.toolbar.paragraphFormat")},[S.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:F.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,R1)):S.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:F.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,I1)):S.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:F.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,F1)):S.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:F.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,z1)):S.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:F.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,P1)):S.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:F.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,O1)):(e.openBlock(),e.createElementBlock("svg",q1,[...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,H1),st.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]=a=>mn("<h1>"))},[e.createElementVNode("h1",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[32]||(n[32]=a=>mn("<h2>"))},[e.createElementVNode("h2",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[33]||(n[33]=a=>mn("<h3>"))},[e.createElementVNode("h3",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[34]||(n[34]=a=>mn("<h4>"))},[e.createElementVNode("h4",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[35]||(n[35]=a=>mn("<h5>"))},[e.createElementVNode("h5",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[36]||(n[36]=a=>mn("<h6>"))},[e.createElementVNode("h6",null,e.toDisplayString(e.unref(_)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[37]||(n[37]=a=>mn("<p>"))},[e.createElementVNode("p",null,e.toDisplayString(e.unref(_)("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":wl("bold")}]),onClick:n[39]||(n[39]=e.withModifiers(a=>jl("bold"),["stop"])),title:e.unref(_)("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,W1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":wl("italic")}]),onClick:n[40]||(n[40]=e.withModifiers(a=>jl("italic"),["stop"])),title:e.unref(_)("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,Z1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":wl("underline")}]),onClick:n[41]||(n[41]=e.withModifiers(a=>jl("underline"),["stop"])),title:e.unref(_)("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,U1),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":yt.value}]),onClick:e.withModifiers(Zn,["stop"]),title:e.unref(_)("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,X1),n[92]||(n[92]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:e.withModifiers(Rn,["stop"]),title:e.unref(_)("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,j1)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:e.withModifiers(Hn,["stop"]),title:e.unref(_)("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,Y1)),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":wl("insertUnorderedList")}]),onClick:e.withModifiers(k,["stop"]),title:e.unref(_)("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,K1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":wl("insertOrderedList")}]),onClick:e.withModifiers(y,["stop"]),title:e.unref(_)("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,G1),n[94]||(n[94]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(Qt,["stop"]),title:e.unref(_)("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,Q1),n[95]||(n[95]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",title:e.unref(_)("textEditor.toolbar.comment"),onClick:e.withModifiers(po,["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,J1),$.askAi?(e.openBlock(),e.createElementBlock("div",em)):e.createCommentVNode("",!0),$.askAi?(e.openBlock(),e.createElementBlock("div",tm,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-ai-float dss-toolbar-dropdown-toggle",onClick:n[42]||(n[42]=e.withModifiers(a=>zn("askAi"),["stop"])),title:e.unref(_)("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",nm,e.toDisplayString(e.unref(_)("textEditor.toolbar.askAi")),1)],8,lm),st.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)]),Ul.value?(e.openBlock(),e.createElementBlock("div",om,[$.askAi&&Ul.value?(e.openBlock(),e.createElementBlock("div",am)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.customToolbarSlots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[Yt(a)&&Ml(a)?(e.openBlock(),e.createElementBlock("div",sm,[e.renderSlot(o.$slots,a)])):e.createCommentVNode("",!0),Yt(a)&&Ml(a)&&r<$.customToolbarSlots.length-1&&Zl(r)?(e.openBlock(),e.createElementBlock("div",rm)):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)]))],6))}}),um={class:"dss-color-picker__section-title"},dm={class:"dss-color-picker__presets-row"},mm=["title","onClick"],pm={key:1,class:"dss-color-picker__section"},fm={class:"dss-color-picker__presets-row"},vm=["title","onClick"],gm={class:"dss-color-picker__section"},hm={class:"dss-color-picker__section-header"},ym={class:"dss-color-picker__presets-row"},km=["title","onClick"],Cm=["onClick"],bm={key:1,class:"dss-color-picker__presets-row dss-color-picker__presets-row--standalone"},wm=["title","onClick"],xm={class:"dss-color-picker__input-row"},Em=["value"],Sm={__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}},emits:["update:modelValue","update:presetColors"],setup($,{emit:J}){function B(q){const U=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(q);if(!U)return{h:0,s:0,l:50};const le=parseInt(U[1],16)/255,re=parseInt(U[2],16)/255,Fe=parseInt(U[3],16)/255,ut=Math.max(le,re,Fe),Vt=Math.min(le,re,Fe);let ze=0,bt=0;const zt=(ut+Vt)/2;if(ut!==Vt){const el=ut-Vt;switch(bt=zt>.5?el/(2-ut-Vt):el/(ut+Vt),ut){case le:ze=((re-Fe)/el+(re<Fe?6:0))/6;break;case re:ze=((Fe-le)/el+2)/6;break;case Fe:ze=((le-re)/el+4)/6;break}}return{h:ze*360,s:bt*100,l:zt*100}}function _(q,U,le){U/=100,le/=100;const re=U*Math.min(le,1-le),Fe=ut=>{const Vt=(ut+q/30)%12,ze=le-re*Math.max(Math.min(Vt-3,9-Vt,1),-1);return Math.round(255*ze).toString(16).padStart(2,"0")};return`#${Fe(0)}${Fe(8)}${Fe(4)}`}function ie(q){const U=q.replace(/^#/,"").match(/^([a-f\d]{6}|[a-f\d]{3})$/i);if(!U)return null;let le=U[1];return le.length===3&&(le=le.split("").map(re=>re+re).join("")),"#"+le}function F(q,U,le){U/=100,le/=100;const re=le+U*Math.min(le,1-le),Fe=re===0?0:2-2*le/re;return{h:q,s:Fe*100,v:re*100}}function A(q,U,le){U/=100,le/=100;const re=le*(1-U/2),Fe=re===0||re===1?0:(le-re)/Math.min(re,1-re);return{h:q,s:Fe*100,l:re*100}}const X=$,Ke=J,ge=e.ref(!1),f=e.ref(!1),Ce=e.ref(!1),ve=e.ref(-1),ee=e.ref(-1),ne=e.ref(null),pe=e.ref(null),H=e.ref(null),ye=e.ref(null),Te=e.ref({top:0,left:0}),We=e.ref(B(X.modelValue||"#b8a5de")),it=e.computed(()=>Array.isArray(X.presetGroups)&&X.presetGroups.length>0),I=e.computed(()=>it.value?0:X.initialPresetCount!=null?X.initialPresetCount:ee.value<0?null:ee.value),we=e.computed(()=>{const q=I.value;return q==null?!0:Math.max(0,X.presetColors.length-q)<X.max}),_e=e.computed(()=>!!(f.value||ve.value>=0||!ke.value&&X.presetColors.length===0));e.computed(()=>{const q=I.value;return q!=null&&X.presetColors.length>q});const ke=e.computed(()=>it.value||I.value!=null),ft=e.computed(()=>{const q=I.value;return q==null?[]:X.presetColors.slice(0,q)}),yt=e.computed(()=>{const q=I.value;return q==null?[]:X.presetColors.slice(q)});function de(q){const U=I.value;return U!=null?U+q:-1}function kt(q){const U=I.value;return U!=null&&q>=U}function Ze(q){kt(q)&&(ve.value=q,We.value=B(X.presetColors[q]),f.value=!0,e.nextTick(()=>ye.value?.focus()))}function Pt(q){if(!kt(q))return;const U=X.presetColors.filter((Fe,ut)=>ut!==q);Ke("update:presetColors",U);const le=ie(X.modelValue),re=ie(X.presetColors[q]);if(le&&re&&le.toLowerCase()===re.toLowerCase()){const Fe=U[Math.max(0,q-1)]||U[0];Fe&&Ke("update:modelValue",Fe)}}function st(){Ce.value=!Ce.value,Ce.value||(ve.value=-1,f.value=!1)}function St(){if(ve.value<0)return;const q=j.value,U=ie(q);if(U){const le=[...X.presetColors];le[ve.value]=U,Ke("update:presetColors",le),Ke("update:modelValue",U),ve.value=-1,f.value=!1}}function At(){X.disabled||(ve.value=-1,f.value=!f.value,f.value&&(Bt(),e.nextTick(()=>ye.value?.focus())))}function Ut(q){const U=ie(q),le=ie(X.modelValue);return U&&le&&U.toLowerCase()===le.toLowerCase()}function Ft(){if(X.disabled||!we.value)return;const q=j.value,U=ie(q);if(U){const le=[...X.presetColors,U];Ke("update:presetColors",le),Ke("update:modelValue",U);const re=I.value??ee.value;re>=0&&le.length-re>=X.max&&(f.value=!1)}}const j=e.computed(()=>{const{h:q,s:U,l:le}=We.value;return _(q,U,le)}),ce=e.computed(()=>j.value.toLowerCase()),Ie=e.computed(()=>({background:`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${We.value.h}, 100%, 50%))`})),Xe=e.computed(()=>{const q=F(We.value.h,We.value.s,We.value.l);return{left:`${q.s}%`,bottom:`${q.v}%`,transform:"translate(-50%, 50%)"}}),Ot=e.computed(()=>({left:`${We.value.h/360*100}%`,transform:"translateX(-50%)"})),Qe=e.computed(()=>({position:"fixed",left:`${Te.value.left}px`,top:`${Te.value.top}px`,zIndex:1002}));function lt(){if(!ne.value||!ge.value)return;const q=ne.value.getBoundingClientRect(),U=window.innerHeight||document.documentElement.clientHeight;let le=q.bottom+4;const re=pe.value;re&&le+re.offsetHeight>U-8&&(le=q.top-4-re.offsetHeight),Te.value={top:le,left:q.left}}function Bt(){const q=X.modelValue||"#b8a5de";ie(q)&&(We.value=B(q))}function qt(){Ke("update:modelValue",j.value)}function te(){X.disabled||(ge.value=!ge.value,ge.value&&(Bt(),e.nextTick(()=>{lt(),ye.value?.focus()})))}function Ae(){const q=j.value,U=ie(q);if(U){if(ve.value>=0){const le=[...X.presetColors];le[ve.value]=U,Ke("update:presetColors",le),Ke("update:modelValue",U)}else if((X.presetColors.length>0||it.value)&&f.value&&we.value&&!X.presetColors.some(re=>ie(re)?.toLowerCase()===U.toLowerCase())){const re=[...X.presetColors,U];Ke("update:presetColors",re),Ke("update:modelValue",U)}}ge.value=!1,f.value=!1,Ce.value=!1,ve.value=-1}function Me(q){if(!H.value)return;const U=H.value.getBoundingClientRect(),le=re=>{const Fe=Math.max(0,Math.min(1,(re.clientX-U.left)/U.width)),ut=Math.max(0,Math.min(1,1-(re.clientY-U.top)/U.height)),Vt={h:We.value.h,s:Fe*100,v:ut*100};We.value=A(Vt.h,Vt.s,Vt.v)};le(q),document.addEventListener("mousemove",le),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",le),qt()},{once:!0})}function je(q){if(!q.currentTarget)return;const le=q.currentTarget.getBoundingClientRect(),re=Fe=>{const ut=Math.max(0,Math.min(1,(Fe.clientX-le.left)/le.width));We.value={...We.value,h:ut*360}};re(q),document.addEventListener("mousemove",re),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",re),qt()},{once:!0})}function ct(q){const U=q.target.value,le=ie(U);le&&(We.value=B(le),Ke("update:modelValue",le))}function Ge(q){if(X.disabled)return;const U=ie(q);U&&(We.value=B(U),Ke("update:modelValue",U))}let tt=null,vt=null;function De(){tt&&(document.removeEventListener("keydown",tt),tt=null),vt&&(window.removeEventListener("resize",vt),vt=null)}return e.watch(ge,q=>{if(De(),q){if(!it.value&&X.initialPresetCount==null){const U=X.presetColors.length;U>0&&(ee.value<0||U<ee.value)&&(ee.value=U)}tt=U=>{U.key==="Escape"&&Ae()},vt=lt,document.addEventListener("keydown",tt),window.addEventListener("resize",vt)}}),e.watch(()=>X.modelValue,()=>{ge.value&&Bt()},{immediate:!1}),e.watch(yt,q=>{q.length===0&&(Ce.value=!1,ve.value=-1,f.value=!1)}),e.onBeforeUnmount(De),(q,U)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-color-picker",{"dss-color-picker--disabled":$.disabled}])},[e.createElementVNode("div",{ref_key:"triggerRef",ref:ne,class:e.normalizeClass(["dss-color-picker__trigger",{"dss-color-picker__trigger--open":ge.value}]),onClick:te},[e.createElementVNode("span",{class:"dss-color-picker__swatch",style:e.normalizeStyle({backgroundColor:j.value})},[...U[0]||(U[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"},[ge.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-color-picker__overlay",onClick:e.withModifiers(Ae,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:pe,class:"dss-color-picker__dropdown",style:e.normalizeStyle(Qe.value)},[ke.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[it.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList($.presetGroups,(le,re)=>(e.openBlock(),e.createElementBlock("div",{key:"g-"+re,class:"dss-color-picker__section"},[e.createElementVNode("span",um,e.toDisplayString(le.title),1),e.createElementVNode("div",dm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.colors,(Fe,ut)=>(e.openBlock(),e.createElementBlock("button",{key:"g-"+re+"-"+ut,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":Ut(Fe)}]),style:e.normalizeStyle({backgroundColor:Fe}),title:Fe,onClick:e.withModifiers(Vt=>Ge(Fe),["stop"])},null,14,mm))),128))])]))),128)):ft.value.length?(e.openBlock(),e.createElementBlock("div",pm,[U[1]||(U[1]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Preset colors",-1)),e.createElementVNode("div",fm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ft.value,(le,re)=>(e.openBlock(),e.createElementBlock("button",{key:"p-"+re,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":Ut(le)}]),style:e.normalizeStyle({backgroundColor:le}),title:le,onClick:e.withModifiers(Fe=>Ge(le),["stop"])},null,14,vm))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",gm,[e.createElementVNode("div",hm,[U[3]||(U[3]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Custom Colors",-1)),yt.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":Ce.value}]),title:"Manage custom colors",onClick:e.withModifiers(st,["stop"])},[...U[2]||(U[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",ym,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt.value,(le,re)=>(e.openBlock(),e.createElementBlock("div",{key:"c-"+re,class:e.normalizeClass(["dss-color-picker__preset-wrap",{"dss-color-picker__preset-wrap--manage":Ce.value}])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":!Ce.value&&Ut(le),"dss-color-picker__preset-bubble--editing":Ce.value&&ve.value===de(re)}]),style:e.normalizeStyle({backgroundColor:ve.value===de(re)?j.value:le}),title:ve.value===de(re)?j.value:le,onClick:e.withModifiers(Fe=>Ce.value?Ze(de(re)):Ge(le),["stop"])},null,14,km),Ce.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(Fe=>Pt(de(re)),["stop"])},[...U[4]||(U[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,Cm)):e.createCommentVNode("",!0)],2))),128)),we.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":f.value}]),onClick:e.withModifiers(At,["stop"])}," + ",2)):e.createCommentVNode("",!0)])])],64)):$.presetColors.length?(e.openBlock(),e.createElementBlock("div",bm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.presetColors,(le,re)=>(e.openBlock(),e.createElementBlock("button",{key:re,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":Ut(le)}]),style:e.normalizeStyle({backgroundColor:le}),title:le,onClick:e.withModifiers(Fe=>Ge(le),["stop"])},null,14,wm))),128)),we.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":f.value}]),onClick:e.withModifiers(At,["stop"])}," + ",2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",{class:"dss-color-picker__sl-area",ref_key:"slAreaRef",ref:H,onMousedown:Me},[e.createElementVNode("div",{class:"dss-color-picker__sl-bg",style:e.normalizeStyle(Ie.value)},null,4),e.createElementVNode("div",{class:"dss-color-picker__sl-pointer",style:e.normalizeStyle(Xe.value)},null,4)],544),e.createElementVNode("div",{class:"dss-color-picker__hue-wrap",onMousedown:je},[U[5]||(U[5]=e.createElementVNode("div",{class:"dss-color-picker__hue-track"},null,-1)),e.createElementVNode("div",{class:"dss-color-picker__hue-pointer",style:e.normalizeStyle(Ot.value)},null,4)],32),e.createElementVNode("div",xm,[e.createElementVNode("input",{ref_key:"hexInputRef",ref:ye,type:"text",class:"dss-color-picker__hex-input",value:ce.value,onInput:ct},null,40,Em)]),ke.value&&($.presetColors.length||it.value)&&we.value&&ve.value<0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__add-btn",onClick:Ft}," Save color ")):e.createCommentVNode("",!0),ke.value&&ve.value>=0?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-color-picker__add-btn",onClick:St}," 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:Ae}," Save color "))],64)):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]))],2))}},Vm={key:0,class:"dss-loader"},Nm={key:0,class:"dss-loader-label"},Bm={key:1,class:"dss-loader"},Mm={key:0,class:"dss-loader-label"},_m={key:2,class:"dss-loader"},$m={key:0,class:"dss-loader-label"},Lm={key:3,class:"dss-loader"},Tm={key:0,class:"dss-loader-label"},Am={key:4,class:"dss-loader"},Dm={key:0,class:"dss-loader-label"},Hm={key:5,class:"dss-loader dss-loader--inline"},Rm={class:"dss-loader-inline-text"},Im={__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=$,B=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),_=e.computed(()=>{const ie={};if(!(J.size==="small"||J.size==="medium"||J.size==="large"||J.size==null)){const F=typeof J.size=="number"?`${J.size}px`:String(J.size);ie["--dss-loader-size"]=F}return J.color&&(ie["--dss-loader-accent"]=J.color,ie["--dss-loader-accent-soft"]=`color-mix(in srgb, ${J.color} 30%, white)`),ie});return(ie,F)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-loaders",B.value]),style:e.normalizeStyle(_.value)},[$.type==="spinner"?(e.openBlock(),e.createElementBlock("div",Vm,[F[0]||(F[0]=e.createElementVNode("span",{class:"dss-loader-spinner","aria-hidden":"true"},null,-1)),$.label?(e.openBlock(),e.createElementBlock("span",Nm,e.toDisplayString($.label),1)):e.createCommentVNode("",!0)])):$.type==="dots"?(e.openBlock(),e.createElementBlock("div",Bm,[F[1]||(F[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",Mm,e.toDisplayString($.label),1)):e.createCommentVNode("",!0)])):$.type==="battery"?(e.openBlock(),e.createElementBlock("div",_m,[F[2]||(F[2]=e.createElementVNode("div",{class:"battery","aria-hidden":"true"},null,-1)),$.label?(e.openBlock(),e.createElementBlock("span",$m,e.toDisplayString($.label),1)):e.createCommentVNode("",!0)])):$.type==="double-circle"?(e.openBlock(),e.createElementBlock("div",Lm,[F[3]||(F[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",Tm,e.toDisplayString($.label),1)):e.createCommentVNode("",!0)])):$.type==="bars"?(e.openBlock(),e.createElementBlock("div",Am,[F[4]||(F[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",Dm,e.toDisplayString($.label),1)):e.createCommentVNode("",!0)])):$.type==="inline"?(e.openBlock(),e.createElementBlock("div",Hm,[F[5]||(F[5]=e.createElementVNode("span",{class:"dss-loader-inline-spinner","aria-hidden":"true"},null,-1)),e.createElementVNode("span",Rm,[e.renderSlot(ie.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString($.label),1)])])])):e.createCommentVNode("",!0)],6))}},jo="dss-skeleton-item",Fm={__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:jo},bgColor:{type:String,default:null},shimmerColor:{type:String,default:null},bgDark:{type:String,default:null},shimmerDark:{type:String,default:null}},setup($){const J=$,B=e.computed(()=>{const F={"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!==jo&&(F[`dss-skeleton--target-${J.targetClass}`]=!0),F}),_=e.computed(()=>{const F={};return J.borderRadius&&(F.borderRadius=J.borderRadius),F}),ie=e.computed(()=>{const F={};return J.borderRadius&&(F["--dss-skeleton-border-radius"]=J.borderRadius),J.darkMode?(F["--dss-skeleton-bg"]=J.bgDark||"#322c3f",F["--dss-skeleton-shimmer"]=J.shimmerDark||"#3e3f41",F):(J.bgColor&&(F["--dss-skeleton-bg"]=J.bgColor),J.shimmerColor&&(F["--dss-skeleton-shimmer"]=J.shimmerColor),F)});return(F,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-skeleton",B.value]),style:e.normalizeStyle(ie.value)},[$.loading&&$.mode==="single"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-skeleton-overlay",style:e.normalizeStyle(_.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(F.$slots,"default")],2)],6))}},zm={key:0,class:"dss-dnd-column-header"},Pm={class:"dss-dnd-column-title"},Om={class:"dss-dnd-column-count"},qm=["data-column"],Wm={key:0,class:"dss-dnd-indicator"},Zm=["onPointerdown"],Um=["onPointerdown"],Xm={class:"dss-dnd-item-content"},Ym={class:"dss-dnd-item-default"},jm={key:0,class:"dss-dnd-empty"},Km={name:"DSSDnd"},Gm=Object.assign(Km,{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 B=$,_=J,ie=e.useSlots(),F=e.computed(()=>!!ie["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},X=e.computed(()=>({...A,...B.options})),Ke=e.computed(()=>({"--dss-dnd-col-min-w":X.value.columnMinWidth,"--dss-dnd-col-max-w":X.value.columnMaxWidth,"--dss-dnd-col-gap":X.value.columnGap,"--dss-dnd-indicator-color":X.value.indicatorColor,"--dss-dnd-body-max-h":X.value.columnBodyMaxHeight}));function ge(te){if(!X.value.ColColor||!te)return{};const Ae=te.background||te.color;return Ae?{background:Ae}:{}}const f=e.ref(null),Ce=e.ref(null),ve=e.ref(!1),ee=e.ref(-1),ne=e.ref(null);let pe=null,H=null,ye=null,Te=null,We=0,it=0,I="",we=null;const _e=5,ke=e.computed(()=>{const te={};for(const Ae of B.columns)te[Ae.value]=B.items.filter(Me=>Me[B.columnKey]===Ae.value).sort((Me,je)=>(Me[B.positionKey]??0)-(je[B.positionKey]??0));return te}),ft=e.computed(()=>{const te={},Ae=!!f.value,Me=f.value?.[B.itemKey],je=Ce.value,ct=ee.value;for(const Ge of B.columns){const tt=ke.value[Ge.value]||[],vt=[],De=je==Ge.value;let q=0;for(let U=0;U<tt.length;U++){const le=tt[U],re=Ae&&le[B.itemKey]===Me;!re&&De&&ct===q&&vt.push({type:"indicator",key:`ind-${q}`}),re||q++,vt.push({type:"item",item:le,isDragged:re,key:`item-${le[B.itemKey]}`})}De&&ct>=q&&vt.push({type:"indicator",key:"ind-end"}),te[Ge.value]=vt}return te});function yt(te,Ae){const je=(ke.value[te]||[]).filter(tt=>tt[B.itemKey]!==f.value?.[B.itemKey]);if(je.length===0)return 1;if(Ae<=0){const tt=je[0][B.positionKey];return tt!=null&&tt>0?tt/2:.5}if(Ae>=je.length){const tt=je[je.length-1][B.positionKey];return(tt??0)+1}const ct=je[Ae-1][B.positionKey]??0,Ge=je[Ae][B.positionKey]??0;return(ct+Ge)/2}function de(te,Ae,Me){ye&&ye.remove();const je=te.getBoundingClientRect(),ct=te.cloneNode(!0);ct.classList.add("dss-dnd-ghost"),ct.style.cssText=`
|
|
100
|
+
</svg>`,f=e.ref(null),we=e.ref(null),ge=e.ref(!1),ne=e.ref(!1),ae=e.ref(!1),ve=e.ref(""),H=e.ref({}),Ce=e.ref(!1),Ae=e.ref(!1),qe=e.ref(""),it=e.ref(""),R=e.ref(null),xe=e.ref(null),Be=e.ref(null),ke=e.ref(null),dt=e.ref(""),ft=e.ref(!1),de=e.ref({}),vt=e.ref(!1),We=e.ref({}),Pt=e.ref(null),rt=e.ref(null),Et=e.ref(!1),Tt=e.ref(""),Wt=e.ref(null),Ft=e.ref(""),G=e.ref(""),ue=e.ref(""),He=e.ref(null),Xe=e.ref(null),Zt=e.ref(null),kt=e.ref(null),xt=e.ref(null),Mt=e.ref(!1),Ut=e.ref(""),Q=e.ref({}),be=e.ref(!1),Me=e.ref("upload"),Ze=e.ref(""),et=e.ref(null),mt=e.ref(null),je=e.ref([]),_t=e.ref([]),Re=e.ref(null),P=e.ref(!1),X=e.ref(""),j=e.ref(""),me=e.ref(""),ze=e.ref(""),nt=e.ref(""),St=e.ref(""),Pe=e.ref(null),gt=e.ref(null),Ot=e.ref(null),an=e.ref(!1),$t=e.ref(null),sn=e.ref(!1),V=e.ref(!1),w=e.ref(null),E=e.ref("p"),Y=e.ref(!1),le=e.ref([]),Ye=e.ref(null),ot=e.ref(null),Ve=e.ref(null),Fe=e.ref(!1),It=e.ref(0),Ht=100,at=e.ref(null),Ge=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!==null})),Lt=e.computed(()=>({})),In=e.computed(()=>!A.fixedHeight||A.fullHeight?{}:{height:`${1.6*14*A.rows+24+2}px`,resize:"none",overflowY:"auto"}),O=e.computed(()=>!A.fixedHeight||A.fullHeight?{}:{height:`${1.6*14*A.rows+32}px`,overflowY:"auto"}),W=e.computed(()=>A.richText&&_t.value.length>0),q=e.computed(()=>{if(!A.modelValue)return"";if(A.richText){let o=A.modelValue.replace(/<script[^>]*>[\s\S]*?<\/script>/gi,"");return o=o.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,""),o=o.replace(/<[^>]+>/g,""),o=o.replace(/ /g," "),o=o.replace(/&/g,"&"),o=o.replace(/</g,"<"),o=o.replace(/>/g,">"),o=o.replace(/"/g,'"'),o=o.replace(/'/g,"'"),o=o.replace(/\s+/g," ").trim(),o}return A.modelValue}),se=e.computed(()=>{const o=q.value.trim();return o?o.split(/\s+/).filter(l=>l.length>0).length:0}),Ie=e.computed(()=>q.value.length),ct=e.computed(()=>kt.value!==null&&Me.value==="upload"&&Ft.value&&Ft.value.startsWith("data:")),pt=e.computed(()=>A.titlePlaceholder||L("textEditor.placeholders.title")),Qe=e.computed(()=>A.descriptionPlaceholder||L("textEditor.placeholders.description")),Ct=e.computed(()=>A.placeholder||L("textEditor.placeholders.startTyping")),Xt=o=>Ke&&Ke[o]!==void 0,An=o=>{for(let l=o+1;l<A.customToolbarSlots.length;l++)if(Xt(A.customToolbarSlots[l]))return!0;return!1},Dn=o=>{for(let l=o+1;l<A.customToolbarSlots.length;l++){const a=A.customToolbarSlots[l];if(Xt(a)&&Hn(a))return!0}return!1},Hn=o=>A.customToolbarFloatingMap.hasOwnProperty(o)?A.customToolbarFloatingMap[o]===!0:!0,sl=e.computed(()=>A.customToolbarSlots.some(o=>Xt(o)&&Hn(o))),Rn=e.computed(()=>Xt("title-slot")),yl=e.computed(()=>Xt("description-slot")),kl=o=>{if(!o||o.trim()==="")return"<html></html>";const l=o.trim();return l.startsWith("<html>")&&l.endsWith("</html>")?o:`<html>${o}</html>`},Cl=o=>{if(!o||o.trim()==="")return"";const l=o.replace(/<!--[\s\S]*?-->/g,""),a=l.trim();return a.startsWith("<html>")&&a.endsWith("</html>")?a.slice(6,-7).trim():l},Bl=o=>{if(!o)return;const l=document.createTreeWalker(o,NodeFilter.SHOW_COMMENT,null,!1),a=[];let r=l.nextNode();for(;r;)a.push(r),r=l.nextNode();a.forEach(c=>c.remove())},Fl=o=>{try{const l=String(o.getDate()).padStart(2,"0"),r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o.getMonth()],c=o.getFullYear();return`${l} ${r} ${c}`}catch{return""}},bl=o=>{if(!o||typeof o!="string")return!1;const l=o.trim();if(!l)return!1;if(["Started conversation","A démarré la conversation","started_conversation","conv_started"].includes(l))return!0;try{const c=L("textEditor.started_conversation");if(c&&l===c)return!0}catch{}const r=l.toLowerCase();return r.includes("started conversation")||r.includes("démarré la conversation")||r==="started conversation"||r==="a démarré la conversation"},wl=o=>{const l=o.target.value;U("update:modelValue",l),U("change",l)},zn=()=>{if(!Pe.value)return;const o=Pe.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 r=o.value;o.value="M";const c=o.scrollHeight;o.value=r,o.style.setProperty("height",`${c}px`,"important"),o.style.setProperty("overflow-y","hidden","important");return}o.offsetHeight;const a=o.scrollHeight;o.style.setProperty("height",`${a}px`,"important"),o.style.setProperty("overflow-y","hidden","important")},Jn=()=>{sn.value=!0,zn()},gn=()=>{sn.value=!1,Vn()},Vn=()=>{if(!Pe.value)return;const o=Pe.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 l=o.value;o.value="M";const a=o.scrollHeight;o.value=l,o.offsetHeight,o.style.setProperty("height",`${a}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")},Fn=o=>{const a=o.target.value;sn.value&&zn(),U("update:title",a),U("title-change",a),Ot.value="title",A.richText&&(P.value||(j.value=X.value,nt.value=me.value,St.value=ze.value),Re.value&&clearTimeout(Re.value),P.value=!0,Re.value=setTimeout(()=>{P.value=!1,tt()},500))},Un=()=>{if(!gt.value)return;const o=gt.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 r=o.value;o.value="M";const c=o.scrollHeight;o.value=r,o.style.setProperty("height",`${c}px`,"important"),o.style.setProperty("overflow-y","hidden","important");return}o.offsetHeight;const a=o.scrollHeight;o.style.setProperty("height",`${a}px`,"important"),o.style.setProperty("overflow-y","hidden","important")},Il=()=>{V.value=!0,Un()},zl=()=>{V.value=!1,ul()},ul=()=>{if(!gt.value)return;const o=gt.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 l=o.value;o.value="M";const a=o.scrollHeight;o.value=l,o.offsetHeight,o.style.setProperty("height",`${a}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")},Ml=o=>{const a=o.target.value;V.value&&Un(),U("update:description",a),U("description-change",a),Ot.value="description",A.richText&&(P.value||(j.value=X.value,nt.value=me.value,St.value=ze.value),Re.value&&clearTimeout(Re.value),P.value=!0,Re.value=setTimeout(()=>{P.value=!1,tt()},500))},wn=()=>{const o=window.getSelection();if(o.rangeCount===0)return null;const l=o.getRangeAt(0);if(l.startContainer.nodeType===1)return{type:"element",element:l.startContainer,offset:l.startOffset};const a=l.cloneRange();return a.selectNodeContents(f.value),a.setEnd(l.startContainer,l.startOffset),{type:"text",start:a.toString().length,end:a.toString().length+l.toString().length}},Nn=o=>{if(!(!o||!f.value))try{const l=window.getSelection(),a=document.createRange();if(o.type==="element"&&o.element)if(f.value.contains(o.element)){a.setStart(o.element,o.offset),a.collapse(!0),l.removeAllRanges(),l.addRange(a);return}else{f.value.focus();return}let r=0;const c=[f.value];let d=null,u=!1,m=!1;for(;!m&&(d=c.pop());)if(d.nodeType===3){const v=r+d.length;!u&&o.start>=r&&o.start<=v&&(a.setStart(d,o.start-r),u=!0),u&&o.end>=r&&o.end<=v&&(a.setEnd(d,o.end-r),m=!0),r=v}else{let v=d.childNodes.length;for(;v--;)c.push(d.childNodes[v])}l.removeAllRanges(),l.addRange(a)}catch{f.value.focus()}},Xn=()=>{if(!f.value)return;f.value.focus();const o=window.getSelection(),l=document.createRange(),a=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],m=a(u);if(m)return m}return c},r=a(f.value);if(r.nodeType===3)l.setStart(r,r.length),l.setEnd(r,r.length);else if(r.childNodes.length>0){const c=a(r);c&&c.nodeType===3?(l.setStart(c,c.length),l.setEnd(c,c.length)):(l.selectNodeContents(r),l.collapse(!1))}else l.setStart(r,0),l.setEnd(r,0);o.removeAllRanges(),o.addRange(l)},tt=(o=!1)=>{if(!f.value)return;const l=f.value.innerHTML,a=A.title||"",r=A.description||"";if(!o&&l===X.value&&a===me.value&&r===ze.value)return;const c={content:j.value||X.value,title:nt.value!==void 0?nt.value:me.value,description:St.value!==void 0?St.value:ze.value},d=je.value.length>0?je.value[je.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&&(je.value.push(c),je.value.length>50&&je.value.shift(),_t.value=[]),X.value=l,me.value=a,ze.value=r,j.value=l,nt.value=a,St.value=r},re=o=>{if(!f.value)return;dl(),f.value&&Bl(f.value);let l=null;f.value&&(f.value.querySelector("p")||(l=wn(),ht()));const a=o&&o.inputType&&(o.inputType==="insertText"||o.inputType==="insertCompositionText"||o.inputType==="deleteContentBackward"||o.inputType==="deleteContentForward");a&&w.value&&(w.value=null),ne.value=!0;const r=f.value.innerHTML.replace(/<!--[\s\S]*?-->/g,"").replace(/ |\u00A0/g," "),c=kl(r);U("update:modelValue",c),U("change",c),Ot.value="editor",P.value||(j.value=X.value,nt.value=me.value,St.value=ze.value),Re.value&&clearTimeout(Re.value),P.value=!0,Re.value=setTimeout(()=>{P.value=!1,tt(),Zl(),Eo()},500),e.nextTick(()=>{l&&Nn(l),dl();const d=["bold","italic","underline"],u=window.getSelection(),m=u.rangeCount>0?u.getRangeAt(0):null,v=m&&m.collapsed;if(d.forEach(h=>{try{if(v&&w.value?.command===h){de.value[h]=w.value.state;return}if(h==="bold")if(m){const _=m.commonAncestorContainer,D=_.nodeType===3?_.parentElement:_;let x=!1;if(D&&((D.tagName==="STRONG"||D.tagName==="B"||D.closest&&D.closest("strong, b"))&&(x=!0),!x&&D.style&&parseInt(D.style.fontWeight)>=600&&(x=!0),!x))try{const oe=window.getComputedStyle(D);parseInt(oe.fontWeight)>=600&&(x=!0)}catch{}de.value[h]=x}else de.value.hasOwnProperty(h)||(de.value[h]=!1);else if(h==="italic")if(m){const _=m.commonAncestorContainer,D=_.nodeType===3?_.parentElement:_,x=D&&(D.tagName==="EM"||D.tagName==="I"||D.closest&&D.closest("em, i"));de.value[h]=!!x}else{const _=document.queryCommandState(h);de.value[h]=_}else{const _=document.queryCommandState(h);de.value[h]=_}}catch{}}),Z(),Vt(),_e(),en(),wt(),hn("handleRichTextInput"),a&&(o.inputType==="insertText"||o.inputType==="insertCompositionText")){const h=o.data||"";h&&h.length===1&&setTimeout(()=>Eo(h),0),(h===" "||h===`
|
|
101
|
+
`||/[.,;:!?]/.test(h))&&setTimeout(()=>{Zl()},100)}ne.value=!1})},dl=()=>{if(!f.value)return;const o=window.getSelection();if(!o||o.rangeCount===0)return;const l=o.getRangeAt(0),a=l.commonAncestorContainer,r=a.nodeType===3?a.parentElement:a;if(!r)return;const c=r.closest(".dss-image-wrapper");if(c){const d=c.querySelector("img");if(r!==d&&!d?.contains(r)){const u=l.startContainer.nodeType===3?l.startContainer.parentElement:l.startContainer,m=l.endContainer.nodeType===3?l.endContainer.parentElement:l.endContainer;if(c.contains(u)&&u!==d||c.contains(m)&&m!==d){const v=document.createRange();v.setStartAfter(c),v.collapse(!0),o.removeAllRanges(),o.addRange(v)}}}},ht=()=>{if(!f.value)return;const o=f.value;if(o.querySelector&&o.querySelector("p"))return;const l=new Set(["P","H1","H2","H3","H4","H5","H6","BLOCKQUOTE","UL","OL","DIV"]),a=Array.from(o.childNodes);let r=null;a.forEach(c=>{if(c.nodeType===Node.TEXT_NODE){if((c.textContent||"").trim()===""){c.parentNode===o&&o.removeChild(c);return}r||(r=document.createElement("p"),o.insertBefore(r,c)),r.appendChild(c);return}if(c.nodeType===Node.ELEMENT_NODE){const d=c,u=d.tagName;if(u==="BR"){r=null;return}if(l.has(u)){r=null;return}r||(r=document.createElement("p"),o.insertBefore(r,d)),r.appendChild(d)}})},Vt=()=>{if(f.value&&!an.value){an.value=!0;try{f.value.querySelectorAll(".dss-image-wrapper").forEach(r=>{r.querySelector("img")||r.remove()}),f.value.querySelectorAll(".dss-image-no-alt-icon").forEach(r=>{const c=r.parentElement;!c||!c.classList.contains("dss-image-wrapper")?r.remove():c.querySelector("img")||r.remove()}),f.value.querySelectorAll("img").forEach(r=>{let c=r.getAttribute("alt");c===null&&(c=r.alt||"");const d=r.getAttribute("src")||r.src||"";if(c){const h=d.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),_=c===d||c===h;(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("data:")||_||_)&&(c="")}r.setAttribute("alt",c),r.setAttribute("data-alt",c);const u=!c||c.trim()==="";let m=r.parentElement;const v=m&&m.classList.contains("dss-image-wrapper");if(v){const h=m.querySelector(".dss-image-no-alt-icon");h&&h.remove()}else{const h=r.nextElementSibling?.classList.contains("dss-image-no-alt-icon")?r.nextElementSibling:null;h&&h.remove()}if(u){v?m.setAttribute("contenteditable","false"):(m=document.createElement("span"),m.className="dss-image-wrapper",m.setAttribute("contenteditable","false"),r.parentNode.insertBefore(m,r),m.appendChild(r));const h=document.createElement("div");h.className="dss-image-no-alt-icon",h.setAttribute("contenteditable","false"),h.innerHTML=he,m.appendChild(h)}else if(v&&m.children.length===1){const h=m.parentNode;h.insertBefore(r,m),h.removeChild(m)}})}finally{an.value=!1}}},st=o=>{Zl(),U("blur",o),Al()},bt=()=>{if(A.disabled||!A.richText||!f.value)return;ln(),Re.value&&(clearTimeout(Re.value),Re.value=null),P.value&&(tt(),P.value=!1);const o=Ot.value==="title",l=Ot.value==="description",a=Ot.value==="editor";if(je.value.length===0){o&&Pe.value?Pe.value.focus():l&>.value?gt.value.focus():f.value.focus(),document.execCommand("undo",!1),e.nextTick(()=>{re()});return}const r={content:f.value.innerHTML,title:A.title||"",description:A.description||""};_t.value.push(r);const c=je.value.pop();if(c!==void 0){ne.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",m=typeof c=="object"&&c.description||"";f.value.innerHTML=d,X.value=d,me.value=u,ze.value=m,j.value=d,nt.value=u,St.value=m,e.nextTick(()=>{Z(),Yt(),ut(),en();const v=kl(d);U("update:modelValue",v),U("update:title",u),U("update:description",m),U("change",v),U("title-change",u),U("description-change",m),ne.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(Pe.value){Pe.value.focus();const h=u.length;Pe.value.setSelectionRange&&Pe.value.setSelectionRange(h,h),zn()}}else if(l){if(gt.value){gt.value.focus();const h=m.length;gt.value.setSelectionRange(h,h)}}else if(a)Xn();else if(Pe.value&&document.activeElement===Pe.value){const h=u.length;Pe.value.setSelectionRange&&Pe.value.setSelectionRange(h,h),zn()}else if(gt.value&&document.activeElement===gt.value){const h=m.length;gt.value.setSelectionRange(h,h)}else f.value&&Xn()},10)})})}},J=()=>{if(A.disabled||!A.richText||!f.value)return;ln();const o=Ot.value==="title",l=Ot.value==="description",a=Ot.value==="editor";if(_t.value.length===0){o&&Pe.value?Pe.value.focus():l&>.value?gt.value.focus():f.value.focus(),document.execCommand("redo",!1),e.nextTick(()=>{re()});return}const r={content:f.value.innerHTML,title:A.title||"",description:A.description||""};je.value.push(r);const c=_t.value.pop();if(c!==void 0){ne.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",m=typeof c=="object"&&c.description||"";f.value.innerHTML=d,X.value=d,me.value=u,ze.value=m,j.value=d,nt.value=u,St.value=m,e.nextTick(()=>{Z(),Yt(),ut(),en();const v=kl(d);U("update:modelValue",v),U("update:title",u),U("update:description",m),U("change",v),U("title-change",u),U("description-change",m),ne.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(Pe.value){Pe.value.focus();const h=u.length;Pe.value.setSelectionRange&&Pe.value.setSelectionRange(h,h),zn()}}else if(l){if(gt.value){gt.value.focus();const h=m.length;gt.value.setSelectionRange(h,h)}}else if(a)Xn();else if(Pe.value&&document.activeElement===Pe.value){const h=u.length;Pe.value.setSelectionRange&&Pe.value.setSelectionRange(h,h),zn()}else if(gt.value&&document.activeElement===gt.value){const h=m.length;gt.value.setSelectionRange(h,h)}else f.value&&Xn()},10)})})}},Gt=()=>{if(!f.value)return;f.value.querySelectorAll('span[style*="font-weight"]').forEach(r=>{const c=r.style.fontWeight;if(c==="normal"||c==="400"){const d=document.createDocumentFragment();for(;r.firstChild;)d.appendChild(r.firstChild);r.parentNode&&r.parentNode.replaceChild(d,r)}}),f.value.querySelectorAll('span[style*="font-weight"]').forEach(r=>{if(parseInt(r.style.fontWeight)>=600){const d=document.createElement("b");for(d.style.fontWeight="600";r.firstChild;)d.appendChild(r.firstChild);r.parentNode&&r.parentNode.replaceChild(d,r)}}),f.value.querySelectorAll("b, strong").forEach(r=>{r.style.fontWeight="600"})},_e=()=>{if(!f.value)return;f.value.querySelectorAll("i, em").forEach(l=>{l.style.fontStyle="italic"})},Pl=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const l=o.getRangeAt(0);let a=!1;if(l.collapsed){const r=l.startContainer;let c=r.nodeType===3?r.parentElement:r;for(;c&&c!==f.value;){if(c.tagName==="EM"||c.tagName==="I"){a=!0;break}if(c.style&&c.style.fontStyle==="italic"){a=!0;break}c=c.parentElement}}else{const r=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer:l.commonAncestorContainer.parentNode;if(r){const c=document.createTreeWalker(r,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let d;for(;d=c.nextNode();)if(!(typeof l.intersectsNode=="function"&&!l.intersectsNode(d))){if(d.nodeType===3){let u=d.parentElement;for(;u&&u!==f.value;){if(u.tagName==="EM"||u.tagName==="I"){a=!0;break}if(u.style&&u.style.fontStyle==="italic"){a=!0;break}u=u.parentElement}}else if(d.nodeType===1){const u=d;if(u.tagName==="EM"||u.tagName==="I"){a=!0;break}if(u.style&&u.style.fontStyle==="italic"){a=!0;break}}if(a)break}}}if(a)return document.execCommand("italic",!1),e.nextTick(()=>{_e()}),!1;if(l.collapsed)document.execCommand("italic",!1),e.nextTick(()=>{_e()});else try{const r=l.extractContents(),c=document.createElement("em");c.style.fontStyle="italic",c.appendChild(r),l.insertNode(c),l.setStartAfter(c),l.collapse(!0),o.removeAllRanges(),o.addRange(l),e.nextTick(()=>{_e()})}catch{document.execCommand("italic",!1),e.nextTick(()=>{_e()})}return!0},xl=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const l=o.getRangeAt(0);let a=!1;if(l.collapsed){const r=l.startContainer;let c=r.nodeType===3?r.parentElement:r;for(;c&&c!==f.value;){if(c.tagName==="STRONG"||c.tagName==="B"){a=!0;break}if(c.style&&parseInt(c.style.fontWeight)>=600){a=!0;break}c=c.parentElement}}else{const r=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer:l.commonAncestorContainer.parentNode;if(r){const c=document.createTreeWalker(r,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let d;for(;d=c.nextNode();)if(!(typeof l.intersectsNode=="function"&&!l.intersectsNode(d))){if(d.nodeType===3){let u=d.parentElement;for(;u&&u!==f.value;){if(u.tagName==="STRONG"||u.tagName==="B"){a=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){a=!0;break}u=u.parentElement}}else if(d.nodeType===1){const u=d;if(u.tagName==="STRONG"||u.tagName==="B"){a=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){a=!0;break}}if(a)break}}}if(a)return document.execCommand("bold",!1),e.nextTick(()=>{Gt()}),!1;if(l.collapsed)document.execCommand("bold",!1),e.nextTick(()=>{const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0),d=c.startContainer;let u=d.nodeType===3?d.parentElement:d;for(;u&&u!==f.value;){if(u.tagName==="SPAN"&&u.style.fontWeight){const m=u.style.fontWeight;if(m==="normal"||m==="400"){const v=document.createElement("b");v.style.fontWeight="600";const h=document.createDocumentFragment();for(;u.firstChild;)h.appendChild(u.firstChild);v.appendChild(h),u.parentNode&&u.parentNode.replaceChild(v,u),c.setStart(v,0),c.collapse(!0),r.removeAllRanges(),r.addRange(c);break}}else if(u.tagName==="STRONG"||u.tagName==="B"){u.style.fontWeight="600";break}u=u.parentElement}if(!u||u===f.value){const m=document.createElement("b");m.style.fontWeight="600",m.innerHTML="<br>",c.insertNode(m),c.setStart(m,0),c.collapse(!0),r.removeAllRanges(),r.addRange(c)}}Gt()});else try{const r=l.extractContents(),c=document.createElement("b");c.style.fontWeight="600",c.appendChild(r),l.insertNode(c),l.setStartAfter(c),l.collapse(!0),o.removeAllRanges(),o.addRange(l),e.nextTick(()=>{Gt()})}catch{document.execCommand("bold",!1),e.nextTick(()=>{Gt()})}return!0},Bn=(o,l=null)=>{if(A.disabled||!A.richText||!f.value)return;P.value?(Re.value&&(clearTimeout(Re.value),Re.value=null),tt(),P.value=!1):tt(),ln(),f.value.focus();const a=window.getSelection();let r=null;if(a&&a.rangeCount>0){const d=a.getRangeAt(0);!d.collapsed&&zt(d)&&(r=wn())}if(o==="createLink"&&l){const d=window.getSelection();if(d.rangeCount>0){const u=d.getRangeAt(0);if(u.collapsed)try{u.expand("word")}catch{const v=document.createTextNode(l);u.insertNode(v),u.selectNodeContents(v)}}}if(o==="bold"){const d=xl();de.value.bold=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(w.value={command:"bold",state:d}),e.nextTick(()=>{r&&(Nn(r),e.nextTick(()=>{const m=nn("bold");de.value.bold=m})),re(),Yt(),en()});return}if(o==="italic"){const d=Pl();de.value.italic=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(w.value={command:"italic",state:d}),e.nextTick(()=>{r&&(Nn(r),e.nextTick(()=>{const m=nn("italic");de.value.italic=m})),re(),_e(),Yt(),en()});return}let c=!1;try{c=document.execCommand(o,!1,l)}catch{}e.nextTick(()=>{if(r&&Nn(r),["bold","italic","underline"].includes(o))try{if(o==="bold")r&&e.nextTick(()=>{const u=nn("bold");de.value.bold=u});else if(o==="italic")if(r)e.nextTick(()=>{const u=nn("italic");de.value.italic=u});else{const u=document.queryCommandState(o);de.value[o]=u}else{const u=document.queryCommandState(o);de.value[o]=u}}catch{de.value.hasOwnProperty(o)?de.value[o]=!de.value[o]:de.value[o]=!0}if(o==="createLink"&&l){const u=window.getSelection();if(u.rangeCount>0){const v=u.getRangeAt(0),h=v.commonAncestorContainer.nodeType===1?v.commonAncestorContainer.closest("a"):v.commonAncestorContainer.parentElement?.closest("a");h&&(!h.getAttribute("href")||h.getAttribute("href")==="")&&h.setAttribute("href",l)}f.value.querySelectorAll("a").forEach(v=>{const h=v.getAttribute("href");(!h||h===""||h==="#")&&v.setAttribute("href",l)})}re(),Yt(),en()})},nn=(o,l=null)=>{if(A.disabled||!f.value)return!1;try{if(o==="formatBlock"&&l){const r=document.queryCommandValue("formatBlock");if(l==="<blockquote>"){const c=r.toLowerCase();if(c==="blockquote"||c==="<blockquote>")return!0;const d=window.getSelection();if(d.rangeCount>0){const m=d.getRangeAt(0).commonAncestorContainer;return!!(m.nodeType===1?m.tagName==="BLOCKQUOTE"?m:m.closest("blockquote"):m.parentElement?.closest("blockquote"))}}return r===l||r.toLowerCase()===l.toLowerCase()}if(["bold","italic","underline"].includes(o))try{const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0);if(o==="bold"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,v=m.nodeType===3?m.parentElement:m;if(v&&((v.tagName==="STRONG"||v.tagName==="B"||v.closest&&v.closest("strong, b"))&&(u=!0),!u&&v.style&&parseInt(v.style.fontWeight)>=600&&(u=!0),!u))try{const h=window.getComputedStyle(v);parseInt(h.fontWeight)>=600&&(u=!0)}catch{}return de.value.hasOwnProperty(o)?de.value[o]:(de.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let v=!1;if(m){const h=document.createTreeWalker(m,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let _;for(;_=h.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(_))){if(_.nodeType===3){if(!(_.textContent||"").trim())continue;v=!0;let x=_.parentElement;for(;x&&x!==f.value;){if(x.tagName==="STRONG"||x.tagName==="B"){u=!0;break}if(x.style&&parseInt(x.style.fontWeight)>=600){u=!0;break}x=x.parentElement}}else if(_.nodeType===1){const D=_;if(D.tagName==="STRONG"||D.tagName==="B"){u=!0;break}if(D.style&&parseInt(D.style.fontWeight)>=600){u=!0;break}}if(u)break}}return de.value[o]=u&&v,u&&v}}if(o==="italic"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,v=m.nodeType===3?m.parentElement:m;if(v&&((v.tagName==="EM"||v.tagName==="I"||v.closest&&v.closest("em, i"))&&(u=!0),!u&&v.style&&v.style.fontStyle==="italic"&&(u=!0),!u))try{window.getComputedStyle(v).fontStyle==="italic"&&(u=!0)}catch{}return de.value.hasOwnProperty(o)?de.value[o]:(de.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let v=!1;if(m){const h=document.createTreeWalker(m,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let _;for(;_=h.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(_))){if(_.nodeType===3){if(!(_.textContent||"").trim())continue;v=!0;let x=_.parentElement;for(;x&&x!==f.value;){if(x.tagName==="EM"||x.tagName==="I"){u=!0;break}if(x.style&&x.style.fontStyle==="italic"){u=!0;break}x=x.parentElement}}else if(_.nodeType===1){const D=_;if(D.tagName==="EM"||D.tagName==="I"){u=!0;break}if(D.style&&D.style.fontStyle==="italic"){u=!0;break}}if(u)break}}return de.value[o]=u&&v,u&&v}}const d=document.queryCommandState(o);return c.collapsed&&de.value.hasOwnProperty(o)?de.value[o]:(de.value[o]=d,d)}return de.value.hasOwnProperty(o)?de.value[o]:!1}catch{return de.value.hasOwnProperty(o)?de.value[o]:!1}try{return document.queryCommandState(o)}catch{return!1}}catch{return!1}},Pn=o=>{A.disabled||!A.richText||(we.value=we.value===o?null:o,o==="askAi"&&(rt.value=null))},ln=()=>{we.value=null,et.value=null},Mn=o=>{Bn("formatBlock",o),ln()},to=o=>{if(!o||!f.value)return o;const l=$e=>{let Se=$e.nodeType===Node.TEXT_NODE?$e.parentElement:$e;for(;Se&&Se!==f.value;){const yt=Se.tagName;if(yt==="P"){const vn=Se.parentElement;if(vn===f.value||vn.tagName==="BLOCKQUOTE")return Se}if(yt==="BLOCKQUOTE")break;Se=Se.parentElement}return null},a=l(o.startContainer),r=l(o.endContainer);if(!a||!r)return o;const c=[],d=document.createTreeWalker(f.value,NodeFilter.SHOW_ELEMENT,{acceptNode:$e=>{const Se=$e.tagName;if(Se==="P"){const yt=$e.parentElement;if(yt===f.value||yt.tagName==="BLOCKQUOTE")return NodeFilter.FILTER_ACCEPT}return Se==="BLOCKQUOTE"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}});let u;for(;u=d.nextNode();)c.push(u);const m=c.indexOf(a),v=c.indexOf(r);if(m===-1||v===-1)return o;const h=Math.min(m,v),_=Math.max(m,v),D=c.slice(h,_+1);if(D.length===0)return o;const x=D[0],oe=D[D.length-1],K=document.createRange();return K.setStartBefore(x),K.setEndAfter(oe),K},Ol=()=>{if(A.disabled||!A.richText||!f.value)return;P.value?(Re.value&&(clearTimeout(Re.value),Re.value=null),tt(),P.value=!1):tt(),ln(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;let l=o.getRangeAt(0);!l.collapsed&&zt(l)&&(l=to(l),o.removeAllRanges(),o.addRange(l));let a=null;!l.collapsed&&zt(l)&&(a=wn());const r=l.commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");if(!!(c&&f.value.contains(c))){if(c){const u=c.parentNode;Array.from(c.childNodes).forEach(v=>{if(v.nodeType===Node.ELEMENT_NODE)if(v.tagName==="P"||v.tagName==="DIV")u.insertBefore(v,c);else{const h=document.createElement("p");h.appendChild(v.cloneNode(!0)),u.insertBefore(h,c)}else if(v.nodeType===Node.TEXT_NODE&&v.textContent.trim()){const h=document.createElement("p");h.appendChild(v.cloneNode(!0)),u.insertBefore(h,c)}}),c.remove()}}else if(l.collapsed)document.execCommand("formatBlock",!1,"<blockquote>");else{const u=document.createElement("blockquote"),m=l.extractContents();u.appendChild(m),l.insertNode(u);const v=[],h=document.createTreeWalker(u,NodeFilter.SHOW_TEXT,{acceptNode:x=>x.parentNode===u&&x.textContent.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let _;for(;_=h.nextNode();)v.push(_);if(v.forEach(x=>{const oe=document.createElement("p");x.parentNode.insertBefore(oe,x),oe.appendChild(x)}),u.querySelectorAll("p, div").forEach(x=>{x.textContent.trim()===""&&!x.querySelector("img")&&(x.innerHTML="<br>")}),u.children.length===0&&u.textContent.trim()===""){const x=document.createElement("p");x.innerHTML="<br>",u.appendChild(x)}}e.nextTick(()=>{a&&Nn(a),ut(),re(),en()})},xn=()=>{if(!f.value)return;const o=window.getSelection();if(o.rangeCount===0)return;const a=o.getRangeAt(0).commonAncestorContainer,r=a.nodeType===1?a.tagName==="BLOCKQUOTE"?a:a.closest("blockquote"):a.parentElement?.closest("blockquote");if(!r||!f.value.contains(r))return;const c=_=>{if(!_)return!1;const D=_.textContent||"",oe=(_.innerHTML||"").trim();return D.trim()===""||oe===""||oe==="<br>"||oe==="<br/>"||oe==="<p></p>"||oe==="<p><br></p>"||oe==="<p><br/></p>"||oe==="<p> </p>"||oe==="<p><br> </p>"||oe==="<div></div>"||oe==="<div><br></div>"||oe==="<div><br/></div>"};let d=null;for(a.nodeType===3?d=a.parentElement:a.tagName==="P"||a.tagName==="DIV"?d=a:d=a.closest("p, div"),d&&r.contains(d)&&c(d)&&d.remove();r.lastChild;){const _=r.lastChild;if(_.nodeType===1&&_.tagName==="BR")_.remove();else if(_.nodeType===3)if((_.textContent||"").trim()==="")_.remove();else break;else break}if(r.children.length>0)for(let _=r.children.length-1;_>=0;_--){const D=r.children[_];if((D.tagName==="P"||D.tagName==="DIV")&&c(D))D.remove();else break}let u=r.innerHTML;const m=u;u=u.replace(/(<br\s*\/?>)+$/gi,""),u!==m&&(r.innerHTML=u);const v=document.createElement("p");v.innerHTML="<br>",r.parentNode?r.nextSibling?r.parentNode.insertBefore(v,r.nextSibling):r.parentNode.appendChild(v):f.value&&f.value.appendChild(v);const h=document.createRange();h.selectNodeContents(v),h.collapse(!0),o.removeAllRanges(),o.addRange(h),e.nextTick(()=>{ut(),re()})},Yt=()=>{if(!f.value){ge.value=!1;return}try{const o=window.getSelection();if(o.rangeCount>0){const a=o.getRangeAt(0).commonAncestorContainer,r=a.nodeType===1?a.closest("a"):a.parentElement?.closest("a");ge.value=!!r}else ge.value=!1}catch{ge.value=!1}},_l=()=>{if(!f.value)return;const o=window.getSelection();o&&o.rangeCount>0&&o.getRangeAt(0),ke.value=wn();const l=window.getSelection();let a="";l.rangeCount>0&&(a=l.getRangeAt(0).toString()),qe.value="",it.value=a,dt.value="",Be.value=null,Ae.value=!0,ln(),e.nextTick(()=>{R.value&&R.value.focus()})},$l=()=>{if(!f.value)return;P.value?(Re.value&&(clearTimeout(Re.value),Re.value=null),tt(),P.value=!1):tt();const o=window.getSelection();let l=null;if(o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer;l=r.nodeType===1?r.closest("a"):r.parentElement?.closest("a")}if(!l&&Be.value&&(l=Be.value),l&&l.parentNode){const a=document.createDocumentFragment();for(;l.firstChild;)a.appendChild(l.firstChild);if(l.parentNode.replaceChild(a,l),a.firstChild){const r=document.createRange();r.setStartBefore(a.firstChild),r.setEndAfter(a.lastChild||a.firstChild),o.removeAllRanges(),o.addRange(r),document.execCommand("removeFormat",!1),r.collapse(!1),o.removeAllRanges(),o.addRange(r)}Be.value=null}else Bn("unlink");ge.value=!1,ln(),e.nextTick(()=>{re(),Yt()})},k=()=>{A.disabled||!A.richText||f.value&&(P.value?(Re.value&&(clearTimeout(Re.value),Re.value=null),tt(),P.value=!1):tt(),ln(),f.value.focus(),document.execCommand("insertUnorderedList",!1),e.nextTick(()=>{Z(),re(),en()}))},y=()=>{A.disabled||!A.richText||f.value&&(P.value?(Re.value&&(clearTimeout(Re.value),Re.value=null),tt(),P.value=!1):tt(),ln(),f.value.focus(),document.execCommand("insertOrderedList",!1),e.nextTick(()=>{Z(),re(),en()}))},S=o=>{const l=o.parentElement;if(!l||l.tagName!=="OL")return null;let a=0,r=o.previousElementSibling;for(;r;)r.tagName==="LI"&&a++,r=r.previousElementSibling;return a+1},Z=()=>{if(!f.value)return;f.value.querySelectorAll("li > ol").forEach(l=>{const a=l.parentElement;if(a&&a.tagName==="LI"){const r=S(a);r!==null&&Array.from(l.children).filter(d=>d.tagName==="LI").forEach(d=>{d.setAttribute("data-parent-num",String(r))})}})},pe=()=>{if(A.disabled||!A.richText||!f.value)return;ln(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const l=o.getRangeAt(0),a=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer.closest("li"):l.commonAncestorContainer.parentElement?.closest("li");if(!a){document.execCommand("indent",!1),e.nextTick(()=>{Z(),re()});return}const r=a.parentElement;if(!r||r.tagName!=="OL"&&r.tagName!=="UL")return;const c=a.previousElementSibling;if(c&&c.tagName==="LI"){const d=r.tagName.toLowerCase();let u=c.querySelector(`:scope > ${d}`);u||(u=document.createElement(d),c.appendChild(u));const m=S(c);u.appendChild(a),m!==null&&r.tagName==="OL"&&a.setAttribute("data-parent-num",String(m)),Z();const v=document.createRange();v.selectNodeContents(a),v.collapse(!1),o.removeAllRanges(),o.addRange(v),e.nextTick(()=>{re(),en()})}else document.execCommand("indent",!1),e.nextTick(()=>{Z(),re(),en()})},Bt=()=>{if(A.disabled||!A.richText||!f.value)return;ln(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const l=o.getRangeAt(0),a=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer.closest("li"):l.commonAncestorContainer.parentElement?.closest("li");if(!a){document.execCommand("outdent",!1),e.nextTick(()=>{Z(),re()});return}const r=a.parentElement;if(!r||r.tagName!=="OL"&&r.tagName!=="UL")return;const c=r.parentElement;if(c&&c.tagName==="LI"){const d=c.parentElement;if(d&&(d.tagName==="OL"||d.tagName==="UL")){r.tagName==="OL"&&a.removeAttribute("data-parent-num"),d.insertBefore(a,c.nextSibling),r.children.length===0&&r.remove(),Z();const u=document.createRange();u.selectNodeContents(a),u.collapse(!1),o.removeAllRanges(),o.addRange(u),e.nextTick(()=>{re(),en()});return}}document.execCommand("outdent",!1),e.nextTick(()=>{Z(),re(),en()})},lt=e.ref(null),Jt=e.ref(null),pn=e.ref({}),cn=e.ref(""),kn=e.ref(null),Yn=e.ref("");e.ref("");const On=e.ref(null);e.ref("");const _n=e.ref([]),el=e.ref(!1),Ll=e.ref(!1),Io=o=>{if(!o)return"";const l=o.cloneRange(),a=document.createElement("div");return a.appendChild(l.cloneContents()),a.innerHTML},go=()=>{if(A.disabled||!A.richText||!f.value)return;if(lt.value!==null){lt.value=null,cn.value="",Yn.value="",On.value=null,_n.value=[],yn(!0);return}ln(),f.value.focus();const o=window.getSelection();if(!o||o.rangeCount===0)return;const l=o.getRangeAt(0);if(l.collapsed||!zt(l))return;Yn.value=Io(l)||"",On.value=wn();const a=l.getBoundingClientRect(),r=f.value.parentElement;if(!r)return;const c=r.getBoundingClientRect(),d=a.bottom-c.top,m=Math.max(d+8,0);pn.value={top:`${m}px`,bottom:"auto"},lt.value=Date.now(),e.nextTick(()=>{if(cn.value="",kn.value){const h=kn.value;h.style.height="auto",h.style.height=`${h.scrollHeight}px`,h.focus()}const v=r.querySelector(".dss-comment-overlay");if(v&&r){const h=r.querySelector(".dss-text-editor-footer");if(h){const _=r.getBoundingClientRect(),D=v.getBoundingClientRect(),x=h.getBoundingClientRect(),oe=D.bottom-_.top,K=x.top-_.top,$e=8;if(oe>K-$e){const Se=x.height;pn.value={bottom:`${Se+$e}px`,top:"auto"}}else pn.value={top:`${m}px`,bottom:"auto"}}}})},ho=()=>{if(!cn.value.trim())return;const o=cn.value.trim(),l=new Date,a={text:o,selectionText:Yn.value,selectionRange:On.value,commentId:lt.value,user:A.commentUser||null,createdAt:l.toISOString()};_n.value=[..._n.value,a],U("comment-submitted",a),no(a),On.value&&!Po(On.value)&&ko(lt.value,On.value),cn.value="",e.nextTick(()=>{if(kn.value){const r=kn.value;r.style.height="auto",r.style.height=`${r.scrollHeight}px`,r.focus()}hn("sendComment")})},zo=(o,l)=>{if(!(!A.commentUser||!o.user||o.user.id!==A.commentUser.id)){if(_n.value=_n.value.filter((a,r)=>r!==l),lt.value!==null&&f.value){const a=String(lt.value),r=f.value.querySelector(`[data-comment="${a}"], [data-fake-comment="${a}"]`);if(r&&_n.value.length>0){const c=[],d=new Set;_n.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?r.setAttribute("data-comment-user",JSON.stringify(c[0])):r.removeAttribute("data-comment-user"),c.length>1?r.setAttribute("data-comment-user-2",JSON.stringify(c[1])):r.removeAttribute("data-comment-user-2"),r.setAttribute("data-comment-count",String(_n.value.length))}else r&&_n.value.length===0&&(r.removeAttribute("data-comment-user"),r.removeAttribute("data-comment-user-2"),r.setAttribute("data-comment-count","0"))}if(U("comment-deleted",{comment:o,index:l,commentId:lt.value}),A.comments&&Array.isArray(A.comments)){const a=A.comments.filter(r=>!(r.commentId===o.commentId&&r.text===o.text&&r.user?.id===o.user?.id));U("update:comments",a)}e.nextTick(()=>{hn("deleteComment")})}},Po=o=>{if(!o||!f.value)return!1;try{const l=yo(o);if(!l)return!1;const a=l.commonAncestorContainer,r=a.nodeType===3?a.parentElement:a;if(r)return!!r.closest("[data-comment], [data-fake-comment]")}catch{}return!1},yo=o=>{if(!o||!f.value)return null;try{const l=document.createRange();if(o.type==="element"&&o.element)return f.value.contains(o.element)?(l.setStart(o.element,o.offset),l.collapse(!0),l):null;let a=0;const r=[f.value];let c=null,d=!1,u=!1;for(;!u&&(c=r.pop());)if(c.nodeType===3){const m=a+c.length;!d&&o.start>=a&&o.start<=m&&(l.setStart(c,o.start-a),d=!0),d&&o.end>=a&&o.end<=m&&(l.setEnd(c,o.end-a),u=!0),a=m}else{let m=c.childNodes.length;for(;m--;)r.push(c.childNodes[m])}return d?l:null}catch{return null}},ko=(o,l)=>{if(!(!o||!l||!f.value))try{const a=yo(l);if(!a||a.collapsed)return;const r=a.commonAncestorContainer,c=r.nodeType===3?r.parentElement:r;if(c){const m=c.closest("[data-comment], [data-fake-comment]");if(m){m.getAttribute("data-comment")!==String(o)&&m.getAttribute("data-fake-comment")!==String(o)&&m.setAttribute("data-comment",String(o));return}}const d=document.createElement("span");d.setAttribute("data-comment",String(o));try{const m=a.startContainer,v=a.endContainer,h=a.startOffset,_=a.endOffset,D=m.nodeType===3?m.parentNode:m,x=v.nodeType===3?v.parentNode:v;if(D===x&&h===0&&_===(v.nodeType===3?v.length:x.childNodes.length)&&(D.tagName==="P"||D.tagName==="DIV"||D.tagName==="H1"||D.tagName==="H2"||D.tagName==="H3"||D.tagName==="H4"||D.tagName==="H5"||D.tagName==="H6")){const K=a.extractContents();d.appendChild(K),a.insertNode(d)}else a.surroundContents(d)}catch{const v=a.extractContents();d.appendChild(v),a.insertNode(d)}const u=f.value.querySelector(`[data-comment="${String(o)}"]`);e.nextTick(()=>{hn("wrapSelectionWithCommentMarker"),re()})}catch{}},no=o=>{if(!o||!o.commentId)return;const l=Array.isArray(A.comments)?[...A.comments]:[],a=typeof o.commentId=="string"&&o.commentId.startsWith("comment-")?Date.now():Number(o.commentId)||o.commentId;let r=l.findIndex(d=>typeof d.conversation_id=="string"&&d.conversation_id.startsWith("comment-")?null:Number(d.conversation_id)===Number(a)||d.conversation_id===a);const c={text:o.text,user:o.user,createdAt:o.createdAt,created_at:o.createdAt,updated_at:o.createdAt};if(r>=0){const d=l[r];if(d.conversation||(d.conversation=[]),d.conversation.push(c),d.updated_at=o.createdAt,!d.article_id&&l.length>0){const u=l.find(m=>m.article_id);u&&(d.article_id=u.article_id)}}else{const d=o.selectionRange,u=l.length>0&&l.find(v=>v.article_id)?.article_id||null,m={conversation_id:a,article_id:u,selection_range:d?{start:d.start||0,end:d.end||0,type:d.type||"text"}:null,selection_text:o.selectionText||"",conversation:[c],created_by_user:o.user,created_at:o.createdAt,updated_at:o.createdAt,status:"active"};l.push(m)}el.value=!0,U("update:comments",l)},Co=(o,l=[])=>{if(A.disabled||!A.richText||!f.value)return;const a=f.value;let r=null;try{r=a.querySelector(o)}catch{return}if(!r)return;ln(),a.focus();const c=document.createRange();c.selectNodeContents(r);const d=window.getSelection();d&&(d.removeAllRanges(),d.addRange(c)),Yn.value=r.innerHTML||"",On.value=wn();const u=c.getBoundingClientRect(),m=a.parentElement;if(m){const _=m.getBoundingClientRect(),D=u.bottom-_.top,oe=Math.max(D+8,0);pn.value={top:`${oe}px`,bottom:"auto"}}const v=r.getAttribute("data-comment")||r.getAttribute("data-fake-comment");let h=[];if(v&&A.comments&&Array.isArray(A.comments)){const _=A.comments.find(D=>String(D.conversation_id)===String(v));if(_&&_.conversation&&Array.isArray(_.conversation)){const D=_.conversation.map(x=>({id:x.id||x.commentary_id,commentary_id:x.id||x.commentary_id,conversation_id:_.id||_.conversation_id,text:x.text,user:x.user,createdAt:x.created_at||x.createdAt,updated_at:x.updated_at||x.updatedAt}));h.push(...D)}}h.length===0&&Array.isArray(l)&&l.length>0&&(h=l.slice()),h.sort((_,D)=>{const x=$e=>{if(!$e)return 0;const Se=new Date($e).getTime();return isNaN(Se)?0:Se},oe=x(_.createdAt),K=x(D.createdAt);return oe===K?0:oe-K}),_n.value=h,yn(!0),lt.value=v||null,r&&(Jt.value=r,r.classList.add("editor-comment-highlighted")),e.nextTick(()=>{if(cn.value="",kn.value){const _=kn.value;_.style.height="auto",_.style.height=`${_.scrollHeight}px`,_.focus()}if(m){const _=m.querySelector(".dss-comment-overlay");if(_){const D=m.querySelector(".dss-text-editor-footer");if(D){const x=m.getBoundingClientRect(),oe=_.getBoundingClientRect(),K=D.getBoundingClientRect(),$e=oe.bottom-x.top,Se=K.top-x.top,yt=8;if($e>Se-yt){const vn=K.height;pn.value={bottom:`${vn+yt}px`,top:"auto"}}}}}hn("openCommentOverlayForSelector")})},lo=e.ref(null),bo=e.ref(0),oo=o=>{if(!(A.disabled||!A.richText)){if(o.key==="Escape"){const l=window.getSelection();if(l.rangeCount>0){const r=l.getRangeAt(0).commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");if(!!(c&&f.value&&f.value.contains(c))){o.preventDefault();let u=null;r.nodeType===3?u=r.parentElement:r.tagName==="P"||r.tagName==="DIV"?u=r:u=r.closest("p, div");const m=document.createElement("p");m.innerHTML="<br>",u&&c.contains(u)&&u.nextSibling?c.insertBefore(m,u.nextSibling):c.appendChild(m),setTimeout(()=>{xn()},50);return}}}if(o.key.length===1||o.key==="Enter"){const l=window.getSelection();if(l&&l.rangeCount>0){const a=l.getRangeAt(0),r=a.commonAncestorContainer,c=r.nodeType===3?r.parentElement:r;if(c){const d=c.closest(".dss-image-wrapper");if(d){const u=d.querySelector("img");if(c!==u&&!u?.contains(c)){const m=a.startContainer.nodeType===3?a.startContainer.parentElement:a.startContainer,v=a.endContainer.nodeType===3?a.endContainer.parentElement:a.endContainer;if(d.contains(m)&&m!==u||d.contains(v)&&v!==u){o.preventDefault();const h=document.createRange();h.setStartAfter(d),h.collapse(!0),l.removeAllRanges(),l.addRange(h);return}}}}}}if(o.key==="Backspace"||o.key==="Delete"){const l=window.getSelection();if(l.rangeCount>0){const a=l.getRangeAt(0);let r=null,c=null;if(a.collapsed)if(o.key==="Backspace"){const d=a.startContainer;let u=d;d.nodeType===3&&(a.startOffset===0?u=d.previousSibling||d.parentNode:u=d.parentNode);const m=u.previousSibling;m&&(m.classList&&m.classList.contains("dss-image-wrapper")?c=m:m.tagName==="IMG"&&(r=m,c=r.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(r=c.querySelector("img")))}else{const d=a.startContainer;let u=d;d.nodeType===3&&(a.startOffset===d.length?u=d.nextSibling||d.parentNode:u=d.parentNode);const m=u.nextSibling;m&&(m.classList&&m.classList.contains("dss-image-wrapper")?c=m:m.tagName==="IMG"&&(r=m,c=r.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(r=c.querySelector("img")))}else{const d=a.commonAncestorContainer,u=a.startContainer.nodeType===3?a.startContainer.parentElement:a.startContainer,m=a.endContainer.nodeType===3?a.endContainer.parentElement:a.endContainer;if(d.nodeType===1&&d.tagName==="IMG"?(r=d,c=r.closest(".dss-image-wrapper")):(r=d.querySelector("img"),r&&(c=r.closest(".dss-image-wrapper"))),c){const v=c.contains(u)||u===c,h=c.contains(m)||m===c,D=a.cloneContents().textContent?.trim()||"",x=c.textContent?.trim()||"";(!v||!h||D.length>x.length)&&(c=null,r=null)}}if(c){o.preventDefault(),o.stopPropagation();const d=c.parentNode;if(d){const u=document.createTextNode("");d.insertBefore(u,c),c.remove();const m=document.createRange();m.setStartAfter(u),m.collapse(!0),l.removeAllRanges(),l.addRange(m),e.nextTick(()=>{re()});return}}}}if(o.key==="Tab"){o.preventDefault(),o.shiftKey?Bt():pe();return}if(o.key==="Enter"){const l=window.getSelection();if(l.rangeCount>0){const a=l.getRangeAt(0);if(a.collapsed){const u=a.startContainer,m=v=>{if(!v)return!1;let h=v.previousSibling;for(;h;){if(h.classList&&h.classList.contains("dss-image-wrapper")||h.tagName==="IMG"||h.querySelector&&h.querySelector(".dss-image-wrapper")||h.querySelector&&h.querySelector("img"))return!0;h=h.previousSibling}const _=v.parentElement;return _&&_!==f.value?m(_):!1};if(u.nodeType===3){const v=u.parentElement;if(v&&(m(v)||m(u))){const h=v.closest("p, div");if(h&&h!==f.value){o.preventDefault(),o.stopPropagation();let _=null;const D=a.startOffset;D<u.length&&(_=u.splitText(D));const x=document.createElement("p");if(_?x.appendChild(_):x.innerHTML="<br>",u.length===0){const K=u.parentElement;K&&(K.removeChild(u),K.childNodes.length===0&&K.appendChild(document.createElement("br")))}h.nextSibling?h.parentNode.insertBefore(x,h.nextSibling):h.parentNode.appendChild(x);const oe=document.createRange();_?oe.setStart(_,0):oe.setStart(x,0),oe.collapse(!0),l.removeAllRanges(),l.addRange(oe),e.nextTick(()=>{re()});return}}}}const r=a.commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");if(!!(c&&f.value&&f.value.contains(c))){let u=null;r.nodeType===3?u=r.parentElement:r.tagName==="P"||r.tagName==="DIV"?u=r:u=r.closest("p, div");const m=K=>{if(!K)return!1;const $e=K.textContent||"",yt=(K.innerHTML||"").trim(),vn=yt.replace(/<br\s*\/?>/gi,"").trim();return $e.trim()===""||yt===""||vn===""||yt==="<br>"||yt==="<br/>"||yt==="<p></p>"||yt==="<p><br></p>"||yt==="<p><br/></p>"||yt==="<p> </p>"||yt==="<p><br> </p>"||yt==="<div></div>"||yt==="<div><br></div>"||yt==="<div><br/></div>"},v=c.lastChild,h=v&&v.nodeType===1&&v.tagName==="BR",_=a.startContainer,D=_.nodeType===3?_.parentElement:_,x=D===c||D&&D.parentElement===c;if(u&&m(u)||h&&x){o.preventDefault(),setTimeout(()=>{xn()},50);return}}}}if(o.key===" "){const l=Date.now(),a=l-bo.value;if(lo.value===" "&&a<300){const r=window.getSelection();if(r.rangeCount>0){const c=r.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){o.preventDefault(),pe();return}}}}lo.value=" ",bo.value=l}else lo.value=o.key}},Oo=o=>{if(A.disabled||!A.richText)return;o.preventDefault();let l=o.clipboardData.getData("text/html"),a=o.clipboardData.getData("text/plain");l&&(l=l.replace(/<!--[\s\S]*?-->/g,"")),a&&(a=a.replace(/<!--[\s\S]*?-->/g,"")),tt();const r=window.getSelection();let c=null;if(r&&r.rangeCount>0){let m=r.getRangeAt(0).commonAncestorContainer;m.nodeType===3&&(m=m.parentNode),c=m.closest("p, h1, h2, h3, h4, h5, h6, li, blockquote")}const d=u=>{const v=new DOMParser().parseFromString(u,"text/html");let h=f.value.querySelector("h1")?1:0;if(v.querySelectorAll("h1").forEach(D=>{if(h>0){const x=v.createElement("p");x.innerHTML=D.innerHTML,D.parentNode.replaceChild(x,D)}else h++}),c){const D=["P","H1","H2","H3","H4","H5","H6","DIV","BLOCKQUOTE","UL","OL","LI"],x=Array.from(v.body.children).filter(oe=>D.includes(oe.tagName));if(x.length===1){const oe=x[0].tagName,K=c.tagName,$e=c.textContent.trim()===""&&!c.querySelector("img");let Se=!1;if(["H1","H2","H3","H4","H5","H6"].includes(K)?Se=!0:$e||(oe===K||oe==="P")&&(Se=!0),Se)return x[0].innerHTML.trim()}}return v.body.innerHTML.trim()};if(l){const u=d(l);document.execCommand("insertHTML",!1,u)}else if(a)if(/<[a-z][\s\S]*>/i.test(a)){const m=d(a);document.execCommand("insertHTML",!1,m)}else document.execCommand("insertText",!1,a);re()},ql=o=>{if(we.value){const a=o.target;!a.closest(".dss-toolbar-dropdown")&&!a.closest(".dss-toolbar-dropdown-toggle")&&ln()}if(vt.value){const a=o.target,r=a.closest(".dss-floating-toolbar"),c=f.value&&a.closest(".dss-text-editor-content");!r&&!c&&Al()}if(rt.value){const a=o.target,r=a.closest(".dss-floating-toolbar"),c=a.closest(".dss-toolbar-dropdown");!r&&!c&&Wl()}const l=o.target;if(!l.closest(".dss-toolbar-dropdown")&&!l.closest(".dss-toolbar-dropdown-submenu")&&(et.value=null),!f.value||!l.closest(".dss-text-editor-content")){const a=window.getSelection();if(a&&a.rangeCount>0){const r=a.getRangeAt(0);Y.value=!r.collapsed&&zt(r)}else Y.value=!1}if(lt.value!==null){const a=document.querySelector(".dss-comment-overlay");let r=!1;if(a){const u=a.getBoundingClientRect(),m=o.clientX,v=o.clientY;r=m>=u.left&&m<=u.right&&v>=u.top&&v<=u.bottom}const c=l.closest(".dss-toolbar-button"),d=c&&c.getAttribute("title")==="Comment";!r&&!d&&(lt.value=null,cn.value="",Yn.value="",On.value=null,_n.value=[],yn(!0))}},En=(o,l)=>{o&&o.stopPropagation&&o.stopPropagation(),mt.value&&(clearTimeout(mt.value),mt.value=null),et.value=l},F=o=>{const l=o.relatedTarget;if(l){const a=l.closest(".dss-toolbar-dropdown-submenu"),r=l.closest(".dss-toolbar-dropdown-item-has-submenu");if(a||r)return}mt.value&&clearTimeout(mt.value),mt.value=setTimeout(()=>{et.value=null,mt.value=null},150)},Cn=o=>{et.value=null};let qn=0;const Tl=o=>{if(!o)return;const l=Array.from(o.children);l.forEach(a=>{a.classList.contains("dss-toolbar-dropdown-submenu")||a.classList.contains("dss-toolbar-dropdown-item-has-submenu")||(a.tagName==="BUTTON"||a.tagName==="DIV")&&!a.classList.contains("dss-toolbar-dropdown-item")&&a.classList.add("dss-toolbar-dropdown-item")}),l.forEach((a,r)=>{if(a.classList.contains("dss-toolbar-dropdown-item-has-submenu")||a.classList.contains("dss-toolbar-dropdown-submenu")||!a.classList.contains("dss-toolbar-dropdown-item"))return;const c=Array.from(a.children).find(m=>m.tagName==="DIV"?m.classList.contains("dss-toolbar-dropdown-item")?!1:Array.from(m.children).filter(h=>h.tagName==="BUTTON"||h.tagName==="DIV").length>0:!1),d=a.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(m=>m.tagName==="BUTTON"||m.tagName==="DIV");if(c||u){const m=`submenu-auto-${++qn}`;a.classList.add("dss-toolbar-dropdown-item-has-submenu"),a.setAttribute("data-submenu-id",m);let v=null;c?(a.tagName==="BUTTON"&&a.parentNode.insertBefore(c,a.nextSibling),c.classList.add("dss-toolbar-dropdown-submenu"),v=c):u&&(d.classList.add("dss-toolbar-dropdown-submenu"),v=d),v&&(v.setAttribute("data-submenu-id",m),v.setAttribute("data-processed","true"),c&&a.tagName!=="BUTTON"?v.dataset.originalParentRef="inside":v.dataset.originalParentRef="sibling",Array.from(v.children).forEach(_=>{(_.tagName==="BUTTON"||_.tagName==="DIV")&&!_.classList.contains("dss-toolbar-dropdown-item")&&_.classList.add("dss-toolbar-dropdown-item")}))}})},fn=()=>{document.querySelectorAll(".dss-toolbar-dropdown").forEach(l=>{Tl(l),l.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=v=>{const h=c.getAttribute("data-submenu-id");h&&En(v,h)},m=F;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",m),c._subMenuHandlers={enter:u,leave:m}}),l.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(c=>{const d=c._subMenuHandlers;d&&(c.removeEventListener("mouseenter",d.enter),c.removeEventListener("mouseleave",d.leave));const u=h=>{const _=c.getAttribute("data-submenu-id");_&&En(h,_)},m=F;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",m),c._subMenuHandlers={enter:u,leave:m},c.querySelectorAll(".dss-toolbar-dropdown-item").forEach(h=>{h.addEventListener("click",Cn)})})})};let Sn=null;const jt=()=>{if(et.value){const o=document.querySelector(`.dss-toolbar-dropdown-submenu[data-submenu-id="${et.value}"]`),l=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${et.value}"]`);o&&l&&Bo(o,l)}if(vt.value&&en(),A.richText){if(Sn!==null)return;Sn=setTimeout(()=>{Sn=null,hn("handleWindowResize")},150)}},Qt=()=>{if(!A.richText)return;document.querySelectorAll(".dss-toolbar-custom-group").forEach(l=>{Array.from(l.children).filter(r=>r.tagName==="DIV"&&!r.classList.contains("dss-toolbar-button")).forEach(r=>{r.classList.add("dss-toolbar-button")})})},rl=()=>{const o=document.querySelectorAll(".dss-text-editor-footer, .dss-text-editor-footer-content, .dss-text-editor-footer-stat, .dss-text-editor-footer-separator"),l=a=>{if(a.preventDefault(),a.stopPropagation(),window.getSelection){const r=window.getSelection();r.removeAllRanges?r.removeAllRanges():r.empty&&r.empty()}return!1};o.forEach(a=>{a.addEventListener("selectstart",l),a.addEventListener("mousedown",l),a.addEventListener("dragstart",l),a.addEventListener("contextmenu",l),a.addEventListener("click",r=>{if(window.getSelection){const c=window.getSelection();c.removeAllRanges&&c.removeAllRanges()}})})};e.onMounted(()=>{if(e.nextTick(()=>{requestAnimationFrame(()=>{sn.value?zn():Vn(),V.value?Un():ul()})}),e.nextTick(()=>{rl()}),A.richText&&f.value){try{document.execCommand("defaultParagraphSeparator",!1,"p")}catch{}document.addEventListener("click",ql),window.addEventListener("resize",jt);let o=null;const l=()=>{o===null&&(o=setTimeout(()=>{o=null,jt()},150))};window.addEventListener("scroll",l,!0),f.value._windowScrollHandler=l,f.value._windowScrollTimeout=o,f.value.closest(".editor-with-comments"),f.value.closest(".dss-text-editor-content-wrapper");const a=f.value.closest(".dss-text-editor-content");let r=null;const c=()=>{r===null&&(r=setTimeout(()=>{r=null,jt()},150))};a&&(a.addEventListener("scroll",c),f.value._scrollHandlers={wrapper:null,content:a,handler:c}),e.nextTick(()=>{fn(),Qt()}),f.value.addEventListener("click",m=>{const v=m.target;v.closest("a")&&!A.disabled&&m.preventDefault();const _=v.closest(".dss-image-no-alt-icon"),D=v.closest(".dss-image-wrapper");if(_||D&&v===D){m.preventDefault(),m.stopPropagation();const x=window.getSelection(),oe=document.createRange();oe.setStartAfter(D),oe.collapse(!0),x.removeAllRanges(),x.addRange(oe)}else D&&v.tagName!=="IMG"&&(m.preventDefault(),e.nextTick(()=>{const x=window.getSelection();if(x.rangeCount>0){const K=x.getRangeAt(0).commonAncestorContainer,$e=K.nodeType===3?K.parentElement:K;if(D.contains($e)&&$e!==D.querySelector("img")){const Se=document.createRange();Se.setStartAfter(D),Se.collapse(!0),x.removeAllRanges(),x.addRange(Se)}}else{const oe=document.createRange();oe.setStartAfter(D),oe.collapse(!0),x.addRange(oe)}}))},!0),f.value.addEventListener("mousedown",m=>{const v=m.target,h=v.closest(".dss-image-no-alt-icon"),_=v.closest(".dss-image-wrapper");if(h||_&&v.tagName!=="IMG"){m.preventDefault();const D=window.getSelection(),x=document.createRange();_&&(x.setStartAfter(_),x.collapse(!0),D.removeAllRanges(),D.addRange(x))}},!0),f.value.addEventListener("paste",m=>{e.nextTick(()=>{if(!f.value)return;f.value.querySelectorAll("img").forEach(h=>{if(!h.closest(".dss-image-wrapper"))h.removeAttribute("alt"),h.removeAttribute("data-alt"),h.setAttribute("alt",""),h.setAttribute("data-alt",""),h.alt="";else{const D=h.getAttribute("alt")||h.alt||"";if(D){const x=h.getAttribute("src")||h.src||"",oe=x.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),K=D===x||D===oe;(D.startsWith("http://")||D.startsWith("https://")||D.startsWith("data:")||K||K)&&(h.setAttribute("alt",""),h.setAttribute("data-alt",""),h.alt="")}}}),Vt()})}),f.value.addEventListener("dragstart",m=>{const v=m.target,h=v.tagName==="IMG"?v:v.closest("img"),_=h?.closest(".dss-image-wrapper");h&&f.value.contains(h)&&($t.value=_||h,m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/html","image-drag"))}),f.value.addEventListener("dragover",m=>{$t.value&&(m.preventDefault(),m.stopPropagation(),m.dataTransfer.dropEffect="move")}),f.value.addEventListener("dragenter",m=>{$t.value&&(m.preventDefault(),m.stopPropagation())}),f.value.addEventListener("drop",m=>{if(!$t.value||!f.value)return;m.preventDefault(),m.stopPropagation();const v=$t.value,h=v.classList?.contains("dss-image-wrapper"),_=h?v.querySelector("img"):v,D=h?v:_?.closest(".dss-image-wrapper");if(!_||!f.value.contains(_)){$t.value=null;return}let x=null;const oe=m.clientX,K=m.clientY;if(document.caretRangeFromPoint)x=document.caretRangeFromPoint(oe,K);else{const tn=window.getSelection();tn.rangeCount>0?x=tn.getRangeAt(0).cloneRange():(x=document.createRange(),x.selectNodeContents(f.value),x.collapse(!1))}if(!x){$t.value=null;return}const $e=x.commonAncestorContainer,Se=$e.nodeType===3?$e.parentElement:$e;if(Se?.closest(".dss-image-wrapper")===D||D&&D.contains(Se)){$t.value=null;return}if(D&&(Se===D||D.contains(Se))){$t.value=null;return}const vn=_.getAttribute("src");let un=null;D?un=D.cloneNode(!0):un=_.cloneNode(!0);try{let tn=x.startContainer;if(tn.nodeType===3&&(tn=tn.parentElement),D&&(tn===D||D.contains(tn))){const on=document.createRange();on.setStartAfter(D),on.collapse(!0),x=on}x.insertNode(un);const dn=document.createRange();dn.setStartAfter(un),dn.collapse(!0);const rn=window.getSelection();rn.removeAllRanges(),rn.addRange(dn)}catch{if(f.value.childNodes.length===0){const dn=document.createElement("p");dn.appendChild(un),f.value.appendChild(dn)}else{const dn=f.value.lastChild;if(dn&&dn.nodeType===1)dn.appendChild(un);else{const rn=document.createElement("p");rn.appendChild(un),f.value.appendChild(rn)}}}D?D.remove():_.remove(),$t.value=null,e.nextTick(()=>{const tn=f.value.querySelectorAll("img");let dn=!1;tn.forEach(rn=>{if(rn.getAttribute("src")===vn)if(!dn)dn=!0;else{const on=rn.closest(".dss-image-wrapper");on?on.remove():rn.remove()}}),Vt(),re()})}),f.value.addEventListener("dragend",m=>{$t.value=null});let d=null;const u=new MutationObserver(m=>{m.forEach(v=>{v.addedNodes.forEach(h=>{if(h.nodeType===1){h.tagName==="IMG"&&(h.removeAttribute("alt"),h.removeAttribute("data-alt"),h.setAttribute("alt",""),h.setAttribute("data-alt",""),h.alt="");const _=h.querySelectorAll&&h.querySelectorAll("img");_&&_.forEach(D=>{D.removeAttribute("alt"),D.removeAttribute("data-alt"),D.setAttribute("alt",""),D.setAttribute("data-alt",""),D.alt=""})}})}),d&&clearTimeout(d),d=setTimeout(()=>{Vt(),Qt(),d=null},100)});if(u.observe(f.value,{childList:!0,subtree:!0}),e.nextTick(()=>{const m=document.querySelector(".dss-text-editor-toolbar");if(m){const v=new MutationObserver(()=>{e.nextTick(()=>{Qt()})});v.observe(m,{childList:!0,subtree:!0}),m._toolbarMutationObserver=v}}),A.modelValue){const m=Cl(A.modelValue);f.value.innerHTML=m,ht()}e.nextTick(()=>{const m=f.value.innerHTML||"",v=A.title||"",h=A.description||"";X.value=m,me.value=v,ze.value=h,nt.value=v,St.value=h,Z(),Vt(),_e(),wt(),Xl(),bn()}),Yt(),ut(),f.value._mutationObserver=u}}),e.onUnmounted(()=>{if(document.removeEventListener("click",ql),window.removeEventListener("resize",jt),f.value&&f.value._windowScrollHandler&&window.removeEventListener("scroll",f.value._windowScrollHandler,!0),Sn!==null&&(clearTimeout(Sn),Sn=null),f.value&&f.value._windowScrollTimeout!==null&&clearTimeout(f.value._windowScrollTimeout),Re.value&&clearTimeout(Re.value),mt.value&&clearTimeout(mt.value),f.value&&f.value._mutationObserver&&f.value._mutationObserver.disconnect(),Ye.value&&Ye.value.disconnect(),ot.value!==null&&(cancelAnimationFrame(ot.value),ot.value=null),Ve.value!==null&&(clearTimeout(Ve.value),Ve.value=null),at.value!==null&&(clearTimeout(at.value),at.value=null),yn(!0),f.value&&f.value._scrollHandlers){const{wrapper:l,content:a,handler:r}=f.value._scrollHandlers;l&&l.removeEventListener("scroll",r),a&&a.removeEventListener("scroll",r)}const o=document.querySelector(".dss-text-editor-toolbar");o&&o._toolbarMutationObserver&&o._toolbarMutationObserver.disconnect()});const ml=o=>{const l=o.target,a=l.closest("a");if(a&&!A.disabled){o.preventDefault();const c=document.createRange();c.selectNodeContents(a);const d=window.getSelection();d.removeAllRanges(),d.addRange(c)}const r=l.closest(".dss-image-wrapper");r&&l.tagName!=="IMG"?e.nextTick(()=>{const c=window.getSelection();if(c.rangeCount>0){const u=c.getRangeAt(0).commonAncestorContainer,m=u.nodeType===3?u.parentElement:u;if(r.contains(m)&&m!==r.querySelector("img")){const v=document.createRange();v.setStartAfter(r),v.collapse(!0),c.removeAllRanges(),c.addRange(v)}}Vt(),Yt(),ut(),en(),wt()}):e.nextTick(()=>{Vt(),Yt(),ut(),en(),wt()})},At=()=>{dl();const o=window.getSelection();if(o&&o.rangeCount>0){const a=o.getRangeAt(0);Y.value=!a.collapsed&&zt(a),!a.collapsed&&w.value&&(w.value=null)}else Y.value=!1;if(Vt(),Yt(),ut(),en(),wt(),o&&o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer,c=r.nodeType===3?r.parentElement:r;if(c&&c.closest(".dss-text-editor-footer")){o.removeAllRanges(),Y.value=!1;return}}["bold","italic","underline"].forEach(a=>{try{const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0);if(!c.collapsed)if(a==="bold"){const d=c.commonAncestorContainer,u=d.nodeType===3?d.parentElement:d;let m=!1;if(u&&((u.tagName==="STRONG"||u.tagName==="B"||u.closest&&u.closest("strong, b"))&&(m=!0),!m&&u.style&&parseInt(u.style.fontWeight)>=600&&(m=!0),!m))try{const v=window.getComputedStyle(u);parseInt(v.fontWeight)>=600&&(m=!0)}catch{}de.value[a]=m}else{const d=document.queryCommandState(a);de.value[a]=d}}}catch{}})},wt=()=>{if(!A.richText||A.disabled||!f.value){E.value="p";return}try{const o=window.getSelection();if(!o||o.rangeCount===0){E.value="p";return}const a=o.getRangeAt(0).commonAncestorContainer,r=a.nodeType===3?a.parentElement:a;if(!r||!f.value.contains(r)){E.value="p";return}const c=r.closest("h1, h2, h3, h4, h5, h6, p");if(!c){E.value="p";return}const d=c.tagName.toLowerCase();["h1","h2","h3","h4","h5","h6","p"].includes(d)?E.value=d:E.value="p"}catch{E.value="p"}},ut=()=>{if(!f.value){ft.value=!1;return}try{const o=window.getSelection();let l=!1;if(o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");l=!!(c&&f.value.contains(c))}ft.value=l}catch{ft.value=!1}},zt=o=>{if(!o||!f.value)return!1;const l=o.commonAncestorContainer;if(!l)return!1;const a=l.nodeType===3?l.parentElement:l;return a?f.value.contains(a):!1},Al=()=>{vt.value=!1},en=()=>{if(!A.floatingToolbar||!A.richText||A.disabled){vt.value=!1;return}const o=window.getSelection();if(!o||o.rangeCount===0){vt.value=!1;return}const l=o.getRangeAt(0);if(l.collapsed||!zt(l)){vt.value=!1;return}const a=l.getBoundingClientRect();if(!a||a.width===0&&a.height===0){vt.value=!1;return}const r=f.value;if(!r){vt.value=!1;return}const c=r.getBoundingClientRect();if(!c||c.width===0){vt.value=!1;return}const d=40,u=8,m=a.top-d/2+15;let v=a.left+a.width/2;const h=window.innerWidth||document.documentElement.clientWidth||0;let _=0;Pt.value&&(_=Pt.value.getBoundingClientRect().width);const D=(_||320)/2;let x=c.left+D,oe=c.right-D;if(oe<x){const K=c.left+c.width/2;x=K,oe=K}if(h>0){const K=D+u,$e=h-D-u;if(x=Math.max(x,K),oe=Math.min(oe,$e),oe<x){const Se=h/2;x=Se,oe=Se}}v<x?v=x:v>oe&&(v=oe),We.value={position:"fixed",top:`${Math.max(m,8)}px`,left:`${v}px`,transform:"translate(-50%, -100%)",zIndex:10003},vt.value=!0},El=o=>{A.disabled||!A.richText||(rt.value=rt.value===o?null:o,o==="askAi"&&(we.value=null))},Wl=()=>{rt.value=null,et.value=null},Tn=o=>{Mn(o),Wl()};let tl=null,nl=null,pl=null,fl=null;const qo=o=>{if(A.disabled||!A.richText){Sl(),Dl();return}const l=o.target,a=l.closest("a"),r=l.closest("img");if(tl&&(clearTimeout(tl),tl=null),pl&&(clearTimeout(pl),pl=null),a&&a!==nl){Dl(),nl=a;let c=a.getAttribute("href")||"";(!c||c==="#"||c==="")&&(c=a.textContent||""),Be.value=a,ve.value=c,ae.value=!0,Ce.value=!0,jn(a)}else!a&&nl?(nl=null,tl=setTimeout(()=>{Ce.value||Sl()},150)):a&&a===nl&&jn(a);if(r&&r!==fl){Sl(),fl=r;let c=r.getAttribute("alt");c===null&&(c=r.alt||"");let d=r.getAttribute("data-alt");d===null&&(d=c),r.hasAttribute("alt")||r.setAttribute("alt",c),r.hasAttribute("data-alt")||r.setAttribute("data-alt",d),kt.value=r,Ut.value=c.trim()||L("textEditor.image.noAlt"),Mt.value=!0,be.value=!0,wo(r)}else!r&&fl?(fl=null,pl=setTimeout(()=>{be.value||Dl()},150)):r&&r===fl&&wo(r)},vl=o=>{const l=o.relatedTarget;(!l||!l.closest(".dss-text-editor-content")&&!l.closest(".dss-link-popup"))&&(nl=null,fl=null,tl&&(clearTimeout(tl),tl=null),pl&&(clearTimeout(pl),pl=null),Sl(),Dl())},Sl=()=>{Ce.value=!1,setTimeout(()=>{Ce.value||(ae.value=!1,ve.value="",Ae.value||(Be.value=null))},100)},jn=o=>{if(!o||!f.value)return;const l=o.getBoundingClientRect(),c=l.top-32-8,d=l.left+l.width/2;H.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},Dl=()=>{be.value=!1,setTimeout(()=>{be.value||(Mt.value=!1,Ut.value="",Et.value||(kt.value=null))},100)},wo=o=>{if(!o||!f.value)return;const l=o.getBoundingClientRect(),c=l.top-32-8,d=l.left+l.width/2;Q.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},Hl=()=>{if(!ve.value||!Be.value)return;let l=Be.value.getAttribute("href")||ve.value;!l.startsWith("http://")&&!l.startsWith("https://")&&!l.startsWith("mailto:")&&(l="https://"+l),window.open(l,"_blank","noopener,noreferrer")},Wo=()=>{if(Be.value){const o=Be.value.textContent||"",l=Be.value.getAttribute("href")||"",a=Be.value;qe.value=l,it.value=o,dt.value=o,Ce.value=!1,ae.value=!1,ve.value="",Be.value=a,Ae.value=!0}else if(ge.value){const o=window.getSelection();if(o.rangeCount>0){const a=o.getRangeAt(0).commonAncestorContainer,r=a.nodeType===1?a.closest("a"):a.parentElement?.closest("a");if(r){const c=r.textContent||"",d=r.getAttribute("href")||"";qe.value=d,it.value=c,dt.value=c,Be.value=r,Ae.value=!0}}}else{ke.value=wn();const o=window.getSelection();let l="";o.rangeCount>0&&(l=o.getRangeAt(0).toString()),qe.value="",it.value=l,dt.value="",Be.value=null,Ae.value=!0}e.nextTick(()=>{R.value&&(R.value.focus(),R.value.select())})},Rl=()=>{Ae.value=!1,qe.value="",it.value="",dt.value="",Be.value=null,ke.value=null},ao=()=>{if(!qe.value.trim()){Rl();return}if(P.value?(Re.value&&(clearTimeout(Re.value),Re.value=null),tt(),P.value=!1):tt(),it.value.trim()||(it.value=qe.value.trim()),Be.value&&f.value&&f.value.contains(Be.value)){const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges();const l=Be.value;if(l.setAttribute("href",qe.value.trim()),it.value.trim()!==dt.value.trim()){for(;l.firstChild;)l.removeChild(l.firstChild);l.textContent=it.value.trim()}l.style.color="#60afdf",l.style.textDecoration="underline";const a=document.createRange();a.selectNodeContents(l),a.collapse(!1),o.removeAllRanges(),o.addRange(a),re()}else if(f.value){f.value.focus();const o=window.getSelection();o.removeAllRanges(),ke.value&&Nn(ke.value);let l=null;if(o.rangeCount>0&&(l=o.getRangeAt(0)),l&&!l.collapsed){l.toString();const a=document.createElement("a");a.href=qe.value.trim(),a.textContent=it.value.trim(),a.style.color="#60afdf",a.style.textDecoration="underline",l.deleteContents(),l.insertNode(a);const r=document.createTextNode(" ");l.setStartAfter(a),l.insertNode(r),l.setStartAfter(r),l.collapse(!0),o.removeAllRanges(),o.addRange(l)}else{l||(l=document.createRange(),l.selectNodeContents(f.value),l.collapse(!1));const a=l.startContainer,r=a.nodeType===3,c=r&&l.startOffset===a.textContent.length,d=document.createElement("a");if(d.href=qe.value.trim(),d.textContent=it.value.trim(),d.style.color="#60afdf",d.style.textDecoration="underline",c){let u=a.parentElement;for(;u&&u!==f.value&&!["P","DIV","H1","H2","H3","H4","H5","H6"].includes(u.tagName);)u=u.parentElement;if(u&&u!==f.value){let m=u.nextElementSibling;if(m&&(m.innerHTML==="<br>"||m.innerHTML==="<br/>"||m.textContent.trim()==="")){m.textContent="",m.appendChild(d);const v=document.createTextNode(" ");m.appendChild(v);const h=document.createRange();h.setStartAfter(d),h.collapse(!0),o.removeAllRanges(),o.addRange(h)}else{if(l.startOffset>0){const h=a.textContent.substring(0,l.startOffset),_=h[h.length-1];if(_&&_!==" "&&_!==" "&&_!==`
|
|
102
|
+
`){const D=document.createTextNode(" ");l.insertNode(D),l.setStartAfter(D)}}l.insertNode(d);const v=document.createTextNode(" ");l.setStartAfter(d),l.insertNode(v),l.setStartAfter(v),l.collapse(!0),o.removeAllRanges(),o.addRange(l)}}}else{if(r&&l.startOffset>0){const m=a.textContent.substring(0,l.startOffset),v=m[m.length-1];if(v&&v!==" "&&v!==" "&&v!==`
|
|
103
|
+
`){const h=document.createTextNode(" ");l.insertNode(h),l.setStartAfter(h)}}l.insertNode(d);const u=document.createTextNode(" ");l.setStartAfter(d),l.insertNode(u),l.setStartAfter(u),l.collapse(!0),o.removeAllRanges(),o.addRange(l)}}re()}e.nextTick(()=>{Yt(),Rl()})},Zl=()=>{if(!f.value||ne.value)return;const o=window.getSelection();let l=null;o&&o.rangeCount>0&&(l=wn());const a=/(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,r=document.createTreeWalker(f.value,NodeFilter.SHOW_TEXT,{acceptNode:m=>{const v=m.parentElement;return!v||v.closest("a")||v.closest(".dss-image-wrapper")||!m.textContent||m.textContent.trim()===""?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),c=[];let d;for(;d=r.nextNode();)c.push(d);let u=!1;for(let m=c.length-1;m>=0;m--){const v=c[m],h=v.textContent;a.lastIndex=0;const _=[...h.matchAll(a)];if(_.length===0)continue;const D=_.filter(K=>{const $e=K[0],Se=K.index;if(Se>0&&h[Se-1]==="@"||Se+$e.length<h.length&&h[Se+$e.length]==="@")return!1;const yt=v.parentElement;return!(yt&&yt.closest("a"))});if(D.length===0)continue;if(D.length===1&&D[0][0]===h.trim()){const K=D[0][0],$e=K.startsWith("http://")||K.startsWith("https://")?K:`https://${K}`,Se=document.createElement("a");Se.href=$e,Se.textContent=K,Se.style.color="#60afdf",Se.style.textDecoration="underline",v.parentNode&&(v.parentNode.replaceChild(Se,v),u=!0);continue}let x=0;const oe=document.createDocumentFragment();if(D.forEach(K=>{const $e=K.index,Se=K[0];if($e>x){const un=h.substring(x,$e);un&&oe.appendChild(document.createTextNode(un))}const yt=Se.startsWith("http://")||Se.startsWith("https://")?Se:`https://${Se}`,vn=document.createElement("a");vn.href=yt,vn.textContent=Se,vn.style.color="#60afdf",vn.style.textDecoration="underline",oe.appendChild(vn),x=$e+Se.length}),x<h.length){const K=h.substring(x);K&&oe.appendChild(document.createTextNode(K))}v.parentNode&&oe.childNodes.length>0&&(v.parentNode.replaceChild(oe,v),u=!0)}u&&l&&e.nextTick(()=>{Nn(l),Yt()})},xo=()=>{if(!f.value)return;const o=/<u>([\s\S]*?)<\/u>|<ins>([\s\S]*?)<\/ins>/gi,l=document.createTreeWalker(f.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}}),a=[];let r;for(;r=l.nextNode();)a.push(r);for(let c=a.length-1;c>=0;c--){const d=a[c],u=d.textContent,m=[...u.matchAll(o)];if(m.length===0)continue;let v=0;const h=document.createDocumentFragment();m.forEach(_=>{const D=_.index,x=_[0].startsWith("<u>")?"u":"ins",oe=_[1]||_[2]||"";D>v&&h.appendChild(document.createTextNode(u.substring(v,D)));const K=document.createElement(x);K.textContent=oe,h.appendChild(K),v=D+_[0].length}),v<u.length&&h.appendChild(document.createTextNode(u.substring(v))),d.parentNode&&h.childNodes.length>0&&d.parentNode.replaceChild(h,d)}},Eo=o=>{if(!f.value||ne.value)return;if(!o){xo();return}if(!["*","_",">"].includes(o))return;const a=window.getSelection();if(!a||a.rangeCount===0)return;const r=a.getRangeAt(0);if(!r.collapsed)return;const c=r.startContainer.nodeType===Node.TEXT_NODE?r.startContainer.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div"):r.startContainer.closest?.("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div");if(!c||c===f.value||!f.value.contains(c))return;const d=()=>{let un="",tn=0,dn=!1;const rn=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:Qn=>Qn.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});document.createTreeWalker(c,NodeFilter.SHOW_TEXT,null);let on=0;for(;rn.nextNode();){const Qn=rn.currentNode,ll=Qn.textContent||"",il=on;if(on+=ll.length,Qn===r.startContainer){un+=ll.substring(0,r.startOffset),tn=il+r.startOffset,dn=!0;break}un+=ll}return dn||(tn=un.length),{textBeforeCursor:un,cursorCharOffset:tn}},{textBeforeCursor:u}=d();if(!u.length)return;let m=null,v=null;if(u.endsWith("**")&&(m=u.match(/\*\*(.+?)\*\*$/s))||u.endsWith("__")&&(m=u.match(/__(.+?)__$/s))?v="strong":u.endsWith("*")&&!u.endsWith("**")&&(m=u.match(new RegExp("(?<!\\*)\\*([^*]+)\\*$")))||u.endsWith("_")&&!u.endsWith("__")&&(m=u.match(new RegExp("(?<!_)_([^_]+)_$")))?v="em":o===">"&&((m=u.match(/<u>(.+?)<\/u>$/s))||(m=u.match(/<ins>(.+?)<\/ins>$/s)))&&(v=m[0].startsWith("<u>")?"u":"ins",m[0].startsWith("<u>"),m[0].startsWith("<u>")),!m||!m[1])return;const h=m[0],_=m[1],D=u.length-h.length,oe=(un=>{let tn=0;const dn=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:on=>on.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let rn;for(;rn=dn.nextNode();){const on=(rn.textContent||"").length;if(tn+on>=un)return{node:rn,offset:un-tn};tn+=on}return null})(D);if(!oe)return;const K=document.createRange();K.setStart(oe.node,oe.offset),K.setEnd(r.endContainer,r.endOffset);const $e=document.createElement(v);$e.textContent=_,K.deleteContents(),K.insertNode($e);const Se=window.getSelection(),yt=document.createRange();yt.setStartAfter($e),yt.collapse(!0),Se.removeAllRanges(),Se.addRange(yt);const vn=wn();e.nextTick(()=>{re(),vn&&Nn(vn)})},so=()=>{f.value&&(xt.value=wn(),Tt.value="",Ft.value="",Ze.value="",G.value="",ue.value="",Wt.value=null,kt.value=null,Me.value="upload",Et.value=!0,ln(),e.nextTick(()=>{He.value&&He.value.focus(),Xe.value&&(Xe.value.value="")}))},Kn=o=>{const l=o.target?.files?.[0];if(!l){Wt.value=null,Ft.value="";return}Wt.value=l;const a=new FileReader;a.onload=r=>{Ft.value=r.target?.result||""},a.readAsDataURL(l)},Gn=()=>{Xe.value&&Xe.value.click()},Ul=()=>{G.value&&(ue.value="")},ro=()=>{ue.value&&(G.value="")},So=()=>{let o=kt.value;if(!o){const l=window.getSelection();if(l&&l.rangeCount>0){const r=l.getRangeAt(0).commonAncestorContainer;o=r.nodeType===1?r.closest("img"):r.parentElement?.closest("img")}}if(o){const l=o.getAttribute("data-alt")||o.getAttribute("alt")||"";kt.value=o,Tt.value=l.trim()===""||l.trim()==="Image"?"":l;const a=o.getAttribute("src")||o.src||"";a.startsWith("http://")||a.startsWith("https://")?(Ze.value=a,Ft.value="",Me.value="url"):(Ft.value=a,Ze.value="",Me.value="upload");const c=o.style.width||o.getAttribute("width")||"",d=o.style.height||o.getAttribute("height")||"";G.value=c.endsWith("px")?c.replace("px",""):c,ue.value=d.endsWith("px")?d.replace("px",""):d,xt.value=null}else{so();return}Et.value=!0,be.value=!1,Mt.value=!1,e.nextTick(()=>{Me.value==="url"&&Zt.value?(Zt.value.focus(),Zt.value.select()):He.value&&(He.value.focus(),He.value.select()),Xe.value&&(Xe.value.value="")})},Vl=()=>{Et.value=!1,Tt.value="",Ft.value="",Ze.value="",G.value="",ue.value="",Wt.value=null,kt.value=null,xt.value=null,Me.value="upload"},$n=()=>{const o=(Tt.value||"").trim(),l=f.value?._mutationObserver;l&&l.disconnect(),P.value?(Re.value&&(clearTimeout(Re.value),Re.value=null),tt(),P.value=!1):tt();const a=Me.value==="url"?Ze.value.trim():Ft.value;if(kt.value&&f.value&&f.value.contains(kt.value)){a&&(kt.value.src=a),kt.value.setAttribute("alt",o),kt.value.setAttribute("data-alt",o),G.value?(kt.value.style.width=`${G.value}px`,kt.value.setAttribute("width",G.value)):(kt.value.style.removeProperty("width"),kt.value.removeAttribute("width")),ue.value?(kt.value.style.height=`${ue.value}px`,kt.value.setAttribute("height",ue.value)):(kt.value.style.removeProperty("height"),kt.value.removeAttribute("height"));const r=window.getSelection();if(r){r.removeAllRanges();const c=document.createRange();c.setStartAfter(kt.value),c.collapse(!0),r.addRange(c)}re()}else{if(!a){l&&f.value&&l.observe(f.value,{childList:!0,subtree:!0}),Vl();return}if(f.value){f.value.focus();const r=window.getSelection();r&&r.rangeCount>0&&r.removeAllRanges();const c=window.getSelection();let d=null;if(xt.value&&(Nn(xt.value),c&&c.rangeCount>0&&(d=c.getRangeAt(0))),!d&&c&&c.rangeCount>0&&(d=c.getRangeAt(0)),!d&&f.value){if(d=document.createRange(),f.value.childNodes.length===0){const h=document.createElement("p");h.innerHTML="<br>",f.value.appendChild(h),d.setStart(h,0),d.collapse(!0)}else d.selectNodeContents(f.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}if(!d){Vl();return}const u=d.commonAncestorContainer,m=u.nodeType===3?u.parentElement:u;if(!f.value.contains(m)){if(d=document.createRange(),f.value.childNodes.length===0){const h=document.createElement("p");h.innerHTML="<br>",f.value.appendChild(h),d.setStart(h,0),d.collapse(!0)}else d.selectNodeContents(f.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}const v=document.createElement("img");v.src=a,v.setAttribute("alt",o),v.setAttribute("data-alt",o),G.value&&(v.style.width=`${G.value}px`,v.setAttribute("width",G.value)),ue.value&&(v.style.height=`${ue.value}px`,v.setAttribute("height",ue.value));try{d.insertNode(v),d.setStartAfter(v),d.collapse(!0),c&&(c.removeAllRanges(),c.addRange(d))}catch{if(f.value){if(f.value.childNodes.length===0){const D=document.createElement("p");f.value.appendChild(D),D.appendChild(v)}else{const D=f.value.lastChild;if(D&&D.nodeType===1)D.appendChild(v);else{const x=document.createElement("p");f.value.appendChild(x),x.appendChild(v)}}const _=document.createRange();_.setStartAfter(v),_.collapse(!0),c&&(c.removeAllRanges(),c.addRange(_))}}kt.value=v,re()}}e.nextTick(()=>{l&&f.value&&l.observe(f.value,{childList:!0,subtree:!0}),Yt(),en(),Vl()})};e.watch(()=>A.modelValue,o=>{if(A.richText&&f.value&&!ne.value){const l=Cl(o||""),r=f.value.innerHTML.replace(/ |\u00A0/g," "),c=l.replace(/ |\u00A0/g," ");if(r!==c){const d=wn();f.value.innerHTML=l,e.nextTick(()=>{ht();const u=f.value.innerHTML||"",m=A.title||"",v=A.description||"";X.value=u,me.value=m,ze.value=v,j.value=u,nt.value=m,St.value=v,je.value=[],_t.value=[],Re.value&&(clearTimeout(Re.value),Re.value=null),P.value=!1,d&&Nn(d),Z(),Vt(),_e(),Yt(),en(),wt(),hn("watch-modelValue")})}}},{immediate:!0}),e.watch(()=>A.richText,o=>{o?(en(),e.nextTick(()=>{Xl()})):(Al(),le.value=[],Ye.value&&(Ye.value.disconnect(),Ye.value=null)),wt()}),e.watch(()=>A.floatingToolbar,o=>{o?en():Al()}),e.watch(()=>A.disabled,o=>{o&&Al(),wt()}),e.watch(()=>A.description,()=>{e.nextTick(()=>{V.value?Un():ul()})}),e.watch(()=>A.title,()=>{e.nextTick(()=>{sn.value?zn():Vn()})}),e.watch(()=>A.customToolbarSlots,()=>{e.nextTick(()=>{Qt()})},{deep:!0}),e.watch(()=>A.comments,(o,l)=>{if(el.value){el.value=!1;return}Ll.value||A.richText&&f.value&&e.nextTick(()=>{bn()})},{deep:!0,immediate:!1});const bn=()=>{if(!Ll.value&&!(!A.comments||!Array.isArray(A.comments)||A.comments.length===0)&&!(!A.richText||!f.value)){Ll.value=!0;try{const o=new Set,l=A.comments.filter(u=>{const m=String(u.conversation_id||u.id);return o.has(m)?!1:(o.add(m),!0)}),a=f.value.querySelectorAll("[data-comment], [data-fake-comment]"),r=a.length;a.forEach(u=>{const m=u.parentNode;if(m){for(;u.firstChild;)m.insertBefore(u.firstChild,u);m.removeChild(u)}});let c=0;const d=new Set;l.forEach(u=>{if(!u.conversation_id||!u.selection_range)return;const m=typeof u.conversation_id=="string"&&u.conversation_id.startsWith("comment-")?null:Number(u.conversation_id)||u.conversation_id;if(!m)return;const v=String(m);if(d.has(v))return;const h=f.value.querySelector(`[data-comment="${v}"]`);if(h){Kt(h,u),d.add(v);return}try{const _=Zo(u.selection_range,u.selection_text);if(_&&!_.collapsed){const D=_.commonAncestorContainer,x=D.nodeType===3?D.parentElement:D;if(x){const $e=x.closest("[data-comment], [data-fake-comment]");if($e){const Se=$e.getAttribute("data-comment")||$e.getAttribute("data-fake-comment");if(String(Se)===String(m)){$e.setAttribute("data-comment",v),$e.removeAttribute("data-fake-comment"),Kt($e,u),d.add(v);return}else return}}const oe=f.value.querySelector(`[data-comment="${v}"]`);if(oe){Kt(oe,u),d.add(v);return}const K=document.createElement("span");K.setAttribute("data-comment",v),Kt(K,u);try{_.surroundContents(K),c++,d.add(v)}catch{try{const Se=document.createRange();Se.setStart(_.startContainer,_.startOffset),Se.setEnd(_.endContainer,_.endOffset),io(Se),Se.surroundContents(K),c++,d.add(v)}catch{try{const yt=_.extractContents();K.appendChild(yt),_.insertNode(K),c++,d.add(v)}catch(yt){console.warn("Failed to create comment marker:",yt)}}}}}catch{}}),e.nextTick(()=>{hn("restoreCommentsFromModel"),re(),Ll.value=!1})}catch{Ll.value=!1}}},io=o=>{if(!o||!f.value)return o;try{const l=["P","DIV","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"];let a=o.startContainer,r=o.startOffset;if(a.nodeType===3){const u=a.parentElement;u&&l.includes(u.tagName)&&(r===0&&!qt(a)||o.setStartBefore(u))}else a.nodeType===1&&l.includes(a.tagName)&&r>0&&o.setStartBefore(a);let c=o.endContainer,d=o.endOffset;if(c.nodeType===3){const u=c.parentElement;u&&l.includes(u.tagName)&&(d===c.length&&!Vo(c)||o.setEndAfter(u))}else c.nodeType===1&&l.includes(c.tagName)&&d<c.childNodes.length&&o.setEndAfter(c);return o}catch{return o}},qt=o=>{let l=o.previousSibling;for(;l;){if(l.nodeType===3&&l.textContent.trim().length>0||l.nodeType===1&&l.textContent.trim().length>0)return!0;l=l.previousSibling}return!1},Vo=o=>{let l=o.nextSibling;for(;l;){if(l.nodeType===3&&l.textContent.trim().length>0||l.nodeType===1&&l.textContent.trim().length>0)return!0;l=l.nextSibling}return!1},Zo=(o,l)=>{if(!o||!f.value)return null;try{const a=document.createRange();if(o.type==="text"&&typeof o.start=="number"&&typeof o.end=="number"){let r=0;const c=[f.value];let d=null,u=!1,m=!1;for(;!m&&(d=c.pop());)if(d.nodeType===3){const v=r+d.length;!u&&o.start>=r&&o.start<=v&&(a.setStart(d,o.start-r),u=!0),u&&o.end>=r&&o.end<=v&&(a.setEnd(d,o.end-r),m=!0),r=v}else{let v=d.childNodes.length;for(;v--;)c.push(d.childNodes[v])}return u?io(a):null}}catch{return null}return null},Kt=(o,l)=>{if(!o||!l)return;const a=l.conversation||[],r=new Set,c=[],d=m=>{m&&m.id&&!r.has(m.id)&&(r.add(m.id),c.push(m))};a.length>0&&a.forEach(m=>{m.user&&d(m.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=a.length;u>0?o.setAttribute("data-comment-count",String(u)):o.removeAttribute("data-comment-count")},hn=(o="unknown")=>{if(!A.richText||!f.value){le.value=[];return}Date.now()-It.value<Ht&&ot.value!==null||ot.value===null&&(ot.value=requestAnimationFrame(()=>{if(ot.value=null,It.value=Date.now(),Fe.value)return;Fe.value=!0;const a={},r=f.value;if(!r){Fe.value=!1;return}const c=r.closest(".editor-with-comments");if(!c){Fe.value=!1;return}const d=r.querySelectorAll("[data-comment], [data-fake-comment]"),u=[],m=new Set;d.forEach(x=>{const oe=x.getAttribute("data-comment")||x.getAttribute("data-fake-comment");oe&&x.tagName==="SPAN"&&(m.has(oe)||(u.push(x),m.add(oe)))}),d.forEach(x=>{const oe=x.getAttribute("data-comment")||x.getAttribute("data-fake-comment");!oe||m.has(oe)||(["P","DIV","H1","H2","H3","H4","H5","H6"].includes(x.tagName)?x.querySelector(`span[data-comment="${oe}"], span[data-fake-comment="${oe}"]`)||(u.push(x),m.add(oe)):x.tagName!=="SPAN"&&(u.push(x),m.add(oe)))});const v=c.getBoundingClientRect(),h=r.getBoundingClientRect();u.forEach((x,oe)=>{let K=x.getAttribute("data-comment")||x.getAttribute("data-fake-comment");if(!K)return;if(typeof K=="string"&&K.startsWith("comment-")){const ol=x.textContent?.trim(),al=A.comments?.find(Ln=>(typeof Ln.conversation_id=="string"&&Ln.conversation_id.startsWith("comment-")?null:Ln.conversation_id)&&Ln.selection_text?.trim()===ol);al?(K=String(al.conversation_id),x.setAttribute("data-comment",K),x.removeAttribute("data-fake-comment")):(K=String(Date.now()),x.setAttribute("data-comment",K),x.removeAttribute("data-fake-comment"))}const $e=x.getBoundingClientRect(),Se=window.getComputedStyle(x),yt=parseFloat(Se.lineHeight)||parseFloat(Se.fontSize)*1.2,tn=$e.top-h.top+yt/2-15,rn=h.top-v.top+tn;let on=null,Qn=null,ll=0;const il=[],Mo=new Set;if(K&&A.comments){const ol=A.comments.find(al=>String(al.conversation_id||al.id)===String(K));if(ol){const al=ol.conversation||[];al.length>0?(al.forEach(Ln=>{Ln.user&&Ln.user.id&&!Mo.has(Ln.user.id)&&(Mo.add(Ln.user.id),il.push(Ln.user))}),ll=al.length):(ll=0,on=null,Qn=null),il.length>0?on=il[0]:on=null,il.length>1?Qn=il[1]:Qn=null}}const gl=$e.top+yt/2-15,Xo=gl+30,uo=5,_o=Xo>h.top+uo&&gl<h.bottom-uo?1:0;le.value.find(ol=>ol.id===K);let Yl=x;if(!Yl&&K&&f.value){const ol=String(K);Yl=f.value.querySelector(`[data-comment="${ol}"], [data-fake-comment="${ol}"]`)}const mo=il.length;a[K]?(a[K].top=rn,a[K].opacity=_o,a[K].element=Yl,a[K].firstUser=on,a[K].secondUser=Qn,a[K].totalCount=ll,a[K].uniqueUserCount=mo):a[K]={id:K,top:rn,opacity:_o,element:Yl,firstUser:on,secondUser:Qn,totalCount:ll,uniqueUserCount:mo}});const _=Object.values(a).map(x=>{const oe=Math.max(0,(x.uniqueUserCount??0)-2);if(!x.element&&x.id&&f.value){const $e=String(x.id);x.element=f.value.querySelector(`[data-comment="${$e}"], [data-fake-comment="${$e}"]`)}return{...x,firstUser:x.firstUser||null,secondUser:x.secondUser||null,totalCount:x.totalCount,additionalCount:oe}});(le.value.length!==_.length||_.some((x,oe)=>{const K=le.value[oe];if(!K)return!0;const $e=(K.firstUser?.id||null)!==(x.firstUser?.id||null),Se=(K.secondUser?.id||null)!==(x.secondUser?.id||null);return K.id!==x.id||Math.abs(K.top-x.top)>1||K.opacity!==x.opacity||K.totalCount!==x.totalCount||K.additionalCount!==x.additionalCount||$e||Se||K.element!==x.element}))&&(le.value=_),Fe.value=!1}))},No=o=>{if(!o)return;let l=o.element;if(!l&&o.id&&f.value){const a=String(o.id);l=f.value.querySelector(`[data-comment="${a}"], [data-fake-comment="${a}"]`)}l&&(yn(),Jt.value=l,l.classList.add("editor-comment-highlighted"))},yn=(o=!1)=>{!o&<.value!==null&&Jt.value&&(Jt.value.getAttribute("data-comment")||Jt.value.getAttribute("data-fake-comment"))===lt.value||(f.value&&f.value.querySelectorAll(".editor-comment-highlighted").forEach(a=>{a.classList.remove("editor-comment-highlighted")}),Jt.value&&(Jt.value.classList.remove("editor-comment-highlighted"),Jt.value=null))},co=o=>{if(!o||!o.element)return;yn(!0);const l=o.element.getAttribute("data-comment")||o.element.getAttribute("data-fake-comment");if(!l)return;const a=`[data-comment="${l}"], [data-fake-comment="${l}"]`;U("comment-marker-clicked",{commentId:l,selector:a,element:o.element})},Uo=()=>{yn()},Xl=()=>{!A.richText||!f.value||(Ye.value&&Ye.value.disconnect(),at.value!==null&&(clearTimeout(at.value),at.value=null),Ye.value=new MutationObserver(()=>{at.value===null&&(at.value=setTimeout(()=>{at.value=null,e.nextTick(()=>{hn("MutationObserver")})},200))}),Ye.value.observe(f.value,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-comment","data-fake-comment","data-comment-user","data-comment-user-2","data-comment-count"]}),hn("setupCommentMarkersObserver-initial"))},Bo=(o,l)=>{if(!o||!l)return;const a=l.getBoundingClientRect();let r=a.top,c=a.right+4;o.style.top=`${r}px`,o.style.left=`${c}px`,o.offsetHeight;const d=o.getBoundingClientRect(),u=window.innerWidth,m=window.innerHeight;if(d.right>u){const v=a.left-d.width-4;o.style.left=`${v}px`}if(d.bottom>m){const v=Math.max(8,m-d.height-8);o.style.top=`${v}px`}d.top<0&&(o.style.top="8px")};return e.watch(()=>et.value,o=>{e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(a=>{const r=a.getAttribute("data-submenu-id");if(r===o&&o){const c=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${r}"]`);if(c){if(a.parentNode!==document.body){const d=a.parentNode;a.dataset.originalParentRef=d===c?"inside":"sibling",document.body.appendChild(a)}a.style.display="block",a.style.visibility="hidden",a.style.opacity="0",requestAnimationFrame(()=>{requestAnimationFrame(()=>{Bo(a,c),a.offsetHeight,a.setAttribute("data-active","true"),a.style.visibility="visible",a.style.opacity="1"})})}else a.setAttribute("data-active","true")}else a.setAttribute("data-active","false"),a.style.display="none",a.style.top="",a.style.left="",a.style.visibility="",a.style.opacity=""})})}),e.watch(()=>[we.value,rt.value],()=>{we.value==="askAi"||rt.value==="askAi"?e.nextTick(()=>{fn()}):(et.value=null,e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(l=>{if(l.parentNode===document.body){const a=l.getAttribute("data-submenu-id");if(a){const r=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${a}"]`);if(r)if(l.dataset.originalParentRef==="inside")r.appendChild(l);else{const d=r.closest(".dss-toolbar-dropdown");d&&d.insertBefore(l,r.nextSibling)}}}})}))}),e.watch(()=>A.locale,o=>{o&&o!==ce.value&&(ce.value=o)},{immediate:!0}),te({openCommentOverlayForSelector:Co,updateCommentMarkers:hn,restoreCommentsFromModel:bn}),(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-text-editor-container editor-with-comments",Ge.value]),style:e.normalizeStyle(Lt.value)},[T.richText?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-text-editor-toolbar",onMousedown:l[14]||(l[14]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",_u,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:bt,title:e.unref(L)("textEditor.toolbar.undo")},[...l[45]||(l[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,$u),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!W.value}]),onClick:J,title:e.unref(L)("textEditor.toolbar.redo")},[...l[46]||(l[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,Lu),l[61]||(l[61]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",Tu,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:l[0]||(l[0]=a=>Pn("paragraph")),title:e.unref(L)("textEditor.toolbar.paragraphFormat")},[E.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:z.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,Du)):E.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:z.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,Hu)):E.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:z.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,Ru)):E.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:z.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,Fu)):E.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:z.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,Iu)):E.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:z.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,zu)):(e.openBlock(),e.createElementBlock("svg",Pu,[...l[47]||(l[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)])])),l[48]||(l[48]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,Au),we.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:l[8]||(l[8]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[1]||(l[1]=a=>Mn("<h1>"))},[e.createElementVNode("img",{src:z.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,Ou),e.createElementVNode("h1",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[2]||(l[2]=a=>Mn("<h2>"))},[e.createElementVNode("img",{src:z.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,qu),e.createElementVNode("h2",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[3]||(l[3]=a=>Mn("<h3>"))},[e.createElementVNode("img",{src:z.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,Wu),e.createElementVNode("h3",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[4]||(l[4]=a=>Mn("<h4>"))},[e.createElementVNode("img",{src:z.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,Zu),e.createElementVNode("h4",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[5]||(l[5]=a=>Mn("<h5>"))},[e.createElementVNode("img",{src:z.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,Uu),e.createElementVNode("h5",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[6]||(l[6]=a=>Mn("<h6>"))},[e.createElementVNode("img",{src:z.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,Xu),e.createElementVNode("h6",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[7]||(l[7]=a=>Mn("<p>"))},[l[49]||(l[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":nn("bold")}]),onClick:l[9]||(l[9]=a=>Bn("bold")),title:e.unref(L)("textEditor.toolbar.bold")},[...l[50]||(l[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,Yu),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":nn("italic")}]),onClick:l[10]||(l[10]=a=>Bn("italic")),title:e.unref(L)("textEditor.toolbar.italic")},[...l[51]||(l[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,ju),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":nn("underline")}]),onClick:l[11]||(l[11]=a=>Bn("underline")),title:e.unref(L)("textEditor.toolbar.underline")},[...l[52]||(l[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,Ku),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":ft.value}]),onClick:Ol,title:e.unref(L)("textEditor.toolbar.citation")},[...l[53]||(l[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,Gu),l[62]||(l[62]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:$l,title:e.unref(L)("textEditor.toolbar.removeLink")},[...l[55]||(l[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,Ju)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:_l,title:e.unref(L)("textEditor.toolbar.insertLink")},[...l[54]||(l[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,Qu)),l[63]||(l[63]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":nn("insertUnorderedList")}]),onClick:k,title:e.unref(L)("textEditor.toolbar.bulletList")},[...l[56]||(l[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,ed),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":nn("insertOrderedList")}]),onClick:y,title:e.unref(L)("textEditor.toolbar.numberList")},[...l[57]||(l[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,td),l[64]||(l[64]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:so,title:e.unref(L)("textEditor.toolbar.image")},[...l[58]||(l[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,nd),Y.value?(e.openBlock(),e.createElementBlock("div",ld)):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(L)("textEditor.toolbar.comment"),onClick:go},[...l[59]||(l[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,od)):e.createCommentVNode("",!0),T.askAi?(e.openBlock(),e.createElementBlock("div",ad)):e.createCommentVNode("",!0),T.askAi?(e.openBlock(),e.createElementBlock("div",sd,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-dropdown-toggle",onClick:l[12]||(l[12]=a=>Pn("askAi")),title:e.unref(L)("textEditor.toolbar.askAi")},[l[60]||(l[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",id,e.toDisplayString(e.unref(L)("textEditor.toolbar.askAi")),1)],8,rd),we.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:l[13]||(l[13]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(o.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",cd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.customToolbarSlots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[Xt(a)?(e.openBlock(),e.createElementBlock("div",ud,[e.renderSlot(o.$slots,a)])):e.createCommentVNode("",!0),Xt(a)&&r<T.customToolbarSlots.length-1&&An(r)?(e.openBlock(),e.createElementBlock("div",dd)):e.createCommentVNode("",!0)],64))),128))])],32)):e.createCommentVNode("",!0),(we.value==="paragraph"||we.value==="askAi")&&T.richText?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-dropdown-overlay",onClick:ln})):e.createCommentVNode("",!0),e.createVNode(Qo,{showModal:Ae.value,width:"500px",height:"55vh",onCloseModal:Rl},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(L)("textEditor.link.editLink")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",md,[e.createElementVNode("div",pd,[e.createElementVNode("label",fd,e.toDisplayString(e.unref(L)("textEditor.link.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkAltInput",ref:xe,type:"text","onUpdate:modelValue":l[15]||(l[15]=a=>it.value=a),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.link.enterAltText"),onKeyup:e.withKeys(ao,["enter"])},null,40,vd),[[e.vModelText,it.value]])]),e.createElementVNode("div",gd,[e.createElementVNode("label",hd,e.toDisplayString(e.unref(L)("textEditor.link.url")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkUrlInput",ref:R,type:"text","onUpdate:modelValue":l[16]||(l[16]=a=>qe.value=a),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.link.enterUrl"),onKeyup:e.withKeys(ao,["enter"])},null,40,yd),[[e.vModelText,qe.value]])])])]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:Rl},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:ao},e.toDisplayString(e.unref(L)("textEditor.link.save")),1)]),_:1},8,["showModal"]),e.createVNode(Qo,{showModal:Et.value,width:"500px",height:"80vh",onCloseModal:Vl},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(kt.value?e.unref(L)("textEditor.image.editImage"):e.unref(L)("textEditor.image.addImage")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",kd,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Me.value==="upload"}]),onClick:l[17]||(l[17]=a=>Me.value="upload")},e.toDisplayString(e.unref(L)("textEditor.image.upload")),3),l[65]||(l[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":Me.value==="url"}]),onClick:l[18]||(l[18]=a=>Me.value="url")},e.toDisplayString(e.unref(L)("textEditor.image.imageLink")),3)]),Me.value==="upload"?(e.openBlock(),e.createElementBlock("div",Cd,[e.createElementVNode("div",bd,[e.createElementVNode("div",wd,[ct.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("label",xd,e.toDisplayString(e.unref(L)("textEditor.image.uploadImage")),1)),ct.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-image-upload-preview",onClick:Gn},[e.createElementVNode("img",{src:Ft.value,alt:"Preview",class:"dss-image-preview-image"},null,8,Ed),l[66]||(l[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:Xe,type:"file",accept:"image/*",class:"dss-image-file-input-hidden",onChange:Kn},null,544)])):(e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"imageFileInput",ref:Xe,type:"file",accept:"image/*",class:"dss-link-modal-input dss-link-modal-input-image",onChange:Kn},null,544))]),e.createElementVNode("div",Sd,[e.createElementVNode("label",Vd,e.toDisplayString(e.unref(L)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageAltInput",ref:He,type:"text","onUpdate:modelValue":l[19]||(l[19]=a=>Tt.value=a),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterAltText"),onKeyup:e.withKeys($n,["enter"])},null,40,Nd),[[e.vModelText,Tt.value]])]),e.createElementVNode("div",Bd,[e.createElementVNode("label",Md,e.toDisplayString(e.unref(L)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[20]||(l[20]=a=>G.value=a),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys($n,["enter"]),onInput:Ul},null,40,_d),[[e.vModelText,G.value]])]),e.createElementVNode("div",$d,[e.createElementVNode("label",Ld,e.toDisplayString(e.unref(L)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[21]||(l[21]=a=>ue.value=a),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys($n,["enter"]),onInput:ro},null,40,Td),[[e.vModelText,ue.value]])])])])):e.createCommentVNode("",!0),Me.value==="url"?(e.openBlock(),e.createElementBlock("div",Ad,[e.createElementVNode("div",Dd,[e.createElementVNode("div",Hd,[e.createElementVNode("label",Rd,e.toDisplayString(e.unref(L)("textEditor.image.imageUrl")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageUrlInput",ref:Zt,type:"text","onUpdate:modelValue":l[22]||(l[22]=a=>Ze.value=a),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterImageUrl"),onKeyup:e.withKeys($n,["enter"])},null,40,Fd),[[e.vModelText,Ze.value]])]),e.createElementVNode("div",Id,[e.createElementVNode("label",zd,e.toDisplayString(e.unref(L)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":l[23]||(l[23]=a=>Tt.value=a),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterAltText"),onKeyup:e.withKeys($n,["enter"])},null,40,Pd),[[e.vModelText,Tt.value]])]),e.createElementVNode("div",Od,[e.createElementVNode("label",qd,e.toDisplayString(e.unref(L)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[24]||(l[24]=a=>G.value=a),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys($n,["enter"]),onInput:Ul},null,40,Wd),[[e.vModelText,G.value]])]),e.createElementVNode("div",Zd,[e.createElementVNode("label",Ud,e.toDisplayString(e.unref(L)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[25]||(l[25]=a=>ue.value=a),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys($n,["enter"]),onInput:ro},null,40,Xd),[[e.vModelText,ue.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:$n},e.toDisplayString(e.unref(L)("textEditor.image.save")),1)]),_:1},8,["showModal"]),e.createElementVNode("div",{class:e.normalizeClass(["dss-text-editor-title-wrapper",{"dss-text-editor-no-border-bottom":Rn.value&&sn.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.labels.title")),1),e.createElementVNode("div",Yd,[sn.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",jd,[T.title?(e.openBlock(),e.createElementBlock("span",Kd,e.toDisplayString(T.title),1)):(e.openBlock(),e.createElementBlock("span",Gd,e.toDisplayString(pt.value),1))])),e.createElementVNode("textarea",{ref_key:"titleInputRef",ref:Pe,value:T.title,onInput:Fn,onFocus:Jn,onBlur:gn,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-title-input",{"dss-text-editor-title-input-blurred":!sn.value}]),placeholder:pt.value,disabled:T.disabled,rows:"1"},null,42,Qd)])],2),Rn.value&&sn.value?(e.openBlock(),e.createElementBlock("div",Jd,[e.renderSlot(o.$slots,"title-slot")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-text-editor-description-wrapper",{"dss-text-editor-no-border-bottom":yl.value&&V.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.labels.description")),1),e.createElementVNode("div",e1,[V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",t1,[T.description?(e.openBlock(),e.createElementBlock("span",n1,e.toDisplayString(T.description),1)):(e.openBlock(),e.createElementBlock("span",l1,e.toDisplayString(Qe.value),1))])),e.createElementVNode("textarea",{ref_key:"descriptionInputRef",ref:gt,value:T.description,onInput:Ml,onFocus:Il,onBlur:zl,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-description-input",{"dss-text-editor-description-input-blurred":!V.value}]),placeholder:Qe.value,disabled:T.disabled,rows:"1"},null,42,o1)])],2),yl.value&&V.value?(e.openBlock(),e.createElementBlock("div",a1,[e.renderSlot(o.$slots,"description-slot")])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:e.normalizeClass(["editor-comment-marker-group",{"editor-comment-marker-active":lt.value===a.id,"editor-comment-marker-group-out-of-view":a.opacity===0}]),"data-comment-id":a.id,style:e.normalizeStyle({top:a.top+"px"}),onMouseenter:r=>No(a),onMouseleave:Uo},[a.firstUser?(e.openBlock(),e.createElementBlock("div",{key:0,class:"editor-comment-marker editor-comment-marker-first",onClick:e.withModifiers(r=>co(a),["stop"])},[a.firstUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.firstUser.avatar,alt:a.firstUser.name||"avatar"},null,8,i1)):(e.openBlock(),e.createElementBlock("span",c1,e.toDisplayString(a.firstUser.initials||(a.firstUser.name?a.firstUser.name.charAt(0):"")),1))],8,r1)):e.createCommentVNode("",!0),a.secondUser?(e.openBlock(),e.createElementBlock("div",{key:1,class:"editor-comment-marker editor-comment-marker-second",onClick:e.withModifiers(r=>co(a),["stop"])},[a.secondUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.secondUser.avatar,alt:a.secondUser.name||"avatar"},null,8,d1)):(e.openBlock(),e.createElementBlock("span",m1,e.toDisplayString(a.secondUser.initials||(a.secondUser.name?a.secondUser.name.charAt(0):"")),1))],8,u1)):e.createCommentVNode("",!0),a.additionalCount>0?(e.openBlock(),e.createElementBlock("div",{key:2,class:"editor-comment-marker editor-comment-marker-additional",style:e.normalizeStyle({top:a.secondUser?"30px":"15px"}),"data-has-second-user":a.secondUser?"true":"false",onClick:e.withModifiers(r=>co(a),["stop"])},[e.createElementVNode("span",f1,"+"+e.toDisplayString(a.additionalCount),1)],12,p1)):e.createCommentVNode("",!0)],46,s1))),128)),T.richText?(e.openBlock(),e.createElementBlock("div",b1,[e.createElementVNode("div",{ref_key:"editorRef",ref:f,contenteditable:"true",spellcheck:"false",class:e.normalizeClass(["dss-text-editor-content",{"dss-text-editor-content-disabled":T.disabled,"dss-text-editor-fixed-height":T.fixedHeight}]),style:e.normalizeStyle(O.value),onInput:re,onBlur:st,onClick:ml,onMouseup:At,onKeyup:At,onKeydown:oo,onPaste:Oo,onMousemove:qo,onMouseleave:vl},null,38),e.createVNode(e.Transition,{name:"comment-overlay"},{default:e.withCtx(()=>[lt.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-overlay",style:e.normalizeStyle(pn.value)},[Yn.value||_n.value.length>0?(e.openBlock(),e.createElementBlock("div",w1,[e.createElementVNode("div",x1,[Yn.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-selection",innerHTML:Yn.value},null,8,E1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",S1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_n.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:"dss-comment-message"},[a.user&&(a.user.avatar||a.user.initials||a.user.name)?(e.openBlock(),e.createElementBlock("div",V1,[e.createElementVNode("div",N1,[a.user.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.user.avatar,alt:a.user.name||"avatar"},null,8,B1)):(e.openBlock(),e.createElementBlock("span",M1,e.toDisplayString(a.user.initials||(a.user.name?a.user.name.charAt(0):"")),1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",_1,[e.createElementVNode("div",$1,[e.createElementVNode("div",L1,e.toDisplayString(a.user&&a.user.name||"Comment"),1),a.createdAt?(e.openBlock(),e.createElementBlock("div",T1,e.toDisplayString(Fl(new Date(a.createdAt))),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-comment-body-text",{"comment-started":bl(a.text)||a.class==="comment-started"}])},e.toDisplayString(a.text||""),3)]),A.commentUser&&a.user&&a.user.id===A.commentUser.id&&!bl(a.text)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-comment-delete-button",onClick:e.withModifiers(c=>zo(a,r),["stop"]),title:e.unref(L)("textEditor.comment.delete")||"Delete comment"},[...l[68]||(l[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,A1)):e.createCommentVNode("",!0)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",D1,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"commentInputRef",ref:kn,"onUpdate:modelValue":l[26]||(l[26]=a=>cn.value=a),class:"dss-comment-input",rows:"1",placeholder:e.unref(L)("textEditor.comment.placeholder"),onKeydown:e.withKeys(e.withModifiers(ho,["prevent","stop"]),["enter"]),onInput:l[27]||(l[27]=()=>{if(kn.value){const a=kn.value;a.style.height="auto",a.style.height=`${a.scrollHeight}px`}})},null,40,H1),[[e.vModelText,cn.value]]),e.createElementVNode("button",{type:"button",class:"dss-comment-send-button",onClick:e.withModifiers(ho,["stop"])},[...l[69]||(l[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",R1,[e.createElementVNode("div",F1,[e.createElementVNode("span",I1,e.toDisplayString(se.value)+" "+e.toDisplayString(se.value===1?e.unref(L)("textEditor.footer.word"):e.unref(L)("textEditor.footer.words")),1),l[70]||(l[70]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",z1,e.toDisplayString(Ie.value)+" "+e.toDisplayString(Ie.value===1?e.unref(L)("textEditor.footer.character"):e.unref(L)("textEditor.footer.characters")),1)])])])):(e.openBlock(),e.createElementBlock("div",v1,[e.createElementVNode("textarea",{value:T.modelValue,onInput:wl,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-textarea",{"dss-text-editor-fixed-height":T.fixedHeight}]),placeholder:Ct.value,rows:T.rows,disabled:T.disabled,style:e.normalizeStyle(In.value)},null,46,g1),e.createElementVNode("div",h1,[e.createElementVNode("div",y1,[e.createElementVNode("span",k1,e.toDisplayString(se.value)+" "+e.toDisplayString(se.value===1?e.unref(L)("textEditor.footer.word"):e.unref(L)("textEditor.footer.words")),1),l[67]||(l[67]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",C1,e.toDisplayString(Ie.value)+" "+e.toDisplayString(Ie.value===1?e.unref(L)("textEditor.footer.character"):e.unref(L)("textEditor.footer.characters")),1)])])])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[ae.value&&ve.value&&f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(H.value),onMouseenter:l[28]||(l[28]=a=>Ce.value=!0),onMouseleave:Sl},[e.createElementVNode("span",{class:"dss-link-popup-url",onClick:e.withModifiers(Hl,["stop"]),title:ve.value},e.toDisplayString(ve.value),9,P1),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(Wo,["stop"]),title:e.unref(L)("textEditor.link.editLink")},[(e.openBlock(),e.createElementBlock("svg",q1,[...l[71]||(l[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,O1)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Mt.value&&Ut.value&&f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(Q.value),onMouseenter:l[29]||(l[29]=a=>be.value=!0),onMouseleave:Dl},[e.createElementVNode("div",W1,[Ut.value===e.unref(L)("textEditor.image.noAlt")?(e.openBlock(),e.createElementBlock("div",Z1,[...l[72]||(l[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:Ut.value},e.toDisplayString(Ut.value),9,U1)]),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(So,["stop"]),title:e.unref(L)("textEditor.image.editImage")},[(e.openBlock(),e.createElementBlock("svg",Y1,[...l[73]||(l[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,X1)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[T.floatingToolbar&&T.richText&&vt.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floatingToolbarRef",ref:Pt,class:"dss-floating-toolbar",style:e.normalizeStyle(We.value),onMousedown:l[44]||(l[44]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",j1,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(bt,["stop"]),title:e.unref(L)("textEditor.toolbar.undo")},[...l[74]||(l[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,K1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!W.value}]),onClick:e.withModifiers(J,["stop"]),title:e.unref(L)("textEditor.toolbar.redo")},[...l[75]||(l[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,G1),l[89]||(l[89]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",Q1,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:l[30]||(l[30]=e.withModifiers(a=>El("paragraph"),["stop"])),title:e.unref(L)("textEditor.toolbar.paragraphFormat")},[E.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:z.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,em)):E.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:z.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,tm)):E.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:z.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,nm)):E.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:z.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,lm)):E.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:z.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,om)):E.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:z.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,am)):(e.openBlock(),e.createElementBlock("svg",sm,[...l[76]||(l[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)])])),l[77]||(l[77]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,J1),rt.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:l[38]||(l[38]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[31]||(l[31]=a=>Tn("<h1>"))},[e.createElementVNode("h1",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[32]||(l[32]=a=>Tn("<h2>"))},[e.createElementVNode("h2",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[33]||(l[33]=a=>Tn("<h3>"))},[e.createElementVNode("h3",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[34]||(l[34]=a=>Tn("<h4>"))},[e.createElementVNode("h4",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[35]||(l[35]=a=>Tn("<h5>"))},[e.createElementVNode("h5",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[36]||(l[36]=a=>Tn("<h6>"))},[e.createElementVNode("h6",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[37]||(l[37]=a=>Tn("<p>"))},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),l[90]||(l[90]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":nn("bold")}]),onClick:l[39]||(l[39]=e.withModifiers(a=>Bn("bold"),["stop"])),title:e.unref(L)("textEditor.toolbar.bold")},[...l[78]||(l[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,rm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":nn("italic")}]),onClick:l[40]||(l[40]=e.withModifiers(a=>Bn("italic"),["stop"])),title:e.unref(L)("textEditor.toolbar.italic")},[...l[79]||(l[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,im),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":nn("underline")}]),onClick:l[41]||(l[41]=e.withModifiers(a=>Bn("underline"),["stop"])),title:e.unref(L)("textEditor.toolbar.underline")},[...l[80]||(l[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,cm),l[91]||(l[91]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":ft.value}]),onClick:e.withModifiers(Ol,["stop"]),title:e.unref(L)("textEditor.toolbar.citation")},[...l[81]||(l[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,um),l[92]||(l[92]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:e.withModifiers($l,["stop"]),title:e.unref(L)("textEditor.toolbar.removeLink")},[...l[83]||(l[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,mm)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:e.withModifiers(_l,["stop"]),title:e.unref(L)("textEditor.toolbar.insertLink")},[...l[82]||(l[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,dm)),l[93]||(l[93]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":nn("insertUnorderedList")}]),onClick:e.withModifiers(k,["stop"]),title:e.unref(L)("textEditor.toolbar.bulletList")},[...l[84]||(l[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,pm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":nn("insertOrderedList")}]),onClick:e.withModifiers(y,["stop"]),title:e.unref(L)("textEditor.toolbar.numberList")},[...l[85]||(l[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,fm),l[94]||(l[94]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(so,["stop"]),title:e.unref(L)("textEditor.toolbar.image")},[...l[86]||(l[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,vm),l[95]||(l[95]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",title:e.unref(L)("textEditor.toolbar.comment"),onClick:e.withModifiers(go,["stop"])},[...l[87]||(l[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,gm),T.askAi?(e.openBlock(),e.createElementBlock("div",hm)):e.createCommentVNode("",!0),T.askAi?(e.openBlock(),e.createElementBlock("div",ym,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-ai-float dss-toolbar-dropdown-toggle",onClick:l[42]||(l[42]=e.withModifiers(a=>El("askAi"),["stop"])),title:e.unref(L)("textEditor.toolbar.askAi")},[l[88]||(l[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",Cm,e.toDisplayString(e.unref(L)("textEditor.toolbar.askAi")),1)],8,km),rt.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:l[43]||(l[43]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(o.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),sl.value?(e.openBlock(),e.createElementBlock("div",bm,[T.askAi&&sl.value?(e.openBlock(),e.createElementBlock("div",wm)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.customToolbarSlots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[Xt(a)&&Hn(a)?(e.openBlock(),e.createElementBlock("div",xm,[e.renderSlot(o.$slots,a)])):e.createCommentVNode("",!0),Xt(a)&&Hn(a)&&r<T.customToolbarSlots.length-1&&Dn(r)?(e.openBlock(),e.createElementBlock("div",Em)):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)]))],6))}}),Nm={class:"dss-color-picker__section-title"},Bm={class:"dss-color-picker__presets-row"},Mm=["title","onClick"],_m={key:1,class:"dss-color-picker__section"},$m={class:"dss-color-picker__presets-row"},Lm=["title","onClick"],Tm={class:"dss-color-picker__section"},Am={class:"dss-color-picker__section-header"},Dm={class:"dss-color-picker__presets-row"},Hm=["title","onClick"],Rm=["onClick"],Fm={key:1,class:"dss-color-picker__presets-row dss-color-picker__presets-row--standalone"},Im=["title","onClick"],zm={class:"dss-color-picker__input-row"},Pm=["value"],Om={__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}},emits:["update:modelValue","update:presetColors"],setup(T,{emit:te}){function M(P){const X=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(P);if(!X)return{h:0,s:0,l:50};const j=parseInt(X[1],16)/255,me=parseInt(X[2],16)/255,ze=parseInt(X[3],16)/255,nt=Math.max(j,me,ze),St=Math.min(j,me,ze);let Pe=0,gt=0;const Ot=(nt+St)/2;if(nt!==St){const an=nt-St;switch(gt=Ot>.5?an/(2-nt-St):an/(nt+St),nt){case j:Pe=((me-ze)/an+(me<ze?6:0))/6;break;case me:Pe=((ze-j)/an+2)/6;break;case ze:Pe=((j-me)/an+4)/6;break}}return{h:Pe*360,s:gt*100,l:Ot*100}}function L(P,X,j){X/=100,j/=100;const me=X*Math.min(j,1-j),ze=nt=>{const St=(nt+P/30)%12,Pe=j-me*Math.max(Math.min(St-3,9-St,1),-1);return Math.round(255*Pe).toString(16).padStart(2,"0")};return`#${ze(0)}${ze(8)}${ze(4)}`}function ce(P){const X=P.replace(/^#/,"").match(/^([a-f\d]{6}|[a-f\d]{3})$/i);if(!X)return null;let j=X[1];return j.length===3&&(j=j.split("").map(me=>me+me).join("")),"#"+j}function z(P,X,j){X/=100,j/=100;const me=j+X*Math.min(j,1-j),ze=me===0?0:2-2*j/me;return{h:P,s:ze*100,v:me*100}}function A(P,X,j){X/=100,j/=100;const me=j*(1-X/2),ze=me===0||me===1?0:(j-me)/Math.min(me,1-me);return{h:P,s:ze*100,l:me*100}}const U=T,Ke=te,he=e.ref(!1),f=e.ref(!1),we=e.ref(!1),ge=e.ref(-1),ne=e.ref(-1),ae=e.ref(null),ve=e.ref(null),H=e.ref(null),Ce=e.ref(null),Ae=e.ref({top:0,left:0}),qe=e.ref(M(U.modelValue||"#b8a5de")),it=e.computed(()=>Array.isArray(U.presetGroups)&&U.presetGroups.length>0),R=e.computed(()=>it.value?0:U.initialPresetCount!=null?U.initialPresetCount:ne.value<0?null:ne.value),xe=e.computed(()=>{const P=R.value;return P==null?!0:Math.max(0,U.presetColors.length-P)<U.max}),Be=e.computed(()=>!!(f.value||ge.value>=0||!ke.value&&U.presetColors.length===0));e.computed(()=>{const P=R.value;return P!=null&&U.presetColors.length>P});const ke=e.computed(()=>it.value||R.value!=null),dt=e.computed(()=>{const P=R.value;return P==null?[]:U.presetColors.slice(0,P)}),ft=e.computed(()=>{const P=R.value;return P==null?[]:U.presetColors.slice(P)});function de(P){const X=R.value;return X!=null?X+P:-1}function vt(P){const X=R.value;return X!=null&&P>=X}function We(P){vt(P)&&(ge.value=P,qe.value=M(U.presetColors[P]),f.value=!0,e.nextTick(()=>Ce.value?.focus()))}function Pt(P){if(!vt(P))return;const X=U.presetColors.filter((ze,nt)=>nt!==P);Ke("update:presetColors",X);const j=ce(U.modelValue),me=ce(U.presetColors[P]);if(j&&me&&j.toLowerCase()===me.toLowerCase()){const ze=X[Math.max(0,P-1)]||X[0];ze&&Ke("update:modelValue",ze)}}function rt(){we.value=!we.value,we.value||(ge.value=-1,f.value=!1)}function Et(){if(ge.value<0)return;const P=G.value,X=ce(P);if(X){const j=[...U.presetColors];j[ge.value]=X,Ke("update:presetColors",j),Ke("update:modelValue",X),ge.value=-1,f.value=!1}}function Tt(){U.disabled||(ge.value=-1,f.value=!f.value,f.value&&(Mt(),e.nextTick(()=>Ce.value?.focus())))}function Wt(P){const X=ce(P),j=ce(U.modelValue);return X&&j&&X.toLowerCase()===j.toLowerCase()}function Ft(){if(U.disabled||!xe.value)return;const P=G.value,X=ce(P);if(X){const j=[...U.presetColors,X];Ke("update:presetColors",j),Ke("update:modelValue",X);const me=R.value??ne.value;me>=0&&j.length-me>=U.max&&(f.value=!1)}}const G=e.computed(()=>{const{h:P,s:X,l:j}=qe.value;return L(P,X,j)}),ue=e.computed(()=>G.value.toLowerCase()),He=e.computed(()=>({background:`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${qe.value.h}, 100%, 50%))`})),Xe=e.computed(()=>{const P=z(qe.value.h,qe.value.s,qe.value.l);return{left:`${P.s}%`,bottom:`${P.v}%`,transform:"translate(-50%, 50%)"}}),Zt=e.computed(()=>({left:`${qe.value.h/360*100}%`,transform:"translateX(-50%)"})),kt=e.computed(()=>({position:"fixed",left:`${Ae.value.left}px`,top:`${Ae.value.top}px`,zIndex:1002}));function xt(){if(!ae.value||!he.value)return;const P=ae.value.getBoundingClientRect(),X=window.innerHeight||document.documentElement.clientHeight;let j=P.bottom+4;const me=ve.value;me&&j+me.offsetHeight>X-8&&(j=P.top-4-me.offsetHeight),Ae.value={top:j,left:P.left}}function Mt(){const P=U.modelValue||"#b8a5de";ce(P)&&(qe.value=M(P))}function Ut(){Ke("update:modelValue",G.value)}function Q(){U.disabled||(he.value=!he.value,he.value&&(Mt(),e.nextTick(()=>{xt(),Ce.value?.focus()})))}function be(){const P=G.value,X=ce(P);if(X){if(ge.value>=0){const j=[...U.presetColors];j[ge.value]=X,Ke("update:presetColors",j),Ke("update:modelValue",X)}else if((U.presetColors.length>0||it.value)&&f.value&&xe.value&&!U.presetColors.some(me=>ce(me)?.toLowerCase()===X.toLowerCase())){const me=[...U.presetColors,X];Ke("update:presetColors",me),Ke("update:modelValue",X)}}he.value=!1,f.value=!1,we.value=!1,ge.value=-1}function Me(P){if(!H.value)return;const X=H.value.getBoundingClientRect(),j=me=>{const ze=Math.max(0,Math.min(1,(me.clientX-X.left)/X.width)),nt=Math.max(0,Math.min(1,1-(me.clientY-X.top)/X.height)),St={h:qe.value.h,s:ze*100,v:nt*100};qe.value=A(St.h,St.s,St.v)};j(P),document.addEventListener("mousemove",j),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",j),Ut()},{once:!0})}function Ze(P){if(!P.currentTarget)return;const j=P.currentTarget.getBoundingClientRect(),me=ze=>{const nt=Math.max(0,Math.min(1,(ze.clientX-j.left)/j.width));qe.value={...qe.value,h:nt*360}};me(P),document.addEventListener("mousemove",me),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",me),Ut()},{once:!0})}function et(P){const X=P.target.value,j=ce(X);j&&(qe.value=M(j),Ke("update:modelValue",j))}function mt(P){if(U.disabled)return;const X=ce(P);X&&(qe.value=M(X),Ke("update:modelValue",X))}let je=null,_t=null;function Re(){je&&(document.removeEventListener("keydown",je),je=null),_t&&(window.removeEventListener("resize",_t),_t=null)}return e.watch(he,P=>{if(Re(),P){if(!it.value&&U.initialPresetCount==null){const X=U.presetColors.length;X>0&&(ne.value<0||X<ne.value)&&(ne.value=X)}je=X=>{X.key==="Escape"&&be()},_t=xt,document.addEventListener("keydown",je),window.addEventListener("resize",_t)}}),e.watch(()=>U.modelValue,()=>{he.value&&Mt()},{immediate:!1}),e.watch(ft,P=>{P.length===0&&(we.value=!1,ge.value=-1,f.value=!1)}),e.onBeforeUnmount(Re),(P,X)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-color-picker",{"dss-color-picker--disabled":T.disabled}])},[e.createElementVNode("div",{ref_key:"triggerRef",ref:ae,class:e.normalizeClass(["dss-color-picker__trigger",{"dss-color-picker__trigger--open":he.value}]),onClick:Q},[e.createElementVNode("span",{class:"dss-color-picker__swatch",style:e.normalizeStyle({backgroundColor:G.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"},[he.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-color-picker__overlay",onClick:e.withModifiers(be,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:ve,class:"dss-color-picker__dropdown",style:e.normalizeStyle(kt.value)},[ke.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[it.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.presetGroups,(j,me)=>(e.openBlock(),e.createElementBlock("div",{key:"g-"+me,class:"dss-color-picker__section"},[e.createElementVNode("span",Nm,e.toDisplayString(j.title),1),e.createElementVNode("div",Bm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.colors,(ze,nt)=>(e.openBlock(),e.createElementBlock("button",{key:"g-"+me+"-"+nt,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":Wt(ze)}]),style:e.normalizeStyle({backgroundColor:ze}),title:ze,onClick:e.withModifiers(St=>mt(ze),["stop"])},null,14,Mm))),128))])]))),128)):dt.value.length?(e.openBlock(),e.createElementBlock("div",_m,[X[1]||(X[1]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Preset colors",-1)),e.createElementVNode("div",$m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(dt.value,(j,me)=>(e.openBlock(),e.createElementBlock("button",{key:"p-"+me,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":Wt(j)}]),style:e.normalizeStyle({backgroundColor:j}),title:j,onClick:e.withModifiers(ze=>mt(j),["stop"])},null,14,Lm))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Tm,[e.createElementVNode("div",Am,[X[3]||(X[3]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Custom Colors",-1)),ft.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":we.value}]),title:"Manage custom colors",onClick:e.withModifiers(rt,["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",Dm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ft.value,(j,me)=>(e.openBlock(),e.createElementBlock("div",{key:"c-"+me,class:e.normalizeClass(["dss-color-picker__preset-wrap",{"dss-color-picker__preset-wrap--manage":we.value}])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":!we.value&&Wt(j),"dss-color-picker__preset-bubble--editing":we.value&&ge.value===de(me)}]),style:e.normalizeStyle({backgroundColor:ge.value===de(me)?G.value:j}),title:ge.value===de(me)?G.value:j,onClick:e.withModifiers(ze=>we.value?We(de(me)):mt(j),["stop"])},null,14,Hm),we.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(ze=>Pt(de(me)),["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,Rm)):e.createCommentVNode("",!0)],2))),128)),xe.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":f.value}]),onClick:e.withModifiers(Tt,["stop"])}," + ",2)):e.createCommentVNode("",!0)])])],64)):T.presetColors.length?(e.openBlock(),e.createElementBlock("div",Fm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.presetColors,(j,me)=>(e.openBlock(),e.createElementBlock("button",{key:me,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":Wt(j)}]),style:e.normalizeStyle({backgroundColor:j}),title:j,onClick:e.withModifiers(ze=>mt(j),["stop"])},null,14,Im))),128)),xe.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":f.value}]),onClick:e.withModifiers(Tt,["stop"])}," + ",2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",{class:"dss-color-picker__sl-area",ref_key:"slAreaRef",ref:H,onMousedown:Me},[e.createElementVNode("div",{class:"dss-color-picker__sl-bg",style:e.normalizeStyle(He.value)},null,4),e.createElementVNode("div",{class:"dss-color-picker__sl-pointer",style:e.normalizeStyle(Xe.value)},null,4)],544),e.createElementVNode("div",{class:"dss-color-picker__hue-wrap",onMousedown:Ze},[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(Zt.value)},null,4)],32),e.createElementVNode("div",zm,[e.createElementVNode("input",{ref_key:"hexInputRef",ref:Ce,type:"text",class:"dss-color-picker__hex-input",value:ue.value,onInput:et},null,40,Pm)]),ke.value&&(T.presetColors.length||it.value)&&xe.value&&ge.value<0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__add-btn",onClick:Ft}," Save color ")):e.createCommentVNode("",!0),ke.value&&ge.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:be}," Save color "))],64)):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]))],2))}},qm={key:0,class:"dss-loader"},Wm={key:0,class:"dss-loader-label"},Zm={key:1,class:"dss-loader"},Um={key:0,class:"dss-loader-label"},Xm={key:2,class:"dss-loader"},Ym={key:0,class:"dss-loader-label"},jm={key:3,class:"dss-loader"},Km={key:0,class:"dss-loader-label"},Gm={key:4,class:"dss-loader"},Qm={key:0,class:"dss-loader-label"},Jm={key:5,class:"dss-loader dss-loader--inline"},e2={class:"dss-loader-inline-text"},t2={__name:"DSSLoaders",props:{type:{type:String,default:"spinner"},label:{type:String,default:""},size:{type:[String,Number],default:"medium"},color:{type:String,default:""}},setup(T){const te=T,M=e.computed(()=>te.size==="small"?"dss-loaders--size-small":te.size==="large"?"dss-loaders--size-large":te.size==="medium"||te.size==null?"dss-loaders--size-medium":null),L=e.computed(()=>{const ce={};if(!(te.size==="small"||te.size==="medium"||te.size==="large"||te.size==null)){const z=typeof te.size=="number"?`${te.size}px`:String(te.size);ce["--dss-loader-size"]=z}return te.color&&(ce["--dss-loader-accent"]=te.color,ce["--dss-loader-accent-soft"]=`color-mix(in srgb, ${te.color} 30%, white)`),ce});return(ce,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-loaders",M.value]),style:e.normalizeStyle(L.value)},[T.type==="spinner"?(e.openBlock(),e.createElementBlock("div",qm,[z[0]||(z[0]=e.createElementVNode("span",{class:"dss-loader-spinner","aria-hidden":"true"},null,-1)),T.label?(e.openBlock(),e.createElementBlock("span",Wm,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="dots"?(e.openBlock(),e.createElementBlock("div",Zm,[z[1]||(z[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)),T.label?(e.openBlock(),e.createElementBlock("span",Um,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="battery"?(e.openBlock(),e.createElementBlock("div",Xm,[z[2]||(z[2]=e.createElementVNode("div",{class:"battery","aria-hidden":"true"},null,-1)),T.label?(e.openBlock(),e.createElementBlock("span",Ym,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="double-circle"?(e.openBlock(),e.createElementBlock("div",jm,[z[3]||(z[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)),T.label?(e.openBlock(),e.createElementBlock("span",Km,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="bars"?(e.openBlock(),e.createElementBlock("div",Gm,[z[4]||(z[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)),T.label?(e.openBlock(),e.createElementBlock("span",Qm,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="inline"?(e.openBlock(),e.createElementBlock("div",Jm,[z[5]||(z[5]=e.createElementVNode("span",{class:"dss-loader-inline-spinner","aria-hidden":"true"},null,-1)),e.createElementVNode("span",e2,[e.renderSlot(ce.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(T.label),1)])])])):e.createCommentVNode("",!0)],6))}},ra="dss-skeleton-item",n2={__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:T=>["single","multiple"].includes(T)},targetClass:{type:String,default:ra},bgColor:{type:String,default:null},shimmerColor:{type:String,default:null},bgDark:{type:String,default:null},shimmerDark:{type:String,default:null}},setup(T){const te=T,M=e.computed(()=>{const z={"dss-skeleton--loading":te.loading,"dss-skeleton--static":!te.shimmer,"dss-skeleton--multiple":te.mode==="multiple","dss-skeleton--dark":te.darkMode};return te.mode==="multiple"&&te.targetClass!==ra&&(z[`dss-skeleton--target-${te.targetClass}`]=!0),z}),L=e.computed(()=>{const z={};return te.borderRadius&&(z.borderRadius=te.borderRadius),z}),ce=e.computed(()=>{const z={};return te.borderRadius&&(z["--dss-skeleton-border-radius"]=te.borderRadius),te.darkMode?(z["--dss-skeleton-bg"]=te.bgDark||"#322c3f",z["--dss-skeleton-shimmer"]=te.shimmerDark||"#3e3f41",z):(te.bgColor&&(z["--dss-skeleton-bg"]=te.bgColor),te.shimmerColor&&(z["--dss-skeleton-shimmer"]=te.shimmerColor),z)});return(z,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-skeleton",M.value]),style:e.normalizeStyle(ce.value)},[T.loading&&T.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":T.loading&&T.mode==="single"}])},[e.renderSlot(z.$slots,"default")],2)],6))}},l2={key:0,class:"dss-dnd-column-header"},o2={class:"dss-dnd-column-title"},a2={class:"dss-dnd-column-count"},s2=["data-column"],r2={key:0,class:"dss-dnd-indicator"},i2=["onPointerdown"],c2=["onPointerdown"],u2={class:"dss-dnd-item-content"},d2={class:"dss-dnd-item-default"},m2={key:0,class:"dss-dnd-empty"},p2={name:"DSSDnd"},f2=Object.assign(p2,{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(T,{emit:te}){const M=T,L=te,ce=e.useSlots(),z=e.computed(()=>!!ce["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},U=e.computed(()=>({...A,...M.options})),Ke=e.computed(()=>({"--dss-dnd-col-min-w":U.value.columnMinWidth,"--dss-dnd-col-max-w":U.value.columnMaxWidth,"--dss-dnd-col-gap":U.value.columnGap,"--dss-dnd-indicator-color":U.value.indicatorColor,"--dss-dnd-body-max-h":U.value.columnBodyMaxHeight}));function he(Q){if(!U.value.ColColor||!Q)return{};const be=Q.background||Q.color;return be?{background:be}:{}}const f=e.ref(null),we=e.ref(null),ge=e.ref(!1),ne=e.ref(-1),ae=e.ref(null);let ve=null,H=null,Ce=null,Ae=null,qe=0,it=0,R="",xe=null;const Be=5,ke=e.computed(()=>{const Q={};for(const be of M.columns)Q[be.value]=M.items.filter(Me=>Me[M.columnKey]===be.value).sort((Me,Ze)=>(Me[M.positionKey]??0)-(Ze[M.positionKey]??0));return Q}),dt=e.computed(()=>{const Q={},be=!!f.value,Me=f.value?.[M.itemKey],Ze=we.value,et=ne.value;for(const mt of M.columns){const je=ke.value[mt.value]||[],_t=[],Re=Ze==mt.value;let P=0;for(let X=0;X<je.length;X++){const j=je[X],me=be&&j[M.itemKey]===Me;!me&&Re&&et===P&&_t.push({type:"indicator",key:`ind-${P}`}),me||P++,_t.push({type:"item",item:j,isDragged:me,key:`item-${j[M.itemKey]}`})}Re&&et>=P&&_t.push({type:"indicator",key:"ind-end"}),Q[mt.value]=_t}return Q});function ft(Q,be){const Ze=(ke.value[Q]||[]).filter(je=>je[M.itemKey]!==f.value?.[M.itemKey]);if(Ze.length===0)return 1;if(be<=0){const je=Ze[0][M.positionKey];return je!=null&&je>0?je/2:.5}if(be>=Ze.length){const je=Ze[Ze.length-1][M.positionKey];return(je??0)+1}const et=Ze[be-1][M.positionKey]??0,mt=Ze[be][M.positionKey]??0;return(et+mt)/2}function de(Q,be,Me){Ce&&Ce.remove();const Ze=Q.getBoundingClientRect(),et=Q.cloneNode(!0);et.classList.add("dss-dnd-ghost"),et.style.cssText=`
|
|
104
104
|
position: fixed;
|
|
105
|
-
left: ${
|
|
105
|
+
left: ${be-qe}px;
|
|
106
106
|
top: ${Me-it}px;
|
|
107
|
-
width: ${
|
|
108
|
-
height: ${
|
|
107
|
+
width: ${Ze.width}px;
|
|
108
|
+
height: ${Ze.height}px;
|
|
109
109
|
z-index: 9999;
|
|
110
110
|
pointer-events: none;
|
|
111
|
-
opacity: ${
|
|
111
|
+
opacity: ${U.value.dragGhostOpacity};
|
|
112
112
|
box-sizing: border-box;
|
|
113
113
|
box-shadow: 0 8px 24px rgba(0,0,0,0.15);
|
|
114
|
-
background-color: ${
|
|
114
|
+
background-color: ${U.value.dragSourceBackground};
|
|
115
115
|
font-family: 'Work Sans', sans-serif;
|
|
116
116
|
cursor: grabbing;
|
|
117
|
-
`,document.body.appendChild(ct),ye=ct}function kt(te,Ae){ye&&(ye.style.left=`${te-We}px`,ye.style.top=`${Ae-it}px`)}function Ze(te){te.classList.add("dss-dnd-item--dragging"),te.style.background=X.value.dragSourceBackground,te.style.borderColor=X.value.dragSourceBorder,te.style.transform="scale(0.97)"}function Pt(te){te.classList.remove("dss-dnd-item--dragging"),te.style.background="",te.style.borderColor="",te.style.transform=""}function st(te,Ae){return document.elementFromPoint(te,Ae)?.closest(".dss-dnd-column-body")??null}function St(te,Ae){return!!document.elementFromPoint(te,Ae)?.closest("[data-dss-dnd-delete-zone]")}function At(te,Ae){if(F.value&&St(te,Ae)){ve.value=!0,Ce.value=null,ee.value=-1;return}ve.value=!1;const Me=st(te,Ae),je=Me?.getAttribute("data-column")??null;if(!je){Ce.value=null,ee.value=-1;return}Ce.value=je;const ct=Me.querySelectorAll(".dss-dnd-item:not(.dss-dnd-item--dragging)");let Ge=ct.length;for(let tt=0;tt<ct.length;tt++){const vt=ct[tt].getBoundingClientRect();if(Ae<vt.top+vt.height/2){Ge=tt;break}}ee.value=Ge}function Ut(te){te.preventDefault(),kt(te.clientX,te.clientY),!pe&&(pe=requestAnimationFrame(()=>{pe=null,At(te.clientX,te.clientY)}))}function Ft(te){window.removeEventListener("pointermove",Ut),window.removeEventListener("pointerup",Ft),window.removeEventListener("pointercancel",Ft),Te?.releasePointerCapture?.(te.pointerId),Pt(Te),Te=null;const Ae=F.value&&St(te.clientX,te.clientY);if(f.value&&Ae)_("delete",{item:f.value});else{const je=st(te.clientX,te.clientY)?.getAttribute("data-column")??null;if(f.value&&je){const ct=f.value[B.columnKey],Ge=je,vt=(ke.value[Ge]||[]).filter(le=>le[B.itemKey]!==f.value[B.itemKey]),De=Math.max(0,Math.min(ee.value,vt.length)),q=yt(Ge,De),U=f.value[B.itemKey];_("move",{item:f.value,from:ct,to:Ge,position:q,index:De}),H&&clearTimeout(H),ne.value={id:U,from:ct,to:Ge},H=setTimeout(()=>{ne.value=null},3500)}}ye&&(ye.remove(),ye=null),I!==null&&(document.body.style.cursor=I,I=""),qt()}function j(te,Ae){te.preventDefault();const Me=te.target.closest(".dss-dnd-item");if(!Me)return;const je=Me.getBoundingClientRect();We=te.clientX-je.left,it=te.clientY-je.top,I=document.body.style.cursor,document.body.style.cursor="grabbing",f.value=Ae,Te=Me,de(Me,te.clientX,te.clientY),requestAnimationFrame(()=>Ze(Me)),Me.setPointerCapture?.(te.pointerId),window.addEventListener("pointermove",Ut),window.addEventListener("pointerup",Ft,{once:!0}),window.addEventListener("pointercancel",Ft,{once:!0})}function ce(){we&&(window.removeEventListener("pointermove",Ie),window.removeEventListener("pointerup",Xe),window.removeEventListener("pointercancel",Xe),we=null)}function Ie(te){if(!we||te.pointerId!==we.pointerId)return;const Ae=te.clientX-we.startX,Me=te.clientY-we.startY;if(Math.abs(Ae)>=_e||Math.abs(Me)>=_e){const je=we.item;ce(),j(te,je)}}function Xe(te){!we||te.pointerId!==we.pointerId||ce()}function Ot(te,Ae){ce(),we={item:Ae,startX:te.clientX,startY:te.clientY,pointerId:te.pointerId},window.addEventListener("pointermove",Ie),window.addEventListener("pointerup",Xe),window.addEventListener("pointercancel",Xe)}function Qe(te,Ae){X.value.useHandle||Ot(te,Ae)}function lt(te,Ae){Ot(te,Ae)}function Bt(){pe&&(cancelAnimationFrame(pe),pe=null)}function qt(){Bt(),f.value=null,Ce.value=null,ve.value=!1,ee.value=-1}return e.onBeforeUnmount(()=>{Bt(),ce(),H&&clearTimeout(H),ye&&(ye.remove(),ye=null)}),(te,Ae)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-dnd",{"dss-dnd--unstyled":X.value.unstyled}]),style:e.normalizeStyle(Ke.value)},[F.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":ve.value}]),"data-dss-dnd-delete-zone":""},[e.renderSlot(te.$slots,"delete-zone",{isDragging:!!f.value,isOver:ve.value})],2),[[e.vShow,!!f.value||X.value.deleteZoneAlwaysVisible]])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.columns,Me=>(e.openBlock(),e.createElementBlock("div",{key:Me.value,class:e.normalizeClass(["dss-dnd-column",[{"dss-dnd-column--drag-over":Ce.value==Me.value},Me.class||""]]),style:e.normalizeStyle(ge(Me))},[X.value.showHeader?(e.openBlock(),e.createElementBlock("div",zm,[e.renderSlot(te.$slots,"column-header",{column:Me,items:ke.value[Me.value]||[]},()=>[e.createElementVNode("span",Pm,e.toDisplayString(Me.title||Me.value),1),e.createElementVNode("span",Om,e.toDisplayString((ke.value[Me.value]||[]).length),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"dss-dnd-column-body","data-column":Me.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ft.value[Me.value],je=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:je.key},[je.type==="indicator"?(e.openBlock(),e.createElementBlock("div",Wm)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-dnd-item",{"dss-dnd-item--dragging":je.isDragged,"dss-dnd-item--no-handle":!X.value.useHandle}]),onPointerdown:ct=>Qe(ct,je.item)},[X.value.useHandle?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-dnd-handle",onPointerdown:e.withModifiers(ct=>lt(ct,je.item),["stop"])},[e.renderSlot(te.$slots,"handle",{},()=>[Ae[0]||(Ae[0]=e.createElementVNode("span",{class:"dss-dnd-handle-icon"},"⠿",-1))])],40,Um)):e.createCommentVNode("",!0),e.createElementVNode("div",Xm,[e.renderSlot(te.$slots,"item",{item:je.item,column:Me,justDropped:ne.value?.id===je.item[$.itemKey],droppedFrom:ne.value?.id===je.item[$.itemKey]?ne.value.from:null,droppedTo:ne.value?.id===je.item[$.itemKey]?ne.value.to:null},()=>[e.createElementVNode("div",Ym,e.toDisplayString(je.item[$.itemKey]),1)])])],42,Zm))],64))),128)),(ke.value[Me.value]||[]).length===0&&Ce.value!=Me.value?(e.openBlock(),e.createElementBlock("div",jm,[e.renderSlot(te.$slots,"empty",{column:Me},()=>[Ae[1]||(Ae[1]=e.createElementVNode("span",{class:"dss-dnd-empty-text"},"No items",-1))])])):e.createCommentVNode("",!0)],8,qm)],6))),128))],6))}}),Qm={name:"DSSConfetti"},Jm=Object.assign(Qm,{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=$,B=e.ref(null),_=e.ref(!1);let ie=[],F=null,A=null;function X(ee,ne){const pe=[];for(let H=0;H<J.count;H++)pe.push(Ke(ee));return pe}function Ke(ee,ne){return{x:Math.random()*ee,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 ge(ee,ne,pe,H){ee.clearRect(0,0,ne,pe);for(const ye of ie)ee.save(),ee.globalAlpha=ye.opacity*H,ee.beginPath(),ee.lineWidth=ye.r,ee.strokeStyle=ye.color,ee.moveTo(ye.x+ye.tilt+ye.r/2,ye.y),ee.lineTo(ye.x+ye.tilt,ye.y+ye.tilt+ye.r/2),ee.stroke(),ee.restore()}function f(ee,ne,pe){const H=.3+pe*.7;for(let ye=0;ye<ie.length;ye++){const Te=ie[ye];Te.tiltAngle+=Te.tiltInc,Te.y+=Te.speed*H,Te.x+=Math.sin(Te.d)*.5*H,Te.tilt=Math.sin(Te.tiltAngle)*15,pe>=.99&&Te.y>ne+20&&(ie[ye]=Ke(ee))}}function Ce(){_.value=!0,e.nextTick(()=>{const ee=B.value;if(!ee)return;const ne=ee.getContext("2d"),pe=ee.parentElement;if(!pe)return;const H=pe.getBoundingClientRect();ee.width=H.width,ee.height=H.height,ie=X(ee.width,ee.height);const ye=Date.now(),Te=ye+J.duration,We=()=>{const it=Date.now(),I=it-ye;if(it<Te){let we=1;I>J.fadeStart&&(we=1-(I-J.fadeStart)/(J.duration-J.fadeStart)),ge(ne,ee.width,ee.height,we),f(ee.width,ee.height,we),F=requestAnimationFrame(We)}else ve()};We()})}function ve(){F&&(cancelAnimationFrame(F),F=null),ie=[],_.value=!1}return e.watch(()=>J.trigger,ee=>{ee&&(A&&clearTimeout(A),A=setTimeout(Ce,J.delay))},{immediate:!0}),e.onBeforeUnmount(()=>{ve(),A&&clearTimeout(A)}),(ee,ne)=>_.value?(e.openBlock(),e.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:B,class:"dss-confetti-canvas"},null,512)):e.createCommentVNode("",!0)}}),e2={class:"dss-filter-global-inner"},t2=["placeholder","value"],l2=["title"],n2={key:0,class:"dss-filter-funnel-badge"},o2={key:1,class:"dss-filter-sortby"},a2=["value"],s2=["value"],r2=["disabled","title"],i2={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"},c2={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"},u2={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"},d2={class:"dss-filter-panel"},m2={key:0,class:"dss-filter-empty"},p2={class:"dss-filter-row-prefix"},f2={class:"dss-filter-cell"},v2=["onClick"],g2={class:"dss-filter-trigger-text"},h2=["placeholder"],y2={class:"dss-filter-popup-list"},k2=["onClick"],C2={key:0,class:"dss-filter-popup-empty"},b2={key:0,class:"dss-filter-cell"},w2=["onClick"],x2={class:"dss-filter-trigger-text"},E2={class:"dss-filter-popup-list"},S2=["onClick"],V2={key:1,class:"dss-filter-cell dss-filter-cell--value"},N2=["placeholder","onUpdate:modelValue"],B2={key:1,class:"dss-filter-date-wrap"},M2=["placeholder","onUpdate:modelValue"],_2=["placeholder","value","onInput","step"],$2={key:4,class:"dss-filter-between"},L2=["placeholder","value","onInput","step"],T2={class:"dss-filter-between-sep"},A2=["placeholder","value","onInput","step"],D2={key:5,class:"dss-filter-multiselect"},H2=["onClick"],R2={class:"dss-filter-trigger-text"},I2=["placeholder"],F2={class:"dss-filter-popup-list dss-filter-popup-list--check"},z2=["onClick"],P2=["checked"],O2={key:0,class:"dss-filter-popup-empty"},q2=["onClick"],W2={class:"dss-filter-foot"},Z2={class:"dss-filter-cell"},U2=["placeholder"],X2={class:"dss-filter-popup-list"},Y2=["onClick"],j2={key:0,class:"dss-filter-popup-divider"},K2=["onClick"],G2=["placeholder"],Q2={class:"dss-filter-popup-list"},J2=["onClick"],e0={key:0,class:"dss-filter-popup-empty"},t0=["placeholder"],l0={class:"dss-filter-popup-list"},n0=["onClick"],o0={key:0,class:"dss-filter-popup-empty"},a0={name:"DSSFilter"},s0=Object.assign(a0,{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:B}){const{t:_}=Gn.useI18n(),ie=$,F=B,A={unstyled:!1,maxUniqueForSelect:30,maxUniqueForEnum:15},X=e.computed(()=>({...A,...ie.options})),Ke={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"}]},ge=new Set(["is_empty","is_not_empty","is_true","is_false"]),f=["label","name","title","keyword","full_name","value","text"],Ce=e.ref(""),ve=e.ref([]),ee=e.ref(null),ne=e.ref(!1),pe=e.ref(null),H=e.ref(""),ye=e.ref(null),Te=e.ref(""),We=e.ref("asc");let it=1;function I(V){const w=V.find(S=>S&&typeof S=="object");if(!w)return null;for(const S of f)if(S in w&&typeof w[S]=="string")return S;return Object.keys(w).find(S=>typeof w[S]=="string")||null}function we(V,w){const S=w.filter(K=>K!=null&&K!=="NULL");if(S.length===0)return null;if(S.every(K=>Array.isArray(K))){const K=S.flatMap(Ye=>Ye).filter(Ye=>Ye!=null);return K.length===0?null:typeof K.find(Ye=>Ye!=null)=="object"?"arraySelect":"arrayText"}return S.every(K=>typeof K=="boolean")?"boolean":S.every(K=>typeof K=="number")?new Set(S).size<=X.value.maxUniqueForEnum?"select":"range":S.every(K=>typeof K=="string")?new Set(S).size<=X.value.maxUniqueForSelect?"select":"text":S.some(K=>typeof K=="object"&&!Array.isArray(K))?null:"text"}const _e=e.computed(()=>{if(!ie.data?.length)return[];const V=new Set;for(const Q of ie.data)if(Q&&typeof Q=="object")for(const Ye of Object.keys(Q))V.add(Ye);const w=new Set(ie.exclude),S=[];for(const Q of V){if(w.has(Q))continue;const Ye=ie.config[Q]||{},gt=ie.data.map(nt=>nt?.[Q]),Ve=Ye.type||we(Q,gt);if(!Ve)continue;const Ne=Ye.filterMode||"contain",Dt=Ne==="date"?"date":Ne==="string"?"text":Ve,Ht={key:Q,label:Ye.label||Xt(Q),type:Dt,filterMode:Ne};if(Ve==="select"){const nt=gt.filter(ot=>ot!=null&&ot!=="NULL");Ht.uniqueValues=[...new Set(nt)].sort((ot,Tt)=>typeof ot=="number"&&typeof Tt=="number"?ot-Tt:String(ot).localeCompare(String(Tt)))}else if(Ve==="range"||Ve==="int"){const nt=gt.filter(ot=>typeof ot=="number");Ht.min=Math.min(...nt),Ht.max=Math.max(...nt)}else if(Ve==="arraySelect"){const nt=Ye.displayKey||I(gt.flatMap(ot=>Array.isArray(ot)?ot:[]));if(Ht.displayKey=nt,Array.isArray(Ye.uniqueValues)&&Ye.uniqueValues.length>0)Ht.uniqueValues=Ye.uniqueValues.map(ot=>String(ot));else{const ot=gt.flatMap(Tt=>Array.isArray(Tt)?Tt:[]).filter(Tt=>Tt!=null).map(Tt=>nt&&typeof Tt=="object"?Tt[nt]:String(Tt)).filter(Tt=>Tt!=null&&Tt!=="");Ht.uniqueValues=[...new Set(ot)].sort((Tt,fl)=>String(Tt).localeCompare(String(fl)))}}S.push(Ht)}const K=ie.config._order;return K&&S.sort((Q,Ye)=>{const gt=K.indexOf(Q.key),Ve=K.indexOf(Ye.key);return gt===-1&&Ve===-1?0:gt===-1?1:Ve===-1?-1:gt-Ve}),S}),ke=e.computed(()=>{const V={};for(const w of _e.value)V[w.key]=w;return V}),ft=e.computed(()=>Array.isArray(ie.config.groups)&&ie.config.groups.length>0),yt=e.computed(()=>{if(!ft.value)return[];const V=new Set(_e.value.map(w=>w.key));return ie.config.groups.map(w=>({...w,keys:w.keys.filter(S=>V.has(S))})).filter(w=>w.keys.length>0)}),de=e.computed(()=>{if(!ft.value)return[];const V=new Set(ie.config.groups.flatMap(w=>w.keys));return _e.value.filter(w=>!V.has(w.key))}),kt=e.computed(()=>{if(!ye.value)return[];const V=new Set(ye.value.keys),w=_e.value.filter(K=>V.has(K.key));if(!H.value)return w;const S=H.value.toLowerCase();return w.filter(K=>K.label.toLowerCase().includes(S))}),Ze=e.computed(()=>{if(!H.value)return _e.value;const V=H.value.toLowerCase();return _e.value.filter(w=>w.label.toLowerCase().includes(V))}),Pt=e.computed(()=>_e.value.filter(V=>!["arraySelect","arrayText"].includes(V.type))),st=e.computed(()=>Te.value?We.value==="asc"?"Ascending":"Descending":"No sort selected");function St(V){ee.value===V?At():(ee.value=V,H.value="",ye.value=null)}function At(){ee.value=null,H.value="",ye.value=null}function Ut(V){const w=V.target.closest(".dss-datepicker__overlay, .dss-datepicker__dropdown");ee.value&&!w&&!V.target.closest(".dss-filter-popup")&&!V.target.closest(".dss-filter-trigger")&&!V.target.closest(".dss-filter-add-btn")&&At(),ne.value&&pe.value&&!pe.value.contains(V.target)&&(w||(ne.value=!1))}e.onMounted(()=>document.addEventListener("click",Ut)),e.onBeforeUnmount(()=>document.removeEventListener("click",Ut));function Ft(V){return ke.value[V]?.label||Xt(V)}function j(V){return ke.value[V.key]?.filterMode||"contain"}function ce(V){return _(`filter.operators.${V}`)}function Ie(V){const w=ke.value[V.key];return(Ke[w?.type]||Ke.text).map(S=>({...S,label:_(`filter.operators.${S.value}`)}))}function Xe(V){return ge.has(V)}function Ot(V){const w=ke.value[V.key];return w?w.type==="date"?"date":w.type==="boolean"?"boolean":w.type==="text"||w.type==="arrayText"?"text":w.type==="select"||w.type==="arraySelect"?"multiselect":w.type==="range"||w.type==="int"?V.operator==="between"?"between":"number":"text":"text"}function Qe(V){return Ke[V]?.[0]?.value||"contains"}function lt(V,w){return ge.has(w)||V==="date"?null:V==="select"||V==="arraySelect"?[]:(V==="range"||V==="int")&&w==="between"?{min:null,max:null}:V==="range"||V==="int"?null:""}function Bt(V){return ke.value[V.key]?.uniqueValues||[]}function qt(V){const w=Bt(V);if(!H.value)return w;const S=H.value.toLowerCase();return w.filter(K=>String(K).toLowerCase().includes(S))}function te(V){const w=V.value;return!w||w.length===0?_("filter.select"):w.length<=2?w.join(", "):_("filter.selectedCount",{count:w.length})}function Ae(V){const w=ke.value[V],S=w?.filterMode||"contain",K=w?.type||"text",Q=S==="string"?"contains":Qe(K);ve.value.push(e.reactive({id:it++,key:V,operator:Q,value:lt(K,Q)})),At()}function Me(V){ve.value=ve.value.filter(w=>w.id!==V)}function je(V,w){const K=ke.value[w]?.type||"text";V.key=w,V.operator=Qe(K),V.value=lt(K,V.operator),At()}function ct(V,w){const S=Ot(V);V.operator=w;const K=Ot(V);if(S!==K||ge.has(w)){const Q=ke.value[V.key];V.value=lt(Q?.type||"text",w)}At()}function Ge(V,w){const S=w.target.value;V.value=S===""?null:Number(S)}function tt(V,w,S){const K=S.target.value,Q=K===""?null:Number(K);(!V.value||typeof V.value!="object")&&(V.value={min:null,max:null}),V.value={...V.value,[w]:isNaN(Q)?null:Q}}function vt(V,w){const S=V.value||[],K=S.indexOf(w);V.value=K>=0?S.filter(Q=>Q!==w):[...S,w]}function De(){ve.value=[],Ce.value="",At()}function q(V){Ce.value=V.target.value}function U(V){Te.value=V.target.value}function le(){We.value=We.value==="asc"?"desc":"asc"}const re=e.computed(()=>{if(!ie.data)return[];let V=ie.data;if(Ce.value){const w=Ce.value.toLowerCase();V=V.filter(S=>{for(const K of Object.keys(S)){const Q=S[K];if(typeof Q=="string"&&Q.toLowerCase().includes(w)||typeof Q=="number"&&String(Q).includes(w)||Array.isArray(Q)&&Q.some(Ye=>Ye!=null&&(typeof Ye=="string"?Ye.toLowerCase().includes(w):typeof Ye=="object"?Object.values(Ye).some(gt=>typeof gt=="string"&>.toLowerCase().includes(w)):!1)))return!0}return!1})}for(const w of ve.value){if(!Vt(w))continue;const S=ke.value[w.key];S&&(V=V.filter(K=>ze(K,w,S)))}if(ie.showSortBy&&Te.value){const w=Te.value,S=We.value==="asc"?1:-1;V=[...V].sort((K,Q)=>Fe(K?.[w],Q?.[w])*S)}return V});function Fe(V,w){const S=ut(V),K=ut(w);return S==null&&K==null?0:S==null?1:K==null?-1:typeof S=="number"&&typeof K=="number"?S-K:String(S).localeCompare(String(K),void 0,{numeric:!0,sensitivity:"base"})}function ut(V){return V==null||V==="NULL"?null:typeof V=="string"||typeof V=="number"||typeof V=="boolean"?V:V instanceof Date?V.getTime():null}function Vt(V){return ge.has(V.operator)?!0:V.value==null||typeof V.value=="string"&&V.value===""||Array.isArray(V.value)&&V.value.length===0?!1:V.value instanceof Date?!isNaN(V.value.getTime()):!(typeof V.value=="object"&&!Array.isArray(V.value)&&V.value.min==null&&V.value.max==null)}function ze(V,w,S){const K=V?.[w.key],Q=w.value,Ye=w.operator;if(Ye==="is_empty")return el(K);if(Ye==="is_not_empty")return!el(K);const gt=S.type;if(gt==="text"||gt==="arrayText"){const Ve=gt==="arrayText"&&Array.isArray(K)?K.filter(Ht=>Ht!=null).map(String).join(" "):K!=null?String(K):"",Ne=String(Q).toLowerCase(),Dt=Ve.toLowerCase();switch(Ye){case"contains":return Dt.includes(Ne);case"not_contains":return!Dt.includes(Ne);case"equals":return Dt===Ne;case"not_equals":return Dt!==Ne;case"starts_with":return Dt.startsWith(Ne);case"ends_with":return Dt.endsWith(Ne);default:return!0}}if(gt==="select")switch(Ye){case"is_any_of":return Q.includes(K);case"is_none_of":return!Q.includes(K);default:return!0}if(gt==="range"||gt==="int"){const Ve=typeof K=="number"?K:Number(K);if(typeof Ve!="number"||isNaN(Ve))return!1;if(Ye==="between"){const Dt=Q?.min!=null?Number(Q.min):null,Ht=Q?.max!=null?Number(Q.max):null,nt=Dt!=null&&!isNaN(Dt)?Dt:null,ot=Ht!=null&&!isNaN(Ht)?Ht:null;return(nt==null||Ve>=nt)&&(ot==null||Ve<=ot)}const Ne=typeof Q=="number"&&!isNaN(Q)?Q:Number(Q);if(Ye==="contains"||Ye==="not_contains"){const Dt=String(Ve),Ht=String(Q??"").toLowerCase(),nt=Dt.toLowerCase().includes(Ht);return Ye==="contains"?nt:!nt}if(typeof Ne!="number"||isNaN(Ne))return!1;switch(Ye){case"eq":return Ve===Ne;case"neq":return Ve!==Ne;case"gt":return Ve>Ne;case"gte":return Ve>=Ne;case"lt":return Ve<Ne;case"lte":return Ve<=Ne;default:return!0}}if(gt==="arraySelect"){if(!Array.isArray(K))return!1;const Ve=K.filter(Ne=>Ne!=null).map(Ne=>S.displayKey&&typeof Ne=="object"?Ne[S.displayKey]:String(Ne));switch(Ye){case"contains_any":return Ve.some(Ne=>Q.includes(Ne));case"contains_all":return Q.every(Ne=>Ve.includes(Ne));case"not_contains_any":return!Ve.some(Ne=>Q.includes(Ne));default:return!0}}if(gt==="date"){const Ve=bt(Q);if(!Ve||isNaN(Ve.getTime()))return!1;const Ne=bt(K);if(!Ne||isNaN(Ne.getTime()))return!1;const Dt=zt(Ne),Ht=zt(Ve);switch(Ye){case"eq":return Dt===Ht;case"before":return Dt<Ht;case"after":return Dt>Ht;default:return!0}}if(gt==="boolean"){const Ve=K===!0||K==="true"||K===1,Ne=K===!1||K==="false"||K===0;switch(Ye){case"is_true":return Ve;case"is_false":return Ne;default:return!0}}return!0}function bt(V){if(V==null)return null;if(V instanceof Date)return isNaN(V.getTime())?null:V;if(typeof V=="number")return new Date(V>1e10?V:V*1e3);if(typeof V=="string"){const w=new Date(V);return isNaN(w.getTime())?null:w}return null}function zt(V){const w=V.getFullYear(),S=String(V.getMonth()+1).padStart(2,"0"),K=String(V.getDate()).padStart(2,"0");return`${w}-${S}-${K}`}function el(V){return!!(V==null||V===""||V==="NULL"||Array.isArray(V)&&V.length===0||Array.isArray(V)&&V.every(w=>w==null))}e.watch(re,V=>F("update:modelValue",V),{immediate:!0}),e.watch(()=>ie.data,()=>{ve.value=[],Ce.value="",ne.value=!1,Te.value="",We.value="asc",At()});function Xt(V){return V.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,w=>w.toUpperCase())}function Rt(){const V=w=>{if(w==null)return w;if(w instanceof Date)return{_type:"Date",value:w.toISOString(),local:w.toLocaleDateString()};if(Array.isArray(w))return w.map(V);if(typeof w=="object"&&!Array.isArray(w)){const S={};for(const K of Object.keys(w))S[K]=V(w[K]);return S}return w};return{globalSearch:Ce.value,rows:ve.value.map(w=>({key:w.key,operator:w.operator,value:V(w.value),defType:ke.value[w.key]?.type,defFilterMode:ke.value[w.key]?.filterMode})),filteredCount:re.value?.length??0}}return J({getDebugState:Rt}),(V,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-filter",{"dss-filter--unstyled":X.value.unstyled}])},[e.createElementVNode("div",{class:"dss-filter-global",ref_key:"globalRef",ref:pe},[e.createElementVNode("div",e2,[w[20]||(w[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(_)("filter.searchAcrossFields"),value:Ce.value,onInput:q},null,40,t2),Ce.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-global-clear",onClick:w[0]||(w[0]=S=>Ce.value="")},"×")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["dss-filter-funnel-btn",{active:ne.value||ve.value.length>0,"dss-filter-funnel-btn--with-sort":ie.showSortBy}]),onClick:w[1]||(w[1]=S=>ne.value=!ne.value),type:"button",title:ne.value?e.unref(_)("filter.closeAdvancedFilter"):e.unref(_)("filter.openAdvancedFilter")},[w[14]||(w[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)),ve.value.length>0?(e.openBlock(),e.createElementBlock("span",n2,e.toDisplayString(ve.value.length),1)):e.createCommentVNode("",!0)],10,l2),ie.showSortBy?(e.openBlock(),e.createElementBlock("div",o2,[w[19]||(w[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:U},[w[15]||(w[15]=e.createElementVNode("option",{value:""},"None",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pt.value,S=>(e.openBlock(),e.createElementBlock("option",{key:S.key,value:S.key},e.toDisplayString(S.label),9,s2))),128))],40,a2),e.createElementVNode("button",{class:"dss-filter-sortby-order",type:"button",onClick:le,disabled:!Te.value,title:st.value},[Te.value?We.value==="asc"?(e.openBlock(),e.createElementBlock("svg",c2,[...w[17]||(w[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",u2,[...w[18]||(w[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",i2,[...w[16]||(w[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,r2)])):e.createCommentVNode("",!0)]),ne.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-advanced-popup",onClick:w[13]||(w[13]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",d2,[ve.value.length===0?(e.openBlock(),e.createElementBlock("div",m2,e.toDisplayString(e.unref(_)("filter.noConditionsApplied")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ve.value,(S,K)=>(e.openBlock(),e.createElementBlock("div",{key:S.id,class:"dss-filter-row"},[e.createElementVNode("span",p2,e.toDisplayString(K===0?e.unref(_)("filter.where"):e.unref(_)("filter.and")),1),e.createElementVNode("div",f2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(Q=>St(`${S.id}:field`),["stop"])},[e.createElementVNode("span",g2,e.toDisplayString(Ft(S.key)),1),w[21]||(w[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,v2),ee.value===`${S.id}:field`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:w[3]||(w[3]=e.withModifiers(()=>{},["stop"]))},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":w[2]||(w[2]=Q=>H.value=Q),placeholder:e.unref(_)("filter.searchAttributes")},null,8,h2),[[e.vModelText,H.value]]),e.createElementVNode("ul",y2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ze.value,Q=>(e.openBlock(),e.createElementBlock("li",{key:Q.key,class:"dss-filter-popup-item",onClick:Ye=>je(S,Q.key)},e.toDisplayString(Q.label),9,k2))),128)),Ze.value.length===0?(e.openBlock(),e.createElementBlock("li",C2,e.toDisplayString(e.unref(_)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),j(S)==="contain"||j(S)==="date"?(e.openBlock(),e.createElementBlock("div",b2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(Q=>St(`${S.id}:op`),["stop"])},[e.createElementVNode("span",x2,e.toDisplayString(ce(S.operator)),1),w[22]||(w[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,w2),ee.value===`${S.id}:op`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:w[4]||(w[4]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("ul",E2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie(S),Q=>(e.openBlock(),e.createElementBlock("li",{key:Q.value,class:e.normalizeClass(["dss-filter-popup-item",{selected:S.operator===Q.value}]),onClick:Ye=>ct(S,Q.value)},e.toDisplayString(Q.label),11,S2))),128))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Xe(S.operator)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",V2,[j(S)==="string"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-value-input",placeholder:e.unref(_)("filter.enterValue"),"onUpdate:modelValue":Q=>S.value=Q},null,8,N2)),[[e.vModelText,S.value]]):j(S)==="date"?(e.openBlock(),e.createElementBlock("div",B2,[e.createVNode(Wo,{mode:"single",modelValue:S.value,"onUpdate:modelValue":Q=>S.value=Q},null,8,["modelValue","onUpdate:modelValue"])])):Ot(S)==="text"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,type:"text",class:"dss-filter-value-input",placeholder:e.unref(_)("filter.enterValue"),"onUpdate:modelValue":Q=>S.value=Q},null,8,M2)),[[e.vModelText,S.value]]):Ot(S)==="number"?(e.openBlock(),e.createElementBlock("input",{key:3,type:"number",class:"dss-filter-value-input",placeholder:e.unref(_)("filter.enterValue"),value:S.value,onInput:Q=>Ge(S,Q),step:ke.value[S.key]?.type==="int"?1:void 0},null,40,_2)):Ot(S)==="between"?(e.openBlock(),e.createElementBlock("div",$2,[e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(_)("filter.min"),value:S.value?.min,onInput:Q=>tt(S,"min",Q),step:ke.value[S.key]?.type==="int"?1:void 0},null,40,L2),e.createElementVNode("span",T2,e.toDisplayString(e.unref(_)("filter.and")),1),e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(_)("filter.max"),value:S.value?.max,onInput:Q=>tt(S,"max",Q),step:ke.value[S.key]?.type==="int"?1:void 0},null,40,A2)])):Ot(S)==="multiselect"?(e.openBlock(),e.createElementBlock("div",D2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(Q=>St(`${S.id}:val`),["stop"])},[e.createElementVNode("span",R2,e.toDisplayString(te(S)),1),w[23]||(w[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,H2),ee.value===`${S.id}:val`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:w[6]||(w[6]=e.withModifiers(()=>{},["stop"]))},[Bt(S).length>6?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":w[5]||(w[5]=Q=>H.value=Q),placeholder:e.unref(_)("filter.search")},null,8,I2)),[[e.vModelText,H.value]]):e.createCommentVNode("",!0),e.createElementVNode("ul",F2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qt(S),Q=>(e.openBlock(),e.createElementBlock("li",{key:Q,class:"dss-filter-popup-item",onClick:Ye=>vt(S,Q)},[e.createElementVNode("input",{type:"checkbox",checked:(S.value||[]).includes(Q),tabindex:"-1"},null,8,P2),e.createElementVNode("span",null,e.toDisplayString(Q),1)],8,z2))),128)),qt(S).length===0?(e.openBlock(),e.createElementBlock("li",O2,e.toDisplayString(e.unref(_)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])),e.createElementVNode("button",{class:"dss-filter-row-remove",onClick:Q=>Me(S.id)},[...w[24]||(w[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,q2)]))),128)),e.createElementVNode("div",W2,[e.createElementVNode("div",Z2,[e.createElementVNode("button",{class:"dss-filter-add-btn",onClick:w[7]||(w[7]=e.withModifiers(S=>St("add"),["stop"]))},e.toDisplayString(e.unref(_)("filter.addFilter")),1),ee.value==="add"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup dss-filter-add-popup",onClick:w[12]||(w[12]=e.withModifiers(()=>{},["stop"]))},[ft.value&&!ye.value&&!H.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":w[8]||(w[8]=S=>H.value=S),placeholder:e.unref(_)("filter.searchAttributes")},null,8,U2),[[e.vModelText,H.value]]),e.createElementVNode("ul",X2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt.value,S=>(e.openBlock(),e.createElementBlock("li",{key:S.label,class:"dss-filter-popup-item dss-filter-popup-group",onClick:K=>ye.value=S},[e.createElementVNode("span",null,e.toDisplayString(S.label),1),w[25]||(w[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,Y2))),128)),de.value.length>0?(e.openBlock(),e.createElementBlock("li",j2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(de.value,S=>(e.openBlock(),e.createElementBlock("li",{key:S.key,class:"dss-filter-popup-item",onClick:K=>Ae(S.key)},e.toDisplayString(S.label),9,K2))),128))])],64)):ye.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dss-filter-popup-back",onClick:w[9]||(w[9]=S=>ye.value=null)},[w[26]||(w[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(ye.value.label),1)]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":w[10]||(w[10]=S=>H.value=S),placeholder:e.unref(_)("filter.searchAttributes")},null,8,G2),[[e.vModelText,H.value]]),e.createElementVNode("ul",Q2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kt.value,S=>(e.openBlock(),e.createElementBlock("li",{key:S.key,class:"dss-filter-popup-item",onClick:K=>Ae(S.key)},e.toDisplayString(S.label),9,J2))),128)),kt.value.length===0?(e.openBlock(),e.createElementBlock("li",e0,e.toDisplayString(e.unref(_)("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":w[11]||(w[11]=S=>H.value=S),placeholder:e.unref(_)("filter.searchAttributes")},null,8,t0),[[e.vModelText,H.value]]),e.createElementVNode("ul",l0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ze.value,S=>(e.openBlock(),e.createElementBlock("li",{key:S.key,class:"dss-filter-popup-item",onClick:K=>Ae(S.key)},e.toDisplayString(S.label),9,n0))),128)),Ze.value.length===0?(e.openBlock(),e.createElementBlock("li",o0,e.toDisplayString(e.unref(_)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64))])):e.createCommentVNode("",!0)]),ve.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-clear-all",onClick:De},e.toDisplayString(e.unref(_)("filter.clearAllFilters")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],512)],2))}}),r0={class:"dss-pill-field__pills"},i0=["disabled"],c0={class:"dss-pill-field__pill-text"},u0={key:0,class:"dss-pill-field__pill-actions"},d0=["onClick"],m0=["onClick"],p0=["placeholder","disabled"],f0=e.defineComponent({__name:"DSSPillField",props:{modelValue:{default:()=>[]},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup($,{emit:J}){const B=$,_=J,ie=e.ref(""),F=e.ref([...B.modelValue]),A=e.ref(null);let X=null;const Ke=e.ref(null),ge=e.ref(""),f=e.ref(null),Ce=e.computed(()=>new Set(F.value.map(I=>I.trim()).filter(Boolean)));function ve(I){A.value=I,X&&clearTimeout(X),X=setTimeout(()=>{A.value=null,X=null},900)}function ee(I){const we=I.trim();return we?Ce.value.has(we)?(ve(we),!1):(F.value=[...F.value,we],_("update:modelValue",[...F.value]),!0):!1}function ne(I){const we=I.split(/\r?\n/g).map(yt=>yt.trim()).filter(Boolean);if(!we.length)return;const _e=new Set(F.value.map(yt=>yt.trim()).filter(Boolean)),ke=[...F.value];let ft=null;for(const yt of we){if(_e.has(yt)){ft??=yt;continue}_e.add(yt),ke.push(yt)}ke.length!==F.value.length&&(F.value=ke,_("update:modelValue",[...F.value])),ft&&ve(ft)}function pe(I){B.disabled||(Ke.value===I&&(Ke.value=null,ge.value=""),F.value=F.value.filter((we,_e)=>_e!==I),_("update:modelValue",[...F.value]))}async function H(I){B.disabled||(Ke.value=I,ge.value=F.value[I]??"",await e.nextTick(),f.value?.focus(),f.value?.select())}function ye(){Ke.value=null,ge.value=""}function Te(){if(B.disabled||Ke.value===null)return;const I=Ke.value,we=F.value[I]??"",_e=ge.value.trim();if(Ke.value=null,ge.value="",_e!==we&&Ce.value.has(_e)){ve(_e);return}if(!_e){F.value=F.value.filter((ft,yt)=>yt!==I),_("update:modelValue",[...F.value]);return}const ke=F.value.map((ft,yt)=>yt===I?_e:ft);F.value=ke,_("update:modelValue",[...F.value])}function We(I){I.preventDefault(),!B.disabled&&(ee(ie.value),ie.value="")}function it(I){if(B.disabled)return;const we=I.clipboardData?.getData("text")??"";!we.includes(`
|
|
118
|
-
`)&&!we.includes("\r")||(I.preventDefault(),ne(we),ie.value="")}return e.watch(()=>B.modelValue,I=>{F.value=Array.isArray(I)?[...I]:[]},{deep:!0}),e.onBeforeUnmount(()=>{X&&clearTimeout(X)}),(I,we)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-pill-field",{"dss-pill-field--disabled":I.disabled}])},[e.createElementVNode("div",r0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(_e,ke)=>(e.openBlock(),e.createElementBlock("span",{key:_e,class:e.normalizeClass(["dss-pill-field__pill",{"dss-pill-field__pill--highlight":A.value===_e}])},[Ke.value===ke?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_for:!0,ref_key:"editInputEl",ref:f,"onUpdate:modelValue":we[0]||(we[0]=ft=>ge.value=ft),class:"dss-pill-field__pill-edit",type:"text",disabled:I.disabled,onKeydown:[e.withKeys(Te,["enter"]),e.withKeys(ye,["esc"])],onBlur:Te},null,40,i0)),[[e.vModelText,ge.value]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",c0,e.toDisplayString(_e),1),I.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",u0,[e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action",onClick:ft=>H(ke)},[...we[2]||(we[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,d0),e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action dss-pill-field__pill-action--remove",onClick:ft=>pe(ke)}," × ",8,m0)]))],64))],2))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":we[1]||(we[1]=_e=>ie.value=_e),class:"dss-pill-field__input",type:"text",placeholder:F.value.length?"":I.placeholder,disabled:I.disabled,onPaste:it,onKeydown:e.withKeys(We,["enter"])},null,40,p0),[[e.vModelText,ie.value]])])],2))}}),v0={class:"dss-step-bar__header"},g0={class:"dss-step-bar__label"},h0={key:0,class:"dss-step-bar__counter"},y0={class:"dss-step-bar__track-wrapper"},k0=["aria-valuemax","aria-valuenow","aria-label"],C0=["onMouseenter"],b0={__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($)},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:()=>({})}},setup($){const J=$,B={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"}}},_=j=>j&&typeof j=="object"&&!Array.isArray(j),ie=(j,ce)=>{const Ie=Object.assign({},j);return!_(j)||!_(ce)||Object.keys(ce).forEach(Xe=>{if(_(ce[Xe])){Xe in j?Ie[Xe]=ie(j[Xe],ce[Xe]):Object.assign(Ie,{[Xe]:ce[Xe]});return}Object.assign(Ie,{[Xe]:ce[Xe]})}),Ie},F=e.computed(()=>ie(B,J.options)),A=e.computed(()=>Math.max(1,Number(J.steps)||1)),X=e.computed(()=>Math.min(A.value,Math.max(0,Number(J.currentStep)||0))),Ke=e.computed(()=>Array.isArray(J.segments)&&J.segments.length>0),ge=e.computed(()=>{if(!Ke.value)return[];const j=J.segments.map((ce,Ie)=>{const Xe=Number(ce?.value);return{label:ce?.label||`Step ${Ie+1}`,value:Number.isFinite(Xe)&&Xe>0?Xe:0,color:ce?.color||J.activeColor,marker:ce?.marker}});return J.segmentOrder==="desc"?[...j].sort((ce,Ie)=>Ie.value-ce.value):J.segmentOrder==="asc"?[...j].sort((ce,Ie)=>ce.value-Ie.value):j}),f=e.computed(()=>Ke.value?ge.value.reduce((j,ce)=>j+ce.value,0):X.value),Ce=e.computed(()=>Ke.value?Number.isFinite(Number(J.totalValue))&&Number(J.totalValue)>0?Number(J.totalValue):Math.max(1,f.value):A.value),ve=e.computed(()=>Ke.value&&Number.isFinite(Number(J.totalValue))&&Number(J.totalValue)>0),ee=e.computed(()=>ve.value?Math.max(0,Number(J.totalValue)-f.value):0),ne=e.computed(()=>typeof J.remainderLabel=="string"&&J.remainderLabel.trim().length>0),pe=e.computed(()=>ee.value>0),H=e.computed(()=>ge.value.reduce((j,ce)=>Math.max(j,Number(ce.value)||0),0)),ye=e.computed(()=>ge.value.filter(j=>j.value>0).map(j=>`${j.label}: ${Pt(j.value)}`).join(" | ")),Te=e.computed(()=>Ke.value?ve.value?ge.value.filter(j=>j.value>0):ge.value:[]),We=e.computed(()=>{if(!J.counterAsPercentage)return`${f.value} / ${Ce.value}`;const j=Number(Ce.value);if(!Number.isFinite(j)||j<=0)return"0%";const ce=Math.round(Number(f.value)/j*100);return`${Math.min(Math.max(ce,0),100)}%`}),it=e.computed(()=>f.value),I=e.computed(()=>Ce.value),we=e.reactive({visible:!1,x:0,content:""}),_e=e.computed(()=>({left:`${we.x}px`})),ke=j=>{const ce=j?.parentElement;return ce?ce.offsetLeft+ce.offsetWidth/2:0},ft=j=>{if(ve.value){const Xe=Math.max(0,Number(j.value)||0);return{flex:`${Xe} 0 0`,minWidth:Xe>0?"6px":"0",backgroundColor:j.color}}const ce=f.value;return{flex:`${j.value>0?j.value:ce>0?1e-4:1} 0 0`,minWidth:"6px",backgroundColor:j.color}},yt=j=>Number(j?.value||0)>0&&Number(j?.value||0)===H.value,de=j=>{const ce=_(j?.marker)?j.marker:{},Ie=j?.marker===!0||ce.enabled===!0,Xe=yt(j)&&F.value.maxSegment?.marker?.enabled===!0;if(!(Ie||Xe))return{enabled:!1};const Qe=ce.backgroundColor??(Xe?F.value.maxSegment?.marker?.backgroundColor:F.value.segmentMarker?.backgroundColor),lt=ce.borderColor??(Xe?F.value.maxSegment?.marker?.borderColor:F.value.segmentMarker?.borderColor),Bt=ce.color??(Xe?F.value.maxSegment?.marker?.color:F.value.segmentMarker?.color),qt=ce.width??(Xe?F.value.maxSegment?.marker?.width:F.value.segmentMarker?.width),te=ce.height??(Xe?F.value.maxSegment?.marker?.height:F.value.segmentMarker?.height);return{enabled:!0,backgroundColor:Qe,borderColor:lt,color:Bt,width:qt,height:te,icon:ce.icon??null,...ce}},kt=j=>{const ce=de(j);return{backgroundColor:ce.backgroundColor??void 0,borderColor:ce.borderColor??void 0,color:ce.color??void 0}},Ze=j=>{const ce=de(j);return{width:ce.width??void 0,height:ce.height??void 0}},Pt=j=>`${j}${J.valueLabel}`,st=e.computed(()=>({flex:`${ee.value} 0 0`,minWidth:ee.value>0?"6px":"0",backgroundColor:J.inactiveColor})),St=(j,ce)=>{if(!j||!ce?.currentTarget)return;const Ie=ce.currentTarget;if(J.remainderTooltipSummary){we.x=ke(Ie),we.content=ye.value,we.visible=!!we.content;return}we.x=Ie.offsetLeft+Ie.offsetWidth/2,we.content=`${j.label}: ${Pt(j.value)}`,we.visible=!0},At=j=>{if(!ee.value||!j?.currentTarget)return;const ce=j.currentTarget;if(J.remainderTooltipSummary){we.x=ke(ce),we.content=ye.value,we.visible=!!we.content;return}we.x=ce.offsetLeft+ce.offsetWidth/2,ne.value&&(we.content=`${J.remainderLabel}: ${Pt(ee.value)}`,we.visible=!0)},Ut=()=>{we.visible=!1},Ft=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}));return(j,ce)=>(e.openBlock(),e.createElementBlock("div",{class:"dss-step-bar",style:e.normalizeStyle(Ft.value)},[e.createElementVNode("div",v0,[e.createElementVNode("span",g0,[e.renderSlot(j.$slots,"label",{label:$.label},()=>[e.createTextVNode(e.toDisplayString($.label),1)])]),$.showCounter?(e.openBlock(),e.createElementBlock("span",h0,[e.renderSlot(j.$slots,"counter",{counterDisplay:We.value},()=>[e.createTextVNode(e.toDisplayString(We.value),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",y0,[e.createElementVNode("div",{class:"dss-step-bar__track",role:"progressbar","aria-valuemin":0,"aria-valuemax":I.value,"aria-valuenow":it.value,"aria-label":$.label},[Ke.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Te.value,(Ie,Xe)=>(e.openBlock(),e.createElementBlock("div",{key:`segment-${Xe}-${Ie.label}`,class:e.normalizeClass(["dss-step-bar__segment dss-step-bar__segment--interactive",{"dss-step-bar__segment--max":yt(Ie),"dss-step-bar__segment--marker-enabled":de(Ie).enabled}]),style:e.normalizeStyle(ft(Ie)),onMouseenter:Ot=>St(Ie,Ot),onMouseleave:Ut},[de(Ie).enabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment-marker",style:e.normalizeStyle(kt(Ie)),"aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-step-bar__segment-marker-icon",style:e.normalizeStyle(Ze(Ie))},[e.renderSlot(j.$slots,"segment-marker-icon",{segment:Ie,index:Xe,marker:de(Ie)},()=>[e.renderSlot(j.$slots,"max-segment-icon",{segment:Ie,index:Xe,marker:de(Ie)},()=>[e.createTextVNode(e.toDisplayString(de(Ie).icon||""),1)])])],4)],4)):e.createCommentVNode("",!0)],46,C0))),128)),pe.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment dss-step-bar__segment--remainder",style:e.normalizeStyle(st.value),onMouseenter:ce[0]||(ce[0]=Ie=>At(Ie)),onMouseleave:Ut},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<=X.value}])},null,2))),128))],8,k0),we.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__tooltip",style:e.normalizeStyle(_e.value)},e.toDisplayString(we.content),5)):e.createCommentVNode("",!0)])],4))}},w0={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"}},x0={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"},E0={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"}},S0={selectDate:"Select Date",selectRange:"Select range",startDate:"Start date",endDate:"End date",prevMonth:"Previous month",nextMonth:"Next month",quickSelect:{today:"Today",lastWeek:"Last week",last15Days:"Last 15 days",last30Days:"Last 30 days",thisMonth:"This 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"}},V0={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"}},Qn={chart:w0,table:x0,filter:E0,datepicker:S0,textEditor:V0},N0={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"}},B0={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"},M0={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"}},_0={selectDate:"Sélectionner une date",selectRange:"Sélectionner une plage",startDate:"Date de début",endDate:"Date de fin",prevMonth:"Mois précédent",nextMonth:"Mois suivant",quickSelect:{today:"Aujourd'hui",lastWeek:"Dernière semaine",last15Days:"15 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois",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"}},$0={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"}},Jn={chart:N0,table:B0,filter:M0,datepicker:_0,textEditor:$0},L0={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"}},T0={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"},A0={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"}},D0={selectDate:"Selecteer datum",selectRange:"Selecteer bereik",startDate:"Startdatum",endDate:"Einddatum",prevMonth:"Vorige maand",nextMonth:"Volgende maand",quickSelect:{today:"Vandaag",lastWeek:"Afgelopen week",last15Days:"Laatste 15 dagen",last30Days:"Laatste 30 dagen",thisMonth:"Deze 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"}},H0={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"}},eo={chart:L0,table:T0,filter:A0,datepicker:D0,textEditor:H0},Bo={en:Qn,fr:Jn,nl:eo};function Ko($){if(!$||!$.global)return;const J=$.global.availableLocales||[];Object.keys(Bo).forEach(B=>{J.includes(B)&&$.global.mergeLocaleMessage(B,Bo[B])})}const Mo={en:{textEditor:Qn.textEditor},fr:{textEditor:Jn.textEditor},nl:{textEditor:eo.textEditor}};function Go($){if(!$||!$.global)return;const J=$.global.availableLocales||[];Object.keys(Mo).forEach(B=>{J.includes(B)&&$.global.mergeLocaleMessage(B,Mo[B])})}const _o={en:{table:Qn.table},fr:{table:Jn.table},nl:{table:eo.table}};function Qo($){if(!$||!$.global)return;const J=$.global.availableLocales||[];Object.keys(_o).forEach(B=>{J.includes(B)&&$.global.mergeLocaleMessage(B,_o[B])})}const $o={en:{datepicker:Qn.datepicker},fr:{datepicker:Jn.datepicker},nl:{datepicker:eo.datepicker}};function Jo($){if(!$||!$.global)return;const J=$.global.availableLocales||[];Object.keys($o).forEach(B=>{J.includes(B)&&$.global.mergeLocaleMessage(B,$o[B])})}const Lo={en:{filter:Qn.filter},fr:{filter:Jn.filter},nl:{filter:eo.filter}};function ea($){if(!$||!$.global)return;const J=$.global.availableLocales||[];Object.keys(Lo).forEach(B=>{J.includes(B)&&$.global.mergeLocaleMessage(B,Lo[B])})}const R0={chart:Bo,textEditor:Mo,table:_o,datepicker:$o,filter:Lo};function I0($){!$||!$.global||(Ko($),Go($),Qo($),Jo($),ea($))}const F0={en:{...Qn},fr:{...Jn},nl:{...eo}};Gn.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:F0});exports.DSSChart=Ii;exports.DSSChartMessages=Bo;exports.DSSColorPicker=Sm;exports.DSSConfetti=Jm;exports.DSSDatepicker=Wo;exports.DSSDatepickerMessages=$o;exports.DSSDnd=Gm;exports.DSSFilter=s0;exports.DSSFilterMessages=Lo;exports.DSSLoader=Im;exports.DSSMessages=R0;exports.DSSModal=qo;exports.DSSPillField=f0;exports.DSSSkeleton=Fm;exports.DSSStepBar=b0;exports.DSSTable=su;exports.DSSTableMessages=_o;exports.DSSTextEditor=cm;exports.DSSTextEditorMessages=Mo;exports.addDSSChartTranslations=Ko;exports.addDSSDatepickerTranslations=Jo;exports.addDSSFilterTranslations=ea;exports.addDSSTableTranslations=Qo;exports.addDSSTextEditorTranslations=Go;exports.addDSSTranslations=I0;
|
|
117
|
+
`,document.body.appendChild(et),Ce=et}function vt(Q,be){Ce&&(Ce.style.left=`${Q-qe}px`,Ce.style.top=`${be-it}px`)}function We(Q){Q.classList.add("dss-dnd-item--dragging"),Q.style.background=U.value.dragSourceBackground,Q.style.borderColor=U.value.dragSourceBorder,Q.style.transform="scale(0.97)"}function Pt(Q){Q.classList.remove("dss-dnd-item--dragging"),Q.style.background="",Q.style.borderColor="",Q.style.transform=""}function rt(Q,be){return document.elementFromPoint(Q,be)?.closest(".dss-dnd-column-body")??null}function Et(Q,be){return!!document.elementFromPoint(Q,be)?.closest("[data-dss-dnd-delete-zone]")}function Tt(Q,be){if(z.value&&Et(Q,be)){ge.value=!0,we.value=null,ne.value=-1;return}ge.value=!1;const Me=rt(Q,be),Ze=Me?.getAttribute("data-column")??null;if(!Ze){we.value=null,ne.value=-1;return}we.value=Ze;const et=Me.querySelectorAll(".dss-dnd-item:not(.dss-dnd-item--dragging)");let mt=et.length;for(let je=0;je<et.length;je++){const _t=et[je].getBoundingClientRect();if(be<_t.top+_t.height/2){mt=je;break}}ne.value=mt}function Wt(Q){Q.preventDefault(),vt(Q.clientX,Q.clientY),!ve&&(ve=requestAnimationFrame(()=>{ve=null,Tt(Q.clientX,Q.clientY)}))}function Ft(Q){window.removeEventListener("pointermove",Wt),window.removeEventListener("pointerup",Ft),window.removeEventListener("pointercancel",Ft),Ae?.releasePointerCapture?.(Q.pointerId),Pt(Ae),Ae=null;const be=z.value&&Et(Q.clientX,Q.clientY);if(f.value&&be)L("delete",{item:f.value});else{const Ze=rt(Q.clientX,Q.clientY)?.getAttribute("data-column")??null;if(f.value&&Ze){const et=f.value[M.columnKey],mt=Ze,_t=(ke.value[mt]||[]).filter(j=>j[M.itemKey]!==f.value[M.itemKey]),Re=Math.max(0,Math.min(ne.value,_t.length)),P=ft(mt,Re),X=f.value[M.itemKey];L("move",{item:f.value,from:et,to:mt,position:P,index:Re}),H&&clearTimeout(H),ae.value={id:X,from:et,to:mt},H=setTimeout(()=>{ae.value=null},3500)}}Ce&&(Ce.remove(),Ce=null),R!==null&&(document.body.style.cursor=R,R=""),Ut()}function G(Q,be){Q.preventDefault();const Me=Q.target.closest(".dss-dnd-item");if(!Me)return;const Ze=Me.getBoundingClientRect();qe=Q.clientX-Ze.left,it=Q.clientY-Ze.top,R=document.body.style.cursor,document.body.style.cursor="grabbing",f.value=be,Ae=Me,de(Me,Q.clientX,Q.clientY),requestAnimationFrame(()=>We(Me)),Me.setPointerCapture?.(Q.pointerId),window.addEventListener("pointermove",Wt),window.addEventListener("pointerup",Ft,{once:!0}),window.addEventListener("pointercancel",Ft,{once:!0})}function ue(){xe&&(window.removeEventListener("pointermove",He),window.removeEventListener("pointerup",Xe),window.removeEventListener("pointercancel",Xe),xe=null)}function He(Q){if(!xe||Q.pointerId!==xe.pointerId)return;const be=Q.clientX-xe.startX,Me=Q.clientY-xe.startY;if(Math.abs(be)>=Be||Math.abs(Me)>=Be){const Ze=xe.item;ue(),G(Q,Ze)}}function Xe(Q){!xe||Q.pointerId!==xe.pointerId||ue()}function Zt(Q,be){ue(),xe={item:be,startX:Q.clientX,startY:Q.clientY,pointerId:Q.pointerId},window.addEventListener("pointermove",He),window.addEventListener("pointerup",Xe),window.addEventListener("pointercancel",Xe)}function kt(Q,be){U.value.useHandle||Zt(Q,be)}function xt(Q,be){Zt(Q,be)}function Mt(){ve&&(cancelAnimationFrame(ve),ve=null)}function Ut(){Mt(),f.value=null,we.value=null,ge.value=!1,ne.value=-1}return e.onBeforeUnmount(()=>{Mt(),ue(),H&&clearTimeout(H),Ce&&(Ce.remove(),Ce=null)}),(Q,be)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-dnd",{"dss-dnd--unstyled":U.value.unstyled}]),style:e.normalizeStyle(Ke.value)},[z.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":ge.value}]),"data-dss-dnd-delete-zone":""},[e.renderSlot(Q.$slots,"delete-zone",{isDragging:!!f.value,isOver:ge.value})],2),[[e.vShow,!!f.value||U.value.deleteZoneAlwaysVisible]])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.columns,Me=>(e.openBlock(),e.createElementBlock("div",{key:Me.value,class:e.normalizeClass(["dss-dnd-column",[{"dss-dnd-column--drag-over":we.value==Me.value},Me.class||""]]),style:e.normalizeStyle(he(Me))},[U.value.showHeader?(e.openBlock(),e.createElementBlock("div",l2,[e.renderSlot(Q.$slots,"column-header",{column:Me,items:ke.value[Me.value]||[]},()=>[e.createElementVNode("span",o2,e.toDisplayString(Me.title||Me.value),1),e.createElementVNode("span",a2,e.toDisplayString((ke.value[Me.value]||[]).length),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"dss-dnd-column-body","data-column":Me.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(dt.value[Me.value],Ze=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Ze.key},[Ze.type==="indicator"?(e.openBlock(),e.createElementBlock("div",r2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-dnd-item",{"dss-dnd-item--dragging":Ze.isDragged,"dss-dnd-item--no-handle":!U.value.useHandle}]),onPointerdown:et=>kt(et,Ze.item)},[U.value.useHandle?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-dnd-handle",onPointerdown:e.withModifiers(et=>xt(et,Ze.item),["stop"])},[e.renderSlot(Q.$slots,"handle",{},()=>[be[0]||(be[0]=e.createElementVNode("span",{class:"dss-dnd-handle-icon"},"⠿",-1))])],40,c2)):e.createCommentVNode("",!0),e.createElementVNode("div",u2,[e.renderSlot(Q.$slots,"item",{item:Ze.item,column:Me,justDropped:ae.value?.id===Ze.item[T.itemKey],droppedFrom:ae.value?.id===Ze.item[T.itemKey]?ae.value.from:null,droppedTo:ae.value?.id===Ze.item[T.itemKey]?ae.value.to:null},()=>[e.createElementVNode("div",d2,e.toDisplayString(Ze.item[T.itemKey]),1)])])],42,i2))],64))),128)),(ke.value[Me.value]||[]).length===0&&we.value!=Me.value?(e.openBlock(),e.createElementBlock("div",m2,[e.renderSlot(Q.$slots,"empty",{column:Me},()=>[be[1]||(be[1]=e.createElementVNode("span",{class:"dss-dnd-empty-text"},"No items",-1))])])):e.createCommentVNode("",!0)],8,s2)],6))),128))],6))}}),v2={name:"DSSConfetti"},g2=Object.assign(v2,{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(T){const te=T,M=e.ref(null),L=e.ref(!1);let ce=[],z=null,A=null;function U(ne,ae){const ve=[];for(let H=0;H<te.count;H++)ve.push(Ke(ne));return ve}function Ke(ne,ae){return{x:Math.random()*ne,y:-Math.random()*150-20,r:Math.random()*8+3,d:Math.random()*50,color:te.colors[Math.floor(Math.random()*te.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 he(ne,ae,ve,H){ne.clearRect(0,0,ae,ve);for(const Ce of ce)ne.save(),ne.globalAlpha=Ce.opacity*H,ne.beginPath(),ne.lineWidth=Ce.r,ne.strokeStyle=Ce.color,ne.moveTo(Ce.x+Ce.tilt+Ce.r/2,Ce.y),ne.lineTo(Ce.x+Ce.tilt,Ce.y+Ce.tilt+Ce.r/2),ne.stroke(),ne.restore()}function f(ne,ae,ve){const H=.3+ve*.7;for(let Ce=0;Ce<ce.length;Ce++){const Ae=ce[Ce];Ae.tiltAngle+=Ae.tiltInc,Ae.y+=Ae.speed*H,Ae.x+=Math.sin(Ae.d)*.5*H,Ae.tilt=Math.sin(Ae.tiltAngle)*15,ve>=.99&&Ae.y>ae+20&&(ce[Ce]=Ke(ne))}}function we(){L.value=!0,e.nextTick(()=>{const ne=M.value;if(!ne)return;const ae=ne.getContext("2d"),ve=ne.parentElement;if(!ve)return;const H=ve.getBoundingClientRect();ne.width=H.width,ne.height=H.height,ce=U(ne.width,ne.height);const Ce=Date.now(),Ae=Ce+te.duration,qe=()=>{const it=Date.now(),R=it-Ce;if(it<Ae){let xe=1;R>te.fadeStart&&(xe=1-(R-te.fadeStart)/(te.duration-te.fadeStart)),he(ae,ne.width,ne.height,xe),f(ne.width,ne.height,xe),z=requestAnimationFrame(qe)}else ge()};qe()})}function ge(){z&&(cancelAnimationFrame(z),z=null),ce=[],L.value=!1}return e.watch(()=>te.trigger,ne=>{ne&&(A&&clearTimeout(A),A=setTimeout(we,te.delay))},{immediate:!0}),e.onBeforeUnmount(()=>{ge(),A&&clearTimeout(A)}),(ne,ae)=>L.value?(e.openBlock(),e.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:M,class:"dss-confetti-canvas"},null,512)):e.createCommentVNode("",!0)}}),h2={class:"dss-filter-global-inner"},y2=["placeholder","value"],k2=["title"],C2={key:0,class:"dss-filter-funnel-badge"},b2={key:1,class:"dss-filter-sortby"},w2=["value"],x2=["value"],E2=["disabled","title"],S2={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"},V2={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"},N2={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"},B2={class:"dss-filter-panel"},M2={key:0,class:"dss-filter-empty"},_2={class:"dss-filter-row-prefix"},$2={class:"dss-filter-cell"},L2=["onClick"],T2={class:"dss-filter-trigger-text"},A2=["placeholder"],D2={class:"dss-filter-popup-list"},H2=["onClick"],R2={key:0,class:"dss-filter-popup-empty"},F2={key:0,class:"dss-filter-cell"},I2=["onClick"],z2={class:"dss-filter-trigger-text"},P2={class:"dss-filter-popup-list"},O2=["onClick"],q2={key:1,class:"dss-filter-cell dss-filter-cell--value"},W2=["placeholder","onUpdate:modelValue"],Z2={key:1,class:"dss-filter-date-wrap"},U2=["placeholder","onUpdate:modelValue"],X2=["placeholder","value","onInput","step"],Y2={key:4,class:"dss-filter-between"},j2=["placeholder","value","onInput","step"],K2={class:"dss-filter-between-sep"},G2=["placeholder","value","onInput","step"],Q2={key:5,class:"dss-filter-multiselect"},J2=["onClick"],e0={class:"dss-filter-trigger-text"},t0=["placeholder"],n0={class:"dss-filter-popup-list dss-filter-popup-list--check"},l0=["onClick"],o0=["checked"],a0={key:0,class:"dss-filter-popup-empty"},s0=["onClick"],r0={class:"dss-filter-foot"},i0={class:"dss-filter-cell"},c0=["placeholder"],u0={class:"dss-filter-popup-list"},d0=["onClick"],m0={key:0,class:"dss-filter-popup-divider"},p0=["onClick"],f0=["placeholder"],v0={class:"dss-filter-popup-list"},g0=["onClick"],h0={key:0,class:"dss-filter-popup-empty"},y0=["placeholder"],k0={class:"dss-filter-popup-list"},C0=["onClick"],b0={key:0,class:"dss-filter-popup-empty"},w0={name:"DSSFilter"},x0=Object.assign(w0,{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(T,{expose:te,emit:M}){const{t:L}=Gl.useI18n(),ce=T,z=M,A={unstyled:!1,maxUniqueForSelect:30,maxUniqueForEnum:15},U=e.computed(()=>({...A,...ce.options})),Ke={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"}]},he=new Set(["is_empty","is_not_empty","is_true","is_false"]),f=["label","name","title","keyword","full_name","value","text"],we=e.ref(""),ge=e.ref([]),ne=e.ref(null),ae=e.ref(!1),ve=e.ref(null),H=e.ref(""),Ce=e.ref(null),Ae=e.ref(""),qe=e.ref("asc");let it=1;function R(V){const w=V.find(E=>E&&typeof E=="object");if(!w)return null;for(const E of f)if(E in w&&typeof w[E]=="string")return E;return Object.keys(w).find(E=>typeof w[E]=="string")||null}function xe(V,w){const E=w.filter(Y=>Y!=null&&Y!=="NULL");if(E.length===0)return null;if(E.every(Y=>Array.isArray(Y))){const Y=E.flatMap(Ye=>Ye).filter(Ye=>Ye!=null);return Y.length===0?null:typeof Y.find(Ye=>Ye!=null)=="object"?"arraySelect":"arrayText"}return E.every(Y=>typeof Y=="boolean")?"boolean":E.every(Y=>typeof Y=="number")?new Set(E).size<=U.value.maxUniqueForEnum?"select":"range":E.every(Y=>typeof Y=="string")?new Set(E).size<=U.value.maxUniqueForSelect?"select":"text":E.some(Y=>typeof Y=="object"&&!Array.isArray(Y))?null:"text"}const Be=e.computed(()=>{if(!ce.data?.length)return[];const V=new Set;for(const le of ce.data)if(le&&typeof le=="object")for(const Ye of Object.keys(le))V.add(Ye);const w=new Set(ce.exclude),E=[];for(const le of V){if(w.has(le))continue;const Ye=ce.config[le]||{},ot=ce.data.map(at=>at?.[le]),Ve=Ye.type||xe(le,ot);if(!Ve)continue;const Fe=Ye.filterMode||"contain",It=Fe==="date"?"date":Fe==="string"?"text":Ve,Ht={key:le,label:Ye.label||$t(le),type:It,filterMode:Fe};if(Ve==="select"){const at=ot.filter(Ge=>Ge!=null&&Ge!=="NULL");Ht.uniqueValues=[...new Set(at)].sort((Ge,Lt)=>typeof Ge=="number"&&typeof Lt=="number"?Ge-Lt:String(Ge).localeCompare(String(Lt)))}else if(Ve==="range"||Ve==="int"){const at=ot.filter(Ge=>typeof Ge=="number");Ht.min=Math.min(...at),Ht.max=Math.max(...at)}else if(Ve==="arraySelect"){const at=Ye.displayKey||R(ot.flatMap(Ge=>Array.isArray(Ge)?Ge:[]));if(Ht.displayKey=at,Array.isArray(Ye.uniqueValues)&&Ye.uniqueValues.length>0)Ht.uniqueValues=Ye.uniqueValues.map(Ge=>String(Ge));else{const Ge=ot.flatMap(Lt=>Array.isArray(Lt)?Lt:[]).filter(Lt=>Lt!=null).map(Lt=>at&&typeof Lt=="object"?Lt[at]:String(Lt)).filter(Lt=>Lt!=null&&Lt!=="");Ht.uniqueValues=[...new Set(Ge)].sort((Lt,In)=>String(Lt).localeCompare(String(In)))}}E.push(Ht)}const Y=ce.config._order;return Y&&E.sort((le,Ye)=>{const ot=Y.indexOf(le.key),Ve=Y.indexOf(Ye.key);return ot===-1&&Ve===-1?0:ot===-1?1:Ve===-1?-1:ot-Ve}),E}),ke=e.computed(()=>{const V={};for(const w of Be.value)V[w.key]=w;return V}),dt=e.computed(()=>Array.isArray(ce.config.groups)&&ce.config.groups.length>0),ft=e.computed(()=>{if(!dt.value)return[];const V=new Set(Be.value.map(w=>w.key));return ce.config.groups.map(w=>({...w,keys:w.keys.filter(E=>V.has(E))})).filter(w=>w.keys.length>0)}),de=e.computed(()=>{if(!dt.value)return[];const V=new Set(ce.config.groups.flatMap(w=>w.keys));return Be.value.filter(w=>!V.has(w.key))}),vt=e.computed(()=>{if(!Ce.value)return[];const V=new Set(Ce.value.keys),w=Be.value.filter(Y=>V.has(Y.key));if(!H.value)return w;const E=H.value.toLowerCase();return w.filter(Y=>Y.label.toLowerCase().includes(E))}),We=e.computed(()=>{if(!H.value)return Be.value;const V=H.value.toLowerCase();return Be.value.filter(w=>w.label.toLowerCase().includes(V))}),Pt=e.computed(()=>Be.value.filter(V=>!["arraySelect","arrayText"].includes(V.type))),rt=e.computed(()=>Ae.value?qe.value==="asc"?"Ascending":"Descending":"No sort selected");function Et(V){ne.value===V?Tt():(ne.value=V,H.value="",Ce.value=null)}function Tt(){ne.value=null,H.value="",Ce.value=null}function Wt(V){const w=V.target.closest(".dss-datepicker__overlay, .dss-datepicker__dropdown");ne.value&&!w&&!V.target.closest(".dss-filter-popup")&&!V.target.closest(".dss-filter-trigger")&&!V.target.closest(".dss-filter-add-btn")&&Tt(),ae.value&&ve.value&&!ve.value.contains(V.target)&&(w||(ae.value=!1))}e.onMounted(()=>document.addEventListener("click",Wt)),e.onBeforeUnmount(()=>document.removeEventListener("click",Wt));function Ft(V){return ke.value[V]?.label||$t(V)}function G(V){return ke.value[V.key]?.filterMode||"contain"}function ue(V){return L(`filter.operators.${V}`)}function He(V){const w=ke.value[V.key];return(Ke[w?.type]||Ke.text).map(E=>({...E,label:L(`filter.operators.${E.value}`)}))}function Xe(V){return he.has(V)}function Zt(V){const w=ke.value[V.key];return w?w.type==="date"?"date":w.type==="boolean"?"boolean":w.type==="text"||w.type==="arrayText"?"text":w.type==="select"||w.type==="arraySelect"?"multiselect":w.type==="range"||w.type==="int"?V.operator==="between"?"between":"number":"text":"text"}function kt(V){return Ke[V]?.[0]?.value||"contains"}function xt(V,w){return he.has(w)||V==="date"?null:V==="select"||V==="arraySelect"?[]:(V==="range"||V==="int")&&w==="between"?{min:null,max:null}:V==="range"||V==="int"?null:""}function Mt(V){return ke.value[V.key]?.uniqueValues||[]}function Ut(V){const w=Mt(V);if(!H.value)return w;const E=H.value.toLowerCase();return w.filter(Y=>String(Y).toLowerCase().includes(E))}function Q(V){const w=V.value;return!w||w.length===0?L("filter.select"):w.length<=2?w.join(", "):L("filter.selectedCount",{count:w.length})}function be(V){const w=ke.value[V],E=w?.filterMode||"contain",Y=w?.type||"text",le=E==="string"?"contains":kt(Y);ge.value.push(e.reactive({id:it++,key:V,operator:le,value:xt(Y,le)})),Tt()}function Me(V){ge.value=ge.value.filter(w=>w.id!==V)}function Ze(V,w){const Y=ke.value[w]?.type||"text";V.key=w,V.operator=kt(Y),V.value=xt(Y,V.operator),Tt()}function et(V,w){const E=Zt(V);V.operator=w;const Y=Zt(V);if(E!==Y||he.has(w)){const le=ke.value[V.key];V.value=xt(le?.type||"text",w)}Tt()}function mt(V,w){const E=w.target.value;V.value=E===""?null:Number(E)}function je(V,w,E){const Y=E.target.value,le=Y===""?null:Number(Y);(!V.value||typeof V.value!="object")&&(V.value={min:null,max:null}),V.value={...V.value,[w]:isNaN(le)?null:le}}function _t(V,w){const E=V.value||[],Y=E.indexOf(w);V.value=Y>=0?E.filter(le=>le!==w):[...E,w]}function Re(){ge.value=[],we.value="",Tt()}function P(V){we.value=V.target.value}function X(V){Ae.value=V.target.value}function j(){qe.value=qe.value==="asc"?"desc":"asc"}const me=e.computed(()=>{if(!ce.data)return[];let V=ce.data;if(we.value){const w=we.value.toLowerCase();V=V.filter(E=>{for(const Y of Object.keys(E)){const le=E[Y];if(typeof le=="string"&&le.toLowerCase().includes(w)||typeof le=="number"&&String(le).includes(w)||Array.isArray(le)&&le.some(Ye=>Ye!=null&&(typeof Ye=="string"?Ye.toLowerCase().includes(w):typeof Ye=="object"?Object.values(Ye).some(ot=>typeof ot=="string"&&ot.toLowerCase().includes(w)):!1)))return!0}return!1})}for(const w of ge.value){if(!St(w))continue;const E=ke.value[w.key];E&&(V=V.filter(Y=>Pe(Y,w,E)))}if(ce.showSortBy&&Ae.value){const w=Ae.value,E=qe.value==="asc"?1:-1;V=[...V].sort((Y,le)=>ze(Y?.[w],le?.[w])*E)}return V});function ze(V,w){const E=nt(V),Y=nt(w);return E==null&&Y==null?0:E==null?1:Y==null?-1:typeof E=="number"&&typeof Y=="number"?E-Y:String(E).localeCompare(String(Y),void 0,{numeric:!0,sensitivity:"base"})}function nt(V){return V==null||V==="NULL"?null:typeof V=="string"||typeof V=="number"||typeof V=="boolean"?V:V instanceof Date?V.getTime():null}function St(V){return he.has(V.operator)?!0:V.value==null||typeof V.value=="string"&&V.value===""||Array.isArray(V.value)&&V.value.length===0?!1:V.value instanceof Date?!isNaN(V.value.getTime()):!(typeof V.value=="object"&&!Array.isArray(V.value)&&V.value.min==null&&V.value.max==null)}function Pe(V,w,E){const Y=V?.[w.key],le=w.value,Ye=w.operator;if(Ye==="is_empty")return an(Y);if(Ye==="is_not_empty")return!an(Y);const ot=E.type;if(ot==="text"||ot==="arrayText"){const Ve=ot==="arrayText"&&Array.isArray(Y)?Y.filter(Ht=>Ht!=null).map(String).join(" "):Y!=null?String(Y):"",Fe=String(le).toLowerCase(),It=Ve.toLowerCase();switch(Ye){case"contains":return It.includes(Fe);case"not_contains":return!It.includes(Fe);case"equals":return It===Fe;case"not_equals":return It!==Fe;case"starts_with":return It.startsWith(Fe);case"ends_with":return It.endsWith(Fe);default:return!0}}if(ot==="select")switch(Ye){case"is_any_of":return le.includes(Y);case"is_none_of":return!le.includes(Y);default:return!0}if(ot==="range"||ot==="int"){const Ve=typeof Y=="number"?Y:Number(Y);if(typeof Ve!="number"||isNaN(Ve))return!1;if(Ye==="between"){const It=le?.min!=null?Number(le.min):null,Ht=le?.max!=null?Number(le.max):null,at=It!=null&&!isNaN(It)?It:null,Ge=Ht!=null&&!isNaN(Ht)?Ht:null;return(at==null||Ve>=at)&&(Ge==null||Ve<=Ge)}const Fe=typeof le=="number"&&!isNaN(le)?le:Number(le);if(Ye==="contains"||Ye==="not_contains"){const It=String(Ve),Ht=String(le??"").toLowerCase(),at=It.toLowerCase().includes(Ht);return Ye==="contains"?at:!at}if(typeof Fe!="number"||isNaN(Fe))return!1;switch(Ye){case"eq":return Ve===Fe;case"neq":return Ve!==Fe;case"gt":return Ve>Fe;case"gte":return Ve>=Fe;case"lt":return Ve<Fe;case"lte":return Ve<=Fe;default:return!0}}if(ot==="arraySelect"){if(!Array.isArray(Y))return!1;const Ve=Y.filter(Fe=>Fe!=null).map(Fe=>E.displayKey&&typeof Fe=="object"?Fe[E.displayKey]:String(Fe));switch(Ye){case"contains_any":return Ve.some(Fe=>le.includes(Fe));case"contains_all":return le.every(Fe=>Ve.includes(Fe));case"not_contains_any":return!Ve.some(Fe=>le.includes(Fe));default:return!0}}if(ot==="date"){const Ve=gt(le);if(!Ve||isNaN(Ve.getTime()))return!1;const Fe=gt(Y);if(!Fe||isNaN(Fe.getTime()))return!1;const It=Ot(Fe),Ht=Ot(Ve);switch(Ye){case"eq":return It===Ht;case"before":return It<Ht;case"after":return It>Ht;default:return!0}}if(ot==="boolean"){const Ve=Y===!0||Y==="true"||Y===1,Fe=Y===!1||Y==="false"||Y===0;switch(Ye){case"is_true":return Ve;case"is_false":return Fe;default:return!0}}return!0}function gt(V){if(V==null)return null;if(V instanceof Date)return isNaN(V.getTime())?null:V;if(typeof V=="number")return new Date(V>1e10?V:V*1e3);if(typeof V=="string"){const w=new Date(V);return isNaN(w.getTime())?null:w}return null}function Ot(V){const w=V.getFullYear(),E=String(V.getMonth()+1).padStart(2,"0"),Y=String(V.getDate()).padStart(2,"0");return`${w}-${E}-${Y}`}function an(V){return!!(V==null||V===""||V==="NULL"||Array.isArray(V)&&V.length===0||Array.isArray(V)&&V.every(w=>w==null))}e.watch(me,V=>z("update:modelValue",V),{immediate:!0}),e.watch(()=>ce.data,()=>{ge.value=[],we.value="",ae.value=!1,Ae.value="",qe.value="asc",Tt()});function $t(V){return V.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,w=>w.toUpperCase())}function sn(){const V=w=>{if(w==null)return w;if(w instanceof Date)return{_type:"Date",value:w.toISOString(),local:w.toLocaleDateString()};if(Array.isArray(w))return w.map(V);if(typeof w=="object"&&!Array.isArray(w)){const E={};for(const Y of Object.keys(w))E[Y]=V(w[Y]);return E}return w};return{globalSearch:we.value,rows:ge.value.map(w=>({key:w.key,operator:w.operator,value:V(w.value),defType:ke.value[w.key]?.type,defFilterMode:ke.value[w.key]?.filterMode})),filteredCount:me.value?.length??0}}return te({getDebugState:sn}),(V,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-filter",{"dss-filter--unstyled":U.value.unstyled}])},[e.createElementVNode("div",{class:"dss-filter-global",ref_key:"globalRef",ref:ve},[e.createElementVNode("div",h2,[w[20]||(w[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:P},null,40,y2),we.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-global-clear",onClick:w[0]||(w[0]=E=>we.value="")},"×")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["dss-filter-funnel-btn",{active:ae.value||ge.value.length>0,"dss-filter-funnel-btn--with-sort":ce.showSortBy}]),onClick:w[1]||(w[1]=E=>ae.value=!ae.value),type:"button",title:ae.value?e.unref(L)("filter.closeAdvancedFilter"):e.unref(L)("filter.openAdvancedFilter")},[w[14]||(w[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)),ge.value.length>0?(e.openBlock(),e.createElementBlock("span",C2,e.toDisplayString(ge.value.length),1)):e.createCommentVNode("",!0)],10,k2),ce.showSortBy?(e.openBlock(),e.createElementBlock("div",b2,[w[19]||(w[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:X},[w[15]||(w[15]=e.createElementVNode("option",{value:""},"None",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pt.value,E=>(e.openBlock(),e.createElementBlock("option",{key:E.key,value:E.key},e.toDisplayString(E.label),9,x2))),128))],40,w2),e.createElementVNode("button",{class:"dss-filter-sortby-order",type:"button",onClick:j,disabled:!Ae.value,title:rt.value},[Ae.value?qe.value==="asc"?(e.openBlock(),e.createElementBlock("svg",V2,[...w[17]||(w[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",N2,[...w[18]||(w[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",S2,[...w[16]||(w[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,E2)])):e.createCommentVNode("",!0)]),ae.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-advanced-popup",onClick:w[13]||(w[13]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",B2,[ge.value.length===0?(e.openBlock(),e.createElementBlock("div",M2,e.toDisplayString(e.unref(L)("filter.noConditionsApplied")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(E,Y)=>(e.openBlock(),e.createElementBlock("div",{key:E.id,class:"dss-filter-row"},[e.createElementVNode("span",_2,e.toDisplayString(Y===0?e.unref(L)("filter.where"):e.unref(L)("filter.and")),1),e.createElementVNode("div",$2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(le=>Et(`${E.id}:field`),["stop"])},[e.createElementVNode("span",T2,e.toDisplayString(Ft(E.key)),1),w[21]||(w[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,L2),ne.value===`${E.id}:field`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:w[3]||(w[3]=e.withModifiers(()=>{},["stop"]))},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":w[2]||(w[2]=le=>H.value=le),placeholder:e.unref(L)("filter.searchAttributes")},null,8,A2),[[e.vModelText,H.value]]),e.createElementVNode("ul",D2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(We.value,le=>(e.openBlock(),e.createElementBlock("li",{key:le.key,class:"dss-filter-popup-item",onClick:Ye=>Ze(E,le.key)},e.toDisplayString(le.label),9,H2))),128)),We.value.length===0?(e.openBlock(),e.createElementBlock("li",R2,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),G(E)==="contain"||G(E)==="date"?(e.openBlock(),e.createElementBlock("div",F2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(le=>Et(`${E.id}:op`),["stop"])},[e.createElementVNode("span",z2,e.toDisplayString(ue(E.operator)),1),w[22]||(w[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,I2),ne.value===`${E.id}:op`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:w[4]||(w[4]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("ul",P2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(He(E),le=>(e.openBlock(),e.createElementBlock("li",{key:le.value,class:e.normalizeClass(["dss-filter-popup-item",{selected:E.operator===le.value}]),onClick:Ye=>et(E,le.value)},e.toDisplayString(le.label),11,O2))),128))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Xe(E.operator)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",q2,[G(E)==="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":le=>E.value=le},null,8,W2)),[[e.vModelText,E.value]]):G(E)==="date"?(e.openBlock(),e.createElementBlock("div",Z2,[e.createVNode(Jo,{mode:"single",modelValue:E.value,"onUpdate:modelValue":le=>E.value=le},null,8,["modelValue","onUpdate:modelValue"])])):Zt(E)==="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":le=>E.value=le},null,8,U2)),[[e.vModelText,E.value]]):Zt(E)==="number"?(e.openBlock(),e.createElementBlock("input",{key:3,type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),value:E.value,onInput:le=>mt(E,le),step:ke.value[E.key]?.type==="int"?1:void 0},null,40,X2)):Zt(E)==="between"?(e.openBlock(),e.createElementBlock("div",Y2,[e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.min"),value:E.value?.min,onInput:le=>je(E,"min",le),step:ke.value[E.key]?.type==="int"?1:void 0},null,40,j2),e.createElementVNode("span",K2,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:E.value?.max,onInput:le=>je(E,"max",le),step:ke.value[E.key]?.type==="int"?1:void 0},null,40,G2)])):Zt(E)==="multiselect"?(e.openBlock(),e.createElementBlock("div",Q2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(le=>Et(`${E.id}:val`),["stop"])},[e.createElementVNode("span",e0,e.toDisplayString(Q(E)),1),w[23]||(w[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,J2),ne.value===`${E.id}:val`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:w[6]||(w[6]=e.withModifiers(()=>{},["stop"]))},[Mt(E).length>6?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":w[5]||(w[5]=le=>H.value=le),placeholder:e.unref(L)("filter.search")},null,8,t0)),[[e.vModelText,H.value]]):e.createCommentVNode("",!0),e.createElementVNode("ul",n0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ut(E),le=>(e.openBlock(),e.createElementBlock("li",{key:le,class:"dss-filter-popup-item",onClick:Ye=>_t(E,le)},[e.createElementVNode("input",{type:"checkbox",checked:(E.value||[]).includes(le),tabindex:"-1"},null,8,o0),e.createElementVNode("span",null,e.toDisplayString(le),1)],8,l0))),128)),Ut(E).length===0?(e.openBlock(),e.createElementBlock("li",a0,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:le=>Me(E.id)},[...w[24]||(w[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,s0)]))),128)),e.createElementVNode("div",r0,[e.createElementVNode("div",i0,[e.createElementVNode("button",{class:"dss-filter-add-btn",onClick:w[7]||(w[7]=e.withModifiers(E=>Et("add"),["stop"]))},e.toDisplayString(e.unref(L)("filter.addFilter")),1),ne.value==="add"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup dss-filter-add-popup",onClick:w[12]||(w[12]=e.withModifiers(()=>{},["stop"]))},[dt.value&&!Ce.value&&!H.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":w[8]||(w[8]=E=>H.value=E),placeholder:e.unref(L)("filter.searchAttributes")},null,8,c0),[[e.vModelText,H.value]]),e.createElementVNode("ul",u0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ft.value,E=>(e.openBlock(),e.createElementBlock("li",{key:E.label,class:"dss-filter-popup-item dss-filter-popup-group",onClick:Y=>Ce.value=E},[e.createElementVNode("span",null,e.toDisplayString(E.label),1),w[25]||(w[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,d0))),128)),de.value.length>0?(e.openBlock(),e.createElementBlock("li",m0)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(de.value,E=>(e.openBlock(),e.createElementBlock("li",{key:E.key,class:"dss-filter-popup-item",onClick:Y=>be(E.key)},e.toDisplayString(E.label),9,p0))),128))])],64)):Ce.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dss-filter-popup-back",onClick:w[9]||(w[9]=E=>Ce.value=null)},[w[26]||(w[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(Ce.value.label),1)]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":w[10]||(w[10]=E=>H.value=E),placeholder:e.unref(L)("filter.searchAttributes")},null,8,f0),[[e.vModelText,H.value]]),e.createElementVNode("ul",v0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vt.value,E=>(e.openBlock(),e.createElementBlock("li",{key:E.key,class:"dss-filter-popup-item",onClick:Y=>be(E.key)},e.toDisplayString(E.label),9,g0))),128)),vt.value.length===0?(e.openBlock(),e.createElementBlock("li",h0,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":w[11]||(w[11]=E=>H.value=E),placeholder:e.unref(L)("filter.searchAttributes")},null,8,y0),[[e.vModelText,H.value]]),e.createElementVNode("ul",k0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(We.value,E=>(e.openBlock(),e.createElementBlock("li",{key:E.key,class:"dss-filter-popup-item",onClick:Y=>be(E.key)},e.toDisplayString(E.label),9,C0))),128)),We.value.length===0?(e.openBlock(),e.createElementBlock("li",b0,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64))])):e.createCommentVNode("",!0)]),ge.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-clear-all",onClick:Re},e.toDisplayString(e.unref(L)("filter.clearAllFilters")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],512)],2))}}),E0={class:"dss-pill-field__pills"},S0=["disabled"],V0={class:"dss-pill-field__pill-text"},N0={key:0,class:"dss-pill-field__pill-actions"},B0=["onClick"],M0=["onClick"],_0=["placeholder","disabled"],$0=e.defineComponent({__name:"DSSPillField",props:{modelValue:{default:()=>[]},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(T,{emit:te}){const M=T,L=te,ce=e.ref(""),z=e.ref([...M.modelValue]),A=e.ref(null);let U=null;const Ke=e.ref(null),he=e.ref(""),f=e.ref(null),we=e.computed(()=>new Set(z.value.map(R=>R.trim()).filter(Boolean)));function ge(R){A.value=R,U&&clearTimeout(U),U=setTimeout(()=>{A.value=null,U=null},900)}function ne(R){const xe=R.trim();return xe?we.value.has(xe)?(ge(xe),!1):(z.value=[...z.value,xe],L("update:modelValue",[...z.value]),!0):!1}function ae(R){const xe=R.split(/\r?\n/g).map(ft=>ft.trim()).filter(Boolean);if(!xe.length)return;const Be=new Set(z.value.map(ft=>ft.trim()).filter(Boolean)),ke=[...z.value];let dt=null;for(const ft of xe){if(Be.has(ft)){dt??=ft;continue}Be.add(ft),ke.push(ft)}ke.length!==z.value.length&&(z.value=ke,L("update:modelValue",[...z.value])),dt&&ge(dt)}function ve(R){M.disabled||(Ke.value===R&&(Ke.value=null,he.value=""),z.value=z.value.filter((xe,Be)=>Be!==R),L("update:modelValue",[...z.value]))}async function H(R){M.disabled||(Ke.value=R,he.value=z.value[R]??"",await e.nextTick(),f.value?.focus(),f.value?.select())}function Ce(){Ke.value=null,he.value=""}function Ae(){if(M.disabled||Ke.value===null)return;const R=Ke.value,xe=z.value[R]??"",Be=he.value.trim();if(Ke.value=null,he.value="",Be!==xe&&we.value.has(Be)){ge(Be);return}if(!Be){z.value=z.value.filter((dt,ft)=>ft!==R),L("update:modelValue",[...z.value]);return}const ke=z.value.map((dt,ft)=>ft===R?Be:dt);z.value=ke,L("update:modelValue",[...z.value])}function qe(R){R.preventDefault(),!M.disabled&&(ne(ce.value),ce.value="")}function it(R){if(M.disabled)return;const xe=R.clipboardData?.getData("text")??"";!xe.includes(`
|
|
118
|
+
`)&&!xe.includes("\r")||(R.preventDefault(),ae(xe),ce.value="")}return e.watch(()=>M.modelValue,R=>{z.value=Array.isArray(R)?[...R]:[]},{deep:!0}),e.onBeforeUnmount(()=>{U&&clearTimeout(U)}),(R,xe)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-pill-field",{"dss-pill-field--disabled":R.disabled}])},[e.createElementVNode("div",E0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(Be,ke)=>(e.openBlock(),e.createElementBlock("span",{key:Be,class:e.normalizeClass(["dss-pill-field__pill",{"dss-pill-field__pill--highlight":A.value===Be}])},[Ke.value===ke?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_for:!0,ref_key:"editInputEl",ref:f,"onUpdate:modelValue":xe[0]||(xe[0]=dt=>he.value=dt),class:"dss-pill-field__pill-edit",type:"text",disabled:R.disabled,onKeydown:[e.withKeys(Ae,["enter"]),e.withKeys(Ce,["esc"])],onBlur:Ae},null,40,S0)),[[e.vModelText,he.value]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",V0,e.toDisplayString(Be),1),R.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",N0,[e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action",onClick:dt=>H(ke)},[...xe[2]||(xe[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,B0),e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action dss-pill-field__pill-action--remove",onClick:dt=>ve(ke)}," × ",8,M0)]))],64))],2))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":xe[1]||(xe[1]=Be=>ce.value=Be),class:"dss-pill-field__input",type:"text",placeholder:z.value.length?"":R.placeholder,disabled:R.disabled,onPaste:it,onKeydown:e.withKeys(qe,["enter"])},null,40,_0),[[e.vModelText,ce.value]])])],2))}}),L0={class:"dss-step-bar__header"},T0={class:"dss-step-bar__label"},A0={key:0,class:"dss-step-bar__counter"},D0={class:"dss-step-bar__track-wrapper"},H0=["aria-valuemax","aria-valuenow","aria-label"],R0=["onMouseenter"],F0={__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:T=>["input","desc","asc"].includes(T)},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:()=>({})}},setup(T){const te=T,M={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=G=>G&&typeof G=="object"&&!Array.isArray(G),ce=(G,ue)=>{const He=Object.assign({},G);return!L(G)||!L(ue)||Object.keys(ue).forEach(Xe=>{if(L(ue[Xe])){Xe in G?He[Xe]=ce(G[Xe],ue[Xe]):Object.assign(He,{[Xe]:ue[Xe]});return}Object.assign(He,{[Xe]:ue[Xe]})}),He},z=e.computed(()=>ce(M,te.options)),A=e.computed(()=>Math.max(1,Number(te.steps)||1)),U=e.computed(()=>Math.min(A.value,Math.max(0,Number(te.currentStep)||0))),Ke=e.computed(()=>Array.isArray(te.segments)&&te.segments.length>0),he=e.computed(()=>{if(!Ke.value)return[];const G=te.segments.map((ue,He)=>{const Xe=Number(ue?.value);return{label:ue?.label||`Step ${He+1}`,value:Number.isFinite(Xe)&&Xe>0?Xe:0,color:ue?.color||te.activeColor,marker:ue?.marker}});return te.segmentOrder==="desc"?[...G].sort((ue,He)=>He.value-ue.value):te.segmentOrder==="asc"?[...G].sort((ue,He)=>ue.value-He.value):G}),f=e.computed(()=>Ke.value?he.value.reduce((G,ue)=>G+ue.value,0):U.value),we=e.computed(()=>Ke.value?Number.isFinite(Number(te.totalValue))&&Number(te.totalValue)>0?Number(te.totalValue):Math.max(1,f.value):A.value),ge=e.computed(()=>Ke.value&&Number.isFinite(Number(te.totalValue))&&Number(te.totalValue)>0),ne=e.computed(()=>ge.value?Math.max(0,Number(te.totalValue)-f.value):0),ae=e.computed(()=>typeof te.remainderLabel=="string"&&te.remainderLabel.trim().length>0),ve=e.computed(()=>ne.value>0),H=e.computed(()=>he.value.reduce((G,ue)=>Math.max(G,Number(ue.value)||0),0)),Ce=e.computed(()=>he.value.filter(G=>G.value>0).map(G=>`${G.label}: ${Pt(G.value)}`).join(" | ")),Ae=e.computed(()=>Ke.value?ge.value?he.value.filter(G=>G.value>0):he.value:[]),qe=e.computed(()=>{if(!te.counterAsPercentage)return`${f.value} / ${we.value}`;const G=Number(we.value);if(!Number.isFinite(G)||G<=0)return"0%";const ue=Math.round(Number(f.value)/G*100);return`${Math.min(Math.max(ue,0),100)}%`}),it=e.computed(()=>f.value),R=e.computed(()=>we.value),xe=e.reactive({visible:!1,x:0,content:""}),Be=e.computed(()=>({left:`${xe.x}px`})),ke=G=>{const ue=G?.parentElement;return ue?ue.offsetLeft+ue.offsetWidth/2:0},dt=G=>{if(ge.value){const Xe=Math.max(0,Number(G.value)||0);return{flex:`${Xe} 0 0`,minWidth:Xe>0?"6px":"0",backgroundColor:G.color}}const ue=f.value;return{flex:`${G.value>0?G.value:ue>0?1e-4:1} 0 0`,minWidth:"6px",backgroundColor:G.color}},ft=G=>Number(G?.value||0)>0&&Number(G?.value||0)===H.value,de=G=>{const ue=L(G?.marker)?G.marker:{},He=G?.marker===!0||ue.enabled===!0,Xe=ft(G)&&z.value.maxSegment?.marker?.enabled===!0;if(!(He||Xe))return{enabled:!1};const kt=ue.backgroundColor??(Xe?z.value.maxSegment?.marker?.backgroundColor:z.value.segmentMarker?.backgroundColor),xt=ue.borderColor??(Xe?z.value.maxSegment?.marker?.borderColor:z.value.segmentMarker?.borderColor),Mt=ue.color??(Xe?z.value.maxSegment?.marker?.color:z.value.segmentMarker?.color),Ut=ue.width??(Xe?z.value.maxSegment?.marker?.width:z.value.segmentMarker?.width),Q=ue.height??(Xe?z.value.maxSegment?.marker?.height:z.value.segmentMarker?.height);return{enabled:!0,backgroundColor:kt,borderColor:xt,color:Mt,width:Ut,height:Q,icon:ue.icon??null,...ue}},vt=G=>{const ue=de(G);return{backgroundColor:ue.backgroundColor??void 0,borderColor:ue.borderColor??void 0,color:ue.color??void 0}},We=G=>{const ue=de(G);return{width:ue.width??void 0,height:ue.height??void 0}},Pt=G=>`${G}${te.valueLabel}`,rt=e.computed(()=>({flex:`${ne.value} 0 0`,minWidth:ne.value>0?"6px":"0",backgroundColor:te.inactiveColor})),Et=(G,ue)=>{if(!G||!ue?.currentTarget)return;const He=ue.currentTarget;if(te.remainderTooltipSummary){xe.x=ke(He),xe.content=Ce.value,xe.visible=!!xe.content;return}xe.x=He.offsetLeft+He.offsetWidth/2,xe.content=`${G.label}: ${Pt(G.value)}`,xe.visible=!0},Tt=G=>{if(!ne.value||!G?.currentTarget)return;const ue=G.currentTarget;if(te.remainderTooltipSummary){xe.x=ke(ue),xe.content=Ce.value,xe.visible=!!xe.content;return}xe.x=ue.offsetLeft+ue.offsetWidth/2,ae.value&&(xe.content=`${te.remainderLabel}: ${Pt(ne.value)}`,xe.visible=!0)},Wt=()=>{xe.visible=!1},Ft=e.computed(()=>({"--dss-step-bar-label-color":te.labelColor??void 0,"--dss-step-bar-counter-color":te.counterColor??void 0,"--dss-step-bar-active-color":te.activeColor,"--dss-step-bar-inactive-color":te.inactiveColor}));return(G,ue)=>(e.openBlock(),e.createElementBlock("div",{class:"dss-step-bar",style:e.normalizeStyle(Ft.value)},[e.createElementVNode("div",L0,[e.createElementVNode("span",T0,[e.renderSlot(G.$slots,"label",{label:T.label},()=>[e.createTextVNode(e.toDisplayString(T.label),1)])]),T.showCounter?(e.openBlock(),e.createElementBlock("span",A0,[e.renderSlot(G.$slots,"counter",{counterDisplay:qe.value},()=>[e.createTextVNode(e.toDisplayString(qe.value),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",D0,[e.createElementVNode("div",{class:"dss-step-bar__track",role:"progressbar","aria-valuemin":0,"aria-valuemax":R.value,"aria-valuenow":it.value,"aria-label":T.label},[Ke.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ae.value,(He,Xe)=>(e.openBlock(),e.createElementBlock("div",{key:`segment-${Xe}-${He.label}`,class:e.normalizeClass(["dss-step-bar__segment dss-step-bar__segment--interactive",{"dss-step-bar__segment--max":ft(He),"dss-step-bar__segment--marker-enabled":de(He).enabled}]),style:e.normalizeStyle(dt(He)),onMouseenter:Zt=>Et(He,Zt),onMouseleave:Wt},[de(He).enabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment-marker",style:e.normalizeStyle(vt(He)),"aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-step-bar__segment-marker-icon",style:e.normalizeStyle(We(He))},[e.renderSlot(G.$slots,"segment-marker-icon",{segment:He,index:Xe,marker:de(He)},()=>[e.renderSlot(G.$slots,"max-segment-icon",{segment:He,index:Xe,marker:de(He)},()=>[e.createTextVNode(e.toDisplayString(de(He).icon||""),1)])])],4)],4)):e.createCommentVNode("",!0)],46,R0))),128)),ve.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment dss-step-bar__segment--remainder",style:e.normalizeStyle(rt.value),onMouseenter:ue[0]||(ue[0]=He=>Tt(He)),onMouseleave:Wt},null,36)):e.createCommentVNode("",!0)],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(A.value,He=>(e.openBlock(),e.createElementBlock("div",{key:He,class:e.normalizeClass(["dss-step-bar__segment",{"dss-step-bar__segment--active":He<=U.value}])},null,2))),128))],8,H0),xe.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__tooltip",style:e.normalizeStyle(Be.value)},e.toDisplayString(xe.content),5)):e.createCommentVNode("",!0)])],4))}},I0={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"}},z0={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"},P0={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"}},O0={selectDate:"Select Date",selectRange:"Select range",startDate:"Start date",endDate:"End date",prevMonth:"Previous month",nextMonth:"Next month",quickSelect:{today:"Today",lastWeek:"Last week",last15Days:"Last 15 days",last30Days:"Last 30 days",thisMonth:"This 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"}},q0={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"}},Ql={chart:I0,table:z0,filter:P0,datepicker:O0,textEditor:q0},W0={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"}},Z0={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"},U0={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"}},X0={selectDate:"Sélectionner une date",selectRange:"Sélectionner une plage",startDate:"Date de début",endDate:"Date de fin",prevMonth:"Mois précédent",nextMonth:"Mois suivant",quickSelect:{today:"Aujourd'hui",lastWeek:"Dernière semaine",last15Days:"15 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois",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"}},Y0={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"}},Jl={chart:W0,table:Z0,filter:U0,datepicker:X0,textEditor:Y0},j0={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"}},K0={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"},G0={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"}},Q0={selectDate:"Selecteer datum",selectRange:"Selecteer bereik",startDate:"Startdatum",endDate:"Einddatum",prevMonth:"Vorige maand",nextMonth:"Volgende maand",quickSelect:{today:"Vandaag",lastWeek:"Afgelopen week",last15Days:"Laatste 15 dagen",last30Days:"Laatste 30 dagen",thisMonth:"Deze 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"}},J0={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"}},eo={chart:j0,table:K0,filter:G0,datepicker:Q0,textEditor:J0},Ao={en:Ql,fr:Jl,nl:eo};function ia(T){if(!T||!T.global)return;const te=T.global.availableLocales||[];Object.keys(Ao).forEach(M=>{te.includes(M)&&T.global.mergeLocaleMessage(M,Ao[M])})}const Do={en:{textEditor:Ql.textEditor},fr:{textEditor:Jl.textEditor},nl:{textEditor:eo.textEditor}};function ca(T){if(!T||!T.global)return;const te=T.global.availableLocales||[];Object.keys(Do).forEach(M=>{te.includes(M)&&T.global.mergeLocaleMessage(M,Do[M])})}const Ho={en:{table:Ql.table},fr:{table:Jl.table},nl:{table:eo.table}};function ua(T){if(!T||!T.global)return;const te=T.global.availableLocales||[];Object.keys(Ho).forEach(M=>{te.includes(M)&&T.global.mergeLocaleMessage(M,Ho[M])})}const Ro={en:{datepicker:Ql.datepicker},fr:{datepicker:Jl.datepicker},nl:{datepicker:eo.datepicker}};function da(T){if(!T||!T.global)return;const te=T.global.availableLocales||[];Object.keys(Ro).forEach(M=>{te.includes(M)&&T.global.mergeLocaleMessage(M,Ro[M])})}const Fo={en:{filter:Ql.filter},fr:{filter:Jl.filter},nl:{filter:eo.filter}};function ma(T){if(!T||!T.global)return;const te=T.global.availableLocales||[];Object.keys(Fo).forEach(M=>{te.includes(M)&&T.global.mergeLocaleMessage(M,Fo[M])})}const e9={chart:Ao,textEditor:Do,table:Ho,datepicker:Ro,filter:Fo};function t9(T){!T||!T.global||(ia(T),ca(T),ua(T),da(T),ma(T))}const n9={en:{...Ql},fr:{...Jl},nl:{...eo}};Gl.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:n9});exports.DSSChart=tc;exports.DSSChartMessages=Ao;exports.DSSColorPicker=Om;exports.DSSConfetti=g2;exports.DSSDatepicker=Jo;exports.DSSDatepickerMessages=Ro;exports.DSSDnd=f2;exports.DSSFilter=x0;exports.DSSFilterMessages=Fo;exports.DSSLoader=t2;exports.DSSMessages=e9;exports.DSSModal=Qo;exports.DSSPillField=$0;exports.DSSSkeleton=n2;exports.DSSStepBar=F0;exports.DSSTable=xu;exports.DSSTableMessages=Ho;exports.DSSTextEditor=Vm;exports.DSSTextEditorMessages=Do;exports.addDSSChartTranslations=ia;exports.addDSSDatepickerTranslations=da;exports.addDSSFilterTranslations=ma;exports.addDSSTableTranslations=ua;exports.addDSSTextEditorTranslations=ca;exports.addDSSTranslations=t9;
|