@opengis/bi 1.0.20 → 1.0.21

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/bi.js CHANGED
@@ -1,4 +1,4 @@
1
- import { l as f } from "./import-file-DZ6_fy43.js";
1
+ import { l as f } from "./import-file-C8BY90-b.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/dist/bi.umd.cjs CHANGED
@@ -123,7 +123,7 @@ class='ms-0.5 mb-2 px-2 py-1 bg-white border border-gray-200 text-gray-800 round
123
123
  `}),w+="</div>",w}},xAxis:{data:e!=null&&e.length?e:null,type:e?"category":"value",name:((n=(i=this.styleData)==null?void 0:i.x_axis)==null?void 0:n.name)||"",axisLabel:{...R0((a=this.styleData)==null?void 0:a.x_axis),formatter:g=>this.formatDate(g)}},yAxis:{data:t!=null&&t.length?t:null,type:t?"category":"value",name:((s=(o=this.styleData)==null?void 0:o.y_axis)==null?void 0:s.name)||"",axisLabel:R0((l=this.styleData)==null?void 0:l.y_axis)},series:r!=null&&r.length?r:null,...Jf(this.styleData)};await f.setOption(d),f.resize()}catch(h){console.error(h)}},async changeData(r){var e;try{let t=this.dashboard?`/bi-data?dashboard=${this.dashboard}&widget=${this.widget}`:`/bi-data?&widget=${this.widget}`;(e=r==null?void 0:r.granularity)!=null&&e.length&&(t+=`&granularity=${r.granularity}`),r!=null&&r.metrics&&(t+=`&metrics=${r.metrics}`),this.getDataFromURL(t)}catch(t){console.error(t)}},async setFilter(r){const e=`/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}${r||""}`;await this.getDataFromURL(e)},async changeStyle(r,e){this.styleData[r]=e,this.onChangedData()}}},Mr=(r,e)=>{const t=r.__vccOpts||r;for(const[i,n]of e)t[i]=n;return t},Ese={name:"VsBar",mixins:[An],data(){return{chartInstance:null,label:null}},computed:{uniqueID(){return this.widget}},async mounted(){this.getData(),this.onChangedData()},methods:{async onChangedData(){try{if(this.sourceData){await this.$nextTick();const{series:r,xs:e,ys:t}=this.prepareData();r&&(this==null||this.initChart(r,e,t))}}catch(r){console.error(r)}},prepareData(){var r,e,t,i,n,a;try{if(!((r=this.sourceData)!=null&&r.length))return{series:[],xs:[],ys:void 0};const o=Array.from(new Set(this.sourceData.filter(g=>g[this.dimensions[0]]).map(g=>g[this.dimensions[0]])));let s;this.dimensions[0].includes("date")?s=o.map(g=>Yo(g)):s=[...o];let l,h;((e=this.styleData)==null?void 0:e.horizontal)===!0?h=[...s]:l=[...s];const f=this.sourceData.filter(g=>parseFloat(g[this.dimensions[1]])&&g[this.dimensions[0]]).map(g=>parseFloat(g[this.dimensions[1]]));let d;return(t=this.styleData)!=null&&t.stack?d=this.prepareStackData():((i=this.styleData)==null?void 0:i.negative_waterfall)===!0?d=this.prepareNegativeWaterfall():((n=this.styleData)==null?void 0:n.waterfall)===!0?d=this.prepareWaterfallData(f):((a=this.styleData)==null?void 0:a.accumulative)===!0?d=this.prepareAccumulative(f):d=this.dimensions.slice(1).map((m,x)=>({name:m,type:"bar",stack:`a${x}`,data:this.sourceData.filter(w=>parseFloat(w[m])&&m).map(w=>parseFloat(w[m]))})),{series:d,xs:l,ys:h}}catch(o){return console.error(o),{series:[],xs:[],ys:[]}}},prepareWaterfallData(r){let e=r.reduce((a,o)=>a+o,0);const t=[e,...r],i=t.map((a,o)=>{if(o===0)return 0;const s=e-a;return e-=a,s>=0?s:0});return[{type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},data:i,tooltip:{show:!1}},{name:this.title?this.title:this.dimensions[0],type:"bar",stack:"Total",data:t}]},prepareStackData(){return this.dimensions.slice(1).map(t=>({name:t,type:"bar",stack:"a",data:this.sourceData.filter(i=>parseFloat(i[t])&&t).map(i=>parseFloat(i[t]))}))},prepareNegativeWaterfall(){const r=this.sourceData.map(a=>Number.isNaN(a[this.dimensions[1]])?0:Number(a[this.dimensions[1]])),e=this.sourceData.map(a=>Number.isNaN(a[this.dimensions[2]])?0:Number(a[this.dimensions[2]]));let t=0;const i=r.map((a,o)=>{const s=t;return t+=Number.isNaN(a)?0:a,o===0&&(t-=Number.isNaN(e[o])?0:e[o]),t-=Number.isNaN(e[o+1])?0:e[o+1],s>=0?s:0});return[{type:"bar",stack:"a",itemStyle:{borderColor:"transparent",color:"transparent"},data:i,tooltip:{show:!1}},{name:this.dimensions[1],type:"bar",stack:"a",data:r},{name:this.dimensions[2],type:"bar",stack:"a",data:e}]},prepareAccumulative(r){let e=0;const t=r.map(n=>(e+=n,e));return[{name:this.titleCharts,type:"bar",stack:"Total",data:t}]}}},kse=["id"];function Pse(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",{id:a.uniqueID,ref:"chart",class:"h-full w-full min-h-[200px]"},null,8,kse)}const FC=Mr(Ese,[["render",Pse]]),Lse=Object.freeze(Object.defineProperty({__proto__:null,default:FC},Symbol.toStringTag,{value:"Module"})),Rse={name:"VsPie",mixins:[An],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:r}=this.prepareData();r&&this.initChart(r)},methods:{onChangedData(){try{if(this.sourceData){const{series:r,xs:e,ys:t}=this.prepareData();r&&(this==null||this.initChart(r,e,t))}}catch(r){console.error(r)}},buildTooltipForDonut(r,e){const{name:t,value:i,percent:n}=r;return`
124
124
  <div style="background-color:${e[0]};font-size: 12px; font-family: Helvetica, Arial, sans-serif;color:#ffff; padding:5px; border-radius:5px; ![box-shadow:none]">
125
125
  ${t}: ${Ii(i)} (${n}%)
126
- </div>`},prepareData(){var r,e,t;try{const i=Array.from(new Set(this.sourceData.map(f=>f[this.dimensions[0]]))),n=Array.from(new Set(this.sourceData.map(f=>f[this.dimensions[1]]))),a=i.map((f,d)=>({name:f,value:n[d]})),o=((r=this.styleData)==null?void 0:r.innerRadius)||"0%",s=((e=this.styleData)==null?void 0:e.outerRadius)||"100%",l=[o,s];return this.styleData.legend=i3.getLegendOpions(this.styleData.legend),this.styleData.label=i3.getLabelOptions(this.styleData.label),this.styleData.show_legend=((t=this.styleData)==null?void 0:t.show_legend)||!0,{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"pie",radius:l,center:["50%","60%"],height:"60%",...Jf(this.styleData),data:a}]}}catch(i){return console.error(i),null}},async initChart(r){try{const e=document.getElementById(this.uniqueID);this.chartInstance=rv(e);const t={tooltip:{trigger:"item",formatter:i=>this.buildTooltipForDonut(i,[i.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[15,15],shadowColor:"transparent",backgroundColor:"transparent"},series:r,...Jf(this.styleData)};this.chartInstance.setOption(t),this.chartInstance.resize(),window.addEventListener("resize",()=>{this.chartInstance.resize()})}catch(e){console.error(e)}}}},zse=["id"];function Ose(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",{id:n.uniqueID,ref:"chart",class:"h-full min-h-[200px] pt-[15%] flex items-center"},null,8,zse)}const $C=Mr(Rse,[["render",Ose]]),Nse=Object.freeze(Object.defineProperty({__proto__:null,default:$C},Symbol.toStringTag,{value:"Module"})),Bse={name:"VsLine",mixins:[An],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:r,xs:e}=this.prepareData();r&&this.initChart(r,e)},methods:{onChangedData(){try{if(this.sourceData){const{series:r,xs:e,ys:t}=this.prepareData();r&&(this==null||this.initChart(r,e,t))}}catch(r){console.error(r)}},prepareData(){var r,e;try{const t=Array.from(new Set(this.sourceData.map(o=>o[this.dimensions[0]])));let i;this.dimensions[0].includes("date")?i=t.map(o=>Yo(o)):i=[...t];const n=this.sourceData.map(o=>parseFloat(o[this.dimensions[1]]));let a;return(r=this.styleData)!=null&&r.stack?a=this.dimensions.slice(1).map(s=>({name:s,type:"line",stack:"a",areaStyle:this.styleData.area?{}:null,data:this.sourceData.filter(l=>parseFloat(l[s])).map(l=>parseFloat(l[s]))})):a=[{name:this.title,type:"line",areaStyle:(e=this.styleData)!=null&&e.area?{}:null,data:n,stack:"a"}],{series:a,xs:i}}catch(t){return console.error(t),null}}}},Vse=["id"];function Fse(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",{id:n.uniqueID,ref:"chart",style:{height:"400px"}},null,8,Vse)}const GC=Mr(Bse,[["render",Fse]]),$se=Object.freeze(Object.defineProperty({__proto__:null,default:GC},Symbol.toStringTag,{value:"Module"})),Gse={mixins:[An]},Use={class:"mb-2 xl:mb-5 grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-5"},Hse={class:"flex flex-col p-5 bg-white border border-gray-200 shadow-[0_4px_6px_0px_rgba(0,0,0,0.03)] rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},Wse={class:"space-y-4"},Zse={class:"grid grid-cols-2 gap-x-2"};function jse(r,e,t,i,n,a){const o=q.resolveComponent("VsLine");return q.openBlock(),q.createElementBlock("div",Use,[q.createElementVNode("div",Hse,[q.createElementVNode("div",Wse,[q.createElementVNode("div",Zse,[e[0]||(e[0]=q.createElementVNode("div",{class:"text-2xl font-semibold text-gray-800 dark:text-neutral-200"}," 17,482 ",-1)),q.createVNode(o,{api:r.api,dataset:r.dataset,options:r.options,seriesOptions:r.seriesOptions,showLegend:r.showLegend},null,8,["api","dataset","options","seriesOptions","showLegend"])]),e[1]||(e[1]=q.createStaticVNode('<div class="flex items-center gap-x-2"><span class="py-1 px-1.5 inline-flex items-center gap-x-1 text-xs bg-gray-100 text-gray-800 rounded-md dark:bg-neutral-500/20 dark:text-neutral-400"><svg class="flex-shrink-0 size-3" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 7 13.5 15.5 8.5 10.5 2 17"></polyline><polyline points="16 7 22 7 22 13"></polyline></svg> 37.3% </span><p class="text-xs text-gray-500 dark:text-neutral-400">from 12,142</p></div>',1))])])])}const o3=Mr(Gse,[["render",jse]]),qse={name:"VsStat",mixins:[An],data(){return{restDimensions:[],sumValue:0,columns:null,showTooltip:-1}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){this.columns=Object.keys(this.sourceData[0]);const r=this.getValues();this.sumValue=r.reduce((e,t)=>e+t,0),this.sourceData.forEach((e,t)=>{e.color=t<a3.length-1?a3[t]:Dse()})},formattedValue(r){const e=parseFloat(r);return Ii(e)}}},Xse={class:"flex flex-col w-full h-full rounded-xl pb-4 p-4"},Yse={class:"h-full flex w-full flex-col justify-between"},Kse={class:"pb-6 space-y-4 h-full w-full"},Jse={class:"flex gap-x-1 w-full min-h-3 h-3 rounded-full custom-x-scrollbar"},Qse=["onMouseover"],ele={key:0,class:"absolute top-[-1] left-1/2 transform -translate-x-1/2 -translate-y-full bg-black text-white rounded px-2 py-1"},tle={class:"h-[calc(100%-20px)] w-full custom-scrollbar"},rle={class:"py-2 grid grid-cols-2 justify-between items-center gap-x-4"},ile={class:"flex items-center"},nle={class:"text-sm text-gray-800"},ale={class:"text-end"},ole={class:"text-sm text-gray-500"};function sle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",Xse,[q.createElementVNode("div",Yse,[q.createElementVNode("div",Kse,[q.createElementVNode("div",Jse,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(r.sourceData,(o,s)=>(q.openBlock(),q.createElementBlock("div",{class:q.normalizeClass(["flex flex-col min-w-[5px] justify-center min-h-2.5 h-2.5 text-xs text-white text-center whitespace-nowrap",`bg-[${o.color}]`]),style:q.normalizeStyle({width:`${parseFloat(o[n.columns[1]])/n.sumValue*100}%`}),role:"progressbar","aria-valuenow":"42","aria-valuemin":"0","aria-valuemax":"100",onMouseover:l=>n.showTooltip=s,onMouseleave:e[0]||(e[0]=l=>n.showTooltip=-1)},[n.showTooltip>-1?(q.openBlock(),q.createElementBlock("div",ele,q.toDisplayString(r.sourceData[n.showTooltip][n.columns[0]])+" "+q.toDisplayString((parseFloat(r.sourceData[n.showTooltip][n.columns[1]])/n.sumValue*100).toFixed(2))+"% ",1)):q.createCommentVNode("",!0)],46,Qse))),256))]),q.createElementVNode("ul",tle,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(r.sourceData,o=>(q.openBlock(),q.createElementBlock("li",rle,[q.createElementVNode("div",ile,[q.createElementVNode("span",{class:q.normalizeClass(["shrink-0 size-2.5 inline-block rounded-sm me-2.5 min-w-[10px] w-[10px] h-[10px] min-h-[10px]",`bg-[${o.color}]`])},null,2),q.createElementVNode("span",nle,q.toDisplayString(o[n.columns[0]]),1)]),q.createElementVNode("div",ale,[q.createElementVNode("span",ole,q.toDisplayString(a.formattedValue(o[n.columns[1]])),1)])]))),256))])])])])}const UC=Mr(qse,[["render",sle]]),lle=Object.freeze(Object.defineProperty({__proto__:null,default:UC},Symbol.toStringTag,{value:"Module"})),ule={name:"VsProgressBar",mixins:[An],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){var e;this.columns=Object.keys((e=this.sourceData)==null?void 0:e[0])||null;const r=this.getValues();this.maxValue=Math.max(...r)},formattedValue(r){return Ii(r)}}},cle={key:0,class:"flex flex-col h-full p-3 rounded-xl"},hle={class:"h-full pt-0 pb-6 space-y-4"},fle={class:"h-full space-y-4 custom-scrollbar"},dle={class:"flex items-center justify-between gap-x-2"},ple={class:"grid items-center w-full grid-cols-2 gap-x-2"},vle={class:"text-sm text-gray-800"},gle={class:"flex justify-end",role:"progressbar","aria-valuenow":"100","aria-valuemin":"0","aria-valuemax":"100"},mle={class:"min-w-[60px] text-end"},yle={class:"text-sm text-gray-500"};function _le(r,e,t,i,n,a){return n.columns?(q.openBlock(),q.createElementBlock("div",cle,[q.createElementVNode("div",hle,[q.createElementVNode("ul",fle,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(r.sourceData,(o,s)=>(q.openBlock(),q.createElementBlock("li",dle,[q.createElementVNode("div",ple,[q.createElementVNode("span",vle,q.toDisplayString(o[n.columns[0]]),1),q.createElementVNode("div",gle,[q.createElementVNode("div",{class:"h-1.5 flex flex-col justify-center overflow-hidden bg-indigo-500 rounded-full text-xs text-white text-center whitespace-nowrap",style:q.normalizeStyle({width:`${parseFloat(o[n.columns[1]])/n.maxValue*100}%`})},null,4)])]),q.createElementVNode("div",mle,[q.createElementVNode("span",yle,q.toDisplayString(a.formattedValue(o[n.columns[1]])),1)])]))),256))])])])):q.createCommentVNode("",!0)}const HC=Mr(ule,[["render",_le]]),xle=Object.freeze(Object.defineProperty({__proto__:null,default:HC},Symbol.toStringTag,{value:"Module"})),ble={name:"VsListbar",mixins:[An],props:["source"],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch(r){console.error(r)}},prepareData(){var e;this.columns=Object.keys(this.sourceData[0]);const r=this.sourceData.map(t=>{var i;return t[(i=this.columns)==null?void 0:i[1]]});this.maxValue=Math.max(...r),this.restDimensions=(e=this.columns)==null?void 0:e.filter((t,i)=>i!==0)},formattedValue(r){return Ii(r)},getWidth(r){return`${r/this.maxValue*100}%`}}},wle={class:"list-bar h-full p-3"},Sle={class:"space-y-2 custom-scrollbar h-[calc(100%-20px)]"},Tle={class:"relative w-full truncate"},Cle={class:"relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800"},Ale={class:"text-[14px] text-gray-500"};function Dle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",wle,[q.createElementVNode("ul",Sle,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(r.sourceData,(o,s)=>(q.openBlock(),q.createElementBlock("li",{key:s,class:"flex justify-between items-center gap-x-2 w-full"},[q.createElementVNode("div",Tle,[q.createElementVNode("span",Cle,q.toDisplayString(o[n.columns[0]]||"Без категорії"),1),q.createElementVNode("div",{class:q.normalizeClass(["absolute inset-y-0 start-0 h-full rounded",o[n.columns[0]]?"bg-indigo-100":"bg-gray-100"]),style:q.normalizeStyle({width:a.getWidth(o[n.columns[1]])})},null,6)]),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.restDimensions,(l,h)=>(q.openBlock(),q.createElementBlock("div",{key:h,class:"w-20 text-end mr-2"},[q.createElementVNode("span",Ale,q.toDisplayString(a.formattedValue(o[l])),1)]))),128))]))),128))])])}const z0=Mr(ble,[["render",Dle]]),Ile=Object.freeze(Object.defineProperty({__proto__:null,default:z0},Symbol.toStringTag,{value:"Module"})),Mle={},Ele={type:"button",class:"hs-tooltip-toggle flex justify-center items-center gap-x-3 size-8 text-sm text-gray-600 hover:bg-gray-100 rounded-full disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 dark:hover:text-neutral-200 dark:focus:text-neutral-200"};function kle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("button",Ele,[q.renderSlot(r.$slots,"default")])}const Ple=Mr(Mle,[["render",kle]]),Lle={props:["title","options"],emits:["selected"],data(){return{isOpenedDropDown:!1,checked:null}},computed:{showChecked(){return this.checked?this.checked:this.title}},methods:{optionSelected(r){this.checked=r,this.isOpenedDropDown=!1,document.removeEventListener("click",this.handleClickOutside),this.$emit("selected",r)},handleClickOutside(r){this.$refs.biDropdown&&!this.$refs.biDropdown.contains(r.target)&&(this.isOpenedDropDown=!1,document.removeEventListener("click",this.handleClickOutside))},toggleBiDropdown(){this.isOpenedDropDown=!this.isOpenedDropDown,this.isOpenedDropDown?setTimeout(()=>{document.addEventListener("click",this.handleClickOutside)},200):document.removeEventListener("click",this.handleClickOutside)}}},Rle={key:0,ref:"biDropdown","data-hs-select-dropdown":"",class:"absolute mt-2 z-50 w-48 p-1 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-950 opened",role:"listbox",tabindex:"-1","aria-orientation":"vertical",style:{"margin-top":"10px"}},zle={"data-value":"Revenue","data-title-value":"Revenue",tabindex:"0",class:"cursor-pointer selected hs-selected:bg-gray-100 dark:hs-selected:bg-neutral-800 py-1.5 px-2 w-full text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700","data-id":"0"},Ole=["onClick"],Nle={"data-title":""},Ble={key:0,class:""};function Vle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock(q.Fragment,null,[q.createElementVNode("button",{type:"button","aria-expanded":"true",class:"hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative group pr-2 -ms-2 py-1.5 pl-2.5 inline-flex shrink-0 justify-center items-center gap-x-1.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 before:absolute before:inset-0 before:z-[1] dark:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:bg-neutral-700",onClick:e[0]||(e[0]=(...o)=>a.toggleBiDropdown&&a.toggleBiDropdown(...o))},[q.createTextVNode(q.toDisplayString(a.showChecked)+" ",1),e[1]||(e[1]=q.createElementVNode("svg",{class:"shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[q.createElementVNode("path",{d:"m6 9 6 6 6-6"})],-1))]),n.isOpenedDropDown?(q.openBlock(),q.createElementBlock("div",Rle,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(t.options,o=>(q.openBlock(),q.createElementBlock("div",zle,[q.createElementVNode("div",{class:"flex items-center justify-between w-full",onClick:s=>a.optionSelected(o)},[q.createElementVNode("span",Nle,q.toDisplayString(o),1),n.checked===o?(q.openBlock(),q.createElementBlock("span",Ble,e[2]||(e[2]=[q.createElementVNode("svg",{class:"shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[q.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)]))):q.createCommentVNode("",!0)],8,Ole)]))),256))],512)):q.createCommentVNode("",!0)],64)}const Fle=Mr(Lle,[["render",Vle]]),$le={props:{options:{type:Array}},emits:["selected"],data(){return{isOpenedMenu:!1,checked:[]}},emits:["selected"],methods:{optionSelected(r){if(!this.checked.includes(r))this.checked.push(r);else{const e=this.checked.indexOf(r);e>-1&&this.checked.splice(e,1)}this.isOpenedMenu=!1,document.removeEventListener("click",this.handleClickOutside),this.$emit("selected",r)},handleClickOutside(r){this.$refs.biDropdown&&!this.$refs.biDropdown.contains(r.target)&&(this.isOpenedMenu=!1,document.removeEventListener("click",this.handleClickOutside))},toggleMenuDropdown(){this.isOpenedMenu=!this.isOpenedMenu,this.isOpenedMenu?setTimeout(()=>{document.addEventListener("click",this.handleClickOutside)},500):document.removeEventListener("click",this.handleClickOutside)}}},Gle={class:"hs-dropdown [--auto-close:inside] [--placement:bottom-right] relative inline-flex"},Ule={key:0,ref:"biDropdown",class:"absolute pr-2 top-[35px] transition-[opacity,margin] duration z-10 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:shadow-[0_10px_40px_10px_rgba(0,0,0,0.2)] dark:bg-neutral-900",role:"menu","aria-orientation":"vertical","aria-labelledby":"hs-pro-dachmd",style:{}},Hle={class:"p-1"},Wle=["onClick"],Zle={key:0,class:""};function jle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",Gle,[q.createElementVNode("button",{id:"hs-pro-dachmd",type:"button",onClick:e[0]||(e[0]=(...o)=>a.toggleMenuDropdown&&a.toggleMenuDropdown(...o)),class:"h-[34px] w-[34px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700","aria-haspopup":"menu","aria-expanded":"false","aria-label":"Dropdown"},e[1]||(e[1]=[q.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[q.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),q.createElementVNode("circle",{cx:"12",cy:"5",r:"1"}),q.createElementVNode("circle",{cx:"12",cy:"19",r:"1"})],-1)])),n.isOpenedMenu?(q.openBlock(),q.createElementBlock("div",Ule,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(t.options,o=>(q.openBlock(),q.createElementBlock("div",Hle,[q.createElementVNode("button",{type:"button",onClick:s=>a.optionSelected(o),class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-gray-800 hover:bg-gray-100 disabled:opacity-50 focus:outline-none focus:bg-gray-100 disabled:pointer-events-none dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[q.createTextVNode(q.toDisplayString(o)+" ",1),n.checked.includes(o)?(q.openBlock(),q.createElementBlock("span",Zle,e[2]||(e[2]=[q.createElementVNode("svg",{class:"shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[q.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)]))):q.createCommentVNode("",!0)],8,Wle)]))),256))],512)):q.createCommentVNode("",!0)])}const qle=Mr($le,[["render",jle]]),Xle={"bi-bar":q.defineAsyncComponent(()=>Promise.resolve().then(()=>Lse)),"bi-number":q.defineAsyncComponent(()=>Promise.resolve().then(()=>cce)),"bi-text":q.defineAsyncComponent(()=>Promise.resolve().then(()=>jce)),"bi-listbar":q.defineAsyncComponent(()=>Promise.resolve().then(()=>Ile)),"bi-pie":q.defineAsyncComponent(()=>Promise.resolve().then(()=>Nse)),"bi-line":q.defineAsyncComponent(()=>Promise.resolve().then(()=>$se)),"bi-stat":q.defineAsyncComponent(()=>Promise.resolve().then(()=>lle)),"bi-pivot":q.defineAsyncComponent(()=>Promise.resolve().then(()=>oce)),"bi-progress":q.defineAsyncComponent(()=>Promise.resolve().then(()=>xle)),"bi-funnel":q.defineAsyncComponent(()=>Promise.resolve().then(()=>Kce)),"bi-heatmap":q.defineAsyncComponent(()=>Promise.resolve().then(()=>the)),"bi-calendar":q.defineAsyncComponent(()=>Promise.resolve().then(()=>ahe)),"bi-map":q.defineAsyncComponent(()=>Promise.resolve().then(()=>ffe)),"bi-cluster":q.defineAsyncComponent(()=>Promise.resolve().then(()=>yfe))},Yle={class:"flex items-center space-x-2"},Kle=q.defineComponent({__name:"vs-bi-switch",props:q.mergeModels({leftLabel:{},rightLabel:{},modelValue:{type:Boolean}},{modelValue:{default:()=>!1,type:Boolean},modelModifiers:{}}),emits:q.mergeModels(["update:is-enabled"],["update:modelValue"]),setup(r,{emit:e}){const t=e,i=q.useModel(r,"modelValue"),n=()=>{t("update:is-enabled",i)};return(a,o)=>(q.openBlock(),q.createElementBlock("div",Yle,[a.leftLabel?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.normalizeClass(["transition-colors",{"text-blue-500":!i.value}])},q.toDisplayString(a.leftLabel),3)):q.createCommentVNode("",!0),q.withDirectives(q.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=s=>i.value=s),type:"checkbox",class:"relative w-11 h-6 p-px bg-gray-100 border-transparent text-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:ring-blue-600 disabled:opacity-50 disabled:pointer-events-none checked:bg-none checked:text-blue-600 checked:border-blue-600 focus:checked:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-600 before:inline-block before:size-5 before:bg-white checked:before:bg-blue-200 before:translate-x-0 checked:before:translate-x-full before:rounded-full before:shadow before:h-5 before:w-5 before:transform before:ring-0 before:transition before:ease-in-out before:duration-200 dark:before:bg-neutral-400 dark:checked:before:bg-blue-200",onChange:n},null,544),[[q.vModelCheckbox,i.value]]),a.rightLabel?(q.openBlock(),q.createElementBlock("div",{key:1,class:q.normalizeClass(["transition-colors",{"text-blue-500":i.value}])},q.toDisplayString(a.rightLabel),3)):q.createCommentVNode("",!0)]))}}),Jle={},Qle={class:"flex items-center justify-center h-full"};function eue(r,e){return q.openBlock(),q.createElementBlock("div",Qle,e[0]||(e[0]=[q.createElementVNode("div",{class:"text-center text-gray-500"},[q.createElementVNode("h2",{class:"text-2xl font-bold"},"No data available")],-1)]))}const tue={components:{VsSmallButton:Ple,VsBiDropdown:Fle,VsMenuDropdown:qle,VsBiSwitch:Kle,VsNoDataChart:Mr(Jle,[["render",eue]]),...Xle},props:{title:{type:String},dashboard:{type:String},chartType:{type:String},widget:{type:String},changedData:{type:Object},refreshFlag:{type:String},filterURl:{type:String}},data(){return{checked:[],controls:[],selected:[]}},computed:{optionsName(){return this.controls.filter(r=>typeof r.options=="boolean").map(r=>r.name)}},watch:{changedData:{async handler(r){var e;r.widget==this.widget&&((e=this.$refs.chart)==null||e.changeData(r))},deep:!0},refreshFlag(r){var t;if(r!=this.widget)return;const e=`/bi-data?dashboard=${this.dashboard}&widget=${r}`;(t=this.$refs.chart)==null||t.getDataFromURL(e)},filterURl(r){var e;this.controls=!0,(e=this.$refs.chart)==null||e.setFilter(r)}},methods:{handleClick(){this.$emit("clicked",this.widget)},changeStyleHandler(r,e){var t;(t=this.$refs.chart)==null||t.changeStyle(r,e)},selectHandler(r){if(!this.checked.includes(r))this.checked.push(r);else{const e=this.checked.indexOf(r);if(e>-1){this.checked.splice(e,1);const t=this.selected.filter(i=>i.name!=r);this.selected=[],this.selected=[...t]}}},selectedOptionHandler(r,e){let t=!0;this.selected.forEach(i=>{i.name===e&&(i.option=r,t=!1)}),t&&this.selected.push({name:e,option:r}),this.makeUpUrl()},makeUpUrl(){var e;let r=`/bi-data?dashboard=${this.dashboard}&widget=${this.widget}`;this.selected.forEach((t,i)=>{r+=`&${t.name}=${t.option}`}),(e=this.$refs.chart)==null||e.getDataFromURL(r)}}},rue={class:"text-[16px] mb-[4px] flex max-w-full items-center min-h-0 flex justify-between max-h-[50px] h-fit shrink-0"},iue={class:"flex items-center justify-between w-full"},nue={class:"grid"},aue={class:"text-gray-800 max-h-[30px] inline-block font-semibold font-[24px] overflow-hidden"},oue={class:"flex flex-col justify-end"},sue={class:"flex items-center justify-end w-full gap-2"},lue={class:"w-full h-full"};function uue(r,e,t,i,n,a){const o=q.resolveComponent("VsBiDropdown"),s=q.resolveComponent("VsBiSwitch"),l=q.resolveComponent("VsNoDataChart");return q.openBlock(),q.createElementBlock("div",{class:"box-border relative p-4 bg-white border border-gray-200 select-auto rounded-xl",onClick:e[1]||(e[1]=h=>a.handleClick())},[q.createElementVNode("div",rue,[q.createElementVNode("div",iue,[q.createElementVNode("div",nue,[q.createElementVNode("span",aue,q.toDisplayString(t.title),1)]),q.createElementVNode("div",oue,[q.createElementVNode("span",sue,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.controls,h=>(q.openBlock(),q.createElementBlock("div",null,[Array.isArray(h.options)?(q.openBlock(),q.createBlock(o,{key:0,title:h==null?void 0:h.name,options:h==null?void 0:h.options,onSelected:f=>a.selectedOptionHandler(f,h.name)},null,8,["title","options","onSelected"])):typeof h.options=="boolean"?(q.openBlock(),q.createBlock(s,{key:1,"left-label":h.name,"is-enabled":h.options,"onUpdate:isEnabled":f=>a.changeStyleHandler(h.name,f)},null,8,["left-label","is-enabled","onUpdate:isEnabled"])):q.createCommentVNode("",!0)]))),256))])])])]),q.createElementVNode("div",lue,[n.controls!==!1?(q.openBlock(),q.createBlock(q.resolveDynamicComponent("bi-"+t.chartType),{key:0,ref:"chart",dashboard:t.dashboard,widget:t.widget,"onUpdate:controls":e[0]||(e[0]=h=>n.controls=h)},null,40,["dashboard","widget"])):(q.openBlock(),q.createBlock(l,{key:1,class:"w-full h-full"}))])])}const s3=Mr(tue,[["render",uue]]),cue={},hue={class:"shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function fue(r,e){return q.openBlock(),q.createElementBlock("svg",hue,e[0]||(e[0]=[q.createElementVNode("path",{d:"M18 6 6 18"},null,-1),q.createElementVNode("path",{d:"m6 6 12 12"},null,-1)]))}const l3=Mr(cue,[["render",fue]]),due={},pue={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function vue(r,e){return q.openBlock(),q.createElementBlock("svg",pue,e[0]||(e[0]=[q.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const gue=Mr(due,[["render",vue]]),mue={props:{visible:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},size:{type:String,default:()=>""}},emits:["update:visible","onClose"],name:"vs-dialog",mounted(){window.addEventListener("keydown",this.checkKey)},unmounted(){window.removeEventListener("keydown",this.checkKey)},computed:{hasSlot(){var r;return!!((r=this.$slots)!=null&&r.footer)},checkSize(){return this.size==="small"?"w-5/12":this.size==="medium"?"w-6/12":"lg:w-7/12 w-11/12"}},methods:{checkKey({key:r}){r==="Escape"&&this.handleClose()},handleClose(){this.$emit("update:visible",!1),this.$emit("onClose")}}},yue={class:"vsTailwind ui-dialog__wrapper"},_ue={class:"w-full h-full fixed top-0 start-0 bg-black bg-opacity-50"},xue={class:"ui-dialog__content p-4"},bue={key:0,class:"flex justify-end gap-x-2"};function wue(r,e,t,i,n,a){return q.openBlock(),q.createBlock(q.Teleport,{to:"#modal"},[q.createVNode(q.Transition,{name:"fade"},{default:q.withCtx(()=>[q.withDirectives(q.createElementVNode("div",yue,[q.createElementVNode("div",_ue,[q.createVNode(q.Transition,{name:"content",appear:""},{default:q.withCtx(()=>[q.createElementVNode("div",{class:q.normalizeClass(["ui-dialog__modal opacity-1 transition-all flex flex-col bg-white pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",[a.checkSize]])},[q.createElementVNode("div",xue,[q.renderSlot(r.$slots,"default",{},void 0,!0)]),a.hasSlot?(q.openBlock(),q.createElementBlock("div",bue,[q.renderSlot(r.$slots,"footer",{},void 0,!0)])):q.createCommentVNode("",!0)],2)]),_:3})])],512),[[q.vShow,t.visible]])]),_:3})])}const Sue=Mr(mue,[["render",wue],["__scopeId","data-v-e51369e3"]]),Tue={},Cue={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-refresh"};function Aue(r,e){return q.openBlock(),q.createElementBlock("svg",Cue,e[0]||(e[0]=[q.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),q.createElementVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null,-1),q.createElementVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null,-1)]))}const Due={components:{VsHeaderDialog:Sue,filterIcon:gue,closeIcon:l3,refreshIcon:Mr(Tue,[["render",Aue]])},props:["filterScheme"],emits:["filters:changed"],data(){return{rows:[],isFilterVisible:!1,rowList:[],activeFilters:"",filters:null}},computed:{activeFiltersCount(){var r;return this.filters?((r=this.filters)==null?void 0:r.url.split("=").length)-1:0}},methods:{toggleFilterShown(){this.isFilterVisible=!this.isFilterVisible},handleFilterChange(r){this.filters=r},updateTable(){var r,e;this.activeFilters=(e=(r=this.$refs)==null?void 0:r.filter)==null?void 0:e.activeFilters,this.isFilterVisible=!1,this.$emit("filters:changed",this.filters)},resetFilters(){this.$refs.filter&&this.$refs.filter.clearAll(),this.isFilterVisible=!1,this.$emit("filters:changed",""),this.activeFilters=null},getLabelById(r){const e=this.filterScheme.find(t=>t.id===r);return e?e.label:r},getOptionsLabelById(r,e){if(Array.isArray(e)){const t=this.filterScheme.find(i=>i.id===r);return t!=null&&t.options?t==null?void 0:t.options.filter(i=>e.includes(i.id)).map(i=>i.text).join(", "):e==null?void 0:e.length}else return e},async clearFilter(r){var e,t,i,n;await((t=(e=this.$refs)==null?void 0:e.filter)==null?void 0:t.clearFilter(r)),this.filters.url=(n=(i=this.$refs)==null?void 0:i.filter)==null?void 0:n.filterUrl,await this.updateTable()}}},Iue={key:0,class:"font-medium text-[10px] min-w-[16px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full"},Mue={class:"flex flex-wrap items-center justify-end flex-1 gap-2 p-4"};function Eue(r,e,t,i,n,a){const o=q.resolveComponent("filterIcon"),s=q.resolveComponent("refreshIcon"),l=q.resolveComponent("VsFilter"),h=q.resolveComponent("VsHeaderDialog");return q.openBlock(),q.createElementBlock(q.Fragment,null,[q.createElementVNode("div",null,[q.createElementVNode("button",{type:"button",class:"py-2 px-2.5 ml-3 max-h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:e[0]||(e[0]=(...f)=>a.toggleFilterShown&&a.toggleFilterShown(...f))},[q.createVNode(o),e[7]||(e[7]=q.createTextVNode(" Фільтри ")),a.activeFiltersCount>=1?(q.openBlock(),q.createElementBlock("span",Iue,q.toDisplayString(a.activeFiltersCount),1)):q.createCommentVNode("",!0)]),a.activeFiltersCount>=1?(q.openBlock(),q.createElementBlock("button",{key:0,type:"button",class:"py-2 px-1.5 ml-3 max-h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:e[1]||(e[1]=(...f)=>a.resetFilters&&a.resetFilters(...f))},[q.createVNode(s)])):q.createCommentVNode("",!0)]),q.createVNode(h,{visible:n.isFilterVisible,"onUpdate:visible":e[5]||(e[5]=f=>n.isFilterVisible=f),title:"Фільтри",size:"small",onOnClose:e[6]||(e[6]=()=>{n.isFilterVisible=!1})},{footer:q.withCtx(()=>[q.createElementVNode("div",Mue,[q.createElementVNode("button",{onClick:e[3]||(e[3]=(...f)=>a.resetFilters&&a.resetFilters(...f)),class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"}," Очистити все "),q.createElementVNode("button",{onClick:e[4]||(e[4]=(...f)=>a.updateTable&&a.updateTable(...f)),class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-600 border border-blue-600 rounded-lg shadow-sm gap-x-2 text-start hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500"}," Застосувати ")])]),default:q.withCtx(()=>[t.filterScheme?(q.openBlock(),q.createBlock(l,{key:0,ref:"filter",scheme:t.filterScheme,closeFilterBtn:!0,onFilterClose:e[2]||(e[2]=f=>n.isFilterVisible=!1),name:"filter",layout:"default",onFilterChange:a.handleFilterChange},null,8,["scheme","onFilterChange"])):q.createCommentVNode("",!0)]),_:1},8,["visible"])],64)}const kue={props:["name","description","filters"],components:{VsFilterHeader:Mr(Due,[["render",Eue]])}},Pue={class:"bg-white px-5 flex gap-4 h-[90px] border border-gray-300 mt-2 rounded-lg mb-2 pt-[3px] justify-between items-center"},Lue={class:"flex flex-col"},Rue={class:"text-xl"},zue={class:"text-sm"};function Oue(r,e,t,i,n,a){const o=q.resolveComponent("VsFilterHeader");return q.openBlock(),q.createElementBlock("div",Pue,[q.createElementVNode("div",Lue,[q.createElementVNode("span",Rue,q.toDisplayString(t.name),1),q.createElementVNode("span",zue,q.toDisplayString(t.description),1)]),q.createVNode(o,{filterScheme:t.filters,"onFilters:changed":e[0]||(e[0]=s=>r.$emit("filters:changed",s))},null,8,["filterScheme"])])}const Nue=Mr(kue,[["render",Oue]]),Bue={},Vue={class:"w-full flex justify-center"};function Fue(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",Vue,e[0]||(e[0]=[q.createStaticVNode('<div class="text-center p-4 bg-white rounded-lg shadow-md"><svg xmlns="http://www.w3.org/2000/svg" class="h-16 w-16 text-gray-400" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path><path d="M9 12l2 2l4 -4"></path></svg><h3 class="text-2xl font-medium text-gray-900"> No data available at this time </h3><p class="mt-2 text-gray-500">Information will be available soon</p></div>',1)]))}const $ue={components:{VsWidget:s3,VsNoData:Mr(Bue,[["render",Fue]]),VsHeader:Nue},mixins:[An],props:["id","editable","changedData","refreshFlag","prefix","isReload"],data(){return{widgets:[],panels:[],error:!1,selectedPanel:"",dashboardTitle:null,dashboardDescritpion:null,filterURl:null,dashboardData:null}},watch:{id(){var r,e;this.selectedPanel=((e=(r=this.$route)==null?void 0:r.params)==null?void 0:e.widget)||""},isReload(){this.fetchData()}},async mounted(){var r,e;this.selectedPanel=((e=(r=this.$route)==null?void 0:r.params)==null?void 0:e.widget)||"",wi.defaults.baseURL=this.prefix||"/api",await this.fetchData()},methods:{async fetchData(){if(this.id)try{const{data:r}=await wi.get(`/bi-dashboard/${this.id}`);this.dashboardData=r}catch(r){console.error(r)}},columnClass(r){const e=(r==null?void 0:r.col)||12;return{1:"md:w-1/12 sm:w-full",2:"md:w-1/6 sm:w-full",3:"md:w-1/4 sm:w-full",4:"md:w-1/3 sm:w-full",6:"md:w-1/2 sm:w-full",8:"md:w-2/3 sm:w-full",10:"md:w-5/6 sm:w-full",12:"w-full"}[e]||"w-full"},getTypeByName(r){const e=this.dashboardData.widgets.find(t=>t.name===r);return(e==null?void 0:e.type)||"text"},getTitleByName(r){var t;const e=this.dashboardData.widgets.find(i=>i.name===r);return((t=e==null?void 0:e.data)==null?void 0:t.title)||(e==null?void 0:e.title)},handleClick(r){this.editable&&(this.selectedPanel=(r==null?void 0:r.name)||r,this.fillWidgetWithData((r==null?void 0:r.name)||r))},fillWidgetWithData(r){const e=this.dashboardData.widgets.find(t=>t.name===r);if(e){const t={...e,name:r};this.$emit("clicked",t)}},findInputParamByame(r,e){const t=this.dashboardData.widgets.find(i=>i.name===e);return(t==null?void 0:t[r])||""},async filterHandler(r){var t;this.filterURl="";let e="&filter=";(t=r==null?void 0:r.url)!=null&&t.length&&(r.url.split("|").forEach(n=>{const a=n.split("=");e+=`${a[0]}=${a[1]}`}),this.filterURl+=e)}}},Gue={class:"w-full pb-8 overflow-y-auto"},Uue={class:"flex flex-wrap"};function Hue(r,e,t,i,n,a){var h,f,d;const o=q.resolveComponent("VsHeader"),s=q.resolveComponent("VsNoData"),l=q.resolveComponent("VsWidget");return q.openBlock(),q.createElementBlock("div",Gue,[(h=n.dashboardData)!=null&&h.filters?(q.openBlock(),q.createBlock(o,{key:0,filters:(f=n.dashboardData)==null?void 0:f.filters,name:n.dashboardTitle,description:n.dashboardDescritpion,"onFilters:changed":e[0]||(e[0]=g=>a.filterHandler(g))},null,8,["filters","name","description"])):q.createCommentVNode("",!0),q.createElementVNode("div",Uue,[n.error||!n.dashboardData?(q.openBlock(),q.createBlock(s,{key:0,class:"col-span-12"})):(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:1},q.renderList(((d=n.dashboardData)==null?void 0:d.panels)||[],(g,m)=>{var x;return q.openBlock(),q.createElementBlock("div",{key:m,class:q.normalizeClass([[a.columnClass(g)],"h-[460px] px-[7.5px] mb-[15px] flex flex-col"])},[(x=g.widgets)!=null&&x.length?(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:0},q.renderList(g.widgets,w=>(q.openBlock(),q.createBlock(l,{key:w,class:q.normalizeClass(["mb-[15px]",{"border border-blue-500":n.selectedPanel===w}]),title:a.getTitleByName(w),"chart-type":a.getTypeByName(w),dashboard:t.id,widget:w,"refresh-flag":t.refreshFlag,"changed-data":t.changedData,"filter-u-rl":n.filterURl,onClicked:T=>a.handleClick(w),onSelected:T=>r.selectedHandler(T,w)},null,8,["title","class","chart-type","dashboard","widget","refresh-flag","changed-data","filter-u-rl","onClicked","onSelected"]))),128)):(q.openBlock(),q.createBlock(l,{key:1,class:q.normalizeClass(["h-[460px] flex flex-col",{"border border-blue-500":n.selectedPanel===g.widget}]),title:a.getTitleByName(g.widget),"chart-type":a.getTypeByName(g.widget),dashboard:t.id,widget:g.widget,"refresh-flag":t.refreshFlag,"changed-data":t.changedData,"filter-u-rl":n.filterURl,onClicked:w=>a.handleClick(g.widget)},null,8,["title","class","chart-type","dashboard","widget","refresh-flag","changed-data","filter-u-rl","onClicked"]))],2)}),128))])])}const u3=Mr($ue,[["render",Hue]]),Wue={name:"VsPivotTable",mixins:[An],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const r=Array.from(new Set(this.sourceData.map(e=>e[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=r.map(e=>Yo(e)):this.xs=[...r],this.products=this.dimensions.filter((e,t)=>t!=0),this.values=this.products.map((e,t)=>({name:e,data:this.sourceData.filter(i=>parseFloat(i[e])).map(i=>Ii(parseFloat(i[e])))}))}catch(r){console.error(r)}}}},Zue={class:"p-5 h-full space-y-4 flex flex-col rounded-xl custom-scrollbar"},jue={class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300"},que={class:"min-w-full inline-block align-middle"},Xue={class:"min-w-full divide-y divide-gray-200"},Yue={class:"space-x-2"},Kue={scope:"col",class:"xl:min-w-[120px] min-w-48"},Jue={class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"},Que={class:"divide-y divide-gray-200"},ece={class:"size-px whitespace-nowrap py-3"},tce={class:"flex items-center gap-x-3"},rce={class:"text-sm font-medium text-gray-800"},ice={class:"size-px whitespace-nowrap py-3"},nce={class:"text-sm text-gray-600"};function ace(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",Zue,[q.createElementVNode("div",jue,[q.createElementVNode("div",que,[q.createElementVNode("table",Xue,[q.createElementVNode("thead",null,[q.createElementVNode("tr",Yue,[e[0]||(e[0]=q.createElementVNode("th",{scope:"col",class:"min-w-[200px]"},[q.createElementVNode("div",{class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"})],-1)),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.xs,o=>(q.openBlock(),q.createElementBlock("th",Kue,[q.createElementVNode("div",Jue,q.toDisplayString(o),1)]))),256))])]),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.values,o=>(q.openBlock(),q.createElementBlock("tbody",Que,[q.createElementVNode("tr",null,[q.createElementVNode("td",ece,[q.createElementVNode("div",tce,[q.createElementVNode("span",rce,q.toDisplayString(o.name),1)])]),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.xs,(s,l)=>(q.openBlock(),q.createElementBlock("td",ice,[q.createElementVNode("span",nce,q.toDisplayString(o.data[l]),1)]))),256))])]))),256))])])])])}const WC=Mr(Wue,[["render",ace]]),oce=Object.freeze(Object.defineProperty({__proto__:null,default:WC},Symbol.toStringTag,{value:"Module"})),c3={install:r=>{r.component("VsBar",FC),r.component("VsLine",GC),r.component("VsPie",$C),r.component("VsKpi",o3),r.component("VsStat",UC),r.component("VsDashboard",u3),r.component("VsWidget",s3),r.component("VsProgressBar",HC),r.component("VsListBar",z0),r.component("VsPivotTable",WC)},components:{VsBar:FC,VsLine:GC,VsPie:$C,VsKpi:o3,VsStat:UC,VsDashboard:u3,VsProgressBar:HC,VsListBar:z0,VsPivotTable:WC}};typeof window<"u"&&(window.v3bi=c3);const sce={name:"VsNumber",mixins:[An],data(){return{number:""}},computed:{formattedNumber(){return m6(this.number)},prefix(){var r,e;return(r=this.styleData)!=null&&r.prefix?(e=this.styleData)==null?void 0:e.prefix:""}},watch:{sourceData:{async handler(){this.getNumber()},deep:!0}},async mounted(){await this.getData(),this.getNumber()},methods:{onChangedData(){try{this.sourceData&&this.getNumber()}catch(r){console.error(r)}},async getNumber(){var r,e;try{this.number=((e=this.sourceData[0])==null?void 0:e[Object.keys((r=this.sourceData)==null?void 0:r[0])])||0}catch(t){console.error(t)}}}},lce={class:"font-[Inter,_Helvetica,_Arial] p-4 w-full text-[28px] pt-[10px] min-h-[150px] border-0"};function uce(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",lce,q.toDisplayString(a.prefix)+q.toDisplayString(a.formattedNumber),1)}const cce=Object.freeze(Object.defineProperty({__proto__:null,default:Mr(sce,[["render",uce]])},Symbol.toStringTag,{value:"Module"}));function ZC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ih=ZC();function h3(r){ih=r}const f3=/[&<>"']/,hce=new RegExp(f3.source,"g"),d3=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,fce=new RegExp(d3.source,"g"),dce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p3=r=>dce[r];function ka(r,e){if(e){if(f3.test(r))return r.replace(hce,p3)}else if(d3.test(r))return r.replace(fce,p3);return r}const pce=/(^|[^\[])\^/g;function ti(r,e){let t=typeof r=="string"?r:r.source;e=e||"";const i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(pce,"$1"),t=t.replace(n,o),i},getRegex:()=>new RegExp(t,e)};return i}function v3(r){try{r=encodeURI(r).replace(/%25/g,"%")}catch{return null}return r}const Xv={exec:()=>null};function g3(r,e){const t=r.replace(/\|/g,(a,o,s)=>{let l=!1,h=o;for(;--h>=0&&s[h]==="\\";)l=!l;return l?"|":" |"}),i=t.split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function Yv(r,e,t){const i=r.length;if(i===0)return"";let n=0;for(;n<i;){const a=r.charAt(i-n-1);if(a===e&&!t)n++;else if(a!==e&&t)n++;else break}return r.slice(0,i-n)}function vce(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<r.length;i++)if(r[i]==="\\")i++;else if(r[i]===e[0])t++;else if(r[i]===e[1]&&(t--,t<0))return i;return-1}function m3(r,e,t,i){const n=e.href,a=e.title?ka(e.title):null,o=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){i.state.inLink=!0;const s={type:"link",raw:t,href:n,title:a,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,s}return{type:"image",raw:t,href:n,title:a,text:ka(o)}}function gce(r,e){const t=r.match(/^(\s+)(?:```)/);if(t===null)return e;const i=t[1];return e.split(`
126
+ </div>`},prepareData(){var r,e,t;try{const i=Array.from(new Set(this.sourceData.map(f=>f[this.dimensions[0]]))),n=Array.from(new Set(this.sourceData.map(f=>f[this.dimensions[1]]))),a=i.map((f,d)=>({name:f,value:n[d]})),o=((r=this.styleData)==null?void 0:r.innerRadius)||"0%",s=((e=this.styleData)==null?void 0:e.outerRadius)||"100%",l=[o,s];return this.styleData.legend=i3.getLegendOpions(this.styleData.legend),this.styleData.label=i3.getLabelOptions(this.styleData.label),this.styleData.show_legend=((t=this.styleData)==null?void 0:t.show_legend)||!0,{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"pie",radius:l,center:["50%","60%"],height:"60%",...Jf(this.styleData),data:a}]}}catch(i){return console.error(i),null}},async initChart(r){try{const e=document.getElementById(this.uniqueID);this.chartInstance=rv(e);const t={tooltip:{trigger:"item",formatter:i=>this.buildTooltipForDonut(i,[i.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[15,15],shadowColor:"transparent",backgroundColor:"transparent"},series:r,...Jf(this.styleData)};this.chartInstance.setOption(t),this.chartInstance.resize(),window.addEventListener("resize",()=>{this.chartInstance.resize()})}catch(e){console.error(e)}}}},zse=["id"];function Ose(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",{id:n.uniqueID,ref:"chart",class:"h-full min-h-[200px] pt-[15%] flex items-center"},null,8,zse)}const $C=Mr(Rse,[["render",Ose]]),Nse=Object.freeze(Object.defineProperty({__proto__:null,default:$C},Symbol.toStringTag,{value:"Module"})),Bse={name:"VsLine",mixins:[An],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:r,xs:e}=this.prepareData();r&&this.initChart(r,e)},methods:{onChangedData(){try{if(this.sourceData){const{series:r,xs:e,ys:t}=this.prepareData();r&&(this==null||this.initChart(r,e,t))}}catch(r){console.error(r)}},prepareData(){var r,e;try{const t=Array.from(new Set(this.sourceData.map(o=>o[this.dimensions[0]])));let i;this.dimensions[0].includes("date")?i=t.map(o=>Yo(o)):i=[...t];const n=this.sourceData.map(o=>parseFloat(o[this.dimensions[1]]));let a;return(r=this.styleData)!=null&&r.stack?a=this.dimensions.slice(1).map(s=>({name:s,type:"line",stack:"a",areaStyle:this.styleData.area?{}:null,data:this.sourceData.filter(l=>parseFloat(l[s])).map(l=>parseFloat(l[s]))})):a=[{name:this.title,type:"line",areaStyle:(e=this.styleData)!=null&&e.area?{}:null,data:n,stack:"a"}],{series:a,xs:i}}catch(t){return console.error(t),null}}}},Vse=["id"];function Fse(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",{id:n.uniqueID,ref:"chart",style:{height:"400px"}},null,8,Vse)}const GC=Mr(Bse,[["render",Fse]]),$se=Object.freeze(Object.defineProperty({__proto__:null,default:GC},Symbol.toStringTag,{value:"Module"})),Gse={mixins:[An]},Use={class:"mb-2 xl:mb-5 grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-5"},Hse={class:"flex flex-col p-5 bg-white border border-gray-200 shadow-[0_4px_6px_0px_rgba(0,0,0,0.03)] rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},Wse={class:"space-y-4"},Zse={class:"grid grid-cols-2 gap-x-2"};function jse(r,e,t,i,n,a){const o=q.resolveComponent("VsLine");return q.openBlock(),q.createElementBlock("div",Use,[q.createElementVNode("div",Hse,[q.createElementVNode("div",Wse,[q.createElementVNode("div",Zse,[e[0]||(e[0]=q.createElementVNode("div",{class:"text-2xl font-semibold text-gray-800 dark:text-neutral-200"}," 17,482 ",-1)),q.createVNode(o,{api:r.api,dataset:r.dataset,options:r.options,seriesOptions:r.seriesOptions,showLegend:r.showLegend},null,8,["api","dataset","options","seriesOptions","showLegend"])]),e[1]||(e[1]=q.createStaticVNode('<div class="flex items-center gap-x-2"><span class="py-1 px-1.5 inline-flex items-center gap-x-1 text-xs bg-gray-100 text-gray-800 rounded-md dark:bg-neutral-500/20 dark:text-neutral-400"><svg class="flex-shrink-0 size-3" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 7 13.5 15.5 8.5 10.5 2 17"></polyline><polyline points="16 7 22 7 22 13"></polyline></svg> 37.3% </span><p class="text-xs text-gray-500 dark:text-neutral-400">from 12,142</p></div>',1))])])])}const o3=Mr(Gse,[["render",jse]]),qse={name:"VsStat",mixins:[An],data(){return{restDimensions:[],sumValue:0,columns:null,showTooltip:-1}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){this.columns=Object.keys(this.sourceData[0]);const r=this.getValues();this.sumValue=r.reduce((e,t)=>e+t,0),this.sourceData.forEach((e,t)=>{e.color=t<a3.length-1?a3[t]:Dse()})},formattedValue(r){const e=parseFloat(r);return Ii(e)}}},Xse={class:"flex flex-col w-full h-full rounded-xl pb-4 p-4"},Yse={class:"h-full flex w-full flex-col justify-between"},Kse={class:"pb-6 space-y-4 h-full w-full"},Jse={class:"flex gap-x-1 w-full min-h-3 h-3 rounded-full custom-x-scrollbar"},Qse=["onMouseover"],ele={key:0,class:"absolute top-[-1] left-1/2 transform -translate-x-1/2 -translate-y-full bg-black text-white rounded px-2 py-1"},tle={class:"h-[calc(100%-20px)] w-full custom-scrollbar"},rle={class:"py-2 grid grid-cols-2 justify-between items-center gap-x-4"},ile={class:"flex items-center"},nle={class:"text-sm text-gray-800"},ale={class:"text-end"},ole={class:"text-sm text-gray-500"};function sle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",Xse,[q.createElementVNode("div",Yse,[q.createElementVNode("div",Kse,[q.createElementVNode("div",Jse,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(r.sourceData,(o,s)=>(q.openBlock(),q.createElementBlock("div",{class:q.normalizeClass(["flex flex-col min-w-[5px] justify-center min-h-2.5 h-2.5 text-xs text-white text-center whitespace-nowrap",`bg-[${o.color}]`]),style:q.normalizeStyle({width:`${parseFloat(o[n.columns[1]])/n.sumValue*100}%`}),role:"progressbar","aria-valuenow":"42","aria-valuemin":"0","aria-valuemax":"100",onMouseover:l=>n.showTooltip=s,onMouseleave:e[0]||(e[0]=l=>n.showTooltip=-1)},[n.showTooltip>-1?(q.openBlock(),q.createElementBlock("div",ele,q.toDisplayString(r.sourceData[n.showTooltip][n.columns[0]])+" "+q.toDisplayString((parseFloat(r.sourceData[n.showTooltip][n.columns[1]])/n.sumValue*100).toFixed(2))+"% ",1)):q.createCommentVNode("",!0)],46,Qse))),256))]),q.createElementVNode("ul",tle,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(r.sourceData,o=>(q.openBlock(),q.createElementBlock("li",rle,[q.createElementVNode("div",ile,[q.createElementVNode("span",{class:q.normalizeClass(["shrink-0 size-2.5 inline-block rounded-sm me-2.5 min-w-[10px] w-[10px] h-[10px] min-h-[10px]",`bg-[${o.color}]`])},null,2),q.createElementVNode("span",nle,q.toDisplayString(o[n.columns[0]]),1)]),q.createElementVNode("div",ale,[q.createElementVNode("span",ole,q.toDisplayString(a.formattedValue(o[n.columns[1]])),1)])]))),256))])])])])}const UC=Mr(qse,[["render",sle]]),lle=Object.freeze(Object.defineProperty({__proto__:null,default:UC},Symbol.toStringTag,{value:"Module"})),ule={name:"VsProgressBar",mixins:[An],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){var e;this.columns=Object.keys((e=this.sourceData)==null?void 0:e[0])||null;const r=this.getValues();this.maxValue=Math.max(...r)},formattedValue(r){return Ii(r)}}},cle={key:0,class:"flex flex-col h-full p-3 rounded-xl"},hle={class:"h-full pt-0 pb-6 space-y-4"},fle={class:"h-full space-y-4 custom-scrollbar"},dle={class:"flex items-center justify-between gap-x-2"},ple={class:"grid items-center w-full grid-cols-2 gap-x-2"},vle={class:"text-sm text-gray-800"},gle={class:"flex justify-end",role:"progressbar","aria-valuenow":"100","aria-valuemin":"0","aria-valuemax":"100"},mle={class:"min-w-[60px] text-end"},yle={class:"text-sm text-gray-500"};function _le(r,e,t,i,n,a){return n.columns?(q.openBlock(),q.createElementBlock("div",cle,[q.createElementVNode("div",hle,[q.createElementVNode("ul",fle,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(r.sourceData,(o,s)=>(q.openBlock(),q.createElementBlock("li",dle,[q.createElementVNode("div",ple,[q.createElementVNode("span",vle,q.toDisplayString(o[n.columns[0]]),1),q.createElementVNode("div",gle,[q.createElementVNode("div",{class:"h-1.5 flex flex-col justify-center overflow-hidden bg-indigo-500 rounded-full text-xs text-white text-center whitespace-nowrap",style:q.normalizeStyle({width:`${parseFloat(o[n.columns[1]])/n.maxValue*100}%`})},null,4)])]),q.createElementVNode("div",mle,[q.createElementVNode("span",yle,q.toDisplayString(a.formattedValue(o[n.columns[1]])),1)])]))),256))])])])):q.createCommentVNode("",!0)}const HC=Mr(ule,[["render",_le]]),xle=Object.freeze(Object.defineProperty({__proto__:null,default:HC},Symbol.toStringTag,{value:"Module"})),ble={name:"VsListbar",mixins:[An],props:["source"],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch(r){console.error(r)}},prepareData(){var e;this.columns=Object.keys(this.sourceData[0]);const r=this.sourceData.map(t=>{var i;return t[(i=this.columns)==null?void 0:i[1]]});this.maxValue=Math.max(...r),this.restDimensions=(e=this.columns)==null?void 0:e.filter((t,i)=>i!==0)},formattedValue(r){return Ii(r)},getWidth(r){return`${r/this.maxValue*100}%`}}},wle={class:"list-bar h-full p-3"},Sle={class:"space-y-2 custom-scrollbar h-[calc(100%-20px)]"},Tle={class:"relative w-full truncate"},Cle={class:"relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800"},Ale={class:"text-[14px] text-gray-500"};function Dle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",wle,[q.createElementVNode("ul",Sle,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(r.sourceData,(o,s)=>(q.openBlock(),q.createElementBlock("li",{key:s,class:"flex justify-between items-center gap-x-2 w-full"},[q.createElementVNode("div",Tle,[q.createElementVNode("span",Cle,q.toDisplayString(o[n.columns[0]]||"Без категорії"),1),q.createElementVNode("div",{class:q.normalizeClass(["absolute inset-y-0 start-0 h-full rounded",o[n.columns[0]]?"bg-indigo-100":"bg-gray-100"]),style:q.normalizeStyle({width:a.getWidth(o[n.columns[1]])})},null,6)]),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.restDimensions,(l,h)=>(q.openBlock(),q.createElementBlock("div",{key:h,class:"w-20 text-end mr-2"},[q.createElementVNode("span",Ale,q.toDisplayString(a.formattedValue(o[l])),1)]))),128))]))),128))])])}const z0=Mr(ble,[["render",Dle]]),Ile=Object.freeze(Object.defineProperty({__proto__:null,default:z0},Symbol.toStringTag,{value:"Module"})),Mle={},Ele={type:"button",class:"hs-tooltip-toggle flex justify-center items-center gap-x-3 size-8 text-sm text-gray-600 hover:bg-gray-100 rounded-full disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 dark:hover:text-neutral-200 dark:focus:text-neutral-200"};function kle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("button",Ele,[q.renderSlot(r.$slots,"default")])}const Ple=Mr(Mle,[["render",kle]]),Lle={props:["title","options"],emits:["selected"],data(){return{isOpenedDropDown:!1,checked:null}},computed:{showChecked(){return this.checked?this.checked:this.title}},methods:{optionSelected(r){this.checked=r,this.isOpenedDropDown=!1,document.removeEventListener("click",this.handleClickOutside),this.$emit("selected",r)},handleClickOutside(r){this.$refs.biDropdown&&!this.$refs.biDropdown.contains(r.target)&&(this.isOpenedDropDown=!1,document.removeEventListener("click",this.handleClickOutside))},toggleBiDropdown(){this.isOpenedDropDown=!this.isOpenedDropDown,this.isOpenedDropDown?setTimeout(()=>{document.addEventListener("click",this.handleClickOutside)},200):document.removeEventListener("click",this.handleClickOutside)}}},Rle={key:0,ref:"biDropdown","data-hs-select-dropdown":"",class:"absolute mt-2 z-50 w-48 p-1 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-950 opened",role:"listbox",tabindex:"-1","aria-orientation":"vertical",style:{"margin-top":"10px"}},zle={"data-value":"Revenue","data-title-value":"Revenue",tabindex:"0",class:"cursor-pointer selected hs-selected:bg-gray-100 dark:hs-selected:bg-neutral-800 py-1.5 px-2 w-full text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700","data-id":"0"},Ole=["onClick"],Nle={"data-title":""},Ble={key:0,class:""};function Vle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock(q.Fragment,null,[q.createElementVNode("button",{type:"button","aria-expanded":"true",class:"hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative group pr-2 -ms-2 py-1.5 pl-2.5 inline-flex shrink-0 justify-center items-center gap-x-1.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 before:absolute before:inset-0 before:z-[1] dark:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:bg-neutral-700",onClick:e[0]||(e[0]=(...o)=>a.toggleBiDropdown&&a.toggleBiDropdown(...o))},[q.createTextVNode(q.toDisplayString(a.showChecked)+" ",1),e[1]||(e[1]=q.createElementVNode("svg",{class:"shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[q.createElementVNode("path",{d:"m6 9 6 6 6-6"})],-1))]),n.isOpenedDropDown?(q.openBlock(),q.createElementBlock("div",Rle,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(t.options,o=>(q.openBlock(),q.createElementBlock("div",zle,[q.createElementVNode("div",{class:"flex items-center justify-between w-full",onClick:s=>a.optionSelected(o)},[q.createElementVNode("span",Nle,q.toDisplayString(o),1),n.checked===o?(q.openBlock(),q.createElementBlock("span",Ble,e[2]||(e[2]=[q.createElementVNode("svg",{class:"shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[q.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)]))):q.createCommentVNode("",!0)],8,Ole)]))),256))],512)):q.createCommentVNode("",!0)],64)}const Fle=Mr(Lle,[["render",Vle]]),$le={props:{options:{type:Array}},emits:["selected"],data(){return{isOpenedMenu:!1,checked:[]}},emits:["selected"],methods:{optionSelected(r){if(!this.checked.includes(r))this.checked.push(r);else{const e=this.checked.indexOf(r);e>-1&&this.checked.splice(e,1)}this.isOpenedMenu=!1,document.removeEventListener("click",this.handleClickOutside),this.$emit("selected",r)},handleClickOutside(r){this.$refs.biDropdown&&!this.$refs.biDropdown.contains(r.target)&&(this.isOpenedMenu=!1,document.removeEventListener("click",this.handleClickOutside))},toggleMenuDropdown(){this.isOpenedMenu=!this.isOpenedMenu,this.isOpenedMenu?setTimeout(()=>{document.addEventListener("click",this.handleClickOutside)},500):document.removeEventListener("click",this.handleClickOutside)}}},Gle={class:"hs-dropdown [--auto-close:inside] [--placement:bottom-right] relative inline-flex"},Ule={key:0,ref:"biDropdown",class:"absolute pr-2 top-[35px] transition-[opacity,margin] duration z-10 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:shadow-[0_10px_40px_10px_rgba(0,0,0,0.2)] dark:bg-neutral-900",role:"menu","aria-orientation":"vertical","aria-labelledby":"hs-pro-dachmd",style:{}},Hle={class:"p-1"},Wle=["onClick"],Zle={key:0,class:""};function jle(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",Gle,[q.createElementVNode("button",{id:"hs-pro-dachmd",type:"button",onClick:e[0]||(e[0]=(...o)=>a.toggleMenuDropdown&&a.toggleMenuDropdown(...o)),class:"h-[34px] w-[34px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700","aria-haspopup":"menu","aria-expanded":"false","aria-label":"Dropdown"},e[1]||(e[1]=[q.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[q.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),q.createElementVNode("circle",{cx:"12",cy:"5",r:"1"}),q.createElementVNode("circle",{cx:"12",cy:"19",r:"1"})],-1)])),n.isOpenedMenu?(q.openBlock(),q.createElementBlock("div",Ule,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(t.options,o=>(q.openBlock(),q.createElementBlock("div",Hle,[q.createElementVNode("button",{type:"button",onClick:s=>a.optionSelected(o),class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-gray-800 hover:bg-gray-100 disabled:opacity-50 focus:outline-none focus:bg-gray-100 disabled:pointer-events-none dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[q.createTextVNode(q.toDisplayString(o)+" ",1),n.checked.includes(o)?(q.openBlock(),q.createElementBlock("span",Zle,e[2]||(e[2]=[q.createElementVNode("svg",{class:"shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[q.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)]))):q.createCommentVNode("",!0)],8,Wle)]))),256))],512)):q.createCommentVNode("",!0)])}const qle=Mr($le,[["render",jle]]),Xle={"bi-bar":q.defineAsyncComponent(()=>Promise.resolve().then(()=>Lse)),"bi-number":q.defineAsyncComponent(()=>Promise.resolve().then(()=>cce)),"bi-text":q.defineAsyncComponent(()=>Promise.resolve().then(()=>jce)),"bi-listbar":q.defineAsyncComponent(()=>Promise.resolve().then(()=>Ile)),"bi-pie":q.defineAsyncComponent(()=>Promise.resolve().then(()=>Nse)),"bi-line":q.defineAsyncComponent(()=>Promise.resolve().then(()=>$se)),"bi-stat":q.defineAsyncComponent(()=>Promise.resolve().then(()=>lle)),"bi-pivot":q.defineAsyncComponent(()=>Promise.resolve().then(()=>oce)),"bi-progress":q.defineAsyncComponent(()=>Promise.resolve().then(()=>xle)),"bi-funnel":q.defineAsyncComponent(()=>Promise.resolve().then(()=>Kce)),"bi-heatmap":q.defineAsyncComponent(()=>Promise.resolve().then(()=>the)),"bi-calendar":q.defineAsyncComponent(()=>Promise.resolve().then(()=>ahe)),"bi-map":q.defineAsyncComponent(()=>Promise.resolve().then(()=>ffe)),"bi-cluster":q.defineAsyncComponent(()=>Promise.resolve().then(()=>yfe))},Yle={class:"flex items-center space-x-2"},Kle=q.defineComponent({__name:"vs-bi-switch",props:q.mergeModels({leftLabel:{},rightLabel:{},modelValue:{type:Boolean}},{modelValue:{default:()=>!1,type:Boolean},modelModifiers:{}}),emits:q.mergeModels(["update:is-enabled"],["update:modelValue"]),setup(r,{emit:e}){const t=e,i=q.useModel(r,"modelValue"),n=()=>{t("update:is-enabled",i)};return(a,o)=>(q.openBlock(),q.createElementBlock("div",Yle,[a.leftLabel?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.normalizeClass(["transition-colors",{"text-blue-500":!i.value}])},q.toDisplayString(a.leftLabel),3)):q.createCommentVNode("",!0),q.withDirectives(q.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=s=>i.value=s),type:"checkbox",class:"relative w-11 h-6 p-px bg-gray-100 border-transparent text-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:ring-blue-600 disabled:opacity-50 disabled:pointer-events-none checked:bg-none checked:text-blue-600 checked:border-blue-600 focus:checked:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-600 before:inline-block before:size-5 before:bg-white checked:before:bg-blue-200 before:translate-x-0 checked:before:translate-x-full before:rounded-full before:shadow before:h-5 before:w-5 before:transform before:ring-0 before:transition before:ease-in-out before:duration-200 dark:before:bg-neutral-400 dark:checked:before:bg-blue-200",onChange:n},null,544),[[q.vModelCheckbox,i.value]]),a.rightLabel?(q.openBlock(),q.createElementBlock("div",{key:1,class:q.normalizeClass(["transition-colors",{"text-blue-500":i.value}])},q.toDisplayString(a.rightLabel),3)):q.createCommentVNode("",!0)]))}}),Jle={},Qle={class:"flex items-center justify-center h-full"};function eue(r,e){return q.openBlock(),q.createElementBlock("div",Qle,e[0]||(e[0]=[q.createElementVNode("div",{class:"text-center text-gray-500"},[q.createElementVNode("h2",{class:"text-2xl font-bold"},"No data available")],-1)]))}const tue={components:{VsSmallButton:Ple,VsBiDropdown:Fle,VsMenuDropdown:qle,VsBiSwitch:Kle,VsNoDataChart:Mr(Jle,[["render",eue]]),...Xle},props:{title:{type:String},dashboard:{type:String},chartType:{type:String},widget:{type:String},changedData:{type:Object},refreshFlag:{type:String},filterURl:{type:String}},data(){return{checked:[],controls:[],selected:[]}},computed:{optionsName(){return this.controls.filter(r=>typeof r.options=="boolean").map(r=>r.name)}},watch:{changedData:{async handler(r){var e;r.widget==this.widget&&((e=this.$refs.chart)==null||e.changeData(r))},deep:!0},refreshFlag(r){var t;if(r!=this.widget)return;const e=`/bi-data?dashboard=${this.dashboard}&widget=${r}`;(t=this.$refs.chart)==null||t.getDataFromURL(e)},filterURl(r){var e;this.controls=!0,(e=this.$refs.chart)==null||e.setFilter(r)}},methods:{handleClick(){this.$emit("clicked",this.widget)},changeStyleHandler(r,e){var t;(t=this.$refs.chart)==null||t.changeStyle(r,e)},selectHandler(r){if(!this.checked.includes(r))this.checked.push(r);else{const e=this.checked.indexOf(r);if(e>-1){this.checked.splice(e,1);const t=this.selected.filter(i=>i.name!=r);this.selected=[],this.selected=[...t]}}},selectedOptionHandler(r,e){let t=!0;this.selected.forEach(i=>{i.name===e&&(i.option=r,t=!1)}),t&&this.selected.push({name:e,option:r}),this.makeUpUrl()},makeUpUrl(){var e;let r=`/bi-data?dashboard=${this.dashboard}&widget=${this.widget}`;this.selected.forEach((t,i)=>{r+=`&${t.name}=${t.option}`}),(e=this.$refs.chart)==null||e.getDataFromURL(r)}}},rue={class:"text-[16px] mb-[4px] flex max-w-full items-center min-h-0 flex justify-between max-h-[50px] h-fit shrink-0"},iue={class:"flex items-center justify-between w-full"},nue={class:"grid"},aue={class:"text-gray-800 max-h-[30px] inline-block font-semibold font-[24px] overflow-hidden"},oue={class:"flex flex-col justify-end"},sue={class:"flex items-center justify-end w-full gap-2"},lue={class:"w-full h-full"};function uue(r,e,t,i,n,a){const o=q.resolveComponent("VsBiDropdown"),s=q.resolveComponent("VsBiSwitch"),l=q.resolveComponent("VsNoDataChart");return q.openBlock(),q.createElementBlock("div",{class:"box-border relative p-4 bg-white border border-gray-200 select-auto rounded-xl",onClick:e[1]||(e[1]=h=>a.handleClick())},[q.createElementVNode("div",rue,[q.createElementVNode("div",iue,[q.createElementVNode("div",nue,[q.createElementVNode("span",aue,q.toDisplayString(t.title),1)]),q.createElementVNode("div",oue,[q.createElementVNode("span",sue,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.controls,h=>(q.openBlock(),q.createElementBlock("div",null,[Array.isArray(h.options)?(q.openBlock(),q.createBlock(o,{key:0,title:h==null?void 0:h.name,options:h==null?void 0:h.options,onSelected:f=>a.selectedOptionHandler(f,h.name)},null,8,["title","options","onSelected"])):typeof h.options=="boolean"?(q.openBlock(),q.createBlock(s,{key:1,"left-label":h.name,"is-enabled":h.options,"onUpdate:isEnabled":f=>a.changeStyleHandler(h.name,f)},null,8,["left-label","is-enabled","onUpdate:isEnabled"])):q.createCommentVNode("",!0)]))),256))])])])]),q.createElementVNode("div",lue,[n.controls!==!1?(q.openBlock(),q.createBlock(q.resolveDynamicComponent("bi-"+t.chartType),{key:0,ref:"chart",dashboard:t.dashboard,widget:t.widget,"onUpdate:controls":e[0]||(e[0]=h=>n.controls=h)},null,40,["dashboard","widget"])):(q.openBlock(),q.createBlock(l,{key:1,class:"w-full h-full"}))])])}const s3=Mr(tue,[["render",uue]]),cue={},hue={class:"shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function fue(r,e){return q.openBlock(),q.createElementBlock("svg",hue,e[0]||(e[0]=[q.createElementVNode("path",{d:"M18 6 6 18"},null,-1),q.createElementVNode("path",{d:"m6 6 12 12"},null,-1)]))}const l3=Mr(cue,[["render",fue]]),due={},pue={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function vue(r,e){return q.openBlock(),q.createElementBlock("svg",pue,e[0]||(e[0]=[q.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const gue=Mr(due,[["render",vue]]),mue={props:{visible:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},size:{type:String,default:()=>""}},emits:["update:visible","onClose"],name:"vs-dialog",mounted(){window.addEventListener("keydown",this.checkKey)},unmounted(){window.removeEventListener("keydown",this.checkKey)},computed:{hasSlot(){var r;return!!((r=this.$slots)!=null&&r.footer)},checkSize(){return this.size==="small"?"w-5/12":this.size==="medium"?"w-6/12":"lg:w-7/12 w-11/12"}},methods:{checkKey({key:r}){r==="Escape"&&this.handleClose()},handleClose(){this.$emit("update:visible",!1),this.$emit("onClose")}}},yue={class:"vsTailwind ui-dialog__wrapper"},_ue={class:"w-full h-full fixed top-0 start-0 bg-black bg-opacity-50"},xue={class:"ui-dialog__content p-4"},bue={key:0,class:"flex justify-end gap-x-2"};function wue(r,e,t,i,n,a){return q.openBlock(),q.createBlock(q.Teleport,{to:"#modal"},[q.createVNode(q.Transition,{name:"fade"},{default:q.withCtx(()=>[q.withDirectives(q.createElementVNode("div",yue,[q.createElementVNode("div",_ue,[q.createVNode(q.Transition,{name:"content",appear:""},{default:q.withCtx(()=>[q.createElementVNode("div",{class:q.normalizeClass(["ui-dialog__modal opacity-1 transition-all flex flex-col bg-white pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",[a.checkSize]])},[q.createElementVNode("div",xue,[q.renderSlot(r.$slots,"default",{},void 0,!0)]),a.hasSlot?(q.openBlock(),q.createElementBlock("div",bue,[q.renderSlot(r.$slots,"footer",{},void 0,!0)])):q.createCommentVNode("",!0)],2)]),_:3})])],512),[[q.vShow,t.visible]])]),_:3})])}const Sue=Mr(mue,[["render",wue],["__scopeId","data-v-e51369e3"]]),Tue={},Cue={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-refresh"};function Aue(r,e){return q.openBlock(),q.createElementBlock("svg",Cue,e[0]||(e[0]=[q.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),q.createElementVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null,-1),q.createElementVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null,-1)]))}const Due={components:{VsHeaderDialog:Sue,filterIcon:gue,closeIcon:l3,refreshIcon:Mr(Tue,[["render",Aue]])},props:["filterScheme"],emits:["filters:changed"],data(){return{rows:[],isFilterVisible:!1,rowList:[],activeFilters:"",filters:null}},computed:{activeFiltersCount(){var r;return this.filters?((r=this.filters)==null?void 0:r.url.split("=").length)-1:0}},methods:{toggleFilterShown(){this.isFilterVisible=!this.isFilterVisible},handleFilterChange(r){this.filters=r},updateTable(){var r,e;this.activeFilters=(e=(r=this.$refs)==null?void 0:r.filter)==null?void 0:e.activeFilters,this.isFilterVisible=!1,this.$emit("filters:changed",this.filters)},resetFilters(){this.$refs.filter&&this.$refs.filter.clearAll(),this.isFilterVisible=!1,this.$emit("filters:changed",""),this.activeFilters=null},getLabelById(r){const e=this.filterScheme.find(t=>t.id===r);return e?e.label:r},getOptionsLabelById(r,e){if(Array.isArray(e)){const t=this.filterScheme.find(i=>i.id===r);return t!=null&&t.options?t==null?void 0:t.options.filter(i=>e.includes(i.id)).map(i=>i.text).join(", "):e==null?void 0:e.length}else return e},async clearFilter(r){var e,t,i,n;await((t=(e=this.$refs)==null?void 0:e.filter)==null?void 0:t.clearFilter(r)),this.filters.url=(n=(i=this.$refs)==null?void 0:i.filter)==null?void 0:n.filterUrl,await this.updateTable()}}},Iue={key:0,class:"font-medium text-[10px] min-w-[16px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full"},Mue={class:"flex flex-wrap items-center justify-end flex-1 gap-2 p-4"};function Eue(r,e,t,i,n,a){const o=q.resolveComponent("filterIcon"),s=q.resolveComponent("refreshIcon"),l=q.resolveComponent("VsFilter"),h=q.resolveComponent("VsHeaderDialog");return q.openBlock(),q.createElementBlock(q.Fragment,null,[q.createElementVNode("div",null,[q.createElementVNode("button",{type:"button",class:"py-2 px-2.5 ml-3 max-h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:e[0]||(e[0]=(...f)=>a.toggleFilterShown&&a.toggleFilterShown(...f))},[q.createVNode(o),e[7]||(e[7]=q.createTextVNode(" Фільтри ")),a.activeFiltersCount>=1?(q.openBlock(),q.createElementBlock("span",Iue,q.toDisplayString(a.activeFiltersCount),1)):q.createCommentVNode("",!0)]),a.activeFiltersCount>=1?(q.openBlock(),q.createElementBlock("button",{key:0,type:"button",class:"py-2 px-1.5 ml-3 max-h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:e[1]||(e[1]=(...f)=>a.resetFilters&&a.resetFilters(...f))},[q.createVNode(s)])):q.createCommentVNode("",!0)]),q.createVNode(h,{visible:n.isFilterVisible,"onUpdate:visible":e[5]||(e[5]=f=>n.isFilterVisible=f),title:"Фільтри",size:"small",onOnClose:e[6]||(e[6]=()=>{n.isFilterVisible=!1})},{footer:q.withCtx(()=>[q.createElementVNode("div",Mue,[q.createElementVNode("button",{onClick:e[3]||(e[3]=(...f)=>a.resetFilters&&a.resetFilters(...f)),class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"}," Очистити все "),q.createElementVNode("button",{onClick:e[4]||(e[4]=(...f)=>a.updateTable&&a.updateTable(...f)),class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-600 border border-blue-600 rounded-lg shadow-sm gap-x-2 text-start hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500"}," Застосувати ")])]),default:q.withCtx(()=>[t.filterScheme?(q.openBlock(),q.createBlock(l,{key:0,ref:"filter",scheme:t.filterScheme,closeFilterBtn:!0,onFilterClose:e[2]||(e[2]=f=>n.isFilterVisible=!1),name:"filter",layout:"default",onFilterChange:a.handleFilterChange},null,8,["scheme","onFilterChange"])):q.createCommentVNode("",!0)]),_:1},8,["visible"])],64)}const kue={props:["name","description","filters"],components:{VsFilterHeader:Mr(Due,[["render",Eue]])}},Pue={class:"bg-white px-5 flex gap-4 h-[90px] border border-gray-300 mt-2 rounded-lg mb-2 pt-[3px] justify-between items-center"},Lue={class:"flex flex-col"},Rue={class:"text-xl"},zue={class:"text-sm"};function Oue(r,e,t,i,n,a){const o=q.resolveComponent("VsFilterHeader");return q.openBlock(),q.createElementBlock("div",Pue,[q.createElementVNode("div",Lue,[q.createElementVNode("span",Rue,q.toDisplayString(t.name),1),q.createElementVNode("span",zue,q.toDisplayString(t.description),1)]),q.createVNode(o,{filterScheme:t.filters,"onFilters:changed":e[0]||(e[0]=s=>r.$emit("filters:changed",s))},null,8,["filterScheme"])])}const Nue=Mr(kue,[["render",Oue]]),Bue={},Vue={class:"w-full flex justify-center"};function Fue(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",Vue,e[0]||(e[0]=[q.createStaticVNode('<div class="text-center p-4 bg-white rounded-lg shadow-md"><svg xmlns="http://www.w3.org/2000/svg" class="h-16 w-16 text-gray-400" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path><path d="M9 12l2 2l4 -4"></path></svg><h3 class="text-2xl font-medium text-gray-900"> No data available at this time </h3><p class="mt-2 text-gray-500">Information will be available soon</p></div>',1)]))}const $ue={components:{VsWidget:s3,VsNoData:Mr(Bue,[["render",Fue]]),VsHeader:Nue},mixins:[An],props:["id","editable","changedData","refreshFlag","prefix","isReload"],data(){return{widgets:[],panels:[],error:!1,selectedPanel:"",dashboardTitle:null,dashboardDescritpion:null,filterURl:null,dashboardData:null}},watch:{id(){var r,e;this.selectedPanel=((e=(r=this.$route)==null?void 0:r.params)==null?void 0:e.widget)||""},isReload(){this.fetchData()}},async mounted(){var r,e;this.selectedPanel=((e=(r=this.$route)==null?void 0:r.params)==null?void 0:e.widget)||"",wi.defaults.baseURL=this.prefix||"/api",await this.fetchData()},methods:{async fetchData(){if(this.id)try{const{data:r}=await wi.get(`/bi-dashboard/${this.id}`);this.dashboardData=r}catch(r){console.error(r)}},columnClass(r){const e=(r==null?void 0:r.col)||12;return{1:"md:w-1/12 sm:w-full",2:"md:w-1/6 sm:w-full",3:"md:w-1/4 sm:w-full",4:"md:w-1/3 sm:w-full",6:"md:w-1/2 sm:w-full",8:"md:w-2/3 sm:w-full",10:"md:w-5/6 sm:w-full",12:"w-full"}[e]||"w-full"},getTypeByName(r){const e=this.dashboardData.widgets.find(t=>t.name===r);return(e==null?void 0:e.type)||"text"},getTitleByName(r){var t;const e=this.dashboardData.widgets.find(i=>i.name===r);return((t=e==null?void 0:e.data)==null?void 0:t.title)||(e==null?void 0:e.title)},handleClick(r){this.editable&&(this.selectedPanel=(r==null?void 0:r.name)||r,this.fillWidgetWithData((r==null?void 0:r.name)||r))},fillWidgetWithData(r){const e=this.dashboardData.widgets.find(t=>t.name===r);if(e){const t={...e,name:r};this.$emit("clicked",t)}},findInputParamByame(r,e){const t=this.dashboardData.widgets.find(i=>i.name===e);return(t==null?void 0:t[r])||""},async filterHandler(r){var t;this.filterURl="";let e="&filter=";(t=r==null?void 0:r.url)!=null&&t.length&&(r.url.split("|").forEach(n=>{const a=n.split("=");e+=`${a[0]}=${a[1]}`}),this.filterURl+=e)}}},Gue={class:"w-full pb-8 overflow-y-auto"},Uue={class:"flex flex-wrap"};function Hue(r,e,t,i,n,a){var h,f,d;const o=q.resolveComponent("VsHeader"),s=q.resolveComponent("VsNoData"),l=q.resolveComponent("VsWidget");return q.openBlock(),q.createElementBlock("div",Gue,[(h=n.dashboardData)!=null&&h.filters?(q.openBlock(),q.createBlock(o,{key:0,filters:(f=n.dashboardData)==null?void 0:f.filters,name:n.dashboardTitle,description:n.dashboardDescritpion,"onFilters:changed":e[0]||(e[0]=g=>a.filterHandler(g))},null,8,["filters","name","description"])):q.createCommentVNode("",!0),q.createElementVNode("div",Uue,[n.error||!n.dashboardData?(q.openBlock(),q.createBlock(s,{key:0,class:"col-span-12"})):(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:1},q.renderList(((d=n.dashboardData)==null?void 0:d.panels)||[],(g,m)=>{var x;return q.openBlock(),q.createElementBlock("div",{key:m,class:q.normalizeClass([[a.columnClass(g)],"px-[7.5px] mb-[15px] flex flex-col"])},[(x=g.widgets)!=null&&x.length?(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:0},q.renderList(g.widgets,w=>(q.openBlock(),q.createBlock(l,{key:w,class:q.normalizeClass(["mb-[15px]",{"border border-blue-500":n.selectedPanel===w}]),title:a.getTitleByName(w),"chart-type":a.getTypeByName(w),dashboard:t.id,widget:w,"refresh-flag":t.refreshFlag,"changed-data":t.changedData,"filter-u-rl":n.filterURl,onClicked:T=>a.handleClick(w),onSelected:T=>r.selectedHandler(T,w)},null,8,["title","class","chart-type","dashboard","widget","refresh-flag","changed-data","filter-u-rl","onClicked","onSelected"]))),128)):(q.openBlock(),q.createBlock(l,{key:1,class:q.normalizeClass(["max-h-[460px] flex flex-col",{"border border-blue-500":n.selectedPanel===g.widget}]),title:a.getTitleByName(g.widget),"chart-type":a.getTypeByName(g.widget),dashboard:t.id,widget:g.widget,"refresh-flag":t.refreshFlag,"changed-data":t.changedData,"filter-u-rl":n.filterURl,onClicked:w=>a.handleClick(g.widget)},null,8,["title","class","chart-type","dashboard","widget","refresh-flag","changed-data","filter-u-rl","onClicked"]))],2)}),128))])])}const u3=Mr($ue,[["render",Hue]]),Wue={name:"VsPivotTable",mixins:[An],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const r=Array.from(new Set(this.sourceData.map(e=>e[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=r.map(e=>Yo(e)):this.xs=[...r],this.products=this.dimensions.filter((e,t)=>t!=0),this.values=this.products.map((e,t)=>({name:e,data:this.sourceData.filter(i=>parseFloat(i[e])).map(i=>Ii(parseFloat(i[e])))}))}catch(r){console.error(r)}}}},Zue={class:"p-5 h-full space-y-4 flex flex-col rounded-xl custom-scrollbar"},jue={class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300"},que={class:"min-w-full inline-block align-middle"},Xue={class:"min-w-full divide-y divide-gray-200"},Yue={class:"space-x-2"},Kue={scope:"col",class:"xl:min-w-[120px] min-w-48"},Jue={class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"},Que={class:"divide-y divide-gray-200"},ece={class:"size-px whitespace-nowrap py-3"},tce={class:"flex items-center gap-x-3"},rce={class:"text-sm font-medium text-gray-800"},ice={class:"size-px whitespace-nowrap py-3"},nce={class:"text-sm text-gray-600"};function ace(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",Zue,[q.createElementVNode("div",jue,[q.createElementVNode("div",que,[q.createElementVNode("table",Xue,[q.createElementVNode("thead",null,[q.createElementVNode("tr",Yue,[e[0]||(e[0]=q.createElementVNode("th",{scope:"col",class:"min-w-[200px]"},[q.createElementVNode("div",{class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"})],-1)),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.xs,o=>(q.openBlock(),q.createElementBlock("th",Kue,[q.createElementVNode("div",Jue,q.toDisplayString(o),1)]))),256))])]),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.values,o=>(q.openBlock(),q.createElementBlock("tbody",Que,[q.createElementVNode("tr",null,[q.createElementVNode("td",ece,[q.createElementVNode("div",tce,[q.createElementVNode("span",rce,q.toDisplayString(o.name),1)])]),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(n.xs,(s,l)=>(q.openBlock(),q.createElementBlock("td",ice,[q.createElementVNode("span",nce,q.toDisplayString(o.data[l]),1)]))),256))])]))),256))])])])])}const WC=Mr(Wue,[["render",ace]]),oce=Object.freeze(Object.defineProperty({__proto__:null,default:WC},Symbol.toStringTag,{value:"Module"})),c3={install:r=>{r.component("VsBar",FC),r.component("VsLine",GC),r.component("VsPie",$C),r.component("VsKpi",o3),r.component("VsStat",UC),r.component("VsDashboard",u3),r.component("VsWidget",s3),r.component("VsProgressBar",HC),r.component("VsListBar",z0),r.component("VsPivotTable",WC)},components:{VsBar:FC,VsLine:GC,VsPie:$C,VsKpi:o3,VsStat:UC,VsDashboard:u3,VsProgressBar:HC,VsListBar:z0,VsPivotTable:WC}};typeof window<"u"&&(window.v3bi=c3);const sce={name:"VsNumber",mixins:[An],data(){return{number:""}},computed:{formattedNumber(){return m6(this.number)},prefix(){var r,e;return(r=this.styleData)!=null&&r.prefix?(e=this.styleData)==null?void 0:e.prefix:""}},watch:{sourceData:{async handler(){this.getNumber()},deep:!0}},async mounted(){await this.getData(),this.getNumber()},methods:{onChangedData(){try{this.sourceData&&this.getNumber()}catch(r){console.error(r)}},async getNumber(){var r,e;try{this.number=((e=this.sourceData[0])==null?void 0:e[Object.keys((r=this.sourceData)==null?void 0:r[0])])||0}catch(t){console.error(t)}}}},lce={class:"font-[Inter,_Helvetica,_Arial] p-4 w-full text-[28px] pt-[10px] min-h-[150px] border-0"};function uce(r,e,t,i,n,a){return q.openBlock(),q.createElementBlock("div",lce,q.toDisplayString(a.prefix)+q.toDisplayString(a.formattedNumber),1)}const cce=Object.freeze(Object.defineProperty({__proto__:null,default:Mr(sce,[["render",uce]])},Symbol.toStringTag,{value:"Module"}));function ZC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ih=ZC();function h3(r){ih=r}const f3=/[&<>"']/,hce=new RegExp(f3.source,"g"),d3=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,fce=new RegExp(d3.source,"g"),dce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p3=r=>dce[r];function ka(r,e){if(e){if(f3.test(r))return r.replace(hce,p3)}else if(d3.test(r))return r.replace(fce,p3);return r}const pce=/(^|[^\[])\^/g;function ti(r,e){let t=typeof r=="string"?r:r.source;e=e||"";const i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(pce,"$1"),t=t.replace(n,o),i},getRegex:()=>new RegExp(t,e)};return i}function v3(r){try{r=encodeURI(r).replace(/%25/g,"%")}catch{return null}return r}const Xv={exec:()=>null};function g3(r,e){const t=r.replace(/\|/g,(a,o,s)=>{let l=!1,h=o;for(;--h>=0&&s[h]==="\\";)l=!l;return l?"|":" |"}),i=t.split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function Yv(r,e,t){const i=r.length;if(i===0)return"";let n=0;for(;n<i;){const a=r.charAt(i-n-1);if(a===e&&!t)n++;else if(a!==e&&t)n++;else break}return r.slice(0,i-n)}function vce(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<r.length;i++)if(r[i]==="\\")i++;else if(r[i]===e[0])t++;else if(r[i]===e[1]&&(t--,t<0))return i;return-1}function m3(r,e,t,i){const n=e.href,a=e.title?ka(e.title):null,o=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){i.state.inLink=!0;const s={type:"link",raw:t,href:n,title:a,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,s}return{type:"image",raw:t,href:n,title:a,text:ka(o)}}function gce(r,e){const t=r.match(/^(\s+)(?:```)/);if(t===null)return e;const i=t[1];return e.split(`
127
127
  `).map(n=>{const a=n.match(/^\s+/);if(a===null)return n;const[o]=a;return o.length>=i.length?n.slice(i.length):n}).join(`
128
128
  `)}class O0{constructor(e){ui(this,"options");ui(this,"rules");ui(this,"lexer");this.options=e||ih}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const i=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Yv(i,`
129
129
  `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const i=t[0],n=gce(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(/#$/.test(i)){const n=Yv(i,"#");(this.options.pedantic||!n||/ $/.test(n))&&(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Yv(t[0],`
@@ -46560,19 +46560,19 @@ function Xj(r, t, e, n, a, i) {
46560
46560
  }
46561
46561
  const Zj = /* @__PURE__ */ le(Gj, [["render", Xj]]), qj = {
46562
46562
  "bi-bar": Xe(() => Promise.resolve().then(() => Rq)),
46563
- "bi-number": Xe(() => import("./vs-number-C-pgztKR.js")),
46564
- "bi-text": Xe(() => import("./vs-text-CXZ2Oldb.js")),
46563
+ "bi-number": Xe(() => import("./vs-number-BG0szZL-.js")),
46564
+ "bi-text": Xe(() => import("./vs-text-Kwl3-0yy.js")),
46565
46565
  "bi-listbar": Xe(() => Promise.resolve().then(() => Mj)),
46566
46566
  "bi-pie": Xe(() => Promise.resolve().then(() => Vq)),
46567
46567
  "bi-line": Xe(() => Promise.resolve().then(() => Gq)),
46568
46568
  "bi-stat": Xe(() => Promise.resolve().then(() => lj)),
46569
46569
  "bi-pivot": Xe(() => Promise.resolve().then(() => hJ)),
46570
46570
  "bi-progress": Xe(() => Promise.resolve().then(() => xj)),
46571
- "bi-funnel": Xe(() => import("./vs-funnel-bar-CihmuMT1.js")),
46572
- "bi-heatmap": Xe(() => import("./vs-heatmap-BsM5Qee_.js")),
46573
- "bi-calendar": Xe(() => import("./vs-calendar-BCLE37OZ.js")),
46574
- "bi-map": Xe(() => import("./vs-map-BjBId3Ma.js")),
46575
- "bi-cluster": Xe(() => import("./vs-map-cluster-Bj8JfS0x.js"))
46571
+ "bi-funnel": Xe(() => import("./vs-funnel-bar-Cj0O8tIf.js")),
46572
+ "bi-heatmap": Xe(() => import("./vs-heatmap-C9oFph_f.js")),
46573
+ "bi-calendar": Xe(() => import("./vs-calendar-B9vXdsaG.js")),
46574
+ "bi-map": Xe(() => import("./vs-map-WOn0RAU7.js")),
46575
+ "bi-cluster": Xe(() => import("./vs-map-cluster-RJa6sNfI.js"))
46576
46576
  }, jj = { class: "flex items-center space-x-2" }, Kj = /* @__PURE__ */ lP({
46577
46577
  __name: "vs-bi-switch",
46578
46578
  props: /* @__PURE__ */ f_({
@@ -47013,14 +47013,7 @@ function $K(r, t, e, n, a, i) {
47013
47013
  const UK = /* @__PURE__ */ le(HK, [["render", $K]]), YK = {
47014
47014
  components: { VsWidget: oP, VsNoData: UK, VsHeader: GK },
47015
47015
  mixins: [Kn],
47016
- props: [
47017
- "id",
47018
- "editable",
47019
- "changedData",
47020
- "refreshFlag",
47021
- "prefix",
47022
- "isReload"
47023
- ],
47016
+ props: ["id", "editable", "changedData", "refreshFlag", "prefix", "isReload"],
47024
47017
  data() {
47025
47018
  return {
47026
47019
  widgets: [],
@@ -47130,7 +47123,7 @@ function qK(r, t, e, n, a, i) {
47130
47123
  var d;
47131
47124
  return at(), ht("div", {
47132
47125
  key: v,
47133
- class: Rn([[i.columnClass(c)], "h-[460px] px-[7.5px] mb-[15px] flex flex-col"])
47126
+ class: Rn([[i.columnClass(c)], "px-[7.5px] mb-[15px] flex flex-col"])
47134
47127
  }, [
47135
47128
  (d = c.widgets) != null && d.length ? (at(!0), ht(Ve, { key: 0 }, lr(c.widgets, (p) => (at(), fn(l, {
47136
47129
  key: p,
@@ -47148,7 +47141,7 @@ function qK(r, t, e, n, a, i) {
47148
47141
  onSelected: (g) => r.selectedHandler(g, p)
47149
47142
  }, null, 8, ["title", "class", "chart-type", "dashboard", "widget", "refresh-flag", "changed-data", "filter-u-rl", "onClicked", "onSelected"]))), 128)) : (at(), fn(l, {
47150
47143
  key: 1,
47151
- class: Rn(["h-[460px] flex flex-col", {
47144
+ class: Rn(["max-h-[460px] flex flex-col", {
47152
47145
  "border border-blue-500": a.selectedPanel === c.widget
47153
47146
  }]),
47154
47147
  title: i.getTitleByName(c.widget),
@@ -1,5 +1,5 @@
1
1
  import { openBlock as Nt, createElementBlock as jt, createStaticVNode as Gp, resolveComponent as Uo, createElementVNode as ct, createVNode as $o, toDisplayString as Ln, createCommentVNode as jo, Fragment as oh, renderList as lh, normalizeStyle as Hu, normalizeClass as ch, withDirectives as Hp, vShow as Xp } from "vue";
2
- import { _ as en, j as Wp, V as Kp } from "./import-file-DZ6_fy43.js";
2
+ import { _ as en, j as Wp, V as Kp } from "./import-file-C8BY90-b.js";
3
3
  function Jp(te) {
4
4
  return [
5
5
  {
@@ -1,4 +1,4 @@
1
- import { _ as l, c, i as h, t as p, h as d } from "./import-file-DZ6_fy43.js";
1
+ import { _ as l, c, i as h, t as p, h as d } from "./import-file-C8BY90-b.js";
2
2
  import { openBlock as u, createElementBlock as m } from "vue";
3
3
  const D = {
4
4
  name: "VsCalendar",
@@ -1,4 +1,4 @@
1
- import { _ as o, c, a as h, b as l, d as n, i as d } from "./import-file-DZ6_fy43.js";
1
+ import { _ as o, c, a as h, b as l, d as n, i as d } from "./import-file-C8BY90-b.js";
2
2
  import { openBlock as p, createElementBlock as u } from "vue";
3
3
  const m = {
4
4
  name: "VsFunnelBar",
@@ -1,4 +1,4 @@
1
- import { _ as u, c as m, a as d, i as f, t as x, e as y, g as c, d as D } from "./import-file-DZ6_fy43.js";
1
+ import { _ as u, c as m, a as d, i as f, t as x, e as y, g as c, d as D } from "./import-file-C8BY90-b.js";
2
2
  import { openBlock as _, createElementBlock as g } from "vue";
3
3
  const w = {
4
4
  name: "VsHeatmap",
@@ -1,5 +1,5 @@
1
- import { l as g, m as M } from "./map-component-mixin-idLNEtH8.js";
2
- import { _ as w, c as y } from "./import-file-DZ6_fy43.js";
1
+ import { l as g, m as M } from "./map-component-mixin-CFtShPun.js";
2
+ import { _ as w, c as y } from "./import-file-C8BY90-b.js";
3
3
  import { resolveComponent as i, openBlock as u, createElementBlock as _, createElementVNode as r, createBlock as V, createCommentVNode as v, createVNode as d } from "vue";
4
4
  const x = {
5
5
  mixins: [y, g, M],
@@ -1,5 +1,5 @@
1
- import { l as w, m as V, p as _ } from "./map-component-mixin-idLNEtH8.js";
2
- import { _ as v, c as C } from "./import-file-DZ6_fy43.js";
1
+ import { l as w, m as V, p as _ } from "./map-component-mixin-CFtShPun.js";
2
+ import { _ as v, c as C } from "./import-file-C8BY90-b.js";
3
3
  import { resolveComponent as a, openBlock as h, createElementBlock as $, createVNode as s, createElementVNode as u, createBlock as x, createCommentVNode as L } from "vue";
4
4
  const k = {
5
5
  mixins: [C, w, V],
@@ -1,4 +1,4 @@
1
- import { _ as c, c as o, f as n } from "./import-file-DZ6_fy43.js";
1
+ import { _ as c, c as o, f as n } from "./import-file-C8BY90-b.js";
2
2
  import { openBlock as i, createElementBlock as m, toDisplayString as s } from "vue";
3
3
  const u = {
4
4
  name: "VsNumber",
@@ -1,7 +1,7 @@
1
1
  var ge = Object.defineProperty;
2
2
  var ke = (c, e, t) => e in c ? ge(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
3
3
  var k = (c, e, t) => ke(c, typeof e != "symbol" ? e + "" : e, t);
4
- import { _ as de, c as xe } from "./import-file-DZ6_fy43.js";
4
+ import { _ as de, c as xe } from "./import-file-C8BY90-b.js";
5
5
  import { openBlock as V, createElementBlock as J, createCommentVNode as be } from "vue";
6
6
  function Q() {
7
7
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/bi",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "BI data visualization module",
5
5
  "main": "dist/bi.js",
6
6
  "browser": "dist/bi.umd.cjs",
@@ -50,7 +50,7 @@
50
50
  "@opengis/fastify-auth": "^1.0.50",
51
51
  "@opengis/fastify-file": "^1.0.32",
52
52
  "@opengis/fastify-table": "^1.1.93",
53
- "@opengis/v3-core": "^0.2.65",
53
+ "@opengis/v3-core": "^0.3.8",
54
54
  "@opengis/v3-filter": "^0.0.39",
55
55
  "@turf/turf": "^7.1.0",
56
56
  "@vueuse/core": "^11.1.0",
@@ -92,4 +92,4 @@
92
92
  "vitepress-sidebar": "^1.22.0",
93
93
  "vue-tsc": "^2.1.6"
94
94
  }
95
- }
95
+ }