@opengis/bi 1.2.16 → 1.2.17
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 +1 -1
- package/dist/bi.umd.cjs +1 -1
- package/dist/{import-file-BAgOJvMq.js → import-file-Bz7XxTwm.js} +40 -34
- package/dist/{index-DQEr6mEW.js → index-D_qtEvN8.js} +3 -3
- package/dist/{list-DdUhzd3x.js → list-DIYhtBuQ.js} +1 -1
- package/dist/{map-DxWxxzQ5.js → map-CQZ_RiQg.js} +1 -1
- package/dist/{vs-funnel-bar-BFSJaXVw.js → vs-funnel-bar-DkvPhko1.js} +1 -1
- package/dist/{vs-list-CkH5cu3X.js → vs-list--lRWoAuT.js} +2 -2
- package/dist/{vs-map-CGQxl6-X.js → vs-map-Dq_42OWv.js} +2 -2
- package/dist/{vs-map-cluster-APuRjS0C.js → vs-map-cluster-DV1Z30Jd.js} +3 -3
- package/dist/{vs-number-m_2m-q-U.js → vs-number-BTJmZZ5H.js} +1 -1
- package/dist/{vs-table-pv0muyb0.js → vs-table-Bq9QnYnY.js} +1 -1
- package/dist/{vs-text-DEXKPH7J.js → vs-text-CYIHiHjf.js} +1 -1
- package/package.json +1 -1
package/dist/bi.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as t, q as V, U as o, V as e, y as i, v as P, s as d, w as g, r as p, x as B, u as E, t as S, z as U } from "./import-file-
|
|
1
|
+
import { p as t, q as V, U as o, V as e, y as i, v as P, s as d, w as g, r as p, x as B, u as E, t as S, z as U } from "./import-file-Bz7XxTwm.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
export {
|
|
4
4
|
t as EditorRootPage,
|
package/dist/bi.umd.cjs
CHANGED
|
@@ -8346,7 +8346,7 @@ echarts.use([`+E+"]);":"Unknown series "+T))}return}if(d==="tooltip"){if(b){Ns.N
|
|
|
8346
8346
|
`,"Illegal config:",h,`.
|
|
8347
8347
|
`)),tt(r));var x=f?sb(f):null;f&&!x&&(Pn.NODE_ENV!=="production"&&(r=va("Invalid parser name "+f+`.
|
|
8348
8348
|
`,"Illegal config:",h,`.
|
|
8349
|
-
`)),tt(r)),i.push({dimIdx:k.index,parser:x,comparator:new cb(p,y)})});var o=e.sourceFormat;o!==sa&&o!==tr&&(Pn.NODE_ENV!=="production"&&(r='sourceFormat "'+o+'" is not supported yet'),tt(r));for(var s=[],l=0,c=e.count();l<c;l++)s.push(e.getRawDataItem(l));return s.sort(function(h,d){for(var p=0;p<i.length;p++){var f=i[p],y=e.retrieveValueFromItem(h,f.dimIdx),v=e.retrieveValueFromItem(d,f.dimIdx);f.parser&&(y=f.parser(y),v=f.parser(v));var g=f.comparator.evaluate(y,v);if(g!==0)return g}return 0}),{data:s}}};function zwe(a){a.registerTransform(Iwe),a.registerTransform(Nwe)}var Bwe=function(a){G(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,r,n){a.prototype.init.call(this,t,r,n),this._sourceManager=new yb(this),vb(this)},e.prototype.mergeOption=function(t,r){a.prototype.mergeOption.call(this,t,r),vb(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Xr},e}($e),Pwe=function(a){G(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(bt);function Rwe(a){a.registerComponentModel(Bwe),a.registerComponentView(Pwe)}var on=Ur.CMD;function yl(a,e){return Math.abs(a-e)<1e-5}function Pm(a){var e=a.data,t=a.len(),r=[],n,i=0,o=0,s=0,l=0;function c(L,I){n&&n.length>2&&r.push(n),n=[L,I]}function h(L,I,N,z){yl(L,N)&&yl(I,z)||n.push(L,I,N,z,N,z)}function d(L,I,N,z,R,P){var O=Math.abs(I-L),j=Math.tan(O/4)*4/3,ee=I<L?-1:1,oe=Math.cos(L),X=Math.sin(L),re=Math.cos(I),ce=Math.sin(I),ke=oe*R+N,Le=X*P+z,Y=re*R+N,ne=ce*P+z,F=R*j*ee,q=P*j*ee;n.push(ke-F*X,Le+q*oe,Y+F*ce,ne-q*re,Y,ne)}for(var p,f,y,v,g=0;g<t;){var k=e[g++],x=g===1;switch(x&&(i=e[g],o=e[g+1],s=i,l=o,(k===on.L||k===on.C||k===on.Q)&&(n=[s,l])),k){case on.M:i=s=e[g++],o=l=e[g++],c(s,l);break;case on.L:p=e[g++],f=e[g++],h(i,o,p,f),i=p,o=f;break;case on.C:n.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case on.Q:p=e[g++],f=e[g++],y=e[g++],v=e[g++],n.push(i+2/3*(p-i),o+2/3*(f-o),y+2/3*(p-y),v+2/3*(f-v),y,v),i=y,o=v;break;case on.A:var b=e[g++],w=e[g++],M=e[g++],_=e[g++],S=e[g++],C=e[g++]+S;g+=1;var D=!e[g++];p=Math.cos(S)*M+b,f=Math.sin(S)*_+w,x?(s=p,l=f,c(s,l)):h(i,o,p,f),i=Math.cos(C)*M+b,o=Math.sin(C)*_+w;for(var A=(D?-1:1)*Math.PI/2,T=S;D?T>C:T<C;T+=A){var E=D?Math.max(T+A,C):Math.min(T+A,C);d(T,E,b,w,M,_)}break;case on.R:s=i=e[g++],l=o=e[g++],p=s+e[g++],f=l+e[g++],c(p,l),h(p,l,p,f),h(p,f,s,f),h(s,f,s,l),h(s,l,p,l);break;case on.Z:n&&h(i,o,s,l),i=s,o=l;break}}return n&&n.length>2&&r.push(n),r}function Rm(a,e,t,r,n,i,o,s,l,c){if(yl(a,t)&&yl(e,r)&&yl(n,o)&&yl(i,s)){l.push(o,s);return}var h=2/c,d=h*h,p=o-a,f=s-e,y=Math.sqrt(p*p+f*f);p/=y,f/=y;var v=t-a,g=r-e,k=n-o,x=i-s,b=v*v+g*g,w=k*k+x*x;if(b<d&&w<d){l.push(o,s);return}var M=p*v+f*g,_=-p*k-f*x,S=b-M*M,C=w-_*_;if(S<d&&M>=0&&C<d&&_>=0){l.push(o,s);return}var D=[],A=[];Un(a,t,n,o,.5,D),Un(e,r,i,s,.5,A),Rm(D[0],A[0],D[1],A[1],D[2],A[2],D[3],A[3],l,c),Rm(D[4],A[4],D[5],A[5],D[6],A[6],D[7],A[7],l,c)}function Owe(a,e){var t=Pm(a),r=[];e=e||1;for(var n=0;n<t.length;n++){var i=t[n],o=[],s=i[0],l=i[1];o.push(s,l);for(var c=2;c<i.length;){var h=i[c++],d=i[c++],p=i[c++],f=i[c++],y=i[c++],v=i[c++];Rm(s,l,h,d,p,f,y,v,o,e),s=y,l=v}r.push(o)}return r}function GC(a,e,t){var r=a[e],n=a[1-e],i=Math.abs(r/n),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],c=0;c<o;c++)l.push(s);var h=o*s,d=t-h;if(d>0)for(var c=0;c<d;c++)l[c%o]+=1;return l}function WC(a,e,t){for(var r=a.r0,n=a.r,i=a.startAngle,o=a.endAngle,s=Math.abs(o-i),l=s*n,c=n-r,h=l>Math.abs(c),d=GC([l,c],h?0:1,e),p=(h?s:c)/d.length,f=0;f<d.length;f++)for(var y=(h?c:s)/d[f],v=0;v<d[f];v++){var g={};h?(g.startAngle=i+p*f,g.endAngle=i+p*(f+1),g.r0=r+y*v,g.r=r+y*(v+1)):(g.startAngle=i+y*v,g.endAngle=i+y*(v+1),g.r0=r+p*f,g.r=r+p*(f+1)),g.clockwise=a.clockwise,g.cx=a.cx,g.cy=a.cy,t.push(g)}}function Hwe(a,e,t){for(var r=a.width,n=a.height,i=r>n,o=GC([r,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",c=i?"x":"y",h=i?"y":"x",d=a[s]/o.length,p=0;p<o.length;p++)for(var f=a[l]/o[p],y=0;y<o[p];y++){var v={};v[c]=p*d,v[h]=y*f,v[s]=d,v[l]=f,v.x+=a.x,v.y+=a.y,t.push(v)}}function UC(a,e,t,r){return a*r-t*e}function Fwe(a,e,t,r,n,i,o,s){var l=t-a,c=r-e,h=o-n,d=s-i,p=UC(h,d,l,c);if(Math.abs(p)<1e-6)return null;var f=a-n,y=e-i,v=UC(f,y,h,d)/p;return v<0||v>1?null:new Pe(v*l+a,v*c+e)}function qwe(a,e,t){var r=new Pe;Pe.sub(r,t,e),r.normalize();var n=new Pe;Pe.sub(n,a,e);var i=n.dot(r);return i}function vl(a,e){var t=a[a.length-1];t&&t[0]===e[0]&&t[1]===e[1]||a.push(e)}function jwe(a,e,t){for(var r=a.length,n=[],i=0;i<r;i++){var o=a[i],s=a[(i+1)%r],l=Fwe(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&n.push({projPt:qwe(l,e,t),pt:l,idx:i})}if(n.length<2)return[{points:a},{points:a}];n.sort(function(g,k){return g.projPt-k.projPt});var c=n[0],h=n[n.length-1];if(h.idx<c.idx){var d=c;c=h,h=d}for(var p=[c.pt.x,c.pt.y],f=[h.pt.x,h.pt.y],y=[p],v=[f],i=c.idx+1;i<=h.idx;i++)vl(y,a[i].slice());vl(y,f),vl(y,p);for(var i=h.idx+1;i<=c.idx+r;i++)vl(v,a[i%r].slice());return vl(v,p),vl(v,f),[{points:y},{points:v}]}function ZC(a){var e=a.points,t=[],r=[];Y1(e,t,r);var n=new Re(t[0],t[1],r[0]-t[0],r[1]-t[1]),i=n.width,o=n.height,s=n.x,l=n.y,c=new Pe,h=new Pe;return i>o?(c.x=h.x=s+i/2,c.y=l,h.y=l+o):(c.y=h.y=l+o/2,c.x=s,h.x=s+i),jwe(e,c,h)}function mp(a,e,t,r){if(t===1)r.push(e);else{var n=Math.floor(t/2),i=a(e);mp(a,i[0],n,r),mp(a,i[1],t-n,r)}return r}function $we(a,e){for(var t=[],r=0;r<e;r++)t.push(Jf(a));return t}function Gwe(a,e){e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel}function Wwe(a){for(var e=[],t=0;t<a.length;)e.push([a[t++],a[t++]]);return e}function Uwe(a,e){var t=[],r=a.shape,n;switch(a.type){case"rect":Hwe(r,e,t),n=Ze;break;case"sector":WC(r,e,t),n=ka;break;case"circle":WC({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},e,t),n=ka;break;default:var i=a.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=ae(Owe(a.getUpdatedPathProxy(),o),function(k){return Wwe(k)}),l=s.length;if(l===0)mp(ZC,{points:s[0]},e,t);else if(l===e)for(var c=0;c<l;c++)t.push({points:s[c]});else{var h=0,d=ae(s,function(k){var x=[],b=[];Y1(k,x,b);var w=(b[1]-x[1])*(b[0]-x[0]);return h+=w,{poly:k,area:w}});d.sort(function(k,x){return x.area-k.area});for(var p=e,c=0;c<l;c++){var f=d[c];if(p<=0)break;var y=c===l-1?p:Math.ceil(f.area/h*e);y<0||(mp(ZC,{points:f.poly},y,t),p-=y)}}n=xa;break}if(!n)return $we(a,e);for(var v=[],c=0;c<t.length;c++){var g=new n;g.setShape(t[c]),Gwe(a,g),v.push(g)}return v}function Zwe(a,e){var t=a.length,r=e.length;if(t===r)return[a,e];for(var n=[],i=[],o=t<r?a:e,s=Math.min(t,r),l=Math.abs(r-t)/6,c=(s-2)/6,h=Math.ceil(l/c)+1,d=[o[0],o[1]],p=l,f=2;f<s;){var y=o[f-2],v=o[f-1],g=o[f++],k=o[f++],x=o[f++],b=o[f++],w=o[f++],M=o[f++];if(p<=0){d.push(g,k,x,b,w,M);continue}for(var _=Math.min(p,h-1)+1,S=1;S<=_;S++){var C=S/_;Un(y,g,x,w,C,n),Un(v,k,b,M,C,i),y=n[3],v=i[3],d.push(n[1],i[1],n[2],i[2],y,v),g=n[5],k=i[5],x=n[6],b=i[6]}p-=_-1}return o===a?[d,e]:[a,d]}function YC(a,e){for(var t=a.length,r=a[t-2],n=a[t-1],i=[],o=0;o<e.length;)i[o++]=r,i[o++]=n;return i}function Ywe(a,e){for(var t,r,n,i=[],o=[],s=0;s<Math.max(a.length,e.length);s++){var l=a[s],c=e[s],h=void 0,d=void 0;l?c?(t=Zwe(l,c),h=t[0],d=t[1],r=h,n=d):(d=YC(n||l,l),h=l):(h=YC(r||c,c),d=c),i.push(h),o.push(d)}return[i,o]}function XC(a){for(var e=0,t=0,r=0,n=a.length,i=0,o=n-2;i<n;o=i,i+=2){var s=a[o],l=a[o+1],c=a[i],h=a[i+1],d=s*h-c*l;e+=d,t+=(s+c)*d,r+=(l+h)*d}return e===0?[a[0]||0,a[1]||0]:[t/e/3,r/e/3,e]}function Xwe(a,e,t,r){for(var n=(a.length-2)/6,i=1/0,o=0,s=a.length,l=s-2,c=0;c<n;c++){for(var h=c*6,d=0,p=0;p<s;p+=2){var f=p===0?h:(h+p-2)%l+2,y=a[f]-t[0],v=a[f+1]-t[1],g=e[p]-r[0],k=e[p+1]-r[1],x=g-y,b=k-v;d+=x*x+b*b}d<i&&(i=d,o=c)}return o}function Kwe(a){for(var e=[],t=a.length,r=0;r<t;r+=2)e[r]=a[t-r-2],e[r+1]=a[t-r-1];return e}function Jwe(a,e,t,r){for(var n=[],i,o=0;o<a.length;o++){var s=a[o],l=e[o],c=XC(s),h=XC(l);i==null&&(i=c[2]<0!=h[2]<0);var d=[],p=[],f=0,y=1/0,v=[],g=s.length;i&&(s=Kwe(s));for(var k=Xwe(s,l,c,h)*6,x=g-2,b=0;b<x;b+=2){var w=(k+b)%x+2;d[b+2]=s[w]-c[0],d[b+3]=s[w+1]-c[1]}d[0]=s[k]-c[0],d[1]=s[k+1]-c[1];for(var M=r/t,_=-r/2;_<=r/2;_+=M){for(var S=Math.sin(_),C=Math.cos(_),D=0,b=0;b<s.length;b+=2){var A=d[b],T=d[b+1],E=l[b]-h[0],L=l[b+1]-h[1],I=E*C-L*S,N=E*S+L*C;v[b]=I,v[b+1]=N;var z=I-A,R=N-T;D+=z*z+R*R}if(D<y){y=D,f=_;for(var P=0;P<v.length;P++)p[P]=v[P]}}n.push({from:d,to:p,fromCp:c,toCp:h,rotation:-f})}return n}function kp(a){return a.__isCombineMorphing}var KC="__mOriginal_";function xp(a,e,t){var r=KC+e,n=a[r]||a[e];a[r]||(a[r]=a[e]);var i=t.replace,o=t.after,s=t.before;a[e]=function(){var l=arguments,c;return s&&s.apply(this,l),i?c=i.apply(this,l):c=n.apply(this,l),o&&o.apply(this,l),c}}function Nh(a,e){var t=KC+e;a[t]&&(a[e]=a[t],a[t]=null)}function JC(a,e){for(var t=0;t<a.length;t++)for(var r=a[t],n=0;n<r.length;){var i=r[n],o=r[n+1];r[n++]=e[0]*i+e[2]*o+e[4],r[n++]=e[1]*i+e[3]*o+e[5]}}function QC(a,e){var t=a.getUpdatedPathProxy(),r=e.getUpdatedPathProxy(),n=Ywe(Pm(t),Pm(r)),i=n[0],o=n[1],s=a.getComputedTransform(),l=e.getComputedTransform();function c(){this.transform=null}s&&JC(i,s),l&&JC(o,l),xp(e,"updateTransform",{replace:c}),e.transform=null;var h=Jwe(i,o,10,Math.PI),d=[];xp(e,"buildPath",{replace:function(p){for(var f=e.__morphT,y=1-f,v=[],g=0;g<h.length;g++){var k=h[g],x=k.from,b=k.to,w=k.rotation*f,M=k.fromCp,_=k.toCp,S=Math.sin(w),C=Math.cos(w);y1(v,M,_,f);for(var D=0;D<x.length;D+=2){var A=x[D],T=x[D+1],E=b[D],L=b[D+1],I=A*y+E*f,N=T*y+L*f;d[D]=I*C-N*S+v[0],d[D+1]=I*S+N*C+v[1]}var z=d[0],R=d[1];p.moveTo(z,R);for(var D=2;D<x.length;){var E=d[D++],L=d[D++],P=d[D++],O=d[D++],j=d[D++],ee=d[D++];z===E&&R===L&&P===j&&O===ee?p.lineTo(j,ee):p.bezierCurveTo(E,L,P,O,j,ee),z=j,R=ee}}}})}function Om(a,e,t){if(!a||!e)return e;var r=t.done,n=t.during;QC(a,e),e.__morphT=0;function i(){Nh(e,"buildPath"),Nh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Me({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),r&&r()}},t)),e}function Qwe(a,e,t,r,n,i){var o=16;a=n===t?0:Math.round(32767*(a-t)/(n-t)),e=i===r?0:Math.round(32767*(e-r)/(i-r));for(var s=0,l,c=(1<<o)/2;c>0;c/=2){var h=0,d=0;(a&c)>0&&(h=1),(e&c)>0&&(d=1),s+=c*c*(3*h^d),d===0&&(h===1&&(a=c-1-a,e=c-1-e),l=a,a=e,e=l)}return s}function bp(a){var e=1/0,t=1/0,r=-1/0,n=-1/0,i=ae(a,function(s){var l=s.getBoundingRect(),c=s.getComputedTransform(),h=l.x+l.width/2+(c?c[4]:0),d=l.y+l.height/2+(c?c[5]:0);return e=Math.min(h,e),t=Math.min(d,t),r=Math.max(h,r),n=Math.max(d,n),[h,d]}),o=ae(i,function(s,l){return{cp:s,z:Qwe(s[0],s[1],e,t,r,n),path:a[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function eD(a){return Uwe(a.path,a.count)}function Hm(){return{fromIndividuals:[],toIndividuals:[],count:0}}function e6e(a,e,t){var r=[];function n(M){for(var _=0;_<M.length;_++){var S=M[_];kp(S)?n(S.childrenRef()):S instanceof je&&r.push(S)}}n(a);var i=r.length;if(!i)return Hm();var o=t.dividePath||eD,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Hm();r=bp(r),s=bp(s);for(var l=t.done,c=t.during,h=t.individualDelay,d=new mn,p=0;p<i;p++){var f=r[p],y=s[p];y.parent=e,y.copyTransform(d),h||QC(f,y)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function v(M){for(var _=0;_<s.length;_++)s[_].addSelfToZr(M)}xp(e,"addSelfToZr",{after:function(M){v(M)}}),xp(e,"removeSelfFromZr",{after:function(M){for(var _=0;_<s.length;_++)s[_].removeSelfFromZr(M)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Nh(e,"addSelfToZr"),Nh(e,"removeSelfFromZr")}var k=s.length;if(h)for(var x=k,b=function(){x--,x===0&&(g(),l&&l())},p=0;p<k;p++){var w=h?Me({delay:(t.delay||0)+h(p,k,r[p],s[p]),done:b},t):t;Om(r[p],s[p],w)}else e.__morphT=0,e.animateTo({__morphT:1},Me({during:function(M){for(var _=0;_<k;_++){var S=s[_];S.__morphT=e.__morphT,S.dirtyShape()}c&&c(M)},done:function(){g();for(var M=0;M<a.length;M++)Nh(a[M],"updateTransform");l&&l()}},t));return e.__zr&&v(e.__zr),{fromIndividuals:r,toIndividuals:s,count:k}}function t6e(a,e,t){var r=e.length,n=[],i=t.dividePath||eD;function o(f){for(var y=0;y<f.length;y++){var v=f[y];kp(v)?o(v.childrenRef()):v instanceof je&&n.push(v)}}if(kp(a)){o(a.childrenRef());var s=n.length;if(s<r)for(var l=0,c=s;c<r;c++)n.push(Jf(n[l++%s]));n.length=r}else{n=i({path:a,count:r});for(var h=a.getComputedTransform(),c=0;c<n.length;c++)n[c].setLocalTransform(h);if(n.length!==r)return console.error("Invalid morphing: unmatched splitted path"),Hm()}n=bp(n),e=bp(e);for(var d=t.individualDelay,c=0;c<r;c++){var p=d?Me({delay:(t.delay||0)+d(c,r,n[c],e[c])},t):t;Om(n[c],e[c],p)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function tD(a){return te(a[0])}function aD(a,e){for(var t=[],r=a.length,n=0;n<r;n++)t.push({one:a[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)t[o%r].many.push(e[n][o])}for(var s=0,n=r-1;n>=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,c=Math.ceil(i/2);t[n].many=l.slice(c,i),t[s].many=l.slice(0,c),s++}return t}var a6e={clone:function(a){for(var e=[],t=1-Math.pow(1-a.path.style.opacity,1/a.count),r=0;r<a.count;r++){var n=Jf(a.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function Fm(a,e,t,r,n,i){if(!a.length||!e.length)return;var o=ws("update",r,n);if(!(o&&o.duration>0))return;var s=r.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),c,h;tD(a)&&(c=a,h=e),tD(e)&&(c=e,h=a);function d(k,x,b,w,M){var _=k.many,S=k.one;if(_.length===1&&!M){var C=x?_[0]:S,D=x?S:_[0];if(kp(C))d({many:[C],one:D},!0,b,w,!0);else{var A=s?Me({delay:s(b,w)},l):l;Om(C,D,A),i(C,D,C,D,A)}}else for(var T=Me({dividePath:a6e[t],individualDelay:s&&function(R,P,O,j){return s(R+b,w)}},l),E=x?e6e(_,S,T):t6e(S,_,T),L=E.fromIndividuals,I=E.toIndividuals,N=L.length,z=0;z<N;z++){var A=s?Me({delay:s(z,N)},l):l;i(L[z],I[z],x?_[z]:k.one,x?k.one:_[z],A)}}for(var p=c?c===a:a.length>e.length,f=c?aD(h,c):aD(p?e:a,[p?a:e]),y=0,v=0;v<f.length;v++)y+=f[v].many.length;for(var g=0,v=0;v<f.length;v++)d(f[v],p,g,y),g+=f[v].many.length}function Ko(a){if(!a)return[];if(te(a)){for(var e=[],t=0;t<a.length;t++)e.push(Ko(a[t]));return e}var r=[];return a.traverse(function(n){n instanceof je&&!n.disableMorphing&&!n.invisible&&!n.ignore&&r.push(n)}),r}var qm={},rD=1e4,r6e=0,nD=1,iD=2,n6e=Ue();function i6e(a,e){for(var t=a.dimensions,r=0;r<t.length;r++){var n=a.getDimensionInfo(t[r]);if(n&&n.otherDims[e]===0)return t[r]}}function o6e(a,e,t){var r=a.getDimensionInfo(t),n=r&&r.ordinalMeta;if(r){var i=a.get(r.name,e);return n&&n.categories[i]||i+""}}function oD(a,e,t,r){var n=r?"itemChildGroupId":"itemGroupId",i=i6e(a,n);if(i){var o=o6e(a,e,i);return o}var s=a.getRawDataItem(e),l=r?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!r)return t||a.getId(e)}function sD(a){var e=[];return V(a,function(t){var r=t.data,n=t.dataGroupId;if(r.count()>rD){qm.NODE_ENV!=="production"&&Mt("Universal transition is disabled on large data > 10k.");return}for(var i=r.getIndices(),o=0;o<i.length;o++)e.push({data:r,groupId:oD(r,o,n,!1),childGroupId:oD(r,o,n,!0),divide:t.divide,dataIndex:o})}),e}function jm(a,e,t){a.traverse(function(r){r instanceof je&&mt(r,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function $m(a){if(a.parent){var e=a.getComputedTransform();a.setLocalTransform(e),a.parent.remove(a)}}function gl(a){a.stopAnimation(),a.isGroup&&a.traverse(function(e){e.stopAnimation()})}function s6e(a,e,t){var r=ws("update",t,e);r&&a.traverse(function(n){if(n instanceof Xa){var i=yhe(n);i&&n.animateFrom({style:i},r)}})}function l6e(a,e){var t=a.length;if(t!==e.length)return!1;for(var r=0;r<t;r++){var n=a[r],i=e[r];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function lD(a,e,t){var r=sD(a),n=sD(e);function i(b,w,M,_,S){(M||b)&&w.animateFrom({style:M&&M!==b?K(K({},M.style),b.style):b.style},S)}var o=!1,s=r6e,l=ge(),c=ge();r.forEach(function(b){b.groupId&&l.set(b.groupId,!0),b.childGroupId&&c.set(b.childGroupId,!0)});for(var h=0;h<n.length;h++){var d=n[h].groupId;if(c.get(d)){s=nD;break}var p=n[h].childGroupId;if(p&&l.get(p)){s=iD;break}}function f(b,w){return function(M){var _=M.data,S=M.dataIndex;return w?_.getId(S):b?s===nD?M.childGroupId:M.groupId:s===iD?M.childGroupId:M.groupId}}var y=l6e(r,n),v={};if(!y)for(var h=0;h<n.length;h++){var g=n[h],k=g.data.getItemGraphicEl(g.dataIndex);k&&(v[k.id]=!0)}function x(b,w){var M=r[w],_=n[b],S=_.data.hostModel,C=M.data.getItemGraphicEl(M.dataIndex),D=_.data.getItemGraphicEl(_.dataIndex);if(C===D){D&&s6e(D,_.dataIndex,S);return}C&&v[C.id]||D&&(gl(D),C?(gl(C),$m(C),o=!0,Fm(Ko(C),Ko(D),_.divide,S,b,i)):jm(D,S,b))}new An(r,n,f(!0,y),f(!1,y),null,"multiple").update(x).updateManyToOne(function(b,w){var M=n[b],_=M.data,S=_.hostModel,C=_.getItemGraphicEl(M.dataIndex),D=et(ae(w,function(A){return r[A].data.getItemGraphicEl(r[A].dataIndex)}),function(A){return A&&A!==C&&!v[A.id]});C&&(gl(C),D.length?(V(D,function(A){gl(A),$m(A)}),o=!0,Fm(Ko(D),Ko(C),M.divide,S,b,i)):jm(C,S,M.dataIndex))}).updateOneToMany(function(b,w){var M=r[w],_=M.data.getItemGraphicEl(M.dataIndex);if(!(_&&v[_.id])){var S=et(ae(b,function(D){return n[D].data.getItemGraphicEl(n[D].dataIndex)}),function(D){return D&&D!==_}),C=n[b[0]].data.hostModel;S.length&&(V(S,function(D){return gl(D)}),_?(gl(_),$m(_),o=!0,Fm(Ko(_),Ko(S),M.divide,C,b[0],i)):V(S,function(D){return jm(D,C,b[0])}))}}).updateManyToMany(function(b,w){new An(w,b,function(M){return r[M].data.getId(r[M].dataIndex)},function(M){return n[M].data.getId(n[M].dataIndex)}).update(function(M,_){x(b[M],w[_])}).execute()}).execute(),o&&V(e,function(b){var w=b.data,M=w.hostModel,_=M&&t.getViewOfSeriesModel(M),S=ws("update",M,0);_&&M.isAnimationEnabled()&&S&&S.duration>0&&_.group.traverse(function(C){C instanceof je&&!C.animators.length&&C.animateFrom({style:{opacity:0}},S)})})}function cD(a){var e=a.getModel("universalTransition").get("seriesKey");return e||a.id}function hD(a){return te(a)?a.sort().join(","):a}function _i(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function c6e(a,e){var t=ge(),r=ge(),n=ge();V(a.oldSeries,function(o,s){var l=a.oldDataGroupIds[s],c=a.oldData[s],h=cD(o),d=hD(h);r.set(d,{dataGroupId:l,data:c}),te(h)&&V(h,function(p){n.set(p,{key:d,dataGroupId:l,data:c})})});function i(o){t.get(o)&&Mt("Duplicated seriesKey in universalTransition "+o)}return V(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),c=cD(o),h=hD(c),d=r.get(h);if(d)qm.NODE_ENV!=="production"&&i(h),t.set(h,{oldSeries:[{dataGroupId:d.dataGroupId,divide:_i(d.data),data:d.data}],newSeries:[{dataGroupId:s,divide:_i(l),data:l}]});else if(te(c)){qm.NODE_ENV!=="production"&&i(h);var p=[];V(c,function(v){var g=r.get(v);g.data&&p.push({dataGroupId:g.dataGroupId,divide:_i(g.data),data:g.data})}),p.length&&t.set(h,{oldSeries:p,newSeries:[{dataGroupId:s,data:l,divide:_i(l)}]})}else{var f=n.get(c);if(f){var y=t.get(f.key);y||(y={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:_i(f.data)}],newSeries:[]},t.set(f.key,y)),y.newSeries.push({dataGroupId:s,data:l,divide:_i(l)})}}}}),t}function uD(a,e){for(var t=0;t<a.length;t++){var r=e.seriesIndex!=null&&e.seriesIndex===a[t].seriesIndex||e.seriesId!=null&&e.seriesId===a[t].id;if(r)return t}}function h6e(a,e,t,r){var n=[],i=[];V(it(a.from),function(o){var s=uD(e.oldSeries,o);s>=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:_i(e.oldData[s]),groupIdDim:o.dimension})}),V(it(a.to),function(o){var s=uD(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:_i(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&lD(n,i,r)}function u6e(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){V(it(r.seriesTransition),function(n){V(it(n.to),function(i){for(var o=r.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][Pu]=!0)})})}),a.registerUpdateLifecycle("series:transition",function(e,t,r){var n=n6e(t);if(n.oldSeries&&r.updatedSeries&&r.optionChanged){var i=r.seriesTransition;if(i)V(it(i),function(f){h6e(f,n,r,t)});else{var o=c6e(n,r);V(o.keys(),function(f){var y=o.get(f);lD(y.oldSeries,y.newSeries,t)})}V(r.updatedSeries,function(f){f[Pu]&&(f[Pu]=!1)})}for(var s=e.getSeries(),l=n.oldSeries=[],c=n.oldDataGroupIds=[],h=n.oldData=[],d=0;d<s.length;d++){var p=s[d].getData();p.count()<rD&&(l.push(s[d]),c.push(s[d].get("dataGroupId")),h.push(p))}})}He([Y0e]),He([$0e]),He([vfe,Vfe,Ffe,_2e,B2e,_ye,Qye,Pve,oge,dge,wge,vme,qme,eke,vke,xke,Vke,Rke,Yke,t5e,u5e,Z5e]),He(p4e),He(H4e),He(YM),He(Q4e),He(v7),He(nxe),He(pxe),He(a3e),He(w3e),He(Sh),He(H3e),He(j3e),He(Q3e),He(sbe),He(fbe),He(xbe),He(Vbe),He(Xbe),He(gC),He(bC),He(gwe),He(PC),He(OC),He(wwe),He(zwe),He(Rwe),He(u6e),He(s0e);const d6e={class:"space-y-4"},p6e={__name:"vs-editor-form-yaml",props:{yamlValue:{type:null,default:()=>""},widgetName:{type:String},data:{type:Object}},setup(a,{expose:e}){const t=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si).then(h=>h.VsInputMonaco)),r=u.ref(null),{$notify:n}=u.getCurrentInstance().proxy,i=a,o=(h,{dimensions:d,source:p})=>{const f=h.getOption(),{data:y,...v}=(f==null?void 0:f.series)[0],[,...g]=d||[],k=g.map((x,b)=>({...(f==null?void 0:f.series[b])||{},data:p.map(w=>w[b+1]),name:x}));h==null||h.setOption({...f||{},dataset:{dimensions:d,source:p},series:k,xAxis:{type:"category"},yAxis:{}},!0)},s=h=>{const d=document.getElementById(h);if(!d)return null;const p=uy(d);return p||null},l=u.ref(i.yamlValue),c=async()=>{try{await Wt.put(`/bi-dashboard/${r.value}/${i.widgetName}`,{yml:l.value});const h=s(i.widgetName);if(h){const d=await Wt.get(`/bi-data?dashboard=${r.value}&widget=${i.widgetName}`);o(h,d)}n({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{n({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return u.onMounted(()=>{const h=new URLSearchParams(window.top.location.search);r.value=h.get("dashboard")}),e({requestUpdateWidget:c}),(h,d)=>(u.openBlock(),u.createElementBlock("div",d6e,[u.createVNode(u.unref(t),{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=p=>l.value=p),syntax:"yaml",theme:"vs-light",height:400,minimap:!1},null,8,["modelValue"])]))}},f6e={class:"pt-[10px]"},dD={"vs-editor-form-style":$ie,"vs-editor-form-data":_oe,"vs-editor-form-yaml":p6e,"vs-editor-form-controls":{__name:"vs-editor-form-controls",props:{widgetName:{type:String},controls:{type:Object,default:()=>{}},columns:{type:Array,default:()=>[]}},emits:["update-dashboard"],setup(a,{emit:e}){var h;const t=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si)),{$notify:r}=u.getCurrentInstance().proxy,n=e,i=a,o=u.ref(null),s={granularity:{ua:"Granularity",type:"checkbox",options:["week","month","quarter","year"]},export:{ua:"Export",type:"Switcher"},groupby:{ua:"Groupby",type:"checkbox",options:(h=i.columns)==null?void 0:h.map(({name:d})=>d)}},l=u.ref(i.controls||{}),c=async()=>{try{await Wt.put(`/bi-dashboard/${o.value}/${i.widgetName}`,{controls:l.value}),await r({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),staticTypes!=null&&staticTypes.includes(l.value.type)&&n("update-dashboard")}catch{await r({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return u.onMounted(()=>{const d=new URLSearchParams(window.top.location.search);o.value=d.get("dashboard")}),(d,p)=>{const f=u.resolveComponent("VsButton");return u.openBlock(),u.createElementBlock("div",f6e,[u.createVNode(f,{class:"ml-[10px] mb-[10px]",type:"plain",onClick:c},{default:u.withCtx(()=>p[1]||(p[1]=[u.createTextVNode(" Зберегти ")])),_:1}),u.createVNode(u.unref(t),{schema:s,values:l.value,"onUpdate:values":p[0]||(p[0]=y=>l.value=y)},null,8,["values"])])}}}},y6e={key:0,class:"p-4 text-sm text-amber-700 bg-amber-50 rounded-lg"},pD={__name:"editor-tab-error-boundary",props:{tabComponent:{type:Object,default:null},tabKey:{type:[String,Number],default:""}},emits:["update-dashboard"],setup(a,{expose:e}){const t=a,r=u.ref(null);function n(){var o,s;(s=(o=r.value)==null?void 0:o.requestUpdateWidget)==null||s.call(o)}e({save:n});const i=u.ref(!1);return u.onErrorCaptured((o,s,l)=>(console.error("Editor tab error:",o,l),i.value=!0,!1)),u.watch(()=>t.tabComponent,()=>{i.value=!1},{immediate:!0}),(o,s)=>i.value?(u.openBlock(),u.createElementBlock("div",y6e," Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")):(u.openBlock(),u.createBlock(u.resolveDynamicComponent(a.tabComponent),u.mergeProps({ref_key:"tabRef",ref:r,key:a.tabKey||"tab"},o.$attrs,{onUpdateDashboard:s[0]||(s[0]=l=>o.$emit("update-dashboard"))}),null,16))}},v6e={class:"h-full flex flex-col bg-white shrink-0 !w-[400px] border rounded-xl overflow-hidden border-gray-200"},g6e={key:0,class:"flex flex-col min-h-0 flex-1"},m6e={class:"flex items-center border-b border-gray-200 bg-white shrink-0 px-4 h-[49px]"},k6e={class:"flex items-center gap-6 min-w-0"},x6e=["onClick"],b6e={key:0,class:"absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 rounded-full"},w6e={class:"flex items-center gap-1 ml-auto shrink-0"},M6e={key:1,class:"flex-1 min-h-0 overflow-auto px-4 py-4 [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},_6e={key:0},S6e={key:1},C6e={class:"p-4"},D6e={class:"flex justify-end mt-4 gap-x-3"},A6e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},T6e={__name:"vs-editor-forms",props:u.mergeModels({selectedWidgetData:{type:Object,required:!1,default:null},selectedDashboard:{type:String,default:()=>""},currentWidgetData:{type:String,default:()=>""}},{selectedWidget:{},selectedWidgetModifiers:{}}),emits:u.mergeModels(["update-data"],["update:selectedWidget"]),setup(a,{emit:e}){var b,w;const t=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si)),r=(w=(b=u.getCurrentInstance())==null?void 0:b.proxy)==null?void 0:w.$notify,n=e,i=u.ref(null),o=a,s=u.ref(!1),l=u.ref(!0),c=u.ref(!1),h=u.ref({}),d=u.useModel(a,"selectedWidget"),p=["table","text","number","stat","progress","listbar","map","pivot"],f=u.ref("data"),y=async()=>{try{await Wt.delete(`/bi-dashboard/${o.selectedDashboard}/${o.selectedWidgetData.name}`);const M=new URL(window.top.location.href);M.searchParams.set("dashboard",o.selectedDashboard),M.searchParams.delete("widget"),window.top.history.pushState({},"",M),n("update-data"),s.value=!1,r({type:"success",title:"Успішно!",message:"Віджет успішно видалено"})}catch(M){console.error(M),r({type:"error",title:"Помилка!",message:"При спробі видалити віджет виникла помилка"})}},v=u.computed(()=>{const M=[{id:"data",label:"Дані"},{id:"style",label:"Стилі"},{id:"yaml",label:"{ }"}];return M==null?void 0:M.filter(_=>{var S,C,D;return _.id==="style"?!(p!=null&&p.includes(((S=o.selectedWidgetData)==null?void 0:S.type)||((D=(C=o.selectedWidgetData)==null?void 0:C.data)==null?void 0:D.type))):!0})}),g=()=>{var M,_,S,C,D,A,T,E,L;h.value={title:(M=o.selectedWidgetData)==null?void 0:M.title,type:(_=o.selectedWidgetData)==null?void 0:_.type,table:(S=o.selectedWidgetData)==null?void 0:S.table_name,query:(D=(C=o.selectedWidgetData)==null?void 0:C.data)==null?void 0:D.query,x:(T=(A=o.selectedWidgetData)==null?void 0:A.data)==null?void 0:T.x,cls:(L=(E=o.selectedWidgetData)==null?void 0:E.data)==null?void 0:L.cls},c.value=!0},k=async()=>{try{await Wt.put(`/bi-dashboard/${o.selectedDashboard}/${o.selectedWidgetData.name}`,h.value),r({type:"success",title:"Успішно!",message:"Дані успішно змінено"}),await n("update-data"),c.value=!1}catch{r({type:"error",title:"Помилка!",message:"При спробі внести зміни виникла помилка"})}};u.watch(d,M=>{l.value=!1;const _=new URL(window.top.location.href);M?(_.searchParams.set("widget",M),window.top.history.pushState({},"",_)):(_.searchParams.delete("widget"),window.top.history.pushState({},"",_)),setTimeout(()=>l.value=!0)});const x={title:{type:"text",ua:"Заголовок",placeholder:"Заголовок",validators:["required"]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"text",ua:"Таблиця",placeholder:"Таблиця"},query:{type:"Text",ua:"Query",placeholder:"Query"},x:{type:"Text",ua:"X Axis",placeholder:"X Axis"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}};return(M,_)=>{var C,D,A,T,E,L,I,N,z,R,P;const S=u.resolveComponent("VsPopover");return u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("div",v6e,[a.selectedWidgetData?(u.openBlock(),u.createElementBlock("div",g6e,[u.createElementVNode("div",m6e,[u.createElementVNode("nav",k6e,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(v.value,O=>(u.openBlock(),u.createElementBlock("button",{key:O.id,type:"button",class:u.normalizeClass(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap",f.value===O.id?"text-blue-600":"text-gray-600 hover:text-gray-900"]),onClick:j=>f.value=O.id},[u.createTextVNode(u.toDisplayString(O.label)+" ",1),f.value===O.id?(u.openBlock(),u.createElementBlock("span",b6e)):u.createCommentVNode("",!0)],10,x6e))),128))]),u.createElementVNode("div",w6e,[u.createVNode(S,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{type:"button",class:"h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"Зберегти",onClick:_[0]||(_[0]=O=>{var j,ee;return(ee=(j=i.value)==null?void 0:j.save)==null?void 0:ee.call(j)})},[u.createVNode(u.unref(Nk),{class:"h-4 w-4"})])]),default:u.withCtx(()=>[_[9]||(_[9]=u.createTextVNode(" Зберегти "))]),_:1}),u.createVNode(S,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{type:"button",class:"h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",onClick:g},[u.createVNode(Wk,{class:"h-4 w-4"})])]),default:u.withCtx(()=>[_[10]||(_[10]=u.createTextVNode(" Редагувати віджет "))]),_:1}),u.createVNode(S,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{type:"button",class:"h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",onClick:_[1]||(_[1]=O=>s.value=!0)},[u.createVNode(u.unref(Gk),{class:"h-4 w-4"})])]),default:u.withCtx(()=>[_[11]||(_[11]=u.createTextVNode(" Видалити віджет "))]),_:1})])]),(C=a.currentWidgetData)!=null&&C.status?(u.openBlock(),u.createBlock(t1,{key:0,title:(D=a.currentWidgetData)==null?void 0:D.title,text:(A=a.currentWidgetData)==null?void 0:A.message},null,8,["title","text"])):(u.openBlock(),u.createElementBlock("div",M6e,[l.value&&a.currentWidgetData?(u.openBlock(),u.createElementBlock("div",_6e,[u.createVNode(pD,{ref_key:"tabPanelRef",ref:i,"tab-key":f.value,"tab-component":u.unref(dD)["vs-editor-form-"+f.value],widgetName:(T=a.selectedWidgetData)==null?void 0:T.name,yamlValue:((E=a.selectedWidgetData)==null?void 0:E.yml)||"",data:a.selectedWidgetData,controls:(L=a.selectedWidgetData)==null?void 0:L.controls,columns:(I=a.currentWidgetData)==null?void 0:I.columns,onUpdateDashboard:_[2]||(_[2]=O=>M.$emit("update-data"))},null,8,["tab-key","tab-component","widgetName","yamlValue","data","controls","columns"])])):(u.openBlock(),u.createElementBlock("div",S6e,[u.createVNode(pD,{ref_key:"tabPanelRef",ref:i,"tab-key":f.value,"tab-component":u.unref(dD)["vs-editor-form-"+f.value],widgetName:(N=a.selectedWidgetData)==null?void 0:N.name,yamlValue:((z=a.selectedWidgetData)==null?void 0:z.yml)||"",data:a.selectedWidgetData,controls:(R=a.selectedWidgetData)==null?void 0:R.controls,columns:(P=a.currentWidgetData)==null?void 0:P.columns,onUpdateDashboard:_[3]||(_[3]=O=>M.$emit("update-data"))},null,8,["tab-key","tab-component","widgetName","yamlValue","data","controls","columns"])])),u.createVNode(El,{teleport:"#modal",visible:s.value,title:"Ви впевнені?",onClose:_[5]||(_[5]=O=>s.value=!1)},{default:u.withCtx(()=>[u.createElementVNode("div",C6e,[_[12]||(_[12]=u.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей віджет? ",-1)),u.createElementVNode("div",D6e,[u.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:_[4]||(_[4]=O=>s.value=!1)}," Скасувати "),u.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:y}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"])]))])):(u.openBlock(),u.createBlock(t1,{key:1,title:"Оберіть один з віджетів",text:"",class:"p-4"}))]),u.createVNode(El,{teleport:"#modal",visible:c.value,title:"Редагувати віджет",onClose:_[8]||(_[8]=O=>c.value=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",A6e,[u.createElementVNode("button",{style:{border:"1px solid #000"},onClick:_[7]||(_[7]=O=>c.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg hover:bg-gray-100 duration-300"}," Скасувати "),u.createElementVNode("button",{onClick:k,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:u.withCtx(()=>[x?(u.openBlock(),u.createBlock(u.unref(t),{key:0,schema:x,values:h.value,"onUpdate:values":_[6]||(_[6]=O=>h.value=O)},null,8,["values"])):u.createCommentVNode("",!0)]),_:1},8,["visible"])],64)}}},E6e={class:"overflow-hidden flex flex-col min-h-[480px]"},V6e={class:"flex-1 flex min-h-0 gap-4"},L6e={class:"flex-1 min-w-0 pb-4 overflow-auto bg-gray-50/50"},I6e={class:"w-[400px] shrink-0 flex flex-col"},N6e={__name:"vs-widget-editor-panel",props:{selectedWidget:{type:String,default:""},selectedWidgetData:{type:Object,default:null},currentWidgetData:{type:Object,default:null},selectedDashboard:{type:String,default:""},dashboardWidgets:{type:Array,default:()=>[]}},emits:["update:selectedWidget","update-data"],setup(a,{emit:e}){const t=a,r=e,n=u.computed({get:()=>t.selectedWidget,set:i=>r("update:selectedWidget",i)});return(i,o)=>(u.openBlock(),u.createElementBlock("div",E6e,[u.createElementVNode("div",V6e,[u.createElementVNode("div",L6e,[u.createVNode(Tl,{dashboard:a.selectedDashboard,widget:a.selectedWidget,"selected-widget":a.selectedWidget,"dashboard-widgets":a.dashboardWidgets,"filter-u-rl":void 0,class:"max-h-full"},null,8,["dashboard","widget","selected-widget","dashboard-widgets"])]),u.createElementVNode("div",I6e,[u.createVNode(T6e,{selectedWidget:n.value,"onUpdate:selectedWidget":o[0]||(o[0]=s=>n.value=s),selectedWidgetData:a.selectedWidgetData,currentWidgetData:a.currentWidgetData,selectedDashboard:a.selectedDashboard,onUpdateData:o[1]||(o[1]=s=>i.$emit("update-data"))},null,8,["selectedWidget","selectedWidgetData","currentWidgetData","selectedDashboard"])])])]))}},fD={__name:"icon-grid",setup(a){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Tk),u.mergeProps(e.$attrs,{size:24}),null,16))}},z6e={__name:"icon-filter",setup(a){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Zp),u.mergeProps(e.$attrs,{size:24}),null,16))}},yD={__name:"icon-table",setup(a){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Bk),u.mergeProps(e.$attrs,{size:24}),null,16))}},B6e={__name:"icon-more",setup(a){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Sk),u.mergeProps(e.$attrs,{size:24}),null,16))}},P6e=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si)),R6e={components:{VsModal:El,VForm:P6e,deleteIcon:Gk,editIcon:Wk,IconGrid:fD,IconMore:B6e,IconFilter:z6e,IconTable:yD},watch:{dashboardData(a){var t,r;if(this.formEditValue={title:a==null?void 0:a.title,description:a==null?void 0:a.description,table_name:a==null?void 0:a.table_name,db:a==null?void 0:a.db,public:a==null?void 0:a.public,words:a==null?void 0:a.words},!((t=a==null?void 0:a.panels)!=null&&t.length))return[];const e=(r=a==null?void 0:a.panels)==null?void 0:r.map(n=>{var s,l;const{title:i="",type:o=""}=((l=(s=a==null?void 0:a.widgets)==null?void 0:s.find(c=>(c==null?void 0:c.name)===(n==null?void 0:n.widget)))==null?void 0:l.data)||{};return{title:i,type:o,...n}});this.formGridValue={panels:e},this.formFilterValue={filters:(a==null?void 0:a.filters)||null}}},data(){return{isDeleteConfirm:!1,isFormEdit:!1,isFormGrid:!1,isFormFilter:!1,isVisibleTableColumns:!1,formEditValue:{},formGridValue:{},formFilterValue:{},editDashboardScheme:[{type:"Text",key:"title",label:"Заголовок",validators:["required"]},{type:"Text",key:"description",label:"Опис"},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці"},{type:"Text",key:"words",label:"Ключові слова"},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],editGridScheme:[{type:"DataTable",ua:"Панелі",key:"panels",editable:!1,addition:!1,colModel:[{name:"title",ua:"Назва",type:"Text",key:"col"},{name:"type",ua:"Тип",type:"Text",key:"col",disabled:!0},{name:"widget",type:"Text",ua:"Назва",key:"widget",hiddenCol:!0},{name:"col",ua:"Кількість стовпчиків",type:"Text",key:"col"}]}],editFilterScheme:[{name:"filters",type:"DataTable",colModel:[{ua:"Підпис",type:"Text",key:"label"},{ua:"Тип",type:"Text",key:"type"}]}]}},props:{selected:{type:String,default:()=>""},dashboardData:{type:Object,default:()=>{}},selectedWidgetData:{type:Object,default:()=>{}},columns:{type:Array}},methods:{async editDashboard(){var a,e;try{(e=(a=this.$refs)==null?void 0:a.formEdit)==null||e.doValidation(),await Wt.put(`/bi-dashboard/${this.selected}`,this.formEditValue),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormEdit=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"при спробі оновити дані виникла помилка"})}},async editDashboardGrid(){var a,e;try{(e=(a=this.$refs)==null?void 0:a.formGrid)==null||e.doValidation(),await Wt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormGrid=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async editDashboardFilters(){var a,e;try{(e=(a=this.$refs)==null?void 0:a.formFilter)==null||e.doValidation(),await Wt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue,...this.formFilterValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormFilter=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async deleteDashboard(){try{await Wt.delete(`/bi-dashboard/${this.selected}`);const a=new URL(window.top.location.href);a.searchParams.delete("dashboard"),a.searchParams.delete("widget"),window.history.pushState({},"",a),await this.$notify({title:"Успішно!",type:"success",message:"Дашборд видалено успішно"}),this.isDeleteConfirm=!1,await this.$emit("update:selected",null),await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі видалити дашборд виникла помилка"})}},closePopover(){document.body.click()}}},O6e={key:0,class:"flex items-center gap-4"},H6e={class:"h-[30px] w-[30px] flex items-center justify-center"},F6e={class:"flex flex-col items-start -ml-2 -mr-2"},q6e={class:"p-4"},j6e={class:"flex justify-end mt-4 gap-x-3"},$6e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},G6e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},W6e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function U6e(a,e,t,r,n,i){const o=u.resolveComponent("IconFilter"),s=u.resolveComponent("VsPopover"),l=u.resolveComponent("IconGrid"),c=u.resolveComponent("IconMore"),h=u.resolveComponent("VsModal"),d=u.resolveComponent("VForm");return u.openBlock(),u.createElementBlock("div",null,[t.selected?(u.openBlock(),u.createElementBlock("div",O6e,[u.createVNode(s,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{class:"h-[30px] w-[30px] flex items-center justify-center",onClick:e[0]||(e[0]=p=>n.isFormFilter=!0)},[u.createVNode(o,{class:"h-[20px] text-gray-500"})])]),default:u.withCtx(()=>[e[19]||(e[19]=u.createTextVNode(" Редагувати фільтри "))]),_:1}),u.createVNode(s,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{class:"h-[30px] w-[30px] flex items-center justify-center",onClick:e[1]||(e[1]=p=>n.isFormGrid=!0)},[u.createVNode(l,{class:"h-[20px] text-gray-500"})])]),default:u.withCtx(()=>[e[20]||(e[20]=u.createTextVNode(" Редагувати структуру дашборду "))]),_:1}),u.createVNode(s,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createVNode(s,{placement:"bottom-left"},{reference:u.withCtx(()=>[u.createElementVNode("button",H6e,[u.createVNode(c,{class:"h-[20px]"})])]),default:u.withCtx(()=>[u.createElementVNode("div",F6e,[u.createElementVNode("button",{onClick:e[2]||(e[2]=p=>{i.closePopover(),n.isFormEdit=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Редагувати дашборд "),u.createElementVNode("button",{onClick:e[3]||(e[3]=p=>{i.closePopover(),n.isDeleteConfirm=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Видалити дашборд ")])]),_:1})]),default:u.withCtx(()=>[e[21]||(e[21]=u.createTextVNode(" Керування дашбордом "))]),_:1})])):u.createCommentVNode("",!0),u.createVNode(h,{teleport:"#modal",visible:n.isDeleteConfirm,size:"small",title:"Ви впевнені?",onClose:e[6]||(e[6]=p=>n.isDeleteConfirm=!1)},{default:u.withCtx(()=>[u.createElementVNode("div",q6e,[e[22]||(e[22]=u.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей дашборд? ",-1)),u.createElementVNode("div",j6e,[u.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=p=>n.isDeleteConfirm=!1)}," Скасувати "),u.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[5]||(e[5]=(...p)=>i.deleteDashboard&&i.deleteDashboard(...p))}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"]),u.createVNode(h,{teleport:"#modal",visible:n.isFormEdit,title:"Редагувати дашборд",onClose:e[10]||(e[10]=p=>n.isFormEdit=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",$6e,[u.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[8]||(e[8]=p=>n.isFormEdit=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),u.createElementVNode("button",{onClick:e[9]||(e[9]=(...p)=>i.editDashboard&&i.editDashboard(...p)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:u.withCtx(()=>[u.createVNode(d,{ref:"formEdit",schema:n.editDashboardScheme,values:n.formEditValue,"onUpdate:values":e[7]||(e[7]=p=>n.formEditValue=p)},null,8,["schema","values"])]),_:1},8,["visible"]),u.createVNode(h,{teleport:"#modal",visible:n.isFormGrid,title:"Редагувати структуру дашборду",onClose:e[14]||(e[14]=p=>n.isFormGrid=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",G6e,[u.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[12]||(e[12]=p=>n.isFormGrid=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),u.createElementVNode("button",{onClick:e[13]||(e[13]=(...p)=>i.editDashboardGrid&&i.editDashboardGrid(...p)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:u.withCtx(()=>[u.createVNode(d,{ref:"formgrid",schema:n.editGridScheme,values:n.formGridValue,"onUpdate:values":e[11]||(e[11]=p=>n.formGridValue=p)},null,8,["schema","values"])]),_:1},8,["visible"]),u.createVNode(h,{teleport:"#modal",visible:n.isFormFilter,title:"Редагувати фільтри",onClose:e[18]||(e[18]=p=>n.isFormFilter=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",W6e,[u.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[16]||(e[16]=p=>n.isFormFilter=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),u.createElementVNode("button",{onClick:e[17]||(e[17]=(...p)=>i.editDashboardFilters&&i.editDashboardFilters(...p)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:u.withCtx(()=>[u.createVNode(d,{ref:"formFilter",schema:n.editFilterScheme,values:n.formFilterValue,"onUpdate:values":e[15]||(e[15]=p=>n.formFilterValue=p)},null,8,["schema","values"])]),_:1},8,["visible"])])}const Z6e=ft(R6e,[["render",U6e]]),Y6e={class:"flex-1 min-w-0 flex flex-col overflow-auto"},X6e={class:"max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1"},K6e={class:"relative z-10 shrink-0 mt-4 mb-6"},J6e={class:"flex items-center text-sm text-gray-600"},Q6e={key:0,class:"flex items-center justify-between gap-4 mt-3"},e8e={class:"min-w-0"},t8e={class:"text-2xl font-bold text-gray-900"},a8e={key:0,class:"mt-1.5 text-sm text-gray-600"},r8e={class:"flex items-center shrink-0"},n8e={key:1,class:"grid flex-grow w-full grid-cols-12 gap-4 py-4 pr-[15px] min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},i8e=ft({__name:"vs-editor",props:{prefix:String,customClass:{type:String,default:()=>"w-screen h-screen"},initialDashboardId:{type:String,default:""}},emits:["back"],setup(a,{emit:e}){const t=a;Qh(t.prefix||"/api");const r=e,n=u.inject("biClearDashboard",null),i=u.ref(t.initialDashboardId||""),o=u.ref(""),s=u.ref(null),l=u.ref(null),c=u.ref(null),h=async()=>{if(!i.value){s.value=null;return}try{const f=await Wt.get(`/bi-dashboard/${i.value}`);s.value=f}catch(f){console.error(f)}},d=u.computed(()=>{var f,y,v;return(v=Array.isArray((f=s.value)==null?void 0:f.widgets)?(y=s.value)==null?void 0:y.widgets:[])==null?void 0:v.find(g=>(g==null?void 0:g.name)===o.value)}),p=u.computed(()=>{var v,g,k,x,b;const y=[n?{label:"Дашборди",onClick:()=>{n(),r("back")}}:{label:"Дашборди",to:"/editor"}];if((v=s.value)!=null&&v.title||i.value){const w=((g=s.value)==null?void 0:g.title)||i.value||"Редактор",M=!!o.value;y.push({label:w,...M?{onClick:()=>{o.value=""}}:{}})}else y.push({label:"Редактор"});if(o.value&&d.value){const w=((x=(k=d.value)==null?void 0:k.data)==null?void 0:x.title)||((b=d.value)==null?void 0:b.title)||o.value;y.push({label:w})}return y});return u.watch(i,(f,y)=>{var g,k,x;y&&(o.value="");const v=new URL(window.top.location.href);f?((g=v==null?void 0:v.searchParams)==null||g.set("dashboard",f),(x=(k=window.top)==null?void 0:k.history)==null||x.pushState({},"",v),h()):(v==null||v.searchParams.delete("dashboard"),v==null||v.searchParams.delete("widget"))}),u.onMounted(()=>{var f,y;if(t.initialDashboardId)i.value=t.initialDashboardId;else{const v=new URLSearchParams(((y=(f=window.top)==null?void 0:f.location)==null?void 0:y.search)||""),g=v.get("dashboard");g&&(i.value=g),o.value=v.get("widget")||""}h()}),(f,y)=>{var v,g;return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["flex w-full h-full",[a.customClass]])},[u.createElementVNode("div",Y6e,[u.createElementVNode("div",X6e,[u.createElementVNode("div",K6e,[u.createElementVNode("div",J6e,[u.createVNode($k,{items:p.value,compact:""},null,8,["items"])]),i.value&&s.value?(u.openBlock(),u.createElementBlock("div",Q6e,[u.createElementVNode("div",e8e,[u.createElementVNode("h1",t8e,u.toDisplayString(s.value.title||i.value),1),s.value.description?(u.openBlock(),u.createElementBlock("p",a8e,u.toDisplayString(s.value.description),1)):u.createCommentVNode("",!0)]),u.createElementVNode("div",r8e,[o.value?(u.openBlock(),u.createElementBlock("button",{key:0,type:"button",class:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors",onClick:y[0]||(y[0]=k=>o.value="")},[u.createVNode(u.unref(Xp),{class:"w-4 h-4"}),y[6]||(y[6]=u.createTextVNode(" Закрити "))])):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createVNode(Z6e,{selected:i.value,"onUpdate:selected":y[1]||(y[1]=k=>i.value=k),dashboardData:s.value,columns:(v=s.value)==null?void 0:v.columns,selectedWidgetData:d.value,prefix:a.prefix,onUpdateEditor:h},null,8,["selected","dashboardData","columns","selectedWidgetData","prefix"]),u.createElementVNode("button",{type:"button",class:"ml-4 flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",onClick:y[2]||(y[2]=k=>{var x,b;return(b=(x=c.value)==null?void 0:x.open)==null?void 0:b.call(x)})},y[7]||(y[7]=[u.createElementVNode("span",{class:"leading-none"},"+",-1),u.createTextVNode(" Створити віджет ")])),i.value?(u.openBlock(),u.createBlock(qie,{key:0,ref_key:"createWidgetRef",ref:c,inline:"",columns:(g=s.value)==null?void 0:g.columns,selectedDashboard:i.value,onUpdateData:h},null,8,["columns","selectedDashboard"])):u.createCommentVNode("",!0)],64))])])):u.createCommentVNode("",!0)]),o.value&&s.value?(u.openBlock(),u.createBlock(N6e,{key:0,"selected-widget":o.value,"onUpdate:selectedWidget":y[3]||(y[3]=k=>o.value=k),"selected-widget-data":d.value,"current-widget-data":l.value,"selected-dashboard":i.value,"dashboard-widgets":s.value.widgets||[],onUpdateData:h},null,8,["selected-widget","selected-widget-data","current-widget-data","selected-dashboard","dashboard-widgets"])):(u.openBlock(),u.createElementBlock("div",n8e,[s.value?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:1},u.renderList(s.value.panels,(k,x)=>{var b;return u.openBlock(),u.createElementBlock("div",{key:x,class:u.normalizeClass([`col-span-${k.col||12}`,"flex flex-col gap-[10px]"])},[(b=k.widgets)!=null&&b.length?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:0},u.renderList(k.widgets,w=>(u.openBlock(),u.createBlock(Tl,{onClick:M=>o.value=w,"onUpdate:currentWidgetData":y[4]||(y[4]=M=>l.value=M),key:w,dashboard:i.value,widget:w,selectedWidget:o.value,"dashboard-widgets":s.value.widgets,class:u.normalizeClass({"border border-blue-500":o.value===w})},null,8,["onClick","dashboard","widget","selectedWidget","dashboard-widgets","class"]))),128)):(u.openBlock(),u.createBlock(Tl,{key:1,onClick:w=>o.value=k.widget,"onUpdate:currentWidgetData":y[5]||(y[5]=w=>l.value=w),class:u.normalizeClass(["flex flex-col",{"border border-blue-500":o.value===k.widget}]),dashboard:i.value,widget:k.widget,selectedWidget:o.value,"dashboard-widgets":s.value.widgets},null,8,["onClick","class","dashboard","widget","selectedWidget","dashboard-widgets"]))],2)}),128)):(u.openBlock(),u.createBlock(t1,{key:0,class:"col-span-12"}))]))])])],2)}}},[["__scopeId","data-v-cc75be6a"]]),o8e={class:"w-full h-screen"},s8e=u.defineComponent({__name:"vs-editor-page",props:{prefix:{default:"/api"},dashboardId:{default:""}},emits:["back"],setup(a){const e=a,t=e.prefix,r=e.dashboardId;return(n,i)=>(u.openBlock(),u.createElementBlock("div",o8e,[u.createVNode(i8e,{customClass:"h-full w-full",prefix:u.unref(t),"initial-dashboard-id":u.unref(r),onBack:i[0]||(i[0]=o=>n.$emit("back"))},null,8,["prefix","initial-dashboard-id"])]))}}),l8e={class:"relative group h-full"},c8e={class:"flex items-start gap-3 flex-1 min-h-0"},h8e={class:"p-2 bg-blue-50 rounded-lg group-hover:bg-blue-100 transition-colors shrink-0"},u8e={class:"flex-1 min-w-0 flex flex-col min-h-0"},d8e={class:"font-semibold text-gray-900 mb-1 truncate"},p8e={key:0,class:"text-sm text-gray-600 mb-2 line-clamp-2 min-h-10"},f8e={key:1,class:"text-sm text-gray-600 mb-2 line-clamp-2 min-h-10 invisible","aria-hidden":"true"},y8e={key:2,class:"text-sm text-gray-400 mt-1 shrink-0"},v8e=ft({__name:"dashboard-card",props:{title:String,description:String,modified:String,name:String,widgetCount:Number,reserveLines:Number,dashboardRouteName:String,onOpenEditor:Function,onOpenView:Function},setup(a){const e=a,t=Jp(),r=u.ref(!1);function n(){var o;e.dashboardRouteName&&(e.onOpenEditor?e.onOpenEditor(e.dashboardRouteName):(o=t==null?void 0:t.push)==null||o.call(t,{path:"/editor",query:{dashboard:e.dashboardRouteName}}))}function i(o){o.target.closest(".dashboard-card-menu")||(r.value=!1)}return u.onMounted(()=>document.addEventListener("click",i)),u.onUnmounted(()=>document.removeEventListener("click",i)),(o,s)=>(u.openBlock(),u.createElementBlock("div",l8e,[u.createElementVNode("button",{type:"button",class:"w-full h-full bg-white border border-gray-200 rounded-lg p-6 hover:shadow-md hover:border-blue-200 transition-all text-left animate-fade-in flex flex-col",onClick:n},[u.createElementVNode("div",c8e,[u.createElementVNode("div",h8e,[u.createVNode(u.unref(Ak),{size:24,class:"w-5 h-5 text-blue-600"})]),u.createElementVNode("div",u8e,[u.createElementVNode("h3",d8e,u.toDisplayString(a.title),1),a.description?(u.openBlock(),u.createElementBlock("p",p8e,u.toDisplayString(a.description),1)):(u.openBlock(),u.createElementBlock("p",f8e," ")),a.widgetCount!=null?(u.openBlock(),u.createElementBlock("p",y8e,u.toDisplayString(a.widgetCount)+" віджетів ",1)):u.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-cde0f33b"]]),g8e=[{type:"Text",key:"name",label:"Назва",validators:["required"],original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"title",label:"Заголовок",validators:["required"],original:{type:"Text",ua:"Титул",col:8}},{type:"Text",key:"description",label:"Опис",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"words",label:"Ключові слова",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}];function m8e(a){return!Array.isArray(a)||a.length===0?{}:a.reduce((e,t)=>{if(!t||t.key==null)return e;const{key:r,...n}=t;return e[r]=n,e},{})}const k8e={class:"flex-1 bg-gray-50"},x8e={class:"max-w-7xl mx-auto px-6 py-8"},b8e={class:"mb-6"},w8e={class:"flex items-center justify-between mb-6"},M8e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},_8e={class:"flex items-center space-x-4"},S8e={class:"flex-1 relative"},C8e={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},D8e=u.defineComponent({__name:"all-dashboards-page",props:{prefix:{}},setup(a){const e=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si)),t=m8e(g8e),r=u.ref([]),n=u.ref([]);Jp();const i=u.inject("biSetDashboard"),o=a,s=u.ref(null),l=u.ref(!1),c=u.ref({});Qh(o.prefix||"/api");async function h(){try{const g=await Wt.get("/bi-dashboard?type=db"),k=Array.isArray(g==null?void 0:g.rows)?g.rows:[];n.value=k,r.value=k.map(x=>({routeName:String(x.name??""),title:x.title??x.name??"Без назви",description:x.description??null,modified:"-",name:"-"}))}catch(g){console.error("Failed to load dashboards",g),n.value=[],r.value=[]}}async function d(){var k,x,b;const g=(x=(k=u.getCurrentInstance())==null?void 0:k.proxy)==null?void 0:x.$notify;try{await((b=s.value)==null?void 0:b.doValidation()),await Wt.post("/bi-dashboard",c.value),l.value=!1,c.value={},g==null||g({type:"success",title:"Успішно!",message:"Дашборд створено успішно"}),await h()}catch{g==null||g({type:"error",title:"Помилка!",message:"При спробі створити дашборд виникла помилка"})}}u.onMounted(h);const p=u.ref(1),f=()=>{const g=window.innerWidth;p.value=g>=1024?3:g>=768?2:1};u.onMounted(()=>{f(),window.addEventListener("resize",f)}),u.onUnmounted(()=>{window.removeEventListener("resize",f)});const y=g=>g?g.trim().length>70?2:1:0,v=g=>{const k=p.value||1,b=Math.floor(g/k)*k,w=b+k,M=r.value.slice(b,w);let _=0;for(const S of M){const C=y(S.description??null);if(C>_&&(_=C),_===2)break}return _};return u.ref("grid"),(g,k)=>(u.openBlock(),u.createElementBlock("div",k8e,[u.createElementVNode("div",x8e,[u.createElementVNode("div",b8e,[u.createElementVNode("div",w8e,[k[5]||(k[5]=u.createElementVNode("div",null,[u.createElementVNode("h1",{class:"text-3xl font-bold text-gray-900"},"Дашборди"),u.createElementVNode("p",{class:"mt-2 text-gray-600"}," Керуйте та переглядайте свої аналітичні дашборди ")],-1)),u.createElementVNode("button",{type:"button",class:"flex items-center gap-2 px-4 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",onClick:k[0]||(k[0]=x=>l.value=!0)},[u.createVNode(u.unref(Yp),{size:24,class:"w-4 h-4"}),k[4]||(k[4]=u.createElementVNode("span",null,"Новий дашборд",-1))])]),u.createVNode(El,{teleport:"#modal",visible:l.value,title:"Створити дашборд",onClose:k[3]||(k[3]=x=>l.value=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",M8e,[u.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",onClick:k[2]||(k[2]=x=>l.value=!1)}," Скасувати "),u.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300",onClick:d}," Зберегти ")])]),default:u.withCtx(()=>[u.createVNode(u.unref(e),{ref_key:"createFormRef",ref:s,schema:u.unref(t),values:c.value,"onUpdate:values":k[1]||(k[1]=x=>c.value=x)},null,8,["schema","values"])]),_:1},8,["visible"]),u.createElementVNode("div",_8e,[u.createElementVNode("div",S8e,[u.createVNode(u.unref(zk),{size:24,class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),k[6]||(k[6]=u.createElementVNode("input",{type:"text",placeholder:"Пошук дашбордів...",class:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",value:""},null,-1))])])]),u.createElementVNode("div",C8e,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.value,(x,b)=>(u.openBlock(),u.createElementBlock("div",{key:b,class:"cursor-pointer h-full"},[u.createVNode(v8e,{title:x.title,description:x.description,modified:x.modified,name:x.name,reserveLines:v(b),"dashboard-route-name":x.routeName,"on-open-editor":u.unref(i),"on-open-view":u.unref(i)},null,8,["title","description","modified","name","reserveLines","dashboard-route-name","on-open-editor","on-open-view"])]))),128))])])]))}}),A8e=u.defineComponent({__name:"editor-root-page",props:{prefix:{default:"/api"}},setup(a){const e=a,t=u.computed(()=>e.prefix),r=u.ref(""),n=Sie();u.onMounted(()=>{var s;const o=(s=n==null?void 0:n.query)==null?void 0:s.dashboard;o!=null&&typeof o=="string"&&(r.value=o.trim())});const i=u.computed(()=>r.value.length>0);return u.provide("biSetDashboard",o=>{r.value=o||""}),u.provide("biClearDashboard",()=>{r.value=""}),u.provide("biSelectedDashboardId",u.readonly(r)),(o,s)=>i.value?(u.openBlock(),u.createBlock(s8e,{key:`editor-${r.value}`,prefix:t.value,"dashboard-id":r.value,onBack:s[0]||(s[0]=l=>r.value="")},null,8,["prefix","dashboard-id"])):(u.openBlock(),u.createBlock(D8e,{key:0,prefix:t.value},null,8,["prefix"]))}});function dr(a,e){const t=a&&typeof a=="object"&&"value"in a?a.value:a;if(t==null)return"";const r=Number(t);return Number.isNaN(r)?String(t):new Intl.NumberFormat("en",e??{notation:"compact"}).format(r)}function zh(a){if(!(a!=null&&a.includes("T")))return a??"";const[e,t,r]=a.split("T")[0].split("-");return`${r}.${t}.${e}`}function T8e(a){return Intl.NumberFormat("en").format(a??0)}class E8e{static getTooltipOptions(e=!0){return{show:e,axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}}}}const V8e={show_label:!1,show_legend:!1,label:null,legend:{position:null},colors:null,color:null,title:null};function L8e(){const a="0123456789ABCDEF";let e="#";for(let t=0;t<6;t+=1)e+=a[Math.floor(Math.random()*16)];return e}function Jo(a=V8e){var t;const e={label:{show:a==null?void 0:a.show_label,formatter:(a==null?void 0:a.formatter)??(r=>dr(r)),...(a==null?void 0:a.label)||{}},legend:{...(a==null?void 0:a.legend)||{},[((t=a==null?void 0:a.legend)==null?void 0:t.position)||"bottom"]:"0",show:(a==null?void 0:a.show_legend)||!1},barWidth:"70%",grid:{borderColor:"#e5e7eb"},title:{...(a==null?void 0:a.title)||{}}};return(a!=null&&a.colors||a!=null&&a.color)&&(e.color=(a==null?void 0:a.colors)||(a==null?void 0:a.color)||null),e}function vD(a){return{color:"#9ca3af",fontSize:10,fontFamily:"Inter, ui-sans-serif, system-ui",fontWeight:400,label:a==null?void 0:a.label,show:!0,formatter:(a==null?void 0:a.formatter)??(e=>dr(e)),margin:(a==null?void 0:a.margin)??7,interval:(a==null?void 0:a.interval)??"auto",rotate:(a==null?void 0:a.rotate)??0}}const gD=["#d3c7e6","#bedae3","#f8e9cb","#ff8c8c","#c5d8be","#ffc6c6","#ffc39a","#fff7c5","#d8ffc0","#d4f7ff"];class wp{static getLabelOptions(e={}){return{show:(e==null?void 0:e.show_label)||(e==null?void 0:e.show)||!1,fontSize:"10",position:(e==null?void 0:e.position)||"inside",formatter:(e==null?void 0:e.formatter)||"{d}%",...e}}static getLegendOpions(e={}){return{...e,position:(e==null?void 0:e.position)||"bottom"}}}const Ia={props:["source","style","widget","dashboard","title","currentWidget","widgetData","prefix"],data(){return{sourceData:null,styleData:null,widgetName:"",dimensions:[],dashboardName:"",titleCharts:"",widgetInstance:null}},mounted(){window.addEventListener("resize",this.handleResize),window.addEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.addEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},unmounted(){window.removeEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.removeEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},watch:{sourceData:{async handler(){setTimeout(()=>{this==null||this.onChangedData()},0)}}},methods:{checkCustomStyleEvent(a){this.changeOptionsByName(a.chartId,a.options)},checkCustomEvent({filterUrl:a}){this.getDataFromURL(a)},handleResize(){this.widgetInstance&&this.widgetInstance.resize()},async getDataFromURL(a){var e;try{const t=await Wt.get(a);this.sourceData=(t==null?void 0:t.source)||[],this.$emit("update:widgetData",t),this.dimensions=Object.keys(((e=this.sourceData)==null?void 0:e[0])||{}),this.titleCharts=this.style?this.style:(t==null?void 0:t.title)||"",this.styleData=(t==null?void 0:t.style)||{}}catch(t){const r={message:"Дані не знайдено",title:"Помилка!",type:"error",status:400,id:this.widgetName};(t==null?void 0:t.status)=="404"&&(r.status=404,r.message="Дані не знайдено"),(t==null?void 0:t.status)=="400"&&(r.message="Перевірте налаштування або зверніться до адміністратора"),(t==null?void 0:t.status)=="500"&&(r.message="Сталася помилка сервера"),this.$emit("update:widgetData",r)}},getValues(){return this.sourceData.map(a=>{var e;return parseFloat(a[(e=this.columns)==null?void 0:e[1]])})},formatDate(a){const e=new Date(a);if(isNaN(e))return a;const t=String(e.getDate()).padStart(2,"0"),n=["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"][e.getMonth()],i=e.getFullYear();return`${t} ${n} ${i}`},async getData(){var a;try{if(this.source)this.sourceData=[...this.source],this.styleData=this.style,this.titleCharts=this.title,this.dimensions=Object.keys(((a=this.sourceData)==null?void 0:a[0])||{});else{this.widgetName=this.widget,this.dashboardName=this.dashboard;const e=this.dashboardName?`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}`:`${this.prefix||""}/bi-data?&widget=${this.widgetName}`;await this.getDataFromURL(e)}}catch(e){console.error(e)}},async initChart(a,e,t){var r,n,i,o,s,l,c;this.widgetInstance&&this.widgetInstance.clear();try{const h=this.$refs.chart,d=Ju(h),p={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"transparent",shadowColor:"transparent",padding:[0,0,0,0],borderWidth:0,formatter:f=>{var k;const y=(k=f[0])==null?void 0:k.axisValue;let g=`
|
|
8349
|
+
`)),tt(r)),i.push({dimIdx:k.index,parser:x,comparator:new cb(p,y)})});var o=e.sourceFormat;o!==sa&&o!==tr&&(Pn.NODE_ENV!=="production"&&(r='sourceFormat "'+o+'" is not supported yet'),tt(r));for(var s=[],l=0,c=e.count();l<c;l++)s.push(e.getRawDataItem(l));return s.sort(function(h,d){for(var p=0;p<i.length;p++){var f=i[p],y=e.retrieveValueFromItem(h,f.dimIdx),v=e.retrieveValueFromItem(d,f.dimIdx);f.parser&&(y=f.parser(y),v=f.parser(v));var g=f.comparator.evaluate(y,v);if(g!==0)return g}return 0}),{data:s}}};function zwe(a){a.registerTransform(Iwe),a.registerTransform(Nwe)}var Bwe=function(a){G(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,r,n){a.prototype.init.call(this,t,r,n),this._sourceManager=new yb(this),vb(this)},e.prototype.mergeOption=function(t,r){a.prototype.mergeOption.call(this,t,r),vb(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Xr},e}($e),Pwe=function(a){G(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(bt);function Rwe(a){a.registerComponentModel(Bwe),a.registerComponentView(Pwe)}var on=Ur.CMD;function yl(a,e){return Math.abs(a-e)<1e-5}function Pm(a){var e=a.data,t=a.len(),r=[],n,i=0,o=0,s=0,l=0;function c(L,I){n&&n.length>2&&r.push(n),n=[L,I]}function h(L,I,N,z){yl(L,N)&&yl(I,z)||n.push(L,I,N,z,N,z)}function d(L,I,N,z,R,P){var O=Math.abs(I-L),j=Math.tan(O/4)*4/3,ee=I<L?-1:1,oe=Math.cos(L),X=Math.sin(L),re=Math.cos(I),ce=Math.sin(I),ke=oe*R+N,Le=X*P+z,Y=re*R+N,ne=ce*P+z,F=R*j*ee,q=P*j*ee;n.push(ke-F*X,Le+q*oe,Y+F*ce,ne-q*re,Y,ne)}for(var p,f,y,v,g=0;g<t;){var k=e[g++],x=g===1;switch(x&&(i=e[g],o=e[g+1],s=i,l=o,(k===on.L||k===on.C||k===on.Q)&&(n=[s,l])),k){case on.M:i=s=e[g++],o=l=e[g++],c(s,l);break;case on.L:p=e[g++],f=e[g++],h(i,o,p,f),i=p,o=f;break;case on.C:n.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case on.Q:p=e[g++],f=e[g++],y=e[g++],v=e[g++],n.push(i+2/3*(p-i),o+2/3*(f-o),y+2/3*(p-y),v+2/3*(f-v),y,v),i=y,o=v;break;case on.A:var b=e[g++],w=e[g++],M=e[g++],_=e[g++],S=e[g++],C=e[g++]+S;g+=1;var D=!e[g++];p=Math.cos(S)*M+b,f=Math.sin(S)*_+w,x?(s=p,l=f,c(s,l)):h(i,o,p,f),i=Math.cos(C)*M+b,o=Math.sin(C)*_+w;for(var A=(D?-1:1)*Math.PI/2,T=S;D?T>C:T<C;T+=A){var E=D?Math.max(T+A,C):Math.min(T+A,C);d(T,E,b,w,M,_)}break;case on.R:s=i=e[g++],l=o=e[g++],p=s+e[g++],f=l+e[g++],c(p,l),h(p,l,p,f),h(p,f,s,f),h(s,f,s,l),h(s,l,p,l);break;case on.Z:n&&h(i,o,s,l),i=s,o=l;break}}return n&&n.length>2&&r.push(n),r}function Rm(a,e,t,r,n,i,o,s,l,c){if(yl(a,t)&&yl(e,r)&&yl(n,o)&&yl(i,s)){l.push(o,s);return}var h=2/c,d=h*h,p=o-a,f=s-e,y=Math.sqrt(p*p+f*f);p/=y,f/=y;var v=t-a,g=r-e,k=n-o,x=i-s,b=v*v+g*g,w=k*k+x*x;if(b<d&&w<d){l.push(o,s);return}var M=p*v+f*g,_=-p*k-f*x,S=b-M*M,C=w-_*_;if(S<d&&M>=0&&C<d&&_>=0){l.push(o,s);return}var D=[],A=[];Un(a,t,n,o,.5,D),Un(e,r,i,s,.5,A),Rm(D[0],A[0],D[1],A[1],D[2],A[2],D[3],A[3],l,c),Rm(D[4],A[4],D[5],A[5],D[6],A[6],D[7],A[7],l,c)}function Owe(a,e){var t=Pm(a),r=[];e=e||1;for(var n=0;n<t.length;n++){var i=t[n],o=[],s=i[0],l=i[1];o.push(s,l);for(var c=2;c<i.length;){var h=i[c++],d=i[c++],p=i[c++],f=i[c++],y=i[c++],v=i[c++];Rm(s,l,h,d,p,f,y,v,o,e),s=y,l=v}r.push(o)}return r}function GC(a,e,t){var r=a[e],n=a[1-e],i=Math.abs(r/n),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],c=0;c<o;c++)l.push(s);var h=o*s,d=t-h;if(d>0)for(var c=0;c<d;c++)l[c%o]+=1;return l}function WC(a,e,t){for(var r=a.r0,n=a.r,i=a.startAngle,o=a.endAngle,s=Math.abs(o-i),l=s*n,c=n-r,h=l>Math.abs(c),d=GC([l,c],h?0:1,e),p=(h?s:c)/d.length,f=0;f<d.length;f++)for(var y=(h?c:s)/d[f],v=0;v<d[f];v++){var g={};h?(g.startAngle=i+p*f,g.endAngle=i+p*(f+1),g.r0=r+y*v,g.r=r+y*(v+1)):(g.startAngle=i+y*v,g.endAngle=i+y*(v+1),g.r0=r+p*f,g.r=r+p*(f+1)),g.clockwise=a.clockwise,g.cx=a.cx,g.cy=a.cy,t.push(g)}}function Hwe(a,e,t){for(var r=a.width,n=a.height,i=r>n,o=GC([r,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",c=i?"x":"y",h=i?"y":"x",d=a[s]/o.length,p=0;p<o.length;p++)for(var f=a[l]/o[p],y=0;y<o[p];y++){var v={};v[c]=p*d,v[h]=y*f,v[s]=d,v[l]=f,v.x+=a.x,v.y+=a.y,t.push(v)}}function UC(a,e,t,r){return a*r-t*e}function Fwe(a,e,t,r,n,i,o,s){var l=t-a,c=r-e,h=o-n,d=s-i,p=UC(h,d,l,c);if(Math.abs(p)<1e-6)return null;var f=a-n,y=e-i,v=UC(f,y,h,d)/p;return v<0||v>1?null:new Pe(v*l+a,v*c+e)}function qwe(a,e,t){var r=new Pe;Pe.sub(r,t,e),r.normalize();var n=new Pe;Pe.sub(n,a,e);var i=n.dot(r);return i}function vl(a,e){var t=a[a.length-1];t&&t[0]===e[0]&&t[1]===e[1]||a.push(e)}function jwe(a,e,t){for(var r=a.length,n=[],i=0;i<r;i++){var o=a[i],s=a[(i+1)%r],l=Fwe(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&n.push({projPt:qwe(l,e,t),pt:l,idx:i})}if(n.length<2)return[{points:a},{points:a}];n.sort(function(g,k){return g.projPt-k.projPt});var c=n[0],h=n[n.length-1];if(h.idx<c.idx){var d=c;c=h,h=d}for(var p=[c.pt.x,c.pt.y],f=[h.pt.x,h.pt.y],y=[p],v=[f],i=c.idx+1;i<=h.idx;i++)vl(y,a[i].slice());vl(y,f),vl(y,p);for(var i=h.idx+1;i<=c.idx+r;i++)vl(v,a[i%r].slice());return vl(v,p),vl(v,f),[{points:y},{points:v}]}function ZC(a){var e=a.points,t=[],r=[];Y1(e,t,r);var n=new Re(t[0],t[1],r[0]-t[0],r[1]-t[1]),i=n.width,o=n.height,s=n.x,l=n.y,c=new Pe,h=new Pe;return i>o?(c.x=h.x=s+i/2,c.y=l,h.y=l+o):(c.y=h.y=l+o/2,c.x=s,h.x=s+i),jwe(e,c,h)}function mp(a,e,t,r){if(t===1)r.push(e);else{var n=Math.floor(t/2),i=a(e);mp(a,i[0],n,r),mp(a,i[1],t-n,r)}return r}function $we(a,e){for(var t=[],r=0;r<e;r++)t.push(Jf(a));return t}function Gwe(a,e){e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel}function Wwe(a){for(var e=[],t=0;t<a.length;)e.push([a[t++],a[t++]]);return e}function Uwe(a,e){var t=[],r=a.shape,n;switch(a.type){case"rect":Hwe(r,e,t),n=Ze;break;case"sector":WC(r,e,t),n=ka;break;case"circle":WC({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},e,t),n=ka;break;default:var i=a.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=ae(Owe(a.getUpdatedPathProxy(),o),function(k){return Wwe(k)}),l=s.length;if(l===0)mp(ZC,{points:s[0]},e,t);else if(l===e)for(var c=0;c<l;c++)t.push({points:s[c]});else{var h=0,d=ae(s,function(k){var x=[],b=[];Y1(k,x,b);var w=(b[1]-x[1])*(b[0]-x[0]);return h+=w,{poly:k,area:w}});d.sort(function(k,x){return x.area-k.area});for(var p=e,c=0;c<l;c++){var f=d[c];if(p<=0)break;var y=c===l-1?p:Math.ceil(f.area/h*e);y<0||(mp(ZC,{points:f.poly},y,t),p-=y)}}n=xa;break}if(!n)return $we(a,e);for(var v=[],c=0;c<t.length;c++){var g=new n;g.setShape(t[c]),Gwe(a,g),v.push(g)}return v}function Zwe(a,e){var t=a.length,r=e.length;if(t===r)return[a,e];for(var n=[],i=[],o=t<r?a:e,s=Math.min(t,r),l=Math.abs(r-t)/6,c=(s-2)/6,h=Math.ceil(l/c)+1,d=[o[0],o[1]],p=l,f=2;f<s;){var y=o[f-2],v=o[f-1],g=o[f++],k=o[f++],x=o[f++],b=o[f++],w=o[f++],M=o[f++];if(p<=0){d.push(g,k,x,b,w,M);continue}for(var _=Math.min(p,h-1)+1,S=1;S<=_;S++){var C=S/_;Un(y,g,x,w,C,n),Un(v,k,b,M,C,i),y=n[3],v=i[3],d.push(n[1],i[1],n[2],i[2],y,v),g=n[5],k=i[5],x=n[6],b=i[6]}p-=_-1}return o===a?[d,e]:[a,d]}function YC(a,e){for(var t=a.length,r=a[t-2],n=a[t-1],i=[],o=0;o<e.length;)i[o++]=r,i[o++]=n;return i}function Ywe(a,e){for(var t,r,n,i=[],o=[],s=0;s<Math.max(a.length,e.length);s++){var l=a[s],c=e[s],h=void 0,d=void 0;l?c?(t=Zwe(l,c),h=t[0],d=t[1],r=h,n=d):(d=YC(n||l,l),h=l):(h=YC(r||c,c),d=c),i.push(h),o.push(d)}return[i,o]}function XC(a){for(var e=0,t=0,r=0,n=a.length,i=0,o=n-2;i<n;o=i,i+=2){var s=a[o],l=a[o+1],c=a[i],h=a[i+1],d=s*h-c*l;e+=d,t+=(s+c)*d,r+=(l+h)*d}return e===0?[a[0]||0,a[1]||0]:[t/e/3,r/e/3,e]}function Xwe(a,e,t,r){for(var n=(a.length-2)/6,i=1/0,o=0,s=a.length,l=s-2,c=0;c<n;c++){for(var h=c*6,d=0,p=0;p<s;p+=2){var f=p===0?h:(h+p-2)%l+2,y=a[f]-t[0],v=a[f+1]-t[1],g=e[p]-r[0],k=e[p+1]-r[1],x=g-y,b=k-v;d+=x*x+b*b}d<i&&(i=d,o=c)}return o}function Kwe(a){for(var e=[],t=a.length,r=0;r<t;r+=2)e[r]=a[t-r-2],e[r+1]=a[t-r-1];return e}function Jwe(a,e,t,r){for(var n=[],i,o=0;o<a.length;o++){var s=a[o],l=e[o],c=XC(s),h=XC(l);i==null&&(i=c[2]<0!=h[2]<0);var d=[],p=[],f=0,y=1/0,v=[],g=s.length;i&&(s=Kwe(s));for(var k=Xwe(s,l,c,h)*6,x=g-2,b=0;b<x;b+=2){var w=(k+b)%x+2;d[b+2]=s[w]-c[0],d[b+3]=s[w+1]-c[1]}d[0]=s[k]-c[0],d[1]=s[k+1]-c[1];for(var M=r/t,_=-r/2;_<=r/2;_+=M){for(var S=Math.sin(_),C=Math.cos(_),D=0,b=0;b<s.length;b+=2){var A=d[b],T=d[b+1],E=l[b]-h[0],L=l[b+1]-h[1],I=E*C-L*S,N=E*S+L*C;v[b]=I,v[b+1]=N;var z=I-A,R=N-T;D+=z*z+R*R}if(D<y){y=D,f=_;for(var P=0;P<v.length;P++)p[P]=v[P]}}n.push({from:d,to:p,fromCp:c,toCp:h,rotation:-f})}return n}function kp(a){return a.__isCombineMorphing}var KC="__mOriginal_";function xp(a,e,t){var r=KC+e,n=a[r]||a[e];a[r]||(a[r]=a[e]);var i=t.replace,o=t.after,s=t.before;a[e]=function(){var l=arguments,c;return s&&s.apply(this,l),i?c=i.apply(this,l):c=n.apply(this,l),o&&o.apply(this,l),c}}function Nh(a,e){var t=KC+e;a[t]&&(a[e]=a[t],a[t]=null)}function JC(a,e){for(var t=0;t<a.length;t++)for(var r=a[t],n=0;n<r.length;){var i=r[n],o=r[n+1];r[n++]=e[0]*i+e[2]*o+e[4],r[n++]=e[1]*i+e[3]*o+e[5]}}function QC(a,e){var t=a.getUpdatedPathProxy(),r=e.getUpdatedPathProxy(),n=Ywe(Pm(t),Pm(r)),i=n[0],o=n[1],s=a.getComputedTransform(),l=e.getComputedTransform();function c(){this.transform=null}s&&JC(i,s),l&&JC(o,l),xp(e,"updateTransform",{replace:c}),e.transform=null;var h=Jwe(i,o,10,Math.PI),d=[];xp(e,"buildPath",{replace:function(p){for(var f=e.__morphT,y=1-f,v=[],g=0;g<h.length;g++){var k=h[g],x=k.from,b=k.to,w=k.rotation*f,M=k.fromCp,_=k.toCp,S=Math.sin(w),C=Math.cos(w);y1(v,M,_,f);for(var D=0;D<x.length;D+=2){var A=x[D],T=x[D+1],E=b[D],L=b[D+1],I=A*y+E*f,N=T*y+L*f;d[D]=I*C-N*S+v[0],d[D+1]=I*S+N*C+v[1]}var z=d[0],R=d[1];p.moveTo(z,R);for(var D=2;D<x.length;){var E=d[D++],L=d[D++],P=d[D++],O=d[D++],j=d[D++],ee=d[D++];z===E&&R===L&&P===j&&O===ee?p.lineTo(j,ee):p.bezierCurveTo(E,L,P,O,j,ee),z=j,R=ee}}}})}function Om(a,e,t){if(!a||!e)return e;var r=t.done,n=t.during;QC(a,e),e.__morphT=0;function i(){Nh(e,"buildPath"),Nh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Me({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),r&&r()}},t)),e}function Qwe(a,e,t,r,n,i){var o=16;a=n===t?0:Math.round(32767*(a-t)/(n-t)),e=i===r?0:Math.round(32767*(e-r)/(i-r));for(var s=0,l,c=(1<<o)/2;c>0;c/=2){var h=0,d=0;(a&c)>0&&(h=1),(e&c)>0&&(d=1),s+=c*c*(3*h^d),d===0&&(h===1&&(a=c-1-a,e=c-1-e),l=a,a=e,e=l)}return s}function bp(a){var e=1/0,t=1/0,r=-1/0,n=-1/0,i=ae(a,function(s){var l=s.getBoundingRect(),c=s.getComputedTransform(),h=l.x+l.width/2+(c?c[4]:0),d=l.y+l.height/2+(c?c[5]:0);return e=Math.min(h,e),t=Math.min(d,t),r=Math.max(h,r),n=Math.max(d,n),[h,d]}),o=ae(i,function(s,l){return{cp:s,z:Qwe(s[0],s[1],e,t,r,n),path:a[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function eD(a){return Uwe(a.path,a.count)}function Hm(){return{fromIndividuals:[],toIndividuals:[],count:0}}function e6e(a,e,t){var r=[];function n(M){for(var _=0;_<M.length;_++){var S=M[_];kp(S)?n(S.childrenRef()):S instanceof je&&r.push(S)}}n(a);var i=r.length;if(!i)return Hm();var o=t.dividePath||eD,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Hm();r=bp(r),s=bp(s);for(var l=t.done,c=t.during,h=t.individualDelay,d=new mn,p=0;p<i;p++){var f=r[p],y=s[p];y.parent=e,y.copyTransform(d),h||QC(f,y)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function v(M){for(var _=0;_<s.length;_++)s[_].addSelfToZr(M)}xp(e,"addSelfToZr",{after:function(M){v(M)}}),xp(e,"removeSelfFromZr",{after:function(M){for(var _=0;_<s.length;_++)s[_].removeSelfFromZr(M)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Nh(e,"addSelfToZr"),Nh(e,"removeSelfFromZr")}var k=s.length;if(h)for(var x=k,b=function(){x--,x===0&&(g(),l&&l())},p=0;p<k;p++){var w=h?Me({delay:(t.delay||0)+h(p,k,r[p],s[p]),done:b},t):t;Om(r[p],s[p],w)}else e.__morphT=0,e.animateTo({__morphT:1},Me({during:function(M){for(var _=0;_<k;_++){var S=s[_];S.__morphT=e.__morphT,S.dirtyShape()}c&&c(M)},done:function(){g();for(var M=0;M<a.length;M++)Nh(a[M],"updateTransform");l&&l()}},t));return e.__zr&&v(e.__zr),{fromIndividuals:r,toIndividuals:s,count:k}}function t6e(a,e,t){var r=e.length,n=[],i=t.dividePath||eD;function o(f){for(var y=0;y<f.length;y++){var v=f[y];kp(v)?o(v.childrenRef()):v instanceof je&&n.push(v)}}if(kp(a)){o(a.childrenRef());var s=n.length;if(s<r)for(var l=0,c=s;c<r;c++)n.push(Jf(n[l++%s]));n.length=r}else{n=i({path:a,count:r});for(var h=a.getComputedTransform(),c=0;c<n.length;c++)n[c].setLocalTransform(h);if(n.length!==r)return console.error("Invalid morphing: unmatched splitted path"),Hm()}n=bp(n),e=bp(e);for(var d=t.individualDelay,c=0;c<r;c++){var p=d?Me({delay:(t.delay||0)+d(c,r,n[c],e[c])},t):t;Om(n[c],e[c],p)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function tD(a){return te(a[0])}function aD(a,e){for(var t=[],r=a.length,n=0;n<r;n++)t.push({one:a[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)t[o%r].many.push(e[n][o])}for(var s=0,n=r-1;n>=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,c=Math.ceil(i/2);t[n].many=l.slice(c,i),t[s].many=l.slice(0,c),s++}return t}var a6e={clone:function(a){for(var e=[],t=1-Math.pow(1-a.path.style.opacity,1/a.count),r=0;r<a.count;r++){var n=Jf(a.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function Fm(a,e,t,r,n,i){if(!a.length||!e.length)return;var o=ws("update",r,n);if(!(o&&o.duration>0))return;var s=r.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),c,h;tD(a)&&(c=a,h=e),tD(e)&&(c=e,h=a);function d(k,x,b,w,M){var _=k.many,S=k.one;if(_.length===1&&!M){var C=x?_[0]:S,D=x?S:_[0];if(kp(C))d({many:[C],one:D},!0,b,w,!0);else{var A=s?Me({delay:s(b,w)},l):l;Om(C,D,A),i(C,D,C,D,A)}}else for(var T=Me({dividePath:a6e[t],individualDelay:s&&function(R,P,O,j){return s(R+b,w)}},l),E=x?e6e(_,S,T):t6e(S,_,T),L=E.fromIndividuals,I=E.toIndividuals,N=L.length,z=0;z<N;z++){var A=s?Me({delay:s(z,N)},l):l;i(L[z],I[z],x?_[z]:k.one,x?k.one:_[z],A)}}for(var p=c?c===a:a.length>e.length,f=c?aD(h,c):aD(p?e:a,[p?a:e]),y=0,v=0;v<f.length;v++)y+=f[v].many.length;for(var g=0,v=0;v<f.length;v++)d(f[v],p,g,y),g+=f[v].many.length}function Ko(a){if(!a)return[];if(te(a)){for(var e=[],t=0;t<a.length;t++)e.push(Ko(a[t]));return e}var r=[];return a.traverse(function(n){n instanceof je&&!n.disableMorphing&&!n.invisible&&!n.ignore&&r.push(n)}),r}var qm={},rD=1e4,r6e=0,nD=1,iD=2,n6e=Ue();function i6e(a,e){for(var t=a.dimensions,r=0;r<t.length;r++){var n=a.getDimensionInfo(t[r]);if(n&&n.otherDims[e]===0)return t[r]}}function o6e(a,e,t){var r=a.getDimensionInfo(t),n=r&&r.ordinalMeta;if(r){var i=a.get(r.name,e);return n&&n.categories[i]||i+""}}function oD(a,e,t,r){var n=r?"itemChildGroupId":"itemGroupId",i=i6e(a,n);if(i){var o=o6e(a,e,i);return o}var s=a.getRawDataItem(e),l=r?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!r)return t||a.getId(e)}function sD(a){var e=[];return V(a,function(t){var r=t.data,n=t.dataGroupId;if(r.count()>rD){qm.NODE_ENV!=="production"&&Mt("Universal transition is disabled on large data > 10k.");return}for(var i=r.getIndices(),o=0;o<i.length;o++)e.push({data:r,groupId:oD(r,o,n,!1),childGroupId:oD(r,o,n,!0),divide:t.divide,dataIndex:o})}),e}function jm(a,e,t){a.traverse(function(r){r instanceof je&&mt(r,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function $m(a){if(a.parent){var e=a.getComputedTransform();a.setLocalTransform(e),a.parent.remove(a)}}function gl(a){a.stopAnimation(),a.isGroup&&a.traverse(function(e){e.stopAnimation()})}function s6e(a,e,t){var r=ws("update",t,e);r&&a.traverse(function(n){if(n instanceof Xa){var i=yhe(n);i&&n.animateFrom({style:i},r)}})}function l6e(a,e){var t=a.length;if(t!==e.length)return!1;for(var r=0;r<t;r++){var n=a[r],i=e[r];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function lD(a,e,t){var r=sD(a),n=sD(e);function i(b,w,M,_,S){(M||b)&&w.animateFrom({style:M&&M!==b?K(K({},M.style),b.style):b.style},S)}var o=!1,s=r6e,l=ge(),c=ge();r.forEach(function(b){b.groupId&&l.set(b.groupId,!0),b.childGroupId&&c.set(b.childGroupId,!0)});for(var h=0;h<n.length;h++){var d=n[h].groupId;if(c.get(d)){s=nD;break}var p=n[h].childGroupId;if(p&&l.get(p)){s=iD;break}}function f(b,w){return function(M){var _=M.data,S=M.dataIndex;return w?_.getId(S):b?s===nD?M.childGroupId:M.groupId:s===iD?M.childGroupId:M.groupId}}var y=l6e(r,n),v={};if(!y)for(var h=0;h<n.length;h++){var g=n[h],k=g.data.getItemGraphicEl(g.dataIndex);k&&(v[k.id]=!0)}function x(b,w){var M=r[w],_=n[b],S=_.data.hostModel,C=M.data.getItemGraphicEl(M.dataIndex),D=_.data.getItemGraphicEl(_.dataIndex);if(C===D){D&&s6e(D,_.dataIndex,S);return}C&&v[C.id]||D&&(gl(D),C?(gl(C),$m(C),o=!0,Fm(Ko(C),Ko(D),_.divide,S,b,i)):jm(D,S,b))}new An(r,n,f(!0,y),f(!1,y),null,"multiple").update(x).updateManyToOne(function(b,w){var M=n[b],_=M.data,S=_.hostModel,C=_.getItemGraphicEl(M.dataIndex),D=et(ae(w,function(A){return r[A].data.getItemGraphicEl(r[A].dataIndex)}),function(A){return A&&A!==C&&!v[A.id]});C&&(gl(C),D.length?(V(D,function(A){gl(A),$m(A)}),o=!0,Fm(Ko(D),Ko(C),M.divide,S,b,i)):jm(C,S,M.dataIndex))}).updateOneToMany(function(b,w){var M=r[w],_=M.data.getItemGraphicEl(M.dataIndex);if(!(_&&v[_.id])){var S=et(ae(b,function(D){return n[D].data.getItemGraphicEl(n[D].dataIndex)}),function(D){return D&&D!==_}),C=n[b[0]].data.hostModel;S.length&&(V(S,function(D){return gl(D)}),_?(gl(_),$m(_),o=!0,Fm(Ko(_),Ko(S),M.divide,C,b[0],i)):V(S,function(D){return jm(D,C,b[0])}))}}).updateManyToMany(function(b,w){new An(w,b,function(M){return r[M].data.getId(r[M].dataIndex)},function(M){return n[M].data.getId(n[M].dataIndex)}).update(function(M,_){x(b[M],w[_])}).execute()}).execute(),o&&V(e,function(b){var w=b.data,M=w.hostModel,_=M&&t.getViewOfSeriesModel(M),S=ws("update",M,0);_&&M.isAnimationEnabled()&&S&&S.duration>0&&_.group.traverse(function(C){C instanceof je&&!C.animators.length&&C.animateFrom({style:{opacity:0}},S)})})}function cD(a){var e=a.getModel("universalTransition").get("seriesKey");return e||a.id}function hD(a){return te(a)?a.sort().join(","):a}function _i(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function c6e(a,e){var t=ge(),r=ge(),n=ge();V(a.oldSeries,function(o,s){var l=a.oldDataGroupIds[s],c=a.oldData[s],h=cD(o),d=hD(h);r.set(d,{dataGroupId:l,data:c}),te(h)&&V(h,function(p){n.set(p,{key:d,dataGroupId:l,data:c})})});function i(o){t.get(o)&&Mt("Duplicated seriesKey in universalTransition "+o)}return V(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),c=cD(o),h=hD(c),d=r.get(h);if(d)qm.NODE_ENV!=="production"&&i(h),t.set(h,{oldSeries:[{dataGroupId:d.dataGroupId,divide:_i(d.data),data:d.data}],newSeries:[{dataGroupId:s,divide:_i(l),data:l}]});else if(te(c)){qm.NODE_ENV!=="production"&&i(h);var p=[];V(c,function(v){var g=r.get(v);g.data&&p.push({dataGroupId:g.dataGroupId,divide:_i(g.data),data:g.data})}),p.length&&t.set(h,{oldSeries:p,newSeries:[{dataGroupId:s,data:l,divide:_i(l)}]})}else{var f=n.get(c);if(f){var y=t.get(f.key);y||(y={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:_i(f.data)}],newSeries:[]},t.set(f.key,y)),y.newSeries.push({dataGroupId:s,data:l,divide:_i(l)})}}}}),t}function uD(a,e){for(var t=0;t<a.length;t++){var r=e.seriesIndex!=null&&e.seriesIndex===a[t].seriesIndex||e.seriesId!=null&&e.seriesId===a[t].id;if(r)return t}}function h6e(a,e,t,r){var n=[],i=[];V(it(a.from),function(o){var s=uD(e.oldSeries,o);s>=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:_i(e.oldData[s]),groupIdDim:o.dimension})}),V(it(a.to),function(o){var s=uD(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:_i(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&lD(n,i,r)}function u6e(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){V(it(r.seriesTransition),function(n){V(it(n.to),function(i){for(var o=r.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][Pu]=!0)})})}),a.registerUpdateLifecycle("series:transition",function(e,t,r){var n=n6e(t);if(n.oldSeries&&r.updatedSeries&&r.optionChanged){var i=r.seriesTransition;if(i)V(it(i),function(f){h6e(f,n,r,t)});else{var o=c6e(n,r);V(o.keys(),function(f){var y=o.get(f);lD(y.oldSeries,y.newSeries,t)})}V(r.updatedSeries,function(f){f[Pu]&&(f[Pu]=!1)})}for(var s=e.getSeries(),l=n.oldSeries=[],c=n.oldDataGroupIds=[],h=n.oldData=[],d=0;d<s.length;d++){var p=s[d].getData();p.count()<rD&&(l.push(s[d]),c.push(s[d].get("dataGroupId")),h.push(p))}})}He([Y0e]),He([$0e]),He([vfe,Vfe,Ffe,_2e,B2e,_ye,Qye,Pve,oge,dge,wge,vme,qme,eke,vke,xke,Vke,Rke,Yke,t5e,u5e,Z5e]),He(p4e),He(H4e),He(YM),He(Q4e),He(v7),He(nxe),He(pxe),He(a3e),He(w3e),He(Sh),He(H3e),He(j3e),He(Q3e),He(sbe),He(fbe),He(xbe),He(Vbe),He(Xbe),He(gC),He(bC),He(gwe),He(PC),He(OC),He(wwe),He(zwe),He(Rwe),He(u6e),He(s0e);const d6e={class:"space-y-4"},p6e={__name:"vs-editor-form-yaml",props:{yamlValue:{type:null,default:()=>""},widgetName:{type:String},data:{type:Object}},setup(a,{expose:e}){const t=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si).then(h=>h.VsInputMonaco)),r=u.ref(null),{$notify:n}=u.getCurrentInstance().proxy,i=a,o=(h,{dimensions:d,source:p})=>{const f=h.getOption(),{data:y,...v}=(f==null?void 0:f.series)[0],[,...g]=d||[],k=g.map((x,b)=>({...(f==null?void 0:f.series[b])||{},data:p.map(w=>w[b+1]),name:x}));h==null||h.setOption({...f||{},dataset:{dimensions:d,source:p},series:k,xAxis:{type:"category"},yAxis:{}},!0)},s=h=>{const d=document.getElementById(h);if(!d)return null;const p=uy(d);return p||null},l=u.ref(i.yamlValue),c=async()=>{try{await Wt.put(`/bi-dashboard/${r.value}/${i.widgetName}`,{yml:l.value});const h=s(i.widgetName);if(h){const d=await Wt.get(`/bi-data?dashboard=${r.value}&widget=${i.widgetName}`);o(h,d)}n({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{n({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return u.onMounted(()=>{const h=new URLSearchParams(window.top.location.search);r.value=h.get("dashboard")}),e({requestUpdateWidget:c}),(h,d)=>(u.openBlock(),u.createElementBlock("div",d6e,[u.createVNode(u.unref(t),{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=p=>l.value=p),syntax:"yaml",theme:"vs-light",height:400,minimap:!1},null,8,["modelValue"])]))}},f6e={class:"pt-[10px]"},dD={"vs-editor-form-style":$ie,"vs-editor-form-data":_oe,"vs-editor-form-yaml":p6e,"vs-editor-form-controls":{__name:"vs-editor-form-controls",props:{widgetName:{type:String},controls:{type:Object,default:()=>{}},columns:{type:Array,default:()=>[]}},emits:["update-dashboard"],setup(a,{emit:e}){var h;const t=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si)),{$notify:r}=u.getCurrentInstance().proxy,n=e,i=a,o=u.ref(null),s={granularity:{ua:"Granularity",type:"checkbox",options:["week","month","quarter","year"]},export:{ua:"Export",type:"Switcher"},groupby:{ua:"Groupby",type:"checkbox",options:(h=i.columns)==null?void 0:h.map(({name:d})=>d)}},l=u.ref(i.controls||{}),c=async()=>{try{await Wt.put(`/bi-dashboard/${o.value}/${i.widgetName}`,{controls:l.value}),await r({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),staticTypes!=null&&staticTypes.includes(l.value.type)&&n("update-dashboard")}catch{await r({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return u.onMounted(()=>{const d=new URLSearchParams(window.top.location.search);o.value=d.get("dashboard")}),(d,p)=>{const f=u.resolveComponent("VsButton");return u.openBlock(),u.createElementBlock("div",f6e,[u.createVNode(f,{class:"ml-[10px] mb-[10px]",type:"plain",onClick:c},{default:u.withCtx(()=>p[1]||(p[1]=[u.createTextVNode(" Зберегти ")])),_:1}),u.createVNode(u.unref(t),{schema:s,values:l.value,"onUpdate:values":p[0]||(p[0]=y=>l.value=y)},null,8,["values"])])}}}},y6e={key:0,class:"p-4 text-sm text-amber-700 bg-amber-50 rounded-lg"},pD={__name:"editor-tab-error-boundary",props:{tabComponent:{type:Object,default:null},tabKey:{type:[String,Number],default:""}},emits:["update-dashboard"],setup(a,{expose:e}){const t=a,r=u.ref(null);function n(){var o,s;(s=(o=r.value)==null?void 0:o.requestUpdateWidget)==null||s.call(o)}e({save:n});const i=u.ref(!1);return u.onErrorCaptured((o,s,l)=>(console.error("Editor tab error:",o,l),i.value=!0,!1)),u.watch(()=>t.tabComponent,()=>{i.value=!1},{immediate:!0}),(o,s)=>i.value?(u.openBlock(),u.createElementBlock("div",y6e," Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")):(u.openBlock(),u.createBlock(u.resolveDynamicComponent(a.tabComponent),u.mergeProps({ref_key:"tabRef",ref:r,key:a.tabKey||"tab"},o.$attrs,{onUpdateDashboard:s[0]||(s[0]=l=>o.$emit("update-dashboard"))}),null,16))}},v6e={class:"h-full flex flex-col bg-white shrink-0 !w-[400px] border rounded-xl overflow-hidden border-gray-200"},g6e={key:0,class:"flex flex-col min-h-0 flex-1"},m6e={class:"flex items-center border-b border-gray-200 bg-white shrink-0 px-4 h-[49px]"},k6e={class:"flex items-center gap-6 min-w-0"},x6e=["onClick"],b6e={key:0,class:"absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 rounded-full"},w6e={class:"flex items-center gap-1 ml-auto shrink-0"},M6e={key:1,class:"flex-1 min-h-0 overflow-auto px-4 py-4 [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},_6e={key:0},S6e={key:1},C6e={class:"p-4"},D6e={class:"flex justify-end mt-4 gap-x-3"},A6e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},T6e={__name:"vs-editor-forms",props:u.mergeModels({selectedWidgetData:{type:Object,required:!1,default:null},selectedDashboard:{type:String,default:()=>""},currentWidgetData:{type:String,default:()=>""}},{selectedWidget:{},selectedWidgetModifiers:{}}),emits:u.mergeModels(["update-data"],["update:selectedWidget"]),setup(a,{emit:e}){var b,w;const t=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si)),r=(w=(b=u.getCurrentInstance())==null?void 0:b.proxy)==null?void 0:w.$notify,n=e,i=u.ref(null),o=a,s=u.ref(!1),l=u.ref(!0),c=u.ref(!1),h=u.ref({}),d=u.useModel(a,"selectedWidget"),p=["table","text","number","stat","progress","listbar","map","pivot"],f=u.ref("data"),y=async()=>{try{await Wt.delete(`/bi-dashboard/${o.selectedDashboard}/${o.selectedWidgetData.name}`);const M=new URL(window.top.location.href);M.searchParams.set("dashboard",o.selectedDashboard),M.searchParams.delete("widget"),window.top.history.pushState({},"",M),n("update-data"),s.value=!1,r({type:"success",title:"Успішно!",message:"Віджет успішно видалено"})}catch(M){console.error(M),r({type:"error",title:"Помилка!",message:"При спробі видалити віджет виникла помилка"})}},v=u.computed(()=>{const M=[{id:"data",label:"Дані"},{id:"style",label:"Стилі"},{id:"yaml",label:"{ }"}];return M==null?void 0:M.filter(_=>{var S,C,D;return _.id==="style"?!(p!=null&&p.includes(((S=o.selectedWidgetData)==null?void 0:S.type)||((D=(C=o.selectedWidgetData)==null?void 0:C.data)==null?void 0:D.type))):!0})}),g=()=>{var M,_,S,C,D,A,T,E,L;h.value={title:(M=o.selectedWidgetData)==null?void 0:M.title,type:(_=o.selectedWidgetData)==null?void 0:_.type,table:(S=o.selectedWidgetData)==null?void 0:S.table_name,query:(D=(C=o.selectedWidgetData)==null?void 0:C.data)==null?void 0:D.query,x:(T=(A=o.selectedWidgetData)==null?void 0:A.data)==null?void 0:T.x,cls:(L=(E=o.selectedWidgetData)==null?void 0:E.data)==null?void 0:L.cls},c.value=!0},k=async()=>{try{await Wt.put(`/bi-dashboard/${o.selectedDashboard}/${o.selectedWidgetData.name}`,h.value),r({type:"success",title:"Успішно!",message:"Дані успішно змінено"}),await n("update-data"),c.value=!1}catch{r({type:"error",title:"Помилка!",message:"При спробі внести зміни виникла помилка"})}};u.watch(d,M=>{l.value=!1;const _=new URL(window.top.location.href);M?(_.searchParams.set("widget",M),window.top.history.pushState({},"",_)):(_.searchParams.delete("widget"),window.top.history.pushState({},"",_)),setTimeout(()=>l.value=!0)});const x={title:{type:"text",ua:"Заголовок",placeholder:"Заголовок",validators:["required"]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"text",ua:"Таблиця",placeholder:"Таблиця"},query:{type:"Text",ua:"Query",placeholder:"Query"},x:{type:"Text",ua:"X Axis",placeholder:"X Axis"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}};return(M,_)=>{var C,D,A,T,E,L,I,N,z,R,P;const S=u.resolveComponent("VsPopover");return u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("div",v6e,[a.selectedWidgetData?(u.openBlock(),u.createElementBlock("div",g6e,[u.createElementVNode("div",m6e,[u.createElementVNode("nav",k6e,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(v.value,O=>(u.openBlock(),u.createElementBlock("button",{key:O.id,type:"button",class:u.normalizeClass(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap",f.value===O.id?"text-blue-600":"text-gray-600 hover:text-gray-900"]),onClick:j=>f.value=O.id},[u.createTextVNode(u.toDisplayString(O.label)+" ",1),f.value===O.id?(u.openBlock(),u.createElementBlock("span",b6e)):u.createCommentVNode("",!0)],10,x6e))),128))]),u.createElementVNode("div",w6e,[u.createVNode(S,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{type:"button",class:"h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"Зберегти",onClick:_[0]||(_[0]=O=>{var j,ee;return(ee=(j=i.value)==null?void 0:j.save)==null?void 0:ee.call(j)})},[u.createVNode(u.unref(Nk),{class:"h-4 w-4"})])]),default:u.withCtx(()=>[_[9]||(_[9]=u.createTextVNode(" Зберегти "))]),_:1}),u.createVNode(S,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{type:"button",class:"h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",onClick:g},[u.createVNode(Wk,{class:"h-4 w-4"})])]),default:u.withCtx(()=>[_[10]||(_[10]=u.createTextVNode(" Редагувати віджет "))]),_:1}),u.createVNode(S,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{type:"button",class:"h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",onClick:_[1]||(_[1]=O=>s.value=!0)},[u.createVNode(u.unref(Gk),{class:"h-4 w-4"})])]),default:u.withCtx(()=>[_[11]||(_[11]=u.createTextVNode(" Видалити віджет "))]),_:1})])]),(C=a.currentWidgetData)!=null&&C.status?(u.openBlock(),u.createBlock(t1,{key:0,title:(D=a.currentWidgetData)==null?void 0:D.title,text:(A=a.currentWidgetData)==null?void 0:A.message},null,8,["title","text"])):(u.openBlock(),u.createElementBlock("div",M6e,[l.value&&a.currentWidgetData?(u.openBlock(),u.createElementBlock("div",_6e,[u.createVNode(pD,{ref_key:"tabPanelRef",ref:i,"tab-key":f.value,"tab-component":u.unref(dD)["vs-editor-form-"+f.value],widgetName:(T=a.selectedWidgetData)==null?void 0:T.name,yamlValue:((E=a.selectedWidgetData)==null?void 0:E.yml)||"",data:a.selectedWidgetData,controls:(L=a.selectedWidgetData)==null?void 0:L.controls,columns:(I=a.currentWidgetData)==null?void 0:I.columns,onUpdateDashboard:_[2]||(_[2]=O=>M.$emit("update-data"))},null,8,["tab-key","tab-component","widgetName","yamlValue","data","controls","columns"])])):(u.openBlock(),u.createElementBlock("div",S6e,[u.createVNode(pD,{ref_key:"tabPanelRef",ref:i,"tab-key":f.value,"tab-component":u.unref(dD)["vs-editor-form-"+f.value],widgetName:(N=a.selectedWidgetData)==null?void 0:N.name,yamlValue:((z=a.selectedWidgetData)==null?void 0:z.yml)||"",data:a.selectedWidgetData,controls:(R=a.selectedWidgetData)==null?void 0:R.controls,columns:(P=a.currentWidgetData)==null?void 0:P.columns,onUpdateDashboard:_[3]||(_[3]=O=>M.$emit("update-data"))},null,8,["tab-key","tab-component","widgetName","yamlValue","data","controls","columns"])])),u.createVNode(El,{teleport:"#modal",visible:s.value,title:"Ви впевнені?",onClose:_[5]||(_[5]=O=>s.value=!1)},{default:u.withCtx(()=>[u.createElementVNode("div",C6e,[_[12]||(_[12]=u.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей віджет? ",-1)),u.createElementVNode("div",D6e,[u.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:_[4]||(_[4]=O=>s.value=!1)}," Скасувати "),u.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:y}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"])]))])):(u.openBlock(),u.createBlock(t1,{key:1,title:"Оберіть один з віджетів",text:"",class:"p-4"}))]),u.createVNode(El,{teleport:"#modal",visible:c.value,title:"Редагувати віджет",onClose:_[8]||(_[8]=O=>c.value=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",A6e,[u.createElementVNode("button",{style:{border:"1px solid #000"},onClick:_[7]||(_[7]=O=>c.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg hover:bg-gray-100 duration-300"}," Скасувати "),u.createElementVNode("button",{onClick:k,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:u.withCtx(()=>[x?(u.openBlock(),u.createBlock(u.unref(t),{key:0,schema:x,values:h.value,"onUpdate:values":_[6]||(_[6]=O=>h.value=O)},null,8,["values"])):u.createCommentVNode("",!0)]),_:1},8,["visible"])],64)}}},E6e={class:"overflow-hidden flex flex-col min-h-[480px]"},V6e={class:"flex-1 flex min-h-0 gap-4"},L6e={class:"flex-1 min-w-0 pb-4 overflow-auto bg-gray-50/50"},I6e={class:"w-[400px] shrink-0 flex flex-col"},N6e={__name:"vs-widget-editor-panel",props:{selectedWidget:{type:String,default:""},selectedWidgetData:{type:Object,default:null},currentWidgetData:{type:Object,default:null},selectedDashboard:{type:String,default:""},dashboardWidgets:{type:Array,default:()=>[]}},emits:["update:selectedWidget","update-data"],setup(a,{emit:e}){const t=a,r=e,n=u.computed({get:()=>t.selectedWidget,set:i=>r("update:selectedWidget",i)});return(i,o)=>(u.openBlock(),u.createElementBlock("div",E6e,[u.createElementVNode("div",V6e,[u.createElementVNode("div",L6e,[u.createVNode(Tl,{dashboard:a.selectedDashboard,widget:a.selectedWidget,"selected-widget":a.selectedWidget,"dashboard-widgets":a.dashboardWidgets,"filter-u-rl":void 0,class:"max-h-full"},null,8,["dashboard","widget","selected-widget","dashboard-widgets"])]),u.createElementVNode("div",I6e,[u.createVNode(T6e,{selectedWidget:n.value,"onUpdate:selectedWidget":o[0]||(o[0]=s=>n.value=s),selectedWidgetData:a.selectedWidgetData,currentWidgetData:a.currentWidgetData,selectedDashboard:a.selectedDashboard,onUpdateData:o[1]||(o[1]=s=>i.$emit("update-data"))},null,8,["selectedWidget","selectedWidgetData","currentWidgetData","selectedDashboard"])])])]))}},fD={__name:"icon-grid",setup(a){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Tk),u.mergeProps(e.$attrs,{size:24}),null,16))}},z6e={__name:"icon-filter",setup(a){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Zp),u.mergeProps(e.$attrs,{size:24}),null,16))}},yD={__name:"icon-table",setup(a){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Bk),u.mergeProps(e.$attrs,{size:24}),null,16))}},B6e={__name:"icon-more",setup(a){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Sk),u.mergeProps(e.$attrs,{size:24}),null,16))}},P6e=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si)),R6e={components:{VsModal:El,VForm:P6e,deleteIcon:Gk,editIcon:Wk,IconGrid:fD,IconMore:B6e,IconFilter:z6e,IconTable:yD},watch:{dashboardData:{handler(a){var t,r;if(this.formEditValue={title:a==null?void 0:a.title,description:a==null?void 0:a.description,table_name:a==null?void 0:a.table_name,db:a==null?void 0:a.db,public:a==null?void 0:a.public,words:a==null?void 0:a.words},!((t=a==null?void 0:a.panels)!=null&&t.length)){this.formGridValue={panels:[]},this.formFilterValue={filters:(a==null?void 0:a.filters)||null};return}const e=(r=a==null?void 0:a.panels)==null?void 0:r.map(n=>{var s,l;const{title:i="",type:o=""}=((l=(s=a==null?void 0:a.widgets)==null?void 0:s.find(c=>(c==null?void 0:c.name)===(n==null?void 0:n.widget)))==null?void 0:l.data)||{};return{title:i,type:o,...n}});this.formGridValue={panels:e},this.formFilterValue={filters:(a==null?void 0:a.filters)||null}},immediate:!0}},data(){return{isDeleteConfirm:!1,isFormEdit:!1,isFormGrid:!1,isFormFilter:!1,isVisibleTableColumns:!1,formEditValue:{},formGridValue:{},formFilterValue:{},editDashboardScheme:[{type:"Text",key:"title",label:"Заголовок",validators:["required"]},{type:"Text",key:"description",label:"Опис"},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці"},{type:"Text",key:"words",label:"Ключові слова"},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],editGridScheme:[{type:"DataTable",ua:"Панелі",key:"panels",editable:!1,addition:!1,colModel:[{name:"title",ua:"Назва",type:"Text",key:"col"},{name:"type",ua:"Тип",type:"Text",key:"col",disabled:!0},{name:"widget",type:"Text",ua:"Назва",key:"widget",hiddenCol:!0},{name:"col",ua:"Кількість стовпчиків",type:"Text",key:"col"}]}],editFilterScheme:[{name:"filters",type:"DataTable",colModel:[{ua:"Підпис",type:"Text",key:"label"},{ua:"Тип",type:"Text",key:"type"}]}]}},props:{selected:{type:String,default:()=>""},dashboardData:{type:Object,default:()=>{}},selectedWidgetData:{type:Object,default:()=>{}},columns:{type:Array}},methods:{async editDashboard(){var a,e;try{(e=(a=this.$refs)==null?void 0:a.formEdit)==null||e.doValidation(),await Wt.put(`/bi-dashboard/${this.selected}`,this.formEditValue),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormEdit=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"при спробі оновити дані виникла помилка"})}},async editDashboardGrid(){var a,e;try{(e=(a=this.$refs)==null?void 0:a.formGrid)==null||e.doValidation(),await Wt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormGrid=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async editDashboardFilters(){var a,e;try{(e=(a=this.$refs)==null?void 0:a.formFilter)==null||e.doValidation(),await Wt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue,...this.formFilterValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormFilter=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async deleteDashboard(){try{await Wt.delete(`/bi-dashboard/${this.selected}`);const a=new URL(window.top.location.href);a.searchParams.delete("dashboard"),a.searchParams.delete("widget"),window.history.pushState({},"",a),await this.$notify({title:"Успішно!",type:"success",message:"Дашборд видалено успішно"}),this.isDeleteConfirm=!1,await this.$emit("update:selected",null),await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі видалити дашборд виникла помилка"})}},closePopover(){document.body.click()}}},O6e={key:0,class:"flex items-center gap-4"},H6e={class:"h-[30px] w-[30px] flex items-center justify-center"},F6e={class:"flex flex-col items-start -ml-2 -mr-2"},q6e={class:"p-4"},j6e={class:"flex justify-end mt-4 gap-x-3"},$6e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},G6e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},W6e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function U6e(a,e,t,r,n,i){const o=u.resolveComponent("IconFilter"),s=u.resolveComponent("VsPopover"),l=u.resolveComponent("IconGrid"),c=u.resolveComponent("IconMore"),h=u.resolveComponent("VsModal"),d=u.resolveComponent("VForm");return u.openBlock(),u.createElementBlock("div",null,[t.selected?(u.openBlock(),u.createElementBlock("div",O6e,[u.createVNode(s,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{class:"h-[30px] w-[30px] flex items-center justify-center",onClick:e[0]||(e[0]=p=>n.isFormFilter=!0)},[u.createVNode(o,{class:"h-[20px] text-gray-500"})])]),default:u.withCtx(()=>[e[19]||(e[19]=u.createTextVNode(" Редагувати фільтри "))]),_:1}),u.createVNode(s,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createElementVNode("button",{class:"h-[30px] w-[30px] flex items-center justify-center",onClick:e[1]||(e[1]=p=>n.isFormGrid=!0)},[u.createVNode(l,{class:"h-[20px] text-gray-500"})])]),default:u.withCtx(()=>[e[20]||(e[20]=u.createTextVNode(" Редагувати структуру дашборду "))]),_:1}),u.createVNode(s,{placement:"left",trigger:"hover"},{reference:u.withCtx(()=>[u.createVNode(s,{placement:"bottom-left"},{reference:u.withCtx(()=>[u.createElementVNode("button",H6e,[u.createVNode(c,{class:"h-[20px]"})])]),default:u.withCtx(()=>[u.createElementVNode("div",F6e,[u.createElementVNode("button",{onClick:e[2]||(e[2]=p=>{i.closePopover(),n.isFormEdit=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Редагувати дашборд "),u.createElementVNode("button",{onClick:e[3]||(e[3]=p=>{i.closePopover(),n.isDeleteConfirm=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Видалити дашборд ")])]),_:1})]),default:u.withCtx(()=>[e[21]||(e[21]=u.createTextVNode(" Керування дашбордом "))]),_:1})])):u.createCommentVNode("",!0),u.createVNode(h,{teleport:"#modal",visible:n.isDeleteConfirm,size:"small",title:"Ви впевнені?",onClose:e[6]||(e[6]=p=>n.isDeleteConfirm=!1)},{default:u.withCtx(()=>[u.createElementVNode("div",q6e,[e[22]||(e[22]=u.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей дашборд? ",-1)),u.createElementVNode("div",j6e,[u.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=p=>n.isDeleteConfirm=!1)}," Скасувати "),u.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[5]||(e[5]=(...p)=>i.deleteDashboard&&i.deleteDashboard(...p))}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"]),u.createVNode(h,{teleport:"#modal",visible:n.isFormEdit,title:"Редагувати дашборд",onClose:e[10]||(e[10]=p=>n.isFormEdit=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",$6e,[u.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[8]||(e[8]=p=>n.isFormEdit=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),u.createElementVNode("button",{onClick:e[9]||(e[9]=(...p)=>i.editDashboard&&i.editDashboard(...p)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:u.withCtx(()=>[u.createVNode(d,{ref:"formEdit",schema:n.editDashboardScheme,values:n.formEditValue,"onUpdate:values":e[7]||(e[7]=p=>n.formEditValue=p)},null,8,["schema","values"])]),_:1},8,["visible"]),u.createVNode(h,{teleport:"#modal",visible:n.isFormGrid,title:"Редагувати структуру дашборду",onClose:e[14]||(e[14]=p=>n.isFormGrid=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",G6e,[u.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[12]||(e[12]=p=>n.isFormGrid=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),u.createElementVNode("button",{onClick:e[13]||(e[13]=(...p)=>i.editDashboardGrid&&i.editDashboardGrid(...p)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:u.withCtx(()=>[u.createVNode(d,{ref:"formgrid",schema:n.editGridScheme,values:n.formGridValue,"onUpdate:values":e[11]||(e[11]=p=>n.formGridValue=p)},null,8,["schema","values"])]),_:1},8,["visible"]),u.createVNode(h,{teleport:"#modal",visible:n.isFormFilter,title:"Редагувати фільтри",onClose:e[18]||(e[18]=p=>n.isFormFilter=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",W6e,[u.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[16]||(e[16]=p=>n.isFormFilter=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),u.createElementVNode("button",{onClick:e[17]||(e[17]=(...p)=>i.editDashboardFilters&&i.editDashboardFilters(...p)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:u.withCtx(()=>[u.createVNode(d,{ref:"formFilter",schema:n.editFilterScheme,values:n.formFilterValue,"onUpdate:values":e[15]||(e[15]=p=>n.formFilterValue=p)},null,8,["schema","values"])]),_:1},8,["visible"])])}const Z6e=ft(R6e,[["render",U6e]]),Y6e={class:"flex-1 min-w-0 flex flex-col overflow-auto"},X6e={class:"max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1"},K6e={class:"relative z-10 shrink-0 mt-4 mb-6"},J6e={class:"flex items-center text-sm text-gray-600"},Q6e={key:0,class:"flex items-center justify-between gap-4 mt-3"},e8e={class:"min-w-0"},t8e={class:"text-2xl font-bold text-gray-900"},a8e={key:0,class:"mt-1.5 text-sm text-gray-600"},r8e={class:"flex items-center shrink-0"},n8e={key:1,class:"grid flex-grow w-full grid-cols-12 gap-4 py-4 pr-[15px] min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},i8e=ft({__name:"vs-editor",props:{prefix:String,customClass:{type:String,default:()=>"w-screen h-screen"},initialDashboardId:{type:String,default:""}},emits:["back"],setup(a,{emit:e}){const t=a;Qh(t.prefix||"/api");const r=e,n=u.inject("biClearDashboard",null),i=u.ref(t.initialDashboardId||""),o=u.ref(""),s=u.ref(null),l=u.ref(null),c=u.ref(null),h=async()=>{if(!i.value){s.value=null;return}try{const f=await Wt.get(`/bi-dashboard/${i.value}`);s.value=f}catch(f){console.error(f)}},d=u.computed(()=>{var f,y,v;return(v=Array.isArray((f=s.value)==null?void 0:f.widgets)?(y=s.value)==null?void 0:y.widgets:[])==null?void 0:v.find(g=>(g==null?void 0:g.name)===o.value)}),p=u.computed(()=>{var v,g,k,x,b;const y=[n?{label:"Дашборди",onClick:()=>{n(),r("back")}}:{label:"Дашборди",to:"/editor"}];if((v=s.value)!=null&&v.title||i.value){const w=((g=s.value)==null?void 0:g.title)||i.value||"Редактор",M=!!o.value;y.push({label:w,...M?{onClick:()=>{o.value=""}}:{}})}else y.push({label:"Редактор"});if(o.value&&d.value){const w=((x=(k=d.value)==null?void 0:k.data)==null?void 0:x.title)||((b=d.value)==null?void 0:b.title)||o.value;y.push({label:w})}return y});return u.watch(i,(f,y)=>{var g,k,x;y&&(o.value="");const v=new URL(window.top.location.href);f?((g=v==null?void 0:v.searchParams)==null||g.set("dashboard",f),(x=(k=window.top)==null?void 0:k.history)==null||x.pushState({},"",v),h()):(v==null||v.searchParams.delete("dashboard"),v==null||v.searchParams.delete("widget"))}),u.onMounted(()=>{var f,y;if(t.initialDashboardId)i.value=t.initialDashboardId;else{const v=new URLSearchParams(((y=(f=window.top)==null?void 0:f.location)==null?void 0:y.search)||""),g=v.get("dashboard");g&&(i.value=g),o.value=v.get("widget")||""}h()}),(f,y)=>{var v,g;return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["flex w-full h-full",[a.customClass]])},[u.createElementVNode("div",Y6e,[u.createElementVNode("div",X6e,[u.createElementVNode("div",K6e,[u.createElementVNode("div",J6e,[u.createVNode($k,{items:p.value,compact:""},null,8,["items"])]),i.value&&s.value?(u.openBlock(),u.createElementBlock("div",Q6e,[u.createElementVNode("div",e8e,[u.createElementVNode("h1",t8e,u.toDisplayString(s.value.title||i.value),1),s.value.description?(u.openBlock(),u.createElementBlock("p",a8e,u.toDisplayString(s.value.description),1)):u.createCommentVNode("",!0)]),u.createElementVNode("div",r8e,[o.value?(u.openBlock(),u.createElementBlock("button",{key:0,type:"button",class:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors",onClick:y[0]||(y[0]=k=>o.value="")},[u.createVNode(u.unref(Xp),{class:"w-4 h-4"}),y[6]||(y[6]=u.createTextVNode(" Закрити "))])):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createVNode(Z6e,{selected:i.value,"onUpdate:selected":y[1]||(y[1]=k=>i.value=k),dashboardData:s.value,columns:(v=s.value)==null?void 0:v.columns,selectedWidgetData:d.value,prefix:a.prefix,onUpdateEditor:h},null,8,["selected","dashboardData","columns","selectedWidgetData","prefix"]),u.createElementVNode("button",{type:"button",class:"ml-4 flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",onClick:y[2]||(y[2]=k=>{var x,b;return(b=(x=c.value)==null?void 0:x.open)==null?void 0:b.call(x)})},y[7]||(y[7]=[u.createElementVNode("span",{class:"leading-none"},"+",-1),u.createTextVNode(" Створити віджет ")])),i.value?(u.openBlock(),u.createBlock(qie,{key:0,ref_key:"createWidgetRef",ref:c,inline:"",columns:(g=s.value)==null?void 0:g.columns,selectedDashboard:i.value,onUpdateData:h},null,8,["columns","selectedDashboard"])):u.createCommentVNode("",!0)],64))])])):u.createCommentVNode("",!0)]),o.value&&s.value?(u.openBlock(),u.createBlock(N6e,{key:0,"selected-widget":o.value,"onUpdate:selectedWidget":y[3]||(y[3]=k=>o.value=k),"selected-widget-data":d.value,"current-widget-data":l.value,"selected-dashboard":i.value,"dashboard-widgets":s.value.widgets||[],onUpdateData:h},null,8,["selected-widget","selected-widget-data","current-widget-data","selected-dashboard","dashboard-widgets"])):(u.openBlock(),u.createElementBlock("div",n8e,[s.value?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:1},u.renderList(s.value.panels,(k,x)=>{var b;return u.openBlock(),u.createElementBlock("div",{key:x,class:u.normalizeClass([`col-span-${k.col||12}`,"flex flex-col gap-[10px]"])},[(b=k.widgets)!=null&&b.length?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:0},u.renderList(k.widgets,w=>(u.openBlock(),u.createBlock(Tl,{onClick:M=>o.value=w,"onUpdate:currentWidgetData":y[4]||(y[4]=M=>l.value=M),key:w,dashboard:i.value,widget:w,selectedWidget:o.value,"dashboard-widgets":s.value.widgets,class:u.normalizeClass({"border border-blue-500":o.value===w})},null,8,["onClick","dashboard","widget","selectedWidget","dashboard-widgets","class"]))),128)):(u.openBlock(),u.createBlock(Tl,{key:1,onClick:w=>o.value=k.widget,"onUpdate:currentWidgetData":y[5]||(y[5]=w=>l.value=w),class:u.normalizeClass(["flex flex-col",{"border border-blue-500":o.value===k.widget}]),dashboard:i.value,widget:k.widget,selectedWidget:o.value,"dashboard-widgets":s.value.widgets},null,8,["onClick","class","dashboard","widget","selectedWidget","dashboard-widgets"]))],2)}),128)):(u.openBlock(),u.createBlock(t1,{key:0,class:"col-span-12"}))]))])])],2)}}},[["__scopeId","data-v-cc75be6a"]]),o8e={class:"w-full h-screen"},s8e=u.defineComponent({__name:"vs-editor-page",props:{prefix:{default:"/api"},dashboardId:{default:""}},emits:["back"],setup(a){const e=a,t=e.prefix,r=e.dashboardId;return(n,i)=>(u.openBlock(),u.createElementBlock("div",o8e,[u.createVNode(i8e,{customClass:"h-full w-full",prefix:u.unref(t),"initial-dashboard-id":u.unref(r),onBack:i[0]||(i[0]=o=>n.$emit("back"))},null,8,["prefix","initial-dashboard-id"])]))}}),l8e={class:"relative group h-full"},c8e={class:"flex items-start gap-3 flex-1 min-h-0"},h8e={class:"p-2 bg-blue-50 rounded-lg group-hover:bg-blue-100 transition-colors shrink-0"},u8e={class:"flex-1 min-w-0 flex flex-col min-h-0"},d8e={class:"font-semibold text-gray-900 mb-1 truncate"},p8e={key:0,class:"text-sm text-gray-600 mb-2 line-clamp-2 min-h-10"},f8e={key:1,class:"text-sm text-gray-600 mb-2 line-clamp-2 min-h-10 invisible","aria-hidden":"true"},y8e={key:2,class:"text-sm text-gray-400 mt-1 shrink-0"},v8e=ft({__name:"dashboard-card",props:{title:String,description:String,modified:String,name:String,widgetCount:Number,reserveLines:Number,dashboardRouteName:String,onOpenEditor:Function,onOpenView:Function},setup(a){const e=a,t=Jp(),r=u.ref(!1);function n(){var o;e.dashboardRouteName&&(e.onOpenEditor?e.onOpenEditor(e.dashboardRouteName):(o=t==null?void 0:t.push)==null||o.call(t,{path:"/editor",query:{dashboard:e.dashboardRouteName}}))}function i(o){o.target.closest(".dashboard-card-menu")||(r.value=!1)}return u.onMounted(()=>document.addEventListener("click",i)),u.onUnmounted(()=>document.removeEventListener("click",i)),(o,s)=>(u.openBlock(),u.createElementBlock("div",l8e,[u.createElementVNode("button",{type:"button",class:"w-full h-full bg-white border border-gray-200 rounded-lg p-6 hover:shadow-md hover:border-blue-200 transition-all text-left animate-fade-in flex flex-col",onClick:n},[u.createElementVNode("div",c8e,[u.createElementVNode("div",h8e,[u.createVNode(u.unref(Ak),{size:24,class:"w-5 h-5 text-blue-600"})]),u.createElementVNode("div",u8e,[u.createElementVNode("h3",d8e,u.toDisplayString(a.title),1),a.description?(u.openBlock(),u.createElementBlock("p",p8e,u.toDisplayString(a.description),1)):(u.openBlock(),u.createElementBlock("p",f8e," ")),a.widgetCount!=null?(u.openBlock(),u.createElementBlock("p",y8e,u.toDisplayString(a.widgetCount)+" віджетів ",1)):u.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-cde0f33b"]]),g8e=[{type:"Text",key:"name",label:"Назва",validators:["required"],original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"title",label:"Заголовок",validators:["required"],original:{type:"Text",ua:"Титул",col:8}},{type:"Text",key:"description",label:"Опис",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"words",label:"Ключові слова",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}];function m8e(a){return!Array.isArray(a)||a.length===0?{}:a.reduce((e,t)=>{if(!t||t.key==null)return e;const{key:r,...n}=t;return e[r]=n,e},{})}const k8e={class:"flex-1 bg-gray-50"},x8e={class:"max-w-7xl mx-auto px-6 py-8"},b8e={class:"mb-6"},w8e={class:"flex items-center justify-between mb-6"},M8e={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},_8e={class:"flex items-center space-x-4"},S8e={class:"flex-1 relative"},C8e={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},D8e=u.defineComponent({__name:"all-dashboards-page",props:{prefix:{}},setup(a){const e=u.defineAsyncComponent(()=>Promise.resolve().then(()=>Si)),t=m8e(g8e),r=u.ref([]),n=u.ref([]);Jp();const i=u.inject("biSetDashboard"),o=a,s=u.ref(null),l=u.ref(!1),c=u.ref({});Qh(o.prefix||"/api");async function h(){try{const g=await Wt.get("/bi-dashboard?type=db"),k=Array.isArray(g==null?void 0:g.rows)?g.rows:[];n.value=k,r.value=k.map(x=>({routeName:String(x.name??""),title:x.title??x.name??"Без назви",description:x.description??null,modified:"-",name:"-"}))}catch(g){console.error("Failed to load dashboards",g),n.value=[],r.value=[]}}async function d(){var k,x,b;const g=(x=(k=u.getCurrentInstance())==null?void 0:k.proxy)==null?void 0:x.$notify;try{await((b=s.value)==null?void 0:b.doValidation()),await Wt.post("/bi-dashboard",c.value),l.value=!1,c.value={},g==null||g({type:"success",title:"Успішно!",message:"Дашборд створено успішно"}),await h()}catch{g==null||g({type:"error",title:"Помилка!",message:"При спробі створити дашборд виникла помилка"})}}u.onMounted(h);const p=u.ref(1),f=()=>{const g=window.innerWidth;p.value=g>=1024?3:g>=768?2:1};u.onMounted(()=>{f(),window.addEventListener("resize",f)}),u.onUnmounted(()=>{window.removeEventListener("resize",f)});const y=g=>g?g.trim().length>70?2:1:0,v=g=>{const k=p.value||1,b=Math.floor(g/k)*k,w=b+k,M=r.value.slice(b,w);let _=0;for(const S of M){const C=y(S.description??null);if(C>_&&(_=C),_===2)break}return _};return u.ref("grid"),(g,k)=>(u.openBlock(),u.createElementBlock("div",k8e,[u.createElementVNode("div",x8e,[u.createElementVNode("div",b8e,[u.createElementVNode("div",w8e,[k[5]||(k[5]=u.createElementVNode("div",null,[u.createElementVNode("h1",{class:"text-3xl font-bold text-gray-900"},"Дашборди"),u.createElementVNode("p",{class:"mt-2 text-gray-600"}," Керуйте та переглядайте свої аналітичні дашборди ")],-1)),u.createElementVNode("button",{type:"button",class:"flex items-center gap-2 px-4 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",onClick:k[0]||(k[0]=x=>l.value=!0)},[u.createVNode(u.unref(Yp),{size:24,class:"w-4 h-4"}),k[4]||(k[4]=u.createElementVNode("span",null,"Новий дашборд",-1))])]),u.createVNode(El,{teleport:"#modal",visible:l.value,title:"Створити дашборд",onClose:k[3]||(k[3]=x=>l.value=!1)},{footer:u.withCtx(()=>[u.createElementVNode("div",M8e,[u.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",onClick:k[2]||(k[2]=x=>l.value=!1)}," Скасувати "),u.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300",onClick:d}," Зберегти ")])]),default:u.withCtx(()=>[u.createVNode(u.unref(e),{ref_key:"createFormRef",ref:s,schema:u.unref(t),values:c.value,"onUpdate:values":k[1]||(k[1]=x=>c.value=x)},null,8,["schema","values"])]),_:1},8,["visible"]),u.createElementVNode("div",_8e,[u.createElementVNode("div",S8e,[u.createVNode(u.unref(zk),{size:24,class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),k[6]||(k[6]=u.createElementVNode("input",{type:"text",placeholder:"Пошук дашбордів...",class:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",value:""},null,-1))])])]),u.createElementVNode("div",C8e,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.value,(x,b)=>(u.openBlock(),u.createElementBlock("div",{key:b,class:"cursor-pointer h-full"},[u.createVNode(v8e,{title:x.title,description:x.description,modified:x.modified,name:x.name,reserveLines:v(b),"dashboard-route-name":x.routeName,"on-open-editor":u.unref(i),"on-open-view":u.unref(i)},null,8,["title","description","modified","name","reserveLines","dashboard-route-name","on-open-editor","on-open-view"])]))),128))])])]))}}),A8e=u.defineComponent({__name:"editor-root-page",props:{prefix:{default:"/api"}},setup(a){const e=a,t=u.computed(()=>e.prefix),r=u.ref(""),n=Sie();u.onMounted(()=>{var s;const o=(s=n==null?void 0:n.query)==null?void 0:s.dashboard;o!=null&&typeof o=="string"&&(r.value=o.trim())});const i=u.computed(()=>r.value.length>0);return u.provide("biSetDashboard",o=>{r.value=o||""}),u.provide("biClearDashboard",()=>{r.value=""}),u.provide("biSelectedDashboardId",u.readonly(r)),(o,s)=>i.value?(u.openBlock(),u.createBlock(s8e,{key:`editor-${r.value}`,prefix:t.value,"dashboard-id":r.value,onBack:s[0]||(s[0]=l=>r.value="")},null,8,["prefix","dashboard-id"])):(u.openBlock(),u.createBlock(D8e,{key:0,prefix:t.value},null,8,["prefix"]))}});function dr(a,e){const t=a&&typeof a=="object"&&"value"in a?a.value:a;if(t==null)return"";const r=Number(t);return Number.isNaN(r)?String(t):new Intl.NumberFormat("en",e??{notation:"compact"}).format(r)}function zh(a){if(!(a!=null&&a.includes("T")))return a??"";const[e,t,r]=a.split("T")[0].split("-");return`${r}.${t}.${e}`}function T8e(a){return Intl.NumberFormat("en").format(a??0)}class E8e{static getTooltipOptions(e=!0){return{show:e,axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}}}}const V8e={show_label:!1,show_legend:!1,label:null,legend:{position:null},colors:null,color:null,title:null};function L8e(){const a="0123456789ABCDEF";let e="#";for(let t=0;t<6;t+=1)e+=a[Math.floor(Math.random()*16)];return e}function Jo(a=V8e){var t;const e={label:{show:a==null?void 0:a.show_label,formatter:(a==null?void 0:a.formatter)??(r=>dr(r)),...(a==null?void 0:a.label)||{}},legend:{...(a==null?void 0:a.legend)||{},[((t=a==null?void 0:a.legend)==null?void 0:t.position)||"bottom"]:"0",show:(a==null?void 0:a.show_legend)||!1},barWidth:"70%",grid:{borderColor:"#e5e7eb"},title:{...(a==null?void 0:a.title)||{}}};return(a!=null&&a.colors||a!=null&&a.color)&&(e.color=(a==null?void 0:a.colors)||(a==null?void 0:a.color)||null),e}function vD(a){return{color:"#9ca3af",fontSize:10,fontFamily:"Inter, ui-sans-serif, system-ui",fontWeight:400,label:a==null?void 0:a.label,show:!0,formatter:(a==null?void 0:a.formatter)??(e=>dr(e)),margin:(a==null?void 0:a.margin)??7,interval:(a==null?void 0:a.interval)??"auto",rotate:(a==null?void 0:a.rotate)??0}}const gD=["#d3c7e6","#bedae3","#f8e9cb","#ff8c8c","#c5d8be","#ffc6c6","#ffc39a","#fff7c5","#d8ffc0","#d4f7ff"];class wp{static getLabelOptions(e={}){return{show:(e==null?void 0:e.show_label)||(e==null?void 0:e.show)||!1,fontSize:"10",position:(e==null?void 0:e.position)||"inside",formatter:(e==null?void 0:e.formatter)||"{d}%",...e}}static getLegendOpions(e={}){return{...e,position:(e==null?void 0:e.position)||"bottom"}}}const Ia={props:["source","style","widget","dashboard","title","currentWidget","widgetData","prefix"],data(){return{sourceData:null,styleData:null,widgetName:"",dimensions:[],dashboardName:"",titleCharts:"",widgetInstance:null}},mounted(){window.addEventListener("resize",this.handleResize),window.addEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.addEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},unmounted(){window.removeEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.removeEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},watch:{sourceData:{async handler(){setTimeout(()=>{this==null||this.onChangedData()},0)}}},methods:{checkCustomStyleEvent(a){this.changeOptionsByName(a.chartId,a.options)},checkCustomEvent({filterUrl:a}){this.getDataFromURL(a)},handleResize(){this.widgetInstance&&this.widgetInstance.resize()},async getDataFromURL(a){var e;try{const t=await Wt.get(a);this.sourceData=(t==null?void 0:t.source)||[],this.$emit("update:widgetData",t),this.dimensions=Object.keys(((e=this.sourceData)==null?void 0:e[0])||{}),this.titleCharts=this.style?this.style:(t==null?void 0:t.title)||"",this.styleData=(t==null?void 0:t.style)||{}}catch(t){const r={message:"Дані не знайдено",title:"Помилка!",type:"error",status:400,id:this.widgetName};(t==null?void 0:t.status)=="404"&&(r.status=404,r.message="Дані не знайдено"),(t==null?void 0:t.status)=="400"&&(r.message="Перевірте налаштування або зверніться до адміністратора"),(t==null?void 0:t.status)=="500"&&(r.message="Сталася помилка сервера"),this.$emit("update:widgetData",r)}},getValues(){return this.sourceData.map(a=>{var e;return parseFloat(a[(e=this.columns)==null?void 0:e[1]])})},formatDate(a){const e=new Date(a);if(isNaN(e))return a;const t=String(e.getDate()).padStart(2,"0"),n=["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"][e.getMonth()],i=e.getFullYear();return`${t} ${n} ${i}`},async getData(){var a;try{if(this.source)this.sourceData=[...this.source],this.styleData=this.style,this.titleCharts=this.title,this.dimensions=Object.keys(((a=this.sourceData)==null?void 0:a[0])||{});else{this.widgetName=this.widget,this.dashboardName=this.dashboard;const e=this.dashboardName?`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}`:`${this.prefix||""}/bi-data?&widget=${this.widgetName}`;await this.getDataFromURL(e)}}catch(e){console.error(e)}},async initChart(a,e,t){var r,n,i,o,s,l,c;this.widgetInstance&&this.widgetInstance.clear();try{const h=this.$refs.chart,d=Ju(h),p={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"transparent",shadowColor:"transparent",padding:[0,0,0,0],borderWidth:0,formatter:f=>{var k;const y=(k=f[0])==null?void 0:k.axisValue;let g=`
|
|
8350
8350
|
<div style="background-color: rgba(255, 255, 255, 0.7)" class="border border-gray-200 text-gray-800 rounded-lg shadow-md dark:bg-neutral-800 dark:border-neutral-700 min-w-28">
|
|
8351
8351
|
<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 px-2 py-1">
|
|
8352
8352
|
${y?this.formatDate(y):"N/A"}
|
|
@@ -401,8 +401,8 @@ function kk(r, e) {
|
|
|
401
401
|
}
|
|
402
402
|
const Pk = /* @__PURE__ */ We(Lk, [["render", kk]]), p_ = {
|
|
403
403
|
"bi-bar": ue(() => Promise.resolve().then(() => CK)),
|
|
404
|
-
"bi-number": ue(() => import("./vs-number-
|
|
405
|
-
"bi-text": ue(() => import("./vs-text-
|
|
404
|
+
"bi-number": ue(() => import("./vs-number-BTJmZZ5H.js")),
|
|
405
|
+
"bi-text": ue(() => import("./vs-text-CYIHiHjf.js")),
|
|
406
406
|
"bi-listbar": ue(() => Promise.resolve().then(() => AQ)),
|
|
407
407
|
"bi-pie": ue(() => Promise.resolve().then(() => BK)),
|
|
408
408
|
"bi-donut": ue(() => Promise.resolve().then(() => PK)),
|
|
@@ -410,10 +410,10 @@ const Pk = /* @__PURE__ */ We(Lk, [["render", kk]]), p_ = {
|
|
|
410
410
|
"bi-stat": ue(() => Promise.resolve().then(() => iQ)),
|
|
411
411
|
"bi-pivot": ue(() => Promise.resolve().then(() => WQ)),
|
|
412
412
|
"bi-progress": ue(() => Promise.resolve().then(() => mQ)),
|
|
413
|
-
"bi-funnel": ue(() => import("./vs-funnel-bar-
|
|
414
|
-
"bi-map": ue(() => import("./vs-map-
|
|
415
|
-
"bi-cluster": ue(() => import("./vs-map-cluster-
|
|
416
|
-
"bi-table": ue(() => import("./vs-table-
|
|
413
|
+
"bi-funnel": ue(() => import("./vs-funnel-bar-DkvPhko1.js")),
|
|
414
|
+
"bi-map": ue(() => import("./vs-map-Dq_42OWv.js")),
|
|
415
|
+
"bi-cluster": ue(() => import("./vs-map-cluster-DV1Z30Jd.js")),
|
|
416
|
+
"bi-table": ue(() => import("./vs-table-Bq9QnYnY.js"))
|
|
417
417
|
};
|
|
418
418
|
let jT = "/api";
|
|
419
419
|
function bc(r) {
|
|
@@ -1015,7 +1015,7 @@ const ZQ = /* @__PURE__ */ We(pP, [["render", mP]]), _P = {
|
|
|
1015
1015
|
emits: "update-data",
|
|
1016
1016
|
setup(r, { expose: e, emit: t }) {
|
|
1017
1017
|
var d;
|
|
1018
|
-
const a = ue(() => import("./index-
|
|
1018
|
+
const a = ue(() => import("./index-D_qtEvN8.js")), n = (d = io().proxy) == null ? void 0 : d.$notify, i = t, o = r, s = Ct(!1), l = Ct({}), u = Ct();
|
|
1019
1019
|
function f() {
|
|
1020
1020
|
s.value = !0;
|
|
1021
1021
|
}
|
|
@@ -1251,7 +1251,7 @@ const ZQ = /* @__PURE__ */ We(pP, [["render", mP]]), _P = {
|
|
|
1251
1251
|
},
|
|
1252
1252
|
setup(r, { expose: e }) {
|
|
1253
1253
|
var d, p, g, y, m, _;
|
|
1254
|
-
const t = ue(() => import("./index-
|
|
1254
|
+
const t = ue(() => import("./index-D_qtEvN8.js")), { $notify: a } = io().proxy, n = r, i = Ct(null), o = {
|
|
1255
1255
|
show: {
|
|
1256
1256
|
label: "Label",
|
|
1257
1257
|
type: "switcher",
|
|
@@ -2853,7 +2853,7 @@ const uR = { class: "space-y-4" }, fR = {
|
|
|
2853
2853
|
emits: ["update-dashboard"],
|
|
2854
2854
|
setup(r, { expose: e, emit: t }) {
|
|
2855
2855
|
var c, v, d, p, g, y, m, _, x, b, w, S, D, T, C, M, I, L, E, k, P, N, R, O, F, W, Y, tt, rt, ut, Nt, ae, dt, at, mt, K, ft, Gt, kt, Ft, Zt;
|
|
2856
|
-
const a = ue(() => import("./index-
|
|
2856
|
+
const a = ue(() => import("./index-D_qtEvN8.js")), { $notify: n } = io().proxy, i = t, o = r, s = Ct(null), l = {
|
|
2857
2857
|
text: {
|
|
2858
2858
|
type: "Text",
|
|
2859
2859
|
label: "Text",
|
|
@@ -46912,7 +46912,7 @@ const Qq = { class: "space-y-4" }, Jq = {
|
|
|
46912
46912
|
},
|
|
46913
46913
|
setup(r, { expose: e }) {
|
|
46914
46914
|
const t = ue(
|
|
46915
|
-
() => import("./index-
|
|
46915
|
+
() => import("./index-D_qtEvN8.js").then((f) => f.VsInputMonaco)
|
|
46916
46916
|
), a = Ct(null), { $notify: n } = io().proxy, i = r, o = (f, { dimensions: h, source: c }) => {
|
|
46917
46917
|
const v = f.getOption(), { data: d, ...p } = (v == null ? void 0 : v.series)[0], [, ...g] = h || [], y = g.map((m, _) => ({
|
|
46918
46918
|
...(v == null ? void 0 : v.series[_]) || {},
|
|
@@ -46987,7 +46987,7 @@ const Qq = { class: "space-y-4" }, Jq = {
|
|
|
46987
46987
|
emits: ["update-dashboard"],
|
|
46988
46988
|
setup(r, { emit: e }) {
|
|
46989
46989
|
var f;
|
|
46990
|
-
const t = ue(() => import("./index-
|
|
46990
|
+
const t = ue(() => import("./index-D_qtEvN8.js")), { $notify: a } = io().proxy, n = e, i = r, o = Ct(null), s = {
|
|
46991
46991
|
granularity: {
|
|
46992
46992
|
ua: "Granularity",
|
|
46993
46993
|
type: "checkbox",
|
|
@@ -47112,7 +47112,7 @@ const Qq = { class: "space-y-4" }, Jq = {
|
|
|
47112
47112
|
emits: /* @__PURE__ */ dh(["update-data"], ["update:selectedWidget"]),
|
|
47113
47113
|
setup(r, { emit: e }) {
|
|
47114
47114
|
var _, x;
|
|
47115
|
-
const t = ue(() => import("./index-
|
|
47115
|
+
const t = ue(() => import("./index-D_qtEvN8.js")), a = (x = (_ = io()) == null ? void 0 : _.proxy) == null ? void 0 : x.$notify, n = e, i = Ct(null), o = r, s = Ct(!1), l = Ct(!0), u = Ct(!1), f = Ct({}), h = YT(r, "selectedWidget"), c = [
|
|
47116
47116
|
"table",
|
|
47117
47117
|
"text",
|
|
47118
47118
|
"number",
|
|
@@ -47511,7 +47511,7 @@ const Qq = { class: "space-y-4" }, Jq = {
|
|
|
47511
47511
|
setup(r) {
|
|
47512
47512
|
return (e, t) => (H(), Wt(zt(dk), Pa(e.$attrs, { size: 24 }), null, 16));
|
|
47513
47513
|
}
|
|
47514
|
-
}, Cj = ue(() => import("./index-
|
|
47514
|
+
}, Cj = ue(() => import("./index-D_qtEvN8.js")), Aj = {
|
|
47515
47515
|
components: {
|
|
47516
47516
|
VsModal: $l,
|
|
47517
47517
|
VForm: Cj,
|
|
@@ -47523,26 +47523,32 @@ const Qq = { class: "space-y-4" }, Jq = {
|
|
|
47523
47523
|
IconTable: Dj
|
|
47524
47524
|
},
|
|
47525
47525
|
watch: {
|
|
47526
|
-
dashboardData
|
|
47527
|
-
|
|
47528
|
-
|
|
47529
|
-
|
|
47530
|
-
|
|
47531
|
-
|
|
47532
|
-
|
|
47533
|
-
|
|
47534
|
-
|
|
47535
|
-
|
|
47536
|
-
|
|
47537
|
-
|
|
47538
|
-
|
|
47539
|
-
|
|
47540
|
-
|
|
47541
|
-
|
|
47542
|
-
|
|
47543
|
-
|
|
47544
|
-
|
|
47545
|
-
|
|
47526
|
+
dashboardData: {
|
|
47527
|
+
handler(r) {
|
|
47528
|
+
var t, a;
|
|
47529
|
+
if (this.formEditValue = {
|
|
47530
|
+
title: r == null ? void 0 : r.title,
|
|
47531
|
+
description: r == null ? void 0 : r.description,
|
|
47532
|
+
table_name: r == null ? void 0 : r.table_name,
|
|
47533
|
+
db: r == null ? void 0 : r.db,
|
|
47534
|
+
public: r == null ? void 0 : r.public,
|
|
47535
|
+
words: r == null ? void 0 : r.words
|
|
47536
|
+
}, !((t = r == null ? void 0 : r.panels) != null && t.length)) {
|
|
47537
|
+
this.formGridValue = { panels: [] }, this.formFilterValue = { filters: (r == null ? void 0 : r.filters) || null };
|
|
47538
|
+
return;
|
|
47539
|
+
}
|
|
47540
|
+
const e = (a = r == null ? void 0 : r.panels) == null ? void 0 : a.map((n) => {
|
|
47541
|
+
var s, l;
|
|
47542
|
+
const { title: i = "", type: o = "" } = ((l = (s = r == null ? void 0 : r.widgets) == null ? void 0 : s.find((u) => (u == null ? void 0 : u.name) === (n == null ? void 0 : n.widget))) == null ? void 0 : l.data) || {};
|
|
47543
|
+
return { title: i, type: o, ...n };
|
|
47544
|
+
});
|
|
47545
|
+
this.formGridValue = {
|
|
47546
|
+
panels: e
|
|
47547
|
+
}, this.formFilterValue = {
|
|
47548
|
+
filters: (r == null ? void 0 : r.filters) || null
|
|
47549
|
+
};
|
|
47550
|
+
},
|
|
47551
|
+
immediate: !0
|
|
47546
47552
|
}
|
|
47547
47553
|
},
|
|
47548
47554
|
data() {
|
|
@@ -48218,7 +48224,7 @@ const fK = { class: "flex-1 bg-gray-50" }, hK = { class: "max-w-7xl mx-auto px-6
|
|
|
48218
48224
|
prefix: {}
|
|
48219
48225
|
},
|
|
48220
48226
|
setup(r) {
|
|
48221
|
-
const e = ue(() => import("./index-
|
|
48227
|
+
const e = ue(() => import("./index-D_qtEvN8.js")), t = uK(lK), a = Ct([]), n = Ct([]);
|
|
48222
48228
|
Hy();
|
|
48223
48229
|
const i = xc("biSetDashboard"), o = r, s = Ct(null), l = Ct(!1), u = Ct({});
|
|
48224
48230
|
bc(o.prefix || "/api");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createApp as lt, h as sa, defineComponent as i1, createElementBlock as u, openBlock as y, createElementVNode as n, createBlock as g1, resolveDynamicComponent as he, toDisplayString as l1, reactive as Sa, computed as w, useAttrs as xt, onMounted as E1, onUnmounted as Pe, Teleport as Xe, createCommentVNode as W, normalizeClass as K, unref as H1, createVNode as h1, Transition as va, withCtx as X1, renderSlot as I1, ref as L, mergeModels as C1, useModel as S1, toRef as wt, provide as wa, withModifiers as B1, Fragment as w1, renderList as D1, normalizeStyle as $1, watch as u1, onBeforeUnmount as Ce, inject as ae, withDirectives as j1, withKeys as bt, vModelText as Z1, watchEffect as We, mergeProps as me, createStaticVNode as te, resolveComponent as se, useSlots as zt, createTextVNode as U1, vModelDynamic as qt, vModelRadio as rt, nextTick as K1, vShow as ve, getCurrentInstance as Vt, normalizeProps as Da, guardReactiveProps as _a, vModelCheckbox as dt } from "vue";
|
|
2
|
-
import { e, C as jt, D as Ht, E as Ct, F as At, L as Lt, k as St, P as Dt, l as _t, R as Bt, S as Pt, n as Tt, T as Ft, o as $t, X as Ut } from "./import-file-
|
|
3
|
-
import { G as Ot, H as Zt, L as Rt } from "./list-
|
|
4
|
-
import { M as It } from "./map-
|
|
2
|
+
import { e, C as jt, D as Ht, E as Ct, F as At, L as Lt, k as St, P as Dt, l as _t, R as Bt, S as Pt, n as Tt, T as Ft, o as $t, X as Ut } from "./import-file-Bz7XxTwm.js";
|
|
3
|
+
import { G as Ot, H as Zt, L as Rt } from "./list-DIYhtBuQ.js";
|
|
4
|
+
import { M as It } from "./map-CQZ_RiQg.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-vue-next v0.546.0 - ISC
|
|
7
7
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createBlock as b, openBlock as l, unref as L, mergeProps as v, createElementBlock as d, createElementVNode as c, withDirectives as F, toDisplayString as z, vShow as R, Fragment as M, renderList as P, normalizeClass as D, resolveComponent as H, createVNode as J } from "vue";
|
|
2
|
-
import { X as N, _ as w } from "./import-file-
|
|
3
|
-
import { L as O, H as W, G as q } from "./list-
|
|
2
|
+
import { X as N, _ as w } from "./import-file-Bz7XxTwm.js";
|
|
3
|
+
import { L as O, H as W, G as q } from "./list-DIYhtBuQ.js";
|
|
4
4
|
const A = {
|
|
5
5
|
__name: "close",
|
|
6
6
|
setup(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as E, a as L, p as $, b as T, c as B, V as H, d as O, e as F, l as N } from "./vs-list
|
|
2
|
-
import { _ as V, c as P } from "./import-file-
|
|
1
|
+
import { _ as E, a as L, p as $, b as T, c as B, V as H, d as O, e as F, l as N } from "./vs-list--lRWoAuT.js";
|
|
2
|
+
import { _ as V, c as P } from "./import-file-Bz7XxTwm.js";
|
|
3
3
|
import { resolveComponent as u, createElementBlock as c, openBlock as i, Fragment as w, createElementVNode as r, createBlock as C, createCommentVNode as m, createVNode as x, Teleport as R, toDisplayString as g, renderList as S, normalizeStyle as k, normalizeClass as I } from "vue";
|
|
4
4
|
const A = {
|
|
5
5
|
components: { legendIcon: L, closeIcon: E },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as F, a as G, p as T, V as P, b as A, c as Z, d as q, l as D, e as K } from "./vs-list
|
|
2
|
-
import { _ as H, V as W, c as J, g as Q, h as U, j as X } from "./import-file-
|
|
1
|
+
import { _ as F, a as G, p as T, V as P, b as A, c as Z, d as q, l as D, e as K } from "./vs-list--lRWoAuT.js";
|
|
2
|
+
import { _ as H, V as W, c as J, g as Q, h as U, j as X } from "./import-file-Bz7XxTwm.js";
|
|
3
3
|
import { createElementBlock as g, createCommentVNode as z, openBlock as p, createElementVNode as l, normalizeClass as V, Fragment as R, renderList as N, toDisplayString as O, normalizeStyle as Y, createBlock as S, unref as j, mergeProps as $, resolveComponent as u, withDirectives as M, resolveDynamicComponent as ee, createVNode as w, vShow as C } from "vue";
|
|
4
|
-
import { M as te } from "./map-
|
|
4
|
+
import { M as te } from "./map-CQZ_RiQg.js";
|
|
5
5
|
const se = {
|
|
6
6
|
components: { legendIcon: G, closeIcon: F },
|
|
7
7
|
props: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as m, c as f, b as _, d as b } from "./import-file-
|
|
1
|
+
import { _ as m, c as f, b as _, d as b } from "./import-file-Bz7XxTwm.js";
|
|
2
2
|
import { createElementBlock as a, openBlock as r, createElementVNode as s, Fragment as n, renderList as c, toDisplayString as d } from "vue";
|
|
3
3
|
const x = {
|
|
4
4
|
name: "VsTable",
|