vue-data-ui 0.1.4 → 0.1.6
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/vue-data-ui.umd.cjs
CHANGED
|
@@ -355,9 +355,9 @@ end`};e.events.push(["putFont",function(a){(function(i){var s=i.font,o=i.out,l=i
|
|
|
355
355
|
`),o.push(` </office:body>
|
|
356
356
|
`),s.bookType=="fods"?o.push("</office:document>"):o.push("</office:document-content>"),o.join("")}}();function My(t,e){if(e.bookType=="fods")return Py(t,e);var r=Yd(),A="",n=[],a=[];return A="mimetype",kt(r,A,"application/vnd.oasis.opendocument.spreadsheet"),A="content.xml",kt(r,A,Py(t,e)),n.push([A,"text/xml"]),a.push([A,"ContentFile"]),A="styles.xml",kt(r,A,AO(t,e)),n.push([A,"text/xml"]),a.push([A,"StylesFile"]),A="meta.xml",kt(r,A,Gr+MB()),n.push([A,"text/xml"]),a.push([A,"MetadataFile"]),A="manifest.rdf",kt(r,A,gN(a)),n.push([A,"application/rdf+xml"]),A="META-INF/manifest.xml",kt(r,A,hN(n)),r}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function ku(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function nO(t){return typeof TextEncoder<"u"?new TextEncoder().encode(t):Hn(Ha(t))}function aO(t,e){e:for(var r=0;r<=t.length-e.length;++r){for(var A=0;A<e.length;++A)if(t[r+A]!=e[A])continue e;return!0}return!1}function _i(t){var e=t.reduce(function(n,a){return n+a.length},0),r=new Uint8Array(e),A=0;return t.forEach(function(n){r.set(n,A),A+=n.length}),r}function iO(t,e,r){var A=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,n=r/Math.pow(10,A-6176);t[e+15]|=A>>7,t[e+14]|=(A&127)<<1;for(var a=0;n>=1;++a,n/=256)t[e+a]=n&255;t[e+15]|=r>=0?0:128}function Jl(t,e){var r=e?e[0]:0,A=t[r]&127;e:if(t[r++]>=128&&(A|=(t[r]&127)<<7,t[r++]<128||(A|=(t[r]&127)<<14,t[r++]<128)||(A|=(t[r]&127)<<21,t[r++]<128)||(A+=(t[r]&127)*Math.pow(2,28),++r,t[r++]<128)||(A+=(t[r]&127)*Math.pow(2,35),++r,t[r++]<128)||(A+=(t[r]&127)*Math.pow(2,42),++r,t[r++]<128)))break e;return e&&(e[0]=r),A}function Ar(t){var e=new Uint8Array(7);e[0]=t&127;var r=1;e:if(t>127){if(e[r-1]|=128,e[r]=t>>7&127,++r,t<=16383||(e[r-1]|=128,e[r]=t>>14&127,++r,t<=2097151)||(e[r-1]|=128,e[r]=t>>21&127,++r,t<=268435455)||(e[r-1]|=128,e[r]=t/256>>>21&127,++r,t<=34359738367)||(e[r-1]|=128,e[r]=t/65536>>>21&127,++r,t<=4398046511103))break e;e[r-1]|=128,e[r]=t/16777216>>>21&127,++r}return e.slice(0,r)}function wo(t){var e=0,r=t[e]&127;e:if(t[e++]>=128){if(r|=(t[e]&127)<<7,t[e++]<128||(r|=(t[e]&127)<<14,t[e++]<128)||(r|=(t[e]&127)<<21,t[e++]<128))break e;r|=(t[e]&127)<<28}return r}function eA(t){for(var e=[],r=[0];r[0]<t.length;){var A=r[0],n=Jl(t,r),a=n&7;n=Math.floor(n/8);var i=0,s;if(n==0)break;switch(a){case 0:{for(var o=r[0];t[r[0]++]>=128;);s=t.slice(o,r[0])}break;case 5:i=4,s=t.slice(r[0],r[0]+i),r[0]+=i;break;case 1:i=8,s=t.slice(r[0],r[0]+i),r[0]+=i;break;case 2:i=Jl(t,r),s=t.slice(r[0],r[0]+i),r[0]+=i;break;case 3:case 4:default:throw new Error("PB Type ".concat(a," for Field ").concat(n," at offset ").concat(A))}var l={data:s,type:a};e[n]==null?e[n]=[l]:e[n].push(l)}return e}function BA(t){var e=[];return t.forEach(function(r,A){r.forEach(function(n){n.data&&(e.push(Ar(A*8+n.type)),n.type==2&&e.push(Ar(n.data.length)),e.push(n.data))})}),_i(e)}function Gn(t){for(var e,r=[],A=[0];A[0]<t.length;){var n=Jl(t,A),a=eA(t.slice(A[0],A[0]+n));A[0]+=n;var i={id:wo(a[1][0].data),messages:[]};a[2].forEach(function(s){var o=eA(s.data),l=wo(o[3][0].data);i.messages.push({meta:o,data:t.slice(A[0],A[0]+l)}),A[0]+=l}),(e=a[3])!=null&&e[0]&&(i.merge=wo(a[3][0].data)>>>0>0),r.push(i)}return r}function Bo(t){var e=[];return t.forEach(function(r){var A=[];A[1]=[{data:Ar(r.id),type:0}],A[2]=[],r.merge!=null&&(A[3]=[{data:Ar(+!!r.merge),type:0}]);var n=[];r.messages.forEach(function(i){n.push(i.data),i.meta[3]=[{type:0,data:Ar(i.data.length)}],A[2].push({data:BA(i.meta),type:2})});var a=BA(A);e.push(Ar(a.length)),e.push(a),n.forEach(function(i){return e.push(i)})}),_i(e)}function sO(t,e){if(t!=0)throw new Error("Unexpected Snappy chunk type ".concat(t));for(var r=[0],A=Jl(e,r),n=[];r[0]<e.length;){var a=e[r[0]]&3;if(a==0){var i=e[r[0]++]>>2;if(i<60)++i;else{var s=i-59;i=e[r[0]],s>1&&(i|=e[r[0]+1]<<8),s>2&&(i|=e[r[0]+2]<<16),s>3&&(i|=e[r[0]+3]<<24),i>>>=0,i++,r[0]+=s}n.push(e.slice(r[0],r[0]+i)),r[0]+=i;continue}else{var o=0,l=0;if(a==1?(l=(e[r[0]]>>2&7)+4,o=(e[r[0]++]&224)<<3,o|=e[r[0]++]):(l=(e[r[0]++]>>2)+1,a==2?(o=e[r[0]]|e[r[0]+1]<<8,r[0]+=2):(o=(e[r[0]]|e[r[0]+1]<<8|e[r[0]+2]<<16|e[r[0]+3]<<24)>>>0,r[0]+=4)),n=[_i(n)],o==0)throw new Error("Invalid offset 0");if(o>n[0].length)throw new Error("Invalid offset beyond length");if(l>=o)for(n.push(n[0].slice(-o)),l-=o;l>=n[n.length-1].length;)n.push(n[n.length-1]),l-=n[n.length-1].length;n.push(n[0].slice(-o,-o+l))}}var c=_i(n);if(c.length!=A)throw new Error("Unexpected length: ".concat(c.length," != ").concat(A));return c}function jn(t){for(var e=[],r=0;r<t.length;){var A=t[r++],n=t[r]|t[r+1]<<8|t[r+2]<<16;r+=3,e.push(sO(A,t.slice(r,r+n))),r+=n}if(r!==t.length)throw new Error("data is not a valid framed stream!");return _i(e)}function yo(t){for(var e=[],r=0;r<t.length;){var A=Math.min(t.length-r,268435455),n=new Uint8Array(4);e.push(n);var a=Ar(A),i=a.length;e.push(a),A<=60?(i++,e.push(new Uint8Array([A-1<<2]))):A<=256?(i+=2,e.push(new Uint8Array([240,A-1&255]))):A<=65536?(i+=3,e.push(new Uint8Array([244,A-1&255,A-1>>8&255]))):A<=16777216?(i+=4,e.push(new Uint8Array([248,A-1&255,A-1>>8&255,A-1>>16&255]))):A<=4294967296&&(i+=5,e.push(new Uint8Array([252,A-1&255,A-1>>8&255,A-1>>16&255,A-1>>>24&255]))),e.push(t.slice(r,r+A)),i+=A,n[0]=0,n[1]=i&255,n[2]=i>>8&255,n[3]=i>>16&255,r+=A}return _i(e)}function B1(t,e){var r=new Uint8Array(32),A=ku(r),n=12,a=0;switch(r[0]=5,t.t){case"n":r[1]=2,iO(r,n,t.v),a|=1,n+=16;break;case"b":r[1]=6,A.setFloat64(n,t.v?1:0,!0),a|=2,n+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[1]=3,A.setUint32(n,e.indexOf(t.v),!0),a|=8,n+=4;break;default:throw"unsupported cell type "+t.t}return A.setUint32(8,a,!0),r.slice(0,n)}function y1(t,e){var r=new Uint8Array(32),A=ku(r),n=12,a=0;switch(r[0]=3,t.t){case"n":r[2]=2,A.setFloat64(n,t.v,!0),a|=32,n+=8;break;case"b":r[2]=6,A.setFloat64(n,t.v?1:0,!0),a|=32,n+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[2]=3,A.setUint32(n,e.indexOf(t.v),!0),a|=16,n+=4;break;default:throw"unsupported cell type "+t.t}return A.setUint32(4,a,!0),r.slice(0,n)}function Ti(t){var e=eA(t);return Jl(e[1][0].data)}function oO(t,e,r){var A,n,a,i;if(!((A=t[6])!=null&&A[0])||!((n=t[7])!=null&&n[0]))throw"Mutation only works on post-BNC storages!";var s=((i=(a=t[8])==null?void 0:a[0])==null?void 0:i.data)&&wo(t[8][0].data)>0||!1;if(s)throw"Math only works with normal offsets";for(var o=0,l=ku(t[7][0].data),c=0,d=[],g=ku(t[4][0].data),h=0,m=[],v=0;v<e.length;++v){if(e[v]==null){l.setUint16(v*2,65535,!0),g.setUint16(v*2,65535);continue}l.setUint16(v*2,c,!0),g.setUint16(v*2,h,!0);var B,x;switch(typeof e[v]){case"string":B=B1({t:"s",v:e[v]},r),x=y1({t:"s",v:e[v]},r);break;case"number":B=B1({t:"n",v:e[v]},r),x=y1({t:"n",v:e[v]},r);break;case"boolean":B=B1({t:"b",v:e[v]},r),x=y1({t:"b",v:e[v]},r);break;default:throw new Error("Unsupported value "+e[v])}d.push(B),c+=B.length,m.push(x),h+=x.length,++o}for(t[2][0].data=Ar(o);v<t[7][0].data.length/2;++v)l.setUint16(v*2,65535,!0),g.setUint16(v*2,65535,!0);return t[6][0].data=_i(d),t[3][0].data=_i(m),o}function lO(t,e){if(!e||!e.numbers)throw new Error("Must pass a `numbers` option -- check the README");var r=t.Sheets[t.SheetNames[0]];t.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var A=un(r["!ref"]);A.s.r=A.s.c=0;var n=!1;A.e.c>9&&(n=!0,A.e.c=9),A.e.r>49&&(n=!0,A.e.r=49),n&&console.error("The Numbers writer is currently limited to ".concat(jr(A)));var a=Pu(r,{range:A,header:1}),i=["~Sh33tJ5~"];a.forEach(function(_){return _.forEach(function(S){typeof S=="string"&&i.push(S)})});var s={},o=[],l=or.read(e.numbers,{type:"base64"});l.FileIndex.map(function(_,S){return[_,l.FullPaths[S]]}).forEach(function(_){var S=_[0],Q=_[1];if(S.type==2&&S.name.match(/\.iwa/)){var j=S.content,ie=jn(j),oe=Gn(ie);oe.forEach(function(le){o.push(le.id),s[le.id]={deps:[],location:Q,type:wo(le.messages[0].meta[1][0].data)}})}}),o.sort(function(_,S){return _-S});var c=o.filter(function(_){return _>1}).map(function(_){return[_,Ar(_)]});l.FileIndex.map(function(_,S){return[_,l.FullPaths[S]]}).forEach(function(_){var S=_[0];if(_[1],!!S.name.match(/\.iwa/)){var Q=Gn(jn(S.content));Q.forEach(function(j){j.messages.forEach(function(ie){c.forEach(function(oe){j.messages.some(function(le){return wo(le.meta[1][0].data)!=11006&&aO(le.data,oe[1])})&&s[oe[0]].deps.push(j.id)})})})}});for(var d=or.find(l,s[1].location),g=Gn(jn(d.content)),h,m=0;m<g.length;++m){var v=g[m];v.id==1&&(h=v)}var B=Ti(eA(h.messages[0].data)[1][0].data);for(d=or.find(l,s[B].location),g=Gn(jn(d.content)),m=0;m<g.length;++m)v=g[m],v.id==B&&(h=v);for(B=Ti(eA(h.messages[0].data)[2][0].data),d=or.find(l,s[B].location),g=Gn(jn(d.content)),m=0;m<g.length;++m)v=g[m],v.id==B&&(h=v);for(B=Ti(eA(h.messages[0].data)[2][0].data),d=or.find(l,s[B].location),g=Gn(jn(d.content)),m=0;m<g.length;++m)v=g[m],v.id==B&&(h=v);var x=eA(h.messages[0].data);{x[6][0].data=Ar(A.e.r+1),x[7][0].data=Ar(A.e.c+1);var b=Ti(x[46][0].data),F=or.find(l,s[b].location),O=Gn(jn(F.content));{for(var W=0;W<O.length&&O[W].id!=b;++W);if(O[W].id!=b)throw"Bad ColumnRowUIDMapArchive";var q=eA(O[W].messages[0].data);q[1]=[],q[2]=[],q[3]=[];for(var L=0;L<=A.e.c;++L){var k=[];k[1]=k[2]=[{type:0,data:Ar(L+420690)}],q[1].push({type:2,data:BA(k)}),q[2].push({type:0,data:Ar(L)}),q[3].push({type:0,data:Ar(L)})}q[4]=[],q[5]=[],q[6]=[];for(var K=0;K<=A.e.r;++K)k=[],k[1]=k[2]=[{type:0,data:Ar(K+726270)}],q[4].push({type:2,data:BA(k)}),q[5].push({type:0,data:Ar(K)}),q[6].push({type:0,data:Ar(K)});O[W].messages[0].data=BA(q)}F.content=yo(Bo(O)),F.size=F.content.length,delete x[46];var re=eA(x[4][0].data);{re[7][0].data=Ar(A.e.r+1);var U=eA(re[1][0].data),T=Ti(U[2][0].data);F=or.find(l,s[T].location),O=Gn(jn(F.content));{if(O[0].id!=T)throw"Bad HeaderStorageBucket";var V=eA(O[0].messages[0].data);for(K=0;K<a.length;++K){var Y=eA(V[2][0].data);Y[1][0].data=Ar(K),Y[4][0].data=Ar(a[K].length),V[2][K]={type:V[2][0].type,data:BA(Y)}}O[0].messages[0].data=BA(V)}F.content=yo(Bo(O)),F.size=F.content.length;var ue=Ti(re[2][0].data);F=or.find(l,s[ue].location),O=Gn(jn(F.content));{if(O[0].id!=ue)throw"Bad HeaderStorageBucket";for(V=eA(O[0].messages[0].data),L=0;L<=A.e.c;++L)Y=eA(V[2][0].data),Y[1][0].data=Ar(L),Y[4][0].data=Ar(A.e.r+1),V[2][L]={type:V[2][0].type,data:BA(Y)};O[0].messages[0].data=BA(V)}F.content=yo(Bo(O)),F.size=F.content.length;var ge=Ti(re[4][0].data);(function(){for(var _=or.find(l,s[ge].location),S=Gn(jn(_.content)),Q,j=0;j<S.length;++j){var ie=S[j];ie.id==ge&&(Q=ie)}var oe=eA(Q.messages[0].data);{oe[3]=[];var le=[];i.forEach(function(Me,Xe){le[1]=[{type:0,data:Ar(Xe)}],le[2]=[{type:0,data:Ar(1)}],le[3]=[{type:2,data:nO(Me)}],oe[3].push({type:2,data:BA(le)})})}Q.messages[0].data=BA(oe);var xe=Bo(S),Qe=yo(xe);_.content=Qe,_.size=_.content.length})();var we=eA(re[3][0].data);{var pe=we[1][0];delete we[2];var ae=eA(pe.data);{var se=Ti(ae[2][0].data);(function(){for(var _=or.find(l,s[se].location),S=Gn(jn(_.content)),Q,j=0;j<S.length;++j){var ie=S[j];ie.id==se&&(Q=ie)}var oe=eA(Q.messages[0].data);{delete oe[6],delete we[7];var le=new Uint8Array(oe[5][0].data);oe[5]=[];for(var xe=0,Qe=0;Qe<=A.e.r;++Qe){var Me=eA(le);xe+=oO(Me,a[Qe],i),Me[1][0].data=Ar(Qe),oe[5].push({data:BA(Me),type:2})}oe[1]=[{type:0,data:Ar(A.e.c+1)}],oe[2]=[{type:0,data:Ar(A.e.r+1)}],oe[3]=[{type:0,data:Ar(xe)}],oe[4]=[{type:0,data:Ar(A.e.r+1)}]}Q.messages[0].data=BA(oe);var Xe=Bo(S),qe=yo(Xe);_.content=qe,_.size=_.content.length})()}pe.data=BA(ae)}re[3][0].data=BA(we)}x[4][0].data=BA(re)}h.messages[0].data=BA(x);var ye=Bo(g),C=yo(ye);return d.content=C,d.size=d.content.length,l}function cO(t){return function(r){for(var A=0;A!=t.length;++A){var n=t[A];r[n[0]]===void 0&&(r[n[0]]=n[1]),n[2]==="n"&&(r[n[0]]=Number(r[n[0]]))}}}function x1(t){cO([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(t)}function fO(t,e){return e.bookType=="ods"?My(t,e):e.bookType=="numbers"?lO(t,e):e.bookType=="xlsb"?uO(t,e):hO(t,e)}function uO(t,e){mo=1024,t&&!t.SSF&&(t.SSF=$A(Sr)),t&&t.SSF&&(mu(),pu(t.SSF),e.revssf=vu(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,Yl?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r=e.bookType=="xlsb"?"bin":"xml",A=py.indexOf(e.bookType)>-1,n=kB();x1(e=e||{});var a=Yd(),i="",s=0;if(e.cellXfs=[],Si(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),i="docProps/core.xml",kt(a,i,RB(t.Props,e)),n.coreprops.push(i),rr(e.rels,2,i,Xt.CORE_PROPS),i="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var o=[],l=0;l<t.SheetNames.length;++l)(t.Workbook.Sheets[l]||{}).Hidden!=2&&o.push(t.SheetNames[l]);t.Props.SheetNames=o}for(t.Props.Worksheets=t.Props.SheetNames.length,kt(a,i,VB(t.Props)),n.extprops.push(i),rr(e.rels,3,i,Xt.EXT_PROPS),t.Custprops!==t.Props&&pA(t.Custprops||{}).length>0&&(i="docProps/custom.xml",kt(a,i,KB(t.Custprops)),n.custprops.push(i),rr(e.rels,4,i,Xt.CUST_PROPS)),s=1;s<=t.SheetNames.length;++s){var c={"!id":{}},d=t.Sheets[t.SheetNames[s-1]],g=(d||{})["!type"]||"sheet";switch(g){case"chart":default:i="xl/worksheets/sheet"+s+"."+r,kt(a,i,gk(s-1,i,e,t,c)),n.sheets.push(i),rr(e.wbrels,-1,"worksheets/sheet"+s+"."+r,Xt.WS[0])}if(d){var h=d["!comments"],m=!1,v="";h&&h.length>0&&(v="xl/comments"+s+"."+r,kt(a,v,vk(h,v)),n.comments.push(v),rr(c,-1,"../comments"+s+"."+r,Xt.CMNT),m=!0),d["!legacy"]&&m&&kt(a,"xl/drawings/vmlDrawing"+s+".vml",dy(s,d["!comments"])),delete d["!comments"],delete d["!legacy"]}c["!id"].rId1&&kt(a,DB(i),go(c))}return e.Strings!=null&&e.Strings.length>0&&(i="xl/sharedStrings."+r,kt(a,i,mk(e.Strings,i,e)),n.strs.push(i),rr(e.wbrels,-1,"sharedStrings."+r,Xt.SST)),i="xl/workbook."+r,kt(a,i,dk(t,i)),n.workbooks.push(i),rr(e.rels,1,i,Xt.WB),i="xl/theme/theme1.xml",kt(a,i,uy(t.Themes,e)),n.themes.push(i),rr(e.wbrels,-1,"theme/theme1.xml",Xt.THEME),i="xl/styles."+r,kt(a,i,pk(t,i,e)),n.styles.push(i),rr(e.wbrels,-1,"styles."+r,Xt.STY),t.vbaraw&&A&&(i="xl/vbaProject.bin",kt(a,i,t.vbaraw),n.vba.push(i),rr(e.wbrels,-1,"vbaProject.bin",Xt.VBA)),i="xl/metadata."+r,kt(a,i,wk(i)),n.metadata.push(i),rr(e.wbrels,-1,"metadata."+r,Xt.XLMETA),kt(a,"[Content_Types].xml",OB(n,e)),kt(a,"_rels/.rels",go(e.rels)),kt(a,"xl/_rels/workbook."+r+".rels",go(e.wbrels)),delete e.revssf,delete e.ssf,a}function hO(t,e){mo=1024,t&&!t.SSF&&(t.SSF=$A(Sr)),t&&t.SSF&&(mu(),pu(t.SSF),e.revssf=vu(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,Yl?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r="xml",A=py.indexOf(e.bookType)>-1,n=kB();x1(e=e||{});var a=Yd(),i="",s=0;if(e.cellXfs=[],Si(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),i="docProps/core.xml",kt(a,i,RB(t.Props,e)),n.coreprops.push(i),rr(e.rels,2,i,Xt.CORE_PROPS),i="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var o=[],l=0;l<t.SheetNames.length;++l)(t.Workbook.Sheets[l]||{}).Hidden!=2&&o.push(t.SheetNames[l]);t.Props.SheetNames=o}t.Props.Worksheets=t.Props.SheetNames.length,kt(a,i,VB(t.Props)),n.extprops.push(i),rr(e.rels,3,i,Xt.EXT_PROPS),t.Custprops!==t.Props&&pA(t.Custprops||{}).length>0&&(i="docProps/custom.xml",kt(a,i,KB(t.Custprops)),n.custprops.push(i),rr(e.rels,4,i,Xt.CUST_PROPS));var c=["SheetJ5"];for(e.tcid=0,s=1;s<=t.SheetNames.length;++s){var d={"!id":{}},g=t.Sheets[t.SheetNames[s-1]],h=(g||{})["!type"]||"sheet";switch(h){case"chart":default:i="xl/worksheets/sheet"+s+"."+r,kt(a,i,_y(s-1,e,t,d)),n.sheets.push(i),rr(e.wbrels,-1,"worksheets/sheet"+s+"."+r,Xt.WS[0])}if(g){var m=g["!comments"],v=!1,B="";if(m&&m.length>0){var x=!1;m.forEach(function(b){b[1].forEach(function(F){F.T==!0&&(x=!0)})}),x&&(B="xl/threadedComments/threadedComment"+s+"."+r,kt(a,B,G6(m,c,e)),n.threadedcomments.push(B),rr(d,-1,"../threadedComments/threadedComment"+s+"."+r,Xt.TCMNT)),B="xl/comments"+s+"."+r,kt(a,B,gy(m)),n.comments.push(B),rr(d,-1,"../comments"+s+"."+r,Xt.CMNT),v=!0}g["!legacy"]&&v&&kt(a,"xl/drawings/vmlDrawing"+s+".vml",dy(s,g["!comments"])),delete g["!comments"],delete g["!legacy"]}d["!id"].rId1&&kt(a,DB(i),go(d))}return e.Strings!=null&&e.Strings.length>0&&(i="xl/sharedStrings."+r,kt(a,i,ny(e.Strings,e)),n.strs.push(i),rr(e.wbrels,-1,"sharedStrings."+r,Xt.SST)),i="xl/workbook."+r,kt(a,i,Iy(t)),n.workbooks.push(i),rr(e.rels,1,i,Xt.WB),i="xl/theme/theme1.xml",kt(a,i,uy(t.Themes,e)),n.themes.push(i),rr(e.wbrels,-1,"theme/theme1.xml",Xt.THEME),i="xl/styles."+r,kt(a,i,ly(t,e)),n.styles.push(i),rr(e.wbrels,-1,"styles."+r,Xt.STY),t.vbaraw&&A&&(i="xl/vbaProject.bin",kt(a,i,t.vbaraw),n.vba.push(i),rr(e.wbrels,-1,"vbaProject.bin",Xt.VBA)),i="xl/metadata."+r,kt(a,i,hy()),n.metadata.push(i),rr(e.wbrels,-1,"metadata."+r,Xt.XLMETA),c.length>1&&(i="xl/persons/person.xml",kt(a,i,j6(c)),n.people.push(i),rr(e.wbrels,-1,"persons/person.xml",Xt.PEOPLE)),kt(a,"[Content_Types].xml",OB(n,e)),kt(a,"_rels/.rels",go(e.rels)),kt(a,"xl/_rels/workbook."+r+".rels",go(e.wbrels)),delete e.revssf,delete e.ssf,a}function dO(t,e){var r="";switch((e||{}).type||"base64"){case"buffer":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];case"base64":r=Da(t.slice(0,12));break;case"binary":r=t;break;case"array":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];default:throw new Error("Unrecognized type "+(e&&e.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function Ry(t,e){switch(e.type){case"base64":case"binary":break;case"buffer":case"array":e.type="";break;case"file":return Pl(e.file,or.write(t,{type:Yt?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");default:throw new Error("Unrecognized type "+e.type)}return or.write(t,e)}function gO(t,e){var r=$A(e||{}),A=fO(t,r);return pO(A,r)}function pO(t,e){var r={},A=Yt?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(e.compression&&(r.compression="DEFLATE"),e.password)r.type=A;else switch(e.type){case"base64":r.type="base64";break;case"binary":r.type="string";break;case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");case"buffer":case"file":r.type=A;break;default:throw new Error("Unrecognized type "+e.type)}var n=t.FullPaths?or.write(t,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[r.type]||r.type,compression:!!e.compression}):t.generate(r);if(typeof Deno<"u"&&typeof n=="string"){if(e.type=="binary"||e.type=="base64")return n;n=new Uint8Array(cu(n))}return e.password&&typeof encrypt_agile<"u"?Ry(encrypt_agile(n,e.password),e):e.type==="file"?Pl(e.file,n):e.type=="string"?Rl(n):n}function mO(t,e){var r=e||{},A=Lk(t,r);return Ry(A,r)}function wa(t,e,r){r||(r="");var A=r+t;switch(e.type){case"base64":return kl(Ha(A));case"binary":return Ha(A);case"string":return t;case"file":return Pl(e.file,A,"utf8");case"buffer":return Yt?Pa(A,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(A):wa(A,{type:"binary"}).split("").map(function(n){return n.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}function vO(t,e){switch(e.type){case"base64":return kl(t);case"binary":return t;case"string":return t;case"file":return Pl(e.file,t,"binary");case"buffer":return Yt?Pa(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}function Ou(t,e){switch(e.type){case"string":case"base64":case"binary":for(var r="",A=0;A<t.length;++A)r+=String.fromCharCode(t[A]);return e.type=="base64"?kl(r):e.type=="string"?Rl(r):r;case"file":return Pl(e.file,t);case"buffer":return t;default:throw new Error("Unrecognized type "+e.type)}}function Du(t,e){jU(),Ak(t);var r=$A(e||{});if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),r.type=="array"){r.type="binary";var A=Du(t,r);return r.type="array",cu(A)}var n=0;if(r.sheet&&(typeof r.sheet=="number"?n=r.sheet:n=t.SheetNames.indexOf(r.sheet),!t.SheetNames[n]))throw new Error("Sheet not found: "+r.sheet+" : "+typeof r.sheet);switch(r.bookType||"xlsb"){case"xml":case"xlml":return wa(Ik(t,r),r);case"slk":case"sylk":return wa(e6.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"htm":case"html":return wa(Qy(t.Sheets[t.SheetNames[n]],r),r);case"txt":return vO(Vy(t.Sheets[t.SheetNames[n]],r),r);case"csv":return wa(C1(t.Sheets[t.SheetNames[n]],r),r,"\uFEFF");case"dif":return wa(t6.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"dbf":return Ou(ZN.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"prn":return wa(r6.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"rtf":return wa(l6.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"eth":return wa(ry.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"fods":return wa(My(t,r),r);case"wk1":return Ou(Ay.sheet_to_wk1(t.Sheets[t.SheetNames[n]],r),r);case"wk3":return Ou(Ay.book_to_wk3(t,r),r);case"biff2":r.biff||(r.biff=2);case"biff3":r.biff||(r.biff=3);case"biff4":return r.biff||(r.biff=4),Ou(Ly(t,r),r);case"biff5":r.biff||(r.biff=5);case"biff8":case"xla":case"xls":return r.biff||(r.biff=8),mO(t,r);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return gO(t,r);default:throw new Error("Unrecognized bookType |"+r.bookType+"|")}}function wO(t,e,r,A,n,a,i,s){var o=vA(r),l=s.defval,c=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw"),d=!0,g=n===1?[]:{};if(n!==1)if(Object.defineProperty)try{Object.defineProperty(g,"__rowNum__",{value:r,enumerable:!1})}catch{g.__rowNum__=r}else g.__rowNum__=r;if(!i||t[r])for(var h=e.s.c;h<=e.e.c;++h){var m=i?t[r][h]:t[A[h]+o];if(m===void 0||m.t===void 0){if(l===void 0)continue;a[h]!=null&&(g[a[h]]=l);continue}var v=m.v;switch(m.t){case"z":if(v==null)break;continue;case"e":v=v==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+m.t)}if(a[h]!=null){if(v==null)if(m.t=="e"&&v===null)g[a[h]]=null;else if(l!==void 0)g[a[h]]=l;else if(c&&v===null)g[a[h]]=null;else continue;else g[a[h]]=c&&(m.t!=="n"||m.t==="n"&&s.rawNumbers!==!1)?v:Va(m,v,s);v!=null&&(d=!1)}}return{row:g,isempty:d}}function Pu(t,e){if(t==null||t["!ref"]==null)return[];var r={t:"n",v:0},A=0,n=1,a=[],i=0,s="",o={s:{r:0,c:0},e:{r:0,c:0}},l=e||{},c=l.range!=null?l.range:t["!ref"];switch(l.header===1?A=1:l.header==="A"?A=2:Array.isArray(l.header)?A=3:l.header==null&&(A=0),typeof c){case"string":o=wr(c);break;case"number":o=wr(t["!ref"]),o.s.r=c;break;default:o=c}A>0&&(n=0);var d=vA(o.s.r),g=[],h=[],m=0,v=0,B=Array.isArray(t),x=o.s.r,b=0,F={};B&&!t[x]&&(t[x]=[]);var O=l.skipHidden&&t["!cols"]||[],W=l.skipHidden&&t["!rows"]||[];for(b=o.s.c;b<=o.e.c;++b)if(!(O[b]||{}).hidden)switch(g[b]=UA(b),r=B?t[x][b]:t[g[b]+d],A){case 1:a[b]=b-o.s.c;break;case 2:a[b]=g[b];break;case 3:a[b]=l.header[b-o.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),s=i=Va(r,null,l),v=F[i]||0,!v)F[i]=1;else{do s=i+"_"+v++;while(F[s]);F[i]=v,F[s]=1}a[b]=s}for(x=o.s.r+n;x<=o.e.r;++x)if(!(W[x]||{}).hidden){var q=wO(t,o,x,g,A,a,B,l);(q.isempty===!1||(A===1?l.blankrows!==!1:l.blankrows))&&(h[m++]=q.row)}return h.length=m,h}var Hy=/"/g;function BO(t,e,r,A,n,a,i,s){for(var o=!0,l=[],c="",d=vA(r),g=e.s.c;g<=e.e.c;++g)if(A[g]){var h=s.dense?(t[r]||[])[g]:t[A[g]+d];if(h==null)c="";else if(h.v!=null){o=!1,c=""+(s.rawNumbers&&h.t=="n"?h.v:Va(h,null,s));for(var m=0,v=0;m!==c.length;++m)if((v=c.charCodeAt(m))===n||v===a||v===34||s.forceQuotes){c='"'+c.replace(Hy,'""')+'"';break}c=="ID"&&(c='"ID"')}else h.f!=null&&!h.F?(o=!1,c="="+h.f,c.indexOf(",")>=0&&(c='"'+c.replace(Hy,'""')+'"')):c="";l.push(c)}return s.blankrows===!1&&o?null:l.join(i)}function C1(t,e){var r=[],A=e??{};if(t==null||t["!ref"]==null)return"";var n=wr(t["!ref"]),a=A.FS!==void 0?A.FS:",",i=a.charCodeAt(0),s=A.RS!==void 0?A.RS:`
|
|
357
357
|
`,o=s.charCodeAt(0),l=new RegExp((a=="|"?"\\|":a)+"+$"),c="",d=[];A.dense=Array.isArray(t);for(var g=A.skipHidden&&t["!cols"]||[],h=A.skipHidden&&t["!rows"]||[],m=n.s.c;m<=n.e.c;++m)(g[m]||{}).hidden||(d[m]=UA(m));for(var v=0,B=n.s.r;B<=n.e.r;++B)(h[B]||{}).hidden||(c=BO(t,n,B,d,i,o,a,A),c!=null&&(A.strip&&(c=c.replace(l,"")),(c||A.blankrows!==!1)&&r.push((v++?s:"")+c)));return delete A.dense,r.join("")}function Vy(t,e){e||(e={}),e.FS=" ",e.RS=`
|
|
358
|
-
`;var r=C1(t,e);return r}function yO(t){var e="",r,A="";if(t==null||t["!ref"]==null)return[];var n=wr(t["!ref"]),a="",i=[],s,o=[],l=Array.isArray(t);for(s=n.s.c;s<=n.e.c;++s)i[s]=UA(s);for(var c=n.s.r;c<=n.e.r;++c)for(a=vA(c),s=n.s.c;s<=n.e.c;++s)if(e=i[s]+a,r=l?(t[c]||[])[s]:t[e],A="",r!==void 0){if(r.F!=null){if(e=r.F,!r.f)continue;A=r.f,e.indexOf(":")==-1&&(e=e+":"+e)}if(r.f!=null)A=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)A=""+r.v;else if(r.t=="b")A=r.v?"TRUE":"FALSE";else if(r.w!==void 0)A="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?A="'"+r.v:A=""+r.v}}o[o.length]=e+"="+A}return o}function Ky(t,e,r){var A=r||{},n=+!A.skipHeader,a=t||{},i=0,s=0;if(a&&A.origin!=null)if(typeof A.origin=="number")i=A.origin;else{var o=typeof A.origin=="string"?sA(A.origin):A.origin;i=o.r,s=o.c}var l,c={s:{c:0,r:0},e:{c:s,r:i+e.length-1+n}};if(a["!ref"]){var d=wr(a["!ref"]);c.e.c=Math.max(c.e.c,d.e.c),c.e.r=Math.max(c.e.r,d.e.r),i==-1&&(i=d.e.r+1,c.e.r=i+e.length-1+n)}else i==-1&&(i=0,c.e.r=e.length-1+n);var g=A.header||[],h=0;e.forEach(function(v,B){pA(v).forEach(function(x){(h=g.indexOf(x))==-1&&(g[h=g.length]=x);var b=v[x],F="z",O="",W=tr({c:s+h,r:i+B+n});l=Zl(a,W),b&&typeof b=="object"&&!(b instanceof Date)?a[W]=b:(typeof b=="number"?F="n":typeof b=="boolean"?F="b":typeof b=="string"?F="s":b instanceof Date?(F="d",A.cellDates||(F="n",b=YA(b)),O=A.dateNF||Sr[14]):b===null&&A.nullError&&(F="e",b=0),l?(l.t=F,l.v=b,delete l.w,delete l.R,O&&(l.z=O)):a[W]=l={t:F,v:b},O&&(l.z=O))})}),c.e.c=Math.max(c.e.c,s+g.length-1);var m=vA(i);if(n)for(h=0;h<g.length;++h)a[UA(h+s)+m]={t:"s",v:g[h]};return a["!ref"]=jr(c),a}function xO(t,e){return Ky(null,t,e)}function Zl(t,e,r){if(typeof e=="string"){if(Array.isArray(t)){var A=sA(e);return t[A.r]||(t[A.r]=[]),t[A.r][A.c]||(t[A.r][A.c]={t:"z"})}return t[e]||(t[e]={t:"z"})}return typeof e!="number"?Zl(t,tr(e)):Zl(t,tr({r:e,c:r||0}))}function CO(t,e){if(typeof e=="number"){if(e>=0&&t.SheetNames.length>e)return e;throw new Error("Cannot find sheet # "+e)}else if(typeof e=="string"){var r=t.SheetNames.indexOf(e);if(r>-1)return r;throw new Error("Cannot find sheet name |"+e+"|")}else throw new Error("Cannot find sheet |"+e+"|")}function bO(){return{SheetNames:[],Sheets:{}}}function EO(t,e,r,A){var n=1;if(!r)for(;n<=65535&&t.SheetNames.indexOf(r="Sheet"+n)!=-1;++n,r=void 0);if(!r||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(A&&t.SheetNames.indexOf(r)>=0){var a=r.match(/(^.*?)(\d+)$/);n=a&&+a[2]||0;var i=a&&a[1]||r;for(++n;n<=65535&&t.SheetNames.indexOf(r=i+n)!=-1;++n);}if(Uy(r),t.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return t.SheetNames.push(r),t.Sheets[r]=e,r}function FO(t,e,r){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var A=CO(t,e);switch(t.Workbook.Sheets[A]||(t.Workbook.Sheets[A]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}t.Workbook.Sheets[A].Hidden=r}function SO(t,e){return t.z=e,t}function Gy(t,e,r){return e?(t.l={Target:e},r&&(t.l.Tooltip=r)):delete t.l,t}function _O(t,e,r){return Gy(t,"#"+e,r)}function TO(t,e,r){t.c||(t.c=[]),t.c.push({t:e,a:r||"SheetJS"})}function UO(t,e,r,A){for(var n=typeof e!="string"?e:wr(e),a=typeof e=="string"?e:jr(e),i=n.s.r;i<=n.e.r;++i)for(var s=n.s.c;s<=n.e.c;++s){var o=Zl(t,i,s);o.t="n",o.F=a,delete o.v,i==n.s.r&&s==n.s.c&&(o.f=r,A&&(o.D=!0))}return t}var Ga={encode_col:UA,encode_row:vA,encode_cell:tr,encode_range:jr,decode_col:a1,decode_row:n1,split_cell:zI,decode_cell:sA,decode_range:un,format_cell:Va,sheet_add_aoa:SB,sheet_add_json:Ky,sheet_add_dom:ky,aoa_to_sheet:fo,json_to_sheet:xO,table_to_sheet:Oy,table_to_book:tO,sheet_to_csv:C1,sheet_to_txt:Vy,sheet_to_json:Pu,sheet_to_html:Qy,sheet_to_formulae:yO,sheet_to_row_object_array:Pu,sheet_get_cell:Zl,book_new:bO,book_append_sheet:EO,book_set_sheet_visibility:FO,cell_set_number_format:SO,cell_set_hyperlink:Gy,cell_set_internal_link:_O,cell_add_comment:TO,sheet_set_array_formula:UO,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function jy(t,e,r,A,n){let{series:a}=t;if(!a||t.base===0)return{...a,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const i=[...a].map(l=>l.value).reduce((l,c)=>l+c,0),s=[];let o=0;for(let l=0;l<a.length;l+=1){let c=a[l].value/i;const d=c*(Math.PI*1.9999),h=a[l].value/2/i*(Math.PI*2),{startX:m,startY:v,endX:B,endY:x,path:b}=Xy([e,r],[A,n],[o,d],110);s.push({...a[l],proportion:c,ratio:d,path:b,startX:m,startY:v,endX:B,endY:x,center:Xy([e,r],[A*1.45,n*1.45],[o,h],110)}),o+=d}return s}function zy([t,e],[r,A]){return[t+r,e+A]}function Wy([[t,e],[r,A]],[n,a]){return[t*n+e*a,r*n+A*a]}function IO(t){return[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]]}function Xy([t,e],[r,A],[n,a],i){a=a%(2*Math.PI);const s=IO(i),[o,l]=zy(Wy(s,[r*Math.cos(n),A*Math.sin(n)]),[t,e]),[c,d]=zy(Wy(s,[r*Math.cos(n+a),A*Math.sin(n+a)]),[t,e]),g=a>Math.PI?1:0,h=a>0?1:0;return{startX:o,startY:l,endX:c,endY:d,path:`M${o} ${l} A ${[r,A,i/(2*Math.PI)*360,g,h,c,d].join(" ")}`}}function Mu({defaultConfig:t,userConfig:e}){const r={...t};return Object.keys(r).forEach(A=>{if(Object.hasOwn(e,A)){const n=e[A];typeof n=="boolean"?r[A]=n:["string","number"].includes(typeof n)?QO(n)&&(r[A]=n):Array.isArray(r[A])?NO({userConfig:e,key:A})&&(r[A]=n):LO({userConfig:e,key:A})&&(r[A]=Mu({defaultConfig:r[A],userConfig:n}))}}),r}function NO({userConfig:t,key:e}){return Object.hasOwn(t,e)&&Array.isArray(t[e])&&t[e].length}function LO({userConfig:t,key:e}){return Object.hasOwn(t,e)&&!Array.isArray(t[e])&&typeof t[e]=="object"}function QO(t){return![null,void 0,NaN,1/0,-1/0].includes(t)}function kO(t){return![void 0,NaN,1/0,-1/0].includes(t)}function OO(t,e=0){return isNaN(t)?e:t}const Ui=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935","#a9c413","#2a778d","#668d1c","#bea413","#0c5922","#743411"];function qy(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,a,i,s]=n;return`#${a}${i}${s}`}else if(n=t.match(r)){const[,a,i,s]=n;return`#${xo(a)}${xo(i)}${xo(s)}`}else if(n=t.match(A)){const[,a,i,s]=n,o=DO(Number(a),Number(i),Number(s));return`#${xo(o[0])}${xo(o[1])}${xo(o[2])}`}return null}function xo(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e}function DO(t,e,r){t/=360,e/=100,r/=100;let A,n,a;if(e===0)A=n=a=r;else{const i=(l,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?l+(c-l)*6*d:d<.5?c:d<.6666666666666666?l+(c-l)*(.6666666666666666-d)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=i(o,s,t+1/3),n=i(o,s,t),a=i(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(a*255)]}const _J="",b1=(t,e)=>{const r=t.__vccOpts||t;for(const[A,n]of e)r[A]=n;return r},PO={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},data(){const t=`vue-data-ui-xy_${Math.random()}_${Math.random()}`;return{useSafeValues:!0,palette:Ui,defaultConfig:{showWarnings:!0,showTable:!0,chart:{fontFamily:"inherit",backgroundColor:"#FFFFFF",color:"#2D353C",height:300,width:500,padding:{top:36,right:12,bottom:12,left:48},grid:{stroke:"#e1e5e8",showVerticalLines:!1,labels:{color:"#2D353C",show:!0,fontSize:10,axis:{yLabel:"",xLabel:"",fontSize:12},xAxisLabels:{color:"#2D353C",show:!0,values:[],fontSize:6}}},labels:{fontSize:10},legend:{color:"#2D353C",show:!0,useDiv:!0,fontSize:16},title:{show:!0,useDiv:!0,color:"#2D353C",text:"",fontSize:20,bold:!0,offsetX:0,offsetY:0,subtitle:{fontSize:16,color:"grey",text:""}},tooltip:{color:"#2D353C",backgroundColor:"white",show:!0,showValue:!0,showPercentage:!1,roundingValue:0,roundingPercentage:0},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",titleInside:"Title inside",legendInside:"Legend inside",showTable:"Show table"}}},bar:{useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},line:{radius:3,useGradient:!0,strokeWidth:2,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},plot:{radius:3,useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},table:{rounding:0,show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8"}}},clientPosition:{x:0,y:0},icons:{line:"▬",bar:"◼",plot:"●"},isPrinting:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},titleInside:!0,legendInside:!0,showTable:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:t}},computed:{chartConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},relativeZero(){return this.min>=0?0:Math.abs(this.min)},absoluteMax(){return this.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((t,e)=>({...t,series:t.series.map(r=>this.isSafeValue(r)?r:null),id:`uniqueId_${e}`})):this.dataset},relativeDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])})).filter(t=>!this.segregatedSeries.includes(t.id))},absoluteDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])}))},barSet(){return this.absoluteDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).map((t,e)=>({...t,plots:t.series.map((r,A)=>({x:this.drawingArea.left-this.slot.bar/2+this.slot.bar*e+this.slot.bar*A*this.absoluteDataset.filter(n=>n.type==="bar").filter(n=>!this.segregatedSeries.includes(n.id)).length,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(r),value:t.absoluteValues[A]}))}))},lineSet(){return this.absoluteDataset.filter(t=>t.type==="line").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.line/2+this.slot.line*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},plotSet(){return this.absoluteDataset.filter(t=>t.type==="plot").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},drawingArea(){return{top:this.chartConfig.chart.padding.top,right:this.chartConfig.chart.width-this.chartConfig.chart.padding.right,bottom:this.chartConfig.chart.height-this.chartConfig.chart.padding.bottom,left:this.chartConfig.chart.padding.left,height:this.chartConfig.chart.height-(this.chartConfig.chart.padding.top+this.chartConfig.chart.padding.bottom),width:this.chartConfig.chart.width-(this.chartConfig.chart.padding.right+this.chartConfig.chart.padding.left)}},max(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.max(...t.series)))},min(){return Math.min(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.min(...t.series)))},maxSeries(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>t.series.length))},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},maxSlot(){return Math.max(...Object.values(this.slot).filter(t=>t!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[]};const t=[...this.plotSet,...this.barSet,...this.lineSet].map(r=>({label:r.name,color:r.color,type:r.type})),e=[];return this.chartConfig.chart.grid.labels.xAxisLabels.values.forEach((r,A)=>{const n=[r];this.plotSet.length&&this.plotSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.barSet.length&&this.barSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.lineSet.length&&this.lineSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),e.push(n)}),{head:t,body:e}},tooltipContent(){const t=this.relativeDataset.map(n=>({name:n.name,color:n.color,type:n.type,value:n.absoluteValues.find((a,i)=>i===this.selectedSerieIndex)}));let e="",r=t.map(n=>n.value).filter(n=>this.isSafeValue(n)&&n!==null).reduce((n,a)=>Math.abs(n)+Math.abs(a),0);const A=this.chartConfig.chart.grid.labels.xAxisLabels.values[this.selectedSerieIndex];return A&&(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #e1e5e8; width:100%">${A}</div>`),t.forEach(n=>{this.isSafeValue(n.value)&&n.value!==null&&(e+=`<div><span style="color:${n.color}; margin-right: 3px">${this.icons[n.type]}</span>${n.name} : <b>${this.chartConfig.chart.tooltip.showValue?n.value.toFixed(this.chartConfig.chart.tooltip.roundingValue):""}</b> ${this.chartConfig.chart.tooltip.showPercentage?`(${this.checkNaN(Math.abs(n.value)/r*100).toFixed(this.chartConfig.chart.tooltip.roundingPercentage)}%)`:""}</div>`)}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums; background:${this.chartConfig.chart.tooltip.backgroundColor};color:${this.chartConfig.chart.tooltip.color}">${e}</div>`},tooltipPosition(){const t=this.$refs.tooltip,e=this.$refs.chart;let r=0,A=48;if(t&&e){const{width:n,height:a}=t.getBoundingClientRect(),i=e.getBoundingClientRect();this.clientPosition.x+n/2>i.right?r=-n:this.clientPosition.x-n/2<i.left?r=0:r=-n/2,this.clientPosition.y+a>i.bottom&&(A=-a-48)}return{top:this.clientPosition.y+A,left:this.clientPosition.x+r}},viewBox(){return`0 0 ${this.chartConfig.chart.width} ${this.chartConfig.chart.height}`},yLabels(){const t=this.closestDecimal(this.max/5),e=[];for(let n=5;n>0;n-=1){const a=t*n;e.push({y:this.zero-this.drawingArea.height*this.ratioToMax(t*n),value:a})}const r=this.closestDecimal(this.min/5),A=[];for(let n=5;n>=0;n-=1){const a=Math.abs(r)*n;A.push({y:this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)*n),value:-a})}return[...e,...A]},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){const t=document.getElementById("yAxisLabel");if(t){const r=t.getBBox().height/2+this.chartConfig.chart.padding.left/5,A=this.chartConfig.chart.height/2;t.setAttributeNS(null,"transform",`rotate(-90, ${r}, ${A})`),t.setAttributeNS(null,"x",r),t.setAttributeNS(null,"y",A),t.setAttributeNS(null,"font-size",this.chartConfig.chart.grid.labels.axis.fontSize)}this.chartConfig.showWarnings&&this.dataset.forEach(e=>{e.series.forEach((r,A)=>{this.isSafeValue(r)||console.warn(`SmartXY has detected an unsafe value in your dataset:
|
|
358
|
+
`;var r=C1(t,e);return r}function yO(t){var e="",r,A="";if(t==null||t["!ref"]==null)return[];var n=wr(t["!ref"]),a="",i=[],s,o=[],l=Array.isArray(t);for(s=n.s.c;s<=n.e.c;++s)i[s]=UA(s);for(var c=n.s.r;c<=n.e.r;++c)for(a=vA(c),s=n.s.c;s<=n.e.c;++s)if(e=i[s]+a,r=l?(t[c]||[])[s]:t[e],A="",r!==void 0){if(r.F!=null){if(e=r.F,!r.f)continue;A=r.f,e.indexOf(":")==-1&&(e=e+":"+e)}if(r.f!=null)A=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)A=""+r.v;else if(r.t=="b")A=r.v?"TRUE":"FALSE";else if(r.w!==void 0)A="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?A="'"+r.v:A=""+r.v}}o[o.length]=e+"="+A}return o}function Ky(t,e,r){var A=r||{},n=+!A.skipHeader,a=t||{},i=0,s=0;if(a&&A.origin!=null)if(typeof A.origin=="number")i=A.origin;else{var o=typeof A.origin=="string"?sA(A.origin):A.origin;i=o.r,s=o.c}var l,c={s:{c:0,r:0},e:{c:s,r:i+e.length-1+n}};if(a["!ref"]){var d=wr(a["!ref"]);c.e.c=Math.max(c.e.c,d.e.c),c.e.r=Math.max(c.e.r,d.e.r),i==-1&&(i=d.e.r+1,c.e.r=i+e.length-1+n)}else i==-1&&(i=0,c.e.r=e.length-1+n);var g=A.header||[],h=0;e.forEach(function(v,B){pA(v).forEach(function(x){(h=g.indexOf(x))==-1&&(g[h=g.length]=x);var b=v[x],F="z",O="",W=tr({c:s+h,r:i+B+n});l=Zl(a,W),b&&typeof b=="object"&&!(b instanceof Date)?a[W]=b:(typeof b=="number"?F="n":typeof b=="boolean"?F="b":typeof b=="string"?F="s":b instanceof Date?(F="d",A.cellDates||(F="n",b=YA(b)),O=A.dateNF||Sr[14]):b===null&&A.nullError&&(F="e",b=0),l?(l.t=F,l.v=b,delete l.w,delete l.R,O&&(l.z=O)):a[W]=l={t:F,v:b},O&&(l.z=O))})}),c.e.c=Math.max(c.e.c,s+g.length-1);var m=vA(i);if(n)for(h=0;h<g.length;++h)a[UA(h+s)+m]={t:"s",v:g[h]};return a["!ref"]=jr(c),a}function xO(t,e){return Ky(null,t,e)}function Zl(t,e,r){if(typeof e=="string"){if(Array.isArray(t)){var A=sA(e);return t[A.r]||(t[A.r]=[]),t[A.r][A.c]||(t[A.r][A.c]={t:"z"})}return t[e]||(t[e]={t:"z"})}return typeof e!="number"?Zl(t,tr(e)):Zl(t,tr({r:e,c:r||0}))}function CO(t,e){if(typeof e=="number"){if(e>=0&&t.SheetNames.length>e)return e;throw new Error("Cannot find sheet # "+e)}else if(typeof e=="string"){var r=t.SheetNames.indexOf(e);if(r>-1)return r;throw new Error("Cannot find sheet name |"+e+"|")}else throw new Error("Cannot find sheet |"+e+"|")}function bO(){return{SheetNames:[],Sheets:{}}}function EO(t,e,r,A){var n=1;if(!r)for(;n<=65535&&t.SheetNames.indexOf(r="Sheet"+n)!=-1;++n,r=void 0);if(!r||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(A&&t.SheetNames.indexOf(r)>=0){var a=r.match(/(^.*?)(\d+)$/);n=a&&+a[2]||0;var i=a&&a[1]||r;for(++n;n<=65535&&t.SheetNames.indexOf(r=i+n)!=-1;++n);}if(Uy(r),t.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return t.SheetNames.push(r),t.Sheets[r]=e,r}function FO(t,e,r){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var A=CO(t,e);switch(t.Workbook.Sheets[A]||(t.Workbook.Sheets[A]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}t.Workbook.Sheets[A].Hidden=r}function SO(t,e){return t.z=e,t}function Gy(t,e,r){return e?(t.l={Target:e},r&&(t.l.Tooltip=r)):delete t.l,t}function _O(t,e,r){return Gy(t,"#"+e,r)}function TO(t,e,r){t.c||(t.c=[]),t.c.push({t:e,a:r||"SheetJS"})}function UO(t,e,r,A){for(var n=typeof e!="string"?e:wr(e),a=typeof e=="string"?e:jr(e),i=n.s.r;i<=n.e.r;++i)for(var s=n.s.c;s<=n.e.c;++s){var o=Zl(t,i,s);o.t="n",o.F=a,delete o.v,i==n.s.r&&s==n.s.c&&(o.f=r,A&&(o.D=!0))}return t}var Ga={encode_col:UA,encode_row:vA,encode_cell:tr,encode_range:jr,decode_col:a1,decode_row:n1,split_cell:zI,decode_cell:sA,decode_range:un,format_cell:Va,sheet_add_aoa:SB,sheet_add_json:Ky,sheet_add_dom:ky,aoa_to_sheet:fo,json_to_sheet:xO,table_to_sheet:Oy,table_to_book:tO,sheet_to_csv:C1,sheet_to_txt:Vy,sheet_to_json:Pu,sheet_to_html:Qy,sheet_to_formulae:yO,sheet_to_row_object_array:Pu,sheet_get_cell:Zl,book_new:bO,book_append_sheet:EO,book_set_sheet_visibility:FO,cell_set_number_format:SO,cell_set_hyperlink:Gy,cell_set_internal_link:_O,cell_add_comment:TO,sheet_set_array_formula:UO,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function jy(t,e,r,A,n){let{series:a}=t;if(!a||t.base===0)return{...a,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const i=[...a].map(l=>l.value).reduce((l,c)=>l+c,0),s=[];let o=0;for(let l=0;l<a.length;l+=1){let c=a[l].value/i;const d=c*(Math.PI*1.9999),h=a[l].value/2/i*(Math.PI*2),{startX:m,startY:v,endX:B,endY:x,path:b}=Xy([e,r],[A,n],[o,d],110);s.push({...a[l],proportion:c,ratio:d,path:b,startX:m,startY:v,endX:B,endY:x,center:Xy([e,r],[A*1.45,n*1.45],[o,h],110)}),o+=d}return s}function zy([t,e],[r,A]){return[t+r,e+A]}function Wy([[t,e],[r,A]],[n,a]){return[t*n+e*a,r*n+A*a]}function IO(t){return[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]]}function Xy([t,e],[r,A],[n,a],i){a=a%(2*Math.PI);const s=IO(i),[o,l]=zy(Wy(s,[r*Math.cos(n),A*Math.sin(n)]),[t,e]),[c,d]=zy(Wy(s,[r*Math.cos(n+a),A*Math.sin(n+a)]),[t,e]),g=a>Math.PI?1:0,h=a>0?1:0;return{startX:o,startY:l,endX:c,endY:d,path:`M${o} ${l} A ${[r,A,i/(2*Math.PI)*360,g,h,c,d].join(" ")}`}}function Mu({defaultConfig:t,userConfig:e}){const r={...t};return Object.keys(r).forEach(A=>{if(Object.hasOwn(e,A)){const n=e[A];typeof n=="boolean"?r[A]=n:["string","number"].includes(typeof n)?QO(n)&&(r[A]=n):Array.isArray(r[A])?NO({userConfig:e,key:A})&&(r[A]=n):LO({userConfig:e,key:A})&&(r[A]=Mu({defaultConfig:r[A],userConfig:n}))}}),r}function NO({userConfig:t,key:e}){return Object.hasOwn(t,e)&&Array.isArray(t[e])&&t[e].length}function LO({userConfig:t,key:e}){return Object.hasOwn(t,e)&&!Array.isArray(t[e])&&typeof t[e]=="object"}function QO(t){return![null,void 0,NaN,1/0,-1/0].includes(t)}function kO(t){return![void 0,NaN,1/0,-1/0].includes(t)}function OO(t,e=0){return isNaN(t)?e:t}const Ui=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935","#a9c413","#2a778d","#668d1c","#bea413","#0c5922","#743411"];function qy(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,a,i,s]=n;return`#${a}${i}${s}`}else if(n=t.match(r)){const[,a,i,s]=n;return`#${xo(a)}${xo(i)}${xo(s)}`}else if(n=t.match(A)){const[,a,i,s]=n,o=DO(Number(a),Number(i),Number(s));return`#${xo(o[0])}${xo(o[1])}${xo(o[2])}`}return null}function xo(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e}function DO(t,e,r){t/=360,e/=100,r/=100;let A,n,a;if(e===0)A=n=a=r;else{const i=(l,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?l+(c-l)*6*d:d<.5?c:d<.6666666666666666?l+(c-l)*(.6666666666666666-d)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=i(o,s,t+1/3),n=i(o,s,t),a=i(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(a*255)]}const _J="",b1=(t,e)=>{const r=t.__vccOpts||t;for(const[A,n]of e)r[A]=n;return r},PO={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},data(){const t=`vue-data-ui-xy_${Math.random()}_${Math.random()}`;return{useSafeValues:!0,palette:Ui,defaultConfig:{showWarnings:!0,showTable:!0,chart:{fontFamily:"inherit",backgroundColor:"#FFFFFF",color:"#2D353C",height:300,width:500,padding:{top:36,right:12,bottom:12,left:48},grid:{stroke:"#e1e5e8",showVerticalLines:!1,labels:{color:"#2D353C",show:!0,fontSize:10,axis:{yLabel:"",xLabel:"",fontSize:12},xAxisLabels:{color:"#2D353C",show:!0,values:[],fontSize:6}}},labels:{fontSize:10},legend:{color:"#2D353C",show:!0,useDiv:!0,fontSize:16},title:{show:!0,useDiv:!0,color:"#2D353C",text:"",fontSize:20,bold:!0,offsetX:0,offsetY:0,subtitle:{fontSize:16,color:"grey",text:""}},tooltip:{color:"#2D353C",backgroundColor:"white",show:!0,showValue:!0,showPercentage:!1,roundingValue:0,roundingPercentage:0},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",titleInside:"Title inside",legendInside:"Legend inside",showTable:"Show table"}}},bar:{useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},line:{radius:3,useGradient:!0,strokeWidth:2,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},plot:{radius:3,useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},table:{rounding:0,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8"}}},clientPosition:{x:0,y:0},icons:{line:"▬",bar:"◼",plot:"●"},isPrinting:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},titleInside:!0,legendInside:!0,showTable:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:t}},computed:{chartConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},relativeZero(){return this.min>=0?0:Math.abs(this.min)},absoluteMax(){return this.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((t,e)=>({...t,series:t.series.map(r=>this.isSafeValue(r)?r:null),id:`uniqueId_${e}`})):this.dataset},relativeDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])})).filter(t=>!this.segregatedSeries.includes(t.id))},absoluteDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])}))},barSet(){return this.absoluteDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).map((t,e)=>({...t,plots:t.series.map((r,A)=>({x:this.drawingArea.left-this.slot.bar/2+this.slot.bar*e+this.slot.bar*A*this.absoluteDataset.filter(n=>n.type==="bar").filter(n=>!this.segregatedSeries.includes(n.id)).length,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(r),value:t.absoluteValues[A]}))}))},lineSet(){return this.absoluteDataset.filter(t=>t.type==="line").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.line/2+this.slot.line*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},plotSet(){return this.absoluteDataset.filter(t=>t.type==="plot").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},drawingArea(){return{top:this.chartConfig.chart.padding.top,right:this.chartConfig.chart.width-this.chartConfig.chart.padding.right,bottom:this.chartConfig.chart.height-this.chartConfig.chart.padding.bottom,left:this.chartConfig.chart.padding.left,height:this.chartConfig.chart.height-(this.chartConfig.chart.padding.top+this.chartConfig.chart.padding.bottom),width:this.chartConfig.chart.width-(this.chartConfig.chart.padding.right+this.chartConfig.chart.padding.left)}},max(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.max(...t.series)))},min(){return Math.min(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.min(...t.series)))},maxSeries(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>t.series.length))},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},maxSlot(){return Math.max(...Object.values(this.slot).filter(t=>t!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[]};const t=[...this.plotSet,...this.barSet,...this.lineSet].map(r=>({label:r.name,color:r.color,type:r.type})),e=[];return this.chartConfig.chart.grid.labels.xAxisLabels.values.forEach((r,A)=>{const n=[r];this.plotSet.length&&this.plotSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.barSet.length&&this.barSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.lineSet.length&&this.lineSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),e.push(n)}),{head:t,body:e}},tooltipContent(){const t=this.relativeDataset.map(n=>({name:n.name,color:n.color,type:n.type,value:n.absoluteValues.find((a,i)=>i===this.selectedSerieIndex)}));let e="",r=t.map(n=>n.value).filter(n=>this.isSafeValue(n)&&n!==null).reduce((n,a)=>Math.abs(n)+Math.abs(a),0);const A=this.chartConfig.chart.grid.labels.xAxisLabels.values[this.selectedSerieIndex];return A&&(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #e1e5e8; width:100%">${A}</div>`),t.forEach(n=>{this.isSafeValue(n.value)&&n.value!==null&&(e+=`<div><span style="color:${n.color}; margin-right: 3px">${this.icons[n.type]}</span>${n.name} : <b>${this.chartConfig.chart.tooltip.showValue?n.value.toFixed(this.chartConfig.chart.tooltip.roundingValue):""}</b> ${this.chartConfig.chart.tooltip.showPercentage?`(${this.checkNaN(Math.abs(n.value)/r*100).toFixed(this.chartConfig.chart.tooltip.roundingPercentage)}%)`:""}</div>`)}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums; background:${this.chartConfig.chart.tooltip.backgroundColor};color:${this.chartConfig.chart.tooltip.color}">${e}</div>`},tooltipPosition(){const t=this.$refs.tooltip,e=this.$refs.chart;let r=0,A=48;if(t&&e){const{width:n,height:a}=t.getBoundingClientRect(),i=e.getBoundingClientRect();this.clientPosition.x+n/2>i.right?r=-n:this.clientPosition.x-n/2<i.left?r=0:r=-n/2,this.clientPosition.y+a>i.bottom&&(A=-a-48)}return{top:this.clientPosition.y+A,left:this.clientPosition.x+r}},viewBox(){return`0 0 ${this.chartConfig.chart.width} ${this.chartConfig.chart.height}`},yLabels(){const t=this.closestDecimal(this.max/5),e=[];for(let n=5;n>0;n-=1){const a=t*n;e.push({y:this.zero-this.drawingArea.height*this.ratioToMax(t*n),value:a})}const r=this.closestDecimal(this.min/5),A=[];for(let n=5;n>=0;n-=1){const a=Math.abs(r)*n;A.push({y:this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)*n),value:-a})}return[...e,...A]},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){const t=document.getElementById("yAxisLabel");if(t){const r=t.getBBox().height/2+this.chartConfig.chart.padding.left/5,A=this.chartConfig.chart.height/2;t.setAttributeNS(null,"transform",`rotate(-90, ${r}, ${A})`),t.setAttributeNS(null,"x",r),t.setAttributeNS(null,"y",A),t.setAttributeNS(null,"font-size",this.chartConfig.chart.grid.labels.axis.fontSize)}this.chartConfig.showWarnings&&this.dataset.forEach(e=>{e.series.forEach((r,A)=>{this.isSafeValue(r)||console.warn(`SmartXY has detected an unsafe value in your dataset:
|
|
359
359
|
-----> The serie '${e.name}' contains the value '${r}' at index ${A}.
|
|
360
|
-
'${r}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",e=>{this.clientPosition={x:e.clientX,y:e.clientY}}),this.mutableConfig={dataLabels:{show:!0},titleInside:!this.chartConfig.chart.title.useDiv,legendInside:!this.chartConfig.chart.legend.useDiv}},methods:{checkNaN:OO,isSafeValue:kO,treeShake:Mu,calcRectHeight(t){return t.value>=0?this.zero-t.y:t.y-this.zero},calcRectWidth(){return this.slot.bar*.9},calcRectX(t){return t.x+this.slot.bar*.05+this.slot.bar/2},calcRectY(t){return t.value>=0?t.y:this.zero},canShowValue(t){return![null,void 0,NaN].includes(t)},closeDetails(){const t=this.$refs.details;t&&t.removeAttribute("open")},closestDecimal(t){if(t===0)return 0;const r=10**Math.floor(Math.log10(Math.abs(t)));let A;return t<0,A=Math.round(t/r)*r,A},convertColorToHex(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,a,i,s]=n;return`#${a}${i}${s}`}else if(n=t.match(r)){const[,a,i,s]=n;return`#${this.decimalToHex(a)}${this.decimalToHex(i)}${this.decimalToHex(s)}`}else if(n=t.match(A)){const[,a,i,s]=n,o=this.hslToRgb(Number(a),Number(i),Number(s));return`#${this.decimalToHex(o[0])}${this.decimalToHex(o[1])}${this.decimalToHex(o[2])}`}return null},decimalToHex(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e},hslToRgb(t,e,r){t/=360,e/=100,r/=100;let A,n,a;if(e===0)A=n=a=r;else{const i=(l,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?l+(c-l)*6*d:d<.5?c:d<.6666666666666666?l+(c-l)*(.6666666666666666-d)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=i(o,s,t+1/3),n=i(o,s,t),a=i(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(a*255)]},ratioToMax(t){return t/this.absoluteMax},segregate(t){if(this.segregatedSeries.includes(t.id))this.segregatedSeries=this.segregatedSeries.filter(e=>e!==t.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(t.id)}},shiftHue(t,e){const r=l=>({r:parseInt(l.substring(1,3),16),g:parseInt(l.substring(3,5),16),b:parseInt(l.substring(5,7),16)}),A=({r:l,g:c,b:d})=>{l/=255,c/=255,d/=255;const g=Math.max(l,c,d),h=Math.min(l,c,d);let m,v,B=(g+h)/2;if(g===h)m=v=0;else{const x=g-h;switch(v=B>.5?x/(2-g-h):x/(g+h),g){case l:m=(c-d)/x+(c<d?6:0);break;case c:m=(d-l)/x+2;break;case d:m=(l-c)/x+4;break}m/=6}return{h:m,s:v,l:B}},n=({h:l,s:c,l:d})=>{let g,h,m;if(c===0)g=h=m=d;else{const v=(b,F,O)=>(O<0&&(O+=1),O>1&&(O-=1),O<.16666666666666666?b+(F-b)*6*O:O<.5?F:O<.6666666666666666?b+(F-b)*(.6666666666666666-O)*6:b),B=d<.5?d*(1+c):d+c-d*c,x=2*d-B;g=v(x,B,l+.3333333333333333),h=v(x,B,l),m=v(x,B,l-.3333333333333333)}return{r:Math.round(g*255),g:Math.round(h*255),b:Math.round(m*255)}},a=r(t),i=A(a);i.h+=e,i.h=(i.h+1)%1;const s=n(i);return`#${(s.r<<16|s.g<<8|s.b).toString(16).padStart(6,"0")}`},toggleTooltip(t,e=null){this.isTooltip=t,t?this.selectedSerieIndex=e:this.selectedSerieIndex=null},generatePdf(){const t=this.$refs.chart;t&&(this.isPrinting=!0,this.$nextTick(()=>{const e={height:851.89,width:595.28},r=new Bt("","pt","a4");let A,n,a,i,s;xd(t).then(o=>{A=o.width,n=o.height;let l=n;const c=A/e.width*e.height;let d=0;if(a=e.width,i=582.28/A*n,s=o.toDataURL("image/png",1),l<c)r.addImage(s,"PNG",33,24,a*.9,i*.9,"","FAST");else for(;l>0;)r.addImage(s,"PNG",33,d,a*.9,i*.9,"","FAST"),l-=c,d-=e.height-24,l>0&&r.addPage();r.save(`${this.chartConfig.chart.title.text||"vue-ui-xy"}.pdf`)}).finally(()=>{this.isPrinting=!1})}))},generateXls(){const t=[[this.chartConfig.chart.title.text],[this.chartConfig.chart.title.subtitle.text],[""]],e=["",...this.table.head.map(c=>c.label)],r=this.table.body,A=t.concat([e]).concat(r);function n(c){let d=new ArrayBuffer(c.length),g=new Uint8Array(d);for(let h=0;h<c.length;h++)g[h]=c.charCodeAt(h)&255;return d}const a=Ga.book_new(),i=Ga.aoa_to_sheet(A);Ga.book_append_sheet(a,i,"Sheet1");const s=Du(a,{bookType:"xlsx",type:"binary"}),o=new Blob([n(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=document.createElement("a");l.href=window.URL.createObjectURL(o),l.download=`${this.chartConfig.chart.title.text.replaceAll(" ","_")||"vue-ui-xy"}.xlsx`,l.click(),window.URL.revokeObjectURL(l.href)}}},MO=t=>(u.pushScopeId("data-v-ade50da0"),t=t(),u.popScopeId(),t),RO={class:"vue-ui-xy-user-option-item"},HO=["id","name"],VO=["for"],KO={class:"vue-ui-xy-user-option-item"},GO=["id","name"],jO=["for"],zO={class:"vue-ui-xy-user-option-item"},WO=["id","name"],XO=["for"],qO={class:"vue-ui-xy-user-option-item"},YO=["id","name"],$O=["for"],JO=["disabled"],ZO={key:0,class:"vue-ui-xy-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},eD=[u.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-ade50da0></path><path d="M18 16v.01" data-v-ade50da0></path><path d="M6 16v.01" data-v-ade50da0></path><path d="M12 5v.01" data-v-ade50da0></path><path d="M12 12v.01" data-v-ade50da0></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-ade50da0></path>',6)],tD={key:1},rD=["viewBox"],AD={class:"vue-ui-xy-grid"},nD=["stroke","x1","x2","y1","y2"],aD=["stroke","x1","x2","y1","y2"],iD={key:0},sD=["x1","x2","y1","y2","stroke"],oD=["id"],lD=["stop-color"],cD=["stop-color"],fD=["stop-color"],uD=["id"],hD=["stop-color"],dD=["stop-color"],gD=["stop-color"],pD=["id"],mD=["stop-color"],vD=["stop-color"],wD=["id"],BD=["stop-color"],yD=["stop-color"],xD=["x","y","height","width","fill"],CD=["cx","cy","r","fill","stroke"],bD=["x1","x2","y1","y2","stroke","stroke-width"],ED=["cx","cy","r","fill","stroke"],FD={key:0},SD=["x","y","font-size","fill"],_D={key:1},TD=["x","y","font-size","fill"],UD={key:2},ID=["x","y","font-size","fill"],ND={key:3},LD=["x1","x2","y1","y2","stroke"],QD=["x","y","font-size","fill"],kD=["font-size","fill"],OD=["x","y","font-size","fill"],DD={key:4},PD={x:"0",y:"0",width:"100%",height:"40px",style:{overflow:"visible"}},MD={key:5},RD=["y"],HD={class:"vue-ui-xy-legend"},VD=["onClick"],KD={key:6},GD=["y","x","font-size","fill"],jD={key:7},zD=["x","y","height","width","fill","onMouseenter"],WD=["onClick"],XD=["innerHTML"],qD=["innerHTML"],YD={class:"vue-ui-xy-table"},$D={style:{"max-width":"200px",margin:"0 auto"}},JD=[MO(()=>u.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[u.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],ZD=["onMouseover"];function eP(t,e,r,A,n,a){return u.openBlock(),u.createElementBlock("div",{class:"vue-ui-xy",ref:"chart",style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor}; color:${a.chartConfig.chart.color};width:100%`)},[a.chartConfig.chart.title.show&&(!n.mutableConfig.titleInside||n.isPrinting)?(u.openBlock(),u.createElementBlock("div",{key:0,class:"vue-ui-xy-title",style:u.normalizeStyle(`font-family:${a.chartConfig.chart.fontFamily}`)},[u.createElementVNode("div",{class:"vue-ui-xy-title-main",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.title.fontSize}px; color:${a.chartConfig.chart.title.color}; font-weight:${a.chartConfig.chart.title.bold?"bold":"400"}`)},u.toDisplayString(a.chartConfig.chart.title.text),5),a.chartConfig.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.title.subtitle.fontSize}px; color:${a.chartConfig.chart.title.subtitle.color}`)},u.toDisplayString(a.chartConfig.chart.title.subtitle.text),5)):u.createCommentVNode("",!0)],4)):u.createCommentVNode("",!0),a.chartConfig.chart.userOptions.show?(u.openBlock(),u.createElementBlock("details",{key:1,class:"vue-ui-xy-user-options",style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`),"data-html2canvas-ignore":"",ref:"details"},[u.createElementVNode("summary",{style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`)},u.toDisplayString(a.chartConfig.chart.userOptions.title),5),u.createElementVNode("div",{class:"vue-ui-xy-user-options-items",style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`)},[u.createElementVNode("div",RO,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-datalabels_${n.uniqueId}`,name:`vue-ui-xy-option-datalabels_${n.uniqueId}`,"onUpdate:modelValue":e[0]||(e[0]=i=>n.mutableConfig.dataLabels.show=i)},null,8,HO),[[u.vModelCheckbox,n.mutableConfig.dataLabels.show]]),u.createElementVNode("label",{for:`vue-ui-xy-option-datalabels_${n.uniqueId}`},u.toDisplayString(a.chartConfig.chart.userOptions.labels.dataLabels),9,VO)]),u.createElementVNode("div",KO,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-title_${n.uniqueId}`,name:`vue-ui-xy-option-title_${n.uniqueId}`,"onUpdate:modelValue":e[1]||(e[1]=i=>n.mutableConfig.titleInside=i)},null,8,GO),[[u.vModelCheckbox,n.mutableConfig.titleInside]]),u.createElementVNode("label",{for:`vue-ui-xy-option-title_${n.uniqueId}`},u.toDisplayString(a.chartConfig.chart.userOptions.labels.titleInside),9,jO)]),u.createElementVNode("div",zO,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-legend_${n.uniqueId}`,name:`vue-ui-xy-option-legend_${n.uniqueId}`,"onUpdate:modelValue":e[2]||(e[2]=i=>n.mutableConfig.legendInside=i)},null,8,WO),[[u.vModelCheckbox,n.mutableConfig.legendInside]]),u.createElementVNode("label",{for:`vue-ui-xy-option-legend_${n.uniqueId}`},u.toDisplayString(a.chartConfig.chart.userOptions.labels.legendInside),9,XO)]),u.createElementVNode("div",qO,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-table_${n.uniqueId}`,name:`vue-ui-xy-option-table_${n.uniqueId}`,"onUpdate:modelValue":e[3]||(e[3]=i=>n.mutableConfig.showTable=i)},null,8,YO),[[u.vModelCheckbox,n.mutableConfig.showTable]]),u.createElementVNode("label",{for:`vue-ui-xy-option-table_${n.uniqueId}`},u.toDisplayString(a.chartConfig.chart.userOptions.labels.showTable),9,$O)]),u.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[4]||(e[4]=(...i)=>a.generatePdf&&a.generatePdf(...i)),disabled:n.isPrinting,style:{"margin-top":"12px"}},[n.isPrinting?(u.openBlock(),u.createElementBlock("svg",ZO,eD)):(u.openBlock(),u.createElementBlock("span",tD,"PDF"))],8,JO),u.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[5]||(e[5]=(...i)=>a.generateXls&&a.generateXls(...i))}," XLSX ")],4)],4)):u.createCommentVNode("",!0),(u.openBlock(),u.createElementBlock("svg",{width:"100%",viewBox:a.viewBox,class:"vue-ui-xy-svg",style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor}; color:${a.chartConfig.chart.color}; font-family:${a.chartConfig.chart.fontFamily}`),onClick:e[7]||(e[7]=(...i)=>a.closeDetails&&a.closeDetails(...i))},[u.createElementVNode("g",AD,[u.createElementVNode("line",{stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:a.drawingArea.left,x2:a.drawingArea.left,y1:a.drawingArea.top,y2:a.drawingArea.bottom,"stroke-linecap":"round"},null,8,nD),u.createElementVNode("line",{stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:a.drawingArea.left,x2:a.drawingArea.right,y1:a.zero,y2:a.zero,"stroke-linecap":"round"},null,8,aD),a.chartConfig.chart.grid.showVerticalLines?(u.openBlock(),u.createElementBlock("g",iD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.maxSeries+1,(i,s)=>(u.openBlock(),u.createElementBlock("line",{key:`grid_vertical_line_${s}`,x1:a.drawingArea.width/a.maxSeries*s+a.drawingArea.left,x2:a.drawingArea.width/a.maxSeries*s+a.drawingArea.left,y1:a.drawingArea.top,y2:a.drawingArea.bottom,"stroke-width":"0.5",stroke:a.chartConfig.chart.grid.stroke},null,8,sD))),128))])):u.createCommentVNode("",!0)]),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.barSet,(i,s)=>(u.openBlock(),u.createElementBlock("defs",{key:`def_rect_${s}`},[u.createElementVNode("linearGradient",{id:`rectGradient_pos_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[u.createElementVNode("stop",{offset:"0%","stop-color":i.color},null,8,lD),u.createElementVNode("stop",{offset:"62%","stop-color":`${a.shiftHue(i.color,.02)}DE`},null,8,cD),u.createElementVNode("stop",{offset:"100%","stop-color":`${a.shiftHue(i.color,.05)}66`},null,8,fD)],8,oD),u.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[u.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}66`},null,8,hD),u.createElementVNode("stop",{offset:"38%","stop-color":`${a.shiftHue(i.color,.02)}DE`},null,8,dD),u.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,gD)],8,uD)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.plotSet,(i,s)=>(u.openBlock(),u.createElementBlock("defs",{key:`def_plot_${s}`},[u.createElementVNode("radialGradient",{id:`plotGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[u.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}`},null,8,mD),u.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,vD)],8,pD)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.lineSet,(i,s)=>(u.openBlock(),u.createElementBlock("defs",{key:`def_line_${s}`},[u.createElementVNode("radialGradient",{id:`lineGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[u.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}`},null,8,BD),u.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,yD)],8,wD)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.barSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`serie_bar_${s}`,class:u.normalizeClass(`serie_bar_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`bar_plot_${s}_${l}`},[a.canShowValue(o.value)?(u.openBlock(),u.createElementBlock("rect",{key:0,x:a.calcRectX(o),y:a.calcRectY(o),height:a.calcRectHeight(o),width:a.calcRectWidth(),fill:a.chartConfig.bar.useGradient?o.value>=0?`url(#rectGradient_pos_${s}_${n.uniqueId})`:`url(#rectGradient_neg_${s}_${n.uniqueId})`:i.color},null,8,xD)):u.createCommentVNode("",!0)]))),128))],2))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.plotSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`serie_plot_${s}`,class:u.normalizeClass(`serie_plot_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`circle_plot_${s}_${l}`},[a.canShowValue(o.value)?(u.openBlock(),u.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:a.chartConfig.plot.radius,fill:a.chartConfig.plot.useGradient?`url(#plotGradient_${s}_${n.uniqueId})`:i.color,stroke:a.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,CD)):u.createCommentVNode("",!0)]))),128))],2))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.lineSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`serie_line_${s}`,class:u.normalizeClass(`serie_line_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`line_${s}_${l}`},[l<i.plots.length-1&&a.canShowValue(o.value)&&a.canShowValue(i.plots[l+1].value)?(u.openBlock(),u.createElementBlock("line",{key:0,x1:o.x,x2:i.plots[l+1].x,y1:o.y,y2:i.plots[l+1].y,stroke:i.color,"stroke-width":a.chartConfig.line.strokeWidth},null,8,bD)):u.createCommentVNode("",!0)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`circle_line_${s}_${l}`},[a.canShowValue(o.value)?(u.openBlock(),u.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:a.chartConfig.line.radius,fill:a.chartConfig.line.useGradient?`url(#lineGradient_${s}_${n.uniqueId})`:i.color,stroke:a.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,ED)):u.createCommentVNode("",!0)]))),128))],2))),128)),a.chartConfig.bar.labels.show&&n.mutableConfig.dataLabels.show?(u.openBlock(),u.createElementBlock("g",FD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.barSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_bar_${s}`,class:u.normalizeClass(`xLabel_bar_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_bar_${s}_${l}`},[u.createElementVNode("text",{x:o.x+a.calcRectWidth(),y:o.y+a.chartConfig.bar.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.bar.labels.color},u.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.bar.labels.rounding):""),9,SD)]))),128))],2))),128))])):u.createCommentVNode("",!0),a.chartConfig.plot.labels.show&&n.mutableConfig.dataLabels.show?(u.openBlock(),u.createElementBlock("g",_D,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.plotSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_plot_${s}`,class:u.normalizeClass(`xLabel_plot_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_plot_${s}_${l}`},[u.createElementVNode("text",{x:o.x,y:o.y+a.chartConfig.plot.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.plot.labels.color},u.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.plot.labels.rounding):""),9,TD)]))),128))],2))),128))])):u.createCommentVNode("",!0),a.chartConfig.line.labels.show&&n.mutableConfig.dataLabels.show?(u.openBlock(),u.createElementBlock("g",UD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.lineSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_line_${s}`,class:u.normalizeClass(`xLabel_line_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_line_${s}_${l}`},[u.createElementVNode("text",{x:o.x,y:o.y+a.chartConfig.line.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.line.labels.color},u.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.line.labels.rounding):""),9,ID)]))),128))],2))),128))])):u.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.show?(u.openBlock(),u.createElementBlock("g",ND,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.yLabels,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`yLabel_${s}`},[i.value>=a.min&&i.value<=a.max?(u.openBlock(),u.createElementBlock("line",{key:0,x1:a.drawingArea.left,x2:a.drawingArea.left-5,y1:i.y,y2:i.y,stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1"},null,8,LD)):u.createCommentVNode("",!0),i.value>=a.min&&i.value<=a.max?(u.openBlock(),u.createElementBlock("text",{key:1,x:a.drawingArea.left-5,y:i.y+a.chartConfig.chart.labels.fontSize/3,"font-size":a.chartConfig.chart.grid.labels.fontSize,"text-anchor":"end",fill:a.chartConfig.chart.grid.labels.color},u.toDisplayString(a.canShowValue(i.value)?i.value.toFixed(0):""),9,QD)):u.createCommentVNode("",!0)]))),128))])):u.createCommentVNode("",!0),u.createElementVNode("g",null,[a.chartConfig.chart.grid.labels.axis.yLabel?(u.openBlock(),u.createElementBlock("text",{key:0,"font-size":a.chartConfig.chart.grid.labels.axis.fontSize,fill:a.chartConfig.chart.grid.labels.color,id:"yAxisLabel","text-anchor":"middle",style:{transition:"none"}},u.toDisplayString(a.chartConfig.chart.grid.labels.axis.yLabel),9,kD)):u.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.axis.xLabel?(u.openBlock(),u.createElementBlock("text",{key:1,"text-anchor":"middle",x:a.chartConfig.chart.width/2,y:a.drawingArea.bottom+a.chartConfig.chart.grid.labels.axis.fontSize+a.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,"font-size":a.chartConfig.chart.grid.labels.axis.fontSize,fill:a.chartConfig.chart.grid.labels.color},u.toDisplayString(a.chartConfig.chart.grid.labels.axis.xLabel),9,OD)):u.createCommentVNode("",!0)]),a.chartConfig.chart.title.show&&n.mutableConfig.titleInside&&!n.isPrinting?(u.openBlock(),u.createElementBlock("g",DD,[(u.openBlock(),u.createElementBlock("foreignObject",PD,[u.createElementVNode("div",{class:"vue-ui-xy-title",style:u.normalizeStyle(`font-family:${a.chartConfig.chart.fontFamily}`)},[u.createElementVNode("div",{class:"vue-ui-xy-title-main",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.title.fontSize*.6}px; color:${a.chartConfig.chart.title.color}; font-weight:${a.chartConfig.chart.title.bold?"bold":"400"}`)},u.toDisplayString(a.chartConfig.chart.title.text),5),a.chartConfig.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.title.subtitle.fontSize*.6}px; color:${a.chartConfig.chart.title.subtitle.color}`)},u.toDisplayString(a.chartConfig.chart.title.subtitle.text),5)):u.createCommentVNode("",!0)],4)]))])):u.createCommentVNode("",!0),a.chartConfig.chart.legend.show&&n.mutableConfig.legendInside&&!n.isPrinting?(u.openBlock(),u.createElementBlock("g",MD,[(u.openBlock(),u.createElementBlock("foreignObject",{x:"0",y:a.drawingArea.bottom+a.chartConfig.chart.padding.bottom/3+12,width:"100%",height:"20px",style:u.normalizeStyle(`overflow:visible; font-size:${a.chartConfig.chart.legend.fontSize*.6}px`)},[u.createElementVNode("div",HD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.absoluteDataset,(i,s)=>(u.openBlock(),u.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>a.segregate(i),class:u.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(i.id)})},[["plot"].includes(i.type)?(u.openBlock(),u.createElementBlock("span",{key:0,style:u.normalizeStyle(`color:${i.color}`)},"●",4)):u.createCommentVNode("",!0),["line"].includes(i.type)?(u.openBlock(),u.createElementBlock("span",{key:1,style:u.normalizeStyle(`color:${i.color}`)},"▬",4)):u.createCommentVNode("",!0),["bar"].includes(i.type)?(u.openBlock(),u.createElementBlock("span",{key:2,style:u.normalizeStyle(`color:${i.color}`)},"◼",4)):u.createCommentVNode("",!0),u.createElementVNode("span",{style:u.normalizeStyle(`color:${a.chartConfig.chart.legend.color}`)},u.toDisplayString(i.name),5)],10,VD))),128))])],12,RD))])):u.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.xAxisLabels.show?(u.openBlock(),u.createElementBlock("g",KD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.maxSeries,(i,s)=>(u.openBlock(),u.createElementBlock("text",{key:`time_label_${s}`,"text-anchor":"middle",y:a.drawingArea.bottom+a.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,x:a.drawingArea.left+a.drawingArea.width/a.maxSeries*s+a.drawingArea.width/a.maxSeries/2,"font-size":a.chartConfig.chart.grid.labels.xAxisLabels.fontSize,fill:a.chartConfig.chart.grid.labels.xAxisLabels.color},u.toDisplayString(a.chartConfig.chart.grid.labels.xAxisLabels.values[s]||""),9,GD))),128))])):u.createCommentVNode("",!0),a.chartConfig.chart.tooltip.show?(u.openBlock(),u.createElementBlock("g",jD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.maxSeries,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`tooltip_trap_${s}`},[u.createElementVNode("rect",{x:a.drawingArea.left+a.drawingArea.width/a.maxSeries*s,y:a.drawingArea.top,height:a.drawingArea.height,width:a.drawingArea.width/a.maxSeries,fill:n.selectedSerieIndex===s||n.selectedRowIndex===s?"rgba(0,0,0,0.03)":"transparent",onMouseenter:o=>a.toggleTooltip(!0,s),onMouseleave:e[6]||(e[6]=o=>a.toggleTooltip(!1))},null,40,zD)]))),128))])):u.createCommentVNode("",!0)],12,rD)),a.chartConfig.chart.legend.show&&(!n.mutableConfig.legendInside||n.isPrinting)?(u.openBlock(),u.createElementBlock("div",{key:2,class:"vue-ui-xy-legend",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.legend.fontSize}px`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.absoluteDataset,(i,s)=>(u.openBlock(),u.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>a.segregate(i),class:u.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(i.id)})},[u.createElementVNode("span",{style:u.normalizeStyle(`color:${i.color}`),innerHTML:n.icons[i.type]},null,12,XD),u.createElementVNode("span",{style:u.normalizeStyle(`color:${a.chartConfig.chart.legend.color}`)},u.toDisplayString(i.name),5)],10,WD))),128))],4)):u.createCommentVNode("",!0),a.chartConfig.chart.tooltip.show&&n.isTooltip?(u.openBlock(),u.createElementBlock("div",{key:3,class:"vue-ui-xy-tooltip",ref:"tooltip",style:u.normalizeStyle(`top:${a.tooltipPosition.top}px;left:${a.tooltipPosition.left}px; background-color:${a.chartConfig.chart.tooltip.backgroundColor};color:${a.chartConfig.chart.tooltip.color}`),innerHTML:a.tooltipContent},null,12,qD)):u.createCommentVNode("",!0),a.chartConfig.showTable&&n.mutableConfig.showTable?(u.openBlock(),u.createElementBlock("div",{key:4,class:u.normalizeClass({"vue-ui-xy-table-wrapper":!0,"vue-ui-xy-table-wrapper-printing":n.isPrinting}),onClick:e[9]||(e[9]=(...i)=>a.closeDetails&&a.closeDetails(...i))},[u.createElementVNode("table",YD,[u.createElementVNode("thead",null,[u.createElementVNode("tr",null,[u.createElementVNode("th",{style:u.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},null,4),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.table.head,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`th_${s}`,style:u.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},[u.createElementVNode("div",$D,[u.createElementVNode("span",{style:u.normalizeStyle(`color:${i.color}; margin-right:3px`)},u.toDisplayString(n.icons[i.type]),5),u.createTextVNode(u.toDisplayString(i.label),1)])],4))),128))]),u.createElementVNode("tr",null,[u.createElementVNode("th",{align:"right",style:u.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},JD,4),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.table.head,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`th_sum_${s}`,style:u.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},u.toDisplayString(a.relativeDataset[s].absoluteValues.reduce((o,l)=>o+l,0).toFixed(a.chartConfig.table.rounding)),5))),128))])]),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.table.body,(i,s)=>(u.openBlock(),u.createElementBlock("tr",{key:`tr_${s}`,class:u.normalizeClass({"vue-ui-xy-table-tr-selected":n.selectedSerieIndex===s||n.selectedRowIndex===s}),onMouseover:o=>n.selectedRowIndex=s,onMouseleave:e[8]||(e[8]=o=>n.selectedRowIndex=null)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i,(o,l)=>(u.openBlock(),u.createElementBlock("td",{key:`td_${s}_${l}`,style:u.normalizeStyle(`background:${a.chartConfig.table.td.backgroundColor};color:${a.chartConfig.table.td.color}`)},u.toDisplayString(o),5))),128))],42,ZD))),128))])])],2)):u.createCommentVNode("",!0)],4)}const tP=b1(PO,[["render",eP],["__scopeId","data-v-ade50da0"]]),IJ="",rP={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,defaultConfig:{fontFamily:"inherit",maxHeight:500,rowsPerPage:25,style:{th:{backgroundColor:"#E1E5E8",color:"#2D353C",outline:"1px solid #FFFFFF",selected:{backgroundColor:"#6376DD",color:"#FFFFFF"}},rows:{even:{backgroundColor:"#f3f5f7",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}},odd:{backgroundColor:"#FFFFFF",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}}},inputs:{backgroundColor:"#FFFFFF",color:"#2D353C",border:"1px solid #CCCCCC",accentColor:"#6376DD"},dropdowns:{backgroundColor:"#E1E5E8",color:"#2D353C",icons:{selected:{color:"#008000",unicode:"✔"},unselected:{color:"#ff0000",unicode:"✖"}}},infoBar:{backgroundColor:"#E1E5E8",color:"#2D353C"},pagination:{buttons:{backgroundColor:"#E1E5E8",color:"#2D353C",opacityDisabled:.5},navigationIndicator:{backgroundColor:"#6376DD"}},exportMenu:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{backgroundColor:"#FAFAFA",color:"#2D353C"}},closeButtons:{backgroundColor:"transparent",color:"#2D353C",borderRadius:"50%"},chart:{modal:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{selected:{backgroundColor:"#6376DD",color:"#FFFFFF"},unselected:{backgroundColor:"#FFFFFF",color:"#2D353C"}}},layout:{backgroundColor:"#FFFFFF",axis:{stroke:"#ccd1d4",strokeWidth:2},bar:{fill:"",stroke:"#FFFFFF"},line:{stroke:"#6376DD75",strokeWidth:4,plot:{fill:"#22348f",stroke:"#FFFFFF",strokeWidth:1,radius:{selected:6,unselected:4}},selector:{stroke:"#ccc",strokeWidth:1,strokeDasharray:5}},labels:{color:"#2D353C"},progression:{stroke:"#2D353C",strokeWidth:2,strokeDasharray:4,arrowSize:7}}}},translations:{average:"Average",by:"by",chooseCategoryColumn:"Choose category column",exportAllButton:"XLSX all",exportAllLabel:"Export all rows of your current filtered dataset",exportPageButton:"XLSX page",exportPageLabel:"Export rows of the current page",from:"From",inputPlaceholder:"Search...",makeDonut:"Generate",nb:"Nb",page:"Page",paginatorLabel:"Rows per page",sizeWarning:"Displaying too many rows at a time can lead to slower performance",sum:"Somme",to:"To",total:"Total",totalRows:"Total rows"},useChart:!0},bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((e,r)=>e-r),palette:Ui,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(e=>({average:Object.hasOwn(e,"average")?e.average:!1,decimals:Object.hasOwn(e,"decimals")?e.decimals:0,isMultiselect:Object.hasOwn(e,"isMultiselect")?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,"isPercentage")?e.isPercentage:!1,isSearch:Object.hasOwn(e,"isSearch")?e.isSearch:!1,isSort:Object.hasOwn(e,"isSort")?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,"percentageTo")?e.percentageTo:void 0,prefix:Object.hasOwn(e,"prefix")?e.prefix:"",rangeFilter:Object.hasOwn(e,"rangeFilter")?e.rangeFilter:!1,suffix:Object.hasOwn(e,"suffix")?e.suffix:"",sum:Object.hasOwn(e,"sum")?e.sum:!1,type:e.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
|
|
360
|
+
'${r}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",e=>{this.clientPosition={x:e.clientX,y:e.clientY}}),this.mutableConfig={dataLabels:{show:!0},titleInside:!this.chartConfig.chart.title.useDiv,legendInside:!this.chartConfig.chart.legend.useDiv}},methods:{checkNaN:OO,isSafeValue:kO,treeShake:Mu,calcRectHeight(t){return t.value>=0?this.zero-t.y:t.y-this.zero},calcRectWidth(){return this.slot.bar*.9},calcRectX(t){return t.x+this.slot.bar*.05+this.slot.bar/2},calcRectY(t){return t.value>=0?t.y:this.zero},canShowValue(t){return![null,void 0,NaN].includes(t)},closeDetails(){const t=this.$refs.details;t&&t.removeAttribute("open")},closestDecimal(t){if(t===0)return 0;const r=10**Math.floor(Math.log10(Math.abs(t)));let A;return t<0,A=Math.round(t/r)*r,A},convertColorToHex(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,a,i,s]=n;return`#${a}${i}${s}`}else if(n=t.match(r)){const[,a,i,s]=n;return`#${this.decimalToHex(a)}${this.decimalToHex(i)}${this.decimalToHex(s)}`}else if(n=t.match(A)){const[,a,i,s]=n,o=this.hslToRgb(Number(a),Number(i),Number(s));return`#${this.decimalToHex(o[0])}${this.decimalToHex(o[1])}${this.decimalToHex(o[2])}`}return null},decimalToHex(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e},hslToRgb(t,e,r){t/=360,e/=100,r/=100;let A,n,a;if(e===0)A=n=a=r;else{const i=(l,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?l+(c-l)*6*d:d<.5?c:d<.6666666666666666?l+(c-l)*(.6666666666666666-d)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=i(o,s,t+1/3),n=i(o,s,t),a=i(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(a*255)]},ratioToMax(t){return t/this.absoluteMax},segregate(t){if(this.segregatedSeries.includes(t.id))this.segregatedSeries=this.segregatedSeries.filter(e=>e!==t.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(t.id)}},shiftHue(t,e){const r=l=>({r:parseInt(l.substring(1,3),16),g:parseInt(l.substring(3,5),16),b:parseInt(l.substring(5,7),16)}),A=({r:l,g:c,b:d})=>{l/=255,c/=255,d/=255;const g=Math.max(l,c,d),h=Math.min(l,c,d);let m,v,B=(g+h)/2;if(g===h)m=v=0;else{const x=g-h;switch(v=B>.5?x/(2-g-h):x/(g+h),g){case l:m=(c-d)/x+(c<d?6:0);break;case c:m=(d-l)/x+2;break;case d:m=(l-c)/x+4;break}m/=6}return{h:m,s:v,l:B}},n=({h:l,s:c,l:d})=>{let g,h,m;if(c===0)g=h=m=d;else{const v=(b,F,O)=>(O<0&&(O+=1),O>1&&(O-=1),O<.16666666666666666?b+(F-b)*6*O:O<.5?F:O<.6666666666666666?b+(F-b)*(.6666666666666666-O)*6:b),B=d<.5?d*(1+c):d+c-d*c,x=2*d-B;g=v(x,B,l+.3333333333333333),h=v(x,B,l),m=v(x,B,l-.3333333333333333)}return{r:Math.round(g*255),g:Math.round(h*255),b:Math.round(m*255)}},a=r(t),i=A(a);i.h+=e,i.h=(i.h+1)%1;const s=n(i);return`#${(s.r<<16|s.g<<8|s.b).toString(16).padStart(6,"0")}`},toggleTooltip(t,e=null){this.isTooltip=t,t?this.selectedSerieIndex=e:this.selectedSerieIndex=null},generatePdf(){const t=this.$refs.chart;t&&(this.isPrinting=!0,this.$nextTick(()=>{const e={height:851.89,width:595.28},r=new Bt("","pt","a4");let A,n,a,i,s;xd(t).then(o=>{A=o.width,n=o.height;let l=n;const c=A/e.width*e.height;let d=0;if(a=e.width,i=582.28/A*n,s=o.toDataURL("image/png",1),l<c)r.addImage(s,"PNG",33,24,a*.9,i*.9,"","FAST");else for(;l>0;)r.addImage(s,"PNG",33,d,a*.9,i*.9,"","FAST"),l-=c,d-=e.height-24,l>0&&r.addPage();r.save(`${this.chartConfig.chart.title.text||"vue-ui-xy"}.pdf`)}).finally(()=>{this.isPrinting=!1})}))},generateXls(){const t=[[this.chartConfig.chart.title.text],[this.chartConfig.chart.title.subtitle.text],[""]],e=["",...this.table.head.map(c=>c.label)],r=this.table.body,A=t.concat([e]).concat(r);function n(c){let d=new ArrayBuffer(c.length),g=new Uint8Array(d);for(let h=0;h<c.length;h++)g[h]=c.charCodeAt(h)&255;return d}const a=Ga.book_new(),i=Ga.aoa_to_sheet(A);Ga.book_append_sheet(a,i,"Sheet1");const s=Du(a,{bookType:"xlsx",type:"binary"}),o=new Blob([n(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=document.createElement("a");l.href=window.URL.createObjectURL(o),l.download=`${this.chartConfig.chart.title.text.replaceAll(" ","_")||"vue-ui-xy"}.xlsx`,l.click(),window.URL.revokeObjectURL(l.href)}}},MO=t=>(u.pushScopeId("data-v-a0dbf99b"),t=t(),u.popScopeId(),t),RO={class:"vue-ui-xy-user-option-item"},HO=["id","name"],VO=["for"],KO={class:"vue-ui-xy-user-option-item"},GO=["id","name"],jO=["for"],zO={class:"vue-ui-xy-user-option-item"},WO=["id","name"],XO=["for"],qO={class:"vue-ui-xy-user-option-item"},YO=["id","name"],$O=["for"],JO=["disabled"],ZO={key:0,class:"vue-ui-xy-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},eD=[u.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-a0dbf99b></path><path d="M18 16v.01" data-v-a0dbf99b></path><path d="M6 16v.01" data-v-a0dbf99b></path><path d="M12 5v.01" data-v-a0dbf99b></path><path d="M12 12v.01" data-v-a0dbf99b></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-a0dbf99b></path>',6)],tD={key:1},rD=["viewBox"],AD={class:"vue-ui-xy-grid"},nD=["stroke","x1","x2","y1","y2"],aD=["stroke","x1","x2","y1","y2"],iD={key:0},sD=["x1","x2","y1","y2","stroke"],oD=["id"],lD=["stop-color"],cD=["stop-color"],fD=["stop-color"],uD=["id"],hD=["stop-color"],dD=["stop-color"],gD=["stop-color"],pD=["id"],mD=["stop-color"],vD=["stop-color"],wD=["id"],BD=["stop-color"],yD=["stop-color"],xD=["x","y","height","width","fill"],CD=["cx","cy","r","fill","stroke"],bD=["x1","x2","y1","y2","stroke","stroke-width"],ED=["cx","cy","r","fill","stroke"],FD={key:0},SD=["x","y","font-size","fill"],_D={key:1},TD=["x","y","font-size","fill"],UD={key:2},ID=["x","y","font-size","fill"],ND={key:3},LD=["x1","x2","y1","y2","stroke"],QD=["x","y","font-size","fill"],kD=["font-size","fill"],OD=["x","y","font-size","fill"],DD={key:4},PD={x:"0",y:"0",width:"100%",height:"40px",style:{overflow:"visible"}},MD={key:5},RD=["y"],HD={class:"vue-ui-xy-legend"},VD=["onClick"],KD={key:6},GD=["y","x","font-size","fill"],jD={key:7},zD=["x","y","height","width","fill","onMouseenter"],WD=["onClick"],XD=["innerHTML"],qD=["innerHTML"],YD={class:"vue-ui-xy-table"},$D={style:{"max-width":"200px",margin:"0 auto","text-align":"center"}},JD=[MO(()=>u.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[u.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],ZD=["onMouseover"];function eP(t,e,r,A,n,a){return u.openBlock(),u.createElementBlock("div",{class:"vue-ui-xy",ref:"chart",style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor}; color:${a.chartConfig.chart.color};width:100%`)},[a.chartConfig.chart.title.show&&(!n.mutableConfig.titleInside||n.isPrinting)?(u.openBlock(),u.createElementBlock("div",{key:0,class:"vue-ui-xy-title",style:u.normalizeStyle(`font-family:${a.chartConfig.chart.fontFamily}`)},[u.createElementVNode("div",{class:"vue-ui-xy-title-main",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.title.fontSize}px; color:${a.chartConfig.chart.title.color}; font-weight:${a.chartConfig.chart.title.bold?"bold":"400"}`)},u.toDisplayString(a.chartConfig.chart.title.text),5),a.chartConfig.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.title.subtitle.fontSize}px; color:${a.chartConfig.chart.title.subtitle.color}`)},u.toDisplayString(a.chartConfig.chart.title.subtitle.text),5)):u.createCommentVNode("",!0)],4)):u.createCommentVNode("",!0),a.chartConfig.chart.userOptions.show?(u.openBlock(),u.createElementBlock("details",{key:1,class:"vue-ui-xy-user-options",style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`),"data-html2canvas-ignore":"",ref:"details"},[u.createElementVNode("summary",{style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`)},u.toDisplayString(a.chartConfig.chart.userOptions.title),5),u.createElementVNode("div",{class:"vue-ui-xy-user-options-items",style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`)},[u.createElementVNode("div",RO,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-datalabels_${n.uniqueId}`,name:`vue-ui-xy-option-datalabels_${n.uniqueId}`,"onUpdate:modelValue":e[0]||(e[0]=i=>n.mutableConfig.dataLabels.show=i)},null,8,HO),[[u.vModelCheckbox,n.mutableConfig.dataLabels.show]]),u.createElementVNode("label",{for:`vue-ui-xy-option-datalabels_${n.uniqueId}`},u.toDisplayString(a.chartConfig.chart.userOptions.labels.dataLabels),9,VO)]),u.createElementVNode("div",KO,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-title_${n.uniqueId}`,name:`vue-ui-xy-option-title_${n.uniqueId}`,"onUpdate:modelValue":e[1]||(e[1]=i=>n.mutableConfig.titleInside=i)},null,8,GO),[[u.vModelCheckbox,n.mutableConfig.titleInside]]),u.createElementVNode("label",{for:`vue-ui-xy-option-title_${n.uniqueId}`},u.toDisplayString(a.chartConfig.chart.userOptions.labels.titleInside),9,jO)]),u.createElementVNode("div",zO,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-legend_${n.uniqueId}`,name:`vue-ui-xy-option-legend_${n.uniqueId}`,"onUpdate:modelValue":e[2]||(e[2]=i=>n.mutableConfig.legendInside=i)},null,8,WO),[[u.vModelCheckbox,n.mutableConfig.legendInside]]),u.createElementVNode("label",{for:`vue-ui-xy-option-legend_${n.uniqueId}`},u.toDisplayString(a.chartConfig.chart.userOptions.labels.legendInside),9,XO)]),u.createElementVNode("div",qO,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-table_${n.uniqueId}`,name:`vue-ui-xy-option-table_${n.uniqueId}`,"onUpdate:modelValue":e[3]||(e[3]=i=>n.mutableConfig.showTable=i)},null,8,YO),[[u.vModelCheckbox,n.mutableConfig.showTable]]),u.createElementVNode("label",{for:`vue-ui-xy-option-table_${n.uniqueId}`},u.toDisplayString(a.chartConfig.chart.userOptions.labels.showTable),9,$O)]),u.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[4]||(e[4]=(...i)=>a.generatePdf&&a.generatePdf(...i)),disabled:n.isPrinting,style:{"margin-top":"12px"}},[n.isPrinting?(u.openBlock(),u.createElementBlock("svg",ZO,eD)):(u.openBlock(),u.createElementBlock("span",tD,"PDF"))],8,JO),u.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[5]||(e[5]=(...i)=>a.generateXls&&a.generateXls(...i))}," XLSX ")],4)],4)):u.createCommentVNode("",!0),(u.openBlock(),u.createElementBlock("svg",{width:"100%",viewBox:a.viewBox,class:"vue-ui-xy-svg",style:u.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor}; color:${a.chartConfig.chart.color}; font-family:${a.chartConfig.chart.fontFamily}`),onClick:e[7]||(e[7]=(...i)=>a.closeDetails&&a.closeDetails(...i))},[u.createElementVNode("g",AD,[u.createElementVNode("line",{stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:a.drawingArea.left,x2:a.drawingArea.left,y1:a.drawingArea.top,y2:a.drawingArea.bottom,"stroke-linecap":"round"},null,8,nD),u.createElementVNode("line",{stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:a.drawingArea.left,x2:a.drawingArea.right,y1:a.zero,y2:a.zero,"stroke-linecap":"round"},null,8,aD),a.chartConfig.chart.grid.showVerticalLines?(u.openBlock(),u.createElementBlock("g",iD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.maxSeries+1,(i,s)=>(u.openBlock(),u.createElementBlock("line",{key:`grid_vertical_line_${s}`,x1:a.drawingArea.width/a.maxSeries*s+a.drawingArea.left,x2:a.drawingArea.width/a.maxSeries*s+a.drawingArea.left,y1:a.drawingArea.top,y2:a.drawingArea.bottom,"stroke-width":"0.5",stroke:a.chartConfig.chart.grid.stroke},null,8,sD))),128))])):u.createCommentVNode("",!0)]),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.barSet,(i,s)=>(u.openBlock(),u.createElementBlock("defs",{key:`def_rect_${s}`},[u.createElementVNode("linearGradient",{id:`rectGradient_pos_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[u.createElementVNode("stop",{offset:"0%","stop-color":i.color},null,8,lD),u.createElementVNode("stop",{offset:"62%","stop-color":`${a.shiftHue(i.color,.02)}DE`},null,8,cD),u.createElementVNode("stop",{offset:"100%","stop-color":`${a.shiftHue(i.color,.05)}66`},null,8,fD)],8,oD),u.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[u.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}66`},null,8,hD),u.createElementVNode("stop",{offset:"38%","stop-color":`${a.shiftHue(i.color,.02)}DE`},null,8,dD),u.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,gD)],8,uD)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.plotSet,(i,s)=>(u.openBlock(),u.createElementBlock("defs",{key:`def_plot_${s}`},[u.createElementVNode("radialGradient",{id:`plotGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[u.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}`},null,8,mD),u.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,vD)],8,pD)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.lineSet,(i,s)=>(u.openBlock(),u.createElementBlock("defs",{key:`def_line_${s}`},[u.createElementVNode("radialGradient",{id:`lineGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[u.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}`},null,8,BD),u.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,yD)],8,wD)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.barSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`serie_bar_${s}`,class:u.normalizeClass(`serie_bar_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`bar_plot_${s}_${l}`},[a.canShowValue(o.value)?(u.openBlock(),u.createElementBlock("rect",{key:0,x:a.calcRectX(o),y:a.calcRectY(o),height:a.calcRectHeight(o),width:a.calcRectWidth(),fill:a.chartConfig.bar.useGradient?o.value>=0?`url(#rectGradient_pos_${s}_${n.uniqueId})`:`url(#rectGradient_neg_${s}_${n.uniqueId})`:i.color},null,8,xD)):u.createCommentVNode("",!0)]))),128))],2))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.plotSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`serie_plot_${s}`,class:u.normalizeClass(`serie_plot_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`circle_plot_${s}_${l}`},[a.canShowValue(o.value)?(u.openBlock(),u.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:a.chartConfig.plot.radius,fill:a.chartConfig.plot.useGradient?`url(#plotGradient_${s}_${n.uniqueId})`:i.color,stroke:a.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,CD)):u.createCommentVNode("",!0)]))),128))],2))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.lineSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`serie_line_${s}`,class:u.normalizeClass(`serie_line_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`line_${s}_${l}`},[l<i.plots.length-1&&a.canShowValue(o.value)&&a.canShowValue(i.plots[l+1].value)?(u.openBlock(),u.createElementBlock("line",{key:0,x1:o.x,x2:i.plots[l+1].x,y1:o.y,y2:i.plots[l+1].y,stroke:i.color,"stroke-width":a.chartConfig.line.strokeWidth},null,8,bD)):u.createCommentVNode("",!0)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`circle_line_${s}_${l}`},[a.canShowValue(o.value)?(u.openBlock(),u.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:a.chartConfig.line.radius,fill:a.chartConfig.line.useGradient?`url(#lineGradient_${s}_${n.uniqueId})`:i.color,stroke:a.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,ED)):u.createCommentVNode("",!0)]))),128))],2))),128)),a.chartConfig.bar.labels.show&&n.mutableConfig.dataLabels.show?(u.openBlock(),u.createElementBlock("g",FD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.barSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_bar_${s}`,class:u.normalizeClass(`xLabel_bar_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_bar_${s}_${l}`},[u.createElementVNode("text",{x:o.x+a.calcRectWidth(),y:o.y+a.chartConfig.bar.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.bar.labels.color},u.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.bar.labels.rounding):""),9,SD)]))),128))],2))),128))])):u.createCommentVNode("",!0),a.chartConfig.plot.labels.show&&n.mutableConfig.dataLabels.show?(u.openBlock(),u.createElementBlock("g",_D,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.plotSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_plot_${s}`,class:u.normalizeClass(`xLabel_plot_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_plot_${s}_${l}`},[u.createElementVNode("text",{x:o.x,y:o.y+a.chartConfig.plot.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.plot.labels.color},u.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.plot.labels.rounding):""),9,TD)]))),128))],2))),128))])):u.createCommentVNode("",!0),a.chartConfig.line.labels.show&&n.mutableConfig.dataLabels.show?(u.openBlock(),u.createElementBlock("g",UD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.lineSet,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_line_${s}`,class:u.normalizeClass(`xLabel_line_${s}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.plots,(o,l)=>(u.openBlock(),u.createElementBlock("g",{key:`xLabel_line_${s}_${l}`},[u.createElementVNode("text",{x:o.x,y:o.y+a.chartConfig.line.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.line.labels.color},u.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.line.labels.rounding):""),9,ID)]))),128))],2))),128))])):u.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.show?(u.openBlock(),u.createElementBlock("g",ND,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.yLabels,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`yLabel_${s}`},[i.value>=a.min&&i.value<=a.max?(u.openBlock(),u.createElementBlock("line",{key:0,x1:a.drawingArea.left,x2:a.drawingArea.left-5,y1:i.y,y2:i.y,stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1"},null,8,LD)):u.createCommentVNode("",!0),i.value>=a.min&&i.value<=a.max?(u.openBlock(),u.createElementBlock("text",{key:1,x:a.drawingArea.left-5,y:i.y+a.chartConfig.chart.labels.fontSize/3,"font-size":a.chartConfig.chart.grid.labels.fontSize,"text-anchor":"end",fill:a.chartConfig.chart.grid.labels.color},u.toDisplayString(a.canShowValue(i.value)?i.value.toFixed(0):""),9,QD)):u.createCommentVNode("",!0)]))),128))])):u.createCommentVNode("",!0),u.createElementVNode("g",null,[a.chartConfig.chart.grid.labels.axis.yLabel?(u.openBlock(),u.createElementBlock("text",{key:0,"font-size":a.chartConfig.chart.grid.labels.axis.fontSize,fill:a.chartConfig.chart.grid.labels.color,id:"yAxisLabel","text-anchor":"middle",style:{transition:"none"}},u.toDisplayString(a.chartConfig.chart.grid.labels.axis.yLabel),9,kD)):u.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.axis.xLabel?(u.openBlock(),u.createElementBlock("text",{key:1,"text-anchor":"middle",x:a.chartConfig.chart.width/2,y:a.drawingArea.bottom+a.chartConfig.chart.grid.labels.axis.fontSize+a.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,"font-size":a.chartConfig.chart.grid.labels.axis.fontSize,fill:a.chartConfig.chart.grid.labels.color},u.toDisplayString(a.chartConfig.chart.grid.labels.axis.xLabel),9,OD)):u.createCommentVNode("",!0)]),a.chartConfig.chart.title.show&&n.mutableConfig.titleInside&&!n.isPrinting?(u.openBlock(),u.createElementBlock("g",DD,[(u.openBlock(),u.createElementBlock("foreignObject",PD,[u.createElementVNode("div",{class:"vue-ui-xy-title",style:u.normalizeStyle(`font-family:${a.chartConfig.chart.fontFamily}`)},[u.createElementVNode("div",{class:"vue-ui-xy-title-main",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.title.fontSize*.6}px; color:${a.chartConfig.chart.title.color}; font-weight:${a.chartConfig.chart.title.bold?"bold":"400"}`)},u.toDisplayString(a.chartConfig.chart.title.text),5),a.chartConfig.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.title.subtitle.fontSize*.6}px; color:${a.chartConfig.chart.title.subtitle.color}`)},u.toDisplayString(a.chartConfig.chart.title.subtitle.text),5)):u.createCommentVNode("",!0)],4)]))])):u.createCommentVNode("",!0),a.chartConfig.chart.legend.show&&n.mutableConfig.legendInside&&!n.isPrinting?(u.openBlock(),u.createElementBlock("g",MD,[(u.openBlock(),u.createElementBlock("foreignObject",{x:"0",y:a.drawingArea.bottom+a.chartConfig.chart.padding.bottom/3+12,width:"100%",height:"20px",style:u.normalizeStyle(`overflow:visible; font-size:${a.chartConfig.chart.legend.fontSize*.6}px`)},[u.createElementVNode("div",HD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.absoluteDataset,(i,s)=>(u.openBlock(),u.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>a.segregate(i),class:u.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(i.id)})},[["plot"].includes(i.type)?(u.openBlock(),u.createElementBlock("span",{key:0,style:u.normalizeStyle(`color:${i.color}`)},"●",4)):u.createCommentVNode("",!0),["line"].includes(i.type)?(u.openBlock(),u.createElementBlock("span",{key:1,style:u.normalizeStyle(`color:${i.color}`)},"▬",4)):u.createCommentVNode("",!0),["bar"].includes(i.type)?(u.openBlock(),u.createElementBlock("span",{key:2,style:u.normalizeStyle(`color:${i.color}`)},"◼",4)):u.createCommentVNode("",!0),u.createElementVNode("span",{style:u.normalizeStyle(`color:${a.chartConfig.chart.legend.color}`)},u.toDisplayString(i.name),5)],10,VD))),128))])],12,RD))])):u.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.xAxisLabels.show?(u.openBlock(),u.createElementBlock("g",KD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.maxSeries,(i,s)=>(u.openBlock(),u.createElementBlock("text",{key:`time_label_${s}`,"text-anchor":"middle",y:a.drawingArea.bottom+a.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,x:a.drawingArea.left+a.drawingArea.width/a.maxSeries*s+a.drawingArea.width/a.maxSeries/2,"font-size":a.chartConfig.chart.grid.labels.xAxisLabels.fontSize,fill:a.chartConfig.chart.grid.labels.xAxisLabels.color},u.toDisplayString(a.chartConfig.chart.grid.labels.xAxisLabels.values[s]||""),9,GD))),128))])):u.createCommentVNode("",!0),a.chartConfig.chart.tooltip.show?(u.openBlock(),u.createElementBlock("g",jD,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.maxSeries,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`tooltip_trap_${s}`},[u.createElementVNode("rect",{x:a.drawingArea.left+a.drawingArea.width/a.maxSeries*s,y:a.drawingArea.top,height:a.drawingArea.height,width:a.drawingArea.width/a.maxSeries,fill:n.selectedSerieIndex===s||n.selectedRowIndex===s?"rgba(0,0,0,0.03)":"transparent",onMouseenter:o=>a.toggleTooltip(!0,s),onMouseleave:e[6]||(e[6]=o=>a.toggleTooltip(!1))},null,40,zD)]))),128))])):u.createCommentVNode("",!0)],12,rD)),a.chartConfig.chart.legend.show&&(!n.mutableConfig.legendInside||n.isPrinting)?(u.openBlock(),u.createElementBlock("div",{key:2,class:"vue-ui-xy-legend",style:u.normalizeStyle(`font-size:${a.chartConfig.chart.legend.fontSize}px`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.absoluteDataset,(i,s)=>(u.openBlock(),u.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>a.segregate(i),class:u.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(i.id)})},[u.createElementVNode("span",{style:u.normalizeStyle(`color:${i.color}`),innerHTML:n.icons[i.type]},null,12,XD),u.createElementVNode("span",{style:u.normalizeStyle(`color:${a.chartConfig.chart.legend.color}`)},u.toDisplayString(i.name),5)],10,WD))),128))],4)):u.createCommentVNode("",!0),a.chartConfig.chart.tooltip.show&&n.isTooltip?(u.openBlock(),u.createElementBlock("div",{key:3,class:"vue-ui-xy-tooltip",ref:"tooltip",style:u.normalizeStyle(`top:${a.tooltipPosition.top}px;left:${a.tooltipPosition.left}px; background-color:${a.chartConfig.chart.tooltip.backgroundColor};color:${a.chartConfig.chart.tooltip.color}`),innerHTML:a.tooltipContent},null,12,qD)):u.createCommentVNode("",!0),a.chartConfig.showTable&&n.mutableConfig.showTable?(u.openBlock(),u.createElementBlock("div",{key:4,class:u.normalizeClass({"vue-ui-xy-table-wrapper":!0,"vue-ui-xy-table-wrapper-printing":n.isPrinting}),onClick:e[9]||(e[9]=(...i)=>a.closeDetails&&a.closeDetails(...i))},[u.createElementVNode("table",YD,[u.createElementVNode("thead",null,[u.createElementVNode("tr",null,[u.createElementVNode("th",{style:u.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},null,4),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.table.head,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`th_${s}`,style:u.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},[u.createElementVNode("div",$D,[u.createElementVNode("span",{style:u.normalizeStyle(`color:${i.color}; margin-right:3px`)},u.toDisplayString(n.icons[i.type]),5),u.createTextVNode(u.toDisplayString(i.label),1)])],4))),128))]),u.createElementVNode("tr",null,[u.createElementVNode("th",{align:"right",style:u.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},JD,4),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.table.head,(i,s)=>(u.openBlock(),u.createElementBlock("th",{align:"right",key:`th_sum_${s}`,style:u.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color};padding-right:6px`)},u.toDisplayString(a.relativeDataset[s].absoluteValues.reduce((o,l)=>o+l,0).toFixed(a.chartConfig.table.rounding)),5))),128))])]),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.table.body,(i,s)=>(u.openBlock(),u.createElementBlock("tr",{key:`tr_${s}`,class:u.normalizeClass({"vue-ui-xy-table-tr-selected":n.selectedSerieIndex===s||n.selectedRowIndex===s}),onMouseover:o=>n.selectedRowIndex=s,onMouseleave:e[8]||(e[8]=o=>n.selectedRowIndex=null)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i,(o,l)=>(u.openBlock(),u.createElementBlock("td",{key:`td_${s}_${l}`,style:u.normalizeStyle(`background:${a.chartConfig.table.td.backgroundColor};color:${a.chartConfig.table.td.color};padding-right:6px;`)},u.toDisplayString(o),5))),128))],42,ZD))),128))])])],2)):u.createCommentVNode("",!0)],4)}const tP=b1(PO,[["render",eP],["__scopeId","data-v-a0dbf99b"]]),IJ="",rP={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,defaultConfig:{fontFamily:"inherit",maxHeight:500,rowsPerPage:25,style:{th:{backgroundColor:"#E1E5E8",color:"#2D353C",outline:"1px solid #FFFFFF",selected:{backgroundColor:"#6376DD",color:"#FFFFFF"}},rows:{even:{backgroundColor:"#f3f5f7",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}},odd:{backgroundColor:"#FFFFFF",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}}},inputs:{backgroundColor:"#FFFFFF",color:"#2D353C",border:"1px solid #CCCCCC",accentColor:"#6376DD"},dropdowns:{backgroundColor:"#E1E5E8",color:"#2D353C",icons:{selected:{color:"#008000",unicode:"✔"},unselected:{color:"#ff0000",unicode:"✖"}}},infoBar:{backgroundColor:"#E1E5E8",color:"#2D353C"},pagination:{buttons:{backgroundColor:"#E1E5E8",color:"#2D353C",opacityDisabled:.5},navigationIndicator:{backgroundColor:"#6376DD"}},exportMenu:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{backgroundColor:"#FAFAFA",color:"#2D353C"}},closeButtons:{backgroundColor:"transparent",color:"#2D353C",borderRadius:"50%"},chart:{modal:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{selected:{backgroundColor:"#6376DD",color:"#FFFFFF"},unselected:{backgroundColor:"#FFFFFF",color:"#2D353C"}}},layout:{backgroundColor:"#FFFFFF",axis:{stroke:"#ccd1d4",strokeWidth:2},bar:{fill:"",stroke:"#FFFFFF"},line:{stroke:"#6376DD75",strokeWidth:4,plot:{fill:"#22348f",stroke:"#FFFFFF",strokeWidth:1,radius:{selected:6,unselected:4}},selector:{stroke:"#ccc",strokeWidth:1,strokeDasharray:5}},labels:{color:"#2D353C"},progression:{stroke:"#2D353C",strokeWidth:2,strokeDasharray:4,arrowSize:7}}}},translations:{average:"Average",by:"by",chooseCategoryColumn:"Choose category column",exportAllButton:"XLSX all",exportAllLabel:"Export all rows of your current filtered dataset",exportPageButton:"XLSX page",exportPageLabel:"Export rows of the current page",from:"From",inputPlaceholder:"Search...",makeDonut:"Generate",nb:"Nb",page:"Page",paginatorLabel:"Rows per page",sizeWarning:"Displaying too many rows at a time can lead to slower performance",sum:"Somme",to:"To",total:"Total",totalRows:"Total rows"},useChart:!0},bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((e,r)=>e-r),palette:Ui,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(e=>({average:Object.hasOwn(e,"average")?e.average:!1,decimals:Object.hasOwn(e,"decimals")?e.decimals:0,isMultiselect:Object.hasOwn(e,"isMultiselect")?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,"isPercentage")?e.isPercentage:!1,isSearch:Object.hasOwn(e,"isSearch")?e.isSearch:!1,isSort:Object.hasOwn(e,"isSort")?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,"percentageTo")?e.percentageTo:void 0,prefix:Object.hasOwn(e,"prefix")?e.prefix:"",rangeFilter:Object.hasOwn(e,"rangeFilter")?e.rangeFilter:!1,suffix:Object.hasOwn(e,"suffix")?e.suffix:"",sum:Object.hasOwn(e,"sum")?e.sum:!1,type:e.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
|
|
361
361
|
Provide an array of objects of type:
|
|
362
362
|
{
|
|
363
363
|
name: string;
|
|
@@ -370,7 +370,7 @@ Provide an array of objects of type:
|
|
|
370
370
|
isMultiselect: boolean;
|
|
371
371
|
isPercentage: boolean;
|
|
372
372
|
percentageTo: string; (or '')
|
|
373
|
-
}`);if(this.dataset.body.length===0)throw new Error("vue-ui-table error: missing body data");this.isLoading=!0,this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.isLoading=!1}),document.addEventListener("keydown",t=>{const e=document.activeElement;(e&&Array.from(e.classList).includes("td-focusable")&&t.key.includes("Arrow")||t.code==="Space")&&t.preventDefault()})},watch:{showChart:function(t){t&&this.$nextTick(()=>{this.closeDragElement();const e=this.$refs.chartModal;e.onmousedown=this.dragMouseDown})}},computed:{availableDonutCategories(){return Object.keys(this.multiselects).map(t=>({index:t,name:this.dataset.header[t].name,options:this.multiselects[t]}))},canChart(){return this.tableConfig.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const t=316,e=512,r=this.currentSelectionSpan.rows.length,A=e/r,n=Math.max(...this.currentSelectionSpan.rows.map(g=>g.value)),a=Math.min(...this.currentSelectionSpan.rows.map(g=>g.value)),i=a>=0?0:Math.abs(a),s=n+i,o=n<0&&a<0,l=this.dataset.header[this.currentSelectionSpan.col].isPercentage,c=this.currentSelectionSpan.rows.map((g,h)=>({x:A*h+A/2,y:(1-(g.value+i)/s)*t,value:l?g.value*100:g.value,suffix:l?"%":this.dataset.header[this.currentSelectionSpan.col].suffix?this.dataset.header[this.currentSelectionSpan.col].suffix:"",prefix:this.dataset.header[this.currentSelectionSpan.col].prefix?this.dataset.header[this.currentSelectionSpan.col].prefix:"",index:g.index,absoluteValue:l?Math.abs(g.value)*100:Math.abs(g.value)})),d=t-t*(i/s);return{isAllNegative:o,zero:d,plots:c,slot:A,progression:c.length>=2?this.calcChartProgression(c):!1}},donutHollowLabels(){return{total:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),average:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},hasNumericTypes(){return this.dataset.header.map(t=>t.type).includes(this.constants.NUMERIC)},icons(){return{arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`}},pages(){const t=[];if(this.bodyCopy.length)for(let e=0;e<this.bodyCopy.length;e+=this.itemsPerPage)t.push(this.bodyCopy.slice(e,e+this.itemsPerPage));return t},rows(){return this.bodyCopy.map(t=>t.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},tableConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},visibleRows(){return this.pages[this.currentPage]}},methods:{treeShake:Mu,makeDonut:jy,applyDonutOption(){const t=this.selectedDonutCategory.options.map((e,r)=>({name:e,color:this.palette[r]||this.palette[r%this.palette.length],value:this.visibleRows.filter((A,n)=>A.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(n)).map(A=>A.td[this.currentSelectionSpan.col]).reduce((A,n)=>Math.abs(A)+Math.abs(n),0),absoluteValue:this.visibleRows.filter((A,n)=>A.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(n)).map(A=>A.td[this.currentSelectionSpan.col]).reduce((A,n)=>A+n,0)})).sort((e,r)=>r.value-e.value);this.currentDonut=this.makeDonut({series:t},50,50,30,30),this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(t,e){return t>=0?e:this.chartData.zero},canResetColumn(t,e){return!this.hasNaN[t]&&(e.isSort||e.isSearch||e.isMultiselect||e.rangeFilter)&&![this.constants.DATE].includes(e.type)},createXls(t="all"){const e=this.dataset.header.map(c=>c.name),r=t==="all"?this.bodyCopy.map(c=>c.td):this.visibleRows.map(c=>c.td),A=[e].concat(r);function n(c){let d=new ArrayBuffer(c.length),g=new Uint8Array(d);for(let h=0;h<c.length;h++)g[h]=c.charCodeAt(h)&255;return d}const a=Ga.book_new(),i=Ga.aoa_to_sheet(A);Ga.book_append_sheet(a,i,"Sheet1");const s=Du(a,{bookType:"xlsx",type:"binary"}),o=new Blob([n(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=document.createElement("a");l.href=window.URL.createObjectURL(o),l.download="data.xlsx",l.click(),window.URL.revokeObjectURL(l.href),this.isExportRequest=!1},calcChartProgression(t){let e,r,A,n;const a=t.length;let i=0,s=0,o=0,l=0;for(const{x:g,y:h}of t)i+=g,s+=h,o+=g*h,l+=g*g;const c=(a*o-i*s)/(a*l-i*i),d=(s-c*i)/a;return e=t[0].x,A=t[a-1].x,r=c*e+d,n=c*A+d,{x1:e,y1:r,x2:A,y2:n,slope:c}},closeAllDropdowns(){const t=document.getElementsByClassName("th-dropdown");t.length&&Array.from(t).forEach(e=>{e.dataset.isOpen=!1})},debounce(t,e){let r;clearTimeout(r),r=setTimeout(t,e)},filterBody(){this.bodyCopy=this.tableBody.filter(t=>{for(const e in this.searches)if(!t.td[e].toUpperCase().includes(this.searches[e].toUpperCase()))return!1;for(const e in this.multiselects)if(!this.multiselects[e].some(A=>A===t.td[e]))return!1;for(const e in this.dates){const r=new Date(t.td[e]),A=new Date(this.dates[e].from),n=new Date(this.dates[e].to);if(r<A||r>n)return!1}return!0}),this.sortBody()},getAverage(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)/this.bodyCopy.length},getDatesRange(t){const e=this.dataset.body.map(g=>new Date(g.td[t])),r=new Date(Math.min(...e)),A=new Date(Math.max(...e)),n=r.getFullYear(),a=A.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),s=String(A.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0"),l=String(A.getDate()).padStart(2,"0"),c=`${n}-${i}-${o}`,d=`${a}-${s}-${l}`;return{from:c,to:d}},getDonutLegendValue(t){return Number((t*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(t){return[...new Set(this.dataset.body.map(e=>e.td[t]))]},getSum(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)},includesNaN(t){return t.includes(NaN)},isDropdownOptionSelected(t,e){return this.multiselects[e]?this.multiselects[e].includes(t):!0},isNumeric(t){return!isNaN(Number(String(t).replaceAll("%","")))},isResetDisabled(t,e){const r=e.isSort,A=e.isSearch,n=e.isMultiselect&&this.multiselects[t],a=e.rangeFilter,i=s=>{if(a&&this.rangeFilters[s])return Math.round(this.rangeFilters[s].min)===this.immutableRangeFilters[s].min&&Math.round(this.rangeFilters[s].max)===this.immutableRangeFilters[s].max};if(r&&A&&n&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&A&&n)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(r&&A&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&i(t);if(r&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t]);if(r&&n&&a)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&n)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(A&&n&&a)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(A&&n)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(A&&a)return["",void 0].includes(this.searches[t])&&i(t);if(A)return["",void 0].includes(this.searches[t]);if(r&&a)return[void 0].includes(this.sorts[t])&&i(t);if(r)return[void 0].includes(this.sorts[t]);if(n&&a)return this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(n)return this.multiselects[t].length===this.getDropdownOptions(t).length},navigate(t){this.resetSelection(),t==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:t==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=t-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(t){t.preventDefault();const e=t.keyCode,r=38,A=40,n=37,a=39;if(![r,A,n,a].includes(e))return;const i=t.target.id,s=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,o=i.match(s),l=parseInt(o[1]),c=parseInt(o[2]),d=document.getElementById(`cell_${l}_${c+1}_${this.uid}`),g=document.getElementById(`cell_${l}_${c-1}_${this.uid}`),h=document.getElementById(`cell_${l+1}_${c}_${this.uid}`),m=document.getElementById(`cell_${l-1}_${c}_${this.uid}`);let v;switch(!0){case e===a:v=d;break;case e===n:v=g;break;case e===r:v=m;break;case e===A:v=h;break;default:return}v&&(v.focus(),v.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:t,currentPlot:e,nextPlot:r}){const A=e.y-38,n=e.y+16;return t&&r?t.value<e.value&&r.value<e.value?A:t.value>e.value&&r.value>e.value?n:(t.value>e.value&&r.value<e.value||t.value<e.value&&r.value>e.value,A):t&&!r?t.value>e.value?n:A:!t&&r&&r.value>e.value?n:A},async prepareBodyCopy(){return new Promise(t=>{const e=[];this.tableHead.forEach((r,A)=>{if(r.isSearch&&Object.assign(this.searches,{[A]:""}),r.isMultiselect&&Object.assign(this.multiselects,{[A]:this.getDropdownOptions(A)}),r.type===this.constants.DATE&&(Object.assign(this.dates,{[A]:this.getDatesRange(A)}),Object.assign(this.filteredDatesIndexes,{[A]:!1})),(r.isPercentage||r.percentageTo)&&Object.assign(this.percentages,{[A]:{reference:r.percentageTo,referenceIndex:this.dataset.header.map(n=>n.name).indexOf(r.percentageTo)}}),r.rangeFilter&&(Object.assign(this.rangeFilters,{[A]:{min:Math.round(Math.min(...this.dataset.body.map(n=>n.td).map(n=>n[A]))),max:Math.round(Math.max(...this.dataset.body.map(n=>n.td).map(n=>n[A])))}}),Object.assign(this.immutableRangeFilters,{[A]:{min:Math.round(Math.min(...this.dataset.body.map(n=>n.td).map(n=>n[A]))),max:Math.round(Math.max(...this.dataset.body.map(n=>n.td).map(n=>n[A])))}})),r.isPercentage){const n=this.dataset.header.map(i=>i.name).indexOf(r.percentageTo),a=this.dataset.body.map(i=>i.td[n]).reduce((i,s)=>i+s,0);e.push([A,n,a])}r.type===this.constants.NUMERIC&&!r.isPercentage&&Object.assign(this.hasNaN,{[A]:this.includesNaN(this.dataset.body.map(n=>Number(n.td[A])))})}),this.bodyCopy.forEach((r,A)=>{e.map(n=>{const[a,i,s]=n;r.td[a]=r.td[i]/s}),r.td.forEach((n,a)=>{this.dataset.header[a].type===this.constants.TEXT&&this.dataset.header[a].isSearch&&(r[a]=this.stringToNumber(n)),this.dataset.header[a].type===this.constants.DATE&&(r[a]=new Date(n).getTime()),this.dataset.header[a].type===this.constants.NUMERIC&&(r[a]=isNaN(Number(n))?a:n),this.tableBody[A][a]=r[a]})}),t(!0)})},promiseWithAsyncFunction(t,e){return new Promise((r,A)=>{t().then(n=>{try{const a=e(n);r(a)}catch(a){A(a)}}).catch(n=>{A(n)})})},resetDates(t){this.dates[t]={from:this.getDatesRange(t).from,to:this.getDatesRange(t).to},this.filteredDatesIndexes[t]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(t,e,r){const A=r.currentTarget;clearTimeout(this.buttonTimeout),A.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{A.classList.remove("clicked")},200),this.currentFilter=void 0,e.rangeFilter&&(this.rangeFilters[t].min=this.immutableRangeFilters[t].min,this.rangeFilters[t].max=this.immutableRangeFilters[t].max),e.isMultiselect?(this.multiselects[t]=this.getDropdownOptions(t),e.type===this.constants.TEXT&&(this.sorts[t]=void 0),e.isSearch&&(this.searches[t]="")):e.type===this.constants.NUMERIC?this.sorts[t]=void 0:e.type===this.constants.TEXT?(this.sorts[t]=void 0,this.searches[t]=""):e.type===this.constants.DATE&&(this.sorts[t]=void 0),this.filterBody()},resetSelection(){const t=document.getElementsByClassName(`tr_${this.uid}`);Array.from(t).forEach(e=>{Array.from(e.getElementsByTagName("td")).forEach(r=>{r.dataset.row==="even"?(r.style.background=this.tableConfig.style.rows.even.backgroundColor,r.style.color=this.tableConfig.style.rows.even.color):(r.style.background=this.tableConfig.style.rows.odd.backgroundColor,r.style.color=this.tableConfig.style.rows.odd.color)})}),Array.from(t).forEach(e=>e.dataset.selected="false"),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),this.showChart=!1,this.currentDonut=void 0,this.selectedColumn=void 0,this.chart.type=this.constants.BAR,this.currentSelectionSpan={col:void 0,rows:[]},this.clientX=100,this.clientY=100},selectColumn(t){this.currentSelectionSpan.col!==t?(this.visibleRows.forEach((e,r)=>{this.selectTd({td:e.td[t],rowIndex:r,colIndex:t,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${r}_${t}_${this.uid}`)}})}),this.selectedColumn=t):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(t,e){this.multiselects[e].includes(t)?this.multiselects[e]=this.multiselects[e].filter(r=>r!==t):this.multiselects[e].push(t),this.$forceUpdate(),this.filterBody()},selectTd({td:t,rowIndex:e,colIndex:r,headerType:A,event:n}){if(A!==this.constants.NUMERIC||isNaN(Number(t))){this.resetSelection();return}this.currentSelectionSpan.col!==r&&this.resetSelection();const a=n.currentTarget.parentNode;this.currentSelectionSpan.col=r,this.currentSelectionSpan.rows.map(i=>i.index).includes(e)?(a.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(i=>i.index!==e),n.currentTarget.classList.remove(this.cssClass.CELL),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.backgroundColor,i.style.color=this.tableConfig.style.rows.even.olor):(i.style.background=this.tableConfig.style.rows.odd.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.color)}),n.currentTarget.dataset.row==="even"?(n.currentTarget.style.background=this.tableConfig.style.rows.even.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.even.color):(n.currentTarget.style.background=this.tableConfig.style.rows.odd.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.odd.color)):(a.dataset.selected="true",this.currentSelectionSpan.rows.push({index:e,value:t}),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.even.selectedNeighbors.color):(i.style.background=this.tableConfig.style.rows.odd.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.selectedNeighbors.color)}),n.currentTarget.dataset.row==="odd"?(n.currentTarget.style.background=this.tableConfig.style.rows.odd.selectedCell.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.odd.selectedCell.color):(n.currentTarget.style.background=this.tableConfig.style.rows.even.selectedCell.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((i,s)=>i.index-s.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(t){this.filteredDatesIndexes[t]=!(this.getDatesRange(t).from===this.dates[t].from&&this.getDatesRange(t).to===this.dates[t].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(t=>{this.filterByRange(this.bodyCopy,t)}),Object.keys(this.sorts).forEach(t=>{this.sortByNumber(this.bodyCopy,t)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((t,e)=>{if(t.isPercentage){const r=this.percentages[e].referenceIndex,A=this.bodyCopy.map(n=>n.td[r]).reduce((n,a)=>n+a,0);this.bodyCopy.forEach(n=>{n.td[e]=n.td[r]/A})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(t,e){this.bodyCopy=t.filter(r=>r.td[e]>=this.rangeFilters[e].min&&r[e]<=this.rangeFilters[e].max)},sortByNumber(t,e){if(this.sorts[e]===this.constants.ASC&&(t=t.sort((r,A)=>r[e]-A[e])),this.sorts[e]===this.constants.DESC)t=t.sort((r,A)=>A[e]-r[e]);else return 0},sortTh(t,e){this.currentFilter=t;const r=e.currentTarget;clearTimeout(this.buttonTimeout),r.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{r.classList.remove("clicked")},200),this.sorts[t]===1?this.sorts[t]=this.constants.DESC:this.sorts[t]=this.constants.ASC,this.sortBody()},stringToNumber(t){let e=0;for(let r=0;r<t.length;r+=1)e+=t.charCodeAt(r);return e},toggleMultiselect(t,e,r){const A=r.currentTarget;clearTimeout(this.buttonTimeout),A.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{A.classList.remove("clicked")},200);const n=document.getElementById(`th_dropdown_${t}`);n.dataset.isOpen==="false"?n.dataset.isOpen="true":n.dataset.isOpen="false"},updateCurrentPage(t){this.resetSelection(),this.currentPage=Number(t.target.value)},calcDonutMarkerConnectorColor(t){return t.proportion*100>3?t.color:"transparent"},calcDonutMarkerLabelPositionX(t){return t.center.endX+this.calcMarkerOffset(t,50)},calcMarkerOffset(t,e){return t.center.endX-e>=0?3:-2},displayArcPercentage(t,e){return isNaN(t.value/this.sumValues(e))?0:(t.value/this.sumValues(e)*100).toFixed(0)+"%"},isArcBigEnough(t){return t.proportion*100>3},sumValues(t){return[...t].map(e=>e.value).reduce((e,r)=>e+r,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(t){t=t||window.event,t.preventDefault(),document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(t){this.rafId||(this.rafId=window.requestAnimationFrame(()=>this.onElementDrag(t)))},onElementDrag(t){t=t||window.event,t.preventDefault();const r=this.$refs.chartModal.getBoundingClientRect();this.clientX=t.clientX-r.width/2,this.clientY=t.clientY-r.height/2,this.rafId=null}}},zn=t=>(u.pushScopeId("data-v-80d709a0"),t=t(),u.popScopeId(),t),AP={class:"vue-ui-table-export-hub"},nP=["innerHTML"],aP=["data-is-open"],iP=zn(()=>u.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),sP={class:"vue-ui-table-export-hub-options"},oP={class:"vue-ui-table-export-hub-option-wrapper"},lP={class:"label"},cP=["innerHTML"],fP={class:"vue-ui-table-export-hub-option-wrapper"},uP={class:"label"},hP=["innerHTML"],dP={class:"vue-ui-table"},gP={id:"tableHead"},pP=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),mP={key:0},vP={key:0},wP={key:1},BP=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),yP={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},xP=["innerHTML"],CP={key:0,style:{"margin-left":"3px"}},bP=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),EP={key:0},FP=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),SP={class:"th-filter"},_P={key:0,class:"th-date"},TP={class:"date-wrapper--inputs"},UP={class:"date-fieldset"},IP=["for"],NP=["id","onUpdate:modelValue","onInput"],LP={class:"date-fieldset"},QP=["for"],kP=["id","onUpdate:modelValue","onInput"],OP={class:"date-wrapper--button"},DP=["onClick"],PP=["innerHTML"],MP=["innerHTML"],RP=["innerHTML"],HP=["onClick","disabled"],VP=["placeholder","onUpdate:modelValue","name"],KP=["onClick"],GP=["innerHTML"],jP=["innerHTML"],zP=["innerHTML"],WP=["onClick","innerHTML"],XP=["innerHTML"],qP={key:5,class:"th-range-filter"},YP=["for"],$P=zn(()=>u.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1)),JP=zn(()=>u.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)),ZP=["id","max","min","onUpdate:modelValue"],e7=["id","max","min","onUpdate:modelValue"],t7=["for"],r7=zn(()=>u.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1)),A7=zn(()=>u.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)),n7=["onClick","disabled"],a7=["id"],i7=["onClick"],s7=["onClick","onKeyup"],o7=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),l7=["innerHTML","onClick","onKeyup"],c7=["data-row"],f7=["data-row"],u7=["data-row","onClick","onKeyup","id"],h7=["innerHTML"],d7={key:1},g7={key:2},p7={key:5},m7=["innerHTML"],v7={key:0},w7={style:{"margin-left":"12px"}},B7={class:"format-num"},y7={style:{"margin-left":"12px"}},x7={key:0,class:"format-num"},C7={key:1,class:"format-num"},b7={key:2},E7={style:{"margin-left":"12px"}},F7={key:0,class:"format-num"},S7={key:1,class:"format-num"},_7={key:2},T7={key:0,class:"vue-ui-table-paginator format-num"},U7={key:1,class:"vue-ui-table-size-warning"},I7=["innerHTML"],N7={key:3,class:"vue-ui-table-pagination format-num"},L7=["innerHTML","disabled"],Q7=["disabled"],k7={key:0,class:"vue-ui-table-page-scroller-wrapper"},O7={for:"pageScroller",style:{"font-size":"14px"}},D7=["max","value"],P7={key:1},M7=["disabled"],R7=["innerHTML","disabled"],H7={class:"chart-modal-options"},V7=["innerHTML"],K7=["innerHTML"],G7=["innerHTML"],j7={style:{"margin-bottom":"12px"}},z7={key:0},W7={key:1},X7={style:{width:"100%",height:"fit-content",cursor:"move"},ref:"chartModal"},q7={class:"vue-ui-table-fieldset"},Y7={class:"vue-ui-table-fieldset-wrapper"},$7=["name","id","checked","onInput"],J7=["for"],Z7=["disabled"],eM=["innerHTML"],tM=["viewBox"],rM=["markerWidth","markerHeight","refY"],AM=["points","fill"],nM=["x2","y1","y2","stroke","stroke-width"],aM=["y2","stroke","stroke-width"],iM=["x","width","height","fill"],sM=u.createStaticVNode('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD80" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD80" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DDB3" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD66" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD66" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DDB3" data-v-80d709a0></stop></linearGradient>',4),oM=["x","y","height","width","fill","stroke"],lM=["x","y","width"],cM=["x1","y1","x2","y2","stroke-width","stroke"],fM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],uM=["cx","cy","r","fill","stroke","stroke-width"],hM=["x","y","width"],dM=["x","width","height","onMouseenter"],gM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],pM=zn(()=>u.createElementVNode("span",null,"---",-1)),mM=["d","stroke"],vM=["x","y"],wM={class:"vue-ui-table-donut-label-name"},BM=["fill"],yM=["fill"],xM=["fill"],CM=["fill"],bM={class:"vue-ui-table-donut-legend"};function EM(t,e,r,A,n,a){return u.openBlock(),u.createElementBlock("div",{class:"vue-ui-table-main",style:u.normalizeStyle(`font-family: ${a.tableConfig.fontFamily}`)},[u.createElementVNode("div",AP,[u.createElementVNode("button",{onClick:e[0]||(e[0]=i=>n.isExportRequest=!n.isExportRequest),innerHTML:a.icons.export,style:u.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},null,12,nP),u.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":n.isExportRequest||"false",style:u.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},[iP,u.createElementVNode("button",{class:"close-dropdown",onClick:e[1]||(e[1]=i=>n.isExportRequest=!1),style:u.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),u.createElementVNode("div",sP,[u.createElementVNode("div",oP,[u.createElementVNode("div",lP,u.toDisplayString(a.tableConfig.translations.exportAllLabel)+" ("+u.toDisplayString(n.bodyCopy.length)+") ",1),u.createElementVNode("button",{id:"exportAll",onClick:e[2]||(e[2]=i=>a.createXls("all")),style:u.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[u.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,cP),u.createElementVNode("span",null,u.toDisplayString(a.tableConfig.translations.exportAllButton),1)],4)]),u.createElementVNode("div",fP,[u.createElementVNode("div",uP,u.toDisplayString(a.tableConfig.translations.exportPageLabel),1),u.createElementVNode("button",{id:"exportPage",onClick:e[3]||(e[3]=i=>a.createXls("page")),style:u.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[u.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,hP),u.createElementVNode("span",null,u.toDisplayString(a.tableConfig.translations.exportPageButton),1)],4)])])],12,aP)]),u.createElementVNode("div",{class:"vue-ui-table__wrapper",style:u.normalizeStyle(`max-height:${a.tableConfig.maxHeight}px`),ref:"tableWrapper"},[u.createElementVNode("table",dP,[u.createElementVNode("thead",gP,[u.createElementVNode("tr",null,[pP,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`thead_${s}`,style:u.normalizeStyle(`overflow: visible;background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`),class:u.normalizeClass({"th-has-nan":n.hasNaN[s]})},[a.hasNumericTypes&&([n.constants.TEXT,n.constants.DATE].includes(i.type)||i.isPercentage)?(u.openBlock(),u.createElementBlock("span",mP,[u.createTextVNode(u.toDisplayString(i.name)+" ",1),i.isPercentage?(u.openBlock(),u.createElementBlock("span",vP," / "+u.toDisplayString(i.percentageTo),1)):u.createCommentVNode("",!0)])):(u.openBlock(),u.createElementBlock("span",wP,u.toDisplayString(i.name),1))],6))),128))]),a.hasNumericTypes?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createElementVNode("tr",null,[BP,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`thead_${s}`,class:u.normalizeClass({"th-numeric":!0,"th-has-nan":n.hasNaN[s]}),style:u.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.sum&&!n.hasNaN[s]?(u.openBlock(),u.createElementBlock("span",yP,[u.createElementVNode("span",{innerHTML:a.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,xP),u.createTextVNode(" "+u.toDisplayString(i.prefix)+" "+u.toDisplayString(Number(a.getSum(s).toFixed(i.decimals)).toLocaleString())+" "+u.toDisplayString(i.suffix)+" ",1),n.percentages[s]&&i.percentageTo&&!i.isPercentage?(u.openBlock(),u.createElementBlock("span",CP," ("+u.toDisplayString(isNaN(a.getSum(s)/a.getSum(n.percentages[s].referenceIndex))?"-":(a.getSum(s)/a.getSum(n.percentages[s].referenceIndex)*100).toFixed(i.decimals))+"%) ",1)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],6))),128))]),u.createElementVNode("tr",null,[bP,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`thead_${s}`,class:u.normalizeClass({"th-numeric":!0,"th-has-nan":n.hasNaN[s]}),style:u.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.average&&!n.hasNaN[s]?(u.openBlock(),u.createElementBlock("span",EP," ~ "+u.toDisplayString(i.prefix)+" "+u.toDisplayString(isNaN(a.getAverage(s))?"":Number(a.getAverage(s).toFixed(i.decimals)).toLocaleString())+" "+u.toDisplayString(i.suffix),1)):u.createCommentVNode("",!0)],6))),128))]),u.createElementVNode("tr",null,[FP,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`thead_${s}`,class:u.normalizeClass({"th-has-nan":n.hasNaN[s]}),style:u.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[u.createElementVNode("div",SP,[i.type===n.constants.DATE&&n.dates[s]?(u.openBlock(),u.createElementBlock("div",_P,[u.createElementVNode("div",TP,[u.createElementVNode("div",UP,[u.createElementVNode("label",{for:`from_${s}`},u.toDisplayString(a.tableConfig.translations.from),9,IP),u.withDirectives(u.createElementVNode("input",{id:`from_${s}`,type:"date","onUpdate:modelValue":o=>n.dates[s].from=o,onInput:o=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,NP),[[u.vModelText,n.dates[s].from]])]),u.createElementVNode("div",LP,[u.createElementVNode("label",{for:`to_${s}`},u.toDisplayString(a.tableConfig.translations.to),9,QP),u.withDirectives(u.createElementVNode("input",{id:`to_${s}`,type:"date","onUpdate:modelValue":o=>n.dates[s].to=o,onInput:o=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,kP),[[u.vModelText,n.dates[s].to]])])]),u.createElementVNode("div",OP,[i.isSort?(u.openBlock(),u.createElementBlock("button",{key:0,onClick:o=>a.sortTh(s,o),class:u.normalizeClass({"th-button-active":[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])}),style:u.normalizeStyle(`background:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[n.sorts[s]===n.constants.ASC?(u.openBlock(),u.createElementBlock("span",{key:0,innerHTML:[n.constants.DATE].includes(i.type)?a.icons.sort09:a.icons.sortAZ},null,8,PP)):n.sorts[s]===n.constants.DESC?(u.openBlock(),u.createElementBlock("span",{key:1,innerHTML:[n.constants.DATE].includes(i.type)?a.icons.sort90:a.icons.sortZA},null,8,MP)):(u.openBlock(),u.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,RP))],14,DP)):u.createCommentVNode("",!0),u.createElementVNode("button",{onClick:o=>{a.resetDates(s),a.resetFilter(s,i,o)},disabled:!n.filteredDatesIndexes[s]&&a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,HP)])])):u.createCommentVNode("",!0),i.isSearch?u.withDirectives((u.openBlock(),u.createElementBlock("input",{key:1,placeholder:a.tableConfig.translations.inputPlaceholder,"onUpdate:modelValue":o=>n.searches[s]=o,onInput:e[4]||(e[4]=o=>a.debounce(a.filterBody,400)),name:`search_${s}`,style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,VP)),[[u.vModelText,n.searches[s]]]):u.createCommentVNode("",!0),!n.hasNaN[s]&&i.isSort&&i.type!==n.constants.DATE?(u.openBlock(),u.createElementBlock("button",{key:2,onClick:o=>a.sortTh(s,o),class:u.normalizeClass({"th-button-active":[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])}),style:u.normalizeStyle(`background:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[n.sorts[s]===n.constants.ASC?(u.openBlock(),u.createElementBlock("span",{key:0,innerHTML:[n.constants.NUMERIC].includes(i.type)?a.icons.sort09:a.icons.sortZA},null,8,GP)):n.sorts[s]===n.constants.DESC?(u.openBlock(),u.createElementBlock("span",{key:1,innerHTML:[n.constants.NUMERIC].includes(i.type)?a.icons.sort90:a.icons.sortAZ},null,8,jP)):(u.openBlock(),u.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,zP))],14,KP)):u.createCommentVNode("",!0),i.isMultiselect?(u.openBlock(),u.createElementBlock("button",{key:3,onClick:o=>a.toggleMultiselect(s,i,o),innerHTML:a.icons.filter,class:u.normalizeClass({"th-button-active":n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length}),style:u.normalizeStyle(`background:${n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,WP)):u.createCommentVNode("",!0),n.currentSelectionSpan.col===s&&a.canChart?(u.openBlock(),u.createElementBlock("button",{key:4,onClick:e[5]||(e[5]=o=>n.showChart=!n.showChart),innerHTML:a.icons.chart,class:u.normalizeClass({"th-button-active":n.showChart}),style:u.normalizeStyle(`background:${n.showChart?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${n.showChart?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,XP)):u.createCommentVNode("",!0),i.rangeFilter&&n.rangeFilters[s]&&!n.hasNaN[s]?(u.openBlock(),u.createElementBlock("div",qP,[u.createElementVNode("label",{for:`rangeMin${s}`},[$P,u.createTextVNode(" min "),JP],8,YP),u.withDirectives(u.createElementVNode("input",{type:"number",id:`rangeMin${s}`,max:n.immutableRangeFilters[s].max,min:n.immutableRangeFilters[s].min,"onUpdate:modelValue":o=>n.rangeFilters[s].min=o,onInput:e[6]||(e[6]=o=>a.debounce(a.filterBody,400)),style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,ZP),[[u.vModelText,n.rangeFilters[s].min,void 0,{number:!0}]]),u.withDirectives(u.createElementVNode("input",{type:"number",id:`rangeMax${s}`,max:n.immutableRangeFilters[s].max,min:n.immutableRangeFilters[s].min,"onUpdate:modelValue":o=>n.rangeFilters[s].max=o,onInput:e[7]||(e[7]=o=>a.debounce(a.filterBody,400)),style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,e7),[[u.vModelText,n.rangeFilters[s].max,void 0,{number:!0}]]),u.createElementVNode("label",{for:`rangeMax${s}`},[r7,u.createTextVNode(" max "),A7],8,t7)])):u.createCommentVNode("",!0),a.canResetColumn(s,i)?(u.openBlock(),u.createElementBlock("button",{key:6,onClick:o=>a.resetFilter(s,i,o),disabled:a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,n7)):u.createCommentVNode("",!0),i.isMultiselect?(u.openBlock(),u.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${s}`,style:u.normalizeStyle(`background:${a.tableConfig.style.dropdowns.backgroundColor};color:${a.tableConfig.style.dropdowns.color}`)},[u.createElementVNode("button",{class:"close-dropdown",onClick:o=>a.toggleMultiselect(s,i,o),style:u.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color}`)}," ✖ ",12,i7),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.getDropdownOptions(s),(o,l)=>(u.openBlock(),u.createElementBlock("span",{class:"th-option",key:`th_option_${s}_${l}`,onClick:c=>a.selectDropdownOption(o,s),onKeyup:[u.withKeys(c=>a.selectDropdownOption(o,s),["enter"]),u.withKeys(c=>a.selectDropdownOption(o,s),["space"])],style:u.normalizeStyle(`opacity:${a.isDropdownOptionSelected(o,s)?1:.5}`),tabindex:"0"},[a.isDropdownOptionSelected(o,s)?(u.openBlock(),u.createElementBlock("span",{key:0,style:u.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.selected.color};margin-right:5px`),class:"th-icon-green"},u.toDisplayString(a.tableConfig.style.dropdowns.icons.selected.unicode),5)):(u.openBlock(),u.createElementBlock("span",{key:1,style:u.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.unselected.color};margin-right:5px`),class:"th-icon-red"},u.toDisplayString(a.tableConfig.style.dropdowns.icons.unselected.unicode),5)),u.createElementVNode("span",null,u.toDisplayString(o),1)],44,s7))),128))],12,a7)):u.createCommentVNode("",!0)])],6))),128))])],64)):u.createCommentVNode("",!0),u.createElementVNode("tr",null,[o7,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`col_selector_${s}`,class:u.normalizeClass({"vue-ui-table-col-selector":!n.hasNaN[s],"th-has-nan":n.hasNaN[s]}),style:u.normalizeStyle(`background:${s===n.selectedColumn&&!n.hasNaN[s]?a.tableConfig.style.th.selected.backgroundColor:a.tableConfig.style.th.backgroundColor};color:${s===n.selectedColumn&&!n.hasNaN[s]?a.tableConfig.style.th.selected.color:a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[n.hasNaN[s]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",{key:0,innerHTML:n.tableHead[s].type===n.constants.NUMERIC?a.icons.chevronDown:"",class:u.normalizeClass({"col-selector":n.tableHead[s].type===n.constants.NUMERIC}),tabindex:"0",onClick:u.withModifiers(o=>a.selectColumn(s),["stop"]),onKeyup:u.withKeys(o=>a.selectColumn(s),["enter"])},null,42,l7))],6))),128))])]),u.createElementVNode("tbody",{onClick:e[8]||(e[8]=(...i)=>a.closeAllDropdowns&&a.closeAllDropdowns(...i)),onKeydown:e[9]||(e[9]=i=>a.navigateCell(i))},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.visibleRows,(i,s)=>(u.openBlock(),u.createElementBlock("tr",{key:`tbody_${s}`,"data-row":s%2===0?"odd":"even",class:u.normalizeClass(`tr_${n.uid}`),style:u.normalizeStyle(`${s%2===0?`background:${a.tableConfig.style.rows.odd.backgroundColor};color:${a.tableConfig.style.rows.odd.color}`:`background:${a.tableConfig.style.rows.even.backgroundColor};color:${a.tableConfig.style.rows.even.color}`}`)},[u.createElementVNode("td",{class:"vue-ui-table-td-iteration","data-row":s%2===0?"odd":"even"},u.toDisplayString(i.absoluteIndex+1),9,f7),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.td,(o,l)=>(u.openBlock(),u.createElementBlock("td",{"data-row":s%2===0?"odd":"even",key:`td_${s}_${l}`,style:u.normalizeStyle(a.isNumeric(o)||r.dataset.header[l].type===n.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),onKeyup:[u.withKeys(c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),["enter"]),u.withKeys(c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),["space"])],class:u.normalizeClass({"td-numeric":r.dataset.header[l].type===n.constants.NUMERIC,"td-focusable":!0,"td-has-nan":n.hasNaN[l]}),id:`cell_${s}_${l}_${n.uid}`,tabindex:"0"},[i.meta&&i.meta.markerIndices.includes(l)&&i.meta.unicodeIcon?(u.openBlock(),u.createElementBlock("span",{key:0,style:u.normalizeStyle(`color:${i.meta.color};margin-right:3px`),innerHTML:i.meta.unicodeIcon},null,12,h7)):u.createCommentVNode("",!0),r.dataset.header[l].type===n.constants.DATE?(u.openBlock(),u.createElementBlock("span",d7,u.toDisplayString(r.dataset.header[l].prefix)+" "+u.toDisplayString(new Date(o).toLocaleString().slice(0,10))+" "+u.toDisplayString(r.dataset.header[l].suffix),1)):r.dataset.header[l].isPercentage?(u.openBlock(),u.createElementBlock("span",g7,u.toDisplayString(Number((o*100).toFixed(r.dataset.header[l].decimals)).toLocaleString())+"% ",1)):n.percentages[l]&&r.dataset.header[l].percentageTo&&!r.dataset.header[l].isPercentage?(u.openBlock(),u.createElementBlock("span",{key:3,class:u.normalizeClass({"td-nan":isNaN(Number(o))})},u.toDisplayString(r.dataset.header[l].prefix)+" "+u.toDisplayString(isNaN(Number(o))?`${o} is not ${n.constants.NUMERIC}`:Number(o.toFixed(r.dataset.header[l].decimals)).toLocaleString())+" "+u.toDisplayString(r.dataset.header[l].suffix)+" ("+u.toDisplayString(isNaN(Number(o))?"":Number((o/a.getSum(n.percentages[l].referenceIndex)*100).toFixed(r.dataset.header[l].decimals)).toLocaleString())+"%) ",3)):r.dataset.header[l].type===n.constants.NUMERIC?(u.openBlock(),u.createElementBlock("span",{key:4,class:u.normalizeClass({"td-nan":isNaN(Number(o))})},u.toDisplayString(r.dataset.header[l].prefix)+" "+u.toDisplayString(isNaN(Number(o))?`${o} is not ${n.constants.NUMERIC}`:Number(o.toFixed(r.dataset.header[l].decimals)).toLocaleString())+" "+u.toDisplayString(r.dataset.header[l].suffix),3)):(u.openBlock(),u.createElementBlock("span",p7,u.toDisplayString(r.dataset.header[l].prefix)+" "+u.toDisplayString(o)+" "+u.toDisplayString(r.dataset.header[l].suffix),1))],46,u7))),128))],14,c7))),128))],32)])],4),u.createElementVNode("div",{class:u.normalizeClass({"td-selector-info":!0,"td-selector-info--active":n.currentSelectionSpan.col!==void 0&&n.currentSelectionSpan.rows.length}),style:u.normalizeStyle(`background:${a.tableConfig.style.infoBar.backgroundColor};color:${a.tableConfig.style.infoBar.color}`)},[n.currentSelectionSpan.col!==void 0&&n.currentSelectionSpan.rows.length?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createElementVNode("div",{innerHTML:a.icons.table,class:"td-selector-icon"},null,8,m7),u.createElementVNode("span",null,[u.createElementVNode("b",null,[u.createTextVNode(u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].name)+" ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("span",v7," / "+u.toDisplayString(r.dataset.header[n.percentages[n.currentSelectionSpan.col].referenceIndex].name),1)):u.createCommentVNode("",!0)]),u.createElementVNode("span",w7,[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.nb)+" : ",1),u.createElementVNode("b",B7,u.toDisplayString(n.currentSelectionSpan.rows.length),1)]),u.createElementVNode("span",y7,[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.sum)+" : ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("b",x7,u.toDisplayString(a.selectedCellsCalculations.sumPercentage),1)):(u.openBlock(),u.createElementBlock("b",C7,u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.selectedCellsCalculations.sumRegular)+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1)),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("b",b7,"%")):u.createCommentVNode("",!0)]),u.createElementVNode("span",E7,[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.average)+" : ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("b",F7,u.toDisplayString(a.selectedCellsCalculations.averagePercentage),1)):(u.openBlock(),u.createElementBlock("b",S7,u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.selectedCellsCalculations.averageRegular)+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1)),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("b",_7,"%")):u.createCommentVNode("",!0)])]),u.createElementVNode("button",{onClick:e[10]||(e[10]=(...i)=>a.resetSelection&&a.resetSelection(...i)),class:"td-selector-info-reset",style:u.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4)],64)):u.createCommentVNode("",!0)],6),n.bodyCopy.length>10?(u.openBlock(),u.createElementBlock("div",T7,[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.totalRows)+" : "+u.toDisplayString(r.dataset.body.length)+" | "+u.toDisplayString(a.tableConfig.translations.paginatorLabel)+" : ",1),n.bodyCopy.length>10?u.withDirectives((u.openBlock(),u.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":e[11]||(e[11]=i=>n.itemsPerPage=i),onChange:e[12]||(e[12]=(...i)=>a.resetSelection&&a.resetSelection(...i)),style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.paginatorOptions,(i,s)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[n.bodyCopy.length>i||r.dataset.body.length===i?(u.openBlock(),u.createElementBlock("option",{key:`paginator_option_${s}`},u.toDisplayString(i),1)):u.createCommentVNode("",!0)],64))),256))],36)),[[u.vModelSelect,n.itemsPerPage,void 0,{number:!0}]]):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0),n.itemsPerPage>=250?(u.openBlock(),u.createElementBlock("div",U7,[u.createElementVNode("span",{innerHTML:a.icons.warning},null,8,I7),u.createTextVNode(u.toDisplayString(a.tableConfig.translations.sizeWarning),1)])):u.createCommentVNode("",!0),a.pages.length>1&&a.pages.length<=10?(u.openBlock(),u.createElementBlock("div",{key:2,class:"vue-ui-table-navigation-indicator",style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.navigationIndicator.backgroundColor};width:calc(${n.currentPage/(a.pages.length-1)*100}%)`)},null,4)):u.createCommentVNode("",!0),a.pages.length>1?(u.openBlock(),u.createElementBlock("div",N7,[u.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[13]||(e[13]=u.withModifiers(i=>a.navigate("previous"),["stop"])),innerHTML:a.icons.chevronLeft,disabled:n.currentPage===0,style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,L7),a.pages.length>3?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[14]||(e[14]=u.withModifiers(i=>a.navigate(1),["stop"])),disabled:n.currentPage===0,style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,Q7),a.pages.length>10?(u.openBlock(),u.createElementBlock("div",k7,[u.createElementVNode("label",O7,u.toDisplayString(a.tableConfig.translations.page)+" "+u.toDisplayString(n.currentPage+1)+" / "+u.toDisplayString(a.pages.length),1),u.createElementVNode("input",{class:"vue-ui-table-page-scroller",id:"pageScroller",type:"range",step:"1",min:0,max:a.pages.length-1,onInput:e[15]||(e[15]=i=>a.updateCurrentPage(i)),value:n.currentPage,style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,D7)])):(u.openBlock(),u.createElementBlock("span",P7,u.toDisplayString(a.tableConfig.translations.page)+" "+u.toDisplayString(n.currentPage+1)+" / "+u.toDisplayString(a.pages.length),1)),u.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[16]||(e[16]=u.withModifiers(i=>a.navigate(a.pages.length),["stop"])),disabled:n.currentPage===a.pages.length-1,style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},u.toDisplayString(a.pages.length),13,M7)],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.page)+" "+u.toDisplayString(n.currentPage+1)+" / "+u.toDisplayString(a.pages.length),1)],64)),u.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[17]||(e[17]=u.withModifiers(i=>a.navigate("next"),["stop"])),innerHTML:a.icons.chevronRight,disabled:n.currentPage===a.pages.length-1,style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,R7)])):u.createCommentVNode("",!0),n.showChart&&a.canChart?(u.openBlock(),u.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:u.normalizeStyle(`top:${n.clientY}px; left:${n.clientX}px;background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[u.createElementVNode("button",{class:"close-chart-modal",onClick:e[18]||(e[18]=i=>n.showChart=!1),style:u.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),u.createElementVNode("div",H7,[a.availableDonutCategories.length?(u.openBlock(),u.createElementBlock("button",{key:0,onClick:e[19]||(e[19]=i=>n.showDonutOptions=!0),innerHTML:a.icons.donut,class:u.normalizeClass({"is-active-chart":n.chart.type===n.constants.DONUT||n.showDonutOptions}),style:u.normalizeStyle(`background:${n.chart.type===n.constants.DONUT||n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.DONUT||n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,V7)):u.createCommentVNode("",!0),u.createElementVNode("button",{onClick:e[20]||(e[20]=i=>{n.chart.type=n.constants.LINE,n.showDonutOptions=!1}),innerHTML:a.icons.chart,class:u.normalizeClass({"is-active-chart":n.chart.type===n.constants.LINE&&!n.showDonutOptions}),style:u.normalizeStyle(`background:${n.chart.type===n.constants.LINE&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.LINE&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,K7),u.createElementVNode("button",{onClick:e[21]||(e[21]=i=>{n.chart.type=n.constants.BAR,n.showDonutOptions=!1}),innerHTML:a.icons.bar,class:u.normalizeClass({"is-active-chart":n.chart.type===n.constants.BAR&&!n.showDonutOptions}),style:u.normalizeStyle(`background:${n.chart.type===n.constants.BAR&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.BAR&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,G7)]),u.createElementVNode("div",j7,[u.createElementVNode("b",null,[u.createTextVNode(u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].name)+" ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage&&r.dataset.header[n.currentSelectionSpan.col].percentageTo?(u.openBlock(),u.createElementBlock("span",z7," / "+u.toDisplayString(r.dataset.header[n.percentages[n.currentSelectionSpan.col].referenceIndex].name),1)):u.createCommentVNode("",!0),n.chart.type===n.constants.DONUT&&n.selectedDonutCategory&&n.selectedDonutCategory.name?(u.openBlock(),u.createElementBlock("span",W7,u.toDisplayString(a.tableConfig.translations.by)+" "+u.toDisplayString(n.selectedDonutCategory.name),1)):u.createCommentVNode("",!0)])]),u.createElementVNode("div",X7,[n.showDonutOptions&&a.availableDonutCategories.length?(u.openBlock(),u.createElementBlock("div",{key:0,style:u.normalizeStyle(`background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[u.createElementVNode("fieldset",q7,[u.createElementVNode("legend",null,u.toDisplayString(a.tableConfig.translations.chooseCategoryColumn),1),u.createElementVNode("div",Y7,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.availableDonutCategories,(i,s)=>(u.openBlock(),u.createElementBlock("div",{key:`donut_radio_${s}`,class:"vue-ui-table-fieldset-option"},[u.createElementVNode("input",{type:"radio",name:i.name,id:i.name,checked:n.selectedDonutCategory&&i.name===n.selectedDonutCategory.name,onInput:o=>n.selectedDonutCategory=a.availableDonutCategories[s],style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,$7),u.createElementVNode("label",{for:i.name},u.toDisplayString(i.name),9,J7)]))),128))]),u.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!n.selectedDonutCategory,onClick:e[22]||(e[22]=(...i)=>a.applyDonutOption&&a.applyDonutOption(...i)),style:u.normalizeStyle(`background:${a.tableConfig.style.chart.modal.buttons.selected.backgroundColor};color:${a.tableConfig.style.chart.modal.buttons.selected.color}`)},[u.createElementVNode("div",{style:{"margin-bottom":"-3px"},innerHTML:a.icons.donut},null,8,eM),u.createTextVNode(" "+u.toDisplayString(a.tableConfig.translations.makeDonut),1)],12,Z7)])],4)):u.createCommentVNode("",!0),[n.constants.BAR,n.constants.LINE].includes(n.chart.type)&&!n.showDonutOptions?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[(u.openBlock(),u.createElementBlock("svg",{viewBox:`0 0 ${n.chart.width} ${n.chart.height}`,class:"vue-ui-table-chart-svg",style:u.normalizeStyle(`background:${a.tableConfig.style.chart.layout.backgroundColor}`)},[u.createElementVNode("defs",null,[u.createElementVNode("marker",{id:"arrowhead",markerWidth:a.tableConfig.style.chart.layout.progression.arrowSize,markerHeight:a.tableConfig.style.chart.layout.progression.arrowSize,refX:"0",refY:a.tableConfig.style.chart.layout.progression.arrowSize/2,orient:"auto"},[u.createElementVNode("polygon",{points:`0 0, ${a.tableConfig.style.chart.layout.progression.arrowSize} ${a.tableConfig.style.chart.layout.progression.arrowSize/2}, 0 ${a.tableConfig.style.chart.layout.progression.arrowSize}`,fill:a.tableConfig.style.chart.layout.progression.stroke},null,8,AM)],8,rM)]),u.createElementVNode("g",null,[u.createElementVNode("line",{x1:0,x2:n.chart.width,y1:a.chartData.zero,y2:a.chartData.zero,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,nM),u.createElementVNode("line",{x1:0,x2:0,y1:0,y2:n.chart.height,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,aM)]),n.chart.type===n.constants.LINE?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:0},u.renderList(a.chartData.plots,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`trap_fill_${s}`},[u.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:n.chart.height,fill:n.selectedPlot===s?"rgba(0,0,0,0.03)":"transparent"},null,8,iM)]))),128)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.chartData.plots,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`plot_${s}`},[n.chart.type===n.constants.BAR?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[sM,u.createElementVNode("rect",{x:i.x-a.chartData.slot/2,y:a.chartData.isAllNegative?0:a.calcRectY(i.value,i.y),height:i.value>=0?a.chartData.zero-i.y:a.chartData.isAllNegative?i.y:i.y-a.chartData.zero,width:a.chartData.slot,fill:a.tableConfig.style.chart.layout.bar.fill?a.tableConfig.style.chart.layout.bar.fill:n.selectedPlot===s?i.value>=0?"url(#barGradientSelected)":"url(#barGradientSelectedNeg)":(i.value>=0,"url(#barGradient)"),stroke:a.tableConfig.style.chart.layout.bar.stroke,"stroke-width":"1"},null,8,oM),n.selectedPlot===s?(u.openBlock(),u.createElementBlock("foreignObject",{key:0,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:i.value>=0?i.y-32:i.y+4,height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[u.createElementVNode("div",{style:u.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},u.toDisplayString(i.prefix)+" "+u.toDisplayString(Number(i.value.toFixed(r.dataset.header[n.currentSelectionSpan.col].decimals)).toLocaleString())+" "+u.toDisplayString(i.suffix),5)],8,lM)):u.createCommentVNode("",!0)],64)):u.createCommentVNode("",!0),n.chart.type===n.constants.LINE?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[s+1<a.chartData.plots.length?(u.openBlock(),u.createElementBlock("line",{key:0,x1:i.x,y1:i.y,x2:a.chartData.plots[s+1].x,y2:a.chartData.plots[s+1].y,"stroke-width":a.tableConfig.style.chart.layout.line.strokeWidth,stroke:a.tableConfig.style.chart.layout.line.stroke},null,8,cM)):u.createCommentVNode("",!0),n.selectedPlot===s?(u.openBlock(),u.createElementBlock("line",{key:1,x1:i.x,y1:i.y,x2:i.x,y2:n.chart.height,stroke:a.tableConfig.style.chart.layout.line.selector.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.selector.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.line.selector.strokeDasharray},null,8,fM)):u.createCommentVNode("",!0),u.createElementVNode("circle",{cx:i.x,cy:i.y,r:n.selectedPlot===s?a.tableConfig.style.chart.layout.line.plot.radius.selected:a.tableConfig.style.chart.layout.line.plot.radius.unselected,fill:a.tableConfig.style.chart.layout.line.plot.fill,stroke:a.tableConfig.style.chart.layout.line.plot.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.plot.strokeWidth},null,8,uM),n.selectedPlot===s?(u.openBlock(),u.createElementBlock("foreignObject",{key:2,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:a.placeLabelOnTopOrBottom({previousPlot:a.chartData.plots[s-1],currentPlot:i,nextPlot:a.chartData.plots[s+1]}),height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[u.createElementVNode("div",{style:u.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},u.toDisplayString(i.prefix)+" "+u.toDisplayString(Number(i.value.toFixed(r.dataset.header[n.currentSelectionSpan.col].decimals)).toLocaleString())+" "+u.toDisplayString(i.suffix),5)],8,hM)):u.createCommentVNode("",!0)],64)):u.createCommentVNode("",!0)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.chartData.plots,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`trap_${s}`},[u.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:n.chart.height,fill:"transparent",onMouseenter:o=>n.selectedPlot=s,onMouseleave:e[23]||(e[23]=o=>n.selectedPlot=void 0)},null,40,dM)]))),128)),a.chartData.progression&&a.chartData.plots.length>2?(u.openBlock(),u.createElementBlock("line",{key:1,x1:a.chartData.progression.x1,y1:a.chartData.progression.y1,x2:a.chartData.progression.x2,y2:a.chartData.progression.y2,stroke:a.tableConfig.style.chart.layout.progression.stroke,"stroke-width":a.tableConfig.style.chart.layout.progression.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.progression.strokeDasharray,"marker-end":"url(#arrowhead)"},null,8,gM)):u.createCommentVNode("",!0)],12,tM)),a.chartData.plots.length>=2?(u.openBlock(),u.createElementBlock("div",{key:0,class:"chart-trend",style:u.normalizeStyle(`color:${a.tableConfig.style.chart.modal.color}`)},[pM,u.createTextVNode(" Trend: "),u.createElementVNode("span",null,u.toDisplayString(a.chartData.progression.slope<0?"+":"-"),1),u.createTextVNode(" "+u.toDisplayString((Math.abs(a.chartData.progression.slope)*100).toFixed(1))+" % ",1)],4)):u.createCommentVNode("",!0)],64)):u.createCommentVNode("",!0),[n.constants.DONUT].includes(n.chart.type)&&!n.showDonutOptions?(u.openBlock(),u.createElementBlock(u.Fragment,{key:2},[(u.openBlock(),u.createElementBlock("svg",{viewBox:"0 0 100 100",style:u.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${a.tableConfig.style.chart.layout.backgroundColor}`),class:"vue-ui-table-donut-chart"},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.currentDonut,(i,s)=>(u.openBlock(),u.createElementBlock("path",{key:`arc_${s}`,d:i.path,stroke:`${i.color}CC`,"stroke-width":20,fill:"none"},null,8,mM))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.currentDonut,(i,s)=>(u.openBlock(),u.createElementBlock("foreignObject",{key:`text_marker_${s}`,x:a.calcDonutMarkerLabelPositionX(i)-15,y:i.center.endY-15,height:"30",width:"30",style:{overflow:"visible",display:"flex","align-items":"center","justify-content":"center"}},[a.isArcBigEnough(i)?(u.openBlock(),u.createElementBlock("div",{key:0,class:"vue-ui-table-donut-label",style:u.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[u.createElementVNode("b",null,u.toDisplayString(a.displayArcPercentage(i,n.currentDonut)),1),u.createElementVNode("span",wM,u.toDisplayString(i.name),1)],4)):u.createCommentVNode("",!0)],8,vM))),128)),u.createElementVNode("text",{x:50,y:42,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},u.toDisplayString(a.tableConfig.translations.total),9,BM),u.createElementVNode("text",{x:50,y:48,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.donutHollowLabels.total)+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),9,yM),u.createElementVNode("text",{x:50,y:56,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},u.toDisplayString(a.tableConfig.translations.average),9,xM),u.createElementVNode("text",{x:50,y:62,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.donutHollowLabels.average)+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),9,CM)],4)),u.createElementVNode("div",bM,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.currentDonut.filter(i=>i.value>0),(i,s)=>(u.openBlock(),u.createElementBlock("div",{class:"vue-ui-table-donut-legend-item",key:`donut_legend_${s}`,style:u.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[u.createElementVNode("span",{style:u.normalizeStyle(`color:${i.color}`)},"●",4),u.createElementVNode("span",null,u.toDisplayString(i.name)+" : ",1),u.createElementVNode("b",null,u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.getDonutLegendValue(i.absoluteValue))+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1),u.createElementVNode("span",null,"("+u.toDisplayString((i.proportion*100).toFixed(1))+"%)",1)],4))),128))])],64)):u.createCommentVNode("",!0)],512)],4)):u.createCommentVNode("",!0)],4)}const FM=b1(rP,[["render",EM],["__scopeId","data-v-80d709a0"]]),NJ="",SM=t=>(u.pushScopeId("data-v-6c28ce05"),t=t(),u.popScopeId(),t),_M=["id"],TM={class:"vue-ui-donut-user-option-item"},UM=["id","name"],IM=["for"],NM={class:"vue-ui-donut-user-option-item"},LM=["id","name"],QM=["for"],kM={class:"vue-ui-donut-user-option-item"},OM=["id","name"],DM=["for"],PM=["disabled"],MM={key:0,class:"vue-ui-donut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},RM=[u.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-6c28ce05></path><path d="M18 16v.01" data-v-6c28ce05></path><path d="M6 16v.01" data-v-6c28ce05></path><path d="M12 5v.01" data-v-6c28ce05></path><path d="M12 12v.01" data-v-6c28ce05></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-6c28ce05></path>',6)],HM={key:1},VM=["viewBox"],KM=["id"],GM=["stop-color"],jM=["stop-color"],zM=["stop-color"],WM={key:0},XM=["font-size","fill","x"],qM=["font-size","fill","x","y"],YM=["d","stroke","stroke-width"],$M=["cx","cy","fill"],JM=["d","stroke","stroke-width","onMouseenter","onClick"],ZM=["cx","cy","r","fill"],eR=["x","y","fill","font-size"],tR=["x","y","fill","font-size"],rR=["x","y","fill","font-size"],AR=["x","y","fill","font-size"],nR=["x","y","fill","font-size"],aR=["x","y","fill","font-size"],iR=["y"],sR=["onClick"],oR=["onClick"],lR={key:0},cR=["innerHTML"],fR={key:0},uR={key:0},hR=[SM(()=>u.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[u.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],dR={style:{"max-width":"200px margin:0 auto"}},gR=b1({__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t){const e=t,r=u.ref(`vue-ui-donut-${Math.random()}`),A=u.ref({style:{fontFamily:"inherit",chart:{useGradient:!0,gradientIntensity:40,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!1,labels:{dataLabels:{show:!0,hideUnderValue:3},percentage:{color:"#2D353C",bold:!0,fontSize:18},name:{color:"#2D353C",bold:!1,fontSize:14},hollow:{total:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Total",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}},average:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Average",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}}}},donut:{strokeWidth:64}},legend:{backgroundColor:"#FFFFFF",color:"#2D353C",show:!0,fontSize:16,bold:!1,roundingValue:0,roundingPercentage:0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,color:"#2D353C",backgroundColor:"#FFFFFF",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",useDiv:"Title & legend inside",showTable:"Show table"}},translations:{total:"Total",average:"Average"},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),n=u.ref(!1),a=u.ref(null),i=u.ref(null),s=u.ref(null),o=u.ref({x:0,y:0}),l=u.ref(!1),c=u.ref("TEST"),d=u.ref(null);u.onMounted(()=>{document.addEventListener("mousemove",g)}),u.onBeforeUnmount(()=>{document.removeEventListener("mousemove",g)});function g(ae){o.value.x=ae.clientX,o.value.y=ae.clientY}const h=u.computed(()=>{let ae=0,se=48;if(i.value&&a.value){const{width:ye,height:C}=i.value.getBoundingClientRect(),_=a.value.getBoundingClientRect();o.value.x+ye/2>_.right?ae=-ye:o.value.x-ye/2<_.left?ae=0:ae=-ye/2,o.value.y+C>_.bottom&&(se=-C-48)}return{top:o.value.y+se,left:o.value.x+ae}}),m=u.computed(()=>Object.keys(e.config||{}).length?Mu({defaultConfig:A.value,userConfig:e.config}):A.value),v=u.ref({dataLabels:{show:m.value.style.chart.layout.labels.dataLabels.show},inside:m.value.style.chart.layout.useDiv,showTable:m.value.table.show}),B=u.computed(()=>({height:v.value.inside||n.value?512:360,width:512})),x=u.ref([]);function b(ae){x.value.includes(ae)?x.value=x.value.filter(se=>se!==ae):x.value.push(ae)}const F=u.computed(()=>e.dataset.map((ae,se)=>({name:ae.name,color:ae.color||Ui[se]||Ui[se%Ui.length],value:ae.values.reduce((ye,C)=>ye+C,0),absoluteValues:ae.values})).sort((ae,se)=>se.value-ae.value).filter((ae,se)=>!x.value.includes(se))),O=u.computed(()=>e.dataset.map((ae,se)=>({name:ae.name,color:ae.color||Ui[se]||Ui[se%Ui.length],value:ae.values.reduce((ye,C)=>ye+C,0)})).sort((ae,se)=>se.value-ae.value)),W=u.computed(()=>jy({series:F.value},B.value.width/2,B.value.height/2,100,100));function q(ae){return ae.center.endX+L(ae,256)}function L(ae,se){return ae.center.endX-se>=0?30:-30}function k(ae){return ae.proportion*100>m.value.style.chart.layout.labels.dataLabels.hideUnderValue}function K(ae,se){return isNaN(ae.value/re(se))?0:(ae.value/re(se)*100).toFixed(0)+"%"}function re(ae){return[...ae].map(se=>se.value).reduce((se,ye)=>se+ye,0)}const U=u.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),T=u.computed(()=>F.value.map(ae=>ae.value).reduce((ae,se)=>ae+se,0)),V=u.computed(()=>T.value/F.value.length);function Y(){s.value&&s.value.removeAttribute("open")}function ue(ae,se,ye=!0){l.value=ye,d.value=se;let C="";C+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${ae.name}</div>`,C+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${ae.color};font-size:${m.value.style.chart.tooltip.fontSize*1.6}px;">●</span>`,m.value.style.chart.tooltip.showValue&&(C+=`<b>${ae.value.toFixed(m.value.style.chart.tooltip.roundingValue)}</b>`),m.value.style.chart.tooltip.showPercentage&&(m.value.style.chart.tooltip.showValue?C+=`<span>(${(ae.proportion*100).toFixed(m.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:C+=`<b>${(ae.proportion*100).toFixed(m.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),c.value=`<div>${C}</div>`}function ge(){const ae=document.getElementById(`donut__${r.value}`);if(console.log(ae),ae){n.value=!0;const se={height:851.89,width:595.28},ye=new Bt("","pt","a4");let C,_,S,Q,j;xd(ae).then(ie=>{C=ie.width,_=ie.height;let oe=_;const le=C/se.width*se.height;let xe=0;if(S=se.width,Q=582.28/C*_,j=ie.toDataURL("image/png",1),oe<le)ye.addImage(j,"PNG",33,24,S*.9,Q*.9,"","FAST");else for(;oe>0;)ye.addImage(j,"PNG",33,xe,S*.9,Q*.9,"","FAST"),oe-=le,xe-=se.height-24,oe>0&&ye.addPage();ye.save(`${m.value.style.chart.title.text||"vue-ui-donut"}.pdf`)}).finally(()=>{n.value=!1})}}const we=u.computed(()=>{const ae=F.value.map(ye=>({name:ye.name,color:ye.color})),se=F.value.map(ye=>ye.value);return{head:ae,body:se}});function pe(){u.nextTick(()=>{const ae=we.value.head.map((ie,oe)=>[[ie.name],[we.value.body[oe]],[isNaN(we.value.body[oe]/T.value)?"-":we.value.body[oe]/T.value*100]]),se=[[m.value.style.chart.title.text],[m.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(ae);function ye(ie){let oe=new ArrayBuffer(ie.length),le=new Uint8Array(oe);for(let xe=0;xe<ie.length;xe++)le[xe]=ie.charCodeAt(xe)&255;return oe}const C=Ga.book_new(),_=Ga.aoa_to_sheet(se);Ga.book_append_sheet(C,_,"Sheet1");const S=Du(C,{bookType:"xlsx",type:"binary"}),Q=new Blob([ye(S)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),j=document.createElement("a");j.href=window.URL.createObjectURL(Q),j.download=`${m.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-donut"}.xlsx`,j.click(),window.URL.revokeObjectURL(j.href)})}return(ae,se)=>(u.openBlock(),u.createElementBlock("div",{ref:"donutChart",class:"vue-ui-donut",style:u.normalizeStyle(`font-family:${m.value.style.fontFamily};width:100%; text-align:center`),id:`donut__${r.value}`},[(!v.value.inside||n.value)&&m.value.style.chart.title.text?(u.openBlock(),u.createElementBlock("div",{key:0,style:u.normalizeStyle(`width:100%;background:${m.value.style.chart.backgroundColor}`)},[u.createElementVNode("div",{style:u.normalizeStyle(`width:100%;text-align:center;color:${m.value.style.chart.title.color};font-size:${m.value.style.chart.title.fontSize}px;font-weight:${m.value.style.chart.title.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.title.text),5),m.value.style.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("div",{key:0,style:u.normalizeStyle(`width:100%;text-align:center;color:${m.value.style.chart.title.subtitle.color};font-size:${m.value.style.chart.title.subtitle.fontSize}px;font-weight:${m.value.style.chart.title.subtitle.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.title.subtitle.text),5)):u.createCommentVNode("",!0)],4)):u.createCommentVNode("",!0),m.value.userOptions.show?(u.openBlock(),u.createElementBlock("details",{key:1,class:"vue-ui-donut-user-options",style:u.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:s},[u.createElementVNode("summary",{style:u.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`)},u.toDisplayString(m.value.userOptions.title),5),u.createElementVNode("div",{class:"vue-ui-donut-user-options-items",style:u.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`)},[u.createElementVNode("div",TM,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-datalabels_${r.value}`,name:`vue-ui-donut-option-datalabels_${r.value}`,"onUpdate:modelValue":se[0]||(se[0]=ye=>v.value.dataLabels.show=ye)},null,8,UM),[[u.vModelCheckbox,v.value.dataLabels.show]]),u.createElementVNode("label",{for:`vue-ui-donut-option-datalabels_${r.value}`},u.toDisplayString(m.value.userOptions.labels.dataLabels),9,IM)]),u.createElementVNode("div",NM,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-title_${r.value}`,name:`vue-ui-donut-option-title_${r.value}`,"onUpdate:modelValue":se[1]||(se[1]=ye=>v.value.inside=ye)},null,8,LM),[[u.vModelCheckbox,v.value.inside]]),u.createElementVNode("label",{for:`vue-ui-donut-option-title_${r.value}`},u.toDisplayString(m.value.userOptions.labels.useDiv),9,QM)]),u.createElementVNode("div",kM,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-table_${r.value}`,name:`vue-ui-donut-option-table_${r.value}`,"onUpdate:modelValue":se[2]||(se[2]=ye=>v.value.showTable=ye)},null,8,OM),[[u.vModelCheckbox,v.value.showTable]]),u.createElementVNode("label",{for:`vue-ui-donut-option-table_${r.value}`},u.toDisplayString(m.value.userOptions.labels.showTable),9,DM)]),u.createElementVNode("button",{class:"vue-ui-donut-button",onClick:ge,disabled:n.value,style:u.normalizeStyle([{"margin-top":"12px"},`color:${m.value.style.chart.color}`])},[n.value?(u.openBlock(),u.createElementBlock("svg",MM,RM)):(u.openBlock(),u.createElementBlock("span",HM,"PDF"))],12,PM),u.createElementVNode("button",{class:"vue-ui-donut-button",onClick:pe,style:u.normalizeStyle(`color:${m.value.style.chart.color}`)}," XLSX ",4)],4)],4)):u.createCommentVNode("",!0),(u.openBlock(),u.createElementBlock("svg",{viewBox:`0 0 ${B.value.width} ${B.value.height}`,style:u.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`),onClick:Y},[u.createElementVNode("defs",null,[m.value.style.chart.useGradient?(u.openBlock(),u.createElementBlock("radialGradient",{key:0,id:`gradient_${r.value}`},[u.createElementVNode("stop",{offset:"0%","stop-color":`${u.unref(qy)(m.value.style.chart.backgroundColor)}00`},null,8,GM),u.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+U.value[m.value.style.chart.gradientIntensity]},null,8,jM),u.createElementVNode("stop",{offset:"100%","stop-color":`${u.unref(qy)(m.value.style.chart.backgroundColor)}00`},null,8,zM)],8,KM)):u.createCommentVNode("",!0)]),m.value.style.chart.title.text&&v.value.inside&&!n.value?(u.openBlock(),u.createElementBlock("g",WM,[u.createElementVNode("text",{"font-size":m.value.style.chart.title.fontSize,fill:m.value.style.chart.title.color,x:B.value.width/2,y:48,"text-anchor":"middle",style:u.normalizeStyle(`font-weight:${m.value.style.chart.title.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.title.text),13,XM),m.value.style.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("text",{key:0,"font-size":m.value.style.chart.title.subtitle.fontSize,fill:m.value.style.chart.title.subtitle.color,x:B.value.width/2,y:48+m.value.style.chart.title.fontSize,"text-anchor":"middle",style:u.normalizeStyle(`font-weight:${m.value.style.chart.title.subtitle.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.title.subtitle.text),13,qM)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(W.value,(ye,C)=>(u.openBlock(),u.createElementBlock("path",{d:ye.path,stroke:`${ye.color}CC`,"stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none"},null,8,YM))),256)),m.value.style.chart.useGradient?(u.openBlock(),u.createElementBlock("circle",{key:1,cx:B.value.width/2,cy:B.value.height/2,r:136,fill:`url(#gradient_${r.value})`},null,8,$M)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(W.value,(ye,C)=>(u.openBlock(),u.createElementBlock("path",{d:ye.path,stroke:d.value===C?"rgba(0,0,0,0.1)":"transparent","stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none",onMouseenter:_=>ue(ye,C,!0),onMouseleave:se[3]||(se[3]=_=>{l.value=!1,d.value=null}),onClick:_=>b(C)},null,40,JM))),256)),u.createElementVNode("circle",{cx:B.value.width/2,cy:B.value.height/2,r:B.value.width-400-m.value.style.chart.layout.donut.strokeWidth/2,fill:m.value.style.chart.backgroundColor},null,8,ZM),m.value.style.chart.layout.labels.hollow.total.show?(u.openBlock(),u.createElementBlock("text",{key:2,"text-anchor":"middle",x:B.value.width/2,y:B.value.height/2-(m.value.style.chart.layout.labels.hollow.average.show?m.value.style.chart.layout.labels.hollow.total.fontSize:0)+m.value.style.chart.layout.labels.hollow.total.offsetY,fill:m.value.style.chart.layout.labels.hollow.total.color,"font-size":m.value.style.chart.layout.labels.hollow.total.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.layout.labels.hollow.total.text),13,eR)):u.createCommentVNode("",!0),m.value.style.chart.layout.labels.hollow.total.show?(u.openBlock(),u.createElementBlock("text",{key:3,"text-anchor":"middle",x:B.value.width/2,y:B.value.height/2+m.value.style.chart.layout.labels.hollow.total.fontSize-(m.value.style.chart.layout.labels.hollow.average.show?m.value.style.chart.layout.labels.hollow.total.fontSize:0)+m.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:m.value.style.chart.layout.labels.hollow.total.value.color,"font-size":m.value.style.chart.layout.labels.hollow.total.value.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.layout.labels.hollow.total.value.prefix)+" "+u.toDisplayString(T.value.toFixed(m.value.style.chart.layout.labels.hollow.total.value.rounding))+" "+u.toDisplayString(m.value.style.chart.layout.labels.hollow.total.value.suffix),13,tR)):u.createCommentVNode("",!0),m.value.style.chart.layout.labels.hollow.average.show?(u.openBlock(),u.createElementBlock("text",{key:4,"text-anchor":"middle",x:B.value.width/2,y:B.value.height/2+(m.value.style.chart.layout.labels.hollow.total.show?m.value.style.chart.layout.labels.hollow.average.fontSize:0)+m.value.style.chart.layout.labels.hollow.average.offsetY,fill:m.value.style.chart.layout.labels.hollow.average.color,"font-size":m.value.style.chart.layout.labels.hollow.average.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.layout.labels.hollow.average.text),13,rR)):u.createCommentVNode("",!0),m.value.style.chart.layout.labels.hollow.average.show?(u.openBlock(),u.createElementBlock("text",{key:5,"text-anchor":"middle",x:B.value.width/2,y:B.value.height/2+(m.value.style.chart.layout.labels.hollow.total.show?m.value.style.chart.layout.labels.hollow.average.fontSize:0)+m.value.style.chart.layout.labels.hollow.average.fontSize+m.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:m.value.style.chart.layout.labels.hollow.average.value.color,"font-size":m.value.style.chart.layout.labels.hollow.average.value.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.layout.labels.hollow.average.value.prefix)+" "+u.toDisplayString(isNaN(V.value.toFixed(m.value.style.chart.layout.labels.hollow.average.value.rounding))?"-":V.value.toFixed(m.value.style.chart.layout.labels.hollow.average.value.rounding))+" "+u.toDisplayString(m.value.style.chart.layout.labels.hollow.average.value.suffix),13,AR)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(W.value,(ye,C)=>(u.openBlock(),u.createElementBlock("g",null,[k(ye)&&v.value.dataLabels.show?(u.openBlock(),u.createElementBlock("text",{key:0,"text-anchor":"middle",x:q(ye),y:ye.center.endY-m.value.style.chart.layout.labels.percentage.fontSize/2,fill:m.value.style.chart.layout.labels.percentage.color,"font-size":m.value.style.chart.layout.labels.percentage.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.percentage.bold?"bold":""}`)},u.toDisplayString(K(ye,W.value)),13,nR)):u.createCommentVNode("",!0),k(ye)&&v.value.dataLabels.show?(u.openBlock(),u.createElementBlock("text",{key:1,"text-anchor":"middle",x:q(ye),y:ye.center.endY+m.value.style.chart.layout.labels.percentage.fontSize/2,fill:m.value.style.chart.layout.labels.name.color,"font-size":m.value.style.chart.layout.labels.name.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.name.bold?"bold":""}`)},u.toDisplayString(ye.name),13,aR)):u.createCommentVNode("",!0)]))),256)),m.value.style.chart.legend.show&&v.value.inside&&!n.value?(u.openBlock(),u.createElementBlock("foreignObject",{key:6,x:0,y:B.value.height/2+150,width:"100%",height:"100",style:{overflow:"visible"}},[u.createElementVNode("div",{class:"vue-ui-donut-legend",style:u.normalizeStyle(`background:transparent;color:${m.value.style.chart.legend.color};font-size:${m.value.style.chart.legend.fontSize}px;font-weight:${m.value.style.chart.legend.bold?"bold":""}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(O.value,(ye,C)=>(u.openBlock(),u.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:_=>b(C),style:u.normalizeStyle(`opacity:${x.value.includes(C)?.5:1}`)},[u.createElementVNode("span",{style:u.normalizeStyle(`color:${ye.color};font-size:${m.value.style.chart.legend.fontSize*1.6}px`)},"●",4),u.createElementVNode("span",null,u.toDisplayString(ye.name)+" : ",1),u.createElementVNode("span",null,u.toDisplayString(ye.value),1),u.createElementVNode("span",null,"("+u.toDisplayString(isNaN(ye.value/T.value)?"-":(ye.value/T.value*100).toFixed(m.value.style.chart.legend.roundingPercentage))+"%)",1)],12,sR))),256))],4)],8,iR)):u.createCommentVNode("",!0)],12,VM)),m.value.style.chart.legend.show&&(!v.value.inside||n.value)?(u.openBlock(),u.createElementBlock("div",{key:2,class:"vue-ui-donut-legend",style:u.normalizeStyle(`background:${m.value.style.chart.legend.backgroundColor};color:${m.value.style.chart.legend.color};font-size:${m.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${m.value.style.chart.legend.bold?"bold":""}`),onClick:Y},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(O.value,(ye,C)=>(u.openBlock(),u.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:_=>b(C),style:u.normalizeStyle(`opacity:${x.value.includes(C)?.5:1}`)},[u.createElementVNode("span",{style:u.normalizeStyle(`color:${ye.color};font-size:${m.value.style.chart.legend.fontSize*1.6}px`)},"●",4),u.createElementVNode("span",null,u.toDisplayString(ye.name)+" : ",1),u.createElementVNode("span",null,u.toDisplayString(ye.value.toFixed(m.value.style.chart.legend.roundingValue)),1),x.value.includes(C)?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",lR,"("+u.toDisplayString(isNaN(ye.value/T.value)?"-":(ye.value/T.value*100).toFixed(m.value.style.chart.legend.roundingPercentage))+"%)",1))],12,oR))),256))],4)):u.createCommentVNode("",!0),m.value.style.chart.tooltip.show&&l.value?(u.openBlock(),u.createElementBlock("div",{key:3,class:"vue-ui-donut-tooltip",ref_key:"tooltip",ref:i,style:u.normalizeStyle(`top:${h.value.top}px;left:${h.value.left}px;background:${m.value.style.chart.tooltip.backgroundColor};color:${m.value.style.chart.tooltip.color}`),innerHTML:c.value},null,12,cR)):u.createCommentVNode("",!0),v.value.showTable?(u.openBlock(),u.createElementBlock("div",{key:4,onClick:Y,class:"vue-ui-donut-table",style:u.normalizeStyle(`width:100%;margin-top:${v.value.inside?"48px":""}`)},[u.createElementVNode("table",null,[u.createElementVNode("thead",null,[m.value.style.chart.title.text?(u.openBlock(),u.createElementBlock("tr",fR,[u.createElementVNode("th",{colspan:"3",style:u.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},[u.createElementVNode("span",null,u.toDisplayString(m.value.style.chart.title.text),1),m.value.style.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("span",uR," : "+u.toDisplayString(m.value.style.chart.title.subtitle.text),1)):u.createCommentVNode("",!0)],4)])):u.createCommentVNode("",!0),u.createElementVNode("tr",null,[u.createElementVNode("th",{align:"right",style:u.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};padding-right:6px`)},hR,4),u.createElementVNode("th",{style:u.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};text-align:right;padding-right:6px`)},u.toDisplayString(T.value.toFixed(m.value.table.td.roundingValue)),5),u.createElementVNode("th",{style:u.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(we.value.head,(ye,C)=>(u.openBlock(),u.createElementBlock("tr",null,[u.createElementVNode("td",{style:u.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},[u.createElementVNode("div",dR,[u.createElementVNode("span",{style:u.normalizeStyle(`color:${ye.color};margin-right:6px;`)},"●",4),u.createElementVNode("span",null,u.toDisplayString(ye.name),1)])],4),u.createElementVNode("td",{style:u.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},u.toDisplayString(we.value.body[C].toFixed(m.value.table.td.roundingValue)),5),u.createElementVNode("td",{style:u.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},u.toDisplayString(isNaN(we.value.body[C]/T.value)?"-":(we.value.body[C]/T.value*100).toFixed(m.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):u.createCommentVNode("",!0)],12,_M))}},[["__scopeId","data-v-6c28ce05"]]);/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function Ii(t){"@babel/helpers - typeof";return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ii(t)}function E1(t,e){return E1=Object.setPrototypeOf||function(A,n){return A.__proto__=n,A},E1(t,e)}function pR(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ru(t,e,r){return pR()?Ru=Reflect.construct:Ru=function(n,a,i){var s=[null];s.push.apply(s,a);var o=Function.bind.apply(n,s),l=new o;return i&&E1(l,i.prototype),l},Ru.apply(null,arguments)}function Wn(t){return mR(t)||vR(t)||wR(t)||BR()}function mR(t){if(Array.isArray(t))return F1(t)}function vR(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function wR(t,e){if(t){if(typeof t=="string")return F1(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F1(t,e)}}function F1(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,A=new Array(e);r<e;r++)A[r]=t[r];return A}function BR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
373
|
+
}`);if(this.dataset.body.length===0)throw new Error("vue-ui-table error: missing body data");this.isLoading=!0,this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.isLoading=!1}),document.addEventListener("keydown",t=>{const e=document.activeElement;(e&&Array.from(e.classList).includes("td-focusable")&&t.key.includes("Arrow")||t.code==="Space")&&t.preventDefault()})},watch:{showChart:function(t){t&&this.$nextTick(()=>{this.closeDragElement();const e=this.$refs.chartModal;e.onmousedown=this.dragMouseDown})}},computed:{availableDonutCategories(){return Object.keys(this.multiselects).map(t=>({index:t,name:this.dataset.header[t].name,options:this.multiselects[t]}))},canChart(){return this.tableConfig.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const t=316,e=512,r=this.currentSelectionSpan.rows.length,A=e/r,n=Math.max(...this.currentSelectionSpan.rows.map(g=>g.value)),a=Math.min(...this.currentSelectionSpan.rows.map(g=>g.value)),i=a>=0?0:Math.abs(a),s=n+i,o=n<0&&a<0,l=this.dataset.header[this.currentSelectionSpan.col].isPercentage,c=this.currentSelectionSpan.rows.map((g,h)=>({x:A*h+A/2,y:(1-(g.value+i)/s)*t,value:l?g.value*100:g.value,suffix:l?"%":this.dataset.header[this.currentSelectionSpan.col].suffix?this.dataset.header[this.currentSelectionSpan.col].suffix:"",prefix:this.dataset.header[this.currentSelectionSpan.col].prefix?this.dataset.header[this.currentSelectionSpan.col].prefix:"",index:g.index,absoluteValue:l?Math.abs(g.value)*100:Math.abs(g.value)})),d=t-t*(i/s);return{isAllNegative:o,zero:d,plots:c,slot:A,progression:c.length>=2?this.calcChartProgression(c):!1}},donutHollowLabels(){return{total:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),average:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},hasNumericTypes(){return this.dataset.header.map(t=>t.type).includes(this.constants.NUMERIC)},icons(){return{arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`}},pages(){const t=[];if(this.bodyCopy.length)for(let e=0;e<this.bodyCopy.length;e+=this.itemsPerPage)t.push(this.bodyCopy.slice(e,e+this.itemsPerPage));return t},rows(){return this.bodyCopy.map(t=>t.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},tableConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},visibleRows(){return this.pages[this.currentPage]}},methods:{treeShake:Mu,makeDonut:jy,applyDonutOption(){const t=this.selectedDonutCategory.options.map((e,r)=>({name:e,color:this.palette[r]||this.palette[r%this.palette.length],value:this.visibleRows.filter((A,n)=>A.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(n)).map(A=>A.td[this.currentSelectionSpan.col]).reduce((A,n)=>Math.abs(A)+Math.abs(n),0),absoluteValue:this.visibleRows.filter((A,n)=>A.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(n)).map(A=>A.td[this.currentSelectionSpan.col]).reduce((A,n)=>A+n,0)})).sort((e,r)=>r.value-e.value);this.currentDonut=this.makeDonut({series:t},50,50,30,30),this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(t,e){return t>=0?e:this.chartData.zero},canResetColumn(t,e){return!this.hasNaN[t]&&(e.isSort||e.isSearch||e.isMultiselect||e.rangeFilter)&&![this.constants.DATE].includes(e.type)},createXls(t="all"){const e=this.dataset.header.map(c=>c.name),r=t==="all"?this.bodyCopy.map(c=>c.td):this.visibleRows.map(c=>c.td),A=[e].concat(r);function n(c){let d=new ArrayBuffer(c.length),g=new Uint8Array(d);for(let h=0;h<c.length;h++)g[h]=c.charCodeAt(h)&255;return d}const a=Ga.book_new(),i=Ga.aoa_to_sheet(A);Ga.book_append_sheet(a,i,"Sheet1");const s=Du(a,{bookType:"xlsx",type:"binary"}),o=new Blob([n(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=document.createElement("a");l.href=window.URL.createObjectURL(o),l.download="data.xlsx",l.click(),window.URL.revokeObjectURL(l.href),this.isExportRequest=!1},calcChartProgression(t){let e,r,A,n;const a=t.length;let i=0,s=0,o=0,l=0;for(const{x:g,y:h}of t)i+=g,s+=h,o+=g*h,l+=g*g;const c=(a*o-i*s)/(a*l-i*i),d=(s-c*i)/a;return e=t[0].x,A=t[a-1].x,r=c*e+d,n=c*A+d,{x1:e,y1:r,x2:A,y2:n,slope:c}},closeAllDropdowns(){const t=document.getElementsByClassName("th-dropdown");t.length&&Array.from(t).forEach(e=>{e.dataset.isOpen=!1})},debounce(t,e){let r;clearTimeout(r),r=setTimeout(t,e)},filterBody(){this.bodyCopy=this.tableBody.filter(t=>{for(const e in this.searches)if(!t.td[e].toUpperCase().includes(this.searches[e].toUpperCase()))return!1;for(const e in this.multiselects)if(!this.multiselects[e].some(A=>A===t.td[e]))return!1;for(const e in this.dates){const r=new Date(t.td[e]),A=new Date(this.dates[e].from),n=new Date(this.dates[e].to);if(r<A||r>n)return!1}return!0}),this.sortBody()},getAverage(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)/this.bodyCopy.length},getDatesRange(t){const e=this.dataset.body.map(g=>new Date(g.td[t])),r=new Date(Math.min(...e)),A=new Date(Math.max(...e)),n=r.getFullYear(),a=A.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),s=String(A.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0"),l=String(A.getDate()).padStart(2,"0"),c=`${n}-${i}-${o}`,d=`${a}-${s}-${l}`;return{from:c,to:d}},getDonutLegendValue(t){return Number((t*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(t){return[...new Set(this.dataset.body.map(e=>e.td[t]))]},getSum(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)},includesNaN(t){return t.includes(NaN)},isDropdownOptionSelected(t,e){return this.multiselects[e]?this.multiselects[e].includes(t):!0},isNumeric(t){return!isNaN(Number(String(t).replaceAll("%","")))},isResetDisabled(t,e){const r=e.isSort,A=e.isSearch,n=e.isMultiselect&&this.multiselects[t],a=e.rangeFilter,i=s=>{if(a&&this.rangeFilters[s])return Math.round(this.rangeFilters[s].min)===this.immutableRangeFilters[s].min&&Math.round(this.rangeFilters[s].max)===this.immutableRangeFilters[s].max};if(r&&A&&n&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&A&&n)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(r&&A&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&i(t);if(r&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t]);if(r&&n&&a)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&n)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(A&&n&&a)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(A&&n)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(A&&a)return["",void 0].includes(this.searches[t])&&i(t);if(A)return["",void 0].includes(this.searches[t]);if(r&&a)return[void 0].includes(this.sorts[t])&&i(t);if(r)return[void 0].includes(this.sorts[t]);if(n&&a)return this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(n)return this.multiselects[t].length===this.getDropdownOptions(t).length},navigate(t){this.resetSelection(),t==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:t==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=t-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(t){t.preventDefault();const e=t.keyCode,r=38,A=40,n=37,a=39;if(![r,A,n,a].includes(e))return;const i=t.target.id,s=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,o=i.match(s),l=parseInt(o[1]),c=parseInt(o[2]),d=document.getElementById(`cell_${l}_${c+1}_${this.uid}`),g=document.getElementById(`cell_${l}_${c-1}_${this.uid}`),h=document.getElementById(`cell_${l+1}_${c}_${this.uid}`),m=document.getElementById(`cell_${l-1}_${c}_${this.uid}`);let v;switch(!0){case e===a:v=d;break;case e===n:v=g;break;case e===r:v=m;break;case e===A:v=h;break;default:return}v&&(v.focus(),v.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:t,currentPlot:e,nextPlot:r}){const A=e.y-38,n=e.y+16;return t&&r?t.value<e.value&&r.value<e.value?A:t.value>e.value&&r.value>e.value?n:(t.value>e.value&&r.value<e.value||t.value<e.value&&r.value>e.value,A):t&&!r?t.value>e.value?n:A:!t&&r&&r.value>e.value?n:A},async prepareBodyCopy(){return new Promise(t=>{const e=[];this.tableHead.forEach((r,A)=>{if(r.isSearch&&Object.assign(this.searches,{[A]:""}),r.isMultiselect&&Object.assign(this.multiselects,{[A]:this.getDropdownOptions(A)}),r.type===this.constants.DATE&&(Object.assign(this.dates,{[A]:this.getDatesRange(A)}),Object.assign(this.filteredDatesIndexes,{[A]:!1})),(r.isPercentage||r.percentageTo)&&Object.assign(this.percentages,{[A]:{reference:r.percentageTo,referenceIndex:this.dataset.header.map(n=>n.name).indexOf(r.percentageTo)}}),r.rangeFilter&&(Object.assign(this.rangeFilters,{[A]:{min:Math.round(Math.min(...this.dataset.body.map(n=>n.td).map(n=>n[A]))),max:Math.round(Math.max(...this.dataset.body.map(n=>n.td).map(n=>n[A])))}}),Object.assign(this.immutableRangeFilters,{[A]:{min:Math.round(Math.min(...this.dataset.body.map(n=>n.td).map(n=>n[A]))),max:Math.round(Math.max(...this.dataset.body.map(n=>n.td).map(n=>n[A])))}})),r.isPercentage){const n=this.dataset.header.map(i=>i.name).indexOf(r.percentageTo),a=this.dataset.body.map(i=>i.td[n]).reduce((i,s)=>i+s,0);e.push([A,n,a])}r.type===this.constants.NUMERIC&&!r.isPercentage&&Object.assign(this.hasNaN,{[A]:this.includesNaN(this.dataset.body.map(n=>Number(n.td[A])))})}),this.bodyCopy.forEach((r,A)=>{e.map(n=>{const[a,i,s]=n;r.td[a]=r.td[i]/s}),r.td.forEach((n,a)=>{this.dataset.header[a].type===this.constants.TEXT&&this.dataset.header[a].isSearch&&(r[a]=this.stringToNumber(n)),this.dataset.header[a].type===this.constants.DATE&&(r[a]=new Date(n).getTime()),this.dataset.header[a].type===this.constants.NUMERIC&&(r[a]=isNaN(Number(n))?a:n),this.tableBody[A][a]=r[a]})}),t(!0)})},promiseWithAsyncFunction(t,e){return new Promise((r,A)=>{t().then(n=>{try{const a=e(n);r(a)}catch(a){A(a)}}).catch(n=>{A(n)})})},resetDates(t){this.dates[t]={from:this.getDatesRange(t).from,to:this.getDatesRange(t).to},this.filteredDatesIndexes[t]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(t,e,r){const A=r.currentTarget;clearTimeout(this.buttonTimeout),A.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{A.classList.remove("clicked")},200),this.currentFilter=void 0,e.rangeFilter&&(this.rangeFilters[t].min=this.immutableRangeFilters[t].min,this.rangeFilters[t].max=this.immutableRangeFilters[t].max),e.isMultiselect?(this.multiselects[t]=this.getDropdownOptions(t),e.type===this.constants.TEXT&&(this.sorts[t]=void 0),e.isSearch&&(this.searches[t]="")):e.type===this.constants.NUMERIC?this.sorts[t]=void 0:e.type===this.constants.TEXT?(this.sorts[t]=void 0,this.searches[t]=""):e.type===this.constants.DATE&&(this.sorts[t]=void 0),this.filterBody()},resetSelection(){const t=document.getElementsByClassName(`tr_${this.uid}`);Array.from(t).forEach(e=>{Array.from(e.getElementsByTagName("td")).forEach(r=>{r.dataset.row==="even"?(r.style.background=this.tableConfig.style.rows.even.backgroundColor,r.style.color=this.tableConfig.style.rows.even.color):(r.style.background=this.tableConfig.style.rows.odd.backgroundColor,r.style.color=this.tableConfig.style.rows.odd.color)})}),Array.from(t).forEach(e=>e.dataset.selected="false"),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),this.showChart=!1,this.currentDonut=void 0,this.selectedColumn=void 0,this.chart.type=this.constants.BAR,this.currentSelectionSpan={col:void 0,rows:[]},this.clientX=100,this.clientY=100},selectColumn(t){this.currentSelectionSpan.col!==t?(this.visibleRows.forEach((e,r)=>{this.selectTd({td:e.td[t],rowIndex:r,colIndex:t,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${r}_${t}_${this.uid}`)}})}),this.selectedColumn=t):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(t,e){this.multiselects[e].includes(t)?this.multiselects[e]=this.multiselects[e].filter(r=>r!==t):this.multiselects[e].push(t),this.$forceUpdate(),this.filterBody()},selectTd({td:t,rowIndex:e,colIndex:r,headerType:A,event:n}){if(A!==this.constants.NUMERIC||isNaN(Number(t))){this.resetSelection();return}this.currentSelectionSpan.col!==r&&this.resetSelection();const a=n.currentTarget.parentNode;this.currentSelectionSpan.col=r,this.currentSelectionSpan.rows.map(i=>i.index).includes(e)?(a.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(i=>i.index!==e),n.currentTarget.classList.remove(this.cssClass.CELL),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.backgroundColor,i.style.color=this.tableConfig.style.rows.even.olor):(i.style.background=this.tableConfig.style.rows.odd.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.color)}),n.currentTarget.dataset.row==="even"?(n.currentTarget.style.background=this.tableConfig.style.rows.even.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.even.color):(n.currentTarget.style.background=this.tableConfig.style.rows.odd.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.odd.color)):(a.dataset.selected="true",this.currentSelectionSpan.rows.push({index:e,value:t}),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.even.selectedNeighbors.color):(i.style.background=this.tableConfig.style.rows.odd.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.selectedNeighbors.color)}),n.currentTarget.dataset.row==="odd"?(n.currentTarget.style.background=this.tableConfig.style.rows.odd.selectedCell.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.odd.selectedCell.color):(n.currentTarget.style.background=this.tableConfig.style.rows.even.selectedCell.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((i,s)=>i.index-s.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(t){this.filteredDatesIndexes[t]=!(this.getDatesRange(t).from===this.dates[t].from&&this.getDatesRange(t).to===this.dates[t].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(t=>{this.filterByRange(this.bodyCopy,t)}),Object.keys(this.sorts).forEach(t=>{this.sortByNumber(this.bodyCopy,t)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((t,e)=>{if(t.isPercentage){const r=this.percentages[e].referenceIndex,A=this.bodyCopy.map(n=>n.td[r]).reduce((n,a)=>n+a,0);this.bodyCopy.forEach(n=>{n.td[e]=n.td[r]/A})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(t,e){this.bodyCopy=t.filter(r=>r.td[e]>=this.rangeFilters[e].min&&r[e]<=this.rangeFilters[e].max)},sortByNumber(t,e){if(this.sorts[e]===this.constants.ASC&&(t=t.sort((r,A)=>r[e]-A[e])),this.sorts[e]===this.constants.DESC)t=t.sort((r,A)=>A[e]-r[e]);else return 0},sortTh(t,e){this.currentFilter=t;const r=e.currentTarget;clearTimeout(this.buttonTimeout),r.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{r.classList.remove("clicked")},200),this.sorts[t]===1?this.sorts[t]=this.constants.DESC:this.sorts[t]=this.constants.ASC,this.sortBody()},stringToNumber(t){let e=0;for(let r=0;r<t.length;r+=1)e+=t.charCodeAt(r);return e},toggleMultiselect(t,e,r){const A=r.currentTarget;clearTimeout(this.buttonTimeout),A.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{A.classList.remove("clicked")},200);const n=document.getElementById(`th_dropdown_${t}`);n.dataset.isOpen==="false"?n.dataset.isOpen="true":n.dataset.isOpen="false"},updateCurrentPage(t){this.resetSelection(),this.currentPage=Number(t.target.value)},calcDonutMarkerConnectorColor(t){return t.proportion*100>3?t.color:"transparent"},calcDonutMarkerLabelPositionX(t){return t.center.endX+this.calcMarkerOffset(t,50)},calcMarkerOffset(t,e){return t.center.endX-e>=0?3:-2},displayArcPercentage(t,e){return isNaN(t.value/this.sumValues(e))?0:(t.value/this.sumValues(e)*100).toFixed(0)+"%"},isArcBigEnough(t){return t.proportion*100>3},sumValues(t){return[...t].map(e=>e.value).reduce((e,r)=>e+r,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(t){t=t||window.event,t.preventDefault(),document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(t){this.rafId||(this.rafId=window.requestAnimationFrame(()=>this.onElementDrag(t)))},onElementDrag(t){t=t||window.event,t.preventDefault();const r=this.$refs.chartModal.getBoundingClientRect();this.clientX=t.clientX-r.width/2,this.clientY=t.clientY-r.height/2,this.rafId=null}}},zn=t=>(u.pushScopeId("data-v-80d709a0"),t=t(),u.popScopeId(),t),AP={class:"vue-ui-table-export-hub"},nP=["innerHTML"],aP=["data-is-open"],iP=zn(()=>u.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),sP={class:"vue-ui-table-export-hub-options"},oP={class:"vue-ui-table-export-hub-option-wrapper"},lP={class:"label"},cP=["innerHTML"],fP={class:"vue-ui-table-export-hub-option-wrapper"},uP={class:"label"},hP=["innerHTML"],dP={class:"vue-ui-table"},gP={id:"tableHead"},pP=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),mP={key:0},vP={key:0},wP={key:1},BP=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),yP={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},xP=["innerHTML"],CP={key:0,style:{"margin-left":"3px"}},bP=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),EP={key:0},FP=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),SP={class:"th-filter"},_P={key:0,class:"th-date"},TP={class:"date-wrapper--inputs"},UP={class:"date-fieldset"},IP=["for"],NP=["id","onUpdate:modelValue","onInput"],LP={class:"date-fieldset"},QP=["for"],kP=["id","onUpdate:modelValue","onInput"],OP={class:"date-wrapper--button"},DP=["onClick"],PP=["innerHTML"],MP=["innerHTML"],RP=["innerHTML"],HP=["onClick","disabled"],VP=["placeholder","onUpdate:modelValue","name"],KP=["onClick"],GP=["innerHTML"],jP=["innerHTML"],zP=["innerHTML"],WP=["onClick","innerHTML"],XP=["innerHTML"],qP={key:5,class:"th-range-filter"},YP=["for"],$P=zn(()=>u.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1)),JP=zn(()=>u.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)),ZP=["id","max","min","onUpdate:modelValue"],e7=["id","max","min","onUpdate:modelValue"],t7=["for"],r7=zn(()=>u.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1)),A7=zn(()=>u.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)),n7=["onClick","disabled"],a7=["id"],i7=["onClick"],s7=["onClick","onKeyup"],o7=zn(()=>u.createElementVNode("th",{class:"invisible-cell"},null,-1)),l7=["innerHTML","onClick","onKeyup"],c7=["data-row"],f7=["data-row"],u7=["data-row","onClick","onKeyup","id"],h7=["innerHTML"],d7={key:1},g7={key:2},p7={key:5},m7=["innerHTML"],v7={key:0},w7={style:{"margin-left":"12px"}},B7={class:"format-num"},y7={style:{"margin-left":"12px"}},x7={key:0,class:"format-num"},C7={key:1,class:"format-num"},b7={key:2},E7={style:{"margin-left":"12px"}},F7={key:0,class:"format-num"},S7={key:1,class:"format-num"},_7={key:2},T7={key:0,class:"vue-ui-table-paginator format-num"},U7={key:1,class:"vue-ui-table-size-warning"},I7=["innerHTML"],N7={key:3,class:"vue-ui-table-pagination format-num"},L7=["innerHTML","disabled"],Q7=["disabled"],k7={key:0,class:"vue-ui-table-page-scroller-wrapper"},O7={for:"pageScroller",style:{"font-size":"14px"}},D7=["max","value"],P7={key:1},M7=["disabled"],R7=["innerHTML","disabled"],H7={class:"chart-modal-options"},V7=["innerHTML"],K7=["innerHTML"],G7=["innerHTML"],j7={style:{"margin-bottom":"12px"}},z7={key:0},W7={key:1},X7={style:{width:"100%",height:"fit-content",cursor:"move"},ref:"chartModal"},q7={class:"vue-ui-table-fieldset"},Y7={class:"vue-ui-table-fieldset-wrapper"},$7=["name","id","checked","onInput"],J7=["for"],Z7=["disabled"],eM=["innerHTML"],tM=["viewBox"],rM=["markerWidth","markerHeight","refY"],AM=["points","fill"],nM=["x2","y1","y2","stroke","stroke-width"],aM=["y2","stroke","stroke-width"],iM=["x","width","height","fill"],sM=u.createStaticVNode('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD80" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD80" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DDB3" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD66" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD66" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DDB3" data-v-80d709a0></stop></linearGradient>',4),oM=["x","y","height","width","fill","stroke"],lM=["x","y","width"],cM=["x1","y1","x2","y2","stroke-width","stroke"],fM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],uM=["cx","cy","r","fill","stroke","stroke-width"],hM=["x","y","width"],dM=["x","width","height","onMouseenter"],gM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],pM=zn(()=>u.createElementVNode("span",null,"---",-1)),mM=["d","stroke"],vM=["x","y"],wM={class:"vue-ui-table-donut-label-name"},BM=["fill"],yM=["fill"],xM=["fill"],CM=["fill"],bM={class:"vue-ui-table-donut-legend"};function EM(t,e,r,A,n,a){return u.openBlock(),u.createElementBlock("div",{class:"vue-ui-table-main",style:u.normalizeStyle(`font-family: ${a.tableConfig.fontFamily}`)},[u.createElementVNode("div",AP,[u.createElementVNode("button",{onClick:e[0]||(e[0]=i=>n.isExportRequest=!n.isExportRequest),innerHTML:a.icons.export,style:u.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},null,12,nP),u.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":n.isExportRequest||"false",style:u.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},[iP,u.createElementVNode("button",{class:"close-dropdown",onClick:e[1]||(e[1]=i=>n.isExportRequest=!1),style:u.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),u.createElementVNode("div",sP,[u.createElementVNode("div",oP,[u.createElementVNode("div",lP,u.toDisplayString(a.tableConfig.translations.exportAllLabel)+" ("+u.toDisplayString(n.bodyCopy.length)+") ",1),u.createElementVNode("button",{id:"exportAll",onClick:e[2]||(e[2]=i=>a.createXls("all")),style:u.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[u.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,cP),u.createElementVNode("span",null,u.toDisplayString(a.tableConfig.translations.exportAllButton),1)],4)]),u.createElementVNode("div",fP,[u.createElementVNode("div",uP,u.toDisplayString(a.tableConfig.translations.exportPageLabel),1),u.createElementVNode("button",{id:"exportPage",onClick:e[3]||(e[3]=i=>a.createXls("page")),style:u.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[u.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,hP),u.createElementVNode("span",null,u.toDisplayString(a.tableConfig.translations.exportPageButton),1)],4)])])],12,aP)]),u.createElementVNode("div",{class:"vue-ui-table__wrapper",style:u.normalizeStyle(`max-height:${a.tableConfig.maxHeight}px`),ref:"tableWrapper"},[u.createElementVNode("table",dP,[u.createElementVNode("thead",gP,[u.createElementVNode("tr",null,[pP,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`thead_${s}`,style:u.normalizeStyle(`overflow: visible;background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`),class:u.normalizeClass({"th-has-nan":n.hasNaN[s]})},[a.hasNumericTypes&&([n.constants.TEXT,n.constants.DATE].includes(i.type)||i.isPercentage)?(u.openBlock(),u.createElementBlock("span",mP,[u.createTextVNode(u.toDisplayString(i.name)+" ",1),i.isPercentage?(u.openBlock(),u.createElementBlock("span",vP," / "+u.toDisplayString(i.percentageTo),1)):u.createCommentVNode("",!0)])):(u.openBlock(),u.createElementBlock("span",wP,u.toDisplayString(i.name),1))],6))),128))]),a.hasNumericTypes?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createElementVNode("tr",null,[BP,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`thead_${s}`,class:u.normalizeClass({"th-numeric":!0,"th-has-nan":n.hasNaN[s]}),style:u.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.sum&&!n.hasNaN[s]?(u.openBlock(),u.createElementBlock("span",yP,[u.createElementVNode("span",{innerHTML:a.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,xP),u.createTextVNode(" "+u.toDisplayString(i.prefix)+" "+u.toDisplayString(Number(a.getSum(s).toFixed(i.decimals)).toLocaleString())+" "+u.toDisplayString(i.suffix)+" ",1),n.percentages[s]&&i.percentageTo&&!i.isPercentage?(u.openBlock(),u.createElementBlock("span",CP," ("+u.toDisplayString(isNaN(a.getSum(s)/a.getSum(n.percentages[s].referenceIndex))?"-":(a.getSum(s)/a.getSum(n.percentages[s].referenceIndex)*100).toFixed(i.decimals))+"%) ",1)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],6))),128))]),u.createElementVNode("tr",null,[bP,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`thead_${s}`,class:u.normalizeClass({"th-numeric":!0,"th-has-nan":n.hasNaN[s]}),style:u.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.average&&!n.hasNaN[s]?(u.openBlock(),u.createElementBlock("span",EP," ~ "+u.toDisplayString(i.prefix)+" "+u.toDisplayString(isNaN(a.getAverage(s))?"":Number(a.getAverage(s).toFixed(i.decimals)).toLocaleString())+" "+u.toDisplayString(i.suffix),1)):u.createCommentVNode("",!0)],6))),128))]),u.createElementVNode("tr",null,[FP,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`thead_${s}`,class:u.normalizeClass({"th-has-nan":n.hasNaN[s]}),style:u.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[u.createElementVNode("div",SP,[i.type===n.constants.DATE&&n.dates[s]?(u.openBlock(),u.createElementBlock("div",_P,[u.createElementVNode("div",TP,[u.createElementVNode("div",UP,[u.createElementVNode("label",{for:`from_${s}`},u.toDisplayString(a.tableConfig.translations.from),9,IP),u.withDirectives(u.createElementVNode("input",{id:`from_${s}`,type:"date","onUpdate:modelValue":o=>n.dates[s].from=o,onInput:o=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,NP),[[u.vModelText,n.dates[s].from]])]),u.createElementVNode("div",LP,[u.createElementVNode("label",{for:`to_${s}`},u.toDisplayString(a.tableConfig.translations.to),9,QP),u.withDirectives(u.createElementVNode("input",{id:`to_${s}`,type:"date","onUpdate:modelValue":o=>n.dates[s].to=o,onInput:o=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,kP),[[u.vModelText,n.dates[s].to]])])]),u.createElementVNode("div",OP,[i.isSort?(u.openBlock(),u.createElementBlock("button",{key:0,onClick:o=>a.sortTh(s,o),class:u.normalizeClass({"th-button-active":[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])}),style:u.normalizeStyle(`background:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[n.sorts[s]===n.constants.ASC?(u.openBlock(),u.createElementBlock("span",{key:0,innerHTML:[n.constants.DATE].includes(i.type)?a.icons.sort09:a.icons.sortAZ},null,8,PP)):n.sorts[s]===n.constants.DESC?(u.openBlock(),u.createElementBlock("span",{key:1,innerHTML:[n.constants.DATE].includes(i.type)?a.icons.sort90:a.icons.sortZA},null,8,MP)):(u.openBlock(),u.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,RP))],14,DP)):u.createCommentVNode("",!0),u.createElementVNode("button",{onClick:o=>{a.resetDates(s),a.resetFilter(s,i,o)},disabled:!n.filteredDatesIndexes[s]&&a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,HP)])])):u.createCommentVNode("",!0),i.isSearch?u.withDirectives((u.openBlock(),u.createElementBlock("input",{key:1,placeholder:a.tableConfig.translations.inputPlaceholder,"onUpdate:modelValue":o=>n.searches[s]=o,onInput:e[4]||(e[4]=o=>a.debounce(a.filterBody,400)),name:`search_${s}`,style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,VP)),[[u.vModelText,n.searches[s]]]):u.createCommentVNode("",!0),!n.hasNaN[s]&&i.isSort&&i.type!==n.constants.DATE?(u.openBlock(),u.createElementBlock("button",{key:2,onClick:o=>a.sortTh(s,o),class:u.normalizeClass({"th-button-active":[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])}),style:u.normalizeStyle(`background:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[n.sorts[s]===n.constants.ASC?(u.openBlock(),u.createElementBlock("span",{key:0,innerHTML:[n.constants.NUMERIC].includes(i.type)?a.icons.sort09:a.icons.sortZA},null,8,GP)):n.sorts[s]===n.constants.DESC?(u.openBlock(),u.createElementBlock("span",{key:1,innerHTML:[n.constants.NUMERIC].includes(i.type)?a.icons.sort90:a.icons.sortAZ},null,8,jP)):(u.openBlock(),u.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,zP))],14,KP)):u.createCommentVNode("",!0),i.isMultiselect?(u.openBlock(),u.createElementBlock("button",{key:3,onClick:o=>a.toggleMultiselect(s,i,o),innerHTML:a.icons.filter,class:u.normalizeClass({"th-button-active":n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length}),style:u.normalizeStyle(`background:${n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,WP)):u.createCommentVNode("",!0),n.currentSelectionSpan.col===s&&a.canChart?(u.openBlock(),u.createElementBlock("button",{key:4,onClick:e[5]||(e[5]=o=>n.showChart=!n.showChart),innerHTML:a.icons.chart,class:u.normalizeClass({"th-button-active":n.showChart}),style:u.normalizeStyle(`background:${n.showChart?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${n.showChart?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,XP)):u.createCommentVNode("",!0),i.rangeFilter&&n.rangeFilters[s]&&!n.hasNaN[s]?(u.openBlock(),u.createElementBlock("div",qP,[u.createElementVNode("label",{for:`rangeMin${s}`},[$P,u.createTextVNode(" min "),JP],8,YP),u.withDirectives(u.createElementVNode("input",{type:"number",id:`rangeMin${s}`,max:n.immutableRangeFilters[s].max,min:n.immutableRangeFilters[s].min,"onUpdate:modelValue":o=>n.rangeFilters[s].min=o,onInput:e[6]||(e[6]=o=>a.debounce(a.filterBody,400)),style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,ZP),[[u.vModelText,n.rangeFilters[s].min,void 0,{number:!0}]]),u.withDirectives(u.createElementVNode("input",{type:"number",id:`rangeMax${s}`,max:n.immutableRangeFilters[s].max,min:n.immutableRangeFilters[s].min,"onUpdate:modelValue":o=>n.rangeFilters[s].max=o,onInput:e[7]||(e[7]=o=>a.debounce(a.filterBody,400)),style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,e7),[[u.vModelText,n.rangeFilters[s].max,void 0,{number:!0}]]),u.createElementVNode("label",{for:`rangeMax${s}`},[r7,u.createTextVNode(" max "),A7],8,t7)])):u.createCommentVNode("",!0),a.canResetColumn(s,i)?(u.openBlock(),u.createElementBlock("button",{key:6,onClick:o=>a.resetFilter(s,i,o),disabled:a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,n7)):u.createCommentVNode("",!0),i.isMultiselect?(u.openBlock(),u.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${s}`,style:u.normalizeStyle(`background:${a.tableConfig.style.dropdowns.backgroundColor};color:${a.tableConfig.style.dropdowns.color}`)},[u.createElementVNode("button",{class:"close-dropdown",onClick:o=>a.toggleMultiselect(s,i,o),style:u.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color}`)}," ✖ ",12,i7),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.getDropdownOptions(s),(o,l)=>(u.openBlock(),u.createElementBlock("span",{class:"th-option",key:`th_option_${s}_${l}`,onClick:c=>a.selectDropdownOption(o,s),onKeyup:[u.withKeys(c=>a.selectDropdownOption(o,s),["enter"]),u.withKeys(c=>a.selectDropdownOption(o,s),["space"])],style:u.normalizeStyle(`opacity:${a.isDropdownOptionSelected(o,s)?1:.5}`),tabindex:"0"},[a.isDropdownOptionSelected(o,s)?(u.openBlock(),u.createElementBlock("span",{key:0,style:u.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.selected.color};margin-right:5px`),class:"th-icon-green"},u.toDisplayString(a.tableConfig.style.dropdowns.icons.selected.unicode),5)):(u.openBlock(),u.createElementBlock("span",{key:1,style:u.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.unselected.color};margin-right:5px`),class:"th-icon-red"},u.toDisplayString(a.tableConfig.style.dropdowns.icons.unselected.unicode),5)),u.createElementVNode("span",null,u.toDisplayString(o),1)],44,s7))),128))],12,a7)):u.createCommentVNode("",!0)])],6))),128))])],64)):u.createCommentVNode("",!0),u.createElementVNode("tr",null,[o7,(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.tableHead,(i,s)=>(u.openBlock(),u.createElementBlock("th",{key:`col_selector_${s}`,class:u.normalizeClass({"vue-ui-table-col-selector":!n.hasNaN[s],"th-has-nan":n.hasNaN[s]}),style:u.normalizeStyle(`background:${s===n.selectedColumn&&!n.hasNaN[s]?a.tableConfig.style.th.selected.backgroundColor:a.tableConfig.style.th.backgroundColor};color:${s===n.selectedColumn&&!n.hasNaN[s]?a.tableConfig.style.th.selected.color:a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[n.hasNaN[s]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",{key:0,innerHTML:n.tableHead[s].type===n.constants.NUMERIC?a.icons.chevronDown:"",class:u.normalizeClass({"col-selector":n.tableHead[s].type===n.constants.NUMERIC}),tabindex:"0",onClick:u.withModifiers(o=>a.selectColumn(s),["stop"]),onKeyup:u.withKeys(o=>a.selectColumn(s),["enter"])},null,42,l7))],6))),128))])]),u.createElementVNode("tbody",{onClick:e[8]||(e[8]=(...i)=>a.closeAllDropdowns&&a.closeAllDropdowns(...i)),onKeydown:e[9]||(e[9]=i=>a.navigateCell(i))},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.visibleRows,(i,s)=>(u.openBlock(),u.createElementBlock("tr",{key:`tbody_${s}`,"data-row":s%2===0?"odd":"even",class:u.normalizeClass(`tr_${n.uid}`),style:u.normalizeStyle(`${s%2===0?`background:${a.tableConfig.style.rows.odd.backgroundColor};color:${a.tableConfig.style.rows.odd.color}`:`background:${a.tableConfig.style.rows.even.backgroundColor};color:${a.tableConfig.style.rows.even.color}`}`)},[u.createElementVNode("td",{class:"vue-ui-table-td-iteration","data-row":s%2===0?"odd":"even"},u.toDisplayString(i.absoluteIndex+1),9,f7),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.td,(o,l)=>(u.openBlock(),u.createElementBlock("td",{"data-row":s%2===0?"odd":"even",key:`td_${s}_${l}`,style:u.normalizeStyle(a.isNumeric(o)||r.dataset.header[l].type===n.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),onKeyup:[u.withKeys(c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),["enter"]),u.withKeys(c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),["space"])],class:u.normalizeClass({"td-numeric":r.dataset.header[l].type===n.constants.NUMERIC,"td-focusable":!0,"td-has-nan":n.hasNaN[l]}),id:`cell_${s}_${l}_${n.uid}`,tabindex:"0"},[i.meta&&i.meta.markerIndices.includes(l)&&i.meta.unicodeIcon?(u.openBlock(),u.createElementBlock("span",{key:0,style:u.normalizeStyle(`color:${i.meta.color};margin-right:3px`),innerHTML:i.meta.unicodeIcon},null,12,h7)):u.createCommentVNode("",!0),r.dataset.header[l].type===n.constants.DATE?(u.openBlock(),u.createElementBlock("span",d7,u.toDisplayString(r.dataset.header[l].prefix)+" "+u.toDisplayString(new Date(o).toLocaleString().slice(0,10))+" "+u.toDisplayString(r.dataset.header[l].suffix),1)):r.dataset.header[l].isPercentage?(u.openBlock(),u.createElementBlock("span",g7,u.toDisplayString(Number((o*100).toFixed(r.dataset.header[l].decimals)).toLocaleString())+"% ",1)):n.percentages[l]&&r.dataset.header[l].percentageTo&&!r.dataset.header[l].isPercentage?(u.openBlock(),u.createElementBlock("span",{key:3,class:u.normalizeClass({"td-nan":isNaN(Number(o))})},u.toDisplayString(r.dataset.header[l].prefix)+" "+u.toDisplayString(isNaN(Number(o))?`${o} is not ${n.constants.NUMERIC}`:Number(o.toFixed(r.dataset.header[l].decimals)).toLocaleString())+" "+u.toDisplayString(r.dataset.header[l].suffix)+" ("+u.toDisplayString(isNaN(Number(o))?"":Number((o/a.getSum(n.percentages[l].referenceIndex)*100).toFixed(r.dataset.header[l].decimals)).toLocaleString())+"%) ",3)):r.dataset.header[l].type===n.constants.NUMERIC?(u.openBlock(),u.createElementBlock("span",{key:4,class:u.normalizeClass({"td-nan":isNaN(Number(o))})},u.toDisplayString(r.dataset.header[l].prefix)+" "+u.toDisplayString(isNaN(Number(o))?`${o} is not ${n.constants.NUMERIC}`:Number(o.toFixed(r.dataset.header[l].decimals)).toLocaleString())+" "+u.toDisplayString(r.dataset.header[l].suffix),3)):(u.openBlock(),u.createElementBlock("span",p7,u.toDisplayString(r.dataset.header[l].prefix)+" "+u.toDisplayString(o)+" "+u.toDisplayString(r.dataset.header[l].suffix),1))],46,u7))),128))],14,c7))),128))],32)])],4),u.createElementVNode("div",{class:u.normalizeClass({"td-selector-info":!0,"td-selector-info--active":n.currentSelectionSpan.col!==void 0&&n.currentSelectionSpan.rows.length}),style:u.normalizeStyle(`background:${a.tableConfig.style.infoBar.backgroundColor};color:${a.tableConfig.style.infoBar.color}`)},[n.currentSelectionSpan.col!==void 0&&n.currentSelectionSpan.rows.length?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createElementVNode("div",{innerHTML:a.icons.table,class:"td-selector-icon"},null,8,m7),u.createElementVNode("span",null,[u.createElementVNode("b",null,[u.createTextVNode(u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].name)+" ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("span",v7," / "+u.toDisplayString(r.dataset.header[n.percentages[n.currentSelectionSpan.col].referenceIndex].name),1)):u.createCommentVNode("",!0)]),u.createElementVNode("span",w7,[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.nb)+" : ",1),u.createElementVNode("b",B7,u.toDisplayString(n.currentSelectionSpan.rows.length),1)]),u.createElementVNode("span",y7,[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.sum)+" : ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("b",x7,u.toDisplayString(a.selectedCellsCalculations.sumPercentage),1)):(u.openBlock(),u.createElementBlock("b",C7,u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.selectedCellsCalculations.sumRegular)+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1)),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("b",b7,"%")):u.createCommentVNode("",!0)]),u.createElementVNode("span",E7,[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.average)+" : ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("b",F7,u.toDisplayString(a.selectedCellsCalculations.averagePercentage),1)):(u.openBlock(),u.createElementBlock("b",S7,u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.selectedCellsCalculations.averageRegular)+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1)),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(u.openBlock(),u.createElementBlock("b",_7,"%")):u.createCommentVNode("",!0)])]),u.createElementVNode("button",{onClick:e[10]||(e[10]=(...i)=>a.resetSelection&&a.resetSelection(...i)),class:"td-selector-info-reset",style:u.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4)],64)):u.createCommentVNode("",!0)],6),n.bodyCopy.length>10?(u.openBlock(),u.createElementBlock("div",T7,[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.totalRows)+" : "+u.toDisplayString(r.dataset.body.length)+" | "+u.toDisplayString(a.tableConfig.translations.paginatorLabel)+" : ",1),n.bodyCopy.length>10?u.withDirectives((u.openBlock(),u.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":e[11]||(e[11]=i=>n.itemsPerPage=i),onChange:e[12]||(e[12]=(...i)=>a.resetSelection&&a.resetSelection(...i)),style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.paginatorOptions,(i,s)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[n.bodyCopy.length>i||r.dataset.body.length===i?(u.openBlock(),u.createElementBlock("option",{key:`paginator_option_${s}`},u.toDisplayString(i),1)):u.createCommentVNode("",!0)],64))),256))],36)),[[u.vModelSelect,n.itemsPerPage,void 0,{number:!0}]]):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0),n.itemsPerPage>=250?(u.openBlock(),u.createElementBlock("div",U7,[u.createElementVNode("span",{innerHTML:a.icons.warning},null,8,I7),u.createTextVNode(u.toDisplayString(a.tableConfig.translations.sizeWarning),1)])):u.createCommentVNode("",!0),a.pages.length>1&&a.pages.length<=10?(u.openBlock(),u.createElementBlock("div",{key:2,class:"vue-ui-table-navigation-indicator",style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.navigationIndicator.backgroundColor};width:calc(${n.currentPage/(a.pages.length-1)*100}%)`)},null,4)):u.createCommentVNode("",!0),a.pages.length>1?(u.openBlock(),u.createElementBlock("div",N7,[u.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[13]||(e[13]=u.withModifiers(i=>a.navigate("previous"),["stop"])),innerHTML:a.icons.chevronLeft,disabled:n.currentPage===0,style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,L7),a.pages.length>3?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[14]||(e[14]=u.withModifiers(i=>a.navigate(1),["stop"])),disabled:n.currentPage===0,style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,Q7),a.pages.length>10?(u.openBlock(),u.createElementBlock("div",k7,[u.createElementVNode("label",O7,u.toDisplayString(a.tableConfig.translations.page)+" "+u.toDisplayString(n.currentPage+1)+" / "+u.toDisplayString(a.pages.length),1),u.createElementVNode("input",{class:"vue-ui-table-page-scroller",id:"pageScroller",type:"range",step:"1",min:0,max:a.pages.length-1,onInput:e[15]||(e[15]=i=>a.updateCurrentPage(i)),value:n.currentPage,style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,D7)])):(u.openBlock(),u.createElementBlock("span",P7,u.toDisplayString(a.tableConfig.translations.page)+" "+u.toDisplayString(n.currentPage+1)+" / "+u.toDisplayString(a.pages.length),1)),u.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[16]||(e[16]=u.withModifiers(i=>a.navigate(a.pages.length),["stop"])),disabled:n.currentPage===a.pages.length-1,style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},u.toDisplayString(a.pages.length),13,M7)],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(a.tableConfig.translations.page)+" "+u.toDisplayString(n.currentPage+1)+" / "+u.toDisplayString(a.pages.length),1)],64)),u.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[17]||(e[17]=u.withModifiers(i=>a.navigate("next"),["stop"])),innerHTML:a.icons.chevronRight,disabled:n.currentPage===a.pages.length-1,style:u.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,R7)])):u.createCommentVNode("",!0),n.showChart&&a.canChart?(u.openBlock(),u.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:u.normalizeStyle(`top:${n.clientY}px; left:${n.clientX}px;background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[u.createElementVNode("button",{class:"close-chart-modal",onClick:e[18]||(e[18]=i=>n.showChart=!1),style:u.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),u.createElementVNode("div",H7,[a.availableDonutCategories.length?(u.openBlock(),u.createElementBlock("button",{key:0,onClick:e[19]||(e[19]=i=>n.showDonutOptions=!0),innerHTML:a.icons.donut,class:u.normalizeClass({"is-active-chart":n.chart.type===n.constants.DONUT||n.showDonutOptions}),style:u.normalizeStyle(`background:${n.chart.type===n.constants.DONUT||n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.DONUT||n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,V7)):u.createCommentVNode("",!0),u.createElementVNode("button",{onClick:e[20]||(e[20]=i=>{n.chart.type=n.constants.LINE,n.showDonutOptions=!1}),innerHTML:a.icons.chart,class:u.normalizeClass({"is-active-chart":n.chart.type===n.constants.LINE&&!n.showDonutOptions}),style:u.normalizeStyle(`background:${n.chart.type===n.constants.LINE&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.LINE&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,K7),u.createElementVNode("button",{onClick:e[21]||(e[21]=i=>{n.chart.type=n.constants.BAR,n.showDonutOptions=!1}),innerHTML:a.icons.bar,class:u.normalizeClass({"is-active-chart":n.chart.type===n.constants.BAR&&!n.showDonutOptions}),style:u.normalizeStyle(`background:${n.chart.type===n.constants.BAR&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.BAR&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,G7)]),u.createElementVNode("div",j7,[u.createElementVNode("b",null,[u.createTextVNode(u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].name)+" ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage&&r.dataset.header[n.currentSelectionSpan.col].percentageTo?(u.openBlock(),u.createElementBlock("span",z7," / "+u.toDisplayString(r.dataset.header[n.percentages[n.currentSelectionSpan.col].referenceIndex].name),1)):u.createCommentVNode("",!0),n.chart.type===n.constants.DONUT&&n.selectedDonutCategory&&n.selectedDonutCategory.name?(u.openBlock(),u.createElementBlock("span",W7,u.toDisplayString(a.tableConfig.translations.by)+" "+u.toDisplayString(n.selectedDonutCategory.name),1)):u.createCommentVNode("",!0)])]),u.createElementVNode("div",X7,[n.showDonutOptions&&a.availableDonutCategories.length?(u.openBlock(),u.createElementBlock("div",{key:0,style:u.normalizeStyle(`background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[u.createElementVNode("fieldset",q7,[u.createElementVNode("legend",null,u.toDisplayString(a.tableConfig.translations.chooseCategoryColumn),1),u.createElementVNode("div",Y7,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.availableDonutCategories,(i,s)=>(u.openBlock(),u.createElementBlock("div",{key:`donut_radio_${s}`,class:"vue-ui-table-fieldset-option"},[u.createElementVNode("input",{type:"radio",name:i.name,id:i.name,checked:n.selectedDonutCategory&&i.name===n.selectedDonutCategory.name,onInput:o=>n.selectedDonutCategory=a.availableDonutCategories[s],style:u.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,$7),u.createElementVNode("label",{for:i.name},u.toDisplayString(i.name),9,J7)]))),128))]),u.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!n.selectedDonutCategory,onClick:e[22]||(e[22]=(...i)=>a.applyDonutOption&&a.applyDonutOption(...i)),style:u.normalizeStyle(`background:${a.tableConfig.style.chart.modal.buttons.selected.backgroundColor};color:${a.tableConfig.style.chart.modal.buttons.selected.color}`)},[u.createElementVNode("div",{style:{"margin-bottom":"-3px"},innerHTML:a.icons.donut},null,8,eM),u.createTextVNode(" "+u.toDisplayString(a.tableConfig.translations.makeDonut),1)],12,Z7)])],4)):u.createCommentVNode("",!0),[n.constants.BAR,n.constants.LINE].includes(n.chart.type)&&!n.showDonutOptions?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[(u.openBlock(),u.createElementBlock("svg",{viewBox:`0 0 ${n.chart.width} ${n.chart.height}`,class:"vue-ui-table-chart-svg",style:u.normalizeStyle(`background:${a.tableConfig.style.chart.layout.backgroundColor}`)},[u.createElementVNode("defs",null,[u.createElementVNode("marker",{id:"arrowhead",markerWidth:a.tableConfig.style.chart.layout.progression.arrowSize,markerHeight:a.tableConfig.style.chart.layout.progression.arrowSize,refX:"0",refY:a.tableConfig.style.chart.layout.progression.arrowSize/2,orient:"auto"},[u.createElementVNode("polygon",{points:`0 0, ${a.tableConfig.style.chart.layout.progression.arrowSize} ${a.tableConfig.style.chart.layout.progression.arrowSize/2}, 0 ${a.tableConfig.style.chart.layout.progression.arrowSize}`,fill:a.tableConfig.style.chart.layout.progression.stroke},null,8,AM)],8,rM)]),u.createElementVNode("g",null,[u.createElementVNode("line",{x1:0,x2:n.chart.width,y1:a.chartData.zero,y2:a.chartData.zero,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,nM),u.createElementVNode("line",{x1:0,x2:0,y1:0,y2:n.chart.height,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,aM)]),n.chart.type===n.constants.LINE?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:0},u.renderList(a.chartData.plots,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`trap_fill_${s}`},[u.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:n.chart.height,fill:n.selectedPlot===s?"rgba(0,0,0,0.03)":"transparent"},null,8,iM)]))),128)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.chartData.plots,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`plot_${s}`},[n.chart.type===n.constants.BAR?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[sM,u.createElementVNode("rect",{x:i.x-a.chartData.slot/2,y:a.chartData.isAllNegative?0:a.calcRectY(i.value,i.y),height:i.value>=0?a.chartData.zero-i.y:a.chartData.isAllNegative?i.y:i.y-a.chartData.zero,width:a.chartData.slot,fill:a.tableConfig.style.chart.layout.bar.fill?a.tableConfig.style.chart.layout.bar.fill:n.selectedPlot===s?i.value>=0?"url(#barGradientSelected)":"url(#barGradientSelectedNeg)":(i.value>=0,"url(#barGradient)"),stroke:a.tableConfig.style.chart.layout.bar.stroke,"stroke-width":"1"},null,8,oM),n.selectedPlot===s?(u.openBlock(),u.createElementBlock("foreignObject",{key:0,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:i.value>=0?i.y-32:i.y+4,height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[u.createElementVNode("div",{style:u.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},u.toDisplayString(i.prefix)+" "+u.toDisplayString(Number(i.value.toFixed(r.dataset.header[n.currentSelectionSpan.col].decimals)).toLocaleString())+" "+u.toDisplayString(i.suffix),5)],8,lM)):u.createCommentVNode("",!0)],64)):u.createCommentVNode("",!0),n.chart.type===n.constants.LINE?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[s+1<a.chartData.plots.length?(u.openBlock(),u.createElementBlock("line",{key:0,x1:i.x,y1:i.y,x2:a.chartData.plots[s+1].x,y2:a.chartData.plots[s+1].y,"stroke-width":a.tableConfig.style.chart.layout.line.strokeWidth,stroke:a.tableConfig.style.chart.layout.line.stroke},null,8,cM)):u.createCommentVNode("",!0),n.selectedPlot===s?(u.openBlock(),u.createElementBlock("line",{key:1,x1:i.x,y1:i.y,x2:i.x,y2:n.chart.height,stroke:a.tableConfig.style.chart.layout.line.selector.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.selector.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.line.selector.strokeDasharray},null,8,fM)):u.createCommentVNode("",!0),u.createElementVNode("circle",{cx:i.x,cy:i.y,r:n.selectedPlot===s?a.tableConfig.style.chart.layout.line.plot.radius.selected:a.tableConfig.style.chart.layout.line.plot.radius.unselected,fill:a.tableConfig.style.chart.layout.line.plot.fill,stroke:a.tableConfig.style.chart.layout.line.plot.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.plot.strokeWidth},null,8,uM),n.selectedPlot===s?(u.openBlock(),u.createElementBlock("foreignObject",{key:2,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:a.placeLabelOnTopOrBottom({previousPlot:a.chartData.plots[s-1],currentPlot:i,nextPlot:a.chartData.plots[s+1]}),height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[u.createElementVNode("div",{style:u.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},u.toDisplayString(i.prefix)+" "+u.toDisplayString(Number(i.value.toFixed(r.dataset.header[n.currentSelectionSpan.col].decimals)).toLocaleString())+" "+u.toDisplayString(i.suffix),5)],8,hM)):u.createCommentVNode("",!0)],64)):u.createCommentVNode("",!0)]))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.chartData.plots,(i,s)=>(u.openBlock(),u.createElementBlock("g",{key:`trap_${s}`},[u.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:n.chart.height,fill:"transparent",onMouseenter:o=>n.selectedPlot=s,onMouseleave:e[23]||(e[23]=o=>n.selectedPlot=void 0)},null,40,dM)]))),128)),a.chartData.progression&&a.chartData.plots.length>2?(u.openBlock(),u.createElementBlock("line",{key:1,x1:a.chartData.progression.x1,y1:a.chartData.progression.y1,x2:a.chartData.progression.x2,y2:a.chartData.progression.y2,stroke:a.tableConfig.style.chart.layout.progression.stroke,"stroke-width":a.tableConfig.style.chart.layout.progression.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.progression.strokeDasharray,"marker-end":"url(#arrowhead)"},null,8,gM)):u.createCommentVNode("",!0)],12,tM)),a.chartData.plots.length>=2?(u.openBlock(),u.createElementBlock("div",{key:0,class:"chart-trend",style:u.normalizeStyle(`color:${a.tableConfig.style.chart.modal.color}`)},[pM,u.createTextVNode(" Trend: "),u.createElementVNode("span",null,u.toDisplayString(a.chartData.progression.slope<0?"+":"-"),1),u.createTextVNode(" "+u.toDisplayString((Math.abs(a.chartData.progression.slope)*100).toFixed(1))+" % ",1)],4)):u.createCommentVNode("",!0)],64)):u.createCommentVNode("",!0),[n.constants.DONUT].includes(n.chart.type)&&!n.showDonutOptions?(u.openBlock(),u.createElementBlock(u.Fragment,{key:2},[(u.openBlock(),u.createElementBlock("svg",{viewBox:"0 0 100 100",style:u.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${a.tableConfig.style.chart.layout.backgroundColor}`),class:"vue-ui-table-donut-chart"},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.currentDonut,(i,s)=>(u.openBlock(),u.createElementBlock("path",{key:`arc_${s}`,d:i.path,stroke:`${i.color}CC`,"stroke-width":20,fill:"none"},null,8,mM))),128)),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.currentDonut,(i,s)=>(u.openBlock(),u.createElementBlock("foreignObject",{key:`text_marker_${s}`,x:a.calcDonutMarkerLabelPositionX(i)-15,y:i.center.endY-15,height:"30",width:"30",style:{overflow:"visible",display:"flex","align-items":"center","justify-content":"center"}},[a.isArcBigEnough(i)?(u.openBlock(),u.createElementBlock("div",{key:0,class:"vue-ui-table-donut-label",style:u.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[u.createElementVNode("b",null,u.toDisplayString(a.displayArcPercentage(i,n.currentDonut)),1),u.createElementVNode("span",wM,u.toDisplayString(i.name),1)],4)):u.createCommentVNode("",!0)],8,vM))),128)),u.createElementVNode("text",{x:50,y:42,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},u.toDisplayString(a.tableConfig.translations.total),9,BM),u.createElementVNode("text",{x:50,y:48,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.donutHollowLabels.total)+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),9,yM),u.createElementVNode("text",{x:50,y:56,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},u.toDisplayString(a.tableConfig.translations.average),9,xM),u.createElementVNode("text",{x:50,y:62,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.donutHollowLabels.average)+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),9,CM)],4)),u.createElementVNode("div",bM,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.currentDonut.filter(i=>i.value>0),(i,s)=>(u.openBlock(),u.createElementBlock("div",{class:"vue-ui-table-donut-legend-item",key:`donut_legend_${s}`,style:u.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[u.createElementVNode("span",{style:u.normalizeStyle(`color:${i.color}`)},"●",4),u.createElementVNode("span",null,u.toDisplayString(i.name)+" : ",1),u.createElementVNode("b",null,u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+u.toDisplayString(a.getDonutLegendValue(i.absoluteValue))+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+u.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1),u.createElementVNode("span",null,"("+u.toDisplayString((i.proportion*100).toFixed(1))+"%)",1)],4))),128))])],64)):u.createCommentVNode("",!0)],512)],4)):u.createCommentVNode("",!0)],4)}const FM=b1(rP,[["render",EM],["__scopeId","data-v-80d709a0"]]),NJ="",SM=t=>(u.pushScopeId("data-v-2b80e2cd"),t=t(),u.popScopeId(),t),_M=["id"],TM={class:"vue-ui-donut-user-option-item"},UM=["id","name"],IM=["for"],NM={class:"vue-ui-donut-user-option-item"},LM=["id","name"],QM=["for"],kM={class:"vue-ui-donut-user-option-item"},OM=["id","name"],DM=["for"],PM=["disabled"],MM={key:0,class:"vue-ui-donut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},RM=[u.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-2b80e2cd></path><path d="M18 16v.01" data-v-2b80e2cd></path><path d="M6 16v.01" data-v-2b80e2cd></path><path d="M12 5v.01" data-v-2b80e2cd></path><path d="M12 12v.01" data-v-2b80e2cd></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-2b80e2cd></path>',6)],HM={key:1},VM=["viewBox"],KM=["id"],GM=["stop-color"],jM=["stop-color"],zM=["stop-color"],WM={key:0},XM=["font-size","fill","x"],qM=["font-size","fill","x","y"],YM=["d","stroke","stroke-width"],$M=["cx","cy","fill"],JM=["d","stroke","stroke-width","onMouseenter","onClick"],ZM=["cx","cy","r","fill"],eR=["x","y","fill","font-size"],tR=["x","y","fill","font-size"],rR=["x","y","fill","font-size"],AR=["x","y","fill","font-size"],nR=["x","y","fill","font-size"],aR=["x","y","fill","font-size"],iR=["y"],sR=["onClick"],oR=["onClick"],lR={key:0},cR=["innerHTML"],fR={key:0},uR={key:0},hR=[SM(()=>u.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[u.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],dR={style:{"max-width":"200px margin:0 auto"}},gR=b1({__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t){const e=t,r=u.ref(`vue-ui-donut-${Math.random()}`),A=u.ref({style:{fontFamily:"inherit",chart:{useGradient:!0,gradientIntensity:40,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!1,labels:{dataLabels:{show:!0,hideUnderValue:3},percentage:{color:"#2D353C",bold:!0,fontSize:18},name:{color:"#2D353C",bold:!1,fontSize:14},hollow:{total:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Total",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}},average:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Average",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}}}},donut:{strokeWidth:64}},legend:{backgroundColor:"#FFFFFF",color:"#2D353C",show:!0,fontSize:16,bold:!1,roundingValue:0,roundingPercentage:0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,color:"#2D353C",backgroundColor:"#FFFFFF",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",useDiv:"Title & legend inside",showTable:"Show table"}},translations:{total:"Total",average:"Average"},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),n=u.ref(!1),a=u.ref(null),i=u.ref(null),s=u.ref(null),o=u.ref({x:0,y:0}),l=u.ref(!1),c=u.ref("TEST"),d=u.ref(null);u.onMounted(()=>{document.addEventListener("mousemove",g)}),u.onBeforeUnmount(()=>{document.removeEventListener("mousemove",g)});function g(ae){o.value.x=ae.clientX,o.value.y=ae.clientY}const h=u.computed(()=>{let ae=0,se=48;if(i.value&&a.value){const{width:ye,height:C}=i.value.getBoundingClientRect(),_=a.value.getBoundingClientRect();o.value.x+ye/2>_.right?ae=-ye:o.value.x-ye/2<_.left?ae=0:ae=-ye/2,o.value.y+C>_.bottom&&(se=-C-48)}return{top:o.value.y+se,left:o.value.x+ae}}),m=u.computed(()=>Object.keys(e.config||{}).length?Mu({defaultConfig:A.value,userConfig:e.config}):A.value),v=u.ref({dataLabels:{show:m.value.style.chart.layout.labels.dataLabels.show},inside:m.value.style.chart.layout.useDiv,showTable:m.value.table.show}),B=u.computed(()=>({height:v.value.inside||n.value?512:360,width:512})),x=u.ref([]);function b(ae){x.value.includes(ae)?x.value=x.value.filter(se=>se!==ae):x.value.push(ae)}const F=u.computed(()=>e.dataset.map((ae,se)=>({name:ae.name,color:ae.color||Ui[se]||Ui[se%Ui.length],value:ae.values.reduce((ye,C)=>ye+C,0),absoluteValues:ae.values})).sort((ae,se)=>se.value-ae.value).filter((ae,se)=>!x.value.includes(se))),O=u.computed(()=>e.dataset.map((ae,se)=>({name:ae.name,color:ae.color||Ui[se]||Ui[se%Ui.length],value:ae.values.reduce((ye,C)=>ye+C,0)})).sort((ae,se)=>se.value-ae.value)),W=u.computed(()=>jy({series:F.value},B.value.width/2,B.value.height/2,100,100));function q(ae){return ae.center.endX+L(ae,256)}function L(ae,se){return ae.center.endX-se>=0?30:-30}function k(ae){return ae.proportion*100>m.value.style.chart.layout.labels.dataLabels.hideUnderValue}function K(ae,se){return isNaN(ae.value/re(se))?0:(ae.value/re(se)*100).toFixed(0)+"%"}function re(ae){return[...ae].map(se=>se.value).reduce((se,ye)=>se+ye,0)}const U=u.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),T=u.computed(()=>F.value.map(ae=>ae.value).reduce((ae,se)=>ae+se,0)),V=u.computed(()=>T.value/F.value.length);function Y(){s.value&&s.value.removeAttribute("open")}function ue(ae,se,ye=!0){l.value=ye,d.value=se;let C="";C+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${ae.name}</div>`,C+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${ae.color};font-size:${m.value.style.chart.tooltip.fontSize*1.6}px;">●</span>`,m.value.style.chart.tooltip.showValue&&(C+=`<b>${ae.value.toFixed(m.value.style.chart.tooltip.roundingValue)}</b>`),m.value.style.chart.tooltip.showPercentage&&(m.value.style.chart.tooltip.showValue?C+=`<span>(${(ae.proportion*100).toFixed(m.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:C+=`<b>${(ae.proportion*100).toFixed(m.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),c.value=`<div>${C}</div>`}function ge(){const ae=document.getElementById(`donut__${r.value}`);if(console.log(ae),ae){n.value=!0;const se={height:851.89,width:595.28},ye=new Bt("","pt","a4");let C,_,S,Q,j;xd(ae).then(ie=>{C=ie.width,_=ie.height;let oe=_;const le=C/se.width*se.height;let xe=0;if(S=se.width,Q=582.28/C*_,j=ie.toDataURL("image/png",1),oe<le)ye.addImage(j,"PNG",33,24,S*.9,Q*.9,"","FAST");else for(;oe>0;)ye.addImage(j,"PNG",33,xe,S*.9,Q*.9,"","FAST"),oe-=le,xe-=se.height-24,oe>0&&ye.addPage();ye.save(`${m.value.style.chart.title.text||"vue-ui-donut"}.pdf`)}).finally(()=>{n.value=!1})}}const we=u.computed(()=>{const ae=F.value.map(ye=>({name:ye.name,color:ye.color})),se=F.value.map(ye=>ye.value);return{head:ae,body:se}});function pe(){u.nextTick(()=>{const ae=we.value.head.map((ie,oe)=>[[ie.name],[we.value.body[oe]],[isNaN(we.value.body[oe]/T.value)?"-":we.value.body[oe]/T.value*100]]),se=[[m.value.style.chart.title.text],[m.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(ae);function ye(ie){let oe=new ArrayBuffer(ie.length),le=new Uint8Array(oe);for(let xe=0;xe<ie.length;xe++)le[xe]=ie.charCodeAt(xe)&255;return oe}const C=Ga.book_new(),_=Ga.aoa_to_sheet(se);Ga.book_append_sheet(C,_,"Sheet1");const S=Du(C,{bookType:"xlsx",type:"binary"}),Q=new Blob([ye(S)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),j=document.createElement("a");j.href=window.URL.createObjectURL(Q),j.download=`${m.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-donut"}.xlsx`,j.click(),window.URL.revokeObjectURL(j.href)})}return(ae,se)=>(u.openBlock(),u.createElementBlock("div",{ref:"donutChart",class:"vue-ui-donut",style:u.normalizeStyle(`font-family:${m.value.style.fontFamily};width:100%; text-align:center`),id:`donut__${r.value}`},[(!v.value.inside||n.value)&&m.value.style.chart.title.text?(u.openBlock(),u.createElementBlock("div",{key:0,style:u.normalizeStyle(`width:100%;background:${m.value.style.chart.backgroundColor}`)},[u.createElementVNode("div",{style:u.normalizeStyle(`width:100%;text-align:center;color:${m.value.style.chart.title.color};font-size:${m.value.style.chart.title.fontSize}px;font-weight:${m.value.style.chart.title.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.title.text),5),m.value.style.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("div",{key:0,style:u.normalizeStyle(`width:100%;text-align:center;color:${m.value.style.chart.title.subtitle.color};font-size:${m.value.style.chart.title.subtitle.fontSize}px;font-weight:${m.value.style.chart.title.subtitle.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.title.subtitle.text),5)):u.createCommentVNode("",!0)],4)):u.createCommentVNode("",!0),m.value.userOptions.show?(u.openBlock(),u.createElementBlock("details",{key:1,class:"vue-ui-donut-user-options",style:u.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:s},[u.createElementVNode("summary",{style:u.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`)},u.toDisplayString(m.value.userOptions.title),5),u.createElementVNode("div",{class:"vue-ui-donut-user-options-items",style:u.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`)},[u.createElementVNode("div",TM,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-datalabels_${r.value}`,name:`vue-ui-donut-option-datalabels_${r.value}`,"onUpdate:modelValue":se[0]||(se[0]=ye=>v.value.dataLabels.show=ye)},null,8,UM),[[u.vModelCheckbox,v.value.dataLabels.show]]),u.createElementVNode("label",{for:`vue-ui-donut-option-datalabels_${r.value}`},u.toDisplayString(m.value.userOptions.labels.dataLabels),9,IM)]),u.createElementVNode("div",NM,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-title_${r.value}`,name:`vue-ui-donut-option-title_${r.value}`,"onUpdate:modelValue":se[1]||(se[1]=ye=>v.value.inside=ye)},null,8,LM),[[u.vModelCheckbox,v.value.inside]]),u.createElementVNode("label",{for:`vue-ui-donut-option-title_${r.value}`},u.toDisplayString(m.value.userOptions.labels.useDiv),9,QM)]),u.createElementVNode("div",kM,[u.withDirectives(u.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-table_${r.value}`,name:`vue-ui-donut-option-table_${r.value}`,"onUpdate:modelValue":se[2]||(se[2]=ye=>v.value.showTable=ye)},null,8,OM),[[u.vModelCheckbox,v.value.showTable]]),u.createElementVNode("label",{for:`vue-ui-donut-option-table_${r.value}`},u.toDisplayString(m.value.userOptions.labels.showTable),9,DM)]),u.createElementVNode("button",{class:"vue-ui-donut-button",onClick:ge,disabled:n.value,style:u.normalizeStyle([{"margin-top":"12px"},`color:${m.value.style.chart.color}`])},[n.value?(u.openBlock(),u.createElementBlock("svg",MM,RM)):(u.openBlock(),u.createElementBlock("span",HM,"PDF"))],12,PM),u.createElementVNode("button",{class:"vue-ui-donut-button",onClick:pe,style:u.normalizeStyle(`color:${m.value.style.chart.color}`)}," XLSX ",4)],4)],4)):u.createCommentVNode("",!0),(u.openBlock(),u.createElementBlock("svg",{viewBox:`0 0 ${B.value.width} ${B.value.height}`,style:u.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`),onClick:Y},[u.createElementVNode("defs",null,[m.value.style.chart.useGradient?(u.openBlock(),u.createElementBlock("radialGradient",{key:0,id:`gradient_${r.value}`},[u.createElementVNode("stop",{offset:"0%","stop-color":`${u.unref(qy)(m.value.style.chart.backgroundColor)}00`},null,8,GM),u.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+U.value[m.value.style.chart.gradientIntensity]},null,8,jM),u.createElementVNode("stop",{offset:"100%","stop-color":`${u.unref(qy)(m.value.style.chart.backgroundColor)}00`},null,8,zM)],8,KM)):u.createCommentVNode("",!0)]),m.value.style.chart.title.text&&v.value.inside&&!n.value?(u.openBlock(),u.createElementBlock("g",WM,[u.createElementVNode("text",{"font-size":m.value.style.chart.title.fontSize,fill:m.value.style.chart.title.color,x:B.value.width/2,y:48,"text-anchor":"middle",style:u.normalizeStyle(`font-weight:${m.value.style.chart.title.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.title.text),13,XM),m.value.style.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("text",{key:0,"font-size":m.value.style.chart.title.subtitle.fontSize,fill:m.value.style.chart.title.subtitle.color,x:B.value.width/2,y:48+m.value.style.chart.title.fontSize,"text-anchor":"middle",style:u.normalizeStyle(`font-weight:${m.value.style.chart.title.subtitle.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.title.subtitle.text),13,qM)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(W.value,(ye,C)=>(u.openBlock(),u.createElementBlock("path",{d:ye.path,stroke:`${ye.color}CC`,"stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none"},null,8,YM))),256)),m.value.style.chart.useGradient?(u.openBlock(),u.createElementBlock("circle",{key:1,cx:B.value.width/2,cy:B.value.height/2,r:136,fill:`url(#gradient_${r.value})`},null,8,$M)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(W.value,(ye,C)=>(u.openBlock(),u.createElementBlock("path",{d:ye.path,stroke:d.value===C?"rgba(0,0,0,0.1)":"transparent","stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none",onMouseenter:_=>ue(ye,C,!0),onMouseleave:se[3]||(se[3]=_=>{l.value=!1,d.value=null}),onClick:_=>b(C)},null,40,JM))),256)),u.createElementVNode("circle",{cx:B.value.width/2,cy:B.value.height/2,r:B.value.width-400-m.value.style.chart.layout.donut.strokeWidth/2,fill:m.value.style.chart.backgroundColor},null,8,ZM),m.value.style.chart.layout.labels.hollow.total.show?(u.openBlock(),u.createElementBlock("text",{key:2,"text-anchor":"middle",x:B.value.width/2,y:B.value.height/2-(m.value.style.chart.layout.labels.hollow.average.show?m.value.style.chart.layout.labels.hollow.total.fontSize:0)+m.value.style.chart.layout.labels.hollow.total.offsetY,fill:m.value.style.chart.layout.labels.hollow.total.color,"font-size":m.value.style.chart.layout.labels.hollow.total.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.layout.labels.hollow.total.text),13,eR)):u.createCommentVNode("",!0),m.value.style.chart.layout.labels.hollow.total.show?(u.openBlock(),u.createElementBlock("text",{key:3,"text-anchor":"middle",x:B.value.width/2,y:B.value.height/2+m.value.style.chart.layout.labels.hollow.total.fontSize-(m.value.style.chart.layout.labels.hollow.average.show?m.value.style.chart.layout.labels.hollow.total.fontSize:0)+m.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:m.value.style.chart.layout.labels.hollow.total.value.color,"font-size":m.value.style.chart.layout.labels.hollow.total.value.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.layout.labels.hollow.total.value.prefix)+" "+u.toDisplayString(T.value.toFixed(m.value.style.chart.layout.labels.hollow.total.value.rounding))+" "+u.toDisplayString(m.value.style.chart.layout.labels.hollow.total.value.suffix),13,tR)):u.createCommentVNode("",!0),m.value.style.chart.layout.labels.hollow.average.show?(u.openBlock(),u.createElementBlock("text",{key:4,"text-anchor":"middle",x:B.value.width/2,y:B.value.height/2+(m.value.style.chart.layout.labels.hollow.total.show?m.value.style.chart.layout.labels.hollow.average.fontSize:0)+m.value.style.chart.layout.labels.hollow.average.offsetY,fill:m.value.style.chart.layout.labels.hollow.average.color,"font-size":m.value.style.chart.layout.labels.hollow.average.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.layout.labels.hollow.average.text),13,rR)):u.createCommentVNode("",!0),m.value.style.chart.layout.labels.hollow.average.show?(u.openBlock(),u.createElementBlock("text",{key:5,"text-anchor":"middle",x:B.value.width/2,y:B.value.height/2+(m.value.style.chart.layout.labels.hollow.total.show?m.value.style.chart.layout.labels.hollow.average.fontSize:0)+m.value.style.chart.layout.labels.hollow.average.fontSize+m.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:m.value.style.chart.layout.labels.hollow.average.value.color,"font-size":m.value.style.chart.layout.labels.hollow.average.value.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},u.toDisplayString(m.value.style.chart.layout.labels.hollow.average.value.prefix)+" "+u.toDisplayString(isNaN(V.value.toFixed(m.value.style.chart.layout.labels.hollow.average.value.rounding))?"-":V.value.toFixed(m.value.style.chart.layout.labels.hollow.average.value.rounding))+" "+u.toDisplayString(m.value.style.chart.layout.labels.hollow.average.value.suffix),13,AR)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(W.value,(ye,C)=>(u.openBlock(),u.createElementBlock("g",null,[k(ye)&&v.value.dataLabels.show?(u.openBlock(),u.createElementBlock("text",{key:0,"text-anchor":"middle",x:q(ye),y:ye.center.endY-m.value.style.chart.layout.labels.percentage.fontSize/2,fill:m.value.style.chart.layout.labels.percentage.color,"font-size":m.value.style.chart.layout.labels.percentage.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.percentage.bold?"bold":""}`)},u.toDisplayString(K(ye,W.value)),13,nR)):u.createCommentVNode("",!0),k(ye)&&v.value.dataLabels.show?(u.openBlock(),u.createElementBlock("text",{key:1,"text-anchor":"middle",x:q(ye),y:ye.center.endY+m.value.style.chart.layout.labels.percentage.fontSize/2,fill:m.value.style.chart.layout.labels.name.color,"font-size":m.value.style.chart.layout.labels.name.fontSize,style:u.normalizeStyle(`font-weight:${m.value.style.chart.layout.labels.name.bold?"bold":""}`)},u.toDisplayString(ye.name),13,aR)):u.createCommentVNode("",!0)]))),256)),m.value.style.chart.legend.show&&v.value.inside&&!n.value?(u.openBlock(),u.createElementBlock("foreignObject",{key:6,x:0,y:B.value.height/2+150,width:"100%",height:"100",style:{overflow:"visible"}},[u.createElementVNode("div",{class:"vue-ui-donut-legend",style:u.normalizeStyle(`background:transparent;color:${m.value.style.chart.legend.color};font-size:${m.value.style.chart.legend.fontSize}px;font-weight:${m.value.style.chart.legend.bold?"bold":""}`)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(O.value,(ye,C)=>(u.openBlock(),u.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:_=>b(C),style:u.normalizeStyle(`opacity:${x.value.includes(C)?.5:1}`)},[u.createElementVNode("span",{style:u.normalizeStyle(`color:${ye.color};font-size:${m.value.style.chart.legend.fontSize*1.6}px`)},"●",4),u.createElementVNode("span",null,u.toDisplayString(ye.name)+" : ",1),u.createElementVNode("span",null,u.toDisplayString(ye.value),1),u.createElementVNode("span",null,"("+u.toDisplayString(isNaN(ye.value/T.value)?"-":(ye.value/T.value*100).toFixed(m.value.style.chart.legend.roundingPercentage))+"%)",1)],12,sR))),256))],4)],8,iR)):u.createCommentVNode("",!0)],12,VM)),m.value.style.chart.legend.show&&(!v.value.inside||n.value)?(u.openBlock(),u.createElementBlock("div",{key:2,class:"vue-ui-donut-legend",style:u.normalizeStyle(`background:${m.value.style.chart.legend.backgroundColor};color:${m.value.style.chart.legend.color};font-size:${m.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${m.value.style.chart.legend.bold?"bold":""}`),onClick:Y},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(O.value,(ye,C)=>(u.openBlock(),u.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:_=>b(C),style:u.normalizeStyle(`opacity:${x.value.includes(C)?.5:1}`)},[u.createElementVNode("span",{style:u.normalizeStyle(`color:${ye.color};font-size:${m.value.style.chart.legend.fontSize*1.6}px`)},"●",4),u.createElementVNode("span",null,u.toDisplayString(ye.name)+" : ",1),u.createElementVNode("span",null,u.toDisplayString(ye.value.toFixed(m.value.style.chart.legend.roundingValue)),1),x.value.includes(C)?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",lR,"("+u.toDisplayString(isNaN(ye.value/T.value)?"-":(ye.value/T.value*100).toFixed(m.value.style.chart.legend.roundingPercentage))+"%)",1))],12,oR))),256))],4)):u.createCommentVNode("",!0),m.value.style.chart.tooltip.show&&l.value?(u.openBlock(),u.createElementBlock("div",{key:3,class:"vue-ui-donut-tooltip",ref_key:"tooltip",ref:i,style:u.normalizeStyle(`top:${h.value.top}px;left:${h.value.left}px;background:${m.value.style.chart.tooltip.backgroundColor};color:${m.value.style.chart.tooltip.color}`),innerHTML:c.value},null,12,cR)):u.createCommentVNode("",!0),v.value.showTable?(u.openBlock(),u.createElementBlock("div",{key:4,onClick:Y,class:"vue-ui-donut-table",style:u.normalizeStyle(`width:100%;margin-top:${v.value.inside?"48px":""}`)},[u.createElementVNode("table",null,[u.createElementVNode("thead",null,[m.value.style.chart.title.text?(u.openBlock(),u.createElementBlock("tr",fR,[u.createElementVNode("th",{colspan:"3",style:u.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},[u.createElementVNode("span",null,u.toDisplayString(m.value.style.chart.title.text),1),m.value.style.chart.title.subtitle.text?(u.openBlock(),u.createElementBlock("span",uR," : "+u.toDisplayString(m.value.style.chart.title.subtitle.text),1)):u.createCommentVNode("",!0)],4)])):u.createCommentVNode("",!0),u.createElementVNode("tr",null,[u.createElementVNode("th",{align:"right",style:u.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};padding-right:6px`)},hR,4),u.createElementVNode("th",{style:u.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};text-align:right;padding-right:6px`)},u.toDisplayString(T.value.toFixed(m.value.table.td.roundingValue)),5),u.createElementVNode("th",{style:u.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(we.value.head,(ye,C)=>(u.openBlock(),u.createElementBlock("tr",null,[u.createElementVNode("td",{style:u.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},[u.createElementVNode("div",dR,[u.createElementVNode("span",{style:u.normalizeStyle(`color:${ye.color};margin-right:6px;`)},"●",4),u.createElementVNode("span",null,u.toDisplayString(ye.name),1)])],4),u.createElementVNode("td",{style:u.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},u.toDisplayString(we.value.body[C].toFixed(m.value.table.td.roundingValue)),5),u.createElementVNode("td",{style:u.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},u.toDisplayString(isNaN(we.value.body[C]/T.value)?"-":(we.value.body[C]/T.value*100).toFixed(m.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):u.createCommentVNode("",!0)],12,_M))}},[["__scopeId","data-v-2b80e2cd"]]);/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function Ii(t){"@babel/helpers - typeof";return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ii(t)}function E1(t,e){return E1=Object.setPrototypeOf||function(A,n){return A.__proto__=n,A},E1(t,e)}function pR(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ru(t,e,r){return pR()?Ru=Reflect.construct:Ru=function(n,a,i){var s=[null];s.push.apply(s,a);var o=Function.bind.apply(n,s),l=new o;return i&&E1(l,i.prototype),l},Ru.apply(null,arguments)}function Wn(t){return mR(t)||vR(t)||wR(t)||BR()}function mR(t){if(Array.isArray(t))return F1(t)}function vR(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function wR(t,e){if(t){if(typeof t=="string")return F1(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F1(t,e)}}function F1(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,A=new Array(e);r<e;r++)A[r]=t[r];return A}function BR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
374
374
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var yR=Object.hasOwnProperty,Yy=Object.setPrototypeOf,xR=Object.isFrozen,CR=Object.getPrototypeOf,bR=Object.getOwnPropertyDescriptor,KA=Object.freeze,Xn=Object.seal,ER=Object.create,$y=typeof Reflect<"u"&&Reflect,Hu=$y.apply,S1=$y.construct;Hu||(Hu=function(e,r,A){return e.apply(r,A)}),KA||(KA=function(e){return e}),Xn||(Xn=function(e){return e}),S1||(S1=function(e,r){return Ru(e,Wn(r))});var FR=_n(Array.prototype.forEach),Jy=_n(Array.prototype.pop),ec=_n(Array.prototype.push),Vu=_n(String.prototype.toLowerCase),_1=_n(String.prototype.toString),SR=_n(String.prototype.match),qn=_n(String.prototype.replace),_R=_n(String.prototype.indexOf),TR=_n(String.prototype.trim),GA=_n(RegExp.prototype.test),T1=UR(TypeError);function _n(t){return function(e){for(var r=arguments.length,A=new Array(r>1?r-1:0),n=1;n<r;n++)A[n-1]=arguments[n];return Hu(t,e,A)}}function UR(t){return function(){for(var e=arguments.length,r=new Array(e),A=0;A<e;A++)r[A]=arguments[A];return S1(t,r)}}function Ot(t,e,r){var A;r=(A=r)!==null&&A!==void 0?A:Vu,Yy&&Yy(t,null);for(var n=e.length;n--;){var a=e[n];if(typeof a=="string"){var i=r(a);i!==a&&(xR(e)||(e[n]=i),a=i)}t[a]=!0}return t}function vs(t){var e=ER(null),r;for(r in t)Hu(yR,t,[r])===!0&&(e[r]=t[r]);return e}function Ku(t,e){for(;t!==null;){var r=bR(t,e);if(r){if(r.get)return _n(r.get);if(typeof r.value=="function")return _n(r.value)}t=CR(t)}function A(n){return console.warn("fallback value for",n),null}return A}var Zy=KA(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),U1=KA(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),I1=KA(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),IR=KA(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N1=KA(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),NR=KA(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),e5=KA(["#text"]),t5=KA(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L1=KA(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),r5=KA(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gu=KA(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),LR=Xn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),QR=Xn(/<%[\w\W]*|[\w\W]*%>/gm),kR=Xn(/\${[\w\W]*}/gm),OR=Xn(/^data-[\-\w.\u00B7-\uFFFF]/),DR=Xn(/^aria-[\-\w]+$/),PR=Xn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),MR=Xn(/^(?:\w+script|data):/i),RR=Xn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),HR=Xn(/^html$/i),VR=function(){return typeof window>"u"?null:window},KR=function(e,r){if(Ii(e)!=="object"||typeof e.createPolicy!="function")return null;var A=null,n="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(n)&&(A=r.currentScript.getAttribute(n));var a="dompurify"+(A?"#"+A:"");try{return e.createPolicy(a,{createHTML:function(s){return s},createScriptURL:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function A5(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:VR(),e=function(H){return A5(H)};if(e.version="2.4.7",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,A=t.document,n=t.DocumentFragment,a=t.HTMLTemplateElement,i=t.Node,s=t.Element,o=t.NodeFilter,l=t.NamedNodeMap,c=l===void 0?t.NamedNodeMap||t.MozNamedAttrMap:l,d=t.HTMLFormElement,g=t.DOMParser,h=t.trustedTypes,m=s.prototype,v=Ku(m,"cloneNode"),B=Ku(m,"nextSibling"),x=Ku(m,"childNodes"),b=Ku(m,"parentNode");if(typeof a=="function"){var F=A.createElement("template");F.content&&F.content.ownerDocument&&(A=F.content.ownerDocument)}var O=KR(h,r),W=O?O.createHTML(""):"",q=A,L=q.implementation,k=q.createNodeIterator,K=q.createDocumentFragment,re=q.getElementsByTagName,U=r.importNode,T={};try{T=vs(A).documentMode?A.documentMode:{}}catch{}var V={};e.isSupported=typeof b=="function"&&L&&L.createHTMLDocument!==void 0&&T!==9;var Y=LR,ue=QR,ge=kR,we=OR,pe=DR,ae=MR,se=RR,ye=PR,C=null,_=Ot({},[].concat(Wn(Zy),Wn(U1),Wn(I1),Wn(N1),Wn(e5))),S=null,Q=Ot({},[].concat(Wn(t5),Wn(L1),Wn(r5),Wn(Gu))),j=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,oe=null,le=!0,xe=!0,Qe=!1,Me=!0,Xe=!1,qe=!1,Te=!1,Ae=!1,ke=!1,rt=!1,Re=!1,ze=!0,$e=!1,Je="user-content-",st=!0,nt=!1,ht={},vt=null,_t=Ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ut=null,dt=Ot({},["audio","video","img","source","image","track"]),xt=null,tt=Ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nr="http://www.w3.org/1998/Math/MathML",It="http://www.w3.org/2000/svg",fr="http://www.w3.org/1999/xhtml",Qt=fr,Kt=!1,qr=null,Pt=Ot({},[nr,It,fr],_1),br,qt=["application/xhtml+xml","text/html"],rA="text/html",Et,Gt=null,Ct=A.createElement("form"),Ht=function(H){return H instanceof RegExp||H instanceof Function},gn=function(H){Gt&&Gt===H||((!H||Ii(H)!=="object")&&(H={}),H=vs(H),br=qt.indexOf(H.PARSER_MEDIA_TYPE)===-1?br=rA:br=H.PARSER_MEDIA_TYPE,Et=br==="application/xhtml+xml"?_1:Vu,C="ALLOWED_TAGS"in H?Ot({},H.ALLOWED_TAGS,Et):_,S="ALLOWED_ATTR"in H?Ot({},H.ALLOWED_ATTR,Et):Q,qr="ALLOWED_NAMESPACES"in H?Ot({},H.ALLOWED_NAMESPACES,_1):Pt,xt="ADD_URI_SAFE_ATTR"in H?Ot(vs(tt),H.ADD_URI_SAFE_ATTR,Et):tt,Ut="ADD_DATA_URI_TAGS"in H?Ot(vs(dt),H.ADD_DATA_URI_TAGS,Et):dt,vt="FORBID_CONTENTS"in H?Ot({},H.FORBID_CONTENTS,Et):_t,ie="FORBID_TAGS"in H?Ot({},H.FORBID_TAGS,Et):{},oe="FORBID_ATTR"in H?Ot({},H.FORBID_ATTR,Et):{},ht="USE_PROFILES"in H?H.USE_PROFILES:!1,le=H.ALLOW_ARIA_ATTR!==!1,xe=H.ALLOW_DATA_ATTR!==!1,Qe=H.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=H.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Xe=H.SAFE_FOR_TEMPLATES||!1,qe=H.WHOLE_DOCUMENT||!1,ke=H.RETURN_DOM||!1,rt=H.RETURN_DOM_FRAGMENT||!1,Re=H.RETURN_TRUSTED_TYPE||!1,Ae=H.FORCE_BODY||!1,ze=H.SANITIZE_DOM!==!1,$e=H.SANITIZE_NAMED_PROPS||!1,st=H.KEEP_CONTENT!==!1,nt=H.IN_PLACE||!1,ye=H.ALLOWED_URI_REGEXP||ye,Qt=H.NAMESPACE||fr,j=H.CUSTOM_ELEMENT_HANDLING||{},H.CUSTOM_ELEMENT_HANDLING&&Ht(H.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=H.CUSTOM_ELEMENT_HANDLING.tagNameCheck),H.CUSTOM_ELEMENT_HANDLING&&Ht(H.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=H.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),H.CUSTOM_ELEMENT_HANDLING&&typeof H.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=H.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xe&&(xe=!1),rt&&(ke=!0),ht&&(C=Ot({},Wn(e5)),S=[],ht.html===!0&&(Ot(C,Zy),Ot(S,t5)),ht.svg===!0&&(Ot(C,U1),Ot(S,L1),Ot(S,Gu)),ht.svgFilters===!0&&(Ot(C,I1),Ot(S,L1),Ot(S,Gu)),ht.mathMl===!0&&(Ot(C,N1),Ot(S,r5),Ot(S,Gu))),H.ADD_TAGS&&(C===_&&(C=vs(C)),Ot(C,H.ADD_TAGS,Et)),H.ADD_ATTR&&(S===Q&&(S=vs(S)),Ot(S,H.ADD_ATTR,Et)),H.ADD_URI_SAFE_ATTR&&Ot(xt,H.ADD_URI_SAFE_ATTR,Et),H.FORBID_CONTENTS&&(vt===_t&&(vt=vs(vt)),Ot(vt,H.FORBID_CONTENTS,Et)),st&&(C["#text"]=!0),qe&&Ot(C,["html","head","body"]),C.table&&(Ot(C,["tbody"]),delete ie.tbody),KA&&KA(H),Gt=H)},Ir=Ot({},["mi","mo","mn","ms","mtext"]),zA=Ot({},["foreignobject","desc","title","annotation-xml"]),en=Ot({},["title","style","font","a","script"]),gt=Ot({},U1);Ot(gt,I1),Ot(gt,IR);var xA=Ot({},N1);Ot(xA,NR);var QA=function(H){var me=b(H);(!me||!me.tagName)&&(me={namespaceURI:Qt,tagName:"template"});var _e=Vu(H.tagName),Ke=Vu(me.tagName);return qr[H.namespaceURI]?H.namespaceURI===It?me.namespaceURI===fr?_e==="svg":me.namespaceURI===nr?_e==="svg"&&(Ke==="annotation-xml"||Ir[Ke]):!!gt[_e]:H.namespaceURI===nr?me.namespaceURI===fr?_e==="math":me.namespaceURI===It?_e==="math"&&zA[Ke]:!!xA[_e]:H.namespaceURI===fr?me.namespaceURI===It&&!zA[Ke]||me.namespaceURI===nr&&!Ir[Ke]?!1:!xA[_e]&&(en[_e]||!gt[_e]):!!(br==="application/xhtml+xml"&&qr[H.namespaceURI]):!1},gr=function(H){ec(e.removed,{element:H});try{H.parentNode.removeChild(H)}catch{try{H.outerHTML=W}catch{H.remove()}}},Br=function(H,me){try{ec(e.removed,{attribute:me.getAttributeNode(H),from:me})}catch{ec(e.removed,{attribute:null,from:me})}if(me.removeAttribute(H),H==="is"&&!S[H])if(ke||rt)try{gr(me)}catch{}else try{me.setAttribute(H,"")}catch{}},yr=function(H){var me,_e;if(Ae)H="<remove></remove>"+H;else{var Ke=SR(H,/^[\r\n\t ]+/);_e=Ke&&Ke[0]}br==="application/xhtml+xml"&&Qt===fr&&(H='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+H+"</body></html>");var Ve=O?O.createHTML(H):H;if(Qt===fr)try{me=new g().parseFromString(Ve,br)}catch{}if(!me||!me.documentElement){me=L.createDocument(Qt,"template",null);try{me.documentElement.innerHTML=Kt?W:Ve}catch{}}var Ye=me.body||me.documentElement;return H&&_e&&Ye.insertBefore(A.createTextNode(_e),Ye.childNodes[0]||null),Qt===fr?re.call(me,qe?"html":"body")[0]:qe?me.documentElement:Ye},D=function(H){return k.call(H.ownerDocument||H,H,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT,null,!1)},ee=function(H){return H instanceof d&&(typeof H.nodeName!="string"||typeof H.textContent!="string"||typeof H.removeChild!="function"||!(H.attributes instanceof c)||typeof H.removeAttribute!="function"||typeof H.setAttribute!="function"||typeof H.namespaceURI!="string"||typeof H.insertBefore!="function"||typeof H.hasChildNodes!="function")},z=function(H){return Ii(i)==="object"?H instanceof i:H&&Ii(H)==="object"&&typeof H.nodeType=="number"&&typeof H.nodeName=="string"},X=function(H,me,_e){V[H]&&FR(V[H],function(Ke){Ke.call(e,me,_e,Gt)})},Z=function(H){var me;if(X("beforeSanitizeElements",H,null),ee(H)||GA(/[\u0080-\uFFFF]/,H.nodeName))return gr(H),!0;var _e=Et(H.nodeName);if(X("uponSanitizeElement",H,{tagName:_e,allowedTags:C}),H.hasChildNodes()&&!z(H.firstElementChild)&&(!z(H.content)||!z(H.content.firstElementChild))&&GA(/<[/\w]/g,H.innerHTML)&&GA(/<[/\w]/g,H.textContent)||_e==="select"&&GA(/<template/i,H.innerHTML))return gr(H),!0;if(!C[_e]||ie[_e]){if(!ie[_e]&&Ee(_e)&&(j.tagNameCheck instanceof RegExp&&GA(j.tagNameCheck,_e)||j.tagNameCheck instanceof Function&&j.tagNameCheck(_e)))return!1;if(st&&!vt[_e]){var Ke=b(H)||H.parentNode,Ve=x(H)||H.childNodes;if(Ve&&Ke)for(var Ye=Ve.length,ft=Ye-1;ft>=0;--ft)Ke.insertBefore(v(Ve[ft],!0),B(H))}return gr(H),!0}return H instanceof s&&!QA(H)||(_e==="noscript"||_e==="noembed"||_e==="noframes")&&GA(/<\/no(script|embed|frames)/i,H.innerHTML)?(gr(H),!0):(Xe&&H.nodeType===3&&(me=H.textContent,me=qn(me,Y," "),me=qn(me,ue," "),me=qn(me,ge," "),H.textContent!==me&&(ec(e.removed,{element:H.cloneNode()}),H.textContent=me)),X("afterSanitizeElements",H,null),!1)},te=function(H,me,_e){if(ze&&(me==="id"||me==="name")&&(_e in A||_e in Ct))return!1;if(!(xe&&!oe[me]&&GA(we,me))){if(!(le&&GA(pe,me))){if(!S[me]||oe[me]){if(!(Ee(H)&&(j.tagNameCheck instanceof RegExp&&GA(j.tagNameCheck,H)||j.tagNameCheck instanceof Function&&j.tagNameCheck(H))&&(j.attributeNameCheck instanceof RegExp&&GA(j.attributeNameCheck,me)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(me))||me==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&GA(j.tagNameCheck,_e)||j.tagNameCheck instanceof Function&&j.tagNameCheck(_e))))return!1}else if(!xt[me]){if(!GA(ye,qn(_e,se,""))){if(!((me==="src"||me==="xlink:href"||me==="href")&&H!=="script"&&_R(_e,"data:")===0&&Ut[H])){if(!(Qe&&!GA(ae,qn(_e,se,"")))){if(_e)return!1}}}}}}return!0},Ee=function(H){return H.indexOf("-")>0},Ue=function(H){var me,_e,Ke,Ve;X("beforeSanitizeAttributes",H,null);var Ye=H.attributes;if(Ye){var ft={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S};for(Ve=Ye.length;Ve--;){me=Ye[Ve];var Vt=me,bt=Vt.name,Cr=Vt.namespaceURI;if(_e=bt==="value"?me.value:TR(me.value),Ke=Et(bt),ft.attrName=Ke,ft.attrValue=_e,ft.keepAttr=!0,ft.forceKeepAttr=void 0,X("uponSanitizeAttribute",H,ft),_e=ft.attrValue,!ft.forceKeepAttr&&(Br(bt,H),!!ft.keepAttr)){if(!Me&&GA(/\/>/i,_e)){Br(bt,H);continue}Xe&&(_e=qn(_e,Y," "),_e=qn(_e,ue," "),_e=qn(_e,ge," "));var tn=Et(H.nodeName);if(te(tn,Ke,_e)){if($e&&(Ke==="id"||Ke==="name")&&(Br(bt,H),_e=Je+_e),O&&Ii(h)==="object"&&typeof h.getAttributeType=="function"&&!Cr)switch(h.getAttributeType(tn,Ke)){case"TrustedHTML":{_e=O.createHTML(_e);break}case"TrustedScriptURL":{_e=O.createScriptURL(_e);break}}try{Cr?H.setAttributeNS(Cr,bt,_e):H.setAttribute(bt,_e),Jy(e.removed)}catch{}}}}X("afterSanitizeAttributes",H,null)}},be=function ce(H){var me,_e=D(H);for(X("beforeSanitizeShadowDOM",H,null);me=_e.nextNode();)X("uponSanitizeShadowNode",me,null),!Z(me)&&(me.content instanceof n&&ce(me.content),Ue(me));X("afterSanitizeShadowDOM",H,null)};return e.sanitize=function(ce){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me,_e,Ke,Ve,Ye;if(Kt=!ce,Kt&&(ce="<!-->"),typeof ce!="string"&&!z(ce))if(typeof ce.toString=="function"){if(ce=ce.toString(),typeof ce!="string")throw T1("dirty is not a string, aborting")}else throw T1("toString is not a function");if(!e.isSupported){if(Ii(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof ce=="string")return t.toStaticHTML(ce);if(z(ce))return t.toStaticHTML(ce.outerHTML)}return ce}if(Te||gn(H),e.removed=[],typeof ce=="string"&&(nt=!1),nt){if(ce.nodeName){var ft=Et(ce.nodeName);if(!C[ft]||ie[ft])throw T1("root node is forbidden and cannot be sanitized in-place")}}else if(ce instanceof i)me=yr("<!---->"),_e=me.ownerDocument.importNode(ce,!0),_e.nodeType===1&&_e.nodeName==="BODY"||_e.nodeName==="HTML"?me=_e:me.appendChild(_e);else{if(!ke&&!Xe&&!qe&&ce.indexOf("<")===-1)return O&&Re?O.createHTML(ce):ce;if(me=yr(ce),!me)return ke?null:Re?W:""}me&&Ae&&gr(me.firstChild);for(var Vt=D(nt?ce:me);Ke=Vt.nextNode();)Ke.nodeType===3&&Ke===Ve||Z(Ke)||(Ke.content instanceof n&&be(Ke.content),Ue(Ke),Ve=Ke);if(Ve=null,nt)return ce;if(ke){if(rt)for(Ye=K.call(me.ownerDocument);me.firstChild;)Ye.appendChild(me.firstChild);else Ye=me;return(S.shadowroot||S.shadowrootmod)&&(Ye=U.call(r,Ye,!0)),Ye}var bt=qe?me.outerHTML:me.innerHTML;return qe&&C["!doctype"]&&me.ownerDocument&&me.ownerDocument.doctype&&me.ownerDocument.doctype.name&&GA(HR,me.ownerDocument.doctype.name)&&(bt="<!DOCTYPE "+me.ownerDocument.doctype.name+`>
|
|
375
375
|
`+bt),Xe&&(bt=qn(bt,Y," "),bt=qn(bt,ue," "),bt=qn(bt,ge," ")),O&&Re?O.createHTML(bt):bt},e.setConfig=function(ce){gn(ce),Te=!0},e.clearConfig=function(){Gt=null,Te=!1},e.isValidAttribute=function(ce,H,me){Gt||gn({});var _e=Et(ce),Ke=Et(H);return te(_e,Ke,me)},e.addHook=function(ce,H){typeof H=="function"&&(V[ce]=V[ce]||[],ec(V[ce],H))},e.removeHook=function(ce){if(V[ce])return Jy(V[ce])},e.removeHooks=function(ce){V[ce]&&(V[ce]=[])},e.removeAllHooks=function(){V={}},e}var GR=A5();const jR=Object.freeze(Object.defineProperty({__proto__:null,default:GR},Symbol.toStringTag,{value:"Module"}));var tc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n5(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ju=function(t){return t&&t.Math==Math&&t},tA=ju(typeof globalThis=="object"&&globalThis)||ju(typeof window=="object"&&window)||ju(typeof self=="object"&&self)||ju(typeof tc=="object"&&tc)||function(){return this}()||tc||Function("return this")(),Co={},Mr=function(t){try{return!!t()}catch{return!0}},zR=Mr,Ba=!zR(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),WR=Mr,zu=!WR(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),XR=zu,Wu=Function.prototype.call,yA=XR?Wu.bind(Wu):function(){return Wu.apply(Wu,arguments)},a5={},i5={}.propertyIsEnumerable,s5=Object.getOwnPropertyDescriptor,qR=s5&&!i5.call({1:2},1);a5.f=qR?function(e){var r=s5(this,e);return!!r&&r.enumerable}:i5;var Xu=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},o5=zu,l5=Function.prototype,Q1=l5.call,YR=o5&&l5.bind.bind(Q1,Q1),Rr=o5?YR:function(t){return function(){return Q1.apply(t,arguments)}},c5=Rr,$R=c5({}.toString),JR=c5("".slice),ws=function(t){return JR($R(t),8,-1)},ZR=Rr,eH=Mr,tH=ws,k1=Object,rH=ZR("".split),f5=eH(function(){return!k1("z").propertyIsEnumerable(0)})?function(t){return tH(t)=="String"?rH(t,""):k1(t)}:k1,Bs=function(t){return t==null},AH=Bs,nH=TypeError,ya=function(t){if(AH(t))throw nH("Can't call method on "+t);return t},aH=f5,iH=ya,rc=function(t){return aH(iH(t))},O1=typeof document=="object"&&document.all,sH=typeof O1>"u"&&O1!==void 0,u5={all:O1,IS_HTMLDDA:sH},h5=u5,oH=h5.all,Tr=h5.IS_HTMLDDA?function(t){return typeof t=="function"||t===oH}:function(t){return typeof t=="function"},d5=Tr,g5=u5,lH=g5.all,ja=g5.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:d5(t)||t===lH}:function(t){return typeof t=="object"?t!==null:d5(t)},D1=tA,cH=Tr,fH=function(t){return cH(t)?t:void 0},ys=function(t,e){return arguments.length<2?fH(D1[t]):D1[t]&&D1[t][e]},uH=Rr,qu=uH({}.isPrototypeOf),Yu=typeof navigator<"u"&&String(navigator.userAgent)||"",p5=tA,P1=Yu,m5=p5.process,v5=p5.Deno,w5=m5&&m5.versions||v5&&v5.version,B5=w5&&w5.v8,Yn,$u;B5&&(Yn=B5.split("."),$u=Yn[0]>0&&Yn[0]<4?1:+(Yn[0]+Yn[1])),!$u&&P1&&(Yn=P1.match(/Edge\/(\d+)/),(!Yn||Yn[1]>=74)&&(Yn=P1.match(/Chrome\/(\d+)/),Yn&&($u=+Yn[1])));var M1=$u,y5=M1,hH=Mr,dH=tA,gH=dH.String,x5=!!Object.getOwnPropertySymbols&&!hH(function(){var t=Symbol();return!gH(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&y5&&y5<41}),pH=x5,C5=pH&&!Symbol.sham&&typeof Symbol.iterator=="symbol",mH=ys,vH=Tr,wH=qu,BH=C5,yH=Object,b5=BH?function(t){return typeof t=="symbol"}:function(t){var e=mH("Symbol");return vH(e)&&wH(e.prototype,yH(t))},xH=String,Ju=function(t){try{return xH(t)}catch{return"Object"}},CH=Tr,bH=Ju,EH=TypeError,za=function(t){if(CH(t))return t;throw EH(bH(t)+" is not a function")},FH=za,SH=Bs,bo=function(t,e){var r=t[e];return SH(r)?void 0:FH(r)},R1=yA,H1=Tr,V1=ja,_H=TypeError,TH=function(t,e){var r,A;if(e==="string"&&H1(r=t.toString)&&!V1(A=R1(r,t))||H1(r=t.valueOf)&&!V1(A=R1(r,t))||e!=="string"&&H1(r=t.toString)&&!V1(A=R1(r,t)))return A;throw _H("Can't convert object to primitive value")},E5={exports:{}},F5=tA,UH=Object.defineProperty,K1=function(t,e){try{UH(F5,t,{value:e,configurable:!0,writable:!0})}catch{F5[t]=e}return e},IH=tA,NH=K1,S5="__core-js_shared__",LH=IH[S5]||NH(S5,{}),G1=LH,_5=G1;(E5.exports=function(t,e){return _5[t]||(_5[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.32.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"});var j1=E5.exports,QH=ya,kH=Object,Zu=function(t){return kH(QH(t))},OH=Rr,DH=Zu,PH=OH({}.hasOwnProperty),$n=Object.hasOwn||function(e,r){return PH(DH(e),r)},MH=Rr,RH=0,HH=Math.random(),VH=MH(1 .toString),T5=function(t){return"Symbol("+(t===void 0?"":t)+")_"+VH(++RH+HH,36)},KH=tA,GH=j1,U5=$n,jH=T5,zH=x5,WH=C5,Eo=KH.Symbol,z1=GH("wks"),XH=WH?Eo.for||Eo:Eo&&Eo.withoutSetter||jH,lA=function(t){return U5(z1,t)||(z1[t]=zH&&U5(Eo,t)?Eo[t]:XH("Symbol."+t)),z1[t]},qH=yA,I5=ja,N5=b5,YH=bo,$H=TH,JH=lA,ZH=TypeError,e9=JH("toPrimitive"),t9=function(t,e){if(!I5(t)||N5(t))return t;var r=YH(t,e9),A;if(r){if(e===void 0&&(e="default"),A=qH(r,t,e),!I5(A)||N5(A))return A;throw ZH("Can't convert object to primitive value")}return e===void 0&&(e="number"),$H(t,e)},r9=t9,A9=b5,W1=function(t){var e=r9(t,"string");return A9(e)?e:e+""},n9=tA,L5=ja,X1=n9.document,a9=L5(X1)&&L5(X1.createElement),eh=function(t){return a9?X1.createElement(t):{}},i9=Ba,s9=Mr,o9=eh,Q5=!i9&&!s9(function(){return Object.defineProperty(o9("div"),"a",{get:function(){return 7}}).a!=7}),l9=Ba,c9=yA,f9=a5,u9=Xu,h9=rc,d9=W1,g9=$n,p9=Q5,k5=Object.getOwnPropertyDescriptor;Co.f=l9?k5:function(e,r){if(e=h9(e),r=d9(r),p9)try{return k5(e,r)}catch{}if(g9(e,r))return u9(!c9(f9.f,e,r),e[r])};var xa={},m9=Ba,v9=Mr,O5=m9&&v9(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),w9=ja,B9=String,y9=TypeError,NA=function(t){if(w9(t))return t;throw y9(B9(t)+" is not an object")},x9=Ba,C9=Q5,b9=O5,th=NA,D5=W1,E9=TypeError,q1=Object.defineProperty,F9=Object.getOwnPropertyDescriptor,Y1="enumerable",$1="configurable",J1="writable";xa.f=x9?b9?function(e,r,A){if(th(e),r=D5(r),th(A),typeof e=="function"&&r==="prototype"&&"value"in A&&J1 in A&&!A[J1]){var n=F9(e,r);n&&n[J1]&&(e[r]=A.value,A={configurable:$1 in A?A[$1]:n[$1],enumerable:Y1 in A?A[Y1]:n[Y1],writable:!1})}return q1(e,r,A)}:q1:function(e,r,A){if(th(e),r=D5(r),th(A),C9)try{return q1(e,r,A)}catch{}if("get"in A||"set"in A)throw E9("Accessors not supported");return"value"in A&&(e[r]=A.value),e};var S9=Ba,_9=xa,T9=Xu,Ac=S9?function(t,e,r){return _9.f(t,e,T9(1,r))}:function(t,e,r){return t[e]=r,t},P5={exports:{}},Z1=Ba,U9=$n,M5=Function.prototype,I9=Z1&&Object.getOwnPropertyDescriptor,eg=U9(M5,"name"),N9=eg&&(function(){}).name==="something",L9=eg&&(!Z1||Z1&&I9(M5,"name").configurable),rh={EXISTS:eg,PROPER:N9,CONFIGURABLE:L9},Q9=Rr,k9=Tr,tg=G1,O9=Q9(Function.toString);k9(tg.inspectSource)||(tg.inspectSource=function(t){return O9(t)});var rg=tg.inspectSource,D9=tA,P9=Tr,R5=D9.WeakMap,M9=P9(R5)&&/native code/.test(String(R5)),R9=j1,H9=T5,H5=R9("keys"),Ag=function(t){return H5[t]||(H5[t]=H9(t))},ng={},V9=M9,V5=tA,K9=ja,G9=Ac,ag=$n,ig=G1,j9=Ag,z9=ng,K5="Object already initialized",sg=V5.TypeError,W9=V5.WeakMap,Ah,nc,nh,X9=function(t){return nh(t)?nc(t):Ah(t,{})},q9=function(t){return function(e){var r;if(!K9(e)||(r=nc(e)).type!==t)throw sg("Incompatible receiver, "+t+" required");return r}};if(V9||ig.state){var Ca=ig.state||(ig.state=new W9);Ca.get=Ca.get,Ca.has=Ca.has,Ca.set=Ca.set,Ah=function(t,e){if(Ca.has(t))throw sg(K5);return e.facade=t,Ca.set(t,e),e},nc=function(t){return Ca.get(t)||{}},nh=function(t){return Ca.has(t)}}else{var Fo=j9("state");z9[Fo]=!0,Ah=function(t,e){if(ag(t,Fo))throw sg(K5);return e.facade=t,G9(t,Fo,e),e},nc=function(t){return ag(t,Fo)?t[Fo]:{}},nh=function(t){return ag(t,Fo)}}var ah={set:Ah,get:nc,has:nh,enforce:X9,getterFor:q9},og=Rr,Y9=Mr,$9=Tr,ih=$n,lg=Ba,J9=rh.CONFIGURABLE,Z9=rg,G5=ah,eV=G5.enforce,tV=G5.get,j5=String,sh=Object.defineProperty,rV=og("".slice),AV=og("".replace),nV=og([].join),aV=lg&&!Y9(function(){return sh(function(){},"length",{value:8}).length!==8}),iV=String(String).split("String"),sV=P5.exports=function(t,e,r){rV(j5(e),0,7)==="Symbol("&&(e="["+AV(j5(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!ih(t,"name")||J9&&t.name!==e)&&(lg?sh(t,"name",{value:e,configurable:!0}):t.name=e),aV&&r&&ih(r,"arity")&&t.length!==r.arity&&sh(t,"length",{value:r.arity});try{r&&ih(r,"constructor")&&r.constructor?lg&&sh(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var A=eV(t);return ih(A,"source")||(A.source=nV(iV,typeof e=="string"?e:"")),t};Function.prototype.toString=sV(function(){return $9(this)&&tV(this).source||Z9(this)},"toString");var z5=P5.exports,oV=Tr,lV=xa,cV=z5,fV=K1,xs=function(t,e,r,A){A||(A={});var n=A.enumerable,a=A.name!==void 0?A.name:e;if(oV(r)&&cV(r,a,A),A.global)n?t[e]=r:fV(e,r);else{try{A.unsafe?t[e]&&(n=!0):delete t[e]}catch{}n?t[e]=r:lV.f(t,e,{value:r,enumerable:!1,configurable:!A.nonConfigurable,writable:!A.nonWritable})}return t},W5={},uV=Math.ceil,hV=Math.floor,dV=Math.trunc||function(e){var r=+e;return(r>0?hV:uV)(r)},gV=dV,oh=function(t){var e=+t;return e!==e||e===0?0:gV(e)},pV=oh,mV=Math.max,vV=Math.min,X5=function(t,e){var r=pV(t);return r<0?mV(r+e,0):vV(r,e)},wV=oh,BV=Math.min,So=function(t){return t>0?BV(wV(t),9007199254740991):0},yV=So,lh=function(t){return yV(t.length)},xV=rc,CV=X5,bV=lh,q5=function(t){return function(e,r,A){var n=xV(e),a=bV(n),i=CV(A,a),s;if(t&&r!=r){for(;a>i;)if(s=n[i++],s!=s)return!0}else for(;a>i;i++)if((t||i in n)&&n[i]===r)return t||i||0;return!t&&-1}},Y5={includes:q5(!0),indexOf:q5(!1)},EV=Rr,cg=$n,FV=rc,SV=Y5.indexOf,_V=ng,$5=EV([].push),J5=function(t,e){var r=FV(t),A=0,n=[],a;for(a in r)!cg(_V,a)&&cg(r,a)&&$5(n,a);for(;e.length>A;)cg(r,a=e[A++])&&(~SV(n,a)||$5(n,a));return n},fg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],TV=J5,UV=fg,IV=UV.concat("length","prototype");W5.f=Object.getOwnPropertyNames||function(e){return TV(e,IV)};var Z5={};Z5.f=Object.getOwnPropertySymbols;var NV=ys,LV=Rr,QV=W5,kV=Z5,OV=NA,DV=LV([].concat),PV=NV("Reflect","ownKeys")||function(e){var r=QV.f(OV(e)),A=kV.f;return A?DV(r,A(e)):r},ex=$n,MV=PV,RV=Co,HV=xa,VV=function(t,e,r){for(var A=MV(e),n=HV.f,a=RV.f,i=0;i<A.length;i++){var s=A[i];!ex(t,s)&&!(r&&ex(r,s))&&n(t,s,a(e,s))}},KV=Mr,GV=Tr,jV=/#|\.prototype\./,ac=function(t,e){var r=WV[zV(t)];return r==qV?!0:r==XV?!1:GV(e)?KV(e):!!e},zV=ac.normalize=function(t){return String(t).replace(jV,".").toLowerCase()},WV=ac.data={},XV=ac.NATIVE="N",qV=ac.POLYFILL="P",tx=ac,ug=tA,YV=Co.f,$V=Ac,JV=xs,ZV=K1,eK=VV,tK=tx,jA=function(t,e){var r=t.target,A=t.global,n=t.stat,a,i,s,o,l,c;if(A?i=ug:n?i=ug[r]||ZV(r,{}):i=(ug[r]||{}).prototype,i)for(s in e){if(l=e[s],t.dontCallGetSet?(c=YV(i,s),o=c&&c.value):o=i[s],a=tK(A?s:r+(n?".":"#")+s,t.forced),!a&&o!==void 0){if(typeof l==typeof o)continue;eK(l,o)}(t.sham||o&&o.sham)&&$V(l,"sham",!0),JV(i,s,l,t)}},rK=ws,ic=typeof process<"u"&&rK(process)=="process",AK=Rr,nK=za,aK=function(t,e,r){try{return AK(nK(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},iK=Tr,sK=String,oK=TypeError,lK=function(t){if(typeof t=="object"||iK(t))return t;throw oK("Can't set "+sK(t)+" as a prototype")},cK=aK,fK=NA,uK=lK,rx=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=cK(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(n,a){return fK(n),uK(a),t?r(n,a):n.__proto__=a,n}}():void 0),hK=xa.f,dK=$n,gK=lA,Ax=gK("toStringTag"),hg=function(t,e,r){t&&!r&&(t=t.prototype),t&&!dK(t,Ax)&&hK(t,Ax,{configurable:!0,value:e})},nx=z5,pK=xa,mK=function(t,e,r){return r.get&&nx(r.get,e,{getter:!0}),r.set&&nx(r.set,e,{setter:!0}),pK.f(t,e,r)},vK=ys,wK=mK,BK=lA,yK=Ba,ax=BK("species"),xK=function(t){var e=vK(t);yK&&e&&!e[ax]&&wK(e,ax,{configurable:!0,get:function(){return this}})},CK=qu,bK=TypeError,EK=function(t,e){if(CK(e,t))return t;throw bK("Incorrect invocation")},FK=lA,SK=FK("toStringTag"),ix={};ix[SK]="z";var _K=String(ix)==="[object z]",TK=_K,UK=Tr,ch=ws,IK=lA,NK=IK("toStringTag"),LK=Object,QK=ch(function(){return arguments}())=="Arguments",kK=function(t,e){try{return t[e]}catch{}},dg=TK?ch:function(t){var e,r,A;return t===void 0?"Undefined":t===null?"Null":typeof(r=kK(e=LK(t),NK))=="string"?r:QK?ch(e):(A=ch(e))=="Object"&&UK(e.callee)?"Arguments":A},OK=Rr,DK=Mr,sx=Tr,PK=dg,MK=ys,RK=rg,ox=function(){},HK=[],lx=MK("Reflect","construct"),gg=/^\s*(?:class|function)\b/,VK=OK(gg.exec),KK=!gg.exec(ox),sc=function(e){if(!sx(e))return!1;try{return lx(ox,HK,e),!0}catch{return!1}},cx=function(e){if(!sx(e))return!1;switch(PK(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return KK||!!VK(gg,RK(e))}catch{return!0}};cx.sham=!0;var GK=!lx||DK(function(){var t;return sc(sc.call)||!sc(Object)||!sc(function(){t=!0})||t})?cx:sc,jK=GK,zK=Ju,WK=TypeError,XK=function(t){if(jK(t))return t;throw WK(zK(t)+" is not a constructor")},fx=NA,qK=XK,YK=Bs,$K=lA,JK=$K("species"),ux=function(t,e){var r=fx(t).constructor,A;return r===void 0||YK(A=fx(r)[JK])?e:qK(A)},ZK=zu,hx=Function.prototype,dx=hx.apply,gx=hx.call,pg=typeof Reflect=="object"&&Reflect.apply||(ZK?gx.bind(dx):function(){return gx.apply(dx,arguments)}),eG=ws,tG=Rr,oc=function(t){if(eG(t)==="Function")return tG(t)},px=oc,rG=za,AG=zu,nG=px(px.bind),mg=function(t,e){return rG(t),e===void 0?t:AG?nG(t,e):function(){return t.apply(e,arguments)}},aG=ys,mx=aG("document","documentElement"),iG=Rr,sG=iG([].slice),oG=TypeError,lG=function(t,e){if(t<e)throw oG("Not enough arguments");return t},cG=Yu,vx=/(?:ipad|iphone|ipod).*applewebkit/i.test(cG),dn=tA,fG=pg,uG=mg,wx=Tr,hG=$n,Bx=Mr,yx=mx,dG=sG,xx=eh,gG=lG,pG=vx,mG=ic,vg=dn.setImmediate,wg=dn.clearImmediate,vG=dn.process,Bg=dn.Dispatch,wG=dn.Function,Cx=dn.MessageChannel,BG=dn.String,yg=0,lc={},bx="onreadystatechange",cc,Cs,xg,Cg;Bx(function(){cc=dn.location});var bg=function(t){if(hG(lc,t)){var e=lc[t];delete lc[t],e()}},Eg=function(t){return function(){bg(t)}},Ex=function(t){bg(t.data)},Fx=function(t){dn.postMessage(BG(t),cc.protocol+"//"+cc.host)};(!vg||!wg)&&(vg=function(e){gG(arguments.length,1);var r=wx(e)?e:wG(e),A=dG(arguments,1);return lc[++yg]=function(){fG(r,void 0,A)},Cs(yg),yg},wg=function(e){delete lc[e]},mG?Cs=function(t){vG.nextTick(Eg(t))}:Bg&&Bg.now?Cs=function(t){Bg.now(Eg(t))}:Cx&&!pG?(xg=new Cx,Cg=xg.port2,xg.port1.onmessage=Ex,Cs=uG(Cg.postMessage,Cg)):dn.addEventListener&&wx(dn.postMessage)&&!dn.importScripts&&cc&&cc.protocol!=="file:"&&!Bx(Fx)?(Cs=Fx,dn.addEventListener("message",Ex,!1)):bx in xx("script")?Cs=function(t){yx.appendChild(xx("script"))[bx]=function(){yx.removeChild(this),bg(t)}}:Cs=function(t){setTimeout(Eg(t),0)});var Sx={set:vg,clear:wg},_x=function(){this.head=null,this.tail=null};_x.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var Tx=_x,yG=Yu,xG=/ipad|iphone|ipod/i.test(yG)&&typeof Pebble<"u",CG=Yu,bG=/web0s(?!.*chrome)/i.test(CG),bs=tA,Ux=mg,EG=Co.f,Fg=Sx.set,FG=Tx,SG=vx,_G=xG,TG=bG,Sg=ic,Ix=bs.MutationObserver||bs.WebKitMutationObserver,Nx=bs.document,Lx=bs.process,fh=bs.Promise,Qx=EG(bs,"queueMicrotask"),_g=Qx&&Qx.value,_o,Tg,Ug,uh,kx;if(!_g){var hh=new FG,dh=function(){var t,e;for(Sg&&(t=Lx.domain)&&t.exit();e=hh.get();)try{e()}catch(r){throw hh.head&&_o(),r}t&&t.enter()};!SG&&!Sg&&!TG&&Ix&&Nx?(Tg=!0,Ug=Nx.createTextNode(""),new Ix(dh).observe(Ug,{characterData:!0}),_o=function(){Ug.data=Tg=!Tg}):!_G&&fh&&fh.resolve?(uh=fh.resolve(void 0),uh.constructor=fh,kx=Ux(uh.then,uh),_o=function(){kx(dh)}):Sg?_o=function(){Lx.nextTick(dh)}:(Fg=Ux(Fg,bs),_o=function(){Fg(dh)}),_g=function(t){hh.head||_o(),hh.add(t)}}var UG=_g,IG=function(t,e){try{arguments.length==1?console.error(t):console.error(t,e)}catch{}},Ig=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},NG=tA,gh=NG.Promise,Ox=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",LG=Ox,QG=ic,kG=!LG&&!QG&&typeof window=="object"&&typeof document=="object",OG=tA,fc=gh,DG=Tr,PG=tx,MG=rg,RG=lA,HG=kG,VG=Ox,Ng=M1;fc&&fc.prototype;var KG=RG("species"),Lg=!1,Dx=DG(OG.PromiseRejectionEvent),GG=PG("Promise",function(){var t=MG(fc),e=t!==String(fc);if(!e&&Ng===66)return!0;if(!Ng||Ng<51||!/native code/.test(t)){var r=new fc(function(a){a(1)}),A=function(a){a(function(){},function(){})},n=r.constructor={};if(n[KG]=A,Lg=r.then(function(){})instanceof A,!Lg)return!0}return!e&&(HG||VG)&&!Dx}),uc={CONSTRUCTOR:GG,REJECTION_EVENT:Dx,SUBCLASSING:Lg},To={},Px=za,jG=TypeError,zG=function(t){var e,r;this.promise=new t(function(A,n){if(e!==void 0||r!==void 0)throw jG("Bad Promise constructor");e=A,r=n}),this.resolve=Px(e),this.reject=Px(r)};To.f=function(t){return new zG(t)};var WG=jA,ph=ic,Ni=tA,Uo=yA,Mx=xs,Rx=rx,XG=hg,qG=xK,YG=za,mh=Tr,$G=ja,JG=EK,ZG=ux,Hx=Sx.set,Qg=UG,ej=IG,tj=Ig,rj=Tx,Vx=ah,vh=gh,kg=uc,Kx=To,wh="Promise",Gx=kg.CONSTRUCTOR,Aj=kg.REJECTION_EVENT,nj=kg.SUBCLASSING,Og=Vx.getterFor(wh),aj=Vx.set,Io=vh&&vh.prototype,Es=vh,Bh=Io,jx=Ni.TypeError,Dg=Ni.document,Pg=Ni.process,Mg=Kx.f,ij=Mg,sj=!!(Dg&&Dg.createEvent&&Ni.dispatchEvent),zx="unhandledrejection",oj="rejectionhandled",Wx=0,Xx=1,lj=2,Rg=1,qx=2,yh,Yx,cj,$x,Jx=function(t){var e;return $G(t)&&mh(e=t.then)?e:!1},Zx=function(t,e){var r=e.value,A=e.state==Xx,n=A?t.ok:t.fail,a=t.resolve,i=t.reject,s=t.domain,o,l,c;try{n?(A||(e.rejection===qx&&uj(e),e.rejection=Rg),n===!0?o=r:(s&&s.enter(),o=n(r),s&&(s.exit(),c=!0)),o===t.promise?i(jx("Promise-chain cycle")):(l=Jx(o))?Uo(l,o,a,i):a(o)):i(r)}catch(d){s&&!c&&s.exit(),i(d)}},eC=function(t,e){t.notified||(t.notified=!0,Qg(function(){for(var r=t.reactions,A;A=r.get();)Zx(A,t);t.notified=!1,e&&!t.rejection&&fj(t)}))},tC=function(t,e,r){var A,n;sj?(A=Dg.createEvent("Event"),A.promise=e,A.reason=r,A.initEvent(t,!1,!0),Ni.dispatchEvent(A)):A={promise:e,reason:r},!Aj&&(n=Ni["on"+t])?n(A):t===zx&&ej("Unhandled promise rejection",r)},fj=function(t){Uo(Hx,Ni,function(){var e=t.facade,r=t.value,A=rC(t),n;if(A&&(n=tj(function(){ph?Pg.emit("unhandledRejection",r,e):tC(zx,e,r)}),t.rejection=ph||rC(t)?qx:Rg,n.error))throw n.value})},rC=function(t){return t.rejection!==Rg&&!t.parent},uj=function(t){Uo(Hx,Ni,function(){var e=t.facade;ph?Pg.emit("rejectionHandled",e):tC(oj,e,t.value)})},No=function(t,e,r){return function(A){t(e,A,r)}},Lo=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=lj,eC(t,!0))},Hg=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw jx("Promise can't be resolved itself");var A=Jx(e);A?Qg(function(){var n={done:!1};try{Uo(A,e,No(Hg,n,t),No(Lo,n,t))}catch(a){Lo(n,a,t)}}):(t.value=e,t.state=Xx,eC(t,!1))}catch(n){Lo({done:!1},n,t)}}};if(Gx&&(Es=function(e){JG(this,Bh),YG(e),Uo(yh,this);var r=Og(this);try{e(No(Hg,r),No(Lo,r))}catch(A){Lo(r,A)}},Bh=Es.prototype,yh=function(e){aj(this,{type:wh,done:!1,notified:!1,parent:!1,reactions:new rj,rejection:!1,state:Wx,value:void 0})},yh.prototype=Mx(Bh,"then",function(e,r){var A=Og(this),n=Mg(ZG(this,Es));return A.parent=!0,n.ok=mh(e)?e:!0,n.fail=mh(r)&&r,n.domain=ph?Pg.domain:void 0,A.state==Wx?A.reactions.add(n):Qg(function(){Zx(n,A)}),n.promise}),Yx=function(){var t=new yh,e=Og(t);this.promise=t,this.resolve=No(Hg,e),this.reject=No(Lo,e)},Kx.f=Mg=function(t){return t===Es||t===cj?new Yx(t):ij(t)},mh(vh)&&Io!==Object.prototype)){$x=Io.then,nj||Mx(Io,"then",function(e,r){var A=this;return new Es(function(n,a){Uo($x,A,n,a)}).then(e,r)},{unsafe:!0});try{delete Io.constructor}catch{}Rx&&Rx(Io,Bh)}WG({global:!0,constructor:!0,wrap:!0,forced:Gx},{Promise:Es}),XG(Es,wh,!1),qG(wh);var hc={},hj=lA,dj=hc,gj=hj("iterator"),pj=Array.prototype,mj=function(t){return t!==void 0&&(dj.Array===t||pj[gj]===t)},vj=dg,AC=bo,wj=Bs,Bj=hc,yj=lA,xj=yj("iterator"),nC=function(t){if(!wj(t))return AC(t,xj)||AC(t,"@@iterator")||Bj[vj(t)]},Cj=yA,bj=za,Ej=NA,Fj=Ju,Sj=nC,_j=TypeError,Tj=function(t,e){var r=arguments.length<2?Sj(t):e;if(bj(r))return Ej(Cj(r,t));throw _j(Fj(t)+" is not iterable")},Uj=yA,aC=NA,Ij=bo,Nj=function(t,e,r){var A,n;aC(t);try{if(A=Ij(t,"return"),!A){if(e==="throw")throw r;return r}A=Uj(A,t)}catch(a){n=!0,A=a}if(e==="throw")throw r;if(n)throw A;return aC(A),r},Lj=mg,Qj=yA,kj=NA,Oj=Ju,Dj=mj,Pj=lh,iC=qu,Mj=Tj,Rj=nC,sC=Nj,Hj=TypeError,xh=function(t,e){this.stopped=t,this.result=e},oC=xh.prototype,lC=function(t,e,r){var A=r&&r.that,n=!!(r&&r.AS_ENTRIES),a=!!(r&&r.IS_RECORD),i=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),o=Lj(e,A),l,c,d,g,h,m,v,B=function(b){return l&&sC(l,"normal",b),new xh(!0,b)},x=function(b){return n?(kj(b),s?o(b[0],b[1],B):o(b[0],b[1])):s?o(b,B):o(b)};if(a)l=t.iterator;else if(i)l=t;else{if(c=Rj(t),!c)throw Hj(Oj(t)+" is not iterable");if(Dj(c)){for(d=0,g=Pj(t);g>d;d++)if(h=x(t[d]),h&&iC(oC,h))return h;return new xh(!1)}l=Mj(t,c)}for(m=a?t.next:l.next;!(v=Qj(m,l)).done;){try{h=x(v.value)}catch(b){sC(l,"throw",b)}if(typeof h=="object"&&h&&iC(oC,h))return h}return new xh(!1)},Vj=lA,cC=Vj("iterator"),fC=!1;try{var Kj=0,uC={next:function(){return{done:!!Kj++}},return:function(){fC=!0}};uC[cC]=function(){return this},Array.from(uC,function(){throw 2})}catch{}var Gj=function(t,e){if(!e&&!fC)return!1;var r=!1;try{var A={};A[cC]=function(){return{next:function(){return{done:r=!0}}}},t(A)}catch{}return r},jj=gh,zj=Gj,Wj=uc.CONSTRUCTOR,hC=Wj||!zj(function(t){jj.all(t).then(void 0,function(){})}),Xj=jA,qj=yA,Yj=za,$j=To,Jj=Ig,Zj=lC,ez=hC;Xj({target:"Promise",stat:!0,forced:ez},{all:function(e){var r=this,A=$j.f(r),n=A.resolve,a=A.reject,i=Jj(function(){var s=Yj(r.resolve),o=[],l=0,c=1;Zj(e,function(d){var g=l++,h=!1;c++,qj(s,r,d).then(function(m){h||(h=!0,o[g]=m,--c||n(o))},a)}),--c||n(o)});return i.error&&a(i.value),A.promise}});var tz=jA,rz=uc.CONSTRUCTOR,Vg=gh,Az=ys,nz=Tr,az=xs,dC=Vg&&Vg.prototype;if(tz({target:"Promise",proto:!0,forced:rz,real:!0},{catch:function(t){return this.then(void 0,t)}}),nz(Vg)){var gC=Az("Promise").prototype.catch;dC.catch!==gC&&az(dC,"catch",gC,{unsafe:!0})}var iz=jA,sz=yA,oz=za,lz=To,cz=Ig,fz=lC,uz=hC;iz({target:"Promise",stat:!0,forced:uz},{race:function(e){var r=this,A=lz.f(r),n=A.reject,a=cz(function(){var i=oz(r.resolve);fz(e,function(s){sz(i,r,s).then(A.resolve,n)})});return a.error&&n(a.value),A.promise}});var hz=jA,dz=yA,gz=To,pz=uc.CONSTRUCTOR;hz({target:"Promise",stat:!0,forced:pz},{reject:function(e){var r=gz.f(this);return dz(r.reject,void 0,e),r.promise}});var mz=NA,vz=ja,wz=To,Bz=function(t,e){if(mz(t),vz(e)&&e.constructor===t)return e;var r=wz.f(t),A=r.resolve;return A(e),r.promise},yz=jA,xz=ys,Cz=uc.CONSTRUCTOR,bz=Bz;xz("Promise"),yz({target:"Promise",stat:!0,forced:Cz},{resolve:function(e){return bz(this,e)}});function pC(t,e,r,A,n,a,i){try{var s=t[a](i),o=s.value}catch(l){r(l);return}s.done?e(o):Promise.resolve(o).then(A,n)}function Wa(t){return function(){var e=this,r=arguments;return new Promise(function(A,n){var a=t.apply(e,r);function i(o){pC(a,A,n,i,s,"next",o)}function s(o){pC(a,A,n,i,s,"throw",o)}i(void 0)})}}var Ez=dg,Fz=String,ba=function(t){if(Ez(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Fz(t)},Sz=NA,mC=function(){var t=Sz(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Kg=Mr,_z=tA,Gg=_z.RegExp,jg=Kg(function(){var t=Gg("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),Tz=jg||Kg(function(){return!Gg("a","y").sticky}),Uz=jg||Kg(function(){var t=Gg("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),vC={BROKEN_CARET:Uz,MISSED_STICKY:Tz,UNSUPPORTED_Y:jg},wC={},Iz=J5,Nz=fg,Lz=Object.keys||function(e){return Iz(e,Nz)},Qz=Ba,kz=O5,Oz=xa,Dz=NA,Pz=rc,Mz=Lz;wC.f=Qz&&!kz?Object.defineProperties:function(e,r){Dz(e);for(var A=Pz(r),n=Mz(r),a=n.length,i=0,s;a>i;)Oz.f(e,s=n[i++],A[s]);return e};var Rz=NA,Hz=wC,BC=fg,Vz=ng,Kz=mx,Gz=eh,jz=Ag,yC=">",xC="<",zg="prototype",Wg="script",CC=jz("IE_PROTO"),Xg=function(){},bC=function(t){return xC+Wg+yC+t+xC+"/"+Wg+yC},EC=function(t){t.write(bC("")),t.close();var e=t.parentWindow.Object;return t=null,e},zz=function(){var t=Gz("iframe"),e="java"+Wg+":",r;return t.style.display="none",Kz.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(bC("document.F=Object")),r.close(),r.F},Ch,bh=function(){try{Ch=new ActiveXObject("htmlfile")}catch{}bh=typeof document<"u"?document.domain&&Ch?EC(Ch):zz():EC(Ch);for(var t=BC.length;t--;)delete bh[zg][BC[t]];return bh()};Vz[CC]=!0;var qg=Object.create||function(e,r){var A;return e!==null?(Xg[zg]=Rz(e),A=new Xg,Xg[zg]=null,A[CC]=e):A=bh(),r===void 0?A:Hz.f(A,r)},Wz=Mr,Xz=tA,qz=Xz.RegExp,Yz=Wz(function(){var t=qz(".","s");return!(t.dotAll&&t.exec(`
|
|
376
376
|
`)&&t.flags==="s")}),$z=Mr,Jz=tA,Zz=Jz.RegExp,eW=$z(function(){var t=Zz("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),Qo=yA,Eh=Rr,tW=ba,rW=mC,AW=vC,nW=j1,aW=qg,iW=ah.get,sW=Yz,oW=eW,lW=nW("native-string-replace",String.prototype.replace),Fh=RegExp.prototype.exec,Yg=Fh,cW=Eh("".charAt),fW=Eh("".indexOf),uW=Eh("".replace),$g=Eh("".slice),Jg=function(){var t=/a/,e=/b*/g;return Qo(Fh,t,"a"),Qo(Fh,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),FC=AW.BROKEN_CARET,Zg=/()??/.exec("")[1]!==void 0,hW=Jg||Zg||FC||sW||oW;hW&&(Yg=function(e){var r=this,A=iW(r),n=tW(e),a=A.raw,i,s,o,l,c,d,g;if(a)return a.lastIndex=r.lastIndex,i=Qo(Yg,a,n),r.lastIndex=a.lastIndex,i;var h=A.groups,m=FC&&r.sticky,v=Qo(rW,r),B=r.source,x=0,b=n;if(m&&(v=uW(v,"y",""),fW(v,"g")===-1&&(v+="g"),b=$g(n,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&cW(n,r.lastIndex-1)!==`
|